bmj-ui 1.0.2 → 1.0.4
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.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/ThemeToggle.tsx +1 -1
- package/src/components/bmj-ui/AppSidebar.tsx +1 -1
- package/src/components/bmj-ui/ChartCard.tsx +3 -3
- package/src/components/bmj-ui/DashboardLayout.tsx +3 -3
- package/src/components/bmj-ui/StatCard.tsx +3 -3
- package/src/components/bmj-ui/Topbar.tsx +5 -5
- package/src/components/bmj-ui/index.ts +5 -5
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/dropdown-menu.tsx +1 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +2 -2
- package/src/components/ui/sidebar.tsx +8 -8
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.ts +5 -5
- package/tsconfig.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
import*as e from"react";import t,{createElement as n,useLayoutEffect as r,useContext as i,createContext as o,forwardRef as a,useRef as s,useEffect as l,useId as c,useInsertionEffect as u,useMemo as d,useCallback as f,Children as p,isValidElement as h,useState as m,Fragment as y,Component as v,useImperativeHandle as g,cloneElement as b,memo as x,PureComponent as w}from"react";import*as E from"react-dom";import{createPortal as O}from"react-dom";function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k,P={exports:{}},j={};var A,T,M={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/function C(){return A||(A=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===k?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case h:return"Fragment";case y:return"Profiler";case m:return"StrictMode";case x:return"Suspense";case w:return"SuspenseList";case S:return"Activity"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case p:return"Portal";case g:return t.displayName||"Context";case v:return(t._context.displayName||"Context")+".Consumer";case b:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case E:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case O:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,i="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",i),n(e)}}function i(t){if(t===h)return"<>";if("object"==typeof t&&null!==t&&t.$$typeof===O)return"<...>";try{var n=e(t);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function o(){return Error("react-stack-top-frame")}function a(){var t=e(this.type);return C[t]||(C[t]=!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.")),void 0!==(t=this.props.ref)?t:null}function s(t,n,i,o,s,c){var d,p=n.children;if(void 0!==p)if(o)if(A(p)){for(o=0;o<p.length;o++)l(p[o]);Object.freeze&&Object.freeze(p)}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 l(p);if(j.call(n,"key")){p=e(t);var h=Object.keys(n).filter(function(e){return"key"!==e});o=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",D[p+o]||(h=0<h.length?"{"+h.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',o,p,h,p),D[p+o]=!0)}if(p=null,void 0!==i&&(r(i),p=""+i),function(e){if(j.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),p=""+n.key),"key"in n)for(var m in i={},n)"key"!==m&&(i[m]=n[m]);else i=n;return p&&function(e,t){function n(){u||(u=!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)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,n,r,i,o){var s=n.ref;return e={$$typeof:f,type:e,key:t,props:n,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,p,i,null===(d=P.A)?null:d.getOwner(),s,c)}function l(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===O&&("fulfilled"===e._payload.status?c(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===f}var u,d=t,f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),P=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,A=Array.isArray,T=console.createTask?console.createTask:function(){return null},C={},N=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,o)(),I=T(i(o)),D={};M.Fragment=h,M.jsx=function(e,t,n){var r=1e4>P.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,r?Error("react-stack-top-frame"):N,r?T(i(e)):I)},M.jsxs=function(e,t,n){var r=1e4>P.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,r?Error("react-stack-top-frame"):N,r?T(i(e)):I)}}()),M}var N=(T||(T=1,"production"===process.env.NODE_ENV?P.exports=function(){if(k)return j;k=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}return j.Fragment=t,j.jsx=n,j.jsxs=n,j}():P.exports=C()),P.exports);function I(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function D(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}"function"==typeof SuppressedError&&SuppressedError;const _={};function R(e,t,n,r,i){let o={...B(e,_)};return t&&(o=L(o,t)),n&&(o=L(o,n)),r&&(o=L(o,r)),o}function L(e,t){return V(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=D(e.style,r);break;case"className":e[n]=U(e.className,r);break;default:z(n,r)?e[n]=F(e[n],r):e[n]=r}}return e}(e,t)}function z(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return 111===n&&110===r&&i>=65&&i<=90&&("function"==typeof t||void 0===t)}function V(e){return"function"==typeof e}function B(e,t){return V(e)?e(t):e??_}function F(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const r=n;$(r);const i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}const r=t(n);return e?.(n),r}:t:e}function $(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function U(e,t){return t?e?t+" "+e:t:e}const W=function(e,t){return function(n,...r){const i=new URL(e);return i.searchParams.set("code",n.toString()),r.forEach(e=>i.searchParams.append("args[]",e)),`${t} error #${n}; visit ${i} for the full message.`}}("https://base-ui.com/production-error","Base UI"),K={};function H(t,n){const r=e.useRef(K);return r.current===K&&(r.current=t(n)),r}function Y(e,t,n,r){const i=H(q).current;return function(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}(i,e,t,n,r)&&G(i,[e,t,n,r]),i.callback}function q(){return{callback:null,cleanup:null,refs:[]}}function G(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const i=t[e];if(null!=i)switch(typeof i){case"function":{const t=i(n);"function"==typeof t&&(r[e]=t);break}case"object":i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const X=parseInt(e.version,10);function Z(e){return X>=e}function J(t){if(!e.isValidElement(t))return null;const n=t,r=n.props;return(Z(19)?r?.ref:n.ref)??null}let Q;function ee(){}"production"!==process.env.NODE_ENV&&(Q=new Set);const te=Object.freeze([]),ne=Object.freeze({}),re={style:{transition:"none"}},ie={fallbackAxisSide:"none"},oe={fallbackAxisSide:"end"},ae={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function se(t,r,i={}){const o=r.render,a=function(e,t={}){const{className:n,style:r,render:i}=e,{state:o=ne,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?function(e,t){return"function"==typeof e?e(t):e}(n,o):void 0,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,o):void 0,f=c?function(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const e=t[r](i);null!=e&&Object.assign(n,e);continue}!0===i?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}(o,l):ne,p=c?D(f,Array.isArray(s)?function(e){if(0===e.length)return _;if(1===e.length)return B(e[0],_);let t={...B(e[0],_)};for(let n=1;n<e.length;n+=1)t=L(t,e[n]);return t}(s):s)??ne:ne;"undefined"!=typeof document&&(c?Array.isArray(a)?p.ref=function(e){const t=H(q).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&G(t,e),t.callback}([p.ref,J(i),...a]):p.ref=Y(p.ref,J(i),a):Y(null,null));if(!c)return ne;void 0!==u&&(p.className=U(p.className,u));void 0!==d&&(p.style=D(p.style,d));return p}(r,i);if(!1===i.enabled)return null;return function(t,r,i,o){if(r){if("function"==typeof r)return"production"!==process.env.NODE_ENV&&function(e){const t=e.name;if(0===t.length)return;const n=t.charCodeAt(0);if(n<65||n>90)return;!function(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");Q.has(t)||(Q.add(t),console.warn(`Base UI: ${t}`))}}(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}(r),r(i,o);const t=R(i,r.props);t.ref=i.ref;let n=r;if(n?.$$typeof===le){n=e.Children.toArray(r)[0]}if("production"!==process.env.NODE_ENV&&!e.isValidElement(n))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join("\n"));return e.cloneElement(n,t)}if(t&&"string"==typeof t)return function(t,r){if("button"===t)return n("button",{type:"button",...r,key:r.key});if("img"===t)return n("img",{alt:"",...r,key:r.key});return e.createElement(t,r)}(t,i);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":W(8))}(t,o,a,i.state??ne)}const le=Symbol.for("react.lazy");function ce(e){return se(e.defaultTagName??"div",e,e)}function ue(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ue(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function de(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ue(e))&&(r&&(r+=" "),r+=t);return r}const fe=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,pe=de,he=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return pe(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const a=fe(t)||fe(r);return i[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]);return pe(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};const me=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ye="-",ve=[],ge=e=>{const t=we(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return xe(e);const n=e.split(ye),r=""===n[0]&&n.length>1?1:0;return be(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||ve}return n[e]||ve}}},be=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=be(e,t+1,i);if(n)return n}const o=n.validators;if(null===o)return;const a=0===t?e.join(ye):e.slice(t).join(ye),s=o.length;for(let e=0;e<s;e++){const t=o[e];if(t.validator(a))return t.classGroupId}},xe=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),we=e=>{const{theme:t,classGroups:n}=e;return Ee(n,t)},Ee=(e,t)=>{const n=me();for(const r in e){const i=e[r];Oe(i,n,r,t)}return n},Oe=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const i=e[o];Se(i,t,n,r)}},Se=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?je(e,t,n,r):Pe(e,t,n,r):ke(e,t,n)},ke=(e,t,n)=>{(""===e?t:Ae(t,e)).classGroupId=n},Pe=(e,t,n,r)=>{Te(e)?Oe(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},je=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let e=0;e<o;e++){const[o,a]=i[e];Oe(a,Ae(t,o),n,r)}},Ae=(e,t)=>{let n=e;const r=t.split(ye),i=r.length;for(let e=0;e<i;e++){const t=r[e];let i=n.nextPart.get(t);i||(i=me(),n.nextPart.set(t,i)),n=i}return n},Te=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Me=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,o)=>{n[i]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},Ce=[],Ne=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ie=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,o=0;const a=e.length;for(let s=0;s<a;s++){const a=e[s];if(0===r&&0===i){if(":"===a){t.push(e.slice(o,s)),o=s+1;continue}if("/"===a){n=s;continue}}"["===a?r++:"]"===a?r--:"("===a?i++:")"===a&&i--}const s=0===t.length?e:e.slice(o);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return Ne(t,c,l,n&&n>o?n-o:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ne(Ce,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},De=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i],a="["===o[0],s=t.has(o);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(o)):r.push(o)}return r.length>0&&(r.sort(),n.push(...r)),n}},_e=/\s+/,Re=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Re(e[r]))&&(n&&(n+=" "),n+=t);return n},Le=(e,...t)=>{let n,r,i,o;const a=e=>{const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(_e);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){l=t+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=t+(l.length>0?" "+l:l);continue}h=!1}const y=0===u.length?"":1===u.length?u[0]:o(u).join(":"),v=d?y+"!":y,g=v+m;if(a.indexOf(g)>-1)continue;a.push(g);const b=i(m,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return i(e,o),o};return o=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Me(e.cacheSize),parseClassName:Ie(e),sortModifiers:De(e),...ge(e)}))(l),r=n.cache.get,i=n.cache.set,o=a,a(s)},(...e)=>o(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=Re(t))&&(i&&(i+=" "),i+=n);return i})(...e))},ze=[],Ve=e=>{const t=t=>t[e]||ze;return t.isThemeGetter=!0,t},Be=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,We=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ke=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,He=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>$e.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>!!e&&Number.isInteger(Number(e)),Ze=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Je=e=>Ue.test(e),Qe=()=>!0,et=e=>We.test(e)&&!Ke.test(e),tt=()=>!1,nt=e=>He.test(e),rt=e=>Ye.test(e),it=e=>!at(e)&&!ht(e),ot=e=>Et(e,Pt,tt),at=e=>Be.test(e),st=e=>Et(e,jt,et),lt=e=>Et(e,At,Ge),ct=e=>Et(e,Mt,Qe),ut=e=>Et(e,Tt,tt),dt=e=>Et(e,St,tt),ft=e=>Et(e,kt,rt),pt=e=>Et(e,Ct,nt),ht=e=>Fe.test(e),mt=e=>Ot(e,jt),yt=e=>Ot(e,Tt),vt=e=>Ot(e,St),gt=e=>Ot(e,Pt),bt=e=>Ot(e,kt),xt=e=>Ot(e,Ct,!0),wt=e=>Ot(e,Mt,!0),Et=(e,t,n)=>{const r=Be.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Ot=(e,t,n=!1)=>{const r=Fe.exec(e);return!!r&&(r[1]?t(r[1]):n)},St=e=>"position"===e||"percentage"===e,kt=e=>"image"===e||"url"===e,Pt=e=>"length"===e||"size"===e||"bg-size"===e,jt=e=>"length"===e,At=e=>"number"===e,Tt=e=>"family-name"===e,Mt=e=>"number"===e||"weight"===e,Ct=e=>"shadow"===e,Nt=Le(()=>{const e=Ve("color"),t=Ve("font"),n=Ve("text"),r=Ve("font-weight"),i=Ve("tracking"),o=Ve("leading"),a=Ve("breakpoint"),s=Ve("container"),l=Ve("spacing"),c=Ve("radius"),u=Ve("shadow"),d=Ve("inset-shadow"),f=Ve("text-shadow"),p=Ve("drop-shadow"),h=Ve("blur"),m=Ve("perspective"),y=Ve("aspect"),v=Ve("ease"),g=Ve("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ht,at],x=()=>[ht,at,l],w=()=>[qe,"full","auto",...x()],E=()=>[Xe,"none","subgrid",ht,at],O=()=>["auto",{span:["full",Xe,ht,at]},Xe,ht,at],S=()=>[Xe,"auto",ht,at],k=()=>["auto","min","max","fr",ht,at],P=()=>["auto",...x()],j=()=>[qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],A=()=>[qe,"screen","full","dvw","lvw","svw","min","max","fit",...x()],T=()=>[qe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],M=()=>[e,ht,at],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",vt,dt,{position:[ht,at]}],N=()=>["auto","cover","contain",gt,ot,{size:[ht,at]}],I=()=>[Ze,mt,st],D=()=>["","none","full",c,ht,at],_=()=>["",Ge,mt,st],R=()=>[Ge,Ze,vt,dt],L=()=>["","none",h,ht,at],z=()=>["none",Ge,ht,at],V=()=>["none",Ge,ht,at],B=()=>[Ge,ht,at],F=()=>[qe,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Je],breakpoint:[Je],color:[Qe],container:[Je],"drop-shadow":[Je],ease:["in","out","in-out"],font:[it],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Je],shadow:[Je],spacing:["px",Ge],text:[Je],"text-shadow":[Je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qe,at,ht,y]}],container:["container"],columns:[{columns:[Ge,at,ht,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",ht,at]}],basis:[{basis:[qe,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,qe,"auto","initial","none",at]}],grow:[{grow:["",Ge,ht,at]}],shrink:[{shrink:["",Ge,ht,at]}],order:[{order:[Xe,"first","last","none",ht,at]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...A()]}],"min-inline-size":[{"min-inline":["auto",...A()]}],"max-inline-size":[{"max-inline":["none",...A()]}],"block-size":[{block:["auto",...T()]}],"min-block-size":[{"min-block":["auto",...T()]}],"max-block-size":[{"max-block":["none",...T()]}],w:[{w:[s,"screen",...j()]}],"min-w":[{"min-w":[s,"screen","none",...j()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,mt,st]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wt,ct]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ze,at]}],"font-family":[{font:[yt,ut,t]}],"font-features":[{"font-features":[at]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ht,at]}],"line-clamp":[{"line-clamp":[Ge,"none",ht,lt]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",ht,at]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ht,at]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",ht,st]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Ge,"auto",ht,at]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ht,at]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ht,at]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xe,ht,at],radial:["",ht,at],conic:[Xe,ht,at]},bt,ft]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:_()}],"border-w-x":[{"border-x":_()}],"border-w-y":[{"border-y":_()}],"border-w-s":[{"border-s":_()}],"border-w-e":[{"border-e":_()}],"border-w-bs":[{"border-bs":_()}],"border-w-be":[{"border-be":_()}],"border-w-t":[{"border-t":_()}],"border-w-r":[{"border-r":_()}],"border-w-b":[{"border-b":_()}],"border-w-l":[{"border-l":_()}],"divide-x":[{"divide-x":_()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,ht,at]}],"outline-w":[{outline:["",Ge,mt,st]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,xt,pt]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,xt,pt]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Ge,st]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",f,xt,pt]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Ge,ht,at]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ht,at]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ht,at]}],filter:[{filter:["","none",ht,at]}],blur:[{blur:L()}],brightness:[{brightness:[Ge,ht,at]}],contrast:[{contrast:[Ge,ht,at]}],"drop-shadow":[{"drop-shadow":["","none",p,xt,pt]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Ge,ht,at]}],"hue-rotate":[{"hue-rotate":[Ge,ht,at]}],invert:[{invert:["",Ge,ht,at]}],saturate:[{saturate:[Ge,ht,at]}],sepia:[{sepia:["",Ge,ht,at]}],"backdrop-filter":[{"backdrop-filter":["","none",ht,at]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,ht,at]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,ht,at]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,ht,at]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,ht,at]}],"backdrop-invert":[{"backdrop-invert":["",Ge,ht,at]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,ht,at]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,ht,at]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,ht,at]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ht,at]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",ht,at]}],ease:[{ease:["linear","initial",v,ht,at]}],delay:[{delay:[Ge,ht,at]}],animate:[{animate:["none",g,ht,at]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ht,at]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[ht,at,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ht,at]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ht,at]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Ge,mt,st,lt]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function It(...e){return Nt(de(e))}function Dt(){return"undefined"!=typeof window}function _t(e){return zt(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Lt(e){var t;return null==(t=(zt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zt(e){return!!Dt()&&(e instanceof Node||e instanceof Rt(e).Node)}function Vt(e){return!!Dt()&&(e instanceof Element||e instanceof Rt(e).Element)}function Bt(e){return!!Dt()&&(e instanceof HTMLElement||e instanceof Rt(e).HTMLElement)}function Ft(e){return!(!Dt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot)}function $t(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function Ut(e){return/^(table|td|th)$/.test(_t(e))}function Wt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Kt=/transform|translate|scale|rotate|perspective|filter/,Ht=/paint|layout|strict|content/,Yt=e=>!!e&&"none"!==e;let qt;function Gt(e){const t=Vt(e)?Jt(e):e;return Yt(t.transform)||Yt(t.translate)||Yt(t.scale)||Yt(t.rotate)||Yt(t.perspective)||!Xt()&&(Yt(t.backdropFilter)||Yt(t.filter))||Kt.test(t.willChange||"")||Ht.test(t.contain||"")}function Xt(){return null==qt&&(qt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qt}function Zt(e){return/^(html|body|#document)$/.test(_t(e))}function Jt(e){return Rt(e).getComputedStyle(e)}function Qt(e){return Vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if("html"===_t(e))return e;const t=e.assignedSlot||e.parentNode||Ft(e)&&e.host||Lt(e);return Ft(t)?t.host:t}function tn(e){const t=en(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bt(t)&&$t(t)?t:tn(t)}function nn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=tn(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=Rt(i);if(o){const e=rn(a);return t.concat(a,a.visualViewport||[],$t(i)?i:[],e&&n?nn(e):[])}return t.concat(i,nn(i,[],n))}function rn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const on=e[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],an=on&&on!==e.useLayoutEffect?on:e=>e();function sn(e){const t=H(ln).current;return t.next=e,an(t.effect),t.trampoline}function ln(){const e={next:void 0,callback:cn,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function cn(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}let un;function dn(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");un.has(t)||(un.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(un=new Set);const fn={...e},pn="undefined"!=typeof document?e.useLayoutEffect:()=>{},hn=e.createContext(void 0);function mn(t=!1){const n=e.useContext(hn);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":W(16));return n}function yn(t={}){const{disabled:n=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0,composite:a}=t,s=e.useRef(null),l=mn(!0),c=a??void 0!==l,{props:u}=function(t){const{focusableWhenDisabled:n,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:a}=t,s=i&&!1!==n,l=i&&!1===n;return{props:e.useMemo(()=>{const e={onKeyDown(e){r&&n&&"Tab"!==e.key&&e.preventDefault()}};return i||(e.tabIndex=o,!a&&r&&(e.tabIndex=n?o:-1)),(a&&(n||s)||!a&&r)&&(e["aria-disabled"]=r),!a||n&&!l||(e.disabled=r),e},[i,r,n,s,l,a,o])}}({focusableWhenDisabled:r,disabled:n,composite:c,tabIndex:i,isNativeButton:o});"production"!==process.env.NODE_ENV&&e.useEffect(()=>{if(!s.current)return;const e=vn(s.current);if(o){if(!e){dn(`${"A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."}${fn.captureOwnerStack?.()||""}`)}}else if(e){dn(`${"A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."}${fn.captureOwnerStack?.()||""}`)}},[o]);const d=e.useCallback(()=>{const e=s.current;vn(e)&&c&&n&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[n,u.disabled,c]);pn(d,[d]);return{getButtonProps:e.useCallback((e={})=>{const{onClick:t,onMouseDown:r,onKeyUp:i,onKeyDown:a,onPointerDown:s,...l}=e;return R({type:o?"button":void 0,onClick(e){n?e.preventDefault():t?.(e)},onMouseDown(e){n||r?.(e)},onKeyDown(e){if(n)return;if($(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,i=e.currentTarget,s=vn(i),l=!o&&(u=i,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(o?s:!l),f="Enter"===e.key,p=" "===e.key,h=i.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&c&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(l||o&&s?(i.click(),e.preventBaseUIHandler()):d&&(t?.(e),e.preventBaseUIHandler()))}d&&(o||!p&&!f||e.preventDefault(),!o&&f&&t?.(e))},onKeyUp(e){n||($(e),i?.(e),e.target===e.currentTarget&&o&&c&&vn(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||o||c||" "!==e.key||t?.(e))},onPointerDown(e){n?e.preventDefault():s?.(e)}},o?void 0:{role:"button"},u,l)},[n,u,c,o]),buttonRef:sn(e=>{s.current=e,d()})}}function vn(e){return Bt(e)&&"BUTTON"===e.tagName}"production"!==process.env.NODE_ENV&&(hn.displayName="CompositeRootContext");const gn=e.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...s}=e,{getButtonProps:l,buttonRef:c}=yn({disabled:i,focusableWhenDisabled:o,native:a});return se("button",e,{state:{disabled:i},ref:[t,c],props:[s,l]})});"production"!==process.env.NODE_ENV&&(gn.displayName="Button");const bn=he("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function xn(e){var{className:t,variant:n="default",size:r="default"}=e,i=I(e,["className","variant","size"]);return N.jsx(gn,Object.assign({"data-slot":"button",className:It(bn({variant:n,size:r,className:t}))},i))}let wn=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const En={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},On={disabled:!1,...En},Sn={valid:e=>null===e?null:e?{[wn.valid]:""}:{[wn.invalid]:""}},kn=e.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:ee,disabled:void 0,touched:En.touched,setTouched:ee,dirty:En.dirty,setDirty:ee,filled:En.filled,setFilled:ee,focused:En.focused,setFocused:ee,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:On,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=ne)=>e,getInputValidationProps:(e=ne)=>e,inputRef:{current:null},commit:async()=>{}}});function Pn(t=!0){const n=e.useContext(kn);if(n.setValidityData===ee&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":W(28));return n}"production"!==process.env.NODE_ENV&&(kn.displayName="FieldRootContext");const jn=e.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ee,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});"production"!==process.env.NODE_ENV&&(jn.displayName="FormContext");let An=0;const Tn=fn.useId;function Mn(t,n){if(void 0!==Tn){const e=Tn();return t??(n?`${n}-${e}`:e)}return function(t,n="mui"){const[r,i]=e.useState(t),o=t||r;return e.useEffect(()=>{null==r&&(An+=1,i(`${n}-${An}`))},[r,n]),o}(t,n)}function Cn(e){return Mn(e,"base-ui")}const Nn=e.createContext({controlId:void 0,registerControlId:ee,labelId:void 0,setLabelId:ee,messageIds:[],setMessageIds:ee,getDescriptionProps:e=>e});function In(){return e.useContext(Nn)}"production"!==process.env.NODE_ENV&&(Nn.displayName="LabelableContext");const Dn=[];function _n(t){e.useEffect(t,Dn)}class Rn{static create(){return new Rn}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function Ln(){const e=H(Rn.create).current;return _n(e.disposeEffect),e}function zn(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Vn(e){return e?.ownerDocument||document}const Bn="undefined"!=typeof navigator,Fn=function(){if(!Bn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;if(e?.platform)return{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),$n=function(){if(!Bn)return"";const e=navigator.userAgentData;if(e?.platform)return e.platform;return navigator.platform??""}(),Un=function(){if(!Bn)return"";const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" ");return navigator.userAgent}(),Wn=!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter:none"),Kn="MacIntel"===Fn.platform&&Fn.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Fn.platform),Hn=Bn&&/apple/i.test(navigator.vendor),Yn=Bn&&/android/i.test($n)||/android/i.test(Un),qn=Bn&&$n.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Gn=Un.includes("jsdom/");const Xn="data-base-ui-focusable",Zn="active",Jn="selected",Qn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",er="ArrowLeft",tr="ArrowRight",nr="ArrowUp",rr="ArrowDown";function ir(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function or(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ft(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ar(e,t){if(!Vt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(or(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function lr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function cr(e){return Bt(e)&&e.matches(Qn)}function ur(e){return!!e&&("combobox"===e.getAttribute("role")&&cr(e))}function dr(e){return e?e.hasAttribute(Xn)?e:e.querySelector(`[${Xn}]`)||e:null}function fr(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...fr(e,t.id,n)])}function pr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function hr(e){e.preventDefault(),e.stopPropagation()}function mr(e){return!(""!==e.pointerType||!e.isTrusted)||(Yn&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function yr(e){return!Gn&&(!Yn&&0===e.width&&0===e.height||Yn&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function vr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function gr(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}const br=["top","right","bottom","left"],xr=Math.min,wr=Math.max,Er=Math.round,Or=Math.floor,Sr=e=>({x:e,y:e}),kr={left:"right",right:"left",bottom:"top",top:"bottom"};function Pr(e,t,n){return wr(e,xr(t,n))}function jr(e,t){return"function"==typeof e?e(t):e}function Ar(e){return e.split("-")[0]}function Tr(e){return e.split("-")[1]}function Mr(e){return"x"===e?"y":"x"}function Cr(e){return"y"===e?"height":"width"}function Nr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ir(e){return Mr(Nr(e))}function Dr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _r=["left","right"],Rr=["right","left"],Lr=["top","bottom"],zr=["bottom","top"];function Vr(e,t,n,r){const i=Tr(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Rr:_r:t?_r:Rr;case"left":case"right":return t?Lr:zr;default:return[]}}(Ar(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(Dr)))),o}function Br(e){const t=Ar(e);return kr[t]+e.slice(t.length)}function Fr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function $r(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ur(e,t,n){return Math.floor(e/t)!==n}function Wr(e,t){return t<0||t>=e.current.length}function Kr(e,t){return Yr(e,{disabledIndices:t})}function Hr(e,t){return Yr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Yr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do{o+=n?-i:i}while(o>=0&&o<=e.current.length-1&&Xr(e,o,r));return o}function qr(e,t,n,r,i){if(-1===e)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function Gr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Xr(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;const r=e.current[t];return!!r&&(!Zr(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function Zr(e){return"none"!==Jt(e).display}
|
|
11
|
+
/*!
|
|
12
|
+
* tabbable 6.4.0
|
|
13
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
14
|
+
*/var Jr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),Qr="undefined"==typeof Element,ei=Qr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ti=!Qr&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ni=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):ni(e.parentNode))},ri=function(e,t,n){if(ni(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Jr));return t&&ei.call(e,Jr)&&r.unshift(e),r=r.filter(n)},ii=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!ni(o,!1))if("SLOT"===o.tagName){var a=o.assignedElements(),s=a.length?a:o.children,l=ii(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{ei.call(o,Jr)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(o),u=!ni(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var d=ii(!0===c?o.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},oi=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ai=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!oi(e)?0:e.tabIndex},si=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},li=function(e){return"INPUT"===e.tagName},ci=function(e){return function(e){return li(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ti(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},ui=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},di=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var i=ei.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ei.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ui(e)}else{if("function"==typeof r){for(var o=e;e;){var a=e.parentElement,s=ti(e);if(a&&!a.shadowRoot&&!0===r(a))return ui(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,r,i,o=e&&ti(e),a=null===(t=o)||void 0===t?void 0:t.host,s=!1;if(o&&o!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=o=ti(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},fi=function(e,t){return!(t.disabled||function(e){return li(e)&&"hidden"===e.type}(t)||di(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ei.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},pi=function(e,t){return!(ci(t)||ai(t)<0||!fi(e,t))},hi=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},mi=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,o=i?e.scopeParent:e,a=function(e,t){var n=ai(e);return n<0&&t&&!oi(e)?0:n}(o,i),s=i?mi(e.candidates):o;0===a?i?t.push.apply(t,s):t.push(o):n.push({documentOrder:r,tabIndex:a,item:e,isScope:i,content:s})}),n.sort(si).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},yi=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ii([e],t.includeContainer,{filter:pi.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:hi}):ri(e,t.includeContainer,pi.bind(null,t)),mi(n)},vi=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ei.call(e,Jr)&&pi(t,e)};const gi=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bi(e,t){const n=yi(e,gi()),r=n.length;if(0===r)return;const i=ir(Vn(e)),o=n.indexOf(i);return n[-1===o?1===t?0:r-1:o+t]}function xi(e){return bi(Vn(e).body,1)||e}function wi(e){return bi(Vn(e).body,-1)||e}function Ei(e,t){if(!e)return null;const n=yi(Vn(e).body,gi()),r=n.length;if(0===r)return null;const i=n.indexOf(e);if(-1===i)return null;return n[(i+t+r)%r]}function Oi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!or(n,r)}function Si(e){yi(e,gi()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function ki(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Pi=null;let ji=globalThis.requestAnimationFrame;const Ai=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="production"!==process.env.NODE_ENV&&ji!==requestAnimationFrame&&(ji=requestAnimationFrame,!0);return this.isScheduled&&!n||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Ti{static create(){return new Ti}static request(e){return Ai.request(e)}static cancel(e){return Ai.cancel(e)}currentId=Pi;request(e){this.cancel(),this.currentId=Ai.request(()=>{this.currentId=Pi,e()})}cancel=()=>{this.currentId!==Pi&&(Ai.cancel(this.currentId),this.currentId=Pi)};disposeEffect=()=>this.cancel}function Mi(){const e=H(Ti.create).current;return _n(e.disposeEffect),e}function Ci(e){return null==e?e:"current"in e?e.current:e}let Ni=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Ii={[Ni.startingStyle]:""},Di={[Ni.endingStyle]:""},_i={transitionStatus:e=>"starting"===e?Ii:"ending"===e?Di:null};function Ri(e,t=!1,n=!0){const r=Mi();return sn((i,o=null)=>{function a(){E.flushSync(i)}r.cancel();const s=Ci(e);if(null==s)return;const l=s;if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function c(){const e=Ni.startingStyle;if(!l.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),u())});t.observe(l,{attributes:!0,attributeFilter:[e]}),o?.addEventListener("abort",()=>t.disconnect(),{once:!0})}function u(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{o?.aborted||a()}).catch(()=>{const e=l.getAnimations();if(n){if(o?.aborted)return;a()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}if(t)return void c();r.request(u)}})}function Li(t){const{enabled:n=!0,open:r,ref:i,onComplete:o}=t,a=sn(o),s=Ri(i,r,!1);e.useEffect(()=>{if(!n)return;const e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[n,r,a,s])}function zi(t){const{enabled:n=!0,value:r,id:i,name:o,controlRef:a,commit:s}=t,{formRef:l}=e.useContext(jn),{invalid:c,markedDirtyRef:u,validityData:d,setValidityData:f}=Pn(),p=sn(t.getValue);pn(()=>{if(!n)return;let e=r;void 0===e&&(e=p()),null===d.initialValue&&null!==e&&f(t=>({...t,initialValue:e}))},[n,f,r,d.initialValue,p]),pn(()=>{n&&i&&l.current.fields.set(i,{getValue:p,name:o,controlRef:a,validityData:zn(d,c),validate(e=!0){let t=r;void 0===t&&(t=p()),u.current=!0,e?E.flushSync(()=>s(t)):s(t)}})},[s,a,n,l,p,i,c,u,o,d,r]),pn(()=>{const e=l.current.fields;return()=>{i&&e.delete(i)}},[l,i])}const Vi="none",Bi="trigger-press",Fi="trigger-hover",$i="trigger-focus",Ui="outside-press",Wi="item-press",Ki="focus-out",Hi="escape-key",Yi="list-navigation",qi="sibling-open",Gi="imperative-action";function Xi(e,t,n,r){let i=!1,o=!1;const a=ne;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const Zi=e.forwardRef(function(t,n){const{render:r,className:i,id:o,name:a,value:s,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:d=!1,...f}=t,{state:p,name:h,disabled:m,setTouched:y,setDirty:v,validityData:g,setFocused:b,setFilled:x,validationMode:w,validation:E}=Pn(),O=m||l,S=h??a,k={...p,disabled:O},{labelId:P}=In(),j=function(t={}){const{id:n,implicit:r=!1,controlRef:i}=t,{controlId:o,registerControlId:a}=In(),s=Cn(n),l=r?o:void 0,c=H(()=>Symbol("labelable-control")),u=e.useRef(!1),d=e.useRef(null!=n),f=sn(()=>{u.current&&a!==ee&&(u.current=!1,a(c.current,void 0))});return pn(()=>{if(a===ee)return;let e;if(r){const t=i?.current;e=Vt(t)&&null!=t.closest("label")?n??null:l??s}else if(null!=n)d.current=!0,e=n;else{if(!d.current)return void f();e=s}void 0!==e?(u.current=!0,a(c.current,e)):f()},[n,i,l,a,r,s,c,f]),e.useEffect(()=>f,[f]),o??s}({id:o});pn(()=>{const e=null!=s;E.inputRef.current?.value||e&&""!==s?x(!0):e&&""===s&&x(!1)},[E.inputRef,x,s]);const A=e.useRef(null);pn(()=>{d&&A.current===ir(Vn(A.current))&&b(!0)},[d,b]);const[T]=function({controlled:t,default:n,name:r,state:i="value"}){const{current:o}=e.useRef(void 0!==t),[a,s]=e.useState(n),l=o?t:a;if("production"!==process.env.NODE_ENV){e.useEffect(()=>{o!==(void 0!==t)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[i,r,t]);const{current:a}=e.useRef(n);e.useEffect(()=>{o||JSON.stringify(a)===JSON.stringify(n)||console.error([`Base UI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join("\n"))},[JSON.stringify(n)])}return[l,e.useCallback(e=>{o||s(e)},[])]}({controlled:s,default:u,name:"FieldControl",state:"value"}),M=void 0!==s,C=M?T:void 0;zi({id:j,name:S,commit:E.commit,value:C,getValue:()=>E.inputRef.current?.value,controlRef:E.inputRef});return se("input",t,{ref:[n,A],state:k,props:[{id:j,disabled:O,name:S,ref:E.inputRef,"aria-labelledby":P,autoFocus:d,...M?{value:C}:{defaultValue:u},onChange(e){const t=e.currentTarget.value;c?.(t,Xi(Vi,e.nativeEvent)),v(t!==g.initialValue),x(""!==t)},onFocus(){b(!0)},onBlur(e){y(!0),b(!1),"onBlur"===w&&E.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(y(!0),E.commit(e.currentTarget.value))}},E.getInputValidationProps(),f],stateAttributesMapping:Sn})});"production"!==process.env.NODE_ENV&&(Zi.displayName="FieldControl");const Ji=e.forwardRef(function(e,t){return N.jsx(Zi,{ref:t,...e})});function Qi(e){var{className:t,type:n}=e,r=I(e,["className","type"]);return N.jsx(Ji,Object.assign({type:n,"data-slot":"input",className:It("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t)},r))}"production"!==process.env.NODE_ENV&&(Ji.displayName="Input");const eo=e.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return se("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})});"production"!==process.env.NODE_ENV&&(eo.displayName="Separator");const to=e.createContext(void 0);function no(t){const n=e.useContext(to);if(!1===t&&void 0===n)throw new Error("production"!==process.env.NODE_ENV?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":W(27));return n}"production"!==process.env.NODE_ENV&&(to.displayName="DialogRootContext");let ro=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ni.startingStyle]="startingStyle",e[e.endingStyle=Ni.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),io=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const oo={[io.popupOpen]:""},ao={[io.popupOpen]:"",[io.pressed]:""},so={[ro.open]:""},lo={[ro.closed]:""},co={[ro.anchorHidden]:""},uo={open:e=>e?oo:null},fo={open:e=>e?ao:null},po={open:e=>e?so:lo,anchorHidden:e=>e?co:null},ho={...po,..._i},mo=e.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=no(),s=a.useState("open"),l=a.useState("nested"),c=a.useState("mounted");return se("div",e,{state:{open:s,transitionStatus:a.useState("transitionStatus")},ref:[a.context.backdropRef,t],stateAttributesMapping:ho,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!l})});"production"!==process.env.NODE_ENV&&(mo.displayName="DialogBackdrop");const yo=e.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,...a}=e,{store:s}=no(),l=s.useState("open");const{getButtonProps:c,buttonRef:u}=yn({disabled:i,native:o});return se("button",e,{state:{disabled:i},ref:[t,u],props:[{onClick:function(e){l&&s.setOpen(!1,Xi("close-press",e.nativeEvent))}},a,c]})});"production"!==process.env.NODE_ENV&&(yo.displayName="DialogClose");const vo=e.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,{store:a}=no(),s=Cn(i);return a.useSyncedValueWithCleanup("descriptionElementId",s),se("p",e,{ref:t,props:[{id:s},o]})});function go(e,t,n){const r=function(e,t){return null==t||vr(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function bo(e){return"function"==typeof e?e():e}function xo(e,t){return t||"click"===e||"mousedown"===e}"production"!==process.env.NODE_ENV&&(vo.displayName="DialogDescription");const wo=e.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Rn,currentIdRef:{current:null},currentContextRef:{current:null}});function Eo(e){const t=H(Oo,e).current;return t.next=e,pn(t.effect),t}function Oo(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}"production"!==process.env.NODE_ENV&&(wo.displayName="FloatingDelayGroupContext");const So={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},ko=e.forwardRef(function(t,n){const[r,i]=e.useState();pn(()=>{Hn&&i("button")},[]);const o={tabIndex:0,role:r};return N.jsx("span",{...t,ref:n,style:So,"aria-hidden":!r||void 0,...o,"data-base-ui-focus-guard":""})});function Po(e){return`data-base-ui-${e}`}"production"!==process.env.NODE_ENV&&(ko.displayName="FocusGuard");let jo=0;function Ao(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(jo);const o=()=>e?.focus({preventScroll:n});i?o():jo=requestAnimationFrame(o)}const To={inert:new WeakMap,"aria-hidden":new WeakMap},Mo="data-base-ui-inert",Co={inert:new WeakSet,"aria-hidden":new WeakSet};let No=new WeakMap,Io=0;function Do(e){return e?Ft(e)?e.host:Do(e.parentNode):null}const _o=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=Do(t);return e.contains(n)?n:null}).filter(e=>null!=e),Ro=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Lo=(e,t,n)=>{const r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==_t(e)&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function zo(e,t,n,r,{mark:i=!0,markerIgnoreElements:o=[]}){const a=r?"inert":n?"aria-hidden":null;let s=null,l=null;const c=_o(t,e),u=i?_o(t,o):[],d=new Set(u),f=i?Lo(t,Ro(c),new Set(c)).filter(e=>!d.has(e)):[],p=[],h=[];if(a){const e=To[a],n=function(e){return Co[e]}(a);l=n,s=e;const r=_o(t,Array.from(t.querySelectorAll("[aria-live]"))),i=c.concat(r);Lo(t,Ro(i),new Set(i)).forEach(t=>{const r=t.getAttribute(a),i=null!==r&&"false"!==r,o=(e.get(t)||0)+1;e.set(t,o),p.push(t),1===o&&i&&n.add(t),i||t.setAttribute(a,"inert"===a?"":"true")})}return i&&f.forEach(e=>{const t=(No.get(e)||0)+1;No.set(e,t),h.push(e),1===t&&e.setAttribute(Mo,"")}),Io+=1,()=>{s&&p.forEach(e=>{const t=(s.get(e)||0)-1;s.set(e,t),t||(!l?.has(e)&&a&&e.removeAttribute(a),l?.delete(e))}),i&&h.forEach(e=>{const t=(No.get(e)||0)-1;No.set(e,t),t||e.removeAttribute(Mo)}),Io-=1,Io||(To.inert=new WeakMap,To["aria-hidden"]=new WeakMap,Co.inert=new WeakSet,Co["aria-hidden"]=new WeakSet,No=new WeakMap)}}function Vo(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:o=[]}=t;return zo(e,Vn(e[0]).body,n,r,{mark:i,markerIgnoreElements:o})}const Bo=e.createContext(null);"production"!==process.env.NODE_ENV&&(Bo.displayName="PortalContext");const Fo=()=>e.useContext(Bo),$o=Po("portal");function Uo(t={}){const{ref:n,container:r,componentProps:i=ne,elementProps:o}=t,a=Mn(),s=Fo(),l=s?.portalNode,[c,u]=e.useState(null),[d,f]=e.useState(null),p=sn(e=>{null!==e&&f(e)}),h=e.useRef(null);pn(()=>{if(null===r)return void(h.current&&(h.current=null,f(null),u(null)));if(null==a)return;const e=(r&&(zt(r)?r:r.current))??l??document.body;null!=e?h.current!==e&&(h.current=e,f(null),u(e)):h.current&&(h.current=null,f(null),u(null))},[r,l,a]);const m=se("div",i,{ref:[n,p],props:[{id:a,[$o]:""},o]});return{portalNode:d,portalSubtree:c&&m?E.createPortal(m,c):null}}const Wo=e.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=Uo({container:i,ref:n,componentProps:t,elementProps:l}),d=e.useRef(null),f=e.useRef(null),p=e.useRef(null),h=e.useRef(null),[m,y]=e.useState(null),v=m?.modal,g=m?.open,b="boolean"==typeof s?s:!!m&&!m.modal&&m.open&&!!c;e.useEffect(()=>{if(c&&!v)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&e.relatedTarget&&Oi(e)){("focusin"===e.type?ki:Si)(c)}}},[c,v]),e.useEffect(()=>{c&&!g&&ki(c)},[g,c]);const x=e.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:y}),[c]);return N.jsxs(e.Fragment,{children:[u,N.jsxs(Bo.Provider,{value:x,children:[b&&c&&N.jsx(ko,{"data-type":"outside",ref:d,onFocus:e=>{if(Oi(e,c))p.current?.focus();else{const e=wi(m?m.domReference:null);e?.focus()}}}),b&&c&&N.jsx("span",{"aria-owns":c.id,style:ae}),c&&E.createPortal(r,c),b&&c&&N.jsx(ko,{"data-type":"outside",ref:f,onFocus:e=>{if(Oi(e,c))h.current?.focus();else{const t=xi(m?m.domReference:null);t?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,Xi(Ki,e.nativeEvent))}}})]})]})});function Ko(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}"production"!==process.env.NODE_ENV&&(Wo.displayName="FloatingPortal");class Ho{nodesRef={current:[]};events=Ko();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}const Yo=e.createContext(null);"production"!==process.env.NODE_ENV&&(Yo.displayName="FloatingNodeContext");const qo=e.createContext(null);"production"!==process.env.NODE_ENV&&(qo.displayName="FloatingTreeContext");const Go=()=>e.useContext(Yo)?.id||null,Xo=t=>{const n=e.useContext(qo);return t??n};function Zo(e){const t=Mn(),n=Xo(e),r=Go();return pn(()=>{if(!t)return;const e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Jo(t){const{children:n,id:r}=t,i=Go();return N.jsx(Yo.Provider,{value:e.useMemo(()=>({id:r,parentId:i}),[r,i]),children:n})}function Qo(e){const{children:t,externalTree:n}=e,r=H(()=>n??new Ho).current;return N.jsx(qo.Provider,{value:r,children:t})}let ea=[];function ta(){ea=ea.filter(e=>e.deref()?.isConnected)}function na(){return ta(),ea[ea.length-1]?.deref()}function ra(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=gi(),r=function(e,t){return(t=t||{}).getShadowRoot?ii([e],t.includeContainer,{filter:fi.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ri(e,t.includeContainer,fi.bind(null,t))}(e,n),i=r.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return vi(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||0===i.length?"0"!==o&&e.setAttribute("tabindex","0"):("-1"!==o||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ia(t){const{context:n,children:r,disabled:i=!1,initialFocus:o=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:h,getInsideElements:m}=t,y="rootStore"in n?n.rootStore:n,v=y.useState("open"),g=y.useState("domReferenceElement"),b=y.useState("floatingElement"),{events:x,dataRef:w}=y.context,E=sn(()=>w.current.floatingContext?.nodeId),O=!1===o,S=ur(g)&&O,k=e.useRef(["content"]),P=Eo(o),j=Eo(a),A=Eo(u),T=Xo(h),M=Fo(),C=e.useRef(!1),I=e.useRef(!1),D=e.useRef(!1),_=e.useRef(-1),R=e.useRef(""),L=e.useRef(""),z=e.useRef(null),V=e.useRef(null),B=Y(z,p,M?.beforeInsideRef),F=Y(V,M?.afterInsideRef),$=Ln(),U=Ln(),W=Mi(),K=null!=M,H=dr(b),q=sn((e=H)=>e?yi(e,gi()):[]),G=sn(()=>m?.().filter(e=>null!=e)??[]),X=sn(e=>{const t=q(e);return k.current.map(()=>t).filter(Boolean).flat()});e.useEffect(()=>{if(i||!l)return;function e(e){"Tab"===e.key&&or(H,ir(Vn(H)))&&0===q().length&&!S&&hr(e)}const t=Vn(H);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[i,g,H,l,k,S,q,X]),e.useEffect(()=>{if(i||!v)return;const e=Vn(H);function t(){D.current=!1}function n(e){const t=sr(e),n=G(),r=or(b,t)||or(g,t)||or(M?.portalNode,t)||n.some(e=>e===t||or(e,t));D.current=!r,L.current=e.pointerType||"keyboard",t?.closest("[data-base-ui-click-trigger]")&&(I.current=!0)}function r(){L.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",r,!0)}},[i,b,g,H,v,M,G]),e.useEffect(()=>{if(i||!c)return;const e=Vn(H);function t(){I.current=!0,U.start(0,()=>{I.current=!1})}function n(e){const t=sr(e),n=q().indexOf(t);-1!==n&&(_.current=n)}function r(t){const n=t.relatedTarget,r=t.currentTarget,i=sr(t);queueMicrotask(()=>{const o=E(),a=y.context.triggerElements,c=G(),u=n?.hasAttribute(Po("focus-guard"))&&[z.current,V.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,Ci(f),Ci(d)].includes(n),p=!(or(g,n)||or(b,n)||or(n,b)||or(M?.portalNode,n)||c.some(e=>e===n||or(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>or(e,n))||u||T&&(fr(T.nodesRef.current,o).find(e=>or(e.context?.elements.floating,n)||or(e.context?.elements.domReference,n))||pr(T.nodesRef.current,o).find(e=>[e.context?.elements.floating,dr(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===g&&H&&ra(H,k),s&&r!==g&&!((h=i)&&h.isConnected&&("function"==typeof h.checkVisibility?h.checkVisibility():Zr(h)))&&ir(e)===e.body){if(Bt(H)&&(H.focus(),"popup"===s))return void W.request(()=>{H.focus()});const e=_.current,t=q(),n=t[e]||t[t.length-1]||H;Bt(n)&&n.focus()}var h;w.current.insideReactTree?w.current.insideReactTree=!1:!S&&l||!n||!p||I.current||!S&&n===na()||(C.current=!0,y.setOpen(!1,Xi(Ki,t)))})}function o(){D.current||(w.current.insideReactTree=!0,$.start(0,()=>{w.current.insideReactTree=!1}))}const a=Bt(g)?g:null,u=[];return b||a?(a&&(a.addEventListener("focusout",r),a.addEventListener("pointerdown",t),u.push(()=>{a.removeEventListener("focusout",r),a.removeEventListener("pointerdown",t)})),b&&(b.addEventListener("focusin",n),b.addEventListener("focusout",r),M&&(b.addEventListener("focusout",o,!0),u.push(()=>{b.removeEventListener("focusout",o,!0)})),u.push(()=>{b.removeEventListener("focusin",n),b.removeEventListener("focusout",r)})),()=>{u.forEach(e=>{e()})}):void 0},[i,g,b,H,l,T,M,y,c,s,q,S,E,k,w,$,U,W,d,f,G]),e.useEffect(()=>{if(i||!b||!v)return;const e=Array.from(M?.portalNode?.querySelectorAll(`[${Po("portal")}]`)||[]),t=T?pr(T.nodesRef.current,E()):[],n=t.find(e=>ur(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[...[b,...e,z.current,V.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...G()],n,Ci(f),Ci(d),S?g:null].filter(e=>null!=e),o=Vo(r,{ariaHidden:l||S,mark:!1}),a=[b,...e].filter(e=>null!=e),s=Vo(a);return()=>{s(),o()}},[v,i,g,b,l,k,M,S,T,E,d,f,G]),pn(()=>{if(!v||i||!Bt(H))return;const e=ir(Vn(H));queueMicrotask(()=>{const t=X(H),n=P.current,r="function"==typeof n?n(A.current||""):n;if(void 0===r||!1===r)return;let i;i=!0===r||null===r?t[0]||H:Ci(r),i=i||t[0]||H;or(H,e)||Ao(i,{preventScroll:i===H})})},[i,v,H,O,X,P,A]),pn(()=>{if(i||!H)return;const e=Vn(H),t=ir(e);var n;function r(e){if(e.open||(R.current=function(e,t){const n=Rt(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,L.current)),e.reason===Fi&&"mouseleave"===e.nativeEvent.type&&(C.current=!0),e.reason===Ui)if(e.nested)C.current=!1;else if(mr(e.nativeEvent)||yr(e.nativeEvent))C.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),C.current=!e}}return n=t,ta(),n&&"body"!==_t(n)&&(ea.push(new WeakRef(n)),ea.length>20&&(ea=ea.slice(-20))),x.on("openchange",r),()=>{x.off("openchange",r);const t=ir(e),n=G(),i=or(b,t)||n.some(e=>e===t||or(e,t))||T&&fr(T.nodesRef.current,E(),!1).some(e=>or(e.context?.elements.floating,t)),o=function(){const e=j.current;let t="function"==typeof e?e(R.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=g||na();return e&&e.isConnected?e:null}const n=g||na();return Ci(t)||n||null}();queueMicrotask(()=>{const n=function(e){if(!e)return null;const t=gi();return vi(e,t)?e:yi(e,t)[0]||e}(o),r="boolean"!=typeof j.current;j.current&&!C.current&&Bt(n)&&(r||n===t||t===e.body||i)&&n.focus({preventScroll:!0}),C.current=!1})}},[i,b,H,j,w,x,T,g,E,G]),pn(()=>{if(!Wn||v||!b)return;const e=ir(Vn(b));Bt(e)&&cr(e)&&or(b,e)&&e.blur()},[v,b]),pn(()=>{if(!i&&M)return M.setFocusManagerState({modal:l,closeOnFocusOut:c,open:v,onOpenChange:y.setOpen,domReference:g}),()=>{M.setFocusManagerState(null)}},[i,M,l,v,y,c,g]),pn(()=>{if(!i&&H)return ra(H,k),()=>{queueMicrotask(ta)}},[i,H,k]);const Z=!i&&(!l||!S)&&(K||l);return N.jsxs(e.Fragment,{children:[Z&&N.jsx(ko,{"data-type":"inside",ref:B,onFocus:e=>{if(l){const e=X();Ao(e[e.length-1])}else if(M?.portalNode)if(C.current=!1,Oi(e,M.portalNode)){const e=xi(g);e?.focus()}else Ci(f??M.beforeOutsideRef)?.focus()}}),r,Z&&N.jsx(ko,{"data-type":"inside",ref:F,onFocus:e=>{if(l)Ao(X()[0]);else if(M?.portalNode)if(c&&(C.current=!0),Oi(e,M.portalNode)){const e=wi(g);e?.focus()}else Ci(d??M.afterOutsideRef)?.focus()}})]})}function oa(e){return null!=e&&null!=e.clientX}const aa={intentional:"onClick",sloppy:"onPointerDown"};function sa(){return!1}function la(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),{dataRef:a}=r.context,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="sloppy",referencePress:d=sa,referencePressEvent:f="sloppy",bubbles:p,externalTree:h}=n,m=Xo(h),y=sn("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,g=!1!==v,b=sn(()=>u),x=e.useRef(!1),w=e.useRef(!1),E=e.useRef(!1),{escapeKey:O,outsidePress:S}={escapeKey:"boolean"==typeof(k=p)?k:k?.escapeKey??!1,outsidePress:"boolean"==typeof k?k:k?.outsidePress??!0};var k;const P=e.useRef(null),j=Ln(),A=Ln(),T=sn(()=>{A.clear(),a.current.insideReactTree=!1}),M=e.useRef(!1),C=e.useRef(""),N=sn(d),I=sn(e=>{if(!i||!s||!l||"Escape"!==e.key)return;if(M.current)return;const t=a.current.floatingContext?.nodeId,n=m?fr(m.nodesRef.current,t):[];if(!O&&n.length>0){let e=!0;if(n.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}const o=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,c=Xi(Hi,o);r.setOpen(!1,c),O||c.isPropagationAllowed||e.stopPropagation()}),D=sn(()=>{a.current.insideReactTree=!0,A.start(0,T)});e.useEffect(()=>{if(!i||!s)return;a.current.__escapeKeyBubbles=O,a.current.__outsidePressBubbles=S;const e=new Rn,t=new Rn;function n(){e.clear(),M.current=!0}function c(){e.start(Xt()?5:0,()=>{M.current=!1})}function u(){E.current=!0,t.start(0,()=>{E.current=!1})}function d(){x.current=!1,w.current=!1}function f(){const e=C.current,t="pen"!==e&&e?e:"mouse",n=b(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function p(e){const t=a.current.floatingContext?.nodeId,n=m&&fr(m.nodesRef.current,t).some(t=>lr(e,t.context?.elements.floating));return lr(e,r.select("floatingElement"))||lr(e,r.select("domReferenceElement"))||n}function h(e){if(function(e){const t=f();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return void T();if(a.current.insideReactTree)return void T();const n=sr(e),i=`[${Po("inert")}]`;let o=Array.from(Vn(r.select("floatingElement")).querySelectorAll(i));const s=Vt(n)?n.getRootNode():null;Ft(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));const l=r.context.triggerElements;if(n&&(l.hasElement(n)||l.hasMatchingElement(e=>or(e,n))))return;let c=Vt(n)?n:null;for(;c&&!Zt(c);){const e=en(c);if(Zt(e)||!Vt(e))break;c=e}if(o.length&&Vt(n)&&!n.matches("html,body")&&!or(n,r.select("floatingElement"))&&o.every(e=>!or(c,e)))return;if(Bt(n)&&!("touches"in e)){const t=Zt(n),r=Jt(n),i=/auto|scroll/,o=t||i.test(r.overflowX),a=t||i.test(r.overflowY),s=o&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,l=a&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,c="rtl"===r.direction,u=l&&(c?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&E.current)return t.clear(),void(E.current=!1);if("function"==typeof v&&!v(e))return;const u=a.current.floatingContext?.nodeId,d=m?fr(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r.setOpen(!1,Xi(Ui,e)),T()}function y(e){C.current="touch";const t=sr(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!r.select("open")||!s||lr(e,r.select("floatingElement"))||lr(e,r.select("domReferenceElement")))return;const t=e.touches[0];t&&(P.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,n)})}function k(e){if(j.clear(),"pointerdown"===e.type&&(C.current=e.pointerType),"mousedown"===e.type&&P.current&&!P.current.dismissOnMouseDown)return;const t=sr(e);t?.addEventListener(e.type,function n(){"pointerdown"===e.type?function(e){"sloppy"===f()&&"touch"!==e.pointerType&&r.select("open")&&s&&!lr(e,r.select("floatingElement"))&&!lr(e,r.select("domReferenceElement"))&&h(e)}(e):h(e),t?.removeEventListener(e.type,n)})}function A(e){if(!x.current)return;const n=w.current;d(),"intentional"===f()&&("pointercancel"!==e.type?p(e)||(n?u():("function"!=typeof v||v(e))&&(t.clear(),E.current=!0,T())):n&&u())}function N(e){const t=sr(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!P.current||lr(e,r.select("floatingElement"))||lr(e,r.select("domReferenceElement")))return;const t=e.touches[0];if(!t)return;const n=Math.abs(t.clientX-P.current.startX),i=Math.abs(t.clientY-P.current.startY),o=Math.sqrt(n*n+i*i);o>5&&(P.current.dismissOnTouchEnd=!0),o>10&&(h(e),j.clear(),P.current=null)}(e),t?.removeEventListener(e.type,n)})}function D(e){const t=sr(e);t?.addEventListener(e.type,function n(){!function(e){"sloppy"!==f()||!P.current||lr(e,r.select("floatingElement"))||lr(e,r.select("domReferenceElement"))||(P.current.dismissOnTouchEnd&&h(e),j.clear(),P.current=null)}(e),t?.removeEventListener(e.type,n)})}const _=Vn(o);return l&&(_.addEventListener("keydown",I),_.addEventListener("compositionstart",n),_.addEventListener("compositionend",c)),g&&(_.addEventListener("click",k,!0),_.addEventListener("pointerdown",k,!0),_.addEventListener("pointerup",A,!0),_.addEventListener("pointercancel",A,!0),_.addEventListener("mousedown",k,!0),_.addEventListener("mouseup",A,!0),_.addEventListener("touchstart",y,!0),_.addEventListener("touchmove",N,!0),_.addEventListener("touchend",D,!0)),()=>{l&&(_.removeEventListener("keydown",I),_.removeEventListener("compositionstart",n),_.removeEventListener("compositionend",c)),g&&(_.removeEventListener("click",k,!0),_.removeEventListener("pointerdown",k,!0),_.removeEventListener("pointerup",A,!0),_.removeEventListener("pointercancel",A,!0),_.removeEventListener("mousedown",k,!0),_.removeEventListener("mouseup",A,!0),_.removeEventListener("touchstart",y,!0),_.removeEventListener("touchmove",N,!0),_.removeEventListener("touchend",D,!0)),e.clear(),t.clear(),d(),E.current=!1}},[a,o,l,g,v,i,s,O,S,I,T,b,m,r,j]),e.useEffect(T,[v,T]);const _=e.useMemo(()=>({onKeyDown:I,[aa[f]]:e=>{N()&&r.setOpen(!1,Xi(Bi,e.nativeEvent))},..."intentional"!==f&&{onClick(e){N()&&r.setOpen(!1,Xi(Bi,e.nativeEvent))}}}),[I,r,f,N]),R=sn(e=>{if(!i||!s||0!==e.button)return;const t=sr(e.nativeEvent);or(r.select("floatingElement"),t)&&(x.current||(x.current=!0,w.current=!1))}),L=sn(e=>{i&&s&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(w.current=!0)}),z=e.useMemo(()=>({onKeyDown:I,onPointerDown:L,onMouseDown:L,onClickCapture:D,onMouseDownCapture(e){D(),R(e)},onPointerDownCapture(e){D(),R(e)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[I,D,R,L]);return e.useMemo(()=>s?{reference:_,floating:z,trigger:_}:{},[s,_,z])}function ca(e,t,n){let{reference:r,floating:i}=e;const o=Nr(t),a=Ir(t),s=Cr(a),l=Ar(t),c="y"===o,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Tr(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function ua(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=jr(t,e),h=Fr(p),m=s[f?"floating"===d?"reference":"floating":d],y=$r(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},x=$r(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function da(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fa(e){return br.some(t=>e[t]>=0)}const pa=new Set(["left","top"]);function ha(e){const t=Jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Er(n)!==o||Er(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ma(e){return Vt(e)?e:e.contextElement}function ya(e){const t=ma(e);if(!Bt(t))return Sr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ha(t);let a=(o?Er(n.width):n.width)/r,s=(o?Er(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const va=Sr(0);function ga(e){const t=Rt(e);return Xt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:va}function ba(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=ma(e);let a=Sr(1);t&&(r?Vt(r)&&(a=ya(r)):a=ya(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Rt(e))&&t}(o,n,r)?ga(o):Sr(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Rt(o),t=r&&Vt(r)?Rt(r):r;let n=e,i=rn(n);for(;i&&r&&t!==n;){const e=ya(i),t=i.getBoundingClientRect(),r=Jt(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,n=Rt(i),i=rn(n)}}return $r({width:u,height:d,x:l,y:c})}function xa(e,t){const n=Qt(e).scrollLeft;return t?t.left+n:ba(Lt(e)).left+n}function wa(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xa(e,n),y:n.top+t.scrollTop}}function Ea(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Rt(e),r=Lt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=Xt();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}const c=xa(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Lt(e),n=Qt(e),r=e.ownerDocument.body,i=wr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=wr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+xa(e);const s=-n.scrollTop;return"rtl"===Jt(r).direction&&(a+=wr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Lt(e));else if(Vt(t))r=function(e,t){const n=ba(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Bt(e)?ya(e):Sr(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=ga(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $r(r)}function Oa(e,t){const n=en(e);return!(n===t||!Vt(n)||Zt(n))&&("fixed"===Jt(n).position||Oa(n,t))}function Sa(e,t,n){const r=Bt(t),i=Lt(t),o="fixed"===n,a=ba(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Sr(0);function c(){l.x=xa(i)}if(r||!r&&!o)if(("body"!==_t(t)||$t(i))&&(s=Qt(t)),r){const e=ba(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?Sr(0):wa(i,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function ka(e){return"static"===Jt(e).position}function Pa(e,t){if(!Bt(e)||"fixed"===Jt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Lt(e)===n&&(n=n.ownerDocument.body),n}function ja(e,t){const n=Rt(e);if(Wt(e))return n;if(!Bt(e)){let t=en(e);for(;t&&!Zt(t);){if(Vt(t)&&!ka(t))return t;t=en(t)}return n}let r=Pa(e,t);for(;r&&Ut(r)&&ka(r);)r=Pa(r,t);return r&&Zt(r)&&ka(r)&&!Gt(r)?n:r||function(e){let t=en(e);for(;Bt(t)&&!Zt(t);){if(Gt(t))return t;if(Wt(t))return null;t=en(t)}return null}(e)||n}const Aa={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=Lt(r),s=!!t&&Wt(t.floating);if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Sr(1);const u=Sr(0),d=Bt(r);if((d||!d&&!o)&&(("body"!==_t(r)||$t(a))&&(l=Qt(r)),d)){const e=ba(r);c=ya(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||o?Sr(0):wa(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Lt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?Wt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=nn(e,[],!1).filter(e=>Vt(e)&&"body"!==_t(e)),i=null;const o="fixed"===Jt(e).position;let a=o?en(e):e;for(;Vt(a)&&!Zt(a);){const t=Jt(a),n=Gt(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||$t(a)&&!n&&Oa(e,a))?r=r.filter(e=>e!==a):i=t,a=en(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=Ea(t,o[0],i);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let e=1;e<o.length;e++){const n=Ea(t,o[e],i);s=wr(n.top,s),l=xr(n.right,l),c=xr(n.bottom,c),u=wr(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:ja,getElementRects:async function(e){const t=this.getOffsetParent||ja,n=this.getDimensions,r=await n(e.floating);return{reference:Sa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ha(e);return{width:t,height:n}},getScale:ya,isElement:Vt,isRTL:function(e){return"rtl"===Jt(e).direction}};function Ta(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ma(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=ma(e),u=i||o?[...c?nn(c):[],...t?nn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const i=Lt(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-Or(d)+"px "+-Or(i.clientWidth-(u+f))+"px "+-Or(i.clientHeight-(d+p))+"px "+-Or(u)+"px",threshold:wr(0,xr(1,l))||1};let m=!0;function y(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Ta(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(y,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),o}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?ba(e):null;return l&&function t(){const r=ba(e);m&&!Ta(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Ca=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Ar(n),s=Tr(n),l="y"===Nr(n),c=pa.has(a)?-1:1,u=o&&l?-1:1,d=jr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Na=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=jr(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),f=Nr(Ar(i)),p=Mr(f);let h=u[p],m=u[f];if(a){const e="y"===p?"bottom":"right";h=Pr(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";m=Pr(m+d["y"===f?"top":"left"],m,m-d[e])}const y=l.fn({...t,[p]:h,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:a,[f]:s}}}}}},Ia=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=jr(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=Ar(i),g=Nr(s),b=Ar(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Br(s)]:function(e){const t=Br(e);return[Dr(e),t,Dr(t)]}(s)),E="none"!==h;!f&&E&&w.push(...Vr(s,m,h,x));const O=[s,...w],S=await l.detectOverflow(t,y),k=[];let P=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&k.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Tr(e),i=Ir(e),o=Cr(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Br(a)),[a,Br(a)]}(i,a,x);k.push(S[e[0]],S[e[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every(e=>e<=0)){var j,A;const e=((null==(j=o.flip)?void 0:j.index)||0)+1,t=O[e];if(t){if(!("alignment"===d&&g!==Nr(t))||P.every(e=>Nr(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let n=null==(A=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=P.filter(e=>{if(E){const t=Nr(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},Da=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=jr(e,t),u=await a.detectOverflow(t,c),d=Ar(i),f=Tr(i),p="y"===Nr(i),{width:h,height:m}=o.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,y="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,x=xr(m-u[y],g),w=xr(h-u[v],b),E=!t.middlewareData.shift;let O=x,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=g),E&&!f){const e=wr(u.left,0),t=wr(u.right,0),n=wr(u.top,0),r=wr(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:wr(u.left,u.right)):O=m-2*(0!==n||0!==r?n+r:wr(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:O});const k=await a.getDimensions(s.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}},_a=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=jr(e,t);switch(i){case"referenceHidden":{const e=da(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fa(e)}}}case"escaped":{const e=da(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fa(e)}}}default:return{}}}}},Ra=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=jr(e,t),u={x:n,y:r},d=Nr(i),f=Mr(d);let p=u[f],h=u[d];const m=jr(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+y.mainAxis,n=o.reference[f]+o.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,g;const e="y"===f?"width":"height",t=pa.has(Ar(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:y.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},La=(e,t,n)=>{const r=new Map,i={platform:Aa,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:ua},l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ca(c,r,l),f=r,p=0;const h={};for(let n=0;n<o.length;n++){const m=o[n];if(!m)continue;const{name:y,fn:v}=m,{x:g,y:b,data:x,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=b?b:d,h[y]={...h[y],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),({x:u,y:d}=ca(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var za="undefined"!=typeof document?r:function(){};function Va(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Va(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Va(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ba(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fa(e,t){const n=Ba(e);return Math.round(t*n)/n}function $a(t){const n=e.useRef(t);return za(()=>{n.current=t}),n}const Ua=(e,t)=>{const n=Ca(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Wa=(e,t,n)=>{if(1===t.length&&t[0]===n){let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},Ka=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:o,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...i);if(!(s.apply(null,o)===s.apply(null,a))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:o,secondInputs:a,stack:e})}},Ha={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ya=Symbol("NOT_FOUND");var qa=e=>Array.isArray(e)?e:[e];function Ga(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xa(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Za=(e,t)=>e===t;var Ja="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function Qa(){return{s:0,v:void 0,o:null,p:null}}function es(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,o=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=Qa(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=Qa(),e.set(n,t)):t=r}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),o++,r){const e=i?.deref?.()??i;null!=e&&r(e,l)&&(l=e,0!==o&&o--);i="object"==typeof l&&null!==l||"function"==typeof l?new Ja(l):l}return s.s=1,s.v=l,l}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ts(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,o={},a=e.pop();"object"==typeof a&&(o=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=es,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=qa(c),h=qa(d),m=Ga(e),y=l(function(){return r++,a.apply(null,arguments)},...p);let v=!0;const g=u(function(){i++;const e=Xa(m,arguments);if(t=y.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ha,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:Wa},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:Ka}}})(v,f);if(n.shouldRun&&n.run(a,e,t),r.shouldRun){const t=Xa(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}v&&(v=!1)}return t},...h);return Object.assign(g,{resultFunc:a,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var ns=ts(es),rs=Object.assign((e,t=ns)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>rs});ts({memoize:function(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Za,maxSize:i=1,resultEqualityCheck:o}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}(r);let s=0;const l=i<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:Ya,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex(n=>t(e,n.key));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return Ya}return{get:r,put:function(t,i){r(t)===Ya&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(i,a);function c(){let t=l.get(arguments);if(t===Ya){if(t=e.apply(null,arguments),s++,o){const e=l.getEntries().find(e=>o(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const is=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error("production"!==process.env.NODE_ENV?"Unsupported number of selectors":W(1));let s;if(!e)throw new Error("Missing arguments");return s=e,s};var os,as={exports:{}},ss={};var ls,cs,us={};
|
|
15
|
+
/**
|
|
16
|
+
* @license React
|
|
17
|
+
* use-sync-external-store-shim.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/function ds(){return cs||(cs=1,"production"===process.env.NODE_ENV?as.exports=function(){if(os)return ss;os=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return o(function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})},[e,n,t]),i(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),a(n),n};return ss.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,ss}():as.exports=(ls||(ls=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,o=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!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 d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=i({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a(function(){p.value=d,p.getSnapshot=u,e(p)&&h({inst:p})},[t,d,u]),o(function(){return e(p)&&h({inst:p}),t(function(){e(p)&&h({inst:p})})},[t]),s(d),d};us.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),us)),as.exports}var fs,ps=ds(),hs={exports:{}},ms={};var ys,vs,gs={};
|
|
24
|
+
/**
|
|
25
|
+
* @license React
|
|
26
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var bs=(vs||(vs=1,"production"===process.env.NODE_ENV?hs.exports=function(){if(fs)return ms;fs=1;var e=t,n=ds(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return ms.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,i=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(i,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,o=n)}var i,o,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=i(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},ms}():hs.exports=(ys||(ys=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=ds(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;gs.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,i=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(i,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,o=n)}var i,o,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=i(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),gs)),hs.exports);const xs=[];let ws;function Es(e){const t=(t,n)=>{const r=H(Ss).current;let i;try{ws=r;for(const e of xs)e.before(r);i=e(t,n);for(const e of xs)e.after(r);r.didInitialize=!0}finally{ws=void 0}return i};return t.displayName=e.displayName||e.name,t}function Os(t){return e.forwardRef(Es(t))}function Ss(){return{didInitialize:!1}}const ks=Z(19)?function(t,n,r,i,o){const a=ws;if(!a)return function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return ps.useSyncExternalStore(t.subscribe,a,a)}(t,n,r,i,o);const s=a.syncIndex;let l;a.syncIndex+=1,a.didInitialize?(l=a.syncHooks[s],l.store===t&&l.selector===n&&Object.is(l.a1,r)&&Object.is(l.a2,i)&&Object.is(l.a3,o)||(l.store!==t&&(a.didChangeStore=!0),l.store=t,l.selector=n,l.a1=r,l.a2=i,l.a3=o,l.didChange=!0)):(l={store:t,selector:n,a1:r,a2:i,a3:o,value:n(t.getSnapshot(),r,i,o),didChange:!1},a.syncHooks.push(l));return l.value}:function(e,t,n,r,i){return bs.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function Ps(e,t,n,r,i){return ks(e,t,n,r,i)}var js;js={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);!r.didChange&&Object.is(r.value,i)||(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),ps.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}},xs.push(js);class As{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return Ps(this,e,t,n,r)}}class Ts extends As{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(t,n){e.useDebugValue(t),pn(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(e,t){const n=this;pn(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(t){const n=this;if("production"!==process.env.NODE_ENV){e.useDebugValue(t,e=>Object.keys(e));const n=e.useRef(Object.keys(t)).current,r=Object.keys(t);(n.length!==r.length||n.some((e,t)=>e!==r[t]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pn(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){e.useDebugValue(t);const r=void 0!==n;if(pn(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),"production"!==process.env.NODE_ENV){const e=this.controlledValues??=new Map;e.has(t)||e.set(t,r);const n=e.get(t);void 0!==n&&n!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(t,n,r,i){return e.useDebugValue(t),Ps(this,this.selectors[t],n,r,i)}useContextCallback(t,n){e.useDebugValue(t);const r=sn(n??ee);this.context[t]=r}useStateSetter(t){const n=e.useRef(void 0);return void 0===n.current&&(n.current=e=>{this.set(t,e)}),n.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const i=n(e);if(!Object.is(r,i)){const e=r;r=i,t(i,e,this)}})}}const Ms={open:is(e=>e.open),domReferenceElement:is(e=>e.domReferenceElement),referenceElement:is(e=>e.positionReference??e.referenceElement),floatingElement:is(e=>e.floatingElement),floatingId:is(e=>e.floatingId)};class Cs extends Ts{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...o}=e;super({...o,positionReference:o.referenceElement,domReferenceElement:o.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ko(),nested:t,noEmit:n,triggerElements:i},Ms)}setOpen=(e,t)=>{if(e&&this.state.open&&!gr(t.event)||(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)}this.context.onOpenChange?.(e,t)}}function Ns(t,n,r,i){const o=r.useState("isMountedByTrigger",t),a=function(t,n){const r=e.useRef(null),i=e.useRef(null);return e.useCallback(e=>{if(void 0!==t){if(null!==r.current){const e=r.current,t=i.current,o=n.context.triggerElements.getById(e);t&&o===t&&n.context.triggerElements.delete(e),r.current=null,i.current=null}null!==e&&(r.current=t,i.current=e,n.context.triggerElements.add(t,e))}},[n,t])}(t,r),s=sn(e=>{if(a(e),!e||!r.select("open"))return;const n=r.select("activeTriggerId");n!==t?null==n&&r.update({activeTriggerId:t,activeTriggerElement:e,...i}):r.update({activeTriggerElement:e,...i})});return pn(()=>{o&&r.update({activeTriggerElement:n.current,...i})},[o,r,n,...Object.values(i)]),{registerTrigger:s,isMountedByThisTrigger:o}}function Is(e){const t=e.useState("open");pn(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){const t=e.context.triggerElements.entries().next();if(!t.done){const[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function Ds(t,n,r){const{mounted:i,setMounted:o,transitionStatus:a}=function(t,n=!1,r=!1){const[i,o]=e.useState(t&&n?"idle":void 0),[a,s]=e.useState(t);return t&&!a&&(s(!0),o("starting")),t||!a||"ending"===i||r||o("ending"),t||a||"ending"!==i||o(void 0),pn(()=>{if(!t&&a&&"ending"!==i&&r){const e=Ti.request(()=>{o("ending")});return()=>{Ti.cancel(e)}}},[t,a,i,r]),pn(()=>{if(!t||n)return;const e=Ti.request(()=>{o(void 0)});return()=>{Ti.cancel(e)}},[n,t]),pn(()=>{if(!t||!n)return;t&&a&&"idle"!==i&&o("starting");const e=Ti.request(()=>{o("idle")});return()=>{Ti.cancel(e)}},[n,t,a,o,i]),e.useMemo(()=>({mounted:a,setMounted:s,transitionStatus:i}),[a,i])}(t);n.useSyncedValues({mounted:i,transitionStatus:a});const s=sn(()=>{o(!1),n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),n.context.onOpenChangeComplete?.(!1)});return Li({enabled:!n.useState("preventUnmountingOnClose"),open:t,ref:n.context.popupRef,onComplete(){t||s()}}),{forceUnmount:s,transitionStatus:a}}class _s{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);if(n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t),"production"!==process.env.NODE_ENV&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Rs(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new Cs({open:!1,floatingElement:null,referenceElement:null,triggerElements:new _s,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ne,inactiveTriggerProps:ne,popupProps:ne}}const Ls=is(e=>e.triggerIdProp??e.activeTriggerId),zs={open:is(e=>e.openProp??e.open),mounted:is(e=>e.mounted),transitionStatus:is(e=>e.transitionStatus),floatingRootContext:is(e=>e.floatingRootContext),preventUnmountingOnClose:is(e=>e.preventUnmountingOnClose),payload:is(e=>e.payload),activeTriggerId:Ls,activeTriggerElement:is(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:is((e,t)=>void 0!==t&&Ls(e)===t),isOpenedByTrigger:is((e,t)=>void 0!==t&&Ls(e)===t&&e.open),isMountedByTrigger:is((e,t)=>void 0!==t&&Ls(e)===t&&e.mounted),triggerProps:is((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:is(e=>e.popupProps),popupElement:is(e=>e.popupElement),positionerElement:is(e=>e.positionerElement)};function Vs(t={}){const{nodeId:n,externalTree:r}=t,i=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Mn(),o=null!=Go();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Vt(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const a=H(()=>new Cs({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new _s,floatingId:i,nested:o,noEmit:!1})).current;return pn(()=>{const e={open:t,floatingId:i};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=Vt(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}(t),o=t.rootContext||i,a={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[s,l]=e.useState(null),c=e.useRef(null),u=Xo(r);pn(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);const d=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=e.useState(i);Va(p,i)||h(i);const[m,y]=e.useState(null),[v,g]=e.useState(null),b=e.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),x=e.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),w=a||m,O=s||v,S=e.useRef(null),k=e.useRef(null),P=e.useRef(d),j=null!=c,A=$a(c),T=$a(o),M=$a(u),C=e.useCallback(()=>{if(!S.current||!k.current)return;const e={placement:n,strategy:r,middleware:p};T.current&&(e.platform=T.current),La(S.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};N.current&&!Va(P.current,t)&&(P.current=t,E.flushSync(()=>{f(t)}))})},[p,n,r,T,M]);za(()=>{!1===u&&P.current.isPositioned&&(P.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const N=e.useRef(!1);za(()=>(N.current=!0,()=>{N.current=!1}),[]),za(()=>{if(w&&(S.current=w),O&&(k.current=O),w&&O){if(A.current)return A.current(w,O,C);C()}},[w,O,C,A,j]);const I=e.useMemo(()=>({reference:S,floating:k,setReference:b,setFloating:x}),[b,x]),D=e.useMemo(()=>({reference:w,floating:O}),[w,O]),_=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Fa(D.floating,d.x),n=Fa(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Ba(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return e.useMemo(()=>({...d,update:C,refs:I,elements:D,floatingStyles:_}),[d,C,I,D,_])}({...t,elements:{...a,...s&&{reference:s}}}),f=e.useCallback(e=>{const t=Vt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),d.refs.setReference(t)},[d.refs]),[p,h]=e.useState(null),[m,y]=e.useState(null);o.useSyncedValue("referenceElement",p),o.useSyncedValue("domReferenceElement",Vt(p)?p:null),o.useSyncedValue("floatingElement",m);const v=e.useCallback(e=>{(Vt(e)||null===e)&&(c.current=e,h(e)),(Vt(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!Vt(e))&&d.refs.setReference(e)},[d.refs,h]),g=e.useCallback(e=>{y(e),d.refs.setFloating(e)},[d.refs]),b=e.useMemo(()=>({...d.refs,setReference:v,setFloating:g,setPositionReference:f,domReference:c}),[d.refs,v,g,f]),x=e.useMemo(()=>({...d.elements,domReference:a.domReference}),[d.elements,a.domReference]),w=o.useState("open"),O=o.useState("floatingId"),S=e.useMemo(()=>({...d,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:O,refs:b,elements:x,nodeId:n,rootStore:o}),[d,b,x,n,o,w,O]);return pn(()=>{o.context.dataRef.current.floatingContext=S;const e=u?.nodesRef.current.find(e=>e.id===n);e&&(e.context=S)}),e.useMemo(()=>({...d,context:S,refs:b,elements:x,rootStore:o}),[d,b,x,S,o])}function Bs(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Mn(),a=null!=Go(),s=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=H(()=>new Cs({open:s,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return pn(()=>{const e={open:s,floatingId:o,referenceElement:l,floatingElement:c};Vt(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[s,o,l,c,d]),d.context.onOpenChange=i,d.context.nested=a,d.context.noEmit=n,d}const Fs=qn&&Hn;function $s(t,n={}){const r="rootStore"in t?t.rootStore:t,{events:i,dataRef:o}=r.context,{enabled:a=!0,delay:s}=n,l=e.useRef(!1),c=e.useRef(null),u=Ln(),d=e.useRef(!0);e.useEffect(()=>{const e=r.select("domReferenceElement");if(!a)return;const t=Rt(e);function n(){const e=r.select("domReferenceElement");!r.select("open")&&Bt(e)&&e===ir(Vn(e))&&(l.current=!0)}function i(){d.current=!0}function o(){d.current=!1}return t.addEventListener("blur",n),Fs&&(t.addEventListener("keydown",i,!0),t.addEventListener("pointerdown",o,!0)),()=>{t.removeEventListener("blur",n),Fs&&(t.removeEventListener("keydown",i,!0),t.removeEventListener("pointerdown",o,!0))}},[r,a]),e.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){if(e.reason===Bi||e.reason===Hi){const e=r.select("domReferenceElement");Vt(e)&&(c.current=e,l.current=!0)}}},[i,a,r]);const f=e.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(e){const t=e.currentTarget;if(l.current){if(c.current===t)return;l.current=!1,c.current=null}const n=sr(e.nativeEvent);if(Vt(n))if(Fs&&!e.relatedTarget){if(!d.current&&!cr(n))return}else if(!function(e){if(!e||Gn)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(n))return;const i=ar(e.relatedTarget,r.context.triggerElements),{nativeEvent:o,currentTarget:a}=e,f="function"==typeof s?s():s;r.select("open")&&i||0===f||void 0===f?r.setOpen(!0,Xi($i,o,a)):u.start(f,()=>{l.current||r.setOpen(!0,Xi($i,o,a))})},onBlur(e){l.current=!1,c.current=null;const t=e.relatedTarget,n=e.nativeEvent,i=Vt(t)&&t.hasAttribute(Po("focus-guard"))&&"outside"===t.getAttribute("data-type");u.start(0,()=>{const e=r.select("domReferenceElement"),a=ir(e?e.ownerDocument:document);if(!t&&a===e)return;if(or(o.current.floatingContext?.refs.floating.current,a)||or(e,a)||i)return;ar(t??a,r.context.triggerElements)||r.setOpen(!1,Xi($i,n))})}}),[o,r,u,s]);return e.useMemo(()=>a?{reference:f,trigger:f}:{},[a,f])}const Us=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Qn}`;class Ws{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Rn,this.restTimeout=new Rn,this.handleCloseOptions=void 0}static create(){return new Ws}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function Ks(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function Hs(e){const t=H(Ws.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),_n(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Ys(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),{dataRef:s}=r.context,{enabled:l=!0,closeDelay:c=0}=n,u=Hs(r),d=Xo(),f=Go(),p=sn(()=>xo(s.current.openEvent?.type,u.interactedInside)),h=sn(()=>{const e=s.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=sn(e=>ar(e,r.context.triggerElements)),y=e.useCallback(e=>{const t=go(c,"close",u.pointerType),n=()=>{r.setOpen(!1,Xi(Fi,e)),d?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,n):(u.openChangeTimeout.clear(),n())},[c,r,u,d]),v=sn(()=>{Ks(u)}),g=sn(e=>{const t=sr(e);var n;(n=t)&&Boolean(n.closest(Us))?u.interactedInside=null!=t?.closest("[aria-haspopup]"):u.interactedInside=!1});pn(()=>{i||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,v())},[i,u,v]),e.useEffect(()=>v,[v]),pn(()=>{if(l&&i&&u.handleCloseOptions?.blockPointerEvents&&h()&&Vt(a)&&o){const e=a,t=o,n=Vn(o),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const i=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest("[data-rootownerid]")??n.body;return function(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t;Ks(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}(u,{scopeElement:i,referenceElement:e,floatingElement:t}),()=>{v()}}},[l,i,a,o,u,h,d,f,v]);const b=Ln();e.useEffect(()=>{if(!l)return;function e(){u.openChangeTimeout.clear(),b.clear(),d?.events.off("floating.closed",n),v()}function t(e){d&&f&&fr(d.nodesRef.current,f).length>0?d.events.on("floating.closed",n):m(e.relatedTarget)||(u.handler?u.handler(e):(v(),p()||y(e)))}function n(e){!d||!f||fr(d.nodesRef.current,f).length>0||b.start(0,()=>{d.events.off("floating.closed",n),r.setOpen(!1,Xi(Fi,e)),d.events.emit("floating.closed",e)})}const i=o;return i&&(i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",t),i.addEventListener("pointerdown",g,!0)),()=>{i&&(i.removeEventListener("mouseenter",e),i.removeEventListener("mouseleave",t),i.removeEventListener("pointerdown",g,!0)),d?.events.off("floating.closed",n)}},[l,o,r,s,p,m,y,v,g,u,d,f,b])}const qs={current:null};function Gs(t,n={}){const r="rootStore"in t?t.rootStore:t,{dataRef:i,events:o}=r.context,{enabled:a=!0,delay:s=0,handleClose:l=null,mouseOnly:c=!1,restMs:u=0,move:d=!0,triggerElementRef:f=qs,externalTree:p,isActiveTrigger:h=!0,getHandleCloseContext:m}=n,y=Xo(p),v=Hs(r),g=Eo(l),b=Eo(s),x=Eo(u),w=Eo(a);h&&(v.handleCloseOptions=g.current?.__options);const O=sn(()=>xo(i.current.openEvent?.type,v.interactedInside)),S=sn(e=>ar(e,r.context.triggerElements)),k=sn((e,t,n)=>{const i=r.context.triggerElements;if(i.hasElement(t))return!e||!or(e,t);if(!Vt(n))return!1;const o=n;return i.hasMatchingElement(e=>or(e,o))&&(!e||!or(e,o))}),P=e.useCallback((e,t=!0)=>{const n=go(b.current,"close",v.pointerType);n?v.openChangeTimeout.start(n,()=>{r.setOpen(!1,Xi(Fi,e)),y?.events.emit("floating.closed",e)}):t&&(v.openChangeTimeout.clear(),r.setOpen(!1,Xi(Fi,e)),y?.events.emit("floating.closed",e))},[b,r,v,y]),j=sn(()=>{if(!v.handler)return;Vn(r.select("domReferenceElement")).removeEventListener("mousemove",v.handler),v.handler=void 0});e.useEffect(()=>j,[j]);const A=sn(()=>{Ks(v)});return e.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(j(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}},[a,o,v,j]),e.useEffect(()=>{if(!a)return;const e=f.current??(h?r.select("domReferenceElement"):null);if(Vt(e))return d&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),()=>{d&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",n)};function t(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!vr(v.pointerType))return;if(bo(x.current)>0&&!go(b.current,"open"))return;const t=go(b.current,"open",v.pointerType),n=e.currentTarget??null,i=r.select("domReferenceElement"),o=null!=n&&k(i,n,e.target),a=r.select("open"),s=!a||o;o&&a?r.setOpen(!0,Xi(Fi,e,n)):t?v.openChangeTimeout.start(t,()=>{s&&r.setOpen(!0,Xi(Fi,e,n))}):s&&r.setOpen(!0,Xi(Fi,e,n))}function n(e){if(O())return void A();j();const t=Vn(r.select("domReferenceElement"));v.restTimeout.clear(),v.restTimeoutPending=!1;const n=i.current.floatingContext??m?.();if(S(e.relatedTarget))return;if(g.current&&n){r.select("open")||v.openChangeTimeout.clear();const i=f.current;return v.handler=g.current({...n,tree:y,x:e.clientX,y:e.clientY,onClose(){A(),j(),w.current&&!O()&&i===r.select("domReferenceElement")&&P(e,!0)}}),t.addEventListener("mousemove",v.handler),void v.handler(e)}("touch"!==v.pointerType||!or(r.select("floatingElement"),e.relatedTarget))&&P(e)}},[j,A,i,b,P,r,a,g,v,h,k,O,S,c,d,x,f,y,w,m]),e.useMemo(()=>{if(a)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,n=e.currentTarget,i=r.select("domReferenceElement"),o=r.select("open"),a=k(i,n,e.target);if(c&&!vr(v.pointerType))return;const s=bo(x.current);function l(){if(v.restTimeoutPending=!1,O())return;const e=r.select("open");v.blockMouseMove||e&&!a||r.setOpen(!0,Xi(Fi,t,n))}o&&!a||0===s||!a&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(v.restTimeout.clear(),"touch"===v.pointerType?E.flushSync(()=>{l()}):a&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(s,l)))}};function e(e){v.pointerType=e.pointerType}},[a,v,O,k,c,r,x])}function Xs(t=[]){const n=t.map(e=>e?.reference),r=t.map(e=>e?.floating),i=t.map(e=>e?.item),o=t.map(e=>e?.trigger),a=e.useCallback(e=>Zs(e,t,"reference"),n),s=e.useCallback(e=>Zs(e,t,"floating"),r),l=e.useCallback(e=>Zs(e,t,"item"),i),c=e.useCallback(e=>Zs(e,t,"trigger"),o);return e.useMemo(()=>({getReferenceProps:a,getFloatingProps:s,getItemProps:l,getTriggerProps:c}),[a,s,l,c])}function Zs(e,t,n){const r=new Map,i="item"===n,o={};"floating"===n&&(o.tabIndex=-1,o[Xn]="");for(const t in e)i&&e&&(t===Zn||t===Jn)||(o[t]=e[t]);for(let a=0;a<t.length;a+=1){let s;const l=t[a]?.[n];s="function"==typeof l?e?l(e):null:l,s&&Js(o,s,i,r)}return Js(o,e,i,r),o}function Js(e,t,n,r){for(const i in t){const o=t[i];(!n||i!==Zn&&i!==Jn)&&(i.startsWith("on")?(r.has(i)||r.set(i,[]),"function"==typeof o&&(r.get(i)?.push(o),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>void 0!==e))):e[i]=o)}}function Qs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function el(e,t){return Qs(t,e===nr||e===rr,e===er||e===tr)}function tl(e,t,n){return Qs(t,e===rr,n?e===er:e===tr)||"Enter"===e||" "===e||""===e}function nl(t,n){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),s=r.context.dataRef,{listRef:l,activeIndex:c,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:h=!1,nested:m=!1,rtl:y=!1,virtual:v=!1,focusItemOnOpen:g="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:w,orientation:E="vertical",parentOrientation:O,cols:S=1,id:k,resetOnPointerLeave:P=!0,externalTree:j}=n;"production"!==process.env.NODE_ENV&&(p&&(h||console.warn("`useListNavigation` looping must be enabled to allow escaping."),v||console.warn("`useListNavigation` must be virtual to allow escaping.")),"vertical"===E&&S>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=Eo(dr(o)),T=Go(),M=Xo(j);pn(()=>{s.current.orientation=E},[s,E]);const C=ur(a),N=e.useRef(g),I=e.useRef(f??-1),D=e.useRef(null),_=e.useRef(!0),R=sn(e=>{u(-1===I.current?null:I.current,e)}),L=e.useRef(R),z=e.useRef(!!o),V=e.useRef(i),B=e.useRef(!1),F=e.useRef(!1),$=Eo(w),U=Eo(i),W=Eo(f),K=Eo(P),H=sn(()=>{function e(e){v?M?.events.emit("virtualfocus",e):Ao(e,{sync:B.current,preventScroll:!0})}const t=l.current[I.current],n=F.current;t&&e(t);(B.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[I.current]||t;if(!r)return;t||e(r);q&&(n||!_.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"})})});pn(()=>{d&&(i&&o?(I.current=f??-1,N.current&&null!=f&&(F.current=!0,R())):z.current&&(I.current=-1,L.current()))},[d,i,o,f,R]),pn(()=>{if(d)if(i){if(o)if(null==c){if(B.current=!1,null!=W.current)return;if(z.current&&(I.current=-1,H()),(!V.current||!z.current)&&N.current&&(null!=D.current||!0===N.current&&null==D.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e+=1}else I.current=null==D.current||tl(D.current,E,y)||m?Kr(l):Hr(l),D.current=null,R()};t()}}else Wr(l,c)||(I.current=c,H(),F.current=!1)}else B.current=!1},[d,i,o,c,W,m,l,E,y,R,H,$]),pn(()=>{if(!d||o||!M||v||!z.current)return;const e=M.nodesRef.current,t=e.find(e=>e.id===T)?.context?.elements.floating,n=ir(Vn(o)),r=e.some(e=>e.context&&or(e.context.elements.floating,n));t&&!r&&_.current&&t.focus({preventScroll:!0})},[d,o,M,T,v]),pn(()=>{L.current=R,V.current=i,z.current=!!o}),pn(()=>{i||(D.current=null,N.current=g)},[i,g]);const Y=null!=c,q=e.useMemo(()=>{function e(e){if(!U.current)return;const t=l.current.indexOf(e.currentTarget);-1!==t&&I.current!==t&&(I.current=t,R(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,F.current=!1,b&&e(t)},onPointerLeave(e){if(!U.current||!_.current||"touch"===e.pointerType)return;B.current=!0;const t=e.relatedTarget;if(b&&!l.current.includes(t)&&K.current&&(Ao(null,{sync:!0}),I.current=-1,R(e),!v)){const e=A.current,t=ir(Vn(e));e&&or(e,t)&&e.focus({preventScroll:!0})}}}},[U,A,b,l,R,K,v]),G=e.useCallback(()=>O??M?.nodesRef.current.find(e=>e.id===T)?.context?.dataRef?.current.orientation,[T,M,O]),X=sn(e=>{if(_.current=!1,B.current=!0,229===e.which)return;if(!U.current&&e.currentTarget===A.current)return;if(m&&function(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:Qs(t,n?e===tr:e===er,e===nr)}(e.key,E,y,S))return el(e.key,G())||hr(e),r.setOpen(!1,Xi(Yi,e.nativeEvent)),void(Bt(a)&&(v?M?.events.emit("virtualfocus",a):a.focus()));const t=I.current,n=Kr(l,w),o=Hr(l,w);if(C||("Home"===e.key&&(hr(e),I.current=n,R(e)),"End"===e.key&&(hr(e),I.current=o,R(e))),S>1){const t=Array.from({length:l.current.length},()=>({width:1,height:1})),r=function(e,t){const n=[];let r=0;return e.forEach(({width:e,height:i},o)=>{if(e>t&&"production"!==process.env.NODE_ENV)throw new Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);let a=!1;for(;!a;){const s=[];for(let n=0;n<e;n+=1)for(let e=0;e<i;e+=1)s.push(r+n+e*t);r%t+e<=t&&s.every(e=>null==n[e])?(s.forEach(e=>{n[e]=o}),a=!0):r+=1}}),[...n]}(t,S),i=r.findIndex(e=>null!=e&&!Xr(l,e,w)),a=r.reduce((e,t,n)=>null==t||Xr(l,t,w)?e:n,-1),s=r[function(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}){let d,f=c;if(t.key===nr?d="up":t.key===rr&&(d="down"),d){const n=[],i=[];let p=!1,h=0;{let t=null,r=-1;e.current.forEach((e,o)=>{if(null==e)return;h+=1;const a=e.closest('[role="row"]');a&&(p=!0),a===t&&-1!==r||(t=a,r+=1,n[r]=[]),n[r].push(o),i[o]=r})}let m=!1,y=0;if(p)for(const e of n){const t=e.length;t>y&&(y=t),t!==o&&(m=!0)}const v=m&&h<e.current.length,g=y||o,b=t=>{if(!m||-1===c)return;const o=i[c];if(null==o)return;const s=n[o].indexOf(c),l="up"===t?-1:1;for(let t=o+l,i=0;i<n.length;i+=1,t+=l){if(t<0||t>=n.length){if(!r||v)return;t=t<0?n.length-1:0}const i=n[t];for(let t=Math.min(s,i.length-1);t>=0;t-=1){const n=i[t];if(!Xr(e,n,a))return n}}},x=t=>{if(!v||-1===c)return;const n=c%g,i="up"===t?-g:g,o=l-l%g,s=Or(l/g)+1;for(let t=c-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?o:0}const i=Math.min(t+g-1,l);for(let r=Math.min(t+n,i);r>=t;r-=1)if(!Xr(e,r,a))return r}};u&&hr(t);const w=b(d)??x(d);if(void 0!==w)f=w;else if(-1===c)f="up"===d?l:s;else if(f=Yr(e,{startingIndex:c,amount:g,decrement:"up"===d,disabledIndices:a}),r){if("up"===d&&(c-g<s||f<0)){const e=c%g,t=l%g,n=l-(t-e);f=t===e?l:t>e?n:n-g}"down"===d&&c+g>l&&(f=Yr(e,{startingIndex:c%g-g,amount:g,disabledIndices:a}))}Wr(e,f)&&(f=c)}if("both"===n){const n=Or(c/o);t.key===(i?er:tr)&&(u&&hr(t),c%o!==o-1?(f=Yr(e,{startingIndex:c,disabledIndices:a}),r&&Ur(f,o,n)&&(f=Yr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):r&&(f=Yr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Ur(f,o,n)&&(f=c)),t.key===(i?tr:er)&&(u&&hr(t),c%o!==0?(f=Yr(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&Ur(f,o,n)&&(f=Yr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):r&&(f=Yr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Ur(f,o,n)&&(f=c));const s=Or(l/o)===n;Wr(e,f)&&(f=r&&s?t.key===(i?tr:er)?l:Yr(e,{startingIndex:c-c%o-1,disabledIndices:a}):c)}return f}({current:r.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:E,loopFocus:h,rtl:y,cols:S,disabledIndices:Gr([...("function"!=typeof w?w:null)||l.current.map((e,t)=>Xr(l,t,w)?t:void 0),void 0],r),minIndex:i,maxIndex:a,prevIndex:qr(I.current>o?n:I.current,t,r,S,e.key===rr?"bl":e.key===(y?er:tr)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(I.current=s,R(e)),"both"===E)return}if(el(e.key,E)){if(hr(e),i&&!v&&ir(e.currentTarget.ownerDocument)===e.currentTarget)return I.current=tl(e.key,E,y)?n:o,void R(e);tl(e.key,E,y)?h?t>=o?p&&t!==l.current.length?I.current=-1:(B.current=!1,I.current=n):I.current=Yr(l,{startingIndex:t,disabledIndices:w}):I.current=Math.min(o,Yr(l,{startingIndex:t,disabledIndices:w})):h?t<=n?p&&-1!==t?I.current=l.current.length:(B.current=!1,I.current=o):I.current=Yr(l,{startingIndex:t,decrement:!0,disabledIndices:w}):I.current=Math.max(n,Yr(l,{startingIndex:t,decrement:!0,disabledIndices:w})),Wr(l,I.current)&&(I.current=-1),R(e)}}),Z=e.useMemo(()=>v&&i&&Y&&{"aria-activedescendant":`${k}-${c}`},[v,i,Y,k,c]),J=e.useMemo(()=>({"aria-orientation":"both"===E?void 0:E,...C?{}:Z,onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&i&&!v){const t=sr(e.nativeEvent);if(t&&!or(A.current,t))return;return hr(e),r.setOpen(!1,Xi(Ki,e.nativeEvent)),void(Bt(a)&&a.focus())}X(e)},onPointerMove(){_.current=!0}}),[Z,X,A,E,C,r,i,v,a]),Q=e.useMemo(()=>{function e(e){"auto"===g&&mr(e.nativeEvent)&&(N.current=!v)}function t(e){N.current=g,"auto"===g&&yr(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){const t=r.select("open");_.current=!1;const n=e.key.startsWith("Arrow"),i=function(e,t,n){return Qs(t,n?e===er:e===tr,e===rr)}(e.key,G(),y),o=el(e.key,E),a=(m?i:o)||"Enter"===e.key||""===e.key.trim();if(v&&t)return X(e);if(t||x||!n){if(a){const t=el(e.key,G());D.current=m&&t?null:e.key}m?i&&(hr(e),t?(I.current=Kr(l,$.current),R(e)):r.setOpen(!0,Xi(Yi,e.nativeEvent,e.currentTarget))):o&&(null!=W.current&&(I.current=W.current),hr(e),!t&&x?r.setOpen(!0,Xi(Yi,e.nativeEvent,e.currentTarget)):X(e),t&&R(e))}},onFocus(e){r.select("open")&&!v&&(I.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[X,$,g,l,m,R,r,x,E,G,y,W,v]),ee=e.useMemo(()=>({...Z,...Q}),[Z,Q]);return e.useMemo(()=>d?{reference:ee,floating:J,item:q,trigger:Q}:{},[d,ee,J,Q,q])}const rl=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function il(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingId"),a=r.useState("domReferenceElement"),s=r.useState("floatingElement"),{role:l="dialog"}=n,c=Mn(),u=a?.id||c,d=e.useMemo(()=>dr(s)?.id||o,[s,o]),f=rl.get(l)??l,p=null!=Go(),h=e.useMemo(()=>"tooltip"===f||"label"===l?ne:{"aria-haspopup":"alertdialog"===f?"dialog":f,"aria-expanded":"false",..."listbox"===f&&{role:"combobox"},..."menu"===f&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[f,p,l]),m=e.useMemo(()=>{if("tooltip"===f||"label"===l)return{["aria-"+("label"===l?"labelledby":"describedby")]:i?d:void 0};return{...h,"aria-expanded":i?"true":"false","aria-controls":i?d:void 0,..."menu"===f&&{id:u}}},[f,d,i,u,l,h]),y=e.useMemo(()=>{const e={id:d,...f&&{role:f}};return"tooltip"===f||"label"===l?e:{...e,..."menu"===f&&{"aria-labelledby":u}}},[f,d,u,l]),v=e.useCallback(({active:e,selected:t})=>{const n={role:"option",...e&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[d,l]);return e.useMemo(()=>({reference:m,floating:y,item:v,trigger:h}),[m,y,h,v])}const ol=.1*.1,al=.5;function sl(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function ll(e,t,n,r,i,o,a,s,l,c){let u=!1;return sl(e,t,n,r,i,o)&&(u=!u),sl(e,t,i,o,a,s)&&(u=!u),sl(e,t,a,s,l,c)&&(u=!u),sl(e,t,l,c,n,r)&&(u=!u),u}function cl(e,t,n,r,i,o){const a=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,o),c=Math.max(r,o);return e>=a&&e<=s&&t>=l&&t<=c}function ul(e={}){const{blockPointerEvents:t=!1}=e,n=new Rn,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:a,tree:s})=>{const l=r?.split("-")[0];let c=!1,u=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=i.domReference,h=i.floating;if(!p||!h||null==l||null==e||null==t)return;const{clientX:m,clientY:y}=r,v=sr(r),g="mouseleave"===r.type,b=or(h,v),x=or(p,v);if(b&&(c=!0,!g))return;if(x&&(c=!1,!g))return void(c=!0);if(g&&Vt(r.relatedTarget)&&or(h,r.relatedTarget))return;function w(){return Boolean(s&&fr(s.nodesRef.current,a).length>0)}function E(){w()||(n.clear(),o())}if(w())return;const O=p.getBoundingClientRect(),S=h.getBoundingClientRect(),k=e>S.right-S.width/2,P=t>S.bottom-S.height/2,j=S.width>O.width,A=S.height>O.height,T=(j?O:S).left,M=(j?O:S).right,C=(A?O:S).top,N=(A?O:S).bottom;if("top"===l&&t>=O.bottom-1||"bottom"===l&&t<=O.top+1||"left"===l&&e>=O.right-1||"right"===l&&e<=O.left+1)return void E();let I=!1;switch(l){case"top":I=cl(m,y,T,O.top+1,M,S.bottom-1);break;case"bottom":I=cl(m,y,T,S.top+1,M,O.bottom-1);break;case"left":I=cl(m,y,S.right-1,N,O.left+1,C);break;case"right":I=cl(m,y,O.right-1,N,S.left+1,C)}if(I)return;if(c&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(m,y,O))return void E();if(!g&&function(e,t){const n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;const i=e-u,o=t-d;return u=e,d=t,f=n,i*i+o*o<r*r*ol}(m,y))return void E();let D=!1;switch(l){case"top":{const n=j?.25:2,r=j||k?e+n:e-n,i=j?e-n:k?e+n:e-n,o=t+al+1,a=k||j?S.bottom-al:S.top,s=k?j?S.bottom-al:S.top:S.bottom-al;D=ll(m,y,r,o,i,o,S.left,a,S.right,s);break}case"bottom":{const n=j?.25:2,r=j||k?e+n:e-n,i=j?e-n:k?e+n:e-n,o=t-al,a=k||j?S.top+al:S.bottom,s=k?j?S.top+al:S.bottom:S.top+al;D=ll(m,y,r,o,i,o,S.left,a,S.right,s);break}case"left":{const n=A?.25:2,r=A||P?t+n:t-n,i=A?t-n:P?t+n:t-n,o=e+al+1,a=P||A?S.right-al:S.left,s=P?A?S.right-al:S.left:S.right-al;D=ll(m,y,a,S.top,s,S.bottom,o,r,o,i);break}case"right":{const n=A?.25:2,r=A||P?t+n:t-n,i=A?t-n:P?t+n:t-n,o=e-al,a=P||A?S.left+al:S.right,s=P?A?S.left+al:S.right:S.left+al;D=ll(m,y,o,r,o,i,a,S.top,s,S.bottom);break}}D?c||n.start(40,E):E()}};return r.__options={blockPointerEvents:t},r}let dl=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),fl=function(e){return e[e.open=ro.open]="open",e[e.closed=ro.closed]="closed",e[e.startingStyle=ro.startingStyle]="startingStyle",e[e.endingStyle=ro.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const pl=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(pl.displayName="DialogPortalContext");const hl="ArrowUp",ml="ArrowDown",yl="ArrowLeft",vl="ArrowRight",gl="Home",bl=new Set([yl,vl]),xl=new Set([hl,ml]),wl=new Set([...bl,...xl]);new Set([...wl,gl,"End"]);const El=new Set([hl,ml,yl,vl,gl,"End"]),Ol={...po,..._i,nestedDialogOpen:e=>e?{[fl.nestedDialogOpen]:""}:null},Sl=e.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:o,render:a,...s}=t,{store:l}=no(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),p=l.useState("modal"),h=l.useState("mounted"),m=l.useState("nested"),y=l.useState("nestedOpenDialogCount"),v=l.useState("open"),g=l.useState("openMethod"),b=l.useState("titleElementId"),x=l.useState("transitionStatus"),w=l.useState("role");!function(){const t=e.useContext(pl);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Dialog.Portal> is missing.":W(26))}(),Li({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});const E=void 0===o?function(e){return"touch"!==e||l.context.popupRef.current}:o,O=se("div",t,{state:{open:v,nested:m,transitionStatus:x,nestedDialogOpen:y>0},props:[f,{"aria-labelledby":b??void 0,"aria-describedby":c??void 0,role:w,tabIndex:-1,hidden:!h,onKeyDown(e){El.has(e.key)&&e.stopPropagation()},style:{[dl.nestedDialogs]:y}},s],ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:Ol});return N.jsx(ia,{context:d,openInteractionType:g,disabled:!h,closeOnFocusOut:!u,initialFocus:E,returnFocus:i,modal:!1!==p,restoreFocus:"popup",children:O})});function kl(e){return Z(19)?e:e?"true":void 0}"production"!==process.env.NODE_ENV&&(Sl.displayName="DialogPopup");const Pl=e.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const e=n?.getBoundingClientRect();i=`polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% 0%,\n ${e.left}px ${e.top}px,\n ${e.left}px ${e.bottom}px,\n ${e.right}px ${e.bottom}px,\n ${e.right}px ${e.top}px,\n ${e.left}px ${e.top}px\n )`}return N.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});"production"!==process.env.NODE_ENV&&(Pl.displayName="InternalBackdrop");const jl=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=no(),o=i.useState("mounted"),a=i.useState("modal"),s=i.useState("open");return o||n?N.jsx(pl.Provider,{value:n,children:N.jsxs(Wo,{ref:t,...r,children:[o&&!0===a&&N.jsx(Pl,{ref:i.context.internalBackdropRef,inert:kl(!s)}),e.children]})}):null});function Al(t){const n=e.useRef(!0);n.current&&(n.current=!1,t())}"production"!==process.env.NODE_ENV&&(jl.displayName="DialogPortal");let Tl={},Ml={},Cl="";function Nl(e){const t=Vn(e),n=t.documentElement,r=t.body,i=Rt(n);let o=0,a=0,s=!1;const l=Ti.create();if(Wn&&1!==(i.visualViewport?.scale??1))return()=>{};function c(){const t=i.getComputedStyle(n),l=i.getComputedStyle(r),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,Tl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Cl=n.style.scrollBehavior,Ml={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===l.overflowY,p="scroll"===t.overflowX||"scroll"===l.overflowX,h=Math.max(0,i.innerWidth-r.clientWidth),m=Math.max(0,i.innerHeight-r.clientHeight),y=parseFloat(l.marginTop)+parseFloat(l.marginBottom),v=parseFloat(l.marginLeft)+parseFloat(l.marginRight),g=$t(n)?n:r;if(s=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=Vn(e),n=t.documentElement,r=t.body,i=$t(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const s=i.offsetWidth;i.style.overflowY="hidden";const l=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,s===l}(e),s)return n.style.scrollbarGutter=c,g.style.overflowY="hidden",void(g.style.overflowX="hidden");Object.assign(n.style,{scrollbarGutter:c,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:y||m?`calc(100dvh - ${y+m}px)`:"100dvh",width:v||h?`calc(100vw - ${v+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,Tl),Object.assign(r.style,Ml),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Cl)}function d(){u(),l.request(c)}return c(),i.addEventListener("resize",d),()=>{l.cancel(),u(),"function"==typeof i.removeEventListener&&i.removeEventListener("resize",d)}}const Il=new class{lockCount=0;restore=null;timeoutLock=Rn.create();timeoutUnlock=Rn.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(0===this.lockCount||null!==this.restore)return;const t=Vn(e).documentElement,n=Rt(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=ee);const r=Kn||!function(e){if("undefined"==typeof document)return!1;const t=Vn(e);return Rt(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=Vn(e),n=t.documentElement,r=t.body,i=$t(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}(e):Nl(e)}};function Dl(e=!0,t=null){pn(()=>{if(e)return Il.acquire(t)},[e,t])}function _l(t){const[n,r]=e.useState(null),i=sn((e,n)=>{t||r(n||(Kn?"touch":""))});!function(t,n){const r=e.useRef(t),i=sn(n);pn(()=>{r.current!==t&&i(r.current)},[t,i]),pn(()=>{r.current=t},[t])}(t,e=>{e&&!t&&r(null)});const{onClick:o,onPointerDown:a}=function(t){const n=e.useRef(""),r=e.useCallback(e=>{e.defaultPrevented||(n.current=e.pointerType,t(e,e.pointerType))},[t]);return{onClick:e.useCallback(e=>{0!==e.detail?(t(e,"pointerType"in e?e.pointerType:n.current),n.current=""):t(e,"keyboard")},[t]),onPointerDown:r}}(i);return e.useMemo(()=>({openMethod:n,triggerProps:{onClick:o,onPointerDown:a}}),[n,o,a])}const Rl={...zs,modal:is(e=>e.modal),nested:is(e=>e.nested),nestedOpenDialogCount:is(e=>e.nestedOpenDialogCount),disablePointerDismissal:is(e=>e.disablePointerDismissal),openMethod:is(e=>e.openMethod),descriptionElementId:is(e=>e.descriptionElementId),titleElementId:is(e=>e.titleElementId),viewportElement:is(e=>e.viewportElement),role:is(e=>e.role)};class Ll extends Ts{constructor(t){super(function(e={}){return{...Rs(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(t),{popupRef:e.createRef(),backdropRef:e.createRef(),internalBackdropRef:e.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new _s,onOpenChange:void 0,onOpenChangeComplete:void 0},Rl)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;const n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",n);const r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}}function zl(t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:a,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=no(!0),h=Boolean(p),m=H(()=>u?.store??new Ll({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,modal:l,disablePointerDismissal:s,nested:h})).current;Al(()=>{void 0===r&&!1===m.state.open&&!0===i&&m.update({open:!0,activeTriggerId:f})}),m.useControlledProp("openProp",r),m.useControlledProp("triggerIdProp",d),m.useSyncedValues({disablePointerDismissal:s,nested:h,modal:l}),m.useContextCallback("onOpenChange",o),m.useContextCallback("onOpenChangeComplete",a);const y=m.useState("payload");!function(t){const{store:n,parentContext:r,actionsRef:i}=t,o=n.useState("open"),a=n.useState("disablePointerDismissal"),s=n.useState("modal"),l=n.useState("popupElement"),{openMethod:c,triggerProps:u}=_l(o);Is(n);const{forceUnmount:d}=Ds(o,n),f=sn(e=>{const t=Xi(e);return t.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},t}),p=e.useCallback(()=>{n.setOpen(!1,f(Gi))},[n,f]);e.useImperativeHandle(i,()=>({unmount:d,close:p}),[d,p]);const h=Bs({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,y]=e.useState(0),v=0===m,g=il(h),b=la(h,{outsidePressEvent:()=>n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!n.context.outsidePressEnabledRef.current)return!1;if("button"in e&&0!==e.button)return!1;if("touches"in e&&1!==e.touches.length)return!1;const t=sr(e);if(v&&!a){const e=t;return!s||!n.context.internalBackdropRef.current&&!n.context.backdropRef.current||n.context.internalBackdropRef.current===e||n.context.backdropRef.current===e||or(e,l)&&!e?.hasAttribute("data-base-ui-portal")}return!1},escapeKey:v});Dl(o&&!0===s,l);const{getReferenceProps:x,getFloatingProps:w,getTriggerProps:E}=Xs([g,b]);n.useContextCallback("onNestedDialogOpen",e=>{y(e+1)}),n.useContextCallback("onNestedDialogClose",()=>{y(0)}),e.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(m),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[o,r,m]);const O=e.useMemo(()=>x(u),[x,u]),S=e.useMemo(()=>E(u),[E,u]),k=e.useMemo(()=>w(),[w]);n.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:S,popupProps:k,floatingRootContext:h,nestedOpenDialogCount:m})}({store:m,actionsRef:c,parentContext:p?.store.context});const v=e.useMemo(()=>({store:m}),[m]);return N.jsx(to.Provider,{value:v,children:"function"==typeof n?n({payload:y}):n})}const Vl=e.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,{store:a}=no(),s=Cn(i);return a.useSyncedValueWithCleanup("titleElementId",s),se("h2",e,{ref:t,props:[{id:s},o]})});"production"!==process.env.NODE_ENV&&(Vl.displayName="DialogTitle")
|
|
33
|
+
/**
|
|
34
|
+
* @license lucide-react v1.8.0 - ISC
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the ISC license.
|
|
37
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/;const Bl=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Fl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$l=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
39
|
+
/**
|
|
40
|
+
* @license lucide-react v1.8.0 - ISC
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the ISC license.
|
|
43
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* @license lucide-react v1.8.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/
|
|
51
|
+
var Ul={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
52
|
+
/**
|
|
53
|
+
* @license lucide-react v1.8.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const Wl=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Kl=o({}),Hl=a(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:o,className:a="",children:s,iconNode:l,...c},u)=>{const{size:d=24,strokeWidth:f=2,absoluteStrokeWidth:p=!1,color:h="currentColor",className:m=""}=i(Kl)??{},y=o??p?24*Number(r??f)/Number(t??d):r??f;return n("svg",{ref:u,...Ul,width:t??d??Ul.width,height:t??d??Ul.height,stroke:e??h,strokeWidth:y,className:Bl("lucide",m,a),...!s&&!Wl(c)&&{"aria-hidden":"true"},...c},[...l.map(([e,t])=>n(e,t)),...Array.isArray(s)?s:[s]])}),Yl=(e,t)=>{const r=a(({className:r,...i},o)=>n(Hl,{ref:o,iconNode:t,className:Bl(`lucide-${Fl($l(e))}`,`lucide-${e}`,r),...i}));return r.displayName=$l(e),r},ql=Yl("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),Gl=Yl("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Xl=Yl("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Zl=Yl("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),Jl=Yl("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),Ql=Yl("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]),ec=Yl("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),tc=Yl("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),nc=Yl("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),rc=Yl("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),ic=Yl("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),oc=Yl("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ac=Yl("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),sc=Yl("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),lc=Yl("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),cc=Yl("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),uc=Yl("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),dc=Yl("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fc=Yl("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function pc(e){var t=I(e,[]);return N.jsx(zl,Object.assign({"data-slot":"sheet"},t))}function hc(e){var t=I(e,[]);return N.jsx(jl,Object.assign({"data-slot":"sheet-portal"},t))}function mc(e){var{className:t}=e,n=I(e,["className"]);return N.jsx(mo,Object.assign({"data-slot":"sheet-overlay",className:It("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t)},n))}function yc(e){var{className:t,children:n,side:r="right",showCloseButton:i=!0}=e,o=I(e,["className","children","side","showCloseButton"]);return N.jsxs(hc,{children:[N.jsx(mc,{}),N.jsxs(Sl,Object.assign({"data-slot":"sheet-content","data-side":r,className:It("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t)},o,{children:[n,i&&N.jsxs(yo,{"data-slot":"sheet-close",render:N.jsx(xn,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[N.jsx(dc,{}),N.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}function vc(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sheet-header",className:It("flex flex-col gap-0.5 p-4",t)},n))}function gc(e){var{className:t}=e,n=I(e,["className"]);return N.jsx(Vl,Object.assign({"data-slot":"sheet-title",className:It("font-heading text-base font-medium text-foreground",t)},n))}function bc(e){var{className:t}=e,n=I(e,["className"]);return N.jsx(vo,Object.assign({"data-slot":"sheet-description",className:It("text-sm text-muted-foreground",t)},n))}function xc(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"skeleton",className:It("animate-pulse rounded-md bg-muted",t)},n))}const wc=e.createContext(void 0);function Ec(t){const n=e.useContext(wc);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":W(72));return n}"production"!==process.env.NODE_ENV&&(wc.displayName="TooltipRootContext");const Oc={...zs,disabled:is(e=>e.disabled),instantType:is(e=>e.instantType),isInstantPhase:is(e=>e.isInstantPhase),trackCursorAxis:is(e=>e.trackCursorAxis),disableHoverablePopup:is(e=>e.disableHoverablePopup),lastOpenChangeReason:is(e=>e.openChangeReason),closeOnClick:is(e=>e.closeOnClick),closeDelay:is(e=>e.closeDelay),hasViewport:is(e=>e.hasViewport)};class Sc extends Ts{constructor(t){super({...{...Rs(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1},...t},{popupRef:e.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new _s},Oc)}setOpen=(e,t)=>{const n=t.reason,r=n===Fi,i=e&&n===$i,o=!e&&(n===Bi||n===Hi);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const a=()=>{const r={open:e,openChangeReason:n};i?r.instantType="focus":o?r.instantType="dismiss":n===Fi&&(r.instantType=void 0);const a=t.trigger?.id??null;(a||e)&&(r.activeTriggerId=a,r.activeTriggerElement=t.trigger??null),this.update(r)};r?E.flushSync(a):a()};static useStore(e,t){const n=H(()=>new Sc(t)).current,r=e??n,i=Bs({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=i,r}}const kc=Es(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:o=!1,trackCursorAxis:a="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:f=null,children:p}=t,h=Sc.useStore(u?.store,{open:r,openProp:i,activeTriggerId:f,triggerIdProp:d});Al(()=>{void 0===i&&!1===h.state.open&&!0===r&&h.update({open:!0,activeTriggerId:f})}),h.useControlledProp("openProp",i),h.useControlledProp("triggerIdProp",d),h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",c);const m=h.useState("open"),y=!n&&m,v=h.useState("activeTriggerId"),g=h.useState("payload");h.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:o}),pn(()=>{m&&n&&h.setOpen(!1,Xi("disabled"))},[m,n,h]),h.useSyncedValue("disabled",n),Is(h);const{forceUnmount:b,transitionStatus:x}=Ds(y,h),w=h.useState("isInstantPhase"),E=h.useState("instantType"),O=h.useState("lastOpenChangeReason"),S=e.useRef(null);pn(()=>{"ending"===x&&O===Vi||"ending"!==x&&w?("delay"!==E&&(S.current=E),h.set("instantType","delay")):null!==S.current&&(h.set("instantType",S.current),S.current=null)},[x,w,O,E,h]),pn(()=>{y&&null==v&&h.set("payload",void 0)},[h,v,y]);const k=e.useCallback(()=>{h.setOpen(!1,function(e,t){const n=Xi(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}(h,Gi))},[h]);e.useImperativeHandle(s,()=>({unmount:b,close:k}),[b,k]);const P=h.useState("floatingRootContext"),j=la(P,{enabled:!n,referencePress:()=>h.select("closeOnClick")}),A=function(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.useState("open"),o=r.useState("floatingElement"),a=r.useState("domReferenceElement"),s=r.context.dataRef,{enabled:l=!0,axis:c="both"}=n,u=e.useRef(!1),d=e.useRef(null),[f,p]=e.useState(),[h,m]=e.useState([]),y=sn((e,t,n)=>{u.current||s.current.openEvent&&!oa(s.current.openEvent)||r.set("positionReference",function(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const o=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&"touch"!==t.pointerType;let c=o.width,u=o.height,d=o.x,f=o.y;return null==n&&t.x&&a&&(n=o.x-t.x),null==r&&t.y&&s&&(r=o.y-t.y),d-=n||0,f-=r||0,c=0,u=0,!i||l?(c="y"===t.axis?o.width:0,u="x"===t.axis?o.height:0,d=a&&null!=t.x?t.x:d,f=s&&null!=t.y?t.y:f):i&&!l&&(u="x"===t.axis?o.height:u,c="y"===t.axis?o.width:c),i=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}(n??a,{x:e,y:t,axis:c,dataRef:s,pointerType:f}))}),v=sn(e=>{i?d.current||m([]):y(e.clientX,e.clientY,e.currentTarget)}),g=vr(f)?o:i,b=e.useCallback(()=>{if(!g||!l)return;const e=Rt(o);function t(n){const r=sr(n);or(o,r)?(e.removeEventListener("mousemove",t),d.current=null):y(n.clientX,n.clientY)}if(!s.current.openEvent||oa(s.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}r.set("positionReference",a)},[g,l,o,s,a,r,y]);e.useEffect(()=>b(),[b,h]),e.useEffect(()=>{l&&!o&&(u.current=!1)},[l,o]),e.useEffect(()=>{!l&&i&&(u.current=!0)},[l,i]);const x=e.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return e.useMemo(()=>l?{reference:x,trigger:x}:{},[l,x])}(P,{enabled:!n&&"none"!==a,axis:"none"===a?void 0:a}),{getReferenceProps:T,getFloatingProps:M,getTriggerProps:C}=Xs([j,A]),I=e.useMemo(()=>T(),[T]),D=e.useMemo(()=>C(),[C]),_=e.useMemo(()=>M(),[M]);return h.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:D,popupProps:_}),N.jsx(wc.Provider,{value:h,children:"function"==typeof p?p({payload:g}):p})});"production"!==process.env.NODE_ENV&&(kc.displayName="TooltipRoot");const Pc=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Pc.displayName="TooltipProviderContext");let jc=function(e){return e[e.popupOpen=io.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e}({});const Ac=Os(function(t,n){const{className:r,render:i,handle:o,payload:a,disabled:s,delay:l,closeOnClick:c=!0,closeDelay:u,id:d,...f}=t,p=Ec(!0),h=o?.store??p;if(!h)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.":W(82));const m=Cn(d),y=h.useState("isTriggerActive",m),v=h.useState("isOpenedByTrigger",m),g=h.useState("floatingRootContext"),b=e.useRef(null),x=l??600,w=u??0,{registerTrigger:E,isMountedByThisTrigger:O}=Ns(m,b,h,{payload:a,closeOnClick:c,closeDelay:w}),S=e.useContext(Pc),{delayRef:k,isInstantPhase:P,hasProvider:j}=function(t,n={open:!1}){const r="rootStore"in t?t.rootStore:t,i=r.useState("floatingId"),{open:o}=n,a=e.useContext(wo),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:p}=a,[h,m]=e.useState(!1);return pn(()=>{function e(){m(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!o&&s.current===i){if(m(!1),c){const t=i;return p.start(c,()=>{r.select("open")||s.current&&s.current!==t||e()}),()=>{p.clear()}}e()}},[o,i,s,l,c,u,d,p,r]),pn(()=>{if(!o)return;const e=d.current,t=s.current;p.clear(),d.current={onOpenChange:r.setOpen,setIsInstantPhase:m},s.current=i,l.current={open:0,close:go(u.current,"close")},null!==t&&t!==i?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Xi(Vi))):(m(!1),e?.setIsInstantPhase(!1))},[o,i,r,s,l,c,u,d,p]),pn(()=>()=>{d.current=null},[d]),e.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}(g,{open:v});h.useSyncedValue("isInstantPhase",P);const A=h.useState("disabled"),T=s??A,M=h.useState("trackCursorAxis");return se("button",t,{state:{open:v},ref:[n,E,b],props:[Gs(g,{enabled:!T,mouseOnly:!0,move:!1,handleClose:h.useState("disableHoverablePopup")||"both"===M?null:ul(),restMs(){const e=S?.delay,t="object"==typeof k.current?k.current.open:void 0;let n=x;return j&&(n=0!==t?l??e??x:0),n},delay(){const e="object"==typeof k.current?k.current.close:void 0;let t=w;return null==u&&j&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:y}),$s(g,{enabled:!T}).reference,h.useState("triggerProps",O),{onPointerDown(){h.set("closeOnClick",c)},id:m,[jc.triggerDisabled]:T?"":void 0},f],stateAttributesMapping:uo})});"production"!==process.env.NODE_ENV&&(Ac.displayName="TooltipTrigger");const Tc=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(Tc.displayName="TooltipPortalContext");const Mc=e.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,...s}=t,{portalNode:l,portalSubtree:c}=Uo({container:i,ref:n,componentProps:t,elementProps:s});return c||l?N.jsxs(e.Fragment,{children:[c,l&&E.createPortal(r,l)]}):null});"production"!==process.env.NODE_ENV&&(Mc.displayName="FloatingPortalLite");const Cc=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Ec().useState("mounted")||n?N.jsx(Tc.Provider,{value:n,children:N.jsx(Mc,{ref:t,...r})}):null});"production"!==process.env.NODE_ENV&&(Cc.displayName="TooltipPortal");const Nc=e.createContext(void 0);function Ic(){const t=e.useContext(Nc);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":W(71));return t}"production"!==process.env.NODE_ENV&&(Nc.displayName="TooltipPositionerContext");const Dc=e.createContext(void 0);function _c(){const t=e.useContext(Dc);return t?.direction??"ltr"}"production"!==process.env.NODE_ENV&&(Dc.displayName="DirectionContext");const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=jr(e,t)||{};if(null==c)return{};const f=Fr(u),p={x:n,y:r},h=Ir(i),m=Cr(h),y=await a.getDimensions(c),v="y"===h,g=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=o.reference[m]+o.reference[h]-p[h]-o.floating[m],E=p[h]-o.reference[h],O="real"===d?await(a.getOffsetParent?.(c)):s.floating;let S=s.floating[x]||o.floating[m];S&&await(a.isElement?.(O))||(S=s.floating[x]||o.floating[m]);const k=w/2-E/2,P=S/2-y[m]/2-1,j=Math.min(f[g],P),A=Math.min(f[b],P),T=j,M=S-y[m]-A,C=S/2-y[m]/2+k,N=Pr(T,C,M),I=!l.arrow&&null!=Tr(i)&&C!==N&&o.reference[m]/2-(C<T?j:A)-y[m]/2<0,D=I?C<T?C-T:C-M:0;return{[h]:p[h]+D,data:{[h]:N,centerOffset:C-N-D,...I&&{alignmentOffset:D}},reset:I}}}),Lc={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=0===t&&0===n&&0===r&&0===i,a=await((e,t)=>{const n=_a(e);return{name:n.name,fn:n.fn,options:[e,t]}})().fn(e);return{data:{referenceHidden:a.data?.referenceHidden||o}}}},zc={sideX:"left",sideY:"top"},Vc={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:s}=e,l=Rt(i),c=l.getComputedStyle(i);if(!("0s"!==c.transitionDuration&&""!==c.transitionDuration))return{x:t,y:n,data:zc};const u=await(o.getOffsetParent?.(i));let d={width:0,height:0};if("fixed"===a&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(u===l){const e=Vn(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(o.isElement?.(u))&&(d=await o.getDimensions(u));const f=Ar(s);let p=t,h=n;"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height));return{x:p,y:h,data:{sideX:"left"===f?"right":zc.sideX,sideY:"top"===f?"bottom":zc.sideY}}}};function Bc(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Fc(e,t,n){const{rects:r,placement:i}=e;return{side:Bc(t,Ar(i),n),align:Tr(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $c(t){const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:h,mounted:m,collisionAvoidance:y,shiftCrossAxis:v=!1,nodeId:g,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=t,[E,O]=e.useState(null);m||null===E||O(null);const S=y.side||"flip",k=y.align||"flip",P=y.fallbackAxisSide||"end",j="function"==typeof n?n:void 0,A=sn(j),T=j?A:n,M=Eo(n),C="rtl"===_c(),N=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":C?"left":"right","inline-start":C?"right":"left"}[i],I="center"===a?N:`${N}-${a}`;let D=c;const _="bottom"===i?1:0,R="top"===i?1:0,L="right"===i?1:0,z="left"===i?1:0;"number"==typeof D?D={top:D+_,right:D+z,bottom:D+R,left:D+L}:D&&(D={top:(D.top||0)+_,right:(D.right||0)+z,bottom:(D.bottom||0)+R,left:(D.left||0)+L});const V={boundary:"clipping-ancestors"===l?"clippingAncestors":l,padding:D},B=e.useRef(null),F=Eo(o),$=Eo(s),U=[Ua(e=>{const t=Fc(e,i,C),n="function"==typeof F.current?F.current(t):F.current,r="function"==typeof $.current?$.current(t):$.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},["function"!=typeof o?o:0,"function"!=typeof s?s:0,C,i])],W="none"===k&&"shift"!==S,K=!W&&(u||v||"shift"===S),H="none"===S?null:((e,t)=>{const n=Ia(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,padding:{top:D.top+1,right:D.right+1,bottom:D.bottom+1,left:D.left+1},mainAxis:!v&&"flip"===S,crossAxis:"flip"===k&&"alignment",fallbackAxisSideDirection:P}),Y=W?null:((e,t)=>{const n=Na(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=Vn(e.elements.floating).documentElement;return{...V,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==k,crossAxis:K,limiter:u||v?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=Nr(Ar(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?D.left+D.right:D.top+D.bottom)/2}},{fn:Ra(n).fn,options:[n,r]})};var n,r},[V,u,v,D,k]);var q,G;"shift"===S||"shift"===k||"center"===a?U.push(Y,H):U.push(H,Y),U.push(((e,t)=>{const n=Da(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){const i=e.style;i.setProperty("--available-width",`${t}px`),i.setProperty("--available-height",`${n}px`);const o=window.devicePixelRatio||1,{x:a,y:s,width:l,height:c}=r.reference,u=(Math.round((a+l)*o)-Math.round(a*o))/o,d=(Math.round((s+c)*o)-Math.round(s*o))/o;i.setProperty("--anchor-width",`${u}px`),i.setProperty("--anchor-height",`${d}px`)}}),(G=[d],{...Rc(q=()=>({element:B.current||document.createElement("div"),padding:d,offsetParent:"floating"})),options:[q,G]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:r,rects:a,y:s}=e,l=Ar(r),c=Nr(l),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),y=a.reference.height/2,v="function"==typeof o?o(Fc(e,i,C)):o,g=m>v,b={top:`${p}px calc(100% + ${v}px)`,bottom:`${p}px ${-v}px`,left:`calc(100% + ${v}px) ${h}px`,right:`${-v}px ${h}px`}[l],x=`${p}px ${a.reference.y+y-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===c&&g?x:b),{}}},Lc,b),pn(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,h]);const X=e.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:Z,elements:J,x:Q,y:ee,middlewareData:te,update:ne,placement:re,context:ie,isPositioned:oe,floatingStyles:ae}=Vs({rootContext:h,placement:I,middleware:U,strategy:r,whileElementsMounted:p?void 0:(...e)=>Ma(...e,X),nodeId:g,externalTree:w}),{sideX:se,sideY:le}=te.adaptiveOrigin||zc,ce=oe?r:"fixed",ue=e.useMemo(()=>{const e=b?{position:ce,[se]:Q,[le]:ee}:{position:ce,...ae};return oe||(e.opacity=0),e},[b,ce,se,Q,le,ee,ae,oe]),de=e.useRef(null);pn(()=>{if(!m)return;const e=M.current,t="function"==typeof e?e():e,n=(Uc(t)?t.current:t)||null||null;n!==de.current&&(Z.setPositionReference(n),de.current=n)},[m,Z,T,M]),e.useEffect(()=>{if(!m)return;const e=M.current;"function"!=typeof e&&Uc(e)&&e.current!==de.current&&(Z.setPositionReference(e.current),de.current=e.current)},[m,Z,T,M]),e.useEffect(()=>{if(p&&m&&J.domReference&&J.floating)return Ma(J.domReference,J.floating,ne,X)},[p,m,J,ne,X]);const fe=Ar(re),pe=Bc(i,fe,C),he=Tr(re)||"center",me=Boolean(te.hide?.referenceHidden);pn(()=>{x&&m&&oe&&O(fe)},[x,m,oe,fe]);const ye=e.useMemo(()=>({position:"absolute",top:te.arrow?.y,left:te.arrow?.x}),[te.arrow]),ve=0!==te.arrow?.centerOffset;return e.useMemo(()=>({positionerStyles:ue,arrowStyles:ye,arrowRef:B,arrowUncentered:ve,side:pe,align:he,physicalSide:fe,anchorHidden:me,refs:Z,context:ie,isPositioned:oe,update:ne}),[ue,ye,B,ve,pe,he,fe,me,Z,ie,oe,ne])}function Uc(e){return null!=e&&"current"in e}function Wc(e){return"starting"===e?re:ne}const Kc=e.forwardRef(function(t,n){const{render:r,className:i,anchor:o,positionMethod:a="absolute",side:s="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=oe,...v}=t,g=Ec(),b=function(){const t=e.useContext(Tc);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Portal> is missing.":W(70));return t}(),x=g.useState("open"),w=g.useState("mounted"),E=g.useState("trackCursorAxis"),O=g.useState("disableHoverablePopup"),S=g.useState("floatingRootContext"),k=g.useState("instantType"),P=g.useState("transitionStatus"),j=g.useState("hasViewport"),A=$c({anchor:o,positionMethod:a,floatingRootContext:S,mounted:w,side:s,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:h,arrowPadding:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:y,adaptiveOrigin:j?Vc:void 0}),T=e.useMemo(()=>{const e={};return x&&"both"!==E&&!O||(e.pointerEvents="none"),{role:"presentation",hidden:!w,style:{...A.positionerStyles,...e}}},[x,E,O,w,A.positionerStyles]),M=e.useMemo(()=>({open:x,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:"none"!==E?"tracking-cursor":k}),[x,A.side,A.align,A.anchorHidden,E,k]),C=e.useMemo(()=>({...M,arrowRef:A.arrowRef,arrowStyles:A.arrowStyles,arrowUncentered:A.arrowUncentered}),[M,A.arrowRef,A.arrowStyles,A.arrowUncentered]),I=se("div",t,{state:M,props:[T,Wc(P),v],ref:[n,g.useStateSetter("positionerElement")],stateAttributesMapping:po});return N.jsx(Nc.Provider,{value:C,children:I})});"production"!==process.env.NODE_ENV&&(Kc.displayName="TooltipPositioner");const Hc={...po,..._i},Yc=e.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Ec(),{side:a,align:s}=Ic(),l=o.useState("open"),c=o.useState("instantType"),u=o.useState("transitionStatus"),d=o.useState("popupProps"),f=o.useState("floatingRootContext");Li({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});Ys(f,{enabled:!o.useState("disabled"),closeDelay:o.useState("closeDelay")});return se("div",e,{state:{open:l,side:a,align:s,instant:c,transitionStatus:u},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[d,Wc(u),i],stateAttributesMapping:Hc})});"production"!==process.env.NODE_ENV&&(Yc.displayName="TooltipPopup");const qc=e.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Ec().useState("instantType"),{open:a,arrowRef:s,side:l,align:c,arrowUncentered:u,arrowStyles:d}=Ic();return se("div",e,{state:{open:a,side:l,align:c,uncentered:u,instant:o},ref:[t,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:po})});function Gc(e){var t=I(e,[]);return N.jsx(kc,Object.assign({"data-slot":"tooltip"},t))}function Xc(e){var t=I(e,[]);return N.jsx(Ac,Object.assign({"data-slot":"tooltip-trigger"},t))}function Zc(e){var{className:t,side:n="top",sideOffset:r=4,align:i="center",alignOffset:o=0,children:a}=e,s=I(e,["className","side","sideOffset","align","alignOffset","children"]);return N.jsx(Cc,{children:N.jsx(Kc,{align:i,alignOffset:o,side:n,sideOffset:r,className:"isolate z-50",children:N.jsxs(Yc,Object.assign({"data-slot":"tooltip-content",className:It("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t)},s,{children:[a,N.jsx(qc,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]}))})})}"production"!==process.env.NODE_ENV&&(qc.displayName="TooltipArrow");const Jc=e.createContext(null);function Qc(){const t=e.useContext(Jc);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function eu(t){var{defaultOpen:n=!0,open:r,onOpenChange:i,className:o,style:a,children:s}=t,l=I(t,["defaultOpen","open","onOpenChange","className","style","children"]);const c=function(){const[t,n]=e.useState(void 0);return e.useEffect(()=>{const e=window.matchMedia("(max-width: 767px)"),t=()=>{n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),()=>e.removeEventListener("change",t)},[]),!!t}(),[u,d]=e.useState(!1),[f,p]=e.useState(n),h=null!=r?r:f,m=e.useCallback(e=>{const t="function"==typeof e?e(h):e;i?i(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[i,h]),y=e.useCallback(()=>c?d(e=>!e):m(e=>!e),[c,m,d]);e.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[y]);const v=h?"expanded":"collapsed",g=e.useMemo(()=>({state:v,open:h,setOpen:m,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:y}),[v,h,m,c,u,d,y]);return N.jsx(Jc.Provider,{value:g,children:N.jsx("div",Object.assign({"data-slot":"sidebar-wrapper",style:Object.assign({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},a),className:It("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o)},l,{children:s}))})}function tu(e){var{side:t="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:o,dir:a}=e,s=I(e,["side","variant","collapsible","className","children","dir"]);const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=Qc();return"none"===r?N.jsx("div",Object.assign({"data-slot":"sidebar",className:It("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i)},s,{children:o})):l?N.jsx(pc,Object.assign({open:u,onOpenChange:d},s,{children:N.jsxs(yc,{dir:a,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:t,children:[N.jsxs(vc,{className:"sr-only",children:[N.jsx(gc,{children:"Sidebar"}),N.jsx(bc,{children:"Displays the mobile sidebar."})]}),N.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})})):N.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":"collapsed"===c?r:"","data-variant":n,"data-side":t,"data-slot":"sidebar",children:[N.jsx("div",{"data-slot":"sidebar-gap",className:It("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),N.jsx("div",Object.assign({"data-slot":"sidebar-container","data-side":t,className:It("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex","floating"===n||"inset"===n?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i)},s,{children:N.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})}))]})}function nu(e){var{className:t,onClick:n}=e,r=I(e,["className","onClick"]);const{toggleSidebar:i}=Qc();return N.jsxs(xn,Object.assign({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:It(t),onClick:e=>{null==n||n(e),i()}},r,{children:[N.jsx(rc,{}),N.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]}))}function ru(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("main",Object.assign({"data-slot":"sidebar-inset",className:It("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t)},n))}function iu(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sidebar-header","data-sidebar":"header",className:It("flex flex-col gap-2 p-2",t)},n))}function ou(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sidebar-footer","data-sidebar":"footer",className:It("flex flex-col gap-2 p-2",t)},n))}function au(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sidebar-content","data-sidebar":"content",className:It("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function su(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sidebar-group","data-sidebar":"group",className:It("relative flex w-full min-w-0 flex-col p-2",t)},n))}function lu(e){var{className:t,render:n}=e,r=I(e,["className","render"]);return ce({defaultTagName:"div",props:R({className:It("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},r),render:n,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function cu(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:It("w-full text-sm",t)},n))}function uu(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("ul",Object.assign({"data-slot":"sidebar-menu","data-sidebar":"menu",className:It("flex w-full min-w-0 flex-col gap-0",t)},n))}function du(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("li",Object.assign({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:It("group/menu-item relative",t)},n))}const fu=he("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function pu(e){var{render:t,isActive:n=!1,variant:r="default",size:i="default",tooltip:o,className:a}=e,s=I(e,["render","isActive","variant","size","tooltip","className"]);const{isMobile:l,state:c}=Qc(),u=ce({defaultTagName:"button",props:R({className:It(fu({variant:r,size:i}),a)},s),render:o?N.jsx(Xc,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:i,active:n}});return o?("string"==typeof o&&(o={children:o}),N.jsxs(Gc,{children:[u,N.jsx(Zc,Object.assign({side:"right",align:"center",hidden:"collapsed"!==c||l},o))]})):u}const hu=o({});function mu(e){const t=s(null);return null===t.current&&(t.current=e()),t.current}const yu="undefined"!=typeof window?r:l,vu=o(null);function gu(e,t){-1===e.indexOf(t)&&e.push(t)}function bu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const xu=(e,t,n)=>n>t?t:n<e?e:n;function wu(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Eu=()=>{},Ou=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(Eu=(e,t,n)=>{e||"undefined"==typeof console||console.warn(wu(t,n))},Ou=(e,t,n)=>{if(!e)throw new Error(wu(t,n))});const Su={},ku=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Pu(e){return"object"==typeof e&&null!==e}const ju=e=>/^0[^.\s]+$/u.test(e);function Au(e){let t;return()=>(void 0===t&&(t=e()),t)}const Tu=e=>e,Mu=(e,t)=>n=>t(e(n)),Cu=(...e)=>e.reduce(Mu),Nu=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Iu{constructor(){this.subscriptions=[]}add(e){return gu(this.subscriptions,e),()=>bu(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Du=e=>1e3*e,_u=e=>e/1e3;function Ru(e,t){return t?e*(1e3/t):0}const Lu=new Set;function zu(e,t,n){e||Lu.has(t)||(console.warn(wu(t,n)),Lu.add(t))}const Vu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Bu(e,t,n,r){if(e===t&&n===r)return Tu;const i=t=>function(e,t,n,r,i){let o,a,s=0;do{a=t+(n-t)/2,o=Vu(a,r,i)-e,o>0?n=a:t=a}while(Math.abs(o)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Vu(i(e),t,r)}const Fu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$u=e=>t=>1-e(1-t),Uu=Bu(.33,1.53,.69,.99),Wu=$u(Uu),Ku=Fu(Wu),Hu=e=>e>=1?1:(e*=2)<1?.5*Wu(e):.5*(2-Math.pow(2,-10*(e-1))),Yu=e=>1-Math.sin(Math.acos(e)),qu=$u(Yu),Gu=Fu(Yu),Xu=Bu(.42,0,1,1),Zu=Bu(0,0,.58,1),Ju=Bu(.42,0,.58,1),Qu=e=>Array.isArray(e)&&"number"==typeof e[0],ed={linear:Tu,easeIn:Xu,easeInOut:Ju,easeOut:Zu,circIn:Yu,circInOut:Gu,circOut:qu,backIn:Wu,backInOut:Ku,backOut:Uu,anticipate:Hu},td=e=>{if(Qu(e)){Ou(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Bu(t,n,r,i)}return"string"==typeof e?(Ou(void 0!==ed[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ed[e]):e},nd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rd(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=nd.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,i=!1,a=!1)=>{const s=a&&r?t:n;return i&&o.add(e),s.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(a=e,r)return void(i=!0);r=!0;const o=t;t=n,n=o,t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=a,m=()=>{const o=Su.useManualTiming,a=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:nd.reduce((t,o)=>{const s=a[o];return t[o]=(t,o=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,o,a)),t},{}),cancel:e=>{for(let t=0;t<nd.length;t++)a[nd[t]].cancel(e)},state:i,steps:a}}const{schedule:id,cancel:od,state:ad,steps:sd}=rd("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Tu,!0);let ld;function cd(){ld=void 0}const ud={now:()=>(void 0===ld&&ud.set(ad.isProcessing||Su.useManualTiming?ad.timestamp:performance.now()),ld),set:e=>{ld=e,queueMicrotask(cd)}},dd=e=>t=>"string"==typeof t&&t.startsWith(e),fd=dd("--"),pd=dd("var(--"),hd=e=>!!pd(e)&&md.test(e.split("/*")[0].trim()),md=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function yd(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const vd={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},gd={...vd,transform:e=>xu(0,1,e)},bd={...vd,default:1},xd=e=>Math.round(1e5*e)/1e5,wd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ed=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Od=(e,t)=>n=>Boolean("string"==typeof n&&Ed.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Sd=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,o,a,s]=r.match(wd);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},kd={...vd,transform:e=>Math.round((e=>xu(0,255,e))(e))},Pd={test:Od("rgb","red"),parse:Sd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kd.transform(e)+", "+kd.transform(t)+", "+kd.transform(n)+", "+xd(gd.transform(r))+")"};const jd={test:Od("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Pd.transform},Ad=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Td=Ad("deg"),Md=Ad("%"),Cd=Ad("px"),Nd=Ad("vh"),Id=Ad("vw"),Dd=(()=>({...Md,parse:e=>Md.parse(e)/100,transform:e=>Md.transform(100*e)}))(),_d={test:Od("hsl","hue"),parse:Sd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Md.transform(xd(t))+", "+Md.transform(xd(n))+", "+xd(gd.transform(r))+")"},Rd={test:e=>Pd.test(e)||jd.test(e)||_d.test(e),parse:e=>Pd.test(e)?Pd.parse(e):_d.test(e)?_d.parse(e):jd.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Pd.transform(e):_d.transform(e),getAnimatableNone:e=>{const t=Rd.parse(e);return t.alpha=0,Rd.transform(t)}},Ld=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const zd="number",Vd="color",Bd=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(Bd,e=>(Rd.test(e)?(r.color.push(o),i.push(Vd),n.push(Rd.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(zd),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function $d({split:e,types:t}){const n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){const e=t[o];i+=e===zd?xd(r[o]):e===Vd?Rd.transform(r[o]):r[o]}return i}}const Ud=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:Rd.test(n)?Rd.getAnimatableNone(n):n;var n};const Wd={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(wd)?.length||0)+(e.match(Ld)?.length||0)>0},parse:function(e){return Fd(e).values},createTransformer:function(e){return $d(Fd(e))},getAnimatableNone:function(e){const t=Fd(e);return $d(t)(t.values.map((e,n)=>Ud(e,t.split[n])))}};function Kd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Hd(e,t){return n=>n>0?t:e}const Yd=(e,t,n)=>e+(t-e)*n,qd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gd=[jd,Pd,_d];function Xd(e){const t=(n=e,Gd.find(e=>e.test(n)));var n;if(Eu(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let r=t.parse(e);return t===_d&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Kd(s,r,e+1/3),o=Kd(s,r,e),a=Kd(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(r)),r}const Zd=(e,t)=>{const n=Xd(e),r=Xd(t);if(!n||!r)return Hd(e,t);const i={...n};return e=>(i.red=qd(n.red,r.red,e),i.green=qd(n.green,r.green,e),i.blue=qd(n.blue,r.blue,e),i.alpha=Yd(n.alpha,r.alpha,e),Pd.transform(i))},Jd=new Set(["none","hidden"]);function Qd(e,t){return n=>Yd(e,t,n)}function ef(e){return"number"==typeof e?Qd:"string"==typeof e?hd(e)?Hd:Rd.test(e)?Zd:rf:Array.isArray(e)?tf:"object"==typeof e?Rd.test(e)?Zd:nf:Hd}function tf(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>ef(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nf(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=ef(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const rf=(e,t)=>{const n=Wd.createTransformer(t),r=Fd(e),i=Fd(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Jd.has(e)&&!i.values.length||Jd.has(t)&&!r.values.length?function(e,t){return Jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Cu(tf(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}(r,i),i.values),n):(Eu(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Hd(e,t))};function of(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Yd(e,t,n);return ef(e)(e,t)}const af=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>id.update(t,e),stop:()=>od(t),now:()=>ad.isProcessing?ad.timestamp:ud.now()}},sf=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},lf=2e4;function cf(e){let t=0;let n=e.next(t);for(;!n.done&&t<lf;)t+=50,n=e.next(t);return t>=lf?1/0:t}const uf=100,df=10,ff=1,pf=0,hf=800,mf=.3,yf=.3,vf={granular:.01,default:2},gf={granular:.005,default:.5},bf=.01,xf=10,wf=.05,Ef=1;function Of(e,t){return e*Math.sqrt(1-t*t)}const Sf=.001;const kf=["duration","bounce"],Pf=["stiffness","damping","mass"];function jf(e,t){return t.some(t=>void 0!==e[t])}function Af(e){let t={velocity:pf,stiffness:uf,damping:df,mass:ff,isResolvedFromDuration:!1,...e};if(!jf(e,Pf)&&jf(e,kf))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*xu(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ff,stiffness:i,damping:o}}else{const n=function({duration:e=hf,bounce:t=mf,velocity:n=pf,mass:r=ff}){let i,o;Eu(e<=Du(xf),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=xu(wf,Ef,a),e=xu(bf,xf,_u(e)),a<1?(i=t=>{const r=t*a,i=r*e,o=r-n,s=Of(t,a),l=Math.exp(-i);return Sf-o/s*l},o=t=>{const r=t*a*e,o=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Of(Math.pow(t,2),a);return(-i(t)+Sf>0?-1:1)*((o-s)*l)/c}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=Du(e),isNaN(s))return{stiffness:uf,damping:df,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:ff},t.isResolvedFromDuration=!0}return t}function Tf(e=yf,t=mf){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Af({...n,velocity:-_u(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),y=a-o,v=_u(Math.sqrt(l/u)),g=Math.abs(y)<5;let b,x,w,E,O,S;if(r||(r=g?vf.granular:vf.default),i||(i=g?gf.granular:gf.default),m<1)w=Of(v,m),E=(h+m*v*y)/w,b=e=>{const t=Math.exp(-m*v*e);return a-t*(E*Math.sin(w*e)+y*Math.cos(w*e))},O=m*v*E+y*w,S=m*v*y-E*w,x=e=>Math.exp(-m*v*e)*(O*Math.sin(w*e)+S*Math.cos(w*e));else if(1===m){b=e=>a-Math.exp(-v*e)*(y+(h+v*y)*e);const e=h+v*y;x=t=>Math.exp(-v*t)*(v*e*t-h)}else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((h+m*v*y)*Math.sinh(r)+e*y*Math.cosh(r))/e};const t=(h+m*v*y)/e,n=m*v*t-y*e,r=m*v*y-t*e;x=t=>{const i=Math.exp(-m*v*t),o=Math.min(e*t,300);return i*(n*Math.sinh(o)+r*Math.cosh(o))}}const k={calculatedDuration:p&&d||null,velocity:e=>Du(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*v*e),n=Math.sin(w*e),o=Math.cos(w*e),l=a-t*(E*n+y*o),c=Du(t*(O*n+S*o));return s.done=Math.abs(c)<=r&&Math.abs(a-l)<=i,s.value=s.done?a:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=Du(x(e));s.done=Math.abs(n)<=r&&Math.abs(a-t)<=i}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(cf(k),lf),t=sf(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}Tf.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(cf(r),lf);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:_u(i)}}(e,100,Tf);return e.ease=t.ease,e.duration=Du(t.duration),e.type="keyframes",e};function Mf(e,t,n){const r=Math.max(t-5,0);return Ru(n-e(r),t-r)}function Cf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,y=void 0===a?m:a(m);y!==m&&(h=y-d);const v=e=>-h*Math.exp(-e/r),g=e=>y+v(e),b=e=>{const t=v(e),n=g(e);f.done=Math.abs(t)<=c,f.value=f.done?y:n};let x,w;const E=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=Tf({keyframes:[f.value,p(f.value)],velocity:Mf(g,e,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),E(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Nf(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ou(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||Su.mix||of,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Tu:t;o=Cu(e,o)}r.push(o)}return r}(t,r,i),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Nu(e[r],e[r+1],n);return s[r](i)};return n?t=>c(xu(e[0],e[o-1],t)):c}function If(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Nu(0,t,r);e.push(Yd(n,1,i))}}(t,e.length-1),t}function Df({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(td):td(r),o={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:If(t),e),s=Nf(a,t,{ease:Array.isArray(i)?i:(l=t,c=i,l.map(()=>c||Ju).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}const _f=e=>null!==e;function Rf(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(_f),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}const Lf={decay:Cf,inertia:Cf,tween:Df,keyframes:Df,spring:Tf};function zf(e){"string"==typeof e.type&&(e.type=Lf[e.type])}class Vf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Bf=e=>e/100;class Ff extends Vf{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==ud.now()&&this.tick(ud.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;zf(e);const{type:t=Df,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const s=t||Df;"production"!==process.env.NODE_ENV&&s!==Df&&Ou(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==Df&&"number"!=typeof a[0]&&(this.mixKeyframes=Cu(Bf,of(a[0],a[1])),a=[0,100]);const l=s({...e,keyframes:a});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=cf(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let g,b=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/a;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/a)):"mirror"===d&&(x=o)),b=xu(0,1,n)*a}v?(this.delayState.value=c[0],g=this.delayState):g=x.next(b),i&&!v&&(g.value=i(g.value));let{done:w}=g;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&p!==Cf&&(g.value=Rf(c,this.options,m,this.speed)),h&&h(g.value),E&&this.finish(),g}then(e,t){return this.finished.then(e,t)}get duration(){return _u(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+_u(e)}get time(){return _u(this.currentTime)}set time(e){e=Du(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return Mf(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(ud.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=_u(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=af,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ud.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const $f=e=>180*e/Math.PI,Uf=e=>{const t=$f(Math.atan2(e[1],e[0]));return Kf(t)},Wf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uf,rotateZ:Uf,skewX:e=>$f(Math.atan(e[1])),skewY:e=>$f(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kf=e=>((e%=360)<0&&(e+=360),e),Hf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hf,scaleY:Yf,scale:e=>(Hf(e)+Yf(e))/2,rotateX:e=>Kf($f(Math.atan2(e[6],e[5]))),rotateY:e=>Kf($f(Math.atan2(-e[2],e[0]))),rotateZ:Uf,rotate:Uf,skewX:e=>$f(Math.atan(e[4])),skewY:e=>$f(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gf(e){return e.includes("scale")?1:0}function Xf(e,t){if(!e||"none"===e)return Gf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=qf,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Wf,i=t}if(!i)return Gf(t);const o=r[t],a=i[1].split(",").map(Zf);return"function"==typeof o?o(a):a[o]}function Zf(e){return parseFloat(e.trim())}const Jf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qf=(()=>new Set(Jf))(),ep=e=>e===vd||e===Cd,tp=new Set(["x","y","z"]),np=Jf.filter(e=>!tp.has(e));const rp={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xf(t,"x"),y:(e,{transform:t})=>Xf(t,"y")};rp.translateX=rp.x,rp.translateY=rp.y;const ip=new Set;let op=!1,ap=!1,sp=!1;function lp(){if(ap){const e=Array.from(ip).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return np.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ap=!1,op=!1,ip.forEach(e=>e.complete(sp)),ip.clear()}function cp(){ip.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ap=!0)})}class up{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ip.add(this),op||(op=!0,id.read(cp),id.resolveKeyframes(lp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ip.delete(this)}cancel(){"scheduled"===this.state&&(ip.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function dp(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const fp={};function pp(e,t){const n=Au(e);return()=>fp[t]??n()}const hp=pp(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),mp=pp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),yp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,vp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yp([0,.65,.55,1]),circOut:yp([.55,0,1,.45]),backIn:yp([.31,.01,.66,-.59]),backOut:yp([.33,1.53,.69,.99])};function gp(e,t){return e?"function"==typeof e?mp()?sf(e,t):"ease-out":Qu(e)?yp(e):Array.isArray(e)?e.map(e=>gp(e,t)||vp.easeOut):vp[e]:void 0}function bp(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=gp(s,i);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function xp(e){return"function"==typeof e&&"applyToOptions"in e}class wp extends Vf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,Ou("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return xp(e)&&mp()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=bp(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Rf(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),dp(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return _u(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+_u(e)}get time(){return _u(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Du(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&hp()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Tu):r(this)}}const Ep={anticipate:Hu,backInOut:Ku,circInOut:Gu};function Op(e){"string"==typeof e.ease&&e.ease in Ep&&(e.ease=Ep[e.ease])}class Sp extends wp{constructor(e){Op(e),zf(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new Ff({...o,autoplay:!1}),s=Math.max(10,ud.now()-this.startTime),l=xu(0,10,s-10),c=a.sample(s).value,{name:u}=this.options;i&&u&&dp(i,u,c),t.setWithVelocity(a.sample(Math.max(0,s-l)).value,c,l),a.stop()}}const kp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Wd.test(e)&&"0"!==e||e.startsWith("url(")));function Pp(e){e.duration=0,e.type="keyframes"}const jp=new Set(["opacity","clipPath","filter","transform"]),Ap=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Tp=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Mp=Au(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cp(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Mp()&&n&&(jp.has(n)||Tp.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&Ap.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!c&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}class Np extends Vf{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ud.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||up;this.keyframeResolver=new f(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=ud.now();let u=!0;(function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],a=kp(i,t),s=kp(o,t);return Eu(a===s,`You are trying to animate ${t} from "${i}" to "${o}". "${a?o:i}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||xp(n))&&r)})(e,i,o,a)||(u=!1,!Su.instantAnimations&&s||c?.(Rf(e,n,t)),e[0]=e[e.length-1],Pp(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&Cp(d),p=d.motionValue?.owner?.current;let h;if(f)try{h=new Sp({...d,element:p})}catch{h=new Ff(d)}else h=new Ff(d);h.finished.then(()=>{this.notifyFinished()}).catch(Tu),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sp=!0,cp(),lp(),sp=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ip(e,t,n,r=0,i=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(o,a):1===i?o*r:s-o*r}const Dp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _p(e,t,n=1){Ou(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=function(e){const t=Dp.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return ku(e)?parseFloat(e):e}return hd(i)?_p(i,t,n+1):i}const Rp={type:"spring",stiffness:500,damping:25,restSpeed:10},Lp={type:"keyframes",duration:.8},zp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vp=(e,{keyframes:t})=>t.length>2?Lp:Qf.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Rp:zp;function Bp(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Fp(e,t){const n=e?.[t]??e?.default??e;return n!==e?Bp(n,e):n}const $p=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const Up=(e,t,n,r={},i,o)=>a=>{const s=Fp(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Du(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};(function(e){for(const t in e)if(!$p.has(t))return!0;return!1})(s)||Object.assign(u,Vp(e,u)),u.duration&&(u.duration=Du(u.duration)),u.repeatDelay&&(u.repeatDelay=Du(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Pp(u),0===u.delay&&(d=!0)),(Su.instantAnimations||Su.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Pp(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=Rf(u.keyframes,s);if(void 0!==e)return void id.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new Ff(u):new Np(u)};function Wp(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Kp(e,t,n,r){if("function"==typeof t){const[i,o]=Wp(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=Wp(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Hp(e,t,n){const r=e.getProps();return Kp(r,t,void 0!==n?n:r.custom,e)}const Yp=new Set(["width","height","top","left","right","bottom",...Jf]);class qp{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=ud.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=ud.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&zu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Iu);const n=this.events[e].add(t);return"change"===e?()=>{n(),id.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ud.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ru(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gp(e,t){return new qp(e,t)}const Xp=e=>Array.isArray(e);function Zp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gp(n))}function Jp(e){return Xp(e)?e[e.length-1]||0:e}const Qp=e=>Boolean(e&&e.getVelocity);function eh(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Qp(r)&&r.add))return n.add(t);if(!n&&Su.WillChange){const n=new Su.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function th(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const nh="data-"+th("framerAppearId");function rh(e){return e.props[nh]}function ih({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function oh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();o=o?Bp(o,l):l;const c=o?.reduceMotion;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||d&&ih(d,t))continue;const a={delay:n,...Fp(o||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!a.velocity){id.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){const n=rh(e);if(n){const e=window.MotionHandoffAnimation(n,t,id);null!==e&&(a.startTime=e,f=!0)}}eh(e,t);const p=c??e.shouldReduceMotion;r.start(Up(t,r,i,p&&Yp.has(t)?{type:!1}:a,e,f));const h=r.animation;h&&u.push(h)}if(a){const t=()=>id.update(()=>{a&&function(e,t){const n=Hp(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const t in o)Zp(e,t,Jp(o[t]))}(e,a)});u.length?Promise.all(u).then(t):t()}return u}function ah(e,t,n={}){const r=Hp(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(oh(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(ah(l,t,{...a,delay:n+("function"==typeof r?0:r)+Ip(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,a,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[o,a]:[a,o];return e().then(()=>t())}return Promise.all([o(),a(n.delay)])}const sh=e=>t=>t.test(e),lh=[vd,Cd,Md,Td,Id,Nd,{test:e=>"auto"===e,parse:e=>e}],ch=e=>lh.find(sh(e));function uh(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||ju(e))}const dh=new Set(["brightness","contrast","saturate","opacity"]);function fh(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(wd)||[];if(!r)return e;const i=n.replace(r,"");let o=dh.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ph=/\b([a-z-]*)\(.*?\)/gu,hh={...Wd,getAnimatableNone:e=>{const t=e.match(ph);return t?t.map(fh).join(" "):e}},mh={...Wd,getAnimatableNone:e=>{const t=Wd.parse(e);return Wd.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},yh={...vd,transform:Math.round},vh={borderWidth:Cd,borderTopWidth:Cd,borderRightWidth:Cd,borderBottomWidth:Cd,borderLeftWidth:Cd,borderRadius:Cd,borderTopLeftRadius:Cd,borderTopRightRadius:Cd,borderBottomRightRadius:Cd,borderBottomLeftRadius:Cd,width:Cd,maxWidth:Cd,height:Cd,maxHeight:Cd,top:Cd,right:Cd,bottom:Cd,left:Cd,inset:Cd,insetBlock:Cd,insetBlockStart:Cd,insetBlockEnd:Cd,insetInline:Cd,insetInlineStart:Cd,insetInlineEnd:Cd,padding:Cd,paddingTop:Cd,paddingRight:Cd,paddingBottom:Cd,paddingLeft:Cd,paddingBlock:Cd,paddingBlockStart:Cd,paddingBlockEnd:Cd,paddingInline:Cd,paddingInlineStart:Cd,paddingInlineEnd:Cd,margin:Cd,marginTop:Cd,marginRight:Cd,marginBottom:Cd,marginLeft:Cd,marginBlock:Cd,marginBlockStart:Cd,marginBlockEnd:Cd,marginInline:Cd,marginInlineStart:Cd,marginInlineEnd:Cd,fontSize:Cd,backgroundPositionX:Cd,backgroundPositionY:Cd,...{rotate:Td,rotateX:Td,rotateY:Td,rotateZ:Td,scale:bd,scaleX:bd,scaleY:bd,scaleZ:bd,skew:Td,skewX:Td,skewY:Td,distance:Cd,translateX:Cd,translateY:Cd,translateZ:Cd,x:Cd,y:Cd,z:Cd,perspective:Cd,transformPerspective:Cd,opacity:gd,originX:Dd,originY:Dd,originZ:Cd},zIndex:yh,fillOpacity:gd,strokeOpacity:gd,numOctaves:yh},gh={...vh,color:Rd,backgroundColor:Rd,outlineColor:Rd,fill:Rd,stroke:Rd,borderColor:Rd,borderTopColor:Rd,borderRightColor:Rd,borderBottomColor:Rd,borderLeftColor:Rd,filter:hh,WebkitFilter:hh,mask:mh,WebkitMask:mh},bh=e=>gh[e],xh=new Set([hh,mh]);function wh(e,t){let n=bh(e);return xh.has(n)||(n=Wd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Eh=new Set(["auto","none","0"]);class Oh extends up{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),hd(r))){const i=_p(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Yp.has(n)||2!==e.length)return;const[r,i]=e,o=ch(r),a=ch(i);if(yd(r)!==yd(i)&&rp[n])this.needsMeasurement=!0;else if(o!==a)if(ep(o)&&ep(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else rp[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||uh(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Eh.has(t)&&Fd(t).values.length&&(r=e[i]),i++}if(r&&n)for(const i of t)e[i]=wh(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rp[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,o=n[i];n[i]=rp[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function Sh(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const kh=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Ph(e){return Pu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:jh}=rd(queueMicrotask,!1),Ah={x:!1,y:!1};function Th(){return Ah.x||Ah.y}function Mh(e,t){const n=Sh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ch(e,t,n={}){const[r,i,o]=Mh(e,n);return r.forEach(e=>{let n,r=!1,o=!1;const a=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,a(e))},l=e=>{"touch"!==e.pointerType&&(r?o=!0:a(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Th())return;o=!1;const a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),o}const Nh=(e,t)=>!!t&&(e===t||Nh(e,t.parentElement)),Ih=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Dh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const _h=new Set(["INPUT","SELECT","TEXTAREA"]);const Rh=new WeakSet;function Lh(e){return t=>{"Enter"===t.key&&e(t)}}function zh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Vh(e){return Ih(e)&&!Th()}const Bh=new WeakSet;function Fh(e,t,n={}){const[r,i,o]=Mh(e,n),a=e=>{const r=e.currentTarget;if(!Vh(e))return;if(Bh.has(e))return;Rh.add(r),n.stopPropagation&&Bh.add(e);const o=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Rh.has(r)&&Rh.delete(r),Vh(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||Nh(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),Ph(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Lh(()=>{if(Rh.has(n))return;zh(n,"down");const e=Lh(()=>{zh(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>zh(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,Dh.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function $h(e){return Pu(e)&&"ownerSVGElement"in e}const Uh=new WeakMap;let Wh;const Kh=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:$h(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Hh=Kh("inline","width","offsetWidth"),Yh=Kh("block","height","offsetHeight");function qh({target:e,borderBoxSize:t}){Uh.get(e)?.forEach(n=>{n(e,{get width(){return Hh(e,t)},get height(){return Yh(e,t)}})})}function Gh(e){e.forEach(qh)}function Xh(e,t){Wh||"undefined"!=typeof ResizeObserver&&(Wh=new ResizeObserver(Gh));const n=Sh(e);return n.forEach(e=>{let n=Uh.get(e);n||(n=new Set,Uh.set(e,n)),n.add(t),Wh?.observe(e)}),()=>{n.forEach(e=>{const n=Uh.get(e);n?.delete(t),n?.size||Wh?.unobserve(e)})}}const Zh=new Set;let Jh;function Qh(e){return Zh.add(e),Jh||(Jh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Zh.forEach(t=>t(e))},window.addEventListener("resize",Jh)),()=>{Zh.delete(e),Zh.size||"function"!=typeof Jh||(window.removeEventListener("resize",Jh),Jh=void 0)}}function em(e,t){return"function"==typeof e?Qh(e):Xh(e,t)}const tm=[...lh,Rd,Wd],nm=()=>({x:{min:0,max:0},y:{min:0,max:0}}),rm=new WeakMap;function im(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function om(e){return"string"==typeof e||Array.isArray(e)}const am=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sm=["initial",...am];function lm(e){return im(e.animate)||sm.some(t=>om(e[t]))}function cm(e){return Boolean(lm(e)||e.variants)}const um={current:null},dm={current:!1},fm="undefined"!=typeof window;const pm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hm={};function mm(e){hm=e}class ym{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=up,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=ud.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,id.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=lm(t),this.isVariantNode=cm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&Qp(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,rm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(dm.current||function(){if(dm.current=!0,fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>um.current=e.matches;e.addEventListener("change",t),t()}else um.current=!1}(),this.shouldReduceMotion=um.current),"production"!==process.env.NODE_ENV&&zu(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),od(this.notifyUpdate),od(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&jp.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:o,duration:a}=t.accelerate,s=new wp({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:Du(a)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Qf.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&id.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in hm){const t=hm[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<pm.length;t++){const n=pm[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Qp(i))e.addValue(r,i);else if(Qp(o))e.addValue(r,Gp(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Gp(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Gp(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(ku(n)||ju(n))?n=parseFloat(n):(r=n,!tm.find(sh(r))&&Wd.test(t)&&(n=wh(e,t))),this.setBaseTarget(e,Qp(n)?n.get():n)),Qp(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=Kp(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||Qp(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Iu),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){jh.render(this.render)}}class vm extends ym{constructor(){super(...arguments),this.KeyframeResolver=Oh}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Qp(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class gm{constructor(e){this.isMounted=!1,this.node=e}update(){}}function bm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xm(e){return void 0===e||1===e}function wm({scale:e,scaleX:t,scaleY:n}){return!xm(e)||!xm(t)||!xm(n)}function Em(e){return wm(e)||Om(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Om(e){return Sm(e.x)||Sm(e.y)}function Sm(e){return e&&"0%"!==e}function km(e,t,n){return n+t*(e-n)}function Pm(e,t,n,r,i){return void 0!==i&&(e=km(e,i,r)),km(e,n,r)+t}function jm(e,t=0,n=1,r,i){e.min=Pm(e.min,t,n,r,i),e.max=Pm(e.max,t,n,r,i)}function Am(e,{x:t,y:n}){jm(e.x,t.translate,t.scale,t.originPoint),jm(e.y,n.translate,n.scale,n.originPoint)}const Tm=.999999999999,Mm=1.0000000000001;function Cm(e,t){e.min+=t,e.max+=t}function Nm(e,t,n,r,i=.5){jm(e,t,n,Yd(e.min,e.max,i),r)}function Im(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function Dm(e,t,n){const r=n??e;Nm(e.x,Im(t.x,r.x),t.scaleX,t.scale,t.originX),Nm(e.y,Im(t.y,r.y),t.scaleY,t.scale,t.originY)}function _m(e,t){return bm(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Rm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lm=Jf.length;function zm(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(Qf.has(e))a=!0;else if(fd(e))i[e]=n;else{const t=kh(n,vh[e]);e.startsWith("origin")?(s=!0,o[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<Lm;o++){const a=Jf[o],s=e[a];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(a.startsWith("scale")?1:0);else{const e=parseFloat(s);l=a.startsWith("scale")?1===e:0===e}if(!l||n){const e=kh(s,vh[a]);l||(i=!1,r+=`${Rm[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Vm(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];for(a in i?.applyProjectionStyles(o,r),n)o.setProperty(a,n[a])}function Bm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fm={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Cd.test(e))return e;e=parseFloat(e)}return`${Bm(e,t.target.x)}% ${Bm(e,t.target.y)}%`}},$m={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Wd.parse(e);if(i.length>5)return r;const o=Wd.createTransformer(e),a="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const c=Yd(s,l,.5);return"number"==typeof i[2+a]&&(i[2+a]/=c),"number"==typeof i[3+a]&&(i[3+a]/=c),o(i)}},Um={borderRadius:{...Fm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fm,borderTopRightRadius:Fm,borderBottomLeftRadius:Fm,borderBottomRightRadius:Fm,boxShadow:$m};function Wm(e,{layout:t,layoutId:n}){return Qf.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Um[e]||"opacity"===e)}function Km(e,t,n){const r=e.style,i=t?.style,o={};if(!r)return o;for(const t in r)(Qp(r[t])||i&&Qp(i[t])||Wm(t,e)||void 0!==n?.getValue(t)?.liveStyle)&&(o[t]=r[t]);return o}class Hm extends vm{constructor(){super(...arguments),this.type="html",this.renderInstance=Vm}readValueFromInstance(e,t){if(Qf.has(t))return this.projection?.isProjecting?Gf(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xf(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(fd(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return _m(e,t)}build(e,t,n){zm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Km(e,t,n)}}const Ym={offset:"stroke-dashoffset",array:"stroke-dasharray"},qm={offset:"strokeDashoffset",array:"strokeDasharray"};const Gm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xm(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},l,c,u){if(zm(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const e of Gm)void 0!==d[e]&&(f[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Ym:qm;e[o.offset]=""+-r,e[o.array]=`${t} ${n}`}(d,i,o,a,!1)}const Zm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Jm=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Qm(e,t,n){const r=Km(e,t,n);for(const n in e)if(Qp(e[n])||Qp(t[n])){r[-1!==Jf.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}class ey extends vm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nm}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Qf.has(t)){const e=bh(t);return e&&e.default||0}return t=Zm.has(t)?t:th(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Qm(e,t,n)}build(e,t,n){Xm(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Vm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Zm.has(n)?n:th(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Jm(e.tagName),super.mount(e)}}const ty=sm.length;function ny(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&ny(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<ty;n++){const r=sm[n],i=e.props[r];(om(i)||!1===i)&&(t[r]=i)}return t}function ry(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const iy=[...am].reverse(),oy=am.length;function ay(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>ah(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=ah(e,t,n);else{const i="function"==typeof t?Hp(e,t,n.custom):t;r=Promise.all(oh(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function sy(e){let t=ay(e),n=uy(),r=!0,i=!1;const o=t=>(n,r)=>{const i=Hp(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){const{props:s}=e,l=ny(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<oy;t++){const p=iy[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],y=om(m),v=p===a?h.isActive:null;!1===v&&(f=t);let g=m===l[p]&&m!==s[p]&&y;if(g&&(r||i)&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||im(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==v){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=ly(h.prevProp,m);let x=b||p===a&&h.isActive&&!g&&y||t>f&&y,w=!1;const E=Array.isArray(m)?m:[m];let O=E.reduce(o(p),{});!1===v&&(O={});const{prevResolvedValues:S={}}=h,k={...S,...O},P=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=O[e],n=S[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Xp(t)&&Xp(n)?!ry(t,n):t!==n,r?null!=t?P(e):u.add(e):void 0!==t&&u.has(e)?P(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=O,h.isActive&&(d={...d,...O}),(r||i)&&e.blockInitialAnimation&&(x=!1);const j=g&&b;x&&(!j||w)&&c.push(...E.map(t=>{const n={type:p};if("string"==typeof t&&(r||i)&&!j&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Hp(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Ip(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=Hp(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,i=!1,p?t(c):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=uy(),i=!0}}}function ly(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!ry(t,e)}function cy(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uy(){return{animate:cy(!0),whileInView:cy(),whileHover:cy(),whileTap:cy(),whileDrag:cy(),whileFocus:cy(),exit:cy()}}function dy(e,t){e.min=t.min,e.max=t.max}function fy(e,t){dy(e.x,t.x),dy(e.y,t.y)}function py(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hy(e){return e.max-e.min}function my(e,t,n,r=.5){e.origin=r,e.originPoint=Yd(t.min,t.max,e.origin),e.scale=hy(n)/hy(t),e.translate=Yd(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function yy(e,t,n,r){my(e.x,t.x,n.x,r?r.originX:void 0),my(e.y,t.y,n.y,r?r.originY:void 0)}function vy(e,t,n,r=0){const i=r?Yd(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+hy(t)}function gy(e,t,n,r=0){const i=r?Yd(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+hy(t)}function by(e,t,n,r){gy(e.x,t.x,n.x,r?.x),gy(e.y,t.y,n.y,r?.y)}function xy(e,t,n,r,i){return e=km(e-=t,1/n,r),void 0!==i&&(e=km(e,1/i,r)),e}function wy(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){Md.test(t)&&(t=parseFloat(t),t=Yd(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=Yd(o.min,o.max,r);e===o&&(s-=t),e.min=xy(e.min,t,n,s,i),e.max=xy(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}const Ey=["x","scaleX","originX"],Oy=["y","scaleY","originY"];function Sy(e,t,n,r){wy(e.x,t,Ey,n?n.x:void 0,r?r.x:void 0),wy(e.y,t,Oy,n?n.y:void 0,r?r.y:void 0)}function ky(e){return 0===e.translate&&1===e.scale}function Py(e){return ky(e.x)&&ky(e.y)}function jy(e,t){return e.min===t.min&&e.max===t.max}function Ay(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ty(e,t){return Ay(e.x,t.x)&&Ay(e.y,t.y)}function My(e){return hy(e.x)/hy(e.y)}function Cy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ny(e){return[e("x"),e("y")]}const Iy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Dy=Iy.length,_y=e=>"string"==typeof e?parseFloat(e):e,Ry=e=>"number"==typeof e||Cd.test(e);function Ly(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const zy=By(0,.5,qu),Vy=By(.5,.95,Tu);function By(e,t,n){return r=>r<e?0:r>t?1:n(Nu(e,t,r))}function Fy(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const $y=(e,t)=>e.depth-t.depth;class Uy{constructor(){this.children=[],this.isDirty=!1}add(e){gu(this.children,e),this.isDirty=!0}remove(e){bu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($y),this.isDirty=!1,this.children.forEach(e)}}function Wy(e){return Qp(e)?e.get():e}class Ky{constructor(){this.members=[]}add(e){gu(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(bu(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(bu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;void 0!==r&&r===i||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Hy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yy=["","X","Y","Z"];let qy=0;function Gy(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Xy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rh(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",id,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Xy(r)}function Zy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=qy++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ev),this.nodes.forEach(cv),this.nodes.forEach(uv),this.nodes.forEach(tv)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Uy)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Iu),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=$h(t)&&!($h(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;id.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=ud.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(od(r),e(o-t))};return id.setup(r,!0),()=>od(r)}(i,250),Hy.hasAnimatedSinceResize&&(Hy.hasAnimatedSinceResize=!1,this.nodes.forEach(lv)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||yv,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!Ty(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Fp(i,"layout"),onPlay:a,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||lv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),od(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dv),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,"string"!=typeof t.latestValues.x&&"string"!=typeof t.latestValues.y||(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(iv),void this.nodes.forEach(rv)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ov);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(av),this.nodes.forEach(sv),this.nodes.forEach(Jy),this.nodes.forEach(Qy)):this.nodes.forEach(ov),this.clearAllSnapshots();const e=ud.now();ad.delta=xu(0,1e3/60,e-ad.timestamp),ad.timestamp=e,ad.isProcessing=!0,sd.update.process(ad),sd.preRender.process(ad),sd.render.process(ad),ad.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nv),this.sharedNodes.forEach(fv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,id.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){id.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||hy(this.snapshot.measuredBox.x)||hy(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Py(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Em(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),bv((r=n).x),bv(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(wv))){const{scroll:e}=this.root;e&&(Cm(t.x,e.offset.x),Cm(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(fy(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&fy(t,e),Cm(t.x,i.offset.x),Cm(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};fy(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Cm(r.x,-n.scroll.offset.x),Cm(r.y,-n.scroll.offset.y)),Em(n.latestValues)&&Dm(r,n.latestValues,n.layout?.layoutBox)}return Em(this.latestValues)&&Dm(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};fy(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!Em(n.latestValues))continue;let r;n.instance&&(wm(n.latestValues)&&n.updateSnapshot(),r=nm(),fy(r,n.measurePageBox())),Sy(t,n.latestValues,n.snapshot?.layoutBox,r)}return Em(this.latestValues)&&Sy(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ad.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:i}=this.options;if(!this.layout||!r&&!i)return;this.resolvedRelativeTargetAt=ad.timestamp;const o=this.getClosestProjectingParent();var a,s,l,c;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,vy(a.x,s.x,l.x,c?.x),vy(a.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):fy(this.target,this.layout.layoutBox),Am(this.target,this.targetDelta)):fy(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!wm(this.parent.latestValues)&&!Om(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},by(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),fy(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===ad.timestamp&&(n=!1),n)return;const{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!i)return;fy(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,a;t.x=t.y=1;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Cm(e.x,-o.scroll.offset.x),Cm(e.y,-o.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Am(e,a)),r&&Em(o.latestValues)&&Dm(e,o.latestValues,o.layout?.layoutBox))}t.x<Mm&&t.x>Tm&&(t.x=1),t.y<Mm&&t.y>Tm&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(py(this.prevProjectionDelta.x,this.projectionDelta.x),py(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),yy(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&Cy(this.projectionDelta.x,this.prevProjectionDelta.x)&&Cy(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(mv));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;pv(o.x,e.x,n),pv(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(by(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){hv(e.x,t.x,n.x,r),hv(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return jy(e.x,t.x)&&jy(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),fy(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=Yd(0,n.opacity??1,zy(r)),e.opacityExit=Yd(t.opacity??1,0,Vy(r))):o&&(e.opacity=Yd(t.opacity??1,n.opacity??1,r));for(let i=0;i<Dy;i++){const o=Iy[i];let a=Ly(t,o),s=Ly(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Ry(a)===Ry(s)?(e[o]=Math.max(Yd(_y(a),_y(s),r),0),(Md.test(s)||Md.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=Yd(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(od(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=id.update(()=>{Hy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gp(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=Qp(e)?e:Gp(e);return r.start(Up("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&xv(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=hy(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=hy(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}fy(t,n),Dm(t,i),yy(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ky);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Gy("z",e,r,this.animationValues);for(let t=0;t<Yy.length;t++)Gy(`rotate${Yy[t]}`,e,r,this.animationValues),Gy(`skew${Yy[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Wy(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Wy(t?.pointerEvents)||""),void(this.hasProjected&&!Em(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;const{x:a,y:s}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const t in Um){if(void 0===i[t])continue;const{correct:n,applyTo:a,isCSSVariable:s}=Um[t],l="none"===o?i[t]:n(i[t],r);if(a){const t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?Wy(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(rv),this.root.sharedNodes.clear()}}}function Jy(e){e.updateLayout()}function Qy(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)Ny(e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],i=hy(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){const e="x"===i?"y":"x";dy(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else xv(i,t.layoutBox,n)&&Ny(r=>{const i=o?t.measuredBox[r]:t.layoutBox[r],a=hy(n[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};yy(a,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?yy(s,e.applyTransform(r,!0),t.measuredBox):yy(s,n,t.layoutBox);const l=!Py(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const a=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};by(s,t.layoutBox,i.layoutBox,a);const l={x:{min:0,max:0},y:{min:0,max:0}};by(l,n,o.layoutBox,a),Ty(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ev(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function tv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nv(e){e.clearSnapshot()}function rv(e){e.clearMeasurements()}function iv(e){e.isLayoutDirty=!0,e.updateLayout()}function ov(e){e.isLayoutDirty=!1}function av(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function sv(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function cv(e){e.resolveTargetDelta()}function uv(e){e.calcProjection()}function dv(e){e.resetSkewAndRotation()}function fv(e){e.removeLeadSnapshot()}function pv(e,t,n){e.translate=Yd(t.translate,0,n),e.scale=Yd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hv(e,t,n,r){e.min=Yd(t.min,n.min,r),e.max=Yd(t.max,n.max,r)}function mv(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const yv={duration:.45,ease:[.4,0,.1,1]},vv=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gv=vv("applewebkit/")&&!vv("chrome/")?Math.round:Tu;function bv(e){e.min=gv(e.min),e.max=gv(e.max)}function xv(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=My(t),i=My(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function wv(e){return e!==e.root&&e.scroll?.wasRoot}const Ev=Zy({attachResizeListener:(e,t)=>Fy(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ov={current:void 0},Sv=Zy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ov.current){const e=new Ev({});e.mount(window),e.setOptions({layoutScroll:!0}),Ov.current=e}return Ov.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),kv=o({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Pv(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function jv(...t){return e.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Pv(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Pv(e[t],null)}}}}(...t),t)}class Av extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Ph(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Ph(e)&&e.offsetWidth||0,r=Ph(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Tv({children:t,isPresent:n,anchorX:r,anchorY:o,root:a,pop:l}){const d=c(),f=s(null),p=s({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=i(kv),m=t.props?.ref??t?.ref,y=jv(f,m);return u(()=>{const{width:e,height:t,top:i,left:s,right:c,bottom:u}=p.current;if(n||!1===l||!f.current||!e||!t)return;const m="left"===r?`left: ${s}`:`right: ${c}`,y="bottom"===o?`bottom: ${u}`:`top: ${i}`;f.current.dataset.motionPopId=d;const v=document.createElement("style");h&&(v.nonce=h);const g=a??document.head;return g.appendChild(v),v.sheet&&v.sheet.insertRule(`\n [data-motion-pop-id="${d}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${m}px !important;\n ${y}px !important;\n }\n `),()=>{f.current?.removeAttribute("data-motion-pop-id"),g.contains(v)&&g.removeChild(v)}},[n]),N.jsx(Av,{isPresent:n,childRef:f,sizeRef:p,pop:l,children:!1===l?t:e.cloneElement(t,{ref:y})})}const Mv=({children:t,initial:n,isPresent:r,onExitComplete:i,custom:o,presenceAffectsLayout:a,mode:s,anchorX:l,anchorY:u,root:f})=>{const p=mu(Cv),h=c();let m=!0,y=d(()=>(m=!1,{id:h,initial:n,isPresent:r,custom:o,onExitComplete:e=>{p.set(e,!0);for(const e of p.values())if(!e)return;i&&i()},register:e=>(p.set(e,!1),()=>p.delete(e))}),[r,p,i]);return a&&m&&(y={...y}),d(()=>{p.forEach((e,t)=>p.set(t,!1))},[r]),e.useEffect(()=>{!r&&!p.size&&i&&i()},[r]),t=N.jsx(Tv,{pop:"popLayout"===s,isPresent:r,anchorX:l,anchorY:u,root:f,children:t}),N.jsx(vu.Provider,{value:y,children:t})};function Cv(){return new Map}function Nv(e=!0){const t=i(vu);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=c();l(()=>{if(e)return o(a)},[e]);const s=f(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const Iv=e=>e.key||"";function Dv(e){const t=[];return p.forEach(e,e=>{h(e)&&t.push(e)}),t}const _v=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:f})=>{const[p,h]=Nv(l),y=d(()=>Dv(e),[e]),v=l&&!p?[]:y.map(Iv),g=s(!0),b=s(y),x=mu(()=>new Map),w=s(new Set),[E,O]=m(y),[S,k]=m(y);yu(()=>{g.current=!1,b.current=y;for(let e=0;e<S.length;e++){const t=Iv(S[e]);v.includes(t)?(x.delete(t),w.current.delete(t)):!0!==x.get(t)&&x.set(t,!1)}},[S,v.length,v.join("-")]);const P=[];if(y!==E){let e=[...y];for(let t=0;t<S.length;t++){const n=S[t],r=Iv(n);v.includes(r)||(e.splice(t,0,n),P.push(n))}return"wait"===a&&P.length&&(e=P),k(Dv(e)),O(y),null}"production"!==process.env.NODE_ENV&&"wait"===a&&S.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:j}=i(hu);return N.jsx(N.Fragment,{children:S.map(e=>{const i=Iv(e),s=!(l&&!p)&&(y===S||v.includes(i));return N.jsx(Mv,{isPresent:s,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:f,onExitComplete:s?void 0:()=>{if(w.current.has(i))return;if(!x.has(i))return;w.current.add(i),x.set(i,!0);let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(j?.(),k(b.current),l&&h?.(),r&&r())},anchorX:c,anchorY:u,children:e},i)})})},Rv=o({strict:!1}),Lv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let zv=!1;function Vv(){return function(){if(zv)return;const e={};for(const t in Lv)e[t]={isEnabled:e=>Lv[t].some(t=>!!e[t])};mm(e),zv=!0}(),hm}const Bv=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Fv(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Bv.has(e)}let $v=e=>!Fv(e);try{"function"==typeof(Uv=require("@emotion/is-prop-valid").default)&&($v=e=>e.startsWith("on")?!Fv(e):Uv(e))}catch{}var Uv;const Wv=o({});function Kv(e){const{initial:t,animate:n}=function(e,t){if(lm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||om(t)?t:void 0,animate:om(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,i(Wv));return d(()=>({initial:t,animate:n}),[Hv(t),Hv(n)])}function Hv(e){return Array.isArray(e)?e.join(" "):e}const Yv=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qv(e,t,n){for(const r in t)Qp(t[r])||Wm(r,n)||(e[r]=t[r])}function Gv(e,t){const n={};return qv(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return zm(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Xv(e,t){const n={},r=Gv(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Zv=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Jv(e,t,n,r){const i=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Xm(n,t,Jm(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};qv(t,e.style,e),i.style={...t,...i.style}}return i}const Qv=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eg(e){return"string"==typeof e&&!e.includes("-")&&!!(Qv.indexOf(e)>-1||/[A-Z]/u.test(e))}function tg(e,t,r,{latestValues:i},o,a=!1,s){const l=(s??eg(e)?Jv:Xv)(t,i,o,e),c=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||Qp(e[i])||($v(i)||!0===n&&Fv(i)||!t&&!Fv(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),u=e!==y?{...c,...l,ref:r}:{},{children:f}=t,p=d(()=>Qp(f)?f.get():f,[f]);return n(e,{...u,children:p})}function ng(e,t,n,r){const i={},o=r(e,{});for(const e in o)i[e]=Wy(o[e]);let{initial:a,animate:s}=e;const l=lm(e),c=cm(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!im(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Kp(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(i[e]=t)}for(const t in e)i[t]=e[t]}}}return i}const rg=e=>(t,n)=>{const r=i(Wv),o=i(vu),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:ng(n,r,i,e),renderState:t()}}(e,t,r,o);return n?a():mu(a)},ig=rg({scrapeMotionValuesFromProps:Km,createRenderState:Yv}),og=rg({scrapeMotionValuesFromProps:Qm,createRenderState:Zv}),ag=Symbol.for("motionComponentSymbol");function sg(e,t,n){const r=s(n);u(()=>{r.current=n});const i=s(null);return f(n=>{n&&e.onMount?.(n);const o=r.current;if("function"==typeof o)if(n){const e=o(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):o(n);else o&&(o.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const lg=o({});function cg(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ug(e,t,n,r,o,a){const{visualElement:c}=i(Wv),d=i(Rv),f=i(vu),p=i(kv),h=p.reducedMotion,m=p.skipAnimations,y=s(null),v=s(!1);r=r||d.renderer,!y.current&&r&&(y.current=r(e,{visualState:t,parent:c,props:n,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:h,skipAnimations:m,isSVG:a}),v.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const g=y.current,b=i(lg);!g||g.projection||!o||"html"!==g.type&&"svg"!==g.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:dg(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(a)||s&&cg(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(y.current,n,o,b);const x=s(!1);u(()=>{g&&x.current&&g.update(n,f)});const w=n[nh],E=s(Boolean(w)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return yu(()=>{v.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),E.current&&g.animationState&&g.animationState.animateChanges())}),l(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),E.current=!1),g.enteringChildren=void 0)}),g}function dg(e){if(e)return!1!==e.options.allowProjection?e.projection:dg(e.parent)}function fg(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=Vv();for(const n in e)t[n]={...t[n],...e[n]};mm(t)}(r);const s=n?"svg"===n:eg(e),l=s?og:ig;function c(n,a){let c;const u={...i(kv),...n,layoutId:pg(n)},{isStatic:d}=u,f=Kv(n),p=l(n,d);if(!d&&"undefined"!=typeof window){!function(e,t){const n=i(Rv).strict;if("production"!==process.env.NODE_ENV&&t&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Eu(!1,t,"lazy-strict-mode"):Ou(!1,t,"lazy-strict-mode")}}(u,r);const t=function(e){const t=Vv(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,f.visualElement=ug(e,p,u,o,t.ProjectionNode,s)}return N.jsxs(Wv.Provider,{value:f,children:[c&&f.visualElement?N.jsx(c,{visualElement:f.visualElement,...u}):null,tg(e,n,sg(p,f.visualElement,a),p,d,t,s)]})}c.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const u=a(c);return u[ag]=e,u}function pg({layoutId:e}){const t=i(hu).id;return t&&void 0!==e?t+"-"+e:e}function hg(e,t){if("undefined"==typeof Proxy)return fg;const n=new Map,r=(n,r)=>fg(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&zu(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,fg(o,void 0,e,t)),n.get(o))})}const mg=(e,t)=>t.isSVG??eg(e)?new ey(t):new Hm(t,{allowProjection:e!==y});let yg=0;const vg={animation:{Feature:class extends gm{constructor(e){super(e),e.animationState||(e.animationState=sy(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();im(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends gm{constructor(){super(...arguments),this.id=yg++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){const n=Hp(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gg(e){return{point:{x:e.pageX,y:e.pageY}}}function bg(e,t,n,r){return Fy(e,t,(e=>t=>Ih(t)&&e(t,gg(t)))(n),r)}const xg=({current:e})=>e?e.ownerDocument.defaultView:null,wg=(e,t)=>Math.abs(e-t);const Eg=new Set(["auto","scroll"]);class Og{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Sg(this.lastRawMoveEventInfo,this.transformPagePoint));const e=Pg(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=wg(e.x,t.x),r=wg(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=ad;this.history.push({...r,timestamp:i});const{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Sg(t,this.transformPagePoint),id.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Pg("pointercancel"===e.type?this.lastMoveEventInfo:Sg(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Ih(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=Sg(gg(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=ad;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,Pg(s,this.history)),this.removeListeners=Cu(bg(this.contextWindow,"pointermove",this.handlePointerMove),bg(this.contextWindow,"pointerup",this.handlePointerUp),bg(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Eg.has(e.overflowX)||Eg.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i=r.x-t.x,o=r.y-t.y;0===i&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=o),this.scrollPositions.set(e,r),id.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),od(this.updatePoint)}}function Sg(e,t){return t?{point:t(e.point)}:e}function kg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pg({point:e},t){return{point:e,delta:kg(e,Ag(t)),offset:kg(e,jg(t)),velocity:Tg(t,.1)}}function jg(e){return e[0]}function Ag(e){return e[e.length-1]}function Tg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Ag(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Du(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*Du(t)&&(r=e[1]);const o=_u(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Mg(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Cg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Ng=.35;function Ig(e,t,n){return{min:Dg(e,t),max:Dg(e,n)}}function Dg(e,t){return"number"==typeof e?e:e[t]||0}const _g=new WeakMap;class Rg{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Og(e,{onSessionStart:e=>{t&&this.snapToCursor(gg(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Ah[o]?null:(Ah[o]=!0,()=>{Ah[o]=!1}):Ah.x||Ah.y?null:(Ah.x=Ah.y=!0,()=>{Ah.x=Ah.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ny(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Md.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=hy(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&id.update(()=>i(e,t),!1,!0),eh(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&id.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:xg(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&id.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!zg(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Yd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Yd(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&cg(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Mg(e.x,n,i),y:Mg(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ng){return!1===e?e=0:!0===e&&(e=Ng),{x:Ig(e,"left","right"),y:Ig(e,"top","bottom")}}(t),r!==this.constraints&&!cg(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ny(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!cg(e))return!1;const n=e.current;Ou(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=_m(e,n),{scroll:i}=t;return i&&(Cm(r.x,i.offset.x),Cm(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Cg(e.x,t.x),y:Cg(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=bm(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Ny(a=>{if(!zg(a,t,this.currentDirection))return;let l=s&&s[a]||{};!0!==o&&o!==a||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return eh(this.visualElement,e),n.start(Up(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ny(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Ny(t=>{const{drag:n}=this.getProps();if(!zg(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t],a=i.get()||0;i.set(e[t]-Yd(n,o,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!cg(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ny(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=hy(e),i=hy(t);return i>r?n=Nu(t.min,t.max-r,e.min):r>i&&(n=Nu(e.min,e.max-i,t.min)),xu(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ny(t=>{if(!zg(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(Yd(i,o,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_g.set(this.visualElement,this);const e=this.visualElement.current,t=bg(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,o=i!==e&&function(e){return _h.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!o&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();cg(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=em(e,Lg(n)),i=em(t,Lg(n));return()=>{r(),i()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),id.read(r);const a=Fy(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ny(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),o(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Ng,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Lg(e){let t=!0;return()=>{t?t=!1:e()}}function zg(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Vg=e=>(t,n)=>{e&&id.update(()=>e(t,n),!1,!0)};let Bg=!1;class Fg extends v{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Bg&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hy.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o?(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),Bg=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||id.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),jh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Bg=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function $g(e){const[t,n]=Nv(),r=i(hu);return N.jsx(Fg,{...e,layoutGroup:r,switchLayoutGroup:i(lg),isPresent:t,safeToRemove:n})}const Ug={pan:{Feature:class extends gm{constructor(){super(...arguments),this.removePointerDownListener=Tu}onPointerDown(e){this.session=new Og(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xg(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Vg(e),onStart:Vg(t),onMove:Vg(n),onEnd:(e,t)=>{delete this.session,r&&id.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=bg(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gm{constructor(e){super(e),this.removeGroupControls=Tu,this.removeListeners=Tu,this.controls=new Rg(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tu}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Sv,MeasureLayout:$g}};function Wg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&id.postRender(()=>i(t,gg(t)))}function Kg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&id.postRender(()=>i(t,gg(t)))}const Hg=new WeakMap,Yg=new WeakMap,qg=e=>{const t=Hg.get(e.target);t&&t(e)},Gg=e=>{e.forEach(qg)};function Xg(e,t,n){const r=function({root:e,...t}){const n=e||document;Yg.has(n)||Yg.set(n,{});const r=Yg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Gg,{root:e,...t})),r[i]}(t);return Hg.set(e,n),r.observe(e),()=>{Hg.delete(e),r.unobserve(e)}}const Zg={some:0,all:1};const Jg={inView:{Feature:class extends gm{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Zg[r]};this.stopObserver=Xg(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends gm{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Fh(e,(e,t)=>(Kg(this.node,t,"Start"),(e,{success:t})=>Kg(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends gm{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cu(Fy(this.node.current,"focus",()=>this.onFocus()),Fy(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends gm{mount(){const{current:e}=this.node;e&&(this.unmount=Ch(e,(e,t)=>(Wg(this.node,t,"Start"),e=>Wg(this.node,e,"End"))))}unmount(){}}}},Qg=hg({...vg,...Jg,...Ug,...{layout:{ProjectionNode:Sv,MeasureLayout:$g}}},mg),eb=[{title:"Dashboard",icon:Jl,url:"#"},{title:"Analytics",icon:Gl,url:"#"},{title:"Products",icon:nc,url:"#"},{title:"Customers",icon:uc,url:"#"},{title:"Tasks",icon:Ql,url:"#"},{title:"Settings",icon:oc,url:"#"},{title:"Help",icon:Xl,url:"#"}];function tb({items:e=eb,onItemClick:t,activeItem:n}){const{state:r}=Qc(),i="collapsed"===r;return N.jsxs(tu,{variant:"inset",collapsible:"icon",children:[N.jsx(iu,{className:"h-16 flex items-center px-6 border-b border-border/50",children:N.jsxs("div",{className:"flex items-center gap-2 font-bold text-xl tracking-tight",children:[N.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground shrink-0",children:"B"}),N.jsx(_v,{mode:"wait",children:!i&&N.jsx(Qg.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"whitespace-nowrap",children:"BMJ UI"})})]})}),N.jsx(au,{children:N.jsxs(su,{children:[N.jsx(lu,{children:N.jsx(_v,{mode:"wait",children:!i&&N.jsx(Qg.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:"Main Menu"})})}),N.jsx(cu,{children:N.jsx(uu,{children:e.map(e=>N.jsx(du,{children:N.jsx(pu,{tooltip:e.title,isActive:n===e.title,onClick:()=>null==t?void 0:t(e.title),className:"transition-all duration-200 hover:bg-primary/5 hover:text-primary",render:N.jsxs("button",{type:"button",className:"flex items-center w-full",children:[N.jsx(e.icon,{className:"shrink-0"}),N.jsx(_v,{mode:"wait",children:!i&&N.jsx(Qg.span,{initial:{opacity:0,width:0,marginLeft:0},animate:{opacity:1,width:"auto",marginLeft:8},exit:{opacity:0,width:0,marginLeft:0},transition:{duration:.2},className:"overflow-hidden whitespace-nowrap",children:e.title})})]})})},e.title))})})]})}),N.jsx(ou,{className:"p-4 border-t border-border/50",children:N.jsxs("div",{className:"flex items-center gap-3 min-h-10",children:[N.jsx("div",{className:"w-8 h-8 rounded-full bg-muted shrink-0"}),N.jsx(_v,{mode:"wait",children:!i&&N.jsxs(Qg.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"flex flex-col overflow-hidden whitespace-nowrap",children:[N.jsx("span",{className:"text-sm font-medium",children:"Bahry Jarbou"}),N.jsx("span",{className:"text-xs text-muted-foreground",children:"Admin"})]})})]})})]})}function nb(e){var{className:t,size:n="default"}=e,r=I(e,["className","size"]);return N.jsx("div",Object.assign({"data-slot":"card","data-size":n,className:It("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",t)},r))}function rb(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"card-header",className:It("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",t)},n))}function ib(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"card-title",className:It("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",t)},n))}function ob(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"card-description",className:It("text-sm text-muted-foreground",t)},n))}function ab(e){var{className:t}=e,n=I(e,["className"]);return N.jsx("div",Object.assign({"data-slot":"card-content",className:It("px-4 group-data-[size=sm]/card:px-3",t)},n))}var sb=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function lb(e){return"string"==typeof e&&sb.includes(e)}var cb=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function ub(e){return"string"==typeof e&&cb.has(e)}function db(e){return"string"==typeof e&&e.startsWith("data-")}function fb(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ub(n)||db(n))&&(t[n]=e[n]);return t}function pb(e){return null==e?null:h(e)&&"object"==typeof e.props&&null!==e.props?fb(e.props):"object"!=typeof e||Array.isArray(e)?null:fb(e)}function hb(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ub(n)||db(n)||lb(n))&&(t[n]=e[n]);return t}var mb=["children","width","height","viewBox","className","style","title","desc"];function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yb.apply(null,arguments)}var vb=a((t,n)=>{var{children:r,width:i,height:o,viewBox:a,className:s,style:l,title:c,desc:u}=t,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,mb),f=a||{width:i,height:o,x:0,y:0},p=de("recharts-surface",s);return e.createElement("svg",yb({},hb(d),{className:p,width:i,height:o,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:n}),e.createElement("title",null,c),e.createElement("desc",null,u),r)}),gb=["children","className"];function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bb.apply(null,arguments)}var xb=e.forwardRef((t,n)=>{var{children:r,className:i}=t,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,gb),a=de("recharts-layer",i);return e.createElement("g",bb({className:a},hb(o),{ref:n}),r)}),wb=o(null);function Eb(e){return function(){return e}}const Ob=Math.cos,Sb=Math.sin,kb=Math.sqrt,Pb=Math.PI,jb=2*Pb,Ab=Math.PI,Tb=2*Ab,Mb=1e-6,Cb=Tb-Mb;function Nb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Ib{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Nb:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Nb;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Mb)if(Math.abs(u*s-l*c)>Mb&&i){let f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,y=Math.sqrt(h),v=Math.sqrt(d),g=i*Math.tan((Ab-Math.acos((h+d-m)/(2*y*v)))/2),b=g/v,x=g/y;Math.abs(b-1)>Mb&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Mb||Math.abs(this._y1-c)>Mb)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Tb+Tb),d>Cb?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Mb&&this._append`A${n},${n},0,${+(d>=Ab)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Db(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ib(t)}function _b(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Rb(e){this._context=e}function Lb(e){return new Rb(e)}function zb(e){return e[0]}function Vb(e){return e[1]}function Bb(e,t){var n=Eb(!0),r=null,i=Lb,o=null,a=Db(s);function s(s){var l,c,u,d=(s=_b(s)).length,f=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?zb:Eb(e),t="function"==typeof t?t:void 0===t?Vb:Eb(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:Eb(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:Eb(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:Eb(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Fb(e,t,n){var r=null,i=Eb(!0),o=null,a=Lb,s=null,l=Db(c);function c(c){var u,d,f,p,h,m=(c=_b(c)).length,y=!1,v=new Array(m),g=new Array(m);for(null==o&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&i(p=c[u],u,c))===y)if(y=!y)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(v[f],g[f]);s.lineEnd(),s.areaEnd()}y&&(v[u]=+e(p,u,c),g[u]=+t(p,u,c),s.point(r?+r(p,u,c):v[u],n?+n(p,u,c):g[u]))}if(h)return s=null,h+""||null}function u(){return Bb().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?zb:Eb(+e),t="function"==typeof t?t:Eb(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Vb:Eb(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Eb(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Eb(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Eb(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Eb(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Eb(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Eb(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:Eb(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}Rb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class $b{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}var Ub={draw(e,t){const n=kb(t/Pb);e.moveTo(n,0),e.arc(0,0,n,0,jb)}},Wb={draw(e,t){const n=kb(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};const Kb=kb(1/3),Hb=2*Kb;var Yb={draw(e,t){const n=kb(t/Hb),r=n*Kb;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},qb={draw(e,t){const n=kb(t),r=-n/2;e.rect(r,r,n,n)}};const Gb=Sb(Pb/10)/Sb(7*Pb/10),Xb=Sb(jb/10)*Gb,Zb=-Ob(jb/10)*Gb;var Jb={draw(e,t){const n=kb(.8908130915292852*t),r=Xb*n,i=Zb*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=jb*t/5,a=Ob(o),s=Sb(o);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}};const Qb=kb(3);var ex={draw(e,t){const n=-kb(t/(3*Qb));e.moveTo(0,2*n),e.lineTo(-Qb*n,-n),e.lineTo(Qb*n,-n),e.closePath()}};const tx=-.5,nx=kb(3)/2,rx=1/kb(12),ix=3*(rx/2+1);var ox={draw(e,t){const n=kb(t/ix),r=n/2,i=n*rx,o=r,a=n*rx+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(tx*r-nx*i,nx*r+tx*i),e.lineTo(tx*o-nx*a,nx*o+tx*a),e.lineTo(tx*s-nx*l,nx*s+tx*l),e.lineTo(tx*r+nx*i,tx*i-nx*r),e.lineTo(tx*o+nx*a,tx*a-nx*o),e.lineTo(tx*s+nx*l,tx*l-nx*s),e.closePath()}};function ax(){}function sx(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function lx(e){this._context=e}function cx(e){this._context=e}function ux(e){this._context=e}function dx(e){this._context=e}function fx(e){return e<0?-1:1}function px(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(fx(o)+fx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function hx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mx(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function yx(e){this._context=e}function vx(e){this._context=new gx(e)}function gx(e){this._context=e}function bx(e){this._context=e}function xx(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function wx(e,t){this._context=e,this._t=t}function Ex(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ox(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Sx(e,t){return e[t]}function kx(e){const t=[];return t.key=e,t}lx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:sx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:sx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},cx.prototype={areaStart:ax,areaEnd:ax,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:sx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:sx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},dx.prototype={areaStart:ax,areaEnd:ax,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mx(this,this._t0,hx(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mx(this,hx(this,n=px(this,e,t)),n);break;default:mx(this,this._t0,n=px(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(vx.prototype=Object.create(yx.prototype)).point=function(e,t){yx.prototype.point.call(this,t,e)},gx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},bx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=xx(e),i=xx(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Px,jx={},Ax={};function Tx(){return Px||(Px=1,e=Ax,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),Ax;var e}var Mx,Cx={};function Nx(){return Mx||(Mx=1,e=Cx,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),Cx;var e}var Ix,Dx={};function _x(){return Ix||(Ix=1,e=Dx,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}),Dx;var e}var Rx,Lx,zx,Vx,Bx,Fx={},$x={};function Ux(){return Rx||(Rx=1,e=$x,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),$x;var e}function Wx(){return Lx||(Lx=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ux(),n=_x();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],i=(e=t.toString(e)).length;if(0===i)return r;let o=0,a="",s="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),o++);o<i;){const t=e[o];s?"\\"===t&&o+1<i?(o++,a+=e[o]):t===s?s="":a+=t:l?'"'===t||"'"===t?s=t:"]"===t?(l=!1,r.push(a),a=""):a+=t:"["===t?(l=!0,a&&(r.push(a),a="")):"."===t?a&&(r.push(a),a=""):a+=t,o++}return a&&r.push(a),r}}(Fx)),Fx}function Kx(){return zx||(zx=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tx(),n=Nx(),r=_x(),i=Wx();e.get=function e(o,a,s){if(null==o)return s;switch(typeof a){case"string":{if(t.isUnsafeProperty(a))return s;const r=o[a];return void 0===r?n.isDeepKey(a)?e(o,i.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const e=o[a];return void 0===e?s:e}default:{if(Array.isArray(a))return function(e,n,r){if(0===n.length)return r;let i=e;for(let e=0;e<n.length;e++){if(null==i)return r;if(t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}if(void 0===i)return r;return i}(o,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),t.isUnsafeProperty(a))return s;const e=o[a];return void 0===e?s:e}}}}(jx)),jx}function Hx(){return Bx?Vx:(Bx=1,Vx=Kx().get)}var Yx=S(Hx());function qx(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function Gx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return"string"==typeof i?e+i+t:void 0!==i?e+qx(i)+t:e+t},"")}var Xx=e=>0===e?0:e>0?1:-1,Zx=e=>"number"==typeof e&&e!=+e,Jx=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Qx=e=>("number"==typeof e||e instanceof Number)&&!Zx(e),ew=e=>Qx(e)||"string"==typeof e,tw=0,nw=e=>{var t=++tw;return"".concat(e||"").concat(t)},rw=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Qx(e)&&"string"!=typeof e)return r;if(Jx(e)){if(null==t)return r;var o=e.indexOf("%");n=t*parseFloat(e.slice(0,o))/100}else n=+e;return Zx(n)&&(n=r),i&&null!=t&&n>t&&(n=t),n},iw=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function ow(e,t,n){return Qx(e)&&Qx(t)?qx(e+n*(t-e)):t}function aw(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Yx(e,t))===n)}var sw=e=>null==e,lw=e=>sw(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function cw(e){return null!=e}function uw(){}var dw=["type","size","sizeType"];function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fw.apply(null,arguments)}function pw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pw(Object(n),!0).forEach(function(t){mw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yw={symbolCircle:Ub,symbolCross:Wb,symbolDiamond:Yb,symbolSquare:qb,symbolStar:Jb,symbolTriangle:ex,symbolWye:ox},vw=Math.PI/180,gw=t=>{var{type:n="circle",size:r=64,sizeType:i="area"}=t,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,dw),a=hw(hw({},o),{},{type:n,size:r,sizeType:i}),s="circle";"string"==typeof n&&(s=n);var{className:l,cx:c,cy:u}=a,d=hb(a);return Qx(c)&&Qx(u)&&Qx(r)?e.createElement("path",fw({},d,{className:de("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(lw(e));return yw[t]||Ub})(s),t=function(e,t){let n=null,r=Db(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:Eb(e||Ub),t="function"==typeof t?t:Eb(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:Eb(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:Eb(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*vw;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(r,i,s)),n=t();if(null!==n)return n})()})):null};gw.registerSymbol=(e,t)=>{yw["symbol".concat(lw(e))]=t};var bw=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,xw=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(h(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{lb(e)&&"function"==typeof n[e]&&(r[e]=t=>n[e](n,t))}),r},ww=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];lb(i)&&"function"==typeof o&&(r||(r={}),r[i]=((e,t,n)=>r=>(e(t,n,r),null))(o,t,n))}),r};function Ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ow(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sw(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ew(Object(n),!0).forEach(function(t){Ow(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ew(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var kw,Pw={},jw={};function Aw(){return kw||(kw=1,e=jw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],o=t(i,r,e);n.has(o)||n.set(o,i)}return Array.from(n.values())}),jw;var e}var Tw,Mw={};function Cw(){return Tw||(Tw=1,e=Mw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),Mw;var e}var Nw,Iw={};function Dw(){return Nw||(Nw=1,e=Iw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),Iw;var e}var _w,Rw,Lw={},zw={},Vw={};function Bw(){return _w||(_w=1,e=Vw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),Vw;var e}function Fw(){return Rw||(Rw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bw();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(zw)),zw}var $w,Uw,Ww={};function Kw(){return $w||($w=1,e=Ww,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),Ww;var e}function Hw(){return Uw||(Uw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fw(),n=Kw();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(Lw)),Lw}var Yw,qw={},Gw={};function Xw(){return Yw||(Yw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kx();e.property=function(e){return function(n){return t.get(n,e)}}}(Gw)),Gw}var Zw,Jw={},Qw={},eE={},tE={};function nE(){return Zw||(Zw=1,e=tE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),tE;var e}var rE,iE={};function oE(){return rE||(rE=1,e=iE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),iE;var e}var aE,sE,lE,cE={};function uE(){return aE||(aE=1,e=cE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),cE;var e}function dE(){return sE||(sE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nE(),n=oE(),r=uE();function i(e,s,l,c){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,r,i){if(null==t)return!0;if(Array.isArray(t))return o(e,t,r,i);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries()){if(!1===n(e.get(i),o,i,e,t,r))return!1}return!0}(e,t,r,i);if(t instanceof Set)return a(e,t,r,i);const s=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<s.length;o++){const a=s[o];if(!n.isPrimitive(e)&&!(a in e))return!1;if(void 0===t[a]&&void 0!==e[a])return!1;if(null===t[a]&&null!==e[a])return!1;if(!r(e[a],t[a],a,e,t,i))return!1}return!0}finally{i?.delete(t)}}(e,s,l,c);case"function":return Object.keys(s).length>0?i(e,{...s},l,c):r.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:r.isEqualsSameValueZero(e,s)}}function o(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const a=t[o];let s=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;let c=!1;if(n(e[l],a,o,e,t,r)&&(c=!0),c){i.add(l),s=!0;break}}if(!s)return!1}return!0}function a(e,t,n,r){return 0===t.size||e instanceof Set&&o([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):i(t,n,function e(t,n,o,a,s,l){const c=r(t,n,o,a,s,l);return void 0!==c?Boolean(c):i(t,n,e,l)},new Map)},e.isSetMatch=a}(eE)),eE}function fE(){return lE||(lE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dE();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(Qw)),Qw}var pE,hE={},mE={},yE={};function vE(){return pE||(pE=1,e=yE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),yE;var e}var gE,bE={};function xE(){return gE||(gE=1,e=bE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),bE;var e}var wE,EE={};function OE(){return wE||(wE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(EE)),EE}var SE,kE,PE,jE,AE={};function TE(){return SE||(SE=1,e=AE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),AE;var e}function ME(){return kE||(kE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vE(),n=xE(),r=OE(),i=oE(),o=TE();function a(e,t,l,c=new Map,u=void 0){const d=u?.(e,t,l,c);if(void 0!==d)return d;if(i.isPrimitive(e))return e;if(c.has(e))return c.get(e);if(Array.isArray(e)){const t=new Array(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;c.set(e,t);for(const[n,r]of e)t.set(n,a(r,n,l,c,u));return t}if(e instanceof Set){const t=new Set;c.set(e,t);for(const n of e)t.add(a(n,void 0,l,c,u));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(o.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Error){const t=structuredClone(e);return c.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,s(t,e,l,c,u),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Number){const t=new Number(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof String){const t=new String(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return c.set(e,t),s(t,e,l,c,u),t}return e}function s(e,n,r=e,i,o){const s=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<s.length;t++){const l=s[t],c=Object.getOwnPropertyDescriptor(e,l);(null==c||c.writable)&&(e[l]=a(n[l],l,r,i,o))}}e.cloneDeepWith=function(e,t){return a(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=a,e.copyProperties=s}(mE)),mE}function CE(){return PE||(PE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ME();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(hE)),hE}function NE(){return jE||(jE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fE(),n=CE();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(Jw)),Jw}var IE,DE,_E={},RE={},LE={};function zE(){return IE||(IE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ME(),n=xE(),r=OE();e.cloneDeepWith=function(e,i){return t.cloneDeepWith(e,(o,a,s,l)=>{const c=i?.(o,a,s,l);if(void 0!==c)return c;if("object"==typeof e){if(n.getTag(e)===r.objectTag&&"function"!=typeof e.constructor){const n={};return l.set(e,n),t.copyProperties(n,e,s,l),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{const n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}}(LE)),LE}function VE(){return DE||(DE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zE();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(RE)),RE}var BE,FE={},$E={};function UE(){return BE||(BE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}($E)),$E}var WE,KE,HE,YE,qE,GE,XE,ZE={};function JE(){return WE||(WE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xE();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(ZE)),ZE}function QE(){return KE||(KE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nx(),n=UE(),r=JE(),i=Wx();e.has=function(e,o){let a;if(a=Array.isArray(o)?o:"string"==typeof o&&t.isDeepKey(o)&&null==e?.[o]?i.toPath(o):[o],0===a.length)return!1;let s=e;for(let e=0;e<a.length;e++){const t=a[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(FE)),FE}function eO(){return HE||(HE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fE(),n=_x(),r=VE(),i=Kx(),o=QE();e.matchesProperty=function(e,a){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return a=r.cloneDeep(a),function(n){const r=i.get(n,e);return void 0===r?o.has(n,e):void 0===a?void 0===r:t.isMatch(r,a)}}}(_E)),_E}function tO(){return YE||(YE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dw(),n=Xw(),r=NE(),i=eO();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?i.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(qw)),qw}function nO(){return qE||(qE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aw(),n=Cw(),r=Dw(),i=Hw(),o=tO();e.uniqBy=function(e,a=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(o.iteratee(a),1)):[]}}(Pw)),Pw}function rO(){return XE?GE:(XE=1,GE=nO().uniqBy)}var iO=S(rO());var oO=o(null),aO=e=>e,sO=()=>{var e=i(oO);return e?e.store.dispatch:aO},lO=()=>{},cO=()=>lO,uO=(e,t)=>e===t;function dO(e){var t=i(oO),n=d(()=>t?t=>{if(null!=t)return e(t)}:lO,[t,e]);return bs.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:cO,t?t.store.getState:lO,t?t.store.getState:lO,n,uO)}var fO,pO={},hO={},mO={};function yO(){return fO||(fO=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const i=t(e),o=t(n);if(i===o&&0===i){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?o-i:i-o}return 0}}(mO)),mO}var vO,gO,bO,xO={},wO={};function EO(){return vO||(vO=1,e=wO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),wO;var e}function OO(){return gO||(gO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EO(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,i){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=i&&Object.hasOwn(i,e)))}}(xO)),xO}function SO(){return bO||(bO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yO(),n=OO(),r=Wx();e.orderBy=function(e,i,o,a){if(null==e)return[];o=a?void 0:o,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(o)||(o=null==o?[]:[o]),o=o.map(e=>String(e));const s=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},l=i.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)})),c=e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))}));return c.slice().sort((e,n)=>{for(let r=0;r<l.length;r++){const i=t.compareValues(e.criteria[r],n.criteria[r],o[r]);if(0!==i)return i}return 0}).map(e=>e.original)}}(hO)),hO}var kO,PO={};function jO(){return kO||(kO=1,e=PO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),i=(e,t)=>{for(let o=0;o<e.length;o++){const a=e[o];Array.isArray(a)&&t<r?i(a,t+1):n.push(a)}};return i(e,0),n}),PO;var e}var AO,TO,MO,CO,NO={};function IO(){return AO||(AO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UE(),n=Fw(),r=nE(),i=uE();e.isIterateeCall=function(e,o,a){return!!r.isObject(a)&&(!!("number"==typeof o&&n.isArrayLike(a)&&t.isIndex(o)&&o<a.length||"string"==typeof o&&o in a)&&i.isEqualsSameValueZero(a[o],e))}}(NO)),NO}function DO(){return TO||(TO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SO(),n=jO(),r=IO();e.sortBy=function(e,...i){const o=i.length;return o>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:o>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),["asc"])}}(pO)),pO}function _O(){return CO?MO:(CO=1,MO=DO().sortBy)}var RO=S(_O()),LO=e=>e.legend.settings;ns([e=>e.legend.payload,LO],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?RO(r,n):r});function zO(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var VO=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),BO=()=>Math.random().toString(36).substring(7).split("").join("."),FO={INIT:`@@redux/INIT${BO()}`,REPLACE:`@@redux/REPLACE${BO()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${BO()}`};function $O(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function UO(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function WO(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=UO(e)),t}function KO(e,t,n){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?zO(2):`Expected the root reducer to be a function. Instead, received: '${WO(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?zO(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("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?zO(1):`Expected the enhancer to be a function. Instead, received: '${WO(n)}'`);return n(KO)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error("production"===process.env.NODE_ENV?zO(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 d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?zO(4):`Expected the listener to be a function. Instead, received: '${WO(e)}'`);if(l)throw new Error("production"===process.env.NODE_ENV?zO(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 t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error("production"===process.env.NODE_ENV?zO(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.");t=!1,c(),a.delete(n),o=null}}}function f(e){if(!$O(e))throw new Error("production"===process.env.NODE_ENV?zO(7):`Actions must be plain objects. Instead, the actual type was: '${WO(e)}'. 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(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?zO(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?zO(17):`Action "type" property must be a string. Instead, the actual type was: '${WO(e.type)}'. Value was: '${e.type}' (stringified)`);if(l)throw new Error("production"===process.env.NODE_ENV?zO(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,e)}finally{l=!1}return(o=a).forEach(e=>{e()}),e}f({type:FO.INIT});const p={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?zO(10):`Expected the nextReducer to be a function. Instead, received: '${WO(e)}`);r=e,f({type:FO.REPLACE})},[VO]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?zO(11):`Expected the observer to be an object. Instead, received: '${WO(t)}'`);function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[VO](){return this}}}};return p}function HO(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function YO(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const i=t[r];"production"!==process.env.NODE_ENV&&void 0===e[i]&&HO(`No reducer provided for key "${i}"`),"function"==typeof e[i]&&(n[i]=e[i])}const r=Object.keys(n);let i,o;"production"!==process.env.NODE_ENV&&(i={});try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:FO.INIT}))throw new Error("production"===process.env.NODE_ENV?zO(12):`The slice reducer for key "${t}" 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(void 0===n(void 0,{type:FO.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?zO(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${FO.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.`)})}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;if("production"!==process.env.NODE_ENV){const r=function(e,t,n,r){const i=Object.keys(t),o=n&&n.type===FO.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!$O(e))return`The ${o} has unexpected type of "${WO(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return a.forEach(e=>{r[e]=!0}),n&&n.type===FO.REPLACE?void 0:a.length>0?`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.`:void 0}(e,n,t,i);r&&HO(r)}let a=!1;const s={};for(let i=0;i<r.length;i++){const o=r[i],l=n[o],c=e[o],u=l(c,t);if(void 0===u){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?zO(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${o}" 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.`)}s[o]=u,a=a||u!==c}return a=a||r.length!==Object.keys(e).length,a?s:e}}function qO(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function GO(e){return $O(e)&&"type"in e&&"string"==typeof e.type}var XO=Symbol.for("immer-nothing"),ZO=Symbol.for("immer-draftable"),JO=Symbol.for("immer-state"),QO="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function eS(e,...t){if("production"!==process.env.NODE_ENV){const n=QO[e],r=OS(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tS=Object,nS=tS.getPrototypeOf,rS="constructor",iS="prototype",oS="configurable",aS="enumerable",sS="writable",lS="value",cS=e=>!!e&&!!e[JO];function uS(e){return!!e&&(pS(e)||bS(e)||!!e[ZO]||!!e[rS]?.[ZO]||xS(e)||wS(e))}var dS=tS[iS][rS].toString(),fS=new WeakMap;function pS(e){if(!e||!ES(e))return!1;const t=nS(e);if(null===t||t===tS[iS])return!0;const n=tS.hasOwnProperty.call(t,rS)&&t[rS];if(n===Object)return!0;if(!OS(n))return!1;let r=fS.get(n);return void 0===r&&(r=Function.toString.call(n),fS.set(n,r)),r===dS}function hS(e,t,n=!0){if(0===mS(e)){(n?Reflect.ownKeys(e):tS.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function mS(e){const t=e[JO];return t?t.type_:bS(e)?1:xS(e)?2:wS(e)?3:0}var yS=(e,t,n=mS(e))=>2===n?e.has(t):tS[iS].hasOwnProperty.call(e,t),vS=(e,t,n=mS(e))=>2===n?e.get(t):e[t],gS=(e,t,n,r=mS(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var bS=Array.isArray,xS=e=>e instanceof Map,wS=e=>e instanceof Set,ES=e=>"object"==typeof e,OS=e=>"function"==typeof e,SS=e=>"boolean"==typeof e;var kS=e=>e.copy_||e.base_,PS=e=>e.modified_?e.copy_:e.base_;function jS(e,t){if(xS(e))return new Map(e);if(wS(e))return new Set(e);if(bS(e))return Array[iS].slice.call(e);const n=pS(e);if(!0===t||"class_only"===t&&!n){const t=tS.getOwnPropertyDescriptors(e);delete t[JO];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[sS]&&(o[sS]=!0,o[oS]=!0),(o.get||o.set)&&(t[i]={[oS]:!0,[sS]:!0,[aS]:o[aS],[lS]:e[i]})}return tS.create(nS(e),t)}{const t=nS(e);if(null!==t&&n)return{...e};const r=tS.create(t);return tS.assign(r,e)}}function AS(e,t=!1){return MS(e)||cS(e)||!uS(e)||(mS(e)>1&&tS.defineProperties(e,{set:TS,add:TS,clear:TS,delete:TS}),tS.freeze(e),t&&hS(e,(e,t)=>{AS(t,!0)},!1)),e}var TS={[lS]:function(){eS(2)}};function MS(e){return null===e||!ES(e)||tS.isFrozen(e)}var CS="MapSet",NS="Patches",IS="ArrayMethods",DS={};function _S(e){const t=DS[e];return t||eS(0,e),t}var RS,LS=e=>!!DS[e],zS=()=>RS;function VS(e,t){t&&(e.patchPlugin_=_S(NS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function BS(e){FS(e),e.drafts_.forEach(US),e.drafts_=null}function FS(e){e===RS&&(RS=e.parent_)}var $S=e=>RS={drafts_:[],parent_:RS,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:LS(CS)?_S(CS):void 0,arrayMethodsPlugin_:LS(IS)?_S(IS):void 0};function US(e){const t=e[JO];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function WS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[JO].modified_&&(BS(t),eS(4)),uS(e)&&(e=KS(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[JO].base_,e,t)}else e=KS(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&AS(t,n)}(t,e,!0),BS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==XO?e:void 0}function KS(e,t){if(MS(t))return t;const n=t[JO];if(!n){return ZS(t,e.handledSet_,e)}if(!YS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}XS(n,e)}return n.copy_}function HS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var YS=(e,t)=>e.scope_===t,qS=[];function GS(e,t,n,r){const i=kS(e),o=e.type_;if(void 0!==r){if(vS(i,r,o)===t)return void gS(i,r,n,o)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;hS(i,(e,n)=>{if(cS(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??qS;for(const e of a)gS(i,e,n,o)}function XS(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}HS(e)}}function ZS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||cS(e)||t.has(e)||!uS(e)||MS(e)||(t.add(e),hS(e,(r,i)=>{if(cS(i)){const t=i[JO];if(YS(t,n)){const n=PS(t);gS(e,r,n,e.type_),HS(t)}}else uS(i)&&ZS(i,t,n)})),e}var JS={get(e,t){if(t===JO)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=kS(e);if(!yS(i,t,e.type_))return function(e,t,n){const r=tk(t,n);return r?lS in r?r[lS]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!uS(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===ek(e.base_,t)){rk(e);const n=1===e.type_?+t:t,r=ik(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in kS(e),ownKeys:e=>Reflect.ownKeys(kS(e)),set(e,t,n){const r=tk(kS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=ek(kS(e),t),i=r?.[JO];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||yS(e.base_,t,e.type_)))return!0;rk(e),nk(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(cS(n)){const i=n[JO];YS(i,r)&&i.callbacks_.push(function(){rk(e);const r=PS(i);GS(e,n,r,t)})}else uS(n)&&e.callbacks_.push(function(){const i=kS(e);3===e.type_?i.has(n)&&ZS(n,r.handledSet_,r):vS(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&ZS(vS(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(rk(e),void 0!==ek(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),nk(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=kS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[sS]:!0,[oS]:1!==e.type_||"length"!==t,[aS]:r[aS],[lS]:n[t]}:r},defineProperty(){eS(11)},getPrototypeOf:e=>nS(e.base_),setPrototypeOf(){eS(12)}},QS={};for(let e in JS){let t=JS[e];QS[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function ek(e,t){const n=e[JO];return(n?kS(n):e)[t]}function tk(e,t){if(!(t in e))return;let n=nS(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=nS(n)}}function nk(e){e.modified_||(e.modified_=!0,e.parent_&&nk(e.parent_))}function rk(e){e.copy_||(e.assigned_=new Map,e.copy_=jS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}QS.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&eS(13),QS.set.call(this,e,t,void 0)},QS.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&eS(14),JS.set.call(this,e[0],t,n,e[0])};function ik(e,t,n,r){const[i,o]=xS(t)?_S(CS).proxyMap_(t,n):wS(t)?_S(CS).proxySet_(t,n):function(e,t){const n=bS(e),r={type_:n?1:0,scope_:t?t.scope_:zS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=JS;n&&(i=[r],o=QS);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??zS()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!YS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=PS(i);GS(e,i.draft_??i,o,n),XS(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function ok(e){return cS(e)||eS(10,e),ak(e)}function ak(e){if(!uS(e)||MS(e))return e;const t=e[JO];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=jS(e,!0);return hS(n,(e,t)=>{gS(n,e,ak(t))},r),t&&(t.finalized_=!1),n}var sk=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(OS(e)&&!OS(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(OS(t)||eS(6),void 0===n||OS(n)||eS(7),uS(e)){const i=$S(this),o=ik(i,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?BS(i):FS(i)}return VS(i,n),WS(r,i)}if(!e||!ES(e)){if(r=t(e),void 0===r&&(r=e),r===XO&&(r=void 0),this.autoFreeze_&&AS(r,!0),n){const t=[],i=[];_S(NS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}eS(1,e)},this.produceWithPatches=(e,t)=>{if(OS(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},SS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),SS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),SS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){uS(e)||eS(8),cS(e)&&(e=ok(e));const t=$S(this),n=ik(t,e,void 0);return n[JO].isManual_=!0,FS(t),n}finishDraft(e,t){const n=e&&e[JO];n&&n.isManual_||eS(9);const{scope_:r}=n;return VS(r,t),WS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=_S(NS).applyPatches_;return cS(e)?r(e,t):this.produce(e,e=>r(e,t))}},lk=sk.produce;function ck(e){return({dispatch:t,getState:n})=>r=>i=>"function"==typeof i?i(t,n,e):r(i)}var uk=ck(),dk=ck,fk="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?qO:qO.apply(null,arguments)};function pk(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?gP(0):"prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>GO(t)&&t.type===e,n}function hk(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function mk(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var yk=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function vk(e){return uS(e)?lk(e,()=>{}):e}function gk(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function bk(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function xk(e,t,n){const r=wk(e,t,n);return{detectMutations:()=>Ek(e,t,r,n)}}function wk(e,t=[],n,r="",i=new Set){const o={value:n};if(!e(n)&&!i.has(n)){i.add(n),o.children={};const a=t.length>0;for(const i in n){const s=r?r+"."+i:i;if(a){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}o.children[i]=wk(e,t,n[i],s)}}return o}function Ek(e,t=[],n,r,i=!1,o=""){const a=n?n.value:void 0,s=a===r;if(i&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:o};if(e(a)||e(r))return{wasMutated:!1};const l={};for(let e in n.children)l[e]=!0;for(let e in r)l[e]=!0;const c=t.length>0;for(let i in l){const a=o?o+"."+i:i;if(c){if(t.some(e=>e instanceof RegExp?e.test(a):a===e))continue}const l=Ek(e,t,n.children[i],r[i],s,a);if(l.wasMutated)return l}return{wasMutated:!1}}function Ok(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||$O(e)}function Sk(e,t="",n=Ok,r,i=[],o){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(o?.has(e))return!1;const s=null!=r?r(e):Object.entries(e),l=i.length>0;for(const[e,c]of s){const s=t?t+"."+e:e;if(l){if(i.some(e=>e instanceof RegExp?e.test(s):s===e))continue}if(!n(c))return{keyPath:s,value:c};if("object"==typeof c&&(a=Sk(c,s,n,r,i,o),a))return a}return o&&kk(e)&&o.add(e),!1}function kk(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!kk(t))return!1;return!0}function Pk(e){return"boolean"==typeof e}var jk=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let o=new yk;if(t&&(Pk(t)?o.push(uk):o.push(dk(t.extraArgument))),"production"!==process.env.NODE_ENV){if(n){let e={};Pk(n)||(e=n),o.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}},{isImmutable:r=bk,ignoredPaths:i,warnAfter:o=32}=e;const a=xk.bind(null,r,i);return({getState:e})=>{let n,r=e(),i=a(r);return s=>l=>{const c=mk(o,"ImmutableStateInvariantMiddleware");c.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?gP(19):`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const u=s(l);return c.measureTime(()=>{if(r=e(),n=i.detectMutations(),i=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?gP(20):`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(l)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),c.warnIfExceeded(),u}}}}(e))}if(r){let e={};Pk(r)||(e=r),o.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=Ok,getEntries:n,ignoredActions:r=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:o=[],warnAfter:a=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return e=>c=>d=>{if(!GO(d))return c(d);const f=c(d),p=mk(a,"SerializableStateInvariantMiddleware");return l||r.length&&-1!==r.indexOf(d.type)||p.measureTime(()=>{const e=Sk(d,"",t,n,i,u);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",d,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),s||(p.measureTime(()=>{const r=Sk(e.getState(),"",t,n,o,u);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${d.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),f}}}(e))}if(i){let e={};Pk(i)||(e=i),o.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=hk}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}}return o},Ak="RTK_autoBatch",Tk=()=>e=>({payload:e,meta:{[Ak]:!0}}),Mk=e=>t=>{setTimeout(t,e)},Ck=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Mk(10):"callback"===e.type?e.queueNotification:Mk(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Ak],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(e)}finally{i=!0}}})};function Nk(e){const t=jk(),{reducer:n,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!$O(n))throw new Error("production"===process.env.NODE_ENV?gP(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");l=YO(n)}if("production"!==process.env.NODE_ENV&&r&&"function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?gP(2):"`middleware` field must be a callback");if("function"==typeof r){if(c=r(t),"production"!==process.env.NODE_ENV&&!Array.isArray(c))throw new Error("production"===process.env.NODE_ENV?gP(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if("production"!==process.env.NODE_ENV&&c.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?gP(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&o){let e=new Set;c.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?gP(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let u=qO;i&&(u=fk({trace:"production"!==process.env.NODE_ENV,..."object"==typeof i&&i}));const d=function(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error("production"===process.env.NODE_ENV?zO(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:i.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map(e=>e(a));return o=qO(...s)(i.dispatch),{...i,dispatch:o}}}(...c),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new yk(e);return n&&r.push(Ck("object"==typeof n?n:void 0)),r})(d);if("production"!==process.env.NODE_ENV&&s&&"function"!=typeof s)throw new Error("production"===process.env.NODE_ENV?gP(5):"`enhancers` field must be a callback");let p="function"==typeof s?s(f):f();if("production"!==process.env.NODE_ENV&&!Array.isArray(p))throw new Error("production"===process.env.NODE_ENV?gP(6):"`enhancers` callback must return an array");if("production"!==process.env.NODE_ENV&&p.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?gP(7):"each enhancer provided to configureStore must be a function");"production"!==process.env.NODE_ENV&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return KO(l,a,u(...p))}function Ik(e){const t={},n=[];let r;const i={addCase(e,o){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?gP(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?gP(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a="string"==typeof e?e:e.type;if(!a)throw new Error("production"===process.env.NODE_ENV?gP(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("production"===process.env.NODE_ENV?gP(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=o,i},addAsyncThunk(e,o){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?gP(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return o.pending&&(t[e.pending.type]=o.pending),o.rejected&&(t[e.rejected.type]=o.rejected),o.fulfilled&&(t[e.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:e.settled,reducer:o.settled}),i},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?gP(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?gP(31):"`builder.addDefaultCase` can only be called once");return r=e,i}};return e(i),[t,n,r]}var Dk=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},_k=Symbol.for("rtk-slice-createasyncthunk");function Rk(e,t){return`${e}/${t}`}function Lk({creators:e}={}){const t=e?.asyncThunk?.[_k];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?gP(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},o=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("production"===process.env.NODE_ENV?gP(12):"`context.addCase` cannot be called with an empty action type");if(n in a.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?gP(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function l(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?gP(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?Ik(e.extraReducers):[e.extraReducers],i={...t,...a.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?gP(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,i,o]=Ik(t);if(function(e){return"function"==typeof e}(e))n=()=>vk(e());else{const t=vk(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[o]),a.reduce((e,n)=>{if(n){if(cS(e)){const r=n(e,t);return void 0===r?e:r}if(uS(e))return lk(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}o.forEach(r=>{const o=i[r],a={reducerName:r,type:Rk(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(o)?function({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?gP(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?pk(e,a):pk(e))}(a,o,s):function({type:e,reducerName:t},n,r,i){if(!i)throw new Error("production"===process.env.NODE_ENV?gP(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a);s&&r.addCase(d.pending,s);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);r.exposeCaseReducer(t,{fulfilled:a||Bk,pending:s||Bk,rejected:l||Bk,settled:c||Bk})}(a,o,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function h(){return f||(f=l()),f.getInitialState()}function m(t,n=!1){function r(e){let i=e[t];if(void 0===i)if(n)i=gk(d,r,h);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?gP(15):"selectSlice returned undefined for an uninjected slice reducer");return i}function i(t=c){const r=gk(u,n,()=>new WeakMap);return gk(r,t,()=>{const r={};for(const[i,o]of Object.entries(e.selectors??{}))r[i]=zk(o,t,()=>gk(d,t,h),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const y={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...y,...m(i,!0)}}};return y}}function zk(e,t,n,r){function i(i,...o){let a=t(i);if(void 0===a)if(r)a=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?gP(16):"selectState returned undefined for an uninjected slice reducer");return e(a,...o)}return i.unwrapped=e,i}var Vk=Lk();function Bk(){}var Fk="listener",$k="completed",Uk="cancelled",Wk=`task-${Uk}`,Kk=`task-${$k}`,Hk=`${Fk}-${Uk}`,Yk=`${Fk}-${$k}`,qk=class{constructor(e){this.code=e,this.message=`task ${Uk} (reason: ${e})`}name="TaskAbortError";message},Gk=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?gP(32):`${t} is not a function`)},Xk=()=>{},Zk=(e,t=Xk)=>(e.catch(t),e),Jk=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Qk=e=>{if(e.aborted)throw new qk(e.reason)};function eP(e,t){let n=Xk;return new Promise((r,i)=>{const o=()=>i(new qk(e.reason));e.aborted?o():(n=Jk(e,o),t.finally(()=>n()).then(r,i))}).finally(()=>{n=Xk})}var tP=e=>t=>Zk(eP(e,t).then(t=>(Qk(e),t))),nP=e=>{const t=tP(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:rP}=Object,iP={},oP="listenerMiddleware",aP=(e,t)=>(n,r)=>{Gk(n,"taskExecutor");const i=new AbortController;var o;o=i,Jk(e,()=>o.abort(e.reason));const a=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof qk?"cancelled":"rejected",error:e}}finally{t?.()}})(async()=>{Qk(e),Qk(i.signal);const t=await n({pause:tP(i.signal),delay:nP(i.signal),signal:i.signal});return Qk(i.signal),t},()=>i.abort(Kk));return r?.autoJoin&&t.push(a.catch(Xk)),{result:tP(e)(a),cancel(){i.abort(Wk)}}},sP=(e,t)=>(n,r)=>Zk((async(n,r)=>{Qk(t);let i=()=>{};const o=[new Promise((t,r)=>{let o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{o(),r()}})];null!=r&&o.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await eP(t,Promise.race(o));return Qk(t),e}finally{i()}})(n,r)),lP=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=pk(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("production"===process.env.NODE_ENV?gP(21):"Creating or removing a listener requires one of the known fields for matching an action");return Gk(o,"options.listener"),{predicate:i,type:t,effect:o}},cP=rP(e=>{const{type:t,predicate:n,effect:r}=lP(e);return{id:Dk(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?gP(22):"Unsubscribe not initialized")}}},{withTypes:()=>cP}),uP=(e,t)=>{const{type:n,effect:r,predicate:i}=lP(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===i)&&e.effect===r)},dP=e=>{e.pending.forEach(e=>{e.abort(Hk)})},fP=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},pP=rP(pk(`${oP}/add`),{withTypes:()=>pP}),hP=pk(`${oP}/removeAll`),mP=rP(pk(`${oP}/remove`),{withTypes:()=>mP}),yP=(...e)=>{console.error(`${oP}/error`,...e)},vP=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=yP}=e;Gk(i,"onError");const o=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&dP(e)}))(uP(t,e)??cP(e));rP(o,{withTypes:()=>o});const a=e=>{const n=uP(t,e);return n&&(n.unsubscribe(),e.cancelActive&&dP(n)),!!n};rP(a,{withTypes:()=>a});const s=async(e,a,s,l)=>{const c=new AbortController,u=sP(o,c.signal),d=[];try{e.pending.add(c),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(a,rP({},s,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:nP(c.signal),pause:tP(c.signal),extra:r,signal:c.signal,fork:aP(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(e.abort(Hk),n.delete(e))})},cancel:()=>{c.abort(Hk),e.pending.delete(c)},throwIfCancelled:()=>{Qk(c.signal)}})))}catch(e){e instanceof qk||fP(i,e,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(Yk),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(c)}},l=((e,t)=>()=>{for(const e of t.keys())dP(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!GO(r))return n(r);if(pP.match(r))return o(r.payload);if(hP.match(r))return void l();if(mP.match(r))return a(r.payload);let c=e.getState();const u=()=>{if(c===iP)throw new Error("production"===process.env.NODE_ENV?gP(23):`${oP}: getOriginalState can only be called synchronously`);return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),o=Array.from(t.values());for(const t of o){let o=!1;try{o=t.predicate(r,n,c)}catch(e){o=!1,fP(i,e,{raisedBy:"predicate"})}o&&s(t,r,e,u)}}}finally{c=iP}return d},startListening:o,stopListening:a,clearListeners:l}};function gP(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bP=Vk({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(o=t.payload.left)&&void 0!==o?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:xP,setLayout:wP,setChartSize:EP,setScale:OP}=bP.actions,SP=bP.reducer;function kP(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function PP(e){return Number.isFinite(e)}function jP(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function AP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AP(Object(n),!0).forEach(function(t){MP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MP(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CP(e,t,n){return sw(e)||sw(t)?n:ew(t)?Yx(e,t,n):"function"==typeof t?t(e):n}var NP=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,IP=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,o,a=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(o=!0),e.coordinate));return i||a.push(t),o||a.push(n),a},DP=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var h="scaleBand"===s&&a.bandwidth?a.bandwidth()/2:2,m="category"===i&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&o&&o.length>=2?2*Xx(o[0]-o[1])*m:m,d||f){var y=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=a.map(n);return PP(i)?{coordinate:i+m,value:e,offset:m,index:t}:null}).filter(cw);return y}return l&&c?c.map((e,t)=>{var n=a.map(e);return PP(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(cw):a.ticks&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return PP(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(cw):a.domain().map((e,t)=>{var n=a.map(e);return PP(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(cw)},_P={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0,s=0;s<n;++s){var l=e[s],c=null==l?void 0:l[i];if(null!=c){var u=c[1],d=c[0],f=Zx(u)?d:u;f>=0?(c[0]=o,o+=f,c[1]=o):(c[0]=a,a+=f,c[1]=a)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Ex(e,t)}},none:Ex,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ex(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Ex(e,t)}},positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0;a<n;++a){var s=e[a],l=null==s?void 0:s[i];if(null!=l){var c=Zx(l[1])?l[0]:l[1];c>=0?(l[0]=o,o+=c,l[1]=o):(l[0]=0,l[1]=0)}}}}},RP=(e,t,n)=>{var r,i=null!==(r=_P[n])&&void 0!==r?r:Ex,o=function(){var e=Eb([]),t=Ox,n=Ex,r=Sx;function i(i){var o,a,s=Array.from(e.apply(this,arguments),kx),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=_b(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:Eb(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:Eb(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Ox:"function"==typeof e?e:Eb(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?Ex:e,i):n},i}().keys(t).value((e,t)=>Number(CP(e,t,0))).order(Ox).offset(i),a=o(e);return a.forEach((n,r)=>{n.forEach((n,i)=>{var o=CP(e[i],t[r],0);Array.isArray(o)&&2===o.length&&Qx(o[0])&&Qx(o[1])&&(n[0]=o[0],n[1]=o[1])})}),a};function LP(e){return null==e?void 0:String(e)}function zP(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!sw(i[t.dataKey])){var s=aw(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[o]?n[o].coordinate+r/2:null}var l=CP(i,sw(a)?t.dataKey:a),c=t.scale.map(l);return Qx(c)?c:null}var VP=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=CP(o,t.dataKey,t.scale.domain()[a]);if(sw(s))return null;var l=t.scale.map(s);return Qx(l)?l-i/2+r:null},BP=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var{stackedData:a}=o,s=a.reduce((e,r)=>{var i,o=kP(r,t,n),a=(i=o.flat(2).filter(Qx),[Math.min(...i),Math.max(...i)]);return PP(a[0])&&PP(a[1])?[Math.min(e[0],a[0]),Math.max(e[1],a[1])]:e},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},FP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$P=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,UP=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=RO(t,e=>e.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min(((null==l?void 0:l.coordinate)||0)-((null==c?void 0:c.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function WP(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return TP(TP({},t),{},{dataKey:n,payload:r,value:i,name:o})}function KP(e,t){return e?String(e):"string"==typeof t?t:void 0}var HP=e=>e.layout.width,YP=e=>e.layout.height,qP=e=>e.layout.scale,GP=e=>e.layout.margin,XP=ns(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ZP=ns(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),JP="data-recharts-item-id";function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ej(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach(function(t){tj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nj,rj,ij,oj,aj,sj=ns([HP,YP,GP,e=>e.brush.height,function(e){return ZP(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return ZP(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return XP(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return XP(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},LO,e=>e.legend.size],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d=ej(ej({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==o&&Qx(e[o]))return TP(TP({},e),{},{[o]:e[o]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===o)&&"middle"!==a&&Qx(e[a]))return TP(TP({},e),{},{[a]:e[a]+(i||0)})}return e})(d,l,c);var p=e-d.left-d.right,h=t-d.top-d.bottom;return ej(ej({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),lj=ns(sj,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),cj=ns(HP,YP,(e,t)=>({x:0,y:0,width:e,height:t})),uj=o(null),dj=()=>null!=i(uj),fj=e=>e.brush,pj=ns([fj,sj,GP],(e,t,n)=>({height:e.height,x:Qx(e.x)?e.x:t.left,y:Qx(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Qx(e.width)?e.width:t.width})),hj={},mj={},yj={};function vj(){return nj||(nj=1,e=yj,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,s&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),i=void 0,o=null},f=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==c;u(),a&&t&&l()};return f.schedule=u,f.cancel=d,f.flush=()=>{l()},n?.addEventListener("abort",d,{once:!0}),f}),yj;var e}function gj(){return rj||(rj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vj();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:i=!1,trailing:o=!0,maxWait:a}=r,s=Array(2);let l;i&&(s[0]="leading"),o&&(s[1]="trailing");let c=null;const u=t.debounce(function(...t){l=e.apply(this,t),c=null},n,{edges:s}),d=function(...t){return null!=a&&(null===c&&(c=Date.now()),Date.now()-c>=a)?(l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,t),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}(mj)),mj}function bj(){return ij||(ij=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gj();e.throttle=function(e,n=0,r={}){const{leading:i=!0,trailing:o=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:o})}}(hj)),hj}function xj(){return aj?oj:(aj=1,oj=bj().throttle)}var wj=S(xj()),Ej=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(t.replace(/%s/g,()=>r[o++]))}},Oj={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Sj=(e,t,n)=>{var{width:r=Oj.width,height:i=Oj.height,aspect:o,maxHeight:a}=n,s=Jx(r)?e:Number(r),l=Jx(i)?t:Number(i);return o&&o>0&&(s?l=s/o:l&&(s=l*o),a&&null!=l&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},kj={width:0,height:0,overflow:"visible"},Pj={width:0,overflowX:"visible"},jj={height:0,overflowY:"visible"},Aj={},Tj=e=>{var{width:t,height:n}=e,r=Jx(t),i=Jx(n);return r&&i?kj:r?Pj:i?jj:Aj};function Mj(){return Mj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mj.apply(null,arguments)}function Cj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cj(Object(n),!0).forEach(function(t){Ij(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ij(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dj=o(Oj.initialDimension);function _j(t){var{children:n,width:r,height:i}=t,o=d(()=>({width:r,height:i}),[r,i]);return function(e){return jP(e.width)&&jP(e.height)}(o)?e.createElement(Dj.Provider,{value:o},n):null}var Rj=()=>i(Dj),Lj=a((t,n)=>{var{aspect:r,initialDimension:i=Oj.initialDimension,width:o,height:a,minWidth:c=Oj.minWidth,minHeight:u,maxHeight:d,children:p,debounce:h=Oj.debounce,id:y,className:v,onResize:b,style:x={}}=t,w=s(null),E=s();E.current=b,g(n,()=>w.current);var[O,S]=m({containerWidth:i.width,containerHeight:i.height}),k=f((e,t)=>{S(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);l(()=>{if(null==w.current||"undefined"==typeof ResizeObserver)return uw;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:i}=n.contentRect;k(r,i),null===(t=E.current)||void 0===t||t.call(E,r,i)}};h>0&&(e=wj(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=w.current.getBoundingClientRect();return k(n,r),t.observe(w.current),()=>{t.disconnect()}},[k,h]);var{containerWidth:P,containerHeight:j}=O;Ej(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:A,calculatedHeight:T}=Sj(P,j,{width:o,height:a,aspect:r,maxHeight:d});return Ej(null!=A&&A>0||null!=T&&T>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",A,T,o,a,c,u,r),e.createElement("div",{id:y?"".concat(y):void 0,className:de("recharts-responsive-container",v),style:Nj(Nj({},x),{},{width:o,height:a,minWidth:c,minHeight:u,maxHeight:d}),ref:w},e.createElement("div",{style:Tj({width:o,height:a})},e.createElement(_j,{width:A,height:T},p)))}),zj=a((t,n)=>{var r=Rj();if(jP(r.width)&&jP(r.height))return t.children;var{width:i,height:o}=function(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return void 0===i&&void 0===o?(i=Oj.width,o=Oj.height):void 0===i?i=r&&r>0?void 0:Oj.width:void 0===o&&(o=r&&r>0?void 0:Oj.height),{width:i,height:o}}({width:t.width,height:t.height,aspect:t.aspect}),{calculatedWidth:a,calculatedHeight:s}=Sj(void 0,void 0,{width:i,height:o,aspect:t.aspect,maxHeight:t.maxHeight});return Qx(a)&&Qx(s)?e.createElement(_j,{width:a,height:s},t.children):e.createElement(Lj,Mj({},t,{width:i,height:o,ref:n}))});function Vj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Bj=()=>{var e,t=dj(),n=dO(lj),r=dO(pj),i=null===(e=dO(fj))||void 0===e?void 0:e.padding;return t&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},Fj={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},$j=()=>{var e;return null!==(e=dO(sj))&&void 0!==e?e:Fj},Uj=()=>dO(HP),Wj=()=>dO(YP),Kj=e=>e.layout.layoutType,Hj=()=>dO(Kj),Yj=()=>{var e=Hj();if("horizontal"===e||"vertical"===e)return e},qj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},Gj=e=>{var t=sO(),n=dj(),{width:r,height:i}=e,o=Rj(),a=r,s=i;return o&&(a=o.width>0?o.width:r,s=o.height>0?o.height:i),l(()=>{!n&&jP(a)&&jP(s)&&t(EP({width:a,height:s}))},[t,n,a,s]),null},Xj=Symbol.for("immer-nothing"),Zj=Symbol.for("immer-draftable"),Jj=Symbol.for("immer-state"),Qj="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function eA(e,...t){if("production"!==process.env.NODE_ENV){const n=Qj[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tA=Object.getPrototypeOf;function nA(e){return!!e&&!!e[Jj]}function rA(e){return!!e&&(aA(e)||Array.isArray(e)||!!e[Zj]||!!e.constructor?.[Zj]||dA(e)||fA(e))}var iA=Object.prototype.constructor.toString(),oA=new WeakMap;function aA(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=oA.get(n);return void 0===r&&(r=Function.toString.call(n),oA.set(n,r)),r===iA}function sA(e,t,n=!0){if(0===lA(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function lA(e){const t=e[Jj];return t?t.type_:Array.isArray(e)?1:dA(e)?2:fA(e)?3:0}function cA(e,t){return 2===lA(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uA(e,t,n){const r=lA(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function dA(e){return e instanceof Map}function fA(e){return e instanceof Set}function pA(e){return e.copy_||e.base_}function hA(e,t){if(dA(e))return new Map(e);if(fA(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=aA(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Jj];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(tA(e),t)}{const t=tA(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function mA(e,t=!1){return vA(e)||nA(e)||!rA(e)||(lA(e)>1&&Object.defineProperties(e,{set:yA,add:yA,clear:yA,delete:yA}),Object.freeze(e),t&&Object.values(e).forEach(e=>mA(e,!0))),e}var yA={value:function(){eA(2)}};function vA(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var gA,bA={};function xA(e){const t=bA[e];return t||eA(0,e),t}function wA(){return gA}function EA(e,t){t&&(xA("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function OA(e){SA(e),e.drafts_.forEach(PA),e.drafts_=null}function SA(e){e===gA&&(gA=e.parent_)}function kA(e){return gA={drafts_:[],parent_:gA,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function PA(e){const t=e[Jj];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function jA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Jj].modified_&&(OA(t),eA(4)),rA(e)&&(e=AA(t,e),t.parent_||MA(t,e)),t.patches_&&xA("Patches").generateReplacementPatches_(n[Jj].base_,e,t.patches_,t.inversePatches_)):e=AA(t,n,[]),OA(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xj?e:void 0}function AA(e,t,n){if(vA(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Jj];if(!i)return sA(t,(r,o)=>TA(e,i,t,r,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return MA(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let o=t,a=!1;3===i.type_&&(o=new Set(t),t.clear(),a=!0),sA(o,(r,o)=>TA(e,i,t,r,o,n,a),r),MA(e,t,!1),n&&e.patches_&&xA("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function TA(e,t,n,r,i,o,a){if(null==i)return;if("object"!=typeof i&&!a)return;const s=vA(i);if(!s||a){if("production"!==process.env.NODE_ENV&&i===n&&eA(5),nA(i)){const a=AA(e,i,o&&t&&3!==t.type_&&!cA(t.assigned_,r)?o.concat(r):void 0);if(uA(n,r,a),!nA(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(rA(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===i&&s)return;AA(e,i),t&&t.scope_.parent_||"symbol"==typeof r||!(dA(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||MA(e,i)}}}function MA(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mA(t,n)}var CA={get(e,t){if(t===Jj)return e;const n=pA(e);if(!cA(n,t))return function(e,t,n){const r=DA(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!rA(r)?r:r===IA(e.base_,t)?(RA(e),e.copy_[t]=LA(r,e)):r},has:(e,t)=>t in pA(e),ownKeys:e=>Reflect.ownKeys(pA(e)),set(e,t,n){const r=DA(pA(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=IA(pA(e),t),i=r?.[Jj];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||cA(e.base_,t)))return!0;RA(e),_A(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==IA(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,RA(e),_A(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=pA(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){eA(11)},getPrototypeOf:e=>tA(e.base_),setPrototypeOf(){eA(12)}},NA={};function IA(e,t){const n=e[Jj];return(n?pA(n):e)[t]}function DA(e,t){if(!(t in e))return;let n=tA(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=tA(n)}}function _A(e){e.modified_||(e.modified_=!0,e.parent_&&_A(e.parent_))}function RA(e){e.copy_||(e.copy_=hA(e.base_,e.scope_.immer_.useStrictShallowCopy_))}sA(CA,(e,t)=>{NA[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),NA.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&eA(13),NA.set.call(this,e,t,void 0)},NA.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&eA(14),CA.set.call(this,e[0],t,n,e[0])};function LA(e,t){const n=dA(e)?xA("MapSet").proxyMap_(e,t):fA(e)?xA("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:wA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=CA;n&&(i=[r],o=NA);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:wA()).drafts_.push(n),n}function zA(e){if(!rA(e)||vA(e))return e;const t=e[Jj];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hA(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=hA(e,!0);return sA(n,(e,t)=>{uA(n,e,zA(t))},r),t&&(t.finalized_=!1),n}var VA=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if("function"!=typeof t&&eA(6),void 0!==n&&"function"!=typeof n&&eA(7),rA(e)){const i=kA(this),o=LA(e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?OA(i):SA(i)}return EA(i,n),jA(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Xj&&(r=void 0),this.autoFreeze_&&mA(r,!0),n){const t=[],i=[];xA("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}eA(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){rA(e)||eA(8),nA(e)&&(e=function(e){nA(e)||eA(10,e);return zA(e)}(e));const t=kA(this),n=LA(e,void 0);return n[Jj].isManual_=!0,SA(t),n}finishDraft(e,t){const n=e&&e[Jj];n&&n.isManual_||eA(9);const{scope_:r}=n;return EA(r,t),jA(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=xA("Patches").applyPatches_;return nA(e)?r(e,t):this.produce(e,e=>r(e,t))}};VA.produce;var BA,FA=Vk({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Tk()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ok(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:Tk()},removeLegendPayload:{reducer(e,t){var n=ok(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Tk()}}}),{setLegendSize:$A,setLegendSettings:UA,addLegendPayload:WA,replaceLegendPayload:KA,removeLegendPayload:HA}=FA.actions,YA=FA.reducer,qA={exports:{}},GA={};var XA,ZA,JA={};
|
|
58
|
+
/**
|
|
59
|
+
* @license React
|
|
60
|
+
* use-sync-external-store-with-selector.development.js
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/ZA||(ZA=1,"production"===process.env.NODE_ENV?qA.exports=function(){if(BA)return GA;BA=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;return GA.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!o){if(o=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,i=a)}var r,i,o=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},GA}():qA.exports=(XA||(XA=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,s=e.useDebugValue;JA.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!o){if(o=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,i=a)}var r,i,o=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),JA)),qA.exports;var QA={notify(){},get:()=>[]};var eT=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),tT=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),nT=(()=>eT||tT?e.useLayoutEffect:e.useEffect)();function rT(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function iT(e,t){if(rT(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!rT(e[n[r]],t[n[r]]))return!1;return!0}var oT=Symbol.for("react-redux-context"),aT="undefined"!=typeof globalThis?globalThis:{};function sT(){if(!e.createContext)return{};const t=aT[oT]??=new Map;let n=t.get(e.createContext);return n||(n=e.createContext(null),"production"!==process.env.NODE_ENV&&(n.displayName="ReactRedux"),t.set(e.createContext,n)),n}var lT=sT();var cT=function(t){const{children:n,context:r,serverState:i,store:o}=t,a=e.useMemo(()=>{const e=function(e){let t,n=QA,r=0,i=!1;function o(){l.onStateChange&&l.onStateChange()}function a(){r++,t||(t=e.subscribe(o),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){var t;t=()=>{let t=e;for(;t;)t.callback(),t=t.next},t()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=QA)}const l={addNestedSub:function(e){a();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return l}(o),n={store:o,subscription:e,getServerState:i?()=>i:void 0};if("production"===process.env.NODE_ENV)return n;{const{identityFunctionCheck:e="once",stabilityCheck:r="once"}=t;return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:e})}},[o,i]),s=e.useMemo(()=>o.getState(),[o]);nT(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=r||lT;return e.createElement(l.Provider,{value:a},n)},uT=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function dT(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function fT(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(uT.has(r)){if(null==e[r]&&null==t[r])continue;if(!iT(e[r],t[r]))return!1}else if(!dT(e[r],t[r]))return!1;return!0}function pT(){return pT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pT.apply(null,arguments)}function hT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hT(Object(n),!0).forEach(function(t){yT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vT(e){return Array.isArray(e)&&ew(e[0])&&ew(e[1])?e.join(" ~ "):e}var gT={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};var bT=t=>{var{separator:n=gT.separator,contentStyle:r,itemStyle:i,labelStyle:o=gT.labelStyle,payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=gT.accessibilityLayer}=t,h=mT(mT({},gT.contentStyle),r),m=mT({margin:0},o),y=!sw(d),v=y?d:"",g=de("recharts-default-tooltip",c),b=de("recharts-tooltip-label",u);y&&f&&null!=a&&(v=f(d,a));var x=p?{role:"status","aria-live":"assertive"}:{};return e.createElement("div",pT({className:g,style:h},x),e.createElement("p",{className:b,style:m},e.isValidElement(v)?v:"".concat(v)),(()=>{if(a&&a.length){var t=function(e,t){return null==t?e:RO(e,t)}(a,l),r=t.map((t,r)=>{if(!t||"none"===t.type)return null;var o=t.formatter||s||vT,{value:l,name:c}=t,u=l,d=c;if(o){var f=o(l,c,t,r,a);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=mT(mT({},gT.itemStyle),{},{color:t.color||gT.itemStyle.color},i);return e.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:p},ew(d)?e.createElement("span",{className:"recharts-tooltip-item-name"},d):null,ew(d)?e.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,e.createElement("span",{className:"recharts-tooltip-item-value"},u),e.createElement("span",{className:"recharts-tooltip-item-unit"},t.unit||""))});return e.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},r)}return null})())},xT="recharts-tooltip-wrapper",wT={visibility:"hidden"};function ET(e){var{coordinate:t,translateX:n,translateY:r}=e;return de(xT,{["".concat(xT,"-right")]:Qx(n)&&t&&Qx(t.x)&&n>=t.x,["".concat(xT,"-left")]:Qx(n)&&t&&Qx(t.x)&&n<t.x,["".concat(xT,"-bottom")]:Qx(r)&&t&&Qx(t.y)&&r>=t.y,["".concat(xT,"-top")]:Qx(r)&&t&&Qx(t.y)&&r<t.y})}function OT(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&Qx(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];return null==f?0:a[r]?u<f?Math.max(d,f):Math.max(u,f):null==c?0:d+s>f+c?Math.max(u,f):Math.max(d,f)}var ST=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function kT(){var[e,t]=m(()=>!ST&&(!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches));return l(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}}},[]),e}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(t){AT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TT(e){if(!e.prefersReducedMotion||"auto"!==e.isAnimationActive)return e.isAnimationActive&&e.active?"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing):void 0}function MT(t){var n,r,i,o,a,s,l=kT(),[c,u]=e.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));e.useEffect(()=>{var e=e=>{var n,r,i,o;"Escape"===e.key&&u({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(i=null===(o=t.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[null===(n=t.coordinate)||void 0===n?void 0:n.x,null===(r=t.coordinate)||void 0===r?void 0:r.y]),!c.dismissed||(null!==(i=null===(o=t.coordinate)||void 0===o?void 0:o.x)&&void 0!==i?i:0)===c.dismissedAtCoordinate.x&&(null!==(a=null===(s=t.coordinate)||void 0===s?void 0:s.y)&&void 0!==a?a:0)===c.dismissedAtCoordinate.y||u(jT(jT({},c),{},{dismissed:!1}));var{cssClasses:d,cssProperties:f}=function(e){var t,n,r,{allowEscapeViewBox:i,coordinate:o,offsetTop:a,offsetLeft:s,position:l,reverseDirection:c,tooltipBox:u,useTranslate3d:d,viewBox:f}=e;return t=u.height>0&&u.width>0&&o?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=OT({allowEscapeViewBox:i,coordinate:o,key:"x",offset:s,position:l,reverseDirection:c,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),translateY:r=OT({allowEscapeViewBox:i,coordinate:o,key:"y",offset:a,position:l,reverseDirection:c,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),useTranslate3d:d}):wT,{cssProperties:t,cssClasses:ET({translateX:n,translateY:r,coordinate:o})}}({allowEscapeViewBox:t.allowEscapeViewBox,coordinate:t.coordinate,offsetLeft:"number"==typeof t.offset?t.offset:t.offset.x,offsetTop:"number"==typeof t.offset?t.offset:t.offset.y,position:t.position,reverseDirection:t.reverseDirection,tooltipBox:{height:t.lastBoundingBox.height,width:t.lastBoundingBox.width},useTranslate3d:t.useTranslate3d,viewBox:t.viewBox}),p=t.hasPortalFromProps?{}:jT(jT({transition:TT({prefersReducedMotion:l,isAnimationActive:t.isAnimationActive,active:t.active,animationDuration:t.animationDuration,animationEasing:t.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=jT(jT({},p),{},{visibility:!c.dismissed&&t.active&&t.hasPayload?"visible":"hidden"},t.wrapperStyle);return e.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:h,ref:t.innerRef},t.children)}var CT=e.memo(MT),NT=()=>{var e;return null===(e=dO(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function IT(){return IT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IT.apply(null,arguments)}function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DT(Object(n),!0).forEach(function(t){RT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LT={curveBasisClosed:function(e){return new cx(e)},curveBasisOpen:function(e){return new ux(e)},curveBasis:function(e){return new lx(e)},curveBumpX:function(e){return new $b(e,!0)},curveBumpY:function(e){return new $b(e,!1)},curveLinearClosed:function(e){return new dx(e)},curveLinear:Lb,curveMonotoneX:function(e){return new yx(e)},curveMonotoneY:function(e){return new vx(e)},curveNatural:function(e){return new bx(e)},curveStep:function(e){return new wx(e,.5)},curveStepAfter:function(e){return new wx(e,1)},curveStepBefore:function(e){return new wx(e,0)}},zT=e=>PP(e.x)&&PP(e.y),VT=e=>null!=e.base&&zT(e.base)&&zT(e),BT=e=>e.x,FT=e=>e.y,$T={connectNulls:!1,type:"linear"},UT=e=>{var{type:t=$T.type,points:n=[],baseLine:r,layout:i,connectNulls:o=$T.connectNulls}=e,a=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(lw(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=LT["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return LT[n]||Lb})(t,i),s=o?n.filter(zT):n;if(Array.isArray(r)){var l=n.map((e,t)=>_T(_T({},e),{},{base:r[t]}));return("vertical"===i?Fb().y(FT).x1(BT).x0(e=>e.base.x):Fb().x(BT).y1(FT).y0(e=>e.base.y)).defined(VT).curve(a)(o?l.filter(VT):l)}return("vertical"===i&&Qx(r)?Fb().y(FT).x1(BT).x0(r):Qx(r)?Fb().x(BT).y1(FT).y0(r):Bb().x(BT).y(FT)).defined(zT).curve(a)(s)},WT=t=>{var{className:n,points:r,path:i,pathRef:o}=t,a=Hj();if(!(r&&r.length||i))return null;var s={type:t.type,points:t.points,baseLine:t.baseLine,layout:t.layout||a,connectNulls:t.connectNulls},l=r&&r.length?UT(s):i;return e.createElement("path",IT({},fb(t),xw(t),{className:de("recharts-curve",n),d:null===l?void 0:l,ref:o}))},KT=["x","y","top","left","width","height","className"];function HT(){return HT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HT.apply(null,arguments)}function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var GT=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),XT=t=>{var{x:n=0,y:r=0,top:i=0,left:o=0,width:a=0,height:s=0,className:l}=t,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,KT),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YT(Object(n),!0).forEach(function(t){qT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:r,top:i,left:o,width:a,height:s},c);return Qx(n)&&Qx(r)&&Qx(a)&&Qx(s)&&Qx(i)&&Qx(o)?e.createElement("path",HT({},hb(u),{className:de("recharts-cross",l),d:GT(n,r,a,s,i,o)})):null};function ZT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZT(Object(n),!0).forEach(function(t){QT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eM=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),tM=(e,t)=>Object.keys(t).reduce((n,r)=>JT(JT({},n),{},{[r]:e(r,t[r])}),{});function nM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nM(Object(n),!0).forEach(function(t){iM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oM=(e,t,n)=>e+(t-e)*n,aM=e=>{var{from:t,to:n}=e;return t!==n},sM=(e,t,n)=>{var r=tM((t,n)=>{if(aM(n)){var[r,i]=e(n.from,n.to,n.velocity);return rM(rM({},n),{},{from:r,velocity:i})}return n},t);return n<1?tM((e,t)=>aM(t)&&null!=r[e]?rM(rM({},t),{},{velocity:oM(t.velocity,r[e].velocity,n),from:oM(t.from,r[e].from,n)}):t,t):sM(e,r,n-1)};function lM(e,t,n,r,i,o){var a,s=r.reduce((n,r)=>rM(rM({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{a||(a=r);var u=(r-a)/n.dt;s=sM(n,s,u),i(rM(rM(rM({},e),t),tM((e,t)=>t.from,s))),a=r,Object.values(s).filter(aM).length&&(l=o.setTimeout(c))};return()=>(l=o.setTimeout(c),()=>{var e;null===(e=l)||void 0===e||e()})}var cM=(e,t,n,r,i,o)=>{var a,s,l=(a=e,s=t,[Object.keys(a),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==n?()=>(i(rM(rM({},e),t)),()=>{}):!0===n.isStepper?lM(e,t,n,l,i,o):function(e,t,n,r,i,o,a){var s,l=null,c=i.reduce((n,r)=>{var i=e[r],o=t[r];return null==i||null==o?n:rM(rM({},n),{},{[r]:[i,o]})},{}),u=i=>{s||(s=i);var d=(i-s)/r,f=tM((e,t)=>oM(...t,n(d)),c);if(o(rM(rM(rM({},e),t),f)),d<1)l=a.setTimeout(u);else{var p=tM((e,t)=>oM(...t,n(1)),c);o(rM(rM(rM({},e),t),p))}};return()=>(l=a.setTimeout(u),()=>{var e;null===(e=l)||void 0===e||e()})}(e,t,n,r,l,i,o)},uM=1e-4,dM=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],fM=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),pM=(e,t)=>n=>{var r=dM(e,t);return fM(r,n)},hM=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},mM=(e,t,n,r)=>{var i,o,a=pM(e,n),s=pM(t,r),l=(i=e,o=n,e=>{var t=[...dM(i,o).map((e,t)=>e*t).slice(1),0];return fM(t,e)}),c=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=a(n)-t,o=l(n);if(Math.abs(i-t)<uM||o<uM)return s(n);n=c(n-i/o)}return s(n)};return u.isStepper=!1,u},yM=function(){return mM(...hM(...arguments))},vM=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return yM(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,i=(e,i,o)=>{var a=o+(-(e-i)*t-o*n)*r/1e3,s=o*r/1e3+e;return Math.abs(s-i)<uM&&Math.abs(a)<uM?[i,0]:[s,a]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===e.split("(")[0])return yM(e)}return"function"==typeof e?e:null};class gM{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=o=>{o-n>=t?e(o):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function bM(){return function(e){var t=()=>null,n=!1,r=null,i=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var a=o,[s,...l]=a;return"number"==typeof s?void(r=e.setTimeout(i.bind(null,l),s)):(i(s),void(r=e.setTimeout(i.bind(null,l))))}"string"==typeof o&&t(o),"object"==typeof o&&t(o),"function"==typeof o&&o()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new gM)}var xM=o(bM);var wM={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},EM={t:0},OM={t:1};function SM(e){var t,n,r,o=Sw(e,wM),{isActive:a,canBegin:c,duration:u,easing:f,begin:p,onAnimationEnd:h,onAnimationStart:y,children:v}=o,g=kT(),b="auto"===a?!ST&&!g:a,x=(t=o.animationId,n=o.animationManager,r=i(xM),d(()=>null!=n?n:r(t),[t,n,r])),[w,E]=m(b?EM:OM),O=s(null);return l(()=>{b||E(OM)},[b]),l(()=>{if(!b||!c)return uw;var e=cM(EM,OM,vM(f),u,E,x.getTimeoutController());return x.start([y,p,()=>{O.current=e()},u,h]),()=>{x.stop(),O.current&&O.current(),h()}},[b,c,u,f,p,y,h,x]),v(w.t)}function kM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=s(nw(t)),r=s(e);return r.current!==e&&(n.current=nw(t),r.current=e),n.current}var PM,jM,AM,TM,MM,CM,NM,IM,DM,_M,RM=["radius"],LM=["radius"];function zM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zM(Object(n),!0).forEach(function(t){BM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FM(){return FM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FM.apply(null,arguments)}function $M(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UM(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var WM=(e,t,n,r,i)=>{var o,a=qx(n),s=qx(r),l=Math.min(Math.abs(a)/2,Math.abs(s)/2),c=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=i[p])&&void 0!==h?h:0;f[p]=m>l?l:m}o=Gx(PM||(PM=UM(["M",",",""])),e,t+c*f[0]),f[0]>0&&(o+=Gx(jM||(jM=UM(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),o+=Gx(AM||(AM=UM(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(o+=Gx(TM||(TM=UM(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+c*f[1])),o+=Gx(MM||(MM=UM(["L ",",",""])),e+n,t+r-c*f[2]),f[2]>0&&(o+=Gx(CM||(CM=UM(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),o+=Gx(NM||(NM=UM(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(o+=Gx(IM||(IM=UM(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-c*f[3])),o+="Z"}else if(l>0&&i===+i&&i>0){var y=Math.min(l,i);o=Gx(DM||(DM=UM(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+c*y,y,y,d,e+u*y,t,e+n-u*y,t,y,y,d,e+n,t+c*y,e+n,t+r-c*y,y,y,d,e+n-u*y,t+r,e+u*y,t+r,y,y,d,e,t+r-c*y)}else o=Gx(_M||(_M=UM(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return o},KM={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},HM=t=>{var n=Sw(t,KM),r=s(null),[i,o]=m(-1);l(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&o(e)}catch(e){}},[]);var{x:a,y:c,width:u,height:f,radius:p,className:h}=n,{animationEasing:y,animationDuration:v,animationBegin:g,isAnimationActive:b,isUpdateAnimationActive:x}=n,w=s(u),E=s(f),O=s(a),S=s(c),k=kM(d(()=>({x:a,y:c,width:u,height:f,radius:p}),[a,c,u,f,p]),"rectangle-");if(a!==+a||c!==+c||u!==+u||f!==+f||0===u||0===f)return null;var P=de("recharts-rectangle",h);if(!x){var j=hb(n),{radius:A}=j,T=$M(j,RM);return e.createElement("path",FM({},T,{x:qx(a),y:qx(c),width:qx(u),height:qx(f),radius:"number"==typeof p?p:void 0,className:P,d:WM(a,c,u,f,p)}))}var M=w.current,C=E.current,N=O.current,I=S.current,D="0px ".concat(-1===i?1:i,"px"),_="".concat(i,"px ").concat(i,"px"),R=eM(["strokeDasharray"],v,"string"==typeof y?y:KM.animationEasing);return e.createElement(SM,{animationId:k,key:k,canBegin:i>0,duration:v,easing:y,isActive:x,begin:g},t=>{var i,o=ow(M,u,t),s=ow(C,f,t),l=ow(N,a,t),d=ow(I,c,t);r.current&&(w.current=o,E.current=s,O.current=l,S.current=d),i=b?t>0?{transition:R,strokeDasharray:_}:{strokeDasharray:D}:{strokeDasharray:_};var h=hb(n),{radius:m}=h,y=$M(h,LM);return e.createElement("path",FM({},y,{radius:"number"==typeof p?p:void 0,className:P,d:WM(l,d,o,s,p),ref:r,style:VM(VM({},i),n.style)}))})};function YM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YM(Object(n),!0).forEach(function(t){GM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XM,ZM,JM,QM,eC,tC,nC,rC=Math.PI/180,iC=e=>180*e/Math.PI,oC=(e,t,n,r)=>({x:e+Math.cos(-rC*r)*n,y:t+Math.sin(-rC*r)*n}),aC=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=((e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)})({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:iC(l),angleInRadian:l}},sC=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360);return e+360*Math.min(i,o)},lC=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=aC({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s)return null;if(0===i)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-360*o,endAngle:n-360*o}})(t),d=o;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;l=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;l=d>=u&&d<=c}return l?qM(qM({},t),{},{radius:i,angle:sC(d,t)}):null};function cC(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e;return{points:[oC(t,n,r,i),oC(t,n,r,o)],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function uC(){return uC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uC.apply(null,arguments)}function dC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var fC=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/rC,d=l?i:i+o*u,f=l?i-o*u:i;return{center:oC(t,n,c,d),circleTangency:oC(t,n,r,d),lineTangency:oC(t,n,c*Math.cos(u*rC),f),theta:u}},pC=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=((e,t)=>Xx(t-e)*Math.min(Math.abs(t-e),359.999))(o,a),l=o+s,c=oC(t,n,i,o),u=oC(t,n,i,l),d=Gx(XM||(XM=dC(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,i,i,+(Math.abs(s)>180),+(o>l),u.x,u.y);if(r>0){var f=oC(t,n,r,o),p=oC(t,n,r,l);d+=Gx(ZM||(ZM=dC(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),p.x,p.y,r,r,+(Math.abs(s)>180),+(o<=l),f.x,f.y)}else d+=Gx(JM||(JM=dC(["L ",","," Z"])),t,n);return d},hC={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},mC=t=>{var n=Sw(t,hC),{cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=n;if(a<o||u===d)return null;var p,h=de("recharts-sector",f),m=a-o,y=rw(s,m,0,!0);return p=y>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Xx(c-l),{circleTangency:d,lineTangency:f,theta:p}=fC({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:h,lineTangency:m,theta:y}=fC({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),v=s?Math.abs(l-c):Math.abs(l-c)-p-y;if(v<0)return a?Gx(QM||(QM=dC(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),f.x,f.y,o,o,2*o,o,o,2*-o):pC({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var g=Gx(eC||(eC=dC(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),f.x,f.y,o,o,+(u<0),d.x,d.y,i,i,+(v>180),+(u<0),h.x,h.y,o,o,+(u<0),m.x,m.y);if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=fC({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:E,lineTangency:O,theta:S}=fC({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),k=s?Math.abs(l-c):Math.abs(l-c)-w-S;if(k<0&&0===o)return"".concat(g,"L").concat(t,",").concat(n,"Z");g+=Gx(tC||(tC=dC(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),O.x,O.y,o,o,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),b.x,b.y,o,o,+(u<0),x.x,x.y)}else g+=Gx(nC||(nC=dC(["L",",","Z"])),t,n);return g})({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):pC({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:u,endAngle:d}),e.createElement("path",uC({},hb(n),{className:h,d:p}))};function yC(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(bw(t)){if("centric"===e){var{cx:r,cy:i,innerRadius:o,outerRadius:a,angle:s}=t,l=oC(r,i,o,s),c=oC(r,i,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return cC(t)}}var vC,gC,bC,xC,wC,EC={},OC={},SC={};function kC(){return vC||(vC=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EO();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(SC)),SC}function PC(){return gC||(gC=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kC();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(OC)),OC}function jC(){return bC||(bC=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IO(),n=PC();e.range=function(e,r,i){i&&"number"!=typeof i&&t.isIterateeCall(e,r,i)&&(r=i=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),i=void 0===i?e<r?1:-1:n.toFinite(i);const o=Math.max(Math.ceil((r-e)/(i||1)),0),a=new Array(o);for(let t=0;t<o;t++)a[t]=e,e+=i;return a}}(EC)),EC}function AC(){return wC?xC:(wC=1,xC=jC().range)}var TC=S(AC()),MC=e=>e.chartData,CC=ns([MC],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),NC=(e,t,n,r)=>r?CC(e):MC(e),IC=(e,t,n)=>n?CC(e):MC(e),DC=ns([NC],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});ns([CC],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});var _C=ns([MC],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});function RC(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(PP(t)&&PP(n))return!0}return!1}function LC(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function zC(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[i,o]=e;if(PP(i))n=i;else if("function"==typeof i)return;if(PP(o))r=o;else if("function"==typeof o)return;var a=[n,r];if(RC(a))return a}}var VC,BC=1e9,FC=!0,$C="[DecimalError] ",UC=$C+"Invalid argument: ",WC=$C+"Exponent out of range: ",KC=Math.floor,HC=Math.pow,YC=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,qC=1e7,GC=9007199254740991,XC=KC(1286742750677284.5),ZC={};function JC(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),FC?lN(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),o>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((s=l.length)-(o=c.length)<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/qC|0,l[o]%=qC;for(n&&(l.unshift(n),++i),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=i,FC?lN(t,d):t}function QC(e,t,n){if(e!==~~e||e<t||e>n)throw Error(UC+e)}function eN(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=oN(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=oN(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}ZC.absoluteValue=ZC.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ZC.comparedTo=ZC.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},ZC.decimalPlaces=ZC.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},ZC.dividedBy=ZC.div=function(e){return tN(this,new this.constructor(e))},ZC.dividedToIntegerBy=ZC.idiv=function(e){var t=this.constructor;return lN(tN(this,new t(e),0,1),t.precision)},ZC.equals=ZC.eq=function(e){return!this.cmp(e)},ZC.exponent=function(){return rN(this)},ZC.greaterThan=ZC.gt=function(e){return this.cmp(e)>0},ZC.greaterThanOrEqualTo=ZC.gte=function(e){return this.cmp(e)>=0},ZC.isInteger=ZC.isint=function(){return this.e>this.d.length-2},ZC.isNegative=ZC.isneg=function(){return this.s<0},ZC.isPositive=ZC.ispos=function(){return this.s>0},ZC.isZero=function(){return 0===this.s},ZC.lessThan=ZC.lt=function(e){return this.cmp(e)<0},ZC.lessThanOrEqualTo=ZC.lte=function(e){return this.cmp(e)<1},ZC.logarithm=ZC.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(VC))throw Error($C+"NaN");if(n.s<1)throw Error($C+(n.s?"NaN":"-Infinity"));return n.eq(VC)?new r(0):(FC=!1,t=tN(aN(n,o),aN(e,o),o),FC=!0,lN(t,i))},ZC.minus=ZC.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?cN(t,e):JC(t,(e.s=-e.s,e))},ZC.modulo=ZC.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error($C+"NaN");return n.s?(FC=!1,t=tN(n,e,0,1).times(e),FC=!0,n.minus(t)):lN(new r(n),i)},ZC.naturalExponential=ZC.exp=function(){return nN(this)},ZC.naturalLogarithm=ZC.ln=function(){return aN(this)},ZC.negated=ZC.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ZC.plus=ZC.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?JC(t,e):cN(t,(e.s=-e.s,e))},ZC.precision=ZC.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(UC+e);if(t=rN(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},ZC.squareRoot=ZC.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error($C+"NaN")}for(e=rN(s),FC=!1,0==(i=Math.sqrt(+s))||i==1/0?(((t=eN(s.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=KC((e+1)/2)-(e<0||e%2),r=new l(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(i.toString()),i=a=(n=l.precision)+3;;)if(r=(o=r).plus(tN(s,o,a+2)).times(.5),eN(o.d).slice(0,a)===(t=eN(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(lN(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if("9999"!=t)break;a+=4}return FC=!0,lN(r,n)},ZC.times=ZC.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%qC|0,t=s/qC|0;o[i]=(o[i]+t)%qC|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,FC?lN(e,d.precision):e},ZC.toDecimalPlaces=ZC.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(QC(e,0,BC),void 0===t?t=r.rounding:QC(t,0,8),lN(n,e+rN(n)+1,t))},ZC.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=uN(r,!0):(QC(e,0,BC),void 0===t?t=i.rounding:QC(t,0,8),n=uN(r=lN(new i(r),e+1,t),!0,e+1)),n},ZC.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?uN(i):(QC(e,0,BC),void 0===t?t=o.rounding:QC(t,0,8),n=uN((r=lN(new o(i),e+rN(i)+1,t)).abs(),!1,e+rN(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},ZC.toInteger=ZC.toint=function(){var e=this,t=e.constructor;return lN(new t(e),rN(e)+1,t.rounding)},ZC.toNumber=function(){return+this},ZC.toPower=ZC.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(VC);if(!(s=new l(s)).s){if(e.s<1)throw Error($C+"Infinity");return s}if(s.eq(VC))return s;if(r=l.precision,e.eq(VC))return lN(s,r);if(a=(t=e.e)>=(n=e.d.length-1),o=s.s,a){if((n=c<0?-c:c)<=GC){for(i=new l(VC),t=Math.ceil(r/7+4),FC=!1;n%2&&dN((i=i.times(s)).d,t),0!==(n=KC(n/2));)dN((s=s.times(s)).d,t);return FC=!0,e.s<0?new l(VC).div(i):lN(i,r)}}else if(o<0)throw Error($C+"NaN");return o=o<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,FC=!1,i=e.times(aN(s,r+12)),FC=!0,(i=nN(i)).s=o,i},ZC.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?r=uN(i,(n=rN(i))<=o.toExpNeg||n>=o.toExpPos):(QC(e,1,BC),void 0===t?t=o.rounding:QC(t,0,8),r=uN(i=lN(new o(i),e,t),e<=(n=rN(i))||n<=o.toExpNeg,e)),r},ZC.toSignificantDigits=ZC.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(QC(e,1,BC),void 0===t?t=n.rounding:QC(t,0,8)),lN(new n(this),e,t)},ZC.toString=ZC.valueOf=ZC.val=ZC.toJSON=ZC[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=rN(e),n=e.constructor;return uN(e,t<=n.toExpNeg||t>=n.toExpPos)};var tN=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%qC|0,r=n/qC|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*qC+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,h,m,y,v,g,b,x,w,E,O,S,k=r.constructor,P=r.s==i.s?1:-1,j=r.d,A=i.d;if(!r.s)return new k(r);if(!i.s)throw Error($C+"Division by zero");for(l=r.e-i.e,O=A.length,w=j.length,h=(p=new k(P)).d=[],c=0;A[c]==(j[c]||0);)++c;if(A[c]>(j[c]||0)&&--l,(g=null==o?o=k.precision:a?o+(rN(r)-rN(i))+1:o)<0)return new k(0);if(g=g/7+2|0,c=0,1==O)for(u=0,A=A[0],g++;(c<w||u)&&g--;c++)b=u*qC+(j[c]||0),h[c]=b/A|0,u=b%A|0;else{for((u=qC/(A[0]+1)|0)>1&&(A=e(A,u),j=e(j,u),O=A.length,w=j.length),x=O,y=(m=j.slice(0,O)).length;y<O;)m[y++]=0;(S=A.slice()).unshift(0),E=A[0],A[1]>=qC/2&&++E;do{u=0,(s=t(A,m,O,y))<0?(v=m[0],O!=y&&(v=v*qC+(m[1]||0)),(u=v/E|0)>1?(u>=qC&&(u=qC-1),1==(s=t(d=e(A,u),m,f=d.length,y=m.length))&&(u--,n(d,O<f?S:A,f))):(0==u&&(s=u=1),d=A.slice()),(f=d.length)<y&&d.unshift(0),n(m,d,y),-1==s&&(s=t(A,m,O,y=m.length))<1&&(u++,n(m,O<y?S:A,y)),y=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[y++]=j[x]||0:(m=[j[x]],y=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=l,lN(p,a?o+rN(p)+1:o)}}();function nN(e,t){var n,r,i,o,a,s=0,l=0,c=e.constructor,u=c.precision;if(rN(e)>16)throw Error(WC+rN(e));if(!e.s)return new c(VC);for(FC=!1,a=u,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),l+=5;for(a+=Math.log(HC(2,l))/Math.LN10*2+5|0,n=r=i=new c(VC),c.precision=a;;){if(r=lN(r.times(e),a),n=n.times(++s),eN((o=i.plus(tN(r,n,a))).d).slice(0,a)===eN(i.d).slice(0,a)){for(;l--;)i=lN(i.times(i),a);return c.precision=u,null==t?(FC=!0,lN(i,u)):i}i=o}}function rN(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function iN(e,t,n){if(t>e.LN10.sd())throw FC=!0,n&&(e.precision=n),Error($C+"LN10 precision limit exceeded");return lN(new e(e.LN10),t)}function oN(e){for(var t="";e--;)t+="0";return t}function aN(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error($C+(f.s?"NaN":"-Infinity"));if(f.eq(VC))return new h(0);if(null==t?(FC=!1,c=m):c=t,f.eq(10))return null==t&&(FC=!0),iN(h,c);if(c+=10,h.precision=c,r=(n=eN(p)).charAt(0),o=rN(f),!(Math.abs(o)<15e14))return l=iN(h,c+2,m).times(o+""),f=aN(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(FC=!0,lN(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=eN((f=f.times(e)).d)).charAt(0),d++;for(o=rN(f),r>1?(f=new h("0."+n),o++):f=new h(r+"."+n.slice(1)),s=a=f=tN(f.minus(VC),f.plus(VC),c),u=lN(f.times(f),c),i=3;;){if(a=lN(a.times(u),c),eN((l=s.plus(tN(a,new h(i),c))).d).slice(0,c)===eN(s.d).slice(0,c))return s=s.times(2),0!==o&&(s=s.plus(iN(h,c+2,m).times(o+""))),s=tN(s,new h(d),c),h.precision=m,null==t?(FC=!0,lN(s,m)):s;s=l,i+=2}}function sN(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=KC(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),FC&&(e.e>XC||e.e<-XC))throw Error(WC+n)}else e.s=0,e.e=0,e.d=[0];return e}function lN(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(o=d.length))return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(s=c/(o=HC(10,a-i-1))%10|0,l=t<0||void 0!==d[u+1]||c%o,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?i>0?c/HC(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=rN(e),d.length=1,t=t-o-1,d[0]=HC(10,(7-t%7)%7),e.e=KC(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,o=1,u--):(d.length=u+1,o=HC(10,7-r),d[u]=i>0?(c/HC(10,a-i)%HC(10,i)|0)*o:0),l)for(;;){if(0==u){(d[0]+=o)==qC&&(d[0]=1,++e.e);break}if(d[u]+=o,d[u]!=qC)break;d[u--]=0,o=1}for(r=d.length;0===d[--r];)d.pop();if(FC&&(e.e>XC||e.e<-XC))throw Error(WC+rN(e));return e}function cN(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),FC?lN(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),a>(i=Math.max(Math.ceil(p/7),s)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=l.length)<(s=d.length))&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&0===l[--o];)l[o]=qC-1;--l[o],l[i]+=qC}l[i]-=d[i]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,FC?lN(t,p):t):new f(0)}function uN(e,t,n){var r,i=rN(e),o=eN(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+oN(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+oN(-i-1)+o,n&&(r=n-a)>0&&(o+=oN(r))):i>=a?(o+=oN(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+oN(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=oN(r))),e.s<0?"-"+o:o}function dN(e,t){if(e.length>t)return e.length=t,!0}function fN(e){if(!e||"object"!=typeof e)throw Error($C+"Object expected");var t,n,r,i=["precision",1,BC,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(KC(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(UC+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(UC+n+": "+r);this[n]=new this(r)}return this}var pN=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(UC+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):sN(t,e.toString())}if("string"!=typeof e)throw Error(UC+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!YC.test(e))throw Error(UC+e);sN(t,e)}if(o.prototype=ZC,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=fN,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});VC=new pN(1);var hN=pN;function mN(e){return 0===e?1:Math.floor(new hN(e).abs().log(10).toNumber())+1}function yN(e,t,n){for(var r=new hN(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var vN=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},gN=(e,t,n)=>{if(e.lte(0))return new hN(0);var r=mN(e.toNumber()),i=new hN(10).pow(r),o=e.div(i),a=1!==r?.05:.1,s=new hN(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return new hN(t?s.toNumber():Math.ceil(s.toNumber()))},bN=(e,t,n)=>{var r;if(e.lte(0))return new hN(0);var i=[1,2,2.5,5],o=e.toNumber(),a=Math.floor(new hN(o).abs().log(10).toNumber()),s=new hN(10).pow(a),l=e.div(s).toNumber(),c=i.findIndex(e=>e>=l-1e-10);if(-1===c&&(s=s.mul(10),c=0),(c+=n)>=i.length){var u=Math.floor(c/i.length);c%=i.length,s=s.mul(new hN(10).pow(u))}var d=null!==(r=i[c])&&void 0!==r?r:1,f=new hN(d).mul(s);return t?f:new hN(Math.ceil(f.toNumber()))},xN=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:gN;if(!Number.isFinite((t-e)/(n-1)))return{step:new hN(0),tickMin:new hN(0),tickMax:new hN(0)};var a,s=o(new hN(t).sub(e).div(n-1),r,i);a=e<=0&&t>=0?new hN(0):(a=new hN(e).add(t).div(2)).sub(new hN(a).mod(s));var l=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new hN(t).sub(a).div(s).toNumber()),u=l+c+1;return u>n?xN(e,t,n,r,i+1,o):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:s,tickMin:a.sub(new hN(l).mul(s)),tickMax:a.add(new hN(c).mul(s))})},wN=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",a=Math.max(r,2),[s,l]=vN([t,n]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),l];return t>n?c.reverse():c}if(s===l)return((e,t,n)=>{var r=new hN(1),i=new hN(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new hN(10).pow(mN(e)-1),i=new hN(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new hN(Math.floor(e)))}else 0===e?i=new hN(Math.floor((t-1)/2)):n||(i=new hN(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(i.add(new hN(l-a).mul(r)).toNumber());return s})(s,r,i);var u="snap125"===o?bN:gN,{step:d,tickMin:f,tickMax:p}=xN(s,l,a,i,0,u),h=yN(f,p.add(new hN(.1).mul(d)),d);return t>n?h.reverse():h},EN=function(e,t){var[n,r]=e,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",[a,s]=vN([n,r]);if(a===-1/0||s===1/0)return[n,r];if(a===s)return[a];var l="snap125"===o?bN:gN,c=Math.max(t,2),u=l(new hN(s).sub(a).div(c-1),i,0),d=[...yN(new hN(a),new hN(s),u),s];return!1===i&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},ON=e=>e.rootProps.maxBarSize,SN=e=>e.rootProps.barCategoryGap,kN=e=>e.rootProps.stackOffset,PN=e=>e.rootProps.reverseStackOrder,jN=e=>e.options.chartName,AN=e=>e.rootProps.syncId,TN=e=>e.rootProps.syncMethod,MN=e=>e.options.eventEmitter,CN={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},NN=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function IN(e,t,n){return"auto"!==n?n:null!=e?NP(e,t)?"category":"number":void 0}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(t){RN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LN={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},zN={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},VN=ns([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},qj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=IN(t,"angleAxis",LN.type))&&void 0!==n?n:"category";return _N(_N({},LN),{},{type:r})}),BN=ns([(e,t)=>e.polarAxis.radiusAxis[t],qj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=IN(t,"radiusAxis",zN.type))&&void 0!==n?n:"category";return _N(_N({},zN),{},{type:r})}),FN=e=>e.polarOptions,$N=ns([HP,YP,sj],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),UN=ns([FN,$N],(e,t)=>{if(null!=e)return rw(e.innerRadius,t,0)}),WN=ns([FN,$N],(e,t)=>{if(null!=e)return rw(e.outerRadius,t,.8*t)}),KN=ns([FN],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});ns([VN,KN],NN);var HN=ns([$N,UN,WN],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});ns([BN,HN],NN);var YN=ns([Kj,FN,UN,WN,HP,YP],(e,t,n,r,i,o)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:rw(a,i,i/2),cy:rw(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),qN=(e,t)=>t,GN=(e,t,n)=>n;function XN(e){return null==e?void 0:e.id}function ZN(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var s=XN(e);n.forEach((t,n)=>{var r,l=null==o||i?n:String(CP(t,o,null)),c=CP(t,e.dataKey,0);r=a.has(l)?a.get(l):{},Object.assign(r,{[s]:c}),a.set(l,r)})}}),Array.from(a.values())}function JN(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var QN=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function eI(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var tI=e=>{var t=Kj(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},nI=e=>e.tooltip.settings.axisId;function rI(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var i=e.bandwidth();switch(n.position){case"middle":r+=i/2;break;case"end":r+=i}}return r}}}}}function iI(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oI(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aI(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=iI,n=(t,n)=>iI(e(t),n),r=(t,n)=>e(t)-n):(t=e===iI||e===oI?e:sI,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function sI(){return 0}function lI(e){return null===e?NaN:+e}const cI=aI(iI).right;aI(lI).center;class uI extends Map{constructor(e,t=fI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(dI(this,e))}has(e){return super.has(dI(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function dI({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fI(e){return null!==e&&"object"==typeof e?e.valueOf():e}function pI(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const hI=Math.sqrt(50),mI=Math.sqrt(10),yI=Math.sqrt(2);function vI(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=hI?10:o>=mI?5:o>=yI?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?vI(e,t,2*n):[s,l,c]}function gI(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?vI(t,e,n):vI(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function bI(e,t,n){return vI(e=+e,t=+t,n=+n)[2]}function xI(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?bI(t,e,n):bI(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function wI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function EI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function OI(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?pI:function(e=iI){if(e===iI)return pI;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);OI(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(SI(e,n,t),i(e[r],o)>0&&SI(e,n,r);a<s;){for(SI(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?SI(e,n,s):(++s,SI(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function SI(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function kI(e,t,n=lI){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function PI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function jI(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const AI=Symbol("implicit");function TI(){var e=new uI,t=[],n=[],r=AI;function i(i){let o=e.get(i);if(void 0===o){if(r!==AI)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new uI;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return TI(t,n).unknown(r)},PI.apply(i,arguments),i}function MI(){var e,t,n=TI().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return MI(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},PI.apply(d(),arguments)}function CI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return CI(t())},e}function NI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function II(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function DI(){}var _I=.7,RI=1/_I,LI="\\s*([+-]?\\d+)\\s*",zI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",VI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",BI=/^#([0-9a-f]{3,8})$/,FI=new RegExp(`^rgb\\(${LI},${LI},${LI}\\)$`),$I=new RegExp(`^rgb\\(${VI},${VI},${VI}\\)$`),UI=new RegExp(`^rgba\\(${LI},${LI},${LI},${zI}\\)$`),WI=new RegExp(`^rgba\\(${VI},${VI},${VI},${zI}\\)$`),KI=new RegExp(`^hsl\\(${zI},${VI},${VI}\\)$`),HI=new RegExp(`^hsla\\(${zI},${VI},${VI},${zI}\\)$`),YI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function qI(){return this.rgb().formatHex()}function GI(){return this.rgb().formatRgb()}function XI(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=BI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ZI(t):3===n?new eD(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?JI(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?JI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=FI.exec(e))?new eD(t[1],t[2],t[3],1):(t=$I.exec(e))?new eD(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=UI.exec(e))?JI(t[1],t[2],t[3],t[4]):(t=WI.exec(e))?JI(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=KI.exec(e))?aD(t[1],t[2]/100,t[3]/100,1):(t=HI.exec(e))?aD(t[1],t[2]/100,t[3]/100,t[4]):YI.hasOwnProperty(e)?ZI(YI[e]):"transparent"===e?new eD(NaN,NaN,NaN,0):null}function ZI(e){return new eD(e>>16&255,e>>8&255,255&e,1)}function JI(e,t,n,r){return r<=0&&(e=t=n=NaN),new eD(e,t,n,r)}function QI(e,t,n,r){return 1===arguments.length?((i=e)instanceof DI||(i=XI(i)),i?new eD((i=i.rgb()).r,i.g,i.b,i.opacity):new eD):new eD(e,t,n,null==r?1:r);var i}function eD(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function tD(){return`#${oD(this.r)}${oD(this.g)}${oD(this.b)}`}function nD(){const e=rD(this.opacity);return`${1===e?"rgb(":"rgba("}${iD(this.r)}, ${iD(this.g)}, ${iD(this.b)}${1===e?")":`, ${e})`}`}function rD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function iD(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function oD(e){return((e=iD(e))<16?"0":"")+e.toString(16)}function aD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lD(e,t,n,r)}function sD(e){if(e instanceof lD)return new lD(e.h,e.s,e.l,e.opacity);if(e instanceof DI||(e=XI(e)),!e)return new lD;if(e instanceof lD)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new lD(a,s,l,e.opacity)}function lD(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cD(e){return(e=(e||0)%360)<0?e+360:e}function uD(e){return Math.max(0,Math.min(1,e||0))}function dD(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}NI(DI,XI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:qI,formatHex:qI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return sD(this).formatHsl()},formatRgb:GI,toString:GI}),NI(eD,QI,II(DI,{brighter(e){return e=null==e?RI:Math.pow(RI,e),new eD(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?_I:Math.pow(_I,e),new eD(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new eD(iD(this.r),iD(this.g),iD(this.b),rD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tD,formatHex:tD,formatHex8:function(){return`#${oD(this.r)}${oD(this.g)}${oD(this.b)}${oD(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:nD,toString:nD})),NI(lD,function(e,t,n,r){return 1===arguments.length?sD(e):new lD(e,t,n,null==r?1:r)},II(DI,{brighter(e){return e=null==e?RI:Math.pow(RI,e),new lD(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?_I:Math.pow(_I,e),new lD(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new eD(dD(e>=240?e-240:e+120,i,r),dD(e,i,r),dD(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new lD(cD(this.h),uD(this.s),uD(this.l),rD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rD(this.opacity);return`${1===e?"hsl(":"hsla("}${cD(this.h)}, ${100*uD(this.s)}%, ${100*uD(this.l)}%${1===e?")":`, ${e})`}`}}));var fD=e=>()=>e;function pD(e){return 1===(e=+e)?hD:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fD(isNaN(t)?n:t)}}function hD(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fD(isNaN(e)?t:e)}var mD=function e(t){var n=pD(t);function r(e,t){var r=n((e=QI(e)).r,(t=QI(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=hD(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function yD(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function vD(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=SD(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function gD(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bD(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xD(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=SD(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var wD=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ED=new RegExp(wD.source,"g");function OD(e,t){var n,r,i,o=wD.lastIndex=ED.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wD.exec(e))&&(r=ED.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:bD(n,r)})),o=ED.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function SD(e,t){var n,r=typeof t;return null==t||"boolean"===r?fD(t):("number"===r?bD:"string"===r?(n=XI(t))?(t=n,mD):OD:t instanceof XI?mD:t instanceof Date?gD:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?yD:Array.isArray(t)?vD:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?xD:bD)(e,t)}function kD(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PD(e,t){void 0===t&&(t=e,e=SD);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}function jD(e){return+e}var AD=[0,1];function TD(e){return e}function MD(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function CD(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=MD(i,r),o=n(a,o)):(r=MD(r,i),o=n(o,a)),function(e){return o(r(e))}}function ND(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=MD(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=cI(e,t,1,r)-1;return o[n](i[n](t))}}function ID(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function DD(){var e,t,n,r,i,o,a=AD,s=AD,l=SD,c=TD;function u(){var e=Math.min(a.length,s.length);return c!==TD&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?ND:CD,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),bD)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,jD),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=kD,u()},d.clamp=function(e){return arguments.length?(c=!!e||TD,u()):c!==TD},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function _D(){return DD()(TD,TD)}function RD(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function LD(e){return(e=RD(Math.abs(e)))?e[1]:NaN}var zD,VD=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BD(e){if(!(t=VD.exec(e)))throw new Error("invalid format: "+e);var t;return new FD({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function FD(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function $D(e,t){var n=RD(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}BD.prototype=FD.prototype,FD.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var UD={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$D(100*e,t),r:$D,s:function(e,t){var n=RD(e,t);if(!n)return zD=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(zD=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+RD(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function WD(e){return e}var KD,HD,YD,qD=Array.prototype.map,GD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function XD(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?WD:(t=qD.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?WD:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(qD.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=BD(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,y=e.comma,v=e.precision,g=e.trim,b=e.type;"n"===b?(y=!0,b="g"):UD[b]||(void 0===v&&(v=12),g=!0,b="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?o:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),E=UD[b],O=/[defgprs%]/.test(b);function S(e){var t,i,o,l=x,p=w;if("c"===b)p=E(e)+p,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:E(Math.abs(e),v),g&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==f&&(S=!1),l=(S?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===zD?"":GD[8+zD/3])+p+(S&&"("===f?")":""),O)for(t=-1,i=e.length;++t<i;)if(48>(o=e.charCodeAt(t))||o>57){p=(46===o?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}y&&!h&&(e=r(e,1/0));var k=l.length+e.length+p.length,P=k<m?new Array(m-k+1).join(n):"";switch(y&&h&&(e=r(P+e,P.length?m-p.length:1/0),P=""),d){case"<":e=l+e+p+P;break;case"=":e=l+P+e+p;break;case"^":e=P.slice(0,k=P.length>>1)+l+e+p+P.slice(k);break;default:e=P+l+e+p}return s(e)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(LD(t)/3))),r=Math.pow(10,-n),i=d(((e=BD(e)).type="f",e),{suffix:GD[8+n/3]});return function(e){return i(r*e)}}}}function ZD(e,t,n,r){var i,o=xI(e,t,n);switch((r=BD(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(LD(t)/3)))-LD(Math.abs(e)))}(o,a))||(r.precision=i),YD(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,LD(t)-LD(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-LD(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return HD(r)}function JD(e){var t=e.domain;return e.ticks=function(e){var n=t();return gI(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return ZD(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=bI(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function QD(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function e_(e){return Math.log(e)}function t_(e){return Math.exp(e)}function n_(e){return-Math.log(-e)}function r_(e){return-Math.exp(-e)}function i_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function o_(e){return(t,n)=>-e(-t,n)}function a_(e){const t=e(e_,t_),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?i_:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=o_(r),i=o_(i),e(n_,r_)):e(e_,t_),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=gI(a,s,p))}else h=gI(d,f,Math.min(f-d,p)).map(i);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=BD(n)).precision||(n.trim=!0),n=HD(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(QD(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function s_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function l_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function c_(e){var t=1,n=e(s_(t),l_(t));return n.constant=function(n){return arguments.length?e(s_(t=+n),l_(t)):t},JD(n)}function u_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function d_(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function f_(e){return e<0?-e*e:e*e}function p_(e){var t=e(TD,TD),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(TD,TD):.5===n?e(d_,f_):e(u_(n),u_(1/n)):n},JD(t)}function h_(){var e=p_(DD());return e.copy=function(){return ID(e,h_()).exponent(e.exponent())},PI.apply(e,arguments),e}function m_(e){return Math.sign(e)*e*e}KD=XD({thousands:",",grouping:[3],currency:["$",""]}),HD=KD.format,YD=KD.formatPrefix;const y_=new Date,v_=new Date;function g_(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>g_(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(y_.setTime(+t),v_.setTime(+r),e(y_),e(v_),Math.floor(n(y_,v_))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const b_=g_(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);b_.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?g_(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):b_:null),b_.range;const x_=1e3,w_=6e4,E_=36e5,O_=864e5,S_=6048e5,k_=2592e6,P_=31536e6,j_=g_(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*x_)},(e,t)=>(t-e)/x_,e=>e.getUTCSeconds());j_.range;const A_=g_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*x_)},(e,t)=>{e.setTime(+e+t*w_)},(e,t)=>(t-e)/w_,e=>e.getMinutes());A_.range;const T_=g_(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*w_)},(e,t)=>(t-e)/w_,e=>e.getUTCMinutes());T_.range;const M_=g_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*x_-e.getMinutes()*w_)},(e,t)=>{e.setTime(+e+t*E_)},(e,t)=>(t-e)/E_,e=>e.getHours());M_.range;const C_=g_(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*E_)},(e,t)=>(t-e)/E_,e=>e.getUTCHours());C_.range;const N_=g_(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*w_)/O_,e=>e.getDate()-1);N_.range;const I_=g_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/O_,e=>e.getUTCDate()-1);I_.range;const D_=g_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/O_,e=>Math.floor(e/O_));function __(e){return g_(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*w_)/S_)}D_.range;const R_=__(0),L_=__(1),z_=__(2),V_=__(3),B_=__(4),F_=__(5),$_=__(6);function U_(e){return g_(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/S_)}R_.range,L_.range,z_.range,V_.range,B_.range,F_.range,$_.range;const W_=U_(0),K_=U_(1),H_=U_(2),Y_=U_(3),q_=U_(4),G_=U_(5),X_=U_(6);W_.range,K_.range,H_.range,Y_.range,q_.range,G_.range,X_.range;const Z_=g_(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());Z_.range;const J_=g_(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());J_.range;const Q_=g_(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Q_.every=e=>isFinite(e=Math.floor(e))&&e>0?g_(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Q_.range;const eR=g_(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function tR(e,t,n,r,i,o){const a=[[j_,1,x_],[j_,5,5e3],[j_,15,15e3],[j_,30,3e4],[o,1,w_],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,E_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,O_],[r,2,1728e5],[n,1,S_],[t,1,k_],[t,3,7776e6],[e,1,P_]];function s(t,n,r){const i=Math.abs(n-t)/r,o=aI(([,,e])=>e).right(a,i);if(o===a.length)return e.every(xI(t/P_,n/P_,r));if(0===o)return b_.every(Math.max(xI(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}eR.every=e=>isFinite(e=Math.floor(e))&&e>0?g_(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,eR.range;const[nR,rR]=tR(eR,J_,W_,D_,C_,T_),[iR,oR]=tR(Q_,Z_,R_,N_,M_,A_);function aR(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function sR(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function lR(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var cR,uR,dR,fR={"-":"",_:" ",0:"0"},pR=/^\s*\d+/,hR=/^%/,mR=/[\\^$*+?|[\]().{}]/g;function yR(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function vR(e){return e.replace(mR,"\\$&")}function gR(e){return new RegExp("^(?:"+e.map(vR).join("|")+")","i")}function bR(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function xR(e,t,n){var r=pR.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function wR(e,t,n){var r=pR.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ER(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function OR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function SR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kR(e,t,n){var r=pR.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function PR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function jR(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function AR(e,t,n){var r=pR.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function TR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function MR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function CR(e,t,n){var r=pR.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function NR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function IR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function DR(e,t,n){var r=pR.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _R(e,t,n){var r=pR.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function RR(e,t,n){var r=pR.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LR(e,t,n){var r=hR.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zR(e,t,n){var r=pR.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function VR(e,t,n){var r=pR.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function BR(e,t){return yR(e.getDate(),t,2)}function FR(e,t){return yR(e.getHours(),t,2)}function $R(e,t){return yR(e.getHours()%12||12,t,2)}function UR(e,t){return yR(1+N_.count(Q_(e),e),t,3)}function WR(e,t){return yR(e.getMilliseconds(),t,3)}function KR(e,t){return WR(e,t)+"000"}function HR(e,t){return yR(e.getMonth()+1,t,2)}function YR(e,t){return yR(e.getMinutes(),t,2)}function qR(e,t){return yR(e.getSeconds(),t,2)}function GR(e){var t=e.getDay();return 0===t?7:t}function XR(e,t){return yR(R_.count(Q_(e)-1,e),t,2)}function ZR(e){var t=e.getDay();return t>=4||0===t?B_(e):B_.ceil(e)}function JR(e,t){return e=ZR(e),yR(B_.count(Q_(e),e)+(4===Q_(e).getDay()),t,2)}function QR(e){return e.getDay()}function eL(e,t){return yR(L_.count(Q_(e)-1,e),t,2)}function tL(e,t){return yR(e.getFullYear()%100,t,2)}function nL(e,t){return yR((e=ZR(e)).getFullYear()%100,t,2)}function rL(e,t){return yR(e.getFullYear()%1e4,t,4)}function iL(e,t){var n=e.getDay();return yR((e=n>=4||0===n?B_(e):B_.ceil(e)).getFullYear()%1e4,t,4)}function oL(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yR(t/60|0,"0",2)+yR(t%60,"0",2)}function aL(e,t){return yR(e.getUTCDate(),t,2)}function sL(e,t){return yR(e.getUTCHours(),t,2)}function lL(e,t){return yR(e.getUTCHours()%12||12,t,2)}function cL(e,t){return yR(1+I_.count(eR(e),e),t,3)}function uL(e,t){return yR(e.getUTCMilliseconds(),t,3)}function dL(e,t){return uL(e,t)+"000"}function fL(e,t){return yR(e.getUTCMonth()+1,t,2)}function pL(e,t){return yR(e.getUTCMinutes(),t,2)}function hL(e,t){return yR(e.getUTCSeconds(),t,2)}function mL(e){var t=e.getUTCDay();return 0===t?7:t}function yL(e,t){return yR(W_.count(eR(e)-1,e),t,2)}function vL(e){var t=e.getUTCDay();return t>=4||0===t?q_(e):q_.ceil(e)}function gL(e,t){return e=vL(e),yR(q_.count(eR(e),e)+(4===eR(e).getUTCDay()),t,2)}function bL(e){return e.getUTCDay()}function xL(e,t){return yR(K_.count(eR(e)-1,e),t,2)}function wL(e,t){return yR(e.getUTCFullYear()%100,t,2)}function EL(e,t){return yR((e=vL(e)).getUTCFullYear()%100,t,2)}function OL(e,t){return yR(e.getUTCFullYear()%1e4,t,4)}function SL(e,t){var n=e.getUTCDay();return yR((e=n>=4||0===n?q_(e):q_.ceil(e)).getUTCFullYear()%1e4,t,4)}function kL(){return"+0000"}function PL(){return"%"}function jL(e){return+e}function AL(e){return Math.floor(+e/1e3)}function TL(e){return new Date(e)}function ML(e){return e instanceof Date?+e:+new Date(+e)}function CL(e,t,n,r,i,o,a,s,l,c){var u=_D(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),v=c("%a %d"),g=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:o(e)<e?y:r(e)<e?i(e)<e?v:g:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,ML)):f().map(TL)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(QD(n,e)):u},u.copy=function(){return ID(u,CL(e,t,n,r,i,o,a,s,l,c))},u}function NL(){var e,t,n,r,i,o=0,a=1,s=TD,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(SD),c.rangeRound=u(kD),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function IL(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function DL(){var e=p_(NL());return e.copy=function(){return IL(e,DL()).exponent(e.exponent())},jI.apply(e,arguments)}function _L(){var e,t,n,r,i,o,a,s=0,l=.5,c=1,u=1,d=TD,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(u*e<u*t?r:i),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,d=PD(e,[n,r,i]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),n=o(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(SD),p.rangeRound=h(kD),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return o=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function RL(){var e=p_(_L());return e.copy=function(){return IL(e,RL()).exponent(e.exponent())},jI.apply(e,arguments)}!function(e){cR=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=gR(i),u=bR(i),d=gR(o),f=bR(o),p=gR(a),h=bR(a),m=gR(s),y=bR(s),v=gR(l),g=bR(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:BR,e:BR,f:KR,g:nL,G:iL,H:FR,I:$R,j:UR,L:WR,m:HR,M:YR,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:jL,s:AL,S:qR,u:GR,U:XR,V:JR,w:QR,W:eL,x:null,X:null,y:tL,Y:rL,Z:oL,"%":PL},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:aL,e:aL,f:dL,g:EL,G:SL,H:sL,I:lL,j:cL,L:uL,m:fL,M:pL,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:jL,s:AL,S:hL,u:mL,U:yL,V:gL,w:bL,W:xL,x:null,X:null,y:wL,Y:OL,Z:kL,"%":PL},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:MR,e:MR,f:RR,g:PR,G:kR,H:NR,I:NR,j:CR,L:_R,m:TR,M:IR,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:AR,Q:zR,s:VR,S:DR,u:wR,U:ER,V:OR,w:xR,W:SR,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:PR,Y:kR,Z:jR,"%":LR};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=fR[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function O(e,t){return function(n){var r,i,o=lR(1900,void 0,1);if(S(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=sR(lR(o.y,0,1))).getUTCDay(),r=i>4||0===i?K_.ceil(r):K_(r),r=I_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=aR(lR(o.y,0,1))).getDay(),r=i>4||0===i?L_.ceil(r):L_(r),r=N_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?sR(lR(o.y,0,1)).getUTCDay():aR(lR(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,sR(o)):aR(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in fR?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=O(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=O(e+="",!0);return t.toString=function(){return e},t}}}(e),uR=cR.format,cR.parse,dR=cR.utcFormat,cR.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var LL=Object.freeze({__proto__:null,scaleBand:MI,scaleDiverging:function e(){var t=JD(_L()(TD));return t.copy=function(){return IL(t,e())},jI.apply(t,arguments)},scaleDivergingLog:function e(){var t=a_(_L()).domain([.1,1,10]);return t.copy=function(){return IL(t,e()).base(t.base())},jI.apply(t,arguments)},scaleDivergingPow:RL,scaleDivergingSqrt:function(){return RL.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=c_(_L());return t.copy=function(){return IL(t,e()).constant(t.constant())},jI.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,jD),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,jD):[0,1],JD(r)},scaleImplicit:AI,scaleLinear:function e(){var t=_D();return t.copy=function(){return ID(t,e())},PI.apply(t,arguments),JD(t)},scaleLog:function e(){const t=a_(DD()).domain([1,10]);return t.copy=()=>ID(t,e()).base(t.base()),PI.apply(t,arguments),t},scaleOrdinal:TI,scalePoint:function(){return CI(MI.apply(null,arguments).paddingInner(1))},scalePow:h_,scaleQuantile:function e(){var t,n=[],r=[],i=[];function o(){var e=0,t=Math.max(1,r.length);for(i=new Array(t-1);++e<t;)i[e-1]=kI(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[cI(i,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:n[0],t<i.length?i[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(iI),o()},a.range=function(e){return arguments.length?(r=Array.from(e),o()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},PI.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,i=1,o=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[cI(o,e,0,i)]:t}function l(){var e=-1;for(o=new Array(i);++e<i;)o[e]=((e+1)*r-(e-i)*n)/(i+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(i=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,o[0]]:t>=i?[o[i-1],r]:[o[t-1],o[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},PI.apply(JD(s),arguments)},scaleRadial:function e(){var t,n=_D(),r=[0,1],i=!1;function o(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:i?Math.round(r):r}return o.invert=function(e){return n.invert(m_(e))},o.domain=function(e){return arguments.length?(n.domain(e),o):n.domain()},o.range=function(e){return arguments.length?(n.range((r=Array.from(e,jD)).map(m_)),o):r.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(i=!!e,o):i},o.clamp=function(e){return arguments.length?(n.clamp(e),o):n.clamp()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e(n.domain(),r).round(i).clamp(n.clamp()).unknown(t)},PI.apply(o,arguments),JD(o)},scaleSequential:function e(){var t=JD(NL()(TD));return t.copy=function(){return IL(t,e())},jI.apply(t,arguments)},scaleSequentialLog:function e(){var t=a_(NL()).domain([1,10]);return t.copy=function(){return IL(t,e()).base(t.base())},jI.apply(t,arguments)},scaleSequentialPow:DL,scaleSequentialQuantile:function e(){var t=[],n=TD;function r(e){if(null!=e&&!isNaN(e=+e))return n((cI(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(iI),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return EI(e);if(t>=1)return wI(e);var n,r=(n-1)*t,i=Math.floor(r),o=wI(OI(e,i).subarray(0,i+1));return o+(EI(e.subarray(i+1))-o)*(r-i)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},jI.apply(r,arguments)},scaleSequentialSqrt:function(){return DL.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=c_(NL());return t.copy=function(){return IL(t,e()).constant(t.constant())},jI.apply(t,arguments)},scaleSqrt:function(){return h_.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=c_(DD());return t.copy=function(){return ID(t,e()).constant(t.constant())},PI.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],i=1;function o(e){return null!=e&&e<=e?r[cI(n,e,0,i)]:t}return o.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(n).range(r).unknown(t)},PI.apply(o,arguments)},scaleTime:function(){return PI.apply(CL(iR,oR,Q_,Z_,R_,N_,M_,A_,j_,uR).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return PI.apply(CL(nR,rR,eR,J_,W_,I_,C_,T_,j_,dR).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:ZD});function zL(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=LL;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(lw(e));return n in t&&"function"==typeof t[n]?t[n]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function VL(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?zL(e.scale,n,r):zL(t,n,r)}function BL(e){return function(e){return"scale".concat(lw(e))}(e)in LL}var FL=(e,t,n)=>{if(null!=e){var{scale:r,type:i}=e;return"auto"===r?"category"===i&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear":"string"==typeof r?BL(r)?r:"point":void 0}};function $L(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),i=e.range();if(!(0===n.length||i.length<2))return e=>{var t,i,o=function(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}(r,e);if(o<=0)return n[0];if(o>=n.length)return n[n.length-1];var a=null!==(t=r[o-1])&&void 0!==t?t:0,s=null!==(i=r[o])&&void 0!==i?i:0;return Math.abs(e-a)<=Math.abs(e-s)?n[o-1]:n[o]}}}function UL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UL(Object(n),!0).forEach(function(t){KL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HL=[0,"auto"],YL={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},qL=(e,t)=>e.cartesianAxis.xAxis[t],GL=(e,t)=>{var n=qL(e,t);return null==n?YL:n},XL={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:HL,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},ZL=(e,t)=>e.cartesianAxis.yAxis[t],JL=(e,t)=>{var n=ZL(e,t);return null==n?XL:n},QL={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ez=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?QL:n},tz=(e,t,n)=>{switch(t){case"xAxis":return GL(e,n);case"yAxis":return JL(e,n);case"zAxis":return ez(e,n);case"angleAxis":return VN(e,n);case"radiusAxis":return BN(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},nz=(e,t,n)=>{switch(t){case"xAxis":return GL(e,n);case"yAxis":return JL(e,n);case"angleAxis":return VN(e,n);case"radiusAxis":return BN(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rz=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function iz(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var oz=e=>e.graphicalItems.cartesianItems,az=ns([qN,GN],iz),sz=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),lz=ns([oz,tz,az],sz,{memoizeOptions:{resultEqualityCheck:eI}}),cz=ns([lz],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(JN)),uz=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),dz=ns([lz],uz),fz=e=>e.map(e=>e.data).filter(Boolean).flat(1),pz=ns([lz],e=>e.some(e=>!e.data)),hz=ns([lz],fz,{memoizeOptions:{resultEqualityCheck:eI}}),mz=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},yz=ns([hz,NC],mz),vz=(e,t,n,r,i,o)=>{var{chartData:a=[],dataStartIndex:s,dataEndIndex:l}=r,c=((e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:CP(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:CP(e,t)}))):e.map(e=>({value:e})))(e,t,n);return i&&null!=(null==t?void 0:t.dataKey)&&o.length>0?[...a.slice(s,l+1).map(e=>({value:CP(e,t.dataKey)})).filter(e=>null!=e.value),...c]:c},gz=ns([yz,tz,lz,NC,pz,hz],vz);function bz(e){if(ew(e)||e instanceof Date){var t=Number(e);if(PP(t))return t}}function xz(e){if(Array.isArray(e)){var t=[bz(e[0]),bz(e[1])];return RC(t)?t:void 0}var n=bz(e);if(null!=n)return[n,n]}function wz(e){return e.map(bz).filter(cw)}function Ez(e,t){var n=bz(e),r=bz(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var Oz=ns([gz],e=>null==e?void 0:e.map(e=>e.value).sort(Ez));function Sz(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var kz=e=>{var t=tI(e),n=nI(e);return nz(e,t,n)},Pz=ns([kz],e=>null==e?void 0:e.dataKey),jz=ns([cz,NC,kz],ZN),Az=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,o]=t,a=r?[...o].reverse():o,s=a.map(XN);return[i,{stackedData:RP(e,s,n),graphicalItems:a}]}))},Tz=ns([jz,cz,kN,PN],Az),Mz=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(null==r&&"zAxis"!==n){var a=BP(e,i,o);if(null==a||0!==a[0]||0!==a[1])return a}},Cz=ns([tz],e=>e.allowDataOverflow),Nz=e=>{var t;if(null==e||!("domain"in e))return HL;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=wz(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:HL},Iz=ns([tz],Nz),Dz=ns([Iz,Cz],zC),_z=ns([Tz,MC,qN,Dz],Mz,{memoizeOptions:{resultEqualityCheck:QN}}),Rz=e=>e.errorBars,Lz=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},zz=function(e,t,n,r,i){var o,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(n.length>0&&n.forEach(e=>{var n,l=null!=e.data?[...e.data]:s,c=null===(n=r[e.id])||void 0===n?void 0:n.filter(e=>Sz(i,e));l.forEach(n=>{var r,i=CP(n,null!==(r=t.dataKey)&&void 0!==r?r:e.dataKey),s=function(e,t,n){if(!n)return[];if(!n.length)return[];var r;if("number"!=typeof t||Zx(t)){if(Array.isArray(t)){var i=wz(t);i.length>0&&(r=Math.max(...i))}}else r=t;return null==r?[]:wz(n.flatMap(t=>{var n,i,o=CP(e,t.dataKey);if(Array.isArray(o)?[n,i]=o:n=i=o,PP(n)&&PP(i))return[r-n,r+i]}))}(n,i,c);if(s.length>=2){var l=Math.min(...s),u=Math.max(...s);(null==o||l<o)&&(o=l),(null==a||u>a)&&(a=u)}var d=xz(i);null!=d&&(o=null==o?d[0]:Math.min(o,d[0]),a=null==a?d[1]:Math.max(a,d[1]))})}),null!=(null==t?void 0:t.dataKey)&&0===n.length&&e.forEach(e=>{var n=xz(CP(e,t.dataKey));null!=n&&(o=null==o?n[0]:Math.min(o,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),PP(o)&&PP(a))return[o,a]},Vz=ns([yz,tz,dz,Rz,qN,DC],zz,{memoizeOptions:{resultEqualityCheck:QN}});function Bz(e){var{value:t}=e;if(ew(t)||t instanceof Date)return t}var Fz=e=>e.referenceElements.dots,$z=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),Uz=ns([Fz,qN,GN],$z),Wz=e=>e.referenceElements.areas,Kz=ns([Wz,qN,GN],$z),Hz=e=>e.referenceElements.lines,Yz=ns([Hz,qN,GN],$z),qz=(e,t)=>{if(null!=e){var n=wz(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},Gz=ns(Uz,qN,qz),Xz=(e,t)=>{if(null!=e){var n=wz(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},Zz=ns([Kz,qN],Xz);var Jz=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return wz([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:wz(n)}(e):function(e){var t;if(null!=e.y)return wz([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:wz(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},Qz=ns([Yz,qN],Jz),eV=ns(Gz,Qz,Zz,(e,t,n)=>Lz(e,n,t)),tV=(e,t,n,r,i,o,a,s)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(RC(r))return LC(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var i,o,[a,s]=e;if("auto"===a)null!=t&&(i=Math.min(...t));else if(Qx(a))i=a;else if("function"==typeof a)try{null!=t&&(i=a(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof a&&FP.test(a)){var l=FP.exec(a);if(null==l||null==l[1]||null==t)i=void 0;else{var c=+l[1];i=t[0]-c}}else i=null==t?void 0:t[0];if("auto"===s)null!=t&&(o=Math.max(...t));else if(Qx(s))o=s;else if("function"==typeof s)try{null!=t&&(o=s(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof s&&$P.test(s)){var u=$P.exec(s);if(null==u||null==u[1]||null==t)o=void 0;else{var d=+u[1];o=t[1]+d}}else o=null==t?void 0:t[1];var f=[i,o];if(RC(f))return null==t?f:LC(f,t,n)}}}(t,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?Lz(r,o,i):Lz(o,i),e.allowDataOverflow),nV=ns([tz,Iz,Dz,_z,Vz,eV,Kj,qN],tV,{memoizeOptions:{resultEqualityCheck:QN}}),rV=[0,1],iV=(e,t,n,r,i,o,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:l,type:c}=e,u=NP(t,o);return u&&null==l?TC(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===c?((e,t,n)=>{var r=e.map(Bz).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&iw(r))?TC(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==i||u?a:rV}},oV=ns([tz,Kj,yz,gz,kN,qN,nV],iV),aV=ns([tz,rz,jN],FL),sV=(e,t,n)=>{var{niceTicks:r}=t;if("none"!==r){var i=Nz(t),o=Array.isArray(i)&&("auto"===i[0]||"auto"===i[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&RC(e)){if(o)return wN(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return EN(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(o&&RC(e))return wN(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&RC(e))return EN(e,t.tickCount,t.allowDecimals,"adaptive")}}},lV=ns([oV,nz,aV],sV),cV=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&RC(t)&&Array.isArray(n)&&n.length>0){var i,o,a=t[0],s=null!==(i=n[0])&&void 0!==i?i:0,l=t[1],c=null!==(o=n[n.length-1])&&void 0!==o?o:0;return[Math.min(a,s),Math.max(l,c)]}return t},uV=ns([tz,oV,lV,qN],cV),dV=ns(gz,tz,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(wz(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],o=r[r.length-1];if(null==i||null==o)return 1/0;var a=o-i;if(0===a)return 1/0;for(var s=0;s<r.length-1;s++){var l=r[s],c=r[s+1];if(null!=l&&null!=c){var u=c-l;n=Math.min(n,u)}}return n/a}}),fV=ns(dV,Kj,SN,sj,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!PP(e))return 0;var o="vertical"===t?r.height:r.width;if("gap"===i)return e*o/2;if("no-gap"===i){var a=rw(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),pV=ns(GL,(e,t,n)=>{var r=GL(e,t);return null==r||"string"!=typeof r.padding?0:fV(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+t,right:(null!==(r=i.right)&&void 0!==r?r:0)+t}}),hV=ns(JL,(e,t,n)=>{var r=JL(e,t);return null==r||"string"!=typeof r.padding?0:fV(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+t}}),mV=ns([sj,pV,pj,fj,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),yV=ns([sj,Kj,hV,pj,fj,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),vV=(e,t,n,r)=>{var i;switch(t){case"xAxis":return mV(e,n,r);case"yAxis":return yV(e,n,r);case"zAxis":return null===(i=ez(e,n))||void 0===i?void 0:i.range;case"angleAxis":return KN(e);case"radiusAxis":return HN(e,n);default:return}},gV=ns([tz,vV],NN),bV=ns([aV,uV],(e,t)=>{if(null!=t){if("linear"===e){if(!RC(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];PP(o)&&((void 0===n||o<n)&&(n=o),(void 0===r||o>r)&&(r=o))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}}),xV=ns([tz,aV,bV,gV],VL),wV=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:o}=n;return!NP(e,r)||"number"!==i&&"auto"===o?void 0:t.map(e=>e.value)}},EV=ns([Kj,gz,nz,qN],wV),OV=ns([xV],rI);function SV(e,t){return e.id<t.id?-1:e.id>t.id?1:0}ns([xV],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):$L(e,void 0)}),ns([xV,Oz],$L),ns([lz,Rz,qN],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>Sz(n,e)));var kV=(e,t)=>t,PV=(e,t,n)=>n,jV=ns(XP,kV,PV,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(SV)),AV=ns(ZP,kV,PV,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(SV)),TV=(e,t)=>({width:e.width,height:t.height}),MV=ns(sj,GL,TV),CV=ns(YP,sj,jV,kV,PV,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=TV(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!i||"bottom"===r&&i;a[n.id]=o-Number(l)*s.height,o+=(l?-1:1)*s.height}),a}),NV=ns(HP,sj,AV,kV,PV,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!i||"right"===r&&i;a[n.id]=o-Number(l)*s.width,o+=(l?-1:1)*s.width}),a}),IV=ns([sj,GL,(e,t)=>{var n=GL(e,t);if(null!=n)return CV(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),DV=ns([sj,JL,(e,t)=>{var n=JL(e,t);if(null!=n)return NV(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),_V=ns(sj,JL,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),RV=(e,t,n)=>{switch(t){case"xAxis":return MV(e,n).width;case"yAxis":return _V(e,n).height;default:return}},LV=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=NP(e,r),l=t.map(e=>e.value),c=l.filter(e=>null!=e);return a&&s&&"category"===o&&i&&iw(c)?l:void 0}},zV=ns([Kj,gz,tz,qN],LV),VV=ns([Kj,(e,t,n)=>{switch(t){case"xAxis":return GL(e,n);case"yAxis":return JL(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},aV,OV,zV,EV,vV,lV,qN],(e,t,n,r,i,o,a,s,l)=>{if(null!=t){var c=NP(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}}),BV=ns([Kj,nz,aV,OV,lV,vV,zV,EV,qN],(e,t,n,r,i,o,a,s,l)=>{if(null!=t&&null!=r){var c=NP(e,l),{type:u,ticks:d,tickCount:f}=t,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,h="category"===u&&r.bandwidth?r.bandwidth()/p:0;h="angleAxis"===l&&null!=o&&o.length>=2?2*Xx(o[0]-o[1])*h:h;var m=d||i;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,i=r.map(n);return PP(i)?{index:t,coordinate:i+h,value:e,offset:h}:null}).filter(cw):c&&s?s.map((e,t)=>{var n=r.map(e);return PP(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(cw):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return PP(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(cw):r.domain().map((e,t)=>{var n=r.map(e);return PP(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(cw)}}),FV=ns([Kj,nz,OV,vV,zV,EV,qN],(e,t,n,r,i,o,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=NP(e,a),{tickCount:l}=t,c=0;return c="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Xx(r[0]-r[1])*c:c,s&&o?o.map((e,t)=>{var r=n.map(e);return PP(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(cw):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return PP(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(cw):n.domain().map((e,t)=>{var r=n.map(e);return PP(r)?{coordinate:r+c,value:i?i[e]:e,index:t,offset:c}:null}).filter(cw)}}),$V=ns(tz,OV,(e,t)=>{if(null!=e&&null!=t)return WL(WL({},e),{},{scale:t})}),UV=ns([tz,aV,oV,gV],VL),WV=ns([UV],rI),KV=ns((e,t,n)=>ez(e,n),WV,(e,t)=>{if(null!=e&&null!=t)return WL(WL({},e),{},{scale:t})}),HV=ns([Kj,XP,ZP],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}});ns([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,i=e[0];for(var o of e){var a=Math.abs(o.coordinate-t);a<r&&(r=a,i=o)}return null===(n=i)||void 0===n?void 0:n.value}});var YV=e=>e.options.defaultTooltipEventType,qV=e=>e.options.validateTooltipEventTypes;function GV(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function XV(e,t){return GV(t,YV(e),qV(e))}var ZV=(e,t)=>{var n,r=Number(t);if(!Zx(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},JV={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},QV=Vk({name:"tooltip",initialState:{itemInteraction:{click:JV,hover:JV},axisInteraction:{click:JV,hover:JV},keyboardInteraction:JV,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Tk()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ok(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:Tk()},removeTooltipEntrySettings:{reducer(e,t){var n=ok(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Tk()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:eB,replaceTooltipEntrySettings:tB,removeTooltipEntrySettings:nB,setTooltipSettingsState:rB,setActiveMouseOverItemIndex:iB,mouseLeaveItem:oB,mouseLeaveChart:aB,setActiveClickItemIndex:sB,setMouseOverAxisIndex:lB,setMouseClickAxisIndex:cB,setSyncInteraction:uB,setKeyboardInteraction:dB}=QV.actions,fB=QV.reducer;function pB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pB(Object(n),!0).forEach(function(t){mB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mB(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yB=(e,t,n,r)=>{if(null==t)return JV;var i=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==i)return JV;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var o=!0===e.settings.active;if(null!=i.index){if(o)return hB(hB({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return hB(hB({},JV),{},{coordinate:i.coordinate})};function vB(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],i=t[1];if(void 0===n)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}var gB=(e,t,n,r)=>{var i=null==e?void 0:e.index;if(null==i)return null;var o=Number(i);if(!PP(o))return i;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(o,a)),l=t[s];return null==l||function(e,t,n){if(null==n||null==t)return!0;var r=CP(e,t);return null==r||!RC(n)||vB(r,n)}(l,n,r)?String(s):null},bB=(e,t,n,r,i,o,a)=>{if(null!=o){var s=a[0],l=null==s?void 0:s.getPosition(o);if(null!=l)return l;var c=null==i?void 0:i[Number(o)];if(c)return"horizontal"===n?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},xB=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var i;if(i="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==i)return e.tooltipItemPayloads;if(null==i&&(null!=r||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return null!=o?[o]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})},wB=e=>e.options.tooltipPayloadSearcher,EB=e=>e.tooltip;function OB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OB(Object(n),!0).forEach(function(t){kB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kB(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PB(e){if("string"==typeof e)return e}var jB=(e,t,n,r,i,o,a)=>{if(null!=t&&null!=o){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,f,p,{dataDefinedOnItem:h,settings:m}=n,y=function(e,t){return null!=e?e:t}(h,s),v=Array.isArray(y)?kP(y,c,u):y,g=null!==(d=null==m?void 0:m.dataKey)&&void 0!==d?d:r,b=null==m?void 0:m.nameKey;(f=r&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===a?aw(v,r,i):o(v,t,l,b),Array.isArray(f))?f.forEach(t=>{var n,r,i=function(e){if(null!=e&&"object"==typeof e){var t,n="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,r="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0;return{name:n,unit:r,dataKey:"dataKey"in e?"string"==typeof(t=e.dataKey)||"number"==typeof t?t:"function"==typeof t?e=>t(e):void 0:void 0,payload:"payload"in e?e.payload:void 0,color:"color"in e?PB(e.color):void 0,fill:"fill"in e?PB(e.fill):void 0}}}(t),o=null==i?void 0:i.name,a=null==i?void 0:i.dataKey,s=null==i?void 0:i.payload,l=SB(SB({},m),{},{name:o,unit:null==i?void 0:i.unit,color:null!==(n=null==i?void 0:i.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==i?void 0:i.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push(WP({tooltipEntrySettings:l,dataKey:a,payload:s,value:CP(s,a),name:null==o?void 0:String(o)}))}):e.push(WP({tooltipEntrySettings:m,dataKey:g,payload:f,value:CP(f,g),name:null!==(p=CP(f,b))&&void 0!==p?p:null==m?void 0:m.name}));return e},[])}},AB=ns([kz,rz,jN],FL),TB=ns([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),MB=ns([tI,nI],iz),CB=ns([TB,kz,MB],sz,{memoizeOptions:{resultEqualityCheck:eI}}),NB=ns([CB],e=>e.filter(JN)),IB=ns([CB],fz,{memoizeOptions:{resultEqualityCheck:eI}}),DB=ns([CB],e=>e.some(e=>!e.data)),_B=ns([IB,MC],mz),RB=ns([NB,MC,kz],ZN),LB=ns([_B,kz,CB,MC,DB,IB],vz),zB=ns([kz],Nz),VB=ns([kz],e=>e.allowDataOverflow),BB=ns([zB,VB],zC),FB=ns([CB],e=>e.filter(JN)),$B=ns([RB,FB,kN,PN],Az),UB=ns([$B,MC,tI,BB],Mz),WB=ns([CB],uz),KB=ns([_B,kz,WB,Rz,tI,_C],zz,{memoizeOptions:{resultEqualityCheck:QN}}),HB=ns([Fz,tI,nI],$z),YB=ns([HB,tI],qz),qB=ns([Wz,tI,nI],$z),GB=ns([qB,tI],Xz),XB=ns([Hz,tI,nI],$z),ZB=ns([XB,tI],Jz),JB=ns([YB,ZB,GB],Lz),QB=ns([kz,zB,BB,UB,KB,JB,Kj,tI],tV),eF=ns([kz,Kj,_B,LB,kN,tI,QB],iV),tF=ns([eF,kz,AB],sV),nF=ns([kz,eF,tF,tI],cV),rF=e=>{var t=tI(e),n=nI(e);return vV(e,t,n,!1)},iF=ns([kz,rF],NN),oF=ns([kz,AB,nF,iF],VL),aF=ns([oF],rI),sF=ns([Kj,LB,kz,tI],LV),lF=ns([Kj,LB,kz,tI],wV),cF=ns([Kj,kz,AB,aF,rF,sF,lF,tI],(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=NP(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*Xx(i[0]-i[1])*d:d,c&&a?a.map((e,t)=>{var n=r.map(e);return PP(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(cw):r.domain().map((e,t)=>{var n=r.map(e);return PP(n)?{coordinate:n+d,value:o?o[e]:e,index:t,offset:d}:null}).filter(cw)}}}),uF=ns([YV,qV,e=>e.tooltip.settings],(e,t,n)=>GV(n.shared,e,t)),dF=e=>e.tooltip.settings.trigger,fF=e=>e.tooltip.settings.defaultIndex,pF=ns([EB,uF,dF,fF],yB),hF=ns([pF,_B,Pz,eF],gB),mF=ns([cF,hF],ZV),yF=ns([pF],e=>{if(e)return e.dataKey}),vF=ns([pF],e=>{if(e)return e.graphicalItemId}),gF=ns([EB,uF,dF,fF],xB),bF=ns([HP,YP,Kj,sj,cF,fF,gF],bB),xF=ns([pF,bF],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),wF=ns([pF],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),EF=ns([gF,hF,MC,Pz,mF,wB,uF],jB),OF=ns([EF],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function SF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SF(Object(n),!0).forEach(function(t){PF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jF=()=>{var e=dO(kz),t=dO(cF),n=dO(aF);return UP(e&&n?kF(kF({},e),{},{scale:n}):void 0,t)};function AF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AF(Object(n),!0).forEach(function(t){MF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CF=(e,t,n,r,i)=>{var o,a=null!==(o=null==t?void 0:t.length)&&void 0!==o?o:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<a;s++){var l,c,u,d,f,p=s>0?null===(l=n[s-1])||void 0===l?void 0:l.coordinate:null===(c=n[a-1])||void 0===c?void 0:c.coordinate,h=null===(u=n[s])||void 0===u?void 0:u.coordinate,m=s>=a-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(f=n[s+1])||void 0===f?void 0:f.coordinate,y=void 0;if(null!=p&&null!=h&&null!=m)if(Xx(h-p)!==Xx(m-h)){var v=[];if(Xx(m-h)===Xx(i[1]-i[0])){y=m;var g=h+i[1]-i[0];v[0]=Math.min(g,(g+p)/2),v[1]=Math.max(g,(g+p)/2)}else{y=p;var b=m+i[1]-i[0];v[0]=Math.min(h,(b+h)/2),v[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(y+h)/2),Math.max(h,(y+h)/2)];if(e>w[0]&&e<=w[1]||e>=v[0]&&e<=v[1])return null===(x=n[s])||void 0===x?void 0:x.index}else{var E,O=Math.min(p,m),S=Math.max(p,m);if(e>(O+h)/2&&e<=(S+h)/2)return null===(E=n[s])||void 0===E?void 0:E.index}}else if(t)for(var k=0;k<a;k++){var P=t[k];if(null!=P){var j=t[k+1],A=t[k-1];if(0===k&&null!=j&&e<=(P.coordinate+j.coordinate)/2)return P.index;if(k===a-1&&null!=A&&e>(P.coordinate+A.coordinate)/2)return P.index;if(k>0&&k<a-1&&null!=A&&null!=j&&e>(P.coordinate+A.coordinate)/2&&e<=(P.coordinate+j.coordinate)/2)return P.index}}return-1},NF=()=>dO(jN),IF=(e,t)=>t,DF=(e,t,n)=>n,_F=(e,t,n,r)=>r,RF=ns(cF,e=>RO(e,e=>e.coordinate)),LF=ns([EB,IF,DF,_F],yB),zF=ns([LF,_B,Pz,eF],gB),VF=ns([EB,IF,DF,_F],xB),BF=ns([HP,YP,Kj,sj,cF,_F,VF],bB),FF=ns([LF,BF],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),$F=ns([cF,zF],ZV),UF=ns([VF,zF,MC,Pz,$F,wB,IF],jB),WF=ns([LF,zF],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),KF=(e,t,n,r,i,o,a)=>{if(e&&r&&i&&o&&n){var s=lC(e,n);if(s){var l=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),c=CF(l,a,o,r,i),u=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("centric"===e){var o=i.coordinate,{radius:a}=r;return TF(TF(TF({},r),oC(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return TF(TF(TF({},r),oC(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,o,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},HF=ns(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),YF=ns(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(CN));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function qF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qF(Object(n),!0).forEach(function(t){XF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZF={zIndexMap:Object.values(CN).reduce((e,t)=>GF(GF({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},JF=new Set(Object.values(CN));var QF=Vk({name:"zIndex",initialState:ZF,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Tk()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return JF.has(e)}(n)&&delete e.zIndexMap[n])},prepare:Tk()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:Tk()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Tk()}}}),{registerZIndexPortal:e$,unregisterZIndexPortal:t$,registerZIndexPortalElement:n$,unregisterZIndexPortalElement:r$}=QF.actions,i$=QF.reducer;function o$(e){var{zIndex:t,children:n}=e,i=void 0!==Hj()&&void 0!==t&&0!==t,o=dj(),a=s(void 0),l=s(new Set),c=sO(),u=dO(e=>HF(e,t,o));if(r(()=>{if(!i){var e=l.current;return e.forEach(e=>{c(t$({zIndex:e}))}),e.clear(),void(a.current=void 0)}if(l.current.has(t)||(c(e$({zIndex:t})),l.current.add(t)),u){a.current=u;var n=l.current;n.forEach(e=>{e!==t&&(c(t$({zIndex:e})),n.delete(e))})}},[c,t,i,u]),r(()=>{var e=l.current;return()=>{e.forEach(e=>{c(t$({zIndex:e}))}),e.clear()}},[c]),!i)return n;var d=null!=u?u:a.current;return d?O(n,d):null}function a$(){return a$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a$.apply(null,arguments)}function s$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s$(Object(n),!0).forEach(function(t){c$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u$(e){var{cursor:t,cursorComp:r,cursorProps:i}=e;return h(t)?b(t,i):n(r,i)}function d$(t){var n,r,i,o,{coordinate:a,payload:s,index:l,offset:c,tooltipAxisBandSize:u,layout:d,cursor:f,tooltipEventType:p,chartName:h}=t,m=a,y=s,v=l;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)r=m,i=XT,o=CN.cursorLine;else if("BarChart"===h)r=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,c,u),i=HM,o=CN.cursorRectangle;else if("radial"===d&&bw(m)){var{cx:g,cy:b,radius:x,startAngle:w,endAngle:E}=cC(m);r={cx:g,cy:b,startAngle:w,endAngle:E,innerRadius:x,outerRadius:x},i=mC,o=CN.cursorLine}else r={points:yC(d,m,c)},i=WT,o=CN.cursorLine;var O="object"==typeof f&&"className"in f?f.className:void 0,S=l$(l$(l$(l$({stroke:"#ccc",pointerEvents:"none"},c),r),pb(f)),{},{payload:y,payloadIndex:v,className:de("recharts-tooltip-cursor",O)});return e.createElement(o$,{zIndex:null!==(n=t.zIndex)&&void 0!==n?n:o},e.createElement(u$,{cursor:f,cursorComp:i,cursorProps:S}))}function f$(t){var n=jF(),r=$j(),i=Hj(),o=NF();return null==n||null==r||null==i||null==o?null:e.createElement(d$,a$({},t,{offset:r,layout:i,tooltipAxisBandSize:n,chartName:o}))}var p$,h$=o(null),m$={exports:{}};var y$=(p$||(p$=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(m$)),m$.exports),v$=new(S(y$)),g$="recharts.syncEvent.tooltip",b$="recharts.syncEvent.brush",x$=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Zx(n))return e[n]}},w$=Vk({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),E$=w$.reducer,{createEventEmitter:O$}=w$.actions;function S$(e){return e.tooltip.syncInteraction}var k$=Vk({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:P$,setDataStartEndIndexes:j$,setComputedData:A$}=k$.actions,T$=k$.reducer,M$=["x","y"];function C$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C$(Object(n),!0).forEach(function(t){I$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D$(){var e=dO(AN),t=dO(MN),n=sO(),r=dO(TN),i=dO(cF),o=Hj(),a=Bj(),s=dO(e=>e.rootProps.className);l(()=>{if(null==e)return uw;var s=(s,l,c)=>{var u;if(t!==c&&e===s)if(!1!==l.payload.active)if("index"!==r){if(null!=i){var d;if("function"==typeof r){var f={activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate},p=r(i,f);d=i[p]}else"value"===r&&(d=i.find(e=>String(e.value)===l.payload.label));var{coordinate:h}=l.payload;if(null!=h&&null!=a)if(null!=d){var{x:m,y:y}=h,v=Math.min(m,a.x+a.width),g=Math.min(y,a.y+a.height),b={x:"horizontal"===o?d.coordinate:v,y:"horizontal"===o?g:d.coordinate},x=uB({active:l.payload.active,coordinate:b,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId});n(x)}else n(uB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));else n(uB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(a&&null!=l&&null!==(u=l.payload)&&void 0!==u&&u.coordinate&&l.payload.sourceViewBox){var w=l.payload.coordinate,{x:E,y:O}=w,S=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(w,M$),{x:k,y:P,width:j,height:A}=l.payload.sourceViewBox,T=N$(N$({},S),{},{x:a.x+(j?(E-k)/j:0)*a.width,y:a.y+(A?(O-P)/A:0)*a.height});n(N$(N$({},l),{},{payload:N$(N$({},l.payload),{},{coordinate:T})}))}else n(l);else n(uB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return v$.on(g$,s),()=>{v$.off(g$,s)}},[s,n,t,e,r,i,o,a])}function _$(){var e=sO();l(()=>{e(O$())},[e]),D$(),function(){var e=dO(AN),t=dO(MN),n=sO();l(()=>{if(null==e)return uw;var r=(r,i,o)=>{t!==o&&e===r&&n(j$(i))};return v$.on(b$,r),()=>{v$.off(b$,r)}},[n,t,e])}()}function R$(e,t,n,r,i,o){var a=dO(n=>((e,t,n)=>{if(null!=t){var r=EB(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),s=dO(vF),c=dO(MN),u=dO(AN),d=dO(TN),f=dO(S$),p=null!=(null==f?void 0:f.sourceViewBox),h=Bj();l(()=>{if(!p&&null!=u&&null!=c){var e=uB({active:o,coordinate:n,dataKey:a,index:i,label:"number"==typeof r?String(r):r,sourceViewBox:h,graphicalItemId:s});v$.emit(g$,u,e,c)}},[p,n,a,s,i,r,c,u,d,o,h])}function L$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L$(Object(n),!0).forEach(function(t){V$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(e){return e.dataKey}var F$=[],$$={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function U$(t){var n,r,o=Sw(t,$$),{active:a,allowEscapeViewBox:s,animationDuration:c,animationEasing:u,content:d,filterNull:p,isAnimationActive:h,offset:y,payloadUniqBy:v,position:g,reverseDirection:b,useTranslate3d:x,wrapperStyle:w,cursor:E,shared:S,trigger:k,defaultIndex:P,portal:j,axisId:A}=o,T=sO(),M="number"==typeof P?String(P):P;l(()=>{T(rB({shared:S,trigger:k,axisId:A,active:a,defaultIndex:M}))},[T,S,k,A,a,M]);var C=Bj(),N=NT(),I=function(e){return dO(t=>XV(t,e))}(S),{activeIndex:D,isActive:_}=null!==(n=dO(e=>WF(e,I,k,M)))&&void 0!==n?n:{},R=dO(e=>UF(e,I,k,M)),L=dO(e=>$F(e,I,k,M)),z=dO(e=>FF(e,I,k,M)),V=R,B=i(h$),F=null!==(r=null!=a?a:_)&&void 0!==r&&r,[$,U]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,n]=m({height:0,left:0,top:0,width:0}),r=f(e=>{if(null!=e){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}([V,F]),W="axis"===I?L:void 0;R$(I,k,z,W,D,F);var K=null!=j?j:B;if(null==K||null==C||null==I)return null;var H=null!=V?V:F$;F||(H=F$),p&&H.length&&(H=function(e,t,n){return!0===t?iO(e,n):"function"==typeof t?iO(e,t):e}(H.filter(e=>null!=e.value&&(!0!==e.hide||o.includeHidden)),v,B$));var Y=H.length>0,q=z$(z$({},o),{},{payload:H,label:W,active:F,activeIndex:D,coordinate:z,accessibilityLayer:N}),G=e.createElement(CT,{allowEscapeViewBox:s,animationDuration:c,animationEasing:u,isAnimationActive:h,active:F,coordinate:z,hasPayload:Y,offset:y,position:g,reverseDirection:b,useTranslate3d:x,viewBox:C,wrapperStyle:w,lastBoundingBox:$,innerRef:U,hasPortalFromProps:Boolean(j)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):"function"==typeof t?e.createElement(t,n):e.createElement(bT,n)}(d,q));return e.createElement(e.Fragment,null,O(G,K),F&&e.createElement(f$,{cursor:E,tooltipEventType:I,coordinate:z,payload:H,index:D}))}var W$=e=>null;function K$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}W$.displayName="Cell";function H$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q$=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H$(Object(n),!0).forEach(function(t){Y$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),G$=new class{constructor(e){K$(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(q$.cacheSize),X$={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Z$="recharts_measurement_span";var J$=(e,t)=>{try{var n=document.getElementById(Z$);n||((n=document.createElement("span")).setAttribute("id",Z$),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,X$,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},Q$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||ST)return{width:0,height:0};if(!q$.enableCache)return J$(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}(e,t),r=G$.get(n);if(r)return r;var i=J$(e,t);return G$.set(n,i),i};var eU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nU=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,rU=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,iU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},oU=["cm","mm","pt","pc","in","Q","px"];var aU="NaN";class sU{static parse(e){var t,[,n,r]=null!==(t=rU.exec(e))&&void 0!==t?t:[];return null==n?sU.NaN:new sU(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Zx(e)&&(this.unit=""),""===t||nU.test(t)||(this.num=NaN,this.unit=""),function(e){return oU.includes(e)}(t)&&(this.num=function(e,t){return e*iU[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new sU(NaN,""):new sU(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new sU(NaN,""):new sU(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new sU(NaN,""):new sU(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new sU(NaN,""):new sU(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Zx(this.num)}}function lU(e){if(null==e||e.includes(aU))return aU;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=null!==(n=eU.exec(t))&&void 0!==n?n:[],a=sU.parse(null!=r?r:""),s=sU.parse(null!=o?o:""),l="*"===i?a.multiply(s):a.divide(s);if(l.isNaN())return aU;t=t.replace(eU,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=null!==(c=tU.exec(t))&&void 0!==c?c:[],p=sU.parse(null!=u?u:""),h=sU.parse(null!=f?f:""),m="+"===d?p.add(h):p.subtract(h);if(m.isNaN())return aU;t=t.replace(tU,m.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(sU,"NaN",new sU(NaN,""));var cU=/\(([^()]*)\)/;function uU(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=cU.exec(n));){var[,r]=t;n=n.replace(cU,lU(r))}return n}(t),t=lU(t)}function dU(e){var t=function(e){try{return uU(e)}catch(e){return aU}}(e.slice(5,-1));return t===aU?"":t}var fU=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],pU=["dx","dy","angle","className","breakAll"];function hU(){return hU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hU.apply(null,arguments)}function mU(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var yU=/[ \f\n\r\t\v\u2028\u2029]+/,vU=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];return sw(t)||(i=n?t.toString().split(""):t.toString().split(yU)),{wordsWithComputedWidth:i.map(e=>({word:e,width:Q$(e,r).width})),spaceWidth:n?0:Q$(" ",r).width}}catch(e){return null}};function gU(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var bU=(e,t,n,r)=>e.reduce((e,i)=>{var{word:o,width:a}=i,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(o),s.width+=a+n;else{var l={words:[o],width:a};e.push(l)}return e},[]),xU=e=>e.reduce((e,t)=>e.width>t.width?e:t),wU=(e,t,n,r,i,o,a,s)=>{var l=e.slice(0,t),c=vU({breakAll:n,style:r,children:l+"…"});if(!c)return[!1,[]];var u=bU(c.wordsWithComputedWidth,o,a,s);return[u.length>i||xU(u).width>Number(o),u]},EU=e=>[{words:sw(e)?[]:e.toString().split(yU),width:void 0}],OU=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!ST){var s=vU({breakAll:o,children:r,style:i});if(!s)return EU(r);var{wordsWithComputedWidth:l,spaceWidth:c}=s;return((e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=Qx(o),u=String(a),d=bU(t,r,n,i);if(!c||i)return d;if(!(d.length>o||xU(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var y=Math.floor((p+h)/2),v=y-1,[g,b]=wU(u,v,l,s,o,r,n,i),[x]=wU(u,y,l,s,o,r,n,i);if(g||x||(p=y+1),g&&x&&(h=y-1),!g&&x){f=b;break}m++}return f||d})({breakAll:o,children:r,maxLines:a,style:i},l,c,t,Boolean(n))}return EU(r)},SU="#808080",kU={angle:0,breakAll:!1,capHeight:"0.71em",fill:SU,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},PU=a((t,n)=>{var r=Sw(t,kU),{x:i,y:o,lineHeight:a,capHeight:s,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:f}=r,p=mU(r,fU),h=d(()=>OU({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:c,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,c,p.style,p.width]),{dx:m,dy:y,angle:v,className:g,breakAll:b}=p,x=mU(p,pU);if(!ew(i)||!ew(o)||0===h.length)return null;var w,E=Number(i)+(Qx(m)?m:0),O=Number(o)+(Qx(y)?y:0);if(!PP(E)||!PP(O))return null;switch(f){case"start":w=dU("calc(".concat(s,")"));break;case"middle":w=dU("calc(".concat((h.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:w=dU("calc(".concat(h.length-1," * -").concat(a,")"))}var S=[],k=h[0];if(c&&null!=k){var P=k.width,{width:j}=p;S.push("scale(".concat(Qx(j)&&Qx(P)?j/P:1,")"))}return v&&S.push("rotate(".concat(v,", ").concat(E,", ").concat(O,")")),S.length&&(x.transform=S.join(" ")),e.createElement("text",hU({},hb(x),{ref:n,x:E,y:O,className:de("recharts-text",g),textAnchor:u,fill:l.includes("url")?SU:l}),h.map((t,n)=>{var r=t.words.join(b?"":" ");return e.createElement("tspan",{x:E,dy:0===n?w:a,key:"".concat(r,"-").concat(n)},r)}))});function jU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jU(Object(n),!0).forEach(function(t){TU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}PU.displayName="Text";var MU=["labelRef"],CU=["content"];function NU(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function IU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IU(Object(n),!0).forEach(function(t){_U(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _U(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RU(){return RU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RU.apply(null,arguments)}var LU=o(null),zU=t=>{var{x:n,y:r,upperWidth:i,lowerWidth:o,width:a,height:s,children:l}=t,c=d(()=>({x:n,y:r,upperWidth:i,lowerWidth:o,width:a,height:s}),[n,r,i,o,a,s]);return e.createElement(LU.Provider,{value:c},l)},VU=()=>{var e=i(LU),t=Bj();return e||(t?Vj(t):void 0)},BU=o(null),FU=e=>null!=e&&"function"==typeof e,$U=(t,n,r,i,o)=>{var a,s,{offset:l,className:c}=t,{cx:u,cy:d,innerRadius:f,outerRadius:p,startAngle:h,endAngle:m,clockWise:y}=o,v=(f+p)/2,g=((e,t)=>Xx(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=g>=0?1:-1;switch(n){case"insideStart":a=h+b*l,s=y;break;case"insideEnd":a=m-b*l,s=!y;break;case"end":a=m+b*l,s=y;break;default:throw new Error("Unsupported position ".concat(n))}s=g<=0?s:!s;var x=oC(u,d,v,a),w=oC(u,d,v,a+359*(s?1:-1)),E="M".concat(x.x,",").concat(x.y,"\n A").concat(v,",").concat(v,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),O=sw(t.id)?nw("recharts-radial-line-"):t.id;return e.createElement("text",RU({},i,{dominantBaseline:"central",className:de("recharts-radial-bar-label",c)}),e.createElement("defs",null,e.createElement("path",{id:O,d:E})),e.createElement("textPath",{xlinkHref:"#".concat(O)},r))},UU=e=>null!=e&&"cx"in e&&Qx(e.cx),WU={angle:0,offset:5,zIndex:CN.label,position:"middle",textBreakAll:!1};function KU(t){var r,o,a,s,l,c=Sw(t,WU),{viewBox:u,parentViewBox:d,position:f,value:p,children:m,content:y,className:v="",textBreakAll:g,labelRef:x}=c,w=(r=i(BU),o=dO(YN),r||o),E=VU(),O=function(e){if(!UU(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=2*r;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}(a=null==u?"center"===f?E:null!=w?w:E:UU(u)?u:Vj(u));if(!a||sw(p)&&sw(m)&&!h(y)&&"function"!=typeof y)return null;var S=DU(DU({},c),{},{viewBox:a});if(h(y)){var{labelRef:k}=S,P=NU(S,MU);return b(y,P)}if("function"==typeof y){var{content:j}=S,A=NU(S,CU);if(h(s=n(y,A)))return s}else s=(e=>{var{value:t,formatter:n}=e,r=sw(e.children)?t:e.children;return"function"==typeof n?n(r):r})(c);var T=hb(c);if(UU(a)){if("insideStart"===f||"insideEnd"===f||"end"===f)return $U(c,f,s,T,a);l=((e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if("outside"===n){var{x:u,y:d}=oC(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:h}=oC(r,i,f,c);return{x:p,y:h,textAnchor:"middle",verticalAnchor:"middle"}})(a,c.offset,c.position)}else{if(!O)return null;var M=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:a,height:s,upperWidth:l,lowerWidth:c}=Vj(t),u=o,d=o+(l-c)/2,f=(u+d)/2,p=(l+c)/2,h=u+l/2,m=s>=0?1:-1,y=m*r,v=m>0?"end":"start",g=m>0?"start":"end",b=l>=0?1:-1,x=b*r,w=b>0?"end":"start",E=b>0?"start":"end",O=i;if("top"===n){var S={x:u+l/2,y:a-y,horizontalAnchor:"middle",verticalAnchor:v};return O&&(S.height=Math.max(a-O.y,0),S.width=l),S}if("bottom"===n){var k={x:d+c/2,y:a+s+y,horizontalAnchor:"middle",verticalAnchor:g};return O&&(k.height=Math.max(O.y+O.height-(a+s),0),k.width=c),k}if("left"===n){var P={x:f-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return O&&(P.width=Math.max(P.x-O.x,0),P.height=s),P}if("right"===n){var j={x:f+p+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"};return O&&(j.width=Math.max(O.x+O.width-j.x,0),j.height=s),j}var A=O?{width:p,height:s}:{};return"insideLeft"===n?AU({x:f+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"},A):"insideRight"===n?AU({x:f+p-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"},A):"insideTop"===n?AU({x:u+l/2,y:a+y,horizontalAnchor:"middle",verticalAnchor:g},A):"insideBottom"===n?AU({x:d+c/2,y:a+s-y,horizontalAnchor:"middle",verticalAnchor:v},A):"insideTopLeft"===n?AU({x:u+x,y:a+y,horizontalAnchor:E,verticalAnchor:g},A):"insideTopRight"===n?AU({x:u+l-x,y:a+y,horizontalAnchor:w,verticalAnchor:g},A):"insideBottomLeft"===n?AU({x:d+x,y:a+s-y,horizontalAnchor:E,verticalAnchor:v},A):"insideBottomRight"===n?AU({x:d+c-x,y:a+s-y,horizontalAnchor:w,verticalAnchor:v},A):n&&"object"==typeof n&&(Qx(n.x)||Jx(n.x))&&(Qx(n.y)||Jx(n.y))?AU({x:o+rw(n.x,p),y:a+rw(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},A):AU({x:h,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},A)})({viewBox:O,position:f,offset:c.offset,parentViewBox:UU(d)?void 0:d});l=DU(DU({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},void 0!==M.width?{width:M.width}:{}),void 0!==M.height?{height:M.height}:{})}return e.createElement(o$,{zIndex:c.zIndex},e.createElement(PU,RU({ref:x,className:de("recharts-label",v)},T,l,{textAnchor:gU(T.textAnchor)?T.textAnchor:l.textAnchor,breakAll:g}),s))}KU.displayName="Label";function HU(t){var{label:n,labelRef:r}=t;return((t,n,r)=>{if(!t)return null;var i={viewBox:n,labelRef:r};return!0===t?e.createElement(KU,RU({key:"label-implicit"},i)):ew(t)?e.createElement(KU,RU({key:"label-implicit",value:t},i)):h(t)?t.type===KU?b(t,DU({key:"label-implicit"},i)):e.createElement(KU,RU({key:"label-implicit",content:t},i)):FU(t)?e.createElement(KU,RU({key:"label-implicit",content:t},i)):t&&"object"==typeof t?e.createElement(KU,RU({},t,{key:"label-implicit"},i)):null})(n,VU(),r)||null}var YU=["valueAccessor"],qU=["dataKey","clockWise","id","textBreakAll","zIndex"];function GU(){return GU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GU.apply(null,arguments)}function XU(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ZU=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return sw(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},JU=o(void 0),QU=JU.Provider,eW=o(void 0);function tW(t){var{valueAccessor:n=ZU}=t,r=XU(t,YU),{dataKey:o,clockWise:a,id:s,textBreakAll:l,zIndex:c}=r,u=XU(r,qU),d=i(JU),f=i(eW),p=d||f;return p&&p.length?e.createElement(o$,{zIndex:null!=c?c:CN.label},e.createElement(xb,{className:"recharts-label-list"},p.map((t,i)=>{var a,c=sw(o)?n(t,i):CP(t.payload,o),d=sw(s)?{}:{id:"".concat(s,"-").concat(i)};return e.createElement(KU,GU({key:"label-".concat(i)},hb(t),u,d,{fill:null!==(a=r.fill)&&void 0!==a?a:t.fill,parentViewBox:t.parentViewBox,value:c,textBreakAll:l,viewBox:t.viewBox,index:i,zIndex:0}))}))):null}function nW(t){var{label:n}=t;return n?!0===n?e.createElement(tW,{key:"labelList-implicit"}):e.isValidElement(n)||FU(n)?e.createElement(tW,{key:"labelList-implicit",content:n}):"object"==typeof n?e.createElement(tW,GU({key:"labelList-implicit"},n,{type:String(n.type)})):null:null}function rW(){return rW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rW.apply(null,arguments)}eW.Provider,tW.displayName="LabelList";var iW=t=>{var{cx:n,cy:r,r:i,className:o}=t,a=de("recharts-dot",o);return Qx(n)&&Qx(r)&&Qx(i)?e.createElement("circle",rW({},fb(t),xw(t),{className:a,cx:n,cy:r,r:i})):null},oW=Vk({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:aW,removeRadiusAxis:sW,addAngleAxis:lW,removeAngleAxis:cW}=oW.actions,uW=oW.reducer;var dW,fW={exports:{}},pW={};function hW(){if(dW)return pW;dW=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case i:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case o:return p;default:return h}}case t:return h}}}return pW.ContextConsumer=o,pW.ContextProvider=a,pW.Element=e,pW.ForwardRef=s,pW.Fragment=n,pW.Lazy=d,pW.Memo=u,pW.Portal=t,pW.Profiler=i,pW.StrictMode=r,pW.Suspense=l,pW.SuspenseList=c,pW.isContextConsumer=function(e){return h(e)===o},pW.isContextProvider=function(e){return h(e)===a},pW.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},pW.isForwardRef=function(e){return h(e)===s},pW.isFragment=function(e){return h(e)===n},pW.isLazy=function(e){return h(e)===d},pW.isMemo=function(e){return h(e)===u},pW.isPortal=function(e){return h(e)===t},pW.isProfiler=function(e){return h(e)===i},pW.isStrictMode=function(e){return h(e)===r},pW.isSuspense=function(e){return h(e)===l},pW.isSuspenseList=function(e){return h(e)===c},pW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},pW.typeOf=h,pW}var mW,yW,vW={};
|
|
67
|
+
/**
|
|
68
|
+
* @license React
|
|
69
|
+
* react-is.development.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/function gW(){return mW||(mW=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case o:case i:case c:case u:case p:return e;default:switch(e=e&&e.$$typeof){case s:case l:case f:case d:case a:return e;default:return h}}case n:return h}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");vW.ContextConsumer=a,vW.ContextProvider=s,vW.Element=t,vW.ForwardRef=l,vW.Fragment=r,vW.Lazy=f,vW.Memo=d,vW.Portal=n,vW.Profiler=o,vW.StrictMode=i,vW.Suspense=c,vW.SuspenseList=u,vW.isContextConsumer=function(t){return e(t)===a},vW.isContextProvider=function(t){return e(t)===s},vW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},vW.isForwardRef=function(t){return e(t)===l},vW.isFragment=function(t){return e(t)===r},vW.isLazy=function(t){return e(t)===f},vW.isMemo=function(t){return e(t)===d},vW.isPortal=function(t){return e(t)===n},vW.isProfiler=function(t){return e(t)===o},vW.isStrictMode=function(t){return e(t)===i},vW.isSuspense=function(t){return e(t)===c},vW.isSuspenseList=function(t){return e(t)===u},vW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===o||e===i||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},vW.typeOf=e}()),vW}function bW(){return yW||(yW=1,"production"===process.env.NODE_ENV?fW.exports=hW():fW.exports=gW()),fW.exports}var xW=bW(),wW=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",EW=null,OW=null,SW=e=>{if(e===EW&&Array.isArray(OW))return OW;var t=[];return p.forEach(e,e=>{sw(e)||(xW.isFragment(e)?t=t.concat(SW(e.props.children)):t.push(e))}),OW=t,EW=e,t};function kW(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>wW(e)):[wW(t)],SW(e).forEach(e=>{var t=Yx(e,"type.displayName")||Yx(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var PW,jW,AW,TW=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),MW={};function CW(){return PW||(PW=1,e=MW,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}),MW;var e}function NW(){return AW?jW:(AW=1,jW=CW().isPlainObject)}var IW,DW,_W,RW,LW,zW=S(NW());function VW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VW(Object(n),!0).forEach(function(t){FW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $W(){return $W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$W.apply(null,arguments)}function UW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var WW=(e,t,n,r,i)=>{var o,a=n-r;return o=Gx(IW||(IW=UW(["M ",",",""])),e,t),o+=Gx(DW||(DW=UW(["L ",",",""])),e+n,t),o+=Gx(_W||(_W=UW(["L ",",",""])),e+n-a/2,t+i),o+=Gx(RW||(RW=UW(["L ",",",""])),e+n-a/2-r,t+i),o+=Gx(LW||(LW=UW(["L ",","," Z"])),e,t)},KW={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},HW=t=>{var n=Sw(t,KW),{x:r,y:i,upperWidth:o,lowerWidth:a,height:c,className:u}=n,{animationEasing:d,animationDuration:f,animationBegin:p,isUpdateAnimationActive:h}=n,y=s(null),[v,g]=m(-1),b=s(o),x=s(a),w=s(c),E=s(r),O=s(i),S=kM(t,"trapezoid-");if(l(()=>{if(y.current&&y.current.getTotalLength)try{var e=y.current.getTotalLength();e&&g(e)}catch(e){}},[]),r!==+r||i!==+i||o!==+o||a!==+a||c!==+c||0===o&&0===a||0===c)return null;var k=de("recharts-trapezoid",u);if(!h)return e.createElement("g",null,e.createElement("path",$W({},hb(n),{className:k,d:WW(r,i,o,a,c)})));var P=b.current,j=x.current,A=w.current,T=E.current,M=O.current,C="0px ".concat(-1===v?1:v,"px"),N="".concat(v,"px ").concat(v,"px"),I=eM(["strokeDasharray"],f,d);return e.createElement(SM,{animationId:S,key:S,canBegin:v>0,duration:f,easing:d,isActive:h,begin:p},t=>{var s=ow(P,o,t),l=ow(j,a,t),u=ow(A,c,t),d=ow(T,r,t),f=ow(M,i,t);y.current&&(b.current=s,x.current=l,w.current=u,E.current=d,O.current=f);var p=t>0?{transition:I,strokeDasharray:N}:{strokeDasharray:C};return e.createElement("path",$W({},hb(n),{className:k,d:WW(d,f,s,l,u),ref:y,style:BW(BW({},p),n.style)}))})},YW=["option","shapeType","activeClassName","inActiveClassName"];function qW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qW(Object(n),!0).forEach(function(t){XW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZW(t){var{shapeType:n,elementProps:r}=t;switch(n){case"rectangle":return e.createElement(HM,r);case"trapezoid":return e.createElement(HW,r);case"sector":return e.createElement(mC,r);case"symbols":if(function(e){return"symbols"===e}(n))return e.createElement(gw,r);break;case"curve":return e.createElement(WT,r);default:return null}}function JW(t){var n,{option:r,shapeType:i,activeClassName:o="recharts-active-shape",inActiveClassName:a="recharts-shape"}=t,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,YW);if(h(r))n=b(r,GW(GW({},s),function(e){return h(e)?e.props:e}(r)));else if("function"==typeof r)n=r(s,s.index);else if(zW(r)&&"boolean"!=typeof r){var l=function(e,t){return GW(GW({},t),e)}(r,s);n=e.createElement(ZW,{shapeType:i,elementProps:l})}else{var c=s;n=e.createElement(ZW,{shapeType:i,elementProps:c})}return s.isActive?e.createElement(xb,{className:o},n):e.createElement(xb,{className:a},n)}var QW,eK=(e,t,n)=>{var r=sO();return(i,o)=>a=>{null==e||e(i,o,a),r(iB({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},tK=e=>{var t=sO();return(n,r)=>i=>{null==e||e(n,r,i),t(oB())}},nK=(e,t,n)=>{var r=sO();return(i,o)=>a=>{null==e||e(i,o,a),r(sB({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function rK(e){var{tooltipEntrySettings:t}=e,n=sO(),i=dj(),o=s(null);return r(()=>{i||(null===o.current?n(eB(t)):o.current!==t&&n(tB({prev:o.current,next:t})),o.current=t)},[t,n,i]),r(()=>()=>{o.current&&(n(nB(o.current)),o.current=null)},[n]),null}function iK(e){var{legendPayload:t}=e,n=sO(),i=dj(),o=s(null);return r(()=>{i||(null===o.current?n(WA(t)):o.current!==t&&n(KA({prev:o.current,next:t})),o.current=t)},[n,i,t]),r(()=>()=>{o.current&&(n(HA(o.current)),o.current=null)},[n]),null}var oK=null!==(QW=e["useId".toString()])&&void 0!==QW?QW:()=>{var[t]=e.useState(()=>nw("uid-"));return t};var aK=o(void 0),sK=t=>{var{id:n,type:r,children:i}=t,o=function(e,t){var n=oK();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(r),n);return e.createElement(aK.Provider,{value:o},i(o))},lK=Vk({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Tk()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ok(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:Tk()},removeCartesianGraphicalItem:{reducer(e,t){var n=ok(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Tk()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Tk()},removePolarGraphicalItem:{reducer(e,t){var n=ok(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Tk()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ok(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:Tk()}}}),{addCartesianGraphicalItem:cK,replaceCartesianGraphicalItem:uK,removeCartesianGraphicalItem:dK,addPolarGraphicalItem:fK,removePolarGraphicalItem:pK,replacePolarGraphicalItem:hK}=lK.actions,mK=lK.reducer,yK=x(e=>{var t=sO(),n=s(null);return r(()=>{null===n.current?t(cK(e)):n.current!==e&&t(uK({prev:n.current,next:e})),n.current=e},[t,e]),r(()=>()=>{n.current&&(t(dK(n.current)),n.current=null)},[t]),null}),vK=["points"];function gK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gK(Object(n),!0).forEach(function(t){xK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wK(){return wK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wK.apply(null,arguments)}function EK(t){var{option:n,dotProps:r,className:i}=t;if(h(n))return b(n,r);if("function"==typeof n)return n(r);var o=de(i,"boolean"!=typeof n?n.className:""),a=null!=r?r:{},{points:s}=a,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(a,vK);return e.createElement(iW,wK({},l,{className:o}))}function OK(t){var{points:n,dot:r,className:i,dotClassName:o,dataKey:a,baseProps:s,needClip:l,clipPathId:c,zIndex:u=CN.scatter}=t;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(n,r))return null;var d,f=TW(r),p=null==(d=r)?null:h(d)?hb(d.props):"object"!=typeof d||Array.isArray(d)?null:hb(d),m=n.map((t,i)=>{var l,c,u=bK(bK(bK({r:3},s),p),{},{index:i,cx:null!==(l=t.x)&&void 0!==l?l:void 0,cy:null!==(c=t.y)&&void 0!==c?c:void 0,dataKey:a,value:t.value,payload:t.payload,points:n});return e.createElement(EK,{key:"dot-".concat(i),option:r,dotProps:u,className:o})}),y={};return l&&null!=c&&(y.clipPath="url(#clipPath-".concat(f?"":"dots-").concat(c,")")),e.createElement(o$,{zIndex:u},e.createElement(xb,wK({className:i},y),m))}function SK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SK(Object(n),!0).forEach(function(t){PK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jK=Vk({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Tk()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.xAxis[n.id]&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Tk()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Tk()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Tk()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.yAxis[n.id]&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Tk()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Tk()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Tk()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.zAxis[n.id]&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Tk()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Tk()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o,a=i.widthHistory||[];if(3===a.length&&a[0]===a[2]&&r===a[1]&&r!==i.width&&Math.abs(r-(null!==(o=a[0])&&void 0!==o?o:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=kK(kK({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:AK,replaceXAxis:TK,removeXAxis:MK,addYAxis:CK,replaceYAxis:NK,removeYAxis:IK,addZAxis:DK,replaceZAxis:_K,removeZAxis:RK,updateYAxisWidth:LK}=jK.actions,zK=jK.reducer,VK=ns([sj],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),BK=ns([VK,HP,YP],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),FK=()=>dO(BK);function $K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$K(Object(n),!0).forEach(function(t){WK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$K(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var KK=t=>{var{point:n,childIndex:r,mainColor:i,activeDot:o,dataKey:a,clipPath:s}=t;if(!1===o||null==n.x||null==n.y)return null;var l,c=UK(UK(UK({},{index:r,dataKey:a,cx:n.x,cy:n.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value}),pb(o)),xw(o));return l=h(o)?b(o,c):"function"==typeof o?o(c):e.createElement(iW,c),e.createElement(xb,{className:"recharts-active-dot",clipPath:s},l)};function HK(t){var{points:n,mainColor:r,activeDot:i,itemDataKey:o,clipPath:a,zIndex:s=CN.activeDot}=t,l=dO(hF),c=dO(OF);if(null==n||null==c)return null;var u=n.find(e=>c.includes(e.payload));return sw(u)?null:e.createElement(o$,{zIndex:s},e.createElement(KK,{point:u,childIndex:Number(l),mainColor:r,dataKey:o,activeDot:i,clipPath:a}))}var YK=(e,t,n)=>{var r=null!=n?n:e;if(!sw(r))return rw(r,t,0)};function qK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qK(Object(n),!0).forEach(function(t){XK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZK=e=>{var{chartData:t}=e,n=sO(),r=dj();return l(()=>r?()=>{}:(n(P$(t)),()=>{n(P$(void 0))}),[t,n,r]),null},JK={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},QK=Vk({name:"brush",initialState:JK,reducers:{setBrushSettings:(e,t)=>null==t.payload?JK:t.payload}}),{setBrushSettings:eH}=QK.actions,tH=QK.reducer;var nH=Vk({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ok(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=ok(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=ok(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:rH,removeDot:iH,addArea:oH,removeArea:aH,addLine:sH,removeLine:lH}=nH.actions,cH=nH.reducer,uH=o(void 0),dH=t=>{var{children:n}=t,[r]=m("".concat(nw("recharts"),"-clip")),i=FK();if(null==i)return null;var{x:o,y:a,width:s,height:l}=i;return e.createElement(uH.Provider,{value:r},e.createElement("defs",null,e.createElement("clipPath",{id:r},e.createElement("rect",{x:o,y:a,height:l,width:s}))),n)};function fH(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];void 0!==i&&n.push(i)}return n}function pH(e,t,n){return function(e){var{width:t,height:n}=e,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,o=Math.atan(n/t),a=i>o&&i<Math.PI-o?n/Math.sin(i):t/Math.cos(i);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function hH(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function mH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mH(Object(n),!0).forEach(function(t){vH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gH(e,t,n){var r,{tick:i,ticks:o,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:u,unit:d,angle:f}=e;if(!o||!o.length||!i)return[];if(Qx(c)||ST)return null!==(r=function(e,t){return fH(e,t+1)}(o,Qx(c)?c:0))&&void 0!==r?r:[];var p=[],h="top"===l||"bottom"===l?"width":"height",m=d&&"width"===h?Q$(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=(e,r)=>{var i="function"==typeof u?u(e.value,r):e.value;return"width"===h?pH(Q$(i,{fontSize:t,letterSpacing:n}),m,f):Q$(i,{fontSize:t,letterSpacing:n})[h]},v=o[0],g=o[1],b=o.length>=2&&null!=v&&null!=g?Xx(g.coordinate-v.coordinate):1,x=function(e,t,n){var r="width"===n,{x:i,y:o,width:a,height:s}=e;return 1===t?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}(a,b,h);return"equidistantPreserveStart"===c?function(e,t,n,r,i){for(var o,a=(r||[]).slice(),{start:s,end:l}=t,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:fH(r,u)};var o,a=c,f=()=>(void 0===o&&(o=n(t,a)),o),p=t.coordinate,h=0===c||hH(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+i),c+=u)};u<=a.length;)if(o=f())return o.v;return[]}(b,x,y,o,s):"equidistantPreserveEnd"===c?function(e,t,n,r,i){var o=(r||[]).slice().length;if(0===o)return[];for(var{start:a,end:s}=t,l=1;l<=o;l++){for(var c,u=(o-1)%l,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var o,a=h,l=()=>(void 0===o&&(o=n(t,a)),o),c=t.coordinate,p=h===u||hH(e,c,l,d,s);if(!p)return f=!1,1;p&&(d=c+e*(l()/2+i))},h=u;h<o&&(0===(c=p())||1!==c);h+=l);if(f){for(var m=[],y=u;y<o;y+=l){var v=r[y];null!=v&&m.push(v)}return m}}return[]}(b,x,y,o,s):(p="preserveStart"===c||"preserveStartEnd"===c?function(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1];if(null!=u){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=yH(yH({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&hH(e,u.tickCoord,()=>d,l,c)&&(c=u.tickCoord-e*(d/2+i),a[s-1]=yH(yH({},u),{},{isShow:!0}))}}for(var p=o?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var o,s=r,u=()=>(void 0===o&&(o=n(r,t)),o);if(0===t){var d=e*(s.coordinate-e*u()/2-l);a[t]=s=yH(yH({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=yH(yH({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&hH(e,s.tickCoord,u,l,c)&&(l=s.tickCoord+e*(u()/2+i),a[t]=yH(yH({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,y,o,s,"preserveStartEnd"===c):function(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(t){var r=o[t];if(null==r)return 1;var c,u=r,d=()=>(void 0===c&&(c=n(r,t)),c);if(t===a-1){var f=e*(u.coordinate+e*d()/2-l);o[t]=u=yH(yH({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else o[t]=u=yH(yH({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&hH(e,u.tickCoord,d,s,l)&&(l=u.tickCoord-e*(d()/2+i),o[t]=yH(yH({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}(b,x,y,o,s),p.filter(e=>e.isShow))}var bH=Vk({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:xH,removeRenderedTicks:wH}=bH.actions,EH=bH.reducer,OH=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function SH(){return SH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SH.apply(null,arguments)}function kH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kH(Object(n),!0).forEach(function(t){jH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AH={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:CN.axis};function TH(t){var{x:n,y:r,width:i,height:o,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=t;if(!l)return null;var u=PH(PH(PH({},c),fb(l)),{},{fill:"none"});if("top"===a||"bottom"===a){var d=+("top"===a&&!s||"bottom"===a&&s);u=PH(PH({},u),{},{x1:n,y1:r+d*o,x2:n+i,y2:r+d*o})}else{var f=+("left"===a&&!s||"right"===a&&s);u=PH(PH({},u),{},{x1:n+f*i,y1:r,x2:n+f*i,y2:r+o})}return e.createElement("line",SH({},u,{className:de("recharts-cartesian-axis-line",Yx(l,"className"))}))}function MH(t){var n,r,{option:i,tickProps:o,value:a}=t,s=de(o.className,"recharts-cartesian-axis-tick-value");if(e.isValidElement(i))n=e.cloneElement(i,PH(PH({},o),{},{className:s}));else if("function"==typeof i)n=i(PH(PH({},o),{},{className:s}));else{var l="recharts-cartesian-axis-tick-value";"boolean"!=typeof i&&(l=de(l,(r=i)&&"object"==typeof r&&"className"in r&&"string"==typeof r.className?r.className:"")),n=e.createElement(PU,SH({},o,{className:l}),a)}return n}function CH(e){var{ticks:t,axisType:n,axisId:r}=e,i=sO();return l(()=>{if(null==r||null==n)return uw;var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(xH({ticks:e,axisId:r,axisType:n})),()=>{i(wH({axisId:r,axisType:n}))}},[i,t,r,n]),null}var NH=a((t,n)=>{var{ticks:r=[],tick:i,tickLine:o,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:p,y:h,width:m,height:y,tickSize:v,tickMargin:g,fontSize:b,letterSpacing:x,getTicksConfig:w,events:E,axisType:O,axisId:S}=t,k=gH(PH(PH({},w),{},{ticks:r}),b,x),P=fb(w),j=pb(i),A=gU(P.textAnchor)?P.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(d,f),T=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(d,f),M={};"object"==typeof o&&(M=o);var C=PH(PH({},P),{},{fill:"none"},M),N=k.map(e=>PH({entry:e},function(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m=s?-1:1,y=e.tickSize||a,v=Qx(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,h=(d=(f=n+ +!s*i)-m*y)-m*l,p=v;break;case"left":d=f=e.coordinate,p=(c=(u=t+ +!s*r)-m*y)-m*l,h=v;break;case"right":d=f=e.coordinate,p=(c=(u=t+ +s*r)+m*y)+m*l,h=v;break;default:c=u=e.coordinate,h=(d=(f=n+ +s*i)+m*y)+m*l,p=v}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,p,h,m,y,d,v,f,g))),I=N.map(t=>{var{entry:n,line:r}=t;return e.createElement(xb,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(n.value,"-").concat(n.coordinate,"-").concat(n.tickCoord)},o&&e.createElement("line",SH({},C,r,{className:de("recharts-cartesian-axis-tick-line",Yx(o,"className"))})))}),D=N.map((t,n)=>{var r,o,{entry:d,tick:f}=t,p=PH(PH(PH(PH({verticalAnchor:T},P),{},{textAnchor:A,stroke:"none",fill:a},f),{},{index:n,payload:d,visibleTicksCount:k.length,tickFormatter:s,padding:c},u),{},{angle:null!==(r=null!==(o=null==u?void 0:u.angle)&&void 0!==o?o:P.angle)&&void 0!==r?r:0}),h=PH(PH({},p),j);return e.createElement(xb,SH({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(d.value,"-").concat(d.coordinate,"-").concat(d.tickCoord)},ww(E,d,n)),i&&e.createElement(MH,{option:i,tickProps:h,value:"".concat("function"==typeof s?s(d.value,n):d.value).concat(l||"")}))});return e.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},e.createElement(CH,{ticks:k,axisId:S,axisType:O}),D.length>0&&e.createElement(o$,{zIndex:CN.label},e.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:n},D)),I.length>0&&e.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},I))}),IH=a((t,n)=>{var{axisLine:r,width:i,height:o,className:a,hide:l,ticks:c,axisType:u,axisId:d}=t,p=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,OH),[h,y]=m(""),[v,b]=m(""),x=s(null);g(n,()=>({getCalculatedWidth:()=>{var e;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>a&&(a=t.width)}});var s=n?n.getBoundingClientRect().width:0,l=a+(i+o)+s+(n?r:0);return Math.round(l)}return 0})({ticks:x.current,label:null===(e=t.labelRef)||void 0===e?void 0:e.current,labelGapWithTick:5,tickSize:t.tickSize,tickMargin:t.tickMargin})}}));var w=f(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");x.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,o=r.letterSpacing;i===h&&o===v||(y(i),b(o))}}},[h,v]);return l||null!=i&&i<=0||null!=o&&o<=0?null:e.createElement(o$,{zIndex:t.zIndex},e.createElement(xb,{className:de("recharts-cartesian-axis",a)},e.createElement(TH,{x:t.x,y:t.y,width:i,height:o,orientation:t.orientation,mirror:t.mirror,axisLine:r,otherSvgProps:fb(t)}),e.createElement(NH,{ref:w,axisType:u,events:p,fontSize:h,getTicksConfig:t,height:t.height,letterSpacing:v,mirror:t.mirror,orientation:t.orientation,padding:t.padding,stroke:t.stroke,tick:t.tick,tickFormatter:t.tickFormatter,tickLine:t.tickLine,tickMargin:t.tickMargin,tickSize:t.tickSize,tickTextProps:t.tickTextProps,ticks:c,unit:t.unit,width:t.width,x:t.x,y:t.y,axisId:d}),e.createElement(zU,{x:t.x,y:t.y,width:t.width,height:t.height,lowerWidth:t.width,upperWidth:t.width},e.createElement(HU,{label:t.label,labelRef:t.labelRef}),t.children)))}),DH=e.forwardRef((t,n)=>{var r=Sw(t,AH);return e.createElement(IH,SH({},r,{ref:n}))});DH.displayName="CartesianAxis";var _H=["x1","y1","x2","y2","key"],RH=["offset"],LH=["xAxisId","yAxisId"],zH=["xAxisId","yAxisId"];function VH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VH(Object(n),!0).forEach(function(t){FH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $H(){return $H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$H.apply(null,arguments)}function UH(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var WH=t=>{var{fill:n}=t;if(!n||"none"===n)return null;var{fillOpacity:r,x:i,y:o,width:a,height:s,ry:l}=t;return e.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function KH(t){var n,{option:r,lineItemProps:i}=t;if(e.isValidElement(r))n=e.cloneElement(r,i);else if("function"==typeof r)n=r(i);else{var o,{x1:a,y1:s,x2:l,y2:c,key:u}=i,d=null!==(o=fb(UH(i,_H)))&&void 0!==o?o:{},{offset:f}=d,p=UH(d,RH);n=e.createElement("line",$H({},p,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:u}))}return n}function HH(t){var{x:n,width:r,horizontal:i=!0,horizontalPoints:o}=t;if(!i||!o||!o.length)return null;var{xAxisId:a,yAxisId:s}=t,l=UH(t,LH),c=o.map((t,o)=>{var a=BH(BH({},l),{},{x1:n,y1:t,x2:n+r,y2:t,key:"line-".concat(o),index:o});return e.createElement(KH,{key:"line-".concat(o),option:i,lineItemProps:a})});return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function YH(t){var{y:n,height:r,vertical:i=!0,verticalPoints:o}=t;if(!i||!o||!o.length)return null;var{xAxisId:a,yAxisId:s}=t,l=UH(t,zH),c=o.map((t,o)=>{var a=BH(BH({},l),{},{x1:t,y1:n,x2:t,y2:n+r,key:"line-".concat(o),index:o});return e.createElement(KH,{option:i,lineItemProps:a,key:"line-".concat(o)})});return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function qH(t){var{horizontalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=t;if(!c||!n||!n.length||null==l)return null;var u=l.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==u[0]&&u.unshift(0);var d=u.map((t,l)=>{var c=u[l+1],d=null==c?o+s-t:c-t;if(d<=0)return null;var f=l%n.length;return e.createElement("rect",{key:"react-".concat(l),y:t,x:i,height:d,width:a,stroke:"none",fill:n[f],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function GH(t){var{vertical:n=!0,verticalFill:r,fillOpacity:i,x:o,y:a,width:s,height:l,verticalPoints:c}=t;if(!n||!r||!r.length)return null;var u=c.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==u[0]&&u.unshift(0);var d=u.map((t,n)=>{var c=u[n+1],d=null==c?o+s-t:c-t;if(d<=0)return null;var f=n%r.length;return e.createElement("rect",{key:"react-".concat(n),x:t,y:a,width:d,height:l,stroke:"none",fill:r[f],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var XH=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return IP(gH(BH(BH(BH({},AH),n),{},{ticks:DP(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},ZH=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return IP(gH(BH(BH(BH({},AH),n),{},{ticks:DP(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},JH={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:CN.grid};function QH(t){var n=Uj(),r=Wj(),i=$j(),o=BH(BH({},Sw(t,JH)),{},{x:Qx(t.x)?t.x:i.left,y:Qx(t.y)?t.y:i.top,width:Qx(t.width)?t.width:i.width,height:Qx(t.height)?t.height:i.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:p,verticalValues:h}=o,m=dj(),y=dO(e=>VV(e,"xAxis",a,m)),v=dO(e=>VV(e,"yAxis",s,m));if(!(jP(u)&&jP(d)&&Qx(l)&&Qx(c)))return null;var g=o.verticalCoordinatesGenerator||XH,b=o.horizontalCoordinatesGenerator||ZH,{horizontalPoints:x,verticalPoints:w}=o;if(!(x&&x.length||"function"!=typeof b)){var E=p&&p.length,O=b({yAxis:v?BH(BH({},v),{},{ticks:E?p:v.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:i},!!E||f);Ej(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(x=O)}if(!(w&&w.length||"function"!=typeof g)){var S=h&&h.length,k=g({xAxis:y?BH(BH({},y),{},{ticks:S?h:y.ticks}):void 0,width:null!=n?n:u,height:null!=r?r:d,offset:i},!!S||f);Ej(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(w=k)}return e.createElement(o$,{zIndex:o.zIndex},e.createElement("g",{className:"recharts-cartesian-grid"},e.createElement(WH,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),e.createElement(qH,$H({},o,{horizontalPoints:x})),e.createElement(GH,$H({},o,{verticalPoints:w})),e.createElement(HH,$H({},o,{offset:i,horizontalPoints:x,xAxis:y,yAxis:v})),e.createElement(YH,$H({},o,{offset:i,verticalPoints:w,xAxis:y,yAxis:v}))))}QH.displayName="CartesianGrid";var eY=Vk({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:tY,replaceErrorBar:nY,removeErrorBar:rY}=eY.actions,iY=eY.reducer,oY=["children"];var aY=o({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function sY(t){var{children:n}=t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,oY);return e.createElement(aY.Provider,{value:r},n)}function lY(e,t){var n,r,i=dO(t=>GL(t,e)),o=dO(e=>JL(e,t)),a=null!==(n=null==i?void 0:i.allowDataOverflow)&&void 0!==n?n:YL.allowDataOverflow,s=null!==(r=null==o?void 0:o.allowDataOverflow)&&void 0!==r?r:XL.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function cY(t){var{xAxisId:n,yAxisId:r,clipPathId:i}=t,o=FK(),{needClipX:a,needClipY:s,needClip:l}=lY(n,r);if(!l||!o)return null;var{x:c,y:u,width:d,height:f}=o;return e.createElement("clipPath",{id:"clipPath-".concat(i)},e.createElement("rect",{x:a?c:c-d/2,y:s?u:u-f/2,width:a?d:2*d,height:s?f:2*f}))}var uY=(e,t,n,r)=>$V(e,"xAxis",t,r),dY=(e,t,n,r)=>FV(e,"xAxis",t,r),fY=(e,t,n,r)=>$V(e,"yAxis",n,r),pY=(e,t,n,r)=>FV(e,"yAxis",n,r),hY=ns([Kj,uY,fY,dY,pY],(e,t,n,r,i)=>NP(e,"xAxis")?UP(t,r,!1):UP(n,i,!1));function mY(e){return"line"===e.type}var yY=ns([oz,(e,t,n,r,i)=>i],(e,t)=>e.filter(mY).find(e=>e.id===t)),vY=ns([Kj,uY,fY,dY,pY,yY,hY,NC],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(null!=o&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,{dataKey:f,data:p}=o;if(null!=(d=null!=p&&p.length>0?p:null==l?void 0:l.slice(c,u+1)))return function(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((e,l)=>{var c=CP(e,a);if("horizontal"===t){var u=zP({axis:n,ticks:i,bandSize:s,entry:e,index:l}),d=sw(c)?null:r.scale.map(c);return{x:u,y:null!=d?d:null,value:c,payload:e}}var f=sw(c)?null:n.scale.map(c),p=zP({axis:r,ticks:o,bandSize:s,entry:e,index:l});return null==f||null==p?null:{x:f,y:p,value:c,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:a,displayedData:d})}});function gY(e){var t=pb(e);if(null!=t){var{r:n,strokeWidth:r}=t,i=Number(n),o=Number(r);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(o)||o<0)&&(o=2),{r:i,strokeWidth:o}}return{r:3,strokeWidth:2}}var bY=["id"],xY=["type","layout","connectNulls","needClip","shape"],wY=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function EY(){return EY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EY.apply(null,arguments)}function OY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OY(Object(n),!0).forEach(function(t){kY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var jY=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:KP(n,t),payload:e}]},AY=e.memo(t=>{var{dataKey:n,data:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=t,f={dataDefinedOnItem:r,getPosition:uw,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,nameKey:void 0,name:KP(s,n),hide:l,type:u,color:i,unit:c,graphicalItemId:d}};return e.createElement(rK,{tooltipEntrySettings:f})}),TY=(e,t)=>"".concat(t,"px ").concat(e,"px");function MY(e,t){for(var n=e.length%2!=0?[...e,0]:e,r=[],i=0;i<t;++i)r.push(...n);return r}function CY(t){var{clipPathId:n,points:r,props:i}=t,{dot:o,dataKey:a,needClip:s}=i,{id:l}=i,c=fb(PY(i,bY));return e.createElement(OK,{points:r,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:c,needClip:s,clipPathId:n})}function NY(t){var{showLabels:n,children:r,points:i}=t,o=d(()=>null==i?void 0:i.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return SY(SY({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[i]);return e.createElement(QU,{value:n?o:void 0},r)}function IY(t){var{clipPathId:n,pathRef:r,points:i,strokeDasharray:o,props:a}=t,{type:s,layout:l,connectNulls:c,needClip:u,shape:d}=a,f=SY(SY({},hb(PY(a,xY))),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(n,")"):void 0,points:i,type:s,layout:l,connectNulls:c,strokeDasharray:null!=o?o:a.strokeDasharray});return e.createElement(e.Fragment,null,(null==i?void 0:i.length)>1&&e.createElement(JW,EY({shapeType:"curve",option:d},f,{pathRef:r})),e.createElement(CY,{points:i,clipPathId:n,props:a}))}function DY(t){var{clipPathId:n,props:r,pathRef:i,previousPointsRef:o,longestAnimatedLengthRef:a}=t,{points:l,strokeDasharray:c,isAnimationActive:u,animationBegin:d,animationDuration:p,animationEasing:h,animateNewValues:y,width:v,height:g,onAnimationEnd:b,onAnimationStart:x}=r,w=o.current,E=kM(l,"recharts-line-"),O=s(E),[S,k]=m(!1),P=!S,j=f(()=>{"function"==typeof b&&b(),k(!1)},[b]),A=f(()=>{"function"==typeof x&&x(),k(!0)},[x]),T=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(i.current),M=s(0);O.current!==E&&(M.current=a.current,O.current=E);var C=M.current;return e.createElement(NY,{points:l,showLabels:P},r.children,e.createElement(SM,{animationId:E,begin:d,duration:p,isActive:u,easing:h,onAnimationEnd:j,onAnimationStart:A,key:E},t=>{var s,d=ow(C,T+C,t),f=Math.min(d,T);if(u)if(c){var p="".concat(c).split(/[,\s]+/gim).map(e=>parseFloat(e));s=((e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return TY(t,e);for(var i=Math.floor(e/r),o=e%r,a=[],s=0,l=0;s<n.length;l+=null!==(c=n[s])&&void 0!==c?c:0,++s){var c,u=n[s];if(null!=u&&l+u>o){a=[...n.slice(0,s),o-l];break}}var d=a.length%2==0?[0,t]:[t];return[...MY(n,i),...a,...d].map(e=>"".concat(e,"px")).join(", ")})(f,T,p)}else s=TY(T,f);else s=null==c?void 0:String(c);if(t>0&&T>0&&(o.current=l,a.current=Math.max(a.current,f)),w){var h=w.length/l.length,m=1===t?l:l.map((e,n)=>{var r=Math.floor(n*h);if(w[r]){var i=w[r];return SY(SY({},e),{},{x:ow(i.x,e.x,t),y:ow(i.y,e.y,t)})}return SY(SY({},e),{},y?{x:ow(2*v,e.x,t),y:ow(g/2,e.y,t)}:{x:e.x,y:e.y})});return o.current=m,e.createElement(IY,{props:r,points:m,clipPathId:n,pathRef:i,strokeDasharray:s})}return e.createElement(IY,{props:r,points:l,clipPathId:n,pathRef:i,strokeDasharray:s})}),e.createElement(nW,{label:r.label}))}function _Y(t){var{clipPathId:n,props:r}=t,i=s(null),o=s(0),a=s(null);return e.createElement(DY,{props:r,clipPathId:n,previousPointsRef:i,longestAnimatedLengthRef:o,pathRef:a})}var RY=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:CP(e.payload,t)}};class LY extends v{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:p}=this.props;if(t)return null;var h=de("recharts-line",i),m=d,{r:y,strokeWidth:v}=gY(n),g=TW(n),b=2*y+v,x=f?"url(#clipPath-".concat(g?"":"dots-").concat(m,")"):void 0;return e.createElement(o$,{zIndex:p},e.createElement(xb,{className:h},f&&e.createElement("defs",null,e.createElement(cY,{clipPathId:m,xAxisId:o,yAxisId:a}),!g&&e.createElement("clipPath",{id:"clipPath-dots-".concat(m)},e.createElement("rect",{x:l-b/2,y:s-b/2,width:c+b,height:u+b}))),e.createElement(sY,{xAxisId:o,yAxisId:a,data:r,dataPointFormatter:RY,errorBarOffset:0},e.createElement(_Y,{props:this.props,clipPathId:m}))),e.createElement(HK,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var zY={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:CN.line,type:"linear"};function VY(t){var n=Sw(t,zY),{activeDot:r,animateNewValues:i,animationBegin:o,animationDuration:a,animationEasing:s,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:h,yAxisId:m,id:y}=n,v=PY(n,wY),{needClip:g}=lY(h,m),b=FK(),x=Hj(),w=dj(),E=dO(e=>vY(e,h,m,w,y));if("horizontal"!==x&&"vertical"!==x||null==E||null==b)return null;var{height:O,width:S,x:k,y:P}=b;return e.createElement(LY,EY({},v,{id:y,connectNulls:l,dot:c,activeDot:r,animateNewValues:i,animationBegin:o,animationDuration:a,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:m,points:E,layout:x,height:O,width:S,left:k,top:P,needClip:g}))}function BY(t){var n=Sw(t,zY),r=dj();return e.createElement(sK,{id:n.id,type:"line"},t=>e.createElement(e.Fragment,null,e.createElement(iK,{legendPayload:jY(n)}),e.createElement(AY,{dataKey:n.dataKey,data:n.data,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:t}),e.createElement(yK,{type:"line",id:t,data:n.data,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,dataKey:n.dataKey,hide:n.hide,isPanorama:r}),e.createElement(VY,EY({},n,{id:t}))))}var FY=e.memo(BY,fT);function $Y(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.xAxisId)&&void 0!==n?n:0}function UY(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.yAxisId)&&void 0!==n?n:0}FY.displayName="Line";var WY=(e,t,n)=>$V(e,"xAxis",$Y(e,t),n),KY=(e,t,n)=>FV(e,"xAxis",$Y(e,t),n),HY=(e,t,n)=>$V(e,"yAxis",UY(e,t),n),YY=(e,t,n)=>FV(e,"yAxis",UY(e,t),n),qY=ns([Kj,WY,HY,KY,YY],(e,t,n,r,i)=>NP(e,"xAxis")?UP(t,r,!1):UP(n,i,!1)),GY=ns([oz,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),XY=e=>{var t=Kj(e);return NP(t,"xAxis")?"yAxis":"xAxis"},ZY=ns([GY,(e,t,n)=>Tz(e,XY(e),((e,t)=>"yAxis"===XY(e)?UY(e,t):$Y(e,t))(e,t),n)],(e,t)=>{var n;if(null!=e&&null!=t){var{stackId:r}=e,i=XN(e);if(null!=r&&null!=i){var o=null===(n=t[r])||void 0===n?void 0:n.stackedData,a=null==o?void 0:o.find(e=>e.key===i);if(null!=a)return a.map(e=>[e[0],e[1]])}}}),JY=ns([Kj,WY,HY,KY,YY,ZY,IC,qY,GY,e=>e.rootProps.baseValue],(e,t,n,r,i,o,a,s,l,c)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=a;if(null!=l&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=s){var p,{data:h}=l;if(null!=(p=h&&h.length>0?h:null==u?void 0:u.slice(d,f+1)))return function(e){var t,{areaSettings:{connectNulls:n,baseValue:r,dataKey:i},stackedData:o,layout:a,chartBaseValue:s,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:p,bandSize:h}=e,m=o&&o.length,y=xq(a,s,r,l,c),v="horizontal"===a,g=!1,b=u.map((e,t)=>{var r,a,s,u;if(m)u=o[d+t];else{var b=CP(e,i);Array.isArray(b)?(u=b,g=!0):u=[y,b]}var x,w=null!==(r=null===(a=u)||void 0===a?void 0:a[1])&&void 0!==r?r:null,E=null==w||m&&!n&&null==CP(e,i);return v?{x:zP({axis:l,ticks:f,bandSize:h,entry:e,index:t}),y:E?null:null!==(x=c.scale.map(w))&&void 0!==x?x:null,value:u,payload:e}:{x:E?null:null!==(s=l.scale.map(w))&&void 0!==s?s:null,y:zP({axis:c,ticks:p,bandSize:h,entry:e,index:t}),value:u,payload:e}});t=m||g?b.map(e=>{var t,n,r=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=r&&null!=e.y&&null!==(n=c.scale.map(r))&&void 0!==n?n:null,payload:e.payload}:{x:null!=r&&null!==(t=l.scale.map(r))&&void 0!==t?t:null,y:e.y,payload:e.payload}}):v?c.scale.map(y):l.scale.map(y);return{points:b,baseLine:null!=t?t:0,isRange:g}}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:c,bandSize:s})}}),QY=["id"],eq=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function tq(){return tq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tq.apply(null,arguments)}function nq(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rq(Object(n),!0).forEach(function(t){oq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aq(e,t){return e&&"none"!==e?e:t}var sq=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:aq(r,i),value:KP(n,t),payload:e}]},lq=e.memo(t=>{var{dataKey:n,data:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=t,f={dataDefinedOnItem:r,getPosition:uw,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,nameKey:void 0,name:KP(s,n),hide:l,type:u,color:aq(i,a),unit:c,graphicalItemId:d}};return e.createElement(rK,{tooltipEntrySettings:f})});function cq(t){var{clipPathId:n,points:r,props:i}=t,{needClip:o,dot:a,dataKey:s}=i,l=fb(i);return e.createElement(OK,{points:r,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:l,needClip:o,clipPathId:n})}function uq(t){var{showLabels:n,children:r,points:i}=t,o=i.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return iq(iq({},r),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:r,fill:void 0})});return e.createElement(QU,{value:n?o:void 0},r)}function dq(t){var{points:n,baseLine:r,needClip:i,clipPathId:o,props:a}=t,{layout:s,type:l,stroke:c,connectNulls:u,isRange:d}=a,{id:f}=a,p=nq(a,QY),h=fb(p),m=hb(p);return e.createElement(e.Fragment,null,(null==n?void 0:n.length)>1&&e.createElement(xb,{clipPath:i?"url(#clipPath-".concat(o,")"):void 0},e.createElement(WT,tq({},m,{id:f,points:n,connectNulls:u,type:l,baseLine:r,layout:s,stroke:"none",className:"recharts-area-area"})),"none"!==c&&e.createElement(WT,tq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n})),"none"!==c&&d&&Array.isArray(r)&&e.createElement(WT,tq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:r}))),e.createElement(cq,{points:n,props:p,clipPathId:o}))}function fq(t){var n,r,{alpha:i,baseLine:o,points:a,strokeWidth:s}=t,l=null===(n=a[0])||void 0===n?void 0:n.y,c=null===(r=a[a.length-1])||void 0===r?void 0:r.y;if(!PP(l)||!PP(c))return null;var u=i*Math.abs(l-c),d=Math.max(...a.map(e=>e.x||0));return Qx(o)?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(...o.map(e=>e.x||0),d)),Qx(d)?e.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}function pq(t){var n,r,{alpha:i,baseLine:o,points:a,strokeWidth:s}=t,l=null===(n=a[0])||void 0===n?void 0:n.x,c=null===(r=a[a.length-1])||void 0===r?void 0:r.x;if(!PP(l)||!PP(c))return null;var u=i*Math.abs(l-c),d=Math.max(...a.map(e=>e.y||0));return Qx(o)?d=Math.max(o,d):o&&Array.isArray(o)&&o.length&&(d=Math.max(...o.map(e=>e.y||0),d)),Qx(d)?e.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}function hq(t){var{alpha:n,layout:r,points:i,baseLine:o,strokeWidth:a}=t;return"vertical"===r?e.createElement(fq,{alpha:n,points:i,baseLine:o,strokeWidth:a}):e.createElement(pq,{alpha:n,points:i,baseLine:o,strokeWidth:a})}function mq(t){var{needClip:n,clipPathId:r,props:i,previousPointsRef:o,previousBaselineRef:a}=t,{points:s,baseLine:l,isAnimationActive:c,animationBegin:u,animationDuration:p,animationEasing:h,onAnimationStart:y,onAnimationEnd:v}=i,g=kM(d(()=>({points:s,baseLine:l}),[s,l]),"recharts-area-"),b=Yj(),[x,w]=m(!1),E=!x,O=f(()=>{"function"==typeof v&&v(),w(!1)},[v]),S=f(()=>{"function"==typeof y&&y(),w(!0)},[y]);if(null==b)return null;var k=o.current,P=a.current;return e.createElement(uq,{showLabels:E,points:s},i.children,e.createElement(SM,{animationId:g,begin:u,duration:p,isActive:c,easing:h,onAnimationEnd:O,onAnimationStart:S,key:g},t=>{if(k){var u,d=k.length/s.length,f=1===t?s:s.map((e,n)=>{var r=Math.floor(n*d);if(k[r]){var i=k[r];return iq(iq({},e),{},{x:ow(i.x,e.x,t),y:ow(i.y,e.y,t)})}return e});return u=Qx(l)?ow(P,l,t):sw(l)||Zx(l)?ow(P,0,t):l.map((e,n)=>{var r=Math.floor(n*d);if(Array.isArray(P)&&P[r]){var i=P[r];return iq(iq({},e),{},{x:ow(i.x,e.x,t),y:ow(i.y,e.y,t)})}return e}),t>0&&(o.current=f,a.current=u),e.createElement(dq,{points:f,baseLine:u,needClip:n,clipPathId:r,props:i})}return t>0&&(o.current=s,a.current=l),e.createElement(xb,null,c&&e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(r)},e.createElement(hq,{alpha:t,points:s,baseLine:l,layout:b,strokeWidth:i.strokeWidth}))),e.createElement(xb,{clipPath:"url(#animationClipPath-".concat(r,")")},e.createElement(dq,{points:s,baseLine:l,needClip:n,clipPathId:r,props:i})))}),e.createElement(nW,{label:i.label}))}function yq(t){var{needClip:n,clipPathId:r,props:i}=t,o=s(null),a=s();return e.createElement(mq,{needClip:n,clipPathId:r,props:i,previousPointsRef:o,previousBaselineRef:a})}class vq extends w{render(){var{hide:t,dot:n,points:r,className:i,top:o,left:a,needClip:s,xAxisId:l,yAxisId:c,width:u,height:d,id:f,baseLine:p,zIndex:h}=this.props;if(t)return null;var m=de("recharts-area",i),y=f,{r:v,strokeWidth:g}=gY(n),b=TW(n),x=2*v+g,w=s?"url(#clipPath-".concat(b?"":"dots-").concat(y,")"):void 0;return e.createElement(o$,{zIndex:h},e.createElement(xb,{className:m},s&&e.createElement("defs",null,e.createElement(cY,{clipPathId:y,xAxisId:l,yAxisId:c}),!b&&e.createElement("clipPath",{id:"clipPath-dots-".concat(y)},e.createElement("rect",{x:a-x/2,y:o-x/2,width:u+x,height:d+x}))),e.createElement(yq,{needClip:s,clipPathId:y,props:this.props})),e.createElement(HK,{points:r,mainColor:aq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(p)&&e.createElement(HK,{points:p,mainColor:aq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}}var gq={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:CN.area};function bq(t){var n,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:h,xAxisId:m,yAxisId:y}=t,v=nq(t,eq),g=Hj(),b=NF(),{needClip:x}=lY(m,y),w=dj(),{points:E,isRange:O,baseLine:S}=null!==(n=dO(e=>JY(e,t.id,w)))&&void 0!==n?n:{},k=FK();if("horizontal"!==g&&"vertical"!==g||null==k)return null;if("AreaChart"!==b&&"ComposedChart"!==b)return null;var{height:P,width:j,x:A,y:T}=k;return E&&E.length?e.createElement(vq,tq({},v,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:S,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:P,hide:d,layout:g,isAnimationActive:f,isRange:O,legendType:p,needClip:x,points:E,stroke:h,width:j,left:A,top:T,xAxisId:m,yAxisId:y})):null}var xq=(e,t,n,r,i)=>{var o=null!=n?n:t;if(Qx(o))return o;var a="horizontal"===e?i:r,s=a.scale.domain();if("number"===a.type){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return"dataMin"===o?c:"dataMax"===o||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===o?s[0]:"dataMax"===o?s[1]:s[0]};function wq(t){var n=Sw(t,gq),r=dj();return e.createElement(sK,{id:n.id,type:"area"},t=>e.createElement(e.Fragment,null,e.createElement(iK,{legendPayload:sq(n)}),e.createElement(lq,{dataKey:n.dataKey,data:n.data,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:t}),e.createElement(yK,{type:"area",id:t,data:n.data,dataKey:n.dataKey,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,stackId:LP(n.stackId),hide:n.hide,barSize:void 0,baseValue:n.baseValue,isPanorama:r,connectNulls:n.connectNulls}),e.createElement(bq,tq({},n,{id:t}))))}var Eq=e.memo(wq,fT);Eq.displayName="Area";var Oq="production"===process.env.NODE_ENV,Sq="Invariant failed";function kq(){return kq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kq.apply(null,arguments)}function Pq(t){return e.createElement(JW,kq({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},t))}var jq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(Qx(e))return e;var i=Qx(n)||sw(n);return i?e(n,r):(i||function(e,t){if(Oq)throw new Error(Sq);var n="function"==typeof t?t():t,r=n?"".concat(Sq,": ").concat(n):Sq;throw new Error(r)}(0,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),t)}},Aq=ns([oz,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),Tq=ns([Aq],e=>null==e?void 0:e.maxBarSize),Mq=ns([Kj,oz,$Y,UY,(e,t,n)=>n],(e,t,n,r,i)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),Cq=ns([Mq,e=>e.rootProps.barSize,(e,t)=>{var n=Kj(e),r=$Y(e,t),i=UY(e,t);if(null!=r&&null!=i)return"horizontal"===n?RV(e,"xAxis",r):RV(e,"yAxis",i)}],(e,t,n)=>{var r=e.filter(JN),i=e.filter(e=>null==e.stackId),o=r.reduce((e,t)=>{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{}),a=Object.entries(o).map(e=>{var r,[i,o]=e;return{stackId:i,dataKeys:o.map(e=>e.dataKey),barSize:YK(t,n,null===(r=o[0])||void 0===r?void 0:r.barSize)}});return[...a,...i.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:YK(t,n,e.barSize)}))]}),Nq=(e,t,n)=>{var r,i,o=Kj(e),a=$Y(e,t),s=UY(e,t);if(null!=a&&null!=s)return"horizontal"===o?(r=$V(e,"xAxis",a,n),i=FV(e,"xAxis",a,n)):(r=$V(e,"yAxis",s,n),i=FV(e,"yAxis",s,n)),UP(r,i)},Iq=ns([Cq,ON,e=>e.rootProps.barGap,SN,(e,t,n)=>{var r,i,o=Aq(e,t);if(null==o)return 0;var a=$Y(e,t),s=UY(e,t);if(null==a||null==s)return 0;var l,c,u=Kj(e),d=ON(e),{maxBarSize:f}=o,p=sw(f)?d:f;return"horizontal"===u?(l=$V(e,"xAxis",a,n),c=FV(e,"xAxis",a,n)):(l=$V(e,"yAxis",s,n),c=FV(e,"yAxis",s,n)),null!==(r=null!==(i=UP(l,c,!0))&&void 0!==i?i:p)&&void 0!==r?r:0},Nq,Tq],(e,t,n,r,i,o,a)=>{var s=sw(a)?t:a,l=function(e,t,n,r,i){var o,a=r.length;if(!(a<1)){var s,l=rw(e,n,0,!0),c=[];if(PP(null===(o=r[0])||void 0===o?void 0:o.barSize)){var u=!1,d=n/a,f=r.reduce((e,t)=>e+(t.barSize||0),0);(f+=(a-1)*l)>=n&&(f-=(a-1)*l,l=0),f>=n&&d>0&&(u=!0,f=a*(d*=.9));var p={offset:((n-f)/2|0)-l,size:0};s=r.reduce((e,t)=>{var n,r={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p.offset+p.size+l,size:u?d:null!==(n=t.barSize)&&void 0!==n?n:0}},i=[...e,r];return p=r.position,i},c)}else{var h=rw(t,n,0,!0);n-2*h-(a-1)*l<=0&&(l=0);var m=(n-2*h-(a-1)*l)/a;m>1&&(m>>=0);var y=PP(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h+(m+l)*n+(m-y)/2,size:y}}],c)}return s}}(n,r,i!==o?i:o,e,s);return i!==o&&null!=l&&(l=l.map(e=>GK(GK({},e),{},{position:GK(GK({},e.position),{},{offset:e.position.offset-i/2})}))),l}),Dq=ns([Iq,Aq],(e,t)=>{if(null!=e&&null!=t){var n=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=n)return n.position}}),_q=ns([(e,t,n)=>{var r=Kj(e),i=$Y(e,t),o=UY(e,t);if(null!=i&&null!=o)return"horizontal"===r?Tz(e,"yAxis",o,n):Tz(e,"xAxis",i,n)},Aq],(e,t)=>{var n=XN(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(e=>e.key===n)}}}}),Rq=ns([sj,cj,(e,t,n)=>{var r=$Y(e,t);if(null!=r)return $V(e,"xAxis",r,n)},(e,t,n)=>{var r=UY(e,t);if(null!=r)return $V(e,"yAxis",r,n)},(e,t,n)=>{var r=$Y(e,t);if(null!=r)return FV(e,"xAxis",r,n)},(e,t,n)=>{var r=UY(e,t);if(null!=r)return FV(e,"yAxis",r,n)},Dq,Kj,IC,Nq,_q,Aq,(e,t,n,r)=>r],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:h,dataEndIndex:m}=l;if(null!=d&&null!=a&&null!=t&&("horizontal"===s||"vertical"===s)&&null!=n&&null!=r&&null!=i&&null!=o&&null!=c){var y,{data:v}=d;if(null!=(y=null!=v&&v.length>0?v:null==p?void 0:p.slice(h,m+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:o,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:h,parentViewBox:m,dataStartIndex:y}=e,v="horizontal"===t?l:s,g=d?v.scale.domain():null,b=(e=>{var{numericAxis:t}=e,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]})({numericAxis:v}),x=v.scale.map(b);return f.map((e,f)=>{var v,w,E,O,S,k;if(d){var P=d[f+y];if(null==P)return null;v=((e,t)=>{if(!t||2!==t.length||!Qx(t[0])||!Qx(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Qx(e[0])||e[0]<n)&&(i[0]=n),(!Qx(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i})(P,g)}else v=CP(e,n),Array.isArray(v)||(v=[b,v]);var j=jq(r,oG)(v[1],f);if("horizontal"===t){var A,T=l.scale.map(v[0]),M=l.scale.map(v[1]);if(null==T||null==M)return null;w=VP({axis:s,ticks:c,bandSize:a,offset:o.offset,entry:e,index:f}),E=null!==(A=null!=M?M:T)&&void 0!==A?A:void 0,O=o.size;var C=T-M;if(S=Zx(C)?0:C,k={x:w,y:p.top,width:O,height:p.height},Math.abs(j)>0&&Math.abs(S)<Math.abs(j)){var N=Xx(S||j)*(Math.abs(j)-Math.abs(S));E-=N,S+=N}}else{var I=s.scale.map(v[0]),D=s.scale.map(v[1]);if(null==I||null==D)return null;if(w=I,E=VP({axis:l,ticks:u,bandSize:a,offset:o.offset,entry:e,index:f}),O=D-I,S=o.size,k={x:p.left,y:E,width:p.width,height:S},Math.abs(j)>0&&Math.abs(O)<Math.abs(j))O+=Xx(O||j)*(Math.abs(j)-Math.abs(O))}return null!=w&&null!=E&&null!=O&&null!=S&&(i||0!==O&&0!==S)?Yq(Yq({},e),{},{stackedBarStart:x,x:w,y:E,width:O,height:S,value:d?v:v[1],payload:e,background:k,tooltipPosition:{x:w+O/2,y:E+S/2},parentViewBox:m,originalDataIndex:f},h&&h[f]&&h[f].props):null}).filter(Boolean)}({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:y,offset:e,cells:f,dataStartIndex:h})}}),Lq=["index"];function zq(){return zq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zq.apply(null,arguments)}var Vq=o(void 0),Bq=t=>{var{index:n}=t,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,Lq),o=(e=>{var t=i(Vq);if(null!=t){var{stackId:n}=t;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(n,e),")")}})(n);return e.createElement(xb,zq({className:"recharts-bar-stack-layer",clipPath:o},r))},Fq=["onMouseEnter","onMouseLeave","onClick"],$q=["value","background","tooltipPosition"],Uq=["id"],Wq=["onMouseEnter","onClick","onMouseLeave"];function Kq(){return Kq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kq.apply(null,arguments)}function Hq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hq(Object(n),!0).forEach(function(t){qq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gq(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Xq=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:KP(n,t),payload:e}]},Zq=e.memo(t=>{var{dataKey:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l,tooltipType:c,id:u}=t,d={dataDefinedOnItem:void 0,getPosition:uw,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:n,nameKey:void 0,name:KP(a,n),hide:s,type:c,color:o,unit:l,graphicalItemId:u}};return e.createElement(rK,{tooltipEntrySettings:d})});function Jq(t){var n=dO(hF),{data:r,dataKey:i,background:o,allOtherBarProps:a}=t,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,u=Gq(a,Fq),d=eK(s,i,a.id),f=tK(l),p=nK(c,i,a.id);if(!o||null==r)return null;var h,m,y=pb(o);return e.createElement(o$,{zIndex:(h=o,m=CN.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&PP(h.zIndex)?h.zIndex:m)},r.map((t,r)=>{var{value:a,background:s,tooltipPosition:l}=t,c=Gq(t,$q);if(!s)return null;var h=d(t,r),m=f(t,r),v=p(t,r),g=Yq(Yq(Yq(Yq(Yq({option:o,isActive:String(r)===n},c),{},{fill:"#eee"},s),y),ww(u,t,r)),{},{onMouseEnter:h,onMouseLeave:m,onClick:v,dataKey:i,index:r,className:"recharts-bar-background-rectangle"});return e.createElement(Pq,Kq({key:"background-bar-".concat(r)},g))}))}function Qq(t){var{showLabels:n,children:r,rects:i}=t,o=null==i?void 0:i.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return Yq(Yq({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return e.createElement(QU,{value:n?o:void 0},r)}function eG(t){var{shape:n,activeBar:r,baseProps:i,entry:o,index:a,dataKey:s}=t,c=dO(hF),u=dO(yF),d=r&&String(o.originalDataIndex)===c&&(null==u||s===u),[p,h]=m(!1),[y,v]=m(!1);l(()=>{var e;return d?(h(!0),e=requestAnimationFrame(()=>{v(!0)})):v(!1),()=>{cancelAnimationFrame(e)}},[d]);var g,b=f(()=>{d||h(!1)},[d]),x=d&&y,w=d||p;g=d?!0===r?n:r:n;var E=e.createElement(Pq,Kq({},i,{name:String(i.name)},o,{isActive:x,option:g,index:a,dataKey:s,onTransitionEnd:b}));return w?e.createElement(o$,{zIndex:CN.activeBar},e.createElement(Bq,{index:o.originalDataIndex},E)):E}function tG(t){var{shape:n,baseProps:r,entry:i,index:o,dataKey:a}=t;return e.createElement(Pq,Kq({},r,{name:String(r.name)},i,{isActive:!1,option:n,index:o,dataKey:a}))}function nG(t){var n,{data:r,props:i}=t,o=null!==(n=fb(i))&&void 0!==n?n:{},{id:a}=o,s=Gq(o,Uq),{shape:l,dataKey:c,activeBar:u}=i,{onMouseEnter:d,onClick:f,onMouseLeave:p}=i,h=Gq(i,Wq),m=eK(d,c,a),y=tK(p),v=nK(f,c,a);return r?e.createElement(e.Fragment,null,r.map((t,n)=>e.createElement(Bq,Kq({index:t.originalDataIndex,key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value,"-").concat(n),className:"recharts-bar-rectangle"},ww(h,t,n),{onMouseEnter:m(t,n),onMouseLeave:y(t,n),onClick:v(t,n)}),u?e.createElement(eG,{shape:l,activeBar:u,baseProps:s,entry:t,index:n,dataKey:c}):e.createElement(tG,{shape:l,baseProps:s,entry:t,index:n,dataKey:c})))):null}function rG(t){var{props:n,previousRectanglesRef:r}=t,{data:i,layout:o,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=n,p=r.current,h=kM(n,"recharts-bar-"),[y,v]=m(!1),g=!y,b=f(()=>{"function"==typeof u&&u(),v(!1)},[u]),x=f(()=>{"function"==typeof d&&d(),v(!0)},[d]);return e.createElement(Qq,{showLabels:g,rects:i},e.createElement(SM,{animationId:h,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:b,onAnimationStart:x,key:h},t=>{var a=1===t?i:null==i?void 0:i.map((e,n)=>{var r=p&&p[n];if(r)return Yq(Yq({},e),{},{x:ow(r.x,e.x,t),y:ow(r.y,e.y,t),width:ow(r.width,e.width,t),height:ow(r.height,e.height,t)});if("horizontal"===o){var i=ow(0,e.height,t),a=ow(e.stackedBarStart,e.y,t);return Yq(Yq({},e),{},{y:a,height:i})}var s=ow(0,e.width,t),l=ow(e.stackedBarStart,e.x,t);return Yq(Yq({},e),{},{width:s,x:l})});return t>0&&(r.current=null!=a?a:null),null==a?null:e.createElement(xb,null,e.createElement(nG,{props:n,data:a}))}),e.createElement(nW,{label:n.label}),n.children)}function iG(t){var n=s(null);return e.createElement(rG,{previousRectanglesRef:n,props:t})}var oG=0,aG=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:CP(e,t)}};class sG extends w{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||null==n)return null;var u=de("recharts-bar",i),d=c;return e.createElement(xb,{className:u,id:c},s&&e.createElement("defs",null,e.createElement(cY,{clipPathId:d,xAxisId:o,yAxisId:a})),e.createElement(xb,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},e.createElement(Jq,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),e.createElement(iG,this.props)))}}var lG={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:oG,xAxisId:0,yAxisId:0,zIndex:CN.bar};function cG(t){var n,{xAxisId:r,yAxisId:i,hide:o,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f}=t,{needClip:p}=lY(r,i),h=Hj(),m=dj(),y=kW(t.children,W$),v=dO(e=>Rq(e,t.id,m,y));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==v?void 0:v[0];return n=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,e.createElement(sY,{xAxisId:r,yAxisId:i,data:v,dataPointFormatter:aG,errorBarOffset:n},e.createElement(sG,Kq({},t,{layout:h,needClip:p,data:v,xAxisId:r,yAxisId:i,hide:o,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f})))}function uG(t){var n,r,o=Sw(t,lG),a=(n=o.stackId,null!=(r=i(Vq))?r.stackId:null!=n?LP(n):void 0),s=dj();return e.createElement(sK,{id:o.id,type:"bar"},t=>e.createElement(e.Fragment,null,e.createElement(iK,{legendPayload:Xq(o)}),e.createElement(Zq,{dataKey:o.dataKey,stroke:o.stroke,strokeWidth:o.strokeWidth,fill:o.fill,name:o.name,hide:o.hide,unit:o.unit,tooltipType:o.tooltipType,id:t}),e.createElement(yK,{type:"bar",id:t,data:void 0,xAxisId:o.xAxisId,yAxisId:o.yAxisId,zAxisId:0,dataKey:o.dataKey,stackId:a,hide:o.hide,barSize:o.barSize,minPointSize:o.minPointSize,maxBarSize:o.maxBarSize,isPanorama:s,hasCustomShape:null!=o.shape}),e.createElement(o$,{zIndex:o.zIndex},e.createElement(cG,Kq({},o,{id:t})))))}var dG=e.memo(uG,fT);dG.displayName="Bar";var fG=["option","isActive"];function pG(){return pG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pG.apply(null,arguments)}function hG(t){var{option:n,isActive:r}=t,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,fG);return"string"==typeof n?e.createElement(JW,pG({option:e.createElement(gw,pG({type:n},i)),isActive:r,shapeType:"symbols"},i)):e.createElement(JW,pG({option:n,isActive:r,shapeType:"symbols"},i))}var mG=ns([oz,(e,t,n,r,i)=>i],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),yG=ns([(e,t,n,r,i,o,a)=>NC(e,0,0,a),(e,t,n,r,i,o,a)=>$V(e,"xAxis",t,a),(e,t,n,r,i,o,a)=>FV(e,"xAxis",t,a),(e,t,n,r,i,o,a)=>$V(e,"yAxis",n,a),(e,t,n,r,i,o,a)=>FV(e,"yAxis",n,a),(e,t,n,r)=>KV(e,"zAxis",r,!1),mG,(e,t,n,r,i,o)=>o],(e,t,n,r,i,o,a,s)=>{var l,{chartData:c,dataStartIndex:u,dataEndIndex:d}=e;if(null!=a&&(null!=(l=null!=(null==a?void 0:a.data)&&a.data.length>0?a.data:null==c?void 0:c.slice(u,d+1))&&null!=t&&null!=r&&null!=n&&null!=i&&0!==(null==n?void 0:n.length)&&0!==(null==i?void 0:i.length)))return function(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:i,scatterSettings:o,xAxisTicks:a,yAxisTicks:s,cells:l}=e,c=sw(n.dataKey)?o.dataKey:n.dataKey,u=sw(r.dataKey)?o.dataKey:r.dataKey,d=i&&i.dataKey,f=i?i.range:QL.range,p=f&&f[0],h=n.scale.bandwidth?n.scale.bandwidth():0,m=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((e,t)=>{var f=CP(e,c),y=CP(e,u),v=!sw(d)&&CP(e,d)||"-",g=[{name:sw(n.dataKey)?o.name:n.name||String(n.dataKey),unit:n.unit||"",value:f,payload:e,dataKey:c,type:o.tooltipType,graphicalItemId:o.id},{name:sw(r.dataKey)?o.name:r.name||String(r.dataKey),unit:r.unit||"",value:y,payload:e,dataKey:u,type:o.tooltipType,graphicalItemId:o.id}];"-"!==v&&null!=i&&g.push({name:i.name||i.dataKey,unit:i.unit||"",value:v,payload:e,dataKey:d,type:o.tooltipType,graphicalItemId:o.id});var b=zP({axis:n,ticks:a,bandSize:h,entry:e,index:t,dataKey:c}),x=zP({axis:r,ticks:s,bandSize:m,entry:e,index:t,dataKey:u}),w="-"!==v&&null!=i?i.scale.map(v):p,E=null==w?0:Math.sqrt(Math.max(w,0)/Math.PI);return OG(OG({},e),{},{cx:b,cy:x,x:null==b?void 0:b-E,y:null==x?void 0:x-E,width:2*E,height:2*E,size:w,node:{x:f,y:y,z:v},tooltipPayload:g,tooltipPosition:{x:b,y:x},payload:e},l&&l[t]&&l[t].props)})}({displayedData:l,xAxis:t,yAxis:r,zAxis:o,scatterSettings:a,xAxisTicks:n,yAxisTicks:i,cells:s})}),vG=["id"],gG=["onMouseEnter","onClick","onMouseLeave"],bG=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function xG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wG(){return wG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wG.apply(null,arguments)}function EG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EG(Object(n),!0).forEach(function(t){SG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kG=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:KP(n,t),payload:e}]},PG=e.memo(t=>{var{dataKey:n,points:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c,id:u}=t,d={dataDefinedOnItem:null==r?void 0:r.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==r||null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:o,fill:a,nameKey:void 0,dataKey:n,name:KP(s,n),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return e.createElement(rK,{tooltipEntrySettings:d})});function jG(t){var{points:n,props:r}=t,{line:i,lineType:o,lineJointType:a}=r;if(!i)return null;var s,l,c=fb(r),u=pb(i);if("joint"===o)s=n.map(e=>{var t,n;return{x:null!==(t=e.cx)&&void 0!==t?t:null,y:null!==(n=e.cy)&&void 0!==n?n:null}});else if("fitting"===o){var{xmin:d,xmax:f,a:p,b:h}=(e=>{for(var t=e.length,n=0,r=0,i=0,o=0,a=1/0,s=-1/0,l=0,c=0,u=0;u<t;u++){var d,f;n+=l=(null===(d=e[u])||void 0===d?void 0:d.cx)||0,r+=c=(null===(f=e[u])||void 0===f?void 0:f.cy)||0,i+=l*c,o+=l*l,a=Math.min(a,l),s=Math.max(s,l)}var p=t*o!==n*n?(t*i-n*r)/(t*o-n*n):0;return{xmin:a,xmax:s,a:p,b:(r-p*n)/t}})(n),m=e=>p*e+h;s=[{x:d,y:m(d)},{x:f,y:m(f)}]}var y=OG(OG(OG({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:s});return l=e.isValidElement(i)?e.cloneElement(i,y):"function"==typeof i?i(y):e.createElement(WT,wG({},y,{type:a})),e.createElement(xb,{className:"recharts-scatter-line",key:"recharts-scatter-line"},l)}function AG(t){var{showLabels:n,points:r,children:i}=t,o=Bj(),a=d(()=>null==r?void 0:r.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return OG(OG({},r),{},{value:void 0,payload:e.payload,viewBox:r,parentViewBox:o,fill:void 0})}),[o,r]);return e.createElement(QU,{value:n?a:void 0},i)}function TG(t){var n,{points:r,allOtherScatterProps:i}=t,{shape:o,activeShape:a,dataKey:s}=i,{id:l}=i,c=xG(i,vG),u=dO(hF),{onMouseEnter:d,onClick:f,onMouseLeave:p}=i,h=xG(i,gG),m=eK(d,s,l),y=tK(p),v=nK(f,s,l);if(n=r,!(Array.isArray(n)&&n.length>0))return null;var g=fb(c);return e.createElement(e.Fragment,null,e.createElement(jG,{points:r,props:c}),r.map((t,n)=>{var r=null!=a&&!1!==a,i=r&&u===String(n),s=r&&i?a:o,c=OG(OG(OG({},g),t),{},{index:n,[JP]:String(l)});return e.createElement(o$,{key:"symbol-".concat(null==t?void 0:t.cx,"-").concat(null==t?void 0:t.cy,"-").concat(null==t?void 0:t.size,"-").concat(n),zIndex:i?CN.activeDot:void 0},e.createElement(xb,wG({className:"recharts-scatter-symbol"},ww(h,t,n),{onMouseEnter:m(t,n),onMouseLeave:y(t,n),onClick:v(t,n)}),e.createElement(hG,wG({option:s,isActive:i},c))))}))}function MG(t){var{previousPointsRef:n,props:r}=t,{points:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l}=r,c=n.current,u=kM(r,"recharts-scatter-"),[d,p]=m(!1),h=f(()=>{p(!1)},[]),y=f(()=>{p(!0)},[]),v=!d;return e.createElement(AG,{showLabels:v,points:i},r.children,e.createElement(SM,{animationId:u,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:h,onAnimationStart:y,key:u},t=>{var o=1===t?i:null==i?void 0:i.map((e,n)=>{var r=c&&c[n];return OG(OG({},e),{},r?{cx:null==e.cx?void 0:ow(r.cx,e.cx,t),cy:null==e.cy?void 0:ow(r.cy,e.cy,t),size:ow(r.size,e.size,t)}:{size:ow(0,e.size,t)})});return t>0&&(n.current=o),e.createElement(xb,null,e.createElement(TG,{points:o,allOtherScatterProps:r,showLabels:v}))}),e.createElement(nW,{label:r.label}))}var CG=(e,t,n)=>({x:e.cx,y:e.cy,value:Number("x"===n?e.node.x:e.node.y),errorVal:CP(e,t)});function NG(t){var{hide:n,points:r,className:i,needClip:o,xAxisId:a,yAxisId:l,id:c}=t,u=s(null);if(n)return null;var d=de("recharts-scatter",i),f=c;return e.createElement(o$,{zIndex:t.zIndex},e.createElement(xb,{className:d,clipPath:o?"url(#clipPath-".concat(f,")"):void 0,id:c},o&&e.createElement("defs",null,e.createElement(cY,{clipPathId:f,xAxisId:a,yAxisId:l})),e.createElement(sY,{xAxisId:a,yAxisId:l,data:r,dataPointFormatter:CG,errorBarOffset:0},e.createElement(xb,{key:"recharts-scatter-symbols"},e.createElement(MG,{props:t,previousPointsRef:u})))))}var IG={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:CN.scatter};function DG(t){var n=Sw(t,IG),{animationBegin:r,animationDuration:i,animationEasing:o,hide:a,isAnimationActive:s,legendType:l,lineJointType:c,lineType:u,shape:f,xAxisId:p,yAxisId:h,zAxisId:m}=n,y=xG(n,bG),{needClip:v}=lY(p,h),g=d(()=>kW(t.children,W$),[t.children]),b=dj(),x=dO(e=>yG(e,p,h,m,t.id,g,b));return null==v||null==x?null:e.createElement(e.Fragment,null,e.createElement(PG,{dataKey:t.dataKey,points:x,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,tooltipType:t.tooltipType,id:t.id}),e.createElement(NG,wG({},y,{xAxisId:p,yAxisId:h,zAxisId:m,lineType:u,lineJointType:c,legendType:l,shape:f,hide:a,isAnimationActive:s,animationBegin:r,animationDuration:i,animationEasing:o,points:x,needClip:v})))}function _G(t){var n=Sw(t,IG),r=dj();return e.createElement(sK,{id:n.id,type:"scatter"},t=>e.createElement(e.Fragment,null,e.createElement(iK,{legendPayload:kG(n)}),e.createElement(yK,{type:"scatter",id:t,data:n.data,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:n.zAxisId,dataKey:n.dataKey,hide:n.hide,name:n.name,tooltipType:n.tooltipType,isPanorama:r}),e.createElement(DG,wG({},n,{id:t}))))}var RG=e.memo(_G,fT);RG.displayName="Scatter";var LG=["domain","range"],zG=["domain","range"];function VG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BG(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function FG(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=VG(e,LG),{domain:o,range:a}=t,s=VG(t,zG);return!!BG(n,o)&&(!!BG(r,a)&&fT(i,s))}var $G=["type"],UG=["dangerouslySetInnerHTML","ticks","scale"],WG=["id","scale"];function KG(){return KG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KG.apply(null,arguments)}function HG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HG(Object(n),!0).forEach(function(t){qG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function XG(e){var t=sO(),n=s(null),i=Yj(),{type:o}=e,a=GG(e,$G),l=IN(i,"xAxis",o),c=d(()=>{if(null!=l)return YG(YG({},a),{},{type:l})},[a,l]);return r(()=>{null!=c&&(null===n.current?t(AK(c)):n.current!==c&&t(TK({prev:n.current,next:c})),n.current=c)},[c,t]),r(()=>()=>{n.current&&(t(MK(n.current)),n.current=null)},[t]),null}var ZG=t=>{var{xAxisId:n,className:r}=t,i=dO(cj),o=dj(),a="xAxis",s=dO(e=>BV(e,a,n,o)),l=dO(e=>MV(e,n)),c=dO(e=>IV(e,n)),u=dO(e=>qL(e,n));if(null==l||null==c||null==u)return null;var{dangerouslySetInnerHTML:d,ticks:f,scale:p}=t,h=GG(t,UG),{id:m,scale:y}=u,v=GG(u,WG);return e.createElement(DH,KG({},h,v,{x:c.x,y:c.y,width:l.width,height:l.height,className:de("recharts-".concat(a," ").concat(a),r),viewBox:i,ticks:s,axisType:a,axisId:n}))},JG={allowDataOverflow:YL.allowDataOverflow,allowDecimals:YL.allowDecimals,allowDuplicatedCategory:YL.allowDuplicatedCategory,angle:YL.angle,axisLine:AH.axisLine,height:YL.height,hide:!1,includeHidden:YL.includeHidden,interval:YL.interval,label:!1,minTickGap:YL.minTickGap,mirror:YL.mirror,orientation:YL.orientation,padding:YL.padding,reversed:YL.reversed,scale:YL.scale,tick:YL.tick,tickCount:YL.tickCount,tickLine:AH.tickLine,tickSize:AH.tickSize,type:YL.type,niceTicks:YL.niceTicks,xAxisId:0},QG=t=>{var n=Sw(t,JG);return e.createElement(e.Fragment,null,e.createElement(XG,{allowDataOverflow:n.allowDataOverflow,allowDecimals:n.allowDecimals,allowDuplicatedCategory:n.allowDuplicatedCategory,angle:n.angle,dataKey:n.dataKey,domain:n.domain,height:n.height,hide:n.hide,id:n.xAxisId,includeHidden:n.includeHidden,interval:n.interval,minTickGap:n.minTickGap,mirror:n.mirror,name:n.name,orientation:n.orientation,padding:n.padding,reversed:n.reversed,scale:n.scale,tick:n.tick,tickCount:n.tickCount,tickFormatter:n.tickFormatter,ticks:n.ticks,type:n.type,unit:n.unit,niceTicks:n.niceTicks}),e.createElement(ZG,n))},eX=e.memo(QG,FG);eX.displayName="XAxis";var tX=["type"],nX=["dangerouslySetInnerHTML","ticks","scale"],rX=["id","scale"];function iX(){return iX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iX.apply(null,arguments)}function oX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oX(Object(n),!0).forEach(function(t){sX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lX(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cX(e){var t=sO(),n=s(null),i=Yj(),{type:o}=e,a=lX(e,tX),l=IN(i,"yAxis",o),c=d(()=>{if(null!=l)return aX(aX({},a),{},{type:l})},[l,a]);return r(()=>{null!=c&&(null===n.current?t(CK(c)):n.current!==c&&t(NK({prev:n.current,next:c})),n.current=c)},[c,t]),r(()=>()=>{n.current&&(t(IK(n.current)),n.current=null)},[t]),null}function uX(t){var{yAxisId:n,className:i,width:o,label:a}=t,l=s(null),c=s(null),u=dO(cj),d=dj(),f=sO(),p="yAxis",m=dO(e=>_V(e,n)),y=dO(e=>DV(e,n)),v=dO(e=>BV(e,p,n,d)),g=dO(e=>ZL(e,n));if(r(()=>{if("auto"===o&&m&&!FU(a)&&!h(a)&&null!=g){var e=l.current;if(e){var t=e.getCalculatedWidth();Math.round(m.width)!==Math.round(t)&&f(LK({id:n,width:t}))}}},[v,m,f,a,n,o,g]),null==m||null==y||null==g)return null;var{dangerouslySetInnerHTML:b,ticks:x,scale:w}=t,E=lX(t,nX),{id:O,scale:S}=g,k=lX(g,rX);return e.createElement(DH,iX({},E,k,{ref:l,labelRef:c,x:y.x,y:y.y,tickTextProps:"auto"===o?{width:void 0}:{width:o},width:m.width,height:m.height,className:de("recharts-".concat(p," ").concat(p),i),viewBox:u,ticks:v,axisType:p,axisId:n}))}var dX={allowDataOverflow:XL.allowDataOverflow,allowDecimals:XL.allowDecimals,allowDuplicatedCategory:XL.allowDuplicatedCategory,angle:XL.angle,axisLine:AH.axisLine,hide:!1,includeHidden:XL.includeHidden,interval:XL.interval,label:!1,minTickGap:XL.minTickGap,mirror:XL.mirror,orientation:XL.orientation,padding:XL.padding,reversed:XL.reversed,scale:XL.scale,tick:XL.tick,tickCount:XL.tickCount,tickLine:AH.tickLine,tickSize:AH.tickSize,type:XL.type,niceTicks:XL.niceTicks,width:XL.width,yAxisId:0},fX=t=>{var n=Sw(t,dX);return e.createElement(e.Fragment,null,e.createElement(cX,{interval:n.interval,id:n.yAxisId,scale:n.scale,type:n.type,domain:n.domain,allowDataOverflow:n.allowDataOverflow,dataKey:n.dataKey,allowDuplicatedCategory:n.allowDuplicatedCategory,allowDecimals:n.allowDecimals,tickCount:n.tickCount,padding:n.padding,includeHidden:n.includeHidden,reversed:n.reversed,ticks:n.ticks,width:n.width,orientation:n.orientation,mirror:n.mirror,hide:n.hide,unit:n.unit,name:n.name,angle:n.angle,minTickGap:n.minTickGap,tick:n.tick,tickFormatter:n.tickFormatter,niceTicks:n.niceTicks}),e.createElement(uX,n))},pX=e.memo(fX,FG);pX.displayName="YAxis";var hX=ns([(e,t)=>t,Kj,YN,tI,iF,cF,RF,sj],(e,t,n,r,i,o,a,s)=>{if(e&&t&&r&&i&&o)return"horizontal"===t||"vertical"===t?((e,t,n,r,i,o,a)=>{if(e&&n&&r&&i&&function(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,a)){var s=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),l=CF(s,o,i,n,r),c=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("horizontal"===e)return{x:i.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}})(t,i,l,e);return{activeIndex:String(l),activeCoordinate:c}}})(e,t,r,i,o,a,s):KF(e,t,n,r,i,o,a)});function mX(e){var t,n,r,i=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var o=e.currentTarget.getBBox();t=o.width>0?i.width/o.width:1,n=o.height>0?i.height/o.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?i.width/a.offsetWidth:1,n=a.offsetHeight>0?i.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-i.left)/t),relativeY:Math.round((r-i.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var yX=pk("mouseClick"),vX=vP();vX.startListening({actionCreator:yX,effect:(e,t)=>{var n=e.payload,r=hX(t.getState(),mX(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(cB({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var gX=pk("mouseMove"),bX=vP(),xX=null,wX=null,EX=null;function OX(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}bX.startListening({actionCreator:gX,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a="all"===o||(null==o?void 0:o.includes("mousemove"));null!==xX&&(cancelAnimationFrame(xX),xX=null),null===wX||"number"==typeof i&&a||(clearTimeout(wX),wX=null),EX=mX(n);var s=()=>{var e=t.getState(),n=XV(e,e.tooltip.settings.shared);if(!EX)return xX=null,void(wX=null);if("axis"===n){var r=hX(e,EX);null!=(null==r?void 0:r.activeIndex)?t.dispatch(lB({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(aB())}xX=null,wX=null};a?"raf"===i?xX=requestAnimationFrame(s):"number"==typeof i&&null===wX&&(wX=setTimeout(s,i)):s()}});var SX={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},kX=Vk({name:"rootProps",initialState:SX,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:SX.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),PX=kX.reducer,{updateOptions:jX}=kX.actions,AX=Vk({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),{updatePolarOptions:TX}=AX.actions,MX=AX.reducer,CX=pk("keyDown"),NX=pk("focus"),IX=pk("blur"),DX=vP(),_X=null,RX=null,LX=null;function zX(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}DX.startListening({actionCreator:CX,effect:(e,t)=>{LX=e.payload,null!==_X&&(cancelAnimationFrame(_X),_X=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,o="all"===i||i.includes("keydown");null===RX||"number"==typeof r&&o||(clearTimeout(RX),RX=null);var a=()=>{try{var e=t.getState();if(!(!1!==e.rootProps.accessibilityLayer))return;var{keyboardInteraction:n}=e.tooltip,r=LX;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var i=gB(n,_B(e),Pz(e),eF(e)),o=null==i?-1:Number(i),a=!Number.isFinite(o)||o<0,s=cF(e),l=_B(e),c=XV(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=BF(e,c,"hover",String(n.index));return void t.dispatch(dB({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===HV(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=Pz(e),m=eF(e),y=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var v=0;v<l.length;v++)if(null!=gB(y(v),l,h,m)){d=v;break}}else for(var g=l.length-1;g>=0;g--)if(null!=gB(y(g),l,h,m)){d=g;break}if(d<0)return}else{d=o+p*f;var b=(null==s?void 0:s.length)||l.length;if(0===b||d>=b||d<0)return}var x=BF(e,c,"hover",String(d));t.dispatch(dB({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{_X=null,RX=null}};o?"raf"===r?_X=requestAnimationFrame(a):"number"==typeof r&&null===RX&&(a(),LX=null,RX=setTimeout(()=>{LX?a():(RX=null,_X=null)},r)):a()}}),DX.startListening({actionCreator:NX,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=XV(n,n.tooltip.settings.shared),o=BF(n,i,"hover",String("0"));t.dispatch(dB({active:!0,activeIndex:"0",activeCoordinate:o}))}}}}),DX.startListening({actionCreator:IX,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;r.active&&t.dispatch(dB({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var VX=pk("externalEvent"),BX=vP(),FX=new Map,$X=new Map,UX=new Map;BX.startListening({actionCreator:VX,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){var i=r.type,o=zX(r);UX.set(i,{handler:n,reactEvent:o});var a=FX.get(i);void 0!==a&&(cancelAnimationFrame(a),FX.delete(i));var s=t.getState(),{throttleDelay:l,throttledEvents:c}=s.eventSettings,u=c,d="all"===u||(null==u?void 0:u.includes(i)),f=$X.get(i);void 0===f||"number"==typeof l&&d||(clearTimeout(f),$X.delete(i));var p=()=>{var e=UX.get(i);try{if(!e)return;var{handler:n,reactEvent:r}=e,o=t.getState(),a={activeCoordinate:xF(o),activeDataKey:yF(o),activeIndex:hF(o),activeLabel:mF(o),activeTooltipIndex:hF(o),isTooltipActive:wF(o)};n&&n(a,r)}finally{FX.delete(i),$X.delete(i),UX.delete(i)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);FX.set(i,h)}else if("number"==typeof l){if(!$X.has(i)){p();var m=setTimeout(p,l);$X.set(i,m)}}else p();else p()}}});var WX=ns([EB],e=>e.tooltipItemPayloads),KX=ns([WX,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var{getPosition:i}=r;if(null!=i)return i(t)}}}),HX=pk("touchMove"),YX=vP(),qX=null,GX=null,XX=null,ZX=null;YX.startListening({actionCreator:HX,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){ZX=zX(n);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,a="all"===o||o.includes("touchmove");null!==qX&&(cancelAnimationFrame(qX),qX=null),null===GX||"number"==typeof i&&a||(clearTimeout(GX),GX=null),XX=Array.from(n.touches).map(e=>mX({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=ZX){var e=t.getState(),n=XV(e,e.tooltip.settings.shared);if("axis"===n){var r,i=null===(r=XX)||void 0===r?void 0:r[0];if(null==i)return qX=null,void(GX=null);var o=hX(e,i);null!=(null==o?void 0:o.activeIndex)&&t.dispatch(lB({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===n){var a,s=ZX.touches[0];if(null==document.elementFromPoint||null==s)return;var l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute("data-recharts-item-index"),u=null!==(a=l.getAttribute(JP))&&void 0!==a?a:void 0,d=CB(e).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:f}=d,p=KX(e,c,u);t.dispatch(iB({activeDataKey:f,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}qX=null,GX=null}};a?"raf"===i?qX=requestAnimationFrame(s):"number"==typeof i&&null===GX&&(s(),ZX=null,GX=setTimeout(()=>{ZX?s():(GX=null,qX=null)},i)):s()}}});var JX={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},QX=Vk({name:"eventSettings",initialState:JX,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:eZ}=QX.actions,tZ=YO({brush:tH,cartesianAxis:zK,chartData:T$,errorBars:iY,eventSettings:QX.reducer,graphicalItems:mK,layout:SP,legend:YA,options:E$,polarAxis:uW,polarOptions:MX,referenceElements:cH,renderedTicks:EH,rootProps:PX,tooltip:fB,zIndex:i$});function nZ(t){var{preloadedState:n,children:r,reduxStoreName:i}=t,o=dj(),a=s(null);if(o)return r;null==a.current&&(a.current=function(e){return Nk({reducer:tZ,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([vX.middleware,bX.middleware,DX.middleware,BX.middleware,YX.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(Ck({type:"raf"}))},devTools:{serialize:{replacer:OX},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(n,i));var l=oO;return e.createElement(cT,{context:l,store:a.current},r)}function rZ(e){var{layout:t,margin:n}=e,r=sO(),i=dj();return l(()=>{i||(r(wP(t)),r(xP(n)))},[r,i,t,n]),null}var iZ=x(rZ,fT);function oZ(e){var t=sO();return l(()=>{t(jX(e))},[t,e]),null}var aZ=x(e=>{var t=sO();return l(()=>{t(eZ(e))},[t,e]),null},fT);function sZ(t){var{zIndex:n,isPanorama:i}=t,o=s(null),a=sO();return r(()=>(o.current&&a(n$({zIndex:n,element:o.current,isPanorama:i})),()=>{a(r$({zIndex:n,isPanorama:i}))}),[a,n,i]),e.createElement("g",{tabIndex:-1,ref:o,className:"recharts-zIndex-layer_".concat(n)})}function lZ(t){var{children:n,isPanorama:r}=t,i=dO(YF);if(!i||0===i.length)return n;var o=i.filter(e=>e<0),a=i.filter(e=>e>0);return e.createElement(e.Fragment,null,o.map(t=>e.createElement(sZ,{key:t,zIndex:t,isPanorama:r})),n,a.map(t=>e.createElement(sZ,{key:t,zIndex:t,isPanorama:r})))}var cZ=["children"];function uZ(){return uZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uZ.apply(null,arguments)}var dZ={width:"100%",height:"100%",display:"block"},fZ=a((t,n)=>{var r=Uj(),i=Wj(),o=NT();if(!jP(r)||!jP(i))return null;var a,s,{children:l,otherAttributes:c,title:u,desc:d}=t;return null!=c&&(a="number"==typeof c.tabIndex?c.tabIndex:o?0:void 0,s="string"==typeof c.role?c.role:o?"application":void 0),e.createElement(vb,uZ({},c,{title:u,desc:d,role:s,tabIndex:a,width:r,height:i,style:dZ,ref:n}),l)}),pZ=t=>{var{children:n}=t,r=dO(pj);if(!r)return null;var{width:i,height:o,y:a,x:s}=r;return e.createElement(vb,{width:i,height:o,x:s,y:a},n)},hZ=a((t,n)=>{var{children:r}=t,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,cZ);return dj()?e.createElement(pZ,null,e.createElement(lZ,{isPanorama:!0},r)):e.createElement(fZ,uZ({ref:n},i),e.createElement(lZ,{isPanorama:!1},r))});function mZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mZ(Object(n),!0).forEach(function(t){vZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gZ(){return gZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gZ.apply(null,arguments)}var bZ=()=>(_$(),null);function xZ(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var wZ=a((t,n)=>{var r,i,o=s(null),[a,c]=m({containerWidth:xZ(null===(r=t.style)||void 0===r?void 0:r.width),containerHeight:xZ(null===(i=t.style)||void 0===i?void 0:i.height)}),u=f((e,t)=>{c(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),d=f(e=>{if("function"==typeof n&&n(e),null!=o.current&&(o.current.disconnect(),o.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var{width:t,height:r}=e.getBoundingClientRect();u(t,r);var i=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;u(n,r)}});i.observe(e),o.current=i}},[n,u]);return l(()=>()=>{var e=o.current;null!=e&&e.disconnect()},[u]),e.createElement(e.Fragment,null,e.createElement(Gj,{width:a.containerWidth,height:a.containerHeight}),e.createElement("div",gZ({ref:d},t)))}),EZ=a((t,n)=>{var{width:r,height:i}=t,[o,a]=m({containerWidth:xZ(r),containerHeight:xZ(i)}),s=f((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=f(e=>{if("function"==typeof n&&n(e),null!=e){var{width:t,height:r}=e.getBoundingClientRect();s(t,r)}},[n,s]);return e.createElement(e.Fragment,null,e.createElement(Gj,{width:o.containerWidth,height:o.containerHeight}),e.createElement("div",gZ({ref:l},t)))}),OZ=a((t,n)=>{var{width:r,height:i}=t;return e.createElement(e.Fragment,null,e.createElement(Gj,{width:r,height:i}),e.createElement("div",gZ({ref:n},t)))}),SZ=a((t,n)=>{var{width:r,height:i}=t;return"string"==typeof r||"string"==typeof i?e.createElement(EZ,gZ({},t,{ref:n})):"number"==typeof r&&"number"==typeof i?e.createElement(OZ,gZ({},t,{width:r,height:i,ref:n})):e.createElement(e.Fragment,null,e.createElement(Gj,{width:r,height:i}),e.createElement("div",gZ({ref:n},t)))});var kZ=a((t,n)=>{var{children:r,className:i,height:o,onClick:a,onContextMenu:c,onDoubleClick:u,onMouseDown:d,onMouseEnter:p,onMouseLeave:h,onMouseMove:y,onMouseUp:v,onTouchEnd:g,onTouchMove:b,onTouchStart:x,style:w,width:E,responsive:O,dispatchTouchEvents:S=!0}=t,k=s(null),P=sO(),[j,A]=m(null),[T,M]=m(null),C=function(){var e=sO(),[t,n]=m(null),r=dO(qP);return l(()=>{if(null!=t){var n=t.getBoundingClientRect().width/t.offsetWidth;PP(n)&&n!==r&&e(OP(n))}},[t,e,r]),n}(),N=Rj(),I=(null==N?void 0:N.width)>0?N.width:E,D=(null==N?void 0:N.height)>0?N.height:o,_=f(e=>{C(e),"function"==typeof n&&n(e),A(e),M(e),null!=e&&(k.current=e)},[C,n,A,M]),R=f(e=>{P(yX(e)),P(VX({handler:a,reactEvent:e}))},[P,a]),L=f(e=>{P(gX(e)),P(VX({handler:p,reactEvent:e}))},[P,p]),z=f(e=>{P(aB()),P(VX({handler:h,reactEvent:e}))},[P,h]),V=f(e=>{P(gX(e)),P(VX({handler:y,reactEvent:e}))},[P,y]),B=f(()=>{P(NX())},[P]),F=f(()=>{P(IX())},[P]),$=f(e=>{P(CX(e.key))},[P]),U=f(e=>{P(VX({handler:c,reactEvent:e}))},[P,c]),W=f(e=>{P(VX({handler:u,reactEvent:e}))},[P,u]),K=f(e=>{P(VX({handler:d,reactEvent:e}))},[P,d]),H=f(e=>{P(VX({handler:v,reactEvent:e}))},[P,v]),Y=f(e=>{P(VX({handler:x,reactEvent:e}))},[P,x]),q=f(e=>{S&&P(HX(e)),P(VX({handler:b,reactEvent:e}))},[P,S,b]),G=f(e=>{P(VX({handler:g,reactEvent:e}))},[P,g]),X=function(e){return e?wZ:SZ}(O);return e.createElement(h$.Provider,{value:j},e.createElement(wb.Provider,{value:T},e.createElement(X,{width:null!=I?I:null==w?void 0:w.width,height:null!=D?D:null==w?void 0:w.height,className:de("recharts-wrapper",i),style:yZ({position:"relative",cursor:"default",width:I,height:D},w),onClick:R,onContextMenu:U,onDoubleClick:W,onFocus:B,onBlur:F,onKeyDown:$,onMouseDown:K,onMouseEnter:L,onMouseLeave:z,onMouseMove:V,onMouseUp:H,onTouchEnd:G,onTouchMove:q,onTouchStart:Y,ref:_},e.createElement(bZ,null),r)))}),PZ=["width","height","responsive","children","className","style","compact","title","desc"];var jZ=a((t,n)=>{var{width:r,height:i,responsive:o,children:a,className:s,style:l,compact:c,title:u,desc:d}=t,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,PZ),p=fb(f);return c?e.createElement(e.Fragment,null,e.createElement(Gj,{width:r,height:i}),e.createElement(hZ,{otherAttributes:p,title:u,desc:d},a)):e.createElement(kZ,{className:s,style:l,width:r,height:i,responsive:null!=o&&o,onClick:t.onClick,onMouseLeave:t.onMouseLeave,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onContextMenu:t.onContextMenu,onDoubleClick:t.onDoubleClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd},e.createElement(hZ,{otherAttributes:p,title:u,desc:d,ref:n},e.createElement(dH,null,a)))});function AZ(){return AZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AZ.apply(null,arguments)}function TZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CZ=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TZ(Object(n),!0).forEach(function(t){MZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},JX),NZ=a(function(t,n){var r,i=Sw(t.categoricalChartProps,CZ),{chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=t,u={chartName:o,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return e.createElement(nZ,{preloadedState:{options:u},reduxStoreName:null!==(r=c.id)&&void 0!==r?r:o},e.createElement(ZK,{chartData:c.data}),e.createElement(iZ,{layout:i.layout,margin:i.margin}),e.createElement(aZ,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),e.createElement(oZ,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),e.createElement(jZ,AZ({},i,{ref:n})))}),IZ=["axis"],DZ=a((t,n)=>e.createElement(NZ,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:IZ,tooltipPayloadSearcher:x$,categoricalChartProps:t,ref:n})),_Z=["axis","item"],RZ=a((t,n)=>e.createElement(NZ,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:_Z,tooltipPayloadSearcher:x$,categoricalChartProps:t,ref:n})),LZ=["item"],zZ=a((t,n)=>e.createElement(NZ,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:LZ,tooltipPayloadSearcher:x$,categoricalChartProps:t,ref:n})),VZ=["axis"],BZ=a((t,n)=>e.createElement(NZ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:VZ,tooltipPayloadSearcher:x$,categoricalChartProps:t,ref:n}));function FZ({title:e,description:t,data:n,dataKey:r,categoryKey:i,color:o="var(--primary)",className:a,loading:s,type:l="area"}){if(s)return N.jsxs(nb,{className:It("col-span-full lg:col-span-2",a),children:[N.jsxs(rb,{children:[N.jsx(xc,{className:"h-6 w-40 mb-2"}),N.jsx(xc,{className:"h-4 w-64"})]}),N.jsx(ab,{className:"h-75 w-full pt-4",children:N.jsx(xc,{className:"h-full w-full rounded-lg"})})]});return N.jsxs(nb,{className:It("bmj-card-hover col-span-full lg:col-span-2",a),children:[N.jsxs(rb,{children:[N.jsx(ib,{className:"text-lg font-semibold",children:e}),t&&N.jsx(ob,{children:t})]}),N.jsx(ab,{className:"h-75 w-full pt-4",children:N.jsx(zj,{width:"100%",height:"100%",children:(()=>{const t={data:n,margin:{top:10,right:10,left:-20,bottom:0}},a={xAxis:N.jsx(eX,{dataKey:i,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},dy:10,type:"scatter"===l?"number":"category"}),yAxis:N.jsx(pX,{dataKey:"scatter"===l?r:void 0,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},type:"number"}),grid:N.jsx(QH,{strokeDasharray:"3 3",vertical:!1,stroke:"var(--border)",opacity:.5}),tooltip:N.jsx(U$,{cursor:"scatter"===l?{strokeDasharray:"3 3"}:void 0,contentStyle:{backgroundColor:"var(--card)",borderRadius:"8px",border:"1px solid var(--border)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",color:"var(--card-foreground)"},itemStyle:{color:"var(--card-foreground)"}})};switch(l){case"bar":return N.jsxs(RZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,N.jsx(dG,{dataKey:r,fill:o,radius:[4,4,0,0],barSize:32})]}));case"line":return N.jsxs(DZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,N.jsx(FY,{type:"monotone",dataKey:r,stroke:o,strokeWidth:2,dot:{r:4,fill:o,strokeWidth:2,stroke:"var(--card)"},activeDot:{r:6,strokeWidth:0}})]}));case"scatter":return N.jsxs(zZ,Object.assign({},t,{children:[a.grid,a.xAxis,a.yAxis,a.tooltip,N.jsx(RG,{name:e,data:n,fill:o,shape:"circle"})]}));default:return N.jsxs(BZ,Object.assign({},t,{children:[N.jsx("defs",{children:N.jsxs("linearGradient",{id:`colorValue-${e.replace(/\s+/g,"-")}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[N.jsx("stop",{offset:"5%",stopColor:o,stopOpacity:.1}),N.jsx("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),a.grid,a.xAxis,a.yAxis,a.tooltip,N.jsx(Eq,{type:"monotone",dataKey:r,stroke:o,strokeWidth:2,fillOpacity:1,fill:`url(#colorValue-${e.replace(/\s+/g,"-")})`})]}))}})()})})]})}function $Z({className:t}){const[n,r]=e.useState(()=>{if("undefined"!=typeof window){const e=localStorage.getItem("bmj-ui-theme");return"light"===e||"dark"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return"light"});e.useEffect(()=>{const e=window.document.documentElement;e.classList.remove("light","dark"),e.classList.add(n),localStorage.setItem("bmj-ui-theme",n)},[n]);return N.jsx(xn,{variant:"ghost",size:"icon",onClick:()=>{r(e=>"light"===e?"dark":"light")},className:t,"aria-label":"Toggle theme",children:"light"===n?N.jsx(tc,{className:"w-5 h-5 transition-all"}):N.jsx(ac,{className:"w-5 h-5 transition-all"})})}Array(12).fill(0);let UZ=1;const WZ=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:UZ++,o=this.toasts.find(e=>e.id===i),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:a,title:n}):t):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==r;const s=i.then(async e=>{o=["resolve",e];if(t.isValidElement(e))a=!1,this.create({id:r,type:"default",message:e});else if(KZ(e)&&!e.ok){a=!1;const i="function"==typeof n.error?await n.error(`HTTP error! status: ${e.status}`):n.error,o="function"==typeof n.description?await n.description(`HTTP error! status: ${e.status}`):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}else if(e instanceof Error){a=!1;const i="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}else if(void 0!==n.success){a=!1;const i="function"==typeof n.success?await n.success(e):n.success,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"success",description:o,...s})}}).catch(async e=>{if(o=["reject",e],void 0!==n.error){a=!1;const i="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description,s="object"==typeof i&&!t.isValidElement(i)?i:{message:i};this.create({id:r,type:"error",description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),null==n.finally||n.finally.call(n)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||UZ++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},KZ=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,HZ=(e,t)=>{const n=(null==t?void 0:t.id)||UZ++;return WZ.addToast({title:e,...t,id:n}),n},YZ=Object.assign(HZ,{success:WZ.success,info:WZ.info,warning:WZ.warning,error:WZ.error,custom:WZ.custom,message:WZ.message,promise:WZ.promise,dismiss:WZ.dismiss,loading:WZ.loading},{getHistory:()=>WZ.toasts,getToasts:()=>WZ.getActiveToasts()});!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const qZ=e.createContext(void 0);function GZ(t){const n=e.useContext(qZ);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.":W(33));return n}"production"!==process.env.NODE_ENV&&(qZ.displayName="MenuPositionerContext");const XZ=e.createContext(void 0);function ZZ(t){const n=e.useContext(XZ);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.":W(36));return n}"production"!==process.env.NODE_ENV&&(XZ.displayName="MenuRootContext");const JZ=e.createContext(void 0);function QZ(t=!0){const n=e.useContext(JZ);if(void 0===n&&!t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.":W(25));return n}"production"!==process.env.NODE_ENV&&(JZ.displayName="ContextMenuRootContext");const eJ={type:"regular-item"};function tJ(t){const{closeOnClick:n,disabled:r=!1,highlighted:i,id:o,store:a,typingRef:s=a.context.typingRef,nativeButton:l,itemMetadata:c,nodeId:u}=t,d=e.useRef(null),{getButtonProps:f,buttonRef:p}=yn({disabled:r,focusableWhenDisabled:!0,native:l,composite:!0}),h=function(t){const{closeOnClick:n,highlighted:r,id:i,nodeId:o,store:a,typingRef:s,itemRef:l,itemMetadata:c}=t,{events:u}=a.useState("floatingTreeRoot"),d=QZ(!0),f=void 0!==d;return e.useMemo(()=>({id:i,role:"menuitem",tabIndex:r?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){o&&u.emit("itemhover",{nodeId:o,target:e.currentTarget})},onClick(e){n&&u.emit("close",{domEvent:e,reason:Wi})},onMouseUp(e){if(d){const t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return;if(f&&!qn&&2===e.button)return}!l.current||!a.context.allowMouseUpTriggerRef.current||f&&2!==e.button||c&&"regular-item"!==c.type||l.current.click()}}),[n,r,i,u,o,a,s,l,d,f,c])}({closeOnClick:n,highlighted:i,id:o,nodeId:u,store:a,typingRef:s,itemRef:d,itemMetadata:c}),m=e.useCallback(e=>R(h,{onMouseEnter(){"submenu-trigger"===c.type&&c.setActive()}},e,f),[h,f,c]),y=Y(d,p);return e.useMemo(()=>({getItemProps:m,itemRef:y}),[m,y])}const nJ=e.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});"production"!==process.env.NODE_ENV&&(nJ.displayName="CompositeListContext");let rJ=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function iJ(t={}){const{label:n,metadata:r,textRef:i,indexGuessBehavior:o,index:a}=t,{register:s,unregister:l,subscribeMapChange:c,elementsRef:u,labelsRef:d,nextIndexRef:f}=e.useContext(nJ),p=e.useRef(-1),[h,m]=e.useState(a??(o===rJ.GuessFromOrder?()=>{if(-1===p.current){const e=f.current;f.current+=1,p.current=e}return p.current}:-1)),y=e.useRef(null),v=e.useCallback(e=>{if(y.current=e,-1!==h&&null!==e&&(u.current[h]=e,d)){const t=void 0!==n;d.current[h]=t?n:i?.current?.textContent??e.textContent}},[h,u,d,n,i]);return pn(()=>{if(null!=a)return;const e=y.current;return e?(s(e,r),()=>{l(e)}):void 0},[a,s,l,r]),pn(()=>{if(null==a)return c(e=>{const t=y.current?e.get(y.current)?.index:null;null!=t&&m(t)})},[a,c,m]),e.useMemo(()=>({ref:v,index:h}),[h,v])}const oJ=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(oJ.displayName="MenuGroupContext");const aJ=e.forwardRef(function(t,n){const{render:r,className:i,...o}=t,[a,s]=e.useState(void 0),l=e.useMemo(()=>({setLabelId:s}),[s]),c=se("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...o}});return N.jsx(oJ.Provider,{value:l,children:c})});"production"!==process.env.NODE_ENV&&(aJ.displayName="MenuGroup");const sJ=e.forwardRef(function(t,n){const{className:r,render:i,id:o,...a}=t,s=Cn(o),{setLabelId:l}=function(){const t=e.useContext(oJ);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.":W(31));return t}();return pn(()=>(l(s),()=>{l(void 0)}),[l,s]),se("div",t,{ref:n,props:{id:s,role:"presentation",...a}})});"production"!==process.env.NODE_ENV&&(sJ.displayName="MenuGroupLabel");const lJ=e.forwardRef(function(e,t){const{render:n,className:r,id:i,label:o,nativeButton:a=!1,disabled:s=!1,closeOnClick:l=!0,...c}=e,u=iJ({label:o}),d=GZ(!0),f=Cn(i),{store:p}=ZZ(),h=p.useState("isActive",u.index),m=p.useState("itemProps"),{getItemProps:y,itemRef:v}=tJ({closeOnClick:l,disabled:s,highlighted:h,id:f,store:p,nativeButton:a,nodeId:d?.nodeId,itemMetadata:eJ});return se("div",e,{state:{disabled:s,highlighted:h},props:[m,c,y],ref:[v,t,u.ref]})});"production"!==process.env.NODE_ENV&&(lJ.displayName="MenuItem");const cJ=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(cJ.displayName="ToolbarRootContext");const uJ={...po,..._i},dJ=e.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:s}=ZZ(),{side:l,align:c}=GZ(),u=null!=e.useContext(cJ),d=s.useState("open"),f=s.useState("transitionStatus"),p=s.useState("popupProps"),h=s.useState("mounted"),m=s.useState("instantType"),y=s.useState("activeTriggerElement"),v=s.useState("parent"),g=s.useState("lastOpenChangeReason"),b=s.useState("rootId"),x=s.useState("floatingRootContext"),w=s.useState("floatingTreeRoot"),E=s.useState("closeDelay"),O=s.useState("activeTriggerElement"),S="context-menu"===v.type;Li({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),e.useEffect(()=>{function e(e){s.setOpen(!1,Xi(e.reason,e.domEvent))}return w.events.on("close",e),()=>{w.events.off("close",e)}},[w.events,s]);const k=s.useState("hoverEnabled"),P=s.useState("disabled");Ys(x,{enabled:k&&!P&&!S&&"menubar"!==v.type,closeDelay:E});const j={transitionStatus:f,side:l,align:c,open:d,nested:"menu"===v.type,instant:m},A=e.useCallback(e=>{s.set("popupElement",e)},[s]),T=se("div",t,{state:j,ref:[n,s.context.popupRef,A],stateAttributesMapping:uJ,props:[p,{onKeyDown(e){u&&El.has(e.key)&&e.stopPropagation()}},Wc(f),a,{"data-rootownerid":b}]});let M=void 0===v.type||S;return(y||"menubar"===v.type&&g!==Ui)&&(M=!0),N.jsx(ia,{context:x,modal:S,disabled:!h,returnFocus:void 0===o?M:o,initialFocus:"menu"!==v.type,restoreFocus:!0,externalTree:"menubar"!==v.type?w:void 0,previousFocusableElement:O,nextFocusableElement:void 0===v.type?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===v.type?s.context.beforeContentFocusGuardRef:void 0,children:T})});"production"!==process.env.NODE_ENV&&(dJ.displayName="MenuPopup");const fJ=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(fJ.displayName="MenuPortalContext");const pJ=e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=ZZ();return i.useState("mounted")||n?N.jsx(fJ.Provider,{value:n,children:N.jsx(Wo,{ref:t,...r})}):null});function hJ(t){const{children:n,elementsRef:r,labelsRef:i,onMapChange:o}=t,a=sn(o),s=e.useRef(0),l=H(yJ).current,c=H(mJ).current,[u,d]=e.useState(0),f=e.useRef(u),p=sn((e,t)=>{c.set(e,t??null),f.current+=1,d(f.current)}),h=sn(e=>{c.delete(e),f.current+=1,d(f.current)}),m=e.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(vJ).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);pn(()=>{if("function"!=typeof MutationObserver||0===m.size)return;const e=new MutationObserver(e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(f.current+=1,d(f.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),pn(()=>{f.current===u&&(r.current.length!==m.size&&(r.current.length=m.size),i&&i.current.length!==m.size&&(i.current.length=m.size),s.current=m.size),a(m)},[a,m,r,i,u]),pn(()=>()=>{r.current=[]},[r]),pn(()=>()=>{i&&(i.current=[])},[i]);const y=sn(e=>(l.add(e),()=>{l.delete(e)}));pn(()=>{l.forEach(e=>e(m))},[l,m]);const v=e.useMemo(()=>({register:p,unregister:h,subscribeMapChange:y,elementsRef:r,labelsRef:i,nextIndexRef:s}),[p,h,y,r,i,s]);return N.jsx(nJ.Provider,{value:v,children:n})}function mJ(){return new Map}function yJ(){return new Set}function vJ(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}"production"!==process.env.NODE_ENV&&(pJ.displayName="MenuPortal");const gJ=e.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:s,align:l,sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=ie,...v}=t,{store:g}=ZZ(),b=function(){const t=e.useContext(fJ);if(void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Portal> is missing.":W(32));return t}(),x=QZ(!0),w=g.useState("parent"),E=g.useState("floatingRootContext"),O=g.useState("floatingTreeRoot"),S=g.useState("mounted"),k=g.useState("open"),P=g.useState("modal"),j=g.useState("activeTriggerElement"),A=g.useState("transitionStatus"),T=g.useState("positionerElement"),M=g.useState("instantType"),C=g.useState("hasViewport"),I=g.useState("lastOpenChangeReason"),D=g.useState("floatingNodeId"),_=g.useState("floatingParentNodeId"),R=E.useState("domReferenceElement"),L=e.useRef(null),z=Ri(T,!1,!1);let V=r,B=c,F=u,$=l,U=y;"context-menu"===w.type&&(V=r??w.context?.anchor,$=$??"start",s||"center"===$||(F=t.alignOffset??2,B=t.sideOffset??-5));let K=s,H=$;"menu"===w.type?(K=K??"inline-end",H=H??"start",U=t.collisionAvoidance??oe):"menubar"===w.type&&(K=K??"bottom",H=H??"start");const Y="context-menu"===w.type,q=$c({anchor:V,floatingRootContext:E,positionMethod:x?"fixed":i,mounted:S,side:K,sideOffset:B,align:H,alignOffset:F,arrowPadding:Y?0:p,collisionBoundary:d,collisionPadding:f,sticky:h,nodeId:D,keepMounted:b,disableAnchorTracking:m,collisionAvoidance:U,shiftCrossAxis:Y&&!("side"in U&&"flip"===U.side),externalTree:O,adaptiveOrigin:C?Vc:void 0}),G=e.useMemo(()=>{const e={};return k||(e.pointerEvents="none"),{role:"presentation",hidden:!S,style:{...q.positionerStyles,...e}}},[k,S,q.positionerStyles]);e.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===D&&g.set("hoverEnabled",!1),e.nodeId!==D&&e.parentNodeId===g.select("floatingParentNodeId")&&g.setOpen(!1,Xi(qi)))}return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)}},[g,O.events,D]),e.useEffect(()=>{if(null!=g.select("floatingParentNodeId"))return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==g.select("floatingParentNodeId"))return;const t=e.reason??qi;g.setOpen(!1,Xi(t))}},[O.events,g]);const X=Ln();e.useEffect(()=>{k||X.clear()},[k,X]),e.useEffect(()=>{function e(e){if(k&&e.nodeId===g.select("floatingParentNodeId"))if(e.target&&j&&j!==e.target){const e=g.select("closeDelay");e>0?X.isStarted()||X.start(e,()=>{g.setOpen(!1,Xi(qi))}):g.setOpen(!1,Xi(qi))}else X.clear()}return O.events.on("itemhover",e),()=>{O.events.off("itemhover",e)}},[O.events,k,j,g,X]),e.useEffect(()=>{const e={open:k,nodeId:D,parentNodeId:_,reason:g.select("lastOpenChangeReason")};O.events.emit("menuopenchange",e)},[O.events,k,g,D,_]),pn(()=>{const e=R,t=L.current;if(e&&(L.current=e),t&&e&&e!==t){g.set("instantType",void 0);const e=new AbortController;return z(()=>{g.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[R,z,g]);const Z={open:k,side:q.side,align:q.align,anchorHidden:q.anchorHidden,nested:"menu"===w.type,instant:M},J=e.useMemo(()=>({side:q.side,align:q.align,arrowRef:q.arrowRef,arrowUncentered:q.arrowUncentered,arrowStyles:q.arrowStyles,nodeId:q.context.nodeId}),[q.side,q.align,q.arrowRef,q.arrowUncentered,q.arrowStyles,q.context.nodeId]),Q=se("div",t,{state:Z,stateAttributesMapping:po,ref:[n,g.useStateSetter("positionerElement")],props:[G,Wc(A),v]}),ee=S&&"menu"!==w.type&&("menubar"!==w.type&&P&&I!==Fi||"menubar"===w.type&&w.context.modal);let te=null;return"menubar"===w.type?te=w.context.contentElement:void 0===w.type&&(te=j),N.jsxs(qZ.Provider,{value:J,children:[ee&&N.jsx(Pl,{ref:"context-menu"===w.type||"nested-context-menu"===w.type?w.context.internalBackdropRef:null,inert:kl(!k),cutout:te}),N.jsx(Jo,{id:D,children:N.jsx(hJ,{elementsRef:g.context.itemDomElements,labelsRef:g.context.itemLabels,children:Q})})]})});"production"!==process.env.NODE_ENV&&(gJ.displayName="MenuPositioner");const bJ=e.createContext(null);function xJ(t){return e.useContext(bJ)}"production"!==process.env.NODE_ENV&&(bJ.displayName="MenubarContext");const wJ={...zs,disabled:is(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:is(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),allowMouseEnter:is(e=>e.allowMouseEnter),stickIfOpen:is(e=>e.stickIfOpen),parent:is(e=>e.parent),rootId:is(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:is(e=>e.activeIndex),isActive:is((e,t)=>e.activeIndex===t),hoverEnabled:is(e=>e.hoverEnabled),instantType:is(e=>e.instantType),lastOpenChangeReason:is(e=>e.openChangeReason),floatingTreeRoot:is(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:is(e=>e.floatingNodeId),floatingParentNodeId:is(e=>e.floatingParentNodeId),itemProps:is(e=>e.itemProps),closeDelay:is(e=>e.closeDelay),hasViewport:is(e=>e.hasViewport),keyboardEventRelay:is(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class EJ extends Ts{constructor(t){super({...{...Rs(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ho,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ne,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...t},{positionerRef:e.createRef(),popupRef:e.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:e.createRef(),beforeContentFocusGuardRef:e.createRef(),onOpenChangeComplete:void 0,triggerElements:new _s},wJ),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");return this.unsubscribeParentListener=e.store.subscribe(()=>{const i=e.store.select("rootId"),o=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");t===i&&n===o&&r===a||(t=i,n=o,r=a,this.notifyAll())}),void(this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef)}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){const n=H(()=>new EJ(t)).current;return e??n}unsubscribeParentListener=null}const OJ=e.createContext(void 0);"production"!==process.env.NODE_ENV&&(OJ.displayName="MenuSubmenuRootContext");const SJ=Es(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:s=!1,modal:l,loopFocus:c=!0,orientation:u="vertical",actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:h,defaultTriggerId:m=null,highlightItemOnHover:y=!0}=t,v=QZ(!0),g=ZZ(!0),b=xJ(),x=e.useContext(OJ),w=e.useMemo(()=>x&&g?{type:"menu",store:g.store}:b?{type:"menubar",context:b}:v&&!g?{type:"context-menu",context:v}:{type:void 0},[v,g,b,x]),E=EJ.useStore(p?.store,{open:a,openProp:r,activeTriggerId:m,triggerIdProp:h,parent:w});Al(()=>{void 0===r&&!1===E.state.open&&!0===a&&E.update({open:!0,activeTriggerId:m})}),E.useControlledProp("openProp",r),E.useControlledProp("triggerIdProp",h),E.useContextCallback("onOpenChangeComplete",o);const O=E.useState("floatingTreeRoot"),S=Zo(O),k=Go();pn(()=>{v&&!g?E.update({parent:{type:"context-menu",context:v},floatingNodeId:S,floatingParentNodeId:k}):g&&E.update({floatingNodeId:S,floatingParentNodeId:k})},[v,g,S,k,E]);const P=E.useState("open"),j=E.useState("activeTriggerElement"),A=E.useState("positionerElement"),T=E.useState("hoverEnabled"),M=E.useState("modal"),C=E.useState("disabled"),I=E.useState("lastOpenChangeReason"),D=E.useState("parent"),_=E.useState("activeIndex"),L=E.useState("payload"),z=E.useState("floatingParentNodeId"),V=e.useRef(null),B=null!=z;let F;"production"!==process.env.NODE_ENV&&void 0!==D.type&&void 0!==l&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."),E.useSyncedValues({disabled:s,modal:void 0===D.type?l:void 0,rootId:Mn()});const{openMethod:$,triggerProps:U}=_l(P);Is(E);const{forceUnmount:W}=Ds(P,E,()=>{E.update({allowMouseEnter:!1,stickIfOpen:!0})}),K=e.useRef("context-menu"!==D.type),H=Ln();e.useEffect(()=>{if(P||(V.current=null),"context-menu"===D.type)return P?void H.start(500,()=>{K.current=!0}):(H.clear(),void(K.current=!1))},[H,P,D.type]),Dl(P&&M&&I!==Fi&&"touch"!==$,A),pn(()=>{P||T||E.set("hoverEnabled",!0)},[P,T,E]);const Y=e.useRef(!0),q=Ln(),G=sn((e,t)=>{const n=t.reason;if(P===e&&t.trigger===j&&I===n)return;if(t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||(t.trigger=j??void 0),i?.(e,t),t.isCanceled)return;const r={open:e,nativeEvent:t.event,reason:t.reason,nested:B};F?.emit("openchange",r);const o=t.event;if(!1===e&&"click"===o?.type&&"touch"===o.pointerType&&!Y.current)return;if(!e&&null!==_){const e=E.context.itemDomElements.current[_];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&n===$i?(Y.current=!1,q.start(300,()=>{Y.current=!0})):(Y.current=!0,q.clear());const a=(n===Bi||n===Wi)&&0===o.detail&&o?.isTrusted,s=!e&&(n===Hi||null==n),l={open:e,openChangeReason:n};V.current=t.event??null;const c=t.trigger?.id??null;(c||e)&&(l.activeTriggerId=c,l.activeTriggerElement=t.trigger??null),E.update(l),"menubar"!==D.type||n!==$i&&n!==Ki&&n!==Fi&&n!==Yi&&n!==qi?a||s?E.set("instantType",a?"click":"dismiss"):E.set("instantType",void 0):E.set("instantType","group")}),X=e.useCallback(e=>{const t=Xi(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),Z=e.useCallback(()=>{E.setOpen(!1,X(Gi))},[E,X]);let J;e.useImperativeHandle(d,()=>({unmount:W,close:Z}),[W,Z]),"context-menu"===D.type&&(J=D.context),e.useImperativeHandle(J?.positionerRef,()=>A,[A]),e.useImperativeHandle(J?.actionsRef,()=>({setOpen:G}),[G]);const Q=Bs({popupStore:E,onOpenChange:G});F=Q.context.events,e.useEffect(()=>{const e=({open:e,eventDetails:t})=>G(e,t);return F.on("setOpen",e),()=>{F?.off("setOpen",e)}},[F,G]);const ee=la(Q,{enabled:!C,bubbles:{escapeKey:f&&"menu"===D.type},outsidePress:()=>"context-menu"!==D.type||"contextmenu"===V.current?.type||K.current,externalTree:B?O:void 0}),ne=il(Q,{role:"menu"}),re=_c(),ie=e.useCallback(e=>{E.select("activeIndex")!==e&&E.set("activeIndex",e)},[E]),oe=nl(Q,{enabled:!C,listRef:E.context.itemDomElements,activeIndex:_,nested:void 0!==D.type,loopFocus:c,orientation:u,parentOrientation:"menubar"===D.type?D.context.orientation:void 0,rtl:"rtl"===re,disabledIndices:te,onNavigate:ie,openOnArrowKeyDown:"context-menu"!==D.type,externalTree:B?O:void 0,focusItemOnHover:y}),ae=e.useCallback(e=>{E.context.typingRef.current=e},[E]),se=function(t,n){const r="rootStore"in t?t.rootStore:t,i=r.context.dataRef,o=r.useState("open"),{listRef:a,elementsRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=n,h=Ln(),m=e.useRef(""),y=e.useRef(p??l??-1),v=e.useRef(null);pn(()=>{(o||null===p)&&(h.clear(),v.current=null,""!==m.current&&(m.current=""))},[o,p,h]),pn(()=>{o&&""===m.current&&(y.current=p??l??-1)},[o,p,l]);const g=sn(e=>{e?i.current.typing||(i.current.typing=e,u?.(e)):i.current.typing&&(i.current.typing=e,u?.(e))}),b=sn(e=>{function t(e){const t=s?.current[e];return!t||Zr(t)}function n(e,n,r=0){if(0===e.length)return-1;const i=(r%e.length+e.length)%e.length,o=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){const r=(i+n)%e.length,a=e[r];if(a?.toLocaleLowerCase().startsWith(o)&&t(r))return r}return-1}const r=a.current;if(m.current.length>0&&" "===e.key&&(hr(e),g(!0)),m.current.length>0&&" "!==m.current[0]&&-1===n(r,m.current)&&" "!==e.key&&g(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(hr(e),g(!0));const i=""===m.current;i&&(y.current=p??l??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",y.current=v.current),m.current+=e.key,h.start(f,()=>{m.current="",y.current=v.current,g(!1)});const u=((i?p??l??-1:y.current)??0)+1,d=n(r,m.current,u);-1!==d?(c?.(d),v.current=d):" "!==e.key&&(m.current="",g(!1))}),x=sn(e=>{const t=e.relatedTarget,n=r.select("domReferenceElement"),i=r.select("floatingElement"),o=or(n,t),a=or(i,t);o||a||(h.clear(),m.current="",y.current=v.current,g(!1))}),w=e.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]),E=e.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return e.useMemo(()=>d?{reference:w,floating:E}:{},[d,w,E])}(Q,{listRef:E.context.itemLabels,elementsRef:E.context.itemDomElements,activeIndex:_,resetMs:500,onMatch:e=>{P&&e!==_&&E.set("activeIndex",e)},onTypingChange:ae}),{getReferenceProps:le,getFloatingProps:ce,getItemProps:ue,getTriggerProps:de}=Xs([ee,ne,oe,se]),fe=e.useMemo(()=>{const e=R(le(),{onMouseMove(){E.set("allowMouseEnter",!0)}},U);return delete e.role,e},[le,E,U]),pe=e.useMemo(()=>{const e=de();if(!e)return e;const t=R(e,U);return delete t.role,delete t["aria-controls"],t},[de,U]),he=e.useMemo(()=>ce({onMouseMove(){E.set("allowMouseEnter",!0),"menu"===D.type&&E.set("hoverEnabled",!1)},onClick(){E.select("hoverEnabled")&&E.set("hoverEnabled",!1)},onKeyDown(e){const t=E.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ce,D.type,E]),me=e.useMemo(()=>ue(),[ue]);E.useSyncedValues({floatingRootContext:Q,activeTriggerProps:fe,inactiveTriggerProps:pe,popupProps:he,itemProps:me});const ye=e.useMemo(()=>({store:E,parent:w}),[E,w]),ve=N.jsx(XZ.Provider,{value:ye,children:"function"==typeof n?n({payload:L}):n});return void 0===D.type||"context-menu"===D.type?N.jsx(Qo,{externalTree:O,children:ve}):ve});function kJ(t){const{render:n,className:r,state:i=ne,props:o=te,refs:a=te,metadata:s,stateAttributesMapping:l,tag:c="div",...u}=t,{compositeProps:d,compositeRef:f}=function(t={}){const{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=mn(),{ref:o,index:a}=iJ(t),s=r===a,l=e.useRef(null),c=Y(o,l),u=e.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(a)},onMouseMove(){const e=l.current;if(!n||!e)return;const t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;s||t||e.focus()}}),[s,i,a,n]);return{compositeProps:u,compositeRef:c,index:a}}({metadata:s});return se(c,t,{state:i,ref:[...a,f],props:[d,...o,u],stateAttributesMapping:l})}function PJ(e){return Bt(e)&&e.hasAttribute("data-rootownerid")?e.getAttribute("data-rootownerid")??void 0:Zt(e)?void 0:PJ(en(e))}"production"!==process.env.NODE_ENV&&(SJ.displayName="MenuRoot");const jJ=Os(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:s,openOnHover:l,delay:c=100,closeDelay:u=0,handle:d,payload:f,...p}=t,h=ZZ(!0),m=d?.store??h?.store;if(!m)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.":W(85));const y=Cn(s),v=m.useState("isTriggerActive",y),g=m.useState("floatingRootContext"),b=m.useState("isOpenedByTrigger",y),x=e.useRef(null),w=function(){const t=QZ(!0),n=ZZ(!0),r=xJ(),i=e.useMemo(()=>r?{type:"menubar",context:r}:t&&!n?{type:"context-menu",context:t}:{type:void 0},[t,n,r]);return i}(),O=mn(!0),S=Xo(),k=e.useMemo(()=>S??new Ho,[S]),P=Zo(k),j=Go(),{registerTrigger:A,isMountedByThisTrigger:T}=Ns(y,x,m,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:k,floatingNodeId:P,floatingParentNodeId:j,keyboardEventRelay:O?.relayKeyboardEvent}),M="menubar"===w.type,C=m.useState("disabled"),I=o||C||M&&w.context.disabled,{getButtonProps:D,buttonRef:_}=yn({disabled:I,native:a});e.useEffect(()=>{b||void 0!==w.type||(m.context.allowMouseUpTriggerRef.current=!1)},[m,b,w.type]);const R=e.useRef(null),L=Ln(),z=sn(e=>{if(!R.current)return;L.clear(),m.context.allowMouseUpTriggerRef.current=!1;const t=e.target;if(or(R.current,t)||or(m.select("positionerElement"),t)||t===R.current)return;if(null!=t&&PJ(t)===m.select("rootId"))return;const n=function(e){const t=e.getBoundingClientRect();if("production"!==process.env.NODE_ENV)return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if("none"===n.content&&"none"===r.content)return t;const i=parseFloat(n.width)||0,o=parseFloat(n.height)||0,a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=Math.max(t.width,i,a),c=Math.max(t.height,o,s),u=l-t.width,d=c-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}(R.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||k.events.emit("close",{domEvent:e,reason:"cancel-open"})});e.useEffect(()=>{if(b&&m.select("lastOpenChangeReason")===Fi){Vn(R.current).addEventListener("mouseup",z,{once:!0})}},[b,z,m]);const V=M&&w.context.hasSubmenuOpen,B=Gs(g,{enabled:(l??V)&&!I&&"context-menu"!==w.type&&(!M||V&&!T),handleClose:ul({blockPointerEvents:!M}),mouseOnly:!0,move:!1,restMs:void 0===w.type?c:void 0,delay:{close:u},triggerElementRef:x,externalTree:k,isActiveTrigger:v}),F=function(t,n){const r=Ln(),[i,o]=e.useState(!1);return pn(()=>{t&&"trigger-hover"===n?(o(!0),r.start(500,()=>{o(!1)})):t||(r.clear(),o(!1))},[t,n,r]),i}(b,m.select("lastOpenChangeReason")),$=function(t,n={}){const r="rootStore"in t?t.rootStore:t,i=r.context.dataRef,{enabled:o=!0,event:a="click",toggle:s=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:u=0,reason:d=Bi}=n,f=e.useRef(void 0),p=Mi(),h=Ln(),m=e.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current,n=e.nativeEvent,o=r.select("open");if(0!==e.button||"click"===a||vr(t,!0)&&l)return;const m=i.current.openEvent,y=m?.type,v=r.select("domReferenceElement")!==e.currentTarget,g=o&&v||!(o&&s&&(!m||!c||"click"===y||"mousedown"===y));if(cr(n.target)){const e=Xi(d,n,n.target);return void(g&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(g,e))}const b=e.currentTarget;p.request(()=>{const e=Xi(d,n,b);g&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(g,e)})},onClick(e){if("mousedown-only"===a)return;const t=f.current;if("mousedown"===a&&t)return void(f.current=void 0);if(vr(t,!0)&&l)return;const n=r.select("open"),o=i.current.openEvent,p=r.select("domReferenceElement")!==e.currentTarget,m=n&&p||!(n&&s&&(!o||!c||gr(o))),y=Xi(d,e.nativeEvent,e.currentTarget);m&&"touch"===t&&u>0?h.start(u,()=>{r.setOpen(!0,y)}):r.setOpen(m,y)},onKeyDown(){f.current=void 0}}),[i,a,l,r,c,s,p,h,u,d]);return e.useMemo(()=>o?{reference:m}:ne,[o,m])}(g,{enabled:!I&&"context-menu"!==w.type,event:b&&M?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===w.type&&F}),U=$s(g,{enabled:!I&&V}),K=function(t){const{enabled:n=!0,mouseDownAction:r,open:i}=t,o=e.useRef(!1);return e.useMemo(()=>n?{onMouseDown:e=>{("open"===r&&!i||"close"===r&&i)&&(o.current=!0,Vn(e.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:e=>{o.current&&(o.current=!1,e.preventBaseUIHandler())}}:ne,[n,r,i])}({open:b,enabled:M,mouseDownAction:"open"}),H=Xs([$,U]),Y={disabled:I,open:b},q=m.useState("triggerProps",T),G=[R,n,_,A,x],X=[H.getReferenceProps(),B??ne,q,{"aria-haspopup":"menu",id:y,onMouseDown:e=>{if(m.select("open"))return;L.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0});Vn(e.currentTarget).addEventListener("mouseup",z,{once:!0})}},M?{role:"menuitem"}:{},K,p,D],Z=e.useRef(null),J=sn(e=>{E.flushSync(()=>{m.setOpen(!1,Xi(Ki,e.nativeEvent,e.currentTarget))});const t=Ei(Z.current,-1);t?.focus()}),Q=sn(e=>{const t=m.select("positionerElement");if(t&&Oi(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{E.flushSync(()=>{m.setOpen(!1,Xi(Ki,e.nativeEvent,e.currentTarget))});let n=Ei(m.context.triggerFocusTargetRef.current||x.current,1);for(;null!==n&&or(t,n);){const e=n;if(n=xi(n),n===e)break}n?.focus()}}),ee=se("button",t,{enabled:!M,stateAttributesMapping:fo,state:Y,ref:G,props:X});return M?N.jsx(kJ,{tag:"button",render:r,className:i,state:Y,refs:G,props:X,stateAttributesMapping:fo}):b?N.jsxs(e.Fragment,{children:[N.jsx(ko,{ref:Z,onFocus:J},`${y}-pre-focus-guard`),N.jsx(e.Fragment,{children:ee},y),N.jsx(ko,{ref:m.context.triggerFocusTargetRef,onFocus:Q},`${y}-post-focus-guard`)]}):N.jsx(e.Fragment,{children:ee},y)});function AJ(e){var t=I(e,[]);return N.jsx(SJ,Object.assign({"data-slot":"dropdown-menu"},t))}function TJ(e){var t=I(e,[]);return N.jsx(jJ,Object.assign({"data-slot":"dropdown-menu-trigger"},t))}function MJ(e){var{align:t="start",alignOffset:n=0,side:r="bottom",sideOffset:i=4,className:o}=e,a=I(e,["align","alignOffset","side","sideOffset","className"]);return N.jsx(pJ,{children:N.jsx(gJ,{className:"isolate z-50 outline-none",align:t,alignOffset:n,side:r,sideOffset:i,children:N.jsx(dJ,Object.assign({"data-slot":"dropdown-menu-content",className:It("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",o)},a))})})}function CJ(e){var t=I(e,[]);return N.jsx(aJ,Object.assign({"data-slot":"dropdown-menu-group"},t))}function NJ(e){var{className:t,inset:n}=e,r=I(e,["className","inset"]);return N.jsx(sJ,Object.assign({"data-slot":"dropdown-menu-label","data-inset":n,className:It("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",t)},r))}function IJ(e){var{className:t,inset:n,variant:r="default"}=e,i=I(e,["className","inset","variant"]);return N.jsx(lJ,Object.assign({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:It("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t)},i))}function DJ(e){var{className:t}=e,n=I(e,["className"]);return N.jsx(eo,Object.assign({"data-slot":"dropdown-menu-separator",className:It("-mx-1 my-1 h-px bg-border",t)},n))}function _J(){const e=e=>{YZ.info(`${e} clicked`,{description:"This feature will be implemented soon."})};return N.jsxs("header",{className:"h-16 border-b border-border/50 flex items-center justify-between px-4 sm:px-6 bg-background/80 backdrop-blur-md sticky top-0 z-30",children:[N.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 flex-1",children:[N.jsx(nu,{}),N.jsxs("div",{className:"relative w-full max-w-md hidden md:block",children:[N.jsx(ic,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),N.jsx(Qi,{placeholder:"Search dashboard...",className:"pl-10 bg-muted/50 border-none focus-visible:ring-1 focus-visible:ring-primary/20"})]}),N.jsx(xn,{variant:"ghost",size:"icon",className:"md:hidden",children:N.jsx(ic,{className:"w-5 h-5"})})]}),N.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[N.jsx("div",{className:"hidden xs:block",children:N.jsx($Z,{})}),N.jsxs(xn,{variant:"ghost",size:"icon",className:"relative",children:[N.jsx(ql,{className:"w-5 h-5"}),N.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-primary rounded-full border-2 border-background"})]}),N.jsxs(AJ,{children:[N.jsx(TJ,{render:N.jsx(xn,{variant:"ghost",size:"icon",className:"rounded-full"}),children:N.jsx(cc,{className:"w-5 h-5"})}),N.jsx(MJ,{align:"end",className:"w-56",children:N.jsxs(CJ,{children:[N.jsx(NJ,{children:"My Account"}),N.jsx(DJ,{}),N.jsxs(IJ,{onClick:()=>e("Profile"),children:[N.jsx(cc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Profile"})]}),N.jsxs(IJ,{onClick:()=>e("Billing"),children:[N.jsx(Zl,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Billing"})]}),N.jsxs(IJ,{onClick:()=>e("Team"),children:[N.jsx(uc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Team"})]}),N.jsxs(IJ,{onClick:()=>e("Subscription"),children:[N.jsx(fc,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Subscription"})]}),N.jsx(DJ,{}),N.jsxs(IJ,{variant:"destructive",onClick:()=>e("Log out"),children:[N.jsx(ec,{className:"mr-2 h-4 w-4"}),N.jsx("span",{children:"Log out"})]})]})})]})]})]})}function RJ({children:e,sidebarItems:t,onSidebarItemClick:n,activeSidebarItem:r}){return N.jsxs(eu,{children:[N.jsx(tb,{items:t,onItemClick:n,activeItem:r}),N.jsxs(ru,{className:"flex flex-col",children:[N.jsx(_J,{}),N.jsx("main",{className:"flex-1 p-6 overflow-y-auto",children:e})]})]})}function LJ({title:e,value:t,description:n,trend:r,icon:i,className:o,loading:a}){return a?N.jsxs(nb,{className:It("overflow-hidden",o),children:[N.jsxs(rb,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[N.jsx(xc,{className:"h-4 w-24"}),N.jsx(xc,{className:"h-4 w-4 rounded-full"})]}),N.jsxs(ab,{className:"space-y-2",children:[N.jsx(xc,{className:"h-8 w-32"}),N.jsx(xc,{className:"h-3 w-40"})]})]}):N.jsx(Qg.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},children:N.jsxs(nb,{className:It("bmj-card-hover overflow-hidden",o),children:[N.jsxs(rb,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[N.jsx(ib,{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:e}),i&&N.jsx(i,{className:"h-4 w-4 text-muted-foreground"})]}),N.jsxs(ab,{children:[N.jsx("div",{className:"text-2xl font-bold tracking-tight",children:t}),(n||r)&&N.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r&&N.jsxs("span",{className:It("flex items-center text-xs font-medium",r.isPositive?"text-emerald-500":"text-rose-500"),children:[r.isPositive?N.jsx(lc,{className:"w-3 h-3 mr-1"}):N.jsx(sc,{className:"w-3 h-3 mr-1"}),r.value,"%"]}),n&&N.jsx("p",{className:"text-xs text-muted-foreground",children:n})]})]})]})})}"production"!==process.env.NODE_ENV&&(jJ.displayName="MenuTrigger");export{tb as AppSidebar,FZ as ChartCard,RJ as DashboardLayout,LJ as StatCard,_J as Topbar};
|
|
2
76
|
//# sourceMappingURL=index.mjs.map
|