@gouvfr-lasuite/ui-kit 0.1.10 → 0.3.0

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"),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={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),ae=require("@openfun/cunningham-react"),Ht=require("react-dom");function Pu(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 T=Pu(d),x0=Pu(Ht);function $0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fr={exports:{}},In={};/**
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 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={};/**
9
+ */var Xs;function T0(){if(Xs)return In;Xs=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:s,ref:i!==void 0?i:null,props:o}}return In.Fragment=e,In.jsx=n,In.jsxs=n,In}var kn={};/**
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 Va;function uh(){return Va||(Va=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===I?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case O:return"Fragment";case x:return"Portal";case b:return"Profiler";case D: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 N:var V=$.render;return $=$.displayName,$||($=V.displayName||V.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case _:return V=$.displayName||null,V!==null?V:t($.type)||"Memo";case j:V=$._payload,$=$._init;try{return t($(V))}catch{}}return null}function e($){return""+$}function n($){try{e($);var V=!1}catch{V=!0}if(V){V=console;var q=V.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(V,"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(K===0){L=console.log,H=console.info,W=console.warn,F=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:$})}K++}function o(){if(K--,K===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},$,{value:L}),info:Y({},$,{value:H}),warn:Y({},$,{value:W}),error:Y({},$,{value:F}),group:Y({},$,{value:J}),groupCollapsed:Y({},$,{value:te}),groupEnd:Y({},$,{value:de})})}0>K&&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 V=q.stack.trim().match(/\n( *(at )?)/);ce=V&&V[1]||"",oe=-1<q.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<q.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+ce+$+oe}function s($,V){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=A.H,A.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(V){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,A.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 V=$.prototype;return s($,!(!V||!V.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 _:return l($.type);case j:V=$._payload,$=$._init;try{return l($(V))}catch{}}return""}function u(){var $=A.A;return $===null?null:$.getOwner()}function c($){if(G.call($,"key")){var V=Object.getOwnPropertyDescriptor($,"key").get;if(V&&V.isReactWarning)return!1}return $.key!==void 0}function h($,V){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)",V))}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($,V,q,ie,Se,se){return q=se.ref,$={$$typeof:P,type:$,key:V,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($,V,q,ie,Se,se){if(typeof $=="string"||typeof $=="function"||$===O||$===b||$===D||$===z||$===E||$===U||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===_||$.$$typeof===B||$.$$typeof===k||$.$$typeof===N||$.$$typeof===M||$.getModuleId!==void 0)){var Z=V.children;if(Z!==void 0)if(ie)if(R(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":R($)?ie="array":$!==void 0&&$.$$typeof===P?(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(G.call(V,"key")){Z=t($);var Xe=Object.keys(V).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:
17
+ */var Js;function P0(){return Js||(Js=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===L?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case D:return"Fragment";case x:return"Portal";case S:return"Profiler";case _:return"StrictMode";case H: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 F:return($.displayName||"Context")+".Provider";case R:return($._context.displayName||"Context")+".Consumer";case N:var q=$.render;return $=$.displayName,$||($=q.displayName||q.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case O:return q=$.displayName||null,q!==null?q:t($.type)||"Memo";case z:q=$._payload,$=$._init;try{return t($(q))}catch{}}return null}function e($){return""+$}function n($){try{e($);var q=!1}catch{q=!0}if(q){q=console;var Z=q.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return Z.call(q,"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){M=console.log,W=console.info,U=console.warn,K=console.error,X=console.group,te=console.groupCollapsed,fe=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:B({},$,{value:M}),info:B({},$,{value:W}),warn:B({},$,{value:U}),error:B({},$,{value:K}),group:B({},$,{value:X}),groupCollapsed:B({},$,{value:te}),groupEnd:B({},$,{value:fe})})}0>A&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s($){if(de===void 0)try{throw Error()}catch(Z){var q=Z.stack.trim().match(/\n( *(at )?)/);de=q&&q[1]||"",oe=-1<Z.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<Z.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+de+$+oe}function a($,q){if(!$||ve)return"";var Z=re.get($);if(Z!==void 0)return Z;ve=!0,Z=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=Y.H,Y.H=null,i();try{var Ce={DetermineComponentFrameRoot:function(){try{if(q){var ut=function(){throw Error()};if(Object.defineProperty(ut.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ut,[])}catch(Qe){var dr=Qe}Reflect.construct($,[],ut)}else{try{ut.call()}catch(Qe){dr=Qe}$.call(ut.prototype)}}else{try{throw Error()}catch(Qe){dr=Qe}(ut=$())&&typeof ut.catch=="function"&&ut.catch(function(){})}}catch(Qe){if(Qe&&dr&&typeof Qe.stack=="string")return[Qe.stack,dr.stack]}return[null,null]}};Ce.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var le=Object.getOwnPropertyDescriptor(Ce.DetermineComponentFrameRoot,"name");le&&le.configurable&&Object.defineProperty(Ce.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Q=Ce.DetermineComponentFrameRoot(),Je=Q[0],Vt=Q[1];if(Je&&Vt){var xe=Je.split(`
20
+ `),St=Vt.split(`
21
+ `);for(Q=le=0;le<xe.length&&!xe[le].includes("DetermineComponentFrameRoot");)le++;for(;Q<St.length&&!St[Q].includes("DetermineComponentFrameRoot");)Q++;if(le===xe.length||Q===St.length)for(le=xe.length-1,Q=St.length-1;1<=le&&0<=Q&&xe[le]!==St[Q];)Q--;for(;1<=le&&0<=Q;le--,Q--)if(xe[le]!==St[Q]){if(le!==1||Q!==1)do if(le--,Q--,0>Q||xe[le]!==St[Q]){var On=`
22
+ `+xe[le].replace(" at new "," at ");return $.displayName&&On.includes("<anonymous>")&&(On=On.replace("<anonymous>",$.displayName)),typeof $=="function"&&re.set($,On),On}while(1<=le&&0<=Q);break}}}finally{ve=!1,Y.H=ie,o(),Error.prepareStackTrace=Z}return xe=(xe=$?$.displayName||$.name:"")?s(xe):"",typeof $=="function"&&re.set($,xe),xe}function l($){if($==null)return"";if(typeof $=="function"){var q=$.prototype;return a($,!(!q||!q.isReactComponent))}if(typeof $=="string")return s($);switch($){case H:return s("Suspense");case E:return s("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case N:return $=a($.render,!1),$;case O:return l($.type);case z:q=$._payload,$=$._init;try{return l($(q))}catch{}}return""}function u(){var $=Y.A;return $===null?null:$.getOwner()}function c($){if(j.call($,"key")){var q=Object.getOwnPropertyDescriptor($,"key").get;if(q&&q.isReactWarning)return!1}return $.key!==void 0}function f($,q){function Z(){lt||(lt=!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)",q))}Z.isReactWarning=!0,Object.defineProperty($,"key",{get:Z,configurable:!0})}function p(){var $=t(this.type);return me[$]||(me[$]=!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($,q,Z,ie,Ce,le){return Z=le.ref,$={$$typeof:P,type:$,key:q,props:le,_owner:Ce},(Z!==void 0?Z: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 b($,q,Z,ie,Ce,le){if(typeof $=="string"||typeof $=="function"||$===D||$===S||$===_||$===H||$===E||$===G||typeof $=="object"&&$!==null&&($.$$typeof===z||$.$$typeof===O||$.$$typeof===F||$.$$typeof===R||$.$$typeof===N||$.$$typeof===k||$.getModuleId!==void 0)){var Q=q.children;if(Q!==void 0)if(ie)if(I(Q)){for(ie=0;ie<Q.length;ie++)h(Q[ie],$);Object.freeze&&Object.freeze(Q)}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 h(Q,$)}else Q="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(Q+=" 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":I($)?ie="array":$!==void 0&&$.$$typeof===P?(ie="<"+(t($.type)||"Unknown")+" />",Q=" 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,Q);if(j.call(q,"key")){Q=t($);var Je=Object.keys(q).filter(function(xe){return xe!=="key"});ie=0<Je.length?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}",Dn[Q+ie]||(Je=0<Je.length?"{"+Je.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),Dn[Z+ie]=!0)}if(Z=null,q!==void 0&&(n(q),Z=""+q),c(V)&&(n(V.key),Z=""+V.key),"key"in V){q={};for(var Bt in V)Bt!=="key"&&(q[Bt]=V[Bt])}else q=V;return Z&&h(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),g($,Z,se,Se,u(),q)}function f($,V){if(typeof $=="object"&&$&&$.$$typeof!==Ue){if(R($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&y(ie,V)}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,V)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===P}function y($,V){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,V=S(V),!lr[V])){lr[V]=!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=A.getCurrentStack;A.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.',V,q),A.getCurrentStack=ie}}function S($){var V="",q=u();return q&&(q=t(q.type))&&(V=`
27
+ <%s key={someKey} {...props} />`,ie,Q,Je,Q),Dn[Q+ie]=!0)}if(Q=null,Z!==void 0&&(n(Z),Q=""+Z),c(q)&&(n(q.key),Q=""+q.key),"key"in q){Z={};for(var Vt in q)Vt!=="key"&&(Z[Vt]=q[Vt])}else Z=q;return Q&&f(Z,typeof $=="function"?$.displayName||$.name||"Unknown":$),g($,Q,le,Ce,u(),Z)}function h($,q){if(typeof $=="object"&&$&&$.$$typeof!==Ge){if(I($))for(var Z=0;Z<$.length;Z++){var ie=$[Z];m(ie)&&v(ie,q)}else if(m($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?Z=null:(Z=V&&$[V]||$["@@iterator"],Z=typeof Z=="function"?Z:null),typeof Z=="function"&&Z!==$.entries&&(Z=Z.call($),Z!==$))for(;!($=Z.next()).done;)m($.value)&&v($.value,q)}}function m($){return typeof $=="object"&&$!==null&&$.$$typeof===P}function v($,q){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,q=C(q),!cr[q])){cr[q]=!0;var Z="";$&&$._owner!=null&&$._owner!==u()&&(Z=null,typeof $._owner.tag=="number"?Z=t($._owner.type):typeof $._owner.name=="string"&&(Z=$._owner.name),Z=" It was passed a child from "+Z+".");var ie=Y.getCurrentStack;Y.getCurrentStack=function(){var Ce=l($.type);return ie&&(Ce+=ie()||""),Ce},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.',q,Z),Y.getCurrentStack=ie}}function C($){var q="",Z=u();return Z&&(Z=t(Z.type))&&(q=`
28
28
 
29
- Check the render method of \``+q+"`."),V||($=t($))&&(V=`
29
+ Check the render method of \``+Z+"`."),q||($=t($))&&(q=`
30
30
 
31
- Check the top-level render call using <`+$+">."),V}var w=d,P=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=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"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),X=Symbol.iterator,I=Symbol.for("react.client.reference"),A=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,Y=Object.assign,M=Symbol.for("react.client.reference"),R=Array.isArray,K=0,L,H,W,F,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($,V,q,ie,Se){return m($,V,q,!1,ie,Se)},In.jsxs=function($,V,q,ie,Se){return m($,V,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 Ae=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:Ae(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(),Lh(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 Lh(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)}),Kh=at(function(){return aa(/^iPhone/i)}),Eu=at(function(){return aa(/^iPad/i)||It()&&navigator.maxTouchPoints>1}),di=at(function(){return Kh()||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,P=parseInt(h,10)||0,x=parseInt(g,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-P&&(a+=n+i-v+P),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={};/**
31
+ Check the top-level render call using <`+$+">."),q}var w=d,P=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),F=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),V=Symbol.iterator,L=Symbol.for("react.client.reference"),Y=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,B=Object.assign,k=Symbol.for("react.client.reference"),I=Array.isArray,A=0,M,W,U,K,X,te,fe;r.__reactDisabledLog=!0;var de,oe,ve=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),Ge=Symbol.for("react.client.reference"),lt,me={},Dn={},cr={};kn.Fragment=D,kn.jsx=function($,q,Z,ie,Ce){return b($,q,Z,!1,ie,Ce)},kn.jsxs=function($,q,Z,ie,Ce){return b($,q,Z,!0,ie,Ce)}}()),kn}var Qs;function _0(){return Qs||(Qs=1,process.env.NODE_ENV==="production"?fr.exports=T0():fr.exports=P0()),fr.exports}var y=_0();const D0={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"}}}},O0={components:D0},I0={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"}}},k0={components:I0},N0={share:{copyLink:"Copy link",ok:"Ok",shareButton:"Share",modalTitle:"Share folder",access:{delete:"Remove access"},invitations:{title:"Pending invitations"},members:{title:"Members",title_plural:"Shared between {count} people",title_singular:"Shared between {count} person",load_more:"Show more "},search:{placeholder:"Search user",group_name:"Search user result"},user:{no_result:"No result",placeholder:"Search user"},item:{add:"Add"}},footer:{links:{legal:"Legal mentions",personal_data:"Personal data and cookies",accessibility:"Accessibility"},mention:"Unless otherwise stated, all content on this site is under the",license:"etalab-2.0 license"}},R0={components:N0},L0={share:{copyLink:"Copier le lien",ok:"Ok",modalTitle:"Partage",shareButton:"Partager",access:{delete:"Retirer l'accès"},invitations:{title:"Invitations en attente"},members:{title_plural:"Partagé entre {count} personnes",title_singular:"Partagé entre {count} personne",load_more:"Afficher plus"},item:{add:"Ajouter"},search:{placeholder:"Rechercher un utilisateur",group_name:"Résultat de la recherche d'utilisateur"},user:{no_result:"Aucun résultat",placeholder:"Rechercher un utilisateur"}},footer:{links:{legal:"Mentions Légales",personal_data:"Données personnelles et cookies",accessibility:"Accessibilité"},mention:"Sauf mention contraire, tout le contenu de ce site est sous",license:"licence etalab-2.0"}},M0={components:L0};function Ri(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ur(t,...e){if(!e.length)return t;const n=e.shift();if(Ri(t)&&Ri(n))for(const r in n)Ri(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Ur(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Ur(t,...e)}function _u(){return{"en-US":Ur(O0,R0),"fr-FR":Ur(k0,M0)}}const A0=t=>{const e=_u();return y.jsx(ae.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},Du=({disabled:t,onClick:e})=>y.jsx(ae.Button,{disabled:t,className:"pro-connect-button",onClick:e}),ge=typeof document<"u"?d.useLayoutEffect:()=>{};function _e(t){const e=d.useRef(null);return ge(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function K0(t){let[e,n]=d.useState(t),r=d.useRef(null),i=_e(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}e===s.value?i():n(s.value)});ge(()=>{r.current&&i()});let o=_e(s=>{r.current=s(e),i()});return[e,o]}const Gr={prefix:String(Math.round(Math.random()*1e10)),current:0},Ou=d.createContext(Gr),F0=d.createContext(!1);let j0=!!(typeof window<"u"&&window.document&&window.document.createElement),Li=new WeakMap;function H0(t=!1){let e=d.useContext(Ou),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 s=Li.get(o);s==null?Li.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==s.state&&(e.current=s.id,Li.delete(o))}n.current=++e.current}return n.current}function z0(t){let e=d.useContext(Ou);e===Gr&&!j0&&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=H0(!!t),r=e===Gr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function B0(t){let e=d.useId(),[n]=d.useState(xn()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Gr.prefix}`;return t||`${r}-${e}`}const V0=typeof d.useId=="function"?B0:z0;function W0(){return!1}function U0(){return!0}function G0(t){return()=>{}}function xn(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(G0,W0,U0):d.useContext(F0)}let q0=!!(typeof window<"u"&&window.document&&window.document.createElement),ht=new Map;function rr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=V0(e),o=d.useCallback(s=>{r.current=s},[]);return q0&&(ht.has(i)&&!ht.get(i).includes(o)?ht.set(i,[...ht.get(i),o]):ht.set(i,[o])),ge(()=>{let s=i;return()=>{ht.delete(s)}},[i]),d.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function Y0(t,e){if(t===e)return t;let n=ht.get(t);if(n)return n.forEach(i=>i(e)),e;let r=ht.get(e);return r?(r.forEach(i=>i(t)),t):e}function Mi(t=[]){let e=rr(),[n,r]=K0(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return ge(i,[e,i,...t]),n}function qn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ae=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:Ae(t).defaultView||window;function Iu(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=Iu(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ve(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Iu(t))&&(r&&(r+=" "),r+=e);return r}function be(...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],s=r[i];typeof o=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=qn(o,s):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof s=="string"?e[i]=Ve(o,s):i==="id"&&o&&s?e.id=Y0(o,s):e[i]=s!==void 0?s:o}}return e}function ku(...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 Z0=new Set(["id"]),X0=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),J0=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Q0=/^(data-.*)$/;function We(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(Z0.has(s)||n&&X0.has(s)||r&&J0.has(s)||i!=null&&i.has(s)||Q0.test(s))&&(o[s]=t[s]);return o}function $t(t){if(e2())t.focus({preventScroll:!0});else{let e=t2(t);t.focus(),n2(e)}}let hr=null;function e2(){if(hr==null){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}function t2(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 n2(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function fi(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 fs(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 fs(/^Mac/i)}),r2=at(function(){return fs(/^iPhone/i)}),Nu=at(function(){return fs(/^iPad/i)||It()&&navigator.maxTouchPoints>1}),hi=at(function(){return r2()||Nu()}),i2=at(function(){return It()||hi()}),Ru=at(function(){return fi(/AppleWebKit/i)&&!o2()}),o2=at(function(){return fi(/Chrome/i)}),Lu=at(function(){return fi(/Android/i)}),s2=at(function(){return fi(/Firefox/i)}),a2=d.createContext({isNative:!0,open:u2,useHref:t=>t});function pi(){return d.useContext(a2)}function kt(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=e;s2()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(It()?o=!0:s=!0);let u=Ru()&&It()&&!Nu()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});kt.isOpening=n,$t(t),t.dispatchEvent(u),kt.isOpening=!1}kt.isOpening=!1;function l2(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 u2(t,e){l2(t,n=>kt(n,e))}function Mu(t){let e=pi();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 rn=new Map,Po=new Set;function ea(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=rn.get(r.target);i||(i=new Set,rn.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=rn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),rn.delete(r.target)),rn.size===0)){for(let o of Po)o();Po.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?ea():document.addEventListener("DOMContentLoaded",ea));function c2(t){requestAnimationFrame(()=>{rn.size===0?t():Po.add(t)})}function Au(){let t=d.useRef(new Map),e=d.useCallback((i,o,s,a)=>{let l=a!=null&&a.once?(...u)=>{t.current.delete(s),s(...u)}:s;t.current.set(s,{type:o,eventTarget:i,fn:l,options:a}),i.addEventListener(o,l,a)},[]),n=d.useCallback((i,o,s,a)=>{var l;let u=((l=t.current.get(s))===null||l===void 0?void 0:l.fn)||s;i.removeEventListener(o,u,a),t.current.delete(s)},[]),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 hs(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=rr(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 ta(t,e){const n=d.useRef(!0),r=d.useRef(null);ge(()=>(n.current=!0,()=>{n.current=!1}),[]),ge(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function d2(){return typeof window.ResizeObserver<"u"}function na(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(d2()){const o=new window.ResizeObserver(s=>{s.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 f2(t,e){ge(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Yn(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 Ku(t,e){let n=t;for(Yn(n,e)&&(n=n.parentElement);n&&!Yn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function h2(t,e){const n=[];for(;t&&t!==document.documentElement;)Yn(t,e)&&n.push(t),t=t.parentElement;return n}let p2=0;const Ai=new Map;function g2(t){let[e,n]=d.useState();return ge(()=>{if(!t)return;let r=Ai.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${p2++}`;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},Ai.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Ai.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function pr(t,e,n,r){let i=_e(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let s=t.current;return s.addEventListener(e,i,r),()=>{s.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Fu(t,e){let n=ra(t,e,"left"),r=ra(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,s=t.scrollLeft,a=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:f,scrollPaddingBottom:p,scrollPaddingLeft:g}=getComputedStyle(t),b=s+parseInt(u,10),h=a+parseInt(l,10),m=b+t.clientWidth,v=h+t.clientHeight,C=parseInt(c,10)||0,w=parseInt(p,10)||0,P=parseInt(f,10)||0,x=parseInt(g,10)||0;n<=s+x?s=n-parseInt(u,10)-x:n+i>m-P&&(s+=n+i-m+P),r<=h+C?a=r-parseInt(l,10)-C:r+o>v-w&&(a+=r+o-v+w),t.scrollLeft=s,t.scrollTop=a}function ra(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 ia(t,e){if(t&&document.contains(t)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let l=h2(t);for(let u of l)Fu(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:f}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-f)>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:Lu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function v2(t){return!Lu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const m2="react-aria-clear-focus",y2="react-aria-focus",ju="react-aria-update-activedescendant";function on(t){return It()?t.metaKey:t.ctrlKey}function b2(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return ge(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Hu(t,i,d.useCallback(()=>r(!1),[])),i}function S2(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 Hu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Hu(t,e,n){ge(()=>{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||Ht.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function ir(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),s=t!==void 0;d.useEffect(()=>{let u=o.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s},[s]);let a=s?t:r,l=d.useCallback((u,...c)=>{let f=(p,...g)=>{n&&(Object.is(a,p)||n(p,...g)),s||(a=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,...b)=>{let h=u(s?a:g,...b);return f(h,...c),s?g:h})):(s||i(u),f(u,...c))},[s,a,n]);return[a,l]}function Do(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const oa=Symbol("default");function or({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function bt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:a}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...a,defaultClassName:i}):l=e,typeof n=="function"?u=n({...a,defaultStyle:s||{}}):u=n,typeof r=="function"?c=r({...a,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||s?{...s,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,s,a])}function ps(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[oa])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||oa;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function sr(t,e,n){let r=ps(n,t.slot)||{},{ref:i,...o}=r,s=$n(d.useMemo(()=>ku(e,i),[e,i])),a=be(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?a.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},f=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...f}}:a.style={...o.style,...t.style}),[a,s]}function C2(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return ge(()=>{n.current||e(!1)},[]),[r,t]}class gs{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new gs(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 vs{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 vs,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),s=null;for(let a of this.getChildren(i.key))if(e(a.textValue)||a.type==="header"){let l=a.clone();s==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),s&&s.parentKey===l.parentKey?(s.nextKey=l.key,l.prevKey=s.key):l.prevKey=null,l.nextKey=null,n.addNode(l),s=l}s&&(s.type!=="header"?(o.lastChildKey=s.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(s.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 zu{*[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 Zn extends zu{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Zn?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 Zn?this.parentNode.node.key:null;var s;o.prevKey=(s=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&s!==void 0?s:null;var a;o.nextKey=(a=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&a!==void 0?a: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:s,textValue:a,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=s,o.textValue=a||(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 gs(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class w2 extends zu{get isConnected(){return this.isMounted}createElement(e){return new Zn(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 Zn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let s of this.mutatedNodes)s.isConnected&&o.addNode(s.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 Bu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,s=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let f=s.get(c);if(!f){f=e(c);var a,l;let p=(l=(a=f.props.id)!==null&&a!==void 0?a: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),f=d.cloneElement(f,i?{key:p,id:p,value:c}:{key:p}),s.set(c,f)}u.push(f)}return u}else if(typeof e!="function")return e},[e,n,s,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 qr=d.createContext(!1),E2=typeof DocumentFragment<"u"?new DocumentFragment:null;function x2(t){let e=d.useContext(qr),n=xn();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(qr.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):Ht.createPortal(r,E2)}function $2(t){let e=(n,r)=>d.useContext(qr)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function T2(){return d.useContext(qr)}const P2=typeof document<"u"?d.useLayoutEffect:()=>{};var gr={exports:{}},Ki={};/**
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 <`+$+">."),V}var w=d,P=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 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={};/**
39
+ */var sa;function _2(){if(sa)return Ki;sa=1;var t=d;function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function a(f,p){var g=p(),b=r({inst:{value:g,getSnapshot:p}}),h=b[0].inst,m=b[1];return o(function(){h.value=g,h.getSnapshot=p,l(h)&&m({inst:h})},[f,g,p]),i(function(){return l(h)&&m({inst:h}),f(function(){l(h)&&m({inst:h})})},[f]),s(g),g}function l(f){var p=f.getSnapshot;f=f.value;try{var g=p();return!n(f,g)}catch{return!0}}function u(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Ki.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Ki}var Fi={};/**
40
40
  * @license React
41
41
  * use-sync-external-store-shim.development.js
42
42
  *
@@ -44,59 +44,59 @@ Check the top-level render call using <`+$+">."),V}var w=d,P=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 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)}),Lu=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:Lu()&&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 Ku(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=Ku(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=Ku(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 Lp(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"&&Lp();function Wu(){return Cn!=="pointer"}function Uu(){return Cn}const Kp=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&&!Kp.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(Ke(p,s.current)){for(let m of ue.traverse())m.scopeRef&&Ke(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=Ke(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=Ke(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 Ln(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||!Ln(t)||u.isComposing)return;let c=o.activeElement,h=t.current;if(!h||!Ke(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))&&Ke(u.target,t.current)?(ae=t,n.current=u.target):Ln(t)&&!vt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):Ln(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Uu();if(!((c==="virtual"||c===null)&&Lu()&&Cp())&&o.activeElement&&Ln(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 Ke(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&&Ke(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);!Ke(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;Ke(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))&&Ke(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||!Ln(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||Ke(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&&Ke(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=Ae(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=Ae(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,k)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let N=!0;if(B.isTriggeringEvent=!0,r){let z=new mr("pressstart",k,b);r(z),N=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,m(!0),N}),w=De((b,k,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",k,b);i(E),z=E.shouldStopPropagation}if(n&&n(!1),m(!1),e&&B&&!a){let E=new mr("press",k,b);e(E),z&&(z=E.shouldStopPropagation)}return N.isTriggeringEvent=!1,z}),P=De((b,k)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let N=new mr("pressup",k,b);return o(N),B.isTriggeringEvent=!1,N.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,y(),c||gr(k.target))}),O=De(b=>{u&&x(b)}),D=d.useMemo(()=>{let b=f.current,k={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 _=N.currentTarget,j=U=>{Mi(U,_)&&!U.repeat&&_.contains(U.target)&&b.target&&P(Qe(b.target,U),"keyboard")};v(Ae(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"),_=P(N,"virtual"),j=w(N,"virtual");z=E&&_&&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 _;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let U of j.values())(_=b.target)===null||_===void 0||_.dispatchEvent(new KeyboardEvent("keyup",U))}};if(typeof PointerEvent<"u"){k.onPointerDown=_=>{if(_.button!==0||!_.currentTarget.contains(_.target))return;if(Jh(_.nativeEvent)){b.pointerType="virtual";return}Li(_.currentTarget)&&_.preventDefault(),b.pointerType=_.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=_.pointerId,b.target=_.currentTarget,!a&&!l&&xt(_.currentTarget),c||cs(b.target),j=S(_,b.pointerType);let U=_.target;"releasePointerCapture"in U&&U.releasePointerCapture(_.pointerId),v(Ae(_.currentTarget),"pointerup",N,!1),v(Ae(_.currentTarget),"pointercancel",E,!1)}j&&_.stopPropagation()},k.onMouseDown=_=>{_.currentTarget.contains(_.target)&&_.button===0&&(Li(_.currentTarget)&&_.preventDefault(),_.stopPropagation())},k.onPointerUp=_=>{!_.currentTarget.contains(_.target)||b.pointerType==="virtual"||_.button===0&&P(_,b.pointerType||_.pointerType)},k.onPointerEnter=_=>{_.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,_),b.pointerType))},k.onPointerLeave=_=>{_.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,_),b.pointerType,!1),O(_))};let N=_=>{_.pointerId===b.activePointerId&&b.isPressed&&_.button===0&&b.target&&(b.target.contains(_.target)&&b.pointerType!=null?w(Qe(b.target,_),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,_),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,y(),c||gr(b.target),"ontouchend"in b.target&&_.pointerType!=="mouse"&&v(b.target,"touchend",z,{once:!0}))},z=_=>{Xu(_.currentTarget)&&_.preventDefault()},E=_=>{x(_)};k.onDragStart=_=>{_.currentTarget.contains(_.target)&&x(_)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Li(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(Ae(E.currentTarget),"mouseup",N,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let _=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,_=S(E,b.pointerType)),_&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let _=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,_=w(E,b.pointerType,!1),O(E)),_&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&P(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}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let _=eg(E.nativeEvent);if(!_)return;b.activePointerId=_.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)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let _=fs(E.nativeEvent,b.activePointerId),j=!0;_&&Ai(_,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()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let _=fs(E.nativeEvent,b.activePointerId),j=!0;_&&Ai(_,E.currentTarget)&&b.pointerType!=null?(P(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()},k.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})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,l,y,c,x,O,w,S,P]);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,D)}}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 Li(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=Ae(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=Ae(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=Ae(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=Ae(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,Ki=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),Ki++,()=>{Ki--,!(Ki>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=Ae(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(),Kn=new Set;function ys(){Ao=ic();for(let t of Kn)t(Ao)}function Sg(){let t=$n(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",ys),Kn.add(n),()=>{Kn.delete(n),Kn.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"},Lo={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[Lo[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=Lo[r],a=Lo[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,P,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]+=((P=t[f])!==null&&P!==void 0?P:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[g]+=o;const O=t[g]-n[f]+l+u,D=t[g]+t[f]-l-u;if(v[g]=xo(v[g],O,D),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 Lg(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 Kg(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:P,crossPlacement:x}=v,O=ji(e,s,n,v,c,h,u,p,m,f),D=c,b=Ts(s,u,e,i,o+c,v);if(a&&r[y]>b){let K=Cs(`${Qr[P]} ${x}`),L=ji(e,s,n,K,c,h,u,p,m,f);Ts(s,u,e,i,o+c,K)>b&&(v=K,O=L,D=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=xs(S,O[S],n[w],s,l,o,u);O[S]+=B;let N=Lg(O,s,u,p,i,o,n.height,k);g&&g<N&&(N=g),n.height=Math.min(n.height,N),O=ji(e,s,n,v,D,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 _=m/2+f;var j,U,X,I;const A=Ye[S]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((U=i.right)!==null&&U!==void 0?U:0):((X=i.top)!==null&&X!==void 0?X:0)+((I=i.bottom)!==null&&I!==void 0?I:0),G=n[w]-A-m/2-f,Y=e[S]+m/2-(O[S]+i[Ye[S]]),M=e[S]+e[w]-m/2-(O[S]+i[Ye[S]]),R=xo(E,Y,M);return z[S]=xo(R,_,G),{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 P,x;S.width+=((P=w.left)!==null&&P!==void 0?P:0)+((x=w.right)!==null&&x!==void 0?x:0);var O,D;S.height+=((O=w.top)!==null&&O!==void 0?O:0)+((D=w.bottom)!==null&&D!==void 0?D:0);let b=Mg(i),k=$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),Kg(e,y,S,b,w,o,a,k,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],P=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{g&&(P.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)!==P.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var N;let I=(N=document.activeElement)===null||N===void 0?void 0:N.getBoundingClientRect(),A=o.current.getBoundingClientRect();var z;if(B={type:"top",offset:((z=I==null?void 0:I.top)!==null&&z!==void 0?z:0)-A.top},B.offset>A.height/2){B.type="bottom";var E;B.offset=((E=I==null?void 0:I.bottom)!==null&&E!==void 0?E:0)-A.bottom}}let _=i.current;if(!f&&i.current){var j;_.style.top="0px",_.style.bottom="";var U;_.style.maxHeight=((U=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&U!==void 0?U: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(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(X.position).forEach(I=>_.style[I]=X.position[I]+"px"),_.style.maxHeight=X.maxHeight!=null?X.maxHeight+"px":"",B&&document.activeElement&&o.current){let I=document.activeElement.getBoundingClientRect(),A=o.current.getBoundingClientRect(),G=I[B.type]-A[B.type];o.current.scrollTop+=G-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 D=d.useCallback(()=>{O.current||m==null||m()},[m,O]);Hg({triggerRef:r,isOpen:g,onClose:m&&D});var b,k;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:(k=y==null?void 0:y.placement)!==null&&k!==void 0?k: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 Lc={};Lc={dismiss:"Kapat"};var Kc={};Kc={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":Lc,"uk-UA":Kc,"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 Ko(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 _;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((_=r.current)===null||_===void 0)&&_.contains(E.target)))return;const j=(F,J)=>{if(F!=null){if(e.isLink(F)&&m==="selection"&&l&&!Ko(E)){var te;jt.flushSync(()=>{e.setFocusedKey(F,J)});let de=(te=g.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,J),e.isLink(F)&&m==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&!Ko(E)&&e.replaceSelection(F)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var U,X,I;let F=e.focusedKey!=null?(U=n.getKeyBelow)===null||U===void 0?void 0:U.call(n,e.focusedKey):(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n);F==null&&o&&(F=(I=n.getFirstKey)===null||I===void 0?void 0:I.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowUp":if(n.getKeyAbove){var A,G,Y;let F=e.focusedKey!=null?(A=n.getKeyAbove)===null||A===void 0?void 0:A.call(n,e.focusedKey):(G=n.getLastKey)===null||G===void 0?void 0:G.call(n);F==null&&o&&(F=(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowLeft":if(n.getKeyLeftOf){var M,R,K;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"?(R=n.getFirstKey)===null||R===void 0?void 0:R.call(n,e.focusedKey):(K=n.getLastKey)===null||K===void 0?void 0:K.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var L,H,W;let F=e.focusedKey!=null?(L=n.getKeyRightOf)===null||L===void 0?void 0:L.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,e.focusedKey):(W=n.getFirstKey)===null||W===void 0?void 0:W.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(!h){if(E.shiftKey)r.current.focus();else{let F=qe(r.current,{tabbable:!0}),J,te;do te=F.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,_,j,U;S.current={top:(j=(E=g.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(U=(_=g.current)===null||_===void 0?void 0:_.scrollLeft)!==null&&U!==void 0?U: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 _,j;let I=G=>{G!=null&&(e.setFocusedKey(G),l&&e.replaceSelection(G))},A=E.relatedTarget;var U,X;A&&E.currentTarget.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_FOLLOWING?I((U=e.lastSelectedKey)!==null&&U!==void 0?U:(_=n.getLastKey)===null||_===void 0?void 0:_.call(n)):I((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 I=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);I&&(I.contains(document.activeElement)||xt(I),gs()==="keyboard"&&Qa(I,{containingElement:r.current}))}}},P=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);fr(r,Zh,c?E=>{let{detail:_}=E;E.stopPropagation(),e.setFocused(!0),(_==null?void 0:_.focusStrategy)==="first"&&(x.current=!0)}:void 0);let O=De(()=>{var E,_;let j=(_=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&_!==void 0?_:null;if(j==null){var U;(U=r.current)===null||U===void 0||U.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 D=De(()=>{e.collection.size>0&&(x.current=!1)});Ya(()=>{D()},[e.focusedKey,D]),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,_;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 U;i==="last"&&(X=(U=(_=n.getLastKey)===null||_===void 0?void 0:_.call(n))!==null&&U!==void 0?U:null);let I=e.selectedKeys;if(I.size){for(let A of I)if(e.canSelectItem(A)){X=A;break}}e.setFocused(!0),e.setFocusedKey(X),X==null&&!c&&r.current&&qr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&g.current&&r.current){let E=gs(),_=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!_)return;(E==="keyboard"||b.current)&&(Pu(g.current,_),E!=="virtual"&&Qa(_,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&qr(r.current),k.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:P,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=I=>{if(I.pointerType==="keyboard"&&Ko(I))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(h==="selection"&&i.current){let A=n.getItemProps(r);p.open(i.current,I,A.href,A.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):I&&I.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||I&&(rn(I)||I.pointerType==="touch"||I.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 A;let G=new CustomEvent(Ou,{cancelable:!0,bubbles:!0});(A=i.current)===null||A===void 0||A.dispatchEvent(G)}},[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(I){I.target===i.current&&n.setFocusedKey(r)}}:l&&(m.onMouseDown=I=>{I.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),P=S&&y&&n.selectionBehavior==="replace",x=w||P,O=d.useRef(null),D=x&&y,b=d.useRef(!1),k=d.useRef(!1),B=I=>{if(u&&u(),v&&i.current){let A=n.getItemProps(r);p.open(i.current,I,A.href,A.routerOptions)}},N={};o?(N.onPressStart=I=>{O.current=I.pointerType,b.current=D,I.pointerType==="keyboard"&&(!x||ks())&&g(I)},c?(N.onPressUp=w?void 0:I=>{I.pointerType==="mouse"&&y&&g(I)},N.onPress=w?B:I=>{I.pointerType!=="keyboard"&&I.pointerType!=="mouse"&&y&&g(I)}):N.onPress=I=>{if(w||P&&I.pointerType!=="mouse"){if(I.pointerType==="keyboard"&&!_s())return;B(I)}else I.pointerType!=="keyboard"&&y&&g(I)}):(N.onPressStart=I=>{O.current=I.pointerType,b.current=D,k.current=w,y&&(I.pointerType==="mouse"&&!w||I.pointerType==="keyboard"&&(!S||ks()))&&g(I)},N.onPress=I=>{(I.pointerType==="touch"||I.pointerType==="pen"||I.pointerType==="virtual"||I.pointerType==="keyboard"&&x&&_s()||I.pointerType==="mouse"&&k.current)&&(x?B(I):y&&g(I))}),m["data-key"]=r,N.preventFocusOnPress=a;let{pressProps:z,isPressed:E}=ya(N),_=P?I=>{O.current==="mouse"&&(I.stopPropagation(),I.preventDefault(),B(I))}:void 0,{longPressProps:j}=gg({isDisabled:!D,onLongPress(I){I.pointerType==="touch"&&(g(I),n.setSelectionBehavior("toggle"))}}),U=I=>{O.current==="touch"&&b.current&&I.preventDefault()},X=n.isLink(r)?I=>{_t.isOpening||I.preventDefault()}:void 0;return{itemProps:ye(m,y||w?z:{},D?j:{},{onDoubleClick:_,onDragStartCapture:U,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:P,selectionManager:x=e.selectionManager}=t,O=!!s,D=O&&t["aria-expanded"]==="true";var b;let k=(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),_=t.onClose||z.onClose,j=fi(),U=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 I=_i(),A=_i(),G=_i(),Y={id:r,"aria-disabled":k||void 0,role:X,"aria-label":t["aria-label"],"aria-labelledby":I,"aria-describedby":[A,G].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!O&&(Y["aria-checked"]=N),a&&(Y["aria-posinset"]=E==null?void 0:E.index,Y["aria-setsize"]=fv(e.collection));let M=re=>{re.pointerType==="keyboard"&&U(re),l==null||l(re)},R=()=>{!O&&_&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&_()},K=re=>{re.pointerType==="mouse"&&(U(re),R()),u==null||u(re)},L=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(U(re),R()),c==null||c(re)},{itemProps:H,isFocused:W}=Bc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:z.shouldUseVirtualFocus}),{pressProps:F,isPressed:J}=ya({onPressStart:M,onPress:L,onPressUp:K,onPressChange:h,onPressEnd:p,isDisabled:k}),{hoverProps:te}=wa({isDisabled:k,onHoverStart(re){!cg()&&!(D&&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" ":!k&&x.selectionMode==="none"&&!O&&o!==!1&&_&&_();break;case"Enter":!k&&o!==!1&&!O&&_&&_();break;default:O||re.continuePropagation(),v==null||v(re);break}},onKeyUp:y}),{focusProps:ce}=ag({onBlur:P,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:{...Y,...ye(oe,ge,O?{onFocus:H.onFocus,"data-key":H["data-key"]}:H,F,te,de,ce),tabIndex:H.tabIndex!=null&&D?-1:H.tabIndex},labelProps:{id:I},descriptionProps:{id:A},keyboardShortcutProps:{id:G},isFocused:W,isSelected:N,isPressed:J,isDisabled:k}}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 P=a.type;throw new Error(`Unknown element <${P}> 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 P=w.value;e.index=S;var l;let x=(l=P.key)!==null&&l!==void 0?l:null;x==null&&(x=P.element?null:this.getKey(a,e,n,r));let D=[...this.getFullNode({...P,key:x,index:S,wrapper:xv(e.wrapper,P.wrapper)},this.getChildState(n,P),r?`${r}${a.key}`:a.key,i)];for(let b of D){var u,c;b.value=(c=(u=P.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(D)}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=[...Ls(t,e),e],i=[...Ls(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 Ls(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 P=new Map(S),x=y(w);for(x==null?m(w,P):g(x,P);w&&w.parentKey;){let D=P.get(w.parentKey),b={key:D.key,parentKey:D.parentKey,value:D.value,children:null},k=D.children;x==null&&k&&(k=k.filter(B=>B!==w));var O;b.children=(O=k==null?void 0:k.map(B=>B===w?x:B))!==null&&O!==void 0?O:null,P.set(b.key,b),x=b,w=D}return x==null&&(f=f.filter(D=>D!==w)),{items:f.map(D=>D===w?x:D),nodeMap:P}}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:P,nodeMap:x}=h(y,w,f);return f==null?{items:[...S.slice(0,v),...P,...S.slice(v)],nodeMap:x}:p(S,f,O=>({key:O.key,parentKey:O.parentKey,value:O.value,children:[...O.children.slice(0,v),...P,...O.children.slice(v)]}),x)})},insertBefore(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),P=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,P,...v)},insertAfter(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),P=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,P+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 P of f)S=p(v,P,()=>null,y),y=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let P of u)S.nodeMap.has(P)||w.delete(P);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,y){a(({items:S,nodeMap:w})=>{let P=w.get(f);if(!P)return{items:S,nodeMap:w};let{items:x,nodeMap:O}=p(S,f,()=>null,w);const D={...P,parentKey:v};return v==null?(O.set(D.key,D),{items:[...x.slice(0,y),D,...x.slice(y)],nodeMap:O}):p(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,y),D,...b.children.slice(y)]}),O)})},update(f,v){a(({items:y,nodeMap:S})=>p(y,f,w=>{let P={key:w.key,parentKey:w.parentKey,value:v,children:null},x=h(i(v),S,P.key);return P.children=x.items,P},S))}}}class Ks{*[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,P="first"){l.current=w,u.current=P,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 Ks(e(c)):new Ks(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 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,h;const P=((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(P>1?Math.max(((p=y==null?void 0:y.index)!==null&&p!==void 0?p:0)-P+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,D=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){O=w[x];break}if(x<w.length-1&&!D)x++;else{D=!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),Lv=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 Kv=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,P="first"){l.current=w,u.current=P,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"}],[Lv,{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:[[Kv,{...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:Ox,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:P,groupId:x,isPanelCollapsed:O,reevaluatePanelConstraints:D,registerPanel:b,resizePanel:k,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:_,constraints:j}=z.current,U={...j};z.current.id=N,z.current.idIsFromProps=a!==void 0,z.current.order=p,_.onCollapse=u,_.onExpand=c,_.onResize=h,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=s,j.minSize=l,(U.collapsedSize!==j.collapsedSize||U.collapsible!==j.collapsible||U.maxSize!==j.maxSize||U.minSize!==j.minSize)&&D(z.current,U)}),Pt(()=>{const _=z.current;return b(_),()=>{B(_)}},[p,N,b,B]),sd(o,()=>({collapse:()=>{y(z.current)},expand:_=>{S(z.current,_)},getId(){return N},getSize(){return w(z.current)},isCollapsed(){return O(z.current)},isExpanded(){return!O(z.current)},resize:_=>{k(z.current,_)}}),[y,S,w,O,N,k]);const E=P(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,P=cn({panelConstraints:n,panelIndex:y,size:w});if(Te(S,P)||(f-=P-S,a[y]=P),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 P=r[S],{collapsedSize:x=0,collapsible:O,minSize:D=0}=w.constraints;if(P!=null&&O){const b=Fn({delta:Te(P,x)?D-x:x-P,initialLayout:r,panelConstraints:l.map(k=>k.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 Lm=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({}),P=Ce(new Map),x=Ce(0),O=Ce({autoSaveId:t,direction:r,dragState:m,id:p,keyboardResizeBy:s,onLayout:a,storage:l}),D=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),sd(i,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:R}=D.current;return R},setLayout:R=>{const{onLayout:K}=O.current,{layout:L,panelDataArray:H}=D.current,W=Xs({layout:R,panelConstraints:H.map(F=>F.constraints)});qs(L,W)||(y(W),D.current.layout=W,K&&K(W),Vt(H,W,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:D,groupId:p,layout:v,panelDataArray:D.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),Dt(()=>{const{panelDataArray:R}=D.current;if(t){if(v.length===0||v.length!==R.length)return;let K=Js[t];K==null&&(K=Nm(Am,Lm),Js[t]=K);const L=[...R],H=new Map(P.current);K(t,L,H,v,l)}},[t,v,l]),Dt(()=>{});const b=xe(R=>{const{onLayout:K}=O.current,{layout:L,panelDataArray:H}=D.current;if(R.constraints.collapsible){const W=H.map(de=>de.constraints),{collapsedSize:F=0,panelSize:J,pivotIndices:te}=St(H,R,L);if(ee(J!=null,`Panel size not found for panel "${R.id}"`),!nt(J,F)){P.current.set(R.id,J);const ce=an(H,R)===H.length-1?J-F:F-J,oe=Fn({delta:ce,initialLayout:L,panelConstraints:W,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});wr(L,oe)||(y(oe),D.current.layout=oe,K&&K(oe),Vt(H,oe,w.current))}}},[]),k=xe((R,K)=>{const{onLayout:L}=O.current,{layout:H,panelDataArray:W}=D.current;if(R.constraints.collapsible){const F=W.map(ge=>ge.constraints),{collapsedSize:J=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=St(W,R,H),oe=K??de;if(nt(te,J)){const ge=P.current.get(R.id),re=ge!=null&&ge>=oe?ge:oe,st=an(W,R)===W.length-1?te-re:re-te,ve=Fn({delta:st,initialLayout:H,panelConstraints:F,pivotIndices:ce,prevLayout:H,trigger:"imperative-api"});wr(H,ve)||(y(ve),D.current.layout=ve,L&&L(ve),Vt(W,ve,w.current))}}},[]),B=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{panelSize:H}=St(L,R,K);return ee(H!=null,`Panel size not found for panel "${R.id}"`),H},[]),N=xe((R,K)=>{const{panelDataArray:L}=D.current,H=an(L,R);return Rm({defaultSize:K,dragState:m,layout:v,panelData:L,panelIndex:H})},[m,v]),z=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{collapsedSize:H=0,collapsible:W,panelSize:F}=St(L,R,K);return ee(F!=null,`Panel size not found for panel "${R.id}"`),W===!0&&nt(F,H)},[]),E=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{collapsedSize:H=0,collapsible:W,panelSize:F}=St(L,R,K);return ee(F!=null,`Panel size not found for panel "${R.id}"`),!W||Nt(F,H)>0},[]),_=xe(R=>{const{panelDataArray:K}=D.current;K.push(R),K.sort((L,H)=>{const W=L.order,F=H.order;return W==null&&F==null?0:W==null?-1:F==null?1:W-F}),D.current.panelDataArrayChanged=!0,S()},[S]);Pt(()=>{if(D.current.panelDataArrayChanged){D.current.panelDataArrayChanged=!1;const{autoSaveId:R,onLayout:K,storage:L}=O.current,{layout:H,panelDataArray:W}=D.current;let F=null;if(R){const te=Mm(R,W,L);te&&(P.current=new Map(Object.entries(te.expandToSizes)),F=te.layout)}F==null&&(F=km({panelDataArray:W}));const J=Xs({layout:F,panelConstraints:W.map(te=>te.constraints)});qs(H,J)||(y(J),D.current.layout=J,K&&K(J),Vt(W,J,w.current))}}),Pt(()=>{const R=D.current;return()=>{R.layout=[]}},[]);const j=xe(R=>{let K=!1;const L=g.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(W){W.preventDefault();const F=g.current;if(!F)return()=>null;const{direction:J,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=O.current,{layout:ge,panelDataArray:re}=D.current,{initialLayout:Ue}=te??{},st=yd(de,R,F);let ve=_m(W,R,J,te,ce,F);const Dn=J==="horizontal";Dn&&K&&(ve=-ve);const lr=re.map(q=>q.constraints),$=Fn({delta:ve,initialLayout:Ue??ge,panelConstraints:lr,pivotIndices:st,prevLayout:ge,trigger:ud(W)?"keyboard":"mouse-or-touch"}),V=!wr(ge,$);(cd(W)||dd(W))&&x.current!=ve&&(x.current=ve,!V&&ve!==0?Dn?Gi(R,ve<0?hd:pd):Gi(R,ve<0?gd:vd):Gi(R,0)),V&&(y($),D.current.layout=$,oe&&oe($),Vt(re,$,w.current))}},[]),U=xe((R,K)=>{const{onLayout:L}=O.current,{layout:H,panelDataArray:W}=D.current,F=W.map(ge=>ge.constraints),{panelSize:J,pivotIndices:te}=St(W,R,H);ee(J!=null,`Panel size not found for panel "${R.id}"`);const ce=an(W,R)===W.length-1?J-K:K-J,oe=Fn({delta:ce,initialLayout:H,panelConstraints:F,pivotIndices:te,prevLayout:H,trigger:"imperative-api"});wr(H,oe)||(y(oe),D.current.layout=oe,L&&L(oe),Vt(W,oe,w.current))},[]),X=xe((R,K)=>{const{layout:L,panelDataArray:H}=D.current,{collapsedSize:W=0,collapsible:F}=K,{collapsedSize:J=0,collapsible:te,maxSize:de=100,minSize:ce=0}=R.constraints,{panelSize:oe}=St(H,R,L);oe!=null&&(F&&te&&nt(oe,W)?nt(W,J)||U(R,J):oe<ce?U(R,ce):oe>de&&U(R,de))},[U]),I=xe((R,K)=>{const{direction:L}=O.current,{layout:H}=D.current;if(!g.current)return;const W=Si(R,g.current);ee(W,`Drag handle element not found for id "${R}"`);const F=Sd(L,K);f({dragHandleId:R,dragHandleRect:W.getBoundingClientRect(),initialCursorPosition:F,initialLayout:H})},[]),A=xe(()=>{f(null)},[]),G=xe(R=>{const{panelDataArray:K}=D.current,L=an(K,R);L>=0&&(K.splice(L,1),delete w.current[R.id],D.current.panelDataArrayChanged=!0,S())},[S]),Y=dm(()=>({collapsePanel:b,direction:r,dragState:m,expandPanel:k,getPanelSize:B,getPanelStyle:N,groupId:p,isPanelCollapsed:z,isPanelExpanded:E,reevaluatePanelConstraints:X,registerPanel:_,registerResizeHandle:j,resizePanel:U,startDragging:I,stopDragging:A,unregisterPanel:G,panelGroupElement:g.current}),[b,m,r,k,B,N,p,z,E,X,_,j,U,I,A,G]),M={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sn(mi.Provider,{value:Y},Sn(c,{...h,children:e,className:n,id:o,ref:g,style:{...M,...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 Km({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:P,stopDragging:x,panelGroupElement:O}=v,D=$a(i),[b,k]=hn("inactive"),[B,N]=hn(!1),[z,E]=hn(null),_=Ce({state:b});Pt(()=>{_.current.state=b}),Dt(()=>{if(n)E(null);else{const I=w(D);E(()=>I)}},[n,D,w]);const j=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,U=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return Dt(()=>{if(n||z==null)return;const I=m.current;return ee(I,"Element ref not attached"),xm(D,I,y,{coarse:j,fine:U},(G,Y,M)=>{if(Y)switch(G){case"down":{k("drag"),ee(M,'Expected event to be defined for "down" action'),P(D,M);const{onDragging:R}=f.current;R&&R(!0);break}case"move":{const{state:R}=_.current;R!=="drag"&&k("hover"),ee(M,'Expected event to be defined for "move" action'),z(M);break}case"up":{k("hover"),x();const{onDragging:R}=f.current;R&&R(!1);break}}else k("inactive")})},[j,y,n,U,w,D,z,P,x]),Km({disabled:n,handleId:D,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":D})}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,D=>h(D)),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,P=S>=y,x=my(D=>{const b=D.target,k=[...u.branches].some(B=>B.contains(b));!P||k||(i==null||i(D),a==null||a(D),D.defaultPrevented||s==null||s())},p),O=yy(D=>{const b=D.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(D),a==null||a(D),D.defaultPrevented||s==null||s())},p);return dy(D=>{S===u.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&s&&(D.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 D=()=>g({});return document.addEventListener(Uo,D),()=>document.removeEventListener(Uo,D)},[]),T.jsx(be.div,{...l,ref:m,style:{pointerEvents:w?P?"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 P=w.target;s.contains(P)?h.current=P:ct(h.current,{select:!0})},v=function(w){if(g.paused||!s)return;const P=w.relatedTarget;P!==null&&(s.contains(P)||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,P]=wy(S);w&&P?!f.shiftKey&&y===P?(f.preventDefault(),n&&ct(w,{select:!0})):f.shiftKey&&y===w&&(f.preventDefault(),n&&ct(P,{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 Ly(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 Ky(t){t===void 0&&(t={});var e=Ly(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 Ld=Ky(),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"]),P=p,x=My([n,e]),O=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(P,{sideCar:Ld,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])}},Kd=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=Kd(),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,` {
47
+ */var aa;function D2(){return aa||(aa=1,process.env.NODE_ENV!=="production"&&function(){function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}function e(g,b){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 h=b();if(!f){var m=b();o(h,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}m=s({inst:{value:h,getSnapshot:b}});var v=m[0].inst,C=m[1];return l(function(){v.value=h,v.getSnapshot=b,n(v)&&C({inst:v})},[g,h,b]),a(function(){return n(v)&&C({inst:v}),g(function(){n(v)&&C({inst:v})})},[g]),u(h),h}function n(g){var b=g.getSnapshot;g=g.value;try{var h=b();return!o(g,h)}catch{return!0}}function r(g,b){return b()}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,s=i.useState,a=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Fi.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())}()),Fi}var la;function O2(){return la||(la=1,process.env.NODE_ENV==="production"?gr.exports=_2():gr.exports=D2()),gr.exports}var ms=O2();const Vu=d.createContext(!1),Xn=d.createContext(null);function Wu(t){if(d.useContext(Xn))return t.content;let{collection:n,document:r}=R2(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(x2,null,d.createElement(Xn.Provider,{value:r},t.content)),d.createElement(I2,{render:t.children,collection:n}))}function I2({collection:t,render:e}){return e(t)}function k2(t,e,n){let r=xn(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return ms.useSyncExternalStore(t,o)}const N2=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:k2;function R2(t){let[e]=d.useState(()=>new w2((t==null?void 0:t())||new vs)),n=d.useCallback(s=>e.subscribe(s),[e]),r=d.useCallback(()=>{let s=e.getCollection();return e.isSSR&&e.resetAfterSSR(),s},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=N2(n,r,i);return P2(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Oo=d.createContext(null);function L2(t,e,n,r,i,o){let s=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),a=d.useContext(Oo);if(a){let l=a.ownerDocument.nodesByProps.get(e);return l||(l=a.ownerDocument.createElement(t),l.setProps(e,n,r,o),a.appendChild(l),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Oo.Provider,{value:l},i):null}return d.createElement(t,{ref:s},i)}function ys(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(Vu)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return L2(t,i,o,"children"in i?i.children:null,null,a=>d.createElement(n,{node:a}))});return r.displayName=e.name,r}function M2(t){return Bu({...t,addIdAndValue:!0})}const ua=d.createContext(null);function Uu(t){let e=d.useContext(ua),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=M2({...t,idScope:r,dependencies:n});return d.useContext(Xn)&&(i=d.createElement(A2,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(ua.Provider,{value:e},i)}function A2({children:t}){let e=d.useContext(Xn),n=d.useMemo(()=>d.createElement(Xn.Provider,{value:null},d.createElement(Vu.Provider,{value:!0},t)),[t]);return xn()?d.createElement(Oo.Provider,{value:e},n):Ht.createPortal(n,e)}const De=typeof document<"u"?d.useLayoutEffect:()=>{};function K2(t){const e=d.useRef(null);return De(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const ye=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},vt=t=>t&&"window"in t&&t.window===t?t:ye(t).defaultView||window;function ca(t){if(F2())t.focus({preventScroll:!0});else{let e=j2(t);t.focus(),H2(e)}}let vr=null;function F2(){if(vr==null){vr=!1;try{document.createElement("div").focus({get preventScroll(){return vr=!0,!0}})}catch{}}return vr}function j2(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 H2(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Gu(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 z2(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 bs(t){let e=null;return()=>(e==null&&(e=t()),e)}const B2=bs(function(){return z2(/^Mac/i)}),V2=bs(function(){return Gu(/Chrome/i)}),qu=bs(function(){return Gu(/Android/i)});let sn=new Map,Io=new Set;function da(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=sn.get(r.target);i||(i=new Set,sn.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=sn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),sn.delete(r.target)),sn.size===0)){for(let o of Io)o();Io.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?da():document.addEventListener("DOMContentLoaded",da));function W2(t){requestAnimationFrame(()=>{sn.size===0?t():Io.add(t)})}function U2(t){return t.mozInputSource===0&&t.isTrusted?!0:qu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function G2(t,e){return e.get?e.get.call(t):e.value}function Yu(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function q2(t,e){var n=Yu(t,e,"get");return G2(t,n)}function Y2(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z2(t,e,n){Y2(t,e),e.set(t,n)}function X2(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 fa(t,e,n){var r=Yu(t,e,"set");return X2(t,r,n),n}let J2=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 Zu(t){let e=d.useRef({isFocused:!1,observer:null});De(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=K2(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=s=>{e.current.isFocused=!1,i.disabled&&n(new J2("blur",s)),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 s;(s=e.current.observer)===null||s===void 0||s.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Q2(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]),s=Zu(o),a=d.useCallback(l=>{const u=ye(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Tn=null,ko=new Set,Wn=new Map,Nt=!1,No=!1;const eh={Tab:!0,Escape:!0};function Ss(t,e){for(let n of ko)n(t,e)}function th(t){return!(t.metaKey||!B2()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Yr(t){Nt=!0,th(t)&&(Tn="keyboard",Ss("keyboard",t))}function Re(t){Tn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Nt=!0,Ss("pointer",t))}function Xu(t){U2(t)&&(Nt=!0,Tn="virtual")}function Ju(t){t.target===window||t.target===document||(!Nt&&!No&&(Tn="virtual",Ss("virtual",t)),Nt=!1,No=!1)}function Qu(){Nt=!1,No=!0}function Ro(t){if(typeof window>"u"||Wn.get(vt(t)))return;const e=vt(t),n=ye(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Nt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yr,!0),n.addEventListener("keyup",Yr,!0),n.addEventListener("click",Xu,!0),e.addEventListener("focus",Ju,!0),e.addEventListener("blur",Qu,!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}),Wn.set(e,{focus:r})}const ec=(t,e)=>{const n=vt(t),r=ye(t);e&&r.removeEventListener("DOMContentLoaded",e),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Yr,!0),r.removeEventListener("keyup",Yr,!0),r.removeEventListener("click",Xu,!0),n.removeEventListener("focus",Ju,!0),n.removeEventListener("blur",Qu,!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)),Wn.delete(n))};function nh(t){const e=ye(t);let n;return e.readyState!=="loading"?Ro(t):(n=()=>{Ro(t)},e.addEventListener("DOMContentLoaded",n)),()=>ec(t,n)}typeof document<"u"&&nh();function tc(){return Tn!=="pointer"}function nc(){return Tn}const rh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ih(t,e,n){var r;const i=typeof window<"u"?vt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?vt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?vt(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?vt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!rh.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 s&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof a&&!eh[n.key])}function oh(t,e,n){Ro(),d.useEffect(()=>{let r=(i,o)=>{ih(!!(n!=null&&n.isTextInput),i,o)&&t(tc())};return ko.add(r),()=>{ko.delete(r)}},e)}function sh(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),s=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),a=Zu(s),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,a(u))},[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}function Zr(t){const e=ye(t);if(nc()==="virtual"){let n=e.activeElement;W2(()=>{e.activeElement===n&&t.isConnected&&ca(t)})}else ca(t)}function ah(t){const e=vt(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:s,visibility:a}=o(t);i=s!=="none"&&a!=="hidden"&&a!=="collapse"}return i}function lh(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 rc(t,e){return t.nodeName!=="#comment"&&ah(t)&&lh(t,e)&&(!t.parentElement||rc(t.parentElement,t))}const ha=d.createContext(null),Lo="react-aria-focus-scope-restore";let se=null;function ic(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),s=d.useRef(null),a=d.useRef([]),{parentNode:l}=d.useContext(ha)||{},u=d.useMemo(()=>new Ao({scopeRef:a}),[a]);De(()=>{let p=l||ce.root;if(ce.getTreeNode(p.scopeRef)&&se&&!Xr(se,p.scopeRef)){let g=ce.getTreeNode(se);g&&(p=g)}p.addChild(u),ce.addNode(u)},[u,l]),De(()=>{let p=ce.getTreeNode(a);p&&(p.contain=!!n)},[n]),De(()=>{var p;let g=(p=o.current)===null||p===void 0?void 0:p.nextSibling,b=[],h=m=>m.stopPropagation();for(;g&&g!==s.current;)b.push(g),g.addEventListener(Lo,h),g=g.nextSibling;return a.current=b,()=>{for(let m of b)m.removeEventListener(Lo,h)}},[e]),gh(a,r,n),fh(a,n),vh(a,r,n),ph(a,i),d.useEffect(()=>{const p=ye(a.current?a.current[0]:void 0).activeElement;let g=null;if(Fe(p,a.current)){for(let b of ce.traverse())b.scopeRef&&Fe(p,b.scopeRef.current)&&(g=b);g===ce.getTreeNode(a)&&(se=g.scopeRef)}},[a]),De(()=>()=>{var p,g,b;let h=(b=(g=ce.getTreeNode(a))===null||g===void 0||(p=g.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&b!==void 0?b:null;(a===se||Xr(a,se))&&(!h||ce.getTreeNode(h))&&(se=h),ce.removeTreeNode(a)},[a]);let c=d.useMemo(()=>uh(a),[]),f=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(ha.Provider,{value:f},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function uh(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:s}=e,a=r||ye(n[0]).activeElement,l=n[0].previousElementSibling,u=Tt(n),c=Ze(u,{tabbable:i,accept:s},n);c.currentNode=Fe(a,n)?a:l;let f=c.nextNode();return!f&&o&&(c.currentNode=l,f=c.nextNode()),f&&ot(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:s}=e,a=r||ye(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Tt(n),c=Ze(u,{tabbable:i,accept:s},n);c.currentNode=Fe(a,n)?a:l;let f=c.previousNode();return!f&&o&&(c.currentNode=l,f=c.previousNode()),f&&ot(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Tt(n),s=Ze(o,{tabbable:r,accept:i},n);s.currentNode=n[0].previousElementSibling;let a=s.nextNode();return a&&ot(a,!0),a},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Tt(n),s=Ze(o,{tabbable:r,accept:i},n);s.currentNode=n[n.length-1].nextElementSibling;let a=s.previousNode();return a&&ot(a,!0),a}}}const Cs=["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"])'],ch=Cs.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Cs.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const dh=Cs.join(':not([hidden]):not([tabindex="-1"]),');function Tt(t){return t[0].parentElement}function Fn(t){let e=ce.getTreeNode(se);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function fh(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);De(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=ye(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Fn(t)||u.isComposing)return;let c=o.activeElement,f=t.current;if(!f||!Fe(c,f))return;let p=Tt(f),g=Ze(p,{tabbable:!0},f);if(!c)return;g.currentNode=c;let b=u.shiftKey?g.previousNode():g.nextNode();b||(g.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,b=u.shiftKey?g.previousNode():g.nextNode()),u.preventDefault(),b&&ot(b,!0)},a=u=>{(!se||Xr(se,t))&&Fe(u.target,t.current)?(se=t,n.current=u.target):Fn(t)&&!mt(u.target,t)?n.current?n.current.focus():se&&se.current&&Mo(se.current):Fn(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=nc();if(!((c==="virtual"||c===null)&&qu()&&V2())&&o.activeElement&&Fn(t)&&!mt(o.activeElement,t))if(se=t,o.body.contains(u.target)){var p;n.current=u.target,(p=n.current)===null||p===void 0||p.focus()}else se.current&&Mo(se.current)})};return o.addEventListener("keydown",s,!1),o.addEventListener("focusin",a,!1),i==null||i.forEach(u=>u.addEventListener("focusin",a,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",s,!1),o.removeEventListener("focusin",a,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",a,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),De(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function oc(t){return mt(t)}function Fe(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function mt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ce.traverse(ce.getTreeNode(e)))if(n&&Fe(t,n.current))return!0;return!1}function hh(t){return mt(t,se)}function Xr(t,e){var n;let r=(n=ce.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function ot(t,e=!1){if(t!=null&&!e)try{Zr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function sc(t,e=!0){let n=t[0].previousElementSibling,r=Tt(t),i=Ze(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=Tt(t),i=Ze(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function Mo(t,e=!0){ot(sc(t,e))}function ph(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){se=t;const r=ye(t.current?t.current[0]:void 0);!Fe(r.activeElement,se.current)&&t.current&&Mo(t.current)}n.current=!1},[t])}function gh(t,e,n){De(()=>{if(e||n)return;let r=t.current;const i=ye(r?r[0]:void 0);let o=s=>{let a=s.target;Fe(a,t.current)?se=t:oc(a)||(se=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(s=>s.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(s=>s.removeEventListener("focusin",o,!1))}},[t,e,n])}function pa(t){let e=ce.getTreeNode(se);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function vh(t,e,n){const r=d.useRef(typeof document<"u"?ye(t.current?t.current[0]:void 0).activeElement:null);De(()=>{let i=t.current;const o=ye(i?i[0]:void 0);if(!e||n)return;let s=()=>{(!se||Xr(se,t))&&Fe(o.activeElement,t.current)&&(se=t)};return o.addEventListener("focusin",s,!1),i==null||i.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{o.removeEventListener("focusin",s,!1),i==null||i.forEach(a=>a.removeEventListener("focusin",s,!1))}},[t,n]),De(()=>{const i=ye(t.current?t.current[0]:void 0);if(!e)return;let o=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!Fn(t)||s.isComposing)return;let a=i.activeElement;if(!mt(a,t)||!pa(t))return;let l=ce.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=Ze(i.body,{tabbable:!0});c.currentNode=a;let f=s.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!f||!mt(f,t))&&u){c.currentNode=u;do f=s.shiftKey?c.previousNode():c.nextNode();while(mt(f,t));s.preventDefault(),s.stopPropagation(),f?ot(f,!0):oc(u)?ot(u,!0):a.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),De(()=>{const i=ye(t.current?t.current[0]:void 0);if(!e)return;let o=ce.getTreeNode(t);if(o){var s;return o.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let a=ce.getTreeNode(t);if(!a)return;let l=a.nodeToRestore;if(e&&l&&(i.activeElement&&mt(i.activeElement,t)||i.activeElement===i.body&&pa(t))){let u=ce.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ga(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ce.getTreeNode(c.scopeRef)){let f=sc(c.scopeRef.current,!0);ga(f);return}c=c.parent}}})}}}},[t,e])}function ga(t){t.dispatchEvent(new CustomEvent(Lo,{bubbles:!0,cancelable:!0}))&&ot(t)}function Ze(t,e,n){let r=e!=null&&e.tabbable?dh:ch,i=ye(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var s;return!(e==null||(s=e.from)===null||s===void 0)&&s.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&rc(o)&&(!n||Fe(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 ws{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 Ao({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&&Fe(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 ws;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 Ao({scopeRef:null}),this.fastMap.set(null,this.root)}}class Ao{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 ce=new ws;function gi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||tc()}),[o,s]=d.useState(!1),[a,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,s(g),u()},[u]);oh(g=>{i.current.isFocusVisible=g,u()},[],{isTextInput:n});let{focusProps:f}=Q2({isDisabled:r,onFocusChange:c}),{focusWithinProps:p}=sh({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:a,focusProps:r?p:f}}function mh(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return De(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let a=Ze(t.current,{tabbable:!0});i(!!a.nextNode())}};o();let s=new MutationObserver(o);return s.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{s.disconnect()}}}),n?!1:r}let un="default",Ko="",Rr=new WeakMap;function va(t){if(hi()){if(un==="default"){const e=Ae(t);Ko=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}un="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(Rr.set(t,t.style.userSelect),t.style.userSelect="none")}function mr(t){if(hi()){if(un!=="disabled")return;un="restoring",setTimeout(()=>{c2(()=>{if(un==="restoring"){const e=Ae(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Ko||""),Ko="",un="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Rr.has(t)){let e=Rr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Rr.delete(t)}}const Es=d.createContext({register:()=>{}});Es.displayName="PressResponderContext";function yh(t){let e=d.useContext(Es);if(e){let{register:n,...r}=e;t=be(r,t),n()}return f2(e,t.ref),t}var yr=new WeakMap;class br{continuePropagation(){fa(this,yr,!1)}get shouldStopPropagation(){return q2(this,yr)}constructor(e,n,r,i){Z2(this,yr,{writable:!0,value:void 0}),fa(this,yr,!0);var o;let s=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const a=s==null?void 0:s.getBoundingClientRect();let l,u=0,c,f=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,f=r.clientY),a&&(c!=null&&f!=null?(l=c-a.left,u=f-a.top):(l=a.width/2,u=a.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 ma=Symbol("linkClicked");function xs(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:s,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:f,...p}=yh(t),[g,b]=d.useState(!1),h=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:m,removeAllGlobalListeners:v}=Au(),C=_e((S,R)=>{let F=h.current;if(s||F.didFirePressStart)return!1;let N=!0;if(F.isTriggeringEvent=!0,r){let H=new br("pressstart",R,S);r(H),N=H.shouldStopPropagation}return n&&n(!0),F.isTriggeringEvent=!1,F.didFirePressStart=!0,b(!0),N}),w=_e((S,R,F=!0)=>{let N=h.current;if(!N.didFirePressStart)return!1;N.ignoreClickAfterPress=!0,N.didFirePressStart=!1,N.isTriggeringEvent=!0;let H=!0;if(i){let E=new br("pressend",R,S);i(E),H=E.shouldStopPropagation}if(n&&n(!1),b(!1),e&&F&&!s){let E=new br("press",R,S);e(E),H&&(H=E.shouldStopPropagation)}return N.isTriggeringEvent=!1,H}),P=_e((S,R)=>{let F=h.current;if(s)return!1;if(o){F.isTriggeringEvent=!0;let N=new br("pressup",R,S);return o(N),F.isTriggeringEvent=!1,N.shouldStopPropagation}return!0}),x=_e(S=>{let R=h.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&w(et(R.target,S),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,v(),c||mr(R.target))}),D=_e(S=>{u&&x(S)}),_=d.useMemo(()=>{let S=h.current,R={onKeyDown(N){if(ji(N.nativeEvent,N.currentTarget)&&N.currentTarget.contains(N.target)){var H;ba(N.target,N.key)&&N.preventDefault();let E=!0;if(!S.isPressed&&!N.repeat){S.target=N.currentTarget,S.isPressed=!0,E=C(N,"keyboard");let O=N.currentTarget,z=G=>{ji(G,O)&&!G.repeat&&O.contains(G.target)&&S.target&&P(et(S.target,G),"keyboard")};m(Ae(N.currentTarget),"keyup",qn(z,F),!0)}E&&N.stopPropagation(),N.metaKey&&It()&&((H=S.metaKeyEvents)===null||H===void 0||H.set(N.key,N.nativeEvent))}else N.key==="Meta"&&(S.metaKeyEvents=new Map)},onClick(N){if(!(N&&!N.currentTarget.contains(N.target))&&N&&N.button===0&&!S.isTriggeringEvent&&!kt.isOpening){let H=!0;if(s&&N.preventDefault(),!S.ignoreClickAfterPress&&!S.ignoreEmulatedMouseEvents&&!S.isPressed&&(S.pointerType==="virtual"||_o(N.nativeEvent))){!s&&!l&&$t(N.currentTarget);let E=C(N,"virtual"),O=P(N,"virtual"),z=w(N,"virtual");H=E&&O&&z}S.ignoreEmulatedMouseEvents=!1,S.ignoreClickAfterPress=!1,H&&N.stopPropagation()}}},F=N=>{var H;if(S.isPressed&&S.target&&ji(N,S.target)){var E;ba(N.target,N.key)&&N.preventDefault();let z=N.target;w(et(S.target,N),"keyboard",S.target.contains(z)),v(),N.key!=="Enter"&&$s(S.target)&&S.target.contains(z)&&!N[ma]&&(N[ma]=!0,kt(S.target,N,!1)),S.isPressed=!1,(E=S.metaKeyEvents)===null||E===void 0||E.delete(N.key)}else if(N.key==="Meta"&&(!((H=S.metaKeyEvents)===null||H===void 0)&&H.size)){var O;let z=S.metaKeyEvents;S.metaKeyEvents=void 0;for(let G of z.values())(O=S.target)===null||O===void 0||O.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){R.onPointerDown=O=>{if(O.button!==0||!O.currentTarget.contains(O.target))return;if(v2(O.nativeEvent)){S.pointerType="virtual";return}zi(O.currentTarget)&&O.preventDefault(),S.pointerType=O.pointerType;let z=!0;if(!S.isPressed){S.isPressed=!0,S.isOverTarget=!0,S.activePointerId=O.pointerId,S.target=O.currentTarget,!s&&!l&&$t(O.currentTarget),c||va(S.target),z=C(O,S.pointerType);let G=O.target;"releasePointerCapture"in G&&G.releasePointerCapture(O.pointerId),m(Ae(O.currentTarget),"pointerup",N,!1),m(Ae(O.currentTarget),"pointercancel",E,!1)}z&&O.stopPropagation()},R.onMouseDown=O=>{O.currentTarget.contains(O.target)&&O.button===0&&(zi(O.currentTarget)&&O.preventDefault(),O.stopPropagation())},R.onPointerUp=O=>{!O.currentTarget.contains(O.target)||S.pointerType==="virtual"||O.button===0&&P(O,S.pointerType||O.pointerType)},R.onPointerEnter=O=>{O.pointerId===S.activePointerId&&S.target&&!S.isOverTarget&&S.pointerType!=null&&(S.isOverTarget=!0,C(et(S.target,O),S.pointerType))},R.onPointerLeave=O=>{O.pointerId===S.activePointerId&&S.target&&S.isOverTarget&&S.pointerType!=null&&(S.isOverTarget=!1,w(et(S.target,O),S.pointerType,!1),D(O))};let N=O=>{O.pointerId===S.activePointerId&&S.isPressed&&O.button===0&&S.target&&(S.target.contains(O.target)&&S.pointerType!=null?w(et(S.target,O),S.pointerType):S.isOverTarget&&S.pointerType!=null&&w(et(S.target,O),S.pointerType,!1),S.isPressed=!1,S.isOverTarget=!1,S.activePointerId=null,S.pointerType=null,v(),c||mr(S.target),"ontouchend"in S.target&&O.pointerType!=="mouse"&&m(S.target,"touchend",H,{once:!0}))},H=O=>{ac(O.currentTarget)&&O.preventDefault()},E=O=>{x(O)};R.onDragStart=O=>{O.currentTarget.contains(O.target)&&x(O)}}else{R.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(zi(E.currentTarget)&&E.preventDefault(),S.ignoreEmulatedMouseEvents){E.stopPropagation();return}S.isPressed=!0,S.isOverTarget=!0,S.target=E.currentTarget,S.pointerType=_o(E.nativeEvent)?"virtual":"mouse",!s&&!l&&$t(E.currentTarget),C(E,S.pointerType)&&E.stopPropagation(),m(Ae(E.currentTarget),"mouseup",N,!1)},R.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let O=!0;S.isPressed&&!S.ignoreEmulatedMouseEvents&&S.pointerType!=null&&(S.isOverTarget=!0,O=C(E,S.pointerType)),O&&E.stopPropagation()},R.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let O=!0;S.isPressed&&!S.ignoreEmulatedMouseEvents&&S.pointerType!=null&&(S.isOverTarget=!1,O=w(E,S.pointerType,!1),D(E)),O&&E.stopPropagation()},R.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!S.ignoreEmulatedMouseEvents&&E.button===0&&P(E,S.pointerType||"mouse")};let N=E=>{if(E.button===0){if(S.isPressed=!1,v(),S.ignoreEmulatedMouseEvents){S.ignoreEmulatedMouseEvents=!1;return}S.target&&Hi(E,S.target)&&S.pointerType!=null?w(et(S.target,E),S.pointerType):S.target&&S.isOverTarget&&S.pointerType!=null&&w(et(S.target,E),S.pointerType,!1),S.isOverTarget=!1}};R.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let O=bh(E.nativeEvent);if(!O)return;S.activePointerId=O.identifier,S.ignoreEmulatedMouseEvents=!0,S.isOverTarget=!0,S.isPressed=!0,S.target=E.currentTarget,S.pointerType="touch",!s&&!l&&$t(E.currentTarget),c||va(S.target),C(ct(S.target,E),S.pointerType)&&E.stopPropagation(),m(yn(E.currentTarget),"scroll",H,!0)},R.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!S.isPressed){E.stopPropagation();return}let O=ya(E.nativeEvent,S.activePointerId),z=!0;O&&Hi(O,E.currentTarget)?!S.isOverTarget&&S.pointerType!=null&&(S.isOverTarget=!0,z=C(ct(S.target,E),S.pointerType)):S.isOverTarget&&S.pointerType!=null&&(S.isOverTarget=!1,z=w(ct(S.target,E),S.pointerType,!1),D(ct(S.target,E))),z&&E.stopPropagation()},R.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!S.isPressed){E.stopPropagation();return}let O=ya(E.nativeEvent,S.activePointerId),z=!0;O&&Hi(O,E.currentTarget)&&S.pointerType!=null?(P(ct(S.target,E),S.pointerType),z=w(ct(S.target,E),S.pointerType)):S.isOverTarget&&S.pointerType!=null&&(z=w(ct(S.target,E),S.pointerType,!1)),z&&E.stopPropagation(),S.isPressed=!1,S.activePointerId=null,S.isOverTarget=!1,S.ignoreEmulatedMouseEvents=!0,S.target&&!c&&mr(S.target),v()},R.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),S.isPressed&&x(ct(S.target,E)))};let H=E=>{S.isPressed&&E.target.contains(S.target)&&x({currentTarget:S.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return R},[m,s,l,v,c,x,D,w,C,P]);return d.useEffect(()=>()=>{var S;c||mr((S=h.current.target)!==null&&S!==void 0?S:void 0)},[c]),{isPressed:a||g,pressProps:be(p,_)}}function $s(t){return t.tagName==="A"&&t.hasAttribute("href")}function ji(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&&!lc(i,n)||i instanceof yn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&$s(i))&&n!=="Enter")}function bh(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function ya(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 ct(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 et(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 Sh(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 Ch(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Hi(t,e){let n=e.getBoundingClientRect(),r=Sh(t);return Ch(n,r)}function zi(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function ac(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!$s(t)}function ba(t,e){return t instanceof HTMLInputElement?!lc(t,e):ac(t)}const wh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function lc(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":wh.has(t.type)}function Eh({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(Es.Provider,{value:e},t)}class xh{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 uc(t){let e=d.useRef({isFocused:!1,observer:null});ge(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=_e(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=s=>{e.current.isFocused=!1,i.disabled&&n(new xh("blur",s)),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 s;(s=e.current.observer)===null||s===void 0||s.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function $h(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]),s=uc(o),a=d.useCallback(l=>{const u=Ae(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Pn=null,Th=new Set,Un=new Map,Rt=!1,Fo=!1;function Ts(t,e){for(let n of Th)n(t,e)}function Ph(t){return!(t.metaKey||!It()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Jr(t){Rt=!0,Ph(t)&&(Pn="keyboard",Ts("keyboard",t))}function Le(t){Pn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Rt=!0,Ts("pointer",t))}function cc(t){_o(t)&&(Rt=!0,Pn="virtual")}function dc(t){t.target===window||t.target===document||(!Rt&&!Fo&&(Pn="virtual",Ts("virtual",t)),Rt=!1,Fo=!1)}function fc(){Rt=!1,Fo=!0}function Sa(t){if(typeof window>"u"||Un.get(yn(t)))return;const e=yn(t),n=Ae(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Rt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Jr,!0),n.addEventListener("keyup",Jr,!0),n.addEventListener("click",cc,!0),e.addEventListener("focus",dc,!0),e.addEventListener("blur",fc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Le,!0),n.addEventListener("pointermove",Le,!0),n.addEventListener("pointerup",Le,!0)):(n.addEventListener("mousedown",Le,!0),n.addEventListener("mousemove",Le,!0),n.addEventListener("mouseup",Le,!0)),e.addEventListener("beforeunload",()=>{hc(t)},{once:!0}),Un.set(e,{focus:r})}const hc=(t,e)=>{const n=yn(t),r=Ae(t);e&&r.removeEventListener("DOMContentLoaded",e),Un.has(n)&&(n.HTMLElement.prototype.focus=Un.get(n).focus,r.removeEventListener("keydown",Jr,!0),r.removeEventListener("keyup",Jr,!0),r.removeEventListener("click",cc,!0),n.removeEventListener("focus",dc,!0),n.removeEventListener("blur",fc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Le,!0),r.removeEventListener("pointermove",Le,!0),r.removeEventListener("pointerup",Le,!0)):(r.removeEventListener("mousedown",Le,!0),r.removeEventListener("mousemove",Le,!0),r.removeEventListener("mouseup",Le,!0)),Un.delete(n))};function _h(t){const e=Ae(t);let n;return e.readyState!=="loading"?Sa(t):(n=()=>{Sa(t)},e.addEventListener("DOMContentLoaded",n)),()=>hc(t,n)}typeof document<"u"&&_h();function Dh(){return Pn!=="pointer"}function Ca(){return Pn}function pc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),s=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),a=uc(s),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,a(u))},[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Qr=!1,Bi=0;function jo(){Qr=!0,setTimeout(()=>{Qr=!1},50)}function wa(t){t.pointerType==="touch"&&jo()}function Oh(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",wa):document.addEventListener("touchend",jo),Bi++,()=>{Bi--,!(Bi>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",wa):document.removeEventListener("touchend",jo))}}function Ps(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,s]=d.useState(!1),a=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Oh,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(g,b)=>{if(a.pointerType=b,i||b==="touch"||a.isHovered||!g.currentTarget.contains(g.target))return;a.isHovered=!0;let h=g.currentTarget;a.target=h,e&&e({type:"hoverstart",target:h,pointerType:b}),n&&n(!0),s(!0)},f=(g,b)=>{if(a.pointerType="",a.target=null,b==="touch"||!a.isHovered)return;a.isHovered=!1;let h=g.currentTarget;r&&r({type:"hoverend",target:h,pointerType:b}),n&&n(!1),s(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Qr&&g.pointerType==="mouse"||c(g,g.pointerType)},p.onPointerLeave=g=>{!i&&g.currentTarget.contains(g.target)&&f(g,g.pointerType)}):(p.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!a.ignoreEmulatedMouseEvents&&!Qr&&c(g,"mouse"),a.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!i&&g.currentTarget.contains(g.target)&&f(g,"mouse")}),{hoverProps:p,triggerHoverEnd:f}},[e,n,r,i,a]);return d.useEffect(()=>{i&&u({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:l,isHovered:o}}function Ih(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=_e(l=>{n&&Sr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),a=_e(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ae(u);if(typeof PointerEvent<"u"){let f=p=>{l.isPointerDown&&Sr(p,e)&&a(p),l.isPointerDown=!1};return c.addEventListener("pointerdown",s,!0),c.addEventListener("pointerup",f,!0),()=>{c.removeEventListener("pointerdown",s,!0),c.removeEventListener("pointerup",f,!0)}}else{let f=g=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&Sr(g,e)&&a(g),l.isPointerDown=!1},p=g=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&Sr(g,e)&&a(g),l.isPointerDown=!1};return c.addEventListener("mousedown",s,!0),c.addEventListener("mouseup",f,!0),c.addEventListener("touchstart",s,!0),c.addEventListener("touchend",p,!0),()=>{c.removeEventListener("mousedown",s,!0),c.removeEventListener("mouseup",f,!0),c.removeEventListener("touchstart",s,!0),c.removeEventListener("touchend",p,!0)}}},[e,r,s,a])}function Sr(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 Ea(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 kh(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:Ea(t.onKeyDown),onKeyUp:Ea(t.onKeyUp)}}}const Nh=500;function Rh(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=Nh,accessibilityDescription:s}=t;const a=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=Au(),{pressProps:c}=xs({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n({...p,type:"longpressstart"}),a.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...p,type:"longpress"}),a.current=void 0},o),p.pointerType==="touch")){let g=b=>{b.preventDefault()};l(p.target,"contextmenu",g,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(p.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(p){a.current&&clearTimeout(a.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r({...p,type:"longpressend"})}}),f=g2(i&&!e?s:void 0);return{longPressProps:be(c,f)}}const Lh=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Mh=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ah(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 Lh.has(n.script)}let e=t.split("-")[0];return Mh.has(e)}const Kh=Symbol.for("react-aria.i18n.locale");function gc(){let t=typeof window<"u"&&window[Kh]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Ah(t)?"rtl":"ltr"}}let Ho=gc(),jn=new Set;function xa(){Ho=gc();for(let t of jn)t(Ho)}function Fh(){let t=xn(),[e,n]=d.useState(Ho);return d.useEffect(()=>(jn.size===0&&window.addEventListener("languagechange",xa),jn.add(n),()=>{jn.delete(n),jn.size===0&&window.removeEventListener("languagechange",xa)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const jh=d.createContext(null);function ar(){let t=Fh();return d.useContext(jh)||t}var Ye=function(){return Ye=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},Ye.apply(this,arguments)};function vc(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 Hh(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 zh=Symbol.for("react-aria.i18n.locale"),Bh=Symbol.for("react-aria.i18n.strings");let Wt;class vi{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=Vh(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[zh];if(Wt===void 0){let i=window[Bh];if(!i)return null;Wt={};for(let o in i)Wt[o]=new vi({[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 Vh(t,e,n="en-US"){if(e[t])return e[t];let r=Wh(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Wh(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const $a=new Map,Ta=new Map;class Uh{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,s=$a.get(o);s||(s=new Intl.PluralRules(this.locale,{type:r}),$a.set(o,s));let a=s.select(e);return i=n[a]||n.other,typeof i=="function"?i():i}number(e){let n=Ta.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Ta.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 Pa=new WeakMap;function Gh(t){let e=Pa.get(t);return e||(e=new vi(t),Pa.set(t,e)),e}function qh(t,e){return e&&vi.getGlobalDictionaryForPackage(e)||Gh(t)}function Yh(t,e){let{locale:n}=ar(),r=qh(t,e);return d.useMemo(()=>new Uh(n,r),[n,r])}let Vi=new Map;function Zh(t){let{locale:e}=ar(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Vi.has(n))return Vi.get(n);let r=new Intl.Collator(e,t);return Vi.set(n,r),r}const _a={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 Xh(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=pc({isDisabled:!n,onFocusWithinChange:a=>i(a)}),s=d.useMemo(()=>r?e:e?{..._a,...e}:_a,[r]);return{visuallyHiddenProps:{...o,style:s}}}function Jh(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:s}=Xh(t);return d.createElement(n,be(o,s),e)}const Xe={top:"top",bottom:"top",left:"left",right:"left"},ei={top:"bottom",bottom:"top",left:"right",right:"left"},Qh={top:"left",left:"top"},zo={top:"height",left:"width"},mc={width:"totalWidth",height:"totalHeight"},Cr={};let he=typeof document<"u"?window.visualViewport:null;function Da(t){let e=0,n=0,r=0,i=0,o=0,s=0,a={};var l;let u=((l=he==null?void 0:he.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let b=document.documentElement;r=b.clientWidth,i=b.clientHeight;var c;e=(c=he==null?void 0:he.width)!==null&&c!==void 0?c:r;var f;n=(f=he==null?void 0:he.height)!==null&&f!==void 0?f:i,a.top=b.scrollTop||t.scrollTop,a.left=b.scrollLeft||t.scrollLeft,he&&(o=he.offsetTop,s=he.offsetLeft)}else({width:e,height:n,top:o,left:s}=hn(t)),a.top=t.scrollTop,a.left=t.scrollLeft,r=e,i=n;if(Ru()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){a.top=0,a.left=0;var p;o=(p=he==null?void 0:he.pageTop)!==null&&p!==void 0?p:0;var g;s=(g=he==null?void 0:he.pageLeft)!==null&&g!==void 0?g:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:a,top:o,left:s}}function ep(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Oa(t,e,n,r,i,o,s){var a;let l=(a=i.scroll[t])!==null&&a!==void 0?a:0,u=r[zo[t]],c=r.scroll[Xe[t]]+o,f=u+r.scroll[Xe[t]]-o,p=e-l+s[t]-r[Xe[t]],g=e-l+n+s[t]-r[Xe[t]];return p<c?c-p:g>f?Math.max(f-g,c-p):0}function tp(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 Ia(t){if(Cr[t])return Cr[t];let[e,n]=t.split(" "),r=Xe[e]||"right",i=Qh[r];Xe[n]||(n="center");let o=zo[r],s=zo[i];return Cr[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:s},Cr[t]}function Wi(t,e,n,r,i,o,s,a,l,u){let{placement:c,crossPlacement:f,axis:p,crossAxis:g,size:b,crossSize:h}=r,m={};var v;m[g]=(v=t[g])!==null&&v!==void 0?v:0;var C,w,P,x;f==="center"?m[g]+=(((C=t[h])!==null&&C!==void 0?C:0)-((w=n[h])!==null&&w!==void 0?w:0))/2:f!==g&&(m[g]+=((P=t[h])!==null&&P!==void 0?P:0)-((x=n[h])!==null&&x!==void 0?x:0)),m[g]+=o;const D=t[g]-n[h]+l+u,_=t[g]+t[h]-l-u;if(m[g]=Do(m[g],D,_),c===p){const S=a?s[b]:e[mc[b]];m[ei[p]]=Math.floor(S-t[p]+i)}else m[p]=Math.floor(t[p]+t[b]+i);return m}function np(t,e,n,r,i,o,s,a){const l=r?n.height:e[mc.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-s);var f,p,g,b,h,m;let v=a!=="top"?Math.max(0,e.height+e.top+((f=e.scroll.top)!==null&&f!==void 0?f: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+s-(e.top+((b=e.scroll.top)!==null&&b!==void 0?b:0))-(((h=i.top)!==null&&h!==void 0?h:0)+((m=i.bottom)!==null&&m!==void 0?m:0)+o));return Math.min(e.height-o*2,v)}function ka(t,e,n,r,i,o){let{placement:s,axis:a,size:l}=o;var u,c;if(s===a)return Math.max(0,n[a]-t[a]-((u=t.scroll[a])!==null&&u!==void 0?u:0)+e[a]-((c=r[a])!==null&&c!==void 0?c:0)-r[ei[a]]-i);var f;return Math.max(0,t[l]+t[a]+t.scroll[a]-e[a]-n[a]-n[l]-((f=r[a])!==null&&f!==void 0?f:0)-r[ei[a]]-i)}function rp(t,e,n,r,i,o,s,a,l,u,c,f,p,g,b,h){let m=Ia(t),{size:v,crossAxis:C,crossSize:w,placement:P,crossPlacement:x}=m,D=Wi(e,a,n,m,c,f,u,p,b,h),_=c,S=ka(a,u,e,i,o+c,m);if(s&&r[v]>S){let A=Ia(`${ei[P]} ${x}`),M=Wi(e,a,n,A,c,f,u,p,b,h);ka(a,u,e,i,o+c,A)>S&&(m=A,D=M,_=c)}let R="bottom";m.axis==="top"?m.placement==="top"?R="top":m.placement==="bottom"&&(R="bottom"):m.crossAxis==="top"&&(m.crossPlacement==="top"?R="bottom":m.crossPlacement==="bottom"&&(R="top"));let F=Oa(C,D[C],n[w],a,l,o,u);D[C]+=F;let N=np(D,a,u,p,i,o,n.height,R);g&&g<N&&(N=g),n.height=Math.min(n.height,N),D=Wi(e,a,n,m,_,f,u,p,b,h),F=Oa(C,D[C],n[w],a,l,o,u),D[C]+=F;let H={},E=e[C]+.5*e[w]-D[C]-i[Xe[C]];const O=b/2+h;var z,G,V,L;const Y=Xe[C]==="left"?((z=i.left)!==null&&z!==void 0?z:0)+((G=i.right)!==null&&G!==void 0?G:0):((V=i.top)!==null&&V!==void 0?V:0)+((L=i.bottom)!==null&&L!==void 0?L:0),j=n[w]-Y-b/2-h,B=e[C]+b/2-(D[C]+i[Xe[C]]),k=e[C]+e[w]-b/2-(D[C]+i[Xe[C]]),I=Do(E,B,k);return H[C]=Do(I,O,j),{position:D,maxHeight:N,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:m.placement}}function ip(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:s,boundaryElement:a,offset:l,crossOffset:u,maxHeight:c,arrowSize:f=0,arrowBoundaryOffset:p=0}=t,g=r instanceof HTMLElement?op(r):document.documentElement,b=g===document.documentElement;const h=window.getComputedStyle(g).position;let m=!!h&&h!=="static",v=b?hn(n):Na(n,g);if(!b){let{marginTop:H,marginLeft:E}=window.getComputedStyle(n);v.top+=parseInt(H,10)||0,v.left+=parseInt(E,10)||0}let C=hn(r),w=tp(r);var P,x;C.width+=((P=w.left)!==null&&P!==void 0?P:0)+((x=w.right)!==null&&x!==void 0?x:0);var D,_;C.height+=((D=w.top)!==null&&D!==void 0?D:0)+((_=w.bottom)!==null&&_!==void 0?_:0);let S=ep(i),R=Da(a),F=Da(g),N=a.tagName==="BODY"?hn(g):Na(g,a);return g.tagName==="HTML"&&a.tagName==="BODY"&&(F.scroll.top=0,F.scroll.left=0),rp(e,v,C,S,w,o,s,R,F,N,l,u,m,c,f,p)}function hn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:s,clientTop:a,clientLeft:l}=document.documentElement;return{top:e+o-a,left:n+s-l,width:r,height:i}}function Na(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:s,height:a}=t.getBoundingClientRect();r={top:i,left:o,width:s,height:a}}else{r=hn(t);let i=hn(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 op(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ra(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ra(e);)e=e.parentElement;return e||document.documentElement}function Ra(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 sp=new WeakMap;function ap(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let s=o.target;if(!e.current||s instanceof Node&&!s.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let a=r||sp.get(e.current);a&&a()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let ue=typeof document<"u"?window.visualViewport:null;function lp(t){let{direction:e}=ar(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:s="bottom",containerPadding:a=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:f=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:b,maxHeight:h,arrowBoundaryOffset:m=0}=t,[v,C]=d.useState(null),w=[p,s,i.current,r.current,o.current,a,l,u,c,f,g,e,h,m,n],P=d.useRef(ue==null?void 0:ue.scale);d.useEffect(()=>{g&&(P.current=ue==null?void 0:ue.scale)},[g]);let x=d.useCallback(()=>{if(p===!1||!g||!i.current||!r.current||!u||(ue==null?void 0:ue.scale)!==P.current)return;let F=null;if(o.current&&o.current.contains(document.activeElement)){var N;let L=(N=document.activeElement)===null||N===void 0?void 0:N.getBoundingClientRect(),Y=o.current.getBoundingClientRect();var H;if(F={type:"top",offset:((H=L==null?void 0:L.top)!==null&&H!==void 0?H:0)-Y.top},F.offset>Y.height/2){F.type="bottom";var E;F.offset=((E=L==null?void 0:L.bottom)!==null&&E!==void 0?E:0)-Y.bottom}}let O=i.current;if(!h&&i.current){var z;O.style.top="0px",O.style.bottom="";var G;O.style.maxHeight=((G=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&G!==void 0?G:window.innerHeight)+"px"}let V=ip({placement:cp(s,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:a,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:f,maxHeight:h,arrowSize:n,arrowBoundaryOffset:m});if(V.position){if(O.style.top="",O.style.bottom="",O.style.left="",O.style.right="",Object.keys(V.position).forEach(L=>O.style[L]=V.position[L]+"px"),O.style.maxHeight=V.maxHeight!=null?V.maxHeight+"px":"",F&&document.activeElement&&o.current){let L=document.activeElement.getBoundingClientRect(),Y=o.current.getBoundingClientRect(),j=L[F.type]-Y[F.type];o.current.scrollTop+=j-F.offset}C(V)}},w);ge(x,w),up(x),na({ref:i,onResize:x}),na({ref:r,onResize:x});let D=d.useRef(!1);ge(()=>{let F,N=()=>{D.current=!0,clearTimeout(F),F=setTimeout(()=>{D.current=!1},500),x()},H=()=>{D.current&&N()};return ue==null||ue.addEventListener("resize",N),ue==null||ue.addEventListener("scroll",H),()=>{ue==null||ue.removeEventListener("resize",N),ue==null||ue.removeEventListener("scroll",H)}},[x]);let _=d.useCallback(()=>{D.current||b==null||b()},[b,D]);ap({triggerRef:r,isOpen:g,onClose:b&&_});var S,R;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...v==null?void 0:v.position,maxHeight:(S=v==null?void 0:v.maxHeight)!==null&&S!==void 0?S:"100vh"}},placement:(R=v==null?void 0:v.placement)!==null&&R!==void 0?R:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v==null?void 0:v.arrowOffsetLeft,top:v==null?void 0:v.arrowOffsetTop}},updatePosition:x}}function up(t){ge(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function cp(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const tt=[];function dp(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:a}=t;d.useEffect(()=>(i&&tt.push(e),()=>{let b=tt.indexOf(e);b>=0&&tt.splice(b,1)}),[i,e]);let l=()=>{tt[tt.length-1]===e&&n&&n()},u=b=>{(!a||a(b.target))&&tt[tt.length-1]===e&&(b.stopPropagation(),b.preventDefault())},c=b=>{(!a||a(b.target))&&(tt[tt.length-1]===e&&(b.stopPropagation(),b.preventDefault()),l())},f=b=>{b.key==="Escape"&&!s&&!b.nativeEvent.isComposing&&(b.stopPropagation(),b.preventDefault(),l())};Ih({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=pc({isDisabled:!r,onBlurWithin:b=>{!b.relatedTarget||hh(b.relatedTarget)||(!a||a(b.relatedTarget))&&(n==null||n())}}),g=b=>{b.target===b.currentTarget&&b.preventDefault()};return{overlayProps:{onKeyDown:f,...p},underlayProps:{onPointerDown:g}}}const Ui=typeof document<"u"&&window.visualViewport,fp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let wr=0,Gi;function hp(t={}){let{isDisabled:e}=t;ge(()=>{if(!e)return wr++,wr===1&&(hi()?Gi=gp():Gi=pp()),()=>{wr--,wr===0&&Gi()}},[e])}function pp(){return qn(cn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),cn(document.documentElement,"overflow","hidden"))}function gp(){let t,e,n=u=>{t=Ku(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=cn(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;vp(c)&&(a(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Ui&&(Ui.height<window.innerHeight?requestAnimationFrame(()=>{La(c)}):Ui.addEventListener("resize",()=>La(c),{once:!0}))}))},s=null,a=()=>{if(s)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,f=window.pageYOffset;s=qn(Nn(window,"scroll",u),cn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),cn(document.documentElement,"overflow","hidden"),cn(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(c,f)}),window.scrollTo(0,0)},l=qn(Nn(document,"touchstart",n,{passive:!1,capture:!0}),Nn(document,"touchmove",r,{passive:!1,capture:!0}),Nn(document,"touchend",i,{passive:!1,capture:!0}),Nn(document,"focus",o,!0));return()=>{e==null||e(),s==null||s(),l()}}function cn(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function Nn(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function La(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Ku(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 vp(t){return t instanceof HTMLInputElement&&!fp.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var yc={};yc={dismiss:"تجاهل"};var bc={};bc={dismiss:"Отхвърляне"};var Sc={};Sc={dismiss:"Odstranit"};var Cc={};Cc={dismiss:"Luk"};var wc={};wc={dismiss:"Schließen"};var Ec={};Ec={dismiss:"Απόρριψη"};var xc={};xc={dismiss:"Dismiss"};var $c={};$c={dismiss:"Descartar"};var Tc={};Tc={dismiss:"Lõpeta"};var Pc={};Pc={dismiss:"Hylkää"};var _c={};_c={dismiss:"Rejeter"};var Dc={};Dc={dismiss:"התעלם"};var Oc={};Oc={dismiss:"Odbaci"};var Ic={};Ic={dismiss:"Elutasítás"};var kc={};kc={dismiss:"Ignora"};var Nc={};Nc={dismiss:"閉じる"};var Rc={};Rc={dismiss:"무시"};var Lc={};Lc={dismiss:"Atmesti"};var Mc={};Mc={dismiss:"Nerādīt"};var Ac={};Ac={dismiss:"Lukk"};var Kc={};Kc={dismiss:"Negeren"};var Fc={};Fc={dismiss:"Zignoruj"};var jc={};jc={dismiss:"Descartar"};var Hc={};Hc={dismiss:"Dispensar"};var zc={};zc={dismiss:"Revocare"};var Bc={};Bc={dismiss:"Пропустить"};var Vc={};Vc={dismiss:"Zrušiť"};var Wc={};Wc={dismiss:"Opusti"};var Uc={};Uc={dismiss:"Odbaci"};var Gc={};Gc={dismiss:"Avvisa"};var qc={};qc={dismiss:"Kapat"};var Yc={};Yc={dismiss:"Скасувати"};var Zc={};Zc={dismiss:"取消"};var Xc={};Xc={dismiss:"關閉"};var Jc={};Jc={"ar-AE":yc,"bg-BG":bc,"cs-CZ":Sc,"da-DK":Cc,"de-DE":wc,"el-GR":Ec,"en-US":xc,"es-ES":$c,"et-EE":Tc,"fi-FI":Pc,"fr-FR":_c,"he-IL":Dc,"hr-HR":Oc,"hu-HU":Ic,"it-IT":kc,"ja-JP":Nc,"ko-KR":Rc,"lt-LT":Lc,"lv-LV":Mc,"nb-NO":Ac,"nl-NL":Kc,"pl-PL":Fc,"pt-BR":jc,"pt-PT":Hc,"ro-RO":zc,"ru-RU":Bc,"sk-SK":Vc,"sl-SI":Wc,"sr-SP":Uc,"sv-SE":Gc,"tr-TR":qc,"uk-UA":Yc,"zh-CN":Zc,"zh-TW":Xc};function mp(t){return t&&t.__esModule?t.default:t}function Ma(t){let{onDismiss:e,...n}=t,r=Yh(mp(Jc),"@react-aria/overlays"),i=hs(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Jh,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let Rn=new WeakMap,Ie=[];function yp(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}),f=u(l);if(f===NodeFilter.FILTER_ACCEPT&&o(l),f!==NodeFilter.FILTER_REJECT){let p=c.nextNode();for(;p!=null;)o(p),p=c.nextNode()}},o=l=>{var u;let c=(u=Rn.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),Rn.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let s=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)}});s.observe(e,{childList:!0,subtree:!0});let a={observe(){s.observe(e,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Ie.push(a),()=>{s.disconnect();for(let l of r){let u=Rn.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),Rn.delete(l)):Rn.set(l,u-1))}a===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(a),1)}}function bp(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s,...a}=t,{overlayProps:l,underlayProps:u}=dp({isOpen:e.isOpen&&!a["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s},r),{overlayProps:c,arrowProps:f,placement:p}=lp({...a,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return hp({isDisabled:i||!e.isOpen}),ge(()=>{if(e.isOpen&&!i&&r.current)return yp([r.current])},[i,e.isOpen,r]),{popoverProps:be(l,c),arrowProps:f,underlayProps:u,placement:p}}const Sp=d.createContext({});function Cp(){var t;return(t=d.useContext(Sp))!==null&&t!==void 0?t:{}}const wp=d.createContext(null);function Ep(t){let e=xn(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),s=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:a}=Cp();if(!t.portalContainer&&a&&(n=a()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(ic,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(wp.Provider,{value:s},d.createElement(Eh,null,l)),Ht.createPortal(l,n)}function Bo(t){return i2()?t.altKey:t.ctrlKey}const xp=1e3;function $p(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=s=>{let a=Tp(s.key);if(!(!a||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target))){if(a===" "&&i.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),i.search+=a,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=""},xp)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function Tp(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Qc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:g=r,linkBehavior:b="action"}=t,{direction:h}=ar(),m=pi(),v=E=>{var O;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((O=r.current)===null||O===void 0)&&O.contains(E.target)))return;const z=(K,X)=>{if(K!=null){if(e.isLink(K)&&b==="selection"&&l&&!Bo(E)){var te;Ht.flushSync(()=>{e.setFocusedKey(K,X)});let fe=(te=g.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(K.toString())}"]`),de=e.getItemProps(K);fe&&m.open(fe,E,de.href,de.routerOptions);return}if(e.setFocusedKey(K,X),e.isLink(K)&&b==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):l&&!Bo(E)&&e.replaceSelection(K)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var G,V,L;let K=e.focusedKey!=null?(G=n.getKeyBelow)===null||G===void 0?void 0:G.call(n,e.focusedKey):(V=n.getFirstKey)===null||V===void 0?void 0:V.call(n);K==null&&o&&(K=(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n,e.focusedKey)),K!=null&&(E.preventDefault(),z(K))}break;case"ArrowUp":if(n.getKeyAbove){var Y,j,B;let K=e.focusedKey!=null?(Y=n.getKeyAbove)===null||Y===void 0?void 0:Y.call(n,e.focusedKey):(j=n.getLastKey)===null||j===void 0?void 0:j.call(n);K==null&&o&&(K=(B=n.getLastKey)===null||B===void 0?void 0:B.call(n,e.focusedKey)),K!=null&&(E.preventDefault(),z(K))}break;case"ArrowLeft":if(n.getKeyLeftOf){var k,I,A;let K=e.focusedKey!=null?(k=n.getKeyLeftOf)===null||k===void 0?void 0:k.call(n,e.focusedKey):null;K==null&&o&&(K=h==="rtl"?(I=n.getFirstKey)===null||I===void 0?void 0:I.call(n,e.focusedKey):(A=n.getLastKey)===null||A===void 0?void 0:A.call(n,e.focusedKey)),K!=null&&(E.preventDefault(),z(K,h==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var M,W,U;let K=e.focusedKey!=null?(M=n.getKeyRightOf)===null||M===void 0?void 0:M.call(n,e.focusedKey):null;K==null&&o&&(K=h==="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)),K!=null&&(E.preventDefault(),z(K,h==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let K=n.getFirstKey(e.focusedKey,on(E));e.setFocusedKey(K),K!=null&&(on(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):l&&e.replaceSelection(K))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let K=n.getLastKey(e.focusedKey,on(E));e.setFocusedKey(K),K!=null&&(on(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):l&&e.replaceSelection(K))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let K=n.getKeyPageBelow(e.focusedKey);K!=null&&(E.preventDefault(),z(K))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let K=n.getKeyPageAbove(e.focusedKey);K!=null&&(E.preventDefault(),z(K))}break;case"a":on(E)&&e.selectionMode==="multiple"&&a!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!s&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!f){if(E.shiftKey)r.current.focus();else{let K=Ze(r.current,{tabbable:!0}),X,te;do te=K.lastChild(),te&&(X=te);while(te);X&&!X.contains(document.activeElement)&&$t(X)}break}}},C=d.useRef({top:0,left:0});pr(g,"scroll",p?void 0:()=>{var E,O,z,G;C.current={top:(z=(E=g.current)===null||E===void 0?void 0:E.scrollTop)!==null&&z!==void 0?z:0,left:(G=(O=g.current)===null||O===void 0?void 0:O.scrollLeft)!==null&&G!==void 0?G: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 O,z;let L=j=>{j!=null&&(e.setFocusedKey(j),l&&e.replaceSelection(j))},Y=E.relatedTarget;var G,V;Y&&E.currentTarget.compareDocumentPosition(Y)&Node.DOCUMENT_POSITION_FOLLOWING?L((G=e.lastSelectedKey)!==null&&G!==void 0?G:(O=n.getLastKey)===null||O===void 0?void 0:O.call(n)):L((V=e.firstSelectedKey)!==null&&V!==void 0?V:(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n))}else!p&&g.current&&(g.current.scrollTop=C.current.top,g.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&g.current){let L=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||$t(L),Ca()==="keyboard"&&ia(L,{containingElement:r.current}))}}},P=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);pr(r,y2,c?E=>{let{detail:O}=E;E.stopPropagation(),e.setFocused(!0),(O==null?void 0:O.focusStrategy)==="first"&&(x.current=!0)}:void 0);let D=_e(()=>{var E,O;let z=(O=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&O!==void 0?O:null;if(z==null){var G;(G=r.current)===null||G===void 0||G.dispatchEvent(new CustomEvent(ju,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(z),x.current=!1});ta(()=>{x.current&&D()},[e.collection,D]);let _=_e(()=>{e.collection.size>0&&(x.current=!1)});ta(()=>{_()},[e.focusedKey,_]),pr(r,m2,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const S=d.useRef(i);d.useEffect(()=>{if(S.current){var E,O;let V=null;var z;i==="first"&&(V=(z=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&z!==void 0?z:null);var G;i==="last"&&(V=(G=(O=n.getLastKey)===null||O===void 0?void 0:O.call(n))!==null&&G!==void 0?G:null);let L=e.selectedKeys;if(L.size){for(let Y of L)if(e.canSelectItem(Y)){V=Y;break}}e.setFocused(!0),e.setFocusedKey(V),V==null&&!c&&r.current&&Zr(r.current)}},[]);let R=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==R.current||S.current)&&g.current&&r.current){let E=Ca(),O=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!O)return;(E==="keyboard"||S.current)&&(Fu(g.current,O),E!=="virtual"&&ia(O,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&R.current!=null&&r.current&&Zr(r.current),R.current=e.focusedKey,S.current=!1}),pr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let F={onKeyDown:v,onFocus:w,onBlur:P,onMouseDown(E){g.current===E.target&&E.preventDefault()}},{typeSelectProps:N}=$p({keyboardDelegate:n,selectionManager:e});u||(F=be(N,F));let H;return c?H=-1:H=e.focusedKey==null?0:-1,{collectionProps:{...F,tabIndex:H}}}function ed(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:f="action"}=t,p=pi();e=rr(e);let g=L=>{if(L.pointerType==="keyboard"&&Bo(L))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&i.current){let Y=n.getItemProps(r);p.open(i.current,L,Y.href,Y.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):L&&L.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||L&&(on(L)||L.pointerType==="touch"||L.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!s)a?a():document.activeElement!==i.current&&i.current&&Zr(i.current);else{var Y;let j=new CustomEvent(ju,{cancelable:!0,bubbles:!0});(Y=i.current)===null||Y===void 0||Y.dispatchEvent(j)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,s]),l=l||n.isDisabled(r);let b={};!s&&!l?b={tabIndex:r===n.focusedKey?0:-1,onFocus(L){L.target===i.current&&n.setFocusedKey(r)}}:l&&(b.onMouseDown=L=>{L.preventDefault()});let h=n.isLink(r)&&f==="override",m=n.isLink(r)&&f!=="selection"&&f!=="none",v=!l&&n.canSelectItem(r)&&!h,C=(u||m)&&!l,w=C&&(n.selectionBehavior==="replace"?!v:!v||n.isEmpty),P=C&&v&&n.selectionBehavior==="replace",x=w||P,D=d.useRef(null),_=x&&v,S=d.useRef(!1),R=d.useRef(!1),F=L=>{if(u&&u(),m&&i.current){let Y=n.getItemProps(r);p.open(i.current,L,Y.href,Y.routerOptions)}},N={};o?(N.onPressStart=L=>{D.current=L.pointerType,S.current=_,L.pointerType==="keyboard"&&(!x||Ka())&&g(L)},c?(N.onPressUp=w?void 0:L=>{L.pointerType==="mouse"&&v&&g(L)},N.onPress=w?F:L=>{L.pointerType!=="keyboard"&&L.pointerType!=="mouse"&&v&&g(L)}):N.onPress=L=>{if(w||P&&L.pointerType!=="mouse"){if(L.pointerType==="keyboard"&&!Aa())return;F(L)}else L.pointerType!=="keyboard"&&v&&g(L)}):(N.onPressStart=L=>{D.current=L.pointerType,S.current=_,R.current=w,v&&(L.pointerType==="mouse"&&!w||L.pointerType==="keyboard"&&(!C||Ka()))&&g(L)},N.onPress=L=>{(L.pointerType==="touch"||L.pointerType==="pen"||L.pointerType==="virtual"||L.pointerType==="keyboard"&&x&&Aa()||L.pointerType==="mouse"&&R.current)&&(x?F(L):v&&g(L))}),b["data-key"]=r,N.preventFocusOnPress=s;let{pressProps:H,isPressed:E}=xs(N),O=P?L=>{D.current==="mouse"&&(L.stopPropagation(),L.preventDefault(),F(L))}:void 0,{longPressProps:z}=Rh({isDisabled:!_,onLongPress(L){L.pointerType==="touch"&&(g(L),n.setSelectionBehavior("toggle"))}}),G=L=>{D.current==="touch"&&S.current&&L.preventDefault()},V=n.isLink(r)?L=>{kt.isOpening||L.preventDefault()}:void 0;return{itemProps:be(b,v||w?H:{},_?z:{},{onDoubleClick:O,onDragStartCapture:G,onClick:V,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:v,hasAction:x}}function Aa(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Ka(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Fa{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 Pp{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 s=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(s,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&&!Yn(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&&!Yn(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 s=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(s,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 Fa(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 Fa(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function _p(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:s}=t,a=Zh({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new Pp({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:a,layoutDelegate:s}),[o,s,n,r,i,a,l]),{collectionProps:c}=Qc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function td(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Dp(t){return Op(t)}function Op(t,e){for(let n of t)return n}function qi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...ja(t,e),e],i=[...ja(t,n),n],o=r.slice(0,i.length).findIndex((s,a)=>s!==i[a]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(s=>s===n)>=0?1:(i.findIndex(s=>s===e)>=0,-1)}function ja(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 Ha=new WeakMap;function Ip(t){let e=Ha.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(td(o,t)):n++};return r(t),Ha.set(t,n),n}const nd=new WeakMap;function kp(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...s}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=We(t,{labelable:!0}),{listProps:l}=_p({...s,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return nd.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:be(a,{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 Np(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:s,"aria-haspopup":a,onPressStart:l,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:p,onHoverStart:g,onHoverChange:b,onHoverEnd:h,onKeyDown:m,onKeyUp:v,onFocus:C,onFocusChange:w,onBlur:P,selectionManager:x=e.selectionManager}=t,D=!!a,_=D&&t["aria-expanded"]==="true";var S;let R=(S=t.isDisabled)!==null&&S!==void 0?S:x.isDisabled(i);var F;let N=(F=t.isSelected)!==null&&F!==void 0?F:x.isSelected(i),H=nd.get(e),E=e.collection.getItem(i),O=t.onClose||H.onClose,z=pi(),G=re=>{var Ge;if(!D){if(!(E==null||(Ge=E.props)===null||Ge===void 0)&&Ge.onAction?E.props.onAction():t.onAction&&t.onAction(i),H.onAction){let lt=H.onAction;lt(i)}re.target instanceof HTMLAnchorElement&&E&&z.open(re.target,re,E.props.href,E.props.routerOptions)}},V="menuitem";D||(x.selectionMode==="single"?V="menuitemradio":x.selectionMode==="multiple"&&(V="menuitemcheckbox"));let L=Mi(),Y=Mi(),j=Mi(),B={id:r,"aria-disabled":R||void 0,role:V,"aria-label":t["aria-label"],"aria-labelledby":L,"aria-describedby":[Y,j].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":a,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!D&&(B["aria-checked"]=N),s&&(B["aria-posinset"]=E==null?void 0:E.index,B["aria-setsize"]=Ip(e.collection));let k=re=>{re.pointerType==="keyboard"&&G(re),l==null||l(re)},I=()=>{!D&&O&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&O()},A=re=>{re.pointerType==="mouse"&&(G(re),I()),u==null||u(re)},M=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(G(re),I()),c==null||c(re)},{itemProps:W,isFocused:U}=ed({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:H.shouldUseVirtualFocus}),{pressProps:K,isPressed:X}=xs({onPressStart:k,onPress:M,onPressUp:A,onPressChange:f,onPressEnd:p,isDisabled:R}),{hoverProps:te}=Ps({isDisabled:R,onHoverStart(re){!Dh()&&!(_&&a==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),g==null||g(re)},onHoverChange:b,onHoverEnd:h}),{keyboardProps:fe}=kh({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!R&&x.selectionMode==="none"&&!D&&o!==!1&&O&&O();break;case"Enter":!R&&o!==!1&&!D&&O&&O();break;default:D||re.continuePropagation(),m==null||m(re);break}},onKeyUp:v}),{focusProps:de}=$h({onBlur:P,onFocus:C,onFocusChange:w}),oe=We(E==null?void 0:E.props);delete oe.id;let ve=Mu(E==null?void 0:E.props);return{menuItemProps:{...B,...be(oe,ve,D?{onFocus:W.onFocus,"data-key":W["data-key"]}:W,K,te,fe,de),tabIndex:W.tabIndex!=null&&_?-1:W.tabIndex},labelProps:{id:L},descriptionProps:{id:Y},keyboardShortcutProps:{id:j},isFocused:U,isSelected:N,isPressed:X,isDisabled:R}}function Rp(t){let{heading:e,"aria-label":n}=t,r=rr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function Lp(t){let e=We(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const rd=new WeakMap;function ti(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${rd.get(t)}-${n}-${e}`):""}function Mp(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:s,selectedKey:a}=e,l=r===a,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:f}=ed({selectionManager:s,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),p=ti(e,r,"tab"),g=ti(e,r,"tabpanel"),{tabIndex:b}=c,h=e.collection.getItem(r),m=We(h==null?void 0:h.props,{labelable:!0});delete m.id;let v=Mu(h==null?void 0:h.props);return{tabProps:be(m,v,c,{id:p,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?g:void 0,tabIndex:u?void 0:b,role:"tab"}),isSelected:l,isDisabled:u,isPressed:f}}function Ap(t,e,n){let r=mh(n)?void 0:0;var i;const o=ti(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),s=hs({...t,id:o,"aria-labelledby":ti(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:be(s,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class Kp{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 Fp(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:s,disabledKeys:a}=e,{direction:l}=ar(),u=d.useMemo(()=>new Kp(o,l,r,a),[o,a,r,l]),{collectionProps:c}=Qc({ref:n,selectionManager:s,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),f=rr();rd.set(e,f);let p=hs({...t,id:f});return{tabListProps:{...be(c,p),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const jp=d.createContext({});function Hp(t){let[e,n]=ir(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 zp{build(e,n){return this.context=n,za(()=>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,s=>{s&&i.push(s)});let o=0;for(let s of i){let a=this.getFullNode({element:s,index:o},{});for(let l of a)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 s;let a=(s=o.key)!==null&&s!==void 0?s:o.id;if(a==null)throw new Error("No key found for item");return a}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 m=[];d.Children.forEach(e.element.props.children,C=>{m.push(C)});var o;let v=(o=e.index)!==null&&o!==void 0?o:0;for(const C of m)yield*this.getFullNode({element:C,index:v++},n,r,i);return}let s=e.element;if(!s&&e.value&&n&&n.renderer){let m=this.cache.get(e.value);if(m&&(!m.shouldInvalidate||!m.shouldInvalidate(this.context))){m.index=e.index,m.parentKey=i?i.key:null,yield m;return}s=n.renderer(e.value)}if(d.isValidElement(s)){let m=s.type;if(typeof m!="function"&&typeof m.getCollectionNode!="function"){let P=s.type;throw new Error(`Unknown element <${P}> in collection.`)}let v=m.getCollectionNode(s.props,this.context);var a;let C=(a=e.index)!==null&&a!==void 0?a:0,w=v.next();for(;!w.done&&w.value;){let P=w.value;e.index=C;var l;let x=(l=P.key)!==null&&l!==void 0?l:null;x==null&&(x=P.element?null:this.getKey(s,e,n,r));let _=[...this.getFullNode({...P,key:x,index:C,wrapper:Bp(e.wrapper,P.wrapper)},this.getChildState(n,P),r?`${r}${s.key}`:s.key,i)];for(let S of _){var u,c;S.value=(c=(u=P.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,S.value&&this.cache.set(S.value,S);var f;if(e.type&&S.type!==e.type)throw new Error(`Unsupported type <${Yi(S.type)}> in <${Yi((f=i==null?void 0:i.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${Yi(e.type)}> is supported.`);C++,yield S}w=v.next(_)}return}if(e.key==null||e.type==null)return;let p=this;var g,b;let h={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:(b=e.textValue)!==null&&b!==void 0?b:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:za(function*(){if(!e.hasChildNodes||!e.childNodes)return;let m=0;for(let v of e.childNodes()){v.key!=null&&(v.key=`${h.key}${v.key}`);let C=p.getFullNode({...v,index:m},p.getChildState(n,v),h.key,h);for(let w of C)m++,yield w}})};yield h}constructor(){this.cache=new WeakMap}}function za(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 Bp(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Yi(t){return t[0].toUpperCase()+t.slice(1)}function id(t,e,n){let r=d.useMemo(()=>new zp,[]),{children:i,items:o,collection:s}=t;return d.useMemo(()=>{if(s)return s;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,s,n,e])}function Vp(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Wp(t){return Up(t)}function Up(t,e){for(let n of t)return n}function Zi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ba(t,e),e],i=[...Ba(t,n),n],o=r.slice(0,i.length).findIndex((s,a)=>s!==i[a]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(s=>s===n)>=0?1:(i.findIndex(s=>s===e)>=0,-1)}function Ba(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 Gp(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=h=>{var m;return(m=h.id)!==null&&m!==void 0?m:h.key},getChildren:i=h=>h.children}=t,[o,s]=d.useState(()=>f(e,new Map)),{items:a,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function f(h=[],m,v){return h==null&&(h=[]),{items:h.map(C=>{let w={key:r(C),parentKey:v,value:C,children:null};return w.children=f(i(C),m,w.key).items,m.set(w.key,w),w}),nodeMap:m}}function p(h,m,v,C){let w=C.get(m);if(!w)return{items:h,nodeMap:C};let P=new Map(C),x=v(w);for(x==null?b(w,P):g(x,P);w&&w.parentKey;){let _=P.get(w.parentKey),S={key:_.key,parentKey:_.parentKey,value:_.value,children:null},R=_.children;x==null&&R&&(R=R.filter(F=>F!==w));var D;S.children=(D=R==null?void 0:R.map(F=>F===w?x:F))!==null&&D!==void 0?D:null,P.set(S.key,S),x=S,w=_}return x==null&&(h=h.filter(_=>_!==w)),{items:h.map(_=>_===w?x:_),nodeMap:P}}function g(h,m){if(m.set(h.key,h),h.children)for(let v of h.children)g(v,m)}function b(h,m){if(m.delete(h.key),h.children)for(let v of h.children)b(v,m)}return{items:a,selectedKeys:u,setSelectedKeys:c,getItem(h){return l.get(h)},insert(h,m,...v){s(({items:C,nodeMap:w})=>{let{items:P,nodeMap:x}=f(v,w,h);return h==null?{items:[...C.slice(0,m),...P,...C.slice(m)],nodeMap:x}:p(C,h,D=>({key:D.key,parentKey:D.parentKey,value:D.value,children:[...D.children.slice(0,m),...P,...D.children.slice(m)]}),x)})},insertBefore(h,...m){let v=l.get(h);if(!v)return;let C=l.get(v.parentKey),P=(C?C.children:a).indexOf(v);var x;this.insert((x=C==null?void 0:C.key)!==null&&x!==void 0?x:null,P,...m)},insertAfter(h,...m){let v=l.get(h);if(!v)return;let C=l.get(v.parentKey),P=(C?C.children:a).indexOf(v);var x;this.insert((x=C==null?void 0:C.key)!==null&&x!==void 0?x:null,P+1,...m)},prepend(h,...m){this.insert(h,0,...m)},append(h,...m){if(h==null)this.insert(null,a.length,...m);else{let v=l.get(h);if(!v)return;this.insert(h,v.children.length,...m)}},remove(...h){if(h.length===0)return;let m=a,v=l,C;for(let P of h)C=p(m,P,()=>null,v),v=C.nodeMap,m=C.items;s(C);let w=new Set(u);for(let P of u)C.nodeMap.has(P)||w.delete(P);c(w)},removeSelectedItems(){this.remove(...u)},move(h,m,v){s(({items:C,nodeMap:w})=>{let P=w.get(h);if(!P)return{items:C,nodeMap:w};let{items:x,nodeMap:D}=p(C,h,()=>null,w);const _={...P,parentKey:m};return m==null?(D.set(_.key,_),{items:[...x.slice(0,v),_,...x.slice(v)],nodeMap:D}):p(x,m,S=>({key:S.key,parentKey:S.parentKey,value:S.value,children:[...S.children.slice(0,v),_,...S.children.slice(v)]}),D)})},update(h,m){s(({items:v,nodeMap:C})=>p(v,h,w=>{let P={key:w.key,parentKey:w.parentKey,value:m,children:null},x=f(i(m),C,P.key);return P.children=x.items,P},C))}}}class Va{*[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=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let a of s.childNodes)n(a)};for(let s of e)n(s);let r=null,i=0;for(let[s,a]of this.keyMap)r?(r.nextKey=s,a.prevKey=r.key):(this.firstKey=s,a.prevKey=void 0),a.type==="item"&&(a.index=i++),r=a,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let rt=class od extends Set{constructor(e,n,r){super(e),e instanceof od?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function qp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function sd(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,s=d.useRef(!1),[,a]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),f=d.useMemo(()=>Wa(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Wa(t.defaultSelectedKeys,new rt),[t.defaultSelectedKeys]),[g,b]=ir(f,p,t.onSelectionChange),h=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[m,v]=d.useState(i);i==="replace"&&m==="toggle"&&typeof g=="object"&&g.size===0&&v("replace");let C=d.useRef(i);return d.useEffect(()=>{i!==C.current&&(v(i),C.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:v,get isFocused(){return s.current},setFocused(w){s.current=w,a(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,P="first"){l.current=w,u.current=P,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!qp(w,g))&&b(w)},disabledKeys:h,disabledBehavior:o}}function Wa(t,e){return t?t==="all"?"all":new rt(t):e}let ad=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&&Zi(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&&Zi(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 rt([n],n,n);else{let s=this.state.selectedKeys;var i;let a=(i=s.anchorKey)!==null&&i!==void 0?i:n;r=new rt(s,a,n);var o;for(let l of this.getKeyRange(a,(o=s.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,a))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?Zi(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 s=this.collection.getItem(o);if(s&&(s.type==="item"||s.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 rt(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 rt([n],n,n):new rt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new rt;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 s=this.collection.getItem(r);(s==null?void 0:s.type)==="item"&&e.push(r);var o;s!=null&&s.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&n((o=(i=Wp(Vp(s,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 rt)}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 Yp(t){let{filter:e,layoutDelegate:n}=t,r=sd(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new Va(e(c)):new Va(c),[e]),s=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=id(t,o,s),l=d.useMemo(()=>new ad(a,r,{layoutDelegate:n}),[a,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!a.getItem(r.focusedKey)&&u.current){const v=u.current.getItem(r.focusedKey),C=[...u.current.getKeys()].map(S=>{const R=u.current.getItem(S);return(R==null?void 0:R.type)==="item"?R:null}).filter(S=>S!==null),w=[...a.getKeys()].map(S=>{const R=a.getItem(S);return(R==null?void 0:R.type)==="item"?R:null}).filter(S=>S!==null);var c,f;const P=((c=C==null?void 0:C.length)!==null&&c!==void 0?c:0)-((f=w==null?void 0:w.length)!==null&&f!==void 0?f:0);var p,g,b;let x=Math.min(P>1?Math.max(((p=v==null?void 0:v.index)!==null&&p!==void 0?p:0)-P+1,0):(g=v==null?void 0:v.index)!==null&&g!==void 0?g:0,((b=w==null?void 0:w.length)!==null&&b!==void 0?b:0)-1),D=null,_=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){D=w[x];break}if(x<w.length-1&&!_)x++;else{_=!0;var h,m;x>((h=v==null?void 0:v.index)!==null&&h!==void 0?h:0)&&(x=(m=v==null?void 0:v.index)!==null&&m!==void 0?m:0),x--}}r.setFocusedKey(D?D.key:null)}u.current=a},[a,l,r,r.focusedKey]),{collection:a,disabledKeys:i,selectionManager:l}}function Zp(t){var e;let[n,r]=ir(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:s,selectionManager:a}=Yp({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let f=(c=u.values().next().value)!==null&&c!==void 0?c:null;f===n&&t.onSelectionChange&&t.onSelectionChange(f),r(f)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:s,selectionManager:a,selectedKey:n,setSelectedKey:r,selectedItem:l}}function Xp(t){var e,n;let r=Zp({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Ua(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:s}=r,a=d.useRef(s);return d.useEffect(()=>{let l=s;(i.isEmpty||l==null||!o.getItem(l))&&(l=Ua(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==a.current)&&i.setFocusedKey(l),a.current=l}),{...r,isDisabled:t.isDisabled||!1}}function Ua(t,e){let n=null;if(t){var r,i,o,s;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)||!((s=t.getItem(n))===null||s===void 0||(o=s.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Jp{*[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=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||n.has(a.key)))for(let l of a.childNodes)r(l)};for(let a of e)r(a);let i=null,o=0;for(let[a,l]of this.keyMap)i?(i.nextKey=a,l.prevKey=i.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var s;this.lastKey=(s=i==null?void 0:i.key)!==null&&s!==void 0?s:null}}function Qp(t){let{onExpandedChange:e}=t,[n,r]=ir(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=sd(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=id(t,d.useCallback(l=>new Jp(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!s.getItem(i.focusedKey)&&i.setFocusedKey(null)},[s,i.focusedKey]),{collection:s,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(eg(n,l))},setExpandedKeys:r,selectionManager:new ad(s,i)}}function eg(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const tg=d.createContext(null),ng=d.createContext(null),ld={CollectionRoot({collection:t,renderDropIndicator:e}){return Ga(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Ga(t,e,n)}};function Ga(t,e,n){return Bu({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 s=r.key,a=t.getKeyAfter(s);return d.createElement(d.Fragment,null,n({type:"item",key:s,dropPosition:"before"}),o,(a==null||((i=t.getItem(a))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:s,dropPosition:"after"}))}})}const mi=d.createContext(ld);function ud(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const rg=d.createContext({}),cd=d.createContext({}),ig=ys("separator",function(e,n){[e,n]=sr(e,n,cd);let{elementType:r,orientation:i,style:o,className:s}=e,a=r||"hr";a==="hr"&&i==="vertical"&&(a="div");let{separatorProps:l}=Lp({elementType:r,orientation:i});return d.createElement(a,{...We(e),...l,style:o,className:s??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),og=d.createContext({placement:"bottom"}),sg=d.createContext(null),ag=d.forwardRef(function(e,n){[e,n]=sr(e,n,sg);let r=d.useContext(Sg),i=Hp(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,s=S2(n,o.isOpen)||e.isExiting||!1;if(T2()){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&&!s?null:d.createElement(lg,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:s})});function lg({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,s]=d.useState(0);ge(()=>{i.current&&t.isOpen&&s(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var a;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:f}=bp({...r,offset:(a=r.offset)!==null&&a!==void 0?a:8,arrowSize:o},t),p=r.popoverRef,g=b2(p,!!f)||r.isEntering||!1,b=bt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:f,isEntering:g,isExiting:e}}),h={...l.style,...b.style};return d.createElement(Ep,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...be(We(r),l),...b,ref:p,slot:r.slot||void 0,style:h,"data-trigger":r.trigger,"data-placement":f,"data-entering":g||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Ma,{onDismiss:t.close}),d.createElement(og.Provider,{value:{...c,placement:f,ref:i}},b.children),d.createElement(Ma,{onDismiss:t.close})))}const ug=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 cg(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function dg(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,s=d.useRef(!1),[,a]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),f=d.useMemo(()=>qa(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>qa(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[g,b]=ir(f,p,t.onSelectionChange),h=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[m,v]=d.useState(i);i==="replace"&&m==="toggle"&&typeof g=="object"&&g.size===0&&v("replace");let C=d.useRef(i);return d.useEffect(()=>{i!==C.current&&(v(i),C.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:v,get isFocused(){return s.current},setFocused(w){s.current=w,a(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,P="first"){l.current=w,u.current=P,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!cg(w,g))&&b(w)},disabledKeys:h,disabledBehavior:o}}function qa(t,e){return t?t==="all"?"all":new ze(t):e}class fg{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&&qi(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&&qi(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 s=this.state.selectedKeys;var i;let a=(i=s.anchorKey)!==null&&i!==void 0?i:n;r=new ze(s,a,n);var o;for(let l of this.getKeyRange(a,(o=s.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,a))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?qi(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 s=this.collection.getItem(o);if(s&&(s.type==="item"||s.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 s=this.collection.getItem(r);(s==null?void 0:s.type)==="item"&&e.push(r);var o;s!=null&&s.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&n((o=(i=Dp(td(s,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 hg=d.createContext(null),_s=d.createContext(null),pg=d.createContext(null),ni=d.createContext(null),gg=d.createContext(null),vg=d.forwardRef(function(e,n){return[e,n]=sr(e,n,hg),d.createElement(Wu,{content:d.createElement(Uu,e)},r=>r.size>0&&d.createElement(mg,{props:e,collection:r,menuRef:n}))});function mg({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(tg)||{};n=$n(d.useMemo(()=>ku(n,o!==void 0?o:null),[o,n]));let s=d.useMemo(()=>r?e.filter(r):e,[e,r]),a=Qp({...t,collection:s,children:void 0}),l=d.useContext(pg),{isVirtualized:u,CollectionRoot:c}=d.useContext(mi),{menuProps:f}=kp({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},a,n),p=bt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(ic,null,d.createElement("div",{...We(t),...f,...p,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(or,{values:[[_s,a],[cd,{elementType:"div"}],[ng,{name:"MenuSection",render:bg}],[gg,{parentMenuRef:n}],[Vo,null],[ni,a.selectionManager]]},d.createElement(c,{collection:a.collection,persistedKeys:ud(a.selectionManager.focusedKey),scrollRef:n}))))}class yg extends fg{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 bg(t,e,n,r="react-aria-MenuSection"){var i,o;let s=d.useContext(_s),{CollectionBranch:a}=d.useContext(mi),[l,u]=C2();var c;let{headingProps:f,groupProps:p}=Rp({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),g=bt({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:{}}),b=d.useContext(ni),h=dg(t),m=t.selectionMode!=null?new yg(b,h):b;return d.createElement("section",{...We(t),...p,...g,ref:e},d.createElement(or,{values:[[rg,{...f,ref:l}],[ni,m]]},d.createElement(a,{collection:s.collection,parent:n})))}const Vo=d.createContext(null),Ya=ys("item",function(e,n,r){var i;[e,n]=sr(e,n,Vo);let o=(i=ps(Vo))===null||i===void 0?void 0:i.id,s=d.useContext(_s),a=$n(n),l=d.useContext(ni),{menuItemProps:u,labelProps:c,descriptionProps:f,keyboardShortcutProps:p,...g}=Np({...e,id:o,key:r.key,selectionManager:l},s,a),{isFocusVisible:b,focusProps:h}=gi(),{hoverProps:m,isHovered:v}=Ps({isDisabled:g.isDisabled}),C=bt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...g,isHovered:v,isFocusVisible:b,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...be(u,h,m),...C,ref:a,"data-disabled":g.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":g.isFocused||void 0,"data-focus-visible":b||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(or,{values:[[jp,{slots:{label:c,description:f}}],[ug,p]]},C.children))}),Sg=d.createContext(null),yi=d.createContext(null),bn=d.createContext(null),Cg=d.forwardRef(function(e,n){[e,n]=sr(e,n,yi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(Wu,{content:r},o=>d.createElement(wg,{props:e,collection:o,tabsRef:n}))});function wg({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=Xp({...t,collection:n,children:void 0}),{focusProps:o,isFocused:s,isFocusVisible:a}=gi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:s,isFocusVisible:a}),[r,s,a]),u=bt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...We(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":s||void 0,"data-orientation":r,"data-focus-visible":a||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(or,{values:[[yi,t],[bn,i]]},u.children))}const Eg=d.forwardRef(function(e,n){return d.useContext(bn)?d.createElement(xg,{props:e,forwardedRef:n}):d.createElement(Uu,e)});function xg({props:t,forwardedRef:e}){let n=d.useContext(bn),{CollectionRoot:r}=d.useContext(mi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=ps(yi),s=$n(e),{tabListProps:a}=Fp({...t,orientation:i,keyboardActivation:o},n,s),l=bt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=We(t);return delete u.id,d.createElement("div",{...u,...a,ref:s,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:ud(n.selectionManager.focusedKey)}))}const $g=ys("item",(t,e,n)=>{let r=d.useContext(bn),i=$n(e),{tabProps:o,isSelected:s,isDisabled:a,isPressed:l}=Mp({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:f}=gi(),{hoverProps:p,isHovered:g}=Ps({isDisabled:a,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),b=bt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:s,isDisabled:a,isFocused:c,isFocusVisible:f,isPressed:l,isHovered:g}}),h=n.props.href?"a":"div";return d.createElement(h,{...be(o,u,p,b),ref:i,"data-selected":s||void 0,"data-disabled":a||void 0,"data-focused":c||void 0,"data-focus-visible":f||void 0,"data-pressed":l||void 0,"data-hovered":g||void 0})}),Tg=$2(function(e,n){const r=d.useContext(bn);let i=$n(n),{tabPanelProps:o}=Ap(e,r,i),{focusProps:s,isFocused:a,isFocusVisible:l}=gi(),u=r.selectedKey===e.id,c=bt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:a,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let f=We(e);delete f.id;let p=u?be(f,o,s,c):c;return d.createElement("div",{...p,ref:i,"data-focused":a||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(or,{values:[[yi,null],[bn,null]]},d.createElement(mi.Provider,{value:ld},c.children)))}),lr=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o,topMessage:s,shouldCloseOnInteractOutside:a})=>{const l=d.useId(),u=f=>{n==null||n(f)},c=d.useRef(null);return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"c__dropdown-menu-trigger",ref:c,id:l,onClick:f=>{f.stopPropagation(),f.preventDefault()},children:r}),y.jsx(ag,{triggerRef:c,style:{marginTop:"0px"},isOpen:e,shouldCloseOnInteractOutside:a,onOpenChange:u,children:y.jsxs(vg,{className:"c__dropdown-menu","aria-labelledby":l,children:[s&&y.jsx(Ya,{className:"c__dropdown-menu-item-top-message",children:s}),t.map(f=>f.isHidden?null:y.jsxs(d.Fragment,{children:[y.jsxs(Ya,{className:"c__dropdown-menu-item","aria-label":f.label,onAction:()=>{var p;f.value&&(o==null||o(f.value)),(p=f.callback)==null||p.call(f),u(!1)},isDisabled:f.isDisabled,children:[f.icon,y.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":f.label,children:f.label}),(f.isChecked||f.value&&i.includes(f.value))&&y.jsx("span",{className:"material-icons checked",children:"check"})]},f.label),f.showSeparator&&y.jsx(ig,{})]},f.label))]})})]})},Sn=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},Za="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M10%206v2H5v11h11v-5h2v6a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V7a1%201%200%200%201%201-1h6Zm11-3v8h-2V6.413l-7.793%207.794-1.414-1.414L17.585%205H13V3h8Z'%20/%3e%3c/svg%3e",Pg="data:image/svg+xml,%3csvg%20width='109'%20height='60'%20viewBox='0%200%20109%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3crect%20width='33'%20height='12'%20fill='url(%23paint0_linear_5795_13250)'%20/%3e%3cg%20clip-path='url(%23clip0_5795_13250)'%3e%3cg%20clip-path='url(%23clip1_5795_13250)'%3e%3cpath%20d='M8.475%206.8999C7.8%207.3499%207.2%207.8749%206.75%208.4749V8.3999C7.05%208.0249%207.275%207.6499%207.5%207.2749C7.8%207.1249%208.025%206.8999%208.25%206.6749C8.625%206.2999%209%205.9249%209.525%205.6999C9.75%205.6249%209.9%205.6249%2010.125%205.6999C10.05%205.7749%209.975%205.7749%209.825%205.8499H9.75V5.7749C9.525%205.9999%209.225%206.1499%209%206.4499C8.925%206.5999%208.85%206.8999%208.475%206.8999C8.55%206.8999%208.475%206.9749%208.475%206.8999ZM9.675%2010.3499C9.675%2010.2749%209.6%2010.3499%209.525%2010.3499L9.45%2010.4249L9.375%2010.4999L9.225%2010.6499C9.225%2010.6499%209.3%2010.7249%209.375%2010.6499L9.45%2010.5749C9.525%2010.5749%209.6%2010.4999%209.6%2010.4249C9.675%2010.4249%209.675%2010.4249%209.675%2010.3499ZM8.475%207.1249C8.55%207.1249%208.625%207.1249%208.625%207.0499C8.625%206.9749%208.7%206.9749%208.7%206.9749V6.8999C8.55%206.9749%208.475%207.0499%208.475%207.1249ZM10.275%208.5499C10.35%208.4749%2010.425%208.4749%2010.5%208.4749C11.025%208.3999%2011.55%208.2499%2012.075%208.0249C11.475%207.6499%2010.8%207.3499%2010.125%207.2749H10.2C10.125%207.1999%209.975%207.1999%209.825%207.1249H9.9C9.75%207.0499%209.525%207.0499%209.375%206.9749C9.45%206.9749%209.525%206.8249%209.525%206.7499H9.45C9.15%206.8999%209%207.1249%208.85%207.4249C9%207.4999%209.225%207.4249%209.375%207.4999H9.15C9.075%207.4999%209%207.5749%209%207.6499H9.075C9%207.6499%209%207.7249%208.925%207.7249C9%207.7999%209.075%207.7249%209.225%207.7249C9.225%207.7999%209.3%207.7999%209.3%207.7999C9.225%207.7999%209.15%207.8749%209.075%208.0249C9%208.1749%208.925%208.1749%208.85%208.2499V8.3249C8.625%208.4749%208.4%208.6999%208.175%208.9249V8.9999C8.1%209.0749%208.025%209.0749%208.025%209.1499V9.2249C8.325%209.1499%208.475%208.9249%208.775%208.8499L9.225%208.6249C9.375%208.6249%209.45%208.5499%209.6%208.5499V8.6249H9.75C9.75%208.6999%209.6%208.6249%209.675%208.6999C9.75%208.7749%209.9%208.7749%209.975%208.6999C10.125%208.5499%2010.2%208.5499%2010.275%208.5499ZM9.3%209.7499C9%209.8999%208.625%209.8999%208.4%2010.0499C8.4%2010.0499%208.4%2010.1249%208.325%2010.1249C8.325%2010.1249%208.25%2010.1249%208.25%2010.1999C8.175%2010.1999%208.175%2010.2749%208.1%2010.3499L8.025%2010.4249C8.025%2010.4249%208.025%2010.4999%208.1%2010.4249L8.175%2010.3499C8.175%2010.3499%208.1%2010.4249%208.1%2010.4999V10.7249L8.025%2010.7999C8.025%2010.7999%208.025%2010.8749%207.95%2010.8749L7.875%2010.9499L8.025%2010.7999L8.1%2010.7249H8.25C8.25%2010.7249%208.25%2010.6499%208.325%2010.6499C8.4%2010.5749%208.475%2010.4999%208.55%2010.4999H8.625C8.7%2010.4249%208.85%2010.4249%208.925%2010.3499C9%2010.2749%209.075%2010.1999%209.15%2010.1999C9.3%2010.0499%209.525%209.9749%209.75%209.8249C9.675%209.8249%209.6%209.7499%209.525%209.7499C9.525%209.8249%209.375%209.7499%209.3%209.7499ZM22.5%206.5249C22.425%206.6749%2022.2%206.6749%2022.05%206.7499C21.9%206.8999%2022.05%207.0499%2022.125%207.1249C22.2%207.3499%2021.975%207.4999%2021.825%207.4999C21.9%207.5749%2021.975%207.5749%2021.975%207.5749C21.975%207.7249%2022.125%207.7249%2022.05%207.8749C21.975%208.0249%2021.675%208.0999%2021.825%208.2499C21.9%208.3999%2021.9%208.6249%2021.825%208.7749C21.75%208.9249%2021.6%209.0749%2021.45%209.1499C21.3%209.2249%2021.15%209.2249%2021%209.1499C20.925%209.1499%2020.925%209.0749%2020.85%209.0749C20.475%208.9999%2020.1%208.9249%2019.725%208.9249C19.65%208.9249%2019.5%208.9999%2019.425%208.9999C19.35%209.0749%2019.2%209.1499%2019.125%209.2249L19.05%209.2999C18.975%209.3749%2018.9%209.4499%2018.9%209.5249C18.825%209.6749%2018.75%209.8249%2018.75%209.9749C18.6%2010.3499%2018.6%2010.7249%2018.75%2011.0249C18.75%2011.0249%2019.5%2011.2499%2020.025%2011.4749C20.175%2011.5499%2020.4%2011.6249%2020.55%2011.7749L21.825%2012.5249H9.9L11.1%2011.7749C11.55%2011.4749%2012.075%2011.2499%2012.6%2011.0249C12.975%2010.8749%2013.425%2010.6499%2013.725%2010.3499C13.875%2010.1999%2013.95%2010.0499%2014.1%209.9749C14.325%209.6749%2014.55%209.4499%2014.85%209.2249L15.075%208.9999C15.075%208.9999%2015.075%208.9249%2015.15%208.9249C15%208.9999%2015%209.0749%2014.85%209.0749C14.85%209.0749%2014.775%209.0749%2014.85%208.9999C14.925%208.9249%2015%208.8499%2015.075%208.8499V8.7749C14.775%208.7749%2014.55%208.9249%2014.325%209.1499H14.175C13.8%209.2999%2013.575%209.5249%2013.275%209.6749V9.5999C13.125%209.6749%2012.975%209.7499%2012.9%209.7499C12.75%209.7499%2012.525%209.8249%2012.3%209.7499C12%209.7499%2011.775%209.8249%2011.475%209.8999C11.325%209.9749%2011.175%209.9749%2011.025%2010.0499V10.1249L10.875%2010.2749C10.725%2010.3499%2010.65%2010.4249%2010.5%2010.5749L10.125%2010.9499H10.05L10.125%2010.8749L10.2%2010.7999C10.2%2010.7249%2010.275%2010.7249%2010.275%2010.6499C10.425%2010.5749%2010.5%2010.4249%2010.65%2010.3499C10.65%2010.3499%2010.65%2010.2749%2010.725%2010.2749L10.65%2010.3499C10.575%2010.4249%2010.575%2010.4999%2010.5%2010.4999V10.4249V10.3499L10.65%2010.1999C10.725%2010.1249%2010.8%2010.1249%2010.875%2010.0499H10.95C10.8%2010.1249%2010.725%2010.1249%2010.575%2010.1999H10.5H10.425C10.425%2010.1249%2010.5%2010.1249%2010.575%2010.0499H10.65C11.4%209.4499%2012.375%209.5999%2013.2%209.2999C13.275%209.2249%2013.35%209.2249%2013.425%209.1499C13.5%209.0749%2013.65%208.9999%2013.8%208.9249C13.95%208.7749%2014.1%208.6249%2014.175%208.3999V8.3249C13.875%208.6249%2013.575%208.8499%2013.2%209.0749C12.75%209.2249%2012.225%209.3749%2011.7%209.3749C11.7%209.2999%2011.775%209.2999%2011.775%209.2999C11.775%209.2249%2011.85%209.2249%2011.85%209.1499H11.925C11.925%209.1499%2011.925%209.0749%2012%209.0749H12.075C12%208.9999%2011.85%209.1499%2011.775%209.0749C11.85%208.9999%2011.775%208.9249%2011.85%208.9249H11.925C11.925%208.9249%2011.925%208.8499%2012%208.8499C12.375%208.6249%2012.675%208.4749%2012.975%208.3249C12.9%208.3249%2012.9%208.3999%2012.825%208.3249C12.9%208.3249%2012.825%208.2499%2012.9%208.2499C13.125%208.1749%2013.35%208.0249%2013.575%207.9499C13.5%207.9499%2013.425%208.0249%2013.35%207.9499C13.425%207.9499%2013.425%207.8749%2013.5%207.8749V7.7999C13.5%207.7249%2013.575%207.7999%2013.65%207.7249H13.575C13.65%207.6499%2013.725%207.5749%2013.875%207.5749C13.875%207.4999%2013.8%207.5749%2013.8%207.4999H13.875H13.5C13.425%207.4999%2013.5%207.4249%2013.5%207.4249C13.575%207.2749%2013.65%207.0499%2013.725%206.8999H13.65C13.425%207.1249%2013.05%207.2749%2012.75%207.3499H12.6C12.45%207.4249%2012.3%207.4249%2012.225%207.3499C12.15%207.2749%2012.075%207.1999%2012%207.1999C11.85%207.1249%2011.625%206.9749%2011.4%206.8999C10.875%206.7499%2010.275%206.5999%209.675%206.6749C9.9%206.5999%2010.2%206.5249%2010.5%206.4499C10.875%206.2999%2011.25%206.2249%2011.625%206.2249H11.4C11.1%206.2249%2010.725%206.2999%2010.425%206.3749C10.2%206.4499%209.975%206.5249%209.75%206.5249C9.6%206.5999%209.525%206.6749%209.375%206.6749V6.5999C9.6%206.2999%209.9%206.0749%2010.2%205.9999C10.575%205.9249%2011.025%205.9999%2011.4%206.0749C11.7%206.0749%2012%206.1499%2012.225%206.2249C12.3%206.2249%2012.375%206.3749%2012.45%206.4499C12.6%206.5249%2012.75%206.4499%2012.825%206.5249V6.3749C12.9%206.2999%2013.05%206.3749%2013.125%206.3749C13.275%206.2249%2012.975%206.0749%2012.9%205.9249V5.8499C13.05%205.9999%2013.275%206.1499%2013.425%206.2999C13.5%206.3749%2013.8%206.4499%2013.8%206.2999C13.65%206.0749%2013.5%205.8499%2013.275%205.6249V5.4749C13.2%205.4749%2013.2%205.4749%2013.2%205.3999C13.125%205.3249%2013.125%205.2499%2013.125%205.1749C13.05%205.0249%2013.125%204.8749%2013.05%204.7999C12.975%204.6499%2012.975%204.5749%2012.975%204.4249C12.9%204.0499%2012.825%203.6749%2012.75%203.3749C12.675%202.9249%2012.975%202.6249%2013.2%202.2499C13.35%201.9499%2013.575%201.7249%2013.8%201.4999C13.875%201.1999%2014.025%200.974902%2014.25%200.749902C14.475%200.524902%2014.7%200.374902%2014.925%200.299902C15.15%200.224902%2015.3%200.149902%2015.525%200.0749024L17.4%20-0.225098H18.75L20.1%20-9.76473e-05C20.175%20-9.76473e-05%2020.25%20-9.76324e-05%2020.25%200.0749024C20.325%200.149902%2020.475%200.224902%2020.55%200.224902C20.7%200.299902%2020.85%200.449902%2021%200.599902C21.075%200.674902%2021.15%200.824902%2021.075%200.899902C21%200.974902%2021%201.1999%2020.925%201.1999C20.775%201.2749%2020.625%201.2749%2020.475%201.2749C20.4%201.2749%2020.325%201.2749%2020.175%201.1999C20.55%201.3499%2020.85%201.4999%2021.075%201.7999C21.075%201.8749%2021.225%201.8749%2021.3%201.8749V1.9499C21.225%202.0249%2021.225%202.0249%2021.225%202.0999H21.3C21.375%202.0249%2021.375%201.7999%2021.525%201.8749C21.675%201.9499%2021.675%202.0999%2021.6%202.1749C21.525%202.2499%2021.45%202.3249%2021.3%202.3999V2.5499C21.375%202.6249%2021.375%202.6999%2021.45%202.8499C21.525%202.9999%2021.525%203.2249%2021.6%203.3749C21.675%203.7499%2021.75%204.0499%2021.75%204.4249C21.75%204.5749%2021.675%204.7999%2021.75%204.9499L21.975%205.3999C22.05%205.5499%2022.125%205.6249%2022.2%205.7749C22.35%205.9999%2022.65%206.2249%2022.5%206.5249ZM10.8%2010.4249C10.725%2010.4249%2010.725%2010.4999%2010.725%2010.4999C10.725%2010.4999%2010.8%2010.4999%2010.8%2010.4249ZM10.125%208.9249C10.125%208.9999%2010.2%208.9249%2010.2%208.9249C10.35%208.8499%2010.575%208.9249%2010.65%208.7749C10.575%208.6999%2010.5%208.7749%2010.5%208.6999C10.425%208.6999%2010.35%208.6999%2010.35%208.7749C10.275%208.8499%2010.125%208.8499%2010.125%208.9249Z'%20fill='white'%20/%3e%3cpath%20d='M20.925%204.3501C21%204.3501%2021.15%204.3501%2021.15%204.4251C21.075%204.5751%2020.85%204.6501%2020.7%204.8001H20.625C20.55%204.8751%2020.55%204.9501%2020.55%204.9501H20.325C20.4%205.0251%2020.55%205.1001%2020.7%205.1001L20.775%205.1751H20.925V5.2501C20.85%205.3251%2020.775%205.3251%2020.625%205.3251C20.775%205.4001%2021%205.4001%2021.15%205.3251C21.3%205.2501%2021.15%205.0251%2021.225%204.9501C21.15%204.9501%2021.225%204.8751%2021.15%204.8751C21.225%204.8001%2021.225%204.7251%2021.3%204.7251C21.375%204.7251%2021.375%204.7251%2021.45%204.6501C21.45%204.5751%2021.375%204.5751%2021.375%204.5001C21.525%204.4251%2021.6%204.2751%2021.6%204.1251C21.6%204.0501%2021.375%204.0501%2021.3%203.9751H20.925C20.775%203.9751%2020.7%204.0501%2020.55%204.0501L20.1%204.2751C20.25%204.2001%2020.4%204.2001%2020.625%204.1251C20.625%204.3501%2020.775%204.3501%2020.925%204.3501Z'%20fill='%237C7C7C'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M5.355%2025.5762C6.1866%2025.5762%206.9048%2025.2864%207.4088%2024.8076V23.2704H5.166V21.7458H9.198V25.4502C8.379%2026.5464%207.0056%2027.252%205.355%2027.252C2.4948%2027.252%200.5418%2025.11%200.5418%2022.59C0.5418%2020.07%202.4444%2017.928%205.229%2017.928C6.8292%2017.928%208.1396%2018.6462%208.946%2019.7172L7.5348%2020.8134C7.0308%2020.0952%206.237%2019.6038%205.229%2019.6038C3.5658%2019.6038%202.3814%2020.9016%202.3814%2022.59C2.3814%2024.2784%203.6288%2025.5762%205.355%2025.5762ZM15.2175%2017.928C17.9895%2017.928%2019.8921%2020.07%2019.8921%2022.59C19.8921%2025.11%2017.9895%2027.252%2015.2175%2027.252C12.4329%2027.252%2010.5303%2025.11%2010.5303%2022.59C10.5303%2020.07%2012.4329%2017.928%2015.2175%2017.928ZM15.2175%2025.5762C16.8681%2025.5762%2018.0525%2024.2784%2018.0525%2022.59C18.0525%2020.9016%2016.8681%2019.6038%2015.2175%2019.6038C13.5543%2019.6038%2012.3699%2020.9016%2012.3699%2022.59C12.3699%2024.2784%2013.5543%2025.5762%2015.2175%2025.5762ZM26.8084%2023.6988V18.18H28.5976V23.5476C28.5976%2025.866%2027.2368%2027.252%2025.0192%2027.252C22.8142%2027.252%2021.4534%2025.866%2021.4534%2023.5476V18.18H23.2426V23.6988C23.2426%2024.8832%2023.9104%2025.5762%2025.0318%2025.5762C26.128%2025.5762%2026.8084%2024.8832%2026.8084%2023.6988ZM29.7114%2018.18H31.614L34.2222%2025.0722L36.8304%2018.18H38.733L35.394%2027H33.0504L29.7114%2018.18ZM40.095%2027V18.18H45.2358V19.6668H41.8842V21.7584H44.7318V23.2452H41.8842V25.5132H45.2358V27H40.095ZM47.3149%2027V18.18H50.0113C51.9517%2018.18%2053.1487%2019.1754%2053.1487%2020.8134C53.1487%2021.8844%2052.6321%2022.6782%2051.7249%2023.094L54.4843%2027H52.3801L50.0239%2023.4342H49.1041V27H47.3149ZM50.1121%2019.6668H49.1041V21.9474H50.1121C50.8681%2021.9474%2051.3091%2021.5064%2051.3091%2020.7882C51.3091%2020.1204%2050.8681%2019.6668%2050.1121%2019.6668ZM55.6176%2027V18.18H57.9108L61.8546%2024.5556V18.18H63.6438V27H61.3506L57.4068%2020.6244V27H55.6176ZM66.1105%2027V18.18H71.2513V19.6668H67.8997V21.7584H70.7473V23.2452H67.8997V25.5132H71.2513V27H66.1105ZM73.3304%2027V18.18H75.5606L77.7152%2021.8844L79.8698%2018.18H82.1V27H80.3108V20.6748L78.3452%2023.976H77.0852L75.1196%2020.6748V27H73.3304ZM84.5617%2027V18.18H89.7025V19.6668H86.3509V21.7584H89.1985V23.2452H86.3509V25.5132H89.7025V27H84.5617ZM91.7816%2027V18.18H94.0748L98.0186%2024.5556V18.18H99.8078V27H97.5146L93.5708%2020.6244V27H91.7816ZM101.367%2019.8054V18.18H108.6V19.8054H105.878V27H104.089V19.8054H101.367Z'%20fill='%23161616'%20/%3e%3cg%20clip-path='url(%23clip2_5795_13250)'%3e%3cg%20clip-path='url(%23clip3_5795_13250)'%3e%3cg%20clip-path='url(%23clip4_5795_13250)'%3e%3cg%20clip-path='url(%23clip5_5795_13250)'%3e%3cg%20clip-path='url(%23clip6_5795_13250)'%3e%3cpath%20d='M30.775%2056.45C31.15%2055.5%2030.7%2055.125%2030.15%2055.125C29.225%2055.125%2028.175%2056.75%2028.175%2058.05C28.175%2058.675%2028.475%2059%2028.925%2059C29.45%2059%2030%2058.5%2030.475%2057.625H30.225C29.925%2058%2029.575%2058.275%2029.25%2058.275C28.925%2058.275%2028.75%2058.075%2028.75%2057.625C28.7558%2057.4396%2028.781%2057.2552%2028.825%2057.075L30.775%2056.45ZM29.775%2055.675C30.05%2055.675%2030.275%2055.875%2030.15%2056.325L28.95%2056.65C29.15%2056.1%2029.5%2055.65%2029.8%2055.65L29.775%2055.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M30.15%2054.6999L31.275%2053.6749V53.5249H30.525L29.85%2054.6999H30.175H30.15Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip7_5795_13250)'%3e%3cpath%20d='M25.975%2055.675H26.625L25.575%2058.525C25.5421%2058.576%2025.5242%2058.6352%2025.5232%2058.6959C25.5222%2058.7565%2025.5382%2058.8163%2025.5694%2058.8683C25.6007%2058.9204%2025.6458%2058.9626%2025.6998%2058.9903C25.7538%2059.018%2025.8145%2059.03%2025.875%2059.025C26.625%2059.025%2027.475%2058.375%2027.825%2057.475H27.65C27.3359%2057.9021%2026.8865%2058.2105%2026.375%2058.35L27.3%2055.675H28.3L28.425%2055.275H27.475L27.8%2054.25H27.45L26.775%2055.275L25.975%2055.375V55.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip8_5795_13250)'%3e%3cpath%20d='M25.3%2055.5249C25.375%2055.2749%2025.2%2055.1249%2025.05%2055.1249C24.5%2055.1249%2023.8%2055.6499%2023.55%2056.3749H23.725C23.9026%2056.0881%2024.1778%2055.875%2024.5%2055.7749L23.425%2058.5999C23.4034%2058.6422%2023.3932%2058.6894%2023.3952%2058.7368C23.3973%2058.7843%2023.4116%2058.8304%2023.4368%2058.8707C23.4619%2058.911%2023.4971%2058.9441%2023.5389%2058.9667C23.5806%2058.9893%2023.6275%2059.0008%2023.675%2058.9999C24.225%2058.9999%2024.85%2058.4999%2025.125%2057.7499H24.9C24.7378%2058.0509%2024.471%2058.2821%2024.15%2058.3999L25.3%2055.5249ZM25.4%2054.4499C25.4591%2054.4499%2025.5176%2054.4383%2025.5722%2054.4156C25.6268%2054.393%2025.6764%2054.3599%2025.7182%2054.3181C25.76%2054.2763%2025.7932%2054.2267%2025.8158%2054.1721C25.8384%2054.1175%2025.85%2054.059%2025.85%2053.9999C25.8534%2053.9387%2025.8443%2053.8775%2025.8232%2053.82C25.8021%2053.7625%2025.7695%2053.7099%2025.7274%2053.6654C25.6853%2053.6209%2025.6345%2053.5855%2025.5782%2053.5614C25.5219%2053.5372%2025.4613%2053.5248%2025.4%2053.5249C25.2807%2053.5249%2025.1662%2053.5723%2025.0818%2053.6567C24.9974%2053.7411%2024.95%2053.8556%2024.95%2053.9749C24.95%2054.0943%2024.9974%2054.2087%2025.0818%2054.2931C25.1662%2054.3775%2025.2807%2054.4249%2025.4%2054.4249'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip9_5795_13250)'%3e%3cpath%20d='M20.125%2055.8999C20.3%2055.8999%2020.375%2056.1499%2020.125%2056.7499L19.375%2058.4499C19.2%2058.7749%2019.375%2058.9999%2019.675%2058.9999C19.7577%2059.0148%2019.843%2058.997%2019.9129%2058.9504C19.9828%2058.9038%2020.0319%2058.8319%2020.05%2058.7499L20.8%2056.7499C21.15%2056.3249%2021.8%2055.8749%2022.05%2055.8749C22.3%2055.8749%2022.25%2056.0249%2022.125%2056.2749L20.975%2058.5249C20.9497%2058.5734%2020.9371%2058.6276%2020.9383%2058.6823C20.9395%2058.737%2020.9545%2058.7906%2020.9819%2058.838C21.0094%2058.8854%2021.0483%2058.925%2021.0952%2058.9533C21.142%2058.9816%2021.1953%2058.9976%2021.25%2058.9999C21.825%2058.9999%2022.5%2058.4999%2022.75%2057.7499H22.6C22.4209%2058.051%2022.1355%2058.274%2021.8%2058.3749L22.8%2056.3749C22.9222%2056.1611%2022.9908%2055.9209%2023%2055.6749C23.0079%2055.6007%2022.9991%2055.5257%2022.9742%2055.4554C22.9494%2055.3851%2022.9091%2055.3212%2022.8564%2055.2685C22.8036%2055.2158%2022.7398%2055.1755%2022.6695%2055.1507C22.5991%2055.1258%2022.5242%2055.117%2022.45%2055.1249C21.95%2055.1249%2021.55%2055.6749%2020.95%2056.3749V55.8249C20.95%2055.4749%2020.825%2055.1249%2020.5%2055.1249C20.1%2055.1249%2019.75%2055.7499%2019.475%2056.3499H19.65C19.825%2056.0749%2019.975%2055.8999%2020.15%2055.8999'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip10_5795_13250)'%3e%3cpath%20d='M19.375%2056C19.5%2055.525%2019.425%2055.125%2019.075%2055.125C18.625%2055.125%2018.5%2055.425%2018.075%2056.375V55.825C18.05%2055.45%2017.925%2055.125%2017.575%2055.125C17.2%2055.125%2016.85%2055.75%2016.55%2056.375H16.75C16.925%2056.05%2017.125%2055.875%2017.25%2055.875C17.425%2055.875%2017.5%2056.125%2017.25%2056.725L16.5%2058.425C16.325%2058.75%2016.5%2058.95%2016.8%2058.95C16.8827%2058.9649%2016.968%2058.9472%2017.0379%2058.9006C17.1078%2058.8539%2017.1569%2058.7821%2017.175%2058.7L17.925%2056.7C18.1317%2056.4415%2018.3486%2056.1913%2018.575%2055.95H19.375V56Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip11_5795_13250)'%3e%3cpath%20d='M16.175%2056.45C16.55%2055.5%2016.1%2055.125%2015.55%2055.125C14.625%2055.125%2013.575%2056.75%2013.575%2058.05C13.575%2058.675%2013.875%2059%2014.325%2059C14.85%2059%2015.4%2058.5%2015.875%2057.625H15.625C15.325%2058%2014.975%2058.275%2014.65%2058.275C14.325%2058.275%2014.15%2058.075%2014.15%2057.625C14.1559%2057.4396%2014.181%2057.2552%2014.225%2057.075L16.175%2056.45ZM15.175%2055.675C15.45%2055.675%2015.675%2055.875%2015.55%2056.325L14.35%2056.65C14.55%2056.1%2014.9%2055.65%2015.2%2055.65L15.175%2055.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip12_5795_13250)'%3e%3cpath%20d='M11.35%2055.675H12L10.95%2058.525C10.9171%2058.576%2010.8992%2058.6352%2010.8982%2058.6959C10.8972%2058.7565%2010.9132%2058.8163%2010.9444%2058.8683C10.9757%2058.9204%2011.0208%2058.9626%2011.0748%2058.9903C11.1288%2059.018%2011.1895%2059.03%2011.25%2059.025C12%2059.025%2012.85%2058.375%2013.2%2057.475H13.025C12.7109%2057.9021%2012.2615%2058.2105%2011.75%2058.35L12.675%2055.675H13.675L13.8%2055.275H12.85L13.175%2054.25H12.825L12.15%2055.275L11.35%2055.375V55.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip13_5795_13250)'%3e%3cpath%20d='M9.84996%2058.2252C9.69996%2058.2252%209.59996%2057.9752%209.84996%2057.3752L10.875%2054.9752L10.575%2054.9502L10.25%2055.2752H10.175C8.74996%2055.2752%207.22496%2057.1002%207.22496%2058.5002C7.22137%2058.5701%207.23249%2058.64%207.25761%2058.7053C7.28272%2058.7706%207.32126%2058.8299%207.37075%2058.8794C7.42024%2058.9289%207.47956%2058.9674%207.54488%2058.9926C7.6102%2059.0177%207.68007%2059.0288%207.74996%2059.0252C8.17496%2059.0252%208.57496%2058.4252%209.04996%2057.7752L9.02496%2058.0252C8.94996%2058.6752%209.17496%2059.0252%209.52496%2059.0252C9.89996%2059.0252%2010.275%2058.4252%2010.525%2057.8002H10.35C10.175%2058.0752%209.97496%2058.2502%209.84996%2058.2502V58.2252ZM9.19996%2057.4002C8.87496%2057.8002%208.34996%2058.2752%208.12496%2058.2752C7.99996%2058.2752%207.89996%2058.1502%207.89996%2057.8752C7.89996%2057.0002%208.89996%2055.8252%209.39996%2055.8252C9.51862%2055.822%209.63696%2055.8389%209.74996%2055.8752L9.19996%2057.4002Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip14_5795_13250)'%3e%3cpath%20d='M7.85004%2056C7.97504%2055.525%207.90004%2055.125%207.55004%2055.125C7.10004%2055.125%206.97504%2055.425%206.55004%2056.375V55.825C6.52504%2055.45%206.40004%2055.125%206.05004%2055.125C5.67504%2055.125%205.32504%2055.75%205.02504%2056.375H5.22504C5.40004%2056.05%205.60004%2055.875%205.72504%2055.875C5.90004%2055.875%205.97504%2056.125%205.72504%2056.725L4.97504%2058.425C4.80004%2058.75%204.97504%2058.95%205.27504%2058.95C5.35775%2058.9649%205.443%2058.9472%205.51292%2058.9006C5.58284%2058.8539%205.63198%2058.7821%205.65004%2058.7L6.40004%2056.7C6.60676%2056.4415%206.82359%2056.1913%207.05004%2055.95H7.85004V56Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip15_5795_13250)'%3e%3cpath%20d='M2.79998%2058.8499L2.87498%2058.6249C1.92498%2058.4499%201.79998%2058.4499%202.19998%2057.4249L2.54998%2056.4499H3.29998C3.77498%2056.4499%203.77498%2056.6749%203.69998%2057.1999H3.94998L4.59998%2055.4749H4.34998C4.09998%2055.8749%203.89998%2056.1999%203.39998%2056.1999H2.64998L3.14998%2054.7999C3.34998%2054.2999%203.42498%2054.1999%204.07498%2054.1999H4.24998C4.89998%2054.1999%204.99998%2054.3749%204.99998%2055.0749H5.24998L5.47498%2053.8999H1.82498L1.74998%2054.1249C2.49998%2054.2749%202.57498%2054.3499%202.24998%2055.3249L1.42498%2057.3999C1.04998%2058.3749%200.924976%2058.4499%200.0499756%2058.5999L-0.0250244%2058.8249L2.79998%2058.8499Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip16_5795_13250)'%3e%3cg%20clip-path='url(%23clip17_5795_13250)'%3e%3cpath%20d='M21.925%2048.2C22.3%2047.25%2021.85%2046.875%2021.3%2046.875C20.375%2046.875%2019.325%2048.5%2019.325%2049.8C19.325%2050.425%2019.625%2050.75%2020.075%2050.75C20.6%2050.75%2021.15%2050.25%2021.625%2049.375H21.375C21.075%2049.75%2020.725%2050.025%2020.4%2050.025C20.075%2050.025%2019.9%2049.825%2019.9%2049.375C19.9059%2049.1896%2019.931%2049.0052%2019.975%2048.825L21.925%2048.2ZM20.925%2047.425C21.2%2047.425%2021.425%2047.625%2021.3%2048.075L20.1%2048.4C20.3%2047.85%2020.65%2047.4%2020.95%2047.4L20.925%2047.425Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M21.3%2046.4499L22.425%2045.4249V45.2749H21.675L21%2046.4499H21.325H21.3Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip18_5795_13250)'%3e%3cpath%20d='M17.125%2047.425H17.775L16.725%2050.275C16.6921%2050.326%2016.6742%2050.3852%2016.6732%2050.4459C16.6722%2050.5065%2016.6882%2050.5663%2016.7195%2050.6183C16.7507%2050.6704%2016.7959%2050.7126%2016.8499%2050.7403C16.9039%2050.768%2016.9645%2050.78%2017.025%2050.775C17.775%2050.775%2018.625%2050.125%2018.975%2049.225H18.8C18.4859%2049.6521%2018.0365%2049.9605%2017.525%2050.1L18.45%2047.425H19.45L19.575%2047.025H18.625L18.95%2046H18.6L17.925%2047.025L17.125%2047.125V47.425Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip19_5795_13250)'%3e%3cpath%20d='M16.45%2047.25C16.525%2047%2016.35%2046.85%2016.2%2046.85C15.65%2046.85%2014.95%2047.375%2014.7%2048.1H14.875C15.0526%2047.8132%2015.3278%2047.6001%2015.65%2047.5L14.575%2050.325C14.5534%2050.3673%2014.5431%2050.4145%2014.5452%2050.4619C14.5472%2050.5094%2014.5615%2050.5555%2014.5867%2050.5958C14.6119%2050.6361%2014.6471%2050.6692%2014.6888%2050.6918C14.7306%2050.7144%2014.7775%2050.7259%2014.825%2050.725C15.375%2050.725%2016%2050.225%2016.275%2049.475H16.05C15.8878%2049.776%2015.621%2050.0072%2015.3%2050.125L16.45%2047.25ZM16.55%2046.175C16.6091%2046.175%2016.6676%2046.1634%2016.7222%2046.1407C16.7768%2046.1181%2016.8264%2046.085%2016.8682%2046.0432C16.91%2046.0014%2016.9431%2045.9518%2016.9657%2045.8972C16.9884%2045.8426%2017%2045.7841%2017%2045.725C17.0034%2045.6638%2016.9943%2045.6026%2016.9732%2045.5451C16.9521%2045.4876%2016.9195%2045.435%2016.8774%2045.3905C16.8352%2045.346%2016.7845%2045.3106%2016.7282%2045.2865C16.6719%2045.2623%2016.6113%2045.2499%2016.55%2045.25C16.4306%2045.25%2016.3162%2045.2974%2016.2318%2045.3818C16.1474%2045.4662%2016.1%2045.5807%2016.1%2045.7C16.1%2045.8193%2016.1474%2045.9338%2016.2318%2046.0182C16.3162%2046.1026%2016.4306%2046.15%2016.55%2046.15'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip20_5795_13250)'%3e%3cpath%20d='M13.075%2050.1249L14.875%2045.3499L14.8%2045.2749L13.55%2045.4249V45.5749L13.8%2045.7499C14.025%2045.9249%2013.95%2046.0749%2013.75%2046.5999L12.4%2050.2499C12.3685%2050.2991%2012.3509%2050.3559%2012.349%2050.4142C12.3471%2050.4726%2012.3609%2050.5304%2012.389%2050.5815C12.4172%2050.6327%2012.4586%2050.6753%2012.5089%2050.705C12.5592%2050.7346%2012.6166%2050.7501%2012.675%2050.7499C13.25%2050.7499%2013.85%2050.2249%2014.125%2049.4999H13.95C13.7377%2049.8015%2013.4291%2050.0219%2013.075%2050.1249Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip21_5795_13250)'%3e%3cpath%20d='M11.35%2049.9752C11.2%2049.9752%2011.1%2049.7252%2011.35%2049.1252L12.375%2046.7252L12.075%2046.7002L11.75%2047.0252H11.675C10.25%2047.0252%208.72496%2048.8502%208.72496%2050.2502C8.72137%2050.3201%208.73249%2050.39%208.75761%2050.4553C8.78272%2050.5206%208.82126%2050.5799%208.87075%2050.6294C8.92024%2050.6789%208.97956%2050.7174%209.04488%2050.7426C9.1102%2050.7677%209.18007%2050.7788%209.24996%2050.7752C9.67496%2050.7752%2010.075%2050.1752%2010.55%2049.5252L10.525%2049.7752C10.45%2050.4252%2010.675%2050.7752%2011.025%2050.7752C11.4%2050.7752%2011.775%2050.1752%2012.025%2049.5502H11.85C11.675%2049.8252%2011.475%2050.0002%2011.35%2050.0002V49.9752ZM10.7%2049.1502C10.375%2049.5502%209.84996%2050.0252%209.62496%2050.0252C9.49996%2050.0252%209.39996%2049.9002%209.39996%2049.6252C9.39996%2048.7502%2010.4%2047.5752%2010.9%2047.5752C11.0186%2047.572%2011.137%2047.5889%2011.25%2047.6252L10.7%2049.1502Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip22_5795_13250)'%3e%3cpath%20d='M9.15%2047.0002H8.075C7.91845%2046.8999%207.73591%2046.8477%207.55%2046.8502C7.11669%2046.8501%206.70075%2047.0205%206.39202%2047.3246C6.0833%2047.6286%205.90657%2048.0419%205.9%2048.4752C5.88969%2048.5836%205.90095%2048.693%205.93314%2048.797C5.96532%2048.9011%206.01779%2048.9977%206.08751%2049.0814C6.15724%2049.1651%206.24284%2049.2341%206.33938%2049.2845C6.43592%2049.335%206.54149%2049.3658%206.65%2049.3752C6.175%2049.5752%205.9%2049.8252%205.9%2050.1002C5.9%2050.1772%205.92093%2050.2528%205.96057%2050.3188C6.0002%2050.3849%206.05703%2050.4389%206.125%2050.4752C5.05%2050.8002%204.625%2051.1752%204.625%2051.6502C4.625%2052.1502%205.275%2052.3502%206.025%2052.3502C7.35%2052.3502%208.425%2051.6752%208.425%2051.0752C8.425%2050.6252%208.025%2050.4502%207.35%2050.2502C6.8%2050.0752%206.55%2050.0502%206.55%2049.8502C6.56644%2049.752%206.60704%2049.6595%206.66814%2049.581C6.72924%2049.5024%206.80892%2049.4403%206.9%2049.4002C7.31131%2049.369%207.69601%2049.1848%207.97828%2048.884C8.26056%2048.5832%208.41993%2048.1876%208.425%2047.7752C8.42962%2047.6483%208.41272%2047.5215%208.375%2047.4002H9L9.15%2047.0002ZM7.1%2050.9002C7.625%2051.0752%207.85%2051.1502%207.85%2051.3002C7.85%2051.6502%207.35%2051.9252%206.45%2051.9252C5.775%2051.9252%205.45%2051.7752%205.45%2051.4252C5.45%2051.0502%205.8%2050.8002%206.325%2050.6002C6.56712%2050.7189%206.81783%2050.8191%207.075%2050.9002H7.1ZM6.9%2049.1002C6.65%2049.1002%206.575%2048.9002%206.575%2048.6752C6.575%2047.9752%206.925%2047.1252%207.45%2047.1252C7.7%2047.1252%207.775%2047.3252%207.775%2047.5252C7.775%2048.2502%207.425%2049.1002%206.9%2049.1002Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip23_5795_13250)'%3e%3cpath%20d='M3.575%2048.2252C4.05%2048.2252%204.075%2048.4252%203.975%2048.9252H4.25L4.875%2047.2252H4.625C4.375%2047.6252%204.2%2047.9502%203.675%2047.9502H2.65L3.15%2046.5502C3.325%2046.0502%203.4%2045.9502%204.075%2045.9502H4.5C5.15%2045.9502%205.25%2046.1252%205.25%2046.8252H5.5L5.725%2045.6502H1.825L1.75%2045.8752C2.5%2046.0252%202.575%2046.1002%202.25%2047.0752L1.45%2049.1752C1.075%2050.1502%200.95%2050.2252%200.05%2050.3752L0%2050.6252H4.35L5.15%2049.3752H4.85C4.35%2049.8752%203.85%2050.3252%202.85%2050.3252C1.675%2050.3252%201.775%2050.2502%202.175%2049.1752L2.525%2048.2252H3.575ZM4.15%2045.2752L5.25%2044.4752V44.3252H4.5L3.85%2045.3002H4.15V45.2752Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip24_5795_13250)'%3e%3cg%20clip-path='url(%23clip25_5795_13250)'%3e%3cpath%20d='M21.8%2039.95C22.175%2039%2021.725%2038.625%2021.175%2038.625C20.25%2038.625%2019.2%2040.25%2019.2%2041.55C19.2%2042.175%2019.5%2042.5%2019.95%2042.5C20.475%2042.5%2021.025%2042%2021.5%2041.125H21.25C20.95%2041.5%2020.6%2041.775%2020.275%2041.775C19.95%2041.775%2019.775%2041.575%2019.775%2041.125C19.7809%2040.9396%2019.806%2040.7552%2019.85%2040.575L21.8%2039.95ZM20.8%2039.175C21.075%2039.175%2021.3%2039.375%2021.175%2039.825L19.975%2040.15C20.175%2039.6%2020.525%2039.15%2020.825%2039.15L20.8%2039.175Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M21.175%2038.1999L22.3%2037.1749V37.0249H21.55L20.875%2038.1999H21.2H21.175Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip26_5795_13250)'%3e%3cpath%20d='M16.975%2039.1501H17.625L16.575%2042.0001C16.5421%2042.0511%2016.5242%2042.1103%2016.5232%2042.171C16.5222%2042.2316%2016.5382%2042.2914%2016.5694%2042.3434C16.6007%2042.3955%2016.6458%2042.4377%2016.6998%2042.4654C16.7538%2042.4931%2016.8145%2042.5051%2016.875%2042.5001C17.625%2042.5001%2018.475%2041.8501%2018.825%2040.9501H18.65C18.3359%2041.3772%2017.8865%2041.6856%2017.375%2041.8251L18.3%2039.1501H19.3L19.425%2038.7501H18.475L18.8%2037.7251H18.45L17.775%2038.7501L16.975%2038.8501V39.1501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip27_5795_13250)'%3e%3cpath%20d='M16.65%2039.5C16.775%2039.025%2016.7%2038.625%2016.35%2038.625C15.9%2038.625%2015.775%2038.925%2015.35%2039.875V39.325C15.325%2038.95%2015.2%2038.625%2014.85%2038.625C14.475%2038.625%2014.125%2039.25%2013.825%2039.875H14.025C14.2%2039.55%2014.4%2039.375%2014.525%2039.375C14.7%2039.375%2014.775%2039.625%2014.525%2040.225L13.775%2041.925C13.6%2042.25%2013.775%2042.45%2014.075%2042.45C14.1577%2042.4649%2014.243%2042.4472%2014.3129%2042.4006C14.3828%2042.3539%2014.432%2042.2821%2014.45%2042.2L15.2%2040.2C15.4067%2039.9415%2015.6236%2039.6913%2015.85%2039.45H16.65V39.5Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip28_5795_13250)'%3e%3cpath%20d='M13.45%2039.9251C13.825%2038.9751%2013.375%2038.6001%2012.825%2038.6001C11.9%2038.6001%2010.85%2040.2251%2010.85%2041.5251C10.85%2042.1501%2011.15%2042.4751%2011.6%2042.4751C12.125%2042.4751%2012.675%2041.9751%2013.15%2041.1001H12.9C12.6%2041.4751%2012.25%2041.7501%2011.925%2041.7501C11.6%2041.7501%2011.425%2041.5501%2011.425%2041.1001C11.4308%2040.9147%2011.456%2040.7303%2011.5%2040.5501L13.45%2039.9251ZM12.45%2039.1501C12.725%2039.1501%2012.95%2039.3501%2012.825%2039.8001L11.625%2040.1251C11.825%2039.5751%2012.175%2039.1251%2012.475%2039.1251L12.45%2039.1501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip29_5795_13250)'%3e%3cpath%20d='M10.2%2038.6249C9.69998%2038.6249%209.19998%2039.1749%208.74998%2039.8249L9.74998%2037.0999L9.69998%2037.0249L8.44998%2037.1749V37.2749L8.69998%2037.4749C8.92498%2037.6499%208.84998%2037.7999%208.64998%2038.3249L7.54998%2041.2249C7.46796%2041.4023%207.40106%2041.5863%207.34998%2041.7749C7.34998%2042.1249%207.79998%2042.4499%208.22498%2042.4499C9.17498%2042.4499%2010.725%2040.7249%2010.725%2039.3999C10.725%2038.8249%2010.6%2038.5999%2010.2%2038.5999V38.6249ZM8.54998%2041.8999C8.34998%2041.8999%208.07498%2041.7249%208.07498%2041.5749C8.12768%2041.3868%208.19454%2041.2029%208.27498%2041.0249L8.59998%2040.1999C8.92498%2039.7749%209.44998%2039.3499%209.74998%2039.3499C9.92498%2039.3499%2010.05%2039.4499%2010.05%2039.7249C10.05%2040.4999%209.32498%2041.8999%208.54998%2041.8999Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip30_5795_13250)'%3e%3cpath%20d='M7.05003%2039C7.12503%2038.75%206.95003%2038.6%206.80003%2038.6C6.25003%2038.6%205.55003%2039.125%205.30003%2039.85H5.47503C5.65263%2039.5632%205.92784%2039.3501%206.25003%2039.25L5.17503%2042.075C5.15343%2042.1173%205.14316%2042.1645%205.14522%2042.2119C5.14727%2042.2594%205.16158%2042.3055%205.18676%2042.3458C5.21193%2042.3861%205.24711%2042.4192%205.28887%2042.4418C5.33063%2042.4644%205.37754%2042.4759%205.42503%2042.475C5.97503%2042.475%206.60003%2041.975%206.87503%2041.225H6.65003C6.4878%2041.526%206.22102%2041.7572%205.90003%2041.875L7.05003%2039ZM7.15003%2037.925C7.20913%2037.925%207.26764%2037.9134%207.32224%2037.8907C7.37684%2037.8681%207.42645%2037.835%207.46823%2037.7932C7.51002%2037.7514%207.54316%2037.7018%207.56578%2037.6472C7.58839%2037.5926%207.60003%2037.5341%207.60003%2037.475C7.60344%2037.4138%207.59432%2037.3526%207.57323%2037.2951C7.55214%2037.2376%207.51954%2037.185%207.47741%2037.1405C7.43528%2037.096%207.38451%2037.0606%207.32822%2037.0365C7.27193%2037.0123%207.21129%2036.9999%207.15003%2037C7.03069%2037%206.91623%2037.0474%206.83184%2037.1318C6.74744%2037.2162%206.70003%2037.3307%206.70003%2037.45C6.70003%2037.5693%206.74744%2037.6838%206.83184%2037.7682C6.91623%2037.8526%207.03069%2037.9%207.15003%2037.9'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip31_5795_13250)'%3e%3cpath%20d='M4.4%2037.3501H1.825L1.75%2037.5751C2.5%2037.7251%202.575%2037.8001%202.25%2038.7751L1.45%2040.9001C1.075%2041.8751%200.95%2041.9501%200.075%2042.1001L0%2042.3501H3.925L4.8%2040.8501H4.5C4%2041.3501%203.45%2042.0501%202.575%2042.0501C1.9%2042.0501%201.825%2041.9251%202.175%2040.9251L2.95%2038.8001C3.3%2037.8251%203.45%2037.7501%204.325%2037.6001L4.4%2037.3501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_5795_13250'%20x1='0'%20y1='6'%20x2='33'%20y2='6'%20gradientUnits='userSpaceOnUse'%20%3e%3cstop%20stop-color='%23000091'%20/%3e%3cstop%20offset='0.5'%20stop-color='%23000091'%20/%3e%3cstop%20offset='0.5'%20stop-color='%23E1000F'%20/%3e%3cstop%20offset='1'%20stop-color='%23E1000F'%20/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_5795_13250'%3e%3crect%20width='33'%20height='12'%20fill='white'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_5795_13250'%3e%3crect%20width='33'%20height='13.5'%20fill='white'%20transform='translate(0%20-0.75)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_5795_13250'%3e%3crect%20width='108.88'%20height='26.5'%20fill='white'%20transform='translate(0%2033)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_5795_13250'%3e%3crect%20width='63'%20height='45'%20fill='white'%20transform='translate(0%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip4_5795_13250'%3e%3crect%20width='31.5'%20height='22.5'%20fill='white'%20transform='translate(0%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip5_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(28.175%2053.5249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip6_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(28.175%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip7_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(25.55%2054.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip8_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(23.4%2053.5249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip9_5795_13250'%3e%3crect%20width='3.7'%20height='3.875'%20fill='white'%20transform='translate(19.3%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip10_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(16.425%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip11_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(13.575%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip12_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(10.925%2054.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip13_5795_13250'%3e%3crect%20width='3.675'%20height='4.05'%20fill='white'%20transform='translate(7.22498%2054.9502)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip14_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(4.90002%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip15_5795_13250'%3e%3crect%20width='5.475'%20height='4.95'%20fill='white'%20transform='translate(0%2053.8999)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip16_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(19.325%2045.2749)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip17_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(19.325%2046.875)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip18_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(16.7%2046)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip19_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(14.55%2045.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip20_5795_13250'%3e%3crect%20width='2.525'%20height='5.475'%20fill='white'%20transform='translate(12.35%2045.2749)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip21_5795_13250'%3e%3crect%20width='3.675'%20height='4.05'%20fill='white'%20transform='translate(8.72498%2046.7002)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip22_5795_13250'%3e%3crect%20width='4.5'%20height='5.5'%20fill='white'%20transform='translate(4.65002%2046.8501)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip23_5795_13250'%3e%3crect%20width='5.75'%20height='6.275'%20fill='white'%20transform='translate(0%2044.3252)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip24_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(19.2%2037.0249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip25_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(19.2%2038.625)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip26_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(16.55%2037.7251)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip27_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(13.7%2038.625)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip28_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(10.85%2038.6001)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip29_5795_13250'%3e%3crect%20width='3.4'%20height='5.45'%20fill='white'%20transform='translate(7.34998%2037.0249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip30_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(5.15002%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip31_5795_13250'%3e%3crect%20width='4.8'%20height='4.975'%20fill='white'%20transform='translate(0%2037.3501)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",_g=()=>{const{t}=ae.useCunningham();return y.jsxs("footer",{className:"c__footer",children:[y.jsx("div",{className:"c__footer__stripe"}),y.jsxs("div",{className:"c__footer__content",children:[y.jsxs("div",{className:"c__footer__content__top",children:[y.jsx("div",{children:y.jsx("div",{className:"c__footer__content__top__logo",children:y.jsx("img",{className:"c__footer__logo",alt:"",width:"0",height:"0",decoding:"async","data-nimg":"1",src:Pg})})}),y.jsx("div",{className:"c__footer__content__top__links",children:[{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr/"},{label:"info.gouv.fr",href:"https://info.gouv.fr/"},{label:"service-public.fr",href:"https://service-public.fr/"},{label:"data.gouv.fr",href:"https://data.gouv.fr/"}].map(({label:e,href:n})=>y.jsxs("a",{href:n,target:"_blank",children:[y.jsx("span",{children:e}),y.jsx("img",{alt:"",width:"18",decoding:"async","data-nimg":"1",src:Za})]},e))})]}),y.jsx("div",{className:"c__footer__content__middle",children:[{label:t("components.footer.links.legal"),href:"/legal-notice"},{label:t("components.footer.links.personal_data"),href:"/personal-data-cookies"},{label:t("components.footer.links.accessibility"),href:"/accessibility"}].map(({label:e,href:n})=>y.jsx("a",{href:n,children:y.jsx("span",{children:e})},e))}),y.jsxs("p",{className:"c__footer__content__mention",children:[t("components.footer.mention")," ",y.jsxs("a",{href:"https://github.com/etalab/licence-ouverte/blob/master/LO.md",target:"__blank",children:[y.jsx("span",{children:t("components.footer.license")}),y.jsx("img",{alt:"",width:"18",decoding:"async","data-nimg":"1",src:Za})]})]})]})]})},Dg=({logo:t,mainButton:e,banner:n,title:r,subtitle:i})=>y.jsx("div",{className:"c__hero",children:y.jsxs("div",{className:"c__hero__display",children:[y.jsxs("div",{className:"c__hero__display__captions",children:[t,y.jsx("h2",{children:r}),y.jsx("span",{children:i}),e||y.jsx(Du,{})]}),y.jsx("img",{src:n,alt:""})]})}),Og=({children:t})=>y.jsx("div",{className:"c__home-gutter",children:t}),dd=(t,e,n=void 0)=>{const r=Array.isArray(e)?e:e.replace(/(\[(\d)\])/g,".$2").replace(/^\./,"").split(".");if(!r.length||r[0]===void 0)return t;const i=r[0];return typeof t!="object"||t===null||!(i in t)||t[i]===void 0?n:dd(t[i],r.slice(1),n)},Ig={placeholder:"Entrez votre adresse e-mail",srLabel:"Adresse e-mail",submit:"Suivant",title:"Connexion avec {linebreak}votre adresse e-mail"},kg={homepageLinkTitle:{withoutService:"Retour à l'accueil",withService:"Retour à l'accueil - {serviceName}"},license:"Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous {license}",licenseEtalab:"licence etalab-2.0",links:{a11y:{perfect:"Accessibilité : conforme",partial:"Accessibilité : partiellement conforme",bad:"Accessibilité : non conforme"},privacy:"Données personnelles",sitemap:"Plan du site",terms:"Mentions légales"}},Ng={label:"Les services de La Suite numérique"},Rg={homepageLinkTitle:"Accueil - {serviceName}"},Lg={newWindow:"{title} - nouvelle fenêtre"},Mg={help:"Qu'est-ce que ProConnect ?",loginWith:"S’identifier avec",loginWithProconnect:"{loginWith} {proconnect}",or:"ou",title:"Connexion avec ProConnect"},fd={email:Ig,footer:kg,gaufre:Ng,header:Rg,links:Lg,proconnect:Mg},Ag=d.createContext(fd);function Kg(){const t=d.useContext(Ag)||fd;return{t:function(e,n={}){const r=dd(t,e);if(!r)return console.warn(`Translation for key "${e}" not found`),e;if(n){const i=[];if(Object.keys(n).forEach(s=>{typeof n[s]!="string"&&i.push(s)}),!i.length)return r.replace(/{(\w+)}/g,(s,a)=>n[a]);const o=r.split(/{(.*?)}/);return y.jsx(y.Fragment,{children:o.map((s,a)=>s in n?y.jsx(d.Fragment,{children:n[s]},a):s)})}return r}}}const Fg={responsive:"lasuite-gaufre-btn--responsive",small:"lasuite-gaufre-btn--small"},jg=({variant:t})=>{const{t:e}=Kg(),n=t?Fg[t]:"";return y.jsx("button",{type:"button",className:`lasuite-gaufre-btn ${n} lasuite-gaufre-btn--vanilla js-lasuite-gaufre-btn`,title:e("gaufre.label"),children:e("gaufre.label")})},Hg=()=>y.jsxs(y.Fragment,{children:[y.jsx("script",{src:"https://integration.lasuite.numerique.gouv.fr/api/v1/gaufre.js",id:"lasuite-gaufre-script",async:!0,defer:!0}),y.jsx(jg,{variant:"small"})]}),hd=({languages:t})=>{const{isOpen:e,setIsOpen:n}=Sn();return y.jsx(lr,{options:t,isOpen:e,onOpenChange:n,children:y.jsxs(ae.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[y.jsx("span",{className:"material-icons",children:"translate"}),y.jsx("span",{className:"c__language-picker__label",children:"Français"}),y.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},pd=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=ae.useCunningham();return y.jsxs("div",{className:"c__header",children:[y.jsx("div",{className:"c__header__toggle-menu",children:y.jsx(ae.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:y.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),y.jsx("div",{className:"c__header__left",children:t}),y.jsxs("div",{className:"c__header__right",children:[n&&y.jsx("div",{className:"c__header__right__language-picker",children:y.jsx(hd,{languages:n})}),e]})]})},Wo={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","blue-500":"#417DC4","brown-500":"#BD987A","cyan-500":"#009099","gold-500":"#C3992A","green-500":"#00A95F","olive-500":"#68A532","orange-500":"#E4794A","purple-500":"#A558A0","red-500":"#E1000F","yellow-500":"#B7A73F","rose-500":"#E18B76"},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"}},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"}}}}},_n=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(Wo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(Wo.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,s=t<=r,a=t>r;return{isMobile:o,isTablet:s,isDesktop:a}},gd=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=_n();return n?y.jsx("div",{className:"c__left-panel",children:t}):y.jsx("div",{className:Ve("c__left-panel__mobile",{open:e}),children:t})},{createElement:Cn,createContext:zg,createRef:u7,forwardRef:vd,useCallback:$e,useContext:md,useEffect:_t,useImperativeHandle:yd,useLayoutEffect:Bg,useMemo:Vg,useRef:Te,useState:pn}=T,Xa=T[`useId${Math.random()}`.slice(0,5)],Wg=Bg,bi=zg(null);bi.displayName="PanelGroupContext";const Dt=Wg,Ug=typeof Xa=="function"?Xa:()=>null;let Gg=0;function Ds(t=null){const e=Ug(),n=Te(t||e||null);return n.current===null&&(n.current=""+Gg++),t??n.current}function bd({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:s,maxSize:a,minSize:l,onCollapse:u,onExpand:c,onResize:f,order:p,style:g,tagName:b="div",...h}){const m=md(bi);if(m===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:C,getPanelSize:w,getPanelStyle:P,groupId:x,isPanelCollapsed:D,reevaluatePanelConstraints:_,registerPanel:S,resizePanel:R,unregisterPanel:F}=m,N=Ds(s),H=Te({callbacks:{onCollapse:u,onExpand:c,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:a,minSize:l},id:N,idIsFromProps:s!==void 0,order:p});Te({didLogMissingDefaultSizeWarning:!1}),Dt(()=>{const{callbacks:O,constraints:z}=H.current,G={...z};H.current.id=N,H.current.idIsFromProps=s!==void 0,H.current.order=p,O.onCollapse=u,O.onExpand=c,O.onResize=f,z.collapsedSize=n,z.collapsible=r,z.defaultSize=i,z.maxSize=a,z.minSize=l,(G.collapsedSize!==z.collapsedSize||G.collapsible!==z.collapsible||G.maxSize!==z.maxSize||G.minSize!==z.minSize)&&_(H.current,G)}),Dt(()=>{const O=H.current;return S(O),()=>{F(O)}},[p,N,S,F]),yd(o,()=>({collapse:()=>{v(H.current)},expand:O=>{C(H.current,O)},getId(){return N},getSize(){return w(H.current)},isCollapsed(){return D(H.current)},isExpanded(){return!D(H.current)},resize:O=>{R(H.current,O)}}),[v,C,w,D,N,R]);const E=P(H.current,i);return Cn(b,{...h,children:t,className:e,id:s,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 Uo=vd((t,e)=>Cn(bd,{...t,forwardedRef:e}));bd.displayName="Panel";Uo.displayName="forwardRef(Panel)";let Go=null,Pt=null;function qg(t,e){if(e){const n=(e&xd)!==0,r=(e&$d)!==0,i=(e&Td)!==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 Yg(){Pt!==null&&(document.head.removeChild(Pt),Go=null,Pt=null)}function Xi(t,e){const n=qg(t,e);Go!==n&&(Go=n,Pt===null&&(Pt=document.createElement("style"),document.head.appendChild(Pt)),Pt.innerHTML=`*{cursor: ${n}!important;}`)}function Sd(t){return t.type==="keydown"}function Cd(t){return t.type.startsWith("pointer")}function wd(t){return t.type.startsWith("mouse")}function Si(t){if(Cd(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(wd(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Zg(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Xg(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 Jg(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:el(t),b:el(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:Qa(Ja(n.a)),b:Qa(Ja(n.b))};if(i.a===i.b){const o=r.childNodes,s={a:n.a.at(-1),b:n.b.at(-1)};let a=o.length;for(;a--;){const l=o[a];if(l===s.a)return 1;if(l===s.b)return-1}}return Math.sign(i.a-i.b)}const Qg=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function e5(t){var e;const n=getComputedStyle((e=Ed(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function t5(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||e5(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"||Qg.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ja(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),t5(n))return n}return null}function Qa(t){return t&&Number(getComputedStyle(t).zIndex)||0}function el(t){const e=[];for(;t;)e.push(t),t=Ed(t);return e}function Ed(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const xd=1,$d=2,Td=4,Pd=8,n5=Zg()==="coarse";let Be=[],gn=!1,gt=new Map,Ci=new Map;const Jn=new Set;function r5(t,e,n,r,i){var o;const{ownerDocument:s}=e,a={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=gt.get(s))!==null&&o!==void 0?o:0;return gt.set(s,l+1),Jn.add(a),ri(),function(){var c;Ci.delete(t),Jn.delete(a);const f=(c=gt.get(s))!==null&&c!==void 0?c:1;if(gt.set(s,f-1),ri(),f===1&&gt.delete(s),Be.includes(a)){const p=Be.indexOf(a);p>=0&&Be.splice(p,1),Is(),i("up",!0,null)}}}function tl(t){const{target:e}=t,{x:n,y:r}=Si(t);gn=!0,Os({target:e,x:n,y:r}),ri(),Be.length>0&&(ii("down",t),t.preventDefault(),t.stopPropagation())}function Ln(t){const{x:e,y:n}=Si(t);if(gn&&t.buttons===0&&(gn=!1,ii("up",t)),!gn){const{target:r}=t;Os({target:r,x:e,y:n})}ii("move",t),Is(),Be.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=Si(t);Ci.clear(),gn=!1,Be.length>0&&t.preventDefault(),ii("up",t),Os({target:e,x:n,y:r}),Is(),ri()}function Os({target:t,x:e,y:n}){Be.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Jn.forEach(i=>{const{element:o,hitAreaMargins:s}=i,a=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:f}=a,p=n5?s.coarse:s.fine;if(e>=u-p&&e<=c+p&&n>=f-p&&n<=l+p){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Jg(r,o)>0){let b=r,h=!1;for(;b&&!b.contains(o);){if(Xg(b.getBoundingClientRect(),a)){h=!0;break}b=b.parentElement}if(h)return}Be.push(i)}})}function Ji(t,e){Ci.set(t,e)}function Is(){let t=!1,e=!1;Be.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;Ci.forEach(r=>{n|=r}),t&&e?Xi("intersection",n):t?Xi("horizontal",n):e?Xi("vertical",n):Yg()}function ri(){gt.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",tl),n.removeEventListener("pointerleave",Ln),n.removeEventListener("pointermove",Ln)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Jn.size>0&&(gn?(Be.length>0&&gt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",Ln),n.addEventListener("pointermove",Ln))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):gt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",tl,{capture:!0}),n.addEventListener("pointermove",Ln))}))}function ii(t,e){Jn.forEach(n=>{const{setResizeHandlerState:r}=n,i=Be.includes(n);r(t,i,e)})}function i5(){const[t,e]=pn(0);return $e(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const ks=10;function Lt(t,e,n=ks){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function it(t,e,n=ks){return Lt(t,e,n)===0}function Pe(t,e,n){return Lt(t,e,n)===0}function o5(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(!Pe(i,o,n))return!1}return!0}function dn({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:s=100,minSize:a=0}=r;if(Lt(n,a)<0)if(o){const l=(i+a)/2;Lt(n,l)<0?n=i:n=a}else n=a;return n=Math.min(s,n),n=parseFloat(n.toFixed(ks)),n}function Hn({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Pe(t,0))return e;const s=[...e],[a,l]=r;ee(a!=null,"Invalid first pivot index"),ee(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const f=t<0?l:a,p=n[f];ee(p,`Panel constraints not found for index ${f}`);const{collapsedSize:g=0,collapsible:b,minSize:h=0}=p;if(b){const m=e[f];if(ee(m!=null,`Previous layout not found for panel index ${f}`),Pe(m,g)){const v=h-m;Lt(v,Math.abs(t))>0&&(t=t<0?0-v:v)}}}{const f=t<0?a:l,p=n[f];ee(p,`No panel constraints found for index ${f}`);const{collapsedSize:g=0,collapsible:b,minSize:h=0}=p;if(b){const m=e[f];if(ee(m!=null,`Previous layout not found for panel index ${f}`),Pe(m,h)){const v=m-g;Lt(v,Math.abs(t))>0&&(t=t<0?0-v:v)}}}}{const f=t<0?1:-1;let p=t<0?l:a,g=0;for(;;){const h=e[p];ee(h!=null,`Previous layout not found for panel index ${p}`);const v=dn({panelConstraints:n,panelIndex:p,size:100})-h;if(g+=v,p+=f,p<0||p>=n.length)break}const b=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-b:b}{let p=t<0?a:l;for(;p>=0&&p<n.length;){const g=Math.abs(t)-Math.abs(u),b=e[p];ee(b!=null,`Previous layout not found for panel index ${p}`);const h=b-g,m=dn({panelConstraints:n,panelIndex:p,size:h});if(!Pe(b,m)&&(u+=b-m,s[p]=m,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?p--:p++}}if(o5(i,s))return i;{const f=t<0?l:a,p=e[f];ee(p!=null,`Previous layout not found for panel index ${f}`);const g=p+u,b=dn({panelConstraints:n,panelIndex:f,size:g});if(s[f]=b,!Pe(b,g)){let h=g-b,v=t<0?l:a;for(;v>=0&&v<n.length;){const C=s[v];ee(C!=null,`Previous layout not found for panel index ${v}`);const w=C+h,P=dn({panelConstraints:n,panelIndex:v,size:w});if(Pe(C,P)||(h-=P-C,s[v]=P),Pe(h,0))break;t>0?v--:v++}}}const c=s.reduce((f,p)=>p+f,0);return Pe(c,100)?s:i}function s5({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,s=0;const a=n[0];ee(a!=null,"No pivot index found"),e.forEach((f,p)=>{const{constraints:g}=f,{maxSize:b=100,minSize:h=0}=g;p===a?(r=h,i=b):(o+=h,s+=b)});const l=Math.min(i,100-o),u=Math.max(r,100-s),c=t[a];return{valueMax:l,valueMin:u,valueNow:c}}function Qn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function _d(t,e,n=document){const i=Qn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function Dd(t,e,n){const r=_d(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Od(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 wi(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function a5(t,e,n,r=document){var i,o,s,a;const l=wi(e,r),u=Qn(t,r),c=l?u.indexOf(l):-1,f=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,p=(s=(a=n[c+1])===null||a===void 0?void 0:a.id)!==null&&s!==void 0?s:null;return[f,p]}function l5({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:s}){Te({didWarnAboutMissingResizeHandle:!1}),Dt(()=>{if(!o)return;const a=Qn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:f}=s5({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),p=a[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",f!=null?""+Math.round(f):"")}}return()=>{a.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),_t(()=>{if(!o)return;const a=e.current;ee(a,"Eager values not found");const{panelDataArray:l}=a,u=Od(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Qn(n,o);ee(c,`No resize handles found for group id "${n}"`);const f=c.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");ee(g,"Resize handle element has no handle id attribute");const[b,h]=a5(n,g,l,o);if(b==null||h==null)return()=>{};const m=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const C=l.findIndex(w=>w.id===b);if(C>=0){const w=l[C];ee(w,`No panel data found for index ${C}`);const P=r[C],{collapsedSize:x=0,collapsible:D,minSize:_=0}=w.constraints;if(P!=null&&D){const S=Hn({delta:Pe(P,x)?_-x:x-P,initialLayout:r,panelConstraints:l.map(R=>R.constraints),pivotIndices:Dd(n,g,o),prevLayout:r,trigger:"keyboard"});r!==S&&s(S)}}break}}};return p.addEventListener("keydown",m),()=>{p.removeEventListener("keydown",m)}});return()=>{f.forEach(p=>p())}},[o,t,e,n,r,i,s])}function nl(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 Id(t,e){const n=t==="horizontal",{x:r,y:i}=Si(e);return n?r:i}function u5(t,e,n,r,i){const o=n==="horizontal",s=wi(e,i);ee(s,`No resize handle element found for id "${e}"`);const a=s.getAttribute("data-panel-group-id");ee(a,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Id(n,t),c=Od(a,i);ee(c,`No group element found for id "${a}"`);const f=c.getBoundingClientRect(),p=o?f.width:f.height;return(u-l)/p*100}function c5(t,e,n,r,i,o){if(Sd(t)){const s=n==="horizontal";let a=0;t.shiftKey?a=100:i!=null?a=i:a=10;let l=0;switch(t.key){case"ArrowDown":l=s?0:a;break;case"ArrowLeft":l=s?-a:0;break;case"ArrowRight":l=s?a:0;break;case"ArrowUp":l=s?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:u5(t,e,n,r,o)}function d5({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 s=n[o];ee(s,`Panel constraints not found for index ${o}`);const{defaultSize:a}=s;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<t.length;o++){const s=n[o];ee(s,`Panel constraints not found for index ${o}`);const{defaultSize:a}=s;if(a!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Gt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:s,constraints:a,id:l}=o,{collapsedSize:u=0,collapsible:c}=a,f=n[l];if(f==null||r!==f){n[l]=r;const{onCollapse:p,onExpand:g,onResize:b}=s;b&&b(r,f),c&&(p||g)&&(g&&(f==null||it(f,u))&&!it(r,u)&&g(),p&&(f==null||!it(f,u))&&it(r,u)&&p())}})}function Er(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 f5({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const s=n[i];let a;return s==null?a=t!=null?t.toPrecision(o):"1":r.length===1?a="1":a=s.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function h5(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function rl(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 kd(t){return`react-resizable-panels:${t}`}function Nd(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 Rd(t,e){try{const n=kd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function p5(t,e,n){var r,i;const o=(r=Rd(t,n))!==null&&r!==void 0?r:{},s=Nd(e);return(i=o[s])!==null&&i!==void 0?i:null}function g5(t,e,n,r,i){var o;const s=kd(t),a=Nd(e),l=(o=Rd(t,i))!==null&&o!==void 0?o:{};l[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(s,JSON.stringify(l))}catch(u){console.error(u)}}function il({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,s)=>o+s,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Pe(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const s=n[o];ee(s!=null,`No layout data found for index ${o}`);const a=100/r*s;n[o]=a}let i=0;for(let o=0;o<e.length;o++){const s=n[o];ee(s!=null,`No layout data found for index ${o}`);const a=dn({panelConstraints:e,panelIndex:o,size:s});s!=a&&(i+=s-a,n[o]=a)}if(!Pe(i,0))for(let o=0;o<e.length;o++){const s=n[o];ee(s!=null,`No layout data found for index ${o}`);const a=s+i,l=dn({panelConstraints:e,panelIndex:o,size:a});if(s!==l&&(i-=l-s,n[o]=l,Pe(i,0)))break}return n}const v5=100,zn={getItem:t=>(rl(zn),zn.getItem(t)),setItem:(t,e)=>{rl(zn),zn.setItem(t,e)}},ol={};function Ld({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:s=null,keyboardResizeBy:a=null,storage:l=zn,style:u,tagName:c="div",...f}){const p=Ds(o),g=Te(null),[b,h]=pn(null),[m,v]=pn([]),C=i5(),w=Te({}),P=Te(new Map),x=Te(0),D=Te({autoSaveId:t,direction:r,dragState:b,id:p,keyboardResizeBy:a,onLayout:s,storage:l}),_=Te({layout:m,panelDataArray:[],panelDataArrayChanged:!1});Te({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),yd(i,()=>({getId:()=>D.current.id,getLayout:()=>{const{layout:I}=_.current;return I},setLayout:I=>{const{onLayout:A}=D.current,{layout:M,panelDataArray:W}=_.current,U=il({layout:I,panelConstraints:W.map(K=>K.constraints)});nl(M,U)||(v(U),_.current.layout=U,A&&A(U),Gt(W,U,w.current))}}),[]),Dt(()=>{D.current.autoSaveId=t,D.current.direction=r,D.current.dragState=b,D.current.id=p,D.current.onLayout=s,D.current.storage=l}),l5({committedValuesRef:D,eagerValuesRef:_,groupId:p,layout:m,panelDataArray:_.current.panelDataArray,setLayout:v,panelGroupElement:g.current}),_t(()=>{const{panelDataArray:I}=_.current;if(t){if(m.length===0||m.length!==I.length)return;let A=ol[t];A==null&&(A=h5(g5,v5),ol[t]=A);const M=[...I],W=new Map(P.current);A(t,M,W,m,l)}},[t,m,l]),_t(()=>{});const S=$e(I=>{const{onLayout:A}=D.current,{layout:M,panelDataArray:W}=_.current;if(I.constraints.collapsible){const U=W.map(fe=>fe.constraints),{collapsedSize:K=0,panelSize:X,pivotIndices:te}=Ct(W,I,M);if(ee(X!=null,`Panel size not found for panel "${I.id}"`),!it(X,K)){P.current.set(I.id,X);const de=an(W,I)===W.length-1?X-K:K-X,oe=Hn({delta:de,initialLayout:M,panelConstraints:U,pivotIndices:te,prevLayout:M,trigger:"imperative-api"});Er(M,oe)||(v(oe),_.current.layout=oe,A&&A(oe),Gt(W,oe,w.current))}}},[]),R=$e((I,A)=>{const{onLayout:M}=D.current,{layout:W,panelDataArray:U}=_.current;if(I.constraints.collapsible){const K=U.map(ve=>ve.constraints),{collapsedSize:X=0,panelSize:te=0,minSize:fe=0,pivotIndices:de}=Ct(U,I,W),oe=A??fe;if(it(te,X)){const ve=P.current.get(I.id),re=ve!=null&&ve>=oe?ve:oe,lt=an(U,I)===U.length-1?te-re:re-te,me=Hn({delta:lt,initialLayout:W,panelConstraints:K,pivotIndices:de,prevLayout:W,trigger:"imperative-api"});Er(W,me)||(v(me),_.current.layout=me,M&&M(me),Gt(U,me,w.current))}}},[]),F=$e(I=>{const{layout:A,panelDataArray:M}=_.current,{panelSize:W}=Ct(M,I,A);return ee(W!=null,`Panel size not found for panel "${I.id}"`),W},[]),N=$e((I,A)=>{const{panelDataArray:M}=_.current,W=an(M,I);return f5({defaultSize:A,dragState:b,layout:m,panelData:M,panelIndex:W})},[b,m]),H=$e(I=>{const{layout:A,panelDataArray:M}=_.current,{collapsedSize:W=0,collapsible:U,panelSize:K}=Ct(M,I,A);return ee(K!=null,`Panel size not found for panel "${I.id}"`),U===!0&&it(K,W)},[]),E=$e(I=>{const{layout:A,panelDataArray:M}=_.current,{collapsedSize:W=0,collapsible:U,panelSize:K}=Ct(M,I,A);return ee(K!=null,`Panel size not found for panel "${I.id}"`),!U||Lt(K,W)>0},[]),O=$e(I=>{const{panelDataArray:A}=_.current;A.push(I),A.sort((M,W)=>{const U=M.order,K=W.order;return U==null&&K==null?0:U==null?-1:K==null?1:U-K}),_.current.panelDataArrayChanged=!0,C()},[C]);Dt(()=>{if(_.current.panelDataArrayChanged){_.current.panelDataArrayChanged=!1;const{autoSaveId:I,onLayout:A,storage:M}=D.current,{layout:W,panelDataArray:U}=_.current;let K=null;if(I){const te=p5(I,U,M);te&&(P.current=new Map(Object.entries(te.expandToSizes)),K=te.layout)}K==null&&(K=d5({panelDataArray:U}));const X=il({layout:K,panelConstraints:U.map(te=>te.constraints)});nl(W,X)||(v(X),_.current.layout=X,A&&A(X),Gt(U,X,w.current))}}),Dt(()=>{const I=_.current;return()=>{I.layout=[]}},[]);const z=$e(I=>{let A=!1;const M=g.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(A=!0),function(U){U.preventDefault();const K=g.current;if(!K)return()=>null;const{direction:X,dragState:te,id:fe,keyboardResizeBy:de,onLayout:oe}=D.current,{layout:ve,panelDataArray:re}=_.current,{initialLayout:Ge}=te??{},lt=Dd(fe,I,K);let me=c5(U,I,X,te,de,K);const Dn=X==="horizontal";Dn&&A&&(me=-me);const cr=re.map(Z=>Z.constraints),$=Hn({delta:me,initialLayout:Ge??ve,panelConstraints:cr,pivotIndices:lt,prevLayout:ve,trigger:Sd(U)?"keyboard":"mouse-or-touch"}),q=!Er(ve,$);(Cd(U)||wd(U))&&x.current!=me&&(x.current=me,!q&&me!==0?Dn?Ji(I,me<0?xd:$d):Ji(I,me<0?Td:Pd):Ji(I,0)),q&&(v($),_.current.layout=$,oe&&oe($),Gt(re,$,w.current))}},[]),G=$e((I,A)=>{const{onLayout:M}=D.current,{layout:W,panelDataArray:U}=_.current,K=U.map(ve=>ve.constraints),{panelSize:X,pivotIndices:te}=Ct(U,I,W);ee(X!=null,`Panel size not found for panel "${I.id}"`);const de=an(U,I)===U.length-1?X-A:A-X,oe=Hn({delta:de,initialLayout:W,panelConstraints:K,pivotIndices:te,prevLayout:W,trigger:"imperative-api"});Er(W,oe)||(v(oe),_.current.layout=oe,M&&M(oe),Gt(U,oe,w.current))},[]),V=$e((I,A)=>{const{layout:M,panelDataArray:W}=_.current,{collapsedSize:U=0,collapsible:K}=A,{collapsedSize:X=0,collapsible:te,maxSize:fe=100,minSize:de=0}=I.constraints,{panelSize:oe}=Ct(W,I,M);oe!=null&&(K&&te&&it(oe,U)?it(U,X)||G(I,X):oe<de?G(I,de):oe>fe&&G(I,fe))},[G]),L=$e((I,A)=>{const{direction:M}=D.current,{layout:W}=_.current;if(!g.current)return;const U=wi(I,g.current);ee(U,`Drag handle element not found for id "${I}"`);const K=Id(M,A);h({dragHandleId:I,dragHandleRect:U.getBoundingClientRect(),initialCursorPosition:K,initialLayout:W})},[]),Y=$e(()=>{h(null)},[]),j=$e(I=>{const{panelDataArray:A}=_.current,M=an(A,I);M>=0&&(A.splice(M,1),delete w.current[I.id],_.current.panelDataArrayChanged=!0,C())},[C]),B=Vg(()=>({collapsePanel:S,direction:r,dragState:b,expandPanel:R,getPanelSize:F,getPanelStyle:N,groupId:p,isPanelCollapsed:H,isPanelExpanded:E,reevaluatePanelConstraints:V,registerPanel:O,registerResizeHandle:z,resizePanel:G,startDragging:L,stopDragging:Y,unregisterPanel:j,panelGroupElement:g.current}),[S,b,r,R,F,N,p,H,E,V,O,z,G,L,Y,j]),k={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Cn(bi.Provider,{value:B},Cn(c,{...f,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 Md=vd((t,e)=>Cn(Ld,{...t,forwardedRef:e}));Ld.displayName="PanelGroup";Md.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function Ct(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],s=n[r];return{...e.constraints,panelSize:s,pivotIndices:o}}function m5({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){_t(()=>{if(t||n==null||r==null)return;const i=wi(e,r);if(i==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const a=i.getAttribute("data-panel-group-id");ee(a,`No group element found for id "${a}"`);const l=Qn(a,r),u=_d(a,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=s.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 Ad({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:s,onFocus:a,style:l={},tabIndex:u=0,tagName:c="div",...f}){var p,g;const b=Te(null),h=Te({onDragging:s});_t(()=>{h.current.onDragging=s});const m=md(bi);if(m===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:v,groupId:C,registerResizeHandle:w,startDragging:P,stopDragging:x,panelGroupElement:D}=m,_=Ds(i),[S,R]=pn("inactive"),[F,N]=pn(!1),[H,E]=pn(null),O=Te({state:S});Dt(()=>{O.current.state=S}),_t(()=>{if(n)E(null);else{const L=w(_);E(()=>L)}},[n,_,w]);const z=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,G=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return _t(()=>{if(n||H==null)return;const L=b.current;return ee(L,"Element ref not attached"),r5(_,L,v,{coarse:z,fine:G},(j,B,k)=>{if(B)switch(j){case"down":{R("drag"),ee(k,'Expected event to be defined for "down" action'),P(_,k);const{onDragging:I}=h.current;I&&I(!0);break}case"move":{const{state:I}=O.current;I!=="drag"&&R("hover"),ee(k,'Expected event to be defined for "move" action'),H(k);break}case"up":{R("hover"),x();const{onDragging:I}=h.current;I&&I(!1);break}}else R("inactive")})},[z,v,n,G,w,_,H,P,x]),m5({disabled:n,handleId:_,resizeHandler:H,panelGroupElement:D}),Cn(c,{...f,children:t,className:e,id:i,onBlur:()=>{N(!1),o==null||o()},onFocus:()=>{N(!0),a==null||a()},ref:b,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":v,"data-panel-group-id":C,"data-resize-handle":"","data-resize-handle-active":S==="drag"?"pointer":F?"keyboard":void 0,"data-resize-handle-state":S,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":_})}Ad.displayName="PanelResizeHandle";const y5=({children:t,isOpen:e})=>{const{isDesktop:n}=_n();return n?y.jsx("div",{className:Ve("c__right-panel",{open:e}),children:t}):y.jsx("div",{className:Ve("c__right-panel__mobile",{open:e}),children:t})},b5=({icon:t,children:e,hideLeftPanelOnDesktop:n=!1,leftPanelContent:r,rightPanelContent:i,rightHeaderContent:o,languages:s,enableResize:a=!1,rightPanelIsOpen:l=!1})=>{const[u,c]=d.useState(!1),{isDesktop:f}=_n(),p=d.useRef(null),[g,b]=d.useState(xr(300,f)),[h,m]=d.useState(xr(450,f)),v=()=>{c(!u)};d.useEffect(()=>{const P=()=>{const x=Math.round(xr(300,f)),D=Math.round(Math.min(xr(450,f),40));b(f?x:0),m(a?D:x)};return P(),window.addEventListener("resize",()=>{P()}),()=>{window.removeEventListener("resize",P)}},[f,a]);const C=f?!n:!0,w=f?!n:u;return y.jsxs("div",{className:"c__main-layout",children:[y.jsx("div",{className:"c__main-layout__header",children:y.jsx(pd,{onTogglePanel:v,isPanelOpen:u,rightIcon:o,leftIcon:t,languages:s})}),y.jsx("div",{className:"c__main-layout__content",children:y.jsxs(Md,{autoSaveId:"persistance",direction:"horizontal",children:[C&&y.jsxs(y.Fragment,{children:[y.jsx(Uo,{ref:p,order:0,defaultSize:g,minSize:g,maxSize:h,children:y.jsx(gd,{isOpen:w,children:r})}),f&&y.jsx(Ad,{className:"bg-greyscale-200",style:{width:"1px"}})]}),y.jsx(Uo,{order:1,children:y.jsxs("div",{className:"c__main-layout__content__center",children:[y.jsx("div",{className:"c__main-layout__content__center__children",children:e}),y.jsx(y5,{isOpen:l,children:i})]})})]})})]})},xr=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},S5=52,Ns=({size:t="sm"})=>y.jsx("div",{className:["c__spinner",t].join(" ")}),Kd=({children:t,text:e,...n})=>y.jsxs("div",{className:"suite__label__container",children:[y.jsx("label",{...n,children:t}),e&&y.jsx("span",{className:"suite__label__container__description",children:e})]}),C5=({label:t,text:e,labelSide:n="right",children:r})=>y.jsxs("div",{className:Ve("c__with-label",{[n]:!0}),children:[y.jsx(Kd,{children:t,text:e}),r]});var sl=1,w5=.9,E5=.8,x5=.17,Qi=.1,eo=.999,$5=.9999,T5=.99,P5=/[\\\/_+.#"@\[\(\{&]/,_5=/[\\\/_+.#"@\[\(\{&]/g,D5=/[\s-]/,Fd=/[\s-]/g;function qo(t,e,n,r,i,o,s){if(o===e.length)return i===t.length?sl:T5;var a=`${i},${o}`;if(s[a]!==void 0)return s[a];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,f,p,g,b;u>=0;)f=qo(t,e,n,r,u+1,o+1,s),f>c&&(u===i?f*=sl:P5.test(t.charAt(u-1))?(f*=E5,g=t.slice(i,u-1).match(_5),g&&i>0&&(f*=Math.pow(eo,g.length))):D5.test(t.charAt(u-1))?(f*=w5,b=t.slice(i,u-1).match(Fd),b&&i>0&&(f*=Math.pow(eo,b.length))):(f*=x5,i>0&&(f*=Math.pow(eo,u-i))),t.charAt(u)!==e.charAt(o)&&(f*=$5)),(f<Qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(p=qo(t,e,n,r,u+1,o+2,s),p*Qi>f&&(f=p*Qi)),f>c&&(c=f),u=n.indexOf(l,u+1);return s[a]=c,c}function al(t){return t.toLowerCase().replace(Fd," ")}function O5(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,qo(t,e,al(t),al(e),0,0,{})}function yt(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 ll(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function jd(...t){return e=>{let n=!1;const r=t.map(i=>{const o=ll(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():ll(t[i],null)}}}}function zt(...t){return T.useCallback(jd(...t),t)}function I5(t,e){const n=T.createContext(e),r=o=>{const{children:s,...a}=o,l=T.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:l,children:s})};r.displayName=t+"Provider";function i(o){const s=T.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function k5(t,e=[]){let n=[];function r(o,s){const a=T.createContext(s),l=n.length;n=[...n,s];const u=f=>{var v;const{scope:p,children:g,...b}=f,h=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,m=T.useMemo(()=>b,Object.values(b));return y.jsx(h.Provider,{value:m,children:g})};u.displayName=o+"Provider";function c(f,p){var h;const g=((h=p==null?void 0:p[t])==null?void 0:h[l])||a,b=T.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(s=>T.createContext(s));return function(a){const l=(a==null?void 0:a[t])||o;return T.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,N5(i,...e)]}function N5(...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 s=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}var oi=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},R5=T.useId||(()=>{}),L5=0;function st(t){const[e,n]=T.useState(R5());return oi(()=>{n(r=>r??String(L5++))},[t]),e?`radix-${e}`:""}function Mt(t){const e=T.useRef(t);return T.useEffect(()=>{e.current=t}),T.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function M5({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=A5({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=Mt(n),l=T.useCallback(u=>{if(o){const f=typeof u=="function"?u(t):u;f!==t&&a(f)}else i(u)},[o,t,i,a]);return[s,l]}function A5({defaultProp:t,onChange:e}){const n=T.useState(t),[r]=n,i=T.useRef(r),o=Mt(e);return T.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Rs=T.forwardRef((t,e)=>{const{children:n,...r}=t,i=T.Children.toArray(n),o=i.find(F5);if(o){const s=o.props.children,a=i.map(l=>l===o?T.Children.count(s)>1?T.Children.only(null):T.isValidElement(s)?s.props.children:null:l);return y.jsx(Yo,{...r,ref:e,children:T.isValidElement(s)?T.cloneElement(s,void 0,a):null})}return y.jsx(Yo,{...r,ref:e,children:n})});Rs.displayName="Slot";var Yo=T.forwardRef((t,e)=>{const{children:n,...r}=t;if(T.isValidElement(n)){const i=H5(n),o=j5(r,n.props);return n.type!==T.Fragment&&(o.ref=e?jd(e,i):i),T.cloneElement(n,o)}return T.Children.count(n)>1?T.Children.only(null):null});Yo.displayName="SlotClone";var K5=({children:t})=>y.jsx(y.Fragment,{children:t});function F5(t){return T.isValidElement(t)&&t.type===K5}function j5(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]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function H5(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 z5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Se=z5.reduce((t,e)=>{const n=T.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Rs:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function B5(t,e){t&&x0.flushSync(()=>t.dispatchEvent(e))}function V5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t);T.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 W5="DismissableLayer",Zo="dismissableLayer.update",U5="dismissableLayer.pointerDownOutside",G5="dismissableLayer.focusOutside",ul,Hd=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zd=T.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=t,u=T.useContext(Hd),[c,f]=T.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=T.useState({}),b=zt(e,_=>f(_)),h=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(m),C=c?h.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=v,x=Z5(_=>{const S=_.target,R=[...u.branches].some(F=>F.contains(S));!P||R||(i==null||i(_),s==null||s(_),_.defaultPrevented||a==null||a())},p),D=X5(_=>{const S=_.target;[...u.branches].some(F=>F.contains(S))||(o==null||o(_),s==null||s(_),_.defaultPrevented||a==null||a())},p);return V5(_=>{C===u.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},p),T.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ul=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),cl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ul)}},[c,p,n,u]),T.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),cl())},[c,u]),T.useEffect(()=>{const _=()=>g({});return document.addEventListener(Zo,_),()=>document.removeEventListener(Zo,_)},[]),y.jsx(Se.div,{...l,ref:b,style:{pointerEvents:w?P?"auto":"none":void 0,...t.style},onFocusCapture:yt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:yt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:yt(t.onPointerDownCapture,x.onPointerDownCapture)})});zd.displayName=W5;var q5="DismissableLayerBranch",Y5=T.forwardRef((t,e)=>{const n=T.useContext(Hd),r=T.useRef(null),i=zt(e,r);return T.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),y.jsx(Se.div,{...t,ref:i})});Y5.displayName=q5;function Z5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=T.useRef(!1),i=T.useRef(()=>{});return T.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Bd(U5,n,u,{discrete:!0})};const u={originalEvent:a};a.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},s=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function X5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=T.useRef(!1);return T.useEffect(()=>{const i=o=>{o.target&&!r.current&&Bd(G5,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 cl(){const t=new CustomEvent(Zo);document.dispatchEvent(t)}function Bd(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?B5(i,o):i.dispatchEvent(o)}var to="focusScope.autoFocusOnMount",no="focusScope.autoFocusOnUnmount",dl={bubbles:!1,cancelable:!0},J5="FocusScope",Vd=T.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=t,[a,l]=T.useState(null),u=Mt(i),c=Mt(o),f=T.useRef(null),p=zt(e,h=>l(h)),g=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(r){let h=function(w){if(g.paused||!a)return;const P=w.target;a.contains(P)?f.current=P:dt(f.current,{select:!0})},m=function(w){if(g.paused||!a)return;const P=w.relatedTarget;P!==null&&(a.contains(P)||dt(f.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&dt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",m);const C=new MutationObserver(v);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",m),C.disconnect()}}},[r,a,g.paused]),T.useEffect(()=>{if(a){hl.add(g);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(to,dl);a.addEventListener(to,u),a.dispatchEvent(v),v.defaultPrevented||(Q5(iv(Wd(a)),{select:!0}),document.activeElement===h&&dt(a))}return()=>{a.removeEventListener(to,u),setTimeout(()=>{const v=new CustomEvent(no,dl);a.addEventListener(no,c),a.dispatchEvent(v),v.defaultPrevented||dt(h??document.body,{select:!0}),a.removeEventListener(no,c),hl.remove(g)},0)}}},[a,u,c,g]);const b=T.useCallback(h=>{if(!n&&!r||g.paused)return;const m=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(m&&v){const C=h.currentTarget,[w,P]=ev(C);w&&P?!h.shiftKey&&v===P?(h.preventDefault(),n&&dt(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&dt(P,{select:!0})):v===C&&h.preventDefault()}},[n,r,g.paused]);return y.jsx(Se.div,{tabIndex:-1,...s,ref:p,onKeyDown:b})});Vd.displayName=J5;function Q5(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(dt(r,{select:e}),document.activeElement!==n)return}function ev(t){const e=Wd(t),n=fl(e,t),r=fl(e.reverse(),t);return[n,r]}function Wd(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 fl(t,e){for(const n of t)if(!tv(n,{upTo:e}))return n}function tv(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 nv(t){return t instanceof HTMLInputElement&&"select"in t}function dt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&nv(t)&&e&&t.select()}}var hl=rv();function rv(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=pl(t,e),t.unshift(e)},remove(e){var n;t=pl(t,e),(n=t[0])==null||n.resume()}}}function pl(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function iv(t){return t.filter(e=>e.tagName!=="A")}var ov="Portal",Ud=T.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,o]=T.useState(!1);oi(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Ht.createPortal(y.jsx(Se.div,{...r,ref:e}),s):null});Ud.displayName=ov;function sv(t,e){return T.useReducer((n,r)=>e[n][r]??n,t)}var Ei=t=>{const{present:e,children:n}=t,r=av(e),i=typeof n=="function"?n({present:r.isPresent}):T.Children.only(n),o=zt(r.ref,lv(i));return typeof n=="function"||r.isPresent?T.cloneElement(i,{ref:o}):null};Ei.displayName="Presence";function av(t){const[e,n]=T.useState(),r=T.useRef({}),i=T.useRef(t),o=T.useRef("none"),s=t?"mounted":"unmounted",[a,l]=sv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const u=$r(r.current);o.current=a==="mounted"?u:"none"},[a]),oi(()=>{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]),oi(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,f=g=>{const h=$r(r.current).includes(g.animationName);if(g.target===e&&h&&(l("ANIMATION_END"),!i.current)){const m=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=m)})}},p=g=>{g.target===e&&(o.current=$r(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:T.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function $r(t){return(t==null?void 0:t.animationName)||"none"}function lv(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 ro=0;function uv(){T.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??gl()),document.body.insertAdjacentElement("beforeend",t[1]??gl()),ro++,()=>{ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ro--}},[])}function gl(){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 Lr="right-scroll-bar-position",Mr="width-before-scroll-bar",cv="with-scroll-bars-hidden",dv="--removed-body-scroll-bar-size";function io(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function fv(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 hv=typeof window<"u"?T.useLayoutEffect:T.useEffect,vl=new WeakMap;function pv(t,e){var n=fv(null,function(r){return t.forEach(function(i){return io(i,r)})});return hv(function(){var r=vl.get(n);if(r){var i=new Set(r),o=new Set(t),s=n.current;i.forEach(function(a){o.has(a)||io(a,null)}),o.forEach(function(a){i.has(a)||io(a,s)})}vl.set(n,t)},[t]),n}function gv(t){return t}function vv(t,e){e===void 0&&(e=gv);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 s=e(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var c=s;s=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),n}}}};return i}function mv(t){t===void 0&&(t={});var e=vv(null);return e.options=Ye({async:!0,ssr:!1},t),e}var Gd=function(t){var e=t.sideCar,n=vc(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 T.createElement(r,Ye({},n))};Gd.isSideCarExport=!0;function yv(t,e){return t.useMedium(e),Gd}var qd=mv(),oo=function(){},xi=T.forwardRef(function(t,e){var n=T.useRef(null),r=T.useState({onScrollCapture:oo,onWheelCapture:oo,onTouchMoveCapture:oo}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,f=t.shards,p=t.sideCar,g=t.noIsolation,b=t.inert,h=t.allowPinchZoom,m=t.as,v=m===void 0?"div":m,C=t.gapMode,w=vc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,x=pv([n,e]),D=Ye(Ye({},w),i);return T.createElement(T.Fragment,null,c&&T.createElement(P,{sideCar:qd,removeScrollBar:u,shards:f,noIsolation:g,inert:b,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:C}),s?T.cloneElement(T.Children.only(a),Ye(Ye({},D),{ref:x})):T.createElement(v,Ye({},D,{className:l,ref:x}),a))});xi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xi.classNames={fullWidth:Mr,zeroRight:Lr};var bv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sv(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=bv();return e&&t.setAttribute("nonce",e),t}function Cv(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function wv(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Ev=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Sv())&&(Cv(e,n),wv(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},xv=function(){var t=Ev();return function(e,n){T.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Yd=function(){var t=xv(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},$v={left:0,top:0,right:0,gap:0},so=function(t){return parseInt(t||"",10)||0},Tv=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[so(n),so(r),so(i)]},Pv=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $v;var e=Tv(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])}},_v=Yd(),vn="data-scroll-locked",Dv=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
48
+ .`.concat(cv,` {
49
49
  overflow: hidden `).concat(r,`;
50
- padding-right: `).concat(s,"px ").concat(r,`;
50
+ padding-right: `).concat(a,"px ").concat(r,`;
51
51
  }
52
- body[`).concat(gn,`] {
52
+ body[`).concat(vn,`] {
53
53
  overflow: hidden `).concat(r,`;
54
54
  overscroll-behavior: contain;
55
55
  `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
56
56
  padding-left: `.concat(i,`px;
57
57
  padding-top: `).concat(o,`px;
58
- padding-right: `).concat(a,`px;
58
+ padding-right: `).concat(s,`px;
59
59
  margin-left:0;
60
60
  margin-top:0;
61
- margin-right: `).concat(s,"px ").concat(r,`;
62
- `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
61
+ margin-right: `).concat(a,"px ").concat(r,`;
62
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
63
63
  }
64
64
 
65
- .`).concat(Rr,` {
66
- right: `).concat(s,"px ").concat(r,`;
65
+ .`).concat(Lr,` {
66
+ right: `).concat(a,"px ").concat(r,`;
67
67
  }
68
68
 
69
- .`).concat(Nr,` {
70
- margin-right: `).concat(s,"px ").concat(r,`;
69
+ .`).concat(Mr,` {
70
+ margin-right: `).concat(a,"px ").concat(r,`;
71
71
  }
72
72
 
73
- .`).concat(Rr," .").concat(Rr,` {
73
+ .`).concat(Lr," .").concat(Lr,` {
74
74
  right: 0 `).concat(r,`;
75
75
  }
76
76
 
77
- .`).concat(Nr," .").concat(Nr,` {
77
+ .`).concat(Mr," .").concat(Mr,` {
78
78
  margin-right: 0 `).concat(r,`;
79
79
  }
80
80
 
81
- body[`).concat(gn,`] {
82
- `).concat(ky,": ").concat(s,`px;
81
+ body[`).concat(vn,`] {
82
+ `).concat(dv,": ").concat(a,`px;
83
83
  }
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`
84
+ `)},ml=function(){var t=parseInt(document.body.getAttribute(vn)||"0",10);return isFinite(t)?t:0},Ov=function(){T.useEffect(function(){return document.body.setAttribute(vn,(ml()+1).toString()),function(){var t=ml()-1;t<=0?document.body.removeAttribute(vn):document.body.setAttribute(vn,t.toString())}},[])},Iv=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Ov();var o=T.useMemo(function(){return Pv(i)},[i]);return T.createElement(_v,{styles:Dv(o,!e,i,n?"":"!important")})},Xo=!1;if(typeof window<"u")try{var Tr=Object.defineProperty({},"passive",{get:function(){return Xo=!0,!0}});window.addEventListener("test",Tr,Tr),window.removeEventListener("test",Tr,Tr)}catch{Xo=!1}var qt=Xo?{passive:!1}:!1,kv=function(t){return t.tagName==="TEXTAREA"},Zd=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!kv(t)&&n[e]==="visible")},Nv=function(t){return Zd(t,"overflowY")},Rv=function(t){return Zd(t,"overflowX")},yl=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Xd(t,r);if(i){var o=Jd(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Lv=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Mv=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Xd=function(t,e){return t==="v"?Nv(e):Rv(e)},Jd=function(t,e){return t==="v"?Lv(e):Mv(e)},Av=function(t,e){return t==="h"&&e==="rtl"?-1:1},Kv=function(t,e,n,r,i){var o=Av(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,l=e.contains(a),u=!1,c=s>0,f=0,p=0;do{var g=Jd(t,a),b=g[0],h=g[1],m=g[2],v=h-m-o*b;(b||v)&&Xd(t,a)&&(f+=v,p+=b),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&Math.abs(f)<1||!c&&Math.abs(p)<1)&&(u=!0),u},Pr=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},bl=function(t){return[t.deltaX,t.deltaY]},Sl=function(t){return t&&"current"in t?t.current:t},Fv=function(t,e){return t[0]===e[0]&&t[1]===e[1]},jv=function(t){return`
85
85
  .block-interactivity-`.concat(t,` {pointer-events: none;}
86
86
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
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(Kd)[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],P="deltaY"in f?f.deltaY:S[1]-y[1],x,O=f.target,D=Math.abs(w)>Math.abs(P)?"h":"v";if("touches"in f&&D==="h"&&O.type==="range")return!1;var b=cl(D,O);if(!b)return!0;if(b?x=D:(x=D==="v"?"h":"v",b=cl(D,O)),!b)return!1;if(!r.current&&"changedTouches"in f&&(w||P)&&(r.current=x),!x)return!0;var k=r.current||x;return ob(k,v,f,k==="h"?w:P)},[]),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)}),P=w.length>0?s(v,w[0]):!a.current.noIsolation;P&&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(P){return P!==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(Ld,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,Ix]=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",[_x,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.
87
+ `)},Hv=0,Yt=[];function zv(t){var e=T.useRef([]),n=T.useRef([0,0]),r=T.useRef(),i=T.useState(Hv++)[0],o=T.useState(Yd)[0],s=T.useRef(t);T.useEffect(function(){s.current=t},[t]),T.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var h=Hh([t.lockRef.current],(t.shards||[]).map(Sl),!0).filter(Boolean);return h.forEach(function(m){return m.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=T.useCallback(function(h,m){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var v=Pr(h),C=n.current,w="deltaX"in h?h.deltaX:C[0]-v[0],P="deltaY"in h?h.deltaY:C[1]-v[1],x,D=h.target,_=Math.abs(w)>Math.abs(P)?"h":"v";if("touches"in h&&_==="h"&&D.type==="range")return!1;var S=yl(_,D);if(!S)return!0;if(S?x=_:(x=_==="v"?"h":"v",S=yl(_,D)),!S)return!1;if(!r.current&&"changedTouches"in h&&(w||P)&&(r.current=x),!x)return!0;var R=r.current||x;return Kv(R,m,h,R==="h"?w:P)},[]),l=T.useCallback(function(h){var m=h;if(!(!Yt.length||Yt[Yt.length-1]!==o)){var v="deltaY"in m?bl(m):Pr(m),C=e.current.filter(function(x){return x.name===m.type&&(x.target===m.target||m.target===x.shadowParent)&&Fv(x.delta,v)})[0];if(C&&C.should){m.cancelable&&m.preventDefault();return}if(!C){var w=(s.current.shards||[]).map(Sl).filter(Boolean).filter(function(x){return x.contains(m.target)}),P=w.length>0?a(m,w[0]):!s.current.noIsolation;P&&m.cancelable&&m.preventDefault()}}},[]),u=T.useCallback(function(h,m,v,C){var w={name:h,delta:m,target:v,should:C,shadowParent:Bv(v)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(P){return P!==w})},1)},[]),c=T.useCallback(function(h){n.current=Pr(h),r.current=void 0},[]),f=T.useCallback(function(h){u(h.type,bl(h),h.target,a(h,t.lockRef.current))},[]),p=T.useCallback(function(h){u(h.type,Pr(h),h.target,a(h,t.lockRef.current))},[]);T.useEffect(function(){return Yt.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,qt),document.addEventListener("touchmove",l,qt),document.addEventListener("touchstart",c,qt),function(){Yt=Yt.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,qt),document.removeEventListener("touchmove",l,qt),document.removeEventListener("touchstart",c,qt)}},[]);var g=t.removeScrollBar,b=t.inert;return T.createElement(T.Fragment,null,b?T.createElement(o,{styles:jv(i)}):null,g?T.createElement(Iv,{gapMode:t.gapMode}):null)}function Bv(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Vv=yv(qd,zv);var Qd=T.forwardRef(function(t,e){return T.createElement(xi,Ye({},t,{ref:e,sideCar:Vv}))});Qd.classNames=xi.classNames;var Wv=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Zt=new WeakMap,_r=new WeakMap,Dr={},ao=0,ef=function(t){return t&&(t.host||ef(t.parentNode))},Uv=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=ef(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})},Gv=function(t,e,n,r){var i=Uv(e,Array.isArray(t)?t:[t]);Dr[n]||(Dr[n]=new WeakMap);var o=Dr[n],s=[],a=new Set,l=new Set(i),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))c(p);else try{var g=p.getAttribute(r),b=g!==null&&g!=="false",h=(Zt.get(p)||0)+1,m=(o.get(p)||0)+1;Zt.set(p,h),o.set(p,m),s.push(p),h===1&&b&&_r.set(p,!0),m===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(e),a.clear(),ao++,function(){s.forEach(function(f){var p=Zt.get(f)-1,g=o.get(f)-1;Zt.set(f,p),o.set(f,g),p||(_r.has(f)||f.removeAttribute(r),_r.delete(f)),g||f.removeAttribute(n)}),ao--,ao||(Zt=new WeakMap,Zt=new WeakMap,_r=new WeakMap,Dr={})}},qv=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=Wv(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Gv(r,i,n,"aria-hidden")):function(){return null}},Ls="Dialog",[tf,c7]=k5(Ls),[Yv,Ue]=tf(Ls),nf=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=t,a=T.useRef(null),l=T.useRef(null),[u=!1,c]=M5({prop:r,defaultProp:i,onChange:o});return y.jsx(Yv,{scope:e,triggerRef:a,contentRef:l,contentId:st(),titleId:st(),descriptionId:st(),open:u,onOpenChange:c,onOpenToggle:T.useCallback(()=>c(f=>!f),[c]),modal:s,children:n})};nf.displayName=Ls;var rf="DialogTrigger",Zv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ue(rf,n),o=zt(e,i.triggerRef);return y.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ks(i.open),...r,ref:o,onClick:yt(t.onClick,i.onOpenToggle)})});Zv.displayName=rf;var Ms="DialogPortal",[Xv,of]=tf(Ms,{forceMount:void 0}),sf=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=Ue(Ms,e);return y.jsx(Xv,{scope:e,forceMount:n,children:T.Children.map(r,s=>y.jsx(Ei,{present:n||o.open,children:y.jsx(Ud,{asChild:!0,container:i,children:s})}))})};sf.displayName=Ms;var si="DialogOverlay",af=T.forwardRef((t,e)=>{const n=of(si,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=Ue(si,t.__scopeDialog);return o.modal?y.jsx(Ei,{present:r||o.open,children:y.jsx(Jv,{...i,ref:e})}):null});af.displayName=si;var Jv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ue(si,n);return y.jsx(Qd,{as:Rs,allowPinchZoom:!0,shards:[i.contentRef],children:y.jsx(Se.div,{"data-state":Ks(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),At="DialogContent",lf=T.forwardRef((t,e)=>{const n=of(At,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=Ue(At,t.__scopeDialog);return y.jsx(Ei,{present:r||o.open,children:o.modal?y.jsx(Qv,{...i,ref:e}):y.jsx(em,{...i,ref:e})})});lf.displayName=At;var Qv=T.forwardRef((t,e)=>{const n=Ue(At,t.__scopeDialog),r=T.useRef(null),i=zt(e,n.contentRef,r);return T.useEffect(()=>{const o=r.current;if(o)return qv(o)},[]),y.jsx(uf,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yt(t.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:yt(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:yt(t.onFocusOutside,o=>o.preventDefault())})}),em=T.forwardRef((t,e)=>{const n=Ue(At,t.__scopeDialog),r=T.useRef(!1),i=T.useRef(!1);return y.jsx(uf,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=t.onCloseAutoFocus)==null||s.call(t,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.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 s=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uf=T.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=t,a=Ue(At,n),l=T.useRef(null),u=zt(e,l);return uv(),y.jsxs(y.Fragment,{children:[y.jsx(Vd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:y.jsx(zd,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ks(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(im,{titleId:a.titleId}),y.jsx(sm,{contentRef:l,descriptionId:a.descriptionId})]})]})}),As="DialogTitle",tm=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ue(As,n);return y.jsx(Se.h2,{id:i.titleId,...r,ref:e})});tm.displayName=As;var cf="DialogDescription",nm=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ue(cf,n);return y.jsx(Se.p,{id:i.descriptionId,...r,ref:e})});nm.displayName=cf;var df="DialogClose",rm=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ue(df,n);return y.jsx(Se.button,{type:"button",...r,ref:e,onClick:yt(t.onClick,()=>i.onOpenChange(!1))})});rm.displayName=df;function Ks(t){return t?"open":"closed"}var ff="DialogTitleWarning",[d7,hf]=I5(ff,{contentName:At,titleName:As,docsSlug:"dialog"}),im=({titleId:t})=>{const e=hf(ff),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},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 M,R;return{search:"",value:(R=(M=t.value)!=null?M:t.defaultValue)!=null?R:"",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(),P=it(),x=C.useRef(null),O=Wb();Lt(()=>{if(c!==void 0){let M=c.trim();n.current.value=M,D.emit()}},[c]),Lt(()=>{O(6,E)},[]);let D=C.useMemo(()=>({subscribe:M=>(a.current.add(M),()=>a.current.delete(M)),snapshot:()=>n.current,setState:(M,R,K)=>{var L,H,W;if(!Object.is(n.current[M],R)){if(n.current[M]=R,M==="search")z(),B(),O(1,N);else if(M==="value"&&(K||O(5,E),((L=s.current)==null?void 0:L.value)!==void 0)){let F=R??"";(W=(H=s.current).onValueChange)==null||W.call(H,F);return}D.emit()}},emit:()=>{a.current.forEach(M=>M())}}),[]),b=C.useMemo(()=>({value:(M,R,K)=>{var L;R!==((L=o.current.get(M))==null?void 0:L.value)&&(o.current.set(M,{value:R,keywords:K}),n.current.filtered.items.set(M,k(R,K)),O(2,()=>{B(),D.emit()}))},item:(M,R)=>(r.current.add(M),R&&(i.current.has(R)?i.current.get(R).add(M):i.current.set(R,new Set([M]))),O(3,()=>{z(),B(),n.current.value||N(),D.emit()}),()=>{o.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let K=_();O(4,()=>{z(),(K==null?void 0:K.getAttribute("id"))===M&&N(),D.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:P,labelId:w,listInnerRef:x}),[]);function k(M,R){var K,L;let H=(L=(K=s.current)==null?void 0:K.filter)!=null?L:Rb;return M?H(M,n.current.search,R):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(L=>{let H=i.current.get(L),W=0;H.forEach(F=>{let J=M.get(F);W=Math.max(J,W)}),R.push([L,W])});let K=x.current;j().sort((L,H)=>{var W,F;let J=L.getAttribute("id"),te=H.getAttribute("id");return((W=M.get(te))!=null?W:0)-((F=M.get(J))!=null?F:0)}).forEach(L=>{let H=L.closest(ro);H?H.appendChild(L.parentElement===H?L:L.closest(`${ro} > *`)):K.appendChild(L.parentElement===K?L:L.closest(`${ro} > *`))}),R.sort((L,H)=>H[1]-L[1]).forEach(L=>{var H;let W=(H=x.current)==null?void 0:H.querySelector(`${Nn}[${wt}="${encodeURIComponent(L[0])}"]`);W==null||W.parentElement.appendChild(W)})}function N(){let M=j().find(K=>K.getAttribute("aria-disabled")!=="true"),R=M==null?void 0:M.getAttribute(wt);D.setState("value",R||void 0)}function z(){var M,R,K,L;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let H=0;for(let W of r.current){let F=(R=(M=o.current.get(W))==null?void 0:M.value)!=null?R:"",J=(L=(K=o.current.get(W))==null?void 0:K.keywords)!=null?L:[],te=k(F,J);n.current.filtered.items.set(W,te),te>0&&H++}for(let[W,F]of i.current)for(let J of F)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=H}function E(){var M,R,K;let L=_();L&&(((M=L.parentElement)==null?void 0:M.firstChild)===L&&((K=(R=L.closest(Nn))==null?void 0:R.querySelector(kb))==null||K.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function _(){var M;return(M=x.current)==null?void 0:M.querySelector(`${Ra}[aria-selected="true"]`)}function j(){var M;return Array.from(((M=x.current)==null?void 0:M.querySelectorAll(hl))||[])}function U(M){let R=j()[M];R&&D.setState("value",R.getAttribute(wt))}function X(M){var R;let K=_(),L=j(),H=L.findIndex(F=>F===K),W=L[H+M];(R=s.current)!=null&&R.loop&&(W=H+M<0?L[L.length-1]:H+M===L.length?L[0]:L[H+M]),W&&D.setState("value",W.getAttribute(wt))}function I(M){let R=_(),K=R==null?void 0:R.closest(Nn),L;for(;K&&!L;)K=M>0?Hb(K,Nn):Bb(K,Nn),L=K==null?void 0:K.querySelector(hl);L?D.setState("value",L.getAttribute(wt)):X(M)}let A=()=>U(j().length-1),G=M=>{M.preventDefault(),M.metaKey?A():M.altKey?I(1):X(1)},Y=M=>{M.preventDefault(),M.metaKey?U(0):M.altKey?I(-1):X(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:M=>{var R;if((R=y.onKeyDown)==null||R.call(y,M),!M.defaultPrevented)switch(M.key){case"n":case"j":{v&&M.ctrlKey&&G(M);break}case"ArrowDown":{G(M);break}case"p":case"k":{v&&M.ctrlKey&&Y(M);break}case"ArrowUp":{Y(M);break}case"Home":{M.preventDefault(),U(0);break}case"End":{M.preventDefault(),A();break}case"Enter":if(!M.nativeEvent.isComposing&&M.keyCode!==229){M.preventDefault();let K=_();if(K){let L=new Event(Go);K.dispatchEvent(L)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Vb},l),$i(t,M=>C.createElement(rf.Provider,{value:D},C.createElement(nf.Provider,{value:b},M))))}),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;Lt(()=>{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=Kt(O=>O.value&&O.value===c.current),g=Kt(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,D;f(),(D=(O=l.current).onSelect)==null||D.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:P,...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=Kt(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Lt(()=>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=Kt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Lb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Na(),a=Kt(c=>c.search),s=Kt(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)}})}),Kb=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)=>Kt(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:Kb,Item:Nb,Input:Lb,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 Lt(()=>{e.current=t}),e}var Lt=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=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 Lt(()=>{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 Lt(()=>{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},Lr=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Lr=new WeakSet,Kr=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,P=y.layout,x=f._getItemStyleCache(u&&w,u&&P,u&&S),O;if(x.hasOwnProperty(v))O=x[v];else{var D=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=S==="horizontal"||P==="horizontal",B=S==="rtl",N=k?D:0;x[v]=O={position:"absolute",left:B?void 0:N,right:B?N:void 0,top:k?0:D,height:k?"100%":b,width:k?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,P=y.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var O=f.props.direction,D=w;if(O==="rtl")switch(wl()){case"negative":D=-w;break;case"positive-descending":D=P-S-w;break}return D=Math.max(0,Math.min(D,P-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var y=v.currentTarget,S=y.clientHeight,w=y.scrollHeight,P=y.scrollTop;f.setState(function(x){if(x.scrollOffset===P)return null;var O=Math.max(0,Math.min(P,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,P=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,P,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,P=S.scrollUpdateWasRequested;if(P&&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,D=x.scrollWidth;x.scrollLeft=D-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,P=f.innerRef,x=f.innerElementType,O=f.innerTagName,D=f.itemCount,b=f.itemData,k=f.itemKey,B=k===void 0?kS:k,N=f.layout,z=f.outerElementType,E=f.outerTagName,_=f.style,j=f.useIsScrolling,U=f.width,X=this.state.isScrolling,I=S==="horizontal"||N==="horizontal",A=I?this._onScrollHorizontal:this._onScrollVertical,G=this._getRangeToRender(),Y=G[0],M=G[1],R=[];if(D>0)for(var K=Y;K<=M;K++)R.push(d.createElement(v,{data:b,key:B(K,b),index:K,isScrolling:j?X:void 0,style:this._getItemStyle(K)}));var L=r(this.props,this._instanceProps);return d.createElement(z||E||"div",{className:y,onScroll:A,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:U,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},_)},d.createElement(x||O||"div",{children:R,ref:P,style:{height:I?"100%":L,pointerEvents:X?"none":void 0,width:I?L:"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],P=v[3];this._callOnItemsRendered(y,S,w,P)}}if(typeof this.props.onScroll=="function"){var x=this.state,O=x.scrollDirection,D=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(O,D,b)}},g._getRangeToRender=function(){var f=this.props,v=f.itemCount,y=f.overscanCount,S=this.state,w=S.isScrolling,P=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var O=a(this.props,x,this._instanceProps),D=s(this.props,O,x,this._instanceProps),b=!w||P==="backward"?Math.max(1,y):1,k=!w||P==="forward"?Math.max(1,y):1;return[Math.max(0,O-b),Math.max(0,Math.min(v-1,D+k)),O,D]},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)&&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 h=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Lr&&!Lr.has(c)&&(Lr.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 LS=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){const{children:r}=e,i=LS(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",La="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:La}}}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 P=v(w);return{unsubscribe:P}}},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 Ka="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function Dw(t){return{type:Ka,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 La: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 Ka: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 Ka:case Fa:case Pi:case ja:return si;case xi:case La: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 Lw(){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){Kw(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 Kw(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:Lw(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 Ll(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 Ll(this.dragSources,n)||Ll(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 Kl(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 Kl(t,e)}}function Kl(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 L0(i,o)}}function Lf(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 L0(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 K0(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;K0(this,t),we(this,"hooks",Lf({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",Lf({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 Kf(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=Kf(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)||KE(t,e)||LE()}function LE(){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 KE(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=Kf(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,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 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,P=0;P<h.length-1;P++){w=s[P];var x=h[P],O=1/a[P],D=x+h[P+1]-w-w;y.push((w-x-D)*O),S.push(D*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 D=new Jl([0,.5,1],[l.y,l.y/c*f,l.y+f-c]),b=D.interpolate(p);return Bf()&&o&&(b+=(window.devicePixelRatio-1)*f),b},y=function(){var D=new Jl([0,.5,1],[l.x,l.x/u*m,l.x+m-u]);return D.interpolate(h)},S=i.offsetX,w=i.offsetY,P=S===0||S,x=w===0||w;return{x:P?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},P=c$(h,p,s,S,w);l.setDragImage(p,P.x,P.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:KS,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 L$(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=K$(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 K$(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=L$(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 P=y;P.next&&P.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,width:`calc(100% - ${24+e}px)`}});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 Le=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Le||{}),$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===Le.SEPARATOR:!1,ui=t=>t?t.nodeType===Le.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:I=>I.id,getChildren:I=>I.children||[]}),[g,m]=d.useState(),f=(I=[])=>{const A=p.map(Y=>Y.key);r(...A);const G=JSON.parse(JSON.stringify(I));G.length>0&&o(null,0,...G),m(void 0)},v=I=>{const A=c(I);A&&m(A.value)},y=(I,A,G)=>{var Y;if(I){const M=c(I);M&&o(I,G??((Y=M.children)==null?void 0:Y.length)??0,A)}else o(null,G??p.length,A)},S=I=>{var A;return(A=c(I))==null?void 0:A.value},w=(I,A)=>{var K;const G=c(I);if(!G){console.error("No item found");return}let Y=((K=G.children)==null?void 0:K.map(L=>L.value))??null;const M=A.childrenCount??G.value.childrenCount??0;if((Y==null?void 0:Y.length)===0&&M>0&&(Y=null),A.children&&(Y=[...Y??[],...A.children]),A.children){const L=new Set(A.children.map(H=>H.id));Y=A.children.filter(H=>!L.has(H.id)),Y=[...Y??[],...A.children]}const R={...G.value,...A,children:Y,childrenCount:(Y==null?void 0:Y.length)??M};i(I,R)},P=I=>{r(I)},x=async I=>{if(!e){console.error("No refresh callback provided");return}try{const A=await e(I);w(I,A)}catch(A){console.error("error while refreshing node:",A)}},O=(I,A)=>{o(null,A??p.length,I)},D=(I,A)=>{const G=c(I);if(!G){console.error("No item found");return}const Y={...G.value,children:A,childrenCount:A.length,hasLoadedChildren:A.length>0};i(I,Y)},b=I=>{const A=[],G=c(I);if(!G)return[];A.push(G.value);const Y=M=>{const R=k(M);if(!R)return;const K=c(R);K&&(A.push(K.value),Y(R))};return Y(I),A.reverse()},k=I=>{var A;return((A=c(I))==null?void 0:A.parentKey)??null},B=I=>{const A=k(I);if(!A)return null;const G=c(A);return G?G.value:null},N=(I,A)=>{a(I,A)},z=(I,A)=>{s(I,A)},E=(I,A)=>{l(I,A)},_=(I,A)=>{u(I,A)},j=(I,A,G)=>{h(I,A,G)},U=I=>{j(I.sourceId,I.newParentId,I.index)},X=async I=>{if(!n)return[];const A=await n(I);return w(I,{children:A,hasLoadedChildren:!0,childrenCount:A.length}),A};return d.useEffect(()=>{const I=A=>{A.forEach(G=>{G.children&&G.children.length>0&&(G.value.children&&(G.value.children=G.children.map(Y=>Y.value),G.value.childrenCount=G.children.length),I(G.children))})};I(p),console.log("treeData",p)},[p]),{nodes:p,addChild:y,updateNode:w,deleteNode:P,addRootNode:O,selectedNode:g,setSelectedNode:m,refreshNode:x,setChildren:D,insertBeforeNode:N,insertAfterNode:z,handleMove:U,prependToNode:_,moveNode:j,appendToNode:E,move:h,resetTree:f,handleLoadChildren:X,selectNodeById:v,getParent:B,getNode:S,getParentId:k,getAncestors: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,U,X,I;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,P=(U=m.parentNode)==null?void 0:U.data;if((P==null?void 0:P.value.nodeType)===Le.TITLE||(P==null?void 0:P.value.nodeType)===Le.SEPARATOR)return null;const x=w.parentKey??n,O=m.parentId??n;let D=m.index+0,b=null,k=O;const B=((I=(X=v.parent)==null?void 0:X.children)==null?void 0:I.findIndex(A=>A.data.value.id===S))??0;if(x===O){if(B===D)return null;D=D<B?D:D-1}const N=m.index-1,z=y[N],E=m.index,_=y[E];return m.index===0?(k=m.parentId??n,b=$t.FIRST_CHILD):!P&&m.index===1&&!Hn(z.value)?(k=n,D=1,b=$t.FIRST_CHILD):m.index===y.length?(k=k??n,b=$t.LAST_CHILD):z&&Hn(z.value)?(k=z.value.id,b=$t.RIGHT):_&&Hn(_.value)&&(b=$t.LEFT,k=_.value.id),b&&k?{targetModeId:k,mode:b,oldParentId:x,index:D,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,selectionFollowsFocus:!1,disableMultiSelection:!0,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 x,O;if(i&&!i({parentNode:m,dragNodes:f,index:v}))return m.id!=="__REACT_ARBORIST_INTERNAL_ROOT__"&&(m.data.value.canDrop=!1),!0;const y=f[0];if(y&&y.isDragging&&y.willReceiveDrop||((x=m.data.value)==null?void 0:x.nodeType)===Le.TITLE||((O=m.data.value)==null?void 0:O.nodeType)===Le.SEPARATOR)return!0;if(m.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const D=h[v-1],b=h[v],k=h[v+1],B=li(D==null?void 0:D.value),N=li(b==null?void 0:b.value),z=ui(D==null?void 0:D.value),E=ui(b==null?void 0:b.value),_=Hn(k==null?void 0:k.value);return!!(v===0&&(N||E)||B&&E&&_||z&&N&&_)}const S=m==null?void 0:m.isOpen,w=(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(!w)return m.data.value.canDrop=!0,!1;let P=m.data.value.childrenCount&&m.data.value.childrenCount>0&&(m==null?void 0:m.data.children)&&m.data.children.length>0;return P=P??!0,!S&&!P&&w?(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:lx,rowClassName:"c__tree-view--row",children:r})})},lx=({children:t,...e})=>{const n=e.node.data.value.nodeType===Le.TITLE,r=e.node.data.value.nodeType===Le.SEPARATOR,{style:i}=e.attrs,o={...i};return n||r?d.createElement("div",{...e.attrs,key:e.node.id,style:o,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},t):d.createElement("div",{...e.attrs,style:o,key:e.node.id,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},T.jsx("div",{style:{padding:"0 12px",paddingBottom:"100px"},children:t}))},ux=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cx(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function dx(t){return"nodeType"in t}function fx(t){var e,n;return t?cx(t)?t:dx(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const rh=ux?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 hx(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 px(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 gx=Object.freeze({x:0,y:0});function vx(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 mx(t,e,n){const r=vx(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 yx={ignoreTransform:!1};function oh(t,e){e===void 0&&(e=yx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=fx(t).getComputedStyle(t);u&&(n=mx(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 bx(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 Sx={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:cu,draggableNodes:new Map,over:null,measureDroppableContainers:cu},wx=d.createContext(Sx);({...gx});var vu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(vu||(vu={}));const Ex="Droppable",$x={timeout:25};function xx(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=px(Ex),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(wx),c=d.useRef({disabled:n}),h=d.useRef(!1),p=d.useRef(null),g=d.useRef(null),{disabled:m,updateMeasurementsFor:f,timeout:v}={...$x,...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=bx({callback:S,disabled:m||!a}),P=d.useCallback((b,k)=>{w&&(k&&(w.unobserve(k),h.current=!1),b&&w.observe(b))},[w]),[x,O]=hx(P),D=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:D}}),()=>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 Cx=t=>{const{isOver:e,setNodeRef:n}=xx({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})},Tx=({children:t,onClick:e,node:n,dragHandle:r,style:i,forceLoading:o})=>{var w,P;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=((P=n.children)==null?void 0:P.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===Le.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.nodeType===Le.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.headerTitle}):T.jsx(Cx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:h,children:T.jsxs("div",{onClick:x=>{x.target.closest(".c__tree-view--node")||x.stopPropagation(),e==null||e()},onKeyDown:x=>{x.stopPropagation()},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=Tx;exports.TreeViewMoveModeEnum=$t;exports.TreeViewNodeTypeEnum=Le;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;
91
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return T.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},om="DialogDescriptionWarning",sm=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hf(om).contentName}}.`;return T.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},am=nf,lm=sf,um=af,cm=lf,Mn='[cmdk-group=""]',lo='[cmdk-group-items=""]',dm='[cmdk-group-heading=""]',Fs='[cmdk-item=""]',Cl=`${Fs}:not([aria-disabled="true"])`,Jo="cmdk-item-select",wt="data-value",fm=(t,e,n)=>O5(t,e,n),pf=T.createContext(void 0),ur=()=>T.useContext(pf),gf=T.createContext(void 0),js=()=>T.useContext(gf),vf=T.createContext(void 0),mf=T.forwardRef((t,e)=>{let n=ln(()=>{var k,I;return{search:"",value:(I=(k=t.value)!=null?k:t.defaultValue)!=null?I:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=ln(()=>new Set),i=ln(()=>new Map),o=ln(()=>new Map),s=ln(()=>new Set),a=yf(t),{label:l,children:u,value:c,onValueChange:f,filter:p,shouldFilter:g,loop:b,disablePointerSelection:h=!1,vimBindings:m=!0,...v}=t,C=st(),w=st(),P=st(),x=T.useRef(null),D=Em();Kt(()=>{if(c!==void 0){let k=c.trim();n.current.value=k,_.emit()}},[c]),Kt(()=>{D(6,E)},[]);let _=T.useMemo(()=>({subscribe:k=>(s.current.add(k),()=>s.current.delete(k)),snapshot:()=>n.current,setState:(k,I,A)=>{var M,W,U;if(!Object.is(n.current[k],I)){if(n.current[k]=I,k==="search")H(),F(),D(1,N);else if(k==="value"&&(A||D(5,E),((M=a.current)==null?void 0:M.value)!==void 0)){let K=I??"";(U=(W=a.current).onValueChange)==null||U.call(W,K);return}_.emit()}},emit:()=>{s.current.forEach(k=>k())}}),[]),S=T.useMemo(()=>({value:(k,I,A)=>{var M;I!==((M=o.current.get(k))==null?void 0:M.value)&&(o.current.set(k,{value:I,keywords:A}),n.current.filtered.items.set(k,R(I,A)),D(2,()=>{F(),_.emit()}))},item:(k,I)=>(r.current.add(k),I&&(i.current.has(I)?i.current.get(I).add(k):i.current.set(I,new Set([k]))),D(3,()=>{H(),F(),n.current.value||N(),_.emit()}),()=>{o.current.delete(k),r.current.delete(k),n.current.filtered.items.delete(k);let A=O();D(4,()=>{H(),(A==null?void 0:A.getAttribute("id"))===k&&N(),_.emit()})}),group:k=>(i.current.has(k)||i.current.set(k,new Set),()=>{o.current.delete(k),i.current.delete(k)}),filter:()=>a.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:C,inputId:P,labelId:w,listInnerRef:x}),[]);function R(k,I){var A,M;let W=(M=(A=a.current)==null?void 0:A.filter)!=null?M:fm;return k?W(k,n.current.search,I):0}function F(){if(!n.current.search||a.current.shouldFilter===!1)return;let k=n.current.filtered.items,I=[];n.current.filtered.groups.forEach(M=>{let W=i.current.get(M),U=0;W.forEach(K=>{let X=k.get(K);U=Math.max(X,U)}),I.push([M,U])});let A=x.current;z().sort((M,W)=>{var U,K;let X=M.getAttribute("id"),te=W.getAttribute("id");return((U=k.get(te))!=null?U:0)-((K=k.get(X))!=null?K:0)}).forEach(M=>{let W=M.closest(lo);W?W.appendChild(M.parentElement===W?M:M.closest(`${lo} > *`)):A.appendChild(M.parentElement===A?M:M.closest(`${lo} > *`))}),I.sort((M,W)=>W[1]-M[1]).forEach(M=>{var W;let U=(W=x.current)==null?void 0:W.querySelector(`${Mn}[${wt}="${encodeURIComponent(M[0])}"]`);U==null||U.parentElement.appendChild(U)})}function N(){let k=z().find(A=>A.getAttribute("aria-disabled")!=="true"),I=k==null?void 0:k.getAttribute(wt);_.setState("value",I||void 0)}function H(){var k,I,A,M;if(!n.current.search||a.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 K=(I=(k=o.current.get(U))==null?void 0:k.value)!=null?I:"",X=(M=(A=o.current.get(U))==null?void 0:A.keywords)!=null?M:[],te=R(K,X);n.current.filtered.items.set(U,te),te>0&&W++}for(let[U,K]of i.current)for(let X of K)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(U);break}n.current.filtered.count=W}function E(){var k,I,A;let M=O();M&&(((k=M.parentElement)==null?void 0:k.firstChild)===M&&((A=(I=M.closest(Mn))==null?void 0:I.querySelector(dm))==null||A.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function O(){var k;return(k=x.current)==null?void 0:k.querySelector(`${Fs}[aria-selected="true"]`)}function z(){var k;return Array.from(((k=x.current)==null?void 0:k.querySelectorAll(Cl))||[])}function G(k){let I=z()[k];I&&_.setState("value",I.getAttribute(wt))}function V(k){var I;let A=O(),M=z(),W=M.findIndex(K=>K===A),U=M[W+k];(I=a.current)!=null&&I.loop&&(U=W+k<0?M[M.length-1]:W+k===M.length?M[0]:M[W+k]),U&&_.setState("value",U.getAttribute(wt))}function L(k){let I=O(),A=I==null?void 0:I.closest(Mn),M;for(;A&&!M;)A=k>0?Cm(A,Mn):wm(A,Mn),M=A==null?void 0:A.querySelector(Cl);M?_.setState("value",M.getAttribute(wt)):V(k)}let Y=()=>G(z().length-1),j=k=>{k.preventDefault(),k.metaKey?Y():k.altKey?L(1):V(1)},B=k=>{k.preventDefault(),k.metaKey?G(0):k.altKey?L(-1):V(-1)};return T.createElement(Se.div,{ref:e,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:k=>{var I;if((I=v.onKeyDown)==null||I.call(v,k),!k.defaultPrevented)switch(k.key){case"n":case"j":{m&&k.ctrlKey&&j(k);break}case"ArrowDown":{j(k);break}case"p":case"k":{m&&k.ctrlKey&&B(k);break}case"ArrowUp":{B(k);break}case"Home":{k.preventDefault(),G(0);break}case"End":{k.preventDefault(),Y();break}case"Enter":if(!k.nativeEvent.isComposing&&k.keyCode!==229){k.preventDefault();let A=O();if(A){let M=new Event(Jo);A.dispatchEvent(M)}}}}},T.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:$m},l),$i(t,k=>T.createElement(gf.Provider,{value:_},T.createElement(pf.Provider,{value:S},k))))}),hm=T.forwardRef((t,e)=>{var n,r;let i=st(),o=T.useRef(null),s=T.useContext(vf),a=ur(),l=yf(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Kt(()=>{if(!u)return a.item(i,s==null?void 0:s.id)},[u]);let c=bf(i,o,[t.value,t.children,o],t.keywords),f=js(),p=Ft(D=>D.value&&D.value===c.current),g=Ft(D=>u||a.filter()===!1?!0:D.search?D.filtered.items.get(i)>0:!0);T.useEffect(()=>{let D=o.current;if(!(!D||t.disabled))return D.addEventListener(Jo,b),()=>D.removeEventListener(Jo,b)},[g,t.onSelect,t.disabled]);function b(){var D,_;h(),(_=(D=l.current).onSelect)==null||_.call(D,c.current)}function h(){f.setState("value",c.current,!0)}if(!g)return null;let{disabled:m,value:v,onSelect:C,forceMount:w,keywords:P,...x}=t;return T.createElement(Se.div,{ref:tr([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!m,"aria-selected":!!p,"data-disabled":!!m,"data-selected":!!p,onPointerMove:m||a.getDisablePointerSelection()?void 0:h,onClick:m?void 0:b},t.children)}),pm=T.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,s=st(),a=T.useRef(null),l=T.useRef(null),u=st(),c=ur(),f=Ft(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);Kt(()=>c.group(s),[]),bf(s,a,[t.value,t.heading,l]);let p=T.useMemo(()=>({id:s,forceMount:i}),[i]);return T.createElement(Se.div,{ref:tr([a,e]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&T.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,g=>T.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},T.createElement(vf.Provider,{value:p},g))))}),gm=T.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=T.useRef(null),o=Ft(s=>!s.search);return!n&&!o?null:T.createElement(Se.div,{ref:tr([i,e]),...r,"cmdk-separator":"",role:"separator"})}),vm=T.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=js(),s=Ft(c=>c.search),a=Ft(c=>c.value),l=ur(),u=T.useMemo(()=>{var c;let f=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Fs}[${wt}="${encodeURIComponent(a)}"]`);return f==null?void 0:f.getAttribute("id")},[]);return T.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),T.createElement(Se.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:s,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),mm=T.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=T.useRef(null),s=T.useRef(null),a=ur();return T.useEffect(()=>{if(s.current&&o.current){let l=s.current,u=o.current,c,f=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(c),f.unobserve(l)}}},[]),T.createElement(Se.div,{ref:tr([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:a.listId},$i(t,l=>T.createElement("div",{ref:tr([s,a.listInnerRef]),"cmdk-list-sizer":""},l)))}),ym=T.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:s,...a}=t;return T.createElement(am,{open:n,onOpenChange:r},T.createElement(lm,{container:s},T.createElement(um,{"cmdk-overlay":"",className:i}),T.createElement(cm,{"aria-label":t.label,"cmdk-dialog":"",className:o},T.createElement(mf,{ref:e,...a}))))}),bm=T.forwardRef((t,e)=>Ft(n=>n.filtered.count===0)?T.createElement(Se.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),Sm=T.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return T.createElement(Se.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,s=>T.createElement("div",{"aria-hidden":!0},s)))}),er=Object.assign(mf,{List:mm,Item:hm,Input:vm,Group:pm,Separator:gm,Dialog:ym,Empty:bm,Loading:Sm});function Cm(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function wm(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function yf(t){let e=T.useRef(t);return Kt(()=>{e.current=t}),e}var Kt=typeof window>"u"?T.useEffect:T.useLayoutEffect;function ln(t){let e=T.useRef();return e.current===void 0&&(e.current=t()),e}function tr(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Ft(t){let e=js(),n=()=>t(e.snapshot());return ms.useSyncExternalStore(e.subscribe,n,n)}function bf(t,e,n,r=[]){let i=T.useRef(),o=ur();return Kt(()=>{var s;let a=(()=>{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,a,l),(s=e.current)==null||s.setAttribute(wt,a),i.current=a}),i}var Em=()=>{let[t,e]=T.useState(),n=ln(()=>new Map);return Kt(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function xm(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&&T.isValidElement(e)?T.cloneElement(xm(e),{ref:e.ref},n(e.props.children)):n(e)}var $m={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})=>y.jsx("div",{className:Ve("c__horizontal-separator",{"with-padding":t})}),Sf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:s}=ae.useCunningham();return i?y.jsxs(y.Fragment,{children:[i,o&&y.jsx(Qo,{})]}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"quick-search-input-container",children:[!t&&y.jsx("span",{className:"material-icons",children:"search"}),t&&y.jsx("div",{children:y.jsx(Ns,{size:"md"})}),y.jsx(er.Input,{autoFocus:!0,"aria-label":s("Quick search input"),onClick:a=>{a.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&y.jsx(Qo,{withPadding:!0})]})},Tm=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},Cf=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:s,children:a})=>{const l=d.useRef(null);return y.jsx(y.Fragment,{children:y.jsx("div",{className:"quick-search-container",children:y.jsxs(er,{label:o,shouldFilter:!1,ref:l,children:[i&&y.jsx(Sf,{loading:r,withSeparator:Tm(a),inputValue:n,onFilter:t,placeholder:s,children:e}),y.jsx(er.List,{children:y.jsx("div",{children:a})})]})})})},Ar=({children:t,onSelect:e,id:n})=>y.jsx(er.Item,{value:n,onSelect:e,children:t}),wf=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:y.jsx("div",{className:"pt-base",children:y.jsxs(er.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,s)=>y.jsx(Ar,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${s}`)),t.elements.map((o,s)=>y.jsx(Ar,{id:`${t.groupName}-element-${s}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${s}`)),(i=t.endActions)==null?void 0:i.map((o,s)=>y.jsx(Ar,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${s}`)),t.emptyString&&t.elements.length===0&&y.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Ti=({alwaysShowRight:t=!1,left:e,right:n})=>{const{isDesktop:r}=_n();return y.jsxs("div",{className:"c__quick-search-item-template",children:[y.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&y.jsx("div",{className:Ve("c__quick-search-item-template__right",{"always-show-right":t,"show-right-on-focus":!t}),children:n})]})},Pm=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:y.jsx("div",{className:Ve("c__tabs",{"c__tabs__full-width":n}),children:y.jsxs(Cg,{defaultSelectedKey:e,children:[y.jsx(Eg,{"aria-label":"History of Ancient Rome",children:t.map(r=>y.jsxs($g,{id:r.id,children:[r.icon&&y.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>y.jsx(Tg,{id:r.id,children:r.content},r.id))]})}),Ef=d.createContext(null);function Oe(){const t=d.useContext(Ef);if(t===null)throw new Error("No Tree Api Provided");return t}const xf=d.createContext(null);function _m(){const t=d.useContext(xf);if(t===null)throw new Error("Provide a NodesContext");return t}const $f=d.createContext(null);function Dm(){const t=d.useContext($f);if(t===null)throw new Error("Provide a DnDContext");return t}const Tf=d.createContext(0);function Pf(){d.useContext(Tf)}function Kr(t,e,n){return Math.max(Math.min(t,n),e)}function _f(t){return t&&t.isLeaf}function Df(t){return t&&t.isInternal&&!t.isOpen}function Of(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const If=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},kf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Om(){}function Hs(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Hs(n,e);if(r)return r}return null}function ai(t,e){if(e(t),t.children)for(let n of t.children)ai(n,e)}function Nf(t){const e=Lf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Im(e,r);break}n==null||n.focus()}function Rf(t){const e=Lf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=km(e,r);break}n==null||n.focus()}function Im(t,e){return e+1<t.length?t[e+1]:t[0]}function km(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Lf(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 Bn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function Mf(t){return t===null?null:Et(t)}function Et(t){return typeof t=="string"?t:t.id}function Nm(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Af(t,...e){if(t)return t(...e)}function Kf(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function Ff(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 jf(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const Rm=Object.freeze(Object.defineProperty({__proto__:null,access:Bn,bound:Kr,dfs:Hs,focusNextElement:Nf,focusPrevElement:Rf,getInsertIndex:Ff,getInsertParentId:jf,identify:Et,identifyNull:Mf,indexOf:kf,isClosed:Df,isDescendant:If,isItem:_f,isOpenWithEmptyChildren:Of,mergeRefs:Nm,noop:Om,safeRun:Af,waitFor:Kf,walk:ai},Symbol.toStringTag,{value:"Module"})),Lm={display:"flex",alignItems:"center",zIndex:1},Mm={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},Am={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},Km=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 y.jsxs("div",{style:Object.assign(Object.assign({},Lm),i),children:[y.jsx("div",{style:Object.assign({},Am)}),y.jsx("div",{style:Object.assign({},Mm)})]})});function Fm({node:t,attrs:e,innerRef:n,children:r}){return y.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function jm(t){return y.jsxs("div",{ref:t.dragHandle,style:t.style,children:[y.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?y.jsx(zm,Object.assign({},t)):y.jsx(Hm,Object.assign({},t))]})}function Hm(t){return y.jsx(y.Fragment,{children:y.jsx("span",{children:t.node.data.name})})}function zm({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()},[]),y.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 uo(t){return{type:"EDIT",id:t}}function Bm(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 Vm(){return{type:"TREE_BLUR"}}function Wm(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 li{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===nr}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 li(Object.assign({},this))}edit(){return this.tree.edit(this)}}const nr="__REACT_ARBORIST_INTERNAL_ROOT__";function wl(t){var e;function n(o,s,a){const l=t.accessId(o),u=new li({tree:t,data:o,level:s,parent:a,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(f=>n(f,s+1,u))),u}const r=new li({tree:t,id:nr,data:{id:nr},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 es={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 El(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 Um(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:El(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:El(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}}},je={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 Gm(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 qm(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 Ym={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},Zm=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},Xm=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Hf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return y.jsxs(Jm,{isDragging:i,children:[y.jsx(Qm,{offset:t,children:y.jsx(t1,{id:n,dragIds:r})}),y.jsx(e1,{mouse:e,count:r.length})]})}const Jm=d.memo(function(e){return e.isDragging?y.jsx("div",{style:Ym,children:e.children}):null});function Qm(t){return y.jsx("div",{className:"row preview",style:Zm(t.offset),children:t.children})}function e1(t){const{count:e,mouse:n}=t;return e>1?y.jsx("div",{className:"selected-count",style:Xm(n),children:e}):null}const t1=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?y.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function ts(){return ts=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},ts.apply(null,arguments)}function xl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ns(t,e){return ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ns(t,e)}function n1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ns(t,e)}var $l=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function r1(t,e){return!!(t===e||$l(t)&&$l(e))}function i1(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!r1(t[n],e[n]))return!1;return!0}function co(t,e){e===void 0&&(e=i1);var n,r=[],i,o=!1;function s(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&e(a,r)||(i=t.apply(this,a),o=!0,n=this,r=a),i}return s}var o1=typeof performance=="object"&&typeof performance.now=="function",Tl=o1?function(){return performance.now()}:function(){return Date.now()};function Pl(t){cancelAnimationFrame(t.id)}function s1(t,e){var n=Tl();function r(){Tl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var fo=-1;function _l(t){if(t===void 0&&(t=!1),fo===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),fo=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return fo}var Jt=null;function Dl(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 a1=150,l1=function(e,n){return e},Fr=null,jr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Fr=new WeakSet,jr=new WeakSet);function u1(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,s=t.getStartIndexForOffset,a=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(f){n1(p,f);function p(b){var h;return h=f.call(this,b)||this,h._instanceProps=l(h.props,xl(h)),h._outerRef=void 0,h._resetIsScrollingTimeoutId=null,h.state={instance:xl(h),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof h.props.initialScrollOffset=="number"?h.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},h._callOnItemsRendered=void 0,h._callOnItemsRendered=co(function(m,v,C,w){return h.props.onItemsRendered({overscanStartIndex:m,overscanStopIndex:v,visibleStartIndex:C,visibleStopIndex:w})}),h._callOnScroll=void 0,h._callOnScroll=co(function(m,v,C){return h.props.onScroll({scrollDirection:m,scrollOffset:v,scrollUpdateWasRequested:C})}),h._getItemStyle=void 0,h._getItemStyle=function(m){var v=h.props,C=v.direction,w=v.itemSize,P=v.layout,x=h._getItemStyleCache(u&&w,u&&P,u&&C),D;if(x.hasOwnProperty(m))D=x[m];else{var _=n(h.props,m,h._instanceProps),S=i(h.props,m,h._instanceProps),R=C==="horizontal"||P==="horizontal",F=C==="rtl",N=R?_:0;x[m]=D={position:"absolute",left:F?void 0:N,right:F?N:void 0,top:R?0:_,height:R?"100%":S,width:R?S:"100%"}}return D},h._getItemStyleCache=void 0,h._getItemStyleCache=co(function(m,v,C){return{}}),h._onScrollHorizontal=function(m){var v=m.currentTarget,C=v.clientWidth,w=v.scrollLeft,P=v.scrollWidth;h.setState(function(x){if(x.scrollOffset===w)return null;var D=h.props.direction,_=w;if(D==="rtl")switch(Dl()){case"negative":_=-w;break;case"positive-descending":_=P-C-w;break}return _=Math.max(0,Math.min(_,P-C)),{isScrolling:!0,scrollDirection:x.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},h._resetIsScrollingDebounced)},h._onScrollVertical=function(m){var v=m.currentTarget,C=v.clientHeight,w=v.scrollHeight,P=v.scrollTop;h.setState(function(x){if(x.scrollOffset===P)return null;var D=Math.max(0,Math.min(P,w-C));return{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},h._resetIsScrollingDebounced)},h._outerRefSetter=function(m){var v=h.props.outerRef;h._outerRef=m,typeof v=="function"?v(m):v!=null&&typeof v=="object"&&v.hasOwnProperty("current")&&(v.current=m)},h._resetIsScrollingDebounced=function(){h._resetIsScrollingTimeoutId!==null&&Pl(h._resetIsScrollingTimeoutId),h._resetIsScrollingTimeoutId=s1(h._resetIsScrolling,a1)},h._resetIsScrolling=function(){h._resetIsScrollingTimeoutId=null,h.setState({isScrolling:!1},function(){h._getItemStyleCache(-1,null)})},h}p.getDerivedStateFromProps=function(h,m){return c1(h,m),c(h),null};var g=p.prototype;return g.scrollTo=function(h){h=Math.max(0,h),this.setState(function(m){return m.scrollOffset===h?null:{scrollDirection:m.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(h,m){m===void 0&&(m="auto");var v=this.props,C=v.itemCount,w=v.layout,P=this.state.scrollOffset;h=Math.max(0,Math.min(h,C-1));var x=0;if(this._outerRef){var D=this._outerRef;w==="vertical"?x=D.scrollWidth>D.clientWidth?_l():0:x=D.scrollHeight>D.clientHeight?_l():0}this.scrollTo(o(this.props,h,m,P,this._instanceProps,x))},g.componentDidMount=function(){var h=this.props,m=h.direction,v=h.initialScrollOffset,C=h.layout;if(typeof v=="number"&&this._outerRef!=null){var w=this._outerRef;m==="horizontal"||C==="horizontal"?w.scrollLeft=v:w.scrollTop=v}this._callPropsCallbacks()},g.componentDidUpdate=function(){var h=this.props,m=h.direction,v=h.layout,C=this.state,w=C.scrollOffset,P=C.scrollUpdateWasRequested;if(P&&this._outerRef!=null){var x=this._outerRef;if(m==="horizontal"||v==="horizontal")if(m==="rtl")switch(Dl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var D=x.clientWidth,_=x.scrollWidth;x.scrollLeft=_-D-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Pl(this._resetIsScrollingTimeoutId)},g.render=function(){var h=this.props,m=h.children,v=h.className,C=h.direction,w=h.height,P=h.innerRef,x=h.innerElementType,D=h.innerTagName,_=h.itemCount,S=h.itemData,R=h.itemKey,F=R===void 0?l1:R,N=h.layout,H=h.outerElementType,E=h.outerTagName,O=h.style,z=h.useIsScrolling,G=h.width,V=this.state.isScrolling,L=C==="horizontal"||N==="horizontal",Y=L?this._onScrollHorizontal:this._onScrollVertical,j=this._getRangeToRender(),B=j[0],k=j[1],I=[];if(_>0)for(var A=B;A<=k;A++)I.push(d.createElement(m,{data:S,key:F(A,S),index:A,isScrolling:z?V:void 0,style:this._getItemStyle(A)}));var M=r(this.props,this._instanceProps);return d.createElement(H||E||"div",{className:v,onScroll:Y,ref:this._outerRefSetter,style:ts({position:"relative",height:w,width:G,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:C},O)},d.createElement(x||D||"div",{children:I,ref:P,style:{height:L?"100%":M,pointerEvents:V?"none":void 0,width:L?M:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var h=this.props.itemCount;if(h>0){var m=this._getRangeToRender(),v=m[0],C=m[1],w=m[2],P=m[3];this._callOnItemsRendered(v,C,w,P)}}if(typeof this.props.onScroll=="function"){var x=this.state,D=x.scrollDirection,_=x.scrollOffset,S=x.scrollUpdateWasRequested;this._callOnScroll(D,_,S)}},g._getRangeToRender=function(){var h=this.props,m=h.itemCount,v=h.overscanCount,C=this.state,w=C.isScrolling,P=C.scrollDirection,x=C.scrollOffset;if(m===0)return[0,0,0,0];var D=s(this.props,x,this._instanceProps),_=a(this.props,D,x,this._instanceProps),S=!w||P==="backward"?Math.max(1,v):1,R=!w||P==="forward"?Math.max(1,v):1;return[Math.max(0,D-S),Math.max(0,Math.min(m-1,_+R)),D,_]},p}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var c1=function(e,n){var r=e.children,i=e.direction,o=e.height,s=e.layout,a=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(a!=null||l!=null)&&jr&&!jr.has(c)&&(jr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var f=i==="horizontal"||s==="horizontal";switch(i){case"horizontal":case"vertical":Fr&&!Fr.has(c)&&(Fr.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(s){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+s+'" 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(f&&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(!f&&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.'))}},d1=u1({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,s){var a=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,f=e.layout,p=e.width,g=a==="horizontal"||f==="horizontal",b=g?p:l,h=Math.max(0,u*c-b),m=Math.min(h,n*c),v=Math.max(0,n*c-b+c+s);switch(r==="smart"&&(i>=v-b&&i<=m+b?r="auto":r="center"),r){case"start":return m;case"end":return v;case"center":{var C=Math.round(v+(m-v)/2);return C<Math.ceil(b/2)?0:C>h+Math.floor(b/2)?h:C}case"auto":default:return i>=v&&i<=m?i:i<v?v:m}},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,s=e.itemCount,a=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",f=n*a,p=c?u:o,g=Math.ceil((p+r-f)/a);return Math.max(0,Math.min(s-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 f1(){var t,e;const n=Oe(),i=Dm().cursor;if(!i||i.type!=="line")return null;const o=n.indent,s=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),a=o*i.level,l=n.renderCursor;return y.jsx(l,{top:s,left:a,indent:o})}var h1=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 p1=d.forwardRef(function(e,n){const{children:r}=e,i=h1(e,["children"]),o=Oe();return y.jsxs("div",Object.assign({ref:n},i,{onClick:s=>{s.currentTarget===s.target&&o.deselectAll()},children:[y.jsx(g1,{}),r]}))}),g1=()=>{const t=Oe();return y.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:y.jsx(f1,{})})};var v1=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 m1=d.forwardRef(function(e,n){var r,i,o,s,{style:a}=e,l=v1(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,f=(s=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&s!==void 0?s:0;return y.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},a),{height:`${parseFloat(a.height)+c+f}px`})},l))});var zf=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 s=0;o=new Error(e.replace(/%s/g,function(){return r[s++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var zs="dnd-core/INIT_COORDS",Pi="dnd-core/BEGIN_DRAG",Bs="dnd-core/PUBLISH_DRAG_SOURCE",_i="dnd-core/HOVER",Di="dnd-core/DROP",Oi="dnd-core/END_DRAG";function Ol(t,e){return{type:zs,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}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 y1(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function b1(t,e){return t.filter(function(n){return n!==e})}function Bf(t){return Hr(t)==="object"}function S1(t,e){var n=new Map,r=function(s){n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,s){o===1&&i.push(s)}),i}function C1(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var w1={type:zs,payload:{clientOffset:null,sourceClientOffset:null}};function E1(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,s=r.clientOffset,a=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(Ol(s)),x1(n,l,u);var c=P1(n,l);if(c===null){t.dispatch(w1);return}var f=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");$1(a),f=a(c)}t.dispatch(Ol(s,f));var p=u.getSource(c),g=p.beginDrag(l,c);if(g!=null){T1(g),u.pinSource(c);var b=u.getSourceType(c);return{type:Pi,payload:{itemType:b,item:g,sourceId:c,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}}function x1(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 $1(t){J(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function T1(t){J(Bf(t),"Item must be an object.")}function P1(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 _1(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Bs}}}function rs(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function D1(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;O1(n);var o=n.slice(0),s=t.getMonitor(),a=t.getRegistry();I1(o,s,a);var l=s.getItemType();return k1(o,a,l),N1(o,s,a),{type:_i,payload:{targetIds:o,clientOffset:i||null}}}}function O1(t){J(Array.isArray(t),"Expected targetIds to be an array.")}function I1(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 k1(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);rs(o,n)||t.splice(r,1)}}function N1(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}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 kl(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){R1(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 R1(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L1(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();M1(r);var o=F1(r);o.forEach(function(s,a){var l=A1(s,a,i,r),u={type:Di,payload:{dropResult:kl(kl({},n),l)}};t.dispatch(u)})}}function M1(t){J(t.isDragging(),"Cannot call drop while not dragging."),J(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function A1(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return K1(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function K1(t){J(typeof t>"u"||Bf(t),"Drop result must either be an object or undefined.")}function F1(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function j1(t){return function(){var n=t.getMonitor(),r=t.getRegistry();H1(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Oi}}}function H1(t){J(t.isDragging(),"Cannot call endDrag while not dragging.")}function z1(t){return{beginDrag:E1(t),publishDragSource:_1(t),hover:D1(t),drop:L1(t),endDrag:j1(t)}}function B1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V1(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 W1(t,e,n){return V1(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 U1=function(){function t(e,n){var r=this;B1(this,t),An(this,"store",void 0),An(this,"monitor",void 0),An(this,"backend",void 0),An(this,"isSetUp",!1),An(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 W1(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(s){return function(){for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];var c=s.apply(n,l);typeof c<"u"&&r(c)}}var o=z1(this);return Object.keys(o).reduce(function(s,a){var l=o[a];return s[a]=i(l),s},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function ke(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 Nl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ho=function(){return Math.random().toString(36).substring(7).split("").join(".")},Rl={INIT:"@@redux/INIT"+ho(),REPLACE:"@@redux/REPLACE"+ho(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ho()}};function G1(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 q1(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(X1(t))return"date";if(Z1(t))return"error";var n=Y1(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 Y1(t){return typeof t.constructor=="function"?t.constructor.name:null}function Z1(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function X1(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=q1(t)),e}function Vf(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"?ke(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"?ke(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(Vf)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?ke(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?ke(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 f(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?ke(4):"Expected the listener to be a function. Instead, received: '"+Qt(h)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ke(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 m=!0;return u(),a.push(h),function(){if(m){if(l)throw new Error(process.env.NODE_ENV==="production"?ke(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();var C=a.indexOf(h);a.splice(C,1),s=null}}}function p(h){if(!G1(h))throw new Error(process.env.NODE_ENV==="production"?ke(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(h)+"'. 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 h.type>"u")throw new Error(process.env.NODE_ENV==="production"?ke(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"?ke(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,h)}finally{l=!1}for(var m=s=a,v=0;v<m.length;v++){var C=m[v];C()}return h}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?ke(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(h));i=h,p({type:Rl.REPLACE})}function b(){var h,m=f;return h={subscribe:function(C){if(typeof C!="object"||C===null)throw new Error(process.env.NODE_ENV==="production"?ke(11):"Expected the observer to be an object. Instead, received: '"+Qt(C)+"'");function w(){C.next&&C.next(c())}w();var P=m(w);return{unsubscribe:P}}},h[Nl]=function(){return this},h}return p({type:Rl.INIT}),r={dispatch:p,subscribe:f,getState:c,replaceReducer:g},r[Nl]=b,r}var J1=function(e,n){return e===n};function Q1(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ey(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J1;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 Ll(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 Ml(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ll(Object(n),!0).forEach(function(r){ty(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Al={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ny(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Al,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case zs:case Pi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case _i:return Q1(t.clientOffset,n.clientOffset)?t:Ml(Ml({},t),{},{clientOffset:n.clientOffset});case Oi:case Di:return Al;default:return t}}var Vs="dnd-core/ADD_SOURCE",Ws="dnd-core/ADD_TARGET",Us="dnd-core/REMOVE_SOURCE",Ii="dnd-core/REMOVE_TARGET";function ry(t){return{type:Vs,payload:{sourceId:t}}}function iy(t){return{type:Ws,payload:{targetId:t}}}function oy(t){return{type:Us,payload:{sourceId:t}}}function sy(t){return{type:Ii,payload:{targetId:t}}}function Kl(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 Ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kl(Object(n),!0).forEach(function(r){ay(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ay(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ly={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function uy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ly,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Pi:return Ne(Ne({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Bs:return Ne(Ne({},t),{},{isSourcePublic:!0});case _i:return Ne(Ne({},t),{},{targetIds:n.targetIds});case Ii:return t.targetIds.indexOf(n.targetId)===-1?t:Ne(Ne({},t),{},{targetIds:b1(t.targetIds,n.targetId)});case Di:return Ne(Ne({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Oi:return Ne(Ne({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function cy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Vs:case Ws:return t+1;case Us:case Ii:return t-1;default:return t}}var ui=[],Gs=[];ui.__IS_NONE__=!0;Gs.__IS_ALL__=!0;function dy(t,e){if(t===ui)return!1;if(t===Gs||typeof e>"u")return!0;var n=C1(e,t);return n.length>0}function fy(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _i:break;case Vs:case Ws:case Ii:case Us:return ui;case Pi:case Bs:case Oi:case Di:default:return Gs}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,s=S1(r,o),a=s.length>0||!ey(r,o);if(!a)return ui;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&s.push(l),u&&s.push(u)),s}function hy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function Fl(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 jl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fl(Object(n),!0).forEach(function(r){py(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function py(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:fy(t.dirtyHandlerIds,{type:e.type,payload:jl(jl({},e.payload),{},{prevTargetIds:y1(t,"dragOperation.targetIds",[])})}),dragOffset:ny(t.dragOffset,e),refCount:cy(t.refCount,e),dragOperation:uy(t.dragOperation,e),stateId:hy(t.stateId)}}function vy(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Wf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function my(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:Wf(vy(e,r),n)}function yy(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:Wf(e,n)}function by(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sy(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 Cy(t,e,n){return Sy(t.prototype,e),t}function Hl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wy=function(){function t(e,n){by(this,t),Hl(this,"store",void 0),Hl(this,"registry",void 0),this.store=e,this.registry=n}return Cy(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 s=this.store.getState().stateId,a=function(){var u=r.store.getState(),c=u.stateId;try{var f=c===s||c===s+1&&!dy(u.dirtyHandlerIds,o);f||n()}finally{s=c}};return this.store.subscribe(a)}},{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 a=r.store.getState().dragOffset;a!==i&&(i=a,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 rs(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),s=this.getItemType();if(s&&!rs(o,s))return!1;var a=this.getTargetIds();if(!a.length)return!1;var l=a.indexOf(n);return i?l===a.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 my(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return yy(this.store.getState().dragOffset)}}]),t}(),Ey=0;function xy(){return Ey++}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 $y(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 Ty(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 is(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return is(n,!1)});return}J(typeof t=="string"||zr(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 zl=typeof global<"u"?global:self,Uf=zl.MutationObserver||zl.WebKitMutationObserver;function Gf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Py(t){let e=1;const n=new Uf(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const _y=typeof Uf=="function"?Py:Gf;class Dy{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=_y(this.flush),this.requestErrorThrow=Gf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Oy{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 Iy{create(e){const n=this.freeTasks,r=n.length?n.pop():new Oy(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const qf=new Dy,ky=new Iy(qf.registerPendingError);function Ny(t){qf.enqueueTask(ky.create(t))}function Ry(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ly(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 My(t,e,n){return Ly(t.prototype,e),t}function en(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ay(t,e){return Hy(t)||jy(t,e)||Fy(t,e)||Ky()}function Ky(){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 Fy(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 jy(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Hy(t){if(Array.isArray(t))return t}function zy(t){var e=xy().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 Vl(t){switch(t[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:J(!1,"Cannot parse handler ID: ".concat(t))}}function Wl(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,s=Ay(i.value,2),a=s[1];if(a===e)return!0;r=!!o}while(!r);return!1}var By=function(){function t(e){Ry(this,t),en(this,"types",new Map),en(this,"dragSources",new Map),en(this,"dropTargets",new Map),en(this,"pinnedSourceId",null),en(this,"pinnedSource",null),en(this,"store",void 0),this.store=e}return My(t,[{key:"addSource",value:function(n,r){is(n),$y(r);var i=this.addHandler(Me.SOURCE,n,r);return this.store.dispatch(ry(i)),i}},{key:"addTarget",value:function(n,r){is(n,!0),Ty(r);var i=this.addHandler(Me.TARGET,n,r);return this.store.dispatch(iy(i)),i}},{key:"containsHandler",value:function(n){return Wl(this.dragSources,n)||Wl(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=Vl(n);return r===Me.SOURCE}},{key:"isTargetId",value:function(n){var r=Vl(n);return r===Me.TARGET}},{key:"removeSource",value:function(n){var r=this;J(this.getSource(n),"Expected an existing source."),this.store.dispatch(oy(n)),Ny(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(sy(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=zy(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 Vy(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=Wy(r),o=new wy(i,new By(i)),s=new U1(i,o),a=t(s,e,n);return s.receiveBackend(a),s}function Wy(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Vf(gy,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var Uy=["children"];function Gy(t,e){return Xy(t)||Zy(t,e)||Yy(t,e)||qy()}function qy(){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 Yy(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 Zy(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Xy(t){if(Array.isArray(t))return t}function Jy(t,e){if(t==null)return{};var n=Qy(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 Qy(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 Gl=0,Br=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),eb=d.memo(function(e){var n=e.children,r=Jy(e,Uy),i=tb(r),o=Gy(i,2),s=o[0],a=o[1];return d.useEffect(function(){if(a){var l=Yf();return++Gl,function(){--Gl===0&&(l[Br]=null)}}},[]),y.jsx(zf.Provider,Object.assign({value:s},{children:n}),void 0)});function tb(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=nb(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function nb(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yf(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[Br]||(i[Br]={dragDropManager:Vy(t,e,n,r)}),i[Br]}function Yf(){return typeof global<"u"?global:window}function rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ib(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 ob(t,e,n){return ib(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 po=!1,go=!1,sb=function(){function t(e){rb(this,t),ql(this,"internalMonitor",void 0),ql(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return ob(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){J(!po,"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 po=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{po=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;J(!go,"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 go=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{go=!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 ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lb(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 ub(t,e,n){return lb(t.prototype,e),t}function Yl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vo=!1,cb=function(){function t(e){ab(this,t),Yl(this,"internalMonitor",void 0),Yl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return ub(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(!vo,"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 vo=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{vo=!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 db(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 fb(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;db(i);var o=n?function(s){return t(s,n)}:t;return hb(i,o)}}function Zf(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=fb(r);e[n]=function(){return i}}}),e}function Zl(t,e){typeof t=="function"?t(e):t.current=e}function hb(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){Zl(n,i),Zl(e,i)}}):d.cloneElement(t,{ref:e})}function Vr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vr=function(n){return typeof n}:Vr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vr(t)}function os(t){return t!==null&&Vr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ss(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),s=Object.keys(e);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!a(u))return!1;var c=t[u],f=e[u];if(i=void 0,i===!1||i===void 0&&c!==f)return!1}return!0}function pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gb(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 vb(t,e,n){return gb(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 mb=function(){function t(e){var n=this;pb(this,t),we(this,"hooks",Zf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,os(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,os(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 vb(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!ss(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ss(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 yb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bb(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 Sb(t,e,n){return bb(t.prototype,e),t}function qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Cb=function(){function t(e){var n=this;yb(this,t),qe(this,"hooks",Zf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,os(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),qe(this,"handlerId",null),qe(this,"dropTargetRef",null),qe(this,"dropTargetNode",void 0),qe(this,"dropTargetOptionsInternal",null),qe(this,"unsubscribeDropTarget",void 0),qe(this,"lastConnectedHandlerId",null),qe(this,"lastConnectedDropTarget",null),qe(this,"lastConnectedDropTargetOptions",null),qe(this,"backend",void 0),this.backend=e}return Sb(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!ss(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 wb(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function Eb(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var jt=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Wr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wr=function(n){return typeof n}:Wr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wr(t)}function xb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $b(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 Tb(t,e,n){return $b(t.prototype,e),t}function mo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pb=function(){function t(e,n,r){xb(this,t),mo(this,"spec",void 0),mo(this,"monitor",void 0),mo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return Tb(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Wr(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,s=i.isDragging;return s?s(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 _b(t,e,n){var r=d.useMemo(function(){return new Pb(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Bt(){var t=d.useContext(zf),e=t.dragDropManager;return J(e!=null,"Expected drag drop context"),e}function Db(t){return d.useMemo(function(){var e=t.type;return J(e!=null,"spec.type must be defined"),e},[t])}function Ob(t,e){return Rb(t)||Nb(t,e)||kb(t,e)||Ib()}function Ib(){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 kb(t,e){if(t){if(typeof t=="string")return Xl(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 Xl(t,e)}}function Xl(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 Nb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Rb(t){if(Array.isArray(t))return t}function Lb(t,e,n){var r=Bt(),i=_b(t,e,n),o=Db(t);jt(function(){if(o!=null){var a=Eb(o,i,r),l=Ob(a,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,e,n,i,o])}function Mb(t){return jb(t)||Fb(t)||Kb(t)||Ab()}function Ab(){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 Kb(t,e){if(t){if(typeof t=="string")return as(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 as(t,e)}}function Fb(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jb(t){if(Array.isArray(t))return as(t)}function as(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 Xf(t,e){var n=Mb(e||[]);return e==null&&typeof t!="function"&&n.push(t),d.useMemo(function(){return typeof t=="function"?t():t},n)}function Hb(){var t=Bt();return d.useMemo(function(){return new sb(t)},[t])}function zb(t,e){var n=Bt(),r=d.useMemo(function(){return new mb(n.getBackend())},[n]);return jt(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),jt(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var yo,Jl;function Bb(){return Jl||(Jl=1,yo=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 s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),yo}var Vb=Bb();const Wb=$0(Vb);function Ub(t,e){return Zb(t)||Yb(t,e)||qb(t,e)||Gb()}function Gb(){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 qb(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 Yb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Zb(t){if(Array.isArray(t))return t}function Jf(t,e,n){var r=d.useState(function(){return e(t)}),i=Ub(r,2),o=i[0],s=i[1],a=d.useCallback(function(){var l=e(t);Wb(o,l)||(s(l),n&&n())},[o,t,n]);return jt(a),[o,a]}function Xb(t,e){return t9(t)||e9(t,e)||Qb(t,e)||Jb()}function Jb(){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 Qb(t,e){if(t){if(typeof t=="string")return eu(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 eu(t,e)}}function eu(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 e9(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function t9(t){if(Array.isArray(t))return t}function n9(t,e,n){var r=Jf(t,e,n),i=Xb(r,2),o=i[0],s=i[1];return jt(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(s,{handlerIds:[l]})},[t,s]),o}function Qf(t,e,n){return n9(e,t||function(){return{}},function(){return n.reconnect()})}function r9(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function i9(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function o9(t,e){var n=Xf(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=Hb(),i=zb(n.options,n.previewOptions);return Lb(n,r,i),[Qf(n.collect,r,i),r9(i),i9(i)]}function s9(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 a9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l9(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 u9(t,e,n){return l9(t.prototype,e),t}function tu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c9=function(){function t(e,n){a9(this,t),tu(this,"spec",void 0),tu(this,"monitor",void 0),this.spec=e,this.monitor=n}return u9(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 d9(t,e){var n=d.useMemo(function(){return new c9(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function f9(t,e){return v9(t)||g9(t,e)||p9(t,e)||h9()}function h9(){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 p9(t,e){if(t){if(typeof t=="string")return nu(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 nu(t,e)}}function nu(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 g9(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function v9(t){if(Array.isArray(t))return t}function m9(t,e,n){var r=Bt(),i=d9(t,e),o=s9(t);jt(function(){var a=wb(o,i,r),l=f9(a,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,e,i,n,o.map(function(s){return s.toString()}).join("|")])}function y9(){var t=Bt();return d.useMemo(function(){return new cb(t)},[t])}function b9(t){var e=Bt(),n=d.useMemo(function(){return new Cb(e.getBackend())},[e]);return jt(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function S9(t){return d.useMemo(function(){return t.hooks.dropTarget()},[t])}function e0(t,e){var n=Xf(t,e),r=y9(),i=b9(n.options);return m9(n,r,i),[Qf(n.collect,r,i),S9(i)]}function C9(t,e){return $9(t)||x9(t,e)||E9(t,e)||w9()}function w9(){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 E9(t,e){if(t){if(typeof t=="string")return ru(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 ru(t,e)}}function ru(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 x9(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function $9(t){if(Array.isArray(t))return t}function T9(t){var e=Bt(),n=e.getMonitor(),r=Jf(n,t),i=C9(r,2),o=i[0],s=i[1];return d.useEffect(function(){return n.subscribeToOffsetChange(s)}),d.useEffect(function(){return n.subscribeToStateChange(s)}),o}function t0(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function P9(t,e){return t.filter(function(n){return n!==e})}function _9(t,e){var n=new Set,r=function(s){return n.add(s)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o){return i.push(o)}),i}function D9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O9(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 I9(t,e,n){return O9(t.prototype,e),t}function iu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var k9=function(){function t(e){D9(this,t),iu(this,"entered",[]),iu(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return I9(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,o=function(a){return r.isNodeInDocument(a)&&(!a.contains||a.contains(n))};return this.entered=_9(this.entered.filter(o),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=P9(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),N9=t0(function(){return/firefox/i.test(navigator.userAgent)}),n0=t0(function(){return!!window.safari});function R9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L9(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 M9(t,e,n){return L9(t.prototype,e),t}function Kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ou=function(){function t(e,n){R9(this,t),Kn(this,"xs",void 0),Kn(this,"ys",void 0),Kn(this,"c1s",void 0),Kn(this,"c2s",void 0),Kn(this,"c3s",void 0);for(var r=e.length,i=[],o=0;o<r;o++)i.push(o);i.sort(function(S,R){return e[S]<e[R]?-1:1});for(var s=[],a=[],l,u,c=0;c<r-1;c++)l=e[c+1]-e[c],u=n[c+1]-n[c],s.push(l),a.push(u/l);for(var f=[a[0]],p=0;p<s.length-1;p++){var g=a[p],b=a[p+1];if(g*b<=0)f.push(0);else{l=s[p];var h=s[p+1],m=l+h;f.push(3*m/((m+h)/g+(m+l)/b))}}f.push(a[a.length-1]);for(var v=[],C=[],w,P=0;P<f.length-1;P++){w=a[P];var x=f[P],D=1/s[P],_=x+f[P+1]-w-w;v.push((w-x-_)*D),C.push(_*D*D)}this.xs=e,this.ys=n,this.c1s=f,this.c2s=v,this.c3s=C}return M9(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,o=this.c1s,s=this.c2s,a=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var u=0,c=a.length-1,f;u<=c;){f=Math.floor(.5*(u+c));var p=r[f];if(p<n)u=f+1;else if(p>n)c=f-1;else return i[f]}l=Math.max(0,c);var g=n-r[l],b=g*g;return i[l]+o[l]*g+s[l]*b+a[l]*g*b}}]),t}(),A9=1;function r0(t){var e=t.nodeType===A9?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Or(t){return{x:t.clientX,y:t.clientY}}function K9(t){var e;return t.nodeName==="IMG"&&(N9()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function F9(t,e,n,r){var i=t?e.width:n,o=t?e.height:r;return n0()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function j9(t,e,n,r,i){var o=K9(e),s=o?t:e,a=r0(s),l={x:n.x-a.x,y:n.y-a.y},u=t.offsetWidth,c=t.offsetHeight,f=r.anchorX,p=r.anchorY,g=F9(o,e,u,c),b=g.dragPreviewWidth,h=g.dragPreviewHeight,m=function(){var _=new ou([0,.5,1],[l.y,l.y/c*h,l.y+h-c]),S=_.interpolate(p);return n0()&&o&&(S+=(window.devicePixelRatio-1)*h),S},v=function(){var _=new ou([0,.5,1],[l.x,l.x/u*b,l.x+b-u]);return _.interpolate(f)},C=i.offsetX,w=i.offsetY,P=C===0||C,x=w===0||w;return{x:P?C:v(),y:x?w:m()}}var i0="__NATIVE_FILE__",o0="__NATIVE_URL__",s0="__NATIVE_TEXT__",a0="__NATIVE_HTML__";const su=Object.freeze(Object.defineProperty({__proto__:null,FILE:i0,HTML:a0,TEXT:s0,URL:o0},Symbol.toStringTag,{value:"Module"}));function bo(t,e,n){var r=e.reduce(function(i,o){return i||t.getData(o)},"");return r??n}var tn;function Ir(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ls=(tn={},Ir(tn,i0,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Ir(tn,a0,{exposeProperties:{html:function(e,n){return bo(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Ir(tn,o0,{exposeProperties:{urls:function(e,n){return bo(e,n,"").split(`
100
+ `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Ir(tn,s0,{exposeProperties:{text:function(e,n){return bo(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),tn);function H9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z9(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 B9(t,e,n){return z9(t.prototype,e),t}function au(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var V9=function(){function t(e){H9(this,t),au(this,"item",void 0),au(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return B9(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 W9(t,e){var n=new V9(ls[t]);return n.loadDataTransfer(e),n}function So(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ls).filter(function(n){var r=ls[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function U9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G9(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 q9(t,e,n){return G9(t.prototype,e),t}function Co(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Y9=function(){function t(e,n){U9(this,t),Co(this,"ownerDocument",null),Co(this,"globalContext",void 0),Co(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return q9(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 lu(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 uu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lu(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Z9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X9(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 J9(t,e,n){return X9(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 Q9=function(){function t(e,n,r){var i=this;Z9(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 s=i.sourceNodes.get(o);return s&&r0(s)||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 s=i.dragStartSourceIds;i.dragStartSourceIds=null;var a=Or(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:a});var l=o.dataTransfer,u=So(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),f=i.sourceNodes.get(c),p=i.sourcePreviewNodes.get(c)||f;if(p){var g=i.getCurrentSourcePreviewNodeOptions(),b=g.anchorX,h=g.anchorY,m=g.offsetX,v=g.offsetY,C={anchorX:b,anchorY:h},w={offsetX:m,offsetY:v},P=j9(f,p,a,C,w);l.setDragImage(p,P.x,P.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 s=i.enterLeaveCounter.enter(o.target);if(!(!s||i.monitor.isDragging())){var a=o.dataTransfer,l=So(a);l&&i.beginDragNativeItem(l,a)}}),ne(this,"handleTopDragEnter",function(o){var s=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,s.length>0&&i.actions.hover(s,{clientOffset:Or(o)});var a=s.some(function(l){return i.monitor.canDropOnTarget(l)});a&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var s=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Or(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(s||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var a=(s||[]).some(function(l){return i.monitor.canDropOnTarget(l)});a?(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 s=i.enterLeaveCounter.leave(o.target);s&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var s;o.preventDefault(),(s=i.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else So(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var s=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(s,{clientOffset:Or(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))}),this.options=new Y9(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new k9(this.isNodeInDocument)}return J9(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 s=function(u){return o.handleDragStart(u,n)},a=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",a),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",a),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},s=function(u){return i.handleDragOver(u,n)},a=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",s),r.addEventListener("drop",a),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",s),r.removeEventListener("drop",a)}}},{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 uu({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 uu({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(su).some(function(r){return su[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=W9(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}(),kr;function e4(){return kr||(kr=new Image,kr.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),kr}var t4=function(e,n,r){return new Q9(e,n,r)};function n4(t){const e=Oe(),n=e.selectedIds,[r,i,o]=o9(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const s=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(En.dragStart(t.id,s)),{id:t.id,dragIds:s}},end:()=>{e.hideCursor(),e.dispatch(En.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(e4())},[o]),i}function r4(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,s=i<o/2,a=!s,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:s,inBottomHalf:a,inMiddle:u,atTop:!u&&s,atBottom:!u&&a}}function i4(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 Nr(t,e){return{parentId:t||null,index:e}}function nn(t,e){return{type:"line",index:t,level:e}}function o4(t){return{type:"highlight",id:t}}function wo(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=kf(r)+1;return{parentId:i,index:o}}function l0(t){var e;const n=r4(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:s,prevNode:a}=t,[l,u]=i4(o,a,s,n);if(o&&o.isInternal&&n.inMiddle)return{drop:Nr(o.id,null),cursor:o4(o.id)};if(!l)return{drop:Nr((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:nn(0,0)};if(_f(l)){const c=Kr(i,(u==null?void 0:u.level)||0,l.level);return{drop:wo(l,c),cursor:nn(l.rowIndex+1,c)}}if(Df(l)){const c=Kr(i,(u==null?void 0:u.level)||0,l.level);return{drop:wo(l,c),cursor:nn(l.rowIndex+1,c)}}if(Of(l)){const c=Kr(i,0,l.level+1);return c>l.level?{drop:Nr(l.id,0),cursor:nn(l.rowIndex+1,c)}:{drop:wo(l,c),cursor:nn(l.rowIndex+1,c)}}return{drop:Nr(l==null?void 0:l.id,0),cursor:nn(l.rowIndex+1,l.level+1)}}function s4(t,e){const n=Oe(),[r,i]=e0(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,s)=>{const a=s.getClientOffset();if(!t.current||!a)return;const{cursor:l,drop:u}=l0({element:t.current,offset:a,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(En.hovering(u.parentId,u.index)),s.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,s)=>{if(!s.canDrop())return null;let{parentId:a,index:l,dragIds:u}=n.state.dnd;Af(n.props.onMove,{dragIds:u,parentId:a===nr?null:a,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(a)}),n.open(a)}}),[e,t.current,n.props]);return i}function a4(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 l4=d.memo(function({index:e,style:n}){Pf(),_m();const r=Oe(),i=a4(e),o=d.useRef(null),s=n4(i),a=s4(o,i),l=d.useCallback(h=>{o.current=h,a(h)},[a]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),f=d.useMemo(()=>{var h,m;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((m=(h=r.props.padding)!==null&&h!==void 0?h:r.props.paddingTop)!==null&&m!==void 0?m: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:f,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var h;!i.isEditing&&i.isFocused&&((h=o.current)===null||h===void 0||h.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const g=r.renderNode,b=r.renderRow;return y.jsx(b,{node:i,innerRef:l,attrs:p,children:y.jsx(g,{node:i,tree:r,style:c,dragHandle:s})})});let Eo="",cu=null;function u0(){Pf();const t=Oe();return y.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 s=o.nextSibling,a=o.parent;t.focus(s||a,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),Nf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),Rf(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(cu),Eo+=e.key,cu=setTimeout(()=>{Eo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(Eo):!1});r&&t.focus(r.id)},children:y.jsx(d1,{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:p1,innerElementType:m1,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:l4})})}function du(t){return t.isFiltered?c4(t.root,t.isMatch.bind(t)):u4(t.root)}function u4(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(c0),e}function c4(t,e){const n={},r=[];function i(s){if(!s.isRoot&&e(s)){n[s.id]=!0;let l=s.parent;for(;l;)n[l.id]=!0,l=l.parent}if(s.children)for(let l of s.children)i(l)}function o(s){var a;s.level>=0&&n[s.id]&&r.push(s),s.isOpen&&((a=s.children)===null||a===void 0||a.forEach(o))}return i(t),o(t),r.forEach(c0),r}function c0(t,e){t.rowIndex=e}const fu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var xo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(f){s(f)}}function l(c){try{u(r.throw(c))}catch(f){s(f)}}function u(c){c.done?o(c.value):i(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:pe,identify:nt,identifyNull:He}=Rm;class mn{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=wl(this),this.visibleNodes=du(this),this.idToIndex=fu(this.visibleNodes)}update(e){this.props=e,this.root=wl(this),this.visibleNodes=du(this),this.idToIndex=fu(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=Bn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=Bn(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 s=Math.min(i,o),a=Math.max(i,o);return this.visibleNodes.slice(s,a+1)}indexOf(e){const n=Mf(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 xo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?jf(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:Ff(this),s=(r=e.type)!==null&&r!==void 0?r:"leaf",a=yield pe(this.props.onCreate,{type:s,parentId:i,index:o,parentNode:this.get(i)});a&&(this.focus(a),setTimeout(()=>{this.edit(a).then(()=>{this.select(a),this.activate(a)})}))})}delete(e){return xo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(nt),i=r.map(o=>this.get(o)).filter(o=>!!o);yield pe(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=nt(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(uo(n)),new Promise(r=>{mn.editPromise=r})}submit(e,n){return xo(this,void 0,void 0,function*(){if(!e)return;const r=nt(e);yield pe(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(uo(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(uo(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(He(e));n&&pe(this.props.onActivate,n)}resolveEdit(e){const n=mn.editPromise;n&&n(e),mn.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(nt(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&pe(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let s=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;s>r?s=r:s=Math.max(r-o,0),this.focus(this.at(s))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let s=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;s<i?s=i:s=Math.min(s+o,this.visibleNodes.length-1),this.focus(this.at(s))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=nt(e);r&&this.dispatch(Xt(i)),this.dispatch(je.only(i)),this.dispatch(je.anchor(i)),this.dispatch(je.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&pe(this.props.onFocus,this.focusedNode),pe(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=nt(e);this.dispatch(je.remove(n)),pe(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(He(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(je.add(n.id)),this.dispatch(je.anchor(n.id)),this.dispatch(je.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&pe(this.props.onFocus,this.focusedNode),pe(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=nt(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(je.remove(this.nodesBetween(r,i))),this.dispatch(je.add(this.nodesBetween(r,He(n)))),this.dispatch(je.mostRecent(n)),this.scrollTo(n),this.focusedNode&&pe(this.props.onFocus,this.focusedNode),pe(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),pe(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&&pe(this.props.onFocus,this.focusedNode),pe(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(nt)),i=He(e.anchor),o=He(e.mostRecent);this.dispatch(je.set({ids:r,anchor:i,mostRecent:o})),pe(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&&If(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=He(e);n&&(this.isOpen(n)||(this.dispatch(es.open(n,this.isFiltered)),pe(this.props.onToggle,n)))}close(e){const n=He(e);n&&this.isOpen(n)&&(this.dispatch(es.close(n,this.isFiltered)),pe(this.props.onToggle,n))}toggle(e){const n=He(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=He(e);if(!n)return;const r=Hs(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(){ai(this.root,e=>{e.isInternal&&e.open()})}closeAll(){ai(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=nt(e);return this.openParents(r),Kf(()=>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===nr)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!Bn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!Bn(e,n)}isDragging(e){const n=He(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=He(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(Vm())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||u0}get renderRow(){return this.props.renderRow||Fm}get renderNode(){return this.props.children||jm}get renderDragPreview(){return this.props.renderDragPreview||Hf}get renderCursor(){return this.props.renderCursor||Km}}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 d4=typeof Symbol=="function"&&Symbol.observable||"@@observable",hu=d4,$o=()=>Math.random().toString(36).substring(7).split("").join("."),f4={INIT:`@@redux/INIT${$o()}`,REPLACE:`@@redux/REPLACE${$o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$o()}`},Ot=f4;function d0(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 h4(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(v4(t))return"date";if(g4(t))return"error";const n=p4(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 p4(t){return typeof t.constructor=="function"?t.constructor.name:null}function g4(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function v4(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function ft(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=h4(t)),e}function f0(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: '${ft(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: '${ft(n)}'`);return n(f0)(t,e)}let r=t,i=e,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((m,v)=>{s.set(v,m)}))}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 f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${ft(m)}'`);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 v=!0;u();const C=a++;return s.set(C,m),function(){if(v){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.");v=!1,u(),s.delete(C),o=null}}}function p(m){if(!d0(m))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${ft(m)}'. 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 m.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 m.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${ft(m.type)}'. Value was: '${m.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,m)}finally{l=!1}return(o=s).forEach(C=>{C()}),m}function g(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${ft(m)}`);r=m,p({type:Ot.REPLACE})}function b(){const m=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${ft(v)}'`);function C(){const P=v;P.next&&P.next(c())}return C(),{unsubscribe:m(C)}},[hu](){return this}}}return p({type:Ot.INIT}),{dispatch:p,subscribe:f,getState:c,replaceReducer:g,[hu]:b}}function pu(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function m4(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(!d0(t))return`The ${o} has unexpected type of "${ft(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(t).filter(a=>!e.hasOwnProperty(a)&&!r[a]);if(s.forEach(a=>{r[a]=!0}),!(n&&n.type===Ot.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function y4(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 gu(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const a=e[s];process.env.NODE_ENV!=="production"&&typeof t[a]>"u"&&pu(`No reducer provided for key "${a}"`),typeof t[a]=="function"&&(n[a]=t[a])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{y4(n)}catch(s){o=s}return function(a={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const f=m4(a,n,l,i);f&&pu(f)}let u=!1;const c={};for(let f=0;f<r.length;f++){const p=r[f],g=n[p],b=a[p],h=g(b,l);if(typeof h>"u"){const m=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${m?`"${String(m)}"`:"(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]=h,u=u||h!==b}return u=u||r.length!==Object.keys(a).length,u?c:a}}function b4(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 S4=gu({nodes:gu({focus:Wm,edit:Bm,open:Um,selection:Gm,drag:b4}),dnd:qm}),C4=wn();function w4({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(f0(S4,wn(t))),s=ms.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>C4),a=d.useMemo(()=>new mn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,a.update(t)},[...Object.values(t),s.nodes.open]),d.useImperativeHandle(e,()=>a),d.useEffect(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),d.useEffect(()=>{a.props.searchTerm||o.current.dispatch(es.clear(!0))},[a.props.searchTerm]),y.jsx(Ef.Provider,{value:a,children:y.jsx(Tf.Provider,{value:l.current,children:y.jsx(xf.Provider,{value:s.nodes,children:y.jsx($f.Provider,{value:s.dnd,children:y.jsx(eb,Object.assign({backend:t4,options:{rootElement:a.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function E4(){const t=Oe(),[,e]=e0(()=>({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:s}=l0({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});s&&t.dispatch(En.hovering(s.parentId,s.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function x4(t){return E4(),t.children}function $4(){const e=Oe().props.renderContainer||u0;return y.jsx(y.Fragment,{children:y.jsx(e,{})})}function T4(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=T9(s=>({offset:s.getSourceClientOffset(),mouse:s.getClientOffset(),item:s.getItem(),isDragging:s.isDragging()})),o=t.props.renderDragPreview||Hf;return y.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class P4{constructor(e){this.root=_4(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 _4(t){const e=new h0({id:"ROOT"},null);return e.children=t.map(n=>qs(n,e)),e}function qs(t,e){const n=new h0(t,e);return t.children&&(n.children=t.children.map(r=>qs(r,n))),n}class h0{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=qs(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 D4=0;function O4(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new P4(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:f})=>{const p={id:`simple-tree-id-${D4++}`,name:""};return f==="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 I4(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]=O4(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function k4(t,e){const n=I4(t);return y.jsxs(w4,{treeProps:n,imperativeHandle:e,children:[y.jsx(x4,{children:y.jsx($4,{})}),y.jsx(T4,{})]})}const N4=d.forwardRef(k4),p0=({top:t,left:e})=>y.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10,width:`calc(100% - ${24+e}px)`}});function R4(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 s=i.current,a=r.current,l=s||(a?a instanceof Element?a:a.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(s){i.current=s,o()},[o])}function vu(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 L4(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}),s=o[0],a=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=R4(d.useCallback(function(f){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],b=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=vu(g,b,"inlineSize"),m=vu(g,b,"blockSize"),v=h?r(h):void 0,C=m?r(m):void 0;if(u.current.width!==v||u.current.height!==C){var w={width:v,height:C};u.current.width=v,u.current.height=C,n.current?n.current(w):l.current||a(w)}})}),i.current.instance.observe(f,{box:t.box}),function(){i.current&&i.current.instance.unobserve(f)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:s.width,height:s.height}},[c,s.width,s.height])}var Ke=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ke||{}),xt=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))(xt||{});const ci=t=>t?t.nodeType===Ke.SEPARATOR:!1,di=t=>t?t.nodeType===Ke.TITLE:!1,Vn=t=>!ci(t)&&!di(t),g0=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:s,insertAfter:a,append:l,prepend:u,getItem:c,move:f,items:p}=Gp({initialItems:JSON.parse(JSON.stringify(t)),getKey:j=>j.id,getChildren:j=>j.children||[]}),[g,b]=d.useState(),h=(j=[])=>{const B=p.map(I=>I.key);r(...B);const k=JSON.parse(JSON.stringify(j));k.length>0&&o(null,0,...k),b(void 0)},m=j=>{const B=c(j);B&&b(B.value)},v=(j,B,k)=>{var I;if(j){const A=c(j);A&&o(j,k??((I=A.children)==null?void 0:I.length)??0,B)}else o(null,k??p.length,B)},C=j=>{var B;return(B=c(j))==null?void 0:B.value},w=(j,B)=>{var W;const k=c(j);if(!k){console.error("No item found");return}let I=((W=k.children)==null?void 0:W.map(U=>U.value))??null;const A=B.childrenCount??k.value.childrenCount??0;if((I==null?void 0:I.length)===0&&A>0&&(I=null),B.children&&(I=[...I??[],...B.children]),B.children){const U=new Set(B.children.map(K=>K.id));I=B.children.filter(K=>!U.has(K.id)),I=[...I??[],...B.children]}const M={...k.value,...B,children:I,childrenCount:(I==null?void 0:I.length)??A};i(j,M)},P=j=>{r(j)},x=j=>{r(...j)},D=async j=>{if(!e){console.error("No refresh callback provided");return}try{const B=await e(j);w(j,B)}catch(B){console.error("error while refreshing node:",B)}},_=(j,B)=>{o(null,B??p.length,j)},S=(j,B)=>{o(null,B??p.length,...j)},R=(j,B)=>{const k=c(j);if(!k){console.error("No item found");return}const I={...k.value,children:B,childrenCount:B.length,hasLoadedChildren:B.length>0};i(j,I)},F=j=>{const B=[],k=c(j);if(!k)return[];B.push(k.value);const I=A=>{const M=N(A);if(!M)return;const W=c(M);W&&(B.push(W.value),I(M))};return I(j),B.reverse()},N=j=>{var B;return((B=c(j))==null?void 0:B.parentKey)??null},H=j=>{const B=N(j);if(!B)return null;const k=c(B);return k?k.value:null},E=(j,B)=>{s(j,B)},O=(j,B)=>{a(j,B)},z=(j,B)=>{l(j,B)},G=(j,B)=>{u(j,B)},V=(j,B,k)=>{f(j,B,k)},L=j=>{V(j.sourceId,j.newParentId,j.index)},Y=async j=>{if(!n)return[];const B=await n(j);return w(j,{children:B,hasLoadedChildren:!0,childrenCount:B.length}),B};return d.useEffect(()=>{const j=B=>{B.forEach(k=>{var I;if(k.children&&k.children.length>0){const A=k.value.hasLoadedChildren||((I=k.children)==null?void 0:I.length)>0||k.value.children&&k.value.children.length>0;k.value.children=k.children.map(W=>W.value);const M=A?k.children.length:k.value.childrenCount??0;k.value.childrenCount=M,A&&!k.value.hasLoadedChildren&&(k.value.hasLoadedChildren=!0),j(k.children)}else{const M=k.value.hasLoadedChildren||k.value.children&&k.value.children.length>0?0:k.value.childrenCount;k.value.children=[],k.value.childrenCount=M}})};j(p)},[p]),{nodes:p,addChild:v,updateNode:w,deleteNode:P,deleteNodes:x,addRootNode:_,addRootNodes:S,selectedNode:g,setSelectedNode:b,refreshNode:D,setChildren:R,insertBeforeNode:E,insertAfterNode:O,handleMove:L,prependToNode:G,moveNode:V,appendToNode:z,move:f,resetTree:h,handleLoadChildren:Y,selectNodeById:m,getParent:H,getNode:C,getParentId:N,getAncestors:F}},Ys=d.createContext(null),M4=({children:t,onRefresh:e,initialNodeId:n,onLoadChildren:r,initialTreeData:i})=>{const o=d.useRef(null),[s,a]=d.useState(null),[l,u]=d.useState(n??null),c=g0(i??[],e,r);return y.jsx(Ys.Provider,{value:{treeApiRef:o,treeData:c,root:s,initialTargetId:l,setInitialTargetId:u,setRoot:a},children:t})},Zs=()=>{const t=d.useContext(Ys);if(!t)throw new Error("TreeContext not found");return t},A4=({initialOpenState:t,selectedNodeId:e,rootNodeId:n,renderNode:r,canDrop:i,canDrag:o,afterMove:s,beforeMove:a})=>{const[l,u]=d.useState(400),{ref:c,width:f}=L4(),p=Zs(),g=(p==null?void 0:p.treeData.nodes)??[];d.useEffect(()=>{const v=document.querySelector(".c__tree-view"),C=v==null?void 0:v.firstElementChild;let w=null;return v&&C&&(w=new ResizeObserver(()=>{if(C&&C instanceof HTMLElement){const P=C.style.height;u(parseInt(P,10)+20)}}),w.observe(C)),()=>w==null?void 0:w.disconnect()},[]);const b=v=>{var L,Y,j,B;const C=JSON.parse(JSON.stringify(g)),w=v.dragNodes[0],P=v.parentId?((L=v.parentNode)==null?void 0:L.data.children)??[]:C,x=v.dragNodes[0].data.value.id,D=v.dragNodes[0].data,_=(Y=v.parentNode)==null?void 0:Y.data;if((_==null?void 0:_.value.nodeType)===Ke.TITLE||(_==null?void 0:_.value.nodeType)===Ke.SEPARATOR)return null;const S=D.parentKey??n,R=v.parentId??n;let F=v.index+0,N=null,H=R;const E=((B=(j=w.parent)==null?void 0:j.children)==null?void 0:B.findIndex(k=>k.data.value.id===x))??0;if(S===R){if(E===F)return null;F=F<E?F:F-1}const O=v.index-1,z=P[O],G=v.index,V=P[G];return v.index===0?(H=v.parentId??n,N=xt.FIRST_CHILD):!_&&v.index===1&&!Vn(z.value)?(H=n,F=1,N=xt.FIRST_CHILD):v.index===P.length?(H=H??n,N=xt.LAST_CHILD):z&&Vn(z.value)?(H=z.value.id,N=xt.RIGHT):V&&Vn(V.value)&&(N=xt.LEFT,H=V.value.id),N&&H?{targetModeId:H,mode:N,oldParentId:S,index:F,newParentId:v.parentId,sourceId:x}:null},h=v=>{const C=b(v);C&&(a?a(C,()=>{p==null||p.treeData.handleMove(C),s==null||s(C)}):(p==null||p.treeData.handleMove(C),s==null||s(C)))},m=d.useCallback(v=>o?!o(v):!1,[o]);if(p)return y.jsx("div",{ref:c,style:{height:l},className:"c__tree-view--container",children:y.jsx(N4,{data:g,ref:p.treeApiRef,openByDefault:!1,selectionFollowsFocus:!1,disableMultiSelection:!0,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:h,height:l,width:f,paddingTop:10,paddingBottom:10,rowHeight:35,disableDrag:m,disableDrop:({parentNode:v,dragNodes:C,index:w})=>{var S,R;if(i&&!i({parentNode:v,dragNodes:C,index:w}))return v.id!=="__REACT_ARBORIST_INTERNAL_ROOT__"&&(v.data.value.canDrop=!1),!0;const P=C[0];if(P&&P.isDragging&&P.willReceiveDrop||((S=v.data.value)==null?void 0:S.nodeType)===Ke.TITLE||((R=v.data.value)==null?void 0:R.nodeType)===Ke.SEPARATOR)return!0;if(v.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const F=g[w-1],N=g[w],H=g[w+1],E=ci(F==null?void 0:F.value),O=ci(N==null?void 0:N.value),z=di(F==null?void 0:F.value),G=di(N==null?void 0:N.value),V=Vn(H==null?void 0:H.value);return!!(w===0&&(O||G)||E&&G&&V||z&&O&&V)}const x=v==null?void 0:v.isOpen,D=(v==null?void 0:v.data.value.childrenCount)&&v.data.value.childrenCount>0||(v==null?void 0:v.data.children)&&v.data.children.length>0;if(!D)return v.data.value.canDrop=!0,!1;let _=v.data.value.childrenCount&&v.data.value.childrenCount>0&&(v==null?void 0:v.data.children)&&v.data.children.length>0;return _=_??!0,!x&&!_&&D?(v.data.value.canDrop=!0,!0):(v.data.value.canDrop=!0,!1)},initialOpenState:t,overscanCount:20,selection:e,renderCursor:p0,renderRow:K4,rowClassName:"c__tree-view--row",children:r})})},K4=({children:t,...e})=>{const n=e.node.data.value.nodeType===Ke.TITLE,r=e.node.data.value.nodeType===Ke.SEPARATOR,{style:i}=e.attrs,o={...i};return n||r?d.createElement("div",{...e.attrs,key:e.node.id,style:o,ref:e.innerRef,onFocus:s=>s.stopPropagation(),onClick:e.node.handleClick},t):d.createElement("div",{...e.attrs,style:o,key:e.node.id,ref:e.innerRef,onFocus:s=>s.stopPropagation(),onClick:e.node.handleClick},y.jsx("div",{className:"c__tree-view--row-content",children:t}))},F4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function j4(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function H4(t){return"nodeType"in t}function z4(t){var e,n;return t?j4(t)?t:H4(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const v0=F4?d.useLayoutEffect:d.useEffect;function m0(t){const e=d.useRef(t);return v0(()=>{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 mu(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return v0(()=>{n.current!==t&&(n.current=t)},e),n}function B4(t){const e=m0(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 To={};function V4(t,e){return d.useMemo(()=>{const n=To[t]==null?0:To[t]+1;return To[t]=n,t+"-"+n},[t,e])}var Gn;(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"})(Gn||(Gn={}));function yu(){}const W4=Object.freeze({x:0,y:0});function U4(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 G4(t,e,n){const r=U4(e);if(!r)return t;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=t.left-s-(1-i)*parseFloat(n),u=t.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,f=o?t.height/o:t.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}const q4={ignoreTransform:!1};function y0(t,e){e===void 0&&(e=q4);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=z4(t).getComputedStyle(t);u&&(n=G4(n,u,c))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function bu(t){return y0(t,{ignoreTransform:!0})}var fn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(fn||(fn={}));var Su;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Su||(Su={}));var pt;(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"})(pt||(pt={}));pt.Space,pt.Enter,pt.Esc,pt.Space,pt.Enter,pt.Tab;var Cu;(function(t){t[t.RightClick=2]="RightClick"})(Cu||(Cu={}));var wu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(wu||(wu={}));var Eu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Eu||(Eu={}));fn.Backward+"",fn.Forward+"",fn.Backward+"",fn.Forward+"";var us;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(us||(us={}));var cs;(function(t){t.Optimized="optimized"})(cs||(cs={}));function Y4(t){let{callback:e,disabled:n}=t;const r=m0(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}us.WhileDragging,cs.Optimized;const Z4={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yu,draggableNodes:new Map,over:null,measureDroppableContainers:yu},X4=d.createContext(Z4);({...W4});var xu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(xu||(xu={}));const J4="Droppable",Q4={timeout:25};function e7(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=V4(J4),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=d.useContext(X4),c=d.useRef({disabled:n}),f=d.useRef(!1),p=d.useRef(null),g=d.useRef(null),{disabled:b,updateMeasurementsFor:h,timeout:m}={...Q4,...i},v=mu(h??r),C=d.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),g.current=null},m)},[m]),w=Y4({callback:C,disabled:b||!s}),P=d.useCallback((S,R)=>{w&&(R&&(w.unobserve(R),f.current=!1),S&&w.observe(S))},[w]),[x,D]=B4(P),_=mu(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),f.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(a({type:Gn.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:p,data:_}}),()=>a({type:Gn.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(a({type:Gn.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:D}}const t7=t=>{const{isOver:e,setNodeRef:n}=e7({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]),y.jsx("div",{className:"c__dnd--droppable",ref:n,children:t.children})},n7=({children:t,onClick:e,node:n,dragHandle:r,style:i,forceLoading:o})=>{var w,P;const s=Zs(),a=d.useRef(null),[l,u]=d.useState(!1),[c,f]=d.useState(!1),p=o??l,g=n.willReceiveDrop||c,b=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,h=((P=n.children)==null?void 0:P.length)??!1,m=n.isLeaf||!b,v=d.useCallback(async()=>{if(!m){if(h||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(s==null?void 0:s.treeData.handleLoadChildren(n.data.value.id)),u(!1),n.open()}},[m,h,n,s==null?void 0:s.treeData]),C=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(a.current=setTimeout(()=>{v()},500)),a.current&&!x&&clearTimeout(a.current)},[v,n.isOpen,n.isDragging]);return d.useEffect(()=>{C(g)},[g,C]),n.data.value.nodeType===Ke.SEPARATOR?y.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.nodeType===Ke.TITLE?y.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.headerTitle}):y.jsx(t7,{id:n.id,data:{data:n.data,nodeApi:n},onOver:f,children:y.jsxs("div",{onClick:x=>{x.target.closest(".c__tree-view--node")||x.stopPropagation(),e==null||e()},onKeyDown:x=>{x.stopPropagation()},ref:r,style:i,className:Ve("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[m&&y.jsx("div",{className:"c__tree-view--node__leaf"}),!m&&y.jsxs(y.Fragment,{children:[p&&y.jsx("div",{className:"c__tree-view--node__loading",children:y.jsx(Ns,{})}),!p&&y.jsx("span",{onClick:x=>{x.stopPropagation(),v()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})},ki=({roles:t,onSelect:e,canUpdate:n=!0,selectedRole:r,isOpen:i,onOpenChange:o,roleTopMessage:s})=>{const a=t.find(l=>l.value===r);return n?y.jsx(lr,{isOpen:i,shouldCloseOnInteractOutside:l=>!l.closest(".c__access-role-dropdown"),onOpenChange:o,options:t,selectedValues:[r],onSelectValue:e,topMessage:s,children:y.jsxs("div",{role:"button",className:"c__access-role-dropdown",onClick:()=>{o==null||o(!i)},children:[y.jsx("span",{className:"fs-s clr-greyscale-600",children:a==null?void 0:a.label}),y.jsx("span",{className:"material-icons",children:i?"arrow_drop_up":"arrow_drop_down"})]})}):y.jsx("span",{className:"fs-s clr-greyscale-600",children:a==null?void 0:a.label})},b0=({users:t,onRemoveUser:e,rightActions:n,onShare:r,shareButtonLabel:i,roles:o,selectedRole:s,onSelectRole:a})=>{const{t:l}=ae.useCunningham(),[u,c]=d.useState(!1);return y.jsxs("div",{className:"c__add-share-user-list",children:[y.jsx("div",{className:"c__add-share-user-list__items",children:t.map(f=>y.jsx(S0,{user:f,onRemoveUser:e},f.id))}),y.jsxs("div",{className:"c__add-share-user-list__right-actions",children:[n,y.jsx(ki,{roles:o,selectedRole:s,onSelect:a,isOpen:u,onOpenChange:c}),y.jsx(ae.Button,{onClick:r,children:i??l("components.share.shareButton")})]})]})},S0=({user:t,onRemoveUser:e})=>y.jsxs("div",{className:"c__add-share-user-item",children:[y.jsx("span",{children:t.full_name||t.email}),y.jsx(ae.Button,{color:"tertiary-text",size:"nano",onClick:()=>e==null?void 0:e(t),icon:y.jsx("span",{className:"material-icons",children:"close"})})]}),$u=["purple","blue","green","yellow","orange","red","brown","cyan","gold","olive","rose"],r7=t=>{const e=t.split(" ");return e.length>2?e.slice(0,2).map(n=>n[0]).join(""):e.map(n=>n[0]).join("")},i7=t=>$u[t.charCodeAt(0)%$u.length],C0=({fullName:t,size:e="medium",forceColor:n})=>{const r=r7(t),i=i7(t);return y.jsx("div",{style:{backgroundColor:n||void 0},className:Ve(`c__avatar ${e}`,{[i]:!n&&i}),children:y.jsx("div",{className:"c__avatar__initials",children:r})})},Ni=({fullName:t,email:e,showEmail:n=!0})=>{const r=t&&t!==""?t:e??"";return y.jsxs("div",{className:"c__user-row",children:[y.jsx(C0,{fullName:r,size:"small"}),y.jsxs("div",{className:"c__user-row__info",children:[y.jsx("span",{className:"c__user-row__name",children:t}),n&&e&&y.jsx("span",{className:Ve("c__user-row__email",{"has-only-email":e&&(t===""||!t)}),children:e})]})]})},ds=({user:t})=>{const{t:e}=ae.useCunningham();return y.jsx(Ti,{left:y.jsx(Ni,{fullName:t.full_name,email:t.email}),alwaysShowRight:!1,right:y.jsxs("div",{className:"c__search-user-item-right",children:[y.jsx("span",{children:e("components.share.item.add")}),y.jsx("span",{className:"material-icons",children:"add"})]})})},w0=({accessData:t,roles:e,updateRole:n,deleteAccess:r,canUpdate:i=!0,roleTopMessage:o})=>{const{t:s}=ae.useCunningham(),a=Sn(),l=Sn(),u=[{label:s("components.share.access.delete"),icon:y.jsx("span",{className:"material-icons",children:"back_hand"}),isDisabled:!i,callback:()=>{r==null||r(t)}}],c=()=>{const f=l.isOpen;l.setIsOpen(!f)};return y.jsx("div",{className:"c__share-member-item",children:y.jsx(Ti,{left:y.jsx(Ni,{fullName:t.user.full_name,email:t.user.email,showEmail:!0}),alwaysShowRight:!0,right:y.jsxs("div",{className:"c__share-member-item__right",children:[y.jsx(ki,{roles:e,selectedRole:t.role,onSelect:f=>n==null?void 0:n(t,f),isOpen:a.isOpen,onOpenChange:a.setIsOpen,canUpdate:i,roleTopMessage:o}),i&&y.jsx(lr,{options:u,isOpen:l.isOpen,onOpenChange:l.setIsOpen,children:y.jsx(ae.Button,{color:"primary-text",onClick:c,size:"small",icon:y.jsx("span",{className:"material-icons toto",children:"more_horiz"})})})]})})})},E0=({invitation:t,roles:e,updateRole:n,deleteInvitation:r,canUpdate:i=!0,roleTopMessage:o})=>{const{t:s}=ae.useCunningham(),a=Sn(),l=Sn(),u=[{label:s("components.share.access.delete"),callback:()=>r==null?void 0:r(t),isDisabled:!i,icon:y.jsx("span",{className:"material-icons",children:"back_hand"})}],c=()=>{const f=l.isOpen;l.setIsOpen(!f)};return y.jsx("div",{className:"c__share-member-item",children:y.jsx(Ti,{left:y.jsx(Ni,{fullName:"",email:t.email,showEmail:!0}),alwaysShowRight:!0,right:y.jsxs("div",{className:"c__share-member-item__right",children:[y.jsx(ki,{roles:e,selectedRole:t.role,onSelect:f=>n==null?void 0:n(t,f),isOpen:a.isOpen,canUpdate:i,onOpenChange:a.setIsOpen,roleTopMessage:o}),i&&y.jsx(lr,{options:u,isOpen:l.isOpen,onOpenChange:l.setIsOpen,children:y.jsx(ae.Button,{color:"primary-text",onClick:c,size:"small",icon:y.jsx("span",{className:"material-icons toto",children:"more_horiz"})})})]})})})},o7=({searchUsersResult:t,children:e,outsideSearchContent:n,accesses:r=[],invitations:i=[],hasNextMembers:o=!1,canUpdate:s=!0,hasNextInvitations:a=!1,...l})=>{const{t:u}=ae.useCunningham(),{isMobile:c}=_n(),f=d.useRef(null),[p,g]=d.useState("400px"),b=d.useRef(null),[h,m]=d.useState(""),[v,C]=d.useState(""),[w,P]=d.useState([]),[x,D]=d.useState(l.invitationRoles[0].value??""),_=c?"calc(100dvh - 32px)":"min(690px, calc(100dvh - 2em - 12px - 32px))",S=V=>{if(f.current&&clearTimeout(f.current),V===""){C(""),l.onSearchUsers("");return}f.current=setTimeout(()=>{l.onSearchUsers(V),C(V)},300)},R=V=>{m(V),S(V)},F=(v!==""||w.length>0)&&!l.loading,N=d.useCallback(V=>{P(L=>[...L,V]),m(""),C(""),l.onSearchUsers("")},[l]),H=V=>{P(L=>L.filter(Y=>Y.id!==V.id))},E=d.useMemo(()=>{const V=t==null?void 0:t.filter(I=>!w.includes(I));let L=u(v!==""?"components.share.user.no_result":"components.share.user.placeholder");const j=(I=>!!I.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z\-0-9]{2,}))$/))(v??"")&&!(V!=null&&V.some(I=>I.email===v)),B={id:v,full_name:"",email:v};return j&&(L=void 0),{groupName:u("components.share.search.group_name"),elements:V??[],showWhenEmpty:!0,emptyString:L,endActions:j?[{content:y.jsx(ds,{user:B}),onSelect:()=>void N(B)}]:void 0}},[t,v,u,w,N]),O=V=>{var k;const Y=(V==null?void 0:V.clientHeight)??0,j=((k=b.current)==null?void 0:k.clientHeight)??0,B=`calc(${_} - ${Y}px - ${j}px - 70px - 10px)`;g(B)},z=!F&&!l.loading&&i.length>0,G=!F&&!l.loading&&r.length>0;return y.jsx(ae.Modal,{title:l.modalTitle??u("components.share.modalTitle"),isOpen:l.isOpen,onClose:l.onClose,closeOnClickOutside:!0,size:c?ae.ModalSize.FULL:ae.ModalSize.LARGE,children:y.jsxs("div",{children:[w.length>0&&y.jsx("div",{className:"c__share-modal__selected-users",ref:b,children:y.jsx(b0,{users:w,onRemoveUser:H,roles:l.invitationRoles,selectedRole:x,onSelectRole:D,onShare:()=>{l.onInviteUser(w,x),P([])}})}),y.jsx(Cf,{onFilter:R,inputValue:h,loading:l.loading,placeholder:u("components.share.user.placeholder"),children:y.jsxs("div",{style:{height:p,overflowY:"auto"},children:[F&&!l.loading&&y.jsx("div",{className:"c__share-modal__search-users",children:y.jsx(wf,{group:E,onSelect:V=>{N(V)},renderElement:V=>y.jsx(ds,{user:V})})}),!F&&e,z&&y.jsxs("div",{className:"c__share-modal__invitations",children:[y.jsx("span",{className:"c__share-modal__invitations-title",children:u("components.share.invitations.title")}),i.map(V=>{var L;return y.jsx(E0,{invitation:V,roles:l.invitationRoles,updateRole:l.onUpdateInvitation,deleteInvitation:l.onDeleteInvitation,canUpdate:s,roleTopMessage:(L=l.invitationRoleTopMessage)==null?void 0:L.call(l,V)},V.id)}),y.jsx(Tu,{show:a,onShowMore:l.onLoadNextInvitations})]}),G&&y.jsxs("div",{className:"c__share-modal__members",children:[y.jsx("span",{className:"c__share-modal__members-title",children:u(r.length>1?"components.share.members.title_plural":"components.share.members.title_singular",{count:r.length})}),r.map(V=>{var L,Y;return y.jsx(w0,{accessData:V,canUpdate:s,roleTopMessage:(L=l.accessRoleTopMessage)==null?void 0:L.call(l,V),roles:((Y=l.getAccessRoles)==null?void 0:Y.call(l,V))??l.invitationRoles,updateRole:l.onUpdateAccess,deleteAccess:l.onDeleteAccess},V.id)}),y.jsx(Tu,{show:o,onShowMore:l.onLoadNextMembers})]})]})}),y.jsx("div",{ref:O,children:!F&&y.jsx(y.Fragment,{children:n})})]})})},Tu=({show:t,onShowMore:e})=>{const{t:n}=ae.useCunningham();return t?y.jsx("div",{className:"c__share-modal__show-more-button",children:y.jsx(ae.Button,{color:"primary-text",size:"small",icon:y.jsx("span",{className:"material-icons",children:"arrow_downward"}),onClick:e,children:n("components.share.members.load_more")})}):null},s7=({onCopyLink:t,onOk:e})=>{const{t:n}=ae.useCunningham();return y.jsxs("div",{className:"c__share-modal__copy-link-footer",children:[y.jsx(ae.Button,{color:"tertiary",icon:y.jsx("span",{className:"material-icons",children:"link"}),onClick:t,children:n("components.share.copyLink")}),y.jsx(ae.Button,{color:"primary",onClick:e,children:n("components.share.ok")})]})};exports.AccessRoleDropdown=ki;exports.CunninghamProvider=A0;exports.CustomTabs=Pm;exports.DropdownMenu=lr;exports.Footer=_g;exports.Header=pd;exports.Hero=Dg;exports.HomeGutter=Og;exports.HorizontalSeparator=Qo;exports.InvitationUserSelectorItem=S0;exports.InvitationUserSelectorList=b0;exports.LaGaufre=Hg;exports.Label=Kd;exports.LanguagePicker=hd;exports.LeftPanel=gd;exports.MainLayout=b5;exports.ProConnectButton=Du;exports.QuickSearch=Cf;exports.QuickSearchGroup=wf;exports.QuickSearchInput=Sf;exports.QuickSearchItem=Ar;exports.QuickSearchItemTemplate=Ti;exports.SearchUserItem=ds;exports.ShareInvitationItem=E0;exports.ShareMemberItem=w0;exports.ShareModal=o7;exports.ShareModalCopyLinkFooter=s7;exports.Spinner=Ns;exports.TreeApi=mn;exports.TreeContext=Ys;exports.TreeProvider=M4;exports.TreeView=A4;exports.TreeViewItem=n7;exports.TreeViewMoveModeEnum=xt;exports.TreeViewNodeTypeEnum=Ke;exports.TreeViewSeparator=p0;exports.UserAvatar=C0;exports.UserRow=Ni;exports.WithLabel=C5;exports.cunninghamConfig=Wo;exports.getLocales=_u;exports.headerHeight=S5;exports.isNode=Vn;exports.isSeparator=ci;exports.isTitle=di;exports.useDropdownMenu=Sn;exports.useResponsive=_n;exports.useTree=g0;exports.useTreeContext=Zs;
102
102
  //# sourceMappingURL=index.cjs.map