@gouvfr-lasuite/ui-kit 0.1.3 → 0.1.5

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),vn=require("@openfun/cunningham-react"),Ft=require("react-dom");function gu(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const C=gu(d),rh=gu(Ft);function ih(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ur={exports:{}},Pn={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),mn=require("@openfun/cunningham-react"),jt=require("react-dom");function mu(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const C=mu(d),ah=mu(jt);function sh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cr={exports:{}},On={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ba;function oh(){if(Ba)return Pn;Ba=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var s in i)s!=="key"&&(o[s]=i[s])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:o}}return Pn.Fragment=e,Pn.jsx=n,Pn.jsxs=n,Pn}var On={};/**
9
+ */var Ua;function lh(){if(Ua)return On;Ua=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var s in i)s!=="key"&&(o[s]=i[s])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:o}}return On.Fragment=e,On.jsx=n,On.jsxs=n,On}var In={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,21 +14,21 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Wa;function ah(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===_?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case D:return"Fragment";case x:return"Portal";case b:return"Profiler";case P:return"StrictMode";case z:return"Suspense";case E:return"SuspenseList"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case B:return($.displayName||"Context")+".Provider";case k:return($._context.displayName||"Context")+".Consumer";case R:var G=$.render;return $=$.displayName,$||($=G.displayName||G.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return G=$.displayName||null,G!==null?G:t($.type)||"Memo";case j:G=$._payload,$=$._init;try{return t($(G))}catch{}}return null}function e($){return""+$}function n($){try{e($);var G=!1}catch{G=!0}if(G){G=console;var q=G.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e($)}}function r(){}function i(){if(L===0){K=console.log,W=console.info,U=console.warn,F=console.error,X=console.group,te=console.groupCollapsed,de=console.groupEnd;var $={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}L++}function o(){if(L--,L===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},$,{value:K}),info:Q({},$,{value:W}),warn:Q({},$,{value:U}),error:Q({},$,{value:F}),group:Q({},$,{value:X}),groupCollapsed:Q({},$,{value:te}),groupEnd:Q({},$,{value:de})})}0>L&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a($){if(ce===void 0)try{throw Error()}catch(q){var G=q.stack.trim().match(/\n( *(at )?)/);ce=G&&G[1]||"",oe=-1<q.stack.indexOf(`
17
+ */var Va;function uh(){return Va||(Va=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===M?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case O:return"Fragment";case x:return"Portal";case b:return"Profiler";case P:return"StrictMode";case z:return"Suspense";case E:return"SuspenseList"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case B:return($.displayName||"Context")+".Provider";case R:return($._context.displayName||"Context")+".Consumer";case N:var G=$.render;return $=$.displayName,$||($=G.displayName||G.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return G=$.displayName||null,G!==null?G:t($.type)||"Memo";case j:G=$._payload,$=$._init;try{return t($(G))}catch{}}return null}function e($){return""+$}function n($){try{e($);var G=!1}catch{G=!0}if(G){G=console;var q=G.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e($)}}function r(){}function i(){if(A===0){K=console.log,W=console.info,U=console.warn,L=console.error,J=console.group,te=console.groupCollapsed,de=console.groupEnd;var $={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}A++}function o(){if(A--,A===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},$,{value:K}),info:H({},$,{value:W}),warn:H({},$,{value:U}),error:H({},$,{value:L}),group:H({},$,{value:J}),groupCollapsed:H({},$,{value:te}),groupEnd:H({},$,{value:de})})}0>A&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a($){if(ce===void 0)try{throw Error()}catch(q){var G=q.stack.trim().match(/\n( *(at )?)/);ce=G&&G[1]||"",oe=-1<q.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<q.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+ce+$+oe}function s($,G){if(!$||ge)return"";var q=re.get($);if(q!==void 0)return q;ge=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=H.H,H.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(G){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(Je){var lr=Je}Reflect.construct($,[],st)}else{try{st.call()}catch(Je){lr=Je}$.call(st.prototype)}}else{try{throw Error()}catch(Je){lr=Je}(st=$())&&typeof st.catch=="function"&&st.catch(function(){})}}catch(Je){if(Je&&lr&&typeof Je.stack=="string")return[Je.stack,lr.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var se=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");se&&se.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Z=Se.DetermineComponentFrameRoot(),Xe=Z[0],Bt=Z[1];if(Xe&&Bt){var $e=Xe.split(`
20
- `),yt=Bt.split(`
21
- `);for(Z=se=0;se<$e.length&&!$e[se].includes("DetermineComponentFrameRoot");)se++;for(;Z<yt.length&&!yt[Z].includes("DetermineComponentFrameRoot");)Z++;if(se===$e.length||Z===yt.length)for(se=$e.length-1,Z=yt.length-1;1<=se&&0<=Z&&$e[se]!==yt[Z];)Z--;for(;1<=se&&0<=Z;se--,Z--)if($e[se]!==yt[Z]){if(se!==1||Z!==1)do if(se--,Z--,0>Z||$e[se]!==yt[Z]){var Dn=`
22
- `+$e[se].replace(" at new "," at ");return $.displayName&&Dn.includes("<anonymous>")&&(Dn=Dn.replace("<anonymous>",$.displayName)),typeof $=="function"&&re.set($,Dn),Dn}while(1<=se&&0<=Z);break}}}finally{ge=!1,H.H=ie,o(),Error.prepareStackTrace=q}return $e=($e=$?$.displayName||$.name:"")?a($e):"",typeof $=="function"&&re.set($,$e),$e}function l($){if($==null)return"";if(typeof $=="function"){var G=$.prototype;return s($,!(!G||!G.isReactComponent))}if(typeof $=="string")return a($);switch($){case z:return a("Suspense");case E:return a("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case R:return $=s($.render,!1),$;case I:return l($.type);case j:G=$._payload,$=$._init;try{return l($(G))}catch{}}return""}function u(){var $=H.A;return $===null?null:$.getOwner()}function c($){if(Y.call($,"key")){var G=Object.getOwnPropertyDescriptor($,"key").get;if(G&&G.isReactWarning)return!1}return $.key!==void 0}function p($,G){function q(){at||(at=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}q.isReactWarning=!0,Object.defineProperty($,"key",{get:q,configurable:!0})}function g(){var $=t(this.type);return ve[$]||(ve[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function h($,G,q,ie,Se,se){return q=se.ref,$={$$typeof:O,type:$,key:G,props:se,_owner:Se},(q!==void 0?q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:g}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function y($,G,q,ie,Se,se){if(typeof $=="string"||typeof $=="function"||$===D||$===b||$===P||$===z||$===E||$===V||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===I||$.$$typeof===B||$.$$typeof===k||$.$$typeof===R||$.$$typeof===M||$.getModuleId!==void 0)){var Z=G.children;if(Z!==void 0)if(ie)if(N(Z)){for(ie=0;ie<Z.length;ie++)f(Z[ie],$);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(Z,$)}else Z="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(Z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),$===null?ie="null":N($)?ie="array":$!==void 0&&$.$$typeof===O?(ie="<"+(t($.type)||"Unknown")+" />",Z=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof $,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Z);if(Y.call(G,"key")){Z=t($);var Xe=Object.keys(G).filter(function($e){return $e!=="key"});ie=0<Xe.length?"{key: someKey, "+Xe.join(": ..., ")+": ...}":"{key: someKey}",Tn[Z+ie]||(Xe=0<Xe.length?"{"+Xe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
+ `+ce+$+oe}function s($,G){if(!$||ge)return"";var q=re.get($);if(q!==void 0)return q;ge=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=Y.H,Y.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(G){var lt=function(){throw Error()};if(Object.defineProperty(lt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(lt,[])}catch(Je){var ur=Je}Reflect.construct($,[],lt)}else{try{lt.call()}catch(Je){ur=Je}$.call(lt.prototype)}}else{try{throw Error()}catch(Je){ur=Je}(lt=$())&&typeof lt.catch=="function"&&lt.catch(function(){})}}catch(Je){if(Je&&ur&&typeof Je.stack=="string")return[Je.stack,ur.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var se=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");se&&se.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Z=Se.DetermineComponentFrameRoot(),Xe=Z[0],Bt=Z[1];if(Xe&&Bt){var $e=Xe.split(`
20
+ `),bt=Bt.split(`
21
+ `);for(Z=se=0;se<$e.length&&!$e[se].includes("DetermineComponentFrameRoot");)se++;for(;Z<bt.length&&!bt[Z].includes("DetermineComponentFrameRoot");)Z++;if(se===$e.length||Z===bt.length)for(se=$e.length-1,Z=bt.length-1;1<=se&&0<=Z&&$e[se]!==bt[Z];)Z--;for(;1<=se&&0<=Z;se--,Z--)if($e[se]!==bt[Z]){if(se!==1||Z!==1)do if(se--,Z--,0>Z||$e[se]!==bt[Z]){var Pn=`
22
+ `+$e[se].replace(" at new "," at ");return $.displayName&&Pn.includes("<anonymous>")&&(Pn=Pn.replace("<anonymous>",$.displayName)),typeof $=="function"&&re.set($,Pn),Pn}while(1<=se&&0<=Z);break}}}finally{ge=!1,Y.H=ie,o(),Error.prepareStackTrace=q}return $e=($e=$?$.displayName||$.name:"")?a($e):"",typeof $=="function"&&re.set($,$e),$e}function l($){if($==null)return"";if(typeof $=="function"){var G=$.prototype;return s($,!(!G||!G.isReactComponent))}if(typeof $=="string")return a($);switch($){case z:return a("Suspense");case E:return a("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case N:return $=s($.render,!1),$;case I:return l($.type);case j:G=$._payload,$=$._init;try{return l($(G))}catch{}}return""}function u(){var $=Y.A;return $===null?null:$.getOwner()}function c($){if(F.call($,"key")){var G=Object.getOwnPropertyDescriptor($,"key").get;if(G&&G.isReactWarning)return!1}return $.key!==void 0}function h($,G){function q(){st||(st=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}q.isReactWarning=!0,Object.defineProperty($,"key",{get:q,configurable:!0})}function p(){var $=t(this.type);return ve[$]||(ve[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function g($,G,q,ie,Se,se){return q=se.ref,$={$$typeof:D,type:$,key:G,props:se,_owner:Se},(q!==void 0?q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:p}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function m($,G,q,ie,Se,se){if(typeof $=="string"||typeof $=="function"||$===O||$===b||$===P||$===z||$===E||$===V||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===I||$.$$typeof===B||$.$$typeof===R||$.$$typeof===N||$.$$typeof===k||$.getModuleId!==void 0)){var Z=G.children;if(Z!==void 0)if(ie)if(_(Z)){for(ie=0;ie<Z.length;ie++)f(Z[ie],$);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(Z,$)}else Z="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(Z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),$===null?ie="null":_($)?ie="array":$!==void 0&&$.$$typeof===D?(ie="<"+(t($.type)||"Unknown")+" />",Z=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof $,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Z);if(F.call(G,"key")){Z=t($);var Xe=Object.keys(G).filter(function($e){return $e!=="key"});ie=0<Xe.length?"{key: someKey, "+Xe.join(": ..., ")+": ...}":"{key: someKey}",Dn[Z+ie]||(Xe=0<Xe.length?"{"+Xe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
23
  let props = %s;
24
24
  <%s {...props} />
25
25
  React keys must be passed directly to JSX without using spread:
26
26
  let props = %s;
27
- <%s key={someKey} {...props} />`,ie,Z,Xe,Z),Tn[Z+ie]=!0)}if(Z=null,q!==void 0&&(n(q),Z=""+q),c(G)&&(n(G.key),Z=""+G.key),"key"in G){q={};for(var Bt in G)Bt!=="key"&&(q[Bt]=G[Bt])}else q=G;return Z&&p(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),h($,Z,se,Se,u(),q)}function f($,G){if(typeof $=="object"&&$&&$.$$typeof!==Ue){if(N($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&m(ie,G)}else if(v($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?q=null:(q=A&&$[A]||$["@@iterator"],q=typeof q=="function"?q:null),typeof q=="function"&&q!==$.entries&&(q=q.call($),q!==$))for(;!($=q.next()).done;)v($.value)&&m($.value,G)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===O}function m($,G){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,G=S(G),!sr[G])){sr[G]=!0;var q="";$&&$._owner!=null&&$._owner!==u()&&(q=null,typeof $._owner.tag=="number"?q=t($._owner.type):typeof $._owner.name=="string"&&(q=$._owner.name),q=" It was passed a child from "+q+".");var ie=H.getCurrentStack;H.getCurrentStack=function(){var Se=l($.type);return ie&&(Se+=ie()||""),Se},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',G,q),H.getCurrentStack=ie}}function S($){var G="",q=u();return q&&(q=t(q.type))&&(G=`
27
+ <%s key={someKey} {...props} />`,ie,Z,Xe,Z),Dn[Z+ie]=!0)}if(Z=null,q!==void 0&&(n(q),Z=""+q),c(G)&&(n(G.key),Z=""+G.key),"key"in G){q={};for(var Bt in G)Bt!=="key"&&(q[Bt]=G[Bt])}else q=G;return Z&&h(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),g($,Z,se,Se,u(),q)}function f($,G){if(typeof $=="object"&&$&&$.$$typeof!==Ue){if(_($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&y(ie,G)}else if(v($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?q=null:(q=X&&$[X]||$["@@iterator"],q=typeof q=="function"?q:null),typeof q=="function"&&q!==$.entries&&(q=q.call($),q!==$))for(;!($=q.next()).done;)v($.value)&&y($.value,G)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===D}function y($,G){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,G=S(G),!lr[G])){lr[G]=!0;var q="";$&&$._owner!=null&&$._owner!==u()&&(q=null,typeof $._owner.tag=="number"?q=t($._owner.type):typeof $._owner.name=="string"&&(q=$._owner.name),q=" It was passed a child from "+q+".");var ie=Y.getCurrentStack;Y.getCurrentStack=function(){var Se=l($.type);return ie&&(Se+=ie()||""),Se},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',G,q),Y.getCurrentStack=ie}}function S($){var G="",q=u();return q&&(q=t(q.type))&&(G=`
28
28
 
29
29
  Check the render method of \``+q+"`."),G||($=t($))&&(G=`
30
30
 
31
- Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),B=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),A=Symbol.iterator,_=Symbol.for("react.client.reference"),H=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,Q=Object.assign,M=Symbol.for("react.client.reference"),N=Array.isArray,L=0,K,W,U,F,X,te,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),at,ve={},Tn={},sr={};On.Fragment=D,On.jsx=function($,G,q,ie,Se){return y($,G,q,!1,ie,Se)},On.jsxs=function($,G,q,ie,Se){return y($,G,q,!0,ie,Se)}}()),On}var Ua;function sh(){return Ua||(Ua=1,process.env.NODE_ENV==="production"?ur.exports=oh():ur.exports=ah()),ur.exports}var T=sh();const lh={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},uh={components:lh},ch={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},dh={components:ch},fh={},hh={};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Br(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Br(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Br(t,...e)}function vu(){return{enUS:Br(uh,fh),frFR:Br(dh,hh)}}const ph=t=>{const e=vu();return T.jsx(vn.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},gh=({disabled:t,onClick:e})=>T.jsx(vn.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function De(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function vh(t){let[e,n]=d.useState(t),r=d.useRef(null),i=De(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=De(a=>{r.current=a(e),i()});return[e,o]}const Wr={prefix:String(Math.round(Math.random()*1e10)),current:0},mu=d.createContext(Wr),mh=d.createContext(!1);let yh=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function bh(t=!1){let e=d.useContext(mu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=Ii.get(o);a==null?Ii.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,Ii.delete(o))}n.current=++e.current}return n.current}function Sh(t){let e=d.useContext(mu);e===Wr&&!yh&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=bh(!!t),r=e===Wr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function wh(t){let e=d.useId(),[n]=d.useState(En()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Wr.prefix}`;return t||`${r}-${e}`}const Eh=typeof d.useId=="function"?wh:Sh;function $h(){return!1}function xh(){return!0}function Ch(t){return()=>{}}function En(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Ch,$h,xh):d.useContext(mh)}let Th=!!(typeof window<"u"&&window.document&&window.document.createElement),dt=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Eh(e),o=d.useCallback(a=>{r.current=a},[]);return Th&&(dt.has(i)&&!dt.get(i).includes(o)?dt.set(i,[...dt.get(i),o]):dt.set(i,[o])),pe(()=>{let a=i;return()=>{dt.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Dh(t,e){if(t===e)return t;let n=dt.get(t);if(n)return n.forEach(i=>i(e)),e;let r=dt.get(e);return r?(r.forEach(i=>i(t)),t):e}function _i(t=[]){let e=tr(),[n,r]=vh(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Vn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ke=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},mn=t=>t&&"window"in t&&t.window===t?t:Ke(t).defaultView||window;function yu(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=yu(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function jt(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=yu(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Vn(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=jt(o,a):i==="id"&&o&&a?e.id=Dh(o,a):e[i]=a!==void 0?a:o}}return e}function bu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const Ph=new Set(["id"]),Oh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ih=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_h=/^(data-.*)$/;function Be(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(Ph.has(a)||n&&Oh.has(a)||r&&Ih.has(a)||i!=null&&i.has(a)||_h.test(a))&&(o[a]=t[a]);return o}function $t(t){if(kh())t.focus({preventScroll:!0});else{let e=Nh(t);t.focus(),Rh(e)}}let cr=null;function kh(){if(cr==null){cr=!1;try{document.createElement("div").focus({get preventScroll(){return cr=!0,!0}})}catch{}}return cr}function Nh(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Rh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ui(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ot(t){let e=null;return()=>(e==null&&(e=t()),e)}const Ot=ot(function(){return aa(/^Mac/i)}),Mh=ot(function(){return aa(/^iPhone/i)}),Su=ot(function(){return aa(/^iPad/i)||Ot()&&navigator.maxTouchPoints>1}),ci=ot(function(){return Mh()||Su()}),Ah=ot(function(){return Ot()||ci()}),wu=ot(function(){return ui(/AppleWebKit/i)&&!Kh()}),Kh=ot(function(){return ui(/Chrome/i)}),Eu=ot(function(){return ui(/Android/i)}),Lh=ot(function(){return ui(/Firefox/i)}),Fh=d.createContext({isNative:!0,open:zh,useHref:t=>t});function di(){return d.useContext(Fh)}function It(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=e;Lh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(Ot()?o=!0:a=!0);let u=wu()&&Ot()&&!Su()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});It.isOpening=n,$t(t),t.dispatchEvent(u),It.isOpening=!1}It.isOpening=!1;function jh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function zh(t,e){jh(t,n=>It(n,e))}function $u(t){let e=di();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let nn=new Map,Eo=new Set;function Va(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Va():document.addEventListener("DOMContentLoaded",Va));function Hh(t){requestAnimationFrame(()=>{nn.size===0?t():Eo.add(t)})}function xu(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function sa(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function $n(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ga(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Bh(){return typeof window.ResizeObserver<"u"}function qa(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Bh()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Wh(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Cu(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Uh(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let Vh=0;const ki=new Map;function Gh(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Vh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function dr(t,e,n,r){let i=De(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Tu(t,e){let n=Ya(t,e,"left"),r=Ya(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:p,scrollPaddingBottom:g,scrollPaddingLeft:h}=getComputedStyle(t),y=a+parseInt(u,10),f=s+parseInt(l,10),v=y+t.clientWidth,m=f+t.clientHeight,S=parseInt(c,10)||0,w=parseInt(g,10)||0,O=parseInt(p,10)||0,x=parseInt(h,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-O&&(a+=n+i-v+O),r<=f+S?s=r-parseInt(l,10)-S:r+o>m-w&&(s+=r+o-m+w),t.scrollLeft=a,t.scrollTop=s}function Ya(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Xa(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=Uh(t);for(let u of l)Tu(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:p}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-p)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function $o(t){return t.mozInputSource===0&&t.isTrusted?!0:Eu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function qh(t){return!Eu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Yh="react-aria-clear-focus",Xh="react-aria-focus",Du="react-aria-update-activedescendant";function rn(t){return Ot()?t.metaKey:t.ctrlKey}function Jh(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Pu(t,i,d.useCallback(()=>r(!1),[])),i}function Qh(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Pu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Pu(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Ft.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?t:r,l=d.useCallback((u,...c)=>{let p=(g,...h)=>{n&&(Object.is(s,g)||n(g,...h)),a||(s=g)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...y)=>{let f=u(a?s:h,...y);return p(f,...c),a?h:f})):(a||i(u),p(u,...c))},[a,s,n]);return[s,l]}function xo(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Ja=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function mt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...s,defaultClassName:i}):l=e,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...s,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,s])}function la(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Ja])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Ja;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=la(n,t.slot)||{},{ref:i,...o}=r,a=$n(d.useMemo(()=>bu(e,i),[e,i])),s=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},p=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...p}}:s.style={...o.style,...t.style}),[s,a]}function Zh(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(e(s.textValue)||s.type==="header"){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ou{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends Ou{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class ep extends Ou{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Iu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let p=a.get(c);if(!p){p=e(c);var s,l;let g=(l=(s=p.props.id)!==null&&s!==void 0?s:c.key)!==null&&l!==void 0?l:c.id;if(g==null)throw new Error("Could not determine key for item");r&&(g=r+":"+g),p=d.cloneElement(p,i?{key:g,id:g,value:c}:{key:g}),a.set(c,p)}u.push(p)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Ur=d.createContext(!1),tp=typeof DocumentFragment<"u"?new DocumentFragment:null;function np(t){let e=d.useContext(Ur),n=En();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Ur.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):Ft.createPortal(r,tp)}function rp(t){let e=(n,r)=>d.useContext(Ur)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function ip(){return d.useContext(Ur)}const op=typeof document<"u"?d.useLayoutEffect:()=>{};var fr={exports:{}},Ni={};/**
31
+ Check the top-level render call using <`+$+">."),G}var w=d,D=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),B=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),X=Symbol.iterator,M=Symbol.for("react.client.reference"),Y=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,H=Object.assign,k=Symbol.for("react.client.reference"),_=Array.isArray,A=0,K,W,U,L,J,te,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),st,ve={},Dn={},lr={};In.Fragment=O,In.jsx=function($,G,q,ie,Se){return m($,G,q,!1,ie,Se)},In.jsxs=function($,G,q,ie,Se){return m($,G,q,!0,ie,Se)}}()),In}var Ga;function ch(){return Ga||(Ga=1,process.env.NODE_ENV==="production"?cr.exports=lh():cr.exports=uh()),cr.exports}var T=ch();const dh={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},fh={components:dh},hh={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},ph={components:hh},gh={},vh={};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Wr(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Wr(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Wr(t,...e)}function yu(){return{enUS:Wr(fh,gh),frFR:Wr(ph,vh)}}const mh=t=>{const e=yu();return T.jsx(mn.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},yh=({disabled:t,onClick:e})=>T.jsx(mn.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function De(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function bh(t){let[e,n]=d.useState(t),r=d.useRef(null),i=De(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=De(a=>{r.current=a(e),i()});return[e,o]}const Ur={prefix:String(Math.round(Math.random()*1e10)),current:0},bu=d.createContext(Ur),Sh=d.createContext(!1);let wh=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function Eh(t=!1){let e=d.useContext(bu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=Ii.get(o);a==null?Ii.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,Ii.delete(o))}n.current=++e.current}return n.current}function $h(t){let e=d.useContext(bu);e===Ur&&!wh&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Eh(!!t),r=e===Ur&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function xh(t){let e=d.useId(),[n]=d.useState($n()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ur.prefix}`;return t||`${r}-${e}`}const Ch=typeof d.useId=="function"?xh:$h;function Th(){return!1}function Dh(){return!0}function Ph(t){return()=>{}}function $n(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Ph,Th,Dh):d.useContext(Sh)}let Oh=!!(typeof window<"u"&&window.document&&window.document.createElement),ft=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Ch(e),o=d.useCallback(a=>{r.current=a},[]);return Oh&&(ft.has(i)&&!ft.get(i).includes(o)?ft.set(i,[...ft.get(i),o]):ft.set(i,[o])),pe(()=>{let a=i;return()=>{ft.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Ih(t,e){if(t===e)return t;let n=ft.get(t);if(n)return n.forEach(i=>i(e)),e;let r=ft.get(e);return r?(r.forEach(i=>i(t)),t):e}function _i(t=[]){let e=tr(),[n,r]=bh(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Vn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ke=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},yn=t=>t&&"window"in t&&t.window===t?t:Ke(t).defaultView||window;function Su(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Su(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Su(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Vn(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=ot(o,a):i==="id"&&o&&a?e.id=Ih(o,a):e[i]=a!==void 0?a:o}}return e}function wu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const _h=new Set(["id"]),kh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Rh=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Nh=/^(data-.*)$/;function Be(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(_h.has(a)||n&&kh.has(a)||r&&Rh.has(a)||i!=null&&i.has(a)||Nh.test(a))&&(o[a]=t[a]);return o}function xt(t){if(Mh())t.focus({preventScroll:!0});else{let e=Ah(t);t.focus(),Kh(e)}}let dr=null;function Mh(){if(dr==null){dr=!1;try{document.createElement("div").focus({get preventScroll(){return dr=!0,!0}})}catch{}}return dr}function Ah(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Kh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ci(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function at(t){let e=null;return()=>(e==null&&(e=t()),e)}const It=at(function(){return aa(/^Mac/i)}),Lh=at(function(){return aa(/^iPhone/i)}),Eu=at(function(){return aa(/^iPad/i)||It()&&navigator.maxTouchPoints>1}),di=at(function(){return Lh()||Eu()}),Fh=at(function(){return It()||di()}),$u=at(function(){return ci(/AppleWebKit/i)&&!jh()}),jh=at(function(){return ci(/Chrome/i)}),xu=at(function(){return ci(/Android/i)}),zh=at(function(){return ci(/Firefox/i)}),Hh=d.createContext({isNative:!0,open:Wh,useHref:t=>t});function fi(){return d.useContext(Hh)}function _t(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=e;zh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(It()?o=!0:a=!0);let u=$u()&&It()&&!Eu()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});_t.isOpening=n,xt(t),t.dispatchEvent(u),_t.isOpening=!1}_t.isOpening=!1;function Bh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function Wh(t,e){Bh(t,n=>_t(n,e))}function Cu(t){let e=fi();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let nn=new Map,Eo=new Set;function qa(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?qa():document.addEventListener("DOMContentLoaded",qa));function Uh(t){requestAnimationFrame(()=>{nn.size===0?t():Eo.add(t)})}function Tu(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function sa(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function xn(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ya(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Vh(){return typeof window.ResizeObserver<"u"}function Xa(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Vh()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Gh(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Du(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function qh(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let Yh=0;const ki=new Map;function Xh(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Yh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function fr(t,e,n,r){let i=De(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Pu(t,e){let n=Ja(t,e,"left"),r=Ja(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:h,scrollPaddingBottom:p,scrollPaddingLeft:g}=getComputedStyle(t),m=a+parseInt(u,10),f=s+parseInt(l,10),v=m+t.clientWidth,y=f+t.clientHeight,S=parseInt(c,10)||0,w=parseInt(p,10)||0,D=parseInt(h,10)||0,x=parseInt(g,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-D&&(a+=n+i-v+D),r<=f+S?s=r-parseInt(l,10)-S:r+o>y-w&&(s+=r+o-y+w),t.scrollLeft=a,t.scrollTop=s}function Ja(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Qa(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=qh(t);for(let u of l)Pu(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:h}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-h)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function $o(t){return t.mozInputSource===0&&t.isTrusted?!0:xu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Jh(t){return!xu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Qh="react-aria-clear-focus",Zh="react-aria-focus",Ou="react-aria-update-activedescendant";function rn(t){return It()?t.metaKey:t.ctrlKey}function ep(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Iu(t,i,d.useCallback(()=>r(!1),[])),i}function tp(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Iu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Iu(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||jt.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?t:r,l=d.useCallback((u,...c)=>{let h=(p,...g)=>{n&&(Object.is(s,p)||n(p,...g)),a||(s=p)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((g,...m)=>{let f=u(a?s:g,...m);return h(f,...c),a?g:f})):(a||i(u),h(u,...c))},[a,s,n]);return[s,l]}function xo(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Za=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function yt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...s,defaultClassName:i}):l=e,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...s,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,s])}function la(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Za])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Za;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=la(n,t.slot)||{},{ref:i,...o}=r,a=xn(d.useMemo(()=>wu(e,i),[e,i])),s=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},h=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...h}}:s.style={...o.style,...t.style}),[s,a]}function np(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(e(s.textValue)||s.type==="header"){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class _u{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends _u{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class rp extends _u{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function ku(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let h=a.get(c);if(!h){h=e(c);var s,l;let p=(l=(s=h.props.id)!==null&&s!==void 0?s:c.key)!==null&&l!==void 0?l:c.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),h=d.cloneElement(h,i?{key:p,id:p,value:c}:{key:p}),a.set(c,h)}u.push(h)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Vr=d.createContext(!1),ip=typeof DocumentFragment<"u"?new DocumentFragment:null;function op(t){let e=d.useContext(Vr),n=$n();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Vr.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):jt.createPortal(r,ip)}function ap(t){let e=(n,r)=>d.useContext(Vr)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function sp(){return d.useContext(Vr)}const lp=typeof document<"u"?d.useLayoutEffect:()=>{};var hr={exports:{}},Ri={};/**
32
32
  * @license React
33
33
  * use-sync-external-store-shim.production.js
34
34
  *
@@ -36,7 +36,7 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
36
36
  *
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
- */var Qa;function ap(){if(Qa)return Ni;Qa=1;var t=d;function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function s(p,g){var h=g(),y=r({inst:{value:h,getSnapshot:g}}),f=y[0].inst,v=y[1];return o(function(){f.value=h,f.getSnapshot=g,l(f)&&v({inst:f})},[p,h,g]),i(function(){return l(f)&&v({inst:f}),p(function(){l(f)&&v({inst:f})})},[p]),a(h),h}function l(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!n(p,h)}catch{return!0}}function u(p,g){return g()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Ni.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Ni}var Ri={};/**
39
+ */var es;function up(){if(es)return Ri;es=1;var t=d;function e(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function s(h,p){var g=p(),m=r({inst:{value:g,getSnapshot:p}}),f=m[0].inst,v=m[1];return o(function(){f.value=g,f.getSnapshot=p,l(f)&&v({inst:f})},[h,g,p]),i(function(){return l(f)&&v({inst:f}),h(function(){l(f)&&v({inst:f})})},[h]),a(g),g}function l(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!n(h,g)}catch{return!0}}function u(h,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Ri.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Ri}var Ni={};/**
40
40
  * @license React
41
41
  * use-sync-external-store-shim.development.js
42
42
  *
@@ -44,8 +44,8 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */var Za;function sp(){return Za||(Za=1,process.env.NODE_ENV!=="production"&&function(){function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function e(h,y){c||i.startTransition===void 0||(c=!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 f=y();if(!p){var v=y();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}v=a({inst:{value:f,getSnapshot:y}});var m=v[0].inst,S=v[1];return l(function(){m.value=f,m.getSnapshot=y,n(m)&&S({inst:m})},[h,f,y]),s(function(){return n(m)&&S({inst:m}),h(function(){n(m)&&S({inst:m})})},[h]),u(f),f}function n(h){var y=h.getSnapshot;h=h.value;try{var f=y();return!o(h,f)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ri.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ri}var es;function lp(){return es||(es=1,process.env.NODE_ENV==="production"?fr.exports=ap():fr.exports=sp()),fr.exports}var da=lp();const _u=d.createContext(!1),Yn=d.createContext(null);function ku(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=fp(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(np,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(up,{render:t.children,collection:n}))}function up({collection:t,render:e}){return e(t)}function cp(t,e,n){let r=En(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const dp=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:cp;function fp(t){let[e]=d.useState(()=>new ep((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=dp(n,r,i);return op(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Co=d.createContext(null);function hp(t,e,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),s=d.useContext(Co);if(s){let l=s.ownerDocument.nodesByProps.get(e);return l||(l=s.ownerDocument.createElement(t),l.setProps(e,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Co.Provider,{value:l},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(_u)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return hp(t,i,o,"children"in i?i.children:null,null,s=>d.createElement(n,{node:s}))});return r.displayName=e.name,r}function pp(t){return Iu({...t,addIdAndValue:!0})}const ts=d.createContext(null);function Nu(t){let e=d.useContext(ts),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=pp({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(gp,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(ts.Provider,{value:e},i)}function gp({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(_u.Provider,{value:!0},t)),[t]);return En()?d.createElement(Co.Provider,{value:e},n):Ft.createPortal(n,e)}const Pe=typeof document<"u"?d.useLayoutEffect:()=>{};function vp(t){const e=d.useRef(null);return Pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},pt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function ns(t){if(mp())t.focus({preventScroll:!0});else{let e=yp(t);t.focus(),bp(e)}}let hr=null;function mp(){if(hr==null){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}function yp(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function bp(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Ru(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Sp(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const wp=ha(function(){return Sp(/^Mac/i)}),Ep=ha(function(){return Ru(/Chrome/i)}),Mu=ha(function(){return Ru(/Android/i)});let on=new Map,To=new Set;function rs(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);i||(i=new Set,on.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),on.delete(r.target)),on.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?rs():document.addEventListener("DOMContentLoaded",rs));function $p(t){requestAnimationFrame(()=>{on.size===0?t():To.add(t)})}function xp(t){return t.mozInputSource===0&&t.isTrusted?!0:Mu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Cp(t,e){return e.get?e.get.call(t):e.value}function Au(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Tp(t,e){var n=Au(t,e,"get");return Cp(t,n)}function Dp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pp(t,e,n){Dp(t,e),e.set(t,n)}function Op(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function is(t,e,n){var r=Au(t,e,"set");return Op(t,r,n),n}let Ip=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Ku(t){let e=d.useRef({isFocused:!1,observer:null});Pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=vp(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new Ip("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function _p(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Ku(o),s=d.useCallback(l=>{const u=me(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let xn=null,Do=new Set,Hn=new Map,_t=!1,Po=!1;const kp={Tab:!0,Escape:!0};function pa(t,e){for(let n of Do)n(t,e)}function Np(t){return!(t.metaKey||!wp()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Vr(t){_t=!0,Np(t)&&(xn="keyboard",pa("keyboard",t))}function Ne(t){xn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(_t=!0,pa("pointer",t))}function Lu(t){xp(t)&&(_t=!0,xn="virtual")}function Fu(t){t.target===window||t.target===document||(!_t&&!Po&&(xn="virtual",pa("virtual",t)),_t=!1,Po=!1)}function ju(){_t=!1,Po=!0}function Oo(t){if(typeof window>"u"||Hn.get(pt(t)))return;const e=pt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){_t=!0,r.apply(this,arguments)},n.addEventListener("keydown",Vr,!0),n.addEventListener("keyup",Vr,!0),n.addEventListener("click",Lu,!0),e.addEventListener("focus",Fu,!0),e.addEventListener("blur",ju,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{zu(t)},{once:!0}),Hn.set(e,{focus:r})}const zu=(t,e)=>{const n=pt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Hn.has(n)&&(n.HTMLElement.prototype.focus=Hn.get(n).focus,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("keyup",Vr,!0),r.removeEventListener("click",Lu,!0),n.removeEventListener("focus",Fu,!0),n.removeEventListener("blur",ju,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Hn.delete(n))};function Rp(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>zu(t,n)}typeof document<"u"&&Rp();function Hu(){return xn!=="pointer"}function Bu(){return xn}const Mp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ap(t,e,n){var r;const i=typeof window<"u"?pt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?pt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?pt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?pt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!Mp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof s&&!kp[n.key])}function Kp(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{Ap(!!(n!=null&&n.isTextInput),i,o)&&t(Hu())};return Do.add(r),()=>{Do.delete(r)}},e)}function Lp(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Ku(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}function Gr(t){const e=me(t);if(Bu()==="virtual"){let n=e.activeElement;$p(()=>{e.activeElement===n&&t.isConnected&&ns(t)})}else ns(t)}function Fp(t){const e=pt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:s}=o(t);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function jp(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Wu(t,e){return t.nodeName!=="#comment"&&Fp(t)&&jp(t,e)&&(!t.parentElement||Wu(t.parentElement,t))}const os=d.createContext(null),Io="react-aria-focus-scope-restore";let ae=null;function Uu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(os)||{},u=d.useMemo(()=>new ko({scopeRef:s}),[s]);Pe(()=>{let g=l||ue.root;if(ue.getTreeNode(g.scopeRef)&&ae&&!qr(ae,g.scopeRef)){let h=ue.getTreeNode(ae);h&&(g=h)}g.addChild(u),ue.addNode(u)},[u,l]),Pe(()=>{let g=ue.getTreeNode(s);g&&(g.contain=!!n)},[n]),Pe(()=>{var g;let h=(g=o.current)===null||g===void 0?void 0:g.nextSibling,y=[],f=v=>v.stopPropagation();for(;h&&h!==a.current;)y.push(h),h.addEventListener(Io,f),h=h.nextSibling;return s.current=y,()=>{for(let v of y)v.removeEventListener(Io,f)}},[e]),Gp(s,r,n),Wp(s,n),qp(s,r,n),Vp(s,i),d.useEffect(()=>{const g=me(s.current?s.current[0]:void 0).activeElement;let h=null;if(Le(g,s.current)){for(let y of ue.traverse())y.scopeRef&&Le(g,y.scopeRef.current)&&(h=y);h===ue.getTreeNode(s)&&(ae=h.scopeRef)}},[s]),Pe(()=>()=>{var g,h,y;let f=(y=(h=ue.getTreeNode(s))===null||h===void 0||(g=h.parent)===null||g===void 0?void 0:g.scopeRef)!==null&&y!==void 0?y:null;(s===ae||qr(s,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(s)},[s]);let c=d.useMemo(()=>zp(s),[]),p=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(os.Provider,{value:p},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function zp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[0].previousElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.nextNode();return!p&&o&&(c.currentNode=l,p=c.nextNode()),p&&rt(p,!0),p},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.previousNode();return!p&&o&&(c.currentNode=l,p=c.previousNode()),p&&rt(p,!0),p},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&rt(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&rt(s,!0),s}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Hp=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Bp=ga.join(':not([hidden]):not([tabindex="-1"]),');function xt(t){return t[0].parentElement}function An(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Wp(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);Pe(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!An(t)||u.isComposing)return;let c=o.activeElement,p=t.current;if(!p||!Le(c,p))return;let g=xt(p),h=qe(g,{tabbable:!0},p);if(!c)return;h.currentNode=c;let y=u.shiftKey?h.previousNode():h.nextNode();y||(h.currentNode=u.shiftKey?p[p.length-1].nextElementSibling:p[0].previousElementSibling,y=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),y&&rt(y,!0)},s=u=>{(!ae||qr(ae,t))&&Le(u.target,t.current)?(ae=t,n.current=u.target):An(t)&&!gt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):An(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Bu();if(!((c==="virtual"||c===null)&&Mu()&&Ep())&&o.activeElement&&An(t)&&!gt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var g;n.current=u.target,(g=n.current)===null||g===void 0||g.focus()}else ae.current&&_o(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),Pe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Vu(t){return gt(t)}function Le(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function gt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Le(t,n.current))return!0;return!1}function Up(t){return gt(t,ae)}function qr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{Gr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Gu(t,e=!0){let n=t[0].previousElementSibling,r=xt(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=xt(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function _o(t,e=!0){rt(Gu(t,e))}function Vp(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Le(r.activeElement,ae.current)&&t.current&&_o(t.current)}n.current=!1},[t])}function Gp(t,e,n){Pe(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let s=a.target;Le(s,t.current)?ae=t:Vu(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function as(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function qp(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);Pe(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||qr(ae,t))&&Le(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[t,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!An(t)||a.isComposing)return;let s=i.activeElement;if(!gt(s,t)||!as(t))return;let l=ue.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=s;let p=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!p||!gt(p,t))&&u){c.currentNode=u;do p=a.shiftKey?c.previousNode():c.nextNode();while(gt(p,t));a.preventDefault(),a.stopPropagation(),p?rt(p,!0):Vu(u)?rt(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=ue.getTreeNode(t);if(!s)return;let l=s.nodeToRestore;if(e&&l&&(i.activeElement&&gt(i.activeElement,t)||i.activeElement===i.body&&as(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ss(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let p=Gu(c.scopeRef.current,!0);ss(p);return}c=c.parent}}})}}}},[t,e])}function ss(t){t.dispatchEvent(new CustomEvent(Io,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?Bp:Hp,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Wu(o)&&(!n||Le(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Le(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function fi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Hu()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(h=>{i.current.isFocused=h,a(h),u()},[u]);Kp(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:p}=_p({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=Lp({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:r?g:p}}function Yp(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return Pe(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let s=qe(t.current,{tabbable:!0});i(!!s.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let ln="default",No="",_r=new WeakMap;function ls(t){if(ci()){if(ln==="default"){const e=Ke(t);No=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ln="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(_r.set(t,t.style.userSelect),t.style.userSelect="none")}function pr(t){if(ci()){if(ln!=="disabled")return;ln="restoring",setTimeout(()=>{Hh(()=>{if(ln==="restoring"){const e=Ke(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=No||""),No="",ln="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&_r.has(t)){let e=_r.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),_r.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function Xp(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return Wh(e,t.ref),t}var gr=new WeakMap;class vr{continuePropagation(){is(this,gr,!1)}get shouldStopPropagation(){return Tp(this,gr)}constructor(e,n,r,i){Pp(this,gr,{writable:!0,value:void 0}),is(this,gr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,c,p=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,p=r.clientY),s&&(c!=null&&p!=null?(l=c-s.left,u=p-s.top):(l=s.width/2,u=s.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const us=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:p,...g}=Xp(t),[h,y]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:m}=xu(),S=De((b,k)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let R=!0;if(B.isTriggeringEvent=!0,r){let z=new vr("pressstart",k,b);r(z),R=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,y(!0),R}),w=De((b,k,B=!0)=>{let R=f.current;if(!R.didFirePressStart)return!1;R.ignoreClickAfterPress=!0,R.didFirePressStart=!1,R.isTriggeringEvent=!0;let z=!0;if(i){let E=new vr("pressend",k,b);i(E),z=E.shouldStopPropagation}if(n&&n(!1),y(!1),e&&B&&!a){let E=new vr("press",k,b);e(E),z&&(z=E.shouldStopPropagation)}return R.isTriggeringEvent=!1,z}),O=De((b,k)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let R=new vr("pressup",k,b);return o(R),B.isTriggeringEvent=!1,R.shouldStopPropagation}return!0}),x=De(b=>{let k=f.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&w(Qe(k.target,b),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,m(),c||pr(k.target))}),D=De(b=>{u&&x(b)}),P=d.useMemo(()=>{let b=f.current,k={onKeyDown(R){if(Mi(R.nativeEvent,R.currentTarget)&&R.currentTarget.contains(R.target)){var z;ds(R.target,R.key)&&R.preventDefault();let E=!0;if(!b.isPressed&&!R.repeat){b.target=R.currentTarget,b.isPressed=!0,E=S(R,"keyboard");let I=R.currentTarget,j=V=>{Mi(V,I)&&!V.repeat&&I.contains(V.target)&&b.target&&O(Qe(b.target,V),"keyboard")};v(Ke(R.currentTarget),"keyup",Vn(j,B),!0)}E&&R.stopPropagation(),R.metaKey&&Ot()&&((z=b.metaKeyEvents)===null||z===void 0||z.set(R.key,R.nativeEvent))}else R.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(R){if(!(R&&!R.currentTarget.contains(R.target))&&R&&R.button===0&&!b.isTriggeringEvent&&!It.isOpening){let z=!0;if(a&&R.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||$o(R.nativeEvent))){!a&&!l&&$t(R.currentTarget);let E=S(R,"virtual"),I=O(R,"virtual"),j=w(R,"virtual");z=E&&I&&j}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,z&&R.stopPropagation()}}},B=R=>{var z;if(b.isPressed&&b.target&&Mi(R,b.target)){var E;ds(R.target,R.key)&&R.preventDefault();let j=R.target;w(Qe(b.target,R),"keyboard",b.target.contains(j)),m(),R.key!=="Enter"&&ba(b.target)&&b.target.contains(j)&&!R[us]&&(R[us]=!0,It(b.target,R,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(R.key)}else if(R.key==="Meta"&&(!((z=b.metaKeyEvents)===null||z===void 0)&&z.size)){var I;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let V of j.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent<"u"){k.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(qh(I.nativeEvent)){b.pointerType="virtual";return}Ki(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!l&&$t(I.currentTarget),c||ls(b.target),j=S(I,b.pointerType);let V=I.target;"releasePointerCapture"in V&&V.releasePointerCapture(I.pointerId),v(Ke(I.currentTarget),"pointerup",R,!1),v(Ke(I.currentTarget),"pointercancel",E,!1)}j&&I.stopPropagation()},k.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(Ki(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},k.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&O(I,b.pointerType||I.pointerType)},k.onPointerEnter=I=>{I.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,I),b.pointerType))},k.onPointerLeave=I=>{I.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,I),b.pointerType,!1),D(I))};let R=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(b.target.contains(I.target)&&b.pointerType!=null?w(Qe(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,m(),c||pr(b.target),"ontouchend"in b.target&&I.pointerType!=="mouse"&&v(b.target,"touchend",z,{once:!0}))},z=I=>{qu(I.currentTarget)&&I.preventDefault()},E=I=>{x(I)};k.onDragStart=I=>{I.currentTarget.contains(I.target)&&x(I)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ki(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=$o(E.nativeEvent)?"virtual":"mouse",!a&&!l&&$t(E.currentTarget),S(E,b.pointerType)&&E.stopPropagation(),v(Ke(E.currentTarget),"mouseup",R,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=S(E,b.pointerType)),I&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=w(E,b.pointerType,!1),D(E)),I&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&O(E,b.pointerType||"mouse")};let R=E=>{if(E.button===0){if(b.isPressed=!1,m(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Ai(E,b.target)&&b.pointerType!=null?w(Qe(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let I=Jp(E.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!l&&$t(E.currentTarget),c||ls(b.target),S(lt(b.target,E),b.pointerType)&&E.stopPropagation(),v(mn(E.currentTarget),"scroll",z,!0)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,j=S(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,j=w(lt(b.target,E),b.pointerType,!1),D(lt(b.target,E))),j&&E.stopPropagation()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)&&b.pointerType!=null?(O(lt(b.target,E),b.pointerType),j=w(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(j=w(lt(b.target,E),b.pointerType,!1)),j&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&pr(b.target),m()},k.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(lt(b.target,E)))};let z=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,l,m,c,x,D,w,S,O]);return d.useEffect(()=>()=>{var b;c||pr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:s||h,pressProps:ye(g,P)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Mi(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof mn(i).HTMLInputElement&&!Yu(i,n)||i instanceof mn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function Jp(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function cs(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function lt(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qe(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qp(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Zp(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ai(t,e){let n=e.getBoundingClientRect(),r=Qp(t);return Zp(n,r)}function Ki(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function qu(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function ds(t,e){return t instanceof HTMLInputElement?!Yu(t,e):qu(t)}const eg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Yu(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":eg.has(t.type)}function tg({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class ng{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Xu(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=De(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new ng("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function rg(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Xu(o),s=d.useCallback(l=>{const u=Ke(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Cn=null,ig=new Set,Bn=new Map,kt=!1,Ro=!1;function Sa(t,e){for(let n of ig)n(t,e)}function og(t){return!(t.metaKey||!Ot()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Yr(t){kt=!0,og(t)&&(Cn="keyboard",Sa("keyboard",t))}function Re(t){Cn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(kt=!0,Sa("pointer",t))}function Ju(t){$o(t)&&(kt=!0,Cn="virtual")}function Qu(t){t.target===window||t.target===document||(!kt&&!Ro&&(Cn="virtual",Sa("virtual",t)),kt=!1,Ro=!1)}function Zu(){kt=!1,Ro=!0}function fs(t){if(typeof window>"u"||Bn.get(mn(t)))return;const e=mn(t),n=Ke(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){kt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yr,!0),n.addEventListener("keyup",Yr,!0),n.addEventListener("click",Ju,!0),e.addEventListener("focus",Qu,!0),e.addEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{ec(t)},{once:!0}),Bn.set(e,{focus:r})}const ec=(t,e)=>{const n=mn(t),r=Ke(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Yr,!0),r.removeEventListener("keyup",Yr,!0),r.removeEventListener("click",Ju,!0),n.removeEventListener("focus",Qu,!0),n.removeEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function ag(t){const e=Ke(t);let n;return e.readyState!=="loading"?fs(t):(n=()=>{fs(t)},e.addEventListener("DOMContentLoaded",n)),()=>ec(t,n)}typeof document<"u"&&ag();function sg(){return Cn!=="pointer"}function hs(){return Cn}function tc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Xu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let Xr=!1,Li=0;function Mo(){Xr=!0,setTimeout(()=>{Xr=!1},50)}function ps(t){t.pointerType==="touch"&&Mo()}function lg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ps):document.addEventListener("touchend",Mo),Li++,()=>{Li--,!(Li>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ps):document.removeEventListener("touchend",Mo))}}function wa(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(lg,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(h,y)=>{if(s.pointerType=y,i||y==="touch"||s.isHovered||!h.currentTarget.contains(h.target))return;s.isHovered=!0;let f=h.currentTarget;s.target=f,e&&e({type:"hoverstart",target:f,pointerType:y}),n&&n(!0),a(!0)},p=(h,y)=>{if(s.pointerType="",s.target=null,y==="touch"||!s.isHovered)return;s.isHovered=!1;let f=h.currentTarget;r&&r({type:"hoverend",target:f,pointerType:y}),n&&n(!1),a(!1)},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=h=>{Xr&&h.pointerType==="mouse"||c(h,h.pointerType)},g.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,h.pointerType)}):(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=h=>{!s.ignoreEmulatedMouseEvents&&!Xr&&c(h,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[e,n,r,i,s]);return d.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function ug(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=De(l=>{n&&mr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),s=De(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ke(u);if(typeof PointerEvent<"u"){let p=g=>{l.isPointerDown&&mr(g,e)&&s(g),l.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",p,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",p,!0)}}else{let p=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1},g=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",p,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",g,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",p,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",g,!0)}}},[e,r,a,s])}function mr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function gs(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function cg(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:gs(t.onKeyDown),onKeyUp:gs(t.onKeyUp)}}}const dg=500;function fg(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=dg,accessibilityDescription:a}=t;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=xu(),{pressProps:c}=ya({isDisabled:e,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),s.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...g,type:"longpress"}),s.current=void 0},o),g.pointerType==="touch")){let h=y=>{y.preventDefault()};l(g.target,"contextmenu",h,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(g.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(g){s.current&&clearTimeout(s.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),p=Gh(i&&!e?a:void 0);return{longPressProps:ye(c,p)}}const hg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),pg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gg(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return hg.has(n.script)}let e=t.split("-")[0];return pg.has(e)}const vg=Symbol.for("react-aria.i18n.locale");function nc(){let t=typeof window<"u"&&window[vg]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:gg(t)?"rtl":"ltr"}}let Ao=nc(),Kn=new Set;function vs(){Ao=nc();for(let t of Kn)t(Ao)}function mg(){let t=En(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",vs),Kn.add(n),()=>{Kn.delete(n),Kn.size===0&&window.removeEventListener("languagechange",vs)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const yg=d.createContext(null);function or(){let t=mg();return d.useContext(yg)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function rc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function bg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const Sg=Symbol.for("react-aria.i18n.locale"),wg=Symbol.for("react-aria.i18n.strings");let Wt;class hi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Eg(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Sg];if(Wt===void 0){let i=window[wg];if(!i)return null;Wt={};for(let o in i)Wt[o]=new hi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Eg(t,e,n="en-US"){if(e[t])return e[t];let r=$g(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function $g(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const ms=new Map,ys=new Map;class xg{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=ms.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),ms.set(o,a));let s=a.select(e);return i=n[s]||n.other,typeof i=="function"?i():i}number(e){let n=ys.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),ys.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const bs=new WeakMap;function Cg(t){let e=bs.get(t);return e||(e=new hi(t),bs.set(t,e)),e}function Tg(t,e){return e&&hi.getGlobalDictionaryForPackage(e)||Cg(t)}function Dg(t,e){let{locale:n}=or(),r=Tg(t,e);return d.useMemo(()=>new xg(n,r),[n,r])}let Fi=new Map;function Pg(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const Ss={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Og(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=tc({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?e:e?{...Ss,...e}:Ss,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Ig(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=Og(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Jr={top:"bottom",bottom:"top",left:"right",right:"left"},_g={top:"left",left:"top"},Ko={top:"height",left:"width"},ic={width:"totalWidth",height:"totalHeight"},yr={};let fe=typeof document<"u"?window.visualViewport:null;function ws(t){let e=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=fe==null?void 0:fe.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let y=document.documentElement;r=y.clientWidth,i=y.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var p;n=(p=fe==null?void 0:fe.height)!==null&&p!==void 0?p:i,s.top=y.scrollTop||t.scrollTop,s.left=y.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=fn(t)),s.top=t.scrollTop,s.left=t.scrollLeft,r=e,i=n;if(wu()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){s.top=0,s.left=0;var g;o=(g=fe==null?void 0:fe.pageTop)!==null&&g!==void 0?g:0;var h;a=(h=fe==null?void 0:fe.pageLeft)!==null&&h!==void 0?h:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function kg(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Es(t,e,n,r,i,o,a){var s;let l=(s=i.scroll[t])!==null&&s!==void 0?s:0,u=r[Ko[t]],c=r.scroll[Ye[t]]+o,p=u+r.scroll[Ye[t]]-o,g=e-l+a[t]-r[Ye[t]],h=e-l+n+a[t]-r[Ye[t]];return g<c?c-g:h>p?Math.max(p-h,c-g):0}function Ng(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function $s(t){if(yr[t])return yr[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=_g[r];Ye[n]||(n="center");let o=Ko[r],a=Ko[i];return yr[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},yr[t]}function ji(t,e,n,r,i,o,a,s,l,u){let{placement:c,crossPlacement:p,axis:g,crossAxis:h,size:y,crossSize:f}=r,v={};var m;v[h]=(m=t[h])!==null&&m!==void 0?m:0;var S,w,O,x;p==="center"?v[h]+=(((S=t[f])!==null&&S!==void 0?S:0)-((w=n[f])!==null&&w!==void 0?w:0))/2:p!==h&&(v[h]+=((O=t[f])!==null&&O!==void 0?O:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[h]+=o;const D=t[h]-n[f]+l+u,P=t[h]+t[f]-l-u;if(v[h]=xo(v[h],D,P),c===g){const b=s?a[y]:e[ic[y]];v[Jr[g]]=Math.floor(b-t[g]+i)}else v[g]=Math.floor(t[g]+t[y]+i);return v}function Rg(t,e,n,r,i,o,a,s){const l=r?n.height:e[ic.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var p,g,h,y,f,v;let m=s!=="top"?Math.max(0,e.height+e.top+((p=e.scroll.top)!==null&&p!==void 0?p:0)-c-(((g=i.top)!==null&&g!==void 0?g:0)+((h=i.bottom)!==null&&h!==void 0?h:0)+o)):Math.max(0,c+a-(e.top+((y=e.scroll.top)!==null&&y!==void 0?y:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,m)}function xs(t,e,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,c;if(a===s)return Math.max(0,n[s]-t[s]-((u=t.scroll[s])!==null&&u!==void 0?u:0)+e[s]-((c=r[s])!==null&&c!==void 0?c:0)-r[Jr[s]]-i);var p;return Math.max(0,t[l]+t[s]+t.scroll[s]-e[s]-n[s]-n[l]-((p=r[s])!==null&&p!==void 0?p:0)-r[Jr[s]]-i)}function Mg(t,e,n,r,i,o,a,s,l,u,c,p,g,h,y,f){let v=$s(t),{size:m,crossAxis:S,crossSize:w,placement:O,crossPlacement:x}=v,D=ji(e,s,n,v,c,p,u,g,y,f),P=c,b=xs(s,u,e,i,o+c,v);if(a&&r[m]>b){let L=$s(`${Jr[O]} ${x}`),K=ji(e,s,n,L,c,p,u,g,y,f);xs(s,u,e,i,o+c,L)>b&&(v=L,D=K,P=c)}let k="bottom";v.axis==="top"?v.placement==="top"?k="top":v.placement==="bottom"&&(k="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?k="bottom":v.crossPlacement==="bottom"&&(k="top"));let B=Es(S,D[S],n[w],s,l,o,u);D[S]+=B;let R=Rg(D,s,u,g,i,o,n.height,k);h&&h<R&&(R=h),n.height=Math.min(n.height,R),D=ji(e,s,n,v,P,p,u,g,y,f),B=Es(S,D[S],n[w],s,l,o,u),D[S]+=B;let z={},E=e[S]+.5*e[w]-D[S]-i[Ye[S]];const I=y/2+f;var j,V,A,_;const H=Ye[S]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((V=i.right)!==null&&V!==void 0?V:0):((A=i.top)!==null&&A!==void 0?A:0)+((_=i.bottom)!==null&&_!==void 0?_:0),Y=n[w]-H-y/2-f,Q=e[S]+y/2-(D[S]+i[Ye[S]]),M=e[S]+e[w]-y/2-(D[S]+i[Ye[S]]),N=xo(E,Q,M);return z[S]=xo(N,I,Y),{position:D,maxHeight:R,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:v.placement}}function Ag(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:c,arrowSize:p=0,arrowBoundaryOffset:g=0}=t,h=r instanceof HTMLElement?Kg(r):document.documentElement,y=h===document.documentElement;const f=window.getComputedStyle(h).position;let v=!!f&&f!=="static",m=y?fn(n):Cs(n,h);if(!y){let{marginTop:z,marginLeft:E}=window.getComputedStyle(n);m.top+=parseInt(z,10)||0,m.left+=parseInt(E,10)||0}let S=fn(r),w=Ng(r);var O,x;S.width+=((O=w.left)!==null&&O!==void 0?O:0)+((x=w.right)!==null&&x!==void 0?x:0);var D,P;S.height+=((D=w.top)!==null&&D!==void 0?D:0)+((P=w.bottom)!==null&&P!==void 0?P:0);let b=kg(i),k=ws(s),B=ws(h),R=s.tagName==="BODY"?fn(h):Cs(h,s);return h.tagName==="HTML"&&s.tagName==="BODY"&&(B.scroll.top=0,B.scroll.left=0),Mg(e,m,S,b,w,o,a,k,B,R,l,u,v,c,p,g)}function fn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:e+o-s,left:n+a-l,width:r,height:i}}function Cs(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=fn(t);let i=fn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function Kg(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ts(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ts(e);)e=e.parentElement;return e||document.documentElement}function Ts(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Lg=new WeakMap;function Fg(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||Lg.get(e.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let le=typeof document<"u"?window.visualViewport:null;function jg(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:p=0,shouldUpdatePosition:g=!0,isOpen:h=!0,onClose:y,maxHeight:f,arrowBoundaryOffset:v=0}=t,[m,S]=d.useState(null),w=[g,a,i.current,r.current,o.current,s,l,u,c,p,h,e,f,v,n],O=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{h&&(O.current=le==null?void 0:le.scale)},[h]);let x=d.useCallback(()=>{if(g===!1||!h||!i.current||!r.current||!u||(le==null?void 0:le.scale)!==O.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var R;let _=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),H=o.current.getBoundingClientRect();var z;if(B={type:"top",offset:((z=_==null?void 0:_.top)!==null&&z!==void 0?z:0)-H.top},B.offset>H.height/2){B.type="bottom";var E;B.offset=((E=_==null?void 0:_.bottom)!==null&&E!==void 0?E:0)-H.bottom}}let I=i.current;if(!f&&i.current){var j;I.style.top="0px",I.style.bottom="";var V;I.style.maxHeight=((V=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&V!==void 0?V:window.innerHeight)+"px"}let A=Ag({placement:Hg(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:p,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(A.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(A.position).forEach(_=>I.style[_]=A.position[_]+"px"),I.style.maxHeight=A.maxHeight!=null?A.maxHeight+"px":"",B&&document.activeElement&&o.current){let _=document.activeElement.getBoundingClientRect(),H=o.current.getBoundingClientRect(),Y=_[B.type]-H[B.type];o.current.scrollTop+=Y-B.offset}S(A)}},w);pe(x,w),zg(x),qa({ref:i,onResize:x}),qa({ref:r,onResize:x});let D=d.useRef(!1);pe(()=>{let B,R=()=>{D.current=!0,clearTimeout(B),B=setTimeout(()=>{D.current=!1},500),x()},z=()=>{D.current&&R()};return le==null||le.addEventListener("resize",R),le==null||le.addEventListener("scroll",z),()=>{le==null||le.removeEventListener("resize",R),le==null||le.removeEventListener("scroll",z)}},[x]);let P=d.useCallback(()=>{D.current||y==null||y()},[y,D]);Fg({triggerRef:r,isOpen:h,onClose:y&&P});var b,k;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...m==null?void 0:m.position,maxHeight:(b=m==null?void 0:m.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(k=m==null?void 0:m.placement)!==null&&k!==void 0?k:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:m==null?void 0:m.arrowOffsetLeft,top:m==null?void 0:m.arrowOffsetTop}},updatePosition:x}}function zg(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Hg(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ze=[];function Bg(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=t;d.useEffect(()=>(i&&Ze.push(e),()=>{let y=Ze.indexOf(e);y>=0&&Ze.splice(y,1)}),[i,e]);let l=()=>{Ze[Ze.length-1]===e&&n&&n()},u=y=>{(!s||s(y.target))&&Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault())},c=y=>{(!s||s(y.target))&&(Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault()),l())},p=y=>{y.key==="Escape"&&!a&&!y.nativeEvent.isComposing&&(y.stopPropagation(),y.preventDefault(),l())};ug({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:g}=tc({isDisabled:!r,onBlurWithin:y=>{!y.relatedTarget||Up(y.relatedTarget)||(!s||s(y.relatedTarget))&&(n==null||n())}}),h=y=>{y.target===y.currentTarget&&y.preventDefault()};return{overlayProps:{onKeyDown:p,...g},underlayProps:{onPointerDown:h}}}const zi=typeof document<"u"&&window.visualViewport,Wg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let br=0,Hi;function Ug(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return br++,br===1&&(ci()?Hi=Gg():Hi=Vg()),()=>{br--,br===0&&Hi()}},[e])}function Vg(){return Vn(un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"))}function Gg(){let t,e,n=u=>{t=Cu(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=un(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;qg(c)&&(s(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",zi&&(zi.height<window.innerHeight?requestAnimationFrame(()=>{Ds(c)}):zi.addEventListener("resize",()=>Ds(c),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,p=window.pageYOffset;a=Vn(In(window,"scroll",u),un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"),un(document.body,"marginTop",`-${p}px`),()=>{window.scrollTo(c,p)}),window.scrollTo(0,0)},l=Vn(In(document,"touchstart",n,{passive:!1,capture:!0}),In(document,"touchmove",r,{passive:!1,capture:!0}),In(document,"touchend",i,{passive:!1,capture:!0}),In(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),l()}}function un(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function In(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ds(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Cu(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function qg(t){return t instanceof HTMLInputElement&&!Wg.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var oc={};oc={dismiss:"تجاهل"};var ac={};ac={dismiss:"Отхвърляне"};var sc={};sc={dismiss:"Odstranit"};var lc={};lc={dismiss:"Luk"};var uc={};uc={dismiss:"Schließen"};var cc={};cc={dismiss:"Απόρριψη"};var dc={};dc={dismiss:"Dismiss"};var fc={};fc={dismiss:"Descartar"};var hc={};hc={dismiss:"Lõpeta"};var pc={};pc={dismiss:"Hylkää"};var gc={};gc={dismiss:"Rejeter"};var vc={};vc={dismiss:"התעלם"};var mc={};mc={dismiss:"Odbaci"};var yc={};yc={dismiss:"Elutasítás"};var bc={};bc={dismiss:"Ignora"};var Sc={};Sc={dismiss:"閉じる"};var wc={};wc={dismiss:"무시"};var Ec={};Ec={dismiss:"Atmesti"};var $c={};$c={dismiss:"Nerādīt"};var xc={};xc={dismiss:"Lukk"};var Cc={};Cc={dismiss:"Negeren"};var Tc={};Tc={dismiss:"Zignoruj"};var Dc={};Dc={dismiss:"Descartar"};var Pc={};Pc={dismiss:"Dispensar"};var Oc={};Oc={dismiss:"Revocare"};var Ic={};Ic={dismiss:"Пропустить"};var _c={};_c={dismiss:"Zrušiť"};var kc={};kc={dismiss:"Opusti"};var Nc={};Nc={dismiss:"Odbaci"};var Rc={};Rc={dismiss:"Avvisa"};var Mc={};Mc={dismiss:"Kapat"};var Ac={};Ac={dismiss:"Скасувати"};var Kc={};Kc={dismiss:"取消"};var Lc={};Lc={dismiss:"關閉"};var Fc={};Fc={"ar-AE":oc,"bg-BG":ac,"cs-CZ":sc,"da-DK":lc,"de-DE":uc,"el-GR":cc,"en-US":dc,"es-ES":fc,"et-EE":hc,"fi-FI":pc,"fr-FR":gc,"he-IL":vc,"hr-HR":mc,"hu-HU":yc,"it-IT":bc,"ja-JP":Sc,"ko-KR":wc,"lt-LT":Ec,"lv-LV":$c,"nb-NO":xc,"nl-NL":Cc,"pl-PL":Tc,"pt-BR":Dc,"pt-PT":Pc,"ro-RO":Oc,"ru-RU":Ic,"sk-SK":_c,"sl-SI":kc,"sr-SP":Nc,"sv-SE":Rc,"tr-TR":Mc,"uk-UA":Ac,"zh-CN":Kc,"zh-TW":Lc};function Yg(t){return t&&t.__esModule?t.default:t}function Ps(t){let{onDismiss:e,...n}=t,r=Dg(Yg(Fc),"@react-aria/overlays"),i=sa(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Ig,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let _n=new WeakMap,Ie=[];function Xg(t,e=document.body){let n=new Set(t),r=new Set,i=l=>{for(let g of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(g);let u=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(g.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),p=u(l);if(p===NodeFilter.FILTER_ACCEPT&&o(l),p!==NodeFilter.FILTER_REJECT){let g=c.nextNode();for(;g!=null;)o(g),g=c.nextNode()}},o=l=>{var u;let c=(u=_n.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),_n.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let s={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ie.push(s),()=>{a.disconnect();for(let l of r){let u=_n.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),_n.delete(l)):_n.set(l,u-1))}s===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(s),1)}}function Jg(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=t,{overlayProps:l,underlayProps:u}=Bg({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:p,placement:g}=jg({...s,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return Ug({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return Xg([r.current])},[i,e.isOpen,r]),{popoverProps:ye(l,c),arrowProps:p,underlayProps:u,placement:g}}const Qg=d.createContext({});function Zg(){var t;return(t=d.useContext(Qg))!==null&&t!==void 0?t:{}}const ev=d.createContext(null);function tv(t){let e=En(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=Zg();if(!t.portalContainer&&s&&(n=s()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(Uu,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(ev.Provider,{value:a},d.createElement(tg,null,l)),Ft.createPortal(l,n)}function Lo(t){return Ah()?t.altKey:t.ctrlKey}const nv=1e3;function rv(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=iv(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},nv)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function iv(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function jc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:p=!1,isVirtualized:g,scrollRef:h=r,linkBehavior:y="action"}=t,{direction:f}=or(),v=di(),m=E=>{var I;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((I=r.current)===null||I===void 0)&&I.contains(E.target)))return;const j=(F,X)=>{if(F!=null){if(e.isLink(F)&&y==="selection"&&l&&!Lo(E)){var te;Ft.flushSync(()=>{e.setFocusedKey(F,X)});let de=(te=h.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(F.toString())}"]`),ce=e.getItemProps(F);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(F,X),e.isLink(F)&&y==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&!Lo(E)&&e.replaceSelection(F)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var V,A,_;let F=e.focusedKey!=null?(V=n.getKeyBelow)===null||V===void 0?void 0:V.call(n,e.focusedKey):(A=n.getFirstKey)===null||A===void 0?void 0:A.call(n);F==null&&o&&(F=(_=n.getFirstKey)===null||_===void 0?void 0:_.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowUp":if(n.getKeyAbove){var H,Y,Q;let F=e.focusedKey!=null?(H=n.getKeyAbove)===null||H===void 0?void 0:H.call(n,e.focusedKey):(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n);F==null&&o&&(F=(Q=n.getLastKey)===null||Q===void 0?void 0:Q.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowLeft":if(n.getKeyLeftOf){var M,N,L;let F=e.focusedKey!=null?(M=n.getKeyLeftOf)===null||M===void 0?void 0:M.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(N=n.getFirstKey)===null||N===void 0?void 0:N.call(n,e.focusedKey):(L=n.getLastKey)===null||L===void 0?void 0:L.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var K,W,U;let F=e.focusedKey!=null?(K=n.getKeyRightOf)===null||K===void 0?void 0:K.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,e.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getFirstKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getLastKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let F=n.getKeyPageBelow(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let F=n.getKeyPageAbove(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"a":rn(E)&&e.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!p){if(E.shiftKey)r.current.focus();else{let F=qe(r.current,{tabbable:!0}),X,te;do te=F.lastChild(),te&&(X=te);while(te);X&&!X.contains(document.activeElement)&&$t(X)}break}}},S=d.useRef({top:0,left:0});dr(h,"scroll",g?void 0:()=>{var E,I,j,V;S.current={top:(j=(E=h.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(V=(I=h.current)===null||I===void 0?void 0:I.scrollLeft)!==null&&V!==void 0?V:0}});let w=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var I,j;let _=Y=>{Y!=null&&(e.setFocusedKey(Y),l&&e.replaceSelection(Y))},H=E.relatedTarget;var V,A;H&&E.currentTarget.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?_((V=e.lastSelectedKey)!==null&&V!==void 0?V:(I=n.getLastKey)===null||I===void 0?void 0:I.call(n)):_((A=e.firstSelectedKey)!==null&&A!==void 0?A:(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n))}else!g&&h.current&&(h.current.scrollTop=S.current.top,h.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&h.current){let _=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);_&&(_.contains(document.activeElement)||$t(_),hs()==="keyboard"&&Xa(_,{containingElement:r.current}))}}},O=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);dr(r,Xh,c?E=>{let{detail:I}=E;E.stopPropagation(),e.setFocused(!0),(I==null?void 0:I.focusStrategy)==="first"&&(x.current=!0)}:void 0);let D=De(()=>{var E,I;let j=(I=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&I!==void 0?I:null;if(j==null){var V;(V=r.current)===null||V===void 0||V.dispatchEvent(new CustomEvent(Du,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(j),x.current=!1});Ga(()=>{x.current&&D()},[e.collection,D]);let P=De(()=>{e.collection.size>0&&(x.current=!1)});Ga(()=>{P()},[e.focusedKey,P]),dr(r,Yh,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,I;let A=null;var j;i==="first"&&(A=(j=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&j!==void 0?j:null);var V;i==="last"&&(A=(V=(I=n.getLastKey)===null||I===void 0?void 0:I.call(n))!==null&&V!==void 0?V:null);let _=e.selectedKeys;if(_.size){for(let H of _)if(e.canSelectItem(H)){A=H;break}}e.setFocused(!0),e.setFocusedKey(A),A==null&&!c&&r.current&&Gr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&h.current&&r.current){let E=hs(),I=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!I)return;(E==="keyboard"||b.current)&&(Tu(h.current,I),E!=="virtual"&&Xa(I,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&Gr(r.current),k.current=e.focusedKey,b.current=!1}),dr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let B={onKeyDown:m,onFocus:w,onBlur:O,onMouseDown(E){h.current===E.target&&E.preventDefault()}},{typeSelectProps:R}=rv({keyboardDelegate:n,selectionManager:e});u||(B=ye(R,B));let z;return c?z=-1:z=e.focusedKey==null?0:-1,{collectionProps:{...B,tabIndex:z}}}function zc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:p="action"}=t,g=di();e=tr(e);let h=_=>{if(_.pointerType==="keyboard"&&Lo(_))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(p==="selection"&&i.current){let H=n.getItemProps(r);g.open(i.current,_,H.href,H.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(p==="override"||p==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):_&&_.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||_&&(rn(_)||_.pointerType==="touch"||_.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)s?s():document.activeElement!==i.current&&i.current&&Gr(i.current);else{var H;let Y=new CustomEvent(Du,{cancelable:!0,bubbles:!0});(H=i.current)===null||H===void 0||H.dispatchEvent(Y)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let y={};!a&&!l?y={tabIndex:r===n.focusedKey?0:-1,onFocus(_){_.target===i.current&&n.setFocusedKey(r)}}:l&&(y.onMouseDown=_=>{_.preventDefault()});let f=n.isLink(r)&&p==="override",v=n.isLink(r)&&p!=="selection"&&p!=="none",m=!l&&n.canSelectItem(r)&&!f,S=(u||v)&&!l,w=S&&(n.selectionBehavior==="replace"?!m:!m||n.isEmpty),O=S&&m&&n.selectionBehavior==="replace",x=w||O,D=d.useRef(null),P=x&&m,b=d.useRef(!1),k=d.useRef(!1),B=_=>{if(u&&u(),v&&i.current){let H=n.getItemProps(r);g.open(i.current,_,H.href,H.routerOptions)}},R={};o?(R.onPressStart=_=>{D.current=_.pointerType,b.current=P,_.pointerType==="keyboard"&&(!x||Is())&&h(_)},c?(R.onPressUp=w?void 0:_=>{_.pointerType==="mouse"&&m&&h(_)},R.onPress=w?B:_=>{_.pointerType!=="keyboard"&&_.pointerType!=="mouse"&&m&&h(_)}):R.onPress=_=>{if(w||O&&_.pointerType!=="mouse"){if(_.pointerType==="keyboard"&&!Os())return;B(_)}else _.pointerType!=="keyboard"&&m&&h(_)}):(R.onPressStart=_=>{D.current=_.pointerType,b.current=P,k.current=w,m&&(_.pointerType==="mouse"&&!w||_.pointerType==="keyboard"&&(!S||Is()))&&h(_)},R.onPress=_=>{(_.pointerType==="touch"||_.pointerType==="pen"||_.pointerType==="virtual"||_.pointerType==="keyboard"&&x&&Os()||_.pointerType==="mouse"&&k.current)&&(x?B(_):m&&h(_))}),y["data-key"]=r,R.preventFocusOnPress=a;let{pressProps:z,isPressed:E}=ya(R),I=O?_=>{D.current==="mouse"&&(_.stopPropagation(),_.preventDefault(),B(_))}:void 0,{longPressProps:j}=fg({isDisabled:!P,onLongPress(_){_.pointerType==="touch"&&(h(_),n.setSelectionBehavior("toggle"))}}),V=_=>{D.current==="touch"&&b.current&&_.preventDefault()},A=n.isLink(r)?_=>{It.isOpening||_.preventDefault()}:void 0;return{itemProps:ye(y,m||w?z:{},P?j:{},{onDoubleClick:I,onDragStartCapture:V,onClick:A,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:m,hasAction:x}}function Os(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Is(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class _s{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class ov{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new _s(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new _s(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function av(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,s=Pg({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new ov({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:c}=jc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Hc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function sv(t){return lv(t)}function lv(t,e){for(let n of t)return n}function Bi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...ks(t,e),e],i=[...ks(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function ks(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ns=new WeakMap;function uv(t){let e=Ns.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Hc(o,t)):n++};return r(t),Ns.set(t,n),n}const Bc=new WeakMap;function cv(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Be(t,{labelable:!0}),{listProps:l}=av({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Bc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function dv(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:p,onPressEnd:g,onHoverStart:h,onHoverChange:y,onHoverEnd:f,onKeyDown:v,onKeyUp:m,onFocus:S,onFocusChange:w,onBlur:O,selectionManager:x=e.selectionManager}=t,D=!!s,P=D&&t["aria-expanded"]==="true";var b;let k=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var B;let R=(B=t.isSelected)!==null&&B!==void 0?B:x.isSelected(i),z=Bc.get(e),E=e.collection.getItem(i),I=t.onClose||z.onClose,j=di(),V=re=>{var Ue;if(!D){if(!(E==null||(Ue=E.props)===null||Ue===void 0)&&Ue.onAction?E.props.onAction():t.onAction&&t.onAction(i),z.onAction){let at=z.onAction;at(i)}re.target instanceof HTMLAnchorElement&&E&&j.open(re.target,re,E.props.href,E.props.routerOptions)}},A="menuitem";D||(x.selectionMode==="single"?A="menuitemradio":x.selectionMode==="multiple"&&(A="menuitemcheckbox"));let _=_i(),H=_i(),Y=_i(),Q={id:r,"aria-disabled":k||void 0,role:A,"aria-label":t["aria-label"],"aria-labelledby":_,"aria-describedby":[H,Y].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!D&&(Q["aria-checked"]=R),a&&(Q["aria-posinset"]=E==null?void 0:E.index,Q["aria-setsize"]=uv(e.collection));let M=re=>{re.pointerType==="keyboard"&&V(re),l==null||l(re)},N=()=>{!D&&I&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&I()},L=re=>{re.pointerType==="mouse"&&(V(re),N()),u==null||u(re)},K=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(V(re),N()),c==null||c(re)},{itemProps:W,isFocused:U}=zc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:z.shouldUseVirtualFocus}),{pressProps:F,isPressed:X}=ya({onPressStart:M,onPress:K,onPressUp:L,onPressChange:p,onPressEnd:g,isDisabled:k}),{hoverProps:te}=wa({isDisabled:k,onHoverStart(re){!sg()&&!(P&&s==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),h==null||h(re)},onHoverChange:y,onHoverEnd:f}),{keyboardProps:de}=cg({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!k&&x.selectionMode==="none"&&!D&&o!==!1&&I&&I();break;case"Enter":!k&&o!==!1&&!D&&I&&I();break;default:D||re.continuePropagation(),v==null||v(re);break}},onKeyUp:m}),{focusProps:ce}=rg({onBlur:O,onFocus:S,onFocusChange:w}),oe=Be(E==null?void 0:E.props);delete oe.id;let ge=$u(E==null?void 0:E.props);return{menuItemProps:{...Q,...ye(oe,ge,D?{onFocus:W.onFocus,"data-key":W["data-key"]}:W,F,te,de,ce),tabIndex:W.tabIndex!=null&&P?-1:W.tabIndex},labelProps:{id:_},descriptionProps:{id:H},keyboardShortcutProps:{id:Y},isFocused:U,isSelected:R,isPressed:X,isDisabled:k}}function fv(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function hv(t){let e=Be(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Wc=new WeakMap;function Qr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Wc.get(t)}-${n}-${e}`):""}function pv(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:s}=e,l=r===s,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:p}=zc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),g=Qr(e,r,"tab"),h=Qr(e,r,"tabpanel"),{tabIndex:y}=c,f=e.collection.getItem(r),v=Be(f==null?void 0:f.props,{labelable:!0});delete v.id;let m=$u(f==null?void 0:f.props);return{tabProps:ye(v,m,c,{id:g,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:y,role:"tab"}),isSelected:l,isDisabled:u,isPressed:p}}function gv(t,e,n){let r=Yp(n)?void 0:0;var i;const o=Qr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=sa({...t,id:o,"aria-labelledby":Qr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class vv{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function mv(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:s}=e,{direction:l}=or(),u=d.useMemo(()=>new vv(o,l,r,s),[o,s,r,l]),{collectionProps:c}=jc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),p=tr();Wc.set(e,p);let g=sa({...t,id:p});return{tabListProps:{...ye(c,g),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const yv=d.createContext({});function bv(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class Sv{build(e,n){return this.context=n,Rs(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,S=>{v.push(S)});var o;let m=(o=e.index)!==null&&o!==void 0?o:0;for(const S of v)yield*this.getFullNode({element:S,index:m++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let m=v.getCollectionNode(a.props,this.context);var s;let S=(s=e.index)!==null&&s!==void 0?s:0,w=m.next();for(;!w.done&&w.value;){let O=w.value;e.index=S;var l;let x=(l=O.key)!==null&&l!==void 0?l:null;x==null&&(x=O.element?null:this.getKey(a,e,n,r));let P=[...this.getFullNode({...O,key:x,index:S,wrapper:wv(e.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let b of P){var u,c;b.value=(c=(u=O.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var p;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Wi(b.type)}> in <${Wi((p=i==null?void 0:i.type)!==null&&p!==void 0?p:"unknown parent type")}>. Only <${Wi(e.type)}> is supported.`);S++,yield b}w=m.next(P)}return}if(e.key==null||e.type==null)return;let g=this;var h,y;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(h=e.value)!==null&&h!==void 0?h:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(y=e.textValue)!==null&&y!==void 0?y:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Rs(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let m of e.childNodes()){m.key!=null&&(m.key=`${f.key}${m.key}`);let S=g.getFullNode({...m,index:v},g.getChildState(n,m),f.key,f);for(let w of S)v++,yield w}})};yield f}constructor(){this.cache=new WeakMap}}function Rs(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function wv(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Wi(t){return t[0].toUpperCase()+t.slice(1)}function Uc(t,e,n){let r=d.useMemo(()=>new Sv,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,a,n,e])}function Ev(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function $v(t){return xv(t)}function xv(t,e){for(let n of t)return n}function Ui(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ms(t,e),e],i=[...Ms(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ms(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Cv(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>p(e,new Map)),{items:s,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function p(f=[],v,m){return f==null&&(f=[]),{items:f.map(S=>{let w={key:r(S),parentKey:m,value:S,children:null};return w.children=p(i(S),v,w.key).items,v.set(w.key,w),w}),nodeMap:v}}function g(f,v,m,S){let w=S.get(v);if(!w)return{items:f,nodeMap:S};let O=new Map(S),x=m(w);for(x==null?y(w,O):h(x,O);w&&w.parentKey;){let P=O.get(w.parentKey),b={key:P.key,parentKey:P.parentKey,value:P.value,children:null},k=P.children;x==null&&k&&(k=k.filter(B=>B!==w));var D;b.children=(D=k==null?void 0:k.map(B=>B===w?x:B))!==null&&D!==void 0?D:null,O.set(b.key,b),x=b,w=P}return x==null&&(f=f.filter(P=>P!==w)),{items:f.map(P=>P===w?x:P),nodeMap:O}}function h(f,v){if(v.set(f.key,f),f.children)for(let m of f.children)h(m,v)}function y(f,v){if(v.delete(f.key),f.children)for(let m of f.children)y(m,v)}return{items:s,selectedKeys:u,setSelectedKeys:c,getItem(f){return l.get(f)},insert(f,v,...m){a(({items:S,nodeMap:w})=>{let{items:O,nodeMap:x}=p(m,w,f);return f==null?{items:[...S.slice(0,v),...O,...S.slice(v)],nodeMap:x}:g(S,f,D=>({key:D.key,parentKey:D.parentKey,value:D.value,children:[...D.children.slice(0,v),...O,...D.children.slice(v)]}),x)})},insertBefore(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O,...v)},insertAfter(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,s.length,...v);else{let m=l.get(f);if(!m)return;this.insert(f,m.children.length,...v)}},remove(...f){if(f.length===0)return;let v=s,m=l,S;for(let O of f)S=g(v,O,()=>null,m),m=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let O of u)S.nodeMap.has(O)||w.delete(O);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,m){a(({items:S,nodeMap:w})=>{let O=w.get(f);if(!O)return{items:S,nodeMap:w};let{items:x,nodeMap:D}=g(S,f,()=>null,w);const P={...O,parentKey:v};return v==null?(D.set(P.key,P),{items:[...x.slice(0,m),P,...x.slice(m)],nodeMap:D}):g(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,m),P,...b.children.slice(m)]}),D)})},update(f,v){a(({items:m,nodeMap:S})=>g(m,f,w=>{let O={key:w.key,parentKey:w.parentKey,value:v,children:null},x=p(i(v),S,O.key);return O.children=x.items,O},S))}}}class As{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)n(s)};for(let a of e)n(a);let r=null,i=0;for(let[a,s]of this.keyMap)r?(r.nextKey=a,s.prevKey=r.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class Vc extends Set{constructor(e,n,r){super(e),e instanceof Vc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Tv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Gc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>Ks(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>Ks(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Tv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function Ks(t,e){return t?t==="all"?"all":new tt(t):e}let qc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Ui(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=$v(Ev(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Dv(t){let{filter:e,layoutDelegate:n}=t,r=Gc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new As(e(c)):new As(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Uc(t,o,a),l=d.useMemo(()=>new qc(s,r,{layoutDelegate:n}),[s,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)&&u.current){const m=u.current.getItem(r.focusedKey),S=[...u.current.getKeys()].map(b=>{const k=u.current.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null),w=[...s.getKeys()].map(b=>{const k=s.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null);var c,p;const O=((c=S==null?void 0:S.length)!==null&&c!==void 0?c:0)-((p=w==null?void 0:w.length)!==null&&p!==void 0?p:0);var g,h,y;let x=Math.min(O>1?Math.max(((g=m==null?void 0:m.index)!==null&&g!==void 0?g:0)-O+1,0):(h=m==null?void 0:m.index)!==null&&h!==void 0?h:0,((y=w==null?void 0:w.length)!==null&&y!==void 0?y:0)-1),D=null,P=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){D=w[x];break}if(x<w.length-1&&!P)x++;else{P=!0;var f,v;x>((f=m==null?void 0:m.index)!==null&&f!==void 0?f:0)&&(x=(v=m==null?void 0:m.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(D?D.key:null)}u.current=s},[s,l,r,r.focusedKey]),{collection:s,disabledKeys:i,selectionManager:l}}function Pv(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:s}=Dv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let p=(c=u.values().next().value)!==null&&c!==void 0?c:null;p===n&&t.onSelectionChange&&t.onSelectionChange(p),r(p)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:s,selectedKey:n,setSelectedKey:r,selectedItem:l}}function Ov(t){var e,n;let r=Pv({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Ls(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,s=d.useRef(a);return d.useEffect(()=>{let l=a;(i.isEmpty||l==null||!o.getItem(l))&&(l=Ls(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==s.current)&&i.setFocusedKey(l),s.current=l}),{...r,isDisabled:t.isDisabled||!1}}function Ls(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Iv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of e)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function _v(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Gc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Uc(t,d.useCallback(l=>new Iv(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(kv(n,l))},setExpandedKeys:r,selectionManager:new qc(a,i)}}function kv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Nv=d.createContext(null),Rv=d.createContext(null),Yc={CollectionRoot({collection:t,renderDropIndicator:e}){return Fs(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Fs(t,e,n)}};function Fs(t,e,n){return Iu({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=t.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const pi=d.createContext(Yc);function Xc(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Mv=d.createContext({}),Jc=d.createContext({}),Av=fa("separator",function(e,n){[e,n]=ir(e,n,Jc);let{elementType:r,orientation:i,style:o,className:a}=e,s=r||"hr";s==="hr"&&i==="vertical"&&(s="div");let{separatorProps:l}=hv({elementType:r,orientation:i});return d.createElement(s,{...Be(e),...l,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),Kv=d.createContext({placement:"bottom"}),Lv=d.createContext(null),Fv=d.forwardRef(function(e,n){[e,n]=ir(e,n,Lv);let r=d.useContext(Zv),i=bv(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=Qh(n,o.isOpen)||e.isExiting||!1;if(ip()){let l=e.children;return typeof l=="function"&&(l=l({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!a?null:d.createElement(jv,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function jv({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:p}=Jg({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},t),g=r.popoverRef,h=Jh(g,!!p)||r.isEntering||!1,y=mt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:p,isEntering:h,isExiting:e}}),f={...l.style,...y.style};return d.createElement(tv,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Be(r),l),...y,ref:g,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":p,"data-entering":h||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Ps,{onDismiss:t.close}),d.createElement(Kv.Provider,{value:{...c,placement:p,ref:i}},y.children),d.createElement(Ps,{onDismiss:t.close})))}const zv=d.createContext({});class ze extends Set{constructor(e,n,r){super(e),e instanceof ze?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Hv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Bv(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>js(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>js(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Hv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function js(t,e){return t?t==="all"?"all":new ze(t):e}class Wv{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ze([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ze(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Bi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new ze(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new ze([n],n,n):new ze;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new ze;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=sv(Hc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ze)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const Uv=d.createContext(null),Ea=d.createContext(null),Vv=d.createContext(null),Zr=d.createContext(null),Gv=d.createContext(null),qv=d.forwardRef(function(e,n){return[e,n]=ir(e,n,Uv),d.createElement(ku,{content:d.createElement(Nu,e)},r=>r.size>0&&d.createElement(Yv,{props:e,collection:r,menuRef:n}))});function Yv({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Nv)||{};n=$n(d.useMemo(()=>bu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),s=_v({...t,collection:a,children:void 0}),l=d.useContext(Vv),{isVirtualized:u,CollectionRoot:c}=d.useContext(pi),{menuProps:p}=cv({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},s,n),g=mt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Uu,null,d.createElement("div",{...Be(t),...p,...g,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[Ea,s],[Jc,{elementType:"div"}],[Rv,{name:"MenuSection",render:Jv}],[Gv,{parentMenuRef:n}],[Fo,null],[Zr,s.selectionManager]]},d.createElement(c,{collection:s.collection,persistedKeys:Xc(s.selectionManager.focusedKey),scrollRef:n}))))}class Xv extends Wv{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function Jv(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Ea),{CollectionBranch:s}=d.useContext(pi),[l,u]=Zh();var c;let{headingProps:p,groupProps:g}=fv({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),h=mt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),y=d.useContext(Zr),f=Bv(t),v=t.selectionMode!=null?new Xv(y,f):y;return d.createElement("section",{...Be(t),...g,...h,ref:e},d.createElement(rr,{values:[[Mv,{...p,ref:l}],[Zr,v]]},d.createElement(s,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),Qv=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=la(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(Ea),s=$n(n),l=d.useContext(Zr),{menuItemProps:u,labelProps:c,descriptionProps:p,keyboardShortcutProps:g,...h}=dv({...e,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:y,focusProps:f}=fi(),{hoverProps:v,isHovered:m}=wa({isDisabled:h.isDisabled}),S=mt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:m,isFocusVisible:y,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...ye(u,f,v),...S,ref:s,"data-disabled":h.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":y||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[yv,{slots:{label:c,description:p}}],[zv,g]]},S.children))}),Zv=d.createContext(null),gi=d.createContext(null),yn=d.createContext(null),em=d.forwardRef(function(e,n){[e,n]=ir(e,n,gi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(ku,{content:r},o=>d.createElement(tm,{props:e,collection:o,tabsRef:n}))});function tm({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=Ov({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:s}=fi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:s}),[r,a,s]),u=mt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...Be(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[gi,t],[yn,i]]},u.children))}const nm=d.forwardRef(function(e,n){return d.useContext(yn)?d.createElement(rm,{props:e,forwardedRef:n}):d.createElement(Nu,e)});function rm({props:t,forwardedRef:e}){let n=d.useContext(yn),{CollectionRoot:r}=d.useContext(pi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=la(gi),a=$n(e),{tabListProps:s}=mv({...t,orientation:i,keyboardActivation:o},n,a),l=mt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Be(t);return delete u.id,d.createElement("div",{...u,...s,ref:a,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:Xc(n.selectionManager.focusedKey)}))}const im=fa("item",(t,e,n)=>{let r=d.useContext(yn),i=$n(e),{tabProps:o,isSelected:a,isDisabled:s,isPressed:l}=pv({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:p}=fi(),{hoverProps:g,isHovered:h}=wa({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),y=mt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:s,isFocused:c,isFocusVisible:p,isPressed:l,isHovered:h}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,g,y),ref:i,"data-selected":a||void 0,"data-disabled":s||void 0,"data-focused":c||void 0,"data-focus-visible":p||void 0,"data-pressed":l||void 0,"data-hovered":h||void 0})}),om=rp(function(e,n){const r=d.useContext(yn);let i=$n(n),{tabPanelProps:o}=gv(e,r,i),{focusProps:a,isFocused:s,isFocusVisible:l}=fi(),u=r.selectedKey===e.id,c=mt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:s,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let p=Be(e);delete p.id;let g=u?ye(p,o,a,c):c;return d.createElement("div",{...g,ref:i,"data-focused":s||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[gi,null],[yn,null]]},d.createElement(pi.Provider,{value:Yc},c.children)))}),Qc=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),s=u=>{n==null||n(u)},l=d.useRef(null);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"c__dropdown-menu-trigger",ref:l,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),T.jsx(Fv,{triggerRef:l,style:{marginTop:"0px"},isOpen:e,onOpenChange:s,children:T.jsx(qv,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>T.jsxs(d.Fragment,{children:[T.jsxs(Qv,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),s(!1)},isDisabled:u.isDisabled,children:[u.icon,T.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&T.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&T.jsx(Av,{})]},u.label))})})]})},Zc=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},ed=({languages:t})=>{const{isOpen:e,setIsOpen:n}=Zc();return T.jsx(Qc,{options:t,isOpen:e,onOpenChange:n,children:T.jsxs(vn.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[T.jsx("span",{className:"material-icons",children:"translate"}),T.jsx("span",{className:"c__language-picker__label",children:"Français"}),T.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},td=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=vn.useCunningham();return T.jsxs("div",{className:"c__header",children:[T.jsx("div",{className:"c__header__toggle-menu",children:T.jsx(vn.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:T.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),T.jsx("div",{className:"c__header__left",children:t}),T.jsxs("div",{className:"c__header__right",children:[n&&T.jsx("div",{className:"c__header__right__language-picker",children:T.jsx(ed,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},logo:{src:"/assets/logo-gouv.svg",widthHeader:"110px",widthFooter:"220px",alt:"Gouvernement Logo"},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},vi=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,s=t>r;return{isMobile:o,isTablet:a,isDesktop:s}},nd=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=vi();return n?T.jsx("div",{className:"c__left-panel",children:t}):T.jsx("div",{className:jt("c__left-panel__mobile",{open:e}),children:t})},{createElement:bn,createContext:am,createRef:xx,forwardRef:rd,useCallback:xe,useContext:id,useEffect:Tt,useImperativeHandle:od,useLayoutEffect:sm,useMemo:lm,useRef:Ce,useState:hn}=C,zs=C[`useId${Math.random()}`.slice(0,5)],um=sm,mi=am(null);mi.displayName="PanelGroupContext";const Dt=um,cm=typeof zs=="function"?zs:()=>null;let dm=0;function $a(t=null){const e=cm(),n=Ce(t||e||null);return n.current===null&&(n.current=""+dm++),t??n.current}function ad({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:p,order:g,style:h,tagName:y="div",...f}){const v=id(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:m,expandPanel:S,getPanelSize:w,getPanelStyle:O,groupId:x,isPanelCollapsed:D,reevaluatePanelConstraints:P,registerPanel:b,resizePanel:k,unregisterPanel:B}=v,R=$a(a),z=Ce({callbacks:{onCollapse:u,onExpand:c,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:R,idIsFromProps:a!==void 0,order:g});Ce({didLogMissingDefaultSizeWarning:!1}),Dt(()=>{const{callbacks:I,constraints:j}=z.current,V={...j};z.current.id=R,z.current.idIsFromProps=a!==void 0,z.current.order=g,I.onCollapse=u,I.onExpand=c,I.onResize=p,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=s,j.minSize=l,(V.collapsedSize!==j.collapsedSize||V.collapsible!==j.collapsible||V.maxSize!==j.maxSize||V.minSize!==j.minSize)&&P(z.current,V)}),Dt(()=>{const I=z.current;return b(I),()=>{B(I)}},[g,R,b,B]),od(o,()=>({collapse:()=>{m(z.current)},expand:I=>{S(z.current,I)},getId(){return R},getSize(){return w(z.current)},isCollapsed(){return D(z.current)},isExpanded(){return!D(z.current)},resize:I=>{k(z.current,I)}}),[m,S,w,D,R,k]);const E=O(z.current,i);return bn(y,{...f,children:t,className:e,id:a,style:{...E,...h},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":R,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const zo=rd((t,e)=>bn(ad,{...t,forwardedRef:e}));ad.displayName="Panel";zo.displayName="forwardRef(Panel)";let Ho=null,Ct=null;function fm(t,e){if(e){const n=(e&dd)!==0,r=(e&fd)!==0,i=(e&hd)!==0,o=(e&pd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function hm(){Ct!==null&&(document.head.removeChild(Ct),Ho=null,Ct=null)}function Vi(t,e){const n=fm(t,e);Ho!==n&&(Ho=n,Ct===null&&(Ct=document.createElement("style"),document.head.appendChild(Ct)),Ct.innerHTML=`*{cursor: ${n}!important;}`)}function sd(t){return t.type==="keydown"}function ld(t){return t.type.startsWith("pointer")}function ud(t){return t.type.startsWith("mouse")}function yi(t){if(ld(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(ud(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function pm(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function gm(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function vm(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ws(t),b:Ws(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ee(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Bs(Hs(n.a)),b:Bs(Hs(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const l=o[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(i.a-i.b)}const mm=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ym(t){var e;const n=getComputedStyle((e=cd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function bm(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||ym(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||mm.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Hs(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),bm(n))return n}return null}function Bs(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ws(t){const e=[];for(;t;)e.push(t),t=cd(t);return e}function cd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const dd=1,fd=2,hd=4,pd=8,Sm=pm()==="coarse";let He=[],pn=!1,ht=new Map,bi=new Map;const Xn=new Set;function wm(t,e,n,r,i){var o;const{ownerDocument:a}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=ht.get(a))!==null&&o!==void 0?o:0;return ht.set(a,l+1),Xn.add(s),ei(),function(){var c;bi.delete(t),Xn.delete(s);const p=(c=ht.get(a))!==null&&c!==void 0?c:1;if(ht.set(a,p-1),ei(),p===1&&ht.delete(a),He.includes(s)){const g=He.indexOf(s);g>=0&&He.splice(g,1),Ca(),i("up",!0,null)}}}function Us(t){const{target:e}=t,{x:n,y:r}=yi(t);pn=!0,xa({target:e,x:n,y:r}),ei(),He.length>0&&(ti("down",t),t.preventDefault(),t.stopPropagation())}function kn(t){const{x:e,y:n}=yi(t);if(pn&&t.buttons===0&&(pn=!1,ti("up",t)),!pn){const{target:r}=t;xa({target:r,x:e,y:n})}ti("move",t),Ca(),He.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),pn=!1,He.length>0&&t.preventDefault(),ti("up",t),xa({target:e,x:n,y:r}),Ca(),ei()}function xa({target:t,x:e,y:n}){He.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Xn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,s=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:p}=s,g=Sm?a.coarse:a.fine;if(e>=u-g&&e<=c+g&&n>=p-g&&n<=l+g){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&vm(r,o)>0){let y=r,f=!1;for(;y&&!y.contains(o);){if(gm(y.getBoundingClientRect(),s)){f=!0;break}y=y.parentElement}if(f)return}He.push(i)}})}function Gi(t,e){bi.set(t,e)}function Ca(){let t=!1,e=!1;He.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Vi("intersection",n):t?Vi("horizontal",n):e?Vi("vertical",n):hm()}function ei(){ht.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",Us),n.removeEventListener("pointerleave",kn),n.removeEventListener("pointermove",kn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Xn.size>0&&(pn?(He.length>0&&ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",kn),n.addEventListener("pointermove",kn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",Us,{capture:!0}),n.addEventListener("pointermove",kn))}))}function ti(t,e){Xn.forEach(n=>{const{setResizeHandlerState:r}=n,i=He.includes(n);r(t,i,e)})}function Em(){const[t,e]=hn(0);return xe(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Nt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Nt(t,e,n)===0}function Te(t,e,n){return Nt(t,e,n)===0}function $m(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function cn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ee(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=r;if(Nt(n,s)<0)if(o){const l=(i+s)/2;Nt(n,l)<0?n=i:n=s}else n=s;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Ln({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[s,l]=r;ee(s!=null,"Invalid first pivot index"),ee(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const p=t<0?l:s,g=n[p];ee(g,`Panel constraints not found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(ee(v!=null,`Previous layout not found for panel index ${p}`),Te(v,h)){const m=f-v;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}{const p=t<0?s:l,g=n[p];ee(g,`No panel constraints found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(ee(v!=null,`Previous layout not found for panel index ${p}`),Te(v,f)){const m=v-h;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}}{const p=t<0?1:-1;let g=t<0?l:s,h=0;for(;;){const f=e[g];ee(f!=null,`Previous layout not found for panel index ${g}`);const m=cn({panelConstraints:n,panelIndex:g,size:100})-f;if(h+=m,g+=p,g<0||g>=n.length)break}const y=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-y:y}{let g=t<0?s:l;for(;g>=0&&g<n.length;){const h=Math.abs(t)-Math.abs(u),y=e[g];ee(y!=null,`Previous layout not found for panel index ${g}`);const f=y-h,v=cn({panelConstraints:n,panelIndex:g,size:f});if(!Te(y,v)&&(u+=y-v,a[g]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?g--:g++}}if($m(i,a))return i;{const p=t<0?l:s,g=e[p];ee(g!=null,`Previous layout not found for panel index ${p}`);const h=g+u,y=cn({panelConstraints:n,panelIndex:p,size:h});if(a[p]=y,!Te(y,h)){let f=h-y,m=t<0?l:s;for(;m>=0&&m<n.length;){const S=a[m];ee(S!=null,`Previous layout not found for panel index ${m}`);const w=S+f,O=cn({panelConstraints:n,panelIndex:m,size:w});if(Te(S,O)||(f-=O-S,a[m]=O),Te(f,0))break;t>0?m--:m++}}}const c=a.reduce((p,g)=>g+p,0);return Te(c,100)?a:i}function xm({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const s=n[0];ee(s!=null,"No pivot index found"),e.forEach((p,g)=>{const{constraints:h}=p,{maxSize:y=100,minSize:f=0}=h;g===s?(r=f,i=y):(o+=f,a+=y)});const l=Math.min(i,100-o),u=Math.max(r,100-a),c=t[s];return{valueMax:l,valueMin:u,valueNow:c}}function Jn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function gd(t,e,n=document){const i=Jn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function vd(t,e,n){const r=gd(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function md(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Cm(t,e,n,r=document){var i,o,a,s;const l=Si(e,r),u=Jn(t,r),c=l?u.indexOf(l):-1,p=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,g=(a=(s=n[c+1])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null;return[p,g]}function Tm({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){Ce({didWarnAboutMissingResizeHandle:!1}),Dt(()=>{if(!o)return;const s=Jn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:p}=xm({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),g=s[l];if(g!=null){const h=i[l];ee(h,`No panel data found for index "${l}"`),g.setAttribute("aria-controls",h.id),g.setAttribute("aria-valuemax",""+Math.round(u)),g.setAttribute("aria-valuemin",""+Math.round(c)),g.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Tt(()=>{if(!o)return;const s=e.current;ee(s,"Eager values not found");const{panelDataArray:l}=s,u=md(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Jn(n,o);ee(c,`No resize handles found for group id "${n}"`);const p=c.map(g=>{const h=g.getAttribute("data-panel-resize-handle-id");ee(h,"Resize handle element has no handle id attribute");const[y,f]=Cm(n,h,l,o);if(y==null||f==null)return()=>{};const v=m=>{if(!m.defaultPrevented)switch(m.key){case"Enter":{m.preventDefault();const S=l.findIndex(w=>w.id===y);if(S>=0){const w=l[S];ee(w,`No panel data found for index ${S}`);const O=r[S],{collapsedSize:x=0,collapsible:D,minSize:P=0}=w.constraints;if(O!=null&&D){const b=Ln({delta:Te(O,x)?P-x:x-O,initialLayout:r,panelConstraints:l.map(k=>k.constraints),pivotIndices:vd(n,h,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return g.addEventListener("keydown",v),()=>{g.removeEventListener("keydown",v)}});return()=>{p.forEach(g=>g())}},[o,t,e,n,r,i,a])}function Vs(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function yd(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Dm(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);ee(a,`No resize handle element found for id "${e}"`);const s=a.getAttribute("data-panel-group-id");ee(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=yd(n,t),c=md(s,i);ee(c,`No group element found for id "${s}"`);const p=c.getBoundingClientRect(),g=o?p.width:p.height;return(u-l)/g*100}function Pm(t,e,n,r,i,o){if(sd(t)){const a=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(t.key){case"ArrowDown":l=a?0:s;break;case"ArrowLeft":l=a?-s:0;break;case"ArrowRight":l=a?s:0;break;case"ArrowUp":l=a?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Dm(t,e,n,r,o)}function Om({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(s!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Vt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:s,id:l}=o,{collapsedSize:u=0,collapsible:c}=s,p=n[l];if(p==null||r!==p){n[l]=r;const{onCollapse:g,onExpand:h,onResize:y}=a;y&&y(r,p),c&&(g||h)&&(h&&(p==null||nt(p,u))&&!nt(r,u)&&h(),g&&(p==null||!nt(p,u))&&nt(r,u)&&g())}})}function Sr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Im({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let s;return a==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function _m(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Gs(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function bd(t){return`react-resizable-panels:${t}`}function Sd(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function wd(t,e){try{const n=bd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function km(t,e,n){var r,i;const o=(r=wd(t,n))!==null&&r!==void 0?r:{},a=Sd(e);return(i=o[a])!==null&&i!==void 0?i:null}function Nm(t,e,n,r,i){var o;const a=bd(t),s=Sd(e),l=(o=wd(t,i))!==null&&o!==void 0?o:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(l))}catch(u){console.error(u)}}function qs({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=100/r*a;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=cn({panelConstraints:e,panelIndex:o,size:a});a!=s&&(i+=a-s,n[o]=s)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=a+i,l=cn({panelConstraints:e,panelIndex:o,size:s});if(a!==l&&(i-=l-a,n[o]=l,Te(i,0)))break}return n}const Rm=100,Fn={getItem:t=>(Gs(Fn),Fn.getItem(t)),setItem:(t,e)=>{Gs(Fn),Fn.setItem(t,e)}},Ys={};function Ed({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=Fn,style:u,tagName:c="div",...p}){const g=$a(o),h=Ce(null),[y,f]=hn(null),[v,m]=hn([]),S=Em(),w=Ce({}),O=Ce(new Map),x=Ce(0),D=Ce({autoSaveId:t,direction:r,dragState:y,id:g,keyboardResizeBy:s,onLayout:a,storage:l}),P=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),od(i,()=>({getId:()=>D.current.id,getLayout:()=>{const{layout:N}=P.current;return N},setLayout:N=>{const{onLayout:L}=D.current,{layout:K,panelDataArray:W}=P.current,U=qs({layout:N,panelConstraints:W.map(F=>F.constraints)});Vs(K,U)||(m(U),P.current.layout=U,L&&L(U),Vt(W,U,w.current))}}),[]),Dt(()=>{D.current.autoSaveId=t,D.current.direction=r,D.current.dragState=y,D.current.id=g,D.current.onLayout=a,D.current.storage=l}),Tm({committedValuesRef:D,eagerValuesRef:P,groupId:g,layout:v,panelDataArray:P.current.panelDataArray,setLayout:m,panelGroupElement:h.current}),Tt(()=>{const{panelDataArray:N}=P.current;if(t){if(v.length===0||v.length!==N.length)return;let L=Ys[t];L==null&&(L=_m(Nm,Rm),Ys[t]=L);const K=[...N],W=new Map(O.current);L(t,K,W,v,l)}},[t,v,l]),Tt(()=>{});const b=xe(N=>{const{onLayout:L}=D.current,{layout:K,panelDataArray:W}=P.current;if(N.constraints.collapsible){const U=W.map(de=>de.constraints),{collapsedSize:F=0,panelSize:X,pivotIndices:te}=bt(W,N,K);if(ee(X!=null,`Panel size not found for panel "${N.id}"`),!nt(X,F)){O.current.set(N.id,X);const ce=an(W,N)===W.length-1?X-F:F-X,oe=Ln({delta:ce,initialLayout:K,panelConstraints:U,pivotIndices:te,prevLayout:K,trigger:"imperative-api"});Sr(K,oe)||(m(oe),P.current.layout=oe,L&&L(oe),Vt(W,oe,w.current))}}},[]),k=xe((N,L)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current;if(N.constraints.collapsible){const F=U.map(ge=>ge.constraints),{collapsedSize:X=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=bt(U,N,W),oe=L??de;if(nt(te,X)){const ge=O.current.get(N.id),re=ge!=null&&ge>=oe?ge:oe,at=an(U,N)===U.length-1?te-re:re-te,ve=Ln({delta:at,initialLayout:W,panelConstraints:F,pivotIndices:ce,prevLayout:W,trigger:"imperative-api"});Sr(W,ve)||(m(ve),P.current.layout=ve,K&&K(ve),Vt(U,ve,w.current))}}},[]),B=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{panelSize:W}=bt(K,N,L);return ee(W!=null,`Panel size not found for panel "${N.id}"`),W},[]),R=xe((N,L)=>{const{panelDataArray:K}=P.current,W=an(K,N);return Im({defaultSize:L,dragState:y,layout:v,panelData:K,panelIndex:W})},[y,v]),z=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:F}=bt(K,N,L);return ee(F!=null,`Panel size not found for panel "${N.id}"`),U===!0&&nt(F,W)},[]),E=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:F}=bt(K,N,L);return ee(F!=null,`Panel size not found for panel "${N.id}"`),!U||Nt(F,W)>0},[]),I=xe(N=>{const{panelDataArray:L}=P.current;L.push(N),L.sort((K,W)=>{const U=K.order,F=W.order;return U==null&&F==null?0:U==null?-1:F==null?1:U-F}),P.current.panelDataArrayChanged=!0,S()},[S]);Dt(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:N,onLayout:L,storage:K}=D.current,{layout:W,panelDataArray:U}=P.current;let F=null;if(N){const te=km(N,U,K);te&&(O.current=new Map(Object.entries(te.expandToSizes)),F=te.layout)}F==null&&(F=Om({panelDataArray:U}));const X=qs({layout:F,panelConstraints:U.map(te=>te.constraints)});Vs(W,X)||(m(X),P.current.layout=X,L&&L(X),Vt(U,X,w.current))}}),Dt(()=>{const N=P.current;return()=>{N.layout=[]}},[]);const j=xe(N=>{let L=!1;const K=h.current;return K&&window.getComputedStyle(K,null).getPropertyValue("direction")==="rtl"&&(L=!0),function(U){U.preventDefault();const F=h.current;if(!F)return()=>null;const{direction:X,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=D.current,{layout:ge,panelDataArray:re}=P.current,{initialLayout:Ue}=te??{},at=vd(de,N,F);let ve=Pm(U,N,X,te,ce,F);const Tn=X==="horizontal";Tn&&L&&(ve=-ve);const sr=re.map(q=>q.constraints),$=Ln({delta:ve,initialLayout:Ue??ge,panelConstraints:sr,pivotIndices:at,prevLayout:ge,trigger:sd(U)?"keyboard":"mouse-or-touch"}),G=!Sr(ge,$);(ld(U)||ud(U))&&x.current!=ve&&(x.current=ve,!G&&ve!==0?Tn?Gi(N,ve<0?dd:fd):Gi(N,ve<0?hd:pd):Gi(N,0)),G&&(m($),P.current.layout=$,oe&&oe($),Vt(re,$,w.current))}},[]),V=xe((N,L)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current,F=U.map(ge=>ge.constraints),{panelSize:X,pivotIndices:te}=bt(U,N,W);ee(X!=null,`Panel size not found for panel "${N.id}"`);const ce=an(U,N)===U.length-1?X-L:L-X,oe=Ln({delta:ce,initialLayout:W,panelConstraints:F,pivotIndices:te,prevLayout:W,trigger:"imperative-api"});Sr(W,oe)||(m(oe),P.current.layout=oe,K&&K(oe),Vt(U,oe,w.current))},[]),A=xe((N,L)=>{const{layout:K,panelDataArray:W}=P.current,{collapsedSize:U=0,collapsible:F}=L,{collapsedSize:X=0,collapsible:te,maxSize:de=100,minSize:ce=0}=N.constraints,{panelSize:oe}=bt(W,N,K);oe!=null&&(F&&te&&nt(oe,U)?nt(U,X)||V(N,X):oe<ce?V(N,ce):oe>de&&V(N,de))},[V]),_=xe((N,L)=>{const{direction:K}=D.current,{layout:W}=P.current;if(!h.current)return;const U=Si(N,h.current);ee(U,`Drag handle element not found for id "${N}"`);const F=yd(K,L);f({dragHandleId:N,dragHandleRect:U.getBoundingClientRect(),initialCursorPosition:F,initialLayout:W})},[]),H=xe(()=>{f(null)},[]),Y=xe(N=>{const{panelDataArray:L}=P.current,K=an(L,N);K>=0&&(L.splice(K,1),delete w.current[N.id],P.current.panelDataArrayChanged=!0,S())},[S]),Q=lm(()=>({collapsePanel:b,direction:r,dragState:y,expandPanel:k,getPanelSize:B,getPanelStyle:R,groupId:g,isPanelCollapsed:z,isPanelExpanded:E,reevaluatePanelConstraints:A,registerPanel:I,registerResizeHandle:j,resizePanel:V,startDragging:_,stopDragging:H,unregisterPanel:Y,panelGroupElement:h.current}),[b,y,r,k,B,R,g,z,E,A,I,j,V,_,H,Y]),M={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return bn(mi.Provider,{value:Q},bn(c,{...p,children:e,className:n,id:o,ref:h,style:{...M,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g}))}const $d=rd((t,e)=>bn(Ed,{...t,forwardedRef:e}));Ed.displayName="PanelGroup";$d.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function bt(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Mm({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Tt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const s=i.getAttribute("data-panel-group-id");ee(s,`No group element found for id "${s}"`);const l=Jn(s,r),u=gd(s,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function xd({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...p}){var g,h;const y=Ce(null),f=Ce({onDragging:a});Tt(()=>{f.current.onDragging=a});const v=id(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:m,groupId:S,registerResizeHandle:w,startDragging:O,stopDragging:x,panelGroupElement:D}=v,P=$a(i),[b,k]=hn("inactive"),[B,R]=hn(!1),[z,E]=hn(null),I=Ce({state:b});Dt(()=>{I.current.state=b}),Tt(()=>{if(n)E(null);else{const _=w(P);E(()=>_)}},[n,P,w]);const j=(g=r==null?void 0:r.coarse)!==null&&g!==void 0?g:15,V=(h=r==null?void 0:r.fine)!==null&&h!==void 0?h:5;return Tt(()=>{if(n||z==null)return;const _=y.current;return ee(_,"Element ref not attached"),wm(P,_,m,{coarse:j,fine:V},(Y,Q,M)=>{if(Q)switch(Y){case"down":{k("drag"),ee(M,'Expected event to be defined for "down" action'),O(P,M);const{onDragging:N}=f.current;N&&N(!0);break}case"move":{const{state:N}=I.current;N!=="drag"&&k("hover"),ee(M,'Expected event to be defined for "move" action'),z(M);break}case"up":{k("hover"),x();const{onDragging:N}=f.current;N&&N(!1);break}}else k("inactive")})},[j,m,n,V,w,P,z,O,x]),Mm({disabled:n,handleId:P,resizeHandler:z,panelGroupElement:D}),bn(c,{...p,children:t,className:e,id:i,onBlur:()=>{R(!1),o==null||o()},onFocus:()=>{R(!0),s==null||s()},ref:y,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":m,"data-panel-group-id":S,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":B?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":P})}xd.displayName="PanelResizeHandle";const Am=({icon:t,children:e,leftPanelContent:n,rightHeaderContent:r,languages:i,enableResize:o=!1})=>{const[a,s]=d.useState(!1),{isDesktop:l}=vi(),[u,c]=d.useState(wr(300,l)),[p,g]=d.useState(wr(450,l)),h=()=>{s(!a)};return d.useEffect(()=>{const y=()=>{const f=wr(300,l),v=Math.min(wr(450,l),40);c(l?f:0),g(o?v:f)};return y(),window.addEventListener("resize",()=>{y()}),()=>{window.removeEventListener("resize",y)}},[l,o]),T.jsxs("div",{className:"c__main-layout",children:[T.jsx("div",{className:"c__main-layout__header",children:T.jsx(td,{onTogglePanel:h,isPanelOpen:a,rightIcon:r,leftIcon:t,languages:i})}),T.jsx("div",{className:"c__main-layout__content",children:T.jsxs($d,{direction:"horizontal",children:[T.jsx(zo,{defaultSize:u,minSize:u,maxSize:p,children:T.jsx(nd,{isOpen:a,children:n})}),l&&T.jsx(xd,{className:"bg-greyscale-200",style:{width:"1px"}}),T.jsx(zo,{children:T.jsx("div",{className:"c__main-layout__content__children",children:e})})]})})]})},wr=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},Km=52,Da=({size:t="sm"})=>T.jsx("div",{className:["c__spinner",t].join(" ")}),Cd=({children:t,text:e,...n})=>T.jsxs("div",{className:"suite__label__container",children:[T.jsx("label",{...n,children:t}),e&&T.jsx("span",{className:"suite__label__container__description",children:e})]}),Lm=({label:t,text:e,labelSide:n="right",children:r})=>T.jsxs("div",{className:jt("c__with-label",{[n]:!0}),children:[T.jsx(Cd,{children:t,text:e}),r]});var Xs=1,Fm=.9,jm=.8,zm=.17,qi=.1,Yi=.999,Hm=.9999,Bm=.99,Wm=/[\\\/_+.#"@\[\(\{&]/,Um=/[\\\/_+.#"@\[\(\{&]/g,Vm=/[\s-]/,Td=/[\s-]/g;function Bo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Xs:Bm;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,p,g,h,y;u>=0;)p=Bo(t,e,n,r,u+1,o+1,a),p>c&&(u===i?p*=Xs:Wm.test(t.charAt(u-1))?(p*=jm,h=t.slice(i,u-1).match(Um),h&&i>0&&(p*=Math.pow(Yi,h.length))):Vm.test(t.charAt(u-1))?(p*=Fm,y=t.slice(i,u-1).match(Td),y&&i>0&&(p*=Math.pow(Yi,y.length))):(p*=zm,i>0&&(p*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(p*=Hm)),(p<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(g=Bo(t,e,n,r,u+1,o+2,a),g*qi>p&&(p=g*qi)),p>c&&(c=p),u=n.indexOf(l,u+1);return a[s]=c,c}function Js(t){return t.toLowerCase().replace(Td," ")}function Gm(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Bo(t,e,Js(t),Js(e),0,0,{})}function vt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Qs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Dd(...t){return e=>{let n=!1;const r=t.map(i=>{const o=Qs(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Qs(t[i],null)}}}}function zt(...t){return C.useCallback(Dd(...t),t)}function qm(t,e){const n=C.createContext(e),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Ym(t,e=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=p=>{var m;const{scope:g,children:h,...y}=p,f=((m=g==null?void 0:g[t])==null?void 0:m[l])||s,v=C.useMemo(()=>y,Object.values(y));return T.jsx(f.Provider,{value:v,children:h})};u.displayName=o+"Provider";function c(p,g){var f;const h=((f=g==null?void 0:g[t])==null?void 0:f[l])||s,y=C.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[t])||o;return C.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return i.scopeName=t,[r,Xm(i,...e)]}function Xm(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ni=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},Jm=C.useId||(()=>{}),Qm=0;function it(t){const[e,n]=C.useState(Jm());return ni(()=>{n(r=>r??String(Qm++))},[t]),e?`radix-${e}`:""}function Rt(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Zm({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=ey({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,s=Rt(n),l=C.useCallback(u=>{if(o){const p=typeof u=="function"?u(t):u;p!==t&&s(p)}else i(u)},[o,t,i,s]);return[a,l]}function ey({defaultProp:t,onChange:e}){const n=C.useState(t),[r]=n,i=C.useRef(r),o=Rt(e);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Pa=C.forwardRef((t,e)=>{const{children:n,...r}=t,i=C.Children.toArray(n),o=i.find(ny);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return T.jsx(Wo,{...r,ref:e,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return T.jsx(Wo,{...r,ref:e,children:n})});Pa.displayName="Slot";var Wo=C.forwardRef((t,e)=>{const{children:n,...r}=t;if(C.isValidElement(n)){const i=iy(n),o=ry(r,n.props);return n.type!==C.Fragment&&(o.ref=e?Dd(e,i):i),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});Wo.displayName="SlotClone";var ty=({children:t})=>T.jsx(T.Fragment,{children:t});function ny(t){return C.isValidElement(t)&&t.type===ty}function ry(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function iy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=oy.reduce((t,e)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ay(t,e){t&&rh.flushSync(()=>t.dispatchEvent(e))}function sy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var ly="DismissableLayer",Uo="dismissableLayer.update",uy="dismissableLayer.pointerDownOutside",cy="dismissableLayer.focusOutside",Zs,Pd=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Od=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=t,u=C.useContext(Pd),[c,p]=C.useState(null),g=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=C.useState({}),y=zt(e,P=>p(P)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=f.indexOf(v),S=c?f.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=S>=m,x=hy(P=>{const b=P.target,k=[...u.branches].some(B=>B.contains(b));!O||k||(i==null||i(P),a==null||a(P),P.defaultPrevented||s==null||s())},g),D=py(P=>{const b=P.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(P),a==null||a(P),P.defaultPrevented||s==null||s())},g);return sy(P=>{S===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},g),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),el(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zs)}},[c,g,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),el())},[c,u]),C.useEffect(()=>{const P=()=>h({});return document.addEventListener(Uo,P),()=>document.removeEventListener(Uo,P)},[]),T.jsx(be.div,{...l,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:vt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:vt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:vt(t.onPointerDownCapture,x.onPointerDownCapture)})});Od.displayName=ly;var dy="DismissableLayerBranch",fy=C.forwardRef((t,e)=>{const n=C.useContext(Pd),r=C.useRef(null),i=zt(e,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(be.div,{...t,ref:i})});fy.displayName=dy;function hy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){Id(uy,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function py(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&Id(cy,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function el(){const t=new CustomEvent(Uo);document.dispatchEvent(t)}function Id(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ay(i,o):i.dispatchEvent(o)}var Xi="focusScope.autoFocusOnMount",Ji="focusScope.autoFocusOnUnmount",tl={bubbles:!1,cancelable:!0},gy="FocusScope",_d=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[s,l]=C.useState(null),u=Rt(i),c=Rt(o),p=C.useRef(null),g=zt(e,f=>l(f)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let f=function(w){if(h.paused||!s)return;const O=w.target;s.contains(O)?p.current=O:ut(p.current,{select:!0})},v=function(w){if(h.paused||!s)return;const O=w.relatedTarget;O!==null&&(s.contains(O)||ut(p.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&ut(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const S=new MutationObserver(m);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),S.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){rl.add(h);const f=document.activeElement;if(!s.contains(f)){const m=new CustomEvent(Xi,tl);s.addEventListener(Xi,u),s.dispatchEvent(m),m.defaultPrevented||(vy(wy(kd(s)),{select:!0}),document.activeElement===f&&ut(s))}return()=>{s.removeEventListener(Xi,u),setTimeout(()=>{const m=new CustomEvent(Ji,tl);s.addEventListener(Ji,c),s.dispatchEvent(m),m.defaultPrevented||ut(f??document.body,{select:!0}),s.removeEventListener(Ji,c),rl.remove(h)},0)}}},[s,u,c,h]);const y=C.useCallback(f=>{if(!n&&!r||h.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=document.activeElement;if(v&&m){const S=f.currentTarget,[w,O]=my(S);w&&O?!f.shiftKey&&m===O?(f.preventDefault(),n&&ut(w,{select:!0})):f.shiftKey&&m===w&&(f.preventDefault(),n&&ut(O,{select:!0})):m===S&&f.preventDefault()}},[n,r,h.paused]);return T.jsx(be.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});_d.displayName=gy;function vy(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ut(r,{select:e}),document.activeElement!==n)return}function my(t){const e=kd(t),n=nl(e,t),r=nl(e.reverse(),t);return[n,r]}function kd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function nl(t,e){for(const n of t)if(!yy(n,{upTo:e}))return n}function yy(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function by(t){return t instanceof HTMLInputElement&&"select"in t}function ut(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&by(t)&&e&&t.select()}}var rl=Sy();function Sy(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=il(t,e),t.unshift(e)},remove(e){var n;t=il(t,e),(n=t[0])==null||n.resume()}}}function il(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function wy(t){return t.filter(e=>e.tagName!=="A")}var Ey="Portal",Nd=C.forwardRef((t,e)=>{var s;const{container:n,...r}=t,[i,o]=C.useState(!1);ni(()=>o(!0),[]);const a=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Ft.createPortal(T.jsx(be.div,{...r,ref:e}),a):null});Nd.displayName=Ey;function $y(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var wi=t=>{const{present:e,children:n}=t,r=xy(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=zt(r.ref,Cy(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};wi.displayName="Presence";function xy(t){const[e,n]=C.useState(),r=C.useRef({}),i=C.useRef(t),o=C.useRef("none"),a=t?"mounted":"unmounted",[s,l]=$y(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=Er(r.current);o.current=s==="mounted"?u:"none"},[s]),ni(()=>{const u=r.current,c=i.current;if(c!==t){const g=o.current,h=Er(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&g!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),ni(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,p=h=>{const f=Er(r.current).includes(h.animationName);if(h.target===e&&f&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=h=>{h.target===e&&(o.current=Er(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",p),e.addEventListener("animationend",p),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",p),e.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Er(t){return(t==null?void 0:t.animationName)||"none"}function Cy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qi=0;function Ty(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ol()),document.body.insertAdjacentElement("beforeend",t[1]??ol()),Qi++,()=>{Qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qi--}},[])}function ol(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var kr="right-scroll-bar-position",Nr="width-before-scroll-bar",Dy="with-scroll-bars-hidden",Py="--removed-body-scroll-bar-size";function Zi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Oy(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Iy=typeof window<"u"?C.useLayoutEffect:C.useEffect,al=new WeakMap;function _y(t,e){var n=Oy(null,function(r){return t.forEach(function(i){return Zi(i,r)})});return Iy(function(){var r=al.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(s){o.has(s)||Zi(s,null)}),o.forEach(function(s){i.has(s)||Zi(s,a)})}al.set(n,t)},[t]),n}function ky(t){return t}function Ny(t,e){e===void 0&&(e=ky);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ry(t){t===void 0&&(t={});var e=Ny(null);return e.options=Ge({async:!0,ssr:!1},t),e}var Rd=function(t){var e=t.sideCar,n=rc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Ge({},n))};Rd.isSideCarExport=!0;function My(t,e){return t.useMedium(e),Rd}var Md=Ry(),eo=function(){},Ei=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,p=t.shards,g=t.sideCar,h=t.noIsolation,y=t.inert,f=t.allowPinchZoom,v=t.as,m=v===void 0?"div":v,S=t.gapMode,w=rc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,x=_y([n,e]),D=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(O,{sideCar:Md,removeScrollBar:u,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:S}),a?C.cloneElement(C.Children.only(s),Ge(Ge({},D),{ref:x})):C.createElement(m,Ge({},D,{className:l,ref:x}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ei.classNames={fullWidth:Nr,zeroRight:kr};var Ay=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ky(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Ay();return e&&t.setAttribute("nonce",e),t}function Ly(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fy(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jy=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Ky())&&(Ly(e,n),Fy(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},zy=function(){var t=jy();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Ad=function(){var t=zy(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Hy={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},By=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},Wy=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Hy;var e=By(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Uy=Ad(),gn="data-scroll-locked",Vy=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,s=t.gap;return n===void 0&&(n="margin"),`
48
- .`.concat(Dy,` {
47
+ */var ts;function cp(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function t(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}function e(g,m){c||i.startTransition===void 0||(c=!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 f=m();if(!h){var v=m();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}v=a({inst:{value:f,getSnapshot:m}});var y=v[0].inst,S=v[1];return l(function(){y.value=f,y.getSnapshot=m,n(y)&&S({inst:y})},[g,f,m]),s(function(){return n(y)&&S({inst:y}),g(function(){n(y)&&S({inst:y})})},[g]),u(f),f}function n(g){var m=g.getSnapshot;g=g.value;try{var f=m();return!o(g,f)}catch{return!0}}function r(g,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ni.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ni}var ns;function dp(){return ns||(ns=1,process.env.NODE_ENV==="production"?hr.exports=up():hr.exports=cp()),hr.exports}var da=dp();const Ru=d.createContext(!1),Yn=d.createContext(null);function Nu(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=gp(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(op,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(fp,{render:t.children,collection:n}))}function fp({collection:t,render:e}){return e(t)}function hp(t,e,n){let r=$n(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const pp=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:hp;function gp(t){let[e]=d.useState(()=>new rp((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=pp(n,r,i);return lp(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Co=d.createContext(null);function vp(t,e,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),s=d.useContext(Co);if(s){let l=s.ownerDocument.nodesByProps.get(e);return l||(l=s.ownerDocument.createElement(t),l.setProps(e,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Co.Provider,{value:l},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(Ru)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return vp(t,i,o,"children"in i?i.children:null,null,s=>d.createElement(n,{node:s}))});return r.displayName=e.name,r}function mp(t){return ku({...t,addIdAndValue:!0})}const rs=d.createContext(null);function Mu(t){let e=d.useContext(rs),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=mp({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(yp,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(rs.Provider,{value:e},i)}function yp({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(Ru.Provider,{value:!0},t)),[t]);return $n()?d.createElement(Co.Provider,{value:e},n):jt.createPortal(n,e)}const Pe=typeof document<"u"?d.useLayoutEffect:()=>{};function bp(t){const e=d.useRef(null);return Pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},gt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function is(t){if(Sp())t.focus({preventScroll:!0});else{let e=wp(t);t.focus(),Ep(e)}}let pr=null;function Sp(){if(pr==null){pr=!1;try{document.createElement("div").focus({get preventScroll(){return pr=!0,!0}})}catch{}}return pr}function wp(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Ep(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Au(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function $p(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const xp=ha(function(){return $p(/^Mac/i)}),Cp=ha(function(){return Au(/Chrome/i)}),Ku=ha(function(){return Au(/Android/i)});let on=new Map,To=new Set;function os(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);i||(i=new Set,on.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),on.delete(r.target)),on.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?os():document.addEventListener("DOMContentLoaded",os));function Tp(t){requestAnimationFrame(()=>{on.size===0?t():To.add(t)})}function Dp(t){return t.mozInputSource===0&&t.isTrusted?!0:Ku()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Pp(t,e){return e.get?e.get.call(t):e.value}function Lu(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Op(t,e){var n=Lu(t,e,"get");return Pp(t,n)}function Ip(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _p(t,e,n){Ip(t,e),e.set(t,n)}function kp(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function as(t,e,n){var r=Lu(t,e,"set");return kp(t,r,n),n}let Rp=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Fu(t){let e=d.useRef({isFocused:!1,observer:null});Pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=bp(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new Rp("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Np(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Fu(o),s=d.useCallback(l=>{const u=me(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Cn=null,Do=new Set,Bn=new Map,kt=!1,Po=!1;const Mp={Tab:!0,Escape:!0};function pa(t,e){for(let n of Do)n(t,e)}function Ap(t){return!(t.metaKey||!xp()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Gr(t){kt=!0,Ap(t)&&(Cn="keyboard",pa("keyboard",t))}function Re(t){Cn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(kt=!0,pa("pointer",t))}function ju(t){Dp(t)&&(kt=!0,Cn="virtual")}function zu(t){t.target===window||t.target===document||(!kt&&!Po&&(Cn="virtual",pa("virtual",t)),kt=!1,Po=!1)}function Hu(){kt=!1,Po=!0}function Oo(t){if(typeof window>"u"||Bn.get(gt(t)))return;const e=gt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){kt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Gr,!0),n.addEventListener("keyup",Gr,!0),n.addEventListener("click",ju,!0),e.addEventListener("focus",zu,!0),e.addEventListener("blur",Hu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{Bu(t)},{once:!0}),Bn.set(e,{focus:r})}const Bu=(t,e)=>{const n=gt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Gr,!0),r.removeEventListener("keyup",Gr,!0),r.removeEventListener("click",ju,!0),n.removeEventListener("focus",zu,!0),n.removeEventListener("blur",Hu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function Kp(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>Bu(t,n)}typeof document<"u"&&Kp();function Wu(){return Cn!=="pointer"}function Uu(){return Cn}const Lp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Fp(t,e,n){var r;const i=typeof window<"u"?gt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?gt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?gt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?gt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!Lp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof s&&!Mp[n.key])}function jp(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{Fp(!!(n!=null&&n.isTextInput),i,o)&&t(Wu())};return Do.add(r),()=>{Do.delete(r)}},e)}function zp(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Fu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}function qr(t){const e=me(t);if(Uu()==="virtual"){let n=e.activeElement;Tp(()=>{e.activeElement===n&&t.isConnected&&is(t)})}else is(t)}function Hp(t){const e=gt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:s}=o(t);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function Bp(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Vu(t,e){return t.nodeName!=="#comment"&&Hp(t)&&Bp(t,e)&&(!t.parentElement||Vu(t.parentElement,t))}const ss=d.createContext(null),Io="react-aria-focus-scope-restore";let ae=null;function Gu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(ss)||{},u=d.useMemo(()=>new ko({scopeRef:s}),[s]);Pe(()=>{let p=l||ue.root;if(ue.getTreeNode(p.scopeRef)&&ae&&!Yr(ae,p.scopeRef)){let g=ue.getTreeNode(ae);g&&(p=g)}p.addChild(u),ue.addNode(u)},[u,l]),Pe(()=>{let p=ue.getTreeNode(s);p&&(p.contain=!!n)},[n]),Pe(()=>{var p;let g=(p=o.current)===null||p===void 0?void 0:p.nextSibling,m=[],f=v=>v.stopPropagation();for(;g&&g!==a.current;)m.push(g),g.addEventListener(Io,f),g=g.nextSibling;return s.current=m,()=>{for(let v of m)v.removeEventListener(Io,f)}},[e]),Xp(s,r,n),Gp(s,n),Jp(s,r,n),Yp(s,i),d.useEffect(()=>{const p=me(s.current?s.current[0]:void 0).activeElement;let g=null;if(Le(p,s.current)){for(let m of ue.traverse())m.scopeRef&&Le(p,m.scopeRef.current)&&(g=m);g===ue.getTreeNode(s)&&(ae=g.scopeRef)}},[s]),Pe(()=>()=>{var p,g,m;let f=(m=(g=ue.getTreeNode(s))===null||g===void 0||(p=g.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&m!==void 0?m:null;(s===ae||Yr(s,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(s)},[s]);let c=d.useMemo(()=>Wp(s),[]),h=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(ss.Provider,{value:h},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function Wp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[0].previousElementSibling,u=Ct(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let h=c.nextNode();return!h&&o&&(c.currentNode=l,h=c.nextNode()),h&&rt(h,!0),h},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Ct(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let h=c.previousNode();return!h&&o&&(c.currentNode=l,h=c.previousNode()),h&&rt(h,!0),h},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Ct(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&rt(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Ct(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&rt(s,!0),s}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Up=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Vp=ga.join(':not([hidden]):not([tabindex="-1"]),');function Ct(t){return t[0].parentElement}function Kn(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Gp(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);Pe(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Kn(t)||u.isComposing)return;let c=o.activeElement,h=t.current;if(!h||!Le(c,h))return;let p=Ct(h),g=qe(p,{tabbable:!0},h);if(!c)return;g.currentNode=c;let m=u.shiftKey?g.previousNode():g.nextNode();m||(g.currentNode=u.shiftKey?h[h.length-1].nextElementSibling:h[0].previousElementSibling,m=u.shiftKey?g.previousNode():g.nextNode()),u.preventDefault(),m&&rt(m,!0)},s=u=>{(!ae||Yr(ae,t))&&Le(u.target,t.current)?(ae=t,n.current=u.target):Kn(t)&&!vt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):Kn(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Uu();if(!((c==="virtual"||c===null)&&Ku()&&Cp())&&o.activeElement&&Kn(t)&&!vt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var p;n.current=u.target,(p=n.current)===null||p===void 0||p.focus()}else ae.current&&_o(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),Pe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function qu(t){return vt(t)}function Le(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function vt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Le(t,n.current))return!0;return!1}function qp(t){return vt(t,ae)}function Yr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{qr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Yu(t,e=!0){let n=t[0].previousElementSibling,r=Ct(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=Ct(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function _o(t,e=!0){rt(Yu(t,e))}function Yp(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Le(r.activeElement,ae.current)&&t.current&&_o(t.current)}n.current=!1},[t])}function Xp(t,e,n){Pe(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let s=a.target;Le(s,t.current)?ae=t:qu(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function ls(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Jp(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);Pe(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||Yr(ae,t))&&Le(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[t,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Kn(t)||a.isComposing)return;let s=i.activeElement;if(!vt(s,t)||!ls(t))return;let l=ue.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=s;let h=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!h||!vt(h,t))&&u){c.currentNode=u;do h=a.shiftKey?c.previousNode():c.nextNode();while(vt(h,t));a.preventDefault(),a.stopPropagation(),h?rt(h,!0):qu(u)?rt(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=ue.getTreeNode(t);if(!s)return;let l=s.nodeToRestore;if(e&&l&&(i.activeElement&&vt(i.activeElement,t)||i.activeElement===i.body&&ls(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){us(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let h=Yu(c.scopeRef.current,!0);us(h);return}c=c.parent}}})}}}},[t,e])}function us(t){t.dispatchEvent(new CustomEvent(Io,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?Vp:Up,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Vu(o)&&(!n||Le(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Le(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function hi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Wu()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(g=>{i.current.isFocused=g,a(g),u()},[u]);jp(g=>{i.current.isFocusVisible=g,u()},[],{isTextInput:n});let{focusProps:h}=Np({isDisabled:r,onFocusChange:c}),{focusWithinProps:p}=zp({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:r?p:h}}function Qp(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return Pe(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let s=qe(t.current,{tabbable:!0});i(!!s.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let ln="default",Ro="",kr=new WeakMap;function cs(t){if(di()){if(ln==="default"){const e=Ke(t);Ro=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ln="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(kr.set(t,t.style.userSelect),t.style.userSelect="none")}function gr(t){if(di()){if(ln!=="disabled")return;ln="restoring",setTimeout(()=>{Uh(()=>{if(ln==="restoring"){const e=Ke(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Ro||""),Ro="",ln="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&kr.has(t)){let e=kr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),kr.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function Zp(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return Gh(e,t.ref),t}var vr=new WeakMap;class mr{continuePropagation(){as(this,vr,!1)}get shouldStopPropagation(){return Op(this,vr)}constructor(e,n,r,i){_p(this,vr,{writable:!0,value:void 0}),as(this,vr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,c,h=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,h=r.clientY),s&&(c!=null&&h!=null?(l=c-s.left,u=h-s.top):(l=s.width/2,u=s.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const ds=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:h,...p}=Zp(t),[g,m]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:y}=Tu(),S=De((b,R)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let N=!0;if(B.isTriggeringEvent=!0,r){let z=new mr("pressstart",R,b);r(z),N=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,m(!0),N}),w=De((b,R,B=!0)=>{let N=f.current;if(!N.didFirePressStart)return!1;N.ignoreClickAfterPress=!0,N.didFirePressStart=!1,N.isTriggeringEvent=!0;let z=!0;if(i){let E=new mr("pressend",R,b);i(E),z=E.shouldStopPropagation}if(n&&n(!1),m(!1),e&&B&&!a){let E=new mr("press",R,b);e(E),z&&(z=E.shouldStopPropagation)}return N.isTriggeringEvent=!1,z}),D=De((b,R)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let N=new mr("pressup",R,b);return o(N),B.isTriggeringEvent=!1,N.shouldStopPropagation}return!0}),x=De(b=>{let R=f.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&w(Qe(R.target,b),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,y(),c||gr(R.target))}),O=De(b=>{u&&x(b)}),P=d.useMemo(()=>{let b=f.current,R={onKeyDown(N){if(Mi(N.nativeEvent,N.currentTarget)&&N.currentTarget.contains(N.target)){var z;hs(N.target,N.key)&&N.preventDefault();let E=!0;if(!b.isPressed&&!N.repeat){b.target=N.currentTarget,b.isPressed=!0,E=S(N,"keyboard");let I=N.currentTarget,j=V=>{Mi(V,I)&&!V.repeat&&I.contains(V.target)&&b.target&&D(Qe(b.target,V),"keyboard")};v(Ke(N.currentTarget),"keyup",Vn(j,B),!0)}E&&N.stopPropagation(),N.metaKey&&It()&&((z=b.metaKeyEvents)===null||z===void 0||z.set(N.key,N.nativeEvent))}else N.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(N){if(!(N&&!N.currentTarget.contains(N.target))&&N&&N.button===0&&!b.isTriggeringEvent&&!_t.isOpening){let z=!0;if(a&&N.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||$o(N.nativeEvent))){!a&&!l&&xt(N.currentTarget);let E=S(N,"virtual"),I=D(N,"virtual"),j=w(N,"virtual");z=E&&I&&j}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,z&&N.stopPropagation()}}},B=N=>{var z;if(b.isPressed&&b.target&&Mi(N,b.target)){var E;hs(N.target,N.key)&&N.preventDefault();let j=N.target;w(Qe(b.target,N),"keyboard",b.target.contains(j)),y(),N.key!=="Enter"&&ba(b.target)&&b.target.contains(j)&&!N[ds]&&(N[ds]=!0,_t(b.target,N,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(N.key)}else if(N.key==="Meta"&&(!((z=b.metaKeyEvents)===null||z===void 0)&&z.size)){var I;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let V of j.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent<"u"){R.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(Jh(I.nativeEvent)){b.pointerType="virtual";return}Ki(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!l&&xt(I.currentTarget),c||cs(b.target),j=S(I,b.pointerType);let V=I.target;"releasePointerCapture"in V&&V.releasePointerCapture(I.pointerId),v(Ke(I.currentTarget),"pointerup",N,!1),v(Ke(I.currentTarget),"pointercancel",E,!1)}j&&I.stopPropagation()},R.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(Ki(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},R.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&D(I,b.pointerType||I.pointerType)},R.onPointerEnter=I=>{I.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,I),b.pointerType))},R.onPointerLeave=I=>{I.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,I),b.pointerType,!1),O(I))};let N=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(b.target.contains(I.target)&&b.pointerType!=null?w(Qe(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,y(),c||gr(b.target),"ontouchend"in b.target&&I.pointerType!=="mouse"&&v(b.target,"touchend",z,{once:!0}))},z=I=>{Xu(I.currentTarget)&&I.preventDefault()},E=I=>{x(I)};R.onDragStart=I=>{I.currentTarget.contains(I.target)&&x(I)}}else{R.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ki(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=$o(E.nativeEvent)?"virtual":"mouse",!a&&!l&&xt(E.currentTarget),S(E,b.pointerType)&&E.stopPropagation(),v(Ke(E.currentTarget),"mouseup",N,!1)},R.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=S(E,b.pointerType)),I&&E.stopPropagation()},R.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=w(E,b.pointerType,!1),O(E)),I&&E.stopPropagation()},R.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&D(E,b.pointerType||"mouse")};let N=E=>{if(E.button===0){if(b.isPressed=!1,y(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Ai(E,b.target)&&b.pointerType!=null?w(Qe(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};R.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let I=eg(E.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!l&&xt(E.currentTarget),c||cs(b.target),S(ut(b.target,E),b.pointerType)&&E.stopPropagation(),v(yn(E.currentTarget),"scroll",z,!0)},R.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=fs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,j=S(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,j=w(ut(b.target,E),b.pointerType,!1),O(ut(b.target,E))),j&&E.stopPropagation()},R.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=fs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)&&b.pointerType!=null?(D(ut(b.target,E),b.pointerType),j=w(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(j=w(ut(b.target,E),b.pointerType,!1)),j&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&gr(b.target),y()},R.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(ut(b.target,E)))};let z=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return R},[v,a,l,y,c,x,O,w,S,D]);return d.useEffect(()=>()=>{var b;c||gr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:s||g,pressProps:ye(p,P)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Mi(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof yn(i).HTMLInputElement&&!Ju(i,n)||i instanceof yn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function eg(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function fs(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function ut(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qe(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function tg(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function ng(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ai(t,e){let n=e.getBoundingClientRect(),r=tg(t);return ng(n,r)}function Ki(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Xu(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function hs(t,e){return t instanceof HTMLInputElement?!Ju(t,e):Xu(t)}const rg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ju(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":rg.has(t.type)}function ig({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class og{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Qu(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=De(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new og("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function ag(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Qu(o),s=d.useCallback(l=>{const u=Ke(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Tn=null,sg=new Set,Wn=new Map,Rt=!1,No=!1;function Sa(t,e){for(let n of sg)n(t,e)}function lg(t){return!(t.metaKey||!It()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Xr(t){Rt=!0,lg(t)&&(Tn="keyboard",Sa("keyboard",t))}function Ne(t){Tn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Rt=!0,Sa("pointer",t))}function Zu(t){$o(t)&&(Rt=!0,Tn="virtual")}function ec(t){t.target===window||t.target===document||(!Rt&&!No&&(Tn="virtual",Sa("virtual",t)),Rt=!1,No=!1)}function tc(){Rt=!1,No=!0}function ps(t){if(typeof window>"u"||Wn.get(yn(t)))return;const e=yn(t),n=Ke(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Rt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xr,!0),n.addEventListener("keyup",Xr,!0),n.addEventListener("click",Zu,!0),e.addEventListener("focus",ec,!0),e.addEventListener("blur",tc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{nc(t)},{once:!0}),Wn.set(e,{focus:r})}const nc=(t,e)=>{const n=yn(t),r=Ke(t);e&&r.removeEventListener("DOMContentLoaded",e),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Xr,!0),r.removeEventListener("keyup",Xr,!0),r.removeEventListener("click",Zu,!0),n.removeEventListener("focus",ec,!0),n.removeEventListener("blur",tc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Wn.delete(n))};function ug(t){const e=Ke(t);let n;return e.readyState!=="loading"?ps(t):(n=()=>{ps(t)},e.addEventListener("DOMContentLoaded",n)),()=>nc(t,n)}typeof document<"u"&&ug();function cg(){return Tn!=="pointer"}function gs(){return Tn}function rc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Qu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let Jr=!1,Li=0;function Mo(){Jr=!0,setTimeout(()=>{Jr=!1},50)}function vs(t){t.pointerType==="touch"&&Mo()}function dg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",vs):document.addEventListener("touchend",Mo),Li++,()=>{Li--,!(Li>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",vs):document.removeEventListener("touchend",Mo))}}function wa(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(dg,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(g,m)=>{if(s.pointerType=m,i||m==="touch"||s.isHovered||!g.currentTarget.contains(g.target))return;s.isHovered=!0;let f=g.currentTarget;s.target=f,e&&e({type:"hoverstart",target:f,pointerType:m}),n&&n(!0),a(!0)},h=(g,m)=>{if(s.pointerType="",s.target=null,m==="touch"||!s.isHovered)return;s.isHovered=!1;let f=g.currentTarget;r&&r({type:"hoverend",target:f,pointerType:m}),n&&n(!1),a(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Jr&&g.pointerType==="mouse"||c(g,g.pointerType)},p.onPointerLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):(p.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!s.ignoreEmulatedMouseEvents&&!Jr&&c(g,"mouse"),s.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:p,triggerHoverEnd:h}},[e,n,r,i,s]);return d.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function fg(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=De(l=>{n&&yr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),s=De(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ke(u);if(typeof PointerEvent<"u"){let h=p=>{l.isPointerDown&&yr(p,e)&&s(p),l.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",h,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",h,!0)}}else{let h=g=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&yr(g,e)&&s(g),l.isPointerDown=!1},p=g=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&yr(g,e)&&s(g),l.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",h,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",p,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",h,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",p,!0)}}},[e,r,a,s])}function yr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function ms(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function hg(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:ms(t.onKeyDown),onKeyUp:ms(t.onKeyUp)}}}const pg=500;function gg(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=pg,accessibilityDescription:a}=t;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=Tu(),{pressProps:c}=ya({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n({...p,type:"longpressstart"}),s.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...p,type:"longpress"}),s.current=void 0},o),p.pointerType==="touch")){let g=m=>{m.preventDefault()};l(p.target,"contextmenu",g,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(p.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(p){s.current&&clearTimeout(s.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r({...p,type:"longpressend"})}}),h=Xh(i&&!e?a:void 0);return{longPressProps:ye(c,h)}}const vg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yg(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return vg.has(n.script)}let e=t.split("-")[0];return mg.has(e)}const bg=Symbol.for("react-aria.i18n.locale");function ic(){let t=typeof window<"u"&&window[bg]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:yg(t)?"rtl":"ltr"}}let Ao=ic(),Ln=new Set;function ys(){Ao=ic();for(let t of Ln)t(Ao)}function Sg(){let t=$n(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Ln.size===0&&window.addEventListener("languagechange",ys),Ln.add(n),()=>{Ln.delete(n),Ln.size===0&&window.removeEventListener("languagechange",ys)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const wg=d.createContext(null);function or(){let t=Sg();return d.useContext(wg)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function oc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Eg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const $g=Symbol.for("react-aria.i18n.locale"),xg=Symbol.for("react-aria.i18n.strings");let Wt;class pi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Cg(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[$g];if(Wt===void 0){let i=window[xg];if(!i)return null;Wt={};for(let o in i)Wt[o]=new pi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Cg(t,e,n="en-US"){if(e[t])return e[t];let r=Tg(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Tg(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const bs=new Map,Ss=new Map;class Dg{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=bs.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),bs.set(o,a));let s=a.select(e);return i=n[s]||n.other,typeof i=="function"?i():i}number(e){let n=Ss.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Ss.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const ws=new WeakMap;function Pg(t){let e=ws.get(t);return e||(e=new pi(t),ws.set(t,e)),e}function Og(t,e){return e&&pi.getGlobalDictionaryForPackage(e)||Pg(t)}function Ig(t,e){let{locale:n}=or(),r=Og(t,e);return d.useMemo(()=>new Dg(n,r),[n,r])}let Fi=new Map;function _g(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const Es={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function kg(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=rc({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?e:e?{...Es,...e}:Es,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Rg(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=kg(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Qr={top:"bottom",bottom:"top",left:"right",right:"left"},Ng={top:"left",left:"top"},Ko={top:"height",left:"width"},ac={width:"totalWidth",height:"totalHeight"},br={};let fe=typeof document<"u"?window.visualViewport:null;function $s(t){let e=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=fe==null?void 0:fe.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let m=document.documentElement;r=m.clientWidth,i=m.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var h;n=(h=fe==null?void 0:fe.height)!==null&&h!==void 0?h:i,s.top=m.scrollTop||t.scrollTop,s.left=m.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=fn(t)),s.top=t.scrollTop,s.left=t.scrollLeft,r=e,i=n;if($u()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){s.top=0,s.left=0;var p;o=(p=fe==null?void 0:fe.pageTop)!==null&&p!==void 0?p:0;var g;a=(g=fe==null?void 0:fe.pageLeft)!==null&&g!==void 0?g:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function Mg(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function xs(t,e,n,r,i,o,a){var s;let l=(s=i.scroll[t])!==null&&s!==void 0?s:0,u=r[Ko[t]],c=r.scroll[Ye[t]]+o,h=u+r.scroll[Ye[t]]-o,p=e-l+a[t]-r[Ye[t]],g=e-l+n+a[t]-r[Ye[t]];return p<c?c-p:g>h?Math.max(h-g,c-p):0}function Ag(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Cs(t){if(br[t])return br[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=Ng[r];Ye[n]||(n="center");let o=Ko[r],a=Ko[i];return br[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},br[t]}function ji(t,e,n,r,i,o,a,s,l,u){let{placement:c,crossPlacement:h,axis:p,crossAxis:g,size:m,crossSize:f}=r,v={};var y;v[g]=(y=t[g])!==null&&y!==void 0?y:0;var S,w,D,x;h==="center"?v[g]+=(((S=t[f])!==null&&S!==void 0?S:0)-((w=n[f])!==null&&w!==void 0?w:0))/2:h!==g&&(v[g]+=((D=t[f])!==null&&D!==void 0?D:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[g]+=o;const O=t[g]-n[f]+l+u,P=t[g]+t[f]-l-u;if(v[g]=xo(v[g],O,P),c===p){const b=s?a[m]:e[ac[m]];v[Qr[p]]=Math.floor(b-t[p]+i)}else v[p]=Math.floor(t[p]+t[m]+i);return v}function Kg(t,e,n,r,i,o,a,s){const l=r?n.height:e[ac.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var h,p,g,m,f,v;let y=s!=="top"?Math.max(0,e.height+e.top+((h=e.scroll.top)!==null&&h!==void 0?h:0)-c-(((p=i.top)!==null&&p!==void 0?p:0)+((g=i.bottom)!==null&&g!==void 0?g:0)+o)):Math.max(0,c+a-(e.top+((m=e.scroll.top)!==null&&m!==void 0?m:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,y)}function Ts(t,e,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,c;if(a===s)return Math.max(0,n[s]-t[s]-((u=t.scroll[s])!==null&&u!==void 0?u:0)+e[s]-((c=r[s])!==null&&c!==void 0?c:0)-r[Qr[s]]-i);var h;return Math.max(0,t[l]+t[s]+t.scroll[s]-e[s]-n[s]-n[l]-((h=r[s])!==null&&h!==void 0?h:0)-r[Qr[s]]-i)}function Lg(t,e,n,r,i,o,a,s,l,u,c,h,p,g,m,f){let v=Cs(t),{size:y,crossAxis:S,crossSize:w,placement:D,crossPlacement:x}=v,O=ji(e,s,n,v,c,h,u,p,m,f),P=c,b=Ts(s,u,e,i,o+c,v);if(a&&r[y]>b){let A=Cs(`${Qr[D]} ${x}`),K=ji(e,s,n,A,c,h,u,p,m,f);Ts(s,u,e,i,o+c,A)>b&&(v=A,O=K,P=c)}let R="bottom";v.axis==="top"?v.placement==="top"?R="top":v.placement==="bottom"&&(R="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?R="bottom":v.crossPlacement==="bottom"&&(R="top"));let B=xs(S,O[S],n[w],s,l,o,u);O[S]+=B;let N=Kg(O,s,u,p,i,o,n.height,R);g&&g<N&&(N=g),n.height=Math.min(n.height,N),O=ji(e,s,n,v,P,h,u,p,m,f),B=xs(S,O[S],n[w],s,l,o,u),O[S]+=B;let z={},E=e[S]+.5*e[w]-O[S]-i[Ye[S]];const I=m/2+f;var j,V,X,M;const Y=Ye[S]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((V=i.right)!==null&&V!==void 0?V:0):((X=i.top)!==null&&X!==void 0?X:0)+((M=i.bottom)!==null&&M!==void 0?M:0),F=n[w]-Y-m/2-f,H=e[S]+m/2-(O[S]+i[Ye[S]]),k=e[S]+e[w]-m/2-(O[S]+i[Ye[S]]),_=xo(E,H,k);return z[S]=xo(_,I,F),{position:O,maxHeight:N,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:v.placement}}function Fg(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:c,arrowSize:h=0,arrowBoundaryOffset:p=0}=t,g=r instanceof HTMLElement?jg(r):document.documentElement,m=g===document.documentElement;const f=window.getComputedStyle(g).position;let v=!!f&&f!=="static",y=m?fn(n):Ds(n,g);if(!m){let{marginTop:z,marginLeft:E}=window.getComputedStyle(n);y.top+=parseInt(z,10)||0,y.left+=parseInt(E,10)||0}let S=fn(r),w=Ag(r);var D,x;S.width+=((D=w.left)!==null&&D!==void 0?D:0)+((x=w.right)!==null&&x!==void 0?x:0);var O,P;S.height+=((O=w.top)!==null&&O!==void 0?O:0)+((P=w.bottom)!==null&&P!==void 0?P:0);let b=Mg(i),R=$s(s),B=$s(g),N=s.tagName==="BODY"?fn(g):Ds(g,s);return g.tagName==="HTML"&&s.tagName==="BODY"&&(B.scroll.top=0,B.scroll.left=0),Lg(e,y,S,b,w,o,a,R,B,N,l,u,v,c,h,p)}function fn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:e+o-s,left:n+a-l,width:r,height:i}}function Ds(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=fn(t);let i=fn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function jg(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ps(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ps(e);)e=e.parentElement;return e||document.documentElement}function Ps(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const zg=new WeakMap;function Hg(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||zg.get(e.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let le=typeof document<"u"?window.visualViewport:null;function Bg(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:h=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:m,maxHeight:f,arrowBoundaryOffset:v=0}=t,[y,S]=d.useState(null),w=[p,a,i.current,r.current,o.current,s,l,u,c,h,g,e,f,v,n],D=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{g&&(D.current=le==null?void 0:le.scale)},[g]);let x=d.useCallback(()=>{if(p===!1||!g||!i.current||!r.current||!u||(le==null?void 0:le.scale)!==D.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var N;let M=(N=document.activeElement)===null||N===void 0?void 0:N.getBoundingClientRect(),Y=o.current.getBoundingClientRect();var z;if(B={type:"top",offset:((z=M==null?void 0:M.top)!==null&&z!==void 0?z:0)-Y.top},B.offset>Y.height/2){B.type="bottom";var E;B.offset=((E=M==null?void 0:M.bottom)!==null&&E!==void 0?E:0)-Y.bottom}}let I=i.current;if(!f&&i.current){var j;I.style.top="0px",I.style.bottom="";var V;I.style.maxHeight=((V=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&V!==void 0?V:window.innerHeight)+"px"}let X=Fg({placement:Ug(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:h,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(X.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(X.position).forEach(M=>I.style[M]=X.position[M]+"px"),I.style.maxHeight=X.maxHeight!=null?X.maxHeight+"px":"",B&&document.activeElement&&o.current){let M=document.activeElement.getBoundingClientRect(),Y=o.current.getBoundingClientRect(),F=M[B.type]-Y[B.type];o.current.scrollTop+=F-B.offset}S(X)}},w);pe(x,w),Wg(x),Xa({ref:i,onResize:x}),Xa({ref:r,onResize:x});let O=d.useRef(!1);pe(()=>{let B,N=()=>{O.current=!0,clearTimeout(B),B=setTimeout(()=>{O.current=!1},500),x()},z=()=>{O.current&&N()};return le==null||le.addEventListener("resize",N),le==null||le.addEventListener("scroll",z),()=>{le==null||le.removeEventListener("resize",N),le==null||le.removeEventListener("scroll",z)}},[x]);let P=d.useCallback(()=>{O.current||m==null||m()},[m,O]);Hg({triggerRef:r,isOpen:g,onClose:m&&P});var b,R;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...y==null?void 0:y.position,maxHeight:(b=y==null?void 0:y.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(R=y==null?void 0:y.placement)!==null&&R!==void 0?R:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:y==null?void 0:y.arrowOffsetLeft,top:y==null?void 0:y.arrowOffsetTop}},updatePosition:x}}function Wg(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Ug(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ze=[];function Vg(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=t;d.useEffect(()=>(i&&Ze.push(e),()=>{let m=Ze.indexOf(e);m>=0&&Ze.splice(m,1)}),[i,e]);let l=()=>{Ze[Ze.length-1]===e&&n&&n()},u=m=>{(!s||s(m.target))&&Ze[Ze.length-1]===e&&(m.stopPropagation(),m.preventDefault())},c=m=>{(!s||s(m.target))&&(Ze[Ze.length-1]===e&&(m.stopPropagation(),m.preventDefault()),l())},h=m=>{m.key==="Escape"&&!a&&!m.nativeEvent.isComposing&&(m.stopPropagation(),m.preventDefault(),l())};fg({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=rc({isDisabled:!r,onBlurWithin:m=>{!m.relatedTarget||qp(m.relatedTarget)||(!s||s(m.relatedTarget))&&(n==null||n())}}),g=m=>{m.target===m.currentTarget&&m.preventDefault()};return{overlayProps:{onKeyDown:h,...p},underlayProps:{onPointerDown:g}}}const zi=typeof document<"u"&&window.visualViewport,Gg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Sr=0,Hi;function qg(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return Sr++,Sr===1&&(di()?Hi=Xg():Hi=Yg()),()=>{Sr--,Sr===0&&Hi()}},[e])}function Yg(){return Vn(un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"))}function Xg(){let t,e,n=u=>{t=Du(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=un(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;Jg(c)&&(s(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",zi&&(zi.height<window.innerHeight?requestAnimationFrame(()=>{Os(c)}):zi.addEventListener("resize",()=>Os(c),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,h=window.pageYOffset;a=Vn(_n(window,"scroll",u),un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"),un(document.body,"marginTop",`-${h}px`),()=>{window.scrollTo(c,h)}),window.scrollTo(0,0)},l=Vn(_n(document,"touchstart",n,{passive:!1,capture:!0}),_n(document,"touchmove",r,{passive:!1,capture:!0}),_n(document,"touchend",i,{passive:!1,capture:!0}),_n(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),l()}}function un(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function _n(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Os(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Du(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function Jg(t){return t instanceof HTMLInputElement&&!Gg.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var sc={};sc={dismiss:"تجاهل"};var lc={};lc={dismiss:"Отхвърляне"};var uc={};uc={dismiss:"Odstranit"};var cc={};cc={dismiss:"Luk"};var dc={};dc={dismiss:"Schließen"};var fc={};fc={dismiss:"Απόρριψη"};var hc={};hc={dismiss:"Dismiss"};var pc={};pc={dismiss:"Descartar"};var gc={};gc={dismiss:"Lõpeta"};var vc={};vc={dismiss:"Hylkää"};var mc={};mc={dismiss:"Rejeter"};var yc={};yc={dismiss:"התעלם"};var bc={};bc={dismiss:"Odbaci"};var Sc={};Sc={dismiss:"Elutasítás"};var wc={};wc={dismiss:"Ignora"};var Ec={};Ec={dismiss:"閉じる"};var $c={};$c={dismiss:"무시"};var xc={};xc={dismiss:"Atmesti"};var Cc={};Cc={dismiss:"Nerādīt"};var Tc={};Tc={dismiss:"Lukk"};var Dc={};Dc={dismiss:"Negeren"};var Pc={};Pc={dismiss:"Zignoruj"};var Oc={};Oc={dismiss:"Descartar"};var Ic={};Ic={dismiss:"Dispensar"};var _c={};_c={dismiss:"Revocare"};var kc={};kc={dismiss:"Пропустить"};var Rc={};Rc={dismiss:"Zrušiť"};var Nc={};Nc={dismiss:"Opusti"};var Mc={};Mc={dismiss:"Odbaci"};var Ac={};Ac={dismiss:"Avvisa"};var Kc={};Kc={dismiss:"Kapat"};var Lc={};Lc={dismiss:"Скасувати"};var Fc={};Fc={dismiss:"取消"};var jc={};jc={dismiss:"關閉"};var zc={};zc={"ar-AE":sc,"bg-BG":lc,"cs-CZ":uc,"da-DK":cc,"de-DE":dc,"el-GR":fc,"en-US":hc,"es-ES":pc,"et-EE":gc,"fi-FI":vc,"fr-FR":mc,"he-IL":yc,"hr-HR":bc,"hu-HU":Sc,"it-IT":wc,"ja-JP":Ec,"ko-KR":$c,"lt-LT":xc,"lv-LV":Cc,"nb-NO":Tc,"nl-NL":Dc,"pl-PL":Pc,"pt-BR":Oc,"pt-PT":Ic,"ro-RO":_c,"ru-RU":kc,"sk-SK":Rc,"sl-SI":Nc,"sr-SP":Mc,"sv-SE":Ac,"tr-TR":Kc,"uk-UA":Lc,"zh-CN":Fc,"zh-TW":jc};function Qg(t){return t&&t.__esModule?t.default:t}function Is(t){let{onDismiss:e,...n}=t,r=Ig(Qg(zc),"@react-aria/overlays"),i=sa(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Rg,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let kn=new WeakMap,Ie=[];function Zg(t,e=document.body){let n=new Set(t),r=new Set,i=l=>{for(let p of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(p);let u=p=>{if(n.has(p)||p.parentElement&&r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let g of n)if(p.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),h=u(l);if(h===NodeFilter.FILTER_ACCEPT&&o(l),h!==NodeFilter.FILTER_REJECT){let p=c.nextNode();for(;p!=null;)o(p),p=c.nextNode()}},o=l=>{var u;let c=(u=kn.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),kn.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let s={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ie.push(s),()=>{a.disconnect();for(let l of r){let u=kn.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),kn.delete(l)):kn.set(l,u-1))}s===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(s),1)}}function ev(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=t,{overlayProps:l,underlayProps:u}=Vg({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:h,placement:p}=Bg({...s,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return qg({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return Zg([r.current])},[i,e.isOpen,r]),{popoverProps:ye(l,c),arrowProps:h,underlayProps:u,placement:p}}const tv=d.createContext({});function nv(){var t;return(t=d.useContext(tv))!==null&&t!==void 0?t:{}}const rv=d.createContext(null);function iv(t){let e=$n(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=nv();if(!t.portalContainer&&s&&(n=s()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(Gu,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(rv.Provider,{value:a},d.createElement(ig,null,l)),jt.createPortal(l,n)}function Lo(t){return Fh()?t.altKey:t.ctrlKey}const ov=1e3;function av(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=sv(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},ov)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function sv(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Hc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:h=!1,isVirtualized:p,scrollRef:g=r,linkBehavior:m="action"}=t,{direction:f}=or(),v=fi(),y=E=>{var I;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((I=r.current)===null||I===void 0)&&I.contains(E.target)))return;const j=(L,J)=>{if(L!=null){if(e.isLink(L)&&m==="selection"&&l&&!Lo(E)){var te;jt.flushSync(()=>{e.setFocusedKey(L,J)});let de=(te=g.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(L.toString())}"]`),ce=e.getItemProps(L);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(L,J),e.isLink(L)&&m==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&!Lo(E)&&e.replaceSelection(L)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var V,X,M;let L=e.focusedKey!=null?(V=n.getKeyBelow)===null||V===void 0?void 0:V.call(n,e.focusedKey):(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n);L==null&&o&&(L=(M=n.getFirstKey)===null||M===void 0?void 0:M.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),j(L))}break;case"ArrowUp":if(n.getKeyAbove){var Y,F,H;let L=e.focusedKey!=null?(Y=n.getKeyAbove)===null||Y===void 0?void 0:Y.call(n,e.focusedKey):(F=n.getLastKey)===null||F===void 0?void 0:F.call(n);L==null&&o&&(L=(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),j(L))}break;case"ArrowLeft":if(n.getKeyLeftOf){var k,_,A;let L=e.focusedKey!=null?(k=n.getKeyLeftOf)===null||k===void 0?void 0:k.call(n,e.focusedKey):null;L==null&&o&&(L=f==="rtl"?(_=n.getFirstKey)===null||_===void 0?void 0:_.call(n,e.focusedKey):(A=n.getLastKey)===null||A===void 0?void 0:A.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),j(L,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var K,W,U;let L=e.focusedKey!=null?(K=n.getKeyRightOf)===null||K===void 0?void 0:K.call(n,e.focusedKey):null;L==null&&o&&(L=f==="rtl"?(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,e.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),j(L,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let L=n.getFirstKey(e.focusedKey,rn(E));e.setFocusedKey(L),L!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&e.replaceSelection(L))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let L=n.getLastKey(e.focusedKey,rn(E));e.setFocusedKey(L),L!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&e.replaceSelection(L))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let L=n.getKeyPageBelow(e.focusedKey);L!=null&&(E.preventDefault(),j(L))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let L=n.getKeyPageAbove(e.focusedKey);L!=null&&(E.preventDefault(),j(L))}break;case"a":rn(E)&&e.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!h){if(E.shiftKey)r.current.focus();else{let L=qe(r.current,{tabbable:!0}),J,te;do te=L.lastChild(),te&&(J=te);while(te);J&&!J.contains(document.activeElement)&&xt(J)}break}}},S=d.useRef({top:0,left:0});fr(g,"scroll",p?void 0:()=>{var E,I,j,V;S.current={top:(j=(E=g.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(V=(I=g.current)===null||I===void 0?void 0:I.scrollLeft)!==null&&V!==void 0?V:0}});let w=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var I,j;let M=F=>{F!=null&&(e.setFocusedKey(F),l&&e.replaceSelection(F))},Y=E.relatedTarget;var V,X;Y&&E.currentTarget.compareDocumentPosition(Y)&Node.DOCUMENT_POSITION_FOLLOWING?M((V=e.lastSelectedKey)!==null&&V!==void 0?V:(I=n.getLastKey)===null||I===void 0?void 0:I.call(n)):M((X=e.firstSelectedKey)!==null&&X!==void 0?X:(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n))}else!p&&g.current&&(g.current.scrollTop=S.current.top,g.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&g.current){let M=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);M&&(M.contains(document.activeElement)||xt(M),gs()==="keyboard"&&Qa(M,{containingElement:r.current}))}}},D=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);fr(r,Zh,c?E=>{let{detail:I}=E;E.stopPropagation(),e.setFocused(!0),(I==null?void 0:I.focusStrategy)==="first"&&(x.current=!0)}:void 0);let O=De(()=>{var E,I;let j=(I=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&I!==void 0?I:null;if(j==null){var V;(V=r.current)===null||V===void 0||V.dispatchEvent(new CustomEvent(Ou,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(j),x.current=!1});Ya(()=>{x.current&&O()},[e.collection,O]);let P=De(()=>{e.collection.size>0&&(x.current=!1)});Ya(()=>{P()},[e.focusedKey,P]),fr(r,Qh,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,I;let X=null;var j;i==="first"&&(X=(j=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&j!==void 0?j:null);var V;i==="last"&&(X=(V=(I=n.getLastKey)===null||I===void 0?void 0:I.call(n))!==null&&V!==void 0?V:null);let M=e.selectedKeys;if(M.size){for(let Y of M)if(e.canSelectItem(Y)){X=Y;break}}e.setFocused(!0),e.setFocusedKey(X),X==null&&!c&&r.current&&qr(r.current)}},[]);let R=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==R.current||b.current)&&g.current&&r.current){let E=gs(),I=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!I)return;(E==="keyboard"||b.current)&&(Pu(g.current,I),E!=="virtual"&&Qa(I,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&R.current!=null&&r.current&&qr(r.current),R.current=e.focusedKey,b.current=!1}),fr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let B={onKeyDown:y,onFocus:w,onBlur:D,onMouseDown(E){g.current===E.target&&E.preventDefault()}},{typeSelectProps:N}=av({keyboardDelegate:n,selectionManager:e});u||(B=ye(N,B));let z;return c?z=-1:z=e.focusedKey==null?0:-1,{collectionProps:{...B,tabIndex:z}}}function Bc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:h="action"}=t,p=fi();e=tr(e);let g=M=>{if(M.pointerType==="keyboard"&&Lo(M))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(h==="selection"&&i.current){let Y=n.getItemProps(r);p.open(i.current,M,Y.href,Y.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(h==="override"||h==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):M&&M.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||M&&(rn(M)||M.pointerType==="touch"||M.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)s?s():document.activeElement!==i.current&&i.current&&qr(i.current);else{var Y;let F=new CustomEvent(Ou,{cancelable:!0,bubbles:!0});(Y=i.current)===null||Y===void 0||Y.dispatchEvent(F)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let m={};!a&&!l?m={tabIndex:r===n.focusedKey?0:-1,onFocus(M){M.target===i.current&&n.setFocusedKey(r)}}:l&&(m.onMouseDown=M=>{M.preventDefault()});let f=n.isLink(r)&&h==="override",v=n.isLink(r)&&h!=="selection"&&h!=="none",y=!l&&n.canSelectItem(r)&&!f,S=(u||v)&&!l,w=S&&(n.selectionBehavior==="replace"?!y:!y||n.isEmpty),D=S&&y&&n.selectionBehavior==="replace",x=w||D,O=d.useRef(null),P=x&&y,b=d.useRef(!1),R=d.useRef(!1),B=M=>{if(u&&u(),v&&i.current){let Y=n.getItemProps(r);p.open(i.current,M,Y.href,Y.routerOptions)}},N={};o?(N.onPressStart=M=>{O.current=M.pointerType,b.current=P,M.pointerType==="keyboard"&&(!x||ks())&&g(M)},c?(N.onPressUp=w?void 0:M=>{M.pointerType==="mouse"&&y&&g(M)},N.onPress=w?B:M=>{M.pointerType!=="keyboard"&&M.pointerType!=="mouse"&&y&&g(M)}):N.onPress=M=>{if(w||D&&M.pointerType!=="mouse"){if(M.pointerType==="keyboard"&&!_s())return;B(M)}else M.pointerType!=="keyboard"&&y&&g(M)}):(N.onPressStart=M=>{O.current=M.pointerType,b.current=P,R.current=w,y&&(M.pointerType==="mouse"&&!w||M.pointerType==="keyboard"&&(!S||ks()))&&g(M)},N.onPress=M=>{(M.pointerType==="touch"||M.pointerType==="pen"||M.pointerType==="virtual"||M.pointerType==="keyboard"&&x&&_s()||M.pointerType==="mouse"&&R.current)&&(x?B(M):y&&g(M))}),m["data-key"]=r,N.preventFocusOnPress=a;let{pressProps:z,isPressed:E}=ya(N),I=D?M=>{O.current==="mouse"&&(M.stopPropagation(),M.preventDefault(),B(M))}:void 0,{longPressProps:j}=gg({isDisabled:!P,onLongPress(M){M.pointerType==="touch"&&(g(M),n.setSelectionBehavior("toggle"))}}),V=M=>{O.current==="touch"&&b.current&&M.preventDefault()},X=n.isLink(r)?M=>{_t.isOpening||M.preventDefault()}:void 0;return{itemProps:ye(m,y||w?z:{},P?j:{},{onDoubleClick:I,onDragStartCapture:V,onClick:X,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:y,hasAction:x}}function _s(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function ks(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Rs{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class lv{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Rs(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Rs(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function uv(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,s=_g({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new lv({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:c}=Hc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Wc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function cv(t){return dv(t)}function dv(t,e){for(let n of t)return n}function Bi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ns(t,e),e],i=[...Ns(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ns(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ms=new WeakMap;function fv(t){let e=Ms.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Wc(o,t)):n++};return r(t),Ms.set(t,n),n}const Uc=new WeakMap;function hv(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Be(t,{labelable:!0}),{listProps:l}=uv({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Uc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function pv(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:h,onPressEnd:p,onHoverStart:g,onHoverChange:m,onHoverEnd:f,onKeyDown:v,onKeyUp:y,onFocus:S,onFocusChange:w,onBlur:D,selectionManager:x=e.selectionManager}=t,O=!!s,P=O&&t["aria-expanded"]==="true";var b;let R=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var B;let N=(B=t.isSelected)!==null&&B!==void 0?B:x.isSelected(i),z=Uc.get(e),E=e.collection.getItem(i),I=t.onClose||z.onClose,j=fi(),V=re=>{var Ue;if(!O){if(!(E==null||(Ue=E.props)===null||Ue===void 0)&&Ue.onAction?E.props.onAction():t.onAction&&t.onAction(i),z.onAction){let st=z.onAction;st(i)}re.target instanceof HTMLAnchorElement&&E&&j.open(re.target,re,E.props.href,E.props.routerOptions)}},X="menuitem";O||(x.selectionMode==="single"?X="menuitemradio":x.selectionMode==="multiple"&&(X="menuitemcheckbox"));let M=_i(),Y=_i(),F=_i(),H={id:r,"aria-disabled":R||void 0,role:X,"aria-label":t["aria-label"],"aria-labelledby":M,"aria-describedby":[Y,F].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!O&&(H["aria-checked"]=N),a&&(H["aria-posinset"]=E==null?void 0:E.index,H["aria-setsize"]=fv(e.collection));let k=re=>{re.pointerType==="keyboard"&&V(re),l==null||l(re)},_=()=>{!O&&I&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&I()},A=re=>{re.pointerType==="mouse"&&(V(re),_()),u==null||u(re)},K=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(V(re),_()),c==null||c(re)},{itemProps:W,isFocused:U}=Bc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:z.shouldUseVirtualFocus}),{pressProps:L,isPressed:J}=ya({onPressStart:k,onPress:K,onPressUp:A,onPressChange:h,onPressEnd:p,isDisabled:R}),{hoverProps:te}=wa({isDisabled:R,onHoverStart(re){!cg()&&!(P&&s==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),g==null||g(re)},onHoverChange:m,onHoverEnd:f}),{keyboardProps:de}=hg({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!R&&x.selectionMode==="none"&&!O&&o!==!1&&I&&I();break;case"Enter":!R&&o!==!1&&!O&&I&&I();break;default:O||re.continuePropagation(),v==null||v(re);break}},onKeyUp:y}),{focusProps:ce}=ag({onBlur:D,onFocus:S,onFocusChange:w}),oe=Be(E==null?void 0:E.props);delete oe.id;let ge=Cu(E==null?void 0:E.props);return{menuItemProps:{...H,...ye(oe,ge,O?{onFocus:W.onFocus,"data-key":W["data-key"]}:W,L,te,de,ce),tabIndex:W.tabIndex!=null&&P?-1:W.tabIndex},labelProps:{id:M},descriptionProps:{id:Y},keyboardShortcutProps:{id:F},isFocused:U,isSelected:N,isPressed:J,isDisabled:R}}function gv(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function vv(t){let e=Be(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Vc=new WeakMap;function Zr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Vc.get(t)}-${n}-${e}`):""}function mv(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:s}=e,l=r===s,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:h}=Bc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),p=Zr(e,r,"tab"),g=Zr(e,r,"tabpanel"),{tabIndex:m}=c,f=e.collection.getItem(r),v=Be(f==null?void 0:f.props,{labelable:!0});delete v.id;let y=Cu(f==null?void 0:f.props);return{tabProps:ye(v,y,c,{id:p,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?g:void 0,tabIndex:u?void 0:m,role:"tab"}),isSelected:l,isDisabled:u,isPressed:h}}function yv(t,e,n){let r=Qp(n)?void 0:0;var i;const o=Zr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=sa({...t,id:o,"aria-labelledby":Zr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class bv{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function Sv(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:s}=e,{direction:l}=or(),u=d.useMemo(()=>new bv(o,l,r,s),[o,s,r,l]),{collectionProps:c}=Hc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),h=tr();Vc.set(e,h);let p=sa({...t,id:h});return{tabListProps:{...ye(c,p),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const wv=d.createContext({});function Ev(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class $v{build(e,n){return this.context=n,As(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,S=>{v.push(S)});var o;let y=(o=e.index)!==null&&o!==void 0?o:0;for(const S of v)yield*this.getFullNode({element:S,index:y++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let D=a.type;throw new Error(`Unknown element <${D}> in collection.`)}let y=v.getCollectionNode(a.props,this.context);var s;let S=(s=e.index)!==null&&s!==void 0?s:0,w=y.next();for(;!w.done&&w.value;){let D=w.value;e.index=S;var l;let x=(l=D.key)!==null&&l!==void 0?l:null;x==null&&(x=D.element?null:this.getKey(a,e,n,r));let P=[...this.getFullNode({...D,key:x,index:S,wrapper:xv(e.wrapper,D.wrapper)},this.getChildState(n,D),r?`${r}${a.key}`:a.key,i)];for(let b of P){var u,c;b.value=(c=(u=D.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var h;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Wi(b.type)}> in <${Wi((h=i==null?void 0:i.type)!==null&&h!==void 0?h:"unknown parent type")}>. Only <${Wi(e.type)}> is supported.`);S++,yield b}w=y.next(P)}return}if(e.key==null||e.type==null)return;let p=this;var g,m;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(g=e.value)!==null&&g!==void 0?g:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(m=e.textValue)!==null&&m!==void 0?m:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:As(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let y of e.childNodes()){y.key!=null&&(y.key=`${f.key}${y.key}`);let S=p.getFullNode({...y,index:v},p.getChildState(n,y),f.key,f);for(let w of S)v++,yield w}})};yield f}constructor(){this.cache=new WeakMap}}function As(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function xv(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Wi(t){return t[0].toUpperCase()+t.slice(1)}function Gc(t,e,n){let r=d.useMemo(()=>new $v,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,a,n,e])}function Cv(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Tv(t){return Dv(t)}function Dv(t,e){for(let n of t)return n}function Ui(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ks(t,e),e],i=[...Ks(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ks(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Pv(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>h(e,new Map)),{items:s,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function h(f=[],v,y){return f==null&&(f=[]),{items:f.map(S=>{let w={key:r(S),parentKey:y,value:S,children:null};return w.children=h(i(S),v,w.key).items,v.set(w.key,w),w}),nodeMap:v}}function p(f,v,y,S){let w=S.get(v);if(!w)return{items:f,nodeMap:S};let D=new Map(S),x=y(w);for(x==null?m(w,D):g(x,D);w&&w.parentKey;){let P=D.get(w.parentKey),b={key:P.key,parentKey:P.parentKey,value:P.value,children:null},R=P.children;x==null&&R&&(R=R.filter(B=>B!==w));var O;b.children=(O=R==null?void 0:R.map(B=>B===w?x:B))!==null&&O!==void 0?O:null,D.set(b.key,b),x=b,w=P}return x==null&&(f=f.filter(P=>P!==w)),{items:f.map(P=>P===w?x:P),nodeMap:D}}function g(f,v){if(v.set(f.key,f),f.children)for(let y of f.children)g(y,v)}function m(f,v){if(v.delete(f.key),f.children)for(let y of f.children)m(y,v)}return{items:s,selectedKeys:u,setSelectedKeys:c,getItem(f){return l.get(f)},insert(f,v,...y){a(({items:S,nodeMap:w})=>{let{items:D,nodeMap:x}=h(y,w,f);return f==null?{items:[...S.slice(0,v),...D,...S.slice(v)],nodeMap:x}:p(S,f,O=>({key:O.key,parentKey:O.parentKey,value:O.value,children:[...O.children.slice(0,v),...D,...O.children.slice(v)]}),x)})},insertBefore(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),D=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,D,...v)},insertAfter(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),D=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,D+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,s.length,...v);else{let y=l.get(f);if(!y)return;this.insert(f,y.children.length,...v)}},remove(...f){if(f.length===0)return;let v=s,y=l,S;for(let D of f)S=p(v,D,()=>null,y),y=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let D of u)S.nodeMap.has(D)||w.delete(D);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,y){a(({items:S,nodeMap:w})=>{let D=w.get(f);if(!D)return{items:S,nodeMap:w};let{items:x,nodeMap:O}=p(S,f,()=>null,w);const P={...D,parentKey:v};return v==null?(O.set(P.key,P),{items:[...x.slice(0,y),P,...x.slice(y)],nodeMap:O}):p(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,y),P,...b.children.slice(y)]}),O)})},update(f,v){a(({items:y,nodeMap:S})=>p(y,f,w=>{let D={key:w.key,parentKey:w.parentKey,value:v,children:null},x=h(i(v),S,D.key);return D.children=x.items,D},S))}}}class Ls{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)n(s)};for(let a of e)n(a);let r=null,i=0;for(let[a,s]of this.keyMap)r?(r.nextKey=a,s.prevKey=r.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class qc extends Set{constructor(e,n,r){super(e),e instanceof qc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Ov(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Yc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>Fs(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Fs(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(y(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,D="first"){l.current=w,u.current=D,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!Ov(w,g))&&m(w)},disabledKeys:f,disabledBehavior:o}}function Fs(t,e){return t?t==="all"?"all":new tt(t):e}let Xc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Ui(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=Tv(Cv(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Iv(t){let{filter:e,layoutDelegate:n}=t,r=Yc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new Ls(e(c)):new Ls(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Gc(t,o,a),l=d.useMemo(()=>new Xc(s,r,{layoutDelegate:n}),[s,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)&&u.current){const y=u.current.getItem(r.focusedKey),S=[...u.current.getKeys()].map(b=>{const R=u.current.getItem(b);return(R==null?void 0:R.type)==="item"?R:null}).filter(b=>b!==null),w=[...s.getKeys()].map(b=>{const R=s.getItem(b);return(R==null?void 0:R.type)==="item"?R:null}).filter(b=>b!==null);var c,h;const D=((c=S==null?void 0:S.length)!==null&&c!==void 0?c:0)-((h=w==null?void 0:w.length)!==null&&h!==void 0?h:0);var p,g,m;let x=Math.min(D>1?Math.max(((p=y==null?void 0:y.index)!==null&&p!==void 0?p:0)-D+1,0):(g=y==null?void 0:y.index)!==null&&g!==void 0?g:0,((m=w==null?void 0:w.length)!==null&&m!==void 0?m:0)-1),O=null,P=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){O=w[x];break}if(x<w.length-1&&!P)x++;else{P=!0;var f,v;x>((f=y==null?void 0:y.index)!==null&&f!==void 0?f:0)&&(x=(v=y==null?void 0:y.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(O?O.key:null)}u.current=s},[s,l,r,r.focusedKey]),{collection:s,disabledKeys:i,selectionManager:l}}function _v(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:s}=Iv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let h=(c=u.values().next().value)!==null&&c!==void 0?c:null;h===n&&t.onSelectionChange&&t.onSelectionChange(h),r(h)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:s,selectedKey:n,setSelectedKey:r,selectedItem:l}}function kv(t){var e,n;let r=_v({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:js(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,s=d.useRef(a);return d.useEffect(()=>{let l=a;(i.isEmpty||l==null||!o.getItem(l))&&(l=js(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==s.current)&&i.setFocusedKey(l),s.current=l}),{...r,isDisabled:t.isDisabled||!1}}function js(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Rv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of e)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function Nv(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Yc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Gc(t,d.useCallback(l=>new Rv(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(Mv(n,l))},setExpandedKeys:r,selectionManager:new Xc(a,i)}}function Mv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Av=d.createContext(null),Kv=d.createContext(null),Jc={CollectionRoot({collection:t,renderDropIndicator:e}){return zs(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return zs(t,e,n)}};function zs(t,e,n){return ku({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=t.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const gi=d.createContext(Jc);function Qc(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Lv=d.createContext({}),Zc=d.createContext({}),Fv=fa("separator",function(e,n){[e,n]=ir(e,n,Zc);let{elementType:r,orientation:i,style:o,className:a}=e,s=r||"hr";s==="hr"&&i==="vertical"&&(s="div");let{separatorProps:l}=vv({elementType:r,orientation:i});return d.createElement(s,{...Be(e),...l,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),jv=d.createContext({placement:"bottom"}),zv=d.createContext(null),Hv=d.forwardRef(function(e,n){[e,n]=ir(e,n,zv);let r=d.useContext(nm),i=Ev(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=tp(n,o.isOpen)||e.isExiting||!1;if(sp()){let l=e.children;return typeof l=="function"&&(l=l({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!a?null:d.createElement(Bv,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function Bv({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:h}=ev({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},t),p=r.popoverRef,g=ep(p,!!h)||r.isEntering||!1,m=yt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:g,isExiting:e}}),f={...l.style,...m.style};return d.createElement(iv,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Be(r),l),...m,ref:p,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":h,"data-entering":g||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Is,{onDismiss:t.close}),d.createElement(jv.Provider,{value:{...c,placement:h,ref:i}},m.children),d.createElement(Is,{onDismiss:t.close})))}const Wv=d.createContext({});class ze extends Set{constructor(e,n,r){super(e),e instanceof ze?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Uv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Vv(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>Hs(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Hs(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(y(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,D="first"){l.current=w,u.current=D,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!Uv(w,g))&&m(w)},disabledKeys:f,disabledBehavior:o}}function Hs(t,e){return t?t==="all"?"all":new ze(t):e}class Gv{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ze([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ze(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Bi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new ze(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new ze([n],n,n):new ze;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new ze;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=cv(Wc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ze)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const qv=d.createContext(null),Ea=d.createContext(null),Yv=d.createContext(null),ei=d.createContext(null),Xv=d.createContext(null),Jv=d.forwardRef(function(e,n){return[e,n]=ir(e,n,qv),d.createElement(Nu,{content:d.createElement(Mu,e)},r=>r.size>0&&d.createElement(Qv,{props:e,collection:r,menuRef:n}))});function Qv({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Av)||{};n=xn(d.useMemo(()=>wu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),s=Nv({...t,collection:a,children:void 0}),l=d.useContext(Yv),{isVirtualized:u,CollectionRoot:c}=d.useContext(gi),{menuProps:h}=hv({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},s,n),p=yt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Gu,null,d.createElement("div",{...Be(t),...h,...p,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[Ea,s],[Zc,{elementType:"div"}],[Kv,{name:"MenuSection",render:em}],[Xv,{parentMenuRef:n}],[Fo,null],[ei,s.selectionManager]]},d.createElement(c,{collection:s.collection,persistedKeys:Qc(s.selectionManager.focusedKey),scrollRef:n}))))}class Zv extends Gv{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function em(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Ea),{CollectionBranch:s}=d.useContext(gi),[l,u]=np();var c;let{headingProps:h,groupProps:p}=gv({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),g=yt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),m=d.useContext(ei),f=Vv(t),v=t.selectionMode!=null?new Zv(m,f):m;return d.createElement("section",{...Be(t),...p,...g,ref:e},d.createElement(rr,{values:[[Lv,{...h,ref:l}],[ei,v]]},d.createElement(s,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),tm=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=la(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(Ea),s=xn(n),l=d.useContext(ei),{menuItemProps:u,labelProps:c,descriptionProps:h,keyboardShortcutProps:p,...g}=pv({...e,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:m,focusProps:f}=hi(),{hoverProps:v,isHovered:y}=wa({isDisabled:g.isDisabled}),S=yt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...g,isHovered:y,isFocusVisible:m,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...ye(u,f,v),...S,ref:s,"data-disabled":g.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":g.isFocused||void 0,"data-focus-visible":m||void 0,"data-pressed":g.isPressed||void 0,"data-selected":g.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[wv,{slots:{label:c,description:h}}],[Wv,p]]},S.children))}),nm=d.createContext(null),vi=d.createContext(null),bn=d.createContext(null),rm=d.forwardRef(function(e,n){[e,n]=ir(e,n,vi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(Nu,{content:r},o=>d.createElement(im,{props:e,collection:o,tabsRef:n}))});function im({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=kv({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:s}=hi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:s}),[r,a,s]),u=yt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...Be(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[vi,t],[bn,i]]},u.children))}const om=d.forwardRef(function(e,n){return d.useContext(bn)?d.createElement(am,{props:e,forwardedRef:n}):d.createElement(Mu,e)});function am({props:t,forwardedRef:e}){let n=d.useContext(bn),{CollectionRoot:r}=d.useContext(gi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=la(vi),a=xn(e),{tabListProps:s}=Sv({...t,orientation:i,keyboardActivation:o},n,a),l=yt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Be(t);return delete u.id,d.createElement("div",{...u,...s,ref:a,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:Qc(n.selectionManager.focusedKey)}))}const sm=fa("item",(t,e,n)=>{let r=d.useContext(bn),i=xn(e),{tabProps:o,isSelected:a,isDisabled:s,isPressed:l}=mv({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:h}=hi(),{hoverProps:p,isHovered:g}=wa({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),m=yt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:s,isFocused:c,isFocusVisible:h,isPressed:l,isHovered:g}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,p,m),ref:i,"data-selected":a||void 0,"data-disabled":s||void 0,"data-focused":c||void 0,"data-focus-visible":h||void 0,"data-pressed":l||void 0,"data-hovered":g||void 0})}),lm=ap(function(e,n){const r=d.useContext(bn);let i=xn(n),{tabPanelProps:o}=yv(e,r,i),{focusProps:a,isFocused:s,isFocusVisible:l}=hi(),u=r.selectedKey===e.id,c=yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:s,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let h=Be(e);delete h.id;let p=u?ye(h,o,a,c):c;return d.createElement("div",{...p,ref:i,"data-focused":s||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[vi,null],[bn,null]]},d.createElement(gi.Provider,{value:Jc},c.children)))}),ed=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),s=u=>{n==null||n(u)},l=d.useRef(null);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"c__dropdown-menu-trigger",ref:l,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),T.jsx(Hv,{triggerRef:l,style:{marginTop:"0px"},isOpen:e,onOpenChange:s,children:T.jsx(Jv,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>T.jsxs(d.Fragment,{children:[T.jsxs(tm,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),s(!1)},isDisabled:u.isDisabled,children:[u.icon,T.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&T.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&T.jsx(Fv,{})]},u.label))})})]})},td=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},nd=({languages:t})=>{const{isOpen:e,setIsOpen:n}=td();return T.jsx(ed,{options:t,isOpen:e,onOpenChange:n,children:T.jsxs(mn.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[T.jsx("span",{className:"material-icons",children:"translate"}),T.jsx("span",{className:"c__language-picker__label",children:"Français"}),T.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},rd=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=mn.useCunningham();return T.jsxs("div",{className:"c__header",children:[T.jsx("div",{className:"c__header__toggle-menu",children:T.jsx(mn.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:T.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),T.jsx("div",{className:"c__header__left",children:t}),T.jsxs("div",{className:"c__header__right",children:[n&&T.jsx("div",{className:"c__header__right__language-picker",children:T.jsx(nd,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-050":"#FFF4F4","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},logo:{src:"/assets/logo-gouv.svg",widthHeader:"110px",widthFooter:"220px",alt:"Gouvernement Logo"},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},tooltip:{padding:"4px 8px","background-color":"var(--c--theme--colors--greyscale-1000)"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},ar=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,s=t>r;return{isMobile:o,isTablet:a,isDesktop:s}},id=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=ar();return n?T.jsx("div",{className:"c__left-panel",children:t}):T.jsx("div",{className:ot("c__left-panel__mobile",{open:e}),children:t})},{createElement:Sn,createContext:um,createRef:Px,forwardRef:od,useCallback:xe,useContext:ad,useEffect:Dt,useImperativeHandle:sd,useLayoutEffect:cm,useMemo:dm,useRef:Ce,useState:hn}=C,Bs=C[`useId${Math.random()}`.slice(0,5)],fm=cm,mi=um(null);mi.displayName="PanelGroupContext";const Pt=fm,hm=typeof Bs=="function"?Bs:()=>null;let pm=0;function $a(t=null){const e=hm(),n=Ce(t||e||null);return n.current===null&&(n.current=""+pm++),t??n.current}function ld({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:h,order:p,style:g,tagName:m="div",...f}){const v=ad(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:S,getPanelSize:w,getPanelStyle:D,groupId:x,isPanelCollapsed:O,reevaluatePanelConstraints:P,registerPanel:b,resizePanel:R,unregisterPanel:B}=v,N=$a(a),z=Ce({callbacks:{onCollapse:u,onExpand:c,onResize:h},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:N,idIsFromProps:a!==void 0,order:p});Ce({didLogMissingDefaultSizeWarning:!1}),Pt(()=>{const{callbacks:I,constraints:j}=z.current,V={...j};z.current.id=N,z.current.idIsFromProps=a!==void 0,z.current.order=p,I.onCollapse=u,I.onExpand=c,I.onResize=h,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=s,j.minSize=l,(V.collapsedSize!==j.collapsedSize||V.collapsible!==j.collapsible||V.maxSize!==j.maxSize||V.minSize!==j.minSize)&&P(z.current,V)}),Pt(()=>{const I=z.current;return b(I),()=>{B(I)}},[p,N,b,B]),sd(o,()=>({collapse:()=>{y(z.current)},expand:I=>{S(z.current,I)},getId(){return N},getSize(){return w(z.current)},isCollapsed(){return O(z.current)},isExpanded(){return!O(z.current)},resize:I=>{R(z.current,I)}}),[y,S,w,O,N,R]);const E=D(z.current,i);return Sn(m,{...f,children:t,className:e,id:a,style:{...E,...g},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":N,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const zo=od((t,e)=>Sn(ld,{...t,forwardedRef:e}));ld.displayName="Panel";zo.displayName="forwardRef(Panel)";let Ho=null,Tt=null;function gm(t,e){if(e){const n=(e&hd)!==0,r=(e&pd)!==0,i=(e&gd)!==0,o=(e&vd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function vm(){Tt!==null&&(document.head.removeChild(Tt),Ho=null,Tt=null)}function Vi(t,e){const n=gm(t,e);Ho!==n&&(Ho=n,Tt===null&&(Tt=document.createElement("style"),document.head.appendChild(Tt)),Tt.innerHTML=`*{cursor: ${n}!important;}`)}function ud(t){return t.type==="keydown"}function cd(t){return t.type.startsWith("pointer")}function dd(t){return t.type.startsWith("mouse")}function yi(t){if(cd(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(dd(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function mm(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ym(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function bm(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Vs(t),b:Vs(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ee(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Us(Ws(n.a)),b:Us(Ws(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const l=o[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(i.a-i.b)}const Sm=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wm(t){var e;const n=getComputedStyle((e=fd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Em(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||wm(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Sm.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ws(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),Em(n))return n}return null}function Us(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Vs(t){const e=[];for(;t;)e.push(t),t=fd(t);return e}function fd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const hd=1,pd=2,gd=4,vd=8,$m=mm()==="coarse";let He=[],pn=!1,pt=new Map,bi=new Map;const Xn=new Set;function xm(t,e,n,r,i){var o;const{ownerDocument:a}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=pt.get(a))!==null&&o!==void 0?o:0;return pt.set(a,l+1),Xn.add(s),ti(),function(){var c;bi.delete(t),Xn.delete(s);const h=(c=pt.get(a))!==null&&c!==void 0?c:1;if(pt.set(a,h-1),ti(),h===1&&pt.delete(a),He.includes(s)){const p=He.indexOf(s);p>=0&&He.splice(p,1),Ca(),i("up",!0,null)}}}function Gs(t){const{target:e}=t,{x:n,y:r}=yi(t);pn=!0,xa({target:e,x:n,y:r}),ti(),He.length>0&&(ni("down",t),t.preventDefault(),t.stopPropagation())}function Rn(t){const{x:e,y:n}=yi(t);if(pn&&t.buttons===0&&(pn=!1,ni("up",t)),!pn){const{target:r}=t;xa({target:r,x:e,y:n})}ni("move",t),Ca(),He.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),pn=!1,He.length>0&&t.preventDefault(),ni("up",t),xa({target:e,x:n,y:r}),Ca(),ti()}function xa({target:t,x:e,y:n}){He.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Xn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,s=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:h}=s,p=$m?a.coarse:a.fine;if(e>=u-p&&e<=c+p&&n>=h-p&&n<=l+p){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&bm(r,o)>0){let m=r,f=!1;for(;m&&!m.contains(o);){if(ym(m.getBoundingClientRect(),s)){f=!0;break}m=m.parentElement}if(f)return}He.push(i)}})}function Gi(t,e){bi.set(t,e)}function Ca(){let t=!1,e=!1;He.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Vi("intersection",n):t?Vi("horizontal",n):e?Vi("vertical",n):vm()}function ti(){pt.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",Gs),n.removeEventListener("pointerleave",Rn),n.removeEventListener("pointermove",Rn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Xn.size>0&&(pn?(He.length>0&&pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",Rn),n.addEventListener("pointermove",Rn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",Gs,{capture:!0}),n.addEventListener("pointermove",Rn))}))}function ni(t,e){Xn.forEach(n=>{const{setResizeHandlerState:r}=n,i=He.includes(n);r(t,i,e)})}function Cm(){const[t,e]=hn(0);return xe(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Nt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Nt(t,e,n)===0}function Te(t,e,n){return Nt(t,e,n)===0}function Tm(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function cn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ee(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=r;if(Nt(n,s)<0)if(o){const l=(i+s)/2;Nt(n,l)<0?n=i:n=s}else n=s;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Fn({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[s,l]=r;ee(s!=null,"Invalid first pivot index"),ee(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const h=t<0?l:s,p=n[h];ee(p,`Panel constraints not found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,g)){const y=f-v;Nt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}{const h=t<0?s:l,p=n[h];ee(p,`No panel constraints found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,f)){const y=v-g;Nt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}}{const h=t<0?1:-1;let p=t<0?l:s,g=0;for(;;){const f=e[p];ee(f!=null,`Previous layout not found for panel index ${p}`);const y=cn({panelConstraints:n,panelIndex:p,size:100})-f;if(g+=y,p+=h,p<0||p>=n.length)break}const m=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-m:m}{let p=t<0?s:l;for(;p>=0&&p<n.length;){const g=Math.abs(t)-Math.abs(u),m=e[p];ee(m!=null,`Previous layout not found for panel index ${p}`);const f=m-g,v=cn({panelConstraints:n,panelIndex:p,size:f});if(!Te(m,v)&&(u+=m-v,a[p]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?p--:p++}}if(Tm(i,a))return i;{const h=t<0?l:s,p=e[h];ee(p!=null,`Previous layout not found for panel index ${h}`);const g=p+u,m=cn({panelConstraints:n,panelIndex:h,size:g});if(a[h]=m,!Te(m,g)){let f=g-m,y=t<0?l:s;for(;y>=0&&y<n.length;){const S=a[y];ee(S!=null,`Previous layout not found for panel index ${y}`);const w=S+f,D=cn({panelConstraints:n,panelIndex:y,size:w});if(Te(S,D)||(f-=D-S,a[y]=D),Te(f,0))break;t>0?y--:y++}}}const c=a.reduce((h,p)=>p+h,0);return Te(c,100)?a:i}function Dm({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const s=n[0];ee(s!=null,"No pivot index found"),e.forEach((h,p)=>{const{constraints:g}=h,{maxSize:m=100,minSize:f=0}=g;p===s?(r=f,i=m):(o+=f,a+=m)});const l=Math.min(i,100-o),u=Math.max(r,100-a),c=t[s];return{valueMax:l,valueMin:u,valueNow:c}}function Jn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function md(t,e,n=document){const i=Jn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function yd(t,e,n){const r=md(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function bd(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Pm(t,e,n,r=document){var i,o,a,s;const l=Si(e,r),u=Jn(t,r),c=l?u.indexOf(l):-1,h=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,p=(a=(s=n[c+1])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null;return[h,p]}function Om({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){Ce({didWarnAboutMissingResizeHandle:!1}),Pt(()=>{if(!o)return;const s=Jn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:h}=Dm({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),p=s[l];if(p!=null){const g=i[l];ee(g,`No panel data found for index "${l}"`),p.setAttribute("aria-controls",g.id),p.setAttribute("aria-valuemax",""+Math.round(u)),p.setAttribute("aria-valuemin",""+Math.round(c)),p.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Dt(()=>{if(!o)return;const s=e.current;ee(s,"Eager values not found");const{panelDataArray:l}=s,u=bd(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Jn(n,o);ee(c,`No resize handles found for group id "${n}"`);const h=c.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");ee(g,"Resize handle element has no handle id attribute");const[m,f]=Pm(n,g,l,o);if(m==null||f==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const S=l.findIndex(w=>w.id===m);if(S>=0){const w=l[S];ee(w,`No panel data found for index ${S}`);const D=r[S],{collapsedSize:x=0,collapsible:O,minSize:P=0}=w.constraints;if(D!=null&&O){const b=Fn({delta:Te(D,x)?P-x:x-D,initialLayout:r,panelConstraints:l.map(R=>R.constraints),pivotIndices:yd(n,g,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return p.addEventListener("keydown",v),()=>{p.removeEventListener("keydown",v)}});return()=>{h.forEach(p=>p())}},[o,t,e,n,r,i,a])}function qs(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Sd(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Im(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);ee(a,`No resize handle element found for id "${e}"`);const s=a.getAttribute("data-panel-group-id");ee(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Sd(n,t),c=bd(s,i);ee(c,`No group element found for id "${s}"`);const h=c.getBoundingClientRect(),p=o?h.width:h.height;return(u-l)/p*100}function _m(t,e,n,r,i,o){if(ud(t)){const a=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(t.key){case"ArrowDown":l=a?0:s;break;case"ArrowLeft":l=a?-s:0;break;case"ArrowRight":l=a?s:0;break;case"ArrowUp":l=a?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Im(t,e,n,r,o)}function km({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(s!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Vt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:s,id:l}=o,{collapsedSize:u=0,collapsible:c}=s,h=n[l];if(h==null||r!==h){n[l]=r;const{onCollapse:p,onExpand:g,onResize:m}=a;m&&m(r,h),c&&(p||g)&&(g&&(h==null||nt(h,u))&&!nt(r,u)&&g(),p&&(h==null||!nt(h,u))&&nt(r,u)&&p())}})}function wr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Rm({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let s;return a==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Nm(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Ys(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function wd(t){return`react-resizable-panels:${t}`}function Ed(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function $d(t,e){try{const n=wd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Mm(t,e,n){var r,i;const o=(r=$d(t,n))!==null&&r!==void 0?r:{},a=Ed(e);return(i=o[a])!==null&&i!==void 0?i:null}function Am(t,e,n,r,i){var o;const a=wd(t),s=Ed(e),l=(o=$d(t,i))!==null&&o!==void 0?o:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(l))}catch(u){console.error(u)}}function Xs({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=100/r*a;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=cn({panelConstraints:e,panelIndex:o,size:a});a!=s&&(i+=a-s,n[o]=s)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=a+i,l=cn({panelConstraints:e,panelIndex:o,size:s});if(a!==l&&(i-=l-a,n[o]=l,Te(i,0)))break}return n}const Km=100,jn={getItem:t=>(Ys(jn),jn.getItem(t)),setItem:(t,e)=>{Ys(jn),jn.setItem(t,e)}},Js={};function xd({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=jn,style:u,tagName:c="div",...h}){const p=$a(o),g=Ce(null),[m,f]=hn(null),[v,y]=hn([]),S=Cm(),w=Ce({}),D=Ce(new Map),x=Ce(0),O=Ce({autoSaveId:t,direction:r,dragState:m,id:p,keyboardResizeBy:s,onLayout:a,storage:l}),P=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),sd(i,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:_}=P.current;return _},setLayout:_=>{const{onLayout:A}=O.current,{layout:K,panelDataArray:W}=P.current,U=Xs({layout:_,panelConstraints:W.map(L=>L.constraints)});qs(K,U)||(y(U),P.current.layout=U,A&&A(U),Vt(W,U,w.current))}}),[]),Pt(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=m,O.current.id=p,O.current.onLayout=a,O.current.storage=l}),Om({committedValuesRef:O,eagerValuesRef:P,groupId:p,layout:v,panelDataArray:P.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),Dt(()=>{const{panelDataArray:_}=P.current;if(t){if(v.length===0||v.length!==_.length)return;let A=Js[t];A==null&&(A=Nm(Am,Km),Js[t]=A);const K=[..._],W=new Map(D.current);A(t,K,W,v,l)}},[t,v,l]),Dt(()=>{});const b=xe(_=>{const{onLayout:A}=O.current,{layout:K,panelDataArray:W}=P.current;if(_.constraints.collapsible){const U=W.map(de=>de.constraints),{collapsedSize:L=0,panelSize:J,pivotIndices:te}=St(W,_,K);if(ee(J!=null,`Panel size not found for panel "${_.id}"`),!nt(J,L)){D.current.set(_.id,J);const ce=an(W,_)===W.length-1?J-L:L-J,oe=Fn({delta:ce,initialLayout:K,panelConstraints:U,pivotIndices:te,prevLayout:K,trigger:"imperative-api"});wr(K,oe)||(y(oe),P.current.layout=oe,A&&A(oe),Vt(W,oe,w.current))}}},[]),R=xe((_,A)=>{const{onLayout:K}=O.current,{layout:W,panelDataArray:U}=P.current;if(_.constraints.collapsible){const L=U.map(ge=>ge.constraints),{collapsedSize:J=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=St(U,_,W),oe=A??de;if(nt(te,J)){const ge=D.current.get(_.id),re=ge!=null&&ge>=oe?ge:oe,st=an(U,_)===U.length-1?te-re:re-te,ve=Fn({delta:st,initialLayout:W,panelConstraints:L,pivotIndices:ce,prevLayout:W,trigger:"imperative-api"});wr(W,ve)||(y(ve),P.current.layout=ve,K&&K(ve),Vt(U,ve,w.current))}}},[]),B=xe(_=>{const{layout:A,panelDataArray:K}=P.current,{panelSize:W}=St(K,_,A);return ee(W!=null,`Panel size not found for panel "${_.id}"`),W},[]),N=xe((_,A)=>{const{panelDataArray:K}=P.current,W=an(K,_);return Rm({defaultSize:A,dragState:m,layout:v,panelData:K,panelIndex:W})},[m,v]),z=xe(_=>{const{layout:A,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:L}=St(K,_,A);return ee(L!=null,`Panel size not found for panel "${_.id}"`),U===!0&&nt(L,W)},[]),E=xe(_=>{const{layout:A,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:L}=St(K,_,A);return ee(L!=null,`Panel size not found for panel "${_.id}"`),!U||Nt(L,W)>0},[]),I=xe(_=>{const{panelDataArray:A}=P.current;A.push(_),A.sort((K,W)=>{const U=K.order,L=W.order;return U==null&&L==null?0:U==null?-1:L==null?1:U-L}),P.current.panelDataArrayChanged=!0,S()},[S]);Pt(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:_,onLayout:A,storage:K}=O.current,{layout:W,panelDataArray:U}=P.current;let L=null;if(_){const te=Mm(_,U,K);te&&(D.current=new Map(Object.entries(te.expandToSizes)),L=te.layout)}L==null&&(L=km({panelDataArray:U}));const J=Xs({layout:L,panelConstraints:U.map(te=>te.constraints)});qs(W,J)||(y(J),P.current.layout=J,A&&A(J),Vt(U,J,w.current))}}),Pt(()=>{const _=P.current;return()=>{_.layout=[]}},[]);const j=xe(_=>{let A=!1;const K=g.current;return K&&window.getComputedStyle(K,null).getPropertyValue("direction")==="rtl"&&(A=!0),function(U){U.preventDefault();const L=g.current;if(!L)return()=>null;const{direction:J,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=O.current,{layout:ge,panelDataArray:re}=P.current,{initialLayout:Ue}=te??{},st=yd(de,_,L);let ve=_m(U,_,J,te,ce,L);const Dn=J==="horizontal";Dn&&A&&(ve=-ve);const lr=re.map(q=>q.constraints),$=Fn({delta:ve,initialLayout:Ue??ge,panelConstraints:lr,pivotIndices:st,prevLayout:ge,trigger:ud(U)?"keyboard":"mouse-or-touch"}),G=!wr(ge,$);(cd(U)||dd(U))&&x.current!=ve&&(x.current=ve,!G&&ve!==0?Dn?Gi(_,ve<0?hd:pd):Gi(_,ve<0?gd:vd):Gi(_,0)),G&&(y($),P.current.layout=$,oe&&oe($),Vt(re,$,w.current))}},[]),V=xe((_,A)=>{const{onLayout:K}=O.current,{layout:W,panelDataArray:U}=P.current,L=U.map(ge=>ge.constraints),{panelSize:J,pivotIndices:te}=St(U,_,W);ee(J!=null,`Panel size not found for panel "${_.id}"`);const ce=an(U,_)===U.length-1?J-A:A-J,oe=Fn({delta:ce,initialLayout:W,panelConstraints:L,pivotIndices:te,prevLayout:W,trigger:"imperative-api"});wr(W,oe)||(y(oe),P.current.layout=oe,K&&K(oe),Vt(U,oe,w.current))},[]),X=xe((_,A)=>{const{layout:K,panelDataArray:W}=P.current,{collapsedSize:U=0,collapsible:L}=A,{collapsedSize:J=0,collapsible:te,maxSize:de=100,minSize:ce=0}=_.constraints,{panelSize:oe}=St(W,_,K);oe!=null&&(L&&te&&nt(oe,U)?nt(U,J)||V(_,J):oe<ce?V(_,ce):oe>de&&V(_,de))},[V]),M=xe((_,A)=>{const{direction:K}=O.current,{layout:W}=P.current;if(!g.current)return;const U=Si(_,g.current);ee(U,`Drag handle element not found for id "${_}"`);const L=Sd(K,A);f({dragHandleId:_,dragHandleRect:U.getBoundingClientRect(),initialCursorPosition:L,initialLayout:W})},[]),Y=xe(()=>{f(null)},[]),F=xe(_=>{const{panelDataArray:A}=P.current,K=an(A,_);K>=0&&(A.splice(K,1),delete w.current[_.id],P.current.panelDataArrayChanged=!0,S())},[S]),H=dm(()=>({collapsePanel:b,direction:r,dragState:m,expandPanel:R,getPanelSize:B,getPanelStyle:N,groupId:p,isPanelCollapsed:z,isPanelExpanded:E,reevaluatePanelConstraints:X,registerPanel:I,registerResizeHandle:j,resizePanel:V,startDragging:M,stopDragging:Y,unregisterPanel:F,panelGroupElement:g.current}),[b,m,r,R,B,N,p,z,E,X,I,j,V,M,Y,F]),k={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sn(mi.Provider,{value:H},Sn(c,{...h,children:e,className:n,id:o,ref:g,style:{...k,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":p}))}const Cd=od((t,e)=>Sn(xd,{...t,forwardedRef:e}));xd.displayName="PanelGroup";Cd.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function St(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Lm({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Dt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const s=i.getAttribute("data-panel-group-id");ee(s,`No group element found for id "${s}"`);const l=Jn(s,r),u=md(s,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function Td({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...h}){var p,g;const m=Ce(null),f=Ce({onDragging:a});Dt(()=>{f.current.onDragging=a});const v=ad(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:y,groupId:S,registerResizeHandle:w,startDragging:D,stopDragging:x,panelGroupElement:O}=v,P=$a(i),[b,R]=hn("inactive"),[B,N]=hn(!1),[z,E]=hn(null),I=Ce({state:b});Pt(()=>{I.current.state=b}),Dt(()=>{if(n)E(null);else{const M=w(P);E(()=>M)}},[n,P,w]);const j=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,V=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return Dt(()=>{if(n||z==null)return;const M=m.current;return ee(M,"Element ref not attached"),xm(P,M,y,{coarse:j,fine:V},(F,H,k)=>{if(H)switch(F){case"down":{R("drag"),ee(k,'Expected event to be defined for "down" action'),D(P,k);const{onDragging:_}=f.current;_&&_(!0);break}case"move":{const{state:_}=I.current;_!=="drag"&&R("hover"),ee(k,'Expected event to be defined for "move" action'),z(k);break}case"up":{R("hover"),x();const{onDragging:_}=f.current;_&&_(!1);break}}else R("inactive")})},[j,y,n,V,w,P,z,D,x]),Lm({disabled:n,handleId:P,resizeHandler:z,panelGroupElement:O}),Sn(c,{...h,children:t,className:e,id:i,onBlur:()=>{N(!1),o==null||o()},onFocus:()=>{N(!0),s==null||s()},ref:m,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":y,"data-panel-group-id":S,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":B?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":P})}Td.displayName="PanelResizeHandle";const Fm=({children:t,isOpen:e})=>{const{isDesktop:n}=ar();return n?T.jsx("div",{className:ot("c__right-panel",{open:e}),children:t}):T.jsx("div",{className:ot("c__right-panel__mobile",{open:e}),children:t})},jm=({icon:t,children:e,leftPanelContent:n,rightPanelContent:r,rightHeaderContent:i,languages:o,enableResize:a=!1,rightPanelIsOpen:s=!1})=>{const[l,u]=d.useState(!1),{isDesktop:c}=ar(),h=d.useRef(null),[p,g]=d.useState(Er(300,c)),[m,f]=d.useState(Er(450,c)),v=()=>{u(!l)};return d.useEffect(()=>{const y=()=>{const S=Math.round(Er(300,c)),w=Math.round(Math.min(Er(450,c),40));g(c?S:0),f(a?w:S)};return y(),window.addEventListener("resize",()=>{y()}),()=>{window.removeEventListener("resize",y)}},[c,a]),T.jsxs("div",{className:"c__main-layout",children:[T.jsx("div",{className:"c__main-layout__header",children:T.jsx(rd,{onTogglePanel:v,isPanelOpen:l,rightIcon:i,leftIcon:t,languages:o})}),T.jsx("div",{className:"c__main-layout__content",children:T.jsxs(Cd,{autoSaveId:"persistance",direction:"horizontal",children:[T.jsx(zo,{ref:h,order:0,defaultSize:p,minSize:p,maxSize:m,children:T.jsx(id,{isOpen:c?!0:l,children:n})}),c&&T.jsx(Td,{className:"bg-greyscale-200",style:{width:"1px"}}),T.jsx(zo,{order:1,children:T.jsxs("div",{className:"c__main-layout__content__center",children:[T.jsx("div",{className:"c__main-layout__content__center__children",children:e}),T.jsx(Fm,{isOpen:s,children:r})]})})]})})]})},Er=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},zm=52,Da=({size:t="sm"})=>T.jsx("div",{className:["c__spinner",t].join(" ")}),Dd=({children:t,text:e,...n})=>T.jsxs("div",{className:"suite__label__container",children:[T.jsx("label",{...n,children:t}),e&&T.jsx("span",{className:"suite__label__container__description",children:e})]}),Hm=({label:t,text:e,labelSide:n="right",children:r})=>T.jsxs("div",{className:ot("c__with-label",{[n]:!0}),children:[T.jsx(Dd,{children:t,text:e}),r]});var Qs=1,Bm=.9,Wm=.8,Um=.17,qi=.1,Yi=.999,Vm=.9999,Gm=.99,qm=/[\\\/_+.#"@\[\(\{&]/,Ym=/[\\\/_+.#"@\[\(\{&]/g,Xm=/[\s-]/,Pd=/[\s-]/g;function Bo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Qs:Gm;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,h,p,g,m;u>=0;)h=Bo(t,e,n,r,u+1,o+1,a),h>c&&(u===i?h*=Qs:qm.test(t.charAt(u-1))?(h*=Wm,g=t.slice(i,u-1).match(Ym),g&&i>0&&(h*=Math.pow(Yi,g.length))):Xm.test(t.charAt(u-1))?(h*=Bm,m=t.slice(i,u-1).match(Pd),m&&i>0&&(h*=Math.pow(Yi,m.length))):(h*=Um,i>0&&(h*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(h*=Vm)),(h<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(p=Bo(t,e,n,r,u+1,o+2,a),p*qi>h&&(h=p*qi)),h>c&&(c=h),u=n.indexOf(l,u+1);return a[s]=c,c}function Zs(t){return t.toLowerCase().replace(Pd," ")}function Jm(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Bo(t,e,Zs(t),Zs(e),0,0,{})}function mt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function el(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Od(...t){return e=>{let n=!1;const r=t.map(i=>{const o=el(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():el(t[i],null)}}}}function zt(...t){return C.useCallback(Od(...t),t)}function Qm(t,e){const n=C.createContext(e),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Zm(t,e=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=h=>{var y;const{scope:p,children:g,...m}=h,f=((y=p==null?void 0:p[t])==null?void 0:y[l])||s,v=C.useMemo(()=>m,Object.values(m));return T.jsx(f.Provider,{value:v,children:g})};u.displayName=o+"Provider";function c(h,p){var f;const g=((f=p==null?void 0:p[t])==null?void 0:f[l])||s,m=C.useContext(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[t])||o;return C.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return i.scopeName=t,[r,ey(i,...e)]}function ey(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...s,...h}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ri=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},ty=C.useId||(()=>{}),ny=0;function it(t){const[e,n]=C.useState(ty());return ri(()=>{n(r=>r??String(ny++))},[t]),e?`radix-${e}`:""}function Mt(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function ry({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=iy({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,s=Mt(n),l=C.useCallback(u=>{if(o){const h=typeof u=="function"?u(t):u;h!==t&&s(h)}else i(u)},[o,t,i,s]);return[a,l]}function iy({defaultProp:t,onChange:e}){const n=C.useState(t),[r]=n,i=C.useRef(r),o=Mt(e);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Pa=C.forwardRef((t,e)=>{const{children:n,...r}=t,i=C.Children.toArray(n),o=i.find(ay);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return T.jsx(Wo,{...r,ref:e,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return T.jsx(Wo,{...r,ref:e,children:n})});Pa.displayName="Slot";var Wo=C.forwardRef((t,e)=>{const{children:n,...r}=t;if(C.isValidElement(n)){const i=ly(n),o=sy(r,n.props);return n.type!==C.Fragment&&(o.ref=e?Od(e,i):i),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});Wo.displayName="SlotClone";var oy=({children:t})=>T.jsx(T.Fragment,{children:t});function ay(t){return C.isValidElement(t)&&t.type===oy}function sy(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function ly(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var uy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=uy.reduce((t,e)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function cy(t,e){t&&ah.flushSync(()=>t.dispatchEvent(e))}function dy(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var fy="DismissableLayer",Uo="dismissableLayer.update",hy="dismissableLayer.pointerDownOutside",py="dismissableLayer.focusOutside",tl,Id=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_d=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=t,u=C.useContext(Id),[c,h]=C.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=C.useState({}),m=zt(e,P=>h(P)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=f.indexOf(v),S=c?f.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,D=S>=y,x=my(P=>{const b=P.target,R=[...u.branches].some(B=>B.contains(b));!D||R||(i==null||i(P),a==null||a(P),P.defaultPrevented||s==null||s())},p),O=yy(P=>{const b=P.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(P),a==null||a(P),P.defaultPrevented||s==null||s())},p);return dy(P=>{S===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},p),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),nl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tl)}},[c,p,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),nl())},[c,u]),C.useEffect(()=>{const P=()=>g({});return document.addEventListener(Uo,P),()=>document.removeEventListener(Uo,P)},[]),T.jsx(be.div,{...l,ref:m,style:{pointerEvents:w?D?"auto":"none":void 0,...t.style},onFocusCapture:mt(t.onFocusCapture,O.onFocusCapture),onBlurCapture:mt(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:mt(t.onPointerDownCapture,x.onPointerDownCapture)})});_d.displayName=fy;var gy="DismissableLayerBranch",vy=C.forwardRef((t,e)=>{const n=C.useContext(Id),r=C.useRef(null),i=zt(e,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(be.div,{...t,ref:i})});vy.displayName=gy;function my(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){kd(hy,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function yy(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&kd(py,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nl(){const t=new CustomEvent(Uo);document.dispatchEvent(t)}function kd(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?cy(i,o):i.dispatchEvent(o)}var Xi="focusScope.autoFocusOnMount",Ji="focusScope.autoFocusOnUnmount",rl={bubbles:!1,cancelable:!0},by="FocusScope",Rd=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[s,l]=C.useState(null),u=Mt(i),c=Mt(o),h=C.useRef(null),p=zt(e,f=>l(f)),g=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let f=function(w){if(g.paused||!s)return;const D=w.target;s.contains(D)?h.current=D:ct(h.current,{select:!0})},v=function(w){if(g.paused||!s)return;const D=w.relatedTarget;D!==null&&(s.contains(D)||ct(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&ct(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const S=new MutationObserver(y);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),S.disconnect()}}},[r,s,g.paused]),C.useEffect(()=>{if(s){ol.add(g);const f=document.activeElement;if(!s.contains(f)){const y=new CustomEvent(Xi,rl);s.addEventListener(Xi,u),s.dispatchEvent(y),y.defaultPrevented||(Sy(Cy(Nd(s)),{select:!0}),document.activeElement===f&&ct(s))}return()=>{s.removeEventListener(Xi,u),setTimeout(()=>{const y=new CustomEvent(Ji,rl);s.addEventListener(Ji,c),s.dispatchEvent(y),y.defaultPrevented||ct(f??document.body,{select:!0}),s.removeEventListener(Ji,c),ol.remove(g)},0)}}},[s,u,c,g]);const m=C.useCallback(f=>{if(!n&&!r||g.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(v&&y){const S=f.currentTarget,[w,D]=wy(S);w&&D?!f.shiftKey&&y===D?(f.preventDefault(),n&&ct(w,{select:!0})):f.shiftKey&&y===w&&(f.preventDefault(),n&&ct(D,{select:!0})):y===S&&f.preventDefault()}},[n,r,g.paused]);return T.jsx(be.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});Rd.displayName=by;function Sy(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ct(r,{select:e}),document.activeElement!==n)return}function wy(t){const e=Nd(t),n=il(e,t),r=il(e.reverse(),t);return[n,r]}function Nd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function il(t,e){for(const n of t)if(!Ey(n,{upTo:e}))return n}function Ey(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function $y(t){return t instanceof HTMLInputElement&&"select"in t}function ct(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&$y(t)&&e&&t.select()}}var ol=xy();function xy(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=al(t,e),t.unshift(e)},remove(e){var n;t=al(t,e),(n=t[0])==null||n.resume()}}}function al(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Cy(t){return t.filter(e=>e.tagName!=="A")}var Ty="Portal",Md=C.forwardRef((t,e)=>{var s;const{container:n,...r}=t,[i,o]=C.useState(!1);ri(()=>o(!0),[]);const a=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?jt.createPortal(T.jsx(be.div,{...r,ref:e}),a):null});Md.displayName=Ty;function Dy(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var wi=t=>{const{present:e,children:n}=t,r=Py(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=zt(r.ref,Oy(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};wi.displayName="Presence";function Py(t){const[e,n]=C.useState(),r=C.useRef({}),i=C.useRef(t),o=C.useRef("none"),a=t?"mounted":"unmounted",[s,l]=Dy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=$r(r.current);o.current=s==="mounted"?u:"none"},[s]),ri(()=>{const u=r.current,c=i.current;if(c!==t){const p=o.current,g=$r(u);t?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),ri(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,h=g=>{const f=$r(r.current).includes(g.animationName);if(g.target===e&&f&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},p=g=>{g.target===e&&(o.current=$r(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function $r(t){return(t==null?void 0:t.animationName)||"none"}function Oy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qi=0;function Iy(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??sl()),document.body.insertAdjacentElement("beforeend",t[1]??sl()),Qi++,()=>{Qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qi--}},[])}function sl(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Rr="right-scroll-bar-position",Nr="width-before-scroll-bar",_y="with-scroll-bars-hidden",ky="--removed-body-scroll-bar-size";function Zi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Ry(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Ny=typeof window<"u"?C.useLayoutEffect:C.useEffect,ll=new WeakMap;function My(t,e){var n=Ry(null,function(r){return t.forEach(function(i){return Zi(i,r)})});return Ny(function(){var r=ll.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(s){o.has(s)||Zi(s,null)}),o.forEach(function(s){i.has(s)||Zi(s,a)})}ll.set(n,t)},[t]),n}function Ay(t){return t}function Ky(t,e){e===void 0&&(e=Ay);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ly(t){t===void 0&&(t={});var e=Ky(null);return e.options=Ge({async:!0,ssr:!1},t),e}var Ad=function(t){var e=t.sideCar,n=oc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Ge({},n))};Ad.isSideCarExport=!0;function Fy(t,e){return t.useMedium(e),Ad}var Kd=Ly(),eo=function(){},Ei=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,h=t.shards,p=t.sideCar,g=t.noIsolation,m=t.inert,f=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,S=t.gapMode,w=oc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=p,x=My([n,e]),O=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(D,{sideCar:Kd,removeScrollBar:u,shards:h,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:S}),a?C.cloneElement(C.Children.only(s),Ge(Ge({},O),{ref:x})):C.createElement(y,Ge({},O,{className:l,ref:x}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ei.classNames={fullWidth:Nr,zeroRight:Rr};var jy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zy(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=jy();return e&&t.setAttribute("nonce",e),t}function Hy(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function By(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Wy=function(){var t=0,e=null;return{add:function(n){t==0&&(e=zy())&&(Hy(e,n),By(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Uy=function(){var t=Wy();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Ld=function(){var t=Uy(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Vy={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},Gy=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},qy=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Vy;var e=Gy(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Yy=Ld(),gn="data-scroll-locked",Xy=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,s=t.gap;return n===void 0&&(n="margin"),`
48
+ .`.concat(_y,` {
49
49
  overflow: hidden `).concat(r,`;
50
50
  padding-right: `).concat(s,"px ").concat(r,`;
51
51
  }
@@ -62,7 +62,7 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
62
62
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
63
63
  }
64
64
 
65
- .`).concat(kr,` {
65
+ .`).concat(Rr,` {
66
66
  right: `).concat(s,"px ").concat(r,`;
67
67
  }
68
68
 
@@ -70,7 +70,7 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
70
70
  margin-right: `).concat(s,"px ").concat(r,`;
71
71
  }
72
72
 
73
- .`).concat(kr," .").concat(kr,` {
73
+ .`).concat(Rr," .").concat(Rr,` {
74
74
  right: 0 `).concat(r,`;
75
75
  }
76
76
 
@@ -79,24 +79,24 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
79
79
  }
80
80
 
81
81
  body[`).concat(gn,`] {
82
- `).concat(Py,": ").concat(s,`px;
82
+ `).concat(ky,": ").concat(s,`px;
83
83
  }
84
- `)},sl=function(){var t=parseInt(document.body.getAttribute(gn)||"0",10);return isFinite(t)?t:0},Gy=function(){C.useEffect(function(){return document.body.setAttribute(gn,(sl()+1).toString()),function(){var t=sl()-1;t<=0?document.body.removeAttribute(gn):document.body.setAttribute(gn,t.toString())}},[])},qy=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Gy();var o=C.useMemo(function(){return Wy(i)},[i]);return C.createElement(Uy,{styles:Vy(o,!e,i,n?"":"!important")})},Vo=!1;if(typeof window<"u")try{var $r=Object.defineProperty({},"passive",{get:function(){return Vo=!0,!0}});window.addEventListener("test",$r,$r),window.removeEventListener("test",$r,$r)}catch{Vo=!1}var Gt=Vo?{passive:!1}:!1,Yy=function(t){return t.tagName==="TEXTAREA"},Kd=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Yy(t)&&n[e]==="visible")},Xy=function(t){return Kd(t,"overflowY")},Jy=function(t){return Kd(t,"overflowX")},ll=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Ld(t,r);if(i){var o=Fd(t,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qy=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Zy=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Ld=function(t,e){return t==="v"?Xy(e):Jy(e)},Fd=function(t,e){return t==="v"?Qy(e):Zy(e)},eb=function(t,e){return t==="h"&&e==="rtl"?-1:1},tb=function(t,e,n,r,i){var o=eb(t,window.getComputedStyle(e).direction),a=o*r,s=n.target,l=e.contains(s),u=!1,c=a>0,p=0,g=0;do{var h=Fd(t,s),y=h[0],f=h[1],v=h[2],m=f-v-o*y;(y||m)&&Ld(t,s)&&(p+=m,g+=y),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(e.contains(s)||e===s));return(c&&Math.abs(p)<1||!c&&Math.abs(g)<1)&&(u=!0),u},xr=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ul=function(t){return[t.deltaX,t.deltaY]},cl=function(t){return t&&"current"in t?t.current:t},nb=function(t,e){return t[0]===e[0]&&t[1]===e[1]},rb=function(t){return`
84
+ `)},ul=function(){var t=parseInt(document.body.getAttribute(gn)||"0",10);return isFinite(t)?t:0},Jy=function(){C.useEffect(function(){return document.body.setAttribute(gn,(ul()+1).toString()),function(){var t=ul()-1;t<=0?document.body.removeAttribute(gn):document.body.setAttribute(gn,t.toString())}},[])},Qy=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Jy();var o=C.useMemo(function(){return qy(i)},[i]);return C.createElement(Yy,{styles:Xy(o,!e,i,n?"":"!important")})},Vo=!1;if(typeof window<"u")try{var xr=Object.defineProperty({},"passive",{get:function(){return Vo=!0,!0}});window.addEventListener("test",xr,xr),window.removeEventListener("test",xr,xr)}catch{Vo=!1}var Gt=Vo?{passive:!1}:!1,Zy=function(t){return t.tagName==="TEXTAREA"},Fd=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zy(t)&&n[e]==="visible")},eb=function(t){return Fd(t,"overflowY")},tb=function(t){return Fd(t,"overflowX")},cl=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=jd(t,r);if(i){var o=zd(t,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nb=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},rb=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},jd=function(t,e){return t==="v"?eb(e):tb(e)},zd=function(t,e){return t==="v"?nb(e):rb(e)},ib=function(t,e){return t==="h"&&e==="rtl"?-1:1},ob=function(t,e,n,r,i){var o=ib(t,window.getComputedStyle(e).direction),a=o*r,s=n.target,l=e.contains(s),u=!1,c=a>0,h=0,p=0;do{var g=zd(t,s),m=g[0],f=g[1],v=g[2],y=f-v-o*m;(m||y)&&jd(t,s)&&(h+=y,p+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(e.contains(s)||e===s));return(c&&Math.abs(h)<1||!c&&Math.abs(p)<1)&&(u=!0),u},Cr=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},dl=function(t){return[t.deltaX,t.deltaY]},fl=function(t){return t&&"current"in t?t.current:t},ab=function(t,e){return t[0]===e[0]&&t[1]===e[1]},sb=function(t){return`
85
85
  .block-interactivity-`.concat(t,` {pointer-events: none;}
86
86
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
87
- `)},ib=0,qt=[];function ob(t){var e=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(ib++)[0],o=C.useState(Ad)[0],a=C.useRef(t);C.useEffect(function(){a.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var f=bg([t.lockRef.current],(t.shards||[]).map(cl),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var s=C.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!a.current.allowPinchZoom;var m=xr(f),S=n.current,w="deltaX"in f?f.deltaX:S[0]-m[0],O="deltaY"in f?f.deltaY:S[1]-m[1],x,D=f.target,P=Math.abs(w)>Math.abs(O)?"h":"v";if("touches"in f&&P==="h"&&D.type==="range")return!1;var b=ll(P,D);if(!b)return!0;if(b?x=P:(x=P==="v"?"h":"v",b=ll(P,D)),!b)return!1;if(!r.current&&"changedTouches"in f&&(w||O)&&(r.current=x),!x)return!0;var k=r.current||x;return tb(k,v,f,k==="h"?w:O)},[]),l=C.useCallback(function(f){var v=f;if(!(!qt.length||qt[qt.length-1]!==o)){var m="deltaY"in v?ul(v):xr(v),S=e.current.filter(function(x){return x.name===v.type&&(x.target===v.target||v.target===x.shadowParent)&&nb(x.delta,m)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var w=(a.current.shards||[]).map(cl).filter(Boolean).filter(function(x){return x.contains(v.target)}),O=w.length>0?s(v,w[0]):!a.current.noIsolation;O&&v.cancelable&&v.preventDefault()}}},[]),u=C.useCallback(function(f,v,m,S){var w={name:f,delta:v,target:m,should:S,shadowParent:ab(m)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(O){return O!==w})},1)},[]),c=C.useCallback(function(f){n.current=xr(f),r.current=void 0},[]),p=C.useCallback(function(f){u(f.type,ul(f),f.target,s(f,t.lockRef.current))},[]),g=C.useCallback(function(f){u(f.type,xr(f),f.target,s(f,t.lockRef.current))},[]);C.useEffect(function(){return qt.push(o),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Gt),document.addEventListener("touchmove",l,Gt),document.addEventListener("touchstart",c,Gt),function(){qt=qt.filter(function(f){return f!==o}),document.removeEventListener("wheel",l,Gt),document.removeEventListener("touchmove",l,Gt),document.removeEventListener("touchstart",c,Gt)}},[]);var h=t.removeScrollBar,y=t.inert;return C.createElement(C.Fragment,null,y?C.createElement(o,{styles:rb(i)}):null,h?C.createElement(qy,{gapMode:t.gapMode}):null)}function ab(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const sb=My(Md,ob);var jd=C.forwardRef(function(t,e){return C.createElement(Ei,Ge({},t,{ref:e,sideCar:sb}))});jd.classNames=Ei.classNames;var lb=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Yt=new WeakMap,Cr=new WeakMap,Tr={},no=0,zd=function(t){return t&&(t.host||zd(t.parentNode))},ub=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=zd(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},cb=function(t,e,n,r){var i=ub(e,Array.isArray(t)?t:[t]);Tr[n]||(Tr[n]=new WeakMap);var o=Tr[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var c=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(g){if(s.has(g))c(g);else try{var h=g.getAttribute(r),y=h!==null&&h!=="false",f=(Yt.get(g)||0)+1,v=(o.get(g)||0)+1;Yt.set(g,f),o.set(g,v),a.push(g),f===1&&y&&Cr.set(g,!0),v===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",g,m)}})};return c(e),s.clear(),no++,function(){a.forEach(function(p){var g=Yt.get(p)-1,h=o.get(p)-1;Yt.set(p,g),o.set(p,h),g||(Cr.has(p)||p.removeAttribute(r),Cr.delete(p)),h||p.removeAttribute(n)}),no--,no||(Yt=new WeakMap,Yt=new WeakMap,Cr=new WeakMap,Tr={})}},db=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=lb(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),cb(r,i,n,"aria-hidden")):function(){return null}},Oa="Dialog",[Hd,Cx]=Ym(Oa),[fb,We]=Hd(Oa),Bd=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,s=C.useRef(null),l=C.useRef(null),[u=!1,c]=Zm({prop:r,defaultProp:i,onChange:o});return T.jsx(fb,{scope:e,triggerRef:s,contentRef:l,contentId:it(),titleId:it(),descriptionId:it(),open:u,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(p=>!p),[c]),modal:a,children:n})};Bd.displayName=Oa;var Wd="DialogTrigger",hb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Wd,n),o=zt(e,i.triggerRef);return T.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ka(i.open),...r,ref:o,onClick:vt(t.onClick,i.onOpenToggle)})});hb.displayName=Wd;var Ia="DialogPortal",[pb,Ud]=Hd(Ia,{forceMount:void 0}),Vd=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=We(Ia,e);return T.jsx(pb,{scope:e,forceMount:n,children:C.Children.map(r,a=>T.jsx(wi,{present:n||o.open,children:T.jsx(Nd,{asChild:!0,container:i,children:a})}))})};Vd.displayName=Ia;var ri="DialogOverlay",Gd=C.forwardRef((t,e)=>{const n=Ud(ri,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=We(ri,t.__scopeDialog);return o.modal?T.jsx(wi,{present:r||o.open,children:T.jsx(gb,{...i,ref:e})}):null});Gd.displayName=ri;var gb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(ri,n);return T.jsx(jd,{as:Pa,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(be.div,{"data-state":ka(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Mt="DialogContent",qd=C.forwardRef((t,e)=>{const n=Ud(Mt,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=We(Mt,t.__scopeDialog);return T.jsx(wi,{present:r||o.open,children:o.modal?T.jsx(vb,{...i,ref:e}):T.jsx(mb,{...i,ref:e})})});qd.displayName=Mt;var vb=C.forwardRef((t,e)=>{const n=We(Mt,t.__scopeDialog),r=C.useRef(null),i=zt(e,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return db(o)},[]),T.jsx(Yd,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:vt(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:vt(t.onFocusOutside,o=>o.preventDefault())})}),mb=C.forwardRef((t,e)=>{const n=We(Mt,t.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return T.jsx(Yd,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=t.onCloseAutoFocus)==null||a.call(t,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Yd=C.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=t,s=We(Mt,n),l=C.useRef(null),u=zt(e,l);return Ty(),T.jsxs(T.Fragment,{children:[T.jsx(_d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:T.jsx(Od,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ka(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(wb,{titleId:s.titleId}),T.jsx($b,{contentRef:l,descriptionId:s.descriptionId})]})]})}),_a="DialogTitle",yb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(_a,n);return T.jsx(be.h2,{id:i.titleId,...r,ref:e})});yb.displayName=_a;var Xd="DialogDescription",bb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Xd,n);return T.jsx(be.p,{id:i.descriptionId,...r,ref:e})});bb.displayName=Xd;var Jd="DialogClose",Sb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Jd,n);return T.jsx(be.button,{type:"button",...r,ref:e,onClick:vt(t.onClick,()=>i.onOpenChange(!1))})});Sb.displayName=Jd;function ka(t){return t?"open":"closed"}var Qd="DialogTitleWarning",[Tx,Zd]=qm(Qd,{contentName:Mt,titleName:_a,docsSlug:"dialog"}),wb=({titleId:t})=>{const e=Zd(Qd),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
87
+ `)},lb=0,qt=[];function ub(t){var e=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(lb++)[0],o=C.useState(Ld)[0],a=C.useRef(t);C.useEffect(function(){a.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var f=Eg([t.lockRef.current],(t.shards||[]).map(fl),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var s=C.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!a.current.allowPinchZoom;var y=Cr(f),S=n.current,w="deltaX"in f?f.deltaX:S[0]-y[0],D="deltaY"in f?f.deltaY:S[1]-y[1],x,O=f.target,P=Math.abs(w)>Math.abs(D)?"h":"v";if("touches"in f&&P==="h"&&O.type==="range")return!1;var b=cl(P,O);if(!b)return!0;if(b?x=P:(x=P==="v"?"h":"v",b=cl(P,O)),!b)return!1;if(!r.current&&"changedTouches"in f&&(w||D)&&(r.current=x),!x)return!0;var R=r.current||x;return ob(R,v,f,R==="h"?w:D)},[]),l=C.useCallback(function(f){var v=f;if(!(!qt.length||qt[qt.length-1]!==o)){var y="deltaY"in v?dl(v):Cr(v),S=e.current.filter(function(x){return x.name===v.type&&(x.target===v.target||v.target===x.shadowParent)&&ab(x.delta,y)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var w=(a.current.shards||[]).map(fl).filter(Boolean).filter(function(x){return x.contains(v.target)}),D=w.length>0?s(v,w[0]):!a.current.noIsolation;D&&v.cancelable&&v.preventDefault()}}},[]),u=C.useCallback(function(f,v,y,S){var w={name:f,delta:v,target:y,should:S,shadowParent:cb(y)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(D){return D!==w})},1)},[]),c=C.useCallback(function(f){n.current=Cr(f),r.current=void 0},[]),h=C.useCallback(function(f){u(f.type,dl(f),f.target,s(f,t.lockRef.current))},[]),p=C.useCallback(function(f){u(f.type,Cr(f),f.target,s(f,t.lockRef.current))},[]);C.useEffect(function(){return qt.push(o),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Gt),document.addEventListener("touchmove",l,Gt),document.addEventListener("touchstart",c,Gt),function(){qt=qt.filter(function(f){return f!==o}),document.removeEventListener("wheel",l,Gt),document.removeEventListener("touchmove",l,Gt),document.removeEventListener("touchstart",c,Gt)}},[]);var g=t.removeScrollBar,m=t.inert;return C.createElement(C.Fragment,null,m?C.createElement(o,{styles:sb(i)}):null,g?C.createElement(Qy,{gapMode:t.gapMode}):null)}function cb(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const db=Fy(Kd,ub);var Hd=C.forwardRef(function(t,e){return C.createElement(Ei,Ge({},t,{ref:e,sideCar:db}))});Hd.classNames=Ei.classNames;var fb=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Yt=new WeakMap,Tr=new WeakMap,Dr={},no=0,Bd=function(t){return t&&(t.host||Bd(t.parentNode))},hb=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Bd(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},pb=function(t,e,n,r){var i=hb(e,Array.isArray(t)?t:[t]);Dr[n]||(Dr[n]=new WeakMap);var o=Dr[n],a=[],s=new Set,l=new Set(i),u=function(h){!h||s.has(h)||(s.add(h),u(h.parentNode))};i.forEach(u);var c=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(s.has(p))c(p);else try{var g=p.getAttribute(r),m=g!==null&&g!=="false",f=(Yt.get(p)||0)+1,v=(o.get(p)||0)+1;Yt.set(p,f),o.set(p,v),a.push(p),f===1&&m&&Tr.set(p,!0),v===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return c(e),s.clear(),no++,function(){a.forEach(function(h){var p=Yt.get(h)-1,g=o.get(h)-1;Yt.set(h,p),o.set(h,g),p||(Tr.has(h)||h.removeAttribute(r),Tr.delete(h)),g||h.removeAttribute(n)}),no--,no||(Yt=new WeakMap,Yt=new WeakMap,Tr=new WeakMap,Dr={})}},gb=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=fb(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),pb(r,i,n,"aria-hidden")):function(){return null}},Oa="Dialog",[Wd,Ox]=Zm(Oa),[vb,We]=Wd(Oa),Ud=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,s=C.useRef(null),l=C.useRef(null),[u=!1,c]=ry({prop:r,defaultProp:i,onChange:o});return T.jsx(vb,{scope:e,triggerRef:s,contentRef:l,contentId:it(),titleId:it(),descriptionId:it(),open:u,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(h=>!h),[c]),modal:a,children:n})};Ud.displayName=Oa;var Vd="DialogTrigger",mb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Vd,n),o=zt(e,i.triggerRef);return T.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ka(i.open),...r,ref:o,onClick:mt(t.onClick,i.onOpenToggle)})});mb.displayName=Vd;var Ia="DialogPortal",[yb,Gd]=Wd(Ia,{forceMount:void 0}),qd=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=We(Ia,e);return T.jsx(yb,{scope:e,forceMount:n,children:C.Children.map(r,a=>T.jsx(wi,{present:n||o.open,children:T.jsx(Md,{asChild:!0,container:i,children:a})}))})};qd.displayName=Ia;var ii="DialogOverlay",Yd=C.forwardRef((t,e)=>{const n=Gd(ii,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=We(ii,t.__scopeDialog);return o.modal?T.jsx(wi,{present:r||o.open,children:T.jsx(bb,{...i,ref:e})}):null});Yd.displayName=ii;var bb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(ii,n);return T.jsx(Hd,{as:Pa,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(be.div,{"data-state":ka(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),At="DialogContent",Xd=C.forwardRef((t,e)=>{const n=Gd(At,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=We(At,t.__scopeDialog);return T.jsx(wi,{present:r||o.open,children:o.modal?T.jsx(Sb,{...i,ref:e}):T.jsx(wb,{...i,ref:e})})});Xd.displayName=At;var Sb=C.forwardRef((t,e)=>{const n=We(At,t.__scopeDialog),r=C.useRef(null),i=zt(e,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return gb(o)},[]),T.jsx(Jd,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:mt(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:mt(t.onFocusOutside,o=>o.preventDefault())})}),wb=C.forwardRef((t,e)=>{const n=We(At,t.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return T.jsx(Jd,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=t.onCloseAutoFocus)==null||a.call(t,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Jd=C.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=t,s=We(At,n),l=C.useRef(null),u=zt(e,l);return Iy(),T.jsxs(T.Fragment,{children:[T.jsx(Rd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:T.jsx(_d,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ka(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(Cb,{titleId:s.titleId}),T.jsx(Db,{contentRef:l,descriptionId:s.descriptionId})]})]})}),_a="DialogTitle",Eb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(_a,n);return T.jsx(be.h2,{id:i.titleId,...r,ref:e})});Eb.displayName=_a;var Qd="DialogDescription",$b=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Qd,n);return T.jsx(be.p,{id:i.descriptionId,...r,ref:e})});$b.displayName=Qd;var Zd="DialogClose",xb=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=We(Zd,n);return T.jsx(be.button,{type:"button",...r,ref:e,onClick:mt(t.onClick,()=>i.onOpenChange(!1))})});xb.displayName=Zd;function ka(t){return t?"open":"closed"}var ef="DialogTitleWarning",[Ix,tf]=Qm(ef,{contentName:At,titleName:_a,docsSlug:"dialog"}),Cb=({titleId:t})=>{const e=tf(ef),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
88
88
 
89
89
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
90
90
 
91
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Eb="DialogDescriptionWarning",$b=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zd(Eb).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},xb=Bd,Cb=Vd,Tb=Gd,Db=qd,Nn='[cmdk-group=""]',ro='[cmdk-group-items=""]',Pb='[cmdk-group-heading=""]',Na='[cmdk-item=""]',dl=`${Na}:not([aria-disabled="true"])`,Go="cmdk-item-select",St="data-value",Ob=(t,e,n)=>Gm(t,e,n),ef=C.createContext(void 0),ar=()=>C.useContext(ef),tf=C.createContext(void 0),Ra=()=>C.useContext(tf),nf=C.createContext(void 0),rf=C.forwardRef((t,e)=>{let n=sn(()=>{var M,N;return{search:"",value:(N=(M=t.value)!=null?M:t.defaultValue)!=null?N:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),s=of(t),{label:l,children:u,value:c,onValueChange:p,filter:g,shouldFilter:h,loop:y,disablePointerSelection:f=!1,vimBindings:v=!0,...m}=t,S=it(),w=it(),O=it(),x=C.useRef(null),D=jb();At(()=>{if(c!==void 0){let M=c.trim();n.current.value=M,P.emit()}},[c]),At(()=>{D(6,E)},[]);let P=C.useMemo(()=>({subscribe:M=>(a.current.add(M),()=>a.current.delete(M)),snapshot:()=>n.current,setState:(M,N,L)=>{var K,W,U;if(!Object.is(n.current[M],N)){if(n.current[M]=N,M==="search")z(),B(),D(1,R);else if(M==="value"&&(L||D(5,E),((K=s.current)==null?void 0:K.value)!==void 0)){let F=N??"";(U=(W=s.current).onValueChange)==null||U.call(W,F);return}P.emit()}},emit:()=>{a.current.forEach(M=>M())}}),[]),b=C.useMemo(()=>({value:(M,N,L)=>{var K;N!==((K=o.current.get(M))==null?void 0:K.value)&&(o.current.set(M,{value:N,keywords:L}),n.current.filtered.items.set(M,k(N,L)),D(2,()=>{B(),P.emit()}))},item:(M,N)=>(r.current.add(M),N&&(i.current.has(N)?i.current.get(N).add(M):i.current.set(N,new Set([M]))),D(3,()=>{z(),B(),n.current.value||R(),P.emit()}),()=>{o.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let L=I();D(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===M&&R(),P.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:O,labelId:w,listInnerRef:x}),[]);function k(M,N){var L,K;let W=(K=(L=s.current)==null?void 0:L.filter)!=null?K:Ob;return M?W(M,n.current.search,N):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,N=[];n.current.filtered.groups.forEach(K=>{let W=i.current.get(K),U=0;W.forEach(F=>{let X=M.get(F);U=Math.max(X,U)}),N.push([K,U])});let L=x.current;j().sort((K,W)=>{var U,F;let X=K.getAttribute("id"),te=W.getAttribute("id");return((U=M.get(te))!=null?U:0)-((F=M.get(X))!=null?F:0)}).forEach(K=>{let W=K.closest(ro);W?W.appendChild(K.parentElement===W?K:K.closest(`${ro} > *`)):L.appendChild(K.parentElement===L?K:K.closest(`${ro} > *`))}),N.sort((K,W)=>W[1]-K[1]).forEach(K=>{var W;let U=(W=x.current)==null?void 0:W.querySelector(`${Nn}[${St}="${encodeURIComponent(K[0])}"]`);U==null||U.parentElement.appendChild(U)})}function R(){let M=j().find(L=>L.getAttribute("aria-disabled")!=="true"),N=M==null?void 0:M.getAttribute(St);P.setState("value",N||void 0)}function z(){var M,N,L,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let W=0;for(let U of r.current){let F=(N=(M=o.current.get(U))==null?void 0:M.value)!=null?N:"",X=(K=(L=o.current.get(U))==null?void 0:L.keywords)!=null?K:[],te=k(F,X);n.current.filtered.items.set(U,te),te>0&&W++}for(let[U,F]of i.current)for(let X of F)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(U);break}n.current.filtered.count=W}function E(){var M,N,L;let K=I();K&&(((M=K.parentElement)==null?void 0:M.firstChild)===K&&((L=(N=K.closest(Nn))==null?void 0:N.querySelector(Pb))==null||L.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function I(){var M;return(M=x.current)==null?void 0:M.querySelector(`${Na}[aria-selected="true"]`)}function j(){var M;return Array.from(((M=x.current)==null?void 0:M.querySelectorAll(dl))||[])}function V(M){let N=j()[M];N&&P.setState("value",N.getAttribute(St))}function A(M){var N;let L=I(),K=j(),W=K.findIndex(F=>F===L),U=K[W+M];(N=s.current)!=null&&N.loop&&(U=W+M<0?K[K.length-1]:W+M===K.length?K[0]:K[W+M]),U&&P.setState("value",U.getAttribute(St))}function _(M){let N=I(),L=N==null?void 0:N.closest(Nn),K;for(;L&&!K;)L=M>0?Lb(L,Nn):Fb(L,Nn),K=L==null?void 0:L.querySelector(dl);K?P.setState("value",K.getAttribute(St)):A(M)}let H=()=>V(j().length-1),Y=M=>{M.preventDefault(),M.metaKey?H():M.altKey?_(1):A(1)},Q=M=>{M.preventDefault(),M.metaKey?V(0):M.altKey?_(-1):A(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:M=>{var N;if((N=m.onKeyDown)==null||N.call(m,M),!M.defaultPrevented)switch(M.key){case"n":case"j":{v&&M.ctrlKey&&Y(M);break}case"ArrowDown":{Y(M);break}case"p":case"k":{v&&M.ctrlKey&&Q(M);break}case"ArrowUp":{Q(M);break}case"Home":{M.preventDefault(),V(0);break}case"End":{M.preventDefault(),H();break}case"Enter":if(!M.nativeEvent.isComposing&&M.keyCode!==229){M.preventDefault();let L=I();if(L){let K=new Event(Go);L.dispatchEvent(K)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Hb},l),$i(t,M=>C.createElement(tf.Provider,{value:P},C.createElement(ef.Provider,{value:b},M))))}),Ib=C.forwardRef((t,e)=>{var n,r;let i=it(),o=C.useRef(null),a=C.useContext(nf),s=ar(),l=of(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;At(()=>{if(!u)return s.item(i,a==null?void 0:a.id)},[u]);let c=af(i,o,[t.value,t.children,o],t.keywords),p=Ra(),g=Kt(D=>D.value&&D.value===c.current),h=Kt(D=>u||s.filter()===!1?!0:D.search?D.filtered.items.get(i)>0:!0);C.useEffect(()=>{let D=o.current;if(!(!D||t.disabled))return D.addEventListener(Go,y),()=>D.removeEventListener(Go,y)},[h,t.onSelect,t.disabled]);function y(){var D,P;f(),(P=(D=l.current).onSelect)==null||P.call(D,c.current)}function f(){p.setState("value",c.current,!0)}if(!h)return null;let{disabled:v,value:m,onSelect:S,forceMount:w,keywords:O,...x}=t;return C.createElement(be.div,{ref:Zn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!g,"data-disabled":!!v,"data-selected":!!g,onPointerMove:v||s.getDisablePointerSelection()?void 0:f,onClick:v?void 0:y},t.children)}),_b=C.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),s=C.useRef(null),l=C.useRef(null),u=it(),c=ar(),p=Kt(h=>i||c.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);At(()=>c.group(a),[]),af(a,s,[t.value,t.heading,l]);let g=C.useMemo(()=>({id:a,forceMount:i}),[i]);return C.createElement(be.div,{ref:Zn([s,e]),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&C.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,h=>C.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},C.createElement(nf.Provider,{value:g},h))))}),kb=C.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=C.useRef(null),o=Kt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Nb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Ra(),a=Kt(c=>c.search),s=Kt(c=>c.value),l=ar(),u=C.useMemo(()=>{var c;let p=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Na}[${St}="${encodeURIComponent(s)}"]`);return p==null?void 0:p.getAttribute("id")},[]);return C.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),C.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),Rb=C.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=C.useRef(null),a=C.useRef(null),s=ar();return C.useEffect(()=>{if(a.current&&o.current){let l=a.current,u=o.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=l.offsetHeight;u.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(l),()=>{cancelAnimationFrame(c),p.unobserve(l)}}},[]),C.createElement(be.div,{ref:Zn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},$i(t,l=>C.createElement("div",{ref:Zn([a,s.listInnerRef]),"cmdk-list-sizer":""},l)))}),Mb=C.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=t;return C.createElement(xb,{open:n,onOpenChange:r},C.createElement(Cb,{container:a},C.createElement(Tb,{"cmdk-overlay":"",className:i}),C.createElement(Db,{"aria-label":t.label,"cmdk-dialog":"",className:o},C.createElement(rf,{ref:e,...s}))))}),Ab=C.forwardRef((t,e)=>Kt(n=>n.filtered.count===0)?C.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),Kb=C.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return C.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,a=>C.createElement("div",{"aria-hidden":!0},a)))}),Qn=Object.assign(rf,{List:Rb,Item:Ib,Input:Nb,Group:_b,Separator:kb,Dialog:Mb,Empty:Ab,Loading:Kb});function Lb(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Fb(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function of(t){let e=C.useRef(t);return At(()=>{e.current=t}),e}var At=typeof window>"u"?C.useEffect:C.useLayoutEffect;function sn(t){let e=C.useRef();return e.current===void 0&&(e.current=t()),e}function Zn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Kt(t){let e=Ra(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function af(t,e,n,r=[]){let i=C.useRef(),o=ar();return At(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());o.value(t,s,l),(a=e.current)==null||a.setAttribute(St,s),i.current=s}),i}var jb=()=>{let[t,e]=C.useState(),n=sn(()=>new Map);return At(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function zb(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function $i({asChild:t,children:e},n){return t&&C.isValidElement(e)?C.cloneElement(zb(e),{ref:e.ref},n(e.props.children)):n(e)}var Hb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>T.jsx("div",{className:jt("c__horizontal-separator",{"with-padding":t})}),sf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=vn.useCunningham();return i?T.jsxs(T.Fragment,{children:[i,o&&T.jsx(qo,{})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"quick-search-input-container",children:[!t&&T.jsx("span",{className:"material-icons",children:"search"}),t&&T.jsx("div",{children:T.jsx(Da,{size:"sm"})}),T.jsx(Qn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:s=>{s.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&T.jsx(qo,{withPadding:!1})]})},Bb=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},Wb=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:s})=>{const l=d.useRef(null);return T.jsx(T.Fragment,{children:T.jsx("div",{className:"quick-search-container",children:T.jsxs(Qn,{label:o,shouldFilter:!1,ref:l,children:[i&&T.jsx(sf,{loading:r,withSeparator:Bb(s),inputValue:n,onFilter:t,placeholder:a,children:e}),T.jsx(Qn.List,{children:T.jsx("div",{children:s})})]})})})},Rr=({children:t,onSelect:e,id:n})=>T.jsx(Qn.Item,{value:n,onSelect:e,children:t}),Ub=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:T.jsx("div",{className:"pt-base",children:T.jsxs(Qn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>T.jsx(Rr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&T.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Vb=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=vi();return T.jsxs("div",{className:"c__quick-search-item-template",children:[T.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&T.jsx("div",{className:jt("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},Gb=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:T.jsx("div",{className:jt("c__tabs",{"c__tabs__full-width":n}),children:T.jsxs(em,{defaultSelectedKey:e,children:[T.jsx(nm,{"aria-label":"History of Ancient Rome",children:t.map(r=>T.jsxs(im,{id:r.id,children:[r.icon&&T.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>T.jsx(om,{id:r.id,children:r.content},r.id))]})}),lf=d.createContext(null);function Oe(){const t=d.useContext(lf);if(t===null)throw new Error("No Tree Api Provided");return t}const uf=d.createContext(null);function qb(){const t=d.useContext(uf);if(t===null)throw new Error("Provide a NodesContext");return t}const cf=d.createContext(null);function Yb(){const t=d.useContext(cf);if(t===null)throw new Error("Provide a DnDContext");return t}const df=d.createContext(0);function ff(){d.useContext(df)}function Mr(t,e,n){return Math.max(Math.min(t,n),e)}function hf(t){return t&&t.isLeaf}function pf(t){return t&&t.isInternal&&!t.isOpen}function gf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const vf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},mf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Xb(){}function Ma(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Ma(n,e);if(r)return r}return null}function ii(t,e){if(e(t),t.children)for(let n of t.children)ii(n,e)}function yf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Jb(e,r);break}n==null||n.focus()}function bf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Qb(e,r);break}n==null||n.focus()}function Jb(t,e){return e+1<t.length?t[e+1]:t[0]}function Qb(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Sf(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function jn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function wf(t){return t===null?null:wt(t)}function wt(t){return typeof t=="string"?t:t.id}function Zb(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Ef(t,...e){if(t)return t(...e)}function $f(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function xf(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function Cf(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const eS=Object.freeze(Object.defineProperty({__proto__:null,access:jn,bound:Mr,dfs:Ma,focusNextElement:yf,focusPrevElement:bf,getInsertIndex:xf,getInsertParentId:Cf,identify:wt,identifyNull:wf,indexOf:mf,isClosed:pf,isDescendant:vf,isItem:hf,isOpenWithEmptyChildren:gf,mergeRefs:Zb,noop:Xb,safeRun:Ef,waitFor:$f,walk:ii},Symbol.toStringTag,{value:"Module"})),tS={display:"flex",alignItems:"center",zIndex:1},nS={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},rS={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},iS=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return T.jsxs("div",{style:Object.assign(Object.assign({},tS),i),children:[T.jsx("div",{style:Object.assign({},rS)}),T.jsx("div",{style:Object.assign({},nS)})]})});function oS({node:t,attrs:e,innerRef:n,children:r}){return T.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function aS(t){return T.jsxs("div",{ref:t.dragHandle,style:t.style,children:[T.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?T.jsx(lS,Object.assign({},t)):T.jsx(sS,Object.assign({},t))]})}function sS(t){return T.jsx(T.Fragment,{children:T.jsx("span",{children:t.node.data.name})})}function lS({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),T.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function uS(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function cS(){return{type:"TREE_BLUR"}}function dS(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class oi{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new oi(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function fl(t){var e;function n(o,a,s){const l=t.accessId(o),u=new oi({tree:t,data:o,level:a,parent:s,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(p=>n(p,a+1,u))),u}const r=new oi({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function hl(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function fS(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:hl(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:hl(t.unfiltered,e)}):t}const Sn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:wt(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(wt)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(wt)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:wt(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:wt(t)})};function hS(t=Sn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const wn={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function pS(t=Sn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return Sn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const gS={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},vS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},mS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Tf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return T.jsxs(yS,{isDragging:i,children:[T.jsx(bS,{offset:t,children:T.jsx(wS,{id:n,dragIds:r})}),T.jsx(SS,{mouse:e,count:r.length})]})}const yS=d.memo(function(e){return e.isDragging?T.jsx("div",{style:gS,children:e.children}):null});function bS(t){return T.jsx("div",{className:"row preview",style:vS(t.offset),children:t.children})}function SS(t){const{count:e,mouse:n}=t;return e>1?T.jsx("div",{className:"selected-count",style:mS(n),children:e}):null}const wS=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?T.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(null,arguments)}function pl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(t,e)}function ES(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jo(t,e)}var gl=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function $S(t,e){return!!(t===e||gl(t)&&gl(e))}function xS(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!$S(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=xS);var n,r=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&e(s,r)||(i=t.apply(this,s),o=!0,n=this,r=s),i}return a}var CS=typeof performance=="object"&&typeof performance.now=="function",vl=CS?function(){return performance.now()}:function(){return Date.now()};function ml(t){cancelAnimationFrame(t.id)}function TS(t,e){var n=vl();function r(){vl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function yl(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function bl(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var DS=150,PS=function(e,n){return e},Ar=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Ar=new WeakSet,Kr=new WeakSet);function OS(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(p){ES(g,p);function g(y){var f;return f=p.call(this,y)||this,f._instanceProps=l(f.props,pl(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:pl(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,m,S,w){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:m,visibleStartIndex:S,visibleStopIndex:w})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,m,S){return f.props.onScroll({scrollDirection:v,scrollOffset:m,scrollUpdateWasRequested:S})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var m=f.props,S=m.direction,w=m.itemSize,O=m.layout,x=f._getItemStyleCache(u&&w,u&&O,u&&S),D;if(x.hasOwnProperty(v))D=x[v];else{var P=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=S==="horizontal"||O==="horizontal",B=S==="rtl",R=k?P:0;x[v]=D={position:"absolute",left:B?void 0:R,right:B?R:void 0,top:k?0:P,height:k?"100%":b,width:k?b:"100%"}}return D},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,m,S){return{}}),f._onScrollHorizontal=function(v){var m=v.currentTarget,S=m.clientWidth,w=m.scrollLeft,O=m.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var D=f.props.direction,P=w;if(D==="rtl")switch(bl()){case"negative":P=-w;break;case"positive-descending":P=O-S-w;break}return P=Math.max(0,Math.min(P,O-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var m=v.currentTarget,S=m.clientHeight,w=m.scrollHeight,O=m.scrollTop;f.setState(function(x){if(x.scrollOffset===O)return null;var D=Math.max(0,Math.min(O,w-S));return{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var m=f.props.outerRef;f._outerRef=v,typeof m=="function"?m(v):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&ml(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=TS(f._resetIsScrolling,DS)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}g.getDerivedStateFromProps=function(f,v){return IS(f,v),c(f),null};var h=g.prototype;return h.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(f,v){v===void 0&&(v="auto");var m=this.props,S=m.itemCount,w=m.layout,O=this.state.scrollOffset;f=Math.max(0,Math.min(f,S-1));var x=0;if(this._outerRef){var D=this._outerRef;w==="vertical"?x=D.scrollWidth>D.clientWidth?yl():0:x=D.scrollHeight>D.clientHeight?yl():0}this.scrollTo(o(this.props,f,v,O,this._instanceProps,x))},h.componentDidMount=function(){var f=this.props,v=f.direction,m=f.initialScrollOffset,S=f.layout;if(typeof m=="number"&&this._outerRef!=null){var w=this._outerRef;v==="horizontal"||S==="horizontal"?w.scrollLeft=m:w.scrollTop=m}this._callPropsCallbacks()},h.componentDidUpdate=function(){var f=this.props,v=f.direction,m=f.layout,S=this.state,w=S.scrollOffset,O=S.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||m==="horizontal")if(v==="rtl")switch(bl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var D=x.clientWidth,P=x.scrollWidth;x.scrollLeft=P-D-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ml(this._resetIsScrollingTimeoutId)},h.render=function(){var f=this.props,v=f.children,m=f.className,S=f.direction,w=f.height,O=f.innerRef,x=f.innerElementType,D=f.innerTagName,P=f.itemCount,b=f.itemData,k=f.itemKey,B=k===void 0?PS:k,R=f.layout,z=f.outerElementType,E=f.outerTagName,I=f.style,j=f.useIsScrolling,V=f.width,A=this.state.isScrolling,_=S==="horizontal"||R==="horizontal",H=_?this._onScrollHorizontal:this._onScrollVertical,Y=this._getRangeToRender(),Q=Y[0],M=Y[1],N=[];if(P>0)for(var L=Q;L<=M;L++)N.push(d.createElement(v,{data:b,key:B(L,b),index:L,isScrolling:j?A:void 0,style:this._getItemStyle(L)}));var K=r(this.props,this._instanceProps);return d.createElement(z||E||"div",{className:m,onScroll:H,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},I)},d.createElement(x||D||"div",{children:N,ref:O,style:{height:_?"100%":K,pointerEvents:A?"none":void 0,width:_?K:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),m=v[0],S=v[1],w=v[2],O=v[3];this._callOnItemsRendered(m,S,w,O)}}if(typeof this.props.onScroll=="function"){var x=this.state,D=x.scrollDirection,P=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(D,P,b)}},h._getRangeToRender=function(){var f=this.props,v=f.itemCount,m=f.overscanCount,S=this.state,w=S.isScrolling,O=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var D=a(this.props,x,this._instanceProps),P=s(this.props,D,x,this._instanceProps),b=!w||O==="backward"?Math.max(1,m):1,k=!w||O==="forward"?Math.max(1,m):1;return[Math.max(0,D-b),Math.max(0,Math.min(v-1,P+k)),D,P]},g}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var IS=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,s=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(s!=null||l!=null)&&Kr&&!Kr.has(c)&&(Kr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var p=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Ar&&!Ar.has(c)&&(Ar.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(p&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!p&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},_S=OS({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var s=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,p=e.layout,g=e.width,h=s==="horizontal"||p==="horizontal",y=h?g:l,f=Math.max(0,u*c-y),v=Math.min(f,n*c),m=Math.max(0,n*c-y+c+a);switch(r==="smart"&&(i>=m-y&&i<=v+y?r="auto":r="center"),r){case"start":return v;case"end":return m;case"center":{var S=Math.round(m+(v-m)/2);return S<Math.ceil(y/2)?0:S>f+Math.floor(y/2)?f:S}case"auto":default:return i>=m&&i<=v?i:i<m?m:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",p=n*s,g=c?u:o,h=Math.ceil((g+r-p)/s);return Math.max(0,Math.min(a-1,n+h-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function kS(){var t,e;const n=Oe(),i=Yb().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),s=o*i.level,l=n.renderCursor;return T.jsx(l,{top:a,left:s,indent:o})}var NS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const RS=d.forwardRef(function(e,n){const{children:r}=e,i=NS(e,["children"]),o=Oe();return T.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[T.jsx(MS,{}),r]}))}),MS=()=>{const t=Oe();return T.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:T.jsx(kS,{})})};var AS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const KS=d.forwardRef(function(e,n){var r,i,o,a,{style:s}=e,l=AS(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,p=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return T.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+p}px`})},l))});var Df=d.createContext({dragDropManager:void 0}),Me;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Me||(Me={}));function J(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Aa="dnd-core/INIT_COORDS",xi="dnd-core/BEGIN_DRAG",Ka="dnd-core/PUBLISH_DRAG_SOURCE",Ci="dnd-core/HOVER",Ti="dnd-core/DROP",Di="dnd-core/END_DRAG";function Sl(t,e){return{type:Aa,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Lr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lr=function(n){return typeof n}:Lr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lr(t)}function LS(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function FS(t,e){return t.filter(function(n){return n!==e})}function Pf(t){return Lr(t)==="object"}function jS(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function zS(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var HS={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function BS(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,s=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(Sl(a)),WS(n,l,u);var c=GS(n,l);if(c===null){t.dispatch(HS);return}var p=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");US(s),p=s(c)}t.dispatch(Sl(a,p));var g=u.getSource(c),h=g.beginDrag(l,c);if(h!=null){VS(h),u.pinSource(c);var y=u.getSourceType(c);return{type:xi,payload:{itemType:y,item:h,sourceId:c,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!o}}}}}function WS(t,e,n){J(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){J(n.getSource(r),"Expected sourceIds to be registered.")})}function US(t){J(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function VS(t){J(Pf(t),"Item must be an object.")}function GS(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function qS(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Ka}}}function Qo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function YS(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;XS(n);var o=n.slice(0),a=t.getMonitor(),s=t.getRegistry();JS(o,a,s);var l=a.getItemType();return QS(o,s,l),ZS(o,a,s),{type:Ci,payload:{targetIds:o,clientOffset:i||null}}}}function XS(t){J(Array.isArray(t),"Expected targetIds to be an array.")}function JS(t,e,n){J(e.isDragging(),"Cannot call hover while not dragging."),J(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];J(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);J(o,"Expected targetIds to be registered.")}}function QS(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Qo(o,n)||t.splice(r,1)}}function ZS(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function El(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wl(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tw(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();nw(r);var o=ow(r);o.forEach(function(a,s){var l=rw(a,s,i,r),u={type:Ti,payload:{dropResult:El(El({},n),l)}};t.dispatch(u)})}}function nw(t){J(t.isDragging(),"Cannot call drop while not dragging."),J(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function rw(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return iw(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function iw(t){J(typeof t>"u"||Pf(t),"Drop result must either be an object or undefined.")}function ow(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function aw(t){return function(){var n=t.getMonitor(),r=t.getRegistry();sw(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Di}}}function sw(t){J(t.isDragging(),"Cannot call endDrag while not dragging.")}function lw(t){return{beginDrag:BS(t),publishDragSource:qS(t),hover:YS(t),drop:tw(t),endDrag:aw(t)}}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dw(t,e,n){return cw(t.prototype,e),t}function Rn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fw=function(){function t(e,n){var r=this;uw(this,t),Rn(this,"store",void 0),Rn(this,"monitor",void 0),Rn(this,"backend",void 0),Rn(this,"isSetUp",!1),Rn(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return dw(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.apply(n,l);typeof c<"u"&&r(c)}}var o=lw(this);return Object.keys(o).reduce(function(a,s){var l=o[s];return a[s]=i(l),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function _e(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var $l=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),so=function(){return Math.random().toString(36).substring(7).split("").join(".")},xl={INIT:"@@redux/INIT"+so(),REPLACE:"@@redux/REPLACE"+so(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+so()}};function hw(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function pw(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(mw(t))return"date";if(vw(t))return"error";var n=gw(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function gw(t){return typeof t.constructor=="function"?t.constructor.name:null}function vw(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function mw(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=pw(t)),e}function Of(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_e(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 n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_e(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(Of)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_e(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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 o}function p(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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 v=!0;return u(),s.push(f),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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.");v=!1,u();var S=s.indexOf(f);s.splice(S,1),a=null}}}function g(f){if(!hw(f))throw new Error(process.env.NODE_ENV==="production"?_e(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. 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 f.type>"u")throw new Error(process.env.NODE_ENV==="production"?_e(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_e(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,f)}finally{l=!1}for(var v=a=s,m=0;m<v.length;m++){var S=v[m];S()}return f}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,g({type:xl.REPLACE})}function y(){var f,v=p;return f={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?_e(11):"Expected the observer to be an object. Instead, received: '"+Qt(S)+"'");function w(){S.next&&S.next(c())}w();var O=v(w);return{unsubscribe:O}}},f[$l]=function(){return this},f}return g({type:xl.INIT}),r={dispatch:g,subscribe:p,getState:c,replaceReducer:h},r[$l]=y,r}var yw=function(e,n){return e===n};function bw(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Sw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yw;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Cl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cl(Object(n),!0).forEach(function(r){ww(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ww(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dl={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ew(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dl,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Aa:case xi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ci:return bw(t.clientOffset,n.clientOffset)?t:Tl(Tl({},t),{},{clientOffset:n.clientOffset});case Di:case Ti:return Dl;default:return t}}var La="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function $w(t){return{type:La,payload:{sourceId:t}}}function xw(t){return{type:Fa,payload:{targetId:t}}}function Cw(t){return{type:ja,payload:{sourceId:t}}}function Tw(t){return{type:Pi,payload:{targetId:t}}}function Pl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pl(Object(n),!0).forEach(function(r){Dw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Dw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ow(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pw,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case xi:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Ka:return ke(ke({},t),{},{isSourcePublic:!0});case Ci:return ke(ke({},t),{},{targetIds:n.targetIds});case Pi:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:FS(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Di:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Iw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case La:case Fa:return t+1;case ja:case Pi:return t-1;default:return t}}var ai=[],za=[];ai.__IS_NONE__=!0;za.__IS_ALL__=!0;function _w(t,e){if(t===ai)return!1;if(t===za||typeof e>"u")return!0;var n=zS(e,t);return n.length>0}function kw(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ci:break;case La:case Fa:case Pi:case ja:return ai;case xi:case Ka:case Di:case Ti:default:return za}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=jS(r,o),s=a.length>0||!Sw(r,o);if(!s)return ai;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function Nw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function Ol(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Il(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ol(Object(n),!0).forEach(function(r){Rw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Rw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:kw(t.dirtyHandlerIds,{type:e.type,payload:Il(Il({},e.payload),{},{prevTargetIds:LS(t,"dragOperation.targetIds",[])})}),dragOffset:Ew(t.dragOffset,e),refCount:Iw(t.refCount,e),dragOperation:Ow(t.dragOperation,e),stateId:Nw(t.stateId)}}function Aw(t,e){return{x:t.x+e.x,y:t.y+e.y}}function If(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Kw(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:If(Aw(e,r),n)}function Lw(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:If(e,n)}function Fw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zw(t,e,n){return jw(t.prototype,e),t}function _l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hw=function(){function t(e,n){Fw(this,t),_l(this,"store",void 0),_l(this,"registry",void 0),this.store=e,this.registry=n}return zw(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;J(typeof n=="function","listener must be a function."),J(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=r.store.getState(),c=u.stateId;try{var p=c===a||c===a+1&&!_w(u.dirtyHandlerIds,o);p||n()}finally{a=c}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;J(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var s=r.store.getState().dragOffset;s!==i&&(i=s,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return J(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(J(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Qo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(J(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Qo(o,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(n);return i?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Kw(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Lw(this.store.getState().dragOffset)}}]),t}(),Bw=0;function Ww(){return Bw++}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function Uw(t){J(typeof t.canDrag=="function","Expected canDrag to be a function."),J(typeof t.beginDrag=="function","Expected beginDrag to be a function."),J(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Vw(t){J(typeof t.canDrop=="function","Expected canDrop to be a function."),J(typeof t.hover=="function","Expected hover to be a function."),J(typeof t.drop=="function","Expected beginDrag to be a function.")}function Zo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Zo(n,!1)});return}J(typeof t=="string"||Fr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const kl=typeof global<"u"?global:self,_f=kl.MutationObserver||kl.WebKitMutationObserver;function kf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Gw(t){let e=1;const n=new _f(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const qw=typeof _f=="function"?Gw:kf;class Yw{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.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 n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;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=qw(this.flush),this.requestErrorThrow=kf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Xw{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Jw{create(e){const n=this.freeTasks,r=n.length?n.pop():new Xw(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Nf=new Yw,Qw=new Jw(Nf.registerPendingError);function Zw(t){Nf.enqueueTask(Qw.create(t))}function e0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n0(t,e,n){return t0(t.prototype,e),t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r0(t,e){return s0(t)||a0(t,e)||o0(t,e)||i0()}function i0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o0(t,e){if(t){if(typeof t=="string")return Nl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(t,e)}}function Nl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function s0(t){if(Array.isArray(t))return t}function l0(t){var e=Ww().toString();switch(t){case Me.SOURCE:return"S".concat(e);case Me.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function Rl(t){switch(t[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:J(!1,"Cannot parse handler ID: ".concat(t))}}function Ml(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,a=r0(i.value,2),s=a[1];if(s===e)return!0;r=!!o}while(!r);return!1}var u0=function(){function t(e){e0(this,t),Zt(this,"types",new Map),Zt(this,"dragSources",new Map),Zt(this,"dropTargets",new Map),Zt(this,"pinnedSourceId",null),Zt(this,"pinnedSource",null),Zt(this,"store",void 0),this.store=e}return n0(t,[{key:"addSource",value:function(n,r){Zo(n),Uw(r);var i=this.addHandler(Me.SOURCE,n,r);return this.store.dispatch($w(i)),i}},{key:"addTarget",value:function(n,r){Zo(n,!0),Vw(r);var i=this.addHandler(Me.TARGET,n,r);return this.store.dispatch(xw(i)),i}},{key:"containsHandler",value:function(n){return Ml(this.dragSources,n)||Ml(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;J(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(n);return o}},{key:"getTarget",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return J(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=Rl(n);return r===Me.SOURCE}},{key:"isTargetId",value:function(n){var r=Rl(n);return r===Me.TARGET}},{key:"removeSource",value:function(n){var r=this;J(this.getSource(n),"Expected an existing source."),this.store.dispatch(Cw(n)),Zw(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){J(this.getTarget(n),"Expected an existing target."),this.store.dispatch(Tw(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);J(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){J(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var o=l0(n);return this.types.set(o,r),n===Me.SOURCE?this.dragSources.set(o,i):n===Me.TARGET&&this.dropTargets.set(o,i),o}}]),t}();function c0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=d0(r),o=new Hw(i,new u0(i)),a=new fw(i,o),s=t(a,e,n);return a.receiveBackend(s),a}function d0(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Of(Mw,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var f0=["children"];function h0(t,e){return m0(t)||v0(t,e)||g0(t,e)||p0()}function p0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
93
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g0(t,e){if(t){if(typeof t=="string")return Al(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Al(t,e)}}function Al(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function m0(t){if(Array.isArray(t))return t}function y0(t,e){if(t==null)return{};var n=b0(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function b0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Kl=0,jr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),S0=d.memo(function(e){var n=e.children,r=y0(e,f0),i=w0(r),o=h0(i,2),a=o[0],s=o[1];return d.useEffect(function(){if(s){var l=Rf();return++Kl,function(){--Kl===0&&(l[jr]=null)}}},[]),T.jsx(Df.Provider,Object.assign({value:a},{children:n}),void 0)});function w0(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=E0(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function E0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rf(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[jr]||(i[jr]={dragDropManager:c0(t,e,n,r)}),i[jr]}function Rf(){return typeof global<"u"?global:window}function $0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C0(t,e,n){return x0(t.prototype,e),t}function Ll(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lo=!1,uo=!1,T0=function(){function t(e){$0(this,t),Ll(this,"internalMonitor",void 0),Ll(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return C0(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){J(!lo,"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 lo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lo=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;J(!uo,"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 uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function D0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O0(t,e,n){return P0(t.prototype,e),t}function Fl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,I0=function(){function t(e){D0(this,t),Fl(this,"internalMonitor",void 0),Fl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return O0(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;J(!co,"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 co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function _0(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function k0(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;_0(i);var o=n?function(a){return t(a,n)}:t;return N0(i,o)}}function Mf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=k0(r);e[n]=function(){return i}}}),e}function jl(t,e){typeof t=="function"?t(e):t.current=e}function N0(t,e){var n=t.ref;return J(typeof n!="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"),n?d.cloneElement(t,{ref:function(i){jl(n,i),jl(e,i)}}):d.cloneElement(t,{ref:e})}function zr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zr=function(n){return typeof n}:zr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(t)}function ea(t){return t!==null&&zr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=t[u],p=e[u];if(i=void 0,i===!1||i===void 0&&c!==p)return!1}return!0}function R0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A0(t,e,n){return M0(t.prototype,e),t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K0=function(){function t(e){var n=this;R0(this,t),we(this,"hooks",Mf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),we(this,"handlerId",null),we(this,"dragSourceRef",null),we(this,"dragSourceNode",void 0),we(this,"dragSourceOptionsInternal",null),we(this,"dragSourceUnsubscribe",void 0),we(this,"dragPreviewRef",null),we(this,"dragPreviewNode",void 0),we(this,"dragPreviewOptionsInternal",null),we(this,"dragPreviewUnsubscribe",void 0),we(this,"lastConnectedHandlerId",null),we(this,"lastConnectedDragSource",null),we(this,"lastConnectedDragSourceOptions",null),we(this,"lastConnectedDragPreview",null),we(this,"lastConnectedDragPreviewOptions",null),we(this,"backend",void 0),this.backend=e}return A0(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function L0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j0(t,e,n){return F0(t.prototype,e),t}function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z0=function(){function t(e){var n=this;L0(this,t),Ve(this,"hooks",Mf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ve(this,"handlerId",null),Ve(this,"dropTargetRef",null),Ve(this,"dropTargetNode",void 0),Ve(this,"dropTargetOptionsInternal",null),Ve(this,"unsubscribeDropTarget",void 0),Ve(this,"lastConnectedHandlerId",null),Ve(this,"lastConnectedDropTarget",null),Ve(this,"lastConnectedDropTargetOptions",null),Ve(this,"backend",void 0),this.backend=e}return j0(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function H0(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function B0(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Lt=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Hr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hr=function(n){return typeof n}:Hr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hr(t)}function W0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V0(t,e,n){return U0(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var G0=function(){function t(e,n,r){W0(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return V0(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Hr(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function q0(t,e,n){var r=d.useMemo(function(){return new G0(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Ht(){var t=d.useContext(Df),e=t.dragDropManager;return J(e!=null,"Expected drag drop context"),e}function Y0(t){return d.useMemo(function(){var e=t.type;return J(e!=null,"spec.type must be defined"),e},[t])}function X0(t,e){return eE(t)||Z0(t,e)||Q0(t,e)||J0()}function J0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
94
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q0(t,e){if(t){if(typeof t=="string")return zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zl(t,e)}}function zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function eE(t){if(Array.isArray(t))return t}function tE(t,e,n){var r=Ht(),i=q0(t,e,n),o=Y0(t);Lt(function(){if(o!=null){var s=B0(o,i,r),l=X0(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,e,n,i,o])}function nE(t){return aE(t)||oE(t)||iE(t)||rE()}function rE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
95
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iE(t,e){if(t){if(typeof t=="string")return na(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(t,e)}}function oE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aE(t){if(Array.isArray(t))return na(t)}function na(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Af(t,e){var n=nE(e||[]);return e==null&&typeof t!="function"&&n.push(t),d.useMemo(function(){return typeof t=="function"?t():t},n)}function sE(){var t=Ht();return d.useMemo(function(){return new T0(t)},[t])}function lE(t,e){var n=Ht(),r=d.useMemo(function(){return new K0(n.getBackend())},[n]);return Lt(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),Lt(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var ho,Hl;function uE(){return Hl||(Hl=1,ho=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}),ho}var cE=uE();const dE=ih(cE);function fE(t,e){return vE(t)||gE(t,e)||pE(t,e)||hE()}function hE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
96
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pE(t,e){if(t){if(typeof t=="string")return Bl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bl(t,e)}}function Bl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function vE(t){if(Array.isArray(t))return t}function Kf(t,e,n){var r=d.useState(function(){return e(t)}),i=fE(r,2),o=i[0],a=i[1],s=d.useCallback(function(){var l=e(t);dE(o,l)||(a(l),n&&n())},[o,t,n]);return Lt(s),[o,s]}function mE(t,e){return wE(t)||SE(t,e)||bE(t,e)||yE()}function yE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
97
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bE(t,e){if(t){if(typeof t=="string")return Wl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wl(t,e)}}function Wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function SE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function wE(t){if(Array.isArray(t))return t}function EE(t,e,n){var r=Kf(t,e,n),i=mE(r,2),o=i[0],a=i[1];return Lt(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(a,{handlerIds:[l]})},[t,a]),o}function Lf(t,e,n){return EE(e,t||function(){return{}},function(){return n.reconnect()})}function $E(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function xE(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function CE(t,e){var n=Af(t,e);J(!n.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)");var r=sE(),i=lE(n.options,n.previewOptions);return tE(n,r,i),[Lf(n.collect,r,i),$E(i),xE(i)]}function TE(t){var e=t.accept;return d.useMemo(function(){return J(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function DE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function OE(t,e,n){return PE(t.prototype,e),t}function Ul(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var IE=function(){function t(e,n){DE(this,t),Ul(this,"spec",void 0),Ul(this,"monitor",void 0),this.spec=e,this.monitor=n}return OE(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function _E(t,e){var n=d.useMemo(function(){return new IE(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function kE(t,e){return AE(t)||ME(t,e)||RE(t,e)||NE()}function NE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
98
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RE(t,e){if(t){if(typeof t=="string")return Vl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vl(t,e)}}function Vl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ME(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function AE(t){if(Array.isArray(t))return t}function KE(t,e,n){var r=Ht(),i=_E(t,e),o=TE(t);Lt(function(){var s=H0(o,i,r),l=kE(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,e,i,n,o.map(function(a){return a.toString()}).join("|")])}function LE(){var t=Ht();return d.useMemo(function(){return new I0(t)},[t])}function FE(t){var e=Ht(),n=d.useMemo(function(){return new z0(e.getBackend())},[e]);return Lt(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function jE(t){return d.useMemo(function(){return t.hooks.dropTarget()},[t])}function Ff(t,e){var n=Af(t,e),r=LE(),i=FE(n.options);return KE(n,r,i),[Lf(n.collect,r,i),jE(i)]}function zE(t,e){return UE(t)||WE(t,e)||BE(t,e)||HE()}function HE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
99
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BE(t,e){if(t){if(typeof t=="string")return Gl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(t,e)}}function Gl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function WE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function UE(t){if(Array.isArray(t))return t}function VE(t){var e=Ht(),n=e.getMonitor(),r=Kf(n,t),i=zE(r,2),o=i[0],a=i[1];return d.useEffect(function(){return n.subscribeToOffsetChange(a)}),d.useEffect(function(){return n.subscribeToStateChange(a)}),o}function jf(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function GE(t,e){return t.filter(function(n){return n!==e})}function qE(t,e){var n=new Set,r=function(a){return n.add(a)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o){return i.push(o)}),i}function YE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function JE(t,e,n){return XE(t.prototype,e),t}function ql(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var QE=function(){function t(e){YE(this,t),ql(this,"entered",[]),ql(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return JE(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,o=function(s){return r.isNodeInDocument(s)&&(!s.contains||s.contains(n))};return this.entered=qE(this.entered.filter(o),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=GE(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),ZE=jf(function(){return/firefox/i.test(navigator.userAgent)}),zf=jf(function(){return!!window.safari});function e$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n$(t,e,n){return t$(t.prototype,e),t}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yl=function(){function t(e,n){e$(this,t),Mn(this,"xs",void 0),Mn(this,"ys",void 0),Mn(this,"c1s",void 0),Mn(this,"c2s",void 0),Mn(this,"c3s",void 0);for(var r=e.length,i=[],o=0;o<r;o++)i.push(o);i.sort(function(b,k){return e[b]<e[k]?-1:1});for(var a=[],s=[],l,u,c=0;c<r-1;c++)l=e[c+1]-e[c],u=n[c+1]-n[c],a.push(l),s.push(u/l);for(var p=[s[0]],g=0;g<a.length-1;g++){var h=s[g],y=s[g+1];if(h*y<=0)p.push(0);else{l=a[g];var f=a[g+1],v=l+f;p.push(3*v/((v+f)/h+(v+l)/y))}}p.push(s[s.length-1]);for(var m=[],S=[],w,O=0;O<p.length-1;O++){w=s[O];var x=p[O],D=1/a[O],P=x+p[O+1]-w-w;m.push((w-x-P)*D),S.push(P*D*D)}this.xs=e,this.ys=n,this.c1s=p,this.c2s=m,this.c3s=S}return n$(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,o=this.c1s,a=this.c2s,s=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var u=0,c=s.length-1,p;u<=c;){p=Math.floor(.5*(u+c));var g=r[p];if(g<n)u=p+1;else if(g>n)c=p-1;else return i[p]}l=Math.max(0,c);var h=n-r[l],y=h*h;return i[l]+o[l]*h+a[l]*y+s[l]*h*y}}]),t}(),r$=1;function Hf(t){var e=t.nodeType===r$?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Dr(t){return{x:t.clientX,y:t.clientY}}function i$(t){var e;return t.nodeName==="IMG"&&(ZE()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function o$(t,e,n,r){var i=t?e.width:n,o=t?e.height:r;return zf()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function a$(t,e,n,r,i){var o=i$(e),a=o?t:e,s=Hf(a),l={x:n.x-s.x,y:n.y-s.y},u=t.offsetWidth,c=t.offsetHeight,p=r.anchorX,g=r.anchorY,h=o$(o,e,u,c),y=h.dragPreviewWidth,f=h.dragPreviewHeight,v=function(){var P=new Yl([0,.5,1],[l.y,l.y/c*f,l.y+f-c]),b=P.interpolate(g);return zf()&&o&&(b+=(window.devicePixelRatio-1)*f),b},m=function(){var P=new Yl([0,.5,1],[l.x,l.x/u*y,l.x+y-u]);return P.interpolate(p)},S=i.offsetX,w=i.offsetY,O=S===0||S,x=w===0||w;return{x:O?S:m(),y:x?w:v()}}var Bf="__NATIVE_FILE__",Wf="__NATIVE_URL__",Uf="__NATIVE_TEXT__",Vf="__NATIVE_HTML__";const Xl=Object.freeze(Object.defineProperty({__proto__:null,FILE:Bf,HTML:Vf,TEXT:Uf,URL:Wf},Symbol.toStringTag,{value:"Module"}));function po(t,e,n){var r=e.reduce(function(i,o){return i||t.getData(o)},"");return r??n}var en;function Pr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ra=(en={},Pr(en,Bf,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Pr(en,Vf,{exposeProperties:{html:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Pr(en,Wf,{exposeProperties:{urls:function(e,n){return po(e,n,"").split(`
100
- `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Pr(en,Uf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),en);function s$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u$(t,e,n){return l$(t.prototype,e),t}function Jl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c$=function(){function t(e){s$(this,t),Jl(this,"item",void 0),Jl(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return u$(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function d$(t,e){var n=new c$(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function f$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p$(t,e,n){return h$(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g$=function(){function t(e,n){f$(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return p$(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function Ql(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ql(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y$(t,e,n){return m$(t.prototype,e),t}function ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b$=function(){function t(e,n,r){var i=this;v$(this,t),ne(this,"options",void 0),ne(this,"actions",void 0),ne(this,"monitor",void 0),ne(this,"registry",void 0),ne(this,"enterLeaveCounter",void 0),ne(this,"sourcePreviewNodes",new Map),ne(this,"sourcePreviewNodeOptions",new Map),ne(this,"sourceNodes",new Map),ne(this,"sourceNodeOptions",new Map),ne(this,"dragStartSourceIds",null),ne(this,"dropTargetIds",[]),ne(this,"dragEnterTargetIds",[]),ne(this,"currentNativeSource",null),ne(this,"currentNativeHandle",null),ne(this,"currentDragSourceNode",null),ne(this,"altKeyPressed",!1),ne(this,"mouseMoveTimeoutTimer",null),ne(this,"asyncEndDragFrameId",null),ne(this,"dragOverTargetIds",null),ne(this,"lastClientOffset",null),ne(this,"hoverRafId",null),ne(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&Hf(a)||null}),ne(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),ne(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),ne(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),ne(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var s=Dr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:s});var l=o.dataTransfer,u=go(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),p=i.sourceNodes.get(c),g=i.sourcePreviewNodes.get(c)||p;if(g){var h=i.getCurrentSourcePreviewNodeOptions(),y=h.anchorX,f=h.anchorY,v=h.offsetX,m=h.offsetY,S={anchorX:y,anchorY:f},w={offsetX:v,offsetY:m},O=a$(p,g,s,S,w);l.setDragImage(g,O.x,O.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),D=x.captureDraggingState;D?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(l&&!l.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),ne(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var s=o.dataTransfer,l=go(s);l&&i.beginDragNativeItem(l,s)}}),ne(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Dr(o)});var s=a.some(function(l){return i.monitor.canDropOnTarget(l)});s&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Dr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var s=(a||[]).some(function(l){return i.monitor.canDropOnTarget(l)});s?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),ne(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Dr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new g$(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new QE(this.isNodeInDocument)}return y$(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},s=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",s),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},s=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",s),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return Zl({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return Zl({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Xl).some(function(r){return Xl[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=d$(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Or;function S$(){return Or||(Or=new Image,Or.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Or}var w$=function(e,n,r){return new b$(e,n,r)};function E$(t){const e=Oe(),n=e.selectedIds,[r,i,o]=CE(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(wn.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(wn.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(S$())},[o]),i}function $$(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,s=!a,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:a,inBottomHalf:s,inMiddle:u,atTop:!u&&a,atBottom:!u&&s}}function x$(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Ir(t,e){return{parentId:t||null,index:e}}function tn(t,e){return{type:"line",index:t,level:e}}function C$(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=mf(r)+1;return{parentId:i,index:o}}function Gf(t){var e;const n=$$(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:s}=t,[l,u]=x$(o,s,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:Ir(o.id,null),cursor:C$(o.id)};if(!l)return{drop:Ir((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:tn(0,0)};if(hf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(pf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(gf(l)){const c=Mr(i,0,l.level+1);return c>l.level?{drop:Ir(l.id,0),cursor:tn(l.rowIndex+1,c)}:{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}return{drop:Ir(l==null?void 0:l.id,0),cursor:tn(l.rowIndex+1,l.level+1)}}function T$(t,e){const n=Oe(),[r,i]=Ff(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const s=a.getClientOffset();if(!t.current||!s)return;const{cursor:l,drop:u}=Gf({element:t.current,offset:s,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(wn.hovering(u.parentId,u.index)),a.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:s,index:l,dragIds:u}=n.state.dnd;Ef(n.props.onMove,{dragIds:u,parentId:s===er?null:s,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(s)}),n.open(s)}}),[e,t.current,n.props]);return i}function D$(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const P$=d.memo(function({index:e,style:n}){ff(),qb();const r=Oe(),i=D$(e),o=d.useRef(null),a=E$(i),s=T$(o,i),l=d.useCallback(f=>{o.current=f,s(f)},[s]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),p=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),g={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const h=r.renderNode,y=r.renderRow;return T.jsx(y,{node:i,innerRef:l,attrs:g,children:T.jsx(h,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",eu=null;function qf(){ff();const t=Oe();return T.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,s=o.parent;t.focus(a||s,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),yf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),bf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(eu),yo+=e.key,eu=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:T.jsx(_S,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:RS,innerElementType:KS,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:P$})})}function tu(t){return t.isFiltered?I$(t.root,t.isMatch.bind(t)):O$(t.root)}function O$(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(Yf),e}function I$(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let l=a.parent;for(;l;)n[l.id]=!0,l=l.parent}if(a.children)for(let l of a.children)i(l)}function o(a){var s;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((s=a.children)===null||s===void 0||s.forEach(o))}return i(t),o(t),r.forEach(Yf),r}function Yf(t,e){t.rowIndex=e}const nu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(p){a(p)}}function l(c){try{u(r.throw(c))}catch(p){a(p)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=eS;class Wn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}update(e){this.props=e,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=jn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=jn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),s=Math.max(i,o);return this.visibleNodes.slice(a,s+1)}indexOf(e){const n=wf(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?Cf(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:xf(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",s=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{Wn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=Wn.editPromise;n&&n(e),Wn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&vf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(wn.cursor({type:"none"}))}showCursor(e){this.dispatch(wn.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=Ma(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){ii(this.root,e=>{e.isInternal&&e.open()})}closeAll(){ii(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),$f(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!jn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!jn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(cS())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||qf}get renderRow(){return this.props.renderRow||oS}get renderNode(){return this.props.children||aS}get renderDragPreview(){return this.props.renderDragPreview||Tf}get renderCursor(){return this.props.renderCursor||iS}}function Ee(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var _$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ru=_$,So=()=>Math.random().toString(36).substring(7).split("").join("."),k$={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Pt=k$;function Xf(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function N$(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(A$(t))return"date";if(M$(t))return"error";const n=R$(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function R$(t){return typeof t.constructor=="function"?t.constructor.name:null}function M$(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function A$(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function ct(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=N$(t)),e}function Jf(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(2):`Expected the root reducer to be a function. Instead, received: '${ct(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ee(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 n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(1):`Expected the enhancer to be a function. Instead, received: '${ct(n)}'`);return n(Jf)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((v,m)=>{a.set(m,v)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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 i}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${ct(v)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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.");let m=!0;u();const S=s++;return a.set(S,v),function(){if(m){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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.");m=!1,u(),a.delete(S),o=null}}}function g(v){if(!Xf(v))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${ct(v)}'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${ct(v.type)}'. Value was: '${v.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,v)}finally{l=!1}return(o=a).forEach(S=>{S()}),v}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${ct(v)}`);r=v,g({type:Pt.REPLACE})}function y(){const v=p;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${ct(m)}'`);function S(){const O=m;O.next&&O.next(c())}return S(),{unsubscribe:v(S)}},[ru](){return this}}}return g({type:Pt.INIT}),{dispatch:g,subscribe:p,getState:c,replaceReducer:h,[ru]:y}}function iu(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function K$(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Pt.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Xf(t))return`The ${o} has unexpected type of "${ct(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(s=>!e.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Pt.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function L$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Pt.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Pt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Pt.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function ou(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const s=e[a];process.env.NODE_ENV!=="production"&&typeof t[s]>"u"&&iu(`No reducer provided for key "${s}"`),typeof t[s]=="function"&&(n[s]=t[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{L$(n)}catch(a){o=a}return function(s={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=K$(s,n,l,i);p&&iu(p)}let u=!1;const c={};for(let p=0;p<r.length;p++){const g=r[p],h=n[g],y=s[g],f=h(y,l);if(typeof f>"u"){const v=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${g}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[g]=f,u=u||f!==y}return u=u||r.length!==Object.keys(s).length,u?c:s}}function F$(t=Sn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const j$=ou({nodes:ou({focus:dS,edit:uS,open:fS,selection:hS,drag:F$}),dnd:pS}),z$=Sn();function H$({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(Jf(j$,Sn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>z$),s=d.useMemo(()=>new Wn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,s.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>s),d.useEffect(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),d.useEffect(()=>{s.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[s.props.searchTerm]),T.jsx(lf.Provider,{value:s,children:T.jsx(df.Provider,{value:l.current,children:T.jsx(uf.Provider,{value:a.nodes,children:T.jsx(cf.Provider,{value:a.dnd,children:T.jsx(S0,Object.assign({backend:w$,options:{rootElement:s.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function B$(){const t=Oe(),[,e]=Ff(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Gf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(wn.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function W$(t){return B$(),t.children}function U$(){const e=Oe().props.renderContainer||qf;return T.jsx(T.Fragment,{children:T.jsx(e,{})})}function V$(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=VE(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Tf;return T.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class G${constructor(e){this.root=q$(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function q$(t){const e=new Qf({id:"ROOT"},null);return e.children=t.map(n=>Ha(n,e)),e}function Ha(t,e){const n=new Qf(t,e);return t.children&&(n.children=t.children.map(r=>Ha(r,n))),n}class Qf{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=Ha(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let Y$=0;function X$(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new G$(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:p})=>{const g={id:`simple-tree-id-${Y$++}`,name:""};return p==="internal"&&(g.children=[]),r.create({parentId:u,index:c,data:g}),n(r.data),g},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function J$(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
101
- Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=X$(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function Q$(t,e){const n=J$(t);return T.jsxs(H$,{treeProps:n,imperativeHandle:e,children:[T.jsx(W$,{children:T.jsx(U$,{})}),T.jsx(V$,{})]})}const Z$=d.forwardRef(Q$),Zf=({top:t,left:e})=>T.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10}});function ex(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,s=r.current,l=a||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function au(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function tx(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],s=o[1],l=d.useRef(!1);d.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=ex(d.useCallback(function(p){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(g){var h=g[0],y=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=au(h,y,"inlineSize"),v=au(h,y,"blockSize"),m=f?r(f):void 0,S=v?r(v):void 0;if(u.current.width!==m||u.current.height!==S){var w={width:m,height:S};u.current.width=m,u.current.height=S,n.current?n.current(w):l.current||s(w)}})}),i.current.instance.observe(p,{box:t.box}),function(){i.current&&i.current.instance.unobserve(p)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Ae=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ae||{}),Et=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))(Et||{});const si=t=>t?t.type===Ae.SEPARATOR:!1,li=t=>t?t.type===Ae.TITLE:!1,zn=t=>!si(t)&&!li(t),nx=({treeData:t,initialOpenState:e,selectedNodeId:n,rootNodeId:r,renderNode:i,handleMove:o,canDrop:a,canDrag:s})=>{const{ref:l,width:u,height:c}=tx(),p=h=>{var I,j,V,A;const y=JSON.parse(JSON.stringify(t)),f=h.dragNodes[0],v=h.parentId?((I=h.parentNode)==null?void 0:I.data.children)??[]:y,m=h.dragNodes[0].data.value.id,S=h.dragNodes[0].data,w=(j=h.parentNode)==null?void 0:j.data;if((w==null?void 0:w.value.type)===Ae.TITLE||(w==null?void 0:w.value.type)===Ae.SEPARATOR)return null;const O=S.parentKey??r,x=h.parentId??r;let D=h.index+0,P=null,b=x;const k=((A=(V=f.parent)==null?void 0:V.children)==null?void 0:A.findIndex(_=>_.data.value.id===m))??0;if(O===x){if(k===D)return null;D=D<k?D:D-1}const B=h.index-1,R=v[B],z=h.index,E=v[z];return h.index===0?(b=h.parentId??r,P=Et.FIRST_CHILD):!w&&h.index===1&&!zn(R.value)?(b=r,D=1,P=Et.FIRST_CHILD):h.index===v.length?(b=b??r,P=Et.LAST_CHILD):R&&zn(R.value)?(b=R.value.id,P=Et.RIGHT):E&&zn(E.value)&&(P=Et.LEFT,b=E.value.id),P&&b?{targetModeId:b,mode:P,oldParentId:O,index:D,newParentId:h.parentId,sourceId:m}:null},g=h=>{const y=p(h);y&&(o==null||o(y))};return T.jsx("div",{ref:l,className:"c__tree-view--container",children:T.jsx(Z$,{data:t,openByDefault:!1,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:h=>s?!s(h):!1,disableDrop:({parentNode:h,dragNodes:y,index:f})=>{var w,O;if(a&&!a({parentNode:h,dragNodes:y,index:f}))return h.data.value.canDrop=!1,!0;if(((w=h.data.value)==null?void 0:w.type)===Ae.TITLE||((O=h.data.value)==null?void 0:O.type)===Ae.SEPARATOR)return!0;if(h.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const x=t[f-1],D=t[f],P=t[f+1],b=si(x==null?void 0:x.value),k=si(D==null?void 0:D.value),B=li(x==null?void 0:x.value),R=li(D==null?void 0:D.value),z=zn(P==null?void 0:P.value);return!!(f===0&&(k||R)||b&&R&&z||B&&k&&z)}const v=h==null?void 0:h.isOpen,m=(h==null?void 0:h.data.value.childrenCount)&&h.data.value.childrenCount>0||(h==null?void 0:h.data.children)&&h.data.children.length>0;if(!m)return h.data.value.canDrop=!0,!1;let S=h.data.value.childrenCount&&h.data.value.childrenCount>0&&(h==null?void 0:h.data.children)&&h.data.children.length>0;return S=S??!0,!v&&!S&&m?(h.data.value.canDrop=!0,!0):(h.data.value.canDrop=!0,!1)},paddingBottom:30,width:u,initialOpenState:e,height:c,overscanCount:20,selection:n,renderCursor:Zf,renderRow:h=>{const y=h.node.data.value.type===Ae.TITLE,f=h.node.data.value.type===Ae.SEPARATOR,{style:v}=h.attrs,m={...v};return y||f?T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:h.children}):T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:T.jsx("div",{style:{padding:"0 12px"},children:h.children})})},rowClassName:"c__tree-view--row",children:h=>i(h)})})},rx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ix(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function ox(t){return"nodeType"in t}function ax(t){var e,n;return t?ix(t)?t:ox(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const eh=rx?d.useLayoutEffect:d.useEffect;function th(t){const e=d.useRef(t);return eh(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function su(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return eh(()=>{n.current!==t&&(n.current=t)},e),n}function sx(t){const e=th(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let wo={};function lx(t,e){return d.useMemo(()=>{const n=wo[t]==null?0:wo[t]+1;return wo[t]=n,t+"-"+n},[t,e])}var Un;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Un||(Un={}));function lu(){}const ux=Object.freeze({x:0,y:0});function cx(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function dx(t,e,n){const r=cx(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,p=o?t.height/o:t.height;return{width:c,height:p,top:u,right:l+c,bottom:u+p,left:l}}const fx={ignoreTransform:!1};function nh(t,e){e===void 0&&(e=fx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=ax(t).getComputedStyle(t);u&&(n=dx(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function uu(t){return nh(t,{ignoreTransform:!0})}var dn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(dn||(dn={}));var cu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(cu||(cu={}));var ft;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ft||(ft={}));ft.Space,ft.Enter,ft.Esc,ft.Space,ft.Enter,ft.Tab;var du;(function(t){t[t.RightClick=2]="RightClick"})(du||(du={}));var fu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(fu||(fu={}));var hu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(hu||(hu={}));dn.Backward+"",dn.Forward+"",dn.Backward+"",dn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function hx(t){let{callback:e,disabled:n}=t;const r=th(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const px={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:lu,draggableNodes:new Map,over:null,measureDroppableContainers:lu},gx=d.createContext(px);({...ux});var pu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(pu||(pu={}));const vx="Droppable",mx={timeout:25};function yx(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=lx(vx),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(gx),c=d.useRef({disabled:n}),p=d.useRef(!1),g=d.useRef(null),h=d.useRef(null),{disabled:y,updateMeasurementsFor:f,timeout:v}={...mx,...i},m=su(f??r),S=d.useCallback(()=>{if(!p.current){p.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},v)},[v]),w=hx({callback:S,disabled:y||!a}),O=d.useCallback((b,k)=>{w&&(k&&(w.unobserve(k),p.current=!1),b&&w.observe(b))},[w]),[x,D]=sx(O),P=su(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),p.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(s({type:Un.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:g,data:P}}),()=>s({type:Un.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(s({type:Un.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:g,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:D}}const bx=t=>{const{isOver:e,setNodeRef:n}=yx({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),T.jsx("div",{ref:n,children:t.children})},Sx=({children:t,onClick:e,node:n,dragHandle:r,style:i,loadChildren:o,forceLoading:a})=>{var w,O;const s=d.useRef(null),[l,u]=d.useState(!1),[c,p]=d.useState(!1),g=a??l,h=n.willReceiveDrop||c,y=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,f=((O=n.children)==null?void 0:O.length)??!1,v=n.isLeaf||!y,m=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(o==null?void 0:o(n.data.value)),u(!1),n.open()}},[f,o,n,v]),S=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(s.current=setTimeout(()=>{m()},500)),s.current&&!x&&clearTimeout(s.current)},[m,n.isOpen,n.isDragging]);return d.useEffect(()=>{S(h)},[h,S]),n.data.value.type===Ae.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.type===Ae.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.title}):T.jsx(bx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:p,children:T.jsxs("div",{onClick:e,ref:r,style:i,className:jt("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&T.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&T.jsxs(T.Fragment,{children:[g&&T.jsx("div",{className:"c__tree-view--node__loading",children:T.jsx(Da,{})}),!g&&T.jsx("span",{onClick:x=>{x.stopPropagation(),m()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})},wx=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:s,append:l,prepend:u,getItem:c,move:p,items:g}=Cv({initialItems:JSON.parse(JSON.stringify(t)),getKey:A=>A.id,getChildren:A=>A.children||[]}),[h,y]=d.useState(),f=(A=[])=>{const _=g.map(Y=>Y.key);r(..._);const H=JSON.parse(JSON.stringify(A));H.length>0&&o(null,0,...H),y(void 0)},v=(A,_)=>{var H;if(A){const Y=c(A);Y&&(o(A,((H=Y.children)==null?void 0:H.length)??0,_),z(A,_))}else o(null,g.length,_)},m=(A,_)=>{const H=c(A);if(!H){console.error("No item found");return}let Y=H.value.children??null;_.children&&(Y=[...Y??[],..._.children]);const Q={...H.value,..._,children:Y,childrenCount:(Y==null?void 0:Y.length)??H.value.childrenCount};i(A,Q),H.parentKey&&w(H.parentKey,A,_)},S=A=>{const _=c(A),H=_==null?void 0:_.parentKey;H&&_&&R(H,_.value.id),r(A)},w=(A,_,H)=>{const Y=c(A);if(!Y)return;const Q=Y.value.children??[],M=Q.findIndex(L=>L.id===_);if(M===-1)return;const N={...Q[M],...H};Q[M]=N},O=async A=>{if(!e){console.error("No refresh callback provided");return}try{const _=await e(A);m(A,_)}catch(_){console.error("error while refreshing node:",_)}},x=A=>{o(null,g.length,A)},D=(A,_)=>{const H=c(A);if(!H){console.error("No item found");return}const Y={...H.value,children:_,childrenCount:_.length};i(A,Y)},P=(A,_)=>{a(A,_)},b=(A,_)=>{s(A,_)},k=(A,_)=>{l(A,_)},B=(A,_)=>{u(A,_)},R=(A,_)=>{const H=c(A);if(!H)return;const Q=(H.value.children??[]).filter(M=>M.id!==_);H.value.children=Q,H.value.childrenCount=Q.length},z=(A,_)=>{const H=c(A);if(!H)return;const Q=[...H.value.children??[],_];H.value.children=Q,H.value.childrenCount=Q.length},E=A=>{const _=c(A);_&&y(_.value)},I=(A,_,H,Y)=>{var M;const Q=(M=c(A))==null?void 0:M.value;p(A,_,H),_&&Q&&z(_,Q),Y&&R(Y,A)};return{nodes:g,addChild:v,updateNode:m,deleteNode:S,addRootNode:x,selectedNode:h,setSelectedNode:y,refreshNode:O,setChildren:D,insertBeforeNode:P,insertAfterNode:b,handleMove:A=>{I(A.sourceId,A.newParentId,A.index,A.oldParentId)},prependToNode:B,moveNode:I,appendToNode:k,move:p,resetTree:f,handleLoadChildren:async A=>{if(!n)return[];const _=await n(A);return m(A,{children:_,hasLoadedChildren:!0,childrenCount:_.length}),_},selectNodeById:E}};exports.CunninghamProvider=ph;exports.CustomTabs=Gb;exports.DropdownMenu=Qc;exports.Header=td;exports.HorizontalSeparator=qo;exports.Label=Cd;exports.LanguagePicker=ed;exports.LeftPanel=nd;exports.MainLayout=Am;exports.ProConnectButton=gh;exports.QuickSearch=Wb;exports.QuickSearchGroup=Ub;exports.QuickSearchInput=sf;exports.QuickSearchItem=Rr;exports.QuickSearchItemTemplate=Vb;exports.Spinner=Da;exports.TreeView=nx;exports.TreeViewItem=Sx;exports.TreeViewMoveModeEnum=Et;exports.TreeViewNodeTypeEnum=Ae;exports.TreeViewSeparator=Zf;exports.WithLabel=Lm;exports.cunninghamConfig=jo;exports.getLocales=vu;exports.headerHeight=Km;exports.isNode=zn;exports.isSeparator=si;exports.isTitle=li;exports.useDropdownMenu=Zc;exports.useResponsive=vi;exports.useTree=wx;
91
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Tb="DialogDescriptionWarning",Db=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tf(Tb).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},Pb=Ud,Ob=qd,Ib=Yd,_b=Xd,Nn='[cmdk-group=""]',ro='[cmdk-group-items=""]',kb='[cmdk-group-heading=""]',Ra='[cmdk-item=""]',hl=`${Ra}:not([aria-disabled="true"])`,Go="cmdk-item-select",wt="data-value",Rb=(t,e,n)=>Jm(t,e,n),nf=C.createContext(void 0),sr=()=>C.useContext(nf),rf=C.createContext(void 0),Na=()=>C.useContext(rf),of=C.createContext(void 0),af=C.forwardRef((t,e)=>{let n=sn(()=>{var k,_;return{search:"",value:(_=(k=t.value)!=null?k:t.defaultValue)!=null?_:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),s=sf(t),{label:l,children:u,value:c,onValueChange:h,filter:p,shouldFilter:g,loop:m,disablePointerSelection:f=!1,vimBindings:v=!0,...y}=t,S=it(),w=it(),D=it(),x=C.useRef(null),O=Wb();Kt(()=>{if(c!==void 0){let k=c.trim();n.current.value=k,P.emit()}},[c]),Kt(()=>{O(6,E)},[]);let P=C.useMemo(()=>({subscribe:k=>(a.current.add(k),()=>a.current.delete(k)),snapshot:()=>n.current,setState:(k,_,A)=>{var K,W,U;if(!Object.is(n.current[k],_)){if(n.current[k]=_,k==="search")z(),B(),O(1,N);else if(k==="value"&&(A||O(5,E),((K=s.current)==null?void 0:K.value)!==void 0)){let L=_??"";(U=(W=s.current).onValueChange)==null||U.call(W,L);return}P.emit()}},emit:()=>{a.current.forEach(k=>k())}}),[]),b=C.useMemo(()=>({value:(k,_,A)=>{var K;_!==((K=o.current.get(k))==null?void 0:K.value)&&(o.current.set(k,{value:_,keywords:A}),n.current.filtered.items.set(k,R(_,A)),O(2,()=>{B(),P.emit()}))},item:(k,_)=>(r.current.add(k),_&&(i.current.has(_)?i.current.get(_).add(k):i.current.set(_,new Set([k]))),O(3,()=>{z(),B(),n.current.value||N(),P.emit()}),()=>{o.current.delete(k),r.current.delete(k),n.current.filtered.items.delete(k);let A=I();O(4,()=>{z(),(A==null?void 0:A.getAttribute("id"))===k&&N(),P.emit()})}),group:k=>(i.current.has(k)||i.current.set(k,new Set),()=>{o.current.delete(k),i.current.delete(k)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:D,labelId:w,listInnerRef:x}),[]);function R(k,_){var A,K;let W=(K=(A=s.current)==null?void 0:A.filter)!=null?K:Rb;return k?W(k,n.current.search,_):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let k=n.current.filtered.items,_=[];n.current.filtered.groups.forEach(K=>{let W=i.current.get(K),U=0;W.forEach(L=>{let J=k.get(L);U=Math.max(J,U)}),_.push([K,U])});let A=x.current;j().sort((K,W)=>{var U,L;let J=K.getAttribute("id"),te=W.getAttribute("id");return((U=k.get(te))!=null?U:0)-((L=k.get(J))!=null?L:0)}).forEach(K=>{let W=K.closest(ro);W?W.appendChild(K.parentElement===W?K:K.closest(`${ro} > *`)):A.appendChild(K.parentElement===A?K:K.closest(`${ro} > *`))}),_.sort((K,W)=>W[1]-K[1]).forEach(K=>{var W;let U=(W=x.current)==null?void 0:W.querySelector(`${Nn}[${wt}="${encodeURIComponent(K[0])}"]`);U==null||U.parentElement.appendChild(U)})}function N(){let k=j().find(A=>A.getAttribute("aria-disabled")!=="true"),_=k==null?void 0:k.getAttribute(wt);P.setState("value",_||void 0)}function z(){var k,_,A,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let W=0;for(let U of r.current){let L=(_=(k=o.current.get(U))==null?void 0:k.value)!=null?_:"",J=(K=(A=o.current.get(U))==null?void 0:A.keywords)!=null?K:[],te=R(L,J);n.current.filtered.items.set(U,te),te>0&&W++}for(let[U,L]of i.current)for(let J of L)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(U);break}n.current.filtered.count=W}function E(){var k,_,A;let K=I();K&&(((k=K.parentElement)==null?void 0:k.firstChild)===K&&((A=(_=K.closest(Nn))==null?void 0:_.querySelector(kb))==null||A.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function I(){var k;return(k=x.current)==null?void 0:k.querySelector(`${Ra}[aria-selected="true"]`)}function j(){var k;return Array.from(((k=x.current)==null?void 0:k.querySelectorAll(hl))||[])}function V(k){let _=j()[k];_&&P.setState("value",_.getAttribute(wt))}function X(k){var _;let A=I(),K=j(),W=K.findIndex(L=>L===A),U=K[W+k];(_=s.current)!=null&&_.loop&&(U=W+k<0?K[K.length-1]:W+k===K.length?K[0]:K[W+k]),U&&P.setState("value",U.getAttribute(wt))}function M(k){let _=I(),A=_==null?void 0:_.closest(Nn),K;for(;A&&!K;)A=k>0?Hb(A,Nn):Bb(A,Nn),K=A==null?void 0:A.querySelector(hl);K?P.setState("value",K.getAttribute(wt)):X(k)}let Y=()=>V(j().length-1),F=k=>{k.preventDefault(),k.metaKey?Y():k.altKey?M(1):X(1)},H=k=>{k.preventDefault(),k.metaKey?V(0):k.altKey?M(-1):X(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:k=>{var _;if((_=y.onKeyDown)==null||_.call(y,k),!k.defaultPrevented)switch(k.key){case"n":case"j":{v&&k.ctrlKey&&F(k);break}case"ArrowDown":{F(k);break}case"p":case"k":{v&&k.ctrlKey&&H(k);break}case"ArrowUp":{H(k);break}case"Home":{k.preventDefault(),V(0);break}case"End":{k.preventDefault(),Y();break}case"Enter":if(!k.nativeEvent.isComposing&&k.keyCode!==229){k.preventDefault();let A=I();if(A){let K=new Event(Go);A.dispatchEvent(K)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Vb},l),$i(t,k=>C.createElement(rf.Provider,{value:P},C.createElement(nf.Provider,{value:b},k))))}),Nb=C.forwardRef((t,e)=>{var n,r;let i=it(),o=C.useRef(null),a=C.useContext(of),s=sr(),l=sf(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Kt(()=>{if(!u)return s.item(i,a==null?void 0:a.id)},[u]);let c=lf(i,o,[t.value,t.children,o],t.keywords),h=Na(),p=Lt(O=>O.value&&O.value===c.current),g=Lt(O=>u||s.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);C.useEffect(()=>{let O=o.current;if(!(!O||t.disabled))return O.addEventListener(Go,m),()=>O.removeEventListener(Go,m)},[g,t.onSelect,t.disabled]);function m(){var O,P;f(),(P=(O=l.current).onSelect)==null||P.call(O,c.current)}function f(){h.setState("value",c.current,!0)}if(!g)return null;let{disabled:v,value:y,onSelect:S,forceMount:w,keywords:D,...x}=t;return C.createElement(be.div,{ref:Zn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:f,onClick:v?void 0:m},t.children)}),Mb=C.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),s=C.useRef(null),l=C.useRef(null),u=it(),c=sr(),h=Lt(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Kt(()=>c.group(a),[]),lf(a,s,[t.value,t.heading,l]);let p=C.useMemo(()=>({id:a,forceMount:i}),[i]);return C.createElement(be.div,{ref:Zn([s,e]),...o,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&C.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,g=>C.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},C.createElement(of.Provider,{value:p},g))))}),Ab=C.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=C.useRef(null),o=Lt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Kb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Na(),a=Lt(c=>c.search),s=Lt(c=>c.value),l=sr(),u=C.useMemo(()=>{var c;let h=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Ra}[${wt}="${encodeURIComponent(s)}"]`);return h==null?void 0:h.getAttribute("id")},[]);return C.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),C.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),Lb=C.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=C.useRef(null),a=C.useRef(null),s=sr();return C.useEffect(()=>{if(a.current&&o.current){let l=a.current,u=o.current,c,h=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(c),h.unobserve(l)}}},[]),C.createElement(be.div,{ref:Zn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},$i(t,l=>C.createElement("div",{ref:Zn([a,s.listInnerRef]),"cmdk-list-sizer":""},l)))}),Fb=C.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=t;return C.createElement(Pb,{open:n,onOpenChange:r},C.createElement(Ob,{container:a},C.createElement(Ib,{"cmdk-overlay":"",className:i}),C.createElement(_b,{"aria-label":t.label,"cmdk-dialog":"",className:o},C.createElement(af,{ref:e,...s}))))}),jb=C.forwardRef((t,e)=>Lt(n=>n.filtered.count===0)?C.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),zb=C.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return C.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,a=>C.createElement("div",{"aria-hidden":!0},a)))}),Qn=Object.assign(af,{List:Lb,Item:Nb,Input:Kb,Group:Mb,Separator:Ab,Dialog:Fb,Empty:jb,Loading:zb});function Hb(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Bb(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function sf(t){let e=C.useRef(t);return Kt(()=>{e.current=t}),e}var Kt=typeof window>"u"?C.useEffect:C.useLayoutEffect;function sn(t){let e=C.useRef();return e.current===void 0&&(e.current=t()),e}function Zn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Lt(t){let e=Na(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function lf(t,e,n,r=[]){let i=C.useRef(),o=sr();return Kt(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());o.value(t,s,l),(a=e.current)==null||a.setAttribute(wt,s),i.current=s}),i}var Wb=()=>{let[t,e]=C.useState(),n=sn(()=>new Map);return Kt(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function Ub(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function $i({asChild:t,children:e},n){return t&&C.isValidElement(e)?C.cloneElement(Ub(e),{ref:e.ref},n(e.props.children)):n(e)}var Vb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>T.jsx("div",{className:ot("c__horizontal-separator",{"with-padding":t})}),uf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=mn.useCunningham();return i?T.jsxs(T.Fragment,{children:[i,o&&T.jsx(qo,{})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"quick-search-input-container",children:[!t&&T.jsx("span",{className:"material-icons",children:"search"}),t&&T.jsx("div",{children:T.jsx(Da,{size:"sm"})}),T.jsx(Qn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:s=>{s.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&T.jsx(qo,{withPadding:!1})]})},Gb=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},qb=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:s})=>{const l=d.useRef(null);return T.jsx(T.Fragment,{children:T.jsx("div",{className:"quick-search-container",children:T.jsxs(Qn,{label:o,shouldFilter:!1,ref:l,children:[i&&T.jsx(uf,{loading:r,withSeparator:Gb(s),inputValue:n,onFilter:t,placeholder:a,children:e}),T.jsx(Qn.List,{children:T.jsx("div",{children:s})})]})})})},Mr=({children:t,onSelect:e,id:n})=>T.jsx(Qn.Item,{value:n,onSelect:e,children:t}),Yb=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:T.jsx("div",{className:"pt-base",children:T.jsxs(Qn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>T.jsx(Mr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>T.jsx(Mr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>T.jsx(Mr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&T.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Xb=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=ar();return T.jsxs("div",{className:"c__quick-search-item-template",children:[T.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&T.jsx("div",{className:ot("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},Jb=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:T.jsx("div",{className:ot("c__tabs",{"c__tabs__full-width":n}),children:T.jsxs(rm,{defaultSelectedKey:e,children:[T.jsx(om,{"aria-label":"History of Ancient Rome",children:t.map(r=>T.jsxs(sm,{id:r.id,children:[r.icon&&T.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>T.jsx(lm,{id:r.id,children:r.content},r.id))]})}),cf=d.createContext(null);function Oe(){const t=d.useContext(cf);if(t===null)throw new Error("No Tree Api Provided");return t}const df=d.createContext(null);function Qb(){const t=d.useContext(df);if(t===null)throw new Error("Provide a NodesContext");return t}const ff=d.createContext(null);function Zb(){const t=d.useContext(ff);if(t===null)throw new Error("Provide a DnDContext");return t}const hf=d.createContext(0);function pf(){d.useContext(hf)}function Ar(t,e,n){return Math.max(Math.min(t,n),e)}function gf(t){return t&&t.isLeaf}function vf(t){return t&&t.isInternal&&!t.isOpen}function mf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const yf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},bf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function eS(){}function Ma(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Ma(n,e);if(r)return r}return null}function oi(t,e){if(e(t),t.children)for(let n of t.children)oi(n,e)}function Sf(t){const e=Ef(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=tS(e,r);break}n==null||n.focus()}function wf(t){const e=Ef(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=nS(e,r);break}n==null||n.focus()}function tS(t,e){return e+1<t.length?t[e+1]:t[0]}function nS(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Ef(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function zn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function $f(t){return t===null?null:Et(t)}function Et(t){return typeof t=="string"?t:t.id}function rS(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function xf(t,...e){if(t)return t(...e)}function Cf(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function Tf(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function Df(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const iS=Object.freeze(Object.defineProperty({__proto__:null,access:zn,bound:Ar,dfs:Ma,focusNextElement:Sf,focusPrevElement:wf,getInsertIndex:Tf,getInsertParentId:Df,identify:Et,identifyNull:$f,indexOf:bf,isClosed:vf,isDescendant:yf,isItem:gf,isOpenWithEmptyChildren:mf,mergeRefs:rS,noop:eS,safeRun:xf,waitFor:Cf,walk:oi},Symbol.toStringTag,{value:"Module"})),oS={display:"flex",alignItems:"center",zIndex:1},aS={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},sS={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},lS=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return T.jsxs("div",{style:Object.assign(Object.assign({},oS),i),children:[T.jsx("div",{style:Object.assign({},sS)}),T.jsx("div",{style:Object.assign({},aS)})]})});function uS({node:t,attrs:e,innerRef:n,children:r}){return T.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function cS(t){return T.jsxs("div",{ref:t.dragHandle,style:t.style,children:[T.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?T.jsx(fS,Object.assign({},t)):T.jsx(dS,Object.assign({},t))]})}function dS(t){return T.jsx(T.Fragment,{children:T.jsx("span",{children:t.node.data.name})})}function fS({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),T.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function hS(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function pS(){return{type:"TREE_BLUR"}}function gS(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class ai{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new ai(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function pl(t){var e;function n(o,a,s){const l=t.accessId(o),u=new ai({tree:t,data:o,level:a,parent:s,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(h=>n(h,a+1,u))),u}const r=new ai({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function gl(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function vS(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:gl(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:gl(t.unfiltered,e)}):t}const wn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:Et(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(Et)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(Et)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:Et(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:Et(t)})};function mS(t=wn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const En={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function yS(t=wn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return wn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const bS={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},SS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},wS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Pf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return T.jsxs(ES,{isDragging:i,children:[T.jsx($S,{offset:t,children:T.jsx(CS,{id:n,dragIds:r})}),T.jsx(xS,{mouse:e,count:r.length})]})}const ES=d.memo(function(e){return e.isDragging?T.jsx("div",{style:bS,children:e.children}):null});function $S(t){return T.jsx("div",{className:"row preview",style:SS(t.offset),children:t.children})}function xS(t){const{count:e,mouse:n}=t;return e>1?T.jsx("div",{className:"selected-count",style:wS(n),children:e}):null}const CS=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?T.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(null,arguments)}function vl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(t,e)}function TS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jo(t,e)}var ml=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function DS(t,e){return!!(t===e||ml(t)&&ml(e))}function PS(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!DS(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=PS);var n,r=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&e(s,r)||(i=t.apply(this,s),o=!0,n=this,r=s),i}return a}var OS=typeof performance=="object"&&typeof performance.now=="function",yl=OS?function(){return performance.now()}:function(){return Date.now()};function bl(t){cancelAnimationFrame(t.id)}function IS(t,e){var n=yl();function r(){yl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function Sl(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function wl(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var _S=150,kS=function(e,n){return e},Kr=null,Lr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Kr=new WeakSet,Lr=new WeakSet);function RS(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(h){TS(p,h);function p(m){var f;return f=h.call(this,m)||this,f._instanceProps=l(f.props,vl(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:vl(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,y,S,w){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:y,visibleStartIndex:S,visibleStopIndex:w})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,y,S){return f.props.onScroll({scrollDirection:v,scrollOffset:y,scrollUpdateWasRequested:S})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var y=f.props,S=y.direction,w=y.itemSize,D=y.layout,x=f._getItemStyleCache(u&&w,u&&D,u&&S),O;if(x.hasOwnProperty(v))O=x[v];else{var P=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),R=S==="horizontal"||D==="horizontal",B=S==="rtl",N=R?P:0;x[v]=O={position:"absolute",left:B?void 0:N,right:B?N:void 0,top:R?0:P,height:R?"100%":b,width:R?b:"100%"}}return O},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,y,S){return{}}),f._onScrollHorizontal=function(v){var y=v.currentTarget,S=y.clientWidth,w=y.scrollLeft,D=y.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var O=f.props.direction,P=w;if(O==="rtl")switch(wl()){case"negative":P=-w;break;case"positive-descending":P=D-S-w;break}return P=Math.max(0,Math.min(P,D-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var y=v.currentTarget,S=y.clientHeight,w=y.scrollHeight,D=y.scrollTop;f.setState(function(x){if(x.scrollOffset===D)return null;var O=Math.max(0,Math.min(D,w-S));return{isScrolling:!0,scrollDirection:x.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var y=f.props.outerRef;f._outerRef=v,typeof y=="function"?y(v):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&bl(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=IS(f._resetIsScrolling,_S)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}p.getDerivedStateFromProps=function(f,v){return NS(f,v),c(f),null};var g=p.prototype;return g.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(f,v){v===void 0&&(v="auto");var y=this.props,S=y.itemCount,w=y.layout,D=this.state.scrollOffset;f=Math.max(0,Math.min(f,S-1));var x=0;if(this._outerRef){var O=this._outerRef;w==="vertical"?x=O.scrollWidth>O.clientWidth?Sl():0:x=O.scrollHeight>O.clientHeight?Sl():0}this.scrollTo(o(this.props,f,v,D,this._instanceProps,x))},g.componentDidMount=function(){var f=this.props,v=f.direction,y=f.initialScrollOffset,S=f.layout;if(typeof y=="number"&&this._outerRef!=null){var w=this._outerRef;v==="horizontal"||S==="horizontal"?w.scrollLeft=y:w.scrollTop=y}this._callPropsCallbacks()},g.componentDidUpdate=function(){var f=this.props,v=f.direction,y=f.layout,S=this.state,w=S.scrollOffset,D=S.scrollUpdateWasRequested;if(D&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||y==="horizontal")if(v==="rtl")switch(wl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var O=x.clientWidth,P=x.scrollWidth;x.scrollLeft=P-O-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&bl(this._resetIsScrollingTimeoutId)},g.render=function(){var f=this.props,v=f.children,y=f.className,S=f.direction,w=f.height,D=f.innerRef,x=f.innerElementType,O=f.innerTagName,P=f.itemCount,b=f.itemData,R=f.itemKey,B=R===void 0?kS:R,N=f.layout,z=f.outerElementType,E=f.outerTagName,I=f.style,j=f.useIsScrolling,V=f.width,X=this.state.isScrolling,M=S==="horizontal"||N==="horizontal",Y=M?this._onScrollHorizontal:this._onScrollVertical,F=this._getRangeToRender(),H=F[0],k=F[1],_=[];if(P>0)for(var A=H;A<=k;A++)_.push(d.createElement(v,{data:b,key:B(A,b),index:A,isScrolling:j?X:void 0,style:this._getItemStyle(A)}));var K=r(this.props,this._instanceProps);return d.createElement(z||E||"div",{className:y,onScroll:Y,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},I)},d.createElement(x||O||"div",{children:_,ref:D,style:{height:M?"100%":K,pointerEvents:X?"none":void 0,width:M?K:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),y=v[0],S=v[1],w=v[2],D=v[3];this._callOnItemsRendered(y,S,w,D)}}if(typeof this.props.onScroll=="function"){var x=this.state,O=x.scrollDirection,P=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(O,P,b)}},g._getRangeToRender=function(){var f=this.props,v=f.itemCount,y=f.overscanCount,S=this.state,w=S.isScrolling,D=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var O=a(this.props,x,this._instanceProps),P=s(this.props,O,x,this._instanceProps),b=!w||D==="backward"?Math.max(1,y):1,R=!w||D==="forward"?Math.max(1,y):1;return[Math.max(0,O-b),Math.max(0,Math.min(v-1,P+R)),O,P]},p}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var NS=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,s=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(s!=null||l!=null)&&Lr&&!Lr.has(c)&&(Lr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Kr&&!Kr.has(c)&&(Kr.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!h&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},MS=RS({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var s=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,h=e.layout,p=e.width,g=s==="horizontal"||h==="horizontal",m=g?p:l,f=Math.max(0,u*c-m),v=Math.min(f,n*c),y=Math.max(0,n*c-m+c+a);switch(r==="smart"&&(i>=y-m&&i<=v+m?r="auto":r="center"),r){case"start":return v;case"end":return y;case"center":{var S=Math.round(y+(v-y)/2);return S<Math.ceil(m/2)?0:S>f+Math.floor(m/2)?f:S}case"auto":default:return i>=y&&i<=v?i:i<y?y:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",h=n*s,p=c?u:o,g=Math.ceil((p+r-h)/s);return Math.max(0,Math.min(a-1,n+g-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function AS(){var t,e;const n=Oe(),i=Zb().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),s=o*i.level,l=n.renderCursor;return T.jsx(l,{top:a,left:s,indent:o})}var KS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const LS=d.forwardRef(function(e,n){const{children:r}=e,i=KS(e,["children"]),o=Oe();return T.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[T.jsx(FS,{}),r]}))}),FS=()=>{const t=Oe();return T.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:T.jsx(AS,{})})};var jS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const zS=d.forwardRef(function(e,n){var r,i,o,a,{style:s}=e,l=jS(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,h=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return T.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+h}px`})},l))});var Of=d.createContext({dragDropManager:void 0}),Me;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Me||(Me={}));function Q(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Aa="dnd-core/INIT_COORDS",xi="dnd-core/BEGIN_DRAG",Ka="dnd-core/PUBLISH_DRAG_SOURCE",Ci="dnd-core/HOVER",Ti="dnd-core/DROP",Di="dnd-core/END_DRAG";function El(t,e){return{type:Aa,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function HS(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function BS(t,e){return t.filter(function(n){return n!==e})}function If(t){return Fr(t)==="object"}function WS(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function US(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var VS={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function GS(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,s=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(El(a)),qS(n,l,u);var c=JS(n,l);if(c===null){t.dispatch(VS);return}var h=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");YS(s),h=s(c)}t.dispatch(El(a,h));var p=u.getSource(c),g=p.beginDrag(l,c);if(g!=null){XS(g),u.pinSource(c);var m=u.getSourceType(c);return{type:xi,payload:{itemType:m,item:g,sourceId:c,clientOffset:a||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}}function qS(t,e,n){Q(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){Q(n.getSource(r),"Expected sourceIds to be registered.")})}function YS(t){Q(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function XS(t){Q(If(t),"Item must be an object.")}function JS(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function QS(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Ka}}}function Qo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function ZS(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;ew(n);var o=n.slice(0),a=t.getMonitor(),s=t.getRegistry();tw(o,a,s);var l=a.getItemType();return nw(o,s,l),rw(o,a,s),{type:Ci,payload:{targetIds:o,clientOffset:i||null}}}}function ew(t){Q(Array.isArray(t),"Expected targetIds to be an array.")}function tw(t,e,n){Q(e.isDragging(),"Cannot call hover while not dragging."),Q(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];Q(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);Q(o,"Expected targetIds to be registered.")}}function nw(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Qo(o,n)||t.splice(r,1)}}function rw(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function $l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(n),!0).forEach(function(r){iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ow(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();aw(r);var o=uw(r);o.forEach(function(a,s){var l=sw(a,s,i,r),u={type:Ti,payload:{dropResult:xl(xl({},n),l)}};t.dispatch(u)})}}function aw(t){Q(t.isDragging(),"Cannot call drop while not dragging."),Q(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function sw(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return lw(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function lw(t){Q(typeof t>"u"||If(t),"Drop result must either be an object or undefined.")}function uw(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function cw(t){return function(){var n=t.getMonitor(),r=t.getRegistry();dw(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Di}}}function dw(t){Q(t.isDragging(),"Cannot call endDrag while not dragging.")}function fw(t){return{beginDrag:GS(t),publishDragSource:QS(t),hover:ZS(t),drop:ow(t),endDrag:cw(t)}}function hw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gw(t,e,n){return pw(t.prototype,e),t}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vw=function(){function t(e,n){var r=this;hw(this,t),Mn(this,"store",void 0),Mn(this,"monitor",void 0),Mn(this,"backend",void 0),Mn(this,"isSetUp",!1),Mn(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return gw(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.apply(n,l);typeof c<"u"&&r(c)}}var o=fw(this);return Object.keys(o).reduce(function(a,s){var l=o[s];return a[s]=i(l),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function _e(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Cl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),so=function(){return Math.random().toString(36).substring(7).split("").join(".")},Tl={INIT:"@@redux/INIT"+so(),REPLACE:"@@redux/REPLACE"+so(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+so()}};function mw(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function yw(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(ww(t))return"date";if(Sw(t))return"error";var n=bw(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function bw(t){return typeof t.constructor=="function"?t.constructor.name:null}function Sw(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function ww(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=yw(t)),e}function _f(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_e(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 n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_e(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(_f)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_e(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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 o}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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 v=!0;return u(),s.push(f),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(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.");v=!1,u();var S=s.indexOf(f);s.splice(S,1),a=null}}}function p(f){if(!mw(f))throw new Error(process.env.NODE_ENV==="production"?_e(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. 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 f.type>"u")throw new Error(process.env.NODE_ENV==="production"?_e(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_e(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,f)}finally{l=!1}for(var v=a=s,y=0;y<v.length;y++){var S=v[y];S()}return f}function g(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,p({type:Tl.REPLACE})}function m(){var f,v=h;return f={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?_e(11):"Expected the observer to be an object. Instead, received: '"+Qt(S)+"'");function w(){S.next&&S.next(c())}w();var D=v(w);return{unsubscribe:D}}},f[Cl]=function(){return this},f}return p({type:Tl.INIT}),r={dispatch:p,subscribe:h,getState:c,replaceReducer:g},r[Cl]=m,r}var Ew=function(e,n){return e===n};function $w(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function xw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ew;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Dl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dl(Object(n),!0).forEach(function(r){Cw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ol={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Tw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ol,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Aa:case xi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ci:return $w(t.clientOffset,n.clientOffset)?t:Pl(Pl({},t),{},{clientOffset:n.clientOffset});case Di:case Ti:return Ol;default:return t}}var La="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function Dw(t){return{type:La,payload:{sourceId:t}}}function Pw(t){return{type:Fa,payload:{targetId:t}}}function Ow(t){return{type:ja,payload:{sourceId:t}}}function Iw(t){return{type:Pi,payload:{targetId:t}}}function Il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Il(Object(n),!0).forEach(function(r){_w(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Rw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kw,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case xi:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Ka:return ke(ke({},t),{},{isSourcePublic:!0});case Ci:return ke(ke({},t),{},{targetIds:n.targetIds});case Pi:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:BS(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Di:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Nw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case La:case Fa:return t+1;case ja:case Pi:return t-1;default:return t}}var si=[],za=[];si.__IS_NONE__=!0;za.__IS_ALL__=!0;function Mw(t,e){if(t===si)return!1;if(t===za||typeof e>"u")return!0;var n=US(e,t);return n.length>0}function Aw(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ci:break;case La:case Fa:case Pi:case ja:return si;case xi:case Ka:case Di:case Ti:default:return za}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=WS(r,o),s=a.length>0||!xw(r,o);if(!s)return si;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function Kw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function _l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(n),!0).forEach(function(r){Lw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Lw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Aw(t.dirtyHandlerIds,{type:e.type,payload:kl(kl({},e.payload),{},{prevTargetIds:HS(t,"dragOperation.targetIds",[])})}),dragOffset:Tw(t.dragOffset,e),refCount:Nw(t.refCount,e),dragOperation:Rw(t.dragOperation,e),stateId:Kw(t.stateId)}}function jw(t,e){return{x:t.x+e.x,y:t.y+e.y}}function kf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function zw(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:kf(jw(e,r),n)}function Hw(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:kf(e,n)}function Bw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ww(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uw(t,e,n){return Ww(t.prototype,e),t}function Rl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vw=function(){function t(e,n){Bw(this,t),Rl(this,"store",void 0),Rl(this,"registry",void 0),this.store=e,this.registry=n}return Uw(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;Q(typeof n=="function","listener must be a function."),Q(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=r.store.getState(),c=u.stateId;try{var h=c===a||c===a+1&&!Mw(u.dirtyHandlerIds,o);h||n()}finally{a=c}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;Q(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var s=r.store.getState().dragOffset;s!==i&&(i=s,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return Q(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(Q(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Qo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(Q(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Qo(o,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(n);return i?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return zw(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Hw(this.store.getState().dragOffset)}}]),t}(),Gw=0;function qw(){return Gw++}function jr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jr=function(n){return typeof n}:jr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jr(t)}function Yw(t){Q(typeof t.canDrag=="function","Expected canDrag to be a function."),Q(typeof t.beginDrag=="function","Expected beginDrag to be a function."),Q(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Xw(t){Q(typeof t.canDrop=="function","Expected canDrop to be a function."),Q(typeof t.hover=="function","Expected hover to be a function."),Q(typeof t.drop=="function","Expected beginDrag to be a function.")}function Zo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Zo(n,!1)});return}Q(typeof t=="string"||jr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const Nl=typeof global<"u"?global:self,Rf=Nl.MutationObserver||Nl.WebKitMutationObserver;function Nf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Jw(t){let e=1;const n=new Rf(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Qw=typeof Rf=="function"?Jw:Nf;class Zw{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.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 n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;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=Qw(this.flush),this.requestErrorThrow=Nf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class e0{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class t0{create(e){const n=this.freeTasks,r=n.length?n.pop():new e0(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mf=new Zw,n0=new t0(Mf.registerPendingError);function r0(t){Mf.enqueueTask(n0.create(t))}function i0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a0(t,e,n){return o0(t.prototype,e),t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s0(t,e){return d0(t)||c0(t,e)||u0(t,e)||l0()}function l0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u0(t,e){if(t){if(typeof t=="string")return Ml(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ml(t,e)}}function Ml(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function d0(t){if(Array.isArray(t))return t}function f0(t){var e=qw().toString();switch(t){case Me.SOURCE:return"S".concat(e);case Me.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function Al(t){switch(t[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:Q(!1,"Cannot parse handler ID: ".concat(t))}}function Kl(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,a=s0(i.value,2),s=a[1];if(s===e)return!0;r=!!o}while(!r);return!1}var h0=function(){function t(e){i0(this,t),Zt(this,"types",new Map),Zt(this,"dragSources",new Map),Zt(this,"dropTargets",new Map),Zt(this,"pinnedSourceId",null),Zt(this,"pinnedSource",null),Zt(this,"store",void 0),this.store=e}return a0(t,[{key:"addSource",value:function(n,r){Zo(n),Yw(r);var i=this.addHandler(Me.SOURCE,n,r);return this.store.dispatch(Dw(i)),i}},{key:"addTarget",value:function(n,r){Zo(n,!0),Xw(r);var i=this.addHandler(Me.TARGET,n,r);return this.store.dispatch(Pw(i)),i}},{key:"containsHandler",value:function(n){return Kl(this.dragSources,n)||Kl(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Q(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(n);return o}},{key:"getTarget",value:function(n){return Q(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return Q(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return Q(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=Al(n);return r===Me.SOURCE}},{key:"isTargetId",value:function(n){var r=Al(n);return r===Me.TARGET}},{key:"removeSource",value:function(n){var r=this;Q(this.getSource(n),"Expected an existing source."),this.store.dispatch(Ow(n)),r0(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){Q(this.getTarget(n),"Expected an existing target."),this.store.dispatch(Iw(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);Q(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){Q(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var o=f0(n);return this.types.set(o,r),n===Me.SOURCE?this.dragSources.set(o,i):n===Me.TARGET&&this.dropTargets.set(o,i),o}}]),t}();function p0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=g0(r),o=new Vw(i,new h0(i)),a=new vw(i,o),s=t(a,e,n);return a.receiveBackend(s),a}function g0(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return _f(Fw,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var v0=["children"];function m0(t,e){return w0(t)||S0(t,e)||b0(t,e)||y0()}function y0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b0(t,e){if(t){if(typeof t=="string")return Ll(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ll(t,e)}}function Ll(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function S0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function w0(t){if(Array.isArray(t))return t}function E0(t,e){if(t==null)return{};var n=$0(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Fl=0,zr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),x0=d.memo(function(e){var n=e.children,r=E0(e,v0),i=C0(r),o=m0(i,2),a=o[0],s=o[1];return d.useEffect(function(){if(s){var l=Af();return++Fl,function(){--Fl===0&&(l[zr]=null)}}},[]),T.jsx(Of.Provider,Object.assign({value:a},{children:n}),void 0)});function C0(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=T0(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function T0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Af(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[zr]||(i[zr]={dragDropManager:p0(t,e,n,r)}),i[zr]}function Af(){return typeof global<"u"?global:window}function D0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O0(t,e,n){return P0(t.prototype,e),t}function jl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lo=!1,uo=!1,I0=function(){function t(e){D0(this,t),jl(this,"internalMonitor",void 0),jl(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return O0(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Q(!lo,"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 lo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lo=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Q(!uo,"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 uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function _0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R0(t,e,n){return k0(t.prototype,e),t}function zl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,N0=function(){function t(e){_0(this,t),zl(this,"internalMonitor",void 0),zl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return R0(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Q(!co,"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 co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function M0(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function A0(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;M0(i);var o=n?function(a){return t(a,n)}:t;return K0(i,o)}}function Kf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=A0(r);e[n]=function(){return i}}}),e}function Hl(t,e){typeof t=="function"?t(e):t.current=e}function K0(t,e){var n=t.ref;return Q(typeof n!="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"),n?d.cloneElement(t,{ref:function(i){Hl(n,i),Hl(e,i)}}):d.cloneElement(t,{ref:e})}function Hr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hr=function(n){return typeof n}:Hr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hr(t)}function ea(t){return t!==null&&Hr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=t[u],h=e[u];if(i=void 0,i===!1||i===void 0&&c!==h)return!1}return!0}function L0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j0(t,e,n){return F0(t.prototype,e),t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z0=function(){function t(e){var n=this;L0(this,t),we(this,"hooks",Kf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),we(this,"handlerId",null),we(this,"dragSourceRef",null),we(this,"dragSourceNode",void 0),we(this,"dragSourceOptionsInternal",null),we(this,"dragSourceUnsubscribe",void 0),we(this,"dragPreviewRef",null),we(this,"dragPreviewNode",void 0),we(this,"dragPreviewOptionsInternal",null),we(this,"dragPreviewUnsubscribe",void 0),we(this,"lastConnectedHandlerId",null),we(this,"lastConnectedDragSource",null),we(this,"lastConnectedDragSourceOptions",null),we(this,"lastConnectedDragPreview",null),we(this,"lastConnectedDragPreviewOptions",null),we(this,"backend",void 0),this.backend=e}return j0(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function H0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W0(t,e,n){return B0(t.prototype,e),t}function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var U0=function(){function t(e){var n=this;H0(this,t),Ve(this,"hooks",Kf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ve(this,"handlerId",null),Ve(this,"dropTargetRef",null),Ve(this,"dropTargetNode",void 0),Ve(this,"dropTargetOptionsInternal",null),Ve(this,"unsubscribeDropTarget",void 0),Ve(this,"lastConnectedHandlerId",null),Ve(this,"lastConnectedDropTarget",null),Ve(this,"lastConnectedDropTargetOptions",null),Ve(this,"backend",void 0),this.backend=e}return W0(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function V0(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function G0(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Ft=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Br(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Br=function(n){return typeof n}:Br=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Br(t)}function q0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function X0(t,e,n){return Y0(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var J0=function(){function t(e,n,r){q0(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return X0(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Br(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function Q0(t,e,n){var r=d.useMemo(function(){return new J0(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Ht(){var t=d.useContext(Of),e=t.dragDropManager;return Q(e!=null,"Expected drag drop context"),e}function Z0(t){return d.useMemo(function(){var e=t.type;return Q(e!=null,"spec.type must be defined"),e},[t])}function eE(t,e){return iE(t)||rE(t,e)||nE(t,e)||tE()}function tE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
94
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nE(t,e){if(t){if(typeof t=="string")return Bl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bl(t,e)}}function Bl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function rE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function iE(t){if(Array.isArray(t))return t}function oE(t,e,n){var r=Ht(),i=Q0(t,e,n),o=Z0(t);Ft(function(){if(o!=null){var s=G0(o,i,r),l=eE(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,e,n,i,o])}function aE(t){return cE(t)||uE(t)||lE(t)||sE()}function sE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
95
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lE(t,e){if(t){if(typeof t=="string")return na(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(t,e)}}function uE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function cE(t){if(Array.isArray(t))return na(t)}function na(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lf(t,e){var n=aE(e||[]);return e==null&&typeof t!="function"&&n.push(t),d.useMemo(function(){return typeof t=="function"?t():t},n)}function dE(){var t=Ht();return d.useMemo(function(){return new I0(t)},[t])}function fE(t,e){var n=Ht(),r=d.useMemo(function(){return new z0(n.getBackend())},[n]);return Ft(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),Ft(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var ho,Wl;function hE(){return Wl||(Wl=1,ho=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}),ho}var pE=hE();const gE=sh(pE);function vE(t,e){return SE(t)||bE(t,e)||yE(t,e)||mE()}function mE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
96
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yE(t,e){if(t){if(typeof t=="string")return Ul(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ul(t,e)}}function Ul(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function SE(t){if(Array.isArray(t))return t}function Ff(t,e,n){var r=d.useState(function(){return e(t)}),i=vE(r,2),o=i[0],a=i[1],s=d.useCallback(function(){var l=e(t);gE(o,l)||(a(l),n&&n())},[o,t,n]);return Ft(s),[o,s]}function wE(t,e){return CE(t)||xE(t,e)||$E(t,e)||EE()}function EE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
97
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $E(t,e){if(t){if(typeof t=="string")return Vl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vl(t,e)}}function Vl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function CE(t){if(Array.isArray(t))return t}function TE(t,e,n){var r=Ff(t,e,n),i=wE(r,2),o=i[0],a=i[1];return Ft(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(a,{handlerIds:[l]})},[t,a]),o}function jf(t,e,n){return TE(e,t||function(){return{}},function(){return n.reconnect()})}function DE(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function PE(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function OE(t,e){var n=Lf(t,e);Q(!n.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)");var r=dE(),i=fE(n.options,n.previewOptions);return oE(n,r,i),[jf(n.collect,r,i),DE(i),PE(i)]}function IE(t){var e=t.accept;return d.useMemo(function(){return Q(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function _E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function RE(t,e,n){return kE(t.prototype,e),t}function Gl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var NE=function(){function t(e,n){_E(this,t),Gl(this,"spec",void 0),Gl(this,"monitor",void 0),this.spec=e,this.monitor=n}return RE(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function ME(t,e){var n=d.useMemo(function(){return new NE(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function AE(t,e){return jE(t)||FE(t,e)||LE(t,e)||KE()}function KE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LE(t,e){if(t){if(typeof t=="string")return ql(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ql(t,e)}}function ql(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function FE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function jE(t){if(Array.isArray(t))return t}function zE(t,e,n){var r=Ht(),i=ME(t,e),o=IE(t);Ft(function(){var s=V0(o,i,r),l=AE(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,e,i,n,o.map(function(a){return a.toString()}).join("|")])}function HE(){var t=Ht();return d.useMemo(function(){return new N0(t)},[t])}function BE(t){var e=Ht(),n=d.useMemo(function(){return new U0(e.getBackend())},[e]);return Ft(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function WE(t){return d.useMemo(function(){return t.hooks.dropTarget()},[t])}function zf(t,e){var n=Lf(t,e),r=HE(),i=BE(n.options);return zE(n,r,i),[jf(n.collect,r,i),WE(i)]}function UE(t,e){return YE(t)||qE(t,e)||GE(t,e)||VE()}function VE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
99
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GE(t,e){if(t){if(typeof t=="string")return Yl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yl(t,e)}}function Yl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function YE(t){if(Array.isArray(t))return t}function XE(t){var e=Ht(),n=e.getMonitor(),r=Ff(n,t),i=UE(r,2),o=i[0],a=i[1];return d.useEffect(function(){return n.subscribeToOffsetChange(a)}),d.useEffect(function(){return n.subscribeToStateChange(a)}),o}function Hf(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function JE(t,e){return t.filter(function(n){return n!==e})}function QE(t,e){var n=new Set,r=function(a){return n.add(a)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o){return i.push(o)}),i}function ZE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function t$(t,e,n){return e$(t.prototype,e),t}function Xl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var n$=function(){function t(e){ZE(this,t),Xl(this,"entered",[]),Xl(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return t$(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,o=function(s){return r.isNodeInDocument(s)&&(!s.contains||s.contains(n))};return this.entered=QE(this.entered.filter(o),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=JE(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),r$=Hf(function(){return/firefox/i.test(navigator.userAgent)}),Bf=Hf(function(){return!!window.safari});function i$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a$(t,e,n){return o$(t.prototype,e),t}function An(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jl=function(){function t(e,n){i$(this,t),An(this,"xs",void 0),An(this,"ys",void 0),An(this,"c1s",void 0),An(this,"c2s",void 0),An(this,"c3s",void 0);for(var r=e.length,i=[],o=0;o<r;o++)i.push(o);i.sort(function(b,R){return e[b]<e[R]?-1:1});for(var a=[],s=[],l,u,c=0;c<r-1;c++)l=e[c+1]-e[c],u=n[c+1]-n[c],a.push(l),s.push(u/l);for(var h=[s[0]],p=0;p<a.length-1;p++){var g=s[p],m=s[p+1];if(g*m<=0)h.push(0);else{l=a[p];var f=a[p+1],v=l+f;h.push(3*v/((v+f)/g+(v+l)/m))}}h.push(s[s.length-1]);for(var y=[],S=[],w,D=0;D<h.length-1;D++){w=s[D];var x=h[D],O=1/a[D],P=x+h[D+1]-w-w;y.push((w-x-P)*O),S.push(P*O*O)}this.xs=e,this.ys=n,this.c1s=h,this.c2s=y,this.c3s=S}return a$(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,o=this.c1s,a=this.c2s,s=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var u=0,c=s.length-1,h;u<=c;){h=Math.floor(.5*(u+c));var p=r[h];if(p<n)u=h+1;else if(p>n)c=h-1;else return i[h]}l=Math.max(0,c);var g=n-r[l],m=g*g;return i[l]+o[l]*g+a[l]*m+s[l]*g*m}}]),t}(),s$=1;function Wf(t){var e=t.nodeType===s$?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Pr(t){return{x:t.clientX,y:t.clientY}}function l$(t){var e;return t.nodeName==="IMG"&&(r$()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function u$(t,e,n,r){var i=t?e.width:n,o=t?e.height:r;return Bf()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function c$(t,e,n,r,i){var o=l$(e),a=o?t:e,s=Wf(a),l={x:n.x-s.x,y:n.y-s.y},u=t.offsetWidth,c=t.offsetHeight,h=r.anchorX,p=r.anchorY,g=u$(o,e,u,c),m=g.dragPreviewWidth,f=g.dragPreviewHeight,v=function(){var P=new Jl([0,.5,1],[l.y,l.y/c*f,l.y+f-c]),b=P.interpolate(p);return Bf()&&o&&(b+=(window.devicePixelRatio-1)*f),b},y=function(){var P=new Jl([0,.5,1],[l.x,l.x/u*m,l.x+m-u]);return P.interpolate(h)},S=i.offsetX,w=i.offsetY,D=S===0||S,x=w===0||w;return{x:D?S:y(),y:x?w:v()}}var Uf="__NATIVE_FILE__",Vf="__NATIVE_URL__",Gf="__NATIVE_TEXT__",qf="__NATIVE_HTML__";const Ql=Object.freeze(Object.defineProperty({__proto__:null,FILE:Uf,HTML:qf,TEXT:Gf,URL:Vf},Symbol.toStringTag,{value:"Module"}));function po(t,e,n){var r=e.reduce(function(i,o){return i||t.getData(o)},"");return r??n}var en;function Or(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ra=(en={},Or(en,Uf,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Or(en,qf,{exposeProperties:{html:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Or(en,Vf,{exposeProperties:{urls:function(e,n){return po(e,n,"").split(`
100
+ `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Or(en,Gf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),en);function d$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h$(t,e,n){return f$(t.prototype,e),t}function Zl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p$=function(){function t(e){d$(this,t),Zl(this,"item",void 0),Zl(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return h$(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function g$(t,e){var n=new p$(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y$(t,e,n){return m$(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b$=function(){function t(e,n){v$(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return y$(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function S$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function E$(t,e,n){return w$(t.prototype,e),t}function ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $$=function(){function t(e,n,r){var i=this;S$(this,t),ne(this,"options",void 0),ne(this,"actions",void 0),ne(this,"monitor",void 0),ne(this,"registry",void 0),ne(this,"enterLeaveCounter",void 0),ne(this,"sourcePreviewNodes",new Map),ne(this,"sourcePreviewNodeOptions",new Map),ne(this,"sourceNodes",new Map),ne(this,"sourceNodeOptions",new Map),ne(this,"dragStartSourceIds",null),ne(this,"dropTargetIds",[]),ne(this,"dragEnterTargetIds",[]),ne(this,"currentNativeSource",null),ne(this,"currentNativeHandle",null),ne(this,"currentDragSourceNode",null),ne(this,"altKeyPressed",!1),ne(this,"mouseMoveTimeoutTimer",null),ne(this,"asyncEndDragFrameId",null),ne(this,"dragOverTargetIds",null),ne(this,"lastClientOffset",null),ne(this,"hoverRafId",null),ne(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&Wf(a)||null}),ne(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),ne(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),ne(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),ne(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var s=Pr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:s});var l=o.dataTransfer,u=go(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),h=i.sourceNodes.get(c),p=i.sourcePreviewNodes.get(c)||h;if(p){var g=i.getCurrentSourcePreviewNodeOptions(),m=g.anchorX,f=g.anchorY,v=g.offsetX,y=g.offsetY,S={anchorX:m,anchorY:f},w={offsetX:v,offsetY:y},D=c$(h,p,s,S,w);l.setDragImage(p,D.x,D.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),O=x.captureDraggingState;O?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(l&&!l.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),ne(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var s=o.dataTransfer,l=go(s);l&&i.beginDragNativeItem(l,s)}}),ne(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Pr(o)});var s=a.some(function(l){return i.monitor.canDropOnTarget(l)});s&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Pr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var s=(a||[]).some(function(l){return i.monitor.canDropOnTarget(l)});s?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),ne(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Pr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new b$(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new n$(this.isNodeInDocument)}return E$(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},s=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",s),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},s=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",s),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return tu({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return tu({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Ql).some(function(r){return Ql[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=g$(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Ir;function x$(){return Ir||(Ir=new Image,Ir.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Ir}var C$=function(e,n,r){return new $$(e,n,r)};function T$(t){const e=Oe(),n=e.selectedIds,[r,i,o]=OE(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(En.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(En.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(x$())},[o]),i}function D$(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,s=!a,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:a,inBottomHalf:s,inMiddle:u,atTop:!u&&a,atBottom:!u&&s}}function P$(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function _r(t,e){return{parentId:t||null,index:e}}function tn(t,e){return{type:"line",index:t,level:e}}function O$(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=bf(r)+1;return{parentId:i,index:o}}function Yf(t){var e;const n=D$(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:s}=t,[l,u]=P$(o,s,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:_r(o.id,null),cursor:O$(o.id)};if(!l)return{drop:_r((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:tn(0,0)};if(gf(l)){const c=Ar(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(vf(l)){const c=Ar(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(mf(l)){const c=Ar(i,0,l.level+1);return c>l.level?{drop:_r(l.id,0),cursor:tn(l.rowIndex+1,c)}:{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}return{drop:_r(l==null?void 0:l.id,0),cursor:tn(l.rowIndex+1,l.level+1)}}function I$(t,e){const n=Oe(),[r,i]=zf(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const s=a.getClientOffset();if(!t.current||!s)return;const{cursor:l,drop:u}=Yf({element:t.current,offset:s,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(En.hovering(u.parentId,u.index)),a.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:s,index:l,dragIds:u}=n.state.dnd;xf(n.props.onMove,{dragIds:u,parentId:s===er?null:s,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(s)}),n.open(s)}}),[e,t.current,n.props]);return i}function _$(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const k$=d.memo(function({index:e,style:n}){pf(),Qb();const r=Oe(),i=_$(e),o=d.useRef(null),a=T$(i),s=I$(o,i),l=d.useCallback(f=>{o.current=f,s(f)},[s]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),h=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),p={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:h,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const g=r.renderNode,m=r.renderRow;return T.jsx(m,{node:i,innerRef:l,attrs:p,children:T.jsx(g,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",nu=null;function Xf(){pf();const t=Oe();return T.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,s=o.parent;t.focus(a||s,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),Sf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),wf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(nu),yo+=e.key,nu=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:T.jsx(MS,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:LS,innerElementType:zS,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:k$})})}function ru(t){return t.isFiltered?N$(t.root,t.isMatch.bind(t)):R$(t.root)}function R$(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(Jf),e}function N$(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let l=a.parent;for(;l;)n[l.id]=!0,l=l.parent}if(a.children)for(let l of a.children)i(l)}function o(a){var s;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((s=a.children)===null||s===void 0||s.forEach(o))}return i(t),o(t),r.forEach(Jf),r}function Jf(t,e){t.rowIndex=e}const iu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(h){a(h)}}function l(c){try{u(r.throw(c))}catch(h){a(h)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=iS;class vn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=pl(this),this.visibleNodes=ru(this),this.idToIndex=iu(this.visibleNodes)}update(e){this.props=e,this.root=pl(this),this.visibleNodes=ru(this),this.idToIndex=iu(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=zn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=zn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),s=Math.max(i,o);return this.visibleNodes.slice(a,s+1)}indexOf(e){const n=$f(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?Df(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:Tf(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",s=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{vn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=vn.editPromise;n&&n(e),vn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&yf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(En.cursor({type:"none"}))}showCursor(e){this.dispatch(En.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=Ma(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oi(this.root,e=>{e.isInternal&&e.open()})}closeAll(){oi(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),Cf(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!zn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!zn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(pS())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||Xf}get renderRow(){return this.props.renderRow||uS}get renderNode(){return this.props.children||cS}get renderDragPreview(){return this.props.renderDragPreview||Pf}get renderCursor(){return this.props.renderCursor||lS}}function Ee(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var M$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ou=M$,So=()=>Math.random().toString(36).substring(7).split("").join("."),A$={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Ot=A$;function Qf(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function K$(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(j$(t))return"date";if(F$(t))return"error";const n=L$(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function L$(t){return typeof t.constructor=="function"?t.constructor.name:null}function F$(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function j$(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function dt(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=K$(t)),e}function Zf(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(2):`Expected the root reducer to be a function. Instead, received: '${dt(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ee(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 n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(1):`Expected the enhancer to be a function. Instead, received: '${dt(n)}'`);return n(Zf)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((v,y)=>{a.set(y,v)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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 i}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${dt(v)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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.");let y=!0;u();const S=s++;return a.set(S,v),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(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.");y=!1,u(),a.delete(S),o=null}}}function p(v){if(!Qf(v))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${dt(v)}'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${dt(v.type)}'. Value was: '${v.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,v)}finally{l=!1}return(o=a).forEach(S=>{S()}),v}function g(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${dt(v)}`);r=v,p({type:Ot.REPLACE})}function m(){const v=h;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${dt(y)}'`);function S(){const D=y;D.next&&D.next(c())}return S(),{unsubscribe:v(S)}},[ou](){return this}}}return p({type:Ot.INIT}),{dispatch:p,subscribe:h,getState:c,replaceReducer:g,[ou]:m}}function au(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function z$(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Ot.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Qf(t))return`The ${o} has unexpected type of "${dt(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(s=>!e.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Ot.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function H$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Ot.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Ot.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function su(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const s=e[a];process.env.NODE_ENV!=="production"&&typeof t[s]>"u"&&au(`No reducer provided for key "${s}"`),typeof t[s]=="function"&&(n[s]=t[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{H$(n)}catch(a){o=a}return function(s={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const h=z$(s,n,l,i);h&&au(h)}let u=!1;const c={};for(let h=0;h<r.length;h++){const p=r[h],g=n[p],m=s[p],f=g(m,l);if(typeof f>"u"){const v=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[p]=f,u=u||f!==m}return u=u||r.length!==Object.keys(s).length,u?c:s}}function B$(t=wn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const W$=su({nodes:su({focus:gS,edit:hS,open:vS,selection:mS,drag:B$}),dnd:yS}),U$=wn();function V$({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(Zf(W$,wn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>U$),s=d.useMemo(()=>new vn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,s.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>s),d.useEffect(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),d.useEffect(()=>{s.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[s.props.searchTerm]),T.jsx(cf.Provider,{value:s,children:T.jsx(hf.Provider,{value:l.current,children:T.jsx(df.Provider,{value:a.nodes,children:T.jsx(ff.Provider,{value:a.dnd,children:T.jsx(x0,Object.assign({backend:C$,options:{rootElement:s.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function G$(){const t=Oe(),[,e]=zf(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Yf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(En.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function q$(t){return G$(),t.children}function Y$(){const e=Oe().props.renderContainer||Xf;return T.jsx(T.Fragment,{children:T.jsx(e,{})})}function X$(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=XE(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Pf;return T.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class J${constructor(e){this.root=Q$(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function Q$(t){const e=new eh({id:"ROOT"},null);return e.children=t.map(n=>Ha(n,e)),e}function Ha(t,e){const n=new eh(t,e);return t.children&&(n.children=t.children.map(r=>Ha(r,n))),n}class eh{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=Ha(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let Z$=0;function ex(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new J$(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:h})=>{const p={id:`simple-tree-id-${Z$++}`,name:""};return h==="internal"&&(p.children=[]),r.create({parentId:u,index:c,data:p}),n(r.data),p},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function tx(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
101
+ Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=ex(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function nx(t,e){const n=tx(t);return T.jsxs(V$,{treeProps:n,imperativeHandle:e,children:[T.jsx(q$,{children:T.jsx(Y$,{})}),T.jsx(X$,{})]})}const rx=d.forwardRef(nx),th=({top:t,left:e})=>T.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10}});function ix(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,s=r.current,l=a||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function lu(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function ox(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],s=o[1],l=d.useRef(!1);d.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=ix(d.useCallback(function(h){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(p){var g=p[0],m=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=lu(g,m,"inlineSize"),v=lu(g,m,"blockSize"),y=f?r(f):void 0,S=v?r(v):void 0;if(u.current.width!==y||u.current.height!==S){var w={width:y,height:S};u.current.width=y,u.current.height=S,n.current?n.current(w):l.current||s(w)}})}),i.current.instance.observe(h,{box:t.box}),function(){i.current&&i.current.instance.unobserve(h)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Ae=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ae||{}),$t=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))($t||{});const li=t=>t?t.nodeType===Ae.SEPARATOR:!1,ui=t=>t?t.nodeType===Ae.TITLE:!1,Hn=t=>!li(t)&&!ui(t),nh=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:s,append:l,prepend:u,getItem:c,move:h,items:p}=Pv({initialItems:JSON.parse(JSON.stringify(t)),getKey:F=>F.id,getChildren:F=>F.children||[]}),[g,m]=d.useState(),f=(F=[])=>{const H=p.map(_=>_.key);r(...H);const k=JSON.parse(JSON.stringify(F));k.length>0&&o(null,0,...k),m(void 0)},v=(F,H)=>{var k;if(F){const _=c(F);_&&(o(F,((k=_.children)==null?void 0:k.length)??0,H),j(F,H))}else o(null,p.length,H)},y=F=>{var H;return(H=c(F))==null?void 0:H.value},S=(F,H)=>{const k=c(F);if(!k){console.error("No item found");return}let _=k.value.children??null;H.children&&(_=[..._??[],...H.children]);const A={...k.value,...H,children:_,childrenCount:(_==null?void 0:_.length)??k.value.childrenCount};i(F,A),k.parentKey&&D(k.parentKey,F,H)},w=F=>{const H=c(F),k=H==null?void 0:H.parentKey;k&&H&&I(k,H.value.id),r(F)},D=(F,H,k)=>{const _=c(F);if(!_)return;const A=_.value.children??[],K=A.findIndex(U=>U.id===H);if(K===-1)return;const W={...A[K],...k};A[K]=W},x=async F=>{if(!e){console.error("No refresh callback provided");return}try{const H=await e(F);S(F,H)}catch(H){console.error("error while refreshing node:",H)}},O=F=>{o(null,p.length,F)},P=(F,H)=>{const k=c(F);if(!k){console.error("No item found");return}const _={...k.value,children:H,childrenCount:H.length};i(F,_)},b=F=>{var H;return((H=c(F))==null?void 0:H.parentKey)??null},R=F=>{const H=b(F);if(!H)return null;const k=c(H);return k?k.value:null},B=(F,H)=>{a(F,H)},N=(F,H)=>{s(F,H)},z=(F,H)=>{l(F,H)},E=(F,H)=>{u(F,H)},I=(F,H)=>{const k=c(F);if(!k)return;const A=(k.value.children??[]).filter(K=>K.id!==H);k.value.children=A,k.value.childrenCount=A.length},j=(F,H)=>{const k=c(F);if(!k)return;const A=[...k.value.children??[],H];k.value.children=A,k.value.childrenCount=A.length},V=F=>{const H=c(F);H&&m(H.value)},X=(F,H,k,_)=>{var K;const A=(K=c(F))==null?void 0:K.value;h(F,H,k),H&&A&&j(H,A),_&&I(_,F)};return{nodes:p,addChild:v,updateNode:S,deleteNode:w,addRootNode:O,selectedNode:g,setSelectedNode:m,refreshNode:x,setChildren:P,insertBeforeNode:B,insertAfterNode:N,handleMove:F=>{X(F.sourceId,F.newParentId,F.index,F.oldParentId)},prependToNode:E,moveNode:X,appendToNode:z,move:h,resetTree:f,handleLoadChildren:async F=>{if(!n)return[];const H=await n(F);return S(F,{children:H,hasLoadedChildren:!0,childrenCount:H.length}),H},selectNodeById:V,getParent:R,getNode:y,getParentId:b}},Ba=d.createContext(null),ax=({children:t,onRefresh:e,initialNodeId:n,onLoadChildren:r,initialTreeData:i})=>{const o=d.useRef(null),[a,s]=d.useState(null),[l,u]=d.useState(n??null),c=nh(i??[],e,r);return T.jsx(Ba.Provider,{value:{treeApiRef:o,treeData:c,root:a,initialTargetId:l,setInitialTargetId:u,setRoot:s},children:t})},Wa=()=>{const t=d.useContext(Ba);if(!t)throw new Error("TreeContext not found");return t},sx=({initialOpenState:t,selectedNodeId:e,rootNodeId:n,renderNode:r,canDrop:i,canDrag:o,afterMove:a})=>{const{ref:s,width:l,height:u}=ox(),c=Wa(),h=(c==null?void 0:c.treeData.nodes)??[],p=m=>{var j,V,X,M;const f=JSON.parse(JSON.stringify(h)),v=m.dragNodes[0],y=m.parentId?((j=m.parentNode)==null?void 0:j.data.children)??[]:f,S=m.dragNodes[0].data.value.id,w=m.dragNodes[0].data,D=(V=m.parentNode)==null?void 0:V.data;if((D==null?void 0:D.value.nodeType)===Ae.TITLE||(D==null?void 0:D.value.nodeType)===Ae.SEPARATOR)return null;const x=w.parentKey??n,O=m.parentId??n;let P=m.index+0,b=null,R=O;const B=((M=(X=v.parent)==null?void 0:X.children)==null?void 0:M.findIndex(Y=>Y.data.value.id===S))??0;if(x===O){if(B===P)return null;P=P<B?P:P-1}const N=m.index-1,z=y[N],E=m.index,I=y[E];return m.index===0?(R=m.parentId??n,b=$t.FIRST_CHILD):!D&&m.index===1&&!Hn(z.value)?(R=n,P=1,b=$t.FIRST_CHILD):m.index===y.length?(R=R??n,b=$t.LAST_CHILD):z&&Hn(z.value)?(R=z.value.id,b=$t.RIGHT):I&&Hn(I.value)&&(b=$t.LEFT,R=I.value.id),b&&R?{targetModeId:R,mode:b,oldParentId:x,index:P,newParentId:m.parentId,sourceId:S}:null},g=m=>{const f=p(m);f&&(c==null||c.treeData.handleMove(f),a==null||a(f))};if(c)return T.jsx("div",{ref:s,className:"c__tree-view--container",children:T.jsx(rx,{data:h,ref:c.treeApiRef,openByDefault:!1,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:m=>o?!o(m):!1,disableDrop:({parentNode:m,dragNodes:f,index:v})=>{var D,x;if(i&&!i({parentNode:m,dragNodes:f,index:v}))return m.id!=="__REACT_ARBORIST_INTERNAL_ROOT__"&&(m.data.value.canDrop=!1),!0;if(((D=m.data.value)==null?void 0:D.nodeType)===Ae.TITLE||((x=m.data.value)==null?void 0:x.nodeType)===Ae.SEPARATOR)return!0;if(m.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const O=h[v-1],P=h[v],b=h[v+1],R=li(O==null?void 0:O.value),B=li(P==null?void 0:P.value),N=ui(O==null?void 0:O.value),z=ui(P==null?void 0:P.value),E=Hn(b==null?void 0:b.value);return!!(v===0&&(B||z)||R&&z&&E||N&&B&&E)}const y=m==null?void 0:m.isOpen,S=(m==null?void 0:m.data.value.childrenCount)&&m.data.value.childrenCount>0||(m==null?void 0:m.data.children)&&m.data.children.length>0;if(!S)return m.data.value.canDrop=!0,!1;let w=m.data.value.childrenCount&&m.data.value.childrenCount>0&&(m==null?void 0:m.data.children)&&m.data.children.length>0;return w=w??!0,!y&&!w&&S?(m.data.value.canDrop=!0,!0):(m.data.value.canDrop=!0,!1)},paddingBottom:30,paddingTop:2,width:l,initialOpenState:t,height:u,overscanCount:20,selection:e,renderCursor:th,renderRow:m=>{const f=m.node.data.value.nodeType===Ae.TITLE,v=m.node.data.value.nodeType===Ae.SEPARATOR,{style:y}=m.attrs,S={...y};return f||v?T.jsx("div",{...m.attrs,style:S,ref:m.innerRef,onFocus:w=>w.stopPropagation(),onClick:m.node.handleClick,children:m.children}):T.jsx("div",{...m.attrs,style:S,ref:m.innerRef,onFocus:w=>w.stopPropagation(),onClick:m.node.handleClick,children:T.jsx("div",{style:{padding:"0 12px"},children:m.children})})},rowClassName:"c__tree-view--row",children:m=>r(m)})})},lx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ux(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cx(t){return"nodeType"in t}function dx(t){var e,n;return t?ux(t)?t:cx(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const rh=lx?d.useLayoutEffect:d.useEffect;function ih(t){const e=d.useRef(t);return rh(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function uu(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return rh(()=>{n.current!==t&&(n.current=t)},e),n}function fx(t){const e=ih(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let wo={};function hx(t,e){return d.useMemo(()=>{const n=wo[t]==null?0:wo[t]+1;return wo[t]=n,t+"-"+n},[t,e])}var Un;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Un||(Un={}));function cu(){}const px=Object.freeze({x:0,y:0});function gx(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function vx(t,e,n){const r=gx(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,h=o?t.height/o:t.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}const mx={ignoreTransform:!1};function oh(t,e){e===void 0&&(e=mx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=dx(t).getComputedStyle(t);u&&(n=vx(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function du(t){return oh(t,{ignoreTransform:!0})}var dn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(dn||(dn={}));var fu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(fu||(fu={}));var ht;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ht||(ht={}));ht.Space,ht.Enter,ht.Esc,ht.Space,ht.Enter,ht.Tab;var hu;(function(t){t[t.RightClick=2]="RightClick"})(hu||(hu={}));var pu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(pu||(pu={}));var gu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(gu||(gu={}));dn.Backward+"",dn.Forward+"",dn.Backward+"",dn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function yx(t){let{callback:e,disabled:n}=t;const r=ih(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const bx={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:cu,draggableNodes:new Map,over:null,measureDroppableContainers:cu},Sx=d.createContext(bx);({...px});var vu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(vu||(vu={}));const wx="Droppable",Ex={timeout:25};function $x(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=hx(wx),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(Sx),c=d.useRef({disabled:n}),h=d.useRef(!1),p=d.useRef(null),g=d.useRef(null),{disabled:m,updateMeasurementsFor:f,timeout:v}={...Ex,...i},y=uu(f??r),S=d.useCallback(()=>{if(!h.current){h.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),g.current=null},v)},[v]),w=yx({callback:S,disabled:m||!a}),D=d.useCallback((b,R)=>{w&&(R&&(w.unobserve(R),h.current=!1),b&&w.observe(b))},[w]),[x,O]=fx(D),P=uu(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),h.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(s({type:Un.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:p,data:P}}),()=>s({type:Un.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(s({type:Un.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:p,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:O}}const xx=t=>{const{isOver:e,setNodeRef:n}=$x({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),T.jsx("div",{className:"c__dnd--droppable",ref:n,children:t.children})},Cx=({children:t,onClick:e,node:n,dragHandle:r,style:i,forceLoading:o})=>{var w,D;const a=Wa(),s=d.useRef(null),[l,u]=d.useState(!1),[c,h]=d.useState(!1),p=o??l,g=n.willReceiveDrop||c,m=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,f=((D=n.children)==null?void 0:D.length)??!1,v=n.isLeaf||!m,y=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(a==null?void 0:a.treeData.handleLoadChildren(n.data.value.id)),u(!1),n.open()}},[v,f,n,a==null?void 0:a.treeData]),S=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(s.current=setTimeout(()=>{y()},500)),s.current&&!x&&clearTimeout(s.current)},[y,n.isOpen,n.isDragging]);return d.useEffect(()=>{S(g)},[g,S]),n.data.value.nodeType===Ae.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.nodeType===Ae.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.headerTitle}):T.jsx(xx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:h,children:T.jsxs("div",{onClick:e,ref:r,style:i,className:ot("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&T.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&T.jsxs(T.Fragment,{children:[p&&T.jsx("div",{className:"c__tree-view--node__loading",children:T.jsx(Da,{})}),!p&&T.jsx("span",{onClick:x=>{x.stopPropagation(),y()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})};exports.CunninghamProvider=mh;exports.CustomTabs=Jb;exports.DropdownMenu=ed;exports.Header=rd;exports.HorizontalSeparator=qo;exports.Label=Dd;exports.LanguagePicker=nd;exports.LeftPanel=id;exports.MainLayout=jm;exports.ProConnectButton=yh;exports.QuickSearch=qb;exports.QuickSearchGroup=Yb;exports.QuickSearchInput=uf;exports.QuickSearchItem=Mr;exports.QuickSearchItemTemplate=Xb;exports.Spinner=Da;exports.TreeApi=vn;exports.TreeContext=Ba;exports.TreeProvider=ax;exports.TreeView=sx;exports.TreeViewItem=Cx;exports.TreeViewMoveModeEnum=$t;exports.TreeViewNodeTypeEnum=Ae;exports.TreeViewSeparator=th;exports.WithLabel=Hm;exports.cunninghamConfig=jo;exports.getLocales=yu;exports.headerHeight=zm;exports.isNode=Hn;exports.isSeparator=li;exports.isTitle=ui;exports.useDropdownMenu=td;exports.useResponsive=ar;exports.useTree=nh;exports.useTreeContext=Wa;
102
102
  //# sourceMappingURL=index.cjs.map