randmarcomps 1.85.0 → 1.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/randmarcomps.d.ts +15 -0
- package/dist/randmarcomps.js +22929 -4797
- package/dist/randmarcomps.umd.cjs +141 -47
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(H,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],y):(H=typeof globalThis<"u"?globalThis:H||self,y(H.randmarcomps={},H.jsxRuntime,H.React,H.ReactDOM,H["react-router-dom"]))})(this,function(H,y,A,Ny,bc){"use strict";function Iy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=Iy(A),wc=Iy(Ny);var dC=Object.defineProperty,pC=Object.defineProperties,hC=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,$y=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,ky=(e,t,r)=>t in e?dC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vC=(e,t)=>{for(var r in t||(t={}))$y.call(t,r)&&ky(e,r,t[r]);if(Lo)for(var r of Lo(t))Dy.call(t,r)&&ky(e,r,t[r]);return e},yC=(e,t)=>pC(e,hC(t)),gC=(e,t)=>{var r={};for(var n in e)$y.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lo)for(var n of Lo(e))t.indexOf(n)<0&&Dy.call(e,n)&&(r[n]=e[n]);return r};function mC(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function bC(e){let t=_.useRef();return _.useEffect(()=>{t.current=e}),t.current}var wC=18,jy=40,xC=`${jy}px`,SC=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function OC({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,o]=_.useState(!1),[i,s]=_.useState(!1),[c,u]=_.useState(!1),f=_.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&i,[a,i,r]),l=_.useCallback(()=>{let d=e.current,p=t.current;if(!d||!p||c||r==="none")return;let g=d,v=g.getBoundingClientRect().left+g.offsetWidth,h=g.getBoundingClientRect().top+g.offsetHeight/2,b=v-wC,w=h;document.querySelectorAll(SC).length===0&&document.elementFromPoint(b,w)===d||(o(!0),u(!0))},[e,t,c,r]);return _.useEffect(()=>{let d=e.current;if(!d||r==="none")return;function p(){let v=window.innerWidth-d.getBoundingClientRect().right;s(v>=jy)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,r]),_.useEffect(()=>{let d=n||document.activeElement===t.current;if(r==="none"||!d)return;let p=setTimeout(l,0),g=setTimeout(l,2e3),v=setTimeout(l,5e3),h=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(v),clearTimeout(h)}},[t,n,r,l]),{hasPWMBadge:a,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:xC}}var Ly=_.createContext({}),qy=_.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:o,textAlign:i="left",pattern:s,placeholder:c,inputMode:u="numeric",onComplete:f,pushPasswordManagerStrategy:l="increase-width",pasteTransformer:d,containerClassName:p,noScriptCSSFallback:g=_C,render:v,children:h}=r,b=gC(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,O,m,S;let[P,E]=_.useState(typeof b.defaultValue=="string"?b.defaultValue:""),T=n??P,k=bC(T),C=_.useCallback(z=>{a==null||a(z),E(z)},[a]),M=_.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),N=_.useRef(null),I=_.useRef(null),L=_.useRef({value:T,onChange:C,isIOS:typeof window<"u"&&((x=(w=window==null?void 0:window.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),$=_.useRef({prev:[(O=N.current)==null?void 0:O.selectionStart,(m=N.current)==null?void 0:m.selectionEnd,(S=N.current)==null?void 0:S.selectionDirection]});_.useImperativeHandle(t,()=>N.current,[]),_.useEffect(()=>{let z=N.current,te=I.current;if(!z||!te)return;L.current.value!==z.value&&L.current.onChange(z.value),$.current.prev=[z.selectionStart,z.selectionEnd,z.selectionDirection];function fe(){if(document.activeElement!==z){W(null),Y(null);return}let ye=z.selectionStart,He=z.selectionEnd,St=z.selectionDirection,Le=z.maxLength,jt=z.value,dt=$.current.prev,Ot=-1,Lt=-1,Yt;if(jt.length!==0&&ye!==null&&He!==null){let W6=ye===He,U6=ye===jt.length&&jt.length<Le;if(W6&&!U6){let nn=ye;if(nn===0)Ot=0,Lt=1,Yt="forward";else if(nn===Le)Ot=nn-1,Lt=nn,Yt="backward";else if(Le>1&&jt.length>1){let My=0;if(dt[0]!==null&&dt[1]!==null){Yt=nn<dt[1]?"backward":"forward";let G6=dt[0]===dt[1]&&dt[0]<Le;Yt==="backward"&&!G6&&(My=-1)}Ot=My+nn,Lt=My+nn+1}}Ot!==-1&&Lt!==-1&&Ot!==Lt&&N.current.setSelectionRange(Ot,Lt,Yt)}let lC=Ot!==-1?Ot:ye,fC=Lt!==-1?Lt:He,z6=Yt??St;W(lC),Y(fC),$.current.prev=[lC,fC,z6]}if(document.addEventListener("selectionchange",fe,{capture:!0}),fe(),document.activeElement===z&&j(!0),!document.getElementById("input-otp-style")){let ye=document.createElement("style");if(ye.id="input-otp-style",document.head.appendChild(ye),ye.sheet){let He="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";fa(ye.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),fa(ye.sheet,`[data-input-otp]:autofill { ${He} }`),fa(ye.sheet,`[data-input-otp]:-webkit-autofill { ${He} }`),fa(ye.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),fa(ye.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let be=()=>{te&&te.style.setProperty("--root-height",`${z.clientHeight}px`)};be();let $e=new ResizeObserver(be);return $e.observe(z),()=>{document.removeEventListener("selectionchange",fe,{capture:!0}),$e.disconnect()}},[]);let[R,B]=_.useState(!1),[q,j]=_.useState(!1),[F,W]=_.useState(null),[V,Y]=_.useState(null);_.useEffect(()=>{mC(()=>{var z,te,fe,be;(z=N.current)==null||z.dispatchEvent(new Event("input"));let $e=(te=N.current)==null?void 0:te.selectionStart,ye=(fe=N.current)==null?void 0:fe.selectionEnd,He=(be=N.current)==null?void 0:be.selectionDirection;$e!==null&&ye!==null&&(W($e),Y(ye),$.current.prev=[$e,ye,He])})},[T,q]),_.useEffect(()=>{k!==void 0&&T!==k&&k.length<o&&T.length===o&&(f==null||f(T))},[o,f,k,T]);let Q=OC({containerRef:I,inputRef:N,pushPasswordManagerStrategy:l,isFocused:q}),ee=_.useCallback(z=>{let te=z.currentTarget.value.slice(0,o);if(te.length>0&&M&&!M.test(te)){z.preventDefault();return}typeof k=="string"&&te.length<k.length&&document.dispatchEvent(new Event("selectionchange")),C(te)},[o,C,k,M]),re=_.useCallback(()=>{var z;if(N.current){let te=Math.min(N.current.value.length,o-1),fe=N.current.value.length;(z=N.current)==null||z.setSelectionRange(te,fe),W(te),Y(fe)}j(!0)},[o]),ie=_.useCallback(z=>{var te,fe;let be=N.current;if(!d&&(!L.current.isIOS||!z.clipboardData||!be))return;let $e=z.clipboardData.getData("text/plain"),ye=d?d($e):$e;z.preventDefault();let He=(te=N.current)==null?void 0:te.selectionStart,St=(fe=N.current)==null?void 0:fe.selectionEnd,Le=(He!==St?T.slice(0,He)+ye+T.slice(St):T.slice(0,He)+ye+T.slice(He)).slice(0,o);if(Le.length>0&&M&&!M.test(Le))return;be.value=Le,C(Le);let jt=Math.min(Le.length,o-1),dt=Le.length;be.setSelectionRange(jt,dt),W(jt),Y(dt)},[o,C,M,T]),G=_.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),X=_.useMemo(()=>({position:"absolute",inset:0,width:Q.willPushPWMBadge?`calc(100% + ${Q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Q.willPushPWMBadge?`inset(0 ${Q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Q.PWM_BADGE_SPACE_WIDTH,Q.willPushPWMBadge,i]),K=_.useMemo(()=>_.createElement("input",yC(vC({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":F,"data-input-otp-mse":V,inputMode:u,pattern:M==null?void 0:M.source,"aria-placeholder":c,style:X,maxLength:o,value:T,ref:N,onPaste:z=>{var te;ie(z),(te=b.onPaste)==null||te.call(b,z)},onChange:ee,onMouseOver:z=>{var te;B(!0),(te=b.onMouseOver)==null||te.call(b,z)},onMouseLeave:z=>{var te;B(!1),(te=b.onMouseLeave)==null||te.call(b,z)},onFocus:z=>{var te;re(),(te=b.onFocus)==null||te.call(b,z)},onBlur:z=>{var te;j(!1),(te=b.onBlur)==null||te.call(b,z)}})),[ee,re,ie,u,X,o,V,F,b,M==null?void 0:M.source,T]),D=_.useMemo(()=>({slots:Array.from({length:o}).map((z,te)=>{var fe;let be=q&&F!==null&&V!==null&&(F===V&&te===F||te>=F&&te<V),$e=T[te]!==void 0?T[te]:null,ye=T[0]!==void 0?null:(fe=c==null?void 0:c[te])!=null?fe:null;return{char:$e,placeholderChar:ye,isActive:be,hasFakeCaret:be&&$e===null}}),isFocused:q,isHovering:!b.disabled&&R}),[q,R,o,V,F,b.disabled,T]),ue=_.useMemo(()=>v?v(D):_.createElement(Ly.Provider,{value:D},h),[h,D,v]);return _.createElement(_.Fragment,null,g!==null&&_.createElement("noscript",null,_.createElement("style",null,g)),_.createElement("div",{ref:I,"data-input-otp-container":!0,style:G,className:p},ue,_.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},K)))});qy.displayName="Input";function fa(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var _C=`
|
|
2
2
|
[data-input-otp] {
|
|
3
3
|
--nojs-bg: white !important;
|
|
4
4
|
--nojs-fg: black !important;
|
|
@@ -22,175 +22,269 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the ISC license.
|
|
24
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/const
|
|
25
|
+
*/const PC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),By=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
26
26
|
* @license lucide-react v0.479.0 - ISC
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var
|
|
30
|
+
*/var AC={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"};/**
|
|
31
31
|
* @license lucide-react v0.479.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/const
|
|
35
|
+
*/const EC=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},c)=>A.createElement("svg",{ref:c,...AC,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:By("lucide",a),...s},[...i.map(([u,f])=>A.createElement(u,f)),...Array.isArray(o)?o:[o]]));/**
|
|
36
36
|
* @license lucide-react v0.479.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
40
|
+
*/const De=(e,t)=>{const r=A.forwardRef(({className:n,...a},o)=>A.createElement(EC,{ref:o,iconNode:t,className:By(`lucide-${PC(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
|
|
41
41
|
* @license lucide-react v0.479.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
45
|
+
*/const xc=De("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
46
46
|
* @license lucide-react v0.479.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
50
|
+
*/const TC=De("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
51
51
|
* @license lucide-react v0.479.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
55
|
+
*/const CC=De("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
|
|
56
56
|
* @license lucide-react v0.479.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
60
|
+
*/const MC=De("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
61
61
|
* @license lucide-react v0.479.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
65
|
+
*/const NC=De("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
66
66
|
* @license lucide-react v0.479.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const
|
|
70
|
+
*/const IC=De("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
71
71
|
* @license lucide-react v0.479.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const
|
|
75
|
+
*/const $C=De("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
76
76
|
* @license lucide-react v0.479.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
80
|
+
*/const Fy=De("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
81
81
|
* @license lucide-react v0.479.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
85
|
+
*/const DC=De("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
86
86
|
* @license lucide-react v0.479.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
90
|
+
*/const kC=De("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
91
91
|
* @license lucide-react v0.479.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
95
|
+
*/const jC=De("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
96
96
|
* @license lucide-react v0.479.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
100
|
+
*/const LC=De("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
101
101
|
* @license lucide-react v0.479.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const qC=De("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
106
106
|
* @license lucide-react v0.479.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
110
|
+
*/const BC=De("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
|
|
111
111
|
* @license lucide-react v0.479.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const FC=De("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
116
116
|
* @license lucide-react v0.479.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
120
|
+
*/const RC=De("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
121
121
|
* @license lucide-react v0.479.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
124
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
125
|
+
*/const Ry=De("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
126
126
|
* @license lucide-react v0.479.0 - ISC
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
130
|
+
*/const zy=De("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
|
|
131
131
|
* @license lucide-react v0.479.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const
|
|
135
|
+
*/const zC=De("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
|
|
136
136
|
* @license lucide-react v0.479.0 - ISC
|
|
137
137
|
*
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const
|
|
140
|
+
*/const WC=De("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
141
141
|
* @license lucide-react v0.479.0 - ISC
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the ISC license.
|
|
144
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const
|
|
145
|
+
*/const Wy=De("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
|
|
146
146
|
* @license lucide-react v0.479.0 - ISC
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const Ir=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Io(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Io(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ko(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Io(e))&&(n&&(n+=" "),n+=t);return n}const kr="-",Pl=e=>{const t=_l(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const l=c.split(kr);return l[0]===""&&l.length!==1&&l.shift(),Oo(l,t)||Al(c)},getConflictingClassGroupIds:(c,l)=>{const u=r[c]||[];return l&&n[c]?[...u,...n[c]]:u}}},Oo=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Oo(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(kr);return(c=t.validators.find(({validator:l})=>l(s)))==null?void 0:c.classGroupId},Lo=/^\[(.+)\]$/,Al=e=>{if(Lo.test(e)){const t=Lo.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_l=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)Or(r[a],n,a,t);return n},Or=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:Fo(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(Dl(a)){Or(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,c])=>{Or(c,Fo(t,s),r,n)})})},Fo=(e,t)=>{let r=e;return t.split(kr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Dl=e=>e.isThemeGetter,Il=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,c)=>{r.set(s,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=n.get(s))!==void 0)return a(s,c),c},set(s,c){r.has(s)?r.set(s,c):a(s,c)}}},Lr="!",Fr=":",kl=Fr.length,Ol=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let c=0,l=0,u=0,d;for(let b=0;b<a.length;b++){let g=a[b];if(c===0&&l===0){if(g===Fr){s.push(a.slice(u,b)),u=b+kl;continue}if(g==="/"){d=b;continue}}g==="["?c++:g==="]"?c--:g==="("?l++:g===")"&&l--}const f=s.length===0?a:a.substring(u),p=Ll(f),h=p!==f,m=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const a=t+Fr,s=n;n=c=>c.startsWith(a)?s(c.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},Ll=e=>e.endsWith(Lr)?e.substring(0,e.length-1):e.startsWith(Lr)?e.substring(1):e,Fl=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(c=>{c[0]==="["||t[c]?(a.push(...s.sort(),c),s=[]):s.push(c)}),a.push(...s.sort()),a}},$l=e=>({cache:Il(e.cacheSize),parseClassName:Ol(e),sortModifiers:Fl(e),...Pl(e)}),zl=/\s+/,Bl=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,c=[],l=e.trim().split(zl);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let w=!!g,v=n(w?b.substring(0,g):b);if(!v){if(!w){u=f+(u.length>0?" "+u:u);continue}if(v=n(b),!v){u=f+(u.length>0?" "+u:u);continue}w=!1}const y=s(h).join(":"),x=m?y+Lr:y,N=x+v;if(c.includes(N))continue;c.push(N);const E=a(v,w);for(let C=0;C<E.length;++C){const T=E[C];c.push(x+T)}u=f+(u.length>0?" "+u:u)}return u};function Wl(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$o(t))&&(n&&(n+=" "),n+=r);return n}const $o=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$o(e[n]))&&(r&&(r+=" "),r+=t);return r};function Vl(e,...t){let r,n,a,s=c;function c(u){const d=t.reduce((f,p)=>p(f),e());return r=$l(d),n=r.cache.get,a=r.cache.set,s=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Bl(u,r);return a(u,f),f}return function(){return s(Wl.apply(null,arguments))}}const ie=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gl=/^\d+\/\d+$/,Ul=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jl=/\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$/,Hl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Kl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Gl.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),qe=e=>!!e&&Number.isInteger(Number(e)),Wo=e=>e.endsWith("%")&&q(e.slice(0,-1)),ze=e=>Ul.test(e),ql=()=>!0,Xl=e=>jl.test(e)&&!Hl.test(e),$r=()=>!1,Ql=e=>Kl.test(e),Zl=e=>Yl.test(e),Jl=e=>!I(e)&&!k(e),Rl=e=>ot(e,Uo,$r),I=e=>zo.test(e),Xe=e=>ot(e,jo,Xl),zr=e=>ot(e,dd,q),ed=e=>ot(e,Vo,$r),td=e=>ot(e,Go,Zl),rd=e=>ot(e,$r,Ql),k=e=>Bo.test(e),Wt=e=>at(e,jo),nd=e=>at(e,ud),od=e=>at(e,Vo),ad=e=>at(e,Uo),sd=e=>at(e,Go),id=e=>at(e,fd,!0),ot=(e,t,r)=>{const n=zo.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},at=(e,t,r=!1)=>{const n=Bo.exec(e);return n?n[1]?t(n[1]):r:!1},Vo=e=>e==="position",cd=new Set(["image","url"]),Go=e=>cd.has(e),ld=new Set(["length","size","percentage"]),Uo=e=>ld.has(e),jo=e=>e==="length",dd=e=>e==="number",ud=e=>e==="family-name",fd=e=>e==="shadow",pd=Vl(()=>{const e=ie("color"),t=ie("font"),r=ie("text"),n=ie("font-weight"),a=ie("tracking"),s=ie("leading"),c=ie("breakpoint"),l=ie("container"),u=ie("spacing"),d=ie("radius"),f=ie("shadow"),p=ie("inset-shadow"),h=ie("drop-shadow"),m=ie("blur"),b=ie("perspective"),g=ie("aspect"),w=ie("ease"),v=ie("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],C=()=>[k,I,u],T=()=>[nt,"full","auto",...C()],$=()=>[qe,"none","subgrid",k,I],O=()=>["auto",{span:["full",qe,k,I]},k,I],B=()=>[qe,"auto",k,I],K=()=>["auto","min","max","fr",k,I],F=()=>["start","end","center","between","around","evenly","stretch","baseline"],L=()=>["start","end","center","stretch"],P=()=>["auto",...C()],V=()=>[nt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],A=()=>[e,k,I],X=()=>[Wo,Xe],D=()=>["","none","full",d,k,I],M=()=>["",q,Wt,Xe],Y=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["","none",m,k,I],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k,I],ne=()=>["none",q,k,I],se=()=>["none",q,k,I],le=()=>[q,k,I],ae=()=>[nt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ze],breakpoint:[ze],color:[ql],container:[ze],"drop-shadow":[ze],ease:["in","out","in-out"],font:[Jl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ze],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ze],shadow:[ze],spacing:["px",q],text:[ze],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nt,I,k,g]}],container:["container"],columns:[{columns:[q,I,k,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:[...x(),I,k]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[qe,"auto",k,I]}],basis:[{basis:[nt,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[q,nt,"auto","initial","none",I]}],grow:[{grow:["",q,k,I]}],shrink:[{shrink:["",q,k,I]}],order:[{order:[qe,"first","last","none",k,I]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...L(),"baseline"]}],"align-self":[{self:["auto",...L(),"baseline"]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[l,"screen",...V()]}],"min-w":[{"min-w":[l,"screen","none",...V()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[c]},...V()]}],h:[{h:["screen",...V()]}],"min-h":[{"min-h":["screen","none",...V()]}],"max-h":[{"max-h":["screen",...V()]}],"font-size":[{text:["base",r,Wt,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,k,zr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wo,I]}],"font-family":[{font:[nd,I,t]}],"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:[a,k,I]}],"line-clamp":[{"line-clamp":[q,"none",k,zr]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",k,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",k,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[q,"from-font","auto",k,Xe]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[q,"auto",k,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k,I]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",k,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),od,ed]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ad,Rl]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qe,k,I],radial:["",k,I],conic:[qe,k,I]},sd,td]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[q,k,I]}],"outline-w":[{outline:["",q,Wt,Xe]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,id,rd]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",k,I,p]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[q,Xe]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":A()}],opacity:[{opacity:[q,k,I]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none",k,I]}],blur:[{blur:ee()}],brightness:[{brightness:[q,k,I]}],contrast:[{contrast:[q,k,I]}],"drop-shadow":[{"drop-shadow":["","none",h,k,I]}],grayscale:[{grayscale:["",q,k,I]}],"hue-rotate":[{"hue-rotate":[q,k,I]}],invert:[{invert:["",q,k,I]}],saturate:[{saturate:[q,k,I]}],sepia:[{sepia:["",q,k,I]}],"backdrop-filter":[{"backdrop-filter":["","none",k,I]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[q,k,I]}],"backdrop-contrast":[{"backdrop-contrast":[q,k,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",q,k,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,k,I]}],"backdrop-invert":[{"backdrop-invert":["",q,k,I]}],"backdrop-opacity":[{"backdrop-opacity":[q,k,I]}],"backdrop-saturate":[{"backdrop-saturate":[q,k,I]}],"backdrop-sepia":[{"backdrop-sepia":["",q,k,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",k,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[q,"initial",k,I]}],ease:[{ease:["linear","initial",w,k,I]}],delay:[{delay:[q,k,I]}],animate:[{animate:["none",v,k,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,k,I]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[k,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",k,I]}],"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":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",k,I]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[q,Wt,Xe,zr]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function _(...e){return pd(ko(e))}function hd({className:e,containerClassName:t,...r}){return o.jsx(To,{"data-slot":"input-otp",containerClassName:_("flex items-center gap-2 has-disabled:opacity-50",t),className:_("disabled:cursor-not-allowed",e),...r})}function gd({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:_("flex items-center",e),...t})}function vd({index:e,className:t,...r}){const n=i.useContext(Eo),{char:a,hasFakeCaret:s,isActive:c}=(n==null?void 0:n.slots[e])??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:_("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function md({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o.jsx(yl,{})})}function z(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ho(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vt(...e){return t=>{let r=!1;const n=e.map(a=>{const s=Ho(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():Ho(e[a],null)}}}}function oe(...e){return i.useCallback(Vt(...e),e)}function bd(e,t){const r=i.createContext(t),n=s=>{const{children:c,...l}=s,u=i.useMemo(()=>l,Object.values(l));return o.jsx(r.Provider,{value:u,children:c})};n.displayName=e+"Provider";function a(s){const c=i.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,a]}function Be(e,t=[]){let r=[];function n(s,c){const l=i.createContext(c),u=r.length;r=[...r,c];const d=p=>{var v;const{scope:h,children:m,...b}=p,g=((v=h==null?void 0:h[e])==null?void 0:v[u])||l,w=i.useMemo(()=>b,Object.values(b));return o.jsx(g.Provider,{value:w,children:m})};d.displayName=s+"Provider";function f(p,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[u])||l,b=i.useContext(m);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,f]}const a=()=>{const s=r.map(c=>i.createContext(c));return function(l){const u=(l==null?void 0:l[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return a.scopeName=e,[n,wd(a,...t)]}function wd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const c=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...l,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var We=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},yd=i.useId||(()=>{}),xd=0;function Oe(e){const[t,r]=i.useState(yd());return We(()=>{r(n=>n??String(xd++))},[e]),t?`radix-${t}`:""}function fe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function st({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=Nd({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:n,l=fe(r),u=i.useCallback(d=>{if(s){const p=typeof d=="function"?d(e):d;p!==e&&l(p)}else a(d)},[s,e,a,l]);return[c,u]}function Nd({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,a=i.useRef(n),s=fe(t);return i.useEffect(()=>{a.current!==n&&(s(n),a.current=n)},[n,a,s]),r}var ye=i.forwardRef((e,t)=>{const{children:r,...n}=e,a=i.Children.toArray(r),s=a.find(Cd);if(s){const c=s.props.children,l=a.map(u=>u===s?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:u);return o.jsx(Br,{...n,ref:t,children:i.isValidElement(c)?i.cloneElement(c,void 0,l):null})}return o.jsx(Br,{...n,ref:t,children:r})});ye.displayName="Slot";var Br=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const a=Ed(r),s=Sd(n,r.props);return r.type!==i.Fragment&&(s.ref=t?Vt(t,a):a),i.cloneElement(r,s)}return i.Children.count(r)>1?i.Children.only(null):null});Br.displayName="SlotClone";var Ko=({children:e})=>o.jsx(o.Fragment,{children:e});function Cd(e){return i.isValidElement(e)&&e.type===Ko}function Sd(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...l)=>{s(...l),a(...l)}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function Ed(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Td=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=Td.reduce((e,t)=>{const r=i.forwardRef((n,a)=>{const{asChild:s,...c}=n,l=s?ye:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Wr(e,t){e&&_r.flushSync(()=>e.dispatchEvent(t))}function Md(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);i.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Pd="DismissableLayer",Vr="dismissableLayer.update",Ad="dismissableLayer.pointerDownOutside",_d="dismissableLayer.focusOutside",Yo,qo=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=i.useContext(qo),[f,p]=i.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),b=oe(t,T=>p(T)),g=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),y=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=y>=v,E=Id(T=>{const $=T.target,O=[...d.branches].some(B=>B.contains($));!N||O||(a==null||a(T),c==null||c(T),T.defaultPrevented||l==null||l())},h),C=kd(T=>{const $=T.target;[...d.branches].some(B=>B.contains($))||(s==null||s(T),c==null||c(T),T.defaultPrevented||l==null||l())},h);return Md(T=>{y===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Yo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Qo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yo)}},[f,h,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Qo())},[f,d]),i.useEffect(()=>{const T=()=>m({});return document.addEventListener(Vr,T),()=>document.removeEventListener(Vr,T)},[]),o.jsx(Z.div,{...u,ref:b,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,E.onPointerDownCapture)})});Nt.displayName=Pd;var Dd="DismissableLayerBranch",Xo=i.forwardRef((e,t)=>{const r=i.useContext(qo),n=i.useRef(null),a=oe(t,n);return i.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(Z.div,{...e,ref:a})});Xo.displayName=Dd;function Id(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{const s=l=>{if(l.target&&!n.current){let u=function(){Zo(Ad,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function kd(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=i.useRef(!1);return i.useEffect(()=>{const a=s=>{s.target&&!n.current&&Zo(_d,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qo(){const e=new CustomEvent(Vr);document.dispatchEvent(e)}function Zo(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Wr(a,s):a.dispatchEvent(s)}var Od=Nt,Ld=Xo,Gr="focusScope.autoFocusOnMount",Ur="focusScope.autoFocusOnUnmount",Jo={bubbles:!1,cancelable:!0},Fd="FocusScope",jr=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...c}=e,[l,u]=i.useState(null),d=fe(a),f=fe(s),p=i.useRef(null),h=oe(t,g=>u(g)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let g=function(x){if(m.paused||!l)return;const N=x.target;l.contains(N)?p.current=N:Ve(p.current,{select:!0})},w=function(x){if(m.paused||!l)return;const N=x.relatedTarget;N!==null&&(l.contains(N)||Ve(p.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Ve(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const y=new MutationObserver(v);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),y.disconnect()}}},[n,l,m.paused]),i.useEffect(()=>{if(l){ta.add(m);const g=document.activeElement;if(!l.contains(g)){const v=new CustomEvent(Gr,Jo);l.addEventListener(Gr,d),l.dispatchEvent(v),v.defaultPrevented||($d(Gd(Ro(l)),{select:!0}),document.activeElement===g&&Ve(l))}return()=>{l.removeEventListener(Gr,d),setTimeout(()=>{const v=new CustomEvent(Ur,Jo);l.addEventListener(Ur,f),l.dispatchEvent(v),v.defaultPrevented||Ve(g??document.body,{select:!0}),l.removeEventListener(Ur,f),ta.remove(m)},0)}}},[l,d,f,m]);const b=i.useCallback(g=>{if(!r&&!n||m.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const y=g.currentTarget,[x,N]=zd(y);x&&N?!g.shiftKey&&v===N?(g.preventDefault(),r&&Ve(x,{select:!0})):g.shiftKey&&v===x&&(g.preventDefault(),r&&Ve(N,{select:!0})):v===y&&g.preventDefault()}},[r,n,m.paused]);return o.jsx(Z.div,{tabIndex:-1,...c,ref:h,onKeyDown:b})});jr.displayName=Fd;function $d(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ve(n,{select:t}),document.activeElement!==r)return}function zd(e){const t=Ro(e),r=ea(t,e),n=ea(t.reverse(),e);return[r,n]}function Ro(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ea(e,t){for(const r of e)if(!Bd(r,{upTo:t}))return r}function Bd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wd(e){return e instanceof HTMLInputElement&&"select"in e}function Ve(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Wd(e)&&t&&e.select()}}var ta=Vd();function Vd(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ra(e,t),e.unshift(t)},remove(t){var r;e=ra(e,t),(r=e[0])==null||r.resume()}}}function ra(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Gd(e){return e.filter(t=>t.tagName!=="A")}var Ud="Portal",Ct=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,s]=i.useState(!1);We(()=>s(!0),[]);const c=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return c?wo.createPortal(o.jsx(Z.div,{...n,ref:t}),c):null});Ct.displayName=Ud;function jd(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Ne=e=>{const{present:t,children:r}=e,n=Hd(t),a=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),s=oe(n.ref,Kd(a));return typeof r=="function"||n.isPresent?i.cloneElement(a,{ref:s}):null};Ne.displayName="Presence";function Hd(e){const[t,r]=i.useState(),n=i.useRef({}),a=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[l,u]=jd(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=Gt(n.current);s.current=l==="mounted"?d:"none"},[l]),We(()=>{const d=n.current,f=a.current;if(f!==e){const h=s.current,m=Gt(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),We(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=Gt(n.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=m=>{m.target===t&&(s.current=Gt(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Gt(e){return(e==null?void 0:e.animationName)||"none"}function Kd(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hr=0;function na(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oa()),document.body.insertAdjacentElement("beforeend",e[1]??oa()),Hr++,()=>{Hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hr--}},[])}function oa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _e=function(){return _e=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},_e.apply(this,arguments)};function aa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Yd(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ut="right-scroll-bar-position",jt="width-before-scroll-bar",qd="with-scroll-bars-hidden",Xd="--removed-body-scroll-bar-size";function Kr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qd(e,t){var r=H.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var Zd=typeof window<"u"?i.useLayoutEffect:i.useEffect,sa=new WeakMap;function Jd(e,t){var r=Qd(null,function(n){return e.forEach(function(a){return Kr(a,n)})});return Zd(function(){var n=sa.get(r);if(n){var a=new Set(n),s=new Set(e),c=r.current;a.forEach(function(l){s.has(l)||Kr(l,null)}),s.forEach(function(l){a.has(l)||Kr(l,c)})}sa.set(r,e)},[e]),r}function Rd(e){return e}function eu(e,t){t===void 0&&(t=Rd);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=t(s,n);return r.push(c),function(){r=r.filter(function(l){return l!==c})}},assignSyncMedium:function(s){for(n=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){n=!0;var c=[];if(r.length){var l=r;r=[],l.forEach(s),c=r}var u=function(){var f=c;c=[],f.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){c.push(f),d()},filter:function(f){return c=c.filter(f),r}}}};return a}function tu(e){e===void 0&&(e={});var t=eu(null);return t.options=_e({async:!0,ssr:!1},e),t}var ia=function(e){var t=e.sideCar,r=aa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,_e({},r))};ia.isSideCarExport=!0;function ru(e,t){return e.useMedium(t),ia}var ca=tu(),Yr=function(){},Ht=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:Yr,onWheelCapture:Yr,onTouchMoveCapture:Yr}),a=n[0],s=n[1],c=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,m=e.noIsolation,b=e.inert,g=e.allowPinchZoom,w=e.as,v=w===void 0?"div":w,y=e.gapMode,x=aa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,E=Jd([r,t]),C=_e(_e({},x),a);return i.createElement(i.Fragment,null,f&&i.createElement(N,{sideCar:ca,removeScrollBar:d,shards:p,noIsolation:m,inert:b,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:y}),c?i.cloneElement(i.Children.only(l),_e(_e({},C),{ref:E})):i.createElement(v,_e({},C,{className:u,ref:E}),l))});Ht.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ht.classNames={fullWidth:jt,zeroRight:Ut};var nu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ou(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nu();return t&&e.setAttribute("nonce",t),e}function au(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function su(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var iu=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ou())&&(au(t,r),su(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cu=function(){var e=iu();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},la=function(){var e=cu(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},lu={left:0,top:0,right:0,gap:0},qr=function(e){return parseInt(e||"",10)||0},du=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[qr(r),qr(n),qr(a)]},uu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lu;var t=du(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},fu=la(),it="data-scroll-locked",pu=function(e,t,r,n){var a=e.left,s=e.top,c=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
151
|
-
.`.concat(
|
|
150
|
+
*/const Sc=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Uy(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Uy(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ge(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Uy(e))&&(n&&(n+=" "),n+=t);return n}const Oc="-",UC=e=>{const t=HC(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const s=i.split(Oc);return s[0]===""&&s.length!==1&&s.shift(),Gy(s,t)||GC(i)},getConflictingClassGroupIds:(i,s)=>{const c=r[i]||[];return s&&n[i]?[...c,...n[i]]:c}}},Gy=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Gy(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Oc);return(i=t.validators.find(({validator:s})=>s(o)))==null?void 0:i.classGroupId},Hy=/^\[(.+)\]$/,GC=e=>{if(Hy.test(e)){const t=Hy.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},HC=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)_c(r[a],n,a,t);return n},_c=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Vy(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(VC(a)){_c(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,i])=>{_c(i,Vy(t,o),r,n)})})},Vy=(e,t)=>{let r=e;return t.split(Oc).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},VC=e=>e.isThemeGetter,KC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return a(o,i),i},set(o,i){r.has(o)?r.set(o,i):a(o,i)}}},Pc="!",Ac=":",YC=Ac.length,XC=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const o=[];let i=0,s=0,c=0,u;for(let g=0;g<a.length;g++){let v=a[g];if(i===0&&s===0){if(v===Ac){o.push(a.slice(c,g)),c=g+YC;continue}if(v==="/"){u=g;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const f=o.length===0?a:a.substring(c),l=ZC(f),d=l!==f,p=u&&u>c?u-c:void 0;return{modifiers:o,hasImportantModifier:d,baseClassName:l,maybePostfixModifierPosition:p}};if(t){const a=t+Ac,o=n;n=i=>i.startsWith(a)?o(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=o=>r({className:o,parseClassName:a})}return n},ZC=e=>e.endsWith(Pc)?e.substring(0,e.length-1):e.startsWith(Pc)?e.substring(1):e,QC=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let o=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...o.sort(),i),o=[]):o.push(i)}),a.push(...o.sort()),a}},JC=e=>({cache:KC(e.cacheSize),parseClassName:XC(e),sortModifiers:QC(e),...UC(e)}),eM=/\s+/,tM=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],s=e.trim().split(eM);let c="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:l,modifiers:d,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}=r(f);if(l){c=f+(c.length>0?" "+c:c);continue}let h=!!v,b=n(h?g.substring(0,v):g);if(!b){if(!h){c=f+(c.length>0?" "+c:c);continue}if(b=n(g),!b){c=f+(c.length>0?" "+c:c);continue}h=!1}const w=o(d).join(":"),x=p?w+Pc:w,O=x+b;if(i.includes(O))continue;i.push(O);const m=a(b,h);for(let S=0;S<m.length;++S){const P=m[S];i.push(x+P)}c=f+(c.length>0?" "+c:c)}return c};function rM(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ky(t))&&(n&&(n+=" "),n+=r);return n}const Ky=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ky(e[n]))&&(r&&(r+=" "),r+=t);return r};function nM(e,...t){let r,n,a,o=i;function i(c){const u=t.reduce((f,l)=>l(f),e());return r=JC(u),n=r.cache.get,a=r.cache.set,o=s,s(c)}function s(c){const u=n(c);if(u)return u;const f=tM(c,r);return a(c,f),f}return function(){return o(rM.apply(null,arguments))}}const We=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Yy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aM=/^\d+\/\d+$/,oM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iM=/\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$/,sM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,an=e=>aM.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),Dr=e=>!!e&&Number.isInteger(Number(e)),Zy=e=>e.endsWith("%")&&he(e.slice(0,-1)),pr=e=>oM.test(e),lM=()=>!0,fM=e=>iM.test(e)&&!sM.test(e),Ec=()=>!1,dM=e=>cM.test(e),pM=e=>uM.test(e),hM=e=>!ae(e)&&!oe(e),vM=e=>on(e,eg,Ec),ae=e=>Yy.test(e),kr=e=>on(e,tg,fM),Tc=e=>on(e,AM,he),yM=e=>on(e,Qy,Ec),gM=e=>on(e,Jy,pM),mM=e=>on(e,Ec,dM),oe=e=>Xy.test(e),qo=e=>sn(e,tg),bM=e=>sn(e,EM),wM=e=>sn(e,Qy),xM=e=>sn(e,eg),SM=e=>sn(e,Jy),OM=e=>sn(e,TM,!0),on=(e,t,r)=>{const n=Yy.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},sn=(e,t,r=!1)=>{const n=Xy.exec(e);return n?n[1]?t(n[1]):r:!1},Qy=e=>e==="position",_M=new Set(["image","url"]),Jy=e=>_M.has(e),PM=new Set(["length","size","percentage"]),eg=e=>PM.has(e),tg=e=>e==="length",AM=e=>e==="number",EM=e=>e==="family-name",TM=e=>e==="shadow",CM=nM(()=>{const e=We("color"),t=We("font"),r=We("text"),n=We("font-weight"),a=We("tracking"),o=We("leading"),i=We("breakpoint"),s=We("container"),c=We("spacing"),u=We("radius"),f=We("shadow"),l=We("inset-shadow"),d=We("drop-shadow"),p=We("blur"),g=We("perspective"),v=We("aspect"),h=We("ease"),b=We("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["auto","hidden","clip","visible","scroll"],m=()=>["auto","contain","none"],S=()=>[oe,ae,c],P=()=>[an,"full","auto",...S()],E=()=>[Dr,"none","subgrid",oe,ae],T=()=>["auto",{span:["full",Dr,oe,ae]},oe,ae],k=()=>[Dr,"auto",oe,ae],C=()=>["auto","min","max","fr",oe,ae],M=()=>["start","end","center","between","around","evenly","stretch","baseline"],N=()=>["start","end","center","stretch"],I=()=>["auto",...S()],L=()=>[an,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],$=()=>[e,oe,ae],R=()=>[Zy,kr],B=()=>["","none","full",u,oe,ae],q=()=>["",he,qo,kr],j=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["","none",p,oe,ae],V=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oe,ae],Y=()=>["none",he,oe,ae],Q=()=>["none",he,oe,ae],ee=()=>[he,oe,ae],re=()=>[an,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pr],breakpoint:[pr],color:[lM],container:[pr],"drop-shadow":[pr],ease:["in","out","in-out"],font:[hM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pr],shadow:[pr],spacing:["px",he],text:[pr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",an,ae,oe,v]}],container:["container"],columns:[{columns:[he,ae,oe,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:[...x(),ae,oe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:m()}],"overscroll-x":[{"overscroll-x":m()}],"overscroll-y":[{"overscroll-y":m()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Dr,"auto",oe,ae]}],basis:[{basis:[an,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,an,"auto","initial","none",ae]}],grow:[{grow:["",he,oe,ae]}],shrink:[{shrink:["",he,oe,ae]}],order:[{order:[Dr,"first","last","none",oe,ae]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...N(),"baseline"]}],"align-self":[{self:["auto",...N(),"baseline"]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...L()]}],h:[{h:["screen",...L()]}],"min-h":[{"min-h":["screen","none",...L()]}],"max-h":[{"max-h":["screen",...L()]}],"font-size":[{text:["base",r,qo,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,oe,Tc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zy,ae]}],"font-family":[{font:[bM,ae,t]}],"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:[a,oe,ae]}],"line-clamp":[{"line-clamp":[he,"none",oe,Tc]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",oe,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",oe,kr]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[he,"auto",oe,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),wM,yM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",xM,vM]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dr,oe,ae],radial:["",oe,ae],conic:[Dr,oe,ae]},SM,gM]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...j(),"hidden","none"]}],"divide-style":[{divide:[...j(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...j(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,oe,ae]}],"outline-w":[{outline:["",he,qo,kr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,OM,mM]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",oe,ae,l]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[he,kr]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":$()}],opacity:[{opacity:[he,oe,ae]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none",oe,ae]}],blur:[{blur:W()}],brightness:[{brightness:[he,oe,ae]}],contrast:[{contrast:[he,oe,ae]}],"drop-shadow":[{"drop-shadow":["","none",d,oe,ae]}],grayscale:[{grayscale:["",he,oe,ae]}],"hue-rotate":[{"hue-rotate":[he,oe,ae]}],invert:[{invert:["",he,oe,ae]}],saturate:[{saturate:[he,oe,ae]}],sepia:[{sepia:["",he,oe,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ae]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[he,oe,ae]}],"backdrop-contrast":[{"backdrop-contrast":[he,oe,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,oe,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,oe,ae]}],"backdrop-invert":[{"backdrop-invert":["",he,oe,ae]}],"backdrop-opacity":[{"backdrop-opacity":[he,oe,ae]}],"backdrop-saturate":[{"backdrop-saturate":[he,oe,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",he,oe,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",oe,ae]}],ease:[{ease:["linear","initial",h,oe,ae]}],delay:[{delay:[he,oe,ae]}],animate:[{animate:["none",b,oe,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,oe,ae]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[oe,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",oe,ae]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",oe,ae]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[he,qo,kr,Tc]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function J(...e){return CM(ge(e))}function MM({className:e,containerClassName:t,...r}){return y.jsx(qy,{"data-slot":"input-otp",containerClassName:J("flex items-center gap-2 has-disabled:opacity-50",t),className:J("disabled:cursor-not-allowed",e),...r})}function NM({className:e,...t}){return y.jsx("div",{"data-slot":"input-otp-group",className:J("flex items-center",e),...t})}function IM({index:e,className:t,...r}){const n=_.useContext(Ly),{char:a,hasFakeCaret:o,isActive:i}=(n==null?void 0:n.slots[e])??{};return y.jsxs("div",{"data-slot":"input-otp-slot","data-active":i,className:J("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[a,o&&y.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:y.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function $M({...e}){return y.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:y.jsx(jC,{})})}function se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function rg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bo(...e){return t=>{let r=!1;const n=e.map(a=>{const o=rg(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<n.length;a++){const o=n[a];typeof o=="function"?o():rg(e[a],null)}}}}function je(...e){return _.useCallback(Bo(...e),e)}function DM(e,t){const r=_.createContext(t),n=o=>{const{children:i,...s}=o,c=_.useMemo(()=>s,Object.values(s));return y.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function a(o){const i=_.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,a]}function hr(e,t=[]){let r=[];function n(o,i){const s=_.createContext(i),c=r.length;r=[...r,i];const u=l=>{var b;const{scope:d,children:p,...g}=l,v=((b=d==null?void 0:d[e])==null?void 0:b[c])||s,h=_.useMemo(()=>g,Object.values(g));return y.jsx(v.Provider,{value:h,children:p})};u.displayName=o+"Provider";function f(l,d){var v;const p=((v=d==null?void 0:d[e])==null?void 0:v[c])||s,g=_.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[u,f]}const a=()=>{const o=r.map(i=>_.createContext(i));return function(s){const c=(s==null?void 0:s[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return a.scopeName=e,[n,kM(a,...t)]}function kM(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=n.reduce((s,{useScope:c,scopeName:u})=>{const l=c(o)[`__scope${u}`];return{...s,...l}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var vr=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},jM=_.useId||(()=>{}),LM=0;function Xt(e){const[t,r]=_.useState(jM());return vr(()=>{r(n=>n??String(LM++))},[e]),t?`radix-${t}`:""}function Xe(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function cn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=qM({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,s=Xe(r),c=_.useCallback(u=>{if(o){const l=typeof u=="function"?u(e):u;l!==e&&s(l)}else a(u)},[o,e,a,s]);return[i,c]}function qM({defaultProp:e,onChange:t}){const r=_.useState(e),[n]=r,a=_.useRef(n),o=Xe(t);return _.useEffect(()=>{a.current!==n&&(o(n),a.current=n)},[n,a,o]),r}var pt=_.forwardRef((e,t)=>{const{children:r,...n}=e,a=_.Children.toArray(r),o=a.find(BM);if(o){const i=o.props.children,s=a.map(c=>c===o?_.Children.count(i)>1?_.Children.only(null):_.isValidElement(i)?i.props.children:null:c);return y.jsx(Cc,{...n,ref:t,children:_.isValidElement(i)?_.cloneElement(i,void 0,s):null})}return y.jsx(Cc,{...n,ref:t,children:r})});pt.displayName="Slot";var Cc=_.forwardRef((e,t)=>{const{children:r,...n}=e;if(_.isValidElement(r)){const a=RM(r),o=FM(n,r.props);return r.type!==_.Fragment&&(o.ref=t?Bo(t,a):a),_.cloneElement(r,o)}return _.Children.count(r)>1?_.Children.only(null):null});Cc.displayName="SlotClone";var ng=({children:e})=>y.jsx(y.Fragment,{children:e});function BM(e){return _.isValidElement(e)&&e.type===ng}function FM(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...s)=>{o(...s),a(...s)}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function RM(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=zM.reduce((e,t)=>{const r=_.forwardRef((n,a)=>{const{asChild:o,...i}=n,s=o?pt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mc(e,t){e&&wc.flushSync(()=>e.dispatchEvent(t))}function WM(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e);_.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var UM="DismissableLayer",Nc="dismissableLayer.update",GM="dismissableLayer.pointerDownOutside",HM="dismissableLayer.focusOutside",ag,og=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),da=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...c}=e,u=_.useContext(og),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=_.useState({}),g=je(t,P=>l(P)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(h),w=f?v.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,O=w>=b,m=KM(P=>{const E=P.target,T=[...u.branches].some(k=>k.contains(E));!O||T||(a==null||a(P),i==null||i(P),P.defaultPrevented||s==null||s())},d),S=YM(P=>{const E=P.target;[...u.branches].some(k=>k.contains(E))||(o==null||o(P),i==null||i(P),P.defaultPrevented||s==null||s())},d);return WM(P=>{w===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),_.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ag=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),sg(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=ag)}},[f,d,r,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),sg())},[f,u]),_.useEffect(()=>{const P=()=>p({});return document.addEventListener(Nc,P),()=>document.removeEventListener(Nc,P)},[]),y.jsx(we.div,{...c,ref:g,style:{pointerEvents:x?O?"auto":"none":void 0,...e.style},onFocusCapture:se(e.onFocusCapture,S.onFocusCapture),onBlurCapture:se(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:se(e.onPointerDownCapture,m.onPointerDownCapture)})});da.displayName=UM;var VM="DismissableLayerBranch",ig=_.forwardRef((e,t)=>{const r=_.useContext(og),n=_.useRef(null),a=je(t,n);return _.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),y.jsx(we.div,{...e,ref:a})});ig.displayName=VM;function KM(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e),n=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let c=function(){cg(GM,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function YM(e,t=globalThis==null?void 0:globalThis.document){const r=Xe(e),n=_.useRef(!1);return _.useEffect(()=>{const a=o=>{o.target&&!n.current&&cg(HM,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function sg(){const e=new CustomEvent(Nc);document.dispatchEvent(e)}function cg(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Mc(a,o):a.dispatchEvent(o)}var XM=da,ZM=ig,Ic="focusScope.autoFocusOnMount",$c="focusScope.autoFocusOnUnmount",ug={bubbles:!1,cancelable:!0},QM="FocusScope",Dc=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,c]=_.useState(null),u=Xe(a),f=Xe(o),l=_.useRef(null),d=je(t,v=>c(v)),p=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(n){let v=function(x){if(p.paused||!s)return;const O=x.target;s.contains(O)?l.current=O:yr(l.current,{select:!0})},h=function(x){if(p.paused||!s)return;const O=x.relatedTarget;O!==null&&(s.contains(O)||yr(l.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const m of x)m.removedNodes.length>0&&yr(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const w=new MutationObserver(b);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),w.disconnect()}}},[n,s,p.paused]),_.useEffect(()=>{if(s){dg.add(p);const v=document.activeElement;if(!s.contains(v)){const b=new CustomEvent(Ic,ug);s.addEventListener(Ic,u),s.dispatchEvent(b),b.defaultPrevented||(JM(aN(lg(s)),{select:!0}),document.activeElement===v&&yr(s))}return()=>{s.removeEventListener(Ic,u),setTimeout(()=>{const b=new CustomEvent($c,ug);s.addEventListener($c,f),s.dispatchEvent(b),b.defaultPrevented||yr(v??document.body,{select:!0}),s.removeEventListener($c,f),dg.remove(p)},0)}}},[s,u,f,p]);const g=_.useCallback(v=>{if(!r&&!n||p.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(h&&b){const w=v.currentTarget,[x,O]=eN(w);x&&O?!v.shiftKey&&b===O?(v.preventDefault(),r&&yr(x,{select:!0})):v.shiftKey&&b===x&&(v.preventDefault(),r&&yr(O,{select:!0})):b===w&&v.preventDefault()}},[r,n,p.paused]);return y.jsx(we.div,{tabIndex:-1,...i,ref:d,onKeyDown:g})});Dc.displayName=QM;function JM(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yr(n,{select:t}),document.activeElement!==r)return}function eN(e){const t=lg(e),r=fg(t,e),n=fg(t.reverse(),e);return[r,n]}function lg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fg(e,t){for(const r of e)if(!tN(r,{upTo:t}))return r}function tN(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function rN(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&rN(e)&&t&&e.select()}}var dg=nN();function nN(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=pg(e,t),e.unshift(t)},remove(t){var r;e=pg(e,t),(r=e[0])==null||r.resume()}}}function pg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function aN(e){return e.filter(t=>t.tagName!=="A")}var oN="Portal",pa=_.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[a,o]=_.useState(!1);vr(()=>o(!0),[]);const i=r||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Ny.createPortal(y.jsx(we.div,{...n,ref:t}),i):null});pa.displayName=oN;function iN(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var _t=e=>{const{present:t,children:r}=e,n=sN(t),a=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),o=je(n.ref,cN(a));return typeof r=="function"||n.isPresent?_.cloneElement(a,{ref:o}):null};_t.displayName="Presence";function sN(e){const[t,r]=_.useState(),n=_.useRef({}),a=_.useRef(e),o=_.useRef("none"),i=e?"mounted":"unmounted",[s,c]=iN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Fo(n.current);o.current=s==="mounted"?u:"none"},[s]),vr(()=>{const u=n.current,f=a.current;if(f!==e){const d=o.current,p=Fo(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),vr(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,l=p=>{const v=Fo(n.current).includes(p.animationName);if(p.target===t&&v&&(c("ANIMATION_END"),!a.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},d=p=>{p.target===t&&(o.current=Fo(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Fo(e){return(e==null?void 0:e.animationName)||"none"}function cN(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var kc=0;function hg(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vg()),document.body.insertAdjacentElement("beforeend",e[1]??vg()),kc++,()=>{kc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kc--}},[])}function vg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qt=function(){return qt=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},qt.apply(this,arguments)};function yg(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function uN(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ro="right-scroll-bar-position",zo="width-before-scroll-bar",lN="with-scroll-bars-hidden",fN="--removed-body-scroll-bar-size";function jc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dN(e,t){var r=A.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var pN=typeof window<"u"?_.useLayoutEffect:_.useEffect,gg=new WeakMap;function hN(e,t){var r=dN(null,function(n){return e.forEach(function(a){return jc(a,n)})});return pN(function(){var n=gg.get(r);if(n){var a=new Set(n),o=new Set(e),i=r.current;a.forEach(function(s){o.has(s)||jc(s,null)}),o.forEach(function(s){a.has(s)||jc(s,i)})}gg.set(r,e)},[e]),r}function vN(e){return e}function yN(e,t){t===void 0&&(t=vN);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(o),i=r}var c=function(){var f=i;i=[],f.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return a}function gN(e){e===void 0&&(e={});var t=yN(null);return t.options=qt({async:!0,ssr:!1},e),t}var mg=function(e){var t=e.sideCar,r=yg(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return _.createElement(n,qt({},r))};mg.isSideCarExport=!0;function mN(e,t){return e.useMedium(t),mg}var bg=gN(),Lc=function(){},Wo=_.forwardRef(function(e,t){var r=_.useRef(null),n=_.useState({onScrollCapture:Lc,onWheelCapture:Lc,onTouchMoveCapture:Lc}),a=n[0],o=n[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,l=e.shards,d=e.sideCar,p=e.noIsolation,g=e.inert,v=e.allowPinchZoom,h=e.as,b=h===void 0?"div":h,w=e.gapMode,x=yg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=d,m=hN([r,t]),S=qt(qt({},x),a);return _.createElement(_.Fragment,null,f&&_.createElement(O,{sideCar:bg,removeScrollBar:u,shards:l,noIsolation:p,inert:g,setCallbacks:o,allowPinchZoom:!!v,lockRef:r,gapMode:w}),i?_.cloneElement(_.Children.only(s),qt(qt({},S),{ref:m})):_.createElement(b,qt({},S,{className:c,ref:m}),s))});Wo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Wo.classNames={fullWidth:zo,zeroRight:Ro};var bN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bN();return t&&e.setAttribute("nonce",t),e}function xN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ON=function(){var e=0,t=null;return{add:function(r){e==0&&(t=wN())&&(xN(t,r),SN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_N=function(){var e=ON();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},wg=function(){var e=_N(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},PN={left:0,top:0,right:0,gap:0},qc=function(e){return parseInt(e||"",10)||0},AN=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[qc(r),qc(n),qc(a)]},EN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PN;var t=AN(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},TN=wg(),un="data-scroll-locked",CN=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
151
|
+
.`.concat(lN,` {
|
|
152
152
|
overflow: hidden `).concat(n,`;
|
|
153
|
-
padding-right: `).concat(
|
|
153
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
154
154
|
}
|
|
155
|
-
body[`).concat(
|
|
155
|
+
body[`).concat(un,`] {
|
|
156
156
|
overflow: hidden `).concat(n,`;
|
|
157
157
|
overscroll-behavior: contain;
|
|
158
158
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
159
159
|
padding-left: `.concat(a,`px;
|
|
160
|
-
padding-top: `).concat(
|
|
161
|
-
padding-right: `).concat(
|
|
160
|
+
padding-top: `).concat(o,`px;
|
|
161
|
+
padding-right: `).concat(i,`px;
|
|
162
162
|
margin-left:0;
|
|
163
163
|
margin-top:0;
|
|
164
|
-
margin-right: `).concat(
|
|
165
|
-
`),r==="padding"&&"padding-right: ".concat(
|
|
164
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
165
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.`).concat(
|
|
169
|
-
right: `).concat(
|
|
168
|
+
.`).concat(Ro,` {
|
|
169
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
.`).concat(
|
|
173
|
-
margin-right: `).concat(
|
|
172
|
+
.`).concat(zo,` {
|
|
173
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
.`).concat(
|
|
176
|
+
.`).concat(Ro," .").concat(Ro,` {
|
|
177
177
|
right: 0 `).concat(n,`;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.`).concat(
|
|
180
|
+
.`).concat(zo," .").concat(zo,` {
|
|
181
181
|
margin-right: 0 `).concat(n,`;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
body[`).concat(
|
|
185
|
-
`).concat(
|
|
184
|
+
body[`).concat(un,`] {
|
|
185
|
+
`).concat(fN,": ").concat(s,`px;
|
|
186
186
|
}
|
|
187
|
-
`)},
|
|
187
|
+
`)},xg=function(){var e=parseInt(document.body.getAttribute(un)||"0",10);return isFinite(e)?e:0},MN=function(){_.useEffect(function(){return document.body.setAttribute(un,(xg()+1).toString()),function(){var e=xg()-1;e<=0?document.body.removeAttribute(un):document.body.setAttribute(un,e.toString())}},[])},NN=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;MN();var o=_.useMemo(function(){return EN(a)},[a]);return _.createElement(TN,{styles:CN(o,!t,a,r?"":"!important")})},Bc=!1;if(typeof window<"u")try{var Uo=Object.defineProperty({},"passive",{get:function(){return Bc=!0,!0}});window.addEventListener("test",Uo,Uo),window.removeEventListener("test",Uo,Uo)}catch{Bc=!1}var ln=Bc?{passive:!1}:!1,IN=function(e){return e.tagName==="TEXTAREA"},Sg=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!IN(e)&&r[t]==="visible")},$N=function(e){return Sg(e,"overflowY")},DN=function(e){return Sg(e,"overflowX")},Og=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=_g(e,n);if(a){var o=Pg(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},kN=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},jN=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},_g=function(e,t){return e==="v"?$N(t):DN(t)},Pg=function(e,t){return e==="v"?kN(t):jN(t)},LN=function(e,t){return e==="h"&&t==="rtl"?-1:1},qN=function(e,t,r,n,a){var o=LN(e,window.getComputedStyle(t).direction),i=o*n,s=r.target,c=t.contains(s),u=!1,f=i>0,l=0,d=0;do{var p=Pg(e,s),g=p[0],v=p[1],h=p[2],b=v-h-o*g;(g||b)&&_g(e,s)&&(l+=b,d+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},Go=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ag=function(e){return[e.deltaX,e.deltaY]},Eg=function(e){return e&&"current"in e?e.current:e},BN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FN=function(e){return`
|
|
188
188
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
189
189
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
190
|
-
`)},
|
|
190
|
+
`)},RN=0,fn=[];function zN(e){var t=_.useRef([]),r=_.useRef([0,0]),n=_.useRef(),a=_.useState(RN++)[0],o=_.useState(wg)[0],i=_.useRef(e);_.useEffect(function(){i.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=uN([e.lockRef.current],(e.shards||[]).map(Eg),!0).filter(Boolean);return v.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=_.useCallback(function(v,h){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var b=Go(v),w=r.current,x="deltaX"in v?v.deltaX:w[0]-b[0],O="deltaY"in v?v.deltaY:w[1]-b[1],m,S=v.target,P=Math.abs(x)>Math.abs(O)?"h":"v";if("touches"in v&&P==="h"&&S.type==="range")return!1;var E=Og(P,S);if(!E)return!0;if(E?m=P:(m=P==="v"?"h":"v",E=Og(P,S)),!E)return!1;if(!n.current&&"changedTouches"in v&&(x||O)&&(n.current=m),!m)return!0;var T=n.current||m;return qN(T,h,v,T==="h"?x:O)},[]),c=_.useCallback(function(v){var h=v;if(!(!fn.length||fn[fn.length-1]!==o)){var b="deltaY"in h?Ag(h):Go(h),w=t.current.filter(function(m){return m.name===h.type&&(m.target===h.target||h.target===m.shadowParent)&&BN(m.delta,b)})[0];if(w&&w.should){h.cancelable&&h.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(Eg).filter(Boolean).filter(function(m){return m.contains(h.target)}),O=x.length>0?s(h,x[0]):!i.current.noIsolation;O&&h.cancelable&&h.preventDefault()}}},[]),u=_.useCallback(function(v,h,b,w){var x={name:v,delta:h,target:b,should:w,shadowParent:WN(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(O){return O!==x})},1)},[]),f=_.useCallback(function(v){r.current=Go(v),n.current=void 0},[]),l=_.useCallback(function(v){u(v.type,Ag(v),v.target,s(v,e.lockRef.current))},[]),d=_.useCallback(function(v){u(v.type,Go(v),v.target,s(v,e.lockRef.current))},[]);_.useEffect(function(){return fn.push(o),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,ln),document.addEventListener("touchmove",c,ln),document.addEventListener("touchstart",f,ln),function(){fn=fn.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,ln),document.removeEventListener("touchmove",c,ln),document.removeEventListener("touchstart",f,ln)}},[]);var p=e.removeScrollBar,g=e.inert;return _.createElement(_.Fragment,null,g?_.createElement(o,{styles:FN(a)}):null,p?_.createElement(NN,{gapMode:e.gapMode}):null)}function WN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const UN=mN(bg,zN);var Fc=_.forwardRef(function(e,t){return _.createElement(Wo,qt({},e,{ref:t,sideCar:UN}))});Fc.classNames=Wo.classNames;var GN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Ho=new WeakMap,Vo={},Rc=0,Tg=function(e){return e&&(e.host||Tg(e.parentNode))},HN=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Tg(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},VN=function(e,t,r,n){var a=HN(t,Array.isArray(e)?e:[e]);Vo[r]||(Vo[r]=new WeakMap);var o=Vo[r],i=[],s=new Set,c=new Set(a),u=function(l){!l||s.has(l)||(s.add(l),u(l.parentNode))};a.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(d){if(s.has(d))f(d);else try{var p=d.getAttribute(n),g=p!==null&&p!=="false",v=(dn.get(d)||0)+1,h=(o.get(d)||0)+1;dn.set(d,v),o.set(d,h),i.push(d),v===1&&g&&Ho.set(d,!0),h===1&&d.setAttribute(r,"true"),g||d.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return f(t),s.clear(),Rc++,function(){i.forEach(function(l){var d=dn.get(l)-1,p=o.get(l)-1;dn.set(l,d),o.set(l,p),d||(Ho.has(l)||l.removeAttribute(n),Ho.delete(l)),p||l.removeAttribute(r)}),Rc--,Rc||(dn=new WeakMap,dn=new WeakMap,Ho=new WeakMap,Vo={})}},Cg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=GN(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),VN(n,a,r,"aria-hidden")):function(){return null}},zc="Dialog",[Mg,vV]=hr(zc),[KN,Pt]=Mg(zc),Ng=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=_.useRef(null),c=_.useRef(null),[u=!1,f]=cn({prop:n,defaultProp:a,onChange:o});return y.jsx(KN,{scope:t,triggerRef:s,contentRef:c,contentId:Xt(),titleId:Xt(),descriptionId:Xt(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:i,children:r})};Ng.displayName=zc;var Ig="DialogTrigger",$g=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Pt(Ig,r),o=je(t,a.triggerRef);return y.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Gc(a.open),...n,ref:o,onClick:se(e.onClick,a.onOpenToggle)})});$g.displayName=Ig;var Wc="DialogPortal",[YN,Dg]=Mg(Wc,{forceMount:void 0}),kg=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=Pt(Wc,t);return y.jsx(YN,{scope:t,forceMount:r,children:_.Children.map(n,i=>y.jsx(_t,{present:r||o.open,children:y.jsx(pa,{asChild:!0,container:a,children:i})}))})};kg.displayName=Wc;var Ko="DialogOverlay",jg=_.forwardRef((e,t)=>{const r=Dg(Ko,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=Pt(Ko,e.__scopeDialog);return o.modal?y.jsx(_t,{present:n||o.open,children:y.jsx(XN,{...a,ref:t})}):null});jg.displayName=Ko;var XN=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Pt(Ko,r);return y.jsx(Fc,{as:pt,allowPinchZoom:!0,shards:[a.contentRef],children:y.jsx(we.div,{"data-state":Gc(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),jr="DialogContent",Lg=_.forwardRef((e,t)=>{const r=Dg(jr,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=Pt(jr,e.__scopeDialog);return y.jsx(_t,{present:n||o.open,children:o.modal?y.jsx(ZN,{...a,ref:t}):y.jsx(QN,{...a,ref:t})})});Lg.displayName=jr;var ZN=_.forwardRef((e,t)=>{const r=Pt(jr,e.__scopeDialog),n=_.useRef(null),a=je(t,r.contentRef,n);return _.useEffect(()=>{const o=n.current;if(o)return Cg(o)},[]),y.jsx(qg,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:se(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:se(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&o.preventDefault()}),onFocusOutside:se(e.onFocusOutside,o=>o.preventDefault())})}),QN=_.forwardRef((e,t)=>{const r=Pt(jr,e.__scopeDialog),n=_.useRef(!1),a=_.useRef(!1);return y.jsx(qg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),qg=_.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=Pt(jr,r),c=_.useRef(null),u=je(t,c);return hg(),y.jsxs(y.Fragment,{children:[y.jsx(Dc,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:y.jsx(da,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Gc(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(JN,{titleId:s.titleId}),y.jsx(tI,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Uc="DialogTitle",Bg=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Pt(Uc,r);return y.jsx(we.h2,{id:a.titleId,...n,ref:t})});Bg.displayName=Uc;var Fg="DialogDescription",Rg=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Pt(Fg,r);return y.jsx(we.p,{id:a.descriptionId,...n,ref:t})});Rg.displayName=Fg;var zg="DialogClose",Wg=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Pt(zg,r);return y.jsx(we.button,{type:"button",...n,ref:t,onClick:se(e.onClick,()=>a.onOpenChange(!1))})});Wg.displayName=zg;function Gc(e){return e?"open":"closed"}var Ug="DialogTitleWarning",[yV,Gg]=DM(Ug,{contentName:jr,titleName:Uc,docsSlug:"dialog"}),JN=({titleId:e})=>{const t=Gg(Ug),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
191
191
|
|
|
192
192
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
193
193
|
|
|
194
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},zu="DialogDescriptionWarning",Bu=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Oa(zu).contentName}}.`;return i.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rn=ya,La=Na,Fa=Sa,Zt=Ea,Jt=Ta,Rt=Pa,er=_a,tr=Ia;const St=({modal:e=!1,...t})=>o.jsx(rn,{modal:e,...t});St.displayName=rn.displayName;const nn=La,$a=Fa,on=tr,an=i.forwardRef(({className:e,...t},r)=>o.jsx(Zt,{ref:r,className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));an.displayName=Zt.displayName;const Et=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs($a,{children:[o.jsx(an,{}),o.jsxs(Jt,{ref:n,className:_("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,o.jsxs(tr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(Ir,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Et.displayName=Jt.displayName;const rr=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rr.displayName="DialogHeader";const sn=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});sn.displayName="DialogFooter";const nr=i.forwardRef(({className:e,...t},r)=>o.jsx(Rt,{ref:r,className:_("text-lg font-semibold leading-none tracking-tight",e),...t}));nr.displayName=Rt.displayName;const cn=i.forwardRef(({className:e,...t},r)=>o.jsx(er,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));cn.displayName=er.displayName;function ln(e){const t=e+"CollectionProvider",[r,n]=Be(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:b,children:g}=m,w=H.useRef(null),v=H.useRef(new Map).current;return o.jsx(a,{scope:b,itemMap:v,collectionRef:w,children:g})};c.displayName=t;const l=e+"CollectionSlot",u=H.forwardRef((m,b)=>{const{scope:g,children:w}=m,v=s(l,g),y=oe(b,v.collectionRef);return o.jsx(ye,{ref:y,children:w})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=H.forwardRef((m,b)=>{const{scope:g,children:w,...v}=m,y=H.useRef(null),x=oe(b,y),N=s(d,g);return H.useEffect(()=>(N.itemMap.set(y,{ref:y,...v}),()=>void N.itemMap.delete(y))),o.jsx(ye,{[f]:"",ref:x,children:w})});p.displayName=d;function h(m){const b=s(e+"CollectionConsumer",m);return H.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const v=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((N,E)=>v.indexOf(N.ref.current)-v.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},h,n]}var Wu=i.createContext(void 0);function za(e){const t=i.useContext(Wu);return e||t||"ltr"}const Vu=["top","right","bottom","left"],Ge=Math.min,me=Math.max,or=Math.round,ar=Math.floor,De=e=>({x:e,y:e}),Gu={left:"right",right:"left",bottom:"top",top:"bottom"},Uu={start:"end",end:"start"};function dn(e,t,r){return me(e,Ge(t,r))}function Le(e,t){return typeof e=="function"?e(t):e}function Fe(e){return e.split("-")[0]}function ut(e){return e.split("-")[1]}function un(e){return e==="x"?"y":"x"}function fn(e){return e==="y"?"height":"width"}function Ue(e){return["top","bottom"].includes(Fe(e))?"y":"x"}function pn(e){return un(Ue(e))}function ju(e,t,r){r===void 0&&(r=!1);const n=ut(e),a=pn(e),s=fn(a);let c=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=sr(c)),[c,sr(c)]}function Hu(e){const t=sr(e);return[hn(e),t,hn(t)]}function hn(e){return e.replace(/start|end/g,t=>Uu[t])}function Ku(e,t,r){const n=["left","right"],a=["right","left"],s=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?s:c;default:return[]}}function Yu(e,t,r,n){const a=ut(e);let s=Ku(Fe(e),r==="start",n);return a&&(s=s.map(c=>c+"-"+a),t&&(s=s.concat(s.map(hn)))),s}function sr(e){return e.replace(/left|right|bottom|top/g,t=>Gu[t])}function qu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ba(e){return typeof e!="number"?qu(e):{top:e,right:e,bottom:e,left:e}}function ir(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Wa(e,t,r){let{reference:n,floating:a}=e;const s=Ue(t),c=pn(t),l=fn(c),u=Fe(t),d=s==="y",f=n.x+n.width/2-a.width/2,p=n.y+n.height/2-a.height/2,h=n[l]/2-a[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-a.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-a.width,y:p};break;default:m={x:n.x,y:n.y}}switch(ut(t)){case"start":m[c]-=h*(r&&d?-1:1);break;case"end":m[c]+=h*(r&&d?-1:1);break}return m}const Xu=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:c}=r,l=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let d=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:p}=Wa(d,n,u),h=n,m={},b=0;for(let g=0;g<l.length;g++){const{name:w,fn:v}=l[g],{x:y,y:x,data:N,reset:E}=await v({x:f,y:p,initialPlacement:n,placement:h,strategy:a,middlewareData:m,rects:d,platform:c,elements:{reference:e,floating:t}});f=y??f,p=x??p,m={...m,[w]:{...m[w],...N}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):E.rects),{x:f,y:p}=Wa(d,h,u)),g=-1)}return{x:f,y:p,placement:h,strategy:a,middlewareData:m}};async function Tt(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:s,rects:c,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=Le(t,e),b=Ba(m),w=l[h?p==="floating"?"reference":"floating":p],v=ir(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(w)))==null||r?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),y=p==="floating"?{x:n,y:a,width:c.floating.width,height:c.floating.height}:c.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),N=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=ir(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:u}):y);return{top:(v.top-E.top+b.top)/N.y,bottom:(E.bottom-v.bottom+b.bottom)/N.y,left:(v.left-E.left+b.left)/N.x,right:(E.right-v.right+b.right)/N.x}}const Qu=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=Le(e,t)||{};if(d==null)return{};const p=Ba(f),h={x:r,y:n},m=pn(a),b=fn(m),g=await c.getDimensions(d),w=m==="y",v=w?"top":"left",y=w?"bottom":"right",x=w?"clientHeight":"clientWidth",N=s.reference[b]+s.reference[m]-h[m]-s.floating[b],E=h[m]-s.reference[m],C=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let T=C?C[x]:0;(!T||!await(c.isElement==null?void 0:c.isElement(C)))&&(T=l.floating[x]||s.floating[b]);const $=N/2-E/2,O=T/2-g[b]/2-1,B=Ge(p[v],O),K=Ge(p[y],O),F=B,L=T-g[b]-K,P=T/2-g[b]/2+$,V=dn(F,P,L),A=!u.arrow&&ut(a)!=null&&P!==V&&s.reference[b]/2-(P<F?B:K)-g[b]/2<0,X=A?P<F?P-F:P-L:0;return{[m]:h[m]+X,data:{[m]:V,centerOffset:P-V-X,...A&&{alignmentOffset:X}},reset:A}}}),Zu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:s,rects:c,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Le(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const v=Fe(a),y=Ue(l),x=Fe(l)===l,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(x||!g?[sr(l)]:Hu(l)),C=b!=="none";!h&&C&&E.push(...Yu(l,g,b,N));const T=[l,...E],$=await Tt(t,w),O=[];let B=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&O.push($[v]),p){const P=ju(a,c,N);O.push($[P[0]],$[P[1]])}if(B=[...B,{placement:a,overflows:O}],!O.every(P=>P<=0)){var K,F;const P=(((K=s.flip)==null?void 0:K.index)||0)+1,V=T[P];if(V)return{data:{index:P,overflows:B},reset:{placement:V}};let A=(F=B.filter(X=>X.overflows[0]<=0).sort((X,D)=>X.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!A)switch(m){case"bestFit":{var L;const X=(L=B.filter(D=>{if(C){const M=Ue(D.placement);return M===y||M==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(M=>M>0).reduce((M,Y)=>M+Y,0)]).sort((D,M)=>D[1]-M[1])[0])==null?void 0:L[0];X&&(A=X);break}case"initialPlacement":A=l;break}if(a!==A)return{reset:{placement:A}}}return{}}}};function Va(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ga(e){return Vu.some(t=>e[t]>=0)}const Ju=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Le(e,t);switch(n){case"referenceHidden":{const s=await Tt(t,{...a,elementContext:"reference"}),c=Va(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ga(c)}}}case"escaped":{const s=await Tt(t,{...a,altBoundary:!0}),c=Va(s,r.floating);return{data:{escapedOffsets:c,escaped:Ga(c)}}}default:return{}}}}};async function Ru(e,t){const{placement:r,platform:n,elements:a}=e,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),c=Fe(r),l=ut(r),u=Ue(r)==="y",d=["left","top"].includes(c)?-1:1,f=s&&u?-1:1,p=Le(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),u?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const ef=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:s,placement:c,middlewareData:l}=t,u=await Ru(t,e);return c===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:c}}}}},tf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...u}=Le(e,t),d={x:r,y:n},f=await Tt(t,u),p=Ue(Fe(a)),h=un(p);let m=d[h],b=d[p];if(s){const w=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=m+f[w],x=m-f[v];m=dn(y,m,x)}if(c){const w=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=b+f[w],x=b-f[v];b=dn(y,b,x)}const g=l.fn({...t,[h]:m,[p]:b});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:s,[p]:c}}}}}},rf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=Le(e,t),f={x:r,y:n},p=Ue(a),h=un(p);let m=f[h],b=f[p];const g=Le(l,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=h==="y"?"height":"width",N=s.reference[h]-s.floating[x]+w.mainAxis,E=s.reference[h]+s.reference[x]-w.mainAxis;m<N?m=N:m>E&&(m=E)}if(d){var v,y;const x=h==="y"?"width":"height",N=["top","left"].includes(Fe(a)),E=s.reference[p]-s.floating[x]+(N&&((v=c.offset)==null?void 0:v[p])||0)+(N?0:w.crossAxis),C=s.reference[p]+s.reference[x]+(N?0:((y=c.offset)==null?void 0:y[p])||0)-(N?w.crossAxis:0);b<E?b=E:b>C&&(b=C)}return{[h]:m,[p]:b}}}},nf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:s,platform:c,elements:l}=t,{apply:u=()=>{},...d}=Le(e,t),f=await Tt(t,d),p=Fe(a),h=ut(a),m=Ue(a)==="y",{width:b,height:g}=s.floating;let w,v;p==="top"||p==="bottom"?(w=p,v=h===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(v=p,w=h==="end"?"top":"bottom");const y=g-f.top-f.bottom,x=b-f.left-f.right,N=Ge(g-f[w],y),E=Ge(b-f[v],x),C=!t.middlewareData.shift;let T=N,$=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&($=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),C&&!h){const B=me(f.left,0),K=me(f.right,0),F=me(f.top,0),L=me(f.bottom,0);m?$=b-2*(B!==0||K!==0?B+K:me(f.left,f.right)):T=g-2*(F!==0||L!==0?F+L:me(f.top,f.bottom))}await u({...t,availableWidth:$,availableHeight:T});const O=await c.getDimensions(l.floating);return b!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function cr(){return typeof window<"u"}function ft(e){return Ua(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(Ua(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ua(e){return cr()?e instanceof Node||e instanceof be(e).Node:!1}function Se(e){return cr()?e instanceof Element||e instanceof be(e).Element:!1}function ke(e){return cr()?e instanceof HTMLElement||e instanceof be(e).HTMLElement:!1}function ja(e){return!cr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof be(e).ShadowRoot}function Mt(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function of(e){return["table","td","th"].includes(ft(e))}function lr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gn(e){const t=vn(),r=Se(e)?Ee(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function af(e){let t=je(e);for(;ke(t)&&!pt(t);){if(gn(t))return t;if(lr(t))return null;t=je(t)}return null}function vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(e){return["html","body","#document"].includes(ft(e))}function Ee(e){return be(e).getComputedStyle(e)}function dr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(ft(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ja(e)&&e.host||Ie(e);return ja(t)?t.host:t}function Ha(e){const t=je(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ke(t)&&Mt(t)?t:Ha(t)}function Pt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=Ha(e),s=a===((n=e.ownerDocument)==null?void 0:n.body),c=be(a);if(s){const l=mn(c);return t.concat(c,c.visualViewport||[],Mt(a)?a:[],l&&r?Pt(l):[])}return t.concat(a,Pt(a,[],r))}function mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ka(e){const t=Ee(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=ke(e),s=a?e.offsetWidth:r,c=a?e.offsetHeight:n,l=or(r)!==s||or(n)!==c;return l&&(r=s,n=c),{width:r,height:n,$:l}}function bn(e){return Se(e)?e:e.contextElement}function ht(e){const t=bn(e);if(!ke(t))return De(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:s}=Ka(t);let c=(s?or(r.width):r.width)/n,l=(s?or(r.height):r.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const sf=De(0);function Ya(e){const t=be(e);return!vn()||!t.visualViewport?sf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==be(e)?!1:t}function Ze(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=bn(e);let c=De(1);t&&(n?Se(n)&&(c=ht(n)):c=ht(e));const l=cf(s,r,n)?Ya(s):De(0);let u=(a.left+l.x)/c.x,d=(a.top+l.y)/c.y,f=a.width/c.x,p=a.height/c.y;if(s){const h=be(s),m=n&&Se(n)?be(n):n;let b=h,g=mn(b);for(;g&&n&&m!==b;){const w=ht(g),v=g.getBoundingClientRect(),y=Ee(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,N=v.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;u*=w.x,d*=w.y,f*=w.x,p*=w.y,u+=x,d+=N,b=be(g),g=mn(b)}}return ir({width:f,height:p,x:u,y:d})}function wn(e,t){const r=dr(e).scrollLeft;return t?t.left+r:Ze(Ie(e)).left+r}function qa(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:wn(e,n)),s=n.top+t.scrollTop;return{x:a,y:s}}function lf(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const s=a==="fixed",c=Ie(n),l=t?lr(t.floating):!1;if(n===c||l&&s)return r;let u={scrollLeft:0,scrollTop:0},d=De(1);const f=De(0),p=ke(n);if((p||!p&&!s)&&((ft(n)!=="body"||Mt(c))&&(u=dr(n)),ke(n))){const m=Ze(n);d=ht(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const h=c&&!p&&!s?qa(c,u,!0):De(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:r.y*d.y-u.scrollTop*d.y+f.y+h.y}}function df(e){return Array.from(e.getClientRects())}function uf(e){const t=Ie(e),r=dr(e),n=e.ownerDocument.body,a=me(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=me(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-r.scrollLeft+wn(e);const l=-r.scrollTop;return Ee(n).direction==="rtl"&&(c+=me(t.clientWidth,n.clientWidth)-a),{width:a,height:s,x:c,y:l}}function ff(e,t){const r=be(e),n=Ie(e),a=r.visualViewport;let s=n.clientWidth,c=n.clientHeight,l=0,u=0;if(a){s=a.width,c=a.height;const d=vn();(!d||d&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}return{width:s,height:c,x:l,y:u}}function pf(e,t){const r=Ze(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,s=ke(e)?ht(e):De(1),c=e.clientWidth*s.x,l=e.clientHeight*s.y,u=a*s.x,d=n*s.y;return{width:c,height:l,x:u,y:d}}function Xa(e,t,r){let n;if(t==="viewport")n=ff(e,r);else if(t==="document")n=uf(Ie(e));else if(Se(t))n=pf(t,r);else{const a=Ya(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ir(n)}function Qa(e,t){const r=je(e);return r===t||!Se(r)||pt(r)?!1:Ee(r).position==="fixed"||Qa(r,t)}function hf(e,t){const r=t.get(e);if(r)return r;let n=Pt(e,[],!1).filter(l=>Se(l)&&ft(l)!=="body"),a=null;const s=Ee(e).position==="fixed";let c=s?je(e):e;for(;Se(c)&&!pt(c);){const l=Ee(c),u=gn(c);!u&&l.position==="fixed"&&(a=null),(s?!u&&!a:!u&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Mt(c)&&!u&&Qa(e,c))?n=n.filter(f=>f!==c):a=l,c=je(c)}return t.set(e,n),n}function gf(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const c=[...r==="clippingAncestors"?lr(t)?[]:hf(t,this._c):[].concat(r),n],l=c[0],u=c.reduce((d,f)=>{const p=Xa(t,f,a);return d.top=me(p.top,d.top),d.right=Ge(p.right,d.right),d.bottom=Ge(p.bottom,d.bottom),d.left=me(p.left,d.left),d},Xa(t,l,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function vf(e){const{width:t,height:r}=Ka(e);return{width:t,height:r}}function mf(e,t,r){const n=ke(t),a=Ie(t),s=r==="fixed",c=Ze(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const u=De(0);if(n||!n&&!s)if((ft(t)!=="body"||Mt(a))&&(l=dr(t)),n){const h=Ze(t,!0,s,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else a&&(u.x=wn(a));const d=a&&!n&&!s?qa(a,l):De(0),f=c.left+l.scrollLeft-u.x-d.x,p=c.top+l.scrollTop-u.y-d.y;return{x:f,y:p,width:c.width,height:c.height}}function yn(e){return Ee(e).position==="static"}function Za(e,t){if(!ke(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ie(e)===r&&(r=r.ownerDocument.body),r}function Ja(e,t){const r=be(e);if(lr(e))return r;if(!ke(e)){let a=je(e);for(;a&&!pt(a);){if(Se(a)&&!yn(a))return a;a=je(a)}return r}let n=Za(e,t);for(;n&&of(n)&&yn(n);)n=Za(n,t);return n&&pt(n)&&yn(n)&&!gn(n)?r:n||af(e)||r}const bf=async function(e){const t=this.getOffsetParent||Ja,r=this.getDimensions,n=await r(e.floating);return{reference:mf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wf(e){return Ee(e).direction==="rtl"}const yf={convertOffsetParentRelativeRectToViewportRelativeRect:lf,getDocumentElement:Ie,getClippingRect:gf,getOffsetParent:Ja,getElementRects:bf,getClientRects:df,getDimensions:vf,getScale:ht,isElement:Se,isRTL:wf};function Ra(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xf(e,t){let r=null,n;const a=Ie(e);function s(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function c(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:f,top:p,width:h,height:m}=d;if(l||t(),!h||!m)return;const b=ar(p),g=ar(a.clientWidth-(f+h)),w=ar(a.clientHeight-(p+m)),v=ar(f),x={rootMargin:-b+"px "+-g+"px "+-w+"px "+-v+"px",threshold:me(0,Ge(1,u))||1};let N=!0;function E(C){const T=C[0].intersectionRatio;if(T!==u){if(!N)return c();T?c(!1,T):n=setTimeout(()=>{c(!1,1e-7)},1e3)}T===1&&!Ra(d,e.getBoundingClientRect())&&c(),N=!1}try{r=new IntersectionObserver(E,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return c(!0),s}function Nf(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=bn(e),f=a||s?[...d?Pt(d):[],...Pt(t)]:[];f.forEach(v=>{a&&v.addEventListener("scroll",r,{passive:!0}),s&&v.addEventListener("resize",r)});const p=d&&l?xf(d,r):null;let h=-1,m=null;c&&(m=new ResizeObserver(v=>{let[y]=v;y&&y.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let b,g=u?Ze(e):null;u&&w();function w(){const v=Ze(e);g&&!Ra(g,v)&&r(),g=v,b=requestAnimationFrame(w)}return r(),()=>{var v;f.forEach(y=>{a&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),p==null||p(),(v=m)==null||v.disconnect(),m=null,u&&cancelAnimationFrame(b)}}const Cf=ef,Sf=tf,Ef=Zu,Tf=nf,Mf=Ju,es=Qu,Pf=rf,Af=(e,t,r)=>{const n=new Map,a={platform:yf,...r},s={...a.platform,_c:n};return Xu(e,t,{...a,platform:s})};var ur=typeof document<"u"?H.useLayoutEffect:H.useEffect;function fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!fr(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&e.$$typeof)&&!fr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ts(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rs(e,t){const r=ts(e);return Math.round(t*r)/r}function xn(e){const t=i.useRef(e);return ur(()=>{t.current=e}),t}function _f(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(n);fr(h,n)||m(n);const[b,g]=i.useState(null),[w,v]=i.useState(null),y=i.useCallback(D=>{D!==C.current&&(C.current=D,g(D))},[]),x=i.useCallback(D=>{D!==T.current&&(T.current=D,v(D))},[]),N=s||b,E=c||w,C=i.useRef(null),T=i.useRef(null),$=i.useRef(f),O=u!=null,B=xn(u),K=xn(a),F=xn(d),L=i.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:h};K.current&&(D.platform=K.current),Af(C.current,T.current,D).then(M=>{const Y={...M,isPositioned:F.current!==!1};P.current&&!fr($.current,Y)&&($.current=Y,_r.flushSync(()=>{p(Y)}))})},[h,t,r,K,F]);ur(()=>{d===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[d]);const P=i.useRef(!1);ur(()=>(P.current=!0,()=>{P.current=!1}),[]),ur(()=>{if(N&&(C.current=N),E&&(T.current=E),N&&E){if(B.current)return B.current(N,E,L);L()}},[N,E,L,B,O]);const V=i.useMemo(()=>({reference:C,floating:T,setReference:y,setFloating:x}),[y,x]),A=i.useMemo(()=>({reference:N,floating:E}),[N,E]),X=i.useMemo(()=>{const D={position:r,left:0,top:0};if(!A.floating)return D;const M=rs(A.floating,f.x),Y=rs(A.floating,f.y);return l?{...D,transform:"translate("+M+"px, "+Y+"px)",...ts(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:Y}},[r,l,A.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:L,refs:V,elements:A,floatingStyles:X}),[f,L,V,A,X])}const Df=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?es({element:n.current,padding:a}).fn(r):{}:n?es({element:n,padding:a}).fn(r):{}}}},If=(e,t)=>({...Cf(e),options:[e,t]}),kf=(e,t)=>({...Sf(e),options:[e,t]}),Of=(e,t)=>({...Pf(e),options:[e,t]}),Lf=(e,t)=>({...Ef(e),options:[e,t]}),Ff=(e,t)=>({...Tf(e),options:[e,t]}),$f=(e,t)=>({...Mf(e),options:[e,t]}),zf=(e,t)=>({...Df(e),options:[e,t]});var Bf="Arrow",ns=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...s}=e;return o.jsx(Z.svg,{...s,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});ns.displayName=Bf;var Wf=ns;function Vf(e){const[t,r]=i.useState(void 0);return We(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let c,l;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;c=d.inlineSize,l=d.blockSize}else c=e.offsetWidth,l=e.offsetHeight;r({width:c,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Nn="Popper",[os,pr]=Be(Nn),[Gf,as]=os(Nn),ss=e=>{const{__scopePopper:t,children:r}=e,[n,a]=i.useState(null);return o.jsx(Gf,{scope:t,anchor:n,onAnchorChange:a,children:r})};ss.displayName=Nn;var is="PopperAnchor",cs=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,s=as(is,r),c=i.useRef(null),l=oe(t,c);return i.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||c.current)}),n?null:o.jsx(Z.div,{...a,ref:l})});cs.displayName=is;var Cn="PopperContent",[Uf,jf]=os(Cn),ls=i.forwardRef((e,t)=>{var ae,Me,de,Pe,G,J;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,w=as(Cn,r),[v,y]=i.useState(null),x=oe(t,he=>y(he)),[N,E]=i.useState(null),C=Vf(N),T=(C==null?void 0:C.width)??0,$=(C==null?void 0:C.height)??0,O=n+(s!=="center"?"-"+s:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(d)?d:[d],F=K.length>0,L={padding:B,boundary:K.filter(Kf),altBoundary:F},{refs:P,floatingStyles:V,placement:A,isPositioned:X,middlewareData:D}=_f({strategy:"fixed",placement:O,whileElementsMounted:(...he)=>Nf(...he,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[If({mainAxis:a+$,alignmentAxis:c}),u&&kf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Of():void 0,...L}),u&&Lf({...L}),Ff({...L,apply:({elements:he,rects:W,availableWidth:j,availableHeight:ue})=>{const{width:ge,height:ve}=W.reference,R=he.floating.style;R.setProperty("--radix-popper-available-width",`${j}px`),R.setProperty("--radix-popper-available-height",`${ue}px`),R.setProperty("--radix-popper-anchor-width",`${ge}px`),R.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),N&&zf({element:N,padding:l}),Yf({arrowWidth:T,arrowHeight:$}),h&&$f({strategy:"referenceHidden",...L})]}),[M,Y]=fs(A),Q=fe(b);We(()=>{X&&(Q==null||Q())},[X,Q]);const ee=(ae=D.arrow)==null?void 0:ae.x,te=(Me=D.arrow)==null?void 0:Me.y,ne=((de=D.arrow)==null?void 0:de.centerOffset)!==0,[se,le]=i.useState();return We(()=>{v&&le(window.getComputedStyle(v).zIndex)},[v]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:X?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Pe=D.transformOrigin)==null?void 0:Pe.x,(G=D.transformOrigin)==null?void 0:G.y].join(" "),...((J=D.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Uf,{scope:r,placedSide:M,onArrowChange:E,arrowX:ee,arrowY:te,shouldHideArrow:ne,children:o.jsx(Z.div,{"data-side":M,"data-align":Y,...g,ref:x,style:{...g.style,animation:X?void 0:"none"}})})})});ls.displayName=Cn;var ds="PopperArrow",Hf={top:"bottom",right:"left",bottom:"top",left:"right"},us=i.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,s=jf(ds,n),c=Hf[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Wf,{...a,ref:r,style:{...a.style,display:"block"}})})});us.displayName=ds;function Kf(e){return e!==null}var Yf=e=>({name:"transformOrigin",options:e,fn(t){var w,v,y;const{placement:r,rects:n,middlewareData:a}=t,c=((w=a.arrow)==null?void 0:w.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,f]=fs(r),p={start:"0%",center:"50%",end:"100%"}[f],h=(((v=a.arrow)==null?void 0:v.x)??0)+l/2,m=(((y=a.arrow)==null?void 0:y.y)??0)+u/2;let b="",g="";return d==="bottom"?(b=c?p:`${h}px`,g=`${-u}px`):d==="top"?(b=c?p:`${h}px`,g=`${n.floating.height+u}px`):d==="right"?(b=`${-u}px`,g=c?p:`${m}px`):d==="left"&&(b=`${n.floating.width+u}px`,g=c?p:`${m}px`),{data:{x:b,y:g}}}});function fs(e){const[t,r="center"]=e.split("-");return[t,r]}var Sn=ss,ps=cs,hs=ls,gs=us,En="rovingFocusGroup.onEntryFocus",qf={bubbles:!1,cancelable:!0},hr="RovingFocusGroup",[Tn,vs,Xf]=ln(hr),[Qf,ms]=Be(hr,[Xf]),[Zf,Jf]=Qf(hr),bs=i.forwardRef((e,t)=>o.jsx(Tn.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(Tn.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(Rf,{...e,ref:t})})}));bs.displayName=hr;var Rf=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=i.useRef(null),m=oe(t,h),b=za(s),[g=null,w]=st({prop:c,defaultProp:l,onChange:u}),[v,y]=i.useState(!1),x=fe(d),N=vs(r),E=i.useRef(!1),[C,T]=i.useState(0);return i.useEffect(()=>{const $=h.current;if($)return $.addEventListener(En,x),()=>$.removeEventListener(En,x)},[x]),o.jsx(Zf,{scope:r,orientation:n,dir:b,loop:a,currentTabStopId:g,onItemFocus:i.useCallback($=>w($),[w]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>T($=>$+1),[]),onFocusableItemRemove:i.useCallback(()=>T($=>$-1),[]),children:o.jsx(Z.div,{tabIndex:v||C===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{E.current=!0}),onFocus:z(e.onFocus,$=>{const O=!E.current;if($.target===$.currentTarget&&O&&!v){const B=new CustomEvent(En,qf);if($.currentTarget.dispatchEvent(B),!B.defaultPrevented){const K=N().filter(A=>A.focusable),F=K.find(A=>A.active),L=K.find(A=>A.id===g),V=[F,L,...K].filter(Boolean).map(A=>A.ref.current);xs(V,f)}}E.current=!1}),onBlur:z(e.onBlur,()=>y(!1))})})}),ws="RovingFocusGroupItem",ys=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:s,...c}=e,l=Oe(),u=s||l,d=Jf(ws,r),f=d.currentTabStopId===u,p=vs(r),{onFocusableItemAdd:h,onFocusableItemRemove:m}=d;return i.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),o.jsx(Tn.ItemSlot,{scope:r,id:u,focusable:n,active:a,children:o.jsx(Z.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:z(e.onMouseDown,b=>{n?d.onItemFocus(u):b.preventDefault()}),onFocus:z(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:z(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=rp(b,d.orientation,d.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let v=p().filter(y=>y.focusable).map(y=>y.ref.current);if(g==="last")v.reverse();else if(g==="prev"||g==="next"){g==="prev"&&v.reverse();const y=v.indexOf(b.currentTarget);v=d.loop?np(v,y+1):v.slice(y+1)}setTimeout(()=>xs(v))}})})})});ys.displayName=ws;var ep={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rp(e,t,r){const n=tp(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ep[n]}function xs(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function np(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var op=bs,ap=ys,Mn=["Enter"," "],sp=["ArrowDown","PageUp","Home"],Ns=["ArrowUp","PageDown","End"],ip=[...sp,...Ns],cp={ltr:[...Mn,"ArrowRight"],rtl:[...Mn,"ArrowLeft"]},lp={ltr:["ArrowLeft"],rtl:["ArrowRight"]},At="Menu",[_t,dp,up]=ln(At),[Je,Cs]=Be(At,[up,pr,ms]),Dt=pr(),Ss=ms(),[Es,He]=Je(At),[fp,It]=Je(At),Ts=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:s,modal:c=!0}=e,l=Dt(t),[u,d]=i.useState(null),f=i.useRef(!1),p=fe(s),h=za(a);return i.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),o.jsx(Sn,{...l,children:o.jsx(Es,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:o.jsx(fp,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:c,children:n})})})};Ts.displayName=At;var pp="MenuAnchor",Pn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Dt(r);return o.jsx(ps,{...a,...n,ref:t})});Pn.displayName=pp;var An="MenuPortal",[hp,Ms]=Je(An,{forceMount:void 0}),Ps=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,s=He(An,t);return o.jsx(hp,{scope:t,forceMount:r,children:o.jsx(Ne,{present:r||s.open,children:o.jsx(Ct,{asChild:!0,container:a,children:n})})})};Ps.displayName=An;var xe="MenuContent",[gp,_n]=Je(xe),As=i.forwardRef((e,t)=>{const r=Ms(xe,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=He(xe,e.__scopeMenu),c=It(xe,e.__scopeMenu);return o.jsx(_t.Provider,{scope:e.__scopeMenu,children:o.jsx(Ne,{present:n||s.open,children:o.jsx(_t.Slot,{scope:e.__scopeMenu,children:c.modal?o.jsx(vp,{...a,ref:t}):o.jsx(mp,{...a,ref:t})})})})}),vp=i.forwardRef((e,t)=>{const r=He(xe,e.__scopeMenu),n=i.useRef(null),a=oe(t,n);return i.useEffect(()=>{const s=n.current;if(s)return ba(s)},[]),o.jsx(Dn,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),mp=i.forwardRef((e,t)=>{const r=He(xe,e.__scopeMenu);return o.jsx(Dn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Dn=i.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:m,disableOutsideScroll:b,...g}=e,w=He(xe,r),v=It(xe,r),y=Dt(r),x=Ss(r),N=dp(r),[E,C]=i.useState(null),T=i.useRef(null),$=oe(t,T,w.onContentChange),O=i.useRef(0),B=i.useRef(""),K=i.useRef(0),F=i.useRef(null),L=i.useRef("right"),P=i.useRef(0),V=b?Qr:i.Fragment,A=b?{as:ye,allowPinchZoom:!0}:void 0,X=M=>{var ae,Me;const Y=B.current+M,Q=N().filter(de=>!de.disabled),ee=document.activeElement,te=(ae=Q.find(de=>de.ref.current===ee))==null?void 0:ae.textValue,ne=Q.map(de=>de.textValue),se=Ap(ne,Y,te),le=(Me=Q.find(de=>de.textValue===se))==null?void 0:Me.ref.current;(function de(Pe){B.current=Pe,window.clearTimeout(O.current),Pe!==""&&(O.current=window.setTimeout(()=>de(""),1e3))})(Y),le&&setTimeout(()=>le.focus())};i.useEffect(()=>()=>window.clearTimeout(O.current),[]),na();const D=i.useCallback(M=>{var Q,ee;return L.current===((Q=F.current)==null?void 0:Q.side)&&Dp(M,(ee=F.current)==null?void 0:ee.area)},[]);return o.jsx(gp,{scope:r,searchRef:B,onItemEnter:i.useCallback(M=>{D(M)&&M.preventDefault()},[D]),onItemLeave:i.useCallback(M=>{var Y;D(M)||((Y=T.current)==null||Y.focus(),C(null))},[D]),onTriggerLeave:i.useCallback(M=>{D(M)&&M.preventDefault()},[D]),pointerGraceTimerRef:K,onPointerGraceIntentChange:i.useCallback(M=>{F.current=M},[]),children:o.jsx(V,{...A,children:o.jsx(jr,{asChild:!0,trapped:a,onMountAutoFocus:z(s,M=>{var Y;M.preventDefault(),(Y=T.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:o.jsx(Nt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:m,children:o.jsx(op,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:z(u,M=>{v.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(hs,{role:"menu","aria-orientation":"vertical","data-state":Ys(w.open),"data-radix-menu-content":"",dir:v.dir,...y,...g,ref:$,style:{outline:"none",...g.style},onKeyDown:z(g.onKeyDown,M=>{const Q=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ee=M.ctrlKey||M.altKey||M.metaKey,te=M.key.length===1;Q&&(M.key==="Tab"&&M.preventDefault(),!ee&&te&&X(M.key));const ne=T.current;if(M.target!==ne||!ip.includes(M.key))return;M.preventDefault();const le=N().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Ns.includes(M.key)&&le.reverse(),Mp(le)}),onBlur:z(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(O.current),B.current="")}),onPointerMove:z(e.onPointerMove,Ot(M=>{const Y=M.target,Q=P.current!==M.clientX;if(M.currentTarget.contains(Y)&&Q){const ee=M.clientX>P.current?"right":"left";L.current=ee,P.current=M.clientX}}))})})})})})})});As.displayName=xe;var bp="MenuGroup",In=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(Z.div,{role:"group",...n,ref:t})});In.displayName=bp;var wp="MenuLabel",_s=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(Z.div,{...n,ref:t})});_s.displayName=wp;var gr="MenuItem",Ds="menu.itemSelect",vr=i.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,s=i.useRef(null),c=It(gr,e.__scopeMenu),l=_n(gr,e.__scopeMenu),u=oe(t,s),d=i.useRef(!1),f=()=>{const p=s.current;if(!r&&p){const h=new CustomEvent(Ds,{bubbles:!0,cancelable:!0});p.addEventListener(Ds,m=>n==null?void 0:n(m),{once:!0}),Wr(p,h),h.defaultPrevented?d.current=!1:c.onClose()}};return o.jsx(Is,{...a,ref:u,disabled:r,onClick:z(e.onClick,f),onPointerDown:p=>{var h;(h=e.onPointerDown)==null||h.call(e,p),d.current=!0},onPointerUp:z(e.onPointerUp,p=>{var h;d.current||(h=p.currentTarget)==null||h.click()}),onKeyDown:z(e.onKeyDown,p=>{const h=l.searchRef.current!=="";r||h&&p.key===" "||Mn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});vr.displayName=gr;var Is=i.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...s}=e,c=_n(gr,r),l=Ss(r),u=i.useRef(null),d=oe(t,u),[f,p]=i.useState(!1),[h,m]=i.useState("");return i.useEffect(()=>{const b=u.current;b&&m((b.textContent??"").trim())},[s.children]),o.jsx(_t.ItemSlot,{scope:r,disabled:n,textValue:a??h,children:o.jsx(ap,{asChild:!0,...l,focusable:!n,children:o.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:d,onPointerMove:z(e.onPointerMove,Ot(b=>{n?c.onItemLeave(b):(c.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Ot(b=>c.onItemLeave(b))),onFocus:z(e.onFocus,()=>p(!0)),onBlur:z(e.onBlur,()=>p(!1))})})})}),yp="MenuCheckboxItem",ks=i.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return o.jsx(zs,{scope:e.__scopeMenu,checked:r,children:o.jsx(vr,{role:"menuitemcheckbox","aria-checked":mr(r)?"mixed":r,...a,ref:t,"data-state":Ln(r),onSelect:z(a.onSelect,()=>n==null?void 0:n(mr(r)?!0:!r),{checkForDefaultPrevented:!1})})})});ks.displayName=yp;var Os="MenuRadioGroup",[xp,Np]=Je(Os,{value:void 0,onValueChange:()=>{}}),Ls=i.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,s=fe(n);return o.jsx(xp,{scope:e.__scopeMenu,value:r,onValueChange:s,children:o.jsx(In,{...a,ref:t})})});Ls.displayName=Os;var Fs="MenuRadioItem",$s=i.forwardRef((e,t)=>{const{value:r,...n}=e,a=Np(Fs,e.__scopeMenu),s=r===a.value;return o.jsx(zs,{scope:e.__scopeMenu,checked:s,children:o.jsx(vr,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":Ln(s),onSelect:z(n.onSelect,()=>{var c;return(c=a.onValueChange)==null?void 0:c.call(a,r)},{checkForDefaultPrevented:!1})})})});$s.displayName=Fs;var kn="MenuItemIndicator",[zs,Cp]=Je(kn,{checked:!1}),Bs=i.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,s=Cp(kn,r);return o.jsx(Ne,{present:n||mr(s.checked)||s.checked===!0,children:o.jsx(Z.span,{...a,ref:t,"data-state":Ln(s.checked)})})});Bs.displayName=kn;var Sp="MenuSeparator",Ws=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ws.displayName=Sp;var Ep="MenuArrow",Vs=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Dt(r);return o.jsx(gs,{...a,...n,ref:t})});Vs.displayName=Ep;var On="MenuSub",[Tp,Gs]=Je(On),Us=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,s=He(On,t),c=Dt(t),[l,u]=i.useState(null),[d,f]=i.useState(null),p=fe(a);return i.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),o.jsx(Sn,{...c,children:o.jsx(Es,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:o.jsx(Tp,{scope:t,contentId:Oe(),triggerId:Oe(),trigger:l,onTriggerChange:u,children:r})})})};Us.displayName=On;var kt="MenuSubTrigger",js=i.forwardRef((e,t)=>{const r=He(kt,e.__scopeMenu),n=It(kt,e.__scopeMenu),a=Gs(kt,e.__scopeMenu),s=_n(kt,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>f,[f]),i.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),o.jsx(Pn,{asChild:!0,...d,children:o.jsx(Is,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Ys(r.open),...e,ref:Vt(t,a.onTriggerChange),onClick:p=>{var h;(h=e.onClick)==null||h.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,Ot(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:z(e.onPointerLeave,Ot(p=>{var m,b;f();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(b=r.content)==null?void 0:b.dataset.side,w=g==="right",v=w?-5:5,y=h[w?"left":"right"],x=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+v,y:p.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,p=>{var m;const h=s.searchRef.current!=="";e.disabled||h&&p.key===" "||cp[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});js.displayName=kt;var Hs="MenuSubContent",Ks=i.forwardRef((e,t)=>{const r=Ms(xe,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=He(xe,e.__scopeMenu),c=It(xe,e.__scopeMenu),l=Gs(Hs,e.__scopeMenu),u=i.useRef(null),d=oe(t,u);return o.jsx(_t.Provider,{scope:e.__scopeMenu,children:o.jsx(Ne,{present:n||s.open,children:o.jsx(_t.Slot,{scope:e.__scopeMenu,children:o.jsx(Dn,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;c.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:z(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,f=>{c.onClose(),f.preventDefault()}),onKeyDown:z(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),h=lp[c.dir].includes(f.key);p&&h&&(s.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Ks.displayName=Hs;function Ys(e){return e?"open":"closed"}function mr(e){return e==="indeterminate"}function Ln(e){return mr(e)?"indeterminate":e?"checked":"unchecked"}function Mp(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Pp(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Ap(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let c=Pp(e,Math.max(s,0));a.length===1&&(c=c.filter(d=>d!==r));const u=c.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return u!==r?u:void 0}function _p(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s].x,u=t[s].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(a=!a)}return a}function Dp(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return _p(r,t)}function Ot(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ip=Ts,kp=Pn,Op=Ps,Lp=As,Fp=In,$p=_s,zp=vr,Bp=ks,Wp=Ls,Vp=$s,Gp=Bs,Up=Ws,jp=Vs,Hp=Us,Kp=js,Yp=Ks,Fn="DropdownMenu",[qp,sv]=Be(Fn,[Cs]),pe=Cs(),[Xp,qs]=qp(Fn),Xs=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=pe(t),d=i.useRef(null),[f=!1,p]=st({prop:a,defaultProp:s,onChange:c});return o.jsx(Xp,{scope:t,triggerId:Oe(),triggerRef:d,contentId:Oe(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(h=>!h),[p]),modal:l,children:o.jsx(Ip,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};Xs.displayName=Fn;var Qs="DropdownMenuTrigger",Zs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,s=qs(Qs,r),c=pe(r);return o.jsx(kp,{asChild:!0,...c,children:o.jsx(Z.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:Vt(t,s.triggerRef),onPointerDown:z(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:z(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Zs.displayName=Qs;var Qp="DropdownMenuPortal",Js=e=>{const{__scopeDropdownMenu:t,...r}=e,n=pe(t);return o.jsx(Op,{...n,...r})};Js.displayName=Qp;var Rs="DropdownMenuContent",ei=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=qs(Rs,r),s=pe(r),c=i.useRef(!1);return o.jsx(Lp,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...n,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,l=>{var u;c.current||(u=a.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:z(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!a.modal||f)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ei.displayName=Rs;var Zp="DropdownMenuGroup",ti=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Fp,{...a,...n,ref:t})});ti.displayName=Zp;var Jp="DropdownMenuLabel",ri=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx($p,{...a,...n,ref:t})});ri.displayName=Jp;var Rp="DropdownMenuItem",ni=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(zp,{...a,...n,ref:t})});ni.displayName=Rp;var eh="DropdownMenuCheckboxItem",oi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Bp,{...a,...n,ref:t})});oi.displayName=eh;var th="DropdownMenuRadioGroup",ai=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Wp,{...a,...n,ref:t})});ai.displayName=th;var rh="DropdownMenuRadioItem",si=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Vp,{...a,...n,ref:t})});si.displayName=rh;var nh="DropdownMenuItemIndicator",ii=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Gp,{...a,...n,ref:t})});ii.displayName=nh;var oh="DropdownMenuSeparator",ci=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Up,{...a,...n,ref:t})});ci.displayName=oh;var ah="DropdownMenuArrow",sh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(jp,{...a,...n,ref:t})});sh.displayName=ah;var ih=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,c=pe(t),[l=!1,u]=st({prop:n,defaultProp:s,onChange:a});return o.jsx(Hp,{...c,open:l,onOpenChange:u,children:r})},ch="DropdownMenuSubTrigger",li=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Kp,{...a,...n,ref:t})});li.displayName=ch;var lh="DropdownMenuSubContent",di=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Yp,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});di.displayName=lh;var dh=Xs,uh=Zs,ui=Js,fi=ei,fh=ti,pi=ri,hi=ni,gi=oi,ph=ai,vi=si,mi=ii,bi=ci,hh=ih,wi=li,yi=di;const gh=dh,vh=uh,mh=fh,bh=ui,wh=hh,yh=ph,xi=i.forwardRef(({className:e,inset:t,children:r,...n},a)=>o.jsxs(wi,{ref:a,className:_("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,o.jsx(fl,{className:"ml-auto"})]}));xi.displayName=wi.displayName;const Ni=i.forwardRef(({className:e,...t},r)=>o.jsx(yi,{ref:r,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Ni.displayName=yi.displayName;const Ci=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(ui,{children:o.jsx(fi,{ref:n,sideOffset:t,className:_("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Ci.displayName=fi.displayName;const Si=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(hi,{ref:n,className:_("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Si.displayName=hi.displayName;const Ei=i.forwardRef(({className:e,children:t,checked:r,...n},a)=>o.jsxs(gi,{ref:a,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(mi,{children:o.jsx(Dr,{className:"h-4 w-4"})})}),t]}));Ei.displayName=gi.displayName;const Ti=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(vi,{ref:n,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(mi,{children:o.jsx(hl,{className:"h-2 w-2 fill-current"})})}),t]}));Ti.displayName=vi.displayName;const Mi=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(pi,{ref:n,className:_("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Mi.displayName=pi.displayName;const Pi=i.forwardRef(({className:e,...t},r)=>o.jsx(bi,{ref:r,className:_("-mx-1 my-1 h-px bg-muted",e),...t}));Pi.displayName=bi.displayName;const Ai=({className:e,...t})=>o.jsx("span",{className:_("ml-auto text-xs tracking-widest opacity-60",e),...t});Ai.displayName="DropdownMenuShortcut";function _i({inventory:e,showBinLocation:t}){const r=(v,y,x=!1,N=!0)=>o.jsxs("div",{className:`p-3 text-sm ${N&&y>0?"border-t":""} ${x?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:v.Name}),o.jsx("span",{children:v.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:v.PurchaseOrderQuantity||"-"})]}),t&&o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Bin Location"}),o.jsx("span",{children:v.BinLocation||"-"})]})]},`warehouse-${v.WarehouseId}`),n=["MTL","TOR"],a=["VAN","EDM"],s=[...e].sort((v,y)=>(v.Name||"").localeCompare(y.Name||"")),c=s.filter(v=>v.Country==="US"),l=s.filter(v=>v.Country==="CA"),u=s.filter(v=>a.includes(v.WarehouseId||"")),d=s.filter(v=>n.includes(v.WarehouseId||"")),f=l.filter(v=>!n.includes(v.WarehouseId||"")&&!a.includes(v.WarehouseId||"")),p=v=>v.reduce((y,x)=>y+(x.AvailableQuantity||0),0),h=p(l),m=p(d),b=p(u),g=p(c),w=h+g;return o.jsxs("div",{className:"border rounded-md overflow-hidden",children:[l.length>0&&c.length>0&&o.jsxs("div",{className:"grid grid-cols-2 border-b",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Total"}),o.jsx("span",{children:w})]}),o.jsx("div",{className:"p-3"})]}),l.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Canada"}),o.jsx("span",{children:h})]}),o.jsx("div",{className:"p-3"})]}),o.jsxs("div",{className:"grid grid-cols-2",children:[o.jsxs("div",{className:"border-r",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"West"}),o.jsx("span",{children:b})]}),u.map((v,y)=>r(v,y))]}),o.jsxs("div",{children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"East"}),o.jsx("span",{children:m})]}),d.map((v,y)=>r(v,y))]})]}),f.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:o.jsx("span",{children:"Other"})}),o.jsx("div",{className:"grid grid-cols-2",children:f.map((v,y)=>r(v,y,y%2===0,!0))})]})]}),c.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"United States"}),o.jsx("span",{children:g})]}),o.jsx("div",{className:"p-3"})]}),o.jsx("div",{className:"grid grid-cols-2",children:c.map((v,y)=>r(v,y,y%2===0,!0))})]}),e.length===0&&o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const Di=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ii=ko,Lt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ii(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:s}=t,c=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=s==null?void 0:s[d];if(f===null)return null;const h=Di(f)||Di(p);return a[d][h]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,h]=f;return h===void 0||(d[p]=h),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:h,...m}=f;return Object.entries(m).every(b=>{let[g,w]=b;return Array.isArray(w)?w.includes({...s,...l}[g]):{...s,...l}[g]===w})?[...d,p,h]:d},[]);return Ii(e,c,u,r==null?void 0:r.class,r==null?void 0:r.className)},$n=Lt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ce=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:s,...c},l)=>{const u=n?ye:"button";if(!a)return o.jsx(u,{className:_($n({variant:t,size:r,className:e})),ref:l,onClick:s,...c});s&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:d,content:f,onConfirm:p,confirmText:h="Confirm",cancelText:m="Cancel"}=a,b=()=>{p()};return o.jsxs(St,{children:[o.jsx(nn,{asChild:!0,children:o.jsx(u,{className:_($n({variant:t,size:r,className:e})),ref:l,...c})}),o.jsxs(Et,{children:[o.jsxs(rr,{children:[o.jsx(nr,{children:d}),o.jsx(cn,{children:f})]}),o.jsxs(sn,{className:"flex justify-end gap-2 pt-4",children:[o.jsx(on,{asChild:!0,children:o.jsx(ce,{variant:"outline",children:m})}),o.jsx(on,{asChild:!0,children:o.jsx(ce,{onClick:b,children:h})})]})]})]})});ce.displayName="Button";var xh="VisuallyHidden",br=i.forwardRef((e,t)=>o.jsx(Z.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));br.displayName=xh;var Nh=br,[wr,iv]=Be("Tooltip",[pr]),yr=pr(),ki="TooltipProvider",Ch=700,zn="tooltip.open",[Sh,Bn]=wr(ki),Oi=e=>{const{__scopeTooltip:t,delayDuration:r=Ch,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=e,[c,l]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),o.jsx(Sh,{scope:t,isOpenDelayed:c,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback(f=>{u.current=f},[]),disableHoverableContent:a,children:s})};Oi.displayName=ki;var xr="Tooltip",[Eh,Ft]=wr(xr),Li=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=Bn(xr,e.__scopeTooltip),d=yr(t),[f,p]=i.useState(null),h=Oe(),m=i.useRef(0),b=c??u.disableHoverableContent,g=l??u.delayDuration,w=i.useRef(!1),[v=!1,y]=st({prop:n,defaultProp:a,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),s==null||s(T)}}),x=i.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),N=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,y(!0),m.current=0},g)},[g,y]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),o.jsx(Sn,{...d,children:o.jsx(Eh,{scope:t,contentId:h,open:v,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?C():N()},[u.isOpenDelayed,C,N]),onTriggerLeave:i.useCallback(()=>{b?E():(window.clearTimeout(m.current),m.current=0)},[E,b]),onOpen:N,onClose:E,disableHoverableContent:b,children:r})})};Li.displayName=xr;var Wn="TooltipTrigger",Fi=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Ft(Wn,r),s=Bn(Wn,r),c=yr(r),l=i.useRef(null),u=oe(t,l,a.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),p=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),o.jsx(ps,{asChild:!0,...c,children:o.jsx(Z.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:z(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:z(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:z(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:z(e.onBlur,a.onClose),onClick:z(e.onClick,a.onClose)})})});Fi.displayName=Wn;var Vn="TooltipPortal",[Th,Mh]=wr(Vn,{forceMount:void 0}),$i=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,s=Ft(Vn,t);return o.jsx(Th,{scope:t,forceMount:r,children:o.jsx(Ne,{present:r||s.open,children:o.jsx(Ct,{asChild:!0,container:a,children:n})})})};$i.displayName=Vn;var gt="TooltipContent",zi=i.forwardRef((e,t)=>{const r=Mh(gt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=e,c=Ft(gt,e.__scopeTooltip);return o.jsx(Ne,{present:n||c.open,children:c.disableHoverableContent?o.jsx(Bi,{side:a,...s,ref:t}):o.jsx(Ph,{side:a,...s,ref:t})})}),Ph=i.forwardRef((e,t)=>{const r=Ft(gt,e.__scopeTooltip),n=Bn(gt,e.__scopeTooltip),a=i.useRef(null),s=oe(t,a),[c,l]=i.useState(null),{trigger:u,onClose:d}=r,f=a.current,{onPointerInTransitChange:p}=n,h=i.useCallback(()=>{l(null),p(!1)},[p]),m=i.useCallback((b,g)=>{const w=b.currentTarget,v={x:b.clientX,y:b.clientY},y=Ih(v,w.getBoundingClientRect()),x=kh(v,y),N=Oh(g.getBoundingClientRect()),E=Fh([...x,...N]);l(E),p(!0)},[p]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(u&&f){const b=w=>m(w,f),g=w=>m(w,u);return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[u,f,m,h]),i.useEffect(()=>{if(c){const b=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},y=(u==null?void 0:u.contains(w))||(f==null?void 0:f.contains(w)),x=!Lh(v,c);y?h():x&&(h(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,c,d,h]),o.jsx(Bi,{...e,ref:s})}),[Ah,_h]=wr(xr,{isInside:!1}),Bi=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=Ft(gt,r),d=yr(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),i.useEffect(()=>{if(u.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),o.jsx(Nt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:o.jsxs(hs,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(Ko,{children:n}),o.jsx(Ah,{scope:r,isInside:!0,children:o.jsx(Nh,{id:u.contentId,role:"tooltip",children:a||n})})]})})});zi.displayName=gt;var Wi="TooltipArrow",Dh=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=yr(r);return _h(Wi,r).isInside?null:o.jsx(gs,{...a,...n,ref:t})});Dh.displayName=Wi;function Ih(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function kh(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Oh(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function Lh(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s].x,u=t[s].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(a=!a)}return a}function Fh(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),$h(t)}function $h(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(a.y-c.y)>=(s.y-c.y)*(a.x-c.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(a.y-c.y)>=(s.y-c.y)*(a.x-c.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var zh=Oi,Bh=Li,Wh=Fi,Vh=$i,Vi=zi;const vt=zh,mt=Bh,bt=Wh,Re=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(Vh,{children:o.jsx(Vi,{ref:n,sideOffset:t,className:_("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",e),...r})}));Re.displayName=Vi.displayName;const Nr=i.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...s},c)=>{const[l,u]=i.useState(!1),d=i.useRef(null),p=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),h=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",m=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};i.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const b=g=>{if(r){const w=g.target.value;let v=w;if(w.length>0){const y=w[w.length-1];/[^a-zA-Z0-9]/.test(y)&&(console.log("Non-alphanumeric detected:",y),m())}if(r==="phone"){const y=w.replace(/\D/g,"");y.length<=3?v=y:y.length<=6?v=`(${y.slice(0,3)}) ${y.slice(3)}`:v=`(${y.slice(0,3)}) ${y.slice(3,6)}-${y.slice(6,10)}`}else if(r==="postal-code-ca"){const y=w.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let N=0;N<Math.min(y.length,6);N++){const E=y[N];N===0||N===2||N===4?/[A-Z]/.test(E)&&(x+=E):(N===1||N===3||N===5)&&/[0-9]/.test(E)&&(x+=E)}x.length<=3?v=x:v=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const y=w.replace(/\D/g,"");y.length<=5?v=y:v=`${y.slice(0,5)}-${y.slice(5,9)}`}g.target.value=v}n==null||n(g)};return o.jsx(vt,{children:o.jsxs(mt,{open:l&&!!r,children:[o.jsx(bt,{asChild:!0,children:o.jsx("input",{type:t,className:_("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:b,placeholder:p,ref:c,...s})}),o.jsx(Re,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:h()})]})})});Nr.displayName="Input";var Gh="Separator",Gi="horizontal",Uh=["horizontal","vertical"],Ui=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=Gi,...a}=e,s=jh(n)?n:Gi,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(Z.div,{"data-orientation":s,...l,...a,ref:t})});Ui.displayName=Gh;function jh(e){return Uh.includes(e)}var ji=Ui;const Gn=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(ji,{ref:a,decorative:r,orientation:t,className:_("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Gn.displayName=ji.displayName;const Hi=rn,Hh=La,Kh=tr,Ki=Fa,Un=i.forwardRef(({className:e,...t},r)=>o.jsx(Zt,{className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Un.displayName=Zt.displayName;const Yh=Lt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),jn=i.forwardRef(({side:e="right",className:t,children:r,...n},a)=>o.jsxs(Ki,{children:[o.jsx(Un,{}),o.jsxs(Jt,{ref:a,className:_(Yh({side:e}),t),...n,children:[o.jsxs(tr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(Ir,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));jn.displayName=Jt.displayName;const Yi=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yi.displayName="SheetHeader";const qi=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qi.displayName="SheetFooter";const Xi=i.forwardRef(({className:e,...t},r)=>o.jsx(Rt,{ref:r,className:_("text-lg font-semibold text-foreground",e),...t}));Xi.displayName=Rt.displayName;const Qi=i.forwardRef(({className:e,...t},r)=>o.jsx(er,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Qi.displayName=er.displayName;function qh({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,c]=H.useState(!1),l=()=>{c(!0)};return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?o.jsx(ce,{asChild:!0,size:"icon",onClick:e,children:o.jsx(Ml,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):o.jsx(ce,{asChild:!0,size:"icon",onClick:e,children:o.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:l})})}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Xh="Label",Zi=i.forwardRef((e,t)=>o.jsx(Z.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Zi.displayName=Xh;var Qh=Zi;function Zh({className:e,...t}){return o.jsx(Qh,{"data-slot":"label",className:_("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Hn=1024;function Ji(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Hn-1}px)`),n=()=>{t(window.innerWidth<Hn)};return r.addEventListener("change",n),t(window.innerWidth<Hn),()=>r.removeEventListener("change",n)},[]),!!e}function U({className:e,...t}){return o.jsx("div",{className:_("animate-pulse rounded-md bg-primary/20",e),...t})}const Jh="sidebar:state",Rh=60*60*24*7,eg="16rem",tg="18rem",rg="3rem",ng="b",Ri=i.createContext(null);function $t(){const e=i.useContext(Ri);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Kn=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...c},l)=>{const u=Ji(),[d,f]=i.useState(!1),[p,h]=i.useState(e),m=t??p,b=i.useCallback(y=>{const x=typeof y=="function"?y(m):y;r?r(x):h(x),document.cookie=`${Jh}=${x}; path=/; max-age=${Rh}`},[r,m]),g=i.useCallback(()=>u?f(y=>!y):b(y=>!y),[u,b,f]);i.useEffect(()=>{const y=x=>{x.key===ng&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const w=m?"expanded":"collapsed",v=i.useMemo(()=>({state:w,open:m,setOpen:b,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:g}),[w,m,b,u,d,f,g]);return o.jsx(Ri.Provider,{value:v,children:o.jsx(vt,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":eg,"--sidebar-width-icon":rg,...a},className:_("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...c,children:s})})})});Kn.displayName="SidebarProvider";const Yn=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},c)=>{const{isMobile:l,state:u,openMobile:d,setOpenMobile:f}=$t();return r==="none"?o.jsx("div",{className:_("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:c,...s,children:a}):l?o.jsx(Hi,{open:d,onOpenChange:f,...s,children:o.jsx(jn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":tg},side:e,children:o.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):o.jsxs("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:_("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o.jsx("div",{className:_("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"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",n),...s,children:o.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:a})})]})});Yn.displayName="Sidebar";const qn=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=$t();return o.jsxs(ce,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_("h-7 w-7 text-sidebar-foreground",e),onClick:s=>{t==null||t(s),a()},...r,children:[o.jsx(xl,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});qn.displayName="SidebarTrigger";const ec=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=$t();return o.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:_("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});ec.displayName="SidebarRail";const tc=i.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:_("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));tc.displayName="SidebarInset";const rc=i.forwardRef(({className:e,...t},r)=>o.jsx(Nr,{ref:r,"data-sidebar":"input",className:_("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rc.displayName="SidebarInput";const Xn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:_("flex flex-col gap-2 p-2",e),...t}));Xn.displayName="SidebarHeader";const Qn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:_("flex flex-col gap-2 p-2",e),...t}));Qn.displayName="SidebarFooter";const nc=i.forwardRef(({className:e,...t},r)=>o.jsx(Gn,{ref:r,"data-sidebar":"separator",className:_("mx-2 w-auto bg-sidebar-border",e),...t}));nc.displayName="SidebarSeparator";const Zn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:_("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Zn.displayName="SidebarContent";const oc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:_("relative flex w-full min-w-0 flex-col p-2",e),...t}));oc.displayName="SidebarGroup";const ac=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?ye:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:_("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});ac.displayName="SidebarGroupLabel";const sc=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?ye:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:_("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});sc.displayName="SidebarGroupAction";const ic=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:_("w-full text-sm",e),...t}));ic.displayName="SidebarGroupContent";const Jn=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:_("flex w-full min-w-0 flex-col gap-1",e),...t}));Jn.displayName="SidebarMenu";const Rn=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:_("group/menu-item relative",e),...t}));Rn.displayName="SidebarMenuItem";const og=Lt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] 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 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{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"}}),eo=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...c},l)=>{const u=e?ye:"button",{isMobile:d,state:f}=$t(),p=o.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:_(og({variant:r,size:n}),s),...c});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:p}),o.jsx(Re,{side:"right",align:"center",hidden:f!=="collapsed"||d,...a})]})):p});eo.displayName="SidebarMenuButton";const cc=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?ye:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:_("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});cc.displayName="SidebarMenuAction";const lc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:_("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));lc.displayName="SidebarMenuBadge";const dc=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:_("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&o.jsx(U,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(U,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});dc.displayName="SidebarMenuSkeleton";const uc=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:_("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));uc.displayName="SidebarMenuSub";const fc=i.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));fc.displayName="SidebarMenuSubItem";const pc=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const c=e?ye:"a";return o.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:_("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})});pc.displayName="SidebarMenuSubButton";var to="ToastProvider",[ro,ag,sg]=ln("Toast"),[hc,cv]=Be("Toast",[sg]),[ig,Cr]=hc(to),gc=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:c}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),p=i.useRef(!1),h=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${to}\`. Expected non-empty \`string\`.`),o.jsx(ro.Provider,{scope:t,children:o.jsx(ig,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(m=>m+1),[]),onToastRemove:i.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:c})})};gc.displayName=to;var vc="ToastViewport",cg=["F8"],no="toast.viewportPause",oo="toast.viewportResume",mc=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=cg,label:a="Notifications ({hotkey})",...s}=e,c=Cr(vc,r),l=ag(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),p=i.useRef(null),h=oe(t,p,c.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=c.toastCount>0;i.useEffect(()=>{const w=v=>{var x;n.length!==0&&n.every(N=>v[N]||v.code===N)&&((x=p.current)==null||x.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),i.useEffect(()=>{const w=u.current,v=p.current;if(b&&w&&v){const y=()=>{if(!c.isClosePausedRef.current){const C=new CustomEvent(no);v.dispatchEvent(C),c.isClosePausedRef.current=!0}},x=()=>{if(c.isClosePausedRef.current){const C=new CustomEvent(oo);v.dispatchEvent(C),c.isClosePausedRef.current=!1}},N=C=>{!w.contains(C.relatedTarget)&&x()},E=()=>{w.contains(document.activeElement)||x()};return w.addEventListener("focusin",y),w.addEventListener("focusout",N),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",N),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,c.isClosePausedRef]);const g=i.useCallback(({tabbingDirection:w})=>{const y=l().map(x=>{const N=x.ref.current,E=[N,...xg(N)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?y.reverse():y).flat()},[l]);return i.useEffect(()=>{const w=p.current;if(w){const v=y=>{var E,C,T;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const $=document.activeElement,O=y.shiftKey;if(y.target===w&&O){(E=d.current)==null||E.focus();return}const F=g({tabbingDirection:O?"backwards":"forwards"}),L=F.findIndex(P=>P===$);io(F.slice(L+1))?y.preventDefault():O?(C=d.current)==null||C.focus():(T=f.current)==null||T.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[l,g]),o.jsxs(Ld,{ref:u,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&o.jsx(ao,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});io(w)}}),o.jsx(ro.Slot,{scope:r,children:o.jsx(Z.ol,{tabIndex:-1,...s,ref:h})}),b&&o.jsx(ao,{ref:f,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});io(w)}})]})});mc.displayName=vc;var bc="ToastFocusProxy",ao=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,s=Cr(bc,r);return o.jsx(br,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:c=>{var d;const l=c.relatedTarget;!((d=s.viewport)!=null&&d.contains(l))&&n()}})});ao.displayName=bc;var Sr="Toast",lg="toast.swipeStart",dg="toast.swipeMove",ug="toast.swipeCancel",fg="toast.swipeEnd",wc=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:s,...c}=e,[l=!0,u]=st({prop:n,defaultProp:a,onChange:s});return o.jsx(Ne,{present:r||l,children:o.jsx(gg,{open:l,...c,ref:t,onClose:()=>u(!1),onPause:fe(e.onPause),onResume:fe(e.onResume),onSwipeStart:z(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:z(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:z(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:z(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});wc.displayName=Sr;var[pg,hg]=hc(Sr,{onClose(){}}),gg=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:s,onClose:c,onEscapeKeyDown:l,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:m,...b}=e,g=Cr(Sr,r),[w,v]=i.useState(null),y=oe(t,P=>v(P)),x=i.useRef(null),N=i.useRef(null),E=a||g.duration,C=i.useRef(0),T=i.useRef(E),$=i.useRef(0),{onToastAdd:O,onToastRemove:B}=g,K=fe(()=>{var V;(w==null?void 0:w.contains(document.activeElement))&&((V=g.viewport)==null||V.focus()),c()}),F=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout($.current),C.current=new Date().getTime(),$.current=window.setTimeout(K,P))},[K]);i.useEffect(()=>{const P=g.viewport;if(P){const V=()=>{F(T.current),d==null||d()},A=()=>{const X=new Date().getTime()-C.current;T.current=T.current-X,window.clearTimeout($.current),u==null||u()};return P.addEventListener(no,A),P.addEventListener(oo,V),()=>{P.removeEventListener(no,A),P.removeEventListener(oo,V)}}},[g.viewport,E,u,d,F]),i.useEffect(()=>{s&&!g.isClosePausedRef.current&&F(E)},[s,E,g.isClosePausedRef,F]),i.useEffect(()=>(O(),()=>B()),[O,B]);const L=i.useMemo(()=>w?Tc(w):null,[w]);return g.viewport?o.jsxs(o.Fragment,{children:[L&&o.jsx(vg,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),o.jsx(pg,{scope:r,onClose:K,children:_r.createPortal(o.jsx(ro.ItemSlot,{scope:r,children:o.jsx(Od,{asChild:!0,onEscapeKeyDown:z(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||K(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(Z.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:z(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,K()))}),onPointerDown:z(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:z(e.onPointerMove,P=>{if(!x.current)return;const V=P.clientX-x.current.x,A=P.clientY-x.current.y,X=!!N.current,D=["left","right"].includes(g.swipeDirection),M=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Y=D?M(0,V):0,Q=D?0:M(0,A),ee=P.pointerType==="touch"?10:2,te={x:Y,y:Q},ne={originalEvent:P,delta:te};X?(N.current=te,Er(dg,p,ne,{discrete:!1})):Mc(te,g.swipeDirection,ee)?(N.current=te,Er(lg,f,ne,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(V)>ee||Math.abs(A)>ee)&&(x.current=null)}),onPointerUp:z(e.onPointerUp,P=>{const V=N.current,A=P.target;if(A.hasPointerCapture(P.pointerId)&&A.releasePointerCapture(P.pointerId),N.current=null,x.current=null,V){const X=P.currentTarget,D={originalEvent:P,delta:V};Mc(V,g.swipeDirection,g.swipeThreshold)?Er(fg,m,D,{discrete:!0}):Er(ug,h,D,{discrete:!0}),X.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),vg=e=>{const{__scopeToast:t,children:r,...n}=e,a=Cr(Sr,t),[s,c]=i.useState(!1),[l,u]=i.useState(!1);return wg(()=>c(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:o.jsx(Ct,{asChild:!0,children:o.jsx(br,{...n,children:s&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},mg="ToastTitle",yc=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(Z.div,{...n,ref:t})});yc.displayName=mg;var bg="ToastDescription",xc=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(Z.div,{...n,ref:t})});xc.displayName=bg;var Nc="ToastAction",Cc=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(Ec,{altText:r,asChild:!0,children:o.jsx(so,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Nc}\`. Expected non-empty \`string\`.`),null)});Cc.displayName=Nc;var Sc="ToastClose",so=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=hg(Sc,r);return o.jsx(Ec,{asChild:!0,children:o.jsx(Z.button,{type:"button",...n,ref:t,onClick:z(e.onClick,a.onClose)})})});so.displayName=Sc;var Ec=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx(Z.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function Tc(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),yg(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const c=n.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Tc(n))}}),t}function Er(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Wr(a,s):a.dispatchEvent(s)}var Mc=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),s=n>a;return t==="left"||t==="right"?s&&n>r:!s&&a>r};function wg(e=()=>{}){const t=fe(e);We(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function yg(e){return e.nodeType===e.ELEMENT_NODE}function xg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function io(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Ng=gc,Pc=mc,Ac=wc,_c=yc,Dc=xc,Ic=Cc,kc=so;const Oc=Ng,co=i.forwardRef(({className:e,...t},r)=>o.jsx(Pc,{ref:r,className:_("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));co.displayName=Pc.displayName;const Cg=Lt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),lo=i.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(Ac,{ref:n,className:_(Cg({variant:t}),e),...r}));lo.displayName=Ac.displayName;const Lc=i.forwardRef(({className:e,...t},r)=>o.jsx(Ic,{ref:r,className:_("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));Lc.displayName=Ic.displayName;const uo=i.forwardRef(({className:e,...t},r)=>o.jsx(kc,{ref:r,className:_("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:o.jsx(Ir,{className:"h-4 w-4"})}));uo.displayName=kc.displayName;const fo=i.forwardRef(({className:e,...t},r)=>o.jsx(_c,{ref:r,className:_("text-sm font-semibold [&+div]:text-xs",e),...t}));fo.displayName=_c.displayName;const po=i.forwardRef(({className:e,...t},r)=>o.jsx(Dc,{ref:r,className:_("text-sm opacity-90",e),...t}));po.displayName=Dc.displayName;const Sg=1,Eg=1e6;let ho=0;function Tg(){return ho=(ho+1)%Number.MAX_SAFE_INTEGER,ho.toString()}const go=new Map,Fc=e=>{if(go.has(e))return;const t=setTimeout(()=>{go.delete(e),zt({type:"REMOVE_TOAST",toastId:e})},Eg);go.set(e,t)},Mg=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Sg)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Fc(r):e.toasts.forEach(n=>Fc(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},Tr=[];let Mr={toasts:[]};function zt(e){Mr=Mg(Mr,e),Tr.forEach(t=>t(Mr))}function $c({...e}){const t=Tg(),r=a=>zt({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>zt({type:"DISMISS_TOAST",toastId:t});return zt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function vo(){const[e,t]=i.useState(Mr);return i.useEffect(()=>(Tr.push(t),()=>{const r=Tr.indexOf(t);r>-1&&Tr.splice(r,1)}),[]),{...e,toast:$c,dismiss:r=>zt({type:"DISMISS_TOAST",toastId:r})}}function zc(){const{toasts:e}=vo();return o.jsxs(Oc,{children:[e.map(function({id:t,title:r,description:n,action:a,...s}){return o.jsxs(lo,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(fo,{children:r}),n&&o.jsx(po,{children:n})]}),a,o.jsx(uo,{})]},t)}),o.jsx(co,{})]})}const mo=H.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[s,c]=H.useState(""),l=Ar.useLocation(),{toast:u}=vo();H.useEffect(()=>{const h=new URLSearchParams(l.search).get("q");h&&c(h)},[l.search]);const d=()=>{const p=s.trim();if(!p||p.length<2){u({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(p)},f=p=>{p.key==="Enter"&&d()};return o.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[o.jsx(qn,{className:"lg:hidden",children:o.jsx(wl,{className:"h-6 w-6"})}),o.jsx("div",{className:"flex flex-1 items-center gap-4",children:o.jsx("div",{className:"relative w-full max-w-sm",children:o.jsxs("div",{children:[o.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:d,"aria-label":"Search",children:o.jsx(El,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(Nr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:s,onChange:p=>c(p.target.value),onKeyDown:f,ref:a},"topbar-search")]})})}),r||o.jsx(o.Fragment,{}),e&&o.jsx("div",{className:"flex items-center gap-4",children:o.jsxs(ce,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[o.jsx(bl,{className:"h-4 w-4 text-sidebar-foreground"}),o.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});mo.displayName="Topbar";const Bc=Lt("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Te=i.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...s},c)=>o.jsxs("div",{ref:c,className:_(Bc({variant:t,size:r}),e),...s,children:[n&&o.jsx("span",{className:"mr-1",children:n}),a]}));Te.displayName="Badge";const wt=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));wt.displayName="Card";const Wc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("flex flex-col space-y-1.5 p-6",e),...t}));Wc.displayName="CardHeader";const Vc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("font-semibold leading-none tracking-tight",e),...t}));Vc.displayName="CardTitle";const Gc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Gc.displayName="CardDescription";const yt=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("p-6 pt-0",e),...t}));yt.displayName="CardContent";const Uc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("flex items-center p-6 pt-0",e),...t}));Uc.displayName="CardFooter";const jc=({countryCode:e,className:t=""})=>{const[r,n]=H.useState(null),[a,s]=H.useState(!1);return H.useEffect(()=>{if(!e)return;const l=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(l,{method:"HEAD"}).then(u=>{u.ok?(n(l),s(!1)):s(!0)}).catch(()=>{s(!0)})},[e]),a||!r?o.jsx("span",{className:t,children:e}):o.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function Hc({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=Ar.useParams(),a=e.filter(s=>s.showInNav);return o.jsxs(Yn,{className:"border-r border-sidebar-border",children:[o.jsx(Xn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),o.jsx("span",{className:"font-semibold text-lg",children:r})]})}),o.jsx(Zn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:o.jsx(Jn,{children:a.map(s=>{const c=s.icon,l=`/${s.path.replace(":appID",n)}`;return o.jsx(Rn,{children:o.jsx(eo,{asChild:!0,children:o.jsxs(Ar.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[c&&o.jsx(c,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]})})},s.key)})})}),o.jsx(Qn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const Kc=H.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:s,onSignOut:c,searchPlaceholder:l},u)=>o.jsx(o.Fragment,{children:o.jsx(Kn,{children:o.jsxs("div",{className:"flex grow",children:[o.jsx(Hc,{routes:r,footer:n,dashboardTitle:s}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsx(mo,{ref:u,onSignOut:c,rightMenu:t,handleValidSearch:a,searchPlaceholder:l}),o.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),o.jsx(zc,{})]})]})})}));Kc.displayName="Layout";const Pg={sm:100,md:200,lg:300,xl:400};function Yc({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,s]=i.useState(!1),[c,l]=i.useState(!1),[u,d]=i.useState(!1),[f,p]=i.useState(!1),h=`https://api.randmar.io/Product/${e}/Video`;i.useEffect(()=>{(async()=>{try{const x=await(await fetch(h+"/Exists")).json();l(x)}catch(y){console.error("Error checking for video:",y),l(!1)}})()},[e,h]);async function m(){if(c){p(!0);try{const y=await(await fetch(h)).blob(),x=window.URL.createObjectURL(y),N=document.createElement("a");N.href=x,N.download=`${e||"product"}-video.mp4`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(x)}catch(v){console.error("Error downloading video:",v)}finally{p(!1)}}}function b(){navigator.clipboard.writeText(h),d(!0),setTimeout(()=>{d(!1)},2e3)}function g(){s(!0)}const w=Pg[t||"xl"];return o.jsxs(o.Fragment,{children:[o.jsx(St,{open:a,onOpenChange:s,children:o.jsx(Et,{className:"max-w-4xl p-0 overflow-hidden",children:n?o.jsxs("div",{className:"flex flex-row",children:[o.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[o.jsx("source",{src:h,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):o.jsxs("div",{className:"w-full relative",children:[o.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[o.jsx("source",{src:h,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",onClick:b,children:u?o.jsx(Dr,{className:"h-4 w-4"}):o.jsx(gl,{className:"h-4 w-4"})})}),o.jsx(Re,{children:o.jsx("p",{children:"Copy video link"})})]})}),o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",onClick:m,disabled:f,children:o.jsx(vl,{className:"h-4 w-4"})})}),o.jsx(Re,{children:o.jsx("p",{children:"Download video"})})]})})]})]})})}),o.jsxs("div",{className:"relative w-max h-max",children:[o.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${c?"cursor-pointer":""}`,onClick:c?g:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${w*1.5}&height=${w*1.5}`,width:w,height:w}),c&&o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:g,children:o.jsx(Nl,{className:"h-4 w-4"})})}),o.jsx(Re,{children:o.jsx("p",{children:"Play video"})})]})})]})]})}function Ag({item:e,addToCart:t=!1,syncToShopify:r=!1,customAction:n=o.jsx(o.Fragment,{}),defaultOpportunityNumber:a="",viewProductAction:s,addToCartAction:c,isAddToCartActionLoading:l=!1,syncToShopifyAction:u,isSyncToShopifyActionLoading:d=!1}){var M,Y,Q,ee,te,ne,se,le,ae,Me,de,Pe;const[f,p]=H.useState(1),[h,m]=H.useState(null),[b,g]=H.useState(0),[w,v]=H.useState(!1),y=((M=e==null?void 0:e.Distribution)==null?void 0:M.Cost)||0,x=((Y=e==null?void 0:e.Distribution)==null?void 0:Y.RegularPrice)||0,N=((Q=e==null?void 0:e.Distribution)==null?void 0:Q.Price)||0,[E,C]=H.useState(null),[T,$]=H.useState(!1);H.useEffect(()=>{const G=async()=>{if(e!=null&&e.ManufacturerId){$(!0);try{const J=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(J.ok){const he=await J.blob();C(URL.createObjectURL(he))}}catch(J){console.error("Failed to load logo:",J)}finally{$(!1)}}};e!=null&&e.ManufacturerId&&G()},[e==null?void 0:e.ManufacturerId]),H.useEffect(()=>{var G;if(e&&a){const J=(G=e.Opportunities)==null?void 0:G.find(he=>he.BidNumber==a);J&&m(J)}},[e,a]),H.useEffect(()=>{if(!e)return;const G=h!=null&&h.Price?h.Price:N;g(x>0?Math.round((x-G)/x*100):0)},[e,h,N,x]),H.useEffect(()=>{l||p(1)},[l]);const O=G=>{if(G.Active!==!0)return!1;const J=new Date().toISOString().split("T")[0];return!(G.EndDate&&G.EndDate<J||G.StartDate&&G.StartDate>J)};if(!e)return o.jsx(wt,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(yt,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx(U,{className:"h-7 w-3/4"}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:o.jsx(U,{className:"h-10 w-24 rounded-md"})})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[o.jsx(U,{className:"h-6 w-20 rounded-full"}),o.jsx(U,{className:"h-6 w-24 rounded-full"}),o.jsx(U,{className:"h-6 w-28 rounded-full"})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[o.jsxs("div",{children:[o.jsx(U,{className:"h-4 w-12 mb-1"}),o.jsx(U,{className:"h-5 w-20"})]}),o.jsxs("div",{children:[o.jsx(U,{className:"h-4 w-12 mb-1"}),o.jsx(U,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(U,{className:"h-4 w-20 mb-1"}),o.jsx(U,{className:"h-5 w-16"})]}),o.jsxs("div",{children:[o.jsx(U,{className:"h-4 w-12 mb-1"}),o.jsx(U,{className:"h-5 w-20"})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx("div",{className:"w-60 h-40",children:o.jsx(U,{className:"w-full h-full rounded-lg"})})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:o.jsxs("div",{className:"w-full",children:[o.jsx(U,{className:"h-4 w-24 mb-3"}),o.jsx(U,{className:"h-16 w-full rounded-md"})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(U,{className:"h-10 w-32 rounded-md"}),o.jsx(U,{className:"h-5 w-24 mt-4"})]})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[o.jsx(U,{className:"h-8 w-32"}),o.jsx(U,{className:"h-6 w-24"})]}),o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(U,{className:"h-10 w-24 rounded-md"}),o.jsx(U,{className:"h-10 flex-1 rounded-md"})]})]})]})});const B=(e==null?void 0:e.Opportunities)||[],K=B.length>0,F=()=>{if(f==null){p(1);return}f>1&&p(f-1)},L=()=>{if(f==null){p(1);return}p(f+1)},P=G=>{const J=parseInt(G.target.value,10);if(!isNaN(J)&&J>0){p(J);return}p(void 0)},V=()=>{(f==null||f<1)&&p(1)},A=((te=(ee=e.Distribution)==null?void 0:ee.Inventory)==null?void 0:te.reduce((G,J)=>G+(J.AvailableQuantity||0),0))||0,X=G=>{try{return new Date(G).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(J){return console.error(J),G.split("T")[0]||"N/A"}},D=()=>{c&&c({quantity:f??1,bidNumber:(h==null?void 0:h.BidNumber)??null})};return o.jsx(wt,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(yt,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:T?o.jsx(U,{className:"h-10 w-24 rounded-md"}):E&&o.jsx("img",{src:E||"/placeholder.svg",alt:e.ManufacturerName??"",className:"max-h-10 max-w-24 object-contain"})})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Dr,{size:"12",className:"mr-1.5"})," ",e.State]}),o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[o.jsx(Cl,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&o.jsxs(Te,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[o.jsx(pl,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[o.jsx(Ao,{size:"12",className:"mr-1.5"})," ",(se=e.ManufacturerCategory)!=null&&se.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Ao,{size:"12",className:"mr-1.5"})," ",(le=e.ManufacturerCategory)!=null&&le.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Sl,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Tl,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),o.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),o.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),o.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),o.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),o.jsxs("div",{className:"font-medium flex items-center",children:[o.jsx(jc,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx(Yc,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:K&&e.Distribution&&o.jsxs("div",{className:"w-full",children:[o.jsx("div",{className:"flex items-center",children:"You have "+B.length+(B.length>1?" opportunities":" opportunity")+" for this product:"}),o.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:B.map((G,J)=>{var he;return o.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
195
|
-
|
|
196
|
-
`,onClick:()=>{O(G)&&m(G.BidNumber!=(h==null?void 0:h.BidNumber)?G:null)},children:[o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"font-medium text-sm",children:G.Opportunity}),o.jsxs("span",{className:"text-xs text-neutral-900",children:[G.BidNumber," ",!O(G)&&o.jsx(Te,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),o.jsxs("div",{className:"flex flex-col items-end",children:[o.jsxs("span",{className:"font-semibold",children:["$",(he=G.Price)==null?void 0:he.toFixed(2)]}),G.Rebate&&G.Rebate>0&&o.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",G.Rebate.toFixed(2)]}),G.EndDate&&o.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",X(G.EndDate)]})]})]},J)})})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[s&&o.jsxs(ce,{variant:"secondary",onClick:s,children:[o.jsx(ml,{className:"mr-2"}),"View Product"]}),((ae=e.Distribution)==null?void 0:ae.Inventory)&&o.jsx("div",{className:"mt-4",children:o.jsxs(St,{open:w,onOpenChange:v,children:[o.jsx(nn,{asChild:!0,children:o.jsxs(ce,{variant:"ghost",className:`flex items-center text-sm ${A>0?"text-green-700":"text-red-700"}`,children:[o.jsx(Do,{size:"16",className:"mr-2"}),A>0?o.jsxs(o.Fragment,{children:[A," in stock"]}):o.jsx(o.Fragment,{children:"Out of stock"})]})}),o.jsxs(Et,{className:"max-w-4xl",children:[o.jsx(rr,{children:o.jsxs(nr,{className:"flex items-center",children:[o.jsx(Do,{className:"mr-2",size:18}),"Inventory Information"]})}),o.jsx(_i,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&o.jsxs("div",{className:"flex justify-between items-end mt-4",children:[o.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:y>0?o.jsx("div",{className:"flex items-center",children:o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"Cost: $"}),y.toFixed(2),o.jsx("span",{children:" CAD"})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center flex-wrap",children:[o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"$"}),h?(de=(Me=e.Opportunities)==null?void 0:Me.find(G=>G.BidNumber==h.BidNumber))==null?void 0:de.Price:N.toFixed(2),o.jsx("span",{children:" CAD"})]}),b>0&&o.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",x.toFixed(2)]})]}),b>0&&o.jsx("div",{className:"flex items-center",children:o.jsxs(Te,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[o.jsxs("span",{children:[b,"% OFF"]}),((Pe=e.InstantRebate)==null?void 0:Pe.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(h==null?void 0:h.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",h.EndDate.split("T")[0]]})]})})]})}),o.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&o.jsxs("div",{className:"flex items-center border rounded-md",children:[o.jsx(ce,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:F,disabled:typeof f<"u"&&(f<=1||!e.AvailableToBuy||l||!c),children:"-"}),o.jsx("input",{value:f,onChange:P,onBlur:V,onClick:G=>G.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||l||!c?"text-gray-400":""}`,disabled:!e.AvailableToBuy||l||!c}),o.jsx(ce,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:L,disabled:!e.AvailableToBuy||l||!c,children:"+"})]}),typeof t<"u"&&t&&o.jsx(ce,{className:"gap-2 whitespace-nowrap",onClick:D,disabled:!e.AvailableToBuy||l||!c,children:l?o.jsxs(o.Fragment,{children:[o.jsx(Po,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_o,{className:"mr-2"}),"Add to Cart"]})}),r&&o.jsx(ce,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:u,disabled:d||!u,children:d?o.jsxs(o.Fragment,{children:[o.jsx(Po,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_o,{className:"mr-2"}),"Sync to Shopify"]})}),n]})]})]})})}function _g({id:e,name:t,about:r,voiceName:n,voiceStyle:a,sceneName:s,action:c,loading:l=!1}){const u=`https://api.randmar.io/V4/Partner/${e}/Account/Video`,d=`https://api.randmar.io/V4/Partner/${e}/Account/Video/Exists`,f=`https://api.randmar.io/V4/Partner/${e}/Account/Logo?width=64&height=64`,p=`https://api.randmar.io/V4/Partner/${e}/Account/Logo/Exists`,h=!!(n||a||s),[m,b]=H.useState(null),[g,w]=H.useState(!1),[v,y]=H.useState(!1),[x,N]=H.useState(!1),[E,C]=H.useState(!0);H.useEffect(()=>{if(!e||l)return;const $=async()=>{try{const F=await fetch(p);if(F.ok){const P=(await F.text()).toLowerCase()==="true";return y(P),P}return!1}catch(F){return console.error("Failed to check if logo exists:",F),y(!1),!1}},O=async()=>{w(!0);try{const F=await fetch(f);if(F.ok){const L=await F.blob();b(URL.createObjectURL(L))}}catch(F){console.error("Failed to load logo:",F)}finally{w(!1)}},B=async()=>{try{const F=await fetch(d);if(F.ok){const L=await F.text();N(L.toLowerCase()==="true")}}catch(F){console.error("Failed to check if video exists:",F),N(!1)}};(async()=>{await $()&&O(),B()})()},[e,f,p,d,l]);const T=()=>{C(!1)};return l?o.jsx(wt,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(yt,{className:"p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:o.jsx(U,{className:"h-10 w-10 rounded-md"})}),o.jsx(U,{className:"h-7 w-40"})]}),o.jsx("div",{className:"w-full sm:w-auto",children:o.jsx(U,{className:"h-9 w-24"})})]}),o.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[o.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(U,{className:"h-4 w-full"}),o.jsx(U,{className:"h-4 w-full"}),o.jsx(U,{className:"h-4 w-3/4"}),o.jsx(U,{className:"h-4 w-5/6"})]}),o.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[o.jsxs("div",{children:[o.jsx(U,{className:"h-3 w-20 mb-1"}),o.jsx(U,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(U,{className:"h-3 w-20 mb-1"}),o.jsx(U,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(U,{className:"h-3 w-20 mb-1"}),o.jsx(U,{className:"h-5 w-24"})]})]})})]}),o.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:o.jsx("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:o.jsx(U,{className:"w-full h-full"})})})]})]})}):o.jsx(wt,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(yt,{className:"p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[o.jsxs("div",{className:"flex items-center",children:[v&&o.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:g?o.jsx(U,{className:"h-10 w-10 rounded-md"}):m&&o.jsx("img",{src:m||"/placeholder.svg",alt:`${t} logo`,className:"max-h-10 w-auto object-contain"})}),o.jsx("h3",{className:"font-semibold text-xl",children:t})]}),c&&o.jsx("div",{className:"w-full sm:w-auto",children:c})]}),o.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[o.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[o.jsx("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:r}}),h&&o.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[n&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Name"}),o.jsx("div",{className:"font-medium",children:n})]}),a&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Style"}),o.jsx("div",{className:"font-medium",children:a})]}),s&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Scene Name"}),o.jsx("div",{className:"font-medium",children:s})]})]})})]}),x&&o.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:o.jsxs("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:[E&&o.jsx(U,{className:"w-full h-full"}),o.jsx("video",{src:u,controls:!0,preload:"auto",playsInline:!0,className:`w-full h-full object-contain ${E?"invisible":"visible"}`,style:{objectPosition:"center",imageRendering:"auto"},onLoadedData:T,onError:()=>C(!1)})]})})]})]})})}S.AvatarFooter=qh,S.Badge=Te,S.Button=ce,S.Card=wt,S.CardContent=yt,S.CardDescription=Gc,S.CardFooter=Uc,S.CardHeader=Wc,S.CardTitle=Vc,S.CountryFlag=jc,S.Dialog=St,S.DialogClose=on,S.DialogContent=Et,S.DialogDescription=cn,S.DialogFooter=sn,S.DialogHeader=rr,S.DialogOverlay=an,S.DialogPortal=$a,S.DialogTitle=nr,S.DialogTrigger=nn,S.DropdownMenu=gh,S.DropdownMenuCheckboxItem=Ei,S.DropdownMenuContent=Ci,S.DropdownMenuGroup=mh,S.DropdownMenuItem=Si,S.DropdownMenuLabel=Mi,S.DropdownMenuPortal=bh,S.DropdownMenuRadioGroup=yh,S.DropdownMenuRadioItem=Ti,S.DropdownMenuSeparator=Pi,S.DropdownMenuShortcut=Ai,S.DropdownMenuSub=wh,S.DropdownMenuSubContent=Ni,S.DropdownMenuSubTrigger=xi,S.DropdownMenuTrigger=vh,S.Input=Nr,S.InputOTP=hd,S.InputOTPGroup=gd,S.InputOTPSeparator=md,S.InputOTPSlot=vd,S.Label=Zh,S.Layout=Kc,S.Navbar=Hc,S.PartnerCard=_g,S.ProductCard=Ag,S.ProductImage=Yc,S.ProductInventoryGrid=_i,S.Separator=Gn,S.Sheet=Hi,S.SheetClose=Kh,S.SheetContent=jn,S.SheetDescription=Qi,S.SheetFooter=qi,S.SheetHeader=Yi,S.SheetOverlay=Un,S.SheetPortal=Ki,S.SheetTitle=Xi,S.SheetTrigger=Hh,S.Sidebar=Yn,S.SidebarContent=Zn,S.SidebarFooter=Qn,S.SidebarGroup=oc,S.SidebarGroupAction=sc,S.SidebarGroupContent=ic,S.SidebarGroupLabel=ac,S.SidebarHeader=Xn,S.SidebarInput=rc,S.SidebarInset=tc,S.SidebarMenu=Jn,S.SidebarMenuAction=cc,S.SidebarMenuBadge=lc,S.SidebarMenuButton=eo,S.SidebarMenuItem=Rn,S.SidebarMenuSkeleton=dc,S.SidebarMenuSub=uc,S.SidebarMenuSubButton=pc,S.SidebarMenuSubItem=fc,S.SidebarProvider=Kn,S.SidebarRail=ec,S.SidebarSeparator=nc,S.SidebarTrigger=qn,S.Skeleton=U,S.Toast=lo,S.ToastAction=Lc,S.ToastClose=uo,S.ToastDescription=po,S.ToastProvider=Oc,S.ToastTitle=fo,S.ToastViewport=co,S.Toaster=zc,S.Tooltip=mt,S.TooltipContent=Re,S.TooltipProvider=vt,S.TooltipTrigger=bt,S.Topbar=mo,S.badgeVariants=Bc,S.buttonVariants=$n,S.toast=$c,S.useIsMobile=Ji,S.useSidebar=$t,S.useToast=vo,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
194
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},eI="DialogDescriptionWarning",tI=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gg(eI).contentName}}.`;return _.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Hc=Ng,Hg=$g,Vg=kg,Yo=jg,Xo=Lg,Zo=Bg,Qo=Rg,Jo=Wg;const ha=({modal:e=!1,...t})=>y.jsx(Hc,{modal:e,...t});ha.displayName=Hc.displayName;const Vc=Hg,Kg=Vg,Kc=Jo,Yc=_.forwardRef(({className:e,...t},r)=>y.jsx(Yo,{ref:r,className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Yc.displayName=Yo.displayName;const va=_.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Kg,{children:[y.jsx(Yc,{}),y.jsxs(Xo,{ref:n,className:J("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,y.jsxs(Jo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[y.jsx(Sc,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));va.displayName=Xo.displayName;const ei=({className:e,...t})=>y.jsx("div",{className:J("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ei.displayName="DialogHeader";const Xc=({className:e,...t})=>y.jsx("div",{className:J("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xc.displayName="DialogFooter";const ti=_.forwardRef(({className:e,...t},r)=>y.jsx(Zo,{ref:r,className:J("text-lg font-semibold leading-none tracking-tight",e),...t}));ti.displayName=Zo.displayName;const Zc=_.forwardRef(({className:e,...t},r)=>y.jsx(Qo,{ref:r,className:J("text-sm text-muted-foreground",e),...t}));Zc.displayName=Qo.displayName;function Qc(e){const t=e+"CollectionProvider",[r,n]=hr(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:v}=p,h=A.useRef(null),b=A.useRef(new Map).current;return y.jsx(a,{scope:g,itemMap:b,collectionRef:h,children:v})};i.displayName=t;const s=e+"CollectionSlot",c=A.forwardRef((p,g)=>{const{scope:v,children:h}=p,b=o(s,v),w=je(g,b.collectionRef);return y.jsx(pt,{ref:w,children:h})});c.displayName=s;const u=e+"CollectionItemSlot",f="data-radix-collection-item",l=A.forwardRef((p,g)=>{const{scope:v,children:h,...b}=p,w=A.useRef(null),x=je(g,w),O=o(u,v);return A.useEffect(()=>(O.itemMap.set(w,{ref:w,...b}),()=>void O.itemMap.delete(w))),y.jsx(pt,{[f]:"",ref:x,children:h})});l.displayName=u;function d(p){const g=o(e+"CollectionConsumer",p);return A.useCallback(()=>{const h=g.collectionRef.current;if(!h)return[];const b=Array.from(h.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((O,m)=>b.indexOf(O.ref.current)-b.indexOf(m.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:l},d,n]}var rI=_.createContext(void 0);function Yg(e){const t=_.useContext(rI);return e||t||"ltr"}const nI=["top","right","bottom","left"],gr=Math.min,it=Math.max,ri=Math.round,ni=Math.floor,Bt=e=>({x:e,y:e}),aI={left:"right",right:"left",bottom:"top",top:"bottom"},oI={start:"end",end:"start"};function Jc(e,t,r){return it(e,gr(t,r))}function Zt(e,t){return typeof e=="function"?e(t):e}function Qt(e){return e.split("-")[0]}function pn(e){return e.split("-")[1]}function eu(e){return e==="x"?"y":"x"}function tu(e){return e==="y"?"height":"width"}function mr(e){return["top","bottom"].includes(Qt(e))?"y":"x"}function ru(e){return eu(mr(e))}function iI(e,t,r){r===void 0&&(r=!1);const n=pn(e),a=ru(e),o=tu(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ai(i)),[i,ai(i)]}function sI(e){const t=ai(e);return[nu(e),t,nu(t)]}function nu(e){return e.replace(/start|end/g,t=>oI[t])}function cI(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:i;default:return[]}}function uI(e,t,r,n){const a=pn(e);let o=cI(Qt(e),r==="start",n);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(nu)))),o}function ai(e){return e.replace(/left|right|bottom|top/g,t=>aI[t])}function lI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xg(e){return typeof e!="number"?lI(e):{top:e,right:e,bottom:e,left:e}}function oi(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Zg(e,t,r){let{reference:n,floating:a}=e;const o=mr(t),i=ru(t),s=tu(i),c=Qt(t),u=o==="y",f=n.x+n.width/2-a.width/2,l=n.y+n.height/2-a.height/2,d=n[s]/2-a[s]/2;let p;switch(c){case"top":p={x:f,y:n.y-a.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:l};break;case"left":p={x:n.x-a.width,y:l};break;default:p={x:n.x,y:n.y}}switch(pn(t)){case"start":p[i]-=d*(r&&u?-1:1);break;case"end":p[i]+=d*(r&&u?-1:1);break}return p}const fI=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:l}=Zg(u,n,c),d=n,p={},g=0;for(let v=0;v<s.length;v++){const{name:h,fn:b}=s[v],{x:w,y:x,data:O,reset:m}=await b({x:f,y:l,initialPlacement:n,placement:d,strategy:a,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});f=w??f,l=x??l,p={...p,[h]:{...p[h],...O}},m&&g<=50&&(g++,typeof m=="object"&&(m.placement&&(d=m.placement),m.rects&&(u=m.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):m.rects),{x:f,y:l}=Zg(u,d,c)),v=-1)}return{x:f,y:l,placement:d,strategy:a,middlewareData:p}};async function ya(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:o,rects:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:d=!1,padding:p=0}=Zt(t,e),g=Xg(p),h=s[d?l==="floating"?"reference":"floating":l],b=oi(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(h)))==null||r?h:h.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),w=l==="floating"?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),O=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},m=oi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(b.top-m.top+g.top)/O.y,bottom:(m.bottom-b.bottom+g.bottom)/O.y,left:(b.left-m.left+g.left)/O.x,right:(m.right-b.right+g.right)/O.x}}const dI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=Zt(e,t)||{};if(u==null)return{};const l=Xg(f),d={x:r,y:n},p=ru(a),g=tu(p),v=await i.getDimensions(u),h=p==="y",b=h?"top":"left",w=h?"bottom":"right",x=h?"clientHeight":"clientWidth",O=o.reference[g]+o.reference[p]-d[p]-o.floating[g],m=d[p]-o.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=S?S[x]:0;(!P||!await(i.isElement==null?void 0:i.isElement(S)))&&(P=s.floating[x]||o.floating[g]);const E=O/2-m/2,T=P/2-v[g]/2-1,k=gr(l[b],T),C=gr(l[w],T),M=k,N=P-v[g]-C,I=P/2-v[g]/2+E,L=Jc(M,I,N),$=!c.arrow&&pn(a)!=null&&I!==L&&o.reference[g]/2-(I<M?k:C)-v[g]/2<0,R=$?I<M?I-M:I-N:0;return{[p]:d[p]+R,data:{[p]:L,centerOffset:I-L-R,...$&&{alignmentOffset:R}},reset:$}}}),pI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...h}=Zt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=Qt(a),w=mr(s),x=Qt(s)===s,O=await(c.isRTL==null?void 0:c.isRTL(u.floating)),m=d||(x||!v?[ai(s)]:sI(s)),S=g!=="none";!d&&S&&m.push(...uI(s,v,g,O));const P=[s,...m],E=await ya(t,h),T=[];let k=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&T.push(E[b]),l){const I=iI(a,i,O);T.push(E[I[0]],E[I[1]])}if(k=[...k,{placement:a,overflows:T}],!T.every(I=>I<=0)){var C,M;const I=(((C=o.flip)==null?void 0:C.index)||0)+1,L=P[I];if(L)return{data:{index:I,overflows:k},reset:{placement:L}};let $=(M=k.filter(R=>R.overflows[0]<=0).sort((R,B)=>R.overflows[1]-B.overflows[1])[0])==null?void 0:M.placement;if(!$)switch(p){case"bestFit":{var N;const R=(N=k.filter(B=>{if(S){const q=mr(B.placement);return q===w||q==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(q=>q>0).reduce((q,j)=>q+j,0)]).sort((B,q)=>B[1]-q[1])[0])==null?void 0:N[0];R&&($=R);break}case"initialPlacement":$=s;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function Qg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jg(e){return nI.some(t=>e[t]>=0)}const hI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Zt(e,t);switch(n){case"referenceHidden":{const o=await ya(t,{...a,elementContext:"reference"}),i=Qg(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Jg(i)}}}case"escaped":{const o=await ya(t,{...a,altBoundary:!0}),i=Qg(o,r.floating);return{data:{escapedOffsets:i,escaped:Jg(i)}}}default:return{}}}}};async function vI(e,t){const{placement:r,platform:n,elements:a}=e,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=Qt(r),s=pn(r),c=mr(r)==="y",u=["left","top"].includes(i)?-1:1,f=o&&c?-1:1,l=Zt(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:g}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*f,y:d*u}:{x:d*u,y:p*f}}const yI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:i,middlewareData:s}=t,c=await vI(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},gI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:h=>{let{x:b,y:w}=h;return{x:b,y:w}}},...c}=Zt(e,t),u={x:r,y:n},f=await ya(t,c),l=mr(Qt(a)),d=eu(l);let p=u[d],g=u[l];if(o){const h=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=p+f[h],x=p-f[b];p=Jc(w,p,x)}if(i){const h=l==="y"?"top":"left",b=l==="y"?"bottom":"right",w=g+f[h],x=g-f[b];g=Jc(w,g,x)}const v=s.fn({...t,[d]:p,[l]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[d]:o,[l]:i}}}}}},mI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Zt(e,t),f={x:r,y:n},l=mr(a),d=eu(l);let p=f[d],g=f[l];const v=Zt(s,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const x=d==="y"?"height":"width",O=o.reference[d]-o.floating[x]+h.mainAxis,m=o.reference[d]+o.reference[x]-h.mainAxis;p<O?p=O:p>m&&(p=m)}if(u){var b,w;const x=d==="y"?"width":"height",O=["top","left"].includes(Qt(a)),m=o.reference[l]-o.floating[x]+(O&&((b=i.offset)==null?void 0:b[l])||0)+(O?0:h.crossAxis),S=o.reference[l]+o.reference[x]+(O?0:((w=i.offset)==null?void 0:w[l])||0)-(O?h.crossAxis:0);g<m?g=m:g>S&&(g=S)}return{[d]:p,[l]:g}}}},bI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:c=()=>{},...u}=Zt(e,t),f=await ya(t,u),l=Qt(a),d=pn(a),p=mr(a)==="y",{width:g,height:v}=o.floating;let h,b;l==="top"||l==="bottom"?(h=l,b=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=l,h=d==="end"?"top":"bottom");const w=v-f.top-f.bottom,x=g-f.left-f.right,O=gr(v-f[h],w),m=gr(g-f[b],x),S=!t.middlewareData.shift;let P=O,E=m;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),S&&!d){const k=it(f.left,0),C=it(f.right,0),M=it(f.top,0),N=it(f.bottom,0);p?E=g-2*(k!==0||C!==0?k+C:it(f.left,f.right)):P=v-2*(M!==0||N!==0?M+N:it(f.top,f.bottom))}await c({...t,availableWidth:E,availableHeight:P});const T=await i.getDimensions(s.floating);return g!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function ii(){return typeof window<"u"}function hn(e){return em(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(em(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function em(e){return ii()?e instanceof Node||e instanceof st(e).Node:!1}function At(e){return ii()?e instanceof Element||e instanceof st(e).Element:!1}function Rt(e){return ii()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function tm(e){return!ii()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function ga(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function wI(e){return["table","td","th"].includes(hn(e))}function si(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function au(e){const t=ou(),r=At(e)?Et(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function xI(e){let t=br(e);for(;Rt(t)&&!vn(t);){if(au(t))return t;if(si(t))return null;t=br(t)}return null}function ou(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vn(e){return["html","body","#document"].includes(hn(e))}function Et(e){return st(e).getComputedStyle(e)}function ci(e){return At(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function br(e){if(hn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tm(e)&&e.host||Ft(e);return tm(t)?t.host:t}function rm(e){const t=br(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rt(t)&&ga(t)?t:rm(t)}function ma(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=rm(e),o=a===((n=e.ownerDocument)==null?void 0:n.body),i=st(a);if(o){const s=iu(i);return t.concat(i,i.visualViewport||[],ga(a)?a:[],s&&r?ma(s):[])}return t.concat(a,ma(a,[],r))}function iu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nm(e){const t=Et(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Rt(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=ri(r)!==o||ri(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function su(e){return At(e)?e:e.contextElement}function yn(e){const t=su(e);if(!Rt(t))return Bt(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=nm(t);let i=(o?ri(r.width):r.width)/n,s=(o?ri(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const SI=Bt(0);function am(e){const t=st(e);return!ou()||!t.visualViewport?SI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function OI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==st(e)?!1:t}function Lr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),o=su(e);let i=Bt(1);t&&(n?At(n)&&(i=yn(n)):i=yn(e));const s=OI(o,r,n)?am(o):Bt(0);let c=(a.left+s.x)/i.x,u=(a.top+s.y)/i.y,f=a.width/i.x,l=a.height/i.y;if(o){const d=st(o),p=n&&At(n)?st(n):n;let g=d,v=iu(g);for(;v&&n&&p!==g;){const h=yn(v),b=v.getBoundingClientRect(),w=Et(v),x=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*h.x,O=b.top+(v.clientTop+parseFloat(w.paddingTop))*h.y;c*=h.x,u*=h.y,f*=h.x,l*=h.y,c+=x,u+=O,g=st(v),v=iu(g)}}return oi({width:f,height:l,x:c,y:u})}function cu(e,t){const r=ci(e).scrollLeft;return t?t.left+r:Lr(Ft(e)).left+r}function om(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:cu(e,n)),o=n.top+t.scrollTop;return{x:a,y:o}}function _I(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o=a==="fixed",i=Ft(n),s=t?si(t.floating):!1;if(n===i||s&&o)return r;let c={scrollLeft:0,scrollTop:0},u=Bt(1);const f=Bt(0),l=Rt(n);if((l||!l&&!o)&&((hn(n)!=="body"||ga(i))&&(c=ci(n)),Rt(n))){const p=Lr(n);u=yn(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const d=i&&!l&&!o?om(i,c,!0):Bt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+d.x,y:r.y*u.y-c.scrollTop*u.y+f.y+d.y}}function PI(e){return Array.from(e.getClientRects())}function AI(e){const t=Ft(e),r=ci(e),n=e.ownerDocument.body,a=it(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=it(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+cu(e);const s=-r.scrollTop;return Et(n).direction==="rtl"&&(i+=it(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:i,y:s}}function EI(e,t){const r=st(e),n=Ft(e),a=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const u=ou();(!u||u&&t==="fixed")&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}function TI(e,t){const r=Lr(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Rt(e)?yn(e):Bt(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,c=a*o.x,u=n*o.y;return{width:i,height:s,x:c,y:u}}function im(e,t,r){let n;if(t==="viewport")n=EI(e,r);else if(t==="document")n=AI(Ft(e));else if(At(t))n=TI(t,r);else{const a=am(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return oi(n)}function sm(e,t){const r=br(e);return r===t||!At(r)||vn(r)?!1:Et(r).position==="fixed"||sm(r,t)}function CI(e,t){const r=t.get(e);if(r)return r;let n=ma(e,[],!1).filter(s=>At(s)&&hn(s)!=="body"),a=null;const o=Et(e).position==="fixed";let i=o?br(e):e;for(;At(i)&&!vn(i);){const s=Et(i),c=au(i);!c&&s.position==="fixed"&&(a=null),(o?!c&&!a:!c&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||ga(i)&&!c&&sm(e,i))?n=n.filter(f=>f!==i):a=s,i=br(i)}return t.set(e,n),n}function MI(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?si(t)?[]:CI(t,this._c):[].concat(r),n],s=i[0],c=i.reduce((u,f)=>{const l=im(t,f,a);return u.top=it(l.top,u.top),u.right=gr(l.right,u.right),u.bottom=gr(l.bottom,u.bottom),u.left=it(l.left,u.left),u},im(t,s,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function NI(e){const{width:t,height:r}=nm(e);return{width:t,height:r}}function II(e,t,r){const n=Rt(t),a=Ft(t),o=r==="fixed",i=Lr(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const c=Bt(0);if(n||!n&&!o)if((hn(t)!=="body"||ga(a))&&(s=ci(t)),n){const d=Lr(t,!0,o,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else a&&(c.x=cu(a));const u=a&&!n&&!o?om(a,s):Bt(0),f=i.left+s.scrollLeft-c.x-u.x,l=i.top+s.scrollTop-c.y-u.y;return{x:f,y:l,width:i.width,height:i.height}}function uu(e){return Et(e).position==="static"}function cm(e,t){if(!Rt(e)||Et(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ft(e)===r&&(r=r.ownerDocument.body),r}function um(e,t){const r=st(e);if(si(e))return r;if(!Rt(e)){let a=br(e);for(;a&&!vn(a);){if(At(a)&&!uu(a))return a;a=br(a)}return r}let n=cm(e,t);for(;n&&wI(n)&&uu(n);)n=cm(n,t);return n&&vn(n)&&uu(n)&&!au(n)?r:n||xI(e)||r}const $I=async function(e){const t=this.getOffsetParent||um,r=this.getDimensions,n=await r(e.floating);return{reference:II(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function DI(e){return Et(e).direction==="rtl"}const kI={convertOffsetParentRelativeRectToViewportRelativeRect:_I,getDocumentElement:Ft,getClippingRect:MI,getOffsetParent:um,getElementRects:$I,getClientRects:PI,getDimensions:NI,getScale:yn,isElement:At,isRTL:DI};function lm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jI(e,t){let r=null,n;const a=Ft(e);function o(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:f,top:l,width:d,height:p}=u;if(s||t(),!d||!p)return;const g=ni(l),v=ni(a.clientWidth-(f+d)),h=ni(a.clientHeight-(l+p)),b=ni(f),x={rootMargin:-g+"px "+-v+"px "+-h+"px "+-b+"px",threshold:it(0,gr(1,c))||1};let O=!0;function m(S){const P=S[0].intersectionRatio;if(P!==c){if(!O)return i();P?i(!1,P):n=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!lm(u,e.getBoundingClientRect())&&i(),O=!1}try{r=new IntersectionObserver(m,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(m,x)}r.observe(e)}return i(!0),o}function LI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=su(e),f=a||o?[...u?ma(u):[],...ma(t)]:[];f.forEach(b=>{a&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const l=u&&s?jI(u,r):null;let d=-1,p=null;i&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!c&&p.observe(u),p.observe(t));let g,v=c?Lr(e):null;c&&h();function h(){const b=Lr(e);v&&!lm(v,b)&&r(),v=b,g=requestAnimationFrame(h)}return r(),()=>{var b;f.forEach(w=>{a&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),l==null||l(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const qI=yI,BI=gI,FI=pI,RI=bI,zI=hI,fm=dI,WI=mI,UI=(e,t,r)=>{const n=new Map,a={platform:kI,...r},o={...a.platform,_c:n};return fI(e,t,{...a,platform:o})};var ui=typeof document<"u"?A.useLayoutEffect:A.useEffect;function li(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!li(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const o=a[n];if(!(o==="_owner"&&e.$$typeof)&&!li(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function dm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pm(e,t){const r=dm(e);return Math.round(t*r)/r}function lu(e){const t=_.useRef(e);return ui(()=>{t.current=e}),t}function GI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,l]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=_.useState(n);li(d,n)||p(n);const[g,v]=_.useState(null),[h,b]=_.useState(null),w=_.useCallback(B=>{B!==S.current&&(S.current=B,v(B))},[]),x=_.useCallback(B=>{B!==P.current&&(P.current=B,b(B))},[]),O=o||g,m=i||h,S=_.useRef(null),P=_.useRef(null),E=_.useRef(f),T=c!=null,k=lu(c),C=lu(a),M=lu(u),N=_.useCallback(()=>{if(!S.current||!P.current)return;const B={placement:t,strategy:r,middleware:d};C.current&&(B.platform=C.current),UI(S.current,P.current,B).then(q=>{const j={...q,isPositioned:M.current!==!1};I.current&&!li(E.current,j)&&(E.current=j,wc.flushSync(()=>{l(j)}))})},[d,t,r,C,M]);ui(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(B=>({...B,isPositioned:!1})))},[u]);const I=_.useRef(!1);ui(()=>(I.current=!0,()=>{I.current=!1}),[]),ui(()=>{if(O&&(S.current=O),m&&(P.current=m),O&&m){if(k.current)return k.current(O,m,N);N()}},[O,m,N,k,T]);const L=_.useMemo(()=>({reference:S,floating:P,setReference:w,setFloating:x}),[w,x]),$=_.useMemo(()=>({reference:O,floating:m}),[O,m]),R=_.useMemo(()=>{const B={position:r,left:0,top:0};if(!$.floating)return B;const q=pm($.floating,f.x),j=pm($.floating,f.y);return s?{...B,transform:"translate("+q+"px, "+j+"px)",...dm($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:j}},[r,s,$.floating,f.x,f.y]);return _.useMemo(()=>({...f,update:N,refs:L,elements:$,floatingStyles:R}),[f,N,L,$,R])}const HI=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?fm({element:n.current,padding:a}).fn(r):{}:n?fm({element:n,padding:a}).fn(r):{}}}},VI=(e,t)=>({...qI(e),options:[e,t]}),KI=(e,t)=>({...BI(e),options:[e,t]}),YI=(e,t)=>({...WI(e),options:[e,t]}),XI=(e,t)=>({...FI(e),options:[e,t]}),ZI=(e,t)=>({...RI(e),options:[e,t]}),QI=(e,t)=>({...zI(e),options:[e,t]}),JI=(e,t)=>({...HI(e),options:[e,t]});var e$="Arrow",hm=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...o}=e;return y.jsx(we.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});hm.displayName=e$;var t$=hm;function r$(e){const[t,r]=_.useState(void 0);return vr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let i,s;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var fu="Popper",[vm,fi]=hr(fu),[n$,ym]=vm(fu),gm=e=>{const{__scopePopper:t,children:r}=e,[n,a]=_.useState(null);return y.jsx(n$,{scope:t,anchor:n,onAnchorChange:a,children:r})};gm.displayName=fu;var mm="PopperAnchor",bm=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,o=ym(mm,r),i=_.useRef(null),s=je(t,i);return _.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:y.jsx(we.div,{...a,ref:s})});bm.displayName=mm;var du="PopperContent",[a$,o$]=vm(du),wm=_.forwardRef((e,t)=>{var re,ie,G,X,K,D;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:g,...v}=e,h=ym(du,r),[b,w]=_.useState(null),x=je(t,ue=>w(ue)),[O,m]=_.useState(null),S=r$(O),P=(S==null?void 0:S.width)??0,E=(S==null?void 0:S.height)??0,T=n+(o!=="center"?"-"+o:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},C=Array.isArray(u)?u:[u],M=C.length>0,N={padding:k,boundary:C.filter(s$),altBoundary:M},{refs:I,floatingStyles:L,placement:$,isPositioned:R,middlewareData:B}=GI({strategy:"fixed",placement:T,whileElementsMounted:(...ue)=>LI(...ue,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[VI({mainAxis:a+E,alignmentAxis:i}),c&&KI({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?YI():void 0,...N}),c&&XI({...N}),ZI({...N,apply:({elements:ue,rects:z,availableWidth:te,availableHeight:fe})=>{const{width:be,height:$e}=z.reference,ye=ue.floating.style;ye.setProperty("--radix-popper-available-width",`${te}px`),ye.setProperty("--radix-popper-available-height",`${fe}px`),ye.setProperty("--radix-popper-anchor-width",`${be}px`),ye.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),O&&JI({element:O,padding:s}),c$({arrowWidth:P,arrowHeight:E}),d&&QI({strategy:"referenceHidden",...N})]}),[q,j]=Om($),F=Xe(g);vr(()=>{R&&(F==null||F())},[R,F]);const W=(re=B.arrow)==null?void 0:re.x,V=(ie=B.arrow)==null?void 0:ie.y,Y=((G=B.arrow)==null?void 0:G.centerOffset)!==0,[Q,ee]=_.useState();return vr(()=>{b&&ee(window.getComputedStyle(b).zIndex)},[b]),y.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:R?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(X=B.transformOrigin)==null?void 0:X.x,(K=B.transformOrigin)==null?void 0:K.y].join(" "),...((D=B.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(a$,{scope:r,placedSide:q,onArrowChange:m,arrowX:W,arrowY:V,shouldHideArrow:Y,children:y.jsx(we.div,{"data-side":q,"data-align":j,...v,ref:x,style:{...v.style,animation:R?void 0:"none"}})})})});wm.displayName=du;var xm="PopperArrow",i$={top:"bottom",right:"left",bottom:"top",left:"right"},Sm=_.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,o=o$(xm,n),i=i$[o.placedSide];return y.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:y.jsx(t$,{...a,ref:r,style:{...a.style,display:"block"}})})});Sm.displayName=xm;function s$(e){return e!==null}var c$=e=>({name:"transformOrigin",options:e,fn(t){var h,b,w;const{placement:r,rects:n,middlewareData:a}=t,i=((h=a.arrow)==null?void 0:h.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Om(r),l={start:"0%",center:"50%",end:"100%"}[f],d=(((b=a.arrow)==null?void 0:b.x)??0)+s/2,p=(((w=a.arrow)==null?void 0:w.y)??0)+c/2;let g="",v="";return u==="bottom"?(g=i?l:`${d}px`,v=`${-c}px`):u==="top"?(g=i?l:`${d}px`,v=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,v=i?l:`${p}px`):u==="left"&&(g=`${n.floating.width+c}px`,v=i?l:`${p}px`),{data:{x:g,y:v}}}});function Om(e){const[t,r="center"]=e.split("-");return[t,r]}var pu=gm,_m=bm,Pm=wm,Am=Sm,hu="rovingFocusGroup.onEntryFocus",u$={bubbles:!1,cancelable:!0},di="RovingFocusGroup",[vu,Em,l$]=Qc(di),[f$,Tm]=hr(di,[l$]),[d$,p$]=f$(di),Cm=_.forwardRef((e,t)=>y.jsx(vu.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(vu.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(h$,{...e,ref:t})})}));Cm.displayName=di;var h$=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=e,d=_.useRef(null),p=je(t,d),g=Yg(o),[v=null,h]=cn({prop:i,defaultProp:s,onChange:c}),[b,w]=_.useState(!1),x=Xe(u),O=Em(r),m=_.useRef(!1),[S,P]=_.useState(0);return _.useEffect(()=>{const E=d.current;if(E)return E.addEventListener(hu,x),()=>E.removeEventListener(hu,x)},[x]),y.jsx(d$,{scope:r,orientation:n,dir:g,loop:a,currentTabStopId:v,onItemFocus:_.useCallback(E=>h(E),[h]),onItemShiftTab:_.useCallback(()=>w(!0),[]),onFocusableItemAdd:_.useCallback(()=>P(E=>E+1),[]),onFocusableItemRemove:_.useCallback(()=>P(E=>E-1),[]),children:y.jsx(we.div,{tabIndex:b||S===0?-1:0,"data-orientation":n,...l,ref:p,style:{outline:"none",...e.style},onMouseDown:se(e.onMouseDown,()=>{m.current=!0}),onFocus:se(e.onFocus,E=>{const T=!m.current;if(E.target===E.currentTarget&&T&&!b){const k=new CustomEvent(hu,u$);if(E.currentTarget.dispatchEvent(k),!k.defaultPrevented){const C=O().filter($=>$.focusable),M=C.find($=>$.active),N=C.find($=>$.id===v),L=[M,N,...C].filter(Boolean).map($=>$.ref.current);Im(L,f)}}m.current=!1}),onBlur:se(e.onBlur,()=>w(!1))})})}),Mm="RovingFocusGroupItem",Nm=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:o,...i}=e,s=Xt(),c=o||s,u=p$(Mm,r),f=u.currentTabStopId===c,l=Em(r),{onFocusableItemAdd:d,onFocusableItemRemove:p}=u;return _.useEffect(()=>{if(n)return d(),()=>p()},[n,d,p]),y.jsx(vu.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:y.jsx(we.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:se(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:se(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:se(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=g$(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=l().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")b.reverse();else if(v==="prev"||v==="next"){v==="prev"&&b.reverse();const w=b.indexOf(g.currentTarget);b=u.loop?m$(b,w+1):b.slice(w+1)}setTimeout(()=>Im(b))}})})})});Nm.displayName=Mm;var v$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function y$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function g$(e,t,r){const n=y$(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return v$[n]}function Im(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function m$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var b$=Cm,w$=Nm,yu=["Enter"," "],x$=["ArrowDown","PageUp","Home"],$m=["ArrowUp","PageDown","End"],S$=[...x$,...$m],O$={ltr:[...yu,"ArrowRight"],rtl:[...yu,"ArrowLeft"]},_$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ba="Menu",[wa,P$,A$]=Qc(ba),[qr,Dm]=hr(ba,[A$,fi,Tm]),xa=fi(),km=Tm(),[jm,wr]=qr(ba),[E$,Sa]=qr(ba),Lm=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:o,modal:i=!0}=e,s=xa(t),[c,u]=_.useState(null),f=_.useRef(!1),l=Xe(o),d=Yg(a);return _.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),y.jsx(pu,{...s,children:y.jsx(jm,{scope:t,open:r,onOpenChange:l,content:c,onContentChange:u,children:y.jsx(E$,{scope:t,onClose:_.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:d,modal:i,children:n})})})};Lm.displayName=ba;var T$="MenuAnchor",gu=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=xa(r);return y.jsx(_m,{...a,...n,ref:t})});gu.displayName=T$;var mu="MenuPortal",[C$,qm]=qr(mu,{forceMount:void 0}),Bm=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,o=wr(mu,t);return y.jsx(C$,{scope:t,forceMount:r,children:y.jsx(_t,{present:r||o.open,children:y.jsx(pa,{asChild:!0,container:a,children:n})})})};Bm.displayName=mu;var ht="MenuContent",[M$,bu]=qr(ht),Fm=_.forwardRef((e,t)=>{const r=qm(ht,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,o=wr(ht,e.__scopeMenu),i=Sa(ht,e.__scopeMenu);return y.jsx(wa.Provider,{scope:e.__scopeMenu,children:y.jsx(_t,{present:n||o.open,children:y.jsx(wa.Slot,{scope:e.__scopeMenu,children:i.modal?y.jsx(N$,{...a,ref:t}):y.jsx(I$,{...a,ref:t})})})})}),N$=_.forwardRef((e,t)=>{const r=wr(ht,e.__scopeMenu),n=_.useRef(null),a=je(t,n);return _.useEffect(()=>{const o=n.current;if(o)return Cg(o)},[]),y.jsx(wu,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:se(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),I$=_.forwardRef((e,t)=>{const r=wr(ht,e.__scopeMenu);return y.jsx(wu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),wu=_.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,disableOutsideScroll:g,...v}=e,h=wr(ht,r),b=Sa(ht,r),w=xa(r),x=km(r),O=P$(r),[m,S]=_.useState(null),P=_.useRef(null),E=je(t,P,h.onContentChange),T=_.useRef(0),k=_.useRef(""),C=_.useRef(0),M=_.useRef(null),N=_.useRef("right"),I=_.useRef(0),L=g?Fc:_.Fragment,$=g?{as:pt,allowPinchZoom:!0}:void 0,R=q=>{var re,ie;const j=k.current+q,F=O().filter(G=>!G.disabled),W=document.activeElement,V=(re=F.find(G=>G.ref.current===W))==null?void 0:re.textValue,Y=F.map(G=>G.textValue),Q=U$(Y,j,V),ee=(ie=F.find(G=>G.textValue===Q))==null?void 0:ie.ref.current;(function G(X){k.current=X,window.clearTimeout(T.current),X!==""&&(T.current=window.setTimeout(()=>G(""),1e3))})(j),ee&&setTimeout(()=>ee.focus())};_.useEffect(()=>()=>window.clearTimeout(T.current),[]),hg();const B=_.useCallback(q=>{var F,W;return N.current===((F=M.current)==null?void 0:F.side)&&H$(q,(W=M.current)==null?void 0:W.area)},[]);return y.jsx(M$,{scope:r,searchRef:k,onItemEnter:_.useCallback(q=>{B(q)&&q.preventDefault()},[B]),onItemLeave:_.useCallback(q=>{var j;B(q)||((j=P.current)==null||j.focus(),S(null))},[B]),onTriggerLeave:_.useCallback(q=>{B(q)&&q.preventDefault()},[B]),pointerGraceTimerRef:C,onPointerGraceIntentChange:_.useCallback(q=>{M.current=q},[]),children:y.jsx(L,{...$,children:y.jsx(Dc,{asChild:!0,trapped:a,onMountAutoFocus:se(o,q=>{var j;q.preventDefault(),(j=P.current)==null||j.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:y.jsx(da,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,children:y.jsx(b$,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:m,onCurrentTabStopIdChange:S,onEntryFocus:se(c,q=>{b.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(Pm,{role:"menu","aria-orientation":"vertical","data-state":ab(h.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:se(v.onKeyDown,q=>{const F=q.target.closest("[data-radix-menu-content]")===q.currentTarget,W=q.ctrlKey||q.altKey||q.metaKey,V=q.key.length===1;F&&(q.key==="Tab"&&q.preventDefault(),!W&&V&&R(q.key));const Y=P.current;if(q.target!==Y||!S$.includes(q.key))return;q.preventDefault();const ee=O().filter(re=>!re.disabled).map(re=>re.ref.current);$m.includes(q.key)&&ee.reverse(),z$(ee)}),onBlur:se(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(T.current),k.current="")}),onPointerMove:se(e.onPointerMove,_a(q=>{const j=q.target,F=I.current!==q.clientX;if(q.currentTarget.contains(j)&&F){const W=q.clientX>I.current?"right":"left";N.current=W,I.current=q.clientX}}))})})})})})})});Fm.displayName=ht;var $$="MenuGroup",xu=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(we.div,{role:"group",...n,ref:t})});xu.displayName=$$;var D$="MenuLabel",Rm=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(we.div,{...n,ref:t})});Rm.displayName=D$;var pi="MenuItem",zm="menu.itemSelect",hi=_.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,o=_.useRef(null),i=Sa(pi,e.__scopeMenu),s=bu(pi,e.__scopeMenu),c=je(t,o),u=_.useRef(!1),f=()=>{const l=o.current;if(!r&&l){const d=new CustomEvent(zm,{bubbles:!0,cancelable:!0});l.addEventListener(zm,p=>n==null?void 0:n(p),{once:!0}),Mc(l,d),d.defaultPrevented?u.current=!1:i.onClose()}};return y.jsx(Wm,{...a,ref:c,disabled:r,onClick:se(e.onClick,f),onPointerDown:l=>{var d;(d=e.onPointerDown)==null||d.call(e,l),u.current=!0},onPointerUp:se(e.onPointerUp,l=>{var d;u.current||(d=l.currentTarget)==null||d.click()}),onKeyDown:se(e.onKeyDown,l=>{const d=s.searchRef.current!=="";r||d&&l.key===" "||yu.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});hi.displayName=pi;var Wm=_.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...o}=e,i=bu(pi,r),s=km(r),c=_.useRef(null),u=je(t,c),[f,l]=_.useState(!1),[d,p]=_.useState("");return _.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[o.children]),y.jsx(wa.ItemSlot,{scope:r,disabled:n,textValue:a??d,children:y.jsx(w$,{asChild:!0,...s,focusable:!n,children:y.jsx(we.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:se(e.onPointerMove,_a(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:se(e.onPointerLeave,_a(g=>i.onItemLeave(g))),onFocus:se(e.onFocus,()=>l(!0)),onBlur:se(e.onBlur,()=>l(!1))})})})}),k$="MenuCheckboxItem",Um=_.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return y.jsx(Ym,{scope:e.__scopeMenu,checked:r,children:y.jsx(hi,{role:"menuitemcheckbox","aria-checked":vi(r)?"mixed":r,...a,ref:t,"data-state":_u(r),onSelect:se(a.onSelect,()=>n==null?void 0:n(vi(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Um.displayName=k$;var Gm="MenuRadioGroup",[j$,L$]=qr(Gm,{value:void 0,onValueChange:()=>{}}),Hm=_.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,o=Xe(n);return y.jsx(j$,{scope:e.__scopeMenu,value:r,onValueChange:o,children:y.jsx(xu,{...a,ref:t})})});Hm.displayName=Gm;var Vm="MenuRadioItem",Km=_.forwardRef((e,t)=>{const{value:r,...n}=e,a=L$(Vm,e.__scopeMenu),o=r===a.value;return y.jsx(Ym,{scope:e.__scopeMenu,checked:o,children:y.jsx(hi,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":_u(o),onSelect:se(n.onSelect,()=>{var i;return(i=a.onValueChange)==null?void 0:i.call(a,r)},{checkForDefaultPrevented:!1})})})});Km.displayName=Vm;var Su="MenuItemIndicator",[Ym,q$]=qr(Su,{checked:!1}),Xm=_.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,o=q$(Su,r);return y.jsx(_t,{present:n||vi(o.checked)||o.checked===!0,children:y.jsx(we.span,{...a,ref:t,"data-state":_u(o.checked)})})});Xm.displayName=Su;var B$="MenuSeparator",Zm=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return y.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Zm.displayName=B$;var F$="MenuArrow",Qm=_.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=xa(r);return y.jsx(Am,{...a,...n,ref:t})});Qm.displayName=F$;var Ou="MenuSub",[R$,Jm]=qr(Ou),eb=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,o=wr(Ou,t),i=xa(t),[s,c]=_.useState(null),[u,f]=_.useState(null),l=Xe(a);return _.useEffect(()=>(o.open===!1&&l(!1),()=>l(!1)),[o.open,l]),y.jsx(pu,{...i,children:y.jsx(jm,{scope:t,open:n,onOpenChange:l,content:u,onContentChange:f,children:y.jsx(R$,{scope:t,contentId:Xt(),triggerId:Xt(),trigger:s,onTriggerChange:c,children:r})})})};eb.displayName=Ou;var Oa="MenuSubTrigger",tb=_.forwardRef((e,t)=>{const r=wr(Oa,e.__scopeMenu),n=Sa(Oa,e.__scopeMenu),a=Jm(Oa,e.__scopeMenu),o=bu(Oa,e.__scopeMenu),i=_.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},f=_.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return _.useEffect(()=>f,[f]),_.useEffect(()=>{const l=s.current;return()=>{window.clearTimeout(l),c(null)}},[s,c]),y.jsx(gu,{asChild:!0,...u,children:y.jsx(Wm,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":ab(r.open),...e,ref:Bo(t,a.onTriggerChange),onClick:l=>{var d;(d=e.onClick)==null||d.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:se(e.onPointerMove,_a(l=>{o.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:se(e.onPointerLeave,_a(l=>{var p,g;f();const d=(p=r.content)==null?void 0:p.getBoundingClientRect();if(d){const v=(g=r.content)==null?void 0:g.dataset.side,h=v==="right",b=h?-5:5,w=d[h?"left":"right"],x=d[h?"right":"left"];o.onPointerGraceIntentChange({area:[{x:l.clientX+b,y:l.clientY},{x:w,y:d.top},{x,y:d.top},{x,y:d.bottom},{x:w,y:d.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(l),l.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:se(e.onKeyDown,l=>{var p;const d=o.searchRef.current!=="";e.disabled||d&&l.key===" "||O$[n.dir].includes(l.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),l.preventDefault())})})})});tb.displayName=Oa;var rb="MenuSubContent",nb=_.forwardRef((e,t)=>{const r=qm(ht,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,o=wr(ht,e.__scopeMenu),i=Sa(ht,e.__scopeMenu),s=Jm(rb,e.__scopeMenu),c=_.useRef(null),u=je(t,c);return y.jsx(wa.Provider,{scope:e.__scopeMenu,children:y.jsx(_t,{present:n||o.open,children:y.jsx(wa.Slot,{scope:e.__scopeMenu,children:y.jsx(wu,{id:s.contentId,"aria-labelledby":s.triggerId,...a,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;i.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:se(e.onFocusOutside,f=>{f.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:se(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:se(e.onKeyDown,f=>{var p;const l=f.currentTarget.contains(f.target),d=_$[i.dir].includes(f.key);l&&d&&(o.onOpenChange(!1),(p=s.trigger)==null||p.focus(),f.preventDefault())})})})})})});nb.displayName=rb;function ab(e){return e?"open":"closed"}function vi(e){return e==="indeterminate"}function _u(e){return vi(e)?"indeterminate":e?"checked":"unchecked"}function z$(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function W$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function U$(e,t,r){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=W$(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function G$(e,t){const{x:r,y:n}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const s=t[o].x,c=t[o].y,u=t[i].x,f=t[i].y;c>n!=f>n&&r<(u-s)*(n-c)/(f-c)+s&&(a=!a)}return a}function H$(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return G$(r,t)}function _a(e){return t=>t.pointerType==="mouse"?e(t):void 0}var V$=Lm,K$=gu,Y$=Bm,X$=Fm,Z$=xu,Q$=Rm,J$=hi,eD=Um,tD=Hm,rD=Km,nD=Xm,aD=Zm,oD=Qm,iD=eb,sD=tb,cD=nb,Pu="DropdownMenu",[uD,gV]=hr(Pu,[Dm]),Ze=Dm(),[lD,ob]=uD(Pu),ib=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,c=Ze(t),u=_.useRef(null),[f=!1,l]=cn({prop:a,defaultProp:o,onChange:i});return y.jsx(lD,{scope:t,triggerId:Xt(),triggerRef:u,contentId:Xt(),open:f,onOpenChange:l,onOpenToggle:_.useCallback(()=>l(d=>!d),[l]),modal:s,children:y.jsx(V$,{...c,open:f,onOpenChange:l,dir:n,modal:s,children:r})})};ib.displayName=Pu;var sb="DropdownMenuTrigger",cb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,o=ob(sb,r),i=Ze(r);return y.jsx(K$,{asChild:!0,...i,children:y.jsx(we.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:Bo(t,o.triggerRef),onPointerDown:se(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:se(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});cb.displayName=sb;var fD="DropdownMenuPortal",ub=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ze(t);return y.jsx(Y$,{...n,...r})};ub.displayName=fD;var lb="DropdownMenuContent",fb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=ob(lb,r),o=Ze(r),i=_.useRef(!1);return y.jsx(X$,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...n,ref:t,onCloseAutoFocus:se(e.onCloseAutoFocus,s=>{var c;i.current||(c=a.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:se(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!a.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fb.displayName=lb;var dD="DropdownMenuGroup",db=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(Z$,{...a,...n,ref:t})});db.displayName=dD;var pD="DropdownMenuLabel",pb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(Q$,{...a,...n,ref:t})});pb.displayName=pD;var hD="DropdownMenuItem",hb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(J$,{...a,...n,ref:t})});hb.displayName=hD;var vD="DropdownMenuCheckboxItem",vb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(eD,{...a,...n,ref:t})});vb.displayName=vD;var yD="DropdownMenuRadioGroup",yb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(tD,{...a,...n,ref:t})});yb.displayName=yD;var gD="DropdownMenuRadioItem",gb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(rD,{...a,...n,ref:t})});gb.displayName=gD;var mD="DropdownMenuItemIndicator",mb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(nD,{...a,...n,ref:t})});mb.displayName=mD;var bD="DropdownMenuSeparator",bb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(aD,{...a,...n,ref:t})});bb.displayName=bD;var wD="DropdownMenuArrow",xD=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(oD,{...a,...n,ref:t})});xD.displayName=wD;var SD=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:o}=e,i=Ze(t),[s=!1,c]=cn({prop:n,defaultProp:o,onChange:a});return y.jsx(iD,{...i,open:s,onOpenChange:c,children:r})},OD="DropdownMenuSubTrigger",wb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(sD,{...a,...n,ref:t})});wb.displayName=OD;var _D="DropdownMenuSubContent",xb=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ze(r);return y.jsx(cD,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xb.displayName=_D;var PD=ib,AD=cb,Sb=ub,Ob=fb,ED=db,_b=pb,Pb=hb,Ab=vb,TD=yb,Eb=gb,Tb=mb,Cb=bb,CD=SD,Mb=wb,Nb=xb;const MD=PD,ND=AD,ID=ED,$D=Sb,DD=CD,kD=TD,Ib=_.forwardRef(({className:e,inset:t,children:r,...n},a)=>y.jsxs(Mb,{ref:a,className:J("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,y.jsx(TC,{className:"ml-auto"})]}));Ib.displayName=Mb.displayName;const $b=_.forwardRef(({className:e,...t},r)=>y.jsx(Nb,{ref:r,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));$b.displayName=Nb.displayName;const Db=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(Sb,{children:y.jsx(Ob,{ref:n,sideOffset:t,className:J("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Db.displayName=Ob.displayName;const kb=_.forwardRef(({className:e,inset:t,...r},n)=>y.jsx(Pb,{ref:n,className:J("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));kb.displayName=Pb.displayName;const jb=_.forwardRef(({className:e,children:t,checked:r,...n},a)=>y.jsxs(Ab,{ref:a,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Tb,{children:y.jsx(xc,{className:"h-4 w-4"})})}),t]}));jb.displayName=Ab.displayName;const Lb=_.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Eb,{ref:n,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Tb,{children:y.jsx(MC,{className:"h-2 w-2 fill-current"})})}),t]}));Lb.displayName=Eb.displayName;const qb=_.forwardRef(({className:e,inset:t,...r},n)=>y.jsx(_b,{ref:n,className:J("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));qb.displayName=_b.displayName;const Bb=_.forwardRef(({className:e,...t},r)=>y.jsx(Cb,{ref:r,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));Bb.displayName=Cb.displayName;const Fb=({className:e,...t})=>y.jsx("span",{className:J("ml-auto text-xs tracking-widest opacity-60",e),...t});Fb.displayName="DropdownMenuShortcut";function Rb({inventory:e,showBinLocation:t}){const r=(b,w,x=!1,O=!0)=>y.jsxs("div",{className:`p-3 text-sm ${O&&w>0?"border-t":""} ${x?"border-r":""}`,children:[y.jsxs("div",{className:"flex justify-between font-medium",children:[y.jsx("span",{children:b.Name}),y.jsx("span",{children:b.AvailableQuantity})]}),y.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[y.jsx("span",{children:"Expecting"}),y.jsx("span",{children:b.PurchaseOrderQuantity||"-"})]}),t&&y.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[y.jsx("span",{children:"Bin Location"}),y.jsx("span",{children:b.BinLocation||"-"})]})]},`warehouse-${b.WarehouseId}`),n=["MTL","TOR"],a=["VAN","EDM"],o=[...e].sort((b,w)=>(b.Name||"").localeCompare(w.Name||"")),i=o.filter(b=>b.Country==="US"),s=o.filter(b=>b.Country==="CA"),c=o.filter(b=>a.includes(b.WarehouseId||"")),u=o.filter(b=>n.includes(b.WarehouseId||"")),f=s.filter(b=>!n.includes(b.WarehouseId||"")&&!a.includes(b.WarehouseId||"")),l=b=>b.reduce((w,x)=>w+(x.AvailableQuantity||0),0),d=l(s),p=l(u),g=l(c),v=l(i),h=d+v;return y.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&i.length>0&&y.jsxs("div",{className:"grid grid-cols-2 border-b",children:[y.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[y.jsx("span",{children:"Total"}),y.jsx("span",{children:h})]}),y.jsx("div",{className:"p-3"})]}),s.length>0&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[y.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[y.jsx("span",{children:"Canada"}),y.jsx("span",{children:d})]}),y.jsx("div",{className:"p-3"})]}),y.jsxs("div",{className:"grid grid-cols-2",children:[y.jsxs("div",{className:"border-r",children:[y.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[y.jsx("span",{children:"West"}),y.jsx("span",{children:g})]}),c.map((b,w)=>r(b,w))]}),y.jsxs("div",{children:[y.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[y.jsx("span",{children:"East"}),y.jsx("span",{children:p})]}),u.map((b,w)=>r(b,w))]})]}),f.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:y.jsx("span",{children:"Other"})}),y.jsx("div",{className:"grid grid-cols-2",children:f.map((b,w)=>r(b,w,w%2===0,!0))})]})]}),i.length>0&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[y.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[y.jsx("span",{children:"United States"}),y.jsx("span",{children:v})]}),y.jsx("div",{className:"p-3"})]}),y.jsx("div",{className:"grid grid-cols-2",children:i.map((b,w)=>r(b,w,w%2===0,!0))})]}),e.length===0&&y.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const zb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wb=ge,Pa=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Wb(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(u=>{const f=r==null?void 0:r[u],l=o==null?void 0:o[u];if(f===null)return null;const d=zb(f)||zb(l);return a[u][d]}),s=r&&Object.entries(r).reduce((u,f)=>{let[l,d]=f;return d===void 0||(u[l]=d),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:l,className:d,...p}=f;return Object.entries(p).every(g=>{let[v,h]=g;return Array.isArray(h)?h.includes({...o,...s}[v]):{...o,...s}[v]===h})?[...u,l,d]:u},[]);return Wb(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},Au=Pa("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ve=_.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:o,...i},s)=>{const c=n?pt:"button";if(!a)return y.jsx(c,{className:J(Au({variant:t,size:r,className:e})),ref:s,onClick:o,...i});o&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:u,content:f,onConfirm:l,confirmText:d="Confirm",cancelText:p="Cancel"}=a,g=()=>{l()};return y.jsxs(ha,{children:[y.jsx(Vc,{asChild:!0,children:y.jsx(c,{className:J(Au({variant:t,size:r,className:e})),ref:s,...i})}),y.jsxs(va,{children:[y.jsxs(ei,{children:[y.jsx(ti,{children:u}),y.jsx(Zc,{children:f})]}),y.jsxs(Xc,{className:"flex justify-end gap-2 pt-4",children:[y.jsx(Kc,{asChild:!0,children:y.jsx(Ve,{variant:"outline",children:p})}),y.jsx(Kc,{asChild:!0,children:y.jsx(Ve,{onClick:g,children:d})})]})]})]})});Ve.displayName="Button";var jD="VisuallyHidden",yi=_.forwardRef((e,t)=>y.jsx(we.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));yi.displayName=jD;var LD=yi,[gi,mV]=hr("Tooltip",[fi]),mi=fi(),Ub="TooltipProvider",qD=700,Eu="tooltip.open",[BD,Tu]=gi(Ub),Gb=e=>{const{__scopeTooltip:t,delayDuration:r=qD,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=_.useState(!0),c=_.useRef(!1),u=_.useRef(0);return _.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),y.jsx(BD,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:_.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:o})};Gb.displayName=Ub;var bi="Tooltip",[FD,Aa]=gi(bi),Hb=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,c=Tu(bi,e.__scopeTooltip),u=mi(t),[f,l]=_.useState(null),d=Xt(),p=_.useRef(0),g=i??c.disableHoverableContent,v=s??c.delayDuration,h=_.useRef(!1),[b=!1,w]=cn({prop:n,defaultProp:a,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(Eu))):c.onClose(),o==null||o(P)}}),x=_.useMemo(()=>b?h.current?"delayed-open":"instant-open":"closed",[b]),O=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,w(!0)},[w]),m=_.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),S=_.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,w(!0),p.current=0},v)},[v,w]);return _.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),y.jsx(pu,{...u,children:y.jsx(FD,{scope:t,contentId:d,open:b,stateAttribute:x,trigger:f,onTriggerChange:l,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayed?S():O()},[c.isOpenDelayed,S,O]),onTriggerLeave:_.useCallback(()=>{g?m():(window.clearTimeout(p.current),p.current=0)},[m,g]),onOpen:O,onClose:m,disableHoverableContent:g,children:r})})};Hb.displayName=bi;var Cu="TooltipTrigger",Vb=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Aa(Cu,r),o=Tu(Cu,r),i=mi(r),s=_.useRef(null),c=je(t,s,a.onTriggerChange),u=_.useRef(!1),f=_.useRef(!1),l=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),y.jsx(_m,{asChild:!0,...i,children:y.jsx(we.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:c,onPointerMove:se(e.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:se(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:se(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:se(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:se(e.onBlur,a.onClose),onClick:se(e.onClick,a.onClose)})})});Vb.displayName=Cu;var Mu="TooltipPortal",[RD,zD]=gi(Mu,{forceMount:void 0}),Kb=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,o=Aa(Mu,t);return y.jsx(RD,{scope:t,forceMount:r,children:y.jsx(_t,{present:r||o.open,children:y.jsx(pa,{asChild:!0,container:a,children:n})})})};Kb.displayName=Mu;var gn="TooltipContent",Yb=_.forwardRef((e,t)=>{const r=zD(gn,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...o}=e,i=Aa(gn,e.__scopeTooltip);return y.jsx(_t,{present:n||i.open,children:i.disableHoverableContent?y.jsx(Xb,{side:a,...o,ref:t}):y.jsx(WD,{side:a,...o,ref:t})})}),WD=_.forwardRef((e,t)=>{const r=Aa(gn,e.__scopeTooltip),n=Tu(gn,e.__scopeTooltip),a=_.useRef(null),o=je(t,a),[i,s]=_.useState(null),{trigger:c,onClose:u}=r,f=a.current,{onPointerInTransitChange:l}=n,d=_.useCallback(()=>{s(null),l(!1)},[l]),p=_.useCallback((g,v)=>{const h=g.currentTarget,b={x:g.clientX,y:g.clientY},w=VD(b,h.getBoundingClientRect()),x=KD(b,w),O=YD(v.getBoundingClientRect()),m=ZD([...x,...O]);s(m),l(!0)},[l]);return _.useEffect(()=>()=>d(),[d]),_.useEffect(()=>{if(c&&f){const g=h=>p(h,f),v=h=>p(h,c);return c.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[c,f,p,d]),_.useEffect(()=>{if(i){const g=v=>{const h=v.target,b={x:v.clientX,y:v.clientY},w=(c==null?void 0:c.contains(h))||(f==null?void 0:f.contains(h)),x=!XD(b,i);w?d():x&&(d(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,f,i,u,d]),y.jsx(Xb,{...e,ref:o})}),[UD,GD]=gi(bi,{isInside:!1}),Xb=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,c=Aa(gn,r),u=mi(r),{onClose:f}=c;return _.useEffect(()=>(document.addEventListener(Eu,f),()=>document.removeEventListener(Eu,f)),[f]),_.useEffect(()=>{if(c.trigger){const l=d=>{const p=d.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),y.jsx(da,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:y.jsxs(Pm,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(ng,{children:n}),y.jsx(UD,{scope:r,isInside:!0,children:y.jsx(LD,{id:c.contentId,role:"tooltip",children:a||n})})]})})});Yb.displayName=gn;var Zb="TooltipArrow",HD=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=mi(r);return GD(Zb,r).isInside?null:y.jsx(Am,{...a,...n,ref:t})});HD.displayName=Zb;function VD(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,a,o)){case o:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function KD(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function YD(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function XD(e,t){const{x:r,y:n}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const s=t[o].x,c=t[o].y,u=t[i].x,f=t[i].y;c>n!=f>n&&r<(u-s)*(n-c)/(f-c)+s&&(a=!a)}return a}function ZD(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),QD(t)}function QD(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(a.y-i.y)>=(o.y-i.y)*(a.x-i.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var JD=Gb,ek=Hb,tk=Vb,rk=Kb,Qb=Yb;const mn=JD,bn=ek,wn=tk,Br=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(rk,{children:y.jsx(Qb,{ref:n,sideOffset:t,className:J("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",e),...r})}));Br.displayName=Qb.displayName;const wi=_.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...o},i)=>{const[s,c]=_.useState(!1),u=_.useRef(null),l=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),d=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",p=()=>{c(!0),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{c(!1)},3e3)};_.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const g=v=>{if(r){const h=v.target.value;let b=h;if(h.length>0){const w=h[h.length-1];/[^a-zA-Z0-9]/.test(w)&&(console.log("Non-alphanumeric detected:",w),p())}if(r==="phone"){const w=h.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=h.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let O=0;O<Math.min(w.length,6);O++){const m=w[O];O===0||O===2||O===4?/[A-Z]/.test(m)&&(x+=m):(O===1||O===3||O===5)&&/[0-9]/.test(m)&&(x+=m)}x.length<=3?b=x:b=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const w=h.replace(/\D/g,"");w.length<=5?b=w:b=`${w.slice(0,5)}-${w.slice(5,9)}`}v.target.value=b}n==null||n(v)};return y.jsx(mn,{children:y.jsxs(bn,{open:s&&!!r,children:[y.jsx(wn,{asChild:!0,children:y.jsx("input",{type:t,className:J("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:g,placeholder:l,ref:i,...o})}),y.jsx(Br,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:d()})]})})});wi.displayName="Input";var nk="Separator",Jb="horizontal",ak=["horizontal","vertical"],e0=_.forwardRef((e,t)=>{const{decorative:r,orientation:n=Jb,...a}=e,o=ok(n)?n:Jb,s=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return y.jsx(we.div,{"data-orientation":o,...s,...a,ref:t})});e0.displayName=nk;function ok(e){return ak.includes(e)}var t0=e0;const Nu=_.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>y.jsx(t0,{ref:a,decorative:r,orientation:t,className:J("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Nu.displayName=t0.displayName;const r0=Hc,ik=Hg,sk=Jo,n0=Vg,Iu=_.forwardRef(({className:e,...t},r)=>y.jsx(Yo,{className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Iu.displayName=Yo.displayName;const ck=Pa("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),$u=_.forwardRef(({side:e="right",className:t,children:r,...n},a)=>y.jsxs(n0,{children:[y.jsx(Iu,{}),y.jsxs(Xo,{ref:a,className:J(ck({side:e}),t),...n,children:[y.jsxs(Jo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[y.jsx(Sc,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));$u.displayName=Xo.displayName;const a0=({className:e,...t})=>y.jsx("div",{className:J("flex flex-col space-y-2 text-center sm:text-left",e),...t});a0.displayName="SheetHeader";const o0=({className:e,...t})=>y.jsx("div",{className:J("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});o0.displayName="SheetFooter";const i0=_.forwardRef(({className:e,...t},r)=>y.jsx(Zo,{ref:r,className:J("text-lg font-semibold text-foreground",e),...t}));i0.displayName=Zo.displayName;const s0=_.forwardRef(({className:e,...t},r)=>y.jsx(Qo,{ref:r,className:J("text-sm text-muted-foreground",e),...t}));s0.displayName=Qo.displayName;function uk({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[o,i]=A.useState(!1),s=()=>{i(!0)};return y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:o?y.jsx(Ve,{asChild:!0,size:"icon",onClick:e,children:y.jsx(WC,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):y.jsx(Ve,{asChild:!0,size:"icon",onClick:e,children:y.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:s})})}),y.jsxs("div",{className:"flex flex-1 flex-col",children:[y.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),y.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var lk="Label",c0=_.forwardRef((e,t)=>y.jsx(we.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));c0.displayName=lk;var fk=c0;function dk({className:e,...t}){return y.jsx(fk,{"data-slot":"label",className:J("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Du=1024;function u0(){const[e,t]=_.useState(void 0);return _.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Du-1}px)`),n=()=>{t(window.innerWidth<Du)};return r.addEventListener("change",n),t(window.innerWidth<Du),()=>r.removeEventListener("change",n)},[]),!!e}function le({className:e,...t}){return y.jsx("div",{className:J("animate-pulse rounded-md bg-primary/20",e),...t})}const pk="sidebar:state",hk=60*60*24*7,vk="16rem",yk="18rem",gk="3rem",mk="b",l0=_.createContext(null);function Ea(){const e=_.useContext(l0);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const ku=_.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:o,...i},s)=>{const c=u0(),[u,f]=_.useState(!1),[l,d]=_.useState(e),p=t??l,g=_.useCallback(w=>{const x=typeof w=="function"?w(p):w;r?r(x):d(x),document.cookie=`${pk}=${x}; path=/; max-age=${hk}`},[r,p]),v=_.useCallback(()=>c?f(w=>!w):g(w=>!w),[c,g,f]);_.useEffect(()=>{const w=x=>{x.key===mk&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),v())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[v]);const h=p?"expanded":"collapsed",b=_.useMemo(()=>({state:h,open:p,setOpen:g,isMobile:c,openMobile:u,setOpenMobile:f,toggleSidebar:v}),[h,p,g,c,u,f,v]);return y.jsx(l0.Provider,{value:b,children:y.jsx(mn,{delayDuration:0,children:y.jsx("div",{style:{"--sidebar-width":vk,"--sidebar-width-icon":gk,...a},className:J("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:s,...i,children:o})})})});ku.displayName="SidebarProvider";const ju=_.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...o},i)=>{const{isMobile:s,state:c,openMobile:u,setOpenMobile:f}=Ea();return r==="none"?y.jsx("div",{className:J("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...o,children:a}):s?y.jsx(r0,{open:u,onOpenChange:f,...o,children:y.jsx($u,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yk},side:e,children:y.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):y.jsxs("div",{ref:i,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?r:"","data-variant":t,"data-side":e,children:[y.jsx("div",{className:J("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),y.jsx("div",{className:J("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"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",n),...o,children:y.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:a})})]})});ju.displayName="Sidebar";const Lu=_.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=Ea();return y.jsxs(Ve,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:J("h-7 w-7 text-sidebar-foreground",e),onClick:o=>{t==null||t(o),a()},...r,children:[y.jsx(LC,{}),y.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Lu.displayName="SidebarTrigger";const f0=_.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=Ea();return y.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:J("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});f0.displayName="SidebarRail";const d0=_.forwardRef(({className:e,...t},r)=>y.jsx("main",{ref:r,className:J("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));d0.displayName="SidebarInset";const p0=_.forwardRef(({className:e,...t},r)=>y.jsx(wi,{ref:r,"data-sidebar":"input",className:J("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));p0.displayName="SidebarInput";const qu=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"header",className:J("flex flex-col gap-2 p-2",e),...t}));qu.displayName="SidebarHeader";const Bu=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"footer",className:J("flex flex-col gap-2 p-2",e),...t}));Bu.displayName="SidebarFooter";const h0=_.forwardRef(({className:e,...t},r)=>y.jsx(Nu,{ref:r,"data-sidebar":"separator",className:J("mx-2 w-auto bg-sidebar-border",e),...t}));h0.displayName="SidebarSeparator";const Fu=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"content",className:J("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Fu.displayName="SidebarContent";const v0=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group",className:J("relative flex w-full min-w-0 flex-col p-2",e),...t}));v0.displayName="SidebarGroup";const y0=_.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?pt:"div";return y.jsx(a,{ref:n,"data-sidebar":"group-label",className:J("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});y0.displayName="SidebarGroupLabel";const g0=_.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?pt:"button";return y.jsx(a,{ref:n,"data-sidebar":"group-action",className:J("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});g0.displayName="SidebarGroupAction";const m0=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group-content",className:J("w-full text-sm",e),...t}));m0.displayName="SidebarGroupContent";const Ru=_.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu",className:J("flex w-full min-w-0 flex-col gap-1",e),...t}));Ru.displayName="SidebarMenu";const zu=_.forwardRef(({className:e,...t},r)=>y.jsx("li",{ref:r,"data-sidebar":"menu-item",className:J("group/menu-item relative",e),...t}));zu.displayName="SidebarMenuItem";const bk=Pa("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] 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 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{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"}}),Wu=_.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:o,...i},s)=>{const c=e?pt:"button",{isMobile:u,state:f}=Ea(),l=y.jsx(c,{ref:s,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:J(bk({variant:r,size:n}),o),...i});return a?(typeof a=="string"&&(a={children:a}),y.jsxs(bn,{children:[y.jsx(wn,{asChild:!0,children:l}),y.jsx(Br,{side:"right",align:"center",hidden:f!=="collapsed"||u,...a})]})):l});Wu.displayName="SidebarMenuButton";const b0=_.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const o=t?pt:"button";return y.jsx(o,{ref:a,"data-sidebar":"menu-action",className:J("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});b0.displayName="SidebarMenuAction";const w0=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:J("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));w0.displayName="SidebarMenuBadge";const x0=_.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=_.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return y.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:J("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&y.jsx(le,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),y.jsx(le,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});x0.displayName="SidebarMenuSkeleton";const S0=_.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:J("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));S0.displayName="SidebarMenuSub";const O0=_.forwardRef(({...e},t)=>y.jsx("li",{ref:t,...e}));O0.displayName="SidebarMenuSubItem";const _0=_.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},o)=>{const i=e?pt:"a";return y.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:J("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})});_0.displayName="SidebarMenuSubButton";var Uu="ToastProvider",[Gu,wk,xk]=Qc("Toast"),[P0,bV]=hr("Toast",[xk]),[Sk,xi]=P0(Uu),A0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:i}=e,[s,c]=_.useState(null),[u,f]=_.useState(0),l=_.useRef(!1),d=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Uu}\`. Expected non-empty \`string\`.`),y.jsx(Gu.Provider,{scope:t,children:y.jsx(Sk,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:o,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:_.useCallback(()=>f(p=>p+1),[]),onToastRemove:_.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:i})})};A0.displayName=Uu;var E0="ToastViewport",Ok=["F8"],Hu="toast.viewportPause",Vu="toast.viewportResume",T0=_.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Ok,label:a="Notifications ({hotkey})",...o}=e,i=xi(E0,r),s=wk(r),c=_.useRef(null),u=_.useRef(null),f=_.useRef(null),l=_.useRef(null),d=je(t,l,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;_.useEffect(()=>{const h=b=>{var x;n.length!==0&&n.every(O=>b[O]||b.code===O)&&((x=l.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n]),_.useEffect(()=>{const h=c.current,b=l.current;if(g&&h&&b){const w=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Hu);b.dispatchEvent(S),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Vu);b.dispatchEvent(S),i.isClosePausedRef.current=!1}},O=S=>{!h.contains(S.relatedTarget)&&x()},m=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",w),h.addEventListener("focusout",O),h.addEventListener("pointermove",w),h.addEventListener("pointerleave",m),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",w),h.removeEventListener("focusout",O),h.removeEventListener("pointermove",w),h.removeEventListener("pointerleave",m),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[g,i.isClosePausedRef]);const v=_.useCallback(({tabbingDirection:h})=>{const w=s().map(x=>{const O=x.ref.current,m=[O,...jk(O)];return h==="forwards"?m:m.reverse()});return(h==="forwards"?w.reverse():w).flat()},[s]);return _.useEffect(()=>{const h=l.current;if(h){const b=w=>{var m,S,P;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const E=document.activeElement,T=w.shiftKey;if(w.target===h&&T){(m=u.current)==null||m.focus();return}const M=v({tabbingDirection:T?"backwards":"forwards"}),N=M.findIndex(I=>I===E);Xu(M.slice(N+1))?w.preventDefault():T?(S=u.current)==null||S.focus():(P=f.current)==null||P.focus()}};return h.addEventListener("keydown",b),()=>h.removeEventListener("keydown",b)}},[s,v]),y.jsxs(ZM,{ref:c,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&y.jsx(Ku,{ref:u,onFocusFromOutsideViewport:()=>{const h=v({tabbingDirection:"forwards"});Xu(h)}}),y.jsx(Gu.Slot,{scope:r,children:y.jsx(we.ol,{tabIndex:-1,...o,ref:d})}),g&&y.jsx(Ku,{ref:f,onFocusFromOutsideViewport:()=>{const h=v({tabbingDirection:"backwards"});Xu(h)}})]})});T0.displayName=E0;var C0="ToastFocusProxy",Ku=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,o=xi(C0,r);return y.jsx(yi,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const s=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(s))&&n()}})});Ku.displayName=C0;var Si="Toast",_k="toast.swipeStart",Pk="toast.swipeMove",Ak="toast.swipeCancel",Ek="toast.swipeEnd",M0=_.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:o,...i}=e,[s=!0,c]=cn({prop:n,defaultProp:a,onChange:o});return y.jsx(_t,{present:r||s,children:y.jsx(Mk,{open:s,...i,ref:t,onClose:()=>c(!1),onPause:Xe(e.onPause),onResume:Xe(e.onResume),onSwipeStart:se(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:se(e.onSwipeMove,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:se(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:se(e.onSwipeEnd,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),c(!1)})})})});M0.displayName=Si;var[Tk,Ck]=P0(Si,{onClose(){}}),Mk=_.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:o,onClose:i,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:p,...g}=e,v=xi(Si,r),[h,b]=_.useState(null),w=je(t,I=>b(I)),x=_.useRef(null),O=_.useRef(null),m=a||v.duration,S=_.useRef(0),P=_.useRef(m),E=_.useRef(0),{onToastAdd:T,onToastRemove:k}=v,C=Xe(()=>{var L;(h==null?void 0:h.contains(document.activeElement))&&((L=v.viewport)==null||L.focus()),i()}),M=_.useCallback(I=>{!I||I===1/0||(window.clearTimeout(E.current),S.current=new Date().getTime(),E.current=window.setTimeout(C,I))},[C]);_.useEffect(()=>{const I=v.viewport;if(I){const L=()=>{M(P.current),u==null||u()},$=()=>{const R=new Date().getTime()-S.current;P.current=P.current-R,window.clearTimeout(E.current),c==null||c()};return I.addEventListener(Hu,$),I.addEventListener(Vu,L),()=>{I.removeEventListener(Hu,$),I.removeEventListener(Vu,L)}}},[v.viewport,m,c,u,M]),_.useEffect(()=>{o&&!v.isClosePausedRef.current&&M(m)},[o,m,v.isClosePausedRef,M]),_.useEffect(()=>(T(),()=>k()),[T,k]);const N=_.useMemo(()=>h?L0(h):null,[h]);return v.viewport?y.jsxs(y.Fragment,{children:[N&&y.jsx(Nk,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:N}),y.jsx(Tk,{scope:r,onClose:C,children:wc.createPortal(y.jsx(Gu.ItemSlot,{scope:r,children:y.jsx(XM,{asChild:!0,onEscapeKeyDown:se(s,()=>{v.isFocusedToastEscapeKeyDownRef.current||C(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...g,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:se(e.onKeyDown,I=>{I.key==="Escape"&&(s==null||s(I.nativeEvent),I.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:se(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:se(e.onPointerMove,I=>{if(!x.current)return;const L=I.clientX-x.current.x,$=I.clientY-x.current.y,R=!!O.current,B=["left","right"].includes(v.swipeDirection),q=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,j=B?q(0,L):0,F=B?0:q(0,$),W=I.pointerType==="touch"?10:2,V={x:j,y:F},Y={originalEvent:I,delta:V};R?(O.current=V,Oi(Pk,l,Y,{discrete:!1})):q0(V,v.swipeDirection,W)?(O.current=V,Oi(_k,f,Y,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(L)>W||Math.abs($)>W)&&(x.current=null)}),onPointerUp:se(e.onPointerUp,I=>{const L=O.current,$=I.target;if($.hasPointerCapture(I.pointerId)&&$.releasePointerCapture(I.pointerId),O.current=null,x.current=null,L){const R=I.currentTarget,B={originalEvent:I,delta:L};q0(L,v.swipeDirection,v.swipeThreshold)?Oi(Ek,p,B,{discrete:!0}):Oi(Ak,d,B,{discrete:!0}),R.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),Nk=e=>{const{__scopeToast:t,children:r,...n}=e,a=xi(Si,t),[o,i]=_.useState(!1),[s,c]=_.useState(!1);return Dk(()=>i(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:y.jsx(pa,{asChild:!0,children:y.jsx(yi,{...n,children:o&&y.jsxs(y.Fragment,{children:[a.label," ",r]})})})},Ik="ToastTitle",N0=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return y.jsx(we.div,{...n,ref:t})});N0.displayName=Ik;var $k="ToastDescription",I0=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return y.jsx(we.div,{...n,ref:t})});I0.displayName=$k;var $0="ToastAction",D0=_.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?y.jsx(j0,{altText:r,asChild:!0,children:y.jsx(Yu,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$0}\`. Expected non-empty \`string\`.`),null)});D0.displayName=$0;var k0="ToastClose",Yu=_.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=Ck(k0,r);return y.jsx(j0,{asChild:!0,children:y.jsx(we.button,{type:"button",...n,ref:t,onClick:se(e.onClick,a.onClose)})})});Yu.displayName=k0;var j0=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return y.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function L0(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),kk(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...L0(n))}}),t}function Oi(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Mc(a,o):a.dispatchEvent(o)}var q0=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),o=n>a;return t==="left"||t==="right"?o&&n>r:!o&&a>r};function Dk(e=()=>{}){const t=Xe(e);vr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function kk(e){return e.nodeType===e.ELEMENT_NODE}function jk(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Xu(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Lk=A0,B0=T0,F0=M0,R0=N0,z0=I0,W0=D0,U0=Yu;const G0=Lk,Zu=_.forwardRef(({className:e,...t},r)=>y.jsx(B0,{ref:r,className:J("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Zu.displayName=B0.displayName;const qk=Pa("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Qu=_.forwardRef(({className:e,variant:t,...r},n)=>y.jsx(F0,{ref:n,className:J(qk({variant:t}),e),...r}));Qu.displayName=F0.displayName;const H0=_.forwardRef(({className:e,...t},r)=>y.jsx(W0,{ref:r,className:J("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));H0.displayName=W0.displayName;const Ju=_.forwardRef(({className:e,...t},r)=>y.jsx(U0,{ref:r,className:J("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:y.jsx(Sc,{className:"h-4 w-4"})}));Ju.displayName=U0.displayName;const el=_.forwardRef(({className:e,...t},r)=>y.jsx(R0,{ref:r,className:J("text-sm font-semibold [&+div]:text-xs",e),...t}));el.displayName=R0.displayName;const tl=_.forwardRef(({className:e,...t},r)=>y.jsx(z0,{ref:r,className:J("text-sm opacity-90",e),...t}));tl.displayName=z0.displayName;const Bk=1,Fk=1e6;let rl=0;function Rk(){return rl=(rl+1)%Number.MAX_SAFE_INTEGER,rl.toString()}const nl=new Map,V0=e=>{if(nl.has(e))return;const t=setTimeout(()=>{nl.delete(e),Ta({type:"REMOVE_TOAST",toastId:e})},Fk);nl.set(e,t)},zk=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Bk)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?V0(r):e.toasts.forEach(n=>V0(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},_i=[];let Pi={toasts:[]};function Ta(e){Pi=zk(Pi,e),_i.forEach(t=>t(Pi))}function K0({...e}){const t=Rk(),r=a=>Ta({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Ta({type:"DISMISS_TOAST",toastId:t});return Ta({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function al(){const[e,t]=_.useState(Pi);return _.useEffect(()=>(_i.push(t),()=>{const r=_i.indexOf(t);r>-1&&_i.splice(r,1)}),[]),{...e,toast:K0,dismiss:r=>Ta({type:"DISMISS_TOAST",toastId:r})}}function Y0(){const{toasts:e}=al();return y.jsxs(G0,{children:[e.map(function({id:t,title:r,description:n,action:a,...o}){return y.jsxs(Qu,{...o,children:[y.jsxs("div",{className:"grid gap-1",children:[r&&y.jsx(el,{children:r}),n&&y.jsx(tl,{children:n})]}),a,y.jsx(Ju,{})]},t)}),y.jsx(Zu,{})]})}var Ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ol,X0;function nt(){if(X0)return ol;X0=1;var e=Array.isArray;return ol=e,ol}var il,Z0;function Q0(){if(Z0)return il;Z0=1;var e=typeof Ai=="object"&&Ai&&Ai.Object===Object&&Ai;return il=e,il}var sl,J0;function zt(){if(J0)return sl;J0=1;var e=Q0(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return sl=r,sl}var cl,ew;function Ca(){if(ew)return cl;ew=1;var e=zt(),t=e.Symbol;return cl=t,cl}var ul,tw;function Wk(){if(tw)return ul;tw=1;var e=Ca(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function o(i){var s=r.call(i,a),c=i[a];try{i[a]=void 0;var u=!0}catch{}var f=n.call(i);return u&&(s?i[a]=c:delete i[a]),f}return ul=o,ul}var ll,rw;function Uk(){if(rw)return ll;rw=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return ll=r,ll}var fl,nw;function Jt(){if(nw)return fl;nw=1;var e=Ca(),t=Wk(),r=Uk(),n="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function i(s){return s==null?s===void 0?a:n:o&&o in Object(s)?t(s):r(s)}return fl=i,fl}var dl,aw;function er(){if(aw)return dl;aw=1;function e(t){return t!=null&&typeof t=="object"}return dl=e,dl}var pl,ow;function xn(){if(ow)return pl;ow=1;var e=Jt(),t=er(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return pl=n,pl}var hl,iw;function vl(){if(iw)return hl;iw=1;var e=nt(),t=xn(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(o,i){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||i!=null&&o in Object(i)}return hl=a,hl}var yl,sw;function xr(){if(sw)return yl;sw=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return yl=e,yl}var gl,cw;function ml(){if(cw)return gl;cw=1;var e=Jt(),t=xr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function i(s){if(!t(s))return!1;var c=e(s);return c==n||c==a||c==r||c==o}return gl=i,gl}var bl,uw;function Gk(){if(uw)return bl;uw=1;var e=zt(),t=e["__core-js_shared__"];return bl=t,bl}var wl,lw;function Hk(){if(lw)return wl;lw=1;var e=Gk(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return wl=r,wl}var xl,fw;function dw(){if(fw)return xl;fw=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return xl=r,xl}var Sl,pw;function Vk(){if(pw)return Sl;pw=1;var e=ml(),t=Hk(),r=xr(),n=dw(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,i=Function.prototype,s=Object.prototype,c=i.toString,u=s.hasOwnProperty,f=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!r(d)||t(d))return!1;var p=e(d)?f:o;return p.test(n(d))}return Sl=l,Sl}var Ol,hw;function Kk(){if(hw)return Ol;hw=1;function e(t,r){return t==null?void 0:t[r]}return Ol=e,Ol}var _l,vw;function Fr(){if(vw)return _l;vw=1;var e=Vk(),t=Kk();function r(n,a){var o=t(n,a);return e(o)?o:void 0}return _l=r,_l}var Pl,yw;function Ei(){if(yw)return Pl;yw=1;var e=Fr(),t=e(Object,"create");return Pl=t,Pl}var Al,gw;function Yk(){if(gw)return Al;gw=1;var e=Ei();function t(){this.__data__=e?e(null):{},this.size=0}return Al=t,Al}var El,mw;function Xk(){if(mw)return El;mw=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return El=e,El}var Tl,bw;function Zk(){if(bw)return Tl;bw=1;var e=Ei(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(o){var i=this.__data__;if(e){var s=i[o];return s===t?void 0:s}return n.call(i,o)?i[o]:void 0}return Tl=a,Tl}var Cl,ww;function Qk(){if(ww)return Cl;ww=1;var e=Ei(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var o=this.__data__;return e?o[a]!==void 0:r.call(o,a)}return Cl=n,Cl}var Ml,xw;function Jk(){if(xw)return Ml;xw=1;var e=Ei(),t="__lodash_hash_undefined__";function r(n,a){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&a===void 0?t:a,this}return Ml=r,Ml}var Nl,Sw;function ej(){if(Sw)return Nl;Sw=1;var e=Yk(),t=Xk(),r=Zk(),n=Qk(),a=Jk();function o(i){var s=-1,c=i==null?0:i.length;for(this.clear();++s<c;){var u=i[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=a,Nl=o,Nl}var Il,Ow;function tj(){if(Ow)return Il;Ow=1;function e(){this.__data__=[],this.size=0}return Il=e,Il}var $l,_w;function Dl(){if(_w)return $l;_w=1;function e(t,r){return t===r||t!==t&&r!==r}return $l=e,$l}var kl,Pw;function Ti(){if(Pw)return kl;Pw=1;var e=Dl();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return kl=t,kl}var jl,Aw;function rj(){if(Aw)return jl;Aw=1;var e=Ti(),t=Array.prototype,r=t.splice;function n(a){var o=this.__data__,i=e(o,a);if(i<0)return!1;var s=o.length-1;return i==s?o.pop():r.call(o,i,1),--this.size,!0}return jl=n,jl}var Ll,Ew;function nj(){if(Ew)return Ll;Ew=1;var e=Ti();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Ll=t,Ll}var ql,Tw;function aj(){if(Tw)return ql;Tw=1;var e=Ti();function t(r){return e(this.__data__,r)>-1}return ql=t,ql}var Bl,Cw;function oj(){if(Cw)return Bl;Cw=1;var e=Ti();function t(r,n){var a=this.__data__,o=e(a,r);return o<0?(++this.size,a.push([r,n])):a[o][1]=n,this}return Bl=t,Bl}var Fl,Mw;function Ci(){if(Mw)return Fl;Mw=1;var e=tj(),t=rj(),r=nj(),n=aj(),a=oj();function o(i){var s=-1,c=i==null?0:i.length;for(this.clear();++s<c;){var u=i[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=a,Fl=o,Fl}var Rl,Nw;function zl(){if(Nw)return Rl;Nw=1;var e=Fr(),t=zt(),r=e(t,"Map");return Rl=r,Rl}var Wl,Iw;function ij(){if(Iw)return Wl;Iw=1;var e=ej(),t=Ci(),r=zl();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Wl=n,Wl}var Ul,$w;function sj(){if($w)return Ul;$w=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Ul=e,Ul}var Gl,Dw;function Mi(){if(Dw)return Gl;Dw=1;var e=sj();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return Gl=t,Gl}var Hl,kw;function cj(){if(kw)return Hl;kw=1;var e=Mi();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Hl=t,Hl}var Vl,jw;function uj(){if(jw)return Vl;jw=1;var e=Mi();function t(r){return e(this,r).get(r)}return Vl=t,Vl}var Kl,Lw;function lj(){if(Lw)return Kl;Lw=1;var e=Mi();function t(r){return e(this,r).has(r)}return Kl=t,Kl}var Yl,qw;function fj(){if(qw)return Yl;qw=1;var e=Mi();function t(r,n){var a=e(this,r),o=a.size;return a.set(r,n),this.size+=a.size==o?0:1,this}return Yl=t,Yl}var Xl,Bw;function Zl(){if(Bw)return Xl;Bw=1;var e=ij(),t=cj(),r=uj(),n=lj(),a=fj();function o(i){var s=-1,c=i==null?0:i.length;for(this.clear();++s<c;){var u=i[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=a,Xl=o,Xl}var Ql,Fw;function Rw(){if(Fw)return Ql;Fw=1;var e=Zl(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var o=function(){var i=arguments,s=a?a.apply(this,i):i[0],c=o.cache;if(c.has(s))return c.get(s);var u=n.apply(this,i);return o.cache=c.set(s,u)||c,u};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ql=r,Ql}var Jl,zw;function dj(){if(zw)return Jl;zw=1;var e=Rw(),t=500;function r(n){var a=e(n,function(i){return o.size===t&&o.clear(),i}),o=a.cache;return a}return Jl=r,Jl}var ef,Ww;function pj(){if(Ww)return ef;Ww=1;var e=dj(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var o=[];return a.charCodeAt(0)===46&&o.push(""),a.replace(t,function(i,s,c,u){o.push(c?u.replace(r,"$1"):s||i)}),o});return ef=n,ef}var tf,Uw;function rf(){if(Uw)return tf;Uw=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,o=Array(a);++n<a;)o[n]=r(t[n],n,t);return o}return tf=e,tf}var nf,Gw;function hj(){if(Gw)return nf;Gw=1;var e=Ca(),t=rf(),r=nt(),n=xn(),a=e?e.prototype:void 0,o=a?a.toString:void 0;function i(s){if(typeof s=="string")return s;if(r(s))return t(s,i)+"";if(n(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return nf=i,nf}var af,Hw;function Vw(){if(Hw)return af;Hw=1;var e=hj();function t(r){return r==null?"":e(r)}return af=t,af}var of,Kw;function Yw(){if(Kw)return of;Kw=1;var e=nt(),t=vl(),r=pj(),n=Vw();function a(o,i){return e(o)?o:t(o,i)?[o]:r(n(o))}return of=a,of}var sf,Xw;function Ni(){if(Xw)return sf;Xw=1;var e=xn();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return sf=t,sf}var cf,Zw;function uf(){if(Zw)return cf;Zw=1;var e=Yw(),t=Ni();function r(n,a){a=e(a,n);for(var o=0,i=a.length;n!=null&&o<i;)n=n[t(a[o++])];return o&&o==i?n:void 0}return cf=r,cf}var lf,Qw;function Jw(){if(Qw)return lf;Qw=1;var e=uf();function t(r,n,a){var o=r==null?void 0:e(r,n);return o===void 0?a:o}return lf=t,lf}var vj=Jw();const vt=Te(vj);var ff,ex;function yj(){if(ex)return ff;ex=1;function e(t){return t==null}return ff=e,ff}var gj=yj();const ve=Te(gj);var df,tx;function mj(){if(tx)return df;tx=1;var e=Jt(),t=nt(),r=er(),n="[object String]";function a(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return df=a,df}var bj=mj();const Ma=Te(bj);var wj=ml();const de=Te(wj);var xj=xr();const Sn=Te(xj);var Ii={exports:{}},xe={};/**
|
|
195
|
+
* @license React
|
|
196
|
+
* react-is.production.min.js
|
|
197
|
+
*
|
|
198
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the MIT license found in the
|
|
201
|
+
* LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/var rx;function Sj(){if(rx)return xe;rx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function v(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case e:switch(h=h.type,h){case r:case a:case n:case u:case f:return h;default:switch(h=h&&h.$$typeof,h){case s:case i:case c:case d:case l:case o:return h;default:return b}}case t:return b}}}return xe.ContextConsumer=i,xe.ContextProvider=o,xe.Element=e,xe.ForwardRef=c,xe.Fragment=r,xe.Lazy=d,xe.Memo=l,xe.Portal=t,xe.Profiler=a,xe.StrictMode=n,xe.Suspense=u,xe.SuspenseList=f,xe.isAsyncMode=function(){return!1},xe.isConcurrentMode=function(){return!1},xe.isContextConsumer=function(h){return v(h)===i},xe.isContextProvider=function(h){return v(h)===o},xe.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},xe.isForwardRef=function(h){return v(h)===c},xe.isFragment=function(h){return v(h)===r},xe.isLazy=function(h){return v(h)===d},xe.isMemo=function(h){return v(h)===l},xe.isPortal=function(h){return v(h)===t},xe.isProfiler=function(h){return v(h)===a},xe.isStrictMode=function(h){return v(h)===n},xe.isSuspense=function(h){return v(h)===u},xe.isSuspenseList=function(h){return v(h)===f},xe.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===a||h===n||h===u||h===f||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===l||h.$$typeof===o||h.$$typeof===i||h.$$typeof===c||h.$$typeof===g||h.getModuleId!==void 0)},xe.typeOf=v,xe}var Se={};/**
|
|
203
|
+
* @license React
|
|
204
|
+
* react-is.development.js
|
|
205
|
+
*
|
|
206
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the MIT license found in the
|
|
209
|
+
* LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/var nx;function Oj(){return nx||(nx=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=!1,v=!1,h=!1,b=!1,w=!1,x;x=Symbol.for("react.module.reference");function O(z){return!!(typeof z=="string"||typeof z=="function"||z===r||z===a||w||z===n||z===u||z===f||b||z===p||g||v||h||typeof z=="object"&&z!==null&&(z.$$typeof===d||z.$$typeof===l||z.$$typeof===o||z.$$typeof===i||z.$$typeof===c||z.$$typeof===x||z.getModuleId!==void 0))}function m(z){if(typeof z=="object"&&z!==null){var te=z.$$typeof;switch(te){case e:var fe=z.type;switch(fe){case r:case a:case n:case u:case f:return fe;default:var be=fe&&fe.$$typeof;switch(be){case s:case i:case c:case d:case l:case o:return be;default:return te}}case t:return te}}}var S=i,P=o,E=e,T=c,k=r,C=d,M=l,N=t,I=a,L=n,$=u,R=f,B=!1,q=!1;function j(z){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(z){return q||(q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(z){return m(z)===i}function V(z){return m(z)===o}function Y(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function Q(z){return m(z)===c}function ee(z){return m(z)===r}function re(z){return m(z)===d}function ie(z){return m(z)===l}function G(z){return m(z)===t}function X(z){return m(z)===a}function K(z){return m(z)===n}function D(z){return m(z)===u}function ue(z){return m(z)===f}Se.ContextConsumer=S,Se.ContextProvider=P,Se.Element=E,Se.ForwardRef=T,Se.Fragment=k,Se.Lazy=C,Se.Memo=M,Se.Portal=N,Se.Profiler=I,Se.StrictMode=L,Se.Suspense=$,Se.SuspenseList=R,Se.isAsyncMode=j,Se.isConcurrentMode=F,Se.isContextConsumer=W,Se.isContextProvider=V,Se.isElement=Y,Se.isForwardRef=Q,Se.isFragment=ee,Se.isLazy=re,Se.isMemo=ie,Se.isPortal=G,Se.isProfiler=X,Se.isStrictMode=K,Se.isSuspense=D,Se.isSuspenseList=ue,Se.isValidElementType=O,Se.typeOf=m}()),Se}var ax;function _j(){return ax||(ax=1,process.env.NODE_ENV==="production"?Ii.exports=Sj():Ii.exports=Oj()),Ii.exports}var Pj=_j(),pf,ox;function ix(){if(ox)return pf;ox=1;var e=Jt(),t=er(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return pf=n,pf}var hf,sx;function Aj(){if(sx)return hf;sx=1;var e=ix();function t(r){return e(r)&&r!=+r}return hf=t,hf}var Ej=Aj();const On=Te(Ej);var Tj=ix();const Cj=Te(Tj);var Tt=function(t){return t===0?0:t>0?1:-1},Rr=function(t){return Ma(t)&&t.indexOf("%")===t.length-1},Z=function(t){return Cj(t)&&!On(t)},Fe=function(t){return Z(t)||Ma(t)},Mj=0,Na=function(t){var r=++Mj;return"".concat(t||"").concat(r)},zr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Z(t)&&!Ma(t))return n;var o;if(Rr(t)){var i=t.indexOf("%");o=r*parseFloat(t.slice(0,i))/100}else o=+t;return On(o)&&(o=n),a&&o>r&&(o=r),o},Sr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Nj=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},yt=function(t,r){return Z(t)&&Z(r)?function(n){return t+n*(r-t)}:function(){return r}};function $i(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):vt(n,t))===r})}function _n(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}var Ij=["viewBox","children"],$j=["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"],cx=["points","pathLength"],yf={svg:Ij,polygon:cx,polyline:cx},gf=["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"],Di=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(A.isValidElement(t)&&(n=t.props),!Sn(n))return null;var a={};return Object.keys(n).forEach(function(o){gf.includes(o)&&(a[o]=r||function(i){return n[o](n,i)})}),a},Dj=function(t,r,n){return function(a){return t(r,n,a),null}},ki=function(t,r,n){if(!Sn(t)||vf(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var i=t[o];gf.includes(o)&&typeof i=="function"&&(a||(a={}),a[o]=Dj(i,r,n))}),a},kj=["children"],jj=["children"];function ux(e,t){if(e==null)return{};var r=Lj(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lj(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mf(e){"@babel/helpers - typeof";return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}var lx={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},tr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},fx=null,bf=null,wf=function e(t){if(t===fx&&Array.isArray(bf))return bf;var r=[];return A.Children.forEach(t,function(n){ve(n)||(Pj.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),bf=r,fx=t,r};function Ct(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return tr(a)}):n=[tr(t)],wf(e).forEach(function(a){var o=vt(a,"type.displayName")||vt(a,"type.name");n.indexOf(o)!==-1&&r.push(a)}),r}function ct(e,t){var r=Ct(e,t);return r&&r[0]}var dx=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Z(n)||n<=0||!Z(a)||a<=0)},qj=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Bj=function(t){return t&&t.type&&Ma(t.type)&&qj.indexOf(t.type)>=0},Fj=function(t){return t&&mf(t)==="object"&&"clipDot"in t},Rj=function(t,r,n,a){var o,i=(o=yf==null?void 0:yf[a])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!de(t)&&(a&&i.includes(r)||$j.includes(r))||n&&gf.includes(r)},pe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Sn(a))return null;var o={};return Object.keys(a).forEach(function(i){var s;Rj((s=a)===null||s===void 0?void 0:s[i],i,r,n)&&(o[i]=a[i])}),o},xf=function e(t,r){if(t===r)return!0;var n=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return px(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var o=t[a],i=r[a];if(Array.isArray(o)||Array.isArray(i)){if(!e(o,i))return!1}else if(!px(o,i))return!1}return!0},px=function(t,r){if(ve(t)&&ve(r))return!0;if(!ve(t)&&!ve(r)){var n=t.props||{},a=n.children,o=ux(n,kj),i=r.props||{},s=i.children,c=ux(i,jj);return a&&s?_n(o,c)&&xf(a,s):!a&&!s?_n(o,c):!1}return!1},hx=function(t,r){var n=[],a={};return wf(t).forEach(function(o,i){if(Bj(o))n.push(o);else if(o){var s=tr(o.type),c=r[s]||{},u=c.handler,f=c.once;if(u&&(!f||!a[s])){var l=u(o,s,i);n.push(l),a[s]=!0}}}),n},zj=function(t){var r=t&&t.type;return r&&lx[r]?lx[r]:null},Wj=function(t,r){return wf(r).indexOf(t)},Uj=["children","width","height","viewBox","className","style","title","desc"];function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sf.apply(this,arguments)}function Gj(e,t){if(e==null)return{};var r=Hj(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hj(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Of(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,o=e.className,i=e.style,s=e.title,c=e.desc,u=Gj(e,Uj),f=a||{width:r,height:n,x:0,y:0},l=ge("recharts-surface",o);return A.createElement("svg",Sf({},pe(u,!0,"svg"),{className:l,width:r,height:n,style:i,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),A.createElement("title",null,s),A.createElement("desc",null,c),t)}var Vj=["children","className"];function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_f.apply(this,arguments)}function Kj(e,t){if(e==null)return{};var r=Yj(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Yj(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ie=A.forwardRef(function(e,t){var r=e.children,n=e.className,a=Kj(e,Vj),o=ge("recharts-layer",n);return A.createElement("g",_f({className:o},pe(a,!0),{ref:t}),r)}),Xj=process.env.NODE_ENV!=="production",rr=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(Xj&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(r.replace(/%s/g,function(){return a[i++]}))}},Pf,vx;function Zj(){if(vx)return Pf;vx=1;function e(t,r,n){var a=-1,o=t.length;r<0&&(r=-r>o?0:o+r),n=n>o?o:n,n<0&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var i=Array(o);++a<o;)i[a]=t[a+r];return i}return Pf=e,Pf}var Af,yx;function Qj(){if(yx)return Af;yx=1;var e=Zj();function t(r,n,a){var o=r.length;return a=a===void 0?o:a,!n&&a>=o?r:e(r,n,a)}return Af=t,Af}var Ef,gx;function mx(){if(gx)return Ef;gx=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,o="\\ufe0e\\ufe0f",i="\\u200d",s=RegExp("["+i+e+a+o+"]");function c(u){return s.test(u)}return Ef=c,Ef}var Tf,bx;function Jj(){if(bx)return Tf;bx=1;function e(t){return t.split("")}return Tf=e,Tf}var Cf,wx;function e2(){if(wx)return Cf;wx=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,o="\\ufe0e\\ufe0f",i="["+e+"]",s="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",f="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",v="["+o+"]?",h="(?:"+p+"(?:"+[f,l,d].join("|")+")"+v+g+")*",b=v+g+h,w="(?:"+[f+s+"?",s,l,d,i].join("|")+")",x=RegExp(c+"(?="+c+")|"+w+b,"g");function O(m){return m.match(x)||[]}return Cf=O,Cf}var Mf,xx;function t2(){if(xx)return Mf;xx=1;var e=Jj(),t=mx(),r=e2();function n(a){return t(a)?r(a):e(a)}return Mf=n,Mf}var Nf,Sx;function r2(){if(Sx)return Nf;Sx=1;var e=Qj(),t=mx(),r=t2(),n=Vw();function a(o){return function(i){i=n(i);var s=t(i)?r(i):void 0,c=s?s[0]:i.charAt(0),u=s?e(s,1).join(""):i.slice(1);return c[o]()+u}}return Nf=a,Nf}var If,Ox;function n2(){if(Ox)return If;Ox=1;var e=r2(),t=e("toUpperCase");return If=t,If}var a2=n2();const ji=Te(a2);function Ce(e){return function(){return e}}const _x=Math.cos,Li=Math.sin,Mt=Math.sqrt,qi=Math.PI,Bi=2*qi,$f=Math.PI,Df=2*$f,Wr=1e-6,o2=Df-Wr;function Px(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function i2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Px;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class s2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Px:i2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,i){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+i}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let i=this._x1,s=this._y1,c=n-t,u=a-r,f=i-t,l=s-r,d=f*f+l*l;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Wr)if(!(Math.abs(l*c-u*f)>Wr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-i,g=a-s,v=c*c+u*u,h=p*p+g*g,b=Math.sqrt(v),w=Math.sqrt(d),x=o*Math.tan(($f-Math.acos((v+d-h)/(2*b*w)))/2),O=x/w,m=x/b;Math.abs(O-1)>Wr&&this._append`L${t+O*f},${r+O*l}`,this._append`A${o},${o},0,0,${+(l*p>f*g)},${this._x1=t+m*c},${this._y1=r+m*u}`}}arc(t,r,n,a,o,i){if(t=+t,r=+r,n=+n,i=!!i,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),c=n*Math.sin(a),u=t+s,f=r+c,l=1^i,d=i?a-o:o-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Wr||Math.abs(this._y1-f)>Wr)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%Df+Df),d>o2?this._append`A${n},${n},0,1,${l},${t-s},${r-c}A${n},${n},0,1,${l},${this._x1=u},${this._y1=f}`:d>Wr&&this._append`A${n},${n},0,${+(d>=$f)},${l},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function kf(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new s2(t)}function jf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ax(e){this._context=e}Ax.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Fi(e){return new Ax(e)}function Ex(e){return e[0]}function Tx(e){return e[1]}function Cx(e,t){var r=Ce(!0),n=null,a=Fi,o=null,i=kf(s);e=typeof e=="function"?e:e===void 0?Ex:Ce(e),t=typeof t=="function"?t:t===void 0?Tx:Ce(t);function s(c){var u,f=(c=jf(c)).length,l,d=!1,p;for(n==null&&(o=a(p=i())),u=0;u<=f;++u)!(u<f&&r(l=c[u],u,c))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,u,c),+t(l,u,c));if(p)return o=null,p+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ce(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ce(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Ce(!!c),s):r},s.curve=function(c){return arguments.length?(a=c,n!=null&&(o=a(n)),s):a},s.context=function(c){return arguments.length?(c==null?n=o=null:o=a(n=c),s):n},s}function Ri(e,t,r){var n=null,a=Ce(!0),o=null,i=Fi,s=null,c=kf(u);e=typeof e=="function"?e:e===void 0?Ex:Ce(+e),t=typeof t=="function"?t:Ce(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Tx:Ce(+r);function u(l){var d,p,g,v=(l=jf(l)).length,h,b=!1,w,x=new Array(v),O=new Array(v);for(o==null&&(s=i(w=c())),d=0;d<=v;++d){if(!(d<v&&a(h=l[d],d,l))===b)if(b=!b)p=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=d-1;g>=p;--g)s.point(x[g],O[g]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(h,d,l),O[d]=+t(h,d,l),s.point(n?+n(h,d,l):x[d],r?+r(h,d,l):O[d]))}if(w)return s=null,w+""||null}function f(){return Cx().defined(a).curve(i).context(o)}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ce(+l),n=null,u):e},u.x0=function(l){return arguments.length?(e=typeof l=="function"?l:Ce(+l),u):e},u.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:Ce(+l),u):n},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ce(+l),r=null,u):t},u.y0=function(l){return arguments.length?(t=typeof l=="function"?l:Ce(+l),u):t},u.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:Ce(+l),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(l){return arguments.length?(a=typeof l=="function"?l:Ce(!!l),u):a},u.curve=function(l){return arguments.length?(i=l,o!=null&&(s=i(o)),u):i},u.context=function(l){return arguments.length?(l==null?o=s=null:s=i(o=l),u):o},u}class Mx{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function c2(e){return new Mx(e,!0)}function u2(e){return new Mx(e,!1)}const Lf={draw(e,t){const r=Mt(t/qi);e.moveTo(r,0),e.arc(0,0,r,0,Bi)}},l2={draw(e,t){const r=Mt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Nx=Mt(1/3),f2=Nx*2,d2={draw(e,t){const r=Mt(t/f2),n=r*Nx;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},p2={draw(e,t){const r=Mt(t),n=-r/2;e.rect(n,n,r,r)}},h2=.8908130915292852,Ix=Li(qi/10)/Li(7*qi/10),v2=Li(Bi/10)*Ix,y2=-_x(Bi/10)*Ix,g2={draw(e,t){const r=Mt(t*h2),n=v2*r,a=y2*r;e.moveTo(0,-r),e.lineTo(n,a);for(let o=1;o<5;++o){const i=Bi*o/5,s=_x(i),c=Li(i);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*a,c*n+s*a)}e.closePath()}},qf=Mt(3),m2={draw(e,t){const r=-Mt(t/(qf*3));e.moveTo(0,r*2),e.lineTo(-qf*r,-r),e.lineTo(qf*r,-r),e.closePath()}},gt=-.5,mt=Mt(3)/2,Bf=1/Mt(12),b2=(Bf/2+1)*3,w2={draw(e,t){const r=Mt(t/b2),n=r/2,a=r*Bf,o=n,i=r*Bf+r,s=-o,c=i;e.moveTo(n,a),e.lineTo(o,i),e.lineTo(s,c),e.lineTo(gt*n-mt*a,mt*n+gt*a),e.lineTo(gt*o-mt*i,mt*o+gt*i),e.lineTo(gt*s-mt*c,mt*s+gt*c),e.lineTo(gt*n+mt*a,gt*a-mt*n),e.lineTo(gt*o+mt*i,gt*i-mt*o),e.lineTo(gt*s+mt*c,gt*c-mt*s),e.closePath()}};function x2(e,t){let r=null,n=kf(a);e=typeof e=="function"?e:Ce(e||Lf),t=typeof t=="function"?t:Ce(t===void 0?64:+t);function a(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ce(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ce(+o),a):t},a.context=function(o){return arguments.length?(r=o??null,a):r},a}function zi(){}function Wi(e,t,r){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+r)/6)}function $x(e){this._context=e}$x.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:Wi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Wi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S2(e){return new $x(e)}function Dx(e){this._context=e}Dx.prototype={areaStart:zi,areaEnd:zi,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);break}}},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:Wi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O2(e){return new Dx(e)}function kx(e){this._context=e}kx.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||this._line!==0&&this._point===3)&&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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Wi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _2(e){return new kx(e)}function jx(e){this._context=e}jx.prototype={areaStart:zi,areaEnd:zi,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))}};function P2(e){return new jx(e)}function Lx(e){return e<0?-1:1}function qx(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),i=(r-e._y1)/(a||n<0&&-0),s=(o*a+i*n)/(n+a);return(Lx(o)+Lx(i))*Math.min(Math.abs(o),Math.abs(i),.5*Math.abs(s))||0}function Bx(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ff(e,t,r){var n=e._x0,a=e._y0,o=e._x1,i=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,a+s*t,o-s,i-s*r,o,i)}function Ui(e){this._context=e}Ui.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:Ff(this,this._t0,Bx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(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,Ff(this,Bx(this,r=qx(this,e,t)),r);break;default:Ff(this,this._t0,r=qx(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Fx(e){this._context=new Rx(e)}(Fx.prototype=Object.create(Ui.prototype)).point=function(e,t){Ui.prototype.point.call(this,t,e)};function Rx(e){this._context=e}Rx.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,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function A2(e){return new Ui(e)}function E2(e){return new Fx(e)}function zx(e){this._context=e}zx.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Wx(e),a=Wx(t),o=0,i=1;i<r;++o,++i)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[i],t[i]);(this._line||this._line!==0&&r===1)&&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)}};function Wx(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),i=new Array(r);for(a[0]=0,o[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,i[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,i[t]-=n*i[t-1];for(a[r-1]=i[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(i[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function T2(e){return new zx(e)}function Gi(e,t){this._context=e,this._t=t}Gi.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function C2(e){return new Gi(e,.5)}function M2(e){return new Gi(e,0)}function N2(e){return new Gi(e,1)}function Pn(e,t){if((i=e.length)>1)for(var r=1,n,a,o=e[t[0]],i,s=o.length;r<i;++r)for(a=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Rf(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function I2(e,t){return e[t]}function $2(e){const t=[];return t.key=e,t}function D2(){var e=Ce([]),t=Rf,r=Pn,n=I2;function a(o){var i=Array.from(e.apply(this,arguments),$2),s,c=i.length,u=-1,f;for(const l of o)for(s=0,++u;s<c;++s)(i[s][u]=[0,+n(l,i[s].key,u,o)]).data=l;for(s=0,f=jf(t(i));s<c;++s)i[f[s]].index=s;return r(i,f),i}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ce(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ce(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?Rf:typeof o=="function"?o:Ce(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??Pn,a):r},a}function k2(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,i;a<o;++a){for(i=r=0;r<n;++r)i+=e[r][a][1]||0;if(i)for(r=0;r<n;++r)e[r][a][1]/=i}Pn(e,t)}}function j2(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var i=0,s=0;i<a;++i)s+=e[i][r][1]||0;n[r][1]+=n[r][0]=-s/2}Pn(e,t)}}function L2(e,t){if(!(!((i=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,i;n<o;++n){for(var s=0,c=0,u=0;s<i;++s){for(var f=e[t[s]],l=f[n][1]||0,d=f[n-1][1]||0,p=(l-d)/2,g=0;g<s;++g){var v=e[t[g]],h=v[n][1]||0,b=v[n-1][1]||0;p+=h-b}c+=l,u+=p*l}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,Pn(e,t)}}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(e)}var q2=["type","size","sizeType"];function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zf.apply(this,arguments)}function Ux(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ux(Object(r),!0).forEach(function(n){B2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ux(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B2(e,t,r){return t=F2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F2(e){var t=R2(e,"string");return Ia(t)=="symbol"?t:t+""}function R2(e,t){if(Ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z2(e,t){if(e==null)return{};var r=W2(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W2(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Hx={symbolCircle:Lf,symbolCross:l2,symbolDiamond:d2,symbolSquare:p2,symbolStar:g2,symbolTriangle:m2,symbolWye:w2},U2=Math.PI/180,G2=function(t){var r="symbol".concat(ji(t));return Hx[r]||Lf},H2=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*U2;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},V2=function(t,r){Hx["symbol".concat(ji(t))]=r},Wf=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,o=a===void 0?64:a,i=t.sizeType,s=i===void 0?"area":i,c=z2(t,q2),u=Gx(Gx({},c),{},{type:n,size:o,sizeType:s}),f=function(){var h=G2(n),b=x2().type(h).size(H2(o,s,n));return b()},l=u.className,d=u.cx,p=u.cy,g=pe(u,!0);return d===+d&&p===+p&&o===+o?A.createElement("path",zf({},g,{className:ge("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};Wf.registerSymbol=V2;function An(e){"@babel/helpers - typeof";return An=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},An(e)}function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uf.apply(this,arguments)}function Vx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function K2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vx(Object(r),!0).forEach(function(n){$a(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yx(n.key),n)}}function Z2(e,t,r){return t&&X2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q2(e,t,r){return t=Hi(t),J2(e,Kx()?Reflect.construct(t,r||[],Hi(e).constructor):t.apply(e,r))}function J2(e,t){if(t&&(An(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eL(e)}function eL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kx=function(){return!!e})()}function Hi(e){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hi(e)}function tL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gf(e,t)}function Gf(e,t){return Gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gf(e,t)}function $a(e,t,r){return t=Yx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yx(e){var t=rL(e,"string");return An(t)=="symbol"?t:t+""}function rL(e,t){if(An(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(An(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Nt=32,Hf=function(e){function t(){return Y2(this,t),Q2(this,t,arguments)}return tL(t,e),Z2(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,o=Nt/2,i=Nt/6,s=Nt/3,c=n.inactive?a:n.color;if(n.type==="plainline")return A.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:o,x2:Nt,y2:o,className:"recharts-legend-icon"});if(n.type==="line")return A.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(o,"h").concat(s,`
|
|
211
|
+
A`).concat(i,",").concat(i,",0,1,1,").concat(2*s,",").concat(o,`
|
|
212
|
+
H`).concat(Nt,"M").concat(2*s,",").concat(o,`
|
|
213
|
+
A`).concat(i,",").concat(i,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if(n.type==="rect")return A.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Nt/8,"h").concat(Nt,"v").concat(Nt*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(A.isValidElement(n.legendIcon)){var u=K2({},n);return delete u.legendIcon,A.cloneElement(n.legendIcon,u)}return A.createElement(Wf,{fill:c,cx:o,cy:o,size:Nt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,o=a.payload,i=a.iconSize,s=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:Nt,height:Nt},l={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(p,g){var v=p.formatter||c,h=ge($a($a({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=de(p.value)?null:p.value;rr(!de(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=p.inactive?u:p.color;return A.createElement("li",Uf({className:h,style:l,key:"legend-item-".concat(g)},ki(n.props,p,g)),A.createElement(Of,{width:i,height:i,viewBox:f,style:d},n.renderIcon(p)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(b,p,g):b))})}},{key:"render",value:function(){var n=this.props,a=n.payload,o=n.layout,i=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?i:"left"};return A.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(A.PureComponent);$a(Hf,"displayName","Legend"),$a(Hf,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Vf,Xx;function nL(){if(Xx)return Vf;Xx=1;var e=Ci();function t(){this.__data__=new e,this.size=0}return Vf=t,Vf}var Kf,Zx;function aL(){if(Zx)return Kf;Zx=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Kf=e,Kf}var Yf,Qx;function oL(){if(Qx)return Yf;Qx=1;function e(t){return this.__data__.get(t)}return Yf=e,Yf}var Xf,Jx;function iL(){if(Jx)return Xf;Jx=1;function e(t){return this.__data__.has(t)}return Xf=e,Xf}var Zf,e1;function sL(){if(e1)return Zf;e1=1;var e=Ci(),t=zl(),r=Zl(),n=200;function a(o,i){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([o,i]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(o,i),this.size=s.size,this}return Zf=a,Zf}var Qf,t1;function r1(){if(t1)return Qf;t1=1;var e=Ci(),t=nL(),r=aL(),n=oL(),a=iL(),o=sL();function i(s){var c=this.__data__=new e(s);this.size=c.size}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=a,i.prototype.set=o,Qf=i,Qf}var Jf,n1;function cL(){if(n1)return Jf;n1=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Jf=t,Jf}var ed,a1;function uL(){if(a1)return ed;a1=1;function e(t){return this.__data__.has(t)}return ed=e,ed}var td,o1;function i1(){if(o1)return td;o1=1;var e=Zl(),t=cL(),r=uL();function n(a){var o=-1,i=a==null?0:a.length;for(this.__data__=new e;++o<i;)this.add(a[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,td=n,td}var rd,s1;function c1(){if(s1)return rd;s1=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return rd=e,rd}var nd,u1;function l1(){if(u1)return nd;u1=1;function e(t,r){return t.has(r)}return nd=e,nd}var ad,f1;function d1(){if(f1)return ad;f1=1;var e=i1(),t=c1(),r=l1(),n=1,a=2;function o(i,s,c,u,f,l){var d=c&n,p=i.length,g=s.length;if(p!=g&&!(d&&g>p))return!1;var v=l.get(i),h=l.get(s);if(v&&h)return v==s&&h==i;var b=-1,w=!0,x=c&a?new e:void 0;for(l.set(i,s),l.set(s,i);++b<p;){var O=i[b],m=s[b];if(u)var S=d?u(m,O,b,s,i,l):u(O,m,b,i,s,l);if(S!==void 0){if(S)continue;w=!1;break}if(x){if(!t(s,function(P,E){if(!r(x,E)&&(O===P||f(O,P,c,u,l)))return x.push(E)})){w=!1;break}}else if(!(O===m||f(O,m,c,u,l))){w=!1;break}}return l.delete(i),l.delete(s),w}return ad=o,ad}var od,p1;function lL(){if(p1)return od;p1=1;var e=zt(),t=e.Uint8Array;return od=t,od}var id,h1;function fL(){if(h1)return id;h1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,o){n[++r]=[o,a]}),n}return id=e,id}var sd,v1;function cd(){if(v1)return sd;v1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return sd=e,sd}var ud,y1;function dL(){if(y1)return ud;y1=1;var e=Ca(),t=lL(),r=Dl(),n=d1(),a=fL(),o=cd(),i=1,s=2,c="[object Boolean]",u="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",p="[object RegExp]",g="[object Set]",v="[object String]",h="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",x=e?e.prototype:void 0,O=x?x.valueOf:void 0;function m(S,P,E,T,k,C,M){switch(E){case w:if(S.byteLength!=P.byteLength||S.byteOffset!=P.byteOffset)return!1;S=S.buffer,P=P.buffer;case b:return!(S.byteLength!=P.byteLength||!C(new t(S),new t(P)));case c:case u:case d:return r(+S,+P);case f:return S.name==P.name&&S.message==P.message;case p:case v:return S==P+"";case l:var N=a;case g:var I=T&i;if(N||(N=o),S.size!=P.size&&!I)return!1;var L=M.get(S);if(L)return L==P;T|=s,M.set(S,P);var $=n(N(S),N(P),T,k,C,M);return M.delete(S),$;case h:if(O)return O.call(S)==O.call(P)}return!1}return ud=m,ud}var ld,g1;function m1(){if(g1)return ld;g1=1;function e(t,r){for(var n=-1,a=r.length,o=t.length;++n<a;)t[o+n]=r[n];return t}return ld=e,ld}var fd,b1;function pL(){if(b1)return fd;b1=1;var e=m1(),t=nt();function r(n,a,o){var i=a(n);return t(n)?i:e(i,o(n))}return fd=r,fd}var dd,w1;function hL(){if(w1)return dd;w1=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,o=0,i=[];++n<a;){var s=t[n];r(s,n,t)&&(i[o++]=s)}return i}return dd=e,dd}var pd,x1;function vL(){if(x1)return pd;x1=1;function e(){return[]}return pd=e,pd}var hd,S1;function yL(){if(S1)return hd;S1=1;var e=hL(),t=vL(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(i){return i==null?[]:(i=Object(i),e(a(i),function(s){return n.call(i,s)}))}:t;return hd=o,hd}var vd,O1;function gL(){if(O1)return vd;O1=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return vd=e,vd}var yd,_1;function mL(){if(_1)return yd;_1=1;var e=Jt(),t=er(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return yd=n,yd}var gd,P1;function md(){if(P1)return gd;P1=1;var e=mL(),t=er(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(i){return t(i)&&n.call(i,"callee")&&!a.call(i,"callee")};return gd=o,gd}var Da={exports:{}},bd,A1;function bL(){if(A1)return bd;A1=1;function e(){return!1}return bd=e,bd}Da.exports;var E1;function T1(){return E1||(E1=1,function(e,t){var r=zt(),n=bL(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===a,s=i?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u}(Da,Da.exports)),Da.exports}var wd,C1;function xd(){if(C1)return wd;C1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var o=typeof n;return a=a??e,!!a&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return wd=r,wd}var Sd,M1;function Od(){if(M1)return Sd;M1=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Sd=t,Sd}var _d,N1;function wL(){if(N1)return _d;N1=1;var e=Jt(),t=Od(),r=er(),n="[object Arguments]",a="[object Array]",o="[object Boolean]",i="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",p="[object Set]",g="[object String]",v="[object WeakMap]",h="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",O="[object Int8Array]",m="[object Int16Array]",S="[object Int32Array]",P="[object Uint8Array]",E="[object Uint8ClampedArray]",T="[object Uint16Array]",k="[object Uint32Array]",C={};C[w]=C[x]=C[O]=C[m]=C[S]=C[P]=C[E]=C[T]=C[k]=!0,C[n]=C[a]=C[h]=C[o]=C[b]=C[i]=C[s]=C[c]=C[u]=C[f]=C[l]=C[d]=C[p]=C[g]=C[v]=!1;function M(N){return r(N)&&t(N.length)&&!!C[e(N)]}return _d=M,_d}var Pd,I1;function $1(){if(I1)return Pd;I1=1;function e(t){return function(r){return t(r)}}return Pd=e,Pd}var ka={exports:{}};ka.exports;var D1;function xL(){return D1||(D1=1,function(e,t){var r=Q0(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===n,i=o&&r.process,s=function(){try{var c=a&&a.require&&a.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s}(ka,ka.exports)),ka.exports}var Ad,k1;function j1(){if(k1)return Ad;k1=1;var e=wL(),t=$1(),r=xL(),n=r&&r.isTypedArray,a=n?t(n):e;return Ad=a,Ad}var Ed,L1;function SL(){if(L1)return Ed;L1=1;var e=gL(),t=md(),r=nt(),n=T1(),a=xd(),o=j1(),i=Object.prototype,s=i.hasOwnProperty;function c(u,f){var l=r(u),d=!l&&t(u),p=!l&&!d&&n(u),g=!l&&!d&&!p&&o(u),v=l||d||p||g,h=v?e(u.length,String):[],b=h.length;for(var w in u)(f||s.call(u,w))&&!(v&&(w=="length"||p&&(w=="offset"||w=="parent")||g&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||a(w,b)))&&h.push(w);return h}return Ed=c,Ed}var Td,q1;function OL(){if(q1)return Td;q1=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Td=t,Td}var Cd,B1;function F1(){if(B1)return Cd;B1=1;function e(t,r){return function(n){return t(r(n))}}return Cd=e,Cd}var Md,R1;function _L(){if(R1)return Md;R1=1;var e=F1(),t=e(Object.keys,Object);return Md=t,Md}var Nd,z1;function PL(){if(z1)return Nd;z1=1;var e=OL(),t=_L(),r=Object.prototype,n=r.hasOwnProperty;function a(o){if(!e(o))return t(o);var i=[];for(var s in Object(o))n.call(o,s)&&s!="constructor"&&i.push(s);return i}return Nd=a,Nd}var Id,W1;function ja(){if(W1)return Id;W1=1;var e=ml(),t=Od();function r(n){return n!=null&&t(n.length)&&!e(n)}return Id=r,Id}var $d,U1;function Vi(){if(U1)return $d;U1=1;var e=SL(),t=PL(),r=ja();function n(a){return r(a)?e(a):t(a)}return $d=n,$d}var Dd,G1;function AL(){if(G1)return Dd;G1=1;var e=pL(),t=yL(),r=Vi();function n(a){return e(a,r,t)}return Dd=n,Dd}var kd,H1;function EL(){if(H1)return kd;H1=1;var e=AL(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(o,i,s,c,u,f){var l=s&t,d=e(o),p=d.length,g=e(i),v=g.length;if(p!=v&&!l)return!1;for(var h=p;h--;){var b=d[h];if(!(l?b in i:n.call(i,b)))return!1}var w=f.get(o),x=f.get(i);if(w&&x)return w==i&&x==o;var O=!0;f.set(o,i),f.set(i,o);for(var m=l;++h<p;){b=d[h];var S=o[b],P=i[b];if(c)var E=l?c(P,S,b,i,o,f):c(S,P,b,o,i,f);if(!(E===void 0?S===P||u(S,P,s,c,f):E)){O=!1;break}m||(m=b=="constructor")}if(O&&!m){var T=o.constructor,k=i.constructor;T!=k&&"constructor"in o&&"constructor"in i&&!(typeof T=="function"&&T instanceof T&&typeof k=="function"&&k instanceof k)&&(O=!1)}return f.delete(o),f.delete(i),O}return kd=a,kd}var jd,V1;function TL(){if(V1)return jd;V1=1;var e=Fr(),t=zt(),r=e(t,"DataView");return jd=r,jd}var Ld,K1;function CL(){if(K1)return Ld;K1=1;var e=Fr(),t=zt(),r=e(t,"Promise");return Ld=r,Ld}var qd,Y1;function X1(){if(Y1)return qd;Y1=1;var e=Fr(),t=zt(),r=e(t,"Set");return qd=r,qd}var Bd,Z1;function ML(){if(Z1)return Bd;Z1=1;var e=Fr(),t=zt(),r=e(t,"WeakMap");return Bd=r,Bd}var Fd,Q1;function NL(){if(Q1)return Fd;Q1=1;var e=TL(),t=zl(),r=CL(),n=X1(),a=ML(),o=Jt(),i=dw(),s="[object Map]",c="[object Object]",u="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",p=i(e),g=i(t),v=i(r),h=i(n),b=i(a),w=o;return(e&&w(new e(new ArrayBuffer(1)))!=d||t&&w(new t)!=s||r&&w(r.resolve())!=u||n&&w(new n)!=f||a&&w(new a)!=l)&&(w=function(x){var O=o(x),m=O==c?x.constructor:void 0,S=m?i(m):"";if(S)switch(S){case p:return d;case g:return s;case v:return u;case h:return f;case b:return l}return O}),Fd=w,Fd}var Rd,J1;function IL(){if(J1)return Rd;J1=1;var e=r1(),t=d1(),r=dL(),n=EL(),a=NL(),o=nt(),i=T1(),s=j1(),c=1,u="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,p=d.hasOwnProperty;function g(v,h,b,w,x,O){var m=o(v),S=o(h),P=m?f:a(v),E=S?f:a(h);P=P==u?l:P,E=E==u?l:E;var T=P==l,k=E==l,C=P==E;if(C&&i(v)){if(!i(h))return!1;m=!0,T=!1}if(C&&!T)return O||(O=new e),m||s(v)?t(v,h,b,w,x,O):r(v,h,P,b,w,x,O);if(!(b&c)){var M=T&&p.call(v,"__wrapped__"),N=k&&p.call(h,"__wrapped__");if(M||N){var I=M?v.value():v,L=N?h.value():h;return O||(O=new e),x(I,L,b,w,O)}}return C?(O||(O=new e),n(v,h,b,w,x,O)):!1}return Rd=g,Rd}var zd,eS;function Wd(){if(eS)return zd;eS=1;var e=IL(),t=er();function r(n,a,o,i,s){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,o,i,r,s)}return zd=r,zd}var Ud,tS;function $L(){if(tS)return Ud;tS=1;var e=r1(),t=Wd(),r=1,n=2;function a(o,i,s,c){var u=s.length,f=u,l=!c;if(o==null)return!f;for(o=Object(o);u--;){var d=s[u];if(l&&d[2]?d[1]!==o[d[0]]:!(d[0]in o))return!1}for(;++u<f;){d=s[u];var p=d[0],g=o[p],v=d[1];if(l&&d[2]){if(g===void 0&&!(p in o))return!1}else{var h=new e;if(c)var b=c(g,v,p,o,i,h);if(!(b===void 0?t(v,g,r|n,c,h):b))return!1}}return!0}return Ud=a,Ud}var Gd,rS;function nS(){if(rS)return Gd;rS=1;var e=xr();function t(r){return r===r&&!e(r)}return Gd=t,Gd}var Hd,aS;function DL(){if(aS)return Hd;aS=1;var e=nS(),t=Vi();function r(n){for(var a=t(n),o=a.length;o--;){var i=a[o],s=n[i];a[o]=[i,s,e(s)]}return a}return Hd=r,Hd}var Vd,oS;function iS(){if(oS)return Vd;oS=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Vd=e,Vd}var Kd,sS;function kL(){if(sS)return Kd;sS=1;var e=$L(),t=DL(),r=iS();function n(a){var o=t(a);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(i){return i===a||e(i,a,o)}}return Kd=n,Kd}var Yd,cS;function jL(){if(cS)return Yd;cS=1;function e(t,r){return t!=null&&r in Object(t)}return Yd=e,Yd}var Xd,uS;function LL(){if(uS)return Xd;uS=1;var e=Yw(),t=md(),r=nt(),n=xd(),a=Od(),o=Ni();function i(s,c,u){c=e(c,s);for(var f=-1,l=c.length,d=!1;++f<l;){var p=o(c[f]);if(!(d=s!=null&&u(s,p)))break;s=s[p]}return d||++f!=l?d:(l=s==null?0:s.length,!!l&&a(l)&&n(p,l)&&(r(s)||t(s)))}return Xd=i,Xd}var Zd,lS;function qL(){if(lS)return Zd;lS=1;var e=jL(),t=LL();function r(n,a){return n!=null&&t(n,a,e)}return Zd=r,Zd}var Qd,fS;function BL(){if(fS)return Qd;fS=1;var e=Wd(),t=Jw(),r=qL(),n=vl(),a=nS(),o=iS(),i=Ni(),s=1,c=2;function u(f,l){return n(f)&&a(l)?o(i(f),l):function(d){var p=t(d,f);return p===void 0&&p===l?r(d,f):e(l,p,s|c)}}return Qd=u,Qd}var Jd,dS;function En(){if(dS)return Jd;dS=1;function e(t){return t}return Jd=e,Jd}var ep,pS;function FL(){if(pS)return ep;pS=1;function e(t){return function(r){return r==null?void 0:r[t]}}return ep=e,ep}var tp,hS;function RL(){if(hS)return tp;hS=1;var e=uf();function t(r){return function(n){return e(n,r)}}return tp=t,tp}var rp,vS;function zL(){if(vS)return rp;vS=1;var e=FL(),t=RL(),r=vl(),n=Ni();function a(o){return r(o)?e(n(o)):t(o)}return rp=a,rp}var np,yS;function Or(){if(yS)return np;yS=1;var e=kL(),t=BL(),r=En(),n=nt(),a=zL();function o(i){return typeof i=="function"?i:i==null?r:typeof i=="object"?n(i)?t(i[0],i[1]):e(i):a(i)}return np=o,np}var ap,gS;function mS(){if(gS)return ap;gS=1;function e(t,r,n,a){for(var o=t.length,i=n+(a?1:-1);a?i--:++i<o;)if(r(t[i],i,t))return i;return-1}return ap=e,ap}var op,bS;function WL(){if(bS)return op;bS=1;function e(t){return t!==t}return op=e,op}var ip,wS;function UL(){if(wS)return ip;wS=1;function e(t,r,n){for(var a=n-1,o=t.length;++a<o;)if(t[a]===r)return a;return-1}return ip=e,ip}var sp,xS;function GL(){if(xS)return sp;xS=1;var e=mS(),t=WL(),r=UL();function n(a,o,i){return o===o?r(a,o,i):e(a,t,i)}return sp=n,sp}var cp,SS;function HL(){if(SS)return cp;SS=1;var e=GL();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return cp=t,cp}var up,OS;function VL(){if(OS)return up;OS=1;function e(t,r,n){for(var a=-1,o=t==null?0:t.length;++a<o;)if(n(r,t[a]))return!0;return!1}return up=e,up}var lp,_S;function KL(){if(_S)return lp;_S=1;function e(){}return lp=e,lp}var fp,PS;function YL(){if(PS)return fp;PS=1;var e=X1(),t=KL(),r=cd(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return fp=a,fp}var dp,AS;function XL(){if(AS)return dp;AS=1;var e=i1(),t=HL(),r=VL(),n=l1(),a=YL(),o=cd(),i=200;function s(c,u,f){var l=-1,d=t,p=c.length,g=!0,v=[],h=v;if(f)g=!1,d=r;else if(p>=i){var b=u?null:a(c);if(b)return o(b);g=!1,d=n,h=new e}else h=u?[]:v;e:for(;++l<p;){var w=c[l],x=u?u(w):w;if(w=f||w!==0?w:0,g&&x===x){for(var O=h.length;O--;)if(h[O]===x)continue e;u&&h.push(x),v.push(w)}else d(h,x,f)||(h!==v&&h.push(x),v.push(w))}return v}return dp=s,dp}var pp,ES;function ZL(){if(ES)return pp;ES=1;var e=Or(),t=XL();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return pp=r,pp}var QL=ZL();const TS=Te(QL);function CS(e,t,r){return t===!0?TS(e,r):de(t)?TS(e,t):e}function Tn(e){"@babel/helpers - typeof";return Tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(e)}var JL=["ref"];function MS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(r),!0).forEach(function(n){Yi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$S(n.key),n)}}function tq(e,t,r){return t&&NS(e.prototype,t),r&&NS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rq(e,t,r){return t=Ki(t),nq(e,IS()?Reflect.construct(t,r||[],Ki(e).constructor):t.apply(e,r))}function nq(e,t){if(t&&(Tn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aq(e)}function aq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IS=function(){return!!e})()}function Ki(e){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ki(e)}function oq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hp(e,t)}function hp(e,t){return hp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hp(e,t)}function Yi(e,t,r){return t=$S(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $S(e){var t=iq(e,"string");return Tn(t)=="symbol"?t:t+""}function iq(e,t){if(Tn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sq(e,t){if(e==null)return{};var r=cq(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uq(e){return e.value}function lq(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=sq(t,JL);return A.createElement(Hf,r)}var DS=1,Cn=function(e){function t(){var r;eq(this,t);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return r=rq(this,t,[].concat(a)),Yi(r,"lastBoundingBox",{width:-1,height:-1}),r}return oq(t,e),tq(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>DS||Math.abs(a.height-this.lastBoundingBox.height)>DS)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?nr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,o=a.layout,i=a.align,s=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,l,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(i==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();l={left:((u||0)-p.width)/2}}else l=i==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();d={top:((f||0)-g.height)/2}}else d=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return nr(nr({},l),d)}},{key:"render",value:function(){var n=this,a=this.props,o=a.content,i=a.width,s=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,l=nr(nr({position:"absolute",width:i||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return A.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(p){n.wrapperNode=p}},lq(o,nr(nr({},this.props),{},{payload:CS(f,u,uq)})))}}],[{key:"getWithHeight",value:function(n,a){var o=nr(nr({},this.defaultProps),n.props),i=o.layout;return i==="vertical"&&Z(n.props.height)?{height:n.props.height}:i==="horizontal"?{width:n.props.width||a}:null}}])}(A.PureComponent);Yi(Cn,"displayName","Legend"),Yi(Cn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var vp,kS;function fq(){if(kS)return vp;kS=1;var e=Ca(),t=md(),r=nt(),n=e?e.isConcatSpreadable:void 0;function a(o){return r(o)||t(o)||!!(n&&o&&o[n])}return vp=a,vp}var yp,jS;function LS(){if(jS)return yp;jS=1;var e=m1(),t=fq();function r(n,a,o,i,s){var c=-1,u=n.length;for(o||(o=t),s||(s=[]);++c<u;){var f=n[c];a>0&&o(f)?a>1?r(f,a-1,o,i,s):e(s,f):i||(s[s.length]=f)}return s}return yp=r,yp}var gp,qS;function dq(){if(qS)return gp;qS=1;function e(t){return function(r,n,a){for(var o=-1,i=Object(r),s=a(r),c=s.length;c--;){var u=s[t?c:++o];if(n(i[u],u,i)===!1)break}return r}}return gp=e,gp}var mp,BS;function pq(){if(BS)return mp;BS=1;var e=dq(),t=e();return mp=t,mp}var bp,FS;function RS(){if(FS)return bp;FS=1;var e=pq(),t=Vi();function r(n,a){return n&&e(n,a,t)}return bp=r,bp}var wp,zS;function hq(){if(zS)return wp;zS=1;var e=ja();function t(r,n){return function(a,o){if(a==null)return a;if(!e(a))return r(a,o);for(var i=a.length,s=n?i:-1,c=Object(a);(n?s--:++s<i)&&o(c[s],s,c)!==!1;);return a}}return wp=t,wp}var xp,WS;function Sp(){if(WS)return xp;WS=1;var e=RS(),t=hq(),r=t(e);return xp=r,xp}var Op,US;function GS(){if(US)return Op;US=1;var e=Sp(),t=ja();function r(n,a){var o=-1,i=t(n)?Array(n.length):[];return e(n,function(s,c,u){i[++o]=a(s,c,u)}),i}return Op=r,Op}var _p,HS;function vq(){if(HS)return _p;HS=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return _p=e,_p}var Pp,VS;function yq(){if(VS)return Pp;VS=1;var e=xn();function t(r,n){if(r!==n){var a=r!==void 0,o=r===null,i=r===r,s=e(r),c=n!==void 0,u=n===null,f=n===n,l=e(n);if(!u&&!l&&!s&&r>n||s&&c&&f&&!u&&!l||o&&c&&f||!a&&f||!i)return 1;if(!o&&!s&&!l&&r<n||l&&a&&i&&!o&&!s||u&&a&&i||!c&&i||!f)return-1}return 0}return Pp=t,Pp}var Ap,KS;function gq(){if(KS)return Ap;KS=1;var e=yq();function t(r,n,a){for(var o=-1,i=r.criteria,s=n.criteria,c=i.length,u=a.length;++o<c;){var f=e(i[o],s[o]);if(f){if(o>=u)return f;var l=a[o];return f*(l=="desc"?-1:1)}}return r.index-n.index}return Ap=t,Ap}var Ep,YS;function mq(){if(YS)return Ep;YS=1;var e=rf(),t=uf(),r=Or(),n=GS(),a=vq(),o=$1(),i=gq(),s=En(),c=nt();function u(f,l,d){l.length?l=e(l,function(v){return c(v)?function(h){return t(h,v.length===1?v[0]:v)}:v}):l=[s];var p=-1;l=e(l,o(r));var g=n(f,function(v,h,b){var w=e(l,function(x){return x(v)});return{criteria:w,index:++p,value:v}});return a(g,function(v,h){return i(v,h,d)})}return Ep=u,Ep}var Tp,XS;function bq(){if(XS)return Tp;XS=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Tp=e,Tp}var Cp,ZS;function wq(){if(ZS)return Cp;ZS=1;var e=bq(),t=Math.max;function r(n,a,o){return a=t(a===void 0?n.length-1:a,0),function(){for(var i=arguments,s=-1,c=t(i.length-a,0),u=Array(c);++s<c;)u[s]=i[a+s];s=-1;for(var f=Array(a+1);++s<a;)f[s]=i[s];return f[a]=o(u),e(n,this,f)}}return Cp=r,Cp}var Mp,QS;function xq(){if(QS)return Mp;QS=1;function e(t){return function(){return t}}return Mp=e,Mp}var Np,JS;function eO(){if(JS)return Np;JS=1;var e=Fr(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return Np=t,Np}var Ip,tO;function Sq(){if(tO)return Ip;tO=1;var e=xq(),t=eO(),r=En(),n=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return Ip=n,Ip}var $p,rO;function Oq(){if(rO)return $p;rO=1;var e=800,t=16,r=Date.now;function n(a){var o=0,i=0;return function(){var s=r(),c=t-(s-i);if(i=s,c>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return $p=n,$p}var Dp,nO;function _q(){if(nO)return Dp;nO=1;var e=Sq(),t=Oq(),r=t(e);return Dp=r,Dp}var kp,aO;function Pq(){if(aO)return kp;aO=1;var e=En(),t=wq(),r=_q();function n(a,o){return r(t(a,o,e),a+"")}return kp=n,kp}var jp,oO;function Xi(){if(oO)return jp;oO=1;var e=Dl(),t=ja(),r=xd(),n=xr();function a(o,i,s){if(!n(s))return!1;var c=typeof i;return(c=="number"?t(s)&&r(i,s.length):c=="string"&&i in s)?e(s[i],o):!1}return jp=a,jp}var Lp,iO;function Aq(){if(iO)return Lp;iO=1;var e=LS(),t=mq(),r=Pq(),n=Xi(),a=r(function(o,i){if(o==null)return[];var s=i.length;return s>1&&n(o,i[0],i[1])?i=[]:s>2&&n(i[0],i[1],i[2])&&(i=[i[0]]),t(o,e(i,1),[])});return Lp=a,Lp}var Eq=Aq();const qp=Te(Eq);function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}function Tq(e,t){return Iq(e)||Nq(e,t)||Mq(e,t)||Cq()}function Cq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
214
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mq(e,t){if(e){if(typeof e=="string")return sO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sO(e,t)}}function sO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function Iq(e){if(Array.isArray(e))return e}function cO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cO(Object(r),!0).forEach(function(n){$q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $q(e,t,r){return t=Dq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dq(e){var t=kq(e,"string");return La(t)=="symbol"?t:t+""}function kq(e,t){if(La(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(La(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jq(e){return Array.isArray(e)&&Fe(e[0])&&Fe(e[1])?e.join(" ~ "):e}var Lq=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,o=a===void 0?{}:a,i=t.itemStyle,s=i===void 0?{}:i,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,l=t.formatter,d=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,v=t.label,h=t.labelFormatter,b=t.accessibilityLayer,w=b===void 0?!1:b,x=function(){if(f&&f.length){var M={padding:0,margin:0},N=(d?qp(f,d):f).map(function(I,L){if(I.type==="none")return null;var $=Fp({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},s),R=I.formatter||l||jq,B=I.value,q=I.name,j=B,F=q;if(R&&j!=null&&F!=null){var W=R(B,q,I,L,f);if(Array.isArray(W)){var V=Tq(W,2);j=V[0],F=V[1]}else j=W}return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:$},Fe(F)?A.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Fe(F)?A.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,A.createElement("span",{className:"recharts-tooltip-item-value"},j),A.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:M},N)}return null},O=Fp({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),m=Fp({margin:0},u),S=!ve(v),P=S?v:"",E=ge("recharts-default-tooltip",p),T=ge("recharts-tooltip-label",g);S&&h&&f!==void 0&&f!==null&&(P=h(v,f));var k=w?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",Bp({className:E,style:O},k),A.createElement("p",{className:T,style:m},A.isValidElement(P)?P:"".concat(P)),x())};function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function Zi(e,t,r){return t=qq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qq(e){var t=Bq(e,"string");return qa(t)=="symbol"?t:t+""}function Bq(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ba="recharts-tooltip-wrapper",Fq={visibility:"hidden"};function Rq(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ge(Ba,Zi(Zi(Zi(Zi({},"".concat(Ba,"-right"),Z(r)&&t&&Z(t.x)&&r>=t.x),"".concat(Ba,"-left"),Z(r)&&t&&Z(t.x)&&r<t.x),"".concat(Ba,"-bottom"),Z(n)&&t&&Z(t.y)&&n>=t.y),"".concat(Ba,"-top"),Z(n)&&t&&Z(t.y)&&n<t.y))}function uO(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,o=e.position,i=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(o&&Z(o[n]))return o[n];var f=r[n]-s-a,l=r[n]+a;if(t[n])return i[n]?f:l;if(i[n]){var d=f,p=c[n];return d<p?Math.max(l,c[n]):Math.max(f,c[n])}var g=l+s,v=c[n]+u;return g>v?Math.max(f,c[n]):Math.max(l,c[n])}function zq(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Wq(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,o=e.reverseDirection,i=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,f,l;return i.height>0&&i.width>0&&r?(f=uO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.width,viewBox:c,viewBoxDimension:c.width}),l=uO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.height,viewBox:c,viewBoxDimension:c.height}),u=zq({translateX:f,translateY:l,useTranslate3d:s})):u=Fq,{cssProperties:u,cssClasses:Rq({translateX:f,translateY:l,coordinate:r})}}function Mn(e){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mn(e)}function lO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lO(Object(r),!0).forEach(function(n){zp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pO(n.key),n)}}function Hq(e,t,r){return t&&Gq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vq(e,t,r){return t=Qi(t),Kq(e,dO()?Reflect.construct(t,r||[],Qi(e).constructor):t.apply(e,r))}function Kq(e,t){if(t&&(Mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yq(e)}function Yq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dO=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(e)}function Xq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rp(e,t)}function Rp(e,t){return Rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rp(e,t)}function zp(e,t,r){return t=pO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pO(e){var t=Zq(e,"string");return Mn(t)=="symbol"?t:t+""}function Zq(e,t){if(Mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hO=1,Qq=function(e){function t(){var r;Uq(this,t);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return r=Vq(this,t,[].concat(a)),zp(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),zp(r,"handleKeyDown",function(i){if(i.key==="Escape"){var s,c,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return Xq(t,e),Hq(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>hO||Math.abs(n.height-this.state.lastBoundingBox.height)>hO)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,o=a.active,i=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,l=a.hasPayload,d=a.isAnimationActive,p=a.offset,g=a.position,v=a.reverseDirection,h=a.useTranslate3d,b=a.viewBox,w=a.wrapperStyle,x=Wq({allowEscapeViewBox:i,coordinate:f,offsetTopLeft:p,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:b}),O=x.cssClasses,m=x.cssProperties,S=fO(fO({transition:d&&o?"transform ".concat(s,"ms ").concat(c):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&l?"visible":"hidden",position:"absolute",top:0,left:0},w);return A.createElement("div",{tabIndex:-1,className:O,style:S,ref:function(E){n.wrapperNode=E}},u)}}])}(A.PureComponent),Jq=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Nn={isSsr:Jq()};function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}function vO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vO(Object(r),!0).forEach(function(n){Up(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mO(n.key),n)}}function rB(e,t,r){return t&&tB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nB(e,t,r){return t=Ji(t),aB(e,gO()?Reflect.construct(t,r||[],Ji(e).constructor):t.apply(e,r))}function aB(e,t){if(t&&(In(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oB(e)}function oB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gO=function(){return!!e})()}function Ji(e){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ji(e)}function iB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wp(e,t)}function Wp(e,t){return Wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wp(e,t)}function Up(e,t,r){return t=mO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mO(e){var t=sB(e,"string");return In(t)=="symbol"?t:t+""}function sB(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cB(e){return e.dataKey}function uB(e,t){return A.isValidElement(e)?A.cloneElement(e,t):typeof e=="function"?A.createElement(e,t):A.createElement(Lq,t)}var Wt=function(e){function t(){return eB(this,t),nB(this,t,arguments)}return iB(t,e),rB(t,[{key:"render",value:function(){var n=this,a=this.props,o=a.active,i=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,l=a.filterNull,d=a.isAnimationActive,p=a.offset,g=a.payload,v=a.payloadUniqBy,h=a.position,b=a.reverseDirection,w=a.useTranslate3d,x=a.viewBox,O=a.wrapperStyle,m=g??[];l&&m.length&&(m=CS(g.filter(function(P){return P.value!=null&&(P.hide!==!0||n.props.includeHidden)}),v,cB));var S=m.length>0;return A.createElement(Qq,{allowEscapeViewBox:i,animationDuration:s,animationEasing:c,isAnimationActive:d,active:o,coordinate:f,hasPayload:S,offset:p,position:h,reverseDirection:b,useTranslate3d:w,viewBox:x,wrapperStyle:O},uB(u,yO(yO({},this.props),{},{payload:m})))}}])}(A.PureComponent);Up(Wt,"displayName","Tooltip"),Up(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Nn.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Gp,bO;function lB(){if(bO)return Gp;bO=1;var e=zt(),t=function(){return e.Date.now()};return Gp=t,Gp}var Hp,wO;function fB(){if(wO)return Hp;wO=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Hp=t,Hp}var Vp,xO;function dB(){if(xO)return Vp;xO=1;var e=fB(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Vp=r,Vp}var Kp,SO;function OO(){if(SO)return Kp;SO=1;var e=dB(),t=xr(),r=xn(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var l=o.test(u);return l||i.test(u)?s(u.slice(2),l?2:8):a.test(u)?n:+u}return Kp=c,Kp}var Yp,_O;function pB(){if(_O)return Yp;_O=1;var e=xr(),t=lB(),r=OO(),n="Expected a function",a=Math.max,o=Math.min;function i(s,c,u){var f,l,d,p,g,v,h=0,b=!1,w=!1,x=!0;if(typeof s!="function")throw new TypeError(n);c=r(c)||0,e(u)&&(b=!!u.leading,w="maxWait"in u,d=w?a(r(u.maxWait)||0,c):d,x="trailing"in u?!!u.trailing:x);function O(N){var I=f,L=l;return f=l=void 0,h=N,p=s.apply(L,I),p}function m(N){return h=N,g=setTimeout(E,c),b?O(N):p}function S(N){var I=N-v,L=N-h,$=c-I;return w?o($,d-L):$}function P(N){var I=N-v,L=N-h;return v===void 0||I>=c||I<0||w&&L>=d}function E(){var N=t();if(P(N))return T(N);g=setTimeout(E,S(N))}function T(N){return g=void 0,x&&f?O(N):(f=l=void 0,p)}function k(){g!==void 0&&clearTimeout(g),h=0,f=v=l=g=void 0}function C(){return g===void 0?p:T(t())}function M(){var N=t(),I=P(N);if(f=arguments,l=this,v=N,I){if(g===void 0)return m(v);if(w)return clearTimeout(g),g=setTimeout(E,c),O(v)}return g===void 0&&(g=setTimeout(E,c)),p}return M.cancel=k,M.flush=C,M}return Yp=i,Yp}var Xp,PO;function hB(){if(PO)return Xp;PO=1;var e=pB(),t=xr(),r="Expected a function";function n(a,o,i){var s=!0,c=!0;if(typeof a!="function")throw new TypeError(r);return t(i)&&(s="leading"in i?!!i.leading:s,c="trailing"in i?!!i.trailing:c),e(a,o,{leading:s,maxWait:o,trailing:c})}return Xp=n,Xp}var vB=hB();const AO=Te(vB);function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function EO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EO(Object(r),!0).forEach(function(n){yB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yB(e,t,r){return t=gB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gB(e){var t=mB(e,"string");return Fa(t)=="symbol"?t:t+""}function mB(e,t){if(Fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bB(e,t){return OB(e)||SB(e,t)||xB(e,t)||wB()}function wB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
215
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xB(e,t){if(e){if(typeof e=="string")return TO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TO(e,t)}}function TO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function OB(e){if(Array.isArray(e))return e}var _B=A.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,o=e.width,i=o===void 0?"100%":o,s=e.height,c=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,l=e.minHeight,d=e.maxHeight,p=e.children,g=e.debounce,v=g===void 0?0:g,h=e.id,b=e.className,w=e.onResize,x=e.style,O=x===void 0?{}:x,m=A.useRef(null),S=A.useRef();S.current=w,A.useImperativeHandle(t,function(){return Object.defineProperty(m.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),m.current},configurable:!0})});var P=A.useState({containerWidth:a.width,containerHeight:a.height}),E=bB(P,2),T=E[0],k=E[1],C=A.useCallback(function(N,I){k(function(L){var $=Math.round(N),R=Math.round(I);return L.containerWidth===$&&L.containerHeight===R?L:{containerWidth:$,containerHeight:R}})},[]);A.useEffect(function(){var N=function(q){var j,F=q[0].contentRect,W=F.width,V=F.height;C(W,V),(j=S.current)===null||j===void 0||j.call(S,W,V)};v>0&&(N=AO(N,v,{trailing:!0,leading:!1}));var I=new ResizeObserver(N),L=m.current.getBoundingClientRect(),$=L.width,R=L.height;return C($,R),I.observe(m.current),function(){I.disconnect()}},[C,v]);var M=A.useMemo(function(){var N=T.containerWidth,I=T.containerHeight;if(N<0||I<0)return null;rr(Rr(i)||Rr(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
216
|
+
maybe you don't need to use a ResponsiveContainer.`,i,c),rr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var L=Rr(i)?N:i,$=Rr(c)?I:c;r&&r>0&&(L?$=L/r:$&&(L=$*r),d&&$>d&&($=d)),rr(L>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
217
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
218
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
219
|
+
height and width.`,L,$,i,c,f,l,r);var R=!Array.isArray(p)&&tr(p.type).endsWith("Chart");return A.Children.map(p,function(B){return A.isValidElement(B)?A.cloneElement(B,es({width:L,height:$},R?{style:es({height:"100%",width:"100%",maxHeight:$,maxWidth:L},B.props.style)}:{})):B})},[r,p,c,d,l,f,T,i]);return A.createElement("div",{id:h?"".concat(h):void 0,className:ge("recharts-responsive-container",b),style:es(es({},O),{},{width:i,height:c,minWidth:f,minHeight:l,maxHeight:d}),ref:m},M)}),CO=function(t){return null};CO.displayName="Cell";function Ra(e){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function MO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MO(Object(r),!0).forEach(function(n){PB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PB(e,t,r){return t=AB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AB(e){var t=EB(e,"string");return Ra(t)=="symbol"?t:t+""}function EB(e,t){if(Ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $n={widthCache:{},cacheCount:0},TB=2e3,CB={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},NO="recharts_measurement_span";function MB(e){var t=Zp({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var za=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Nn.isSsr)return{width:0,height:0};var n=MB(r),a=JSON.stringify({text:t,copyStyle:n});if($n.widthCache[a])return $n.widthCache[a];try{var o=document.getElementById(NO);o||(o=document.createElement("span"),o.setAttribute("id",NO),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=Zp(Zp({},CB),n);Object.assign(o.style,i),o.textContent="".concat(t);var s=o.getBoundingClientRect(),c={width:s.width,height:s.height};return $n.widthCache[a]=c,++$n.cacheCount>TB&&($n.cacheCount=0,$n.widthCache={}),c}catch{return{width:0,height:0}}},NB=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wa(e){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function ts(e,t){return kB(e)||DB(e,t)||$B(e,t)||IB()}function IB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
220
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $B(e,t){if(e){if(typeof e=="string")return IO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IO(e,t)}}function IO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function kB(e){if(Array.isArray(e))return e}function jB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qB(n.key),n)}}function LB(e,t,r){return t&&$O(e.prototype,t),r&&$O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qB(e){var t=BB(e,"string");return Wa(t)=="symbol"?t:t+""}function BB(e,t){if(Wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,FB=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,RB=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,jO={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},zB=Object.keys(jO),Dn="NaN";function WB(e,t){return e*jO[t]}var rs=function(){function e(t,r){jB(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!FB.test(r)&&(this.num=NaN,this.unit=""),zB.includes(r)&&(this.num=WB(t,r),this.unit="px")}return LB(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=RB.exec(r))!==null&&n!==void 0?n:[],o=ts(a,3),i=o[1],s=o[2];return new e(parseFloat(i),s??"")}}])}();function LO(e){if(e.includes(Dn))return Dn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=DO.exec(t))!==null&&r!==void 0?r:[],a=ts(n,4),o=a[1],i=a[2],s=a[3],c=rs.parse(o??""),u=rs.parse(s??""),f=i==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return Dn;t=t.replace(DO,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,d=(l=kO.exec(t))!==null&&l!==void 0?l:[],p=ts(d,4),g=p[1],v=p[2],h=p[3],b=rs.parse(g??""),w=rs.parse(h??""),x=v==="+"?b.add(w):b.subtract(w);if(x.isNaN())return Dn;t=t.replace(kO,x.toString())}return t}var qO=/\(([^()]*)\)/;function UB(e){for(var t=e;t.includes("(");){var r=qO.exec(t),n=ts(r,2),a=n[1];t=t.replace(qO,LO(a))}return t}function GB(e){var t=e.replace(/\s+/g,"");return t=UB(t),t=LO(t),t}function HB(e){try{return GB(e)}catch{return Dn}}function Qp(e){var t=HB(e.slice(5,-1));return t===Dn?"":t}var VB=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],KB=["dx","dy","angle","className","breakAll"];function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jp.apply(this,arguments)}function BO(e,t){if(e==null)return{};var r=YB(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function FO(e,t){return JB(e)||QB(e,t)||ZB(e,t)||XB()}function XB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
221
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZB(e,t){if(e){if(typeof e=="string")return RO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RO(e,t)}}function RO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function JB(e){if(Array.isArray(e))return e}var zO=/[ \f\n\r\t\v\u2028\u2029]+/,WO=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var o=[];ve(r)||(n?o=r.toString().split(""):o=r.toString().split(zO));var i=o.map(function(c){return{word:c,width:za(c,a).width}}),s=n?0:za(" ",a).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}},eF=function(t,r,n,a,o){var i=t.maxLines,s=t.children,c=t.style,u=t.breakAll,f=Z(i),l=s,d=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce(function($,R){var B=R.word,q=R.width,j=$[$.length-1];if(j&&(a==null||o||j.width+q+n<Number(a)))j.words.push(B),j.width+=q+n;else{var F={words:[B],width:q};$.push(F)}return $},[])},p=d(r),g=function(L){return L.reduce(function($,R){return $.width>R.width?$:R})};if(!f)return p;for(var v="…",h=function(L){var $=l.slice(0,L),R=WO({breakAll:u,style:c,children:$+v}).wordsWithComputedWidth,B=d(R),q=B.length>i||g(B).width>Number(a);return[q,B]},b=0,w=l.length-1,x=0,O;b<=w&&x<=l.length-1;){var m=Math.floor((b+w)/2),S=m-1,P=h(S),E=FO(P,2),T=E[0],k=E[1],C=h(m),M=FO(C,1),N=M[0];if(!T&&!N&&(b=m+1),T&&N&&(w=m-1),!T&&N){O=k;break}x++}return O||p},UO=function(t){var r=ve(t)?[]:t.toString().split(zO);return[{words:r}]},tF=function(t){var r=t.width,n=t.scaleToFit,a=t.children,o=t.style,i=t.breakAll,s=t.maxLines;if((r||n)&&!Nn.isSsr){var c,u,f=WO({breakAll:i,children:a,style:o});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;c=l,u=d}else return UO(a);return eF({breakAll:i,children:a,maxLines:s,style:o},c,u,r,n)}return UO(a)},GO="#808080",ns=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,o=a===void 0?0:a,i=t.lineHeight,s=i===void 0?"1em":i,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,l=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,g=t.verticalAnchor,v=g===void 0?"end":g,h=t.fill,b=h===void 0?GO:h,w=BO(t,VB),x=A.useMemo(function(){return tF({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:l,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,l,w.style,w.width]),O=w.dx,m=w.dy,S=w.angle,P=w.className,E=w.breakAll,T=BO(w,KB);if(!Fe(n)||!Fe(o))return null;var k=n+(Z(O)?O:0),C=o+(Z(m)?m:0),M;switch(v){case"start":M=Qp("calc(".concat(u,")"));break;case"middle":M=Qp("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:M=Qp("calc(".concat(x.length-1," * -").concat(s,")"));break}var N=[];if(l){var I=x[0].width,L=w.width;N.push("scale(".concat((Z(L)?L/I:1)/I,")"))}return S&&N.push("rotate(".concat(S,", ").concat(k,", ").concat(C,")")),N.length&&(T.transform=N.join(" ")),A.createElement("text",Jp({},pe(T,!0),{x:k,y:C,className:ge("recharts-text",P),textAnchor:p,fill:b.includes("url")?GO:b}),x.map(function($,R){var B=$.words.join(E?"":" ");return A.createElement("tspan",{x:k,dy:R===0?M:s,key:"".concat(B,"-").concat(R)},B)}))};function _r(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function eh(e){let t,r,n;e.length!==2?(t=_r,r=(s,c)=>_r(e(s),c),n=(s,c)=>e(s)-c):(t=e===_r||e===rF?e:nF,r=e,n=e);function a(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const l=u+f>>>1;r(s[l],c)<0?u=l+1:f=l}while(u<f)}return u}function o(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const l=u+f>>>1;r(s[l],c)<=0?u=l+1:f=l}while(u<f)}return u}function i(s,c,u=0,f=s.length){const l=a(s,c,u,f-1);return l>u&&n(s[l-1],c)>-n(s[l],c)?l-1:l}return{left:a,center:i,right:o}}function nF(){return 0}function HO(e){return e===null?NaN:+e}function*aF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Ua=eh(_r).right;eh(HO).center;class VO extends Map{constructor(t,r=sF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(KO(this,t))}has(t){return super.has(KO(this,t))}set(t,r){return super.set(oF(this,t),r)}delete(t){return super.delete(iF(this,t))}}function KO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function oF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function iF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function sF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function cF(e=_r){if(e===_r)return YO;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function YO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const uF=Math.sqrt(50),lF=Math.sqrt(10),fF=Math.sqrt(2);function as(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),i=o>=uF?10:o>=lF?5:o>=fF?2:1;let s,c,u;return a<0?(u=Math.pow(10,-a)/i,s=Math.round(e*u),c=Math.round(t*u),s/u<e&&++s,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*i,s=Math.round(e/u),c=Math.round(t/u),s*u<e&&++s,c*u>t&&--c),c<s&&.5<=r&&r<2?as(e,t,r*2):[s,c,u]}function th(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,i]=n?as(t,e,r):as(e,t,r);if(!(o>=a))return[];const s=o-a+1,c=new Array(s);if(n)if(i<0)for(let u=0;u<s;++u)c[u]=(o-u)/-i;else for(let u=0;u<s;++u)c[u]=(o-u)*i;else if(i<0)for(let u=0;u<s;++u)c[u]=(a+u)/-i;else for(let u=0;u<s;++u)c[u]=(a+u)*i;return c}function rh(e,t,r){return t=+t,e=+e,r=+r,as(e,t,r)[2]}function nh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?rh(t,e,r):rh(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function XO(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function ZO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function QO(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?YO:cF(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(c-l)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*l/c+d)),g=Math.min(n,Math.floor(t+(c-u)*l/c+d));QO(e,t,p,g,a)}const o=e[t];let i=r,s=n;for(Ga(e,r,t),a(e[n],o)>0&&Ga(e,r,n);i<s;){for(Ga(e,i,s),++i,--s;a(e[i],o)<0;)++i;for(;a(e[s],o)>0;)--s}a(e[r],o)===0?Ga(e,r,s):(++s,Ga(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Ga(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function dF(e,t,r){if(e=Float64Array.from(aF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return ZO(e);if(t>=1)return XO(e);var n,a=(n-1)*t,o=Math.floor(a),i=XO(QO(e,o).subarray(0,o+1)),s=ZO(e.subarray(o+1));return i+(s-i)*(a-o)}}function pF(e,t,r=HO){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),i=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return i+(s-i)*(a-o)}}function hF(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function bt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ar(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ah=Symbol("implicit");function oh(){var e=new VO,t=[],r=[],n=ah;function a(o){let i=e.get(o);if(i===void 0){if(n!==ah)return n;e.set(o,i=t.push(o)-1)}return r[i%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new VO;for(const i of o)e.has(i)||e.set(i,t.push(i)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return oh(t,r).unknown(n)},bt.apply(a,arguments),a}function Ha(){var e=oh().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,i,s=!1,c=0,u=0,f=.5;delete e.unknown;function l(){var d=t().length,p=a<n,g=p?a:n,v=p?n:a;o=(v-g)/Math.max(1,d-c+u*2),s&&(o=Math.floor(o)),g+=(v-g-o*(d-c))*f,i=o*(1-c),s&&(g=Math.round(g),i=Math.round(i));var h=hF(d).map(function(b){return g+o*b});return r(p?h.reverse():h)}return e.domain=function(d){return arguments.length?(t(d),l()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,l()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,l()},e.bandwidth=function(){return i},e.step=function(){return o},e.round=function(d){return arguments.length?(s=!!d,l()):s},e.padding=function(d){return arguments.length?(c=Math.min(1,u=+d),l()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),l()):c},e.paddingOuter=function(d){return arguments.length?(u=+d,l()):u},e.align=function(d){return arguments.length?(f=Math.max(0,Math.min(1,d)),l()):f},e.copy=function(){return Ha(t(),[n,a]).round(s).paddingInner(c).paddingOuter(u).align(f)},bt.apply(l(),arguments)}function JO(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return JO(t())},e}function Va(){return JO(Ha.apply(null,arguments).paddingInner(1))}function ih(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function e_(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ka(){}var Ya=.7,os=1/Ya,kn="\\s*([+-]?\\d+)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vF=/^#([0-9a-f]{3,8})$/,yF=new RegExp(`^rgb\\(${kn},${kn},${kn}\\)$`),gF=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),mF=new RegExp(`^rgba\\(${kn},${kn},${kn},${Xa}\\)$`),bF=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Xa}\\)$`),wF=new RegExp(`^hsl\\(${Xa},${Ut},${Ut}\\)$`),xF=new RegExp(`^hsla\\(${Xa},${Ut},${Ut},${Xa}\\)$`),t_={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};ih(Ka,Za,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:r_,formatHex:r_,formatHex8:SF,formatHsl:OF,formatRgb:n_,toString:n_});function r_(){return this.rgb().formatHex()}function SF(){return this.rgb().formatHex8()}function OF(){return c_(this).formatHsl()}function n_(){return this.rgb().formatRgb()}function Za(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=vF.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?a_(t):r===3?new at(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?is(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?is(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=yF.exec(e))?new at(t[1],t[2],t[3],1):(t=gF.exec(e))?new at(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mF.exec(e))?is(t[1],t[2],t[3],t[4]):(t=bF.exec(e))?is(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wF.exec(e))?s_(t[1],t[2]/100,t[3]/100,1):(t=xF.exec(e))?s_(t[1],t[2]/100,t[3]/100,t[4]):t_.hasOwnProperty(e)?a_(t_[e]):e==="transparent"?new at(NaN,NaN,NaN,0):null}function a_(e){return new at(e>>16&255,e>>8&255,e&255,1)}function is(e,t,r,n){return n<=0&&(e=t=r=NaN),new at(e,t,r,n)}function _F(e){return e instanceof Ka||(e=Za(e)),e?(e=e.rgb(),new at(e.r,e.g,e.b,e.opacity)):new at}function sh(e,t,r,n){return arguments.length===1?_F(e):new at(e,t,r,n??1)}function at(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ih(at,sh,e_(Ka,{brighter(e){return e=e==null?os:Math.pow(os,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ya:Math.pow(Ya,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new at(Ur(this.r),Ur(this.g),Ur(this.b),ss(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:o_,formatHex:o_,formatHex8:PF,formatRgb:i_,toString:i_}));function o_(){return`#${Gr(this.r)}${Gr(this.g)}${Gr(this.b)}`}function PF(){return`#${Gr(this.r)}${Gr(this.g)}${Gr(this.b)}${Gr((isNaN(this.opacity)?1:this.opacity)*255)}`}function i_(){const e=ss(this.opacity);return`${e===1?"rgb(":"rgba("}${Ur(this.r)}, ${Ur(this.g)}, ${Ur(this.b)}${e===1?")":`, ${e})`}`}function ss(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ur(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gr(e){return e=Ur(e),(e<16?"0":"")+e.toString(16)}function s_(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new It(e,t,r,n)}function c_(e){if(e instanceof It)return new It(e.h,e.s,e.l,e.opacity);if(e instanceof Ka||(e=Za(e)),!e)return new It;if(e instanceof It)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),i=NaN,s=o-a,c=(o+a)/2;return s?(t===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-t)/s+2:i=(t-r)/s+4,s/=c<.5?o+a:2-o-a,i*=60):s=c>0&&c<1?0:i,new It(i,s,c,e.opacity)}function AF(e,t,r,n){return arguments.length===1?c_(e):new It(e,t,r,n??1)}function It(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ih(It,AF,e_(Ka,{brighter(e){return e=e==null?os:Math.pow(os,e),new It(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ya:Math.pow(Ya,e),new It(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new at(ch(e>=240?e-240:e+120,a,n),ch(e,a,n),ch(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new It(u_(this.h),cs(this.s),cs(this.l),ss(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=ss(this.opacity);return`${e===1?"hsl(":"hsla("}${u_(this.h)}, ${cs(this.s)*100}%, ${cs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function u_(e){return e=(e||0)%360,e<0?e+360:e}function cs(e){return Math.max(0,Math.min(1,e||0))}function ch(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const uh=e=>()=>e;function EF(e,t){return function(r){return e+r*t}}function TF(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function CF(e){return(e=+e)==1?l_:function(t,r){return r-t?TF(t,r,e):uh(isNaN(t)?r:t)}}function l_(e,t){var r=t-e;return r?EF(e,r):uh(isNaN(e)?t:e)}const f_=function e(t){var r=CF(t);function n(a,o){var i=r((a=sh(a)).r,(o=sh(o)).r),s=r(a.g,o.g),c=r(a.b,o.b),u=l_(a.opacity,o.opacity);return function(f){return a.r=i(f),a.g=s(f),a.b=c(f),a.opacity=u(f),a+""}}return n.gamma=e,n}(1);function MF(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function NF(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IF(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=jn(e[i],t[i]);for(;i<r;++i)o[i]=t[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function $F(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function us(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function DF(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=jn(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var lh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fh=new RegExp(lh.source,"g");function kF(e){return function(){return e}}function jF(e){return function(t){return e(t)+""}}function LF(e,t){var r=lh.lastIndex=fh.lastIndex=0,n,a,o,i=-1,s=[],c=[];for(e=e+"",t=t+"";(n=lh.exec(e))&&(a=fh.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,c.push({i,x:us(n,a)})),r=fh.lastIndex;return r<t.length&&(o=t.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?c[0]?jF(c[0].x):kF(t):(t=c.length,function(u){for(var f=0,l;f<t;++f)s[(l=c[f]).i]=l.x(u);return s.join("")})}function jn(e,t){var r=typeof t,n;return t==null||r==="boolean"?uh(t):(r==="number"?us:r==="string"?(n=Za(t))?(t=n,f_):LF:t instanceof Za?f_:t instanceof Date?$F:NF(t)?MF:Array.isArray(t)?IF:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?DF:us)(e,t)}function dh(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function qF(e,t){t===void 0&&(t=e,e=jn);for(var r=0,n=t.length-1,a=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(a,a=t[++r]);return function(i){var s=Math.max(0,Math.min(n-1,Math.floor(i*=n)));return o[s](i-s)}}function BF(e){return function(){return e}}function ls(e){return+e}var d_=[0,1];function tt(e){return e}function ph(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:BF(isNaN(t)?NaN:.5)}function FF(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function RF(e,t,r){var n=e[0],a=e[1],o=t[0],i=t[1];return a<n?(n=ph(a,n),o=r(i,o)):(n=ph(n,a),o=r(o,i)),function(s){return o(n(s))}}function zF(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),i=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<n;)a[i]=ph(e[i],e[i+1]),o[i]=r(t[i],t[i+1]);return function(s){var c=Ua(e,s,1,n)-1;return o[c](a[c](s))}}function Qa(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fs(){var e=d_,t=d_,r=jn,n,a,o,i=tt,s,c,u;function f(){var d=Math.min(e.length,t.length);return i!==tt&&(i=FF(e[0],e[d-1])),s=d>2?zF:RF,c=u=null,l}function l(d){return d==null||isNaN(d=+d)?o:(c||(c=s(e.map(n),t,r)))(n(i(d)))}return l.invert=function(d){return i(a((u||(u=s(t,e.map(n),us)))(d)))},l.domain=function(d){return arguments.length?(e=Array.from(d,ls),f()):e.slice()},l.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},l.rangeRound=function(d){return t=Array.from(d),r=dh,f()},l.clamp=function(d){return arguments.length?(i=d?!0:tt,f()):i!==tt},l.interpolate=function(d){return arguments.length?(r=d,f()):r},l.unknown=function(d){return arguments.length?(o=d,l):o},function(d,p){return n=d,a=p,f()}}function hh(){return fs()(tt,tt)}function WF(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ds(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ln(e){return e=ds(Math.abs(e)),e?e[1]:NaN}function UF(e,t){return function(r,n){for(var a=r.length,o=[],i=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),o.push(r.substring(a-=s,a+s)),!((c+=s+1)>n));)s=e[i=(i+1)%e.length];return o.reverse().join(t)}}function GF(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var HF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ja(e){if(!(t=HF.exec(e)))throw new Error("invalid format: "+e);var t;return new vh({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]})}Ja.prototype=vh.prototype;function vh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function VF(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var p_;function KF(e,t){var r=ds(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(p_=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,i=n.length;return o===i?n:o>i?n+new Array(o-i+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+ds(e,Math.max(0,t+o-1))[0]}function h_(e,t){var r=ds(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const v_={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:WF,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)=>h_(e*100,t),r:h_,s:KF,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function y_(e){return e}var g_=Array.prototype.map,m_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YF(e){var t=e.grouping===void 0||e.thousands===void 0?y_:UF(g_.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?y_:GF(g_.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(l){l=Ja(l);var d=l.fill,p=l.align,g=l.sign,v=l.symbol,h=l.zero,b=l.width,w=l.comma,x=l.precision,O=l.trim,m=l.type;m==="n"?(w=!0,m="g"):v_[m]||(x===void 0&&(x=12),O=!0,m="g"),(h||d==="0"&&p==="=")&&(h=!0,d="0",p="=");var S=v==="$"?r:v==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",P=v==="$"?n:/[%p]/.test(m)?i:"",E=v_[m],T=/[defgprs%]/.test(m);x=x===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function k(C){var M=S,N=P,I,L,$;if(m==="c")N=E(C)+N,C="";else{C=+C;var R=C<0||1/C<0;if(C=isNaN(C)?c:E(Math.abs(C),x),O&&(C=VF(C)),R&&+C==0&&g!=="+"&&(R=!1),M=(R?g==="("?g:s:g==="-"||g==="("?"":g)+M,N=(m==="s"?m_[8+p_/3]:"")+N+(R&&g==="("?")":""),T){for(I=-1,L=C.length;++I<L;)if($=C.charCodeAt(I),48>$||$>57){N=($===46?a+C.slice(I+1):C.slice(I))+N,C=C.slice(0,I);break}}}w&&!h&&(C=t(C,1/0));var B=M.length+C.length+N.length,q=B<b?new Array(b-B+1).join(d):"";switch(w&&h&&(C=t(q+C,q.length?b-N.length:1/0),q=""),p){case"<":C=M+C+N+q;break;case"=":C=M+q+C+N;break;case"^":C=q.slice(0,B=q.length>>1)+M+C+N+q.slice(B);break;default:C=q+M+C+N;break}return o(C)}return k.toString=function(){return l+""},k}function f(l,d){var p=u((l=Ja(l),l.type="f",l)),g=Math.max(-8,Math.min(8,Math.floor(Ln(d)/3)))*3,v=Math.pow(10,-g),h=m_[8+g/3];return function(b){return p(v*b)+h}}return{format:u,formatPrefix:f}}var ps,yh,b_;XF({thousands:",",grouping:[3],currency:["$",""]});function XF(e){return ps=YF(e),yh=ps.format,b_=ps.formatPrefix,ps}function ZF(e){return Math.max(0,-Ln(Math.abs(e)))}function QF(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ln(t)/3)))*3-Ln(Math.abs(e)))}function JF(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ln(t)-Ln(e))+1}function w_(e,t,r,n){var a=nh(e,t,r),o;switch(n=Ja(n??",f"),n.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=QF(a,i))&&(n.precision=o),b_(n,i)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=JF(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=ZF(a))&&(n.precision=o-(n.type==="%")*2);break}}return yh(n)}function Pr(e){var t=e.domain;return e.ticks=function(r){var n=t();return th(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return w_(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,i=n[a],s=n[o],c,u,f=10;for(s<i&&(u=i,i=s,s=u,u=a,a=o,o=u);f-- >0;){if(u=rh(i,s,r),u===c)return n[a]=i,n[o]=s,t(n);if(u>0)i=Math.floor(i/u)*u,s=Math.ceil(s/u)*u;else if(u<0)i=Math.ceil(i*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function hs(){var e=hh();return e.copy=function(){return Qa(e,hs())},bt.apply(e,arguments),Pr(e)}function x_(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,ls),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return x_(e).unknown(t)},e=arguments.length?Array.from(e,ls):[0,1],Pr(r)}function S_(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],i;return o<a&&(i=r,r=n,n=i,i=a,a=o,o=i),e[r]=t.floor(a),e[n]=t.ceil(o),e}function O_(e){return Math.log(e)}function __(e){return Math.exp(e)}function eR(e){return-Math.log(-e)}function tR(e){return-Math.exp(-e)}function rR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function nR(e){return e===10?rR:e===Math.E?Math.exp:t=>Math.pow(e,t)}function aR(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function P_(e){return(t,r)=>-e(-t,r)}function gh(e){const t=e(O_,__),r=t.domain;let n=10,a,o;function i(){return a=aR(n),o=nR(n),r()[0]<0?(a=P_(a),o=P_(o),e(eR,tR)):e(O_,__),t}return t.base=function(s){return arguments.length?(n=+s,i()):n},t.domain=function(s){return arguments.length?(r(s),i()):r()},t.ticks=s=>{const c=r();let u=c[0],f=c[c.length-1];const l=f<u;l&&([u,f]=[f,u]);let d=a(u),p=a(f),g,v;const h=s==null?10:+s;let b=[];if(!(n%1)&&p-d<h){if(d=Math.floor(d),p=Math.ceil(p),u>0){for(;d<=p;++d)for(g=1;g<n;++g)if(v=d<0?g/o(-d):g*o(d),!(v<u)){if(v>f)break;b.push(v)}}else for(;d<=p;++d)for(g=n-1;g>=1;--g)if(v=d>0?g/o(-d):g*o(d),!(v<u)){if(v>f)break;b.push(v)}b.length*2<h&&(b=th(u,f,h))}else b=th(d,p,Math.min(p-d,h)).map(o);return l?b.reverse():b},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Ja(c)).precision==null&&(c.trim=!0),c=yh(c)),s===1/0)return c;const u=Math.max(1,n*s/t.ticks().length);return f=>{let l=f/o(Math.round(a(f)));return l*n<n-.5&&(l*=n),l<=u?c(f):""}},t.nice=()=>r(S_(r(),{floor:s=>o(Math.floor(a(s))),ceil:s=>o(Math.ceil(a(s)))})),t}function A_(){const e=gh(fs()).domain([1,10]);return e.copy=()=>Qa(e,A_()).base(e.base()),bt.apply(e,arguments),e}function E_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function T_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mh(e){var t=1,r=e(E_(t),T_(t));return r.constant=function(n){return arguments.length?e(E_(t=+n),T_(t)):t},Pr(r)}function C_(){var e=mh(fs());return e.copy=function(){return Qa(e,C_()).constant(e.constant())},bt.apply(e,arguments)}function M_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oR(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iR(e){return e<0?-e*e:e*e}function bh(e){var t=e(tt,tt),r=1;function n(){return r===1?e(tt,tt):r===.5?e(oR,iR):e(M_(r),M_(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Pr(t)}function wh(){var e=bh(fs());return e.copy=function(){return Qa(e,wh()).exponent(e.exponent())},bt.apply(e,arguments),e}function sR(){return wh.apply(null,arguments).exponent(.5)}function N_(e){return Math.sign(e)*e*e}function cR(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function I_(){var e=hh(),t=[0,1],r=!1,n;function a(o){var i=cR(e(o));return isNaN(i)?n:r?Math.round(i):i}return a.invert=function(o){return e.invert(N_(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,ls)).map(N_)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return I_(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},bt.apply(a,arguments),Pr(a)}function $_(){var e=[],t=[],r=[],n;function a(){var i=0,s=Math.max(1,t.length);for(r=new Array(s-1);++i<s;)r[i-1]=pF(e,i/s);return o}function o(i){return i==null||isNaN(i=+i)?n:t[Ua(r,i)]}return o.invertExtent=function(i){var s=t.indexOf(i);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let s of i)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(_r),a()},o.range=function(i){return arguments.length?(t=Array.from(i),a()):t.slice()},o.unknown=function(i){return arguments.length?(n=i,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return $_().domain(e).range(t).unknown(n)},bt.apply(o,arguments)}function D_(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function i(c){return c!=null&&c<=c?a[Ua(n,c,0,r)]:o}function s(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return i}return i.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},i.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,s()):a.slice()},i.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},i.unknown=function(c){return arguments.length&&(o=c),i},i.thresholds=function(){return n.slice()},i.copy=function(){return D_().domain([e,t]).range(a).unknown(o)},bt.apply(Pr(i),arguments)}function k_(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Ua(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var i=t.indexOf(o);return[e[i-1],e[i]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return k_().domain(e).range(t).unknown(r)},bt.apply(a,arguments)}const xh=new Date,Sh=new Date;function Re(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const i=a(o),s=a.ceil(o);return o-i<s-o?i:s},a.offset=(o,i)=>(t(o=new Date(+o),i==null?1:Math.floor(i)),o),a.range=(o,i,s)=>{const c=[];if(o=a.ceil(o),s=s==null?1:Math.floor(s),!(o<i)||!(s>0))return c;let u;do c.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<i);return c},a.filter=o=>Re(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!o(i););else for(;--s>=0;)for(;t(i,1),!o(i););}),r&&(a.count=(o,i)=>(xh.setTime(+o),Sh.setTime(+i),e(xh),e(Sh),Math.floor(r(xh,Sh))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?i=>n(i)%o===0:i=>a.count(0,i)%o===0):a)),a}const vs=Re(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Re(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):vs),vs.range;const or=1e3,wt=or*60,ir=wt*60,sr=ir*24,Oh=sr*7,j_=sr*30,_h=sr*365,Hr=Re(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*or)},(e,t)=>(t-e)/or,e=>e.getUTCSeconds());Hr.range;const Ph=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or)},(e,t)=>{e.setTime(+e+t*wt)},(e,t)=>(t-e)/wt,e=>e.getMinutes());Ph.range;const Ah=Re(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*wt)},(e,t)=>(t-e)/wt,e=>e.getUTCMinutes());Ah.range;const Eh=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or-e.getMinutes()*wt)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getHours());Eh.range;const Th=Re(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCHours());Th.range;const eo=Re(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wt)/sr,e=>e.getDate()-1);eo.range;const ys=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>e.getUTCDate()-1);ys.range;const L_=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sr,e=>Math.floor(e/sr));L_.range;function Vr(e){return Re(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*wt)/Oh)}const gs=Vr(0),ms=Vr(1),uR=Vr(2),lR=Vr(3),qn=Vr(4),fR=Vr(5),dR=Vr(6);gs.range,ms.range,uR.range,lR.range,qn.range,fR.range,dR.range;function Kr(e){return Re(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Oh)}const bs=Kr(0),ws=Kr(1),pR=Kr(2),hR=Kr(3),Bn=Kr(4),vR=Kr(5),yR=Kr(6);bs.range,ws.range,pR.range,hR.range,Bn.range,vR.range,yR.range;const Ch=Re(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ch.range;const Mh=Re(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mh.range;const cr=Re(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());cr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),cr.range;const ur=Re(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());ur.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),ur.range;function q_(e,t,r,n,a,o){const i=[[Hr,1,or],[Hr,5,5*or],[Hr,15,15*or],[Hr,30,30*or],[o,1,wt],[o,5,5*wt],[o,15,15*wt],[o,30,30*wt],[a,1,ir],[a,3,3*ir],[a,6,6*ir],[a,12,12*ir],[n,1,sr],[n,2,2*sr],[r,1,Oh],[t,1,j_],[t,3,3*j_],[e,1,_h]];function s(u,f,l){const d=f<u;d&&([u,f]=[f,u]);const p=l&&typeof l.range=="function"?l:c(u,f,l),g=p?p.range(u,+f+1):[];return d?g.reverse():g}function c(u,f,l){const d=Math.abs(f-u)/l,p=eh(([,,h])=>h).right(i,d);if(p===i.length)return e.every(nh(u/_h,f/_h,l));if(p===0)return vs.every(Math.max(nh(u,f,l),1));const[g,v]=i[d/i[p-1][2]<i[p][2]/d?p-1:p];return g.every(v)}return[s,c]}const[gR,mR]=q_(ur,Mh,bs,L_,Th,Ah),[bR,wR]=q_(cr,Ch,gs,eo,Eh,Ph);function Nh(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 Ih(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 to(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function xR(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,i=e.shortDays,s=e.months,c=e.shortMonths,u=ro(a),f=no(a),l=ro(o),d=no(o),p=ro(i),g=no(i),v=ro(s),h=no(s),b=ro(c),w=no(c),x={a:R,A:B,b:q,B:j,c:null,d:U_,e:U_,f:UR,g:ez,G:rz,H:RR,I:zR,j:WR,L:G_,m:GR,M:HR,p:F,q:W,Q:Z_,s:Q_,S:VR,u:KR,U:YR,V:XR,w:ZR,W:QR,x:null,X:null,y:JR,Y:tz,Z:nz,"%":X_},O={a:V,A:Y,b:Q,B:ee,c:null,d:V_,e:V_,f:sz,g:gz,G:bz,H:az,I:oz,j:iz,L:K_,m:cz,M:uz,p:re,q:ie,Q:Z_,s:Q_,S:lz,u:fz,U:dz,V:pz,w:hz,W:vz,x:null,X:null,y:yz,Y:mz,Z:wz,"%":X_},m={a:k,A:C,b:M,B:N,c:I,d:z_,e:z_,f:LR,g:R_,G:F_,H:W_,I:W_,j:$R,L:jR,m:IR,M:DR,p:T,q:NR,Q:BR,s:FR,S:kR,u:AR,U:ER,V:TR,w:PR,W:CR,x:L,X:$,y:R_,Y:F_,Z:MR,"%":qR};x.x=S(r,x),x.X=S(n,x),x.c=S(t,x),O.x=S(r,O),O.X=S(n,O),O.c=S(t,O);function S(G,X){return function(K){var D=[],ue=-1,z=0,te=G.length,fe,be,$e;for(K instanceof Date||(K=new Date(+K));++ue<te;)G.charCodeAt(ue)===37&&(D.push(G.slice(z,ue)),(be=B_[fe=G.charAt(++ue)])!=null?fe=G.charAt(++ue):be=fe==="e"?" ":"0",($e=X[fe])&&(fe=$e(K,be)),D.push(fe),z=ue+1);return D.push(G.slice(z,ue)),D.join("")}}function P(G,X){return function(K){var D=to(1900,void 0,1),ue=E(D,G,K+="",0),z,te;if(ue!=K.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(X&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(z=Ih(to(D.y,0,1)),te=z.getUTCDay(),z=te>4||te===0?ws.ceil(z):ws(z),z=ys.offset(z,(D.V-1)*7),D.y=z.getUTCFullYear(),D.m=z.getUTCMonth(),D.d=z.getUTCDate()+(D.w+6)%7):(z=Nh(to(D.y,0,1)),te=z.getDay(),z=te>4||te===0?ms.ceil(z):ms(z),z=eo.offset(z,(D.V-1)*7),D.y=z.getFullYear(),D.m=z.getMonth(),D.d=z.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),te="Z"in D?Ih(to(D.y,0,1)).getUTCDay():Nh(to(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(te+5)%7:D.w+D.U*7-(te+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,Ih(D)):Nh(D)}}function E(G,X,K,D){for(var ue=0,z=X.length,te=K.length,fe,be;ue<z;){if(D>=te)return-1;if(fe=X.charCodeAt(ue++),fe===37){if(fe=X.charAt(ue++),be=m[fe in B_?X.charAt(ue++):fe],!be||(D=be(G,K,D))<0)return-1}else if(fe!=K.charCodeAt(D++))return-1}return D}function T(G,X,K){var D=u.exec(X.slice(K));return D?(G.p=f.get(D[0].toLowerCase()),K+D[0].length):-1}function k(G,X,K){var D=p.exec(X.slice(K));return D?(G.w=g.get(D[0].toLowerCase()),K+D[0].length):-1}function C(G,X,K){var D=l.exec(X.slice(K));return D?(G.w=d.get(D[0].toLowerCase()),K+D[0].length):-1}function M(G,X,K){var D=b.exec(X.slice(K));return D?(G.m=w.get(D[0].toLowerCase()),K+D[0].length):-1}function N(G,X,K){var D=v.exec(X.slice(K));return D?(G.m=h.get(D[0].toLowerCase()),K+D[0].length):-1}function I(G,X,K){return E(G,t,X,K)}function L(G,X,K){return E(G,r,X,K)}function $(G,X,K){return E(G,n,X,K)}function R(G){return i[G.getDay()]}function B(G){return o[G.getDay()]}function q(G){return c[G.getMonth()]}function j(G){return s[G.getMonth()]}function F(G){return a[+(G.getHours()>=12)]}function W(G){return 1+~~(G.getMonth()/3)}function V(G){return i[G.getUTCDay()]}function Y(G){return o[G.getUTCDay()]}function Q(G){return c[G.getUTCMonth()]}function ee(G){return s[G.getUTCMonth()]}function re(G){return a[+(G.getUTCHours()>=12)]}function ie(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var X=S(G+="",x);return X.toString=function(){return G},X},parse:function(G){var X=P(G+="",!1);return X.toString=function(){return G},X},utcFormat:function(G){var X=S(G+="",O);return X.toString=function(){return G},X},utcParse:function(G){var X=P(G+="",!0);return X.toString=function(){return G},X}}}var B_={"-":"",_:" ",0:"0"},Ue=/^\s*\d+/,SR=/^%/,OR=/[\\^$*+?|[\]().{}]/g;function me(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function _R(e){return e.replace(OR,"\\$&")}function ro(e){return new RegExp("^(?:"+e.map(_R).join("|")+")","i")}function no(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function PR(e,t,r){var n=Ue.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function AR(e,t,r){var n=Ue.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function ER(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function TR(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function CR(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function F_(e,t,r){var n=Ue.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function R_(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function MR(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function NR(e,t,r){var n=Ue.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function IR(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function z_(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function $R(e,t,r){var n=Ue.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function W_(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function DR(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function kR(e,t,r){var n=Ue.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function jR(e,t,r){var n=Ue.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function LR(e,t,r){var n=Ue.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function qR(e,t,r){var n=SR.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function BR(e,t,r){var n=Ue.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FR(e,t,r){var n=Ue.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function U_(e,t){return me(e.getDate(),t,2)}function RR(e,t){return me(e.getHours(),t,2)}function zR(e,t){return me(e.getHours()%12||12,t,2)}function WR(e,t){return me(1+eo.count(cr(e),e),t,3)}function G_(e,t){return me(e.getMilliseconds(),t,3)}function UR(e,t){return G_(e,t)+"000"}function GR(e,t){return me(e.getMonth()+1,t,2)}function HR(e,t){return me(e.getMinutes(),t,2)}function VR(e,t){return me(e.getSeconds(),t,2)}function KR(e){var t=e.getDay();return t===0?7:t}function YR(e,t){return me(gs.count(cr(e)-1,e),t,2)}function H_(e){var t=e.getDay();return t>=4||t===0?qn(e):qn.ceil(e)}function XR(e,t){return e=H_(e),me(qn.count(cr(e),e)+(cr(e).getDay()===4),t,2)}function ZR(e){return e.getDay()}function QR(e,t){return me(ms.count(cr(e)-1,e),t,2)}function JR(e,t){return me(e.getFullYear()%100,t,2)}function ez(e,t){return e=H_(e),me(e.getFullYear()%100,t,2)}function tz(e,t){return me(e.getFullYear()%1e4,t,4)}function rz(e,t){var r=e.getDay();return e=r>=4||r===0?qn(e):qn.ceil(e),me(e.getFullYear()%1e4,t,4)}function nz(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+me(t/60|0,"0",2)+me(t%60,"0",2)}function V_(e,t){return me(e.getUTCDate(),t,2)}function az(e,t){return me(e.getUTCHours(),t,2)}function oz(e,t){return me(e.getUTCHours()%12||12,t,2)}function iz(e,t){return me(1+ys.count(ur(e),e),t,3)}function K_(e,t){return me(e.getUTCMilliseconds(),t,3)}function sz(e,t){return K_(e,t)+"000"}function cz(e,t){return me(e.getUTCMonth()+1,t,2)}function uz(e,t){return me(e.getUTCMinutes(),t,2)}function lz(e,t){return me(e.getUTCSeconds(),t,2)}function fz(e){var t=e.getUTCDay();return t===0?7:t}function dz(e,t){return me(bs.count(ur(e)-1,e),t,2)}function Y_(e){var t=e.getUTCDay();return t>=4||t===0?Bn(e):Bn.ceil(e)}function pz(e,t){return e=Y_(e),me(Bn.count(ur(e),e)+(ur(e).getUTCDay()===4),t,2)}function hz(e){return e.getUTCDay()}function vz(e,t){return me(ws.count(ur(e)-1,e),t,2)}function yz(e,t){return me(e.getUTCFullYear()%100,t,2)}function gz(e,t){return e=Y_(e),me(e.getUTCFullYear()%100,t,2)}function mz(e,t){return me(e.getUTCFullYear()%1e4,t,4)}function bz(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Bn(e):Bn.ceil(e),me(e.getUTCFullYear()%1e4,t,4)}function wz(){return"+0000"}function X_(){return"%"}function Z_(e){return+e}function Q_(e){return Math.floor(+e/1e3)}var Fn,J_,eP;xz({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"]});function xz(e){return Fn=xR(e),J_=Fn.format,Fn.parse,eP=Fn.utcFormat,Fn.utcParse,Fn}function Sz(e){return new Date(e)}function Oz(e){return e instanceof Date?+e:+new Date(+e)}function $h(e,t,r,n,a,o,i,s,c,u){var f=hh(),l=f.invert,d=f.domain,p=u(".%L"),g=u(":%S"),v=u("%I:%M"),h=u("%I %p"),b=u("%a %d"),w=u("%b %d"),x=u("%B"),O=u("%Y");function m(S){return(c(S)<S?p:s(S)<S?g:i(S)<S?v:o(S)<S?h:n(S)<S?a(S)<S?b:w:r(S)<S?x:O)(S)}return f.invert=function(S){return new Date(l(S))},f.domain=function(S){return arguments.length?d(Array.from(S,Oz)):d().map(Sz)},f.ticks=function(S){var P=d();return e(P[0],P[P.length-1],S??10)},f.tickFormat=function(S,P){return P==null?m:u(P)},f.nice=function(S){var P=d();return(!S||typeof S.range!="function")&&(S=t(P[0],P[P.length-1],S??10)),S?d(S_(P,S)):f},f.copy=function(){return Qa(f,$h(e,t,r,n,a,o,i,s,c,u))},f}function _z(){return bt.apply($h(bR,wR,cr,Ch,gs,eo,Eh,Ph,Hr,J_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Pz(){return bt.apply($h(gR,mR,ur,Mh,bs,ys,Th,Ah,Hr,eP).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xs(){var e=0,t=1,r,n,a,o,i=tt,s=!1,c;function u(l){return l==null||isNaN(l=+l)?c:i(a===0?.5:(l=(o(l)-r)*a,s?Math.max(0,Math.min(1,l)):l))}u.domain=function(l){return arguments.length?([e,t]=l,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(l){return arguments.length?(s=!!l,u):s},u.interpolator=function(l){return arguments.length?(i=l,u):i};function f(l){return function(d){var p,g;return arguments.length?([p,g]=d,i=l(p,g),u):[i(0),i(1)]}}return u.range=f(jn),u.rangeRound=f(dh),u.unknown=function(l){return arguments.length?(c=l,u):c},function(l){return o=l,r=l(e),n=l(t),a=r===n?0:1/(n-r),u}}function Ar(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function tP(){var e=Pr(xs()(tt));return e.copy=function(){return Ar(e,tP())},ar.apply(e,arguments)}function rP(){var e=gh(xs()).domain([1,10]);return e.copy=function(){return Ar(e,rP()).base(e.base())},ar.apply(e,arguments)}function nP(){var e=mh(xs());return e.copy=function(){return Ar(e,nP()).constant(e.constant())},ar.apply(e,arguments)}function Dh(){var e=bh(xs());return e.copy=function(){return Ar(e,Dh()).exponent(e.exponent())},ar.apply(e,arguments)}function Az(){return Dh.apply(null,arguments).exponent(.5)}function aP(){var e=[],t=tt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ua(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(_r),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>dF(e,o/n))},r.copy=function(){return aP(t).domain(e)},ar.apply(r,arguments)}function Ss(){var e=0,t=.5,r=1,n=1,a,o,i,s,c,u=tt,f,l=!1,d;function p(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-o)*(n*v<n*o?s:c),u(l?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,r]=v,a=f(e=+e),o=f(t=+t),i=f(r=+r),s=a===o?0:.5/(o-a),c=o===i?0:.5/(i-o),n=o<a?-1:1,p):[e,t,r]},p.clamp=function(v){return arguments.length?(l=!!v,p):l},p.interpolator=function(v){return arguments.length?(u=v,p):u};function g(v){return function(h){var b,w,x;return arguments.length?([b,w,x]=h,u=qF(v,[b,w,x]),p):[u(0),u(.5),u(1)]}}return p.range=g(jn),p.rangeRound=g(dh),p.unknown=function(v){return arguments.length?(d=v,p):d},function(v){return f=v,a=v(e),o=v(t),i=v(r),s=a===o?0:.5/(o-a),c=o===i?0:.5/(i-o),n=o<a?-1:1,p}}function oP(){var e=Pr(Ss()(tt));return e.copy=function(){return Ar(e,oP())},ar.apply(e,arguments)}function iP(){var e=gh(Ss()).domain([.1,1,10]);return e.copy=function(){return Ar(e,iP()).base(e.base())},ar.apply(e,arguments)}function sP(){var e=mh(Ss());return e.copy=function(){return Ar(e,sP()).constant(e.constant())},ar.apply(e,arguments)}function kh(){var e=bh(Ss());return e.copy=function(){return Ar(e,kh()).exponent(e.exponent())},ar.apply(e,arguments)}function Ez(){return kh.apply(null,arguments).exponent(.5)}const cP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ha,scaleDiverging:oP,scaleDivergingLog:iP,scaleDivergingPow:kh,scaleDivergingSqrt:Ez,scaleDivergingSymlog:sP,scaleIdentity:x_,scaleImplicit:ah,scaleLinear:hs,scaleLog:A_,scaleOrdinal:oh,scalePoint:Va,scalePow:wh,scaleQuantile:$_,scaleQuantize:D_,scaleRadial:I_,scaleSequential:tP,scaleSequentialLog:rP,scaleSequentialPow:Dh,scaleSequentialQuantile:aP,scaleSequentialSqrt:Az,scaleSequentialSymlog:nP,scaleSqrt:sR,scaleSymlog:C_,scaleThreshold:k_,scaleTime:_z,scaleUtc:Pz,tickFormat:w_},Symbol.toStringTag,{value:"Module"}));var jh,uP;function lP(){if(uP)return jh;uP=1;var e=xn();function t(r,n,a){for(var o=-1,i=r.length;++o<i;){var s=r[o],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,f=s}return f}return jh=t,jh}var Lh,fP;function Tz(){if(fP)return Lh;fP=1;function e(t,r){return t>r}return Lh=e,Lh}var qh,dP;function Cz(){if(dP)return qh;dP=1;var e=lP(),t=Tz(),r=En();function n(a){return a&&a.length?e(a,r,t):void 0}return qh=n,qh}var Mz=Cz();const Er=Te(Mz);var Bh,pP;function Nz(){if(pP)return Bh;pP=1;function e(t,r){return t<r}return Bh=e,Bh}var Fh,hP;function Iz(){if(hP)return Fh;hP=1;var e=lP(),t=Nz(),r=En();function n(a){return a&&a.length?e(a,r,t):void 0}return Fh=n,Fh}var $z=Iz();const Os=Te($z);var Rh,vP;function Dz(){if(vP)return Rh;vP=1;var e=rf(),t=Or(),r=GS(),n=nt();function a(o,i){var s=n(o)?e:r;return s(o,t(i,3))}return Rh=a,Rh}var zh,yP;function kz(){if(yP)return zh;yP=1;var e=LS(),t=Dz();function r(n,a){return e(t(n,a),1)}return zh=r,zh}var jz=kz();const Lz=Te(jz);var Wh,gP;function qz(){if(gP)return Wh;gP=1;var e=Wd();function t(r,n){return e(r,n)}return Wh=t,Wh}var Bz=qz();const ao=Te(Bz);var Rn=1e9,Fz={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Hh,Ne=!0,xt="[DecimalError] ",Yr=xt+"Invalid argument: ",Uh=xt+"Exponent out of range: ",zn=Math.floor,Xr=Math.pow,Rz=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ut,Ge=1e7,Me=7,mP=9007199254740991,_s=zn(mP/Me),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,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(n=o.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Me;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return Ee(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return qe(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(ut))throw Error(xt+"NaN");if(r.s<1)throw Error(xt+(r.s?"NaN":"-Infinity"));return r.eq(ut)?new n(0):(Ne=!1,t=lr(oo(r,o),oo(e,o),o),Ne=!0,Ee(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SP(t,e):bP(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(xt+"NaN");return r.s?(Ne=!1,t=lr(r,e,0,1).times(e),Ne=!0,r.minus(t)):Ee(new n(r),a)},ne.naturalExponential=ne.exp=function(){return wP(this)},ne.naturalLogarithm=ne.ln=function(){return oo(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?bP(t,e):SP(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yr+e);if(t=qe(a)+1,n=a.d.length-1,r=n*Me+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,o,i,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(xt+"NaN")}for(e=qe(s),Ne=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Ht(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=zn((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=i=r+3;;)if(o=n,n=o.plus(lr(s,o,i+2)).times(.5),Ht(o.d).slice(0,i)===(t=Ht(n.d)).slice(0,i)){if(t=t.slice(i-3,i+1),a==i&&t=="4999"){if(Ee(o,r+1,0),o.times(o).eq(s)){n=o;break}}else if(t!="9999")break;i+=4}return Ne=!0,Ee(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,o,i,s,c,u,f=this,l=f.constructor,d=f.d,p=(e=new l(e)).d;if(!f.s||!e.s)return new l(0);for(e.s*=f.s,r=f.e+e.e,c=d.length,u=p.length,c<u&&(o=d,d=p,p=o,i=c,c=u,u=i),o=[],i=c+u,n=i;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)s=o[a]+p[n]*d[a-n-1]+t,o[a--]=s%Ge|0,t=s/Ge|0;o[a]=(o[a]+t)%Ge|0}for(;!o[--i];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,Ne?Ee(e,l.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Gt(e,0,Rn),t===void 0?t=n.rounding:Gt(t,0,8),Ee(r,e+qe(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Zr(n,!0):(Gt(e,0,Rn),t===void 0?t=a.rounding:Gt(t,0,8),n=Ee(new a(n),e+1,t),r=Zr(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?Zr(a):(Gt(e,0,Rn),t===void 0?t=o.rounding:Gt(t,0,8),n=Ee(new o(a),e+qe(a)+1,t),r=Zr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ee(new t(e),qe(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,o,i,s=this,c=s.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(ut);if(s=new c(s),!s.s){if(e.s<1)throw Error(xt+"Infinity");return s}if(s.eq(ut))return s;if(n=c.precision,e.eq(ut))return Ee(s,n);if(t=e.e,r=e.d.length-1,i=t>=r,o=s.s,i){if((r=f<0?-f:f)<=mP){for(a=new c(ut),t=Math.ceil(n/Me+4),Ne=!1;r%2&&(a=a.times(s),OP(a.d,t)),r=zn(r/2),r!==0;)s=s.times(s),OP(s.d,t);return Ne=!0,e.s<0?new c(ut).div(a):Ee(a,n)}}else if(o<0)throw Error(xt+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ne=!1,a=e.times(oo(s,n+u)),Ne=!0,a=wP(a),a.s=o,a},ne.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=qe(a),n=Zr(a,r<=o.toExpNeg||r>=o.toExpPos)):(Gt(e,1,Rn),t===void 0?t=o.rounding:Gt(t,0,8),a=Ee(new o(a),e,t),r=qe(a),n=Zr(a,e<=r||r<=o.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Gt(e,1,Rn),t===void 0?t=n.rounding:Gt(t,0,8)),Ee(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qe(e),r=e.constructor;return Zr(e,t<=r.toExpNeg||t>=r.toExpPos)};function bP(e,t){var r,n,a,o,i,s,c,u,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ne?Ee(t,l):t;if(c=e.d,u=t.d,i=e.e,a=t.e,c=c.slice(),o=i-a,o){for(o<0?(n=c,o=-o,s=u.length):(n=u,a=i,s=c.length),i=Math.ceil(l/Me),s=i>s?i+1:s+1,o>s&&(o=s,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(s=c.length,o=u.length,s-o<0&&(o=s,n=u,u=c,c=n),r=0;o;)r=(c[--o]=c[o]+u[o]+r)/Ge|0,c[o]%=Ge;for(r&&(c.unshift(r),++a),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=a,Ne?Ee(t,l):t}function Gt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Yr+e)}function Ht(e){var t,r,n,a=e.length-1,o="",i=e[0];if(a>0){for(o+=i,t=1;t<a;t++)n=e[t]+"",r=Me-n.length,r&&(o+=Tr(r)),o+=n;i=e[t],n=i+"",r=Me-n.length,r&&(o+=Tr(r))}else if(i===0)return"0";for(;i%10===0;)i/=10;return o+i}var lr=function(){function e(n,a){var o,i=0,s=n.length;for(n=n.slice();s--;)o=n[s]*a+i,n[s]=o%Ge|0,i=o/Ge|0;return i&&n.unshift(i),n}function t(n,a,o,i){var s,c;if(o!=i)c=o>i?1:-1;else for(s=c=0;s<o;s++)if(n[s]!=a[s]){c=n[s]>a[s]?1:-1;break}return c}function r(n,a,o){for(var i=0;o--;)n[o]-=i,i=n[o]<a[o]?1:0,n[o]=i*Ge+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,i){var s,c,u,f,l,d,p,g,v,h,b,w,x,O,m,S,P,E,T=n.constructor,k=n.s==a.s?1:-1,C=n.d,M=a.d;if(!n.s)return new T(n);if(!a.s)throw Error(xt+"Division by zero");for(c=n.e-a.e,P=M.length,m=C.length,p=new T(k),g=p.d=[],u=0;M[u]==(C[u]||0);)++u;if(M[u]>(C[u]||0)&&--c,o==null?w=o=T.precision:i?w=o+(qe(n)-qe(a))+1:w=o,w<0)return new T(0);if(w=w/Me+2|0,u=0,P==1)for(f=0,M=M[0],w++;(u<m||f)&&w--;u++)x=f*Ge+(C[u]||0),g[u]=x/M|0,f=x%M|0;else{for(f=Ge/(M[0]+1)|0,f>1&&(M=e(M,f),C=e(C,f),P=M.length,m=C.length),O=P,v=C.slice(0,P),h=v.length;h<P;)v[h++]=0;E=M.slice(),E.unshift(0),S=M[0],M[1]>=Ge/2&&++S;do f=0,s=t(M,v,P,h),s<0?(b=v[0],P!=h&&(b=b*Ge+(v[1]||0)),f=b/S|0,f>1?(f>=Ge&&(f=Ge-1),l=e(M,f),d=l.length,h=v.length,s=t(l,v,d,h),s==1&&(f--,r(l,P<d?E:M,d))):(f==0&&(s=f=1),l=M.slice()),d=l.length,d<h&&l.unshift(0),r(v,l,h),s==-1&&(h=v.length,s=t(M,v,P,h),s<1&&(f++,r(v,P<h?E:M,h))),h=v.length):s===0&&(f++,v=[0]),g[u++]=f,s&&v[0]?v[h++]=C[O]||0:(v=[C[O]],h=1);while((O++<m||v[0]!==void 0)&&w--)}return g[0]||g.shift(),p.e=c,Ee(p,i?o+qe(p)+1:o)}}();function wP(e,t){var r,n,a,o,i,s,c=0,u=0,f=e.constructor,l=f.precision;if(qe(e)>16)throw Error(Uh+qe(e));if(!e.s)return new f(ut);for(Ne=!1,s=l,i=new f(.03125);e.abs().gte(.1);)e=e.times(i),u+=5;for(n=Math.log(Xr(2,u))/Math.LN10*2+5|0,s+=n,r=a=o=new f(ut),f.precision=s;;){if(a=Ee(a.times(e),s),r=r.times(++c),i=o.plus(lr(a,r,s)),Ht(i.d).slice(0,s)===Ht(o.d).slice(0,s)){for(;u--;)o=Ee(o.times(o),s);return f.precision=l,t==null?(Ne=!0,Ee(o,l)):o}o=i}}function qe(e){for(var t=e.e*Me,r=e.d[0];r>=10;r/=10)t++;return t}function Gh(e,t,r){if(t>e.LN10.sd())throw Ne=!0,r&&(e.precision=r),Error(xt+"LN10 precision limit exceeded");return Ee(new e(e.LN10),t)}function Tr(e){for(var t="";e--;)t+="0";return t}function oo(e,t){var r,n,a,o,i,s,c,u,f,l=1,d=10,p=e,g=p.d,v=p.constructor,h=v.precision;if(p.s<1)throw Error(xt+(p.s?"NaN":"-Infinity"));if(p.eq(ut))return new v(0);if(t==null?(Ne=!1,u=h):u=t,p.eq(10))return t==null&&(Ne=!0),Gh(v,u);if(u+=d,v.precision=u,r=Ht(g),n=r.charAt(0),o=qe(p),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Ht(p.d),n=r.charAt(0),l++;o=qe(p),n>1?(p=new v("0."+r),o++):p=new v(n+"."+r.slice(1))}else return c=Gh(v,u+2,h).times(o+""),p=oo(new v(n+"."+r.slice(1)),u-d).plus(c),v.precision=h,t==null?(Ne=!0,Ee(p,h)):p;for(s=i=p=lr(p.minus(ut),p.plus(ut),u),f=Ee(p.times(p),u),a=3;;){if(i=Ee(i.times(f),u),c=s.plus(lr(i,new v(a),u)),Ht(c.d).slice(0,u)===Ht(s.d).slice(0,u))return s=s.times(2),o!==0&&(s=s.plus(Gh(v,u+2,h).times(o+""))),s=lr(s,new v(l),u),v.precision=h,t==null?(Ne=!0,Ee(s,h)):s;s=c,a+=2}}function xP(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=zn(r/Me),e.d=[],n=(r+1)%Me,r<0&&(n+=Me),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Me;n<a;)e.d.push(+t.slice(n,n+=Me));t=t.slice(n),n=Me-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Ne&&(e.e>_s||e.e<-_s))throw Error(Uh+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ee(e,t,r){var n,a,o,i,s,c,u,f,l=e.d;for(i=1,o=l[0];o>=10;o/=10)i++;if(n=t-i,n<0)n+=Me,a=t,u=l[f=0];else{if(f=Math.ceil((n+1)/Me),o=l.length,f>=o)return e;for(u=o=l[f],i=1;o>=10;o/=10)i++;n%=Me,a=n-Me+i}if(r!==void 0&&(o=Xr(10,i-a-1),s=u/o%10|0,c=t<0||l[f+1]!==void 0||u%o,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?a>0?u/Xr(10,i-a):0:l[f-1])%10&1||r==(e.s<0?8:7))),t<1||!l[0])return c?(o=qe(e),l.length=1,t=t-o-1,l[0]=Xr(10,(Me-t%Me)%Me),e.e=zn(-t/Me)||0):(l.length=1,l[0]=e.e=e.s=0),e;if(n==0?(l.length=f,o=1,f--):(l.length=f+1,o=Xr(10,Me-n),l[f]=a>0?(u/Xr(10,i-a)%Xr(10,a)|0)*o:0),c)for(;;)if(f==0){(l[0]+=o)==Ge&&(l[0]=1,++e.e);break}else{if(l[f]+=o,l[f]!=Ge)break;l[f--]=0,o=1}for(n=l.length;l[--n]===0;)l.pop();if(Ne&&(e.e>_s||e.e<-_s))throw Error(Uh+qe(e));return e}function SP(e,t){var r,n,a,o,i,s,c,u,f,l,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ne?Ee(t,p):t;if(c=e.d,l=t.d,n=t.e,u=e.e,c=c.slice(),i=u-n,i){for(f=i<0,f?(r=c,i=-i,s=l.length):(r=l,n=u,s=c.length),a=Math.max(Math.ceil(p/Me),s)+2,i>a&&(i=a,r.length=1),r.reverse(),a=i;a--;)r.push(0);r.reverse()}else{for(a=c.length,s=l.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(c[a]!=l[a]){f=c[a]<l[a];break}i=0}for(f&&(r=c,c=l,l=r,t.s=-t.s),s=c.length,a=l.length-s;a>0;--a)c[s++]=0;for(a=l.length;a>i;){if(c[--a]<l[a]){for(o=a;o&&c[--o]===0;)c[o]=Ge-1;--c[o],c[a]+=Ge}c[a]-=l[a]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,Ne?Ee(t,p):t):new d(0)}function Zr(e,t,r){var n,a=qe(e),o=Ht(e.d),i=o.length;return t?(r&&(n=r-i)>0?o=o.charAt(0)+"."+o.slice(1)+Tr(n):i>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Tr(-a-1)+o,r&&(n=r-i)>0&&(o+=Tr(n))):a>=i?(o+=Tr(a+1-i),r&&(n=r-a-1)>0&&(o=o+"."+Tr(n))):((n=a+1)<i&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-i)>0&&(a+1===i&&(o+="."),o+=Tr(n))),e.s<0?"-"+o:o}function OP(e,t){if(e.length>t)return e.length=t,!0}function _P(e){var t,r,n;function a(o){var i=this;if(!(i instanceof a))return new a(o);if(i.constructor=a,o instanceof a){i.s=o.s,i.e=o.e,i.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Yr+o);if(o>0)i.s=1;else if(o<0)o=-o,i.s=-1;else{i.s=0,i.e=0,i.d=[0];return}if(o===~~o&&o<1e7){i.e=0,i.d=[o];return}return xP(i,o.toString())}else if(typeof o!="string")throw Error(Yr+o);if(o.charCodeAt(0)===45?(o=o.slice(1),i.s=-1):i.s=1,Rz.test(o))xP(i,o);else throw Error(Yr+o)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=_P,a.config=a.set=zz,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function zz(e){if(!e||typeof e!="object")throw Error(xt+"Object expected");var t,r,n,a=["precision",1,Rn,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(zn(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Yr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Yr+r+": "+n);return this}var Hh=_P(Fz);ut=new Hh(1);const Ae=Hh;function Wz(e){return Vz(e)||Hz(e)||Gz(e)||Uz()}function Uz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
222
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gz(e,t){if(e){if(typeof e=="string")return Vh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vh(e,t)}}function Hz(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Vz(e){if(Array.isArray(e))return Vh(e)}function Vh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Kz=function(t){return t},PP={},AP=function(t){return t===PP},EP=function(t){return function r(){return arguments.length===0||arguments.length===1&&AP(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Yz=function e(t,r){return t===1?r:EP(function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];var i=a.filter(function(s){return s!==PP}).length;return i>=t?r.apply(void 0,a):e(t-i,EP(function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=a.map(function(l){return AP(l)?c.shift():l});return r.apply(void 0,Wz(f).concat(c))}))})},Ps=function(t){return Yz(t.length,t)},Kh=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},Xz=Ps(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Zz=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return Kz;var a=r.reverse(),o=a[0],i=a.slice(1);return function(){return i.reduce(function(s,c){return c(s)},o.apply(void 0,arguments))}},Yh=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},TP=function(t){var r=null,n=null;return function(){for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r&&o.every(function(s,c){return s===r[c]})||(r=o,n=t.apply(void 0,o)),n}};function Qz(e){var t;return e===0?t=1:t=Math.floor(new Ae(e).abs().log(10).toNumber())+1,t}function Jz(e,t,r){for(var n=new Ae(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}var eW=Ps(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),tW=Ps(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),rW=Ps(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const As={rangeStep:Jz,getDigitCount:Qz,interpolateNumber:eW,uninterpolateNumber:tW,uninterpolateTruncation:rW};function Xh(e){return oW(e)||aW(e)||CP(e)||nW()}function nW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
223
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aW(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function oW(e){if(Array.isArray(e))return Zh(e)}function io(e,t){return cW(e)||sW(e,t)||CP(e,t)||iW()}function iW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
224
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CP(e,t){if(e){if(typeof e=="string")return Zh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zh(e,t)}}function Zh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sW(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=e[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(c){a=!0,o=c}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function cW(e){if(Array.isArray(e))return e}function MP(e){var t=io(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]}function NP(e,t,r){if(e.lte(0))return new Ae(0);var n=As.getDigitCount(e.toNumber()),a=new Ae(10).pow(n),o=e.div(a),i=n!==1?.05:.1,s=new Ae(Math.ceil(o.div(i).toNumber())).add(r).mul(i),c=s.mul(a);return t?c:new Ae(Math.ceil(c))}function uW(e,t,r){var n=1,a=new Ae(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ae(10).pow(As.getDigitCount(e)-1),a=new Ae(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ae(Math.floor(e)))}else e===0?a=new Ae(Math.floor((t-1)/2)):r||(a=new Ae(Math.floor(e)));var i=Math.floor((t-1)/2),s=Zz(Xz(function(c){return a.add(new Ae(c-i).mul(n)).toNumber()}),Kh);return s(0,t)}function IP(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ae(0),tickMin:new Ae(0),tickMax:new Ae(0)};var o=NP(new Ae(t).sub(e).div(r-1),n,a),i;e<=0&&t>=0?i=new Ae(0):(i=new Ae(e).add(t).div(2),i=i.sub(new Ae(i).mod(o)));var s=Math.ceil(i.sub(e).div(o).toNumber()),c=Math.ceil(new Ae(t).sub(i).div(o).toNumber()),u=s+c+1;return u>r?IP(e,t,r,n,a+1):(u<r&&(c=t>0?c+(r-u):c,s=t>0?s:s+(r-u)),{step:o,tickMin:i.sub(new Ae(s).mul(o)),tickMax:i.add(new Ae(c).mul(o))})}function lW(e){var t=io(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),s=MP([r,n]),c=io(s,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var l=f===1/0?[u].concat(Xh(Kh(0,a-1).map(function(){return 1/0}))):[].concat(Xh(Kh(0,a-1).map(function(){return-1/0})),[f]);return r>n?Yh(l):l}if(u===f)return uW(u,a,o);var d=IP(u,f,i,o),p=d.step,g=d.tickMin,v=d.tickMax,h=As.rangeStep(g,v.add(new Ae(.1).mul(p)),p);return r>n?Yh(h):h}function fW(e,t){var r=io(e,2),n=r[0],a=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=MP([n,a]),s=io(i,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[n,a];if(c===u)return[c];var f=Math.max(t,2),l=NP(new Ae(u).sub(c).div(f-1),o,0),d=[].concat(Xh(As.rangeStep(new Ae(c),new Ae(u).sub(new Ae(.99).mul(l)),l)),[u]);return n>a?Yh(d):d}var dW=TP(lW),pW=TP(fW),hW=process.env.NODE_ENV==="production",Qh="Invariant failed";function ot(e,t){if(hW)throw new Error(Qh);var r=typeof t=="function"?t():t,n=r?"".concat(Qh,": ").concat(r):Qh;throw new Error(n)}var vW=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Es.apply(this,arguments)}function yW(e,t){return wW(e)||bW(e,t)||mW(e,t)||gW()}function gW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
225
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mW(e,t){if(e){if(typeof e=="string")return $P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $P(e,t)}}function $P(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function wW(e){if(Array.isArray(e))return e}function xW(e,t){if(e==null)return{};var r=SW(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _W(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jP(n.key),n)}}function PW(e,t,r){return t&&_W(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AW(e,t,r){return t=Ts(t),EW(e,DP()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function EW(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TW(e)}function TW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DP=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function CW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jh(e,t)}function Jh(e,t){return Jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jh(e,t)}function kP(e,t,r){return t=jP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jP(e){var t=MW(e,"string");return Wn(t)=="symbol"?t:t+""}function MW(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cs=function(e){function t(){return OW(this,t),AW(this,t,arguments)}return CW(t,e),PW(t,[{key:"render",value:function(){var n=this.props,a=n.offset,o=n.layout,i=n.width,s=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,l=n.yAxis,d=xW(n,vW),p=pe(d,!1);this.props.direction==="x"&&f.type!=="number"&&(process.env.NODE_ENV!=="production"?ot(!1,'ErrorBar requires Axis type property to be "number".'):ot());var g=c.map(function(v){var h=u(v,s),b=h.x,w=h.y,x=h.value,O=h.errorVal;if(!O)return null;var m=[],S,P;if(Array.isArray(O)){var E=yW(O,2);S=E[0],P=E[1]}else S=P=O;if(o==="vertical"){var T=f.scale,k=w+a,C=k+i,M=k-i,N=T(x-S),I=T(x+P);m.push({x1:I,y1:C,x2:I,y2:M}),m.push({x1:N,y1:k,x2:I,y2:k}),m.push({x1:N,y1:C,x2:N,y2:M})}else if(o==="horizontal"){var L=l.scale,$=b+a,R=$-i,B=$+i,q=L(x-S),j=L(x+P);m.push({x1:R,y1:j,x2:B,y2:j}),m.push({x1:$,y1:q,x2:$,y2:j}),m.push({x1:R,y1:q,x2:B,y2:q})}return A.createElement(Ie,Es({className:"recharts-errorBar",key:"bar-".concat(m.map(function(F){return"".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))},p),m.map(function(F){return A.createElement("line",Es({},F,{key:"line-".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))}))});return A.createElement(Ie,{className:"recharts-errorBars"},g)}}])}(A.Component);kP(Cs,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),kP(Cs,"displayName","ErrorBar");function so(e){"@babel/helpers - typeof";return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},so(e)}function LP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(r),!0).forEach(function(n){NW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NW(e,t,r){return t=IW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IW(e){var t=$W(e,"string");return so(t)=="symbol"?t:t+""}function $W(e,t){if(so(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(so(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qP=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,i=ct(r,Cn);if(!i)return null;var s=Cn.defaultProps,c=s!==void 0?Qr(Qr({},s),i.props):{},u;return i.props&&i.props.payload?u=i.props&&i.props.payload:o==="children"?u=(n||[]).reduce(function(f,l){var d=l.item,p=l.props,g=p.sectors||p.data||[];return f.concat(g.map(function(v){return{type:i.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(n||[]).map(function(f){var l=f.item,d=l.type.defaultProps,p=d!==void 0?Qr(Qr({},d),l.props):{},g=p.dataKey,v=p.name,h=p.legendType,b=p.hide;return{inactive:b,dataKey:g,type:c.iconType||h||"square",color:tv(l),value:v||g,payload:p}}),Qr(Qr(Qr({},c),Cn.getWithHeight(i,a)),{},{payload:u,item:i})};function co(e){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(e)}function BP(e){return LW(e)||jW(e)||kW(e)||DW()}function DW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
226
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kW(e,t){if(e){if(typeof e=="string")return ev(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ev(e,t)}}function jW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LW(e){if(Array.isArray(e))return ev(e)}function ev(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){Un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Un(e,t,r){return t=qW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qW(e){var t=BW(e,"string");return co(t)=="symbol"?t:t+""}function BW(e,t){if(co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(co(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lt(e,t,r){return ve(e)||ve(t)?r:Fe(t)?vt(e,t,r):de(t)?t(e):r}function uo(e,t,r,n){var a=Lz(e,function(s){return lt(s,t)});if(r==="number"){var o=a.filter(function(s){return Z(s)||parseFloat(s)});return o.length?[Os(o),Er(o)]:[1/0,-1/0]}var i=n?a.filter(function(s){return!ve(s)}):a;return i.map(function(s){return Fe(s)||s instanceof Date?s:""})}var FW=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,u=0;u<s;u++){var f=u>0?a[u-1].coordinate:a[s-1].coordinate,l=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Tt(l-f)!==Tt(d-l)){var g=[];if(Tt(d-l)===Tt(c[1]-c[0])){p=d;var v=l+c[1]-c[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{p=f;var h=d+c[1]-c[0];g[0]=Math.min(l,(h+l)/2),g[1]=Math.max(l,(h+l)/2)}var b=[Math.min(l,(p+l)/2),Math.max(l,(p+l)/2)];if(t>b[0]&&t<=b[1]||t>=g[0]&&t<=g[1]){i=a[u].index;break}}else{var w=Math.min(f,d),x=Math.max(f,d);if(t>(w+l)/2&&t<=(x+l)/2){i=a[u].index;break}}}else for(var O=0;O<s;O++)if(O===0&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){i=n[O].index;break}return i},tv=function(t){var r,n=t,a=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ke(ke({},t.type.defaultProps),t.props):t.props,i=o.stroke,s=o.fill,c;switch(a){case"Line":c=i;break;case"Area":case"Radar":c=i&&i!=="none"?i:s;break;default:c=s;break}return c},RW=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var i={},s=Object.keys(o),c=0,u=s.length;c<u;c++)for(var f=o[s[c]].stackGroups,l=Object.keys(f),d=0,p=l.length;d<p;d++){var g=f[l[d]],v=g.items,h=g.cateAxisId,b=v.filter(function(P){return tr(P.type).indexOf("Bar")>=0});if(b&&b.length){var w=b[0].type.defaultProps,x=w!==void 0?ke(ke({},w),b[0].props):b[0].props,O=x.barSize,m=x[h];i[m]||(i[m]=[]);var S=ve(O)?r:O;i[m].push({item:b[0],stackList:b.slice(1),barSize:ve(S)?void 0:zr(S,n,0)})}}return i},zW=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,o=t.sizeList,i=o===void 0?[]:o,s=t.maxBarSize,c=i.length;if(c<1)return null;var u=zr(r,a,0,!0),f,l=[];if(i[0].barSize===+i[0].barSize){var d=!1,p=a/c,g=i.reduce(function(O,m){return O+m.barSize||0},0);g+=(c-1)*u,g>=a&&(g-=(c-1)*u,u=0),g>=a&&p>0&&(d=!0,p*=.9,g=c*p);var v=(a-g)/2>>0,h={offset:v-u,size:0};f=i.reduce(function(O,m){var S={item:m.item,position:{offset:h.offset+h.size+u,size:d?p:m.barSize}},P=[].concat(BP(O),[S]);return h=P[P.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(E){P.push({item:E,position:h})}),P},l)}else{var b=zr(n,a,0,!0);a-2*b-(c-1)*u<=0&&(u=0);var w=(a-2*b-(c-1)*u)/c;w>1&&(w>>=0);var x=s===+s?Math.min(w,s):w;f=i.reduce(function(O,m,S){var P=[].concat(BP(O),[{item:m.item,position:{offset:b+(w+u)*S+(w-x)/2,size:x}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},l)}return f},WW=function(t,r,n,a){var o=n.children,i=n.width,s=n.margin,c=i-(s.left||0)-(s.right||0),u=qP({children:o,legendWidth:c});if(u){var f=a||{},l=f.width,d=f.height,p=u.align,g=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&p!=="center"&&Z(t[p]))return ke(ke({},t),{},Un({},p,t[p]+(l||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&g!=="middle"&&Z(t[g]))return ke(ke({},t),{},Un({},g,t[g]+(d||0)))}return t},UW=function(t,r,n){return ve(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},RP=function(t,r,n,a,o){var i=r.props.children,s=Ct(i,Cs).filter(function(u){return UW(a,o,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var l=lt(f,n);if(ve(l))return u;var d=Array.isArray(l)?[Os(l),Er(l)]:[l,l],p=c.reduce(function(g,v){var h=lt(f,v,0),b=d[0]-Math.abs(Array.isArray(h)?h[0]:h),w=d[1]+Math.abs(Array.isArray(h)?h[1]:h);return[Math.min(b,g[0]),Math.max(w,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},GW=function(t,r,n,a,o){var i=r.map(function(s){return RP(t,s,n,o,a)}).filter(function(s){return!ve(s)});return i&&i.length?i.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},zP=function(t,r,n,a,o){var i=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&RP(t,c,u,a)||uo(t,u,n,o)});if(n==="number")return i.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return i.reduce(function(c,u){for(var f=0,l=u.length;f<l;f++)s[u[f]]||(s[u[f]]=!0,c.push(u[f]));return c},[])},WP=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},UP=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var o,i,s=t.map(function(c){return c.coordinate===r&&(o=!0),c.coordinate===n&&(i=!0),c.coordinate});return o||s.push(r),i||s.push(n),s},fr=function(t,r,n){if(!t)return null;var a=t.scale,o=t.duplicateDomain,i=t.type,s=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&i==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Tt(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(l){var d=o?o.indexOf(l):l;return{coordinate:a(d)+u,value:l,offset:u}});return f.filter(function(l){return!On(l.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(l,d){return{coordinate:a(l)+u,value:l,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(l){return{coordinate:a(l)+u,value:l,offset:u}}):a.domain().map(function(l,d){return{coordinate:a(l)+u,value:o?o[l]:l,index:d,offset:u}})},rv=new WeakMap,Ms=function(t,r){if(typeof r!="function")return t;rv.has(t)||rv.set(t,new WeakMap);var n=rv.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},HW=function(t,r,n){var a=t.scale,o=t.type,i=t.layout,s=t.axisType;if(a==="auto")return i==="radial"&&s==="radiusAxis"?{scale:Ha(),realScaleType:"band"}:i==="radial"&&s==="angleAxis"?{scale:hs(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Va(),realScaleType:"point"}:o==="category"?{scale:Ha(),realScaleType:"band"}:{scale:hs(),realScaleType:"linear"};if(Ma(a)){var c="scale".concat(ji(a));return{scale:(cP[c]||Va)(),realScaleType:cP[c]?c:"point"}}return de(a)?{scale:a}:{scale:Va(),realScaleType:"point"}},GP=1e-4,VW=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),o=Math.min(a[0],a[1])-GP,i=Math.max(a[0],a[1])+GP,s=t(r[0]),c=t(r[n-1]);(s<o||s>i||c<o||c>i)&&t.domain([r[0],r[n-1]])}},KW=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},YW=function(t,r){if(!r||r.length!==2||!Z(r[0])||!Z(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),o=[t[0],t[1]];return(!Z(t[0])||t[0]<n)&&(o[0]=n),(!Z(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<n&&(o[1]=n),o},XW=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var o=0,i=0,s=0;s<r;++s){var c=On(t[s][n][1])?t[s][n][0]:t[s][n][1];c>=0?(t[s][n][0]=o,t[s][n][1]=o+c,o=t[s][n][1]):(t[s][n][0]=i,t[s][n][1]=i+c,i=t[s][n][1])}},ZW=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var o=0,i=0;i<r;++i){var s=On(t[i][n][1])?t[i][n][0]:t[i][n][1];s>=0?(t[i][n][0]=o,t[i][n][1]=o+s,o=t[i][n][1]):(t[i][n][0]=0,t[i][n][1]=0)}},QW={sign:XW,expand:k2,none:Pn,silhouette:j2,wiggle:L2,positive:ZW},JW=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),o=QW[n],i=D2().keys(a).value(function(s,c){return+lt(s,c,0)}).order(Rf).offset(o);return i(t)},e3=function(t,r,n,a,o,i){if(!t)return null;var s=i?r.reverse():r,c={},u=s.reduce(function(l,d){var p,g=(p=d.type)!==null&&p!==void 0&&p.defaultProps?ke(ke({},d.type.defaultProps),d.props):d.props,v=g.stackId,h=g.hide;if(h)return l;var b=g[n],w=l[b]||{hasStack:!1,stackGroups:{}};if(Fe(v)){var x=w.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),w.hasStack=!0,w.stackGroups[v]=x}else w.stackGroups[Na("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return ke(ke({},l),{},Un({},b,w))},c),f={};return Object.keys(u).reduce(function(l,d){var p=u[d];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,h){var b=p.stackGroups[h];return ke(ke({},v),{},Un({},h,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:JW(t,b.items,o)}))},g)}return ke(ke({},l),{},Un({},d,p))},f)},t3=function(t,r){var n=r.realScaleType,a=r.type,o=r.tickCount,i=r.originalDomain,s=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(o&&a==="number"&&i&&(i[0]==="auto"||i[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=dW(u,o,s);return t.domain([Os(f),Er(f)]),{niceTicks:f}}if(o&&a==="number"){var l=t.domain(),d=pW(l,o,s);return{niceTicks:d}}return null};function HP(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,i=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ve(a[t.dataKey])){var s=$i(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var c=lt(a,ve(i)?t.dataKey:i);return ve(c)?null:t.scale(c)}var VP=function(t){var r=t.axis,n=t.ticks,a=t.offset,o=t.bandSize,i=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var c=lt(i,r.dataKey,r.domain[s]);return ve(c)?null:r.scale(c)-o/2+a},r3=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return a<=0&&o>=0?0:o<0?o:a}return n[0]},n3=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ke(ke({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(Fe(o)){var i=r[o];if(i){var s=i.items.indexOf(t);return s>=0?i.stackedData[s]:null}}return null},a3=function(t){return t.reduce(function(r,n){return[Os(n.concat([r[0]]).filter(Z)),Er(n.concat([r[1]]).filter(Z))]},[1/0,-1/0])},KP=function(t,r,n){return Object.keys(t).reduce(function(a,o){var i=t[o],s=i.stackedData,c=s.reduce(function(u,f){var l=a3(f.slice(r,n+1));return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},YP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,XP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nv=function(t,r,n){if(de(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Z(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(YP.test(t[0])){var o=+YP.exec(t[0])[1];a[0]=r[0]-o}else de(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Z(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(XP.test(t[1])){var i=+XP.exec(t[1])[1];a[1]=r[1]+i}else de(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Ns=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var o=qp(r,function(l){return l.coordinate}),i=1/0,s=1,c=o.length;s<c;s++){var u=o[s],f=o[s-1];i=Math.min((u.coordinate||0)-(f.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},ZP=function(t,r,n){return!t||!t.length||ao(t,vt(n,"type.defaultProps.domain"))?r:t},QP=function(t,r){var n=t.type.defaultProps?ke(ke({},t.type.defaultProps),t.props):t.props,a=n.dataKey,o=n.name,i=n.unit,s=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return ke(ke({},pe(t,!1)),{},{dataKey:a,unit:i,formatter:s,name:o||a,color:tv(t),value:lt(r,a),type:c,payload:r,chartType:u,hide:f})};function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(e)}function JP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(r),!0).forEach(function(n){o3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o3(e,t,r){return t=i3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i3(e){var t=s3(e,"string");return lo(t)=="symbol"?t:t+""}function s3(e,t){if(lo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Is=Math.PI/180,c3=function(t){return t*180/Math.PI},Ke=function(t,r,n,a){return{x:t+Math.cos(-Is*a)*n,y:r+Math.sin(-Is*a)*n}},u3=function(t,r){var n=t.x,a=t.y,o=r.x,i=r.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(a-i,2))},l3=function(t,r){var n=t.x,a=t.y,o=r.cx,i=r.cy,s=u3({x:n,y:a},{x:o,y:i});if(s<=0)return{radius:s};var c=(n-o)/s,u=Math.acos(c);return a>i&&(u=2*Math.PI-u),{radius:s,angle:c3(u),angleInRadian:u}},f3=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),i=Math.min(a,o);return{startAngle:r-i*360,endAngle:n-i*360}},d3=function(t,r){var n=r.startAngle,a=r.endAngle,o=Math.floor(n/360),i=Math.floor(a/360),s=Math.min(o,i);return t+s*360},tA=function(t,r){var n=t.x,a=t.y,o=l3({x:n,y:a},r),i=o.radius,s=o.angle,c=r.innerRadius,u=r.outerRadius;if(i<c||i>u)return!1;if(i===0)return!0;var f=f3(r),l=f.startAngle,d=f.endAngle,p=s,g;if(l<=d){for(;p>d;)p-=360;for(;p<l;)p+=360;g=p>=l&&p<=d}else{for(;p>l;)p-=360;for(;p<d;)p+=360;g=p>=d&&p<=l}return g?eA(eA({},r),{},{radius:i,angle:d3(p,r)}):null};function fo(e){"@babel/helpers - typeof";return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(e)}var p3=["offset"];function h3(e){return m3(e)||g3(e)||y3(e)||v3()}function v3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
227
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y3(e,t){if(e){if(typeof e=="string")return av(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return av(e,t)}}function g3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m3(e){if(Array.isArray(e))return av(e)}function av(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b3(e,t){if(e==null)return{};var r=w3(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rA(Object(r),!0).forEach(function(n){x3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x3(e,t,r){return t=S3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S3(e){var t=O3(e,"string");return fo(t)=="symbol"?t:t+""}function O3(e,t){if(fo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},po.apply(this,arguments)}var _3=function(t){var r=t.value,n=t.formatter,a=ve(t.children)?r:t.children;return de(n)?n(a):a},P3=function(t,r){var n=Tt(r-t),a=Math.min(Math.abs(r-t),360);return n*a},A3=function(t,r,n){var a=t.position,o=t.viewBox,i=t.offset,s=t.className,c=o,u=c.cx,f=c.cy,l=c.innerRadius,d=c.outerRadius,p=c.startAngle,g=c.endAngle,v=c.clockWise,h=(l+d)/2,b=P3(p,g),w=b>=0?1:-1,x,O;a==="insideStart"?(x=p+w*i,O=v):a==="insideEnd"?(x=g-w*i,O=!v):a==="end"&&(x=g+w*i,O=v),O=b<=0?O:!O;var m=Ke(u,f,h,x),S=Ke(u,f,h,x+(O?1:-1)*359),P="M".concat(m.x,",").concat(m.y,`
|
|
228
|
+
A`).concat(h,",").concat(h,",0,1,").concat(O?0:1,`,
|
|
229
|
+
`).concat(S.x,",").concat(S.y),E=ve(t.id)?Na("recharts-radial-line-"):t.id;return A.createElement("text",po({},n,{dominantBaseline:"central",className:ge("recharts-radial-bar-label",s)}),A.createElement("defs",null,A.createElement("path",{id:E,d:P})),A.createElement("textPath",{xlinkHref:"#".concat(E)},r))},E3=function(t){var r=t.viewBox,n=t.offset,a=t.position,o=r,i=o.cx,s=o.cy,c=o.innerRadius,u=o.outerRadius,f=o.startAngle,l=o.endAngle,d=(f+l)/2;if(a==="outside"){var p=Ke(i,s,u+n,d),g=p.x,v=p.y;return{x:g,y:v,textAnchor:g>=i?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"end"};var h=(c+u)/2,b=Ke(i,s,h,d),w=b.x,x=b.y;return{x:w,y:x,textAnchor:"middle",verticalAnchor:"middle"}},T3=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,o=t.position,i=r,s=i.x,c=i.y,u=i.width,f=i.height,l=f>=0?1:-1,d=l*a,p=l>0?"end":"start",g=l>0?"start":"end",v=u>=0?1:-1,h=v*a,b=v>0?"end":"start",w=v>0?"start":"end";if(o==="top"){var x={x:s+u/2,y:c-l*a,textAnchor:"middle",verticalAnchor:p};return ze(ze({},x),n?{height:Math.max(c-n.y,0),width:u}:{})}if(o==="bottom"){var O={x:s+u/2,y:c+f+d,textAnchor:"middle",verticalAnchor:g};return ze(ze({},O),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(o==="left"){var m={x:s-h,y:c+f/2,textAnchor:b,verticalAnchor:"middle"};return ze(ze({},m),n?{width:Math.max(m.x-n.x,0),height:f}:{})}if(o==="right"){var S={x:s+u+h,y:c+f/2,textAnchor:w,verticalAnchor:"middle"};return ze(ze({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var P=n?{width:u,height:f}:{};return o==="insideLeft"?ze({x:s+h,y:c+f/2,textAnchor:w,verticalAnchor:"middle"},P):o==="insideRight"?ze({x:s+u-h,y:c+f/2,textAnchor:b,verticalAnchor:"middle"},P):o==="insideTop"?ze({x:s+u/2,y:c+d,textAnchor:"middle",verticalAnchor:g},P):o==="insideBottom"?ze({x:s+u/2,y:c+f-d,textAnchor:"middle",verticalAnchor:p},P):o==="insideTopLeft"?ze({x:s+h,y:c+d,textAnchor:w,verticalAnchor:g},P):o==="insideTopRight"?ze({x:s+u-h,y:c+d,textAnchor:b,verticalAnchor:g},P):o==="insideBottomLeft"?ze({x:s+h,y:c+f-d,textAnchor:w,verticalAnchor:p},P):o==="insideBottomRight"?ze({x:s+u-h,y:c+f-d,textAnchor:b,verticalAnchor:p},P):Sn(o)&&(Z(o.x)||Rr(o.x))&&(Z(o.y)||Rr(o.y))?ze({x:s+zr(o.x,u),y:c+zr(o.y,f),textAnchor:"end",verticalAnchor:"end"},P):ze({x:s+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},P)},C3=function(t){return"cx"in t&&Z(t.cx)};function Qe(e){var t=e.offset,r=t===void 0?5:t,n=b3(e,p3),a=ze({offset:r},n),o=a.viewBox,i=a.position,s=a.value,c=a.children,u=a.content,f=a.className,l=f===void 0?"":f,d=a.textBreakAll;if(!o||ve(s)&&ve(c)&&!A.isValidElement(u)&&!de(u))return null;if(A.isValidElement(u))return A.cloneElement(u,a);var p;if(de(u)){if(p=A.createElement(u,a),A.isValidElement(p))return p}else p=_3(a);var g=C3(o),v=pe(a,!0);if(g&&(i==="insideStart"||i==="insideEnd"||i==="end"))return A3(a,p,v);var h=g?E3(a):T3(a);return A.createElement(ns,po({className:ge("recharts-label",l)},v,h,{breakAll:d}),p)}Qe.displayName="Label";var nA=function(t){var r=t.cx,n=t.cy,a=t.angle,o=t.startAngle,i=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,l=t.x,d=t.y,p=t.top,g=t.left,v=t.width,h=t.height,b=t.clockWise,w=t.labelViewBox;if(w)return w;if(Z(v)&&Z(h)){if(Z(l)&&Z(d))return{x:l,y:d,width:v,height:h};if(Z(p)&&Z(g))return{x:p,y:g,width:v,height:h}}return Z(l)&&Z(d)?{x:l,y:d,width:0,height:0}:Z(r)&&Z(n)?{cx:r,cy:n,startAngle:o||a||0,endAngle:i||a||0,innerRadius:u||0,outerRadius:f||c||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},M3=function(t,r){return t?t===!0?A.createElement(Qe,{key:"label-implicit",viewBox:r}):Fe(t)?A.createElement(Qe,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===Qe?A.cloneElement(t,{key:"label-implicit",viewBox:r}):A.createElement(Qe,{key:"label-implicit",content:t,viewBox:r}):de(t)?A.createElement(Qe,{key:"label-implicit",content:t,viewBox:r}):Sn(t)?A.createElement(Qe,po({viewBox:r},t,{key:"label-implicit"})):null:null},N3=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,o=nA(t),i=Ct(a,Qe).map(function(c,u){return A.cloneElement(c,{viewBox:r||o,key:"label-".concat(u)})});if(!n)return i;var s=M3(t.label,r||o);return[s].concat(h3(i))};Qe.parseViewBox=nA,Qe.renderCallByParent=N3;var ov,aA;function I3(){if(aA)return ov;aA=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ov=e,ov}var $3=I3();const D3=Te($3);function ho(e){"@babel/helpers - typeof";return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(e)}var k3=["valueAccessor"],j3=["data","dataKey","clockWise","id","textBreakAll"];function L3(e){return R3(e)||F3(e)||B3(e)||q3()}function q3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
230
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B3(e,t){if(e){if(typeof e=="string")return iv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iv(e,t)}}function F3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R3(e){if(Array.isArray(e))return iv(e)}function iv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$s.apply(this,arguments)}function oA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(r),!0).forEach(function(n){z3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z3(e,t,r){return t=W3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W3(e){var t=U3(e,"string");return ho(t)=="symbol"?t:t+""}function U3(e,t){if(ho(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ho(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sA(e,t){if(e==null)return{};var r=G3(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function G3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var H3=function(t){return Array.isArray(t.value)?D3(t.value):t.value};function Cr(e){var t=e.valueAccessor,r=t===void 0?H3:t,n=sA(e,k3),a=n.data,o=n.dataKey,i=n.clockWise,s=n.id,c=n.textBreakAll,u=sA(n,j3);return!a||!a.length?null:A.createElement(Ie,{className:"recharts-label-list"},a.map(function(f,l){var d=ve(o)?r(f,l):lt(f&&f.payload,o),p=ve(s)?{}:{id:"".concat(s,"-").concat(l)};return A.createElement(Qe,$s({},pe(f,!0),u,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:c,viewBox:Qe.parseViewBox(ve(i)?f:iA(iA({},f),{},{clockWise:i})),key:"label-".concat(l),index:l}))}))}Cr.displayName="LabelList";function V3(e,t){return e?e===!0?A.createElement(Cr,{key:"labelList-implicit",data:t}):A.isValidElement(e)||de(e)?A.createElement(Cr,{key:"labelList-implicit",data:t,content:e}):Sn(e)?A.createElement(Cr,$s({data:t},e,{key:"labelList-implicit"})):null:null}function K3(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Ct(n,Cr).map(function(i,s){return A.cloneElement(i,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var o=V3(e.label,t);return[o].concat(L3(a))}Cr.renderCallByParent=K3;function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sv.apply(this,arguments)}function cA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cA(Object(r),!0).forEach(function(n){Y3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y3(e,t,r){return t=X3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X3(e){var t=Z3(e,"string");return vo(t)=="symbol"?t:t+""}function Z3(e,t){if(vo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Q3=function(t,r){var n=Tt(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Ds=function(t){var r=t.cx,n=t.cy,a=t.radius,o=t.angle,i=t.sign,s=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(s?1:-1)+a,l=Math.asin(c/f)/Is,d=u?o:o+i*l,p=Ke(r,n,f,d),g=Ke(r,n,a,d),v=u?o-i*l:o,h=Ke(r,n,f*Math.cos(l*Is),v);return{center:p,circleTangency:g,lineTangency:h,theta:l}},lA=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,i=t.startAngle,s=t.endAngle,c=Q3(i,s),u=i+c,f=Ke(r,n,o,i),l=Ke(r,n,o,u),d="M ".concat(f.x,",").concat(f.y,`
|
|
231
|
+
A `).concat(o,",").concat(o,`,0,
|
|
232
|
+
`).concat(+(Math.abs(c)>180),",").concat(+(i>u),`,
|
|
233
|
+
`).concat(l.x,",").concat(l.y,`
|
|
234
|
+
`);if(a>0){var p=Ke(r,n,a,i),g=Ke(r,n,a,u);d+="L ".concat(g.x,",").concat(g.y,`
|
|
235
|
+
A `).concat(a,",").concat(a,`,0,
|
|
236
|
+
`).concat(+(Math.abs(c)>180),",").concat(+(i<=u),`,
|
|
237
|
+
`).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},J3=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,i=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,l=Tt(f-u),d=Ds({cx:r,cy:n,radius:o,angle:u,sign:l,cornerRadius:i,cornerIsExternal:c}),p=d.circleTangency,g=d.lineTangency,v=d.theta,h=Ds({cx:r,cy:n,radius:o,angle:f,sign:-l,cornerRadius:i,cornerIsExternal:c}),b=h.circleTangency,w=h.lineTangency,x=h.theta,O=c?Math.abs(u-f):Math.abs(u-f)-v-x;if(O<0)return s?"M ".concat(g.x,",").concat(g.y,`
|
|
238
|
+
a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0
|
|
239
|
+
a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0
|
|
240
|
+
`):lA({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f});var m="M ".concat(g.x,",").concat(g.y,`
|
|
241
|
+
A`).concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(p.x,",").concat(p.y,`
|
|
242
|
+
A`).concat(o,",").concat(o,",0,").concat(+(O>180),",").concat(+(l<0),",").concat(b.x,",").concat(b.y,`
|
|
243
|
+
A`).concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(w.x,",").concat(w.y,`
|
|
244
|
+
`);if(a>0){var S=Ds({cx:r,cy:n,radius:a,angle:u,sign:l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),P=S.circleTangency,E=S.lineTangency,T=S.theta,k=Ds({cx:r,cy:n,radius:a,angle:f,sign:-l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),C=k.circleTangency,M=k.lineTangency,N=k.theta,I=c?Math.abs(u-f):Math.abs(u-f)-T-N;if(I<0&&i===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(M.x,",").concat(M.y,`
|
|
245
|
+
A`).concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(C.x,",").concat(C.y,`
|
|
246
|
+
A`).concat(a,",").concat(a,",0,").concat(+(I>180),",").concat(+(l>0),",").concat(P.x,",").concat(P.y,`
|
|
247
|
+
A`).concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(E.x,",").concat(E.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},e5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fA=function(t){var r=uA(uA({},e5),t),n=r.cx,a=r.cy,o=r.innerRadius,i=r.outerRadius,s=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(i<o||f===l)return null;var p=ge("recharts-sector",d),g=i-o,v=zr(s,g,0,!0),h;return v>0&&Math.abs(f-l)<360?h=J3({cx:n,cy:a,innerRadius:o,outerRadius:i,cornerRadius:Math.min(v,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:l}):h=lA({cx:n,cy:a,innerRadius:o,outerRadius:i,startAngle:f,endAngle:l}),A.createElement("path",sv({},pe(r,!0),{className:p,d:h,role:"img"}))};function yo(e){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yo(e)}function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cv.apply(this,arguments)}function dA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(r),!0).forEach(function(n){t5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t5(e,t,r){return t=r5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r5(e){var t=n5(e,"string");return yo(t)=="symbol"?t:t+""}function n5(e,t){if(yo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hA={curveBasisClosed:O2,curveBasisOpen:_2,curveBasis:S2,curveBumpX:c2,curveBumpY:u2,curveLinearClosed:P2,curveLinear:Fi,curveMonotoneX:A2,curveMonotoneY:E2,curveNatural:T2,curveStep:C2,curveStepAfter:N2,curveStepBefore:M2},ks=function(t){return t.x===+t.x&&t.y===+t.y},go=function(t){return t.x},mo=function(t){return t.y},a5=function(t,r){if(de(t))return t;var n="curve".concat(ji(t));return(n==="curveMonotone"||n==="curveBump")&&r?hA["".concat(n).concat(r==="vertical"?"Y":"X")]:hA[n]||Fi},o5=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,o=a===void 0?[]:a,i=t.baseLine,s=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=a5(n,s),l=u?o.filter(function(v){return ks(v)}):o,d;if(Array.isArray(i)){var p=u?i.filter(function(v){return ks(v)}):i,g=l.map(function(v,h){return pA(pA({},v),{},{base:p[h]})});return s==="vertical"?d=Ri().y(mo).x1(go).x0(function(v){return v.base.x}):d=Ri().x(go).y1(mo).y0(function(v){return v.base.y}),d.defined(ks).curve(f),d(g)}return s==="vertical"&&Z(i)?d=Ri().y(mo).x1(go).x0(i):Z(i)?d=Ri().x(go).y1(mo).y0(i):d=Cx().x(go).y(mo),d.defined(ks).curve(f),d(l)},bo=function(t){var r=t.className,n=t.points,a=t.path,o=t.pathRef;if((!n||!n.length)&&!a)return null;var i=n&&n.length?o5(t):a;return A.createElement("path",cv({},pe(t,!1),Di(t),{className:ge("recharts-curve",r),d:i,ref:o}))},js={exports:{}},Ls={exports:{}},Oe={};/** @license React v16.13.1
|
|
248
|
+
* react-is.production.min.js
|
|
249
|
+
*
|
|
250
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the MIT license found in the
|
|
253
|
+
* LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/var vA;function i5(){if(vA)return Oe;vA=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case t:switch(m=m.type,m){case c:case u:case n:case o:case a:case l:return m;default:switch(m=m&&m.$$typeof,m){case s:case f:case g:case p:case i:return m;default:return S}}case r:return S}}}function O(m){return x(m)===u}return Oe.AsyncMode=c,Oe.ConcurrentMode=u,Oe.ContextConsumer=s,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=f,Oe.Fragment=n,Oe.Lazy=g,Oe.Memo=p,Oe.Portal=r,Oe.Profiler=o,Oe.StrictMode=a,Oe.Suspense=l,Oe.isAsyncMode=function(m){return O(m)||x(m)===c},Oe.isConcurrentMode=O,Oe.isContextConsumer=function(m){return x(m)===s},Oe.isContextProvider=function(m){return x(m)===i},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return x(m)===f},Oe.isFragment=function(m){return x(m)===n},Oe.isLazy=function(m){return x(m)===g},Oe.isMemo=function(m){return x(m)===p},Oe.isPortal=function(m){return x(m)===r},Oe.isProfiler=function(m){return x(m)===o},Oe.isStrictMode=function(m){return x(m)===a},Oe.isSuspense=function(m){return x(m)===l},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===u||m===o||m===a||m===l||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===g||m.$$typeof===p||m.$$typeof===i||m.$$typeof===s||m.$$typeof===f||m.$$typeof===h||m.$$typeof===b||m.$$typeof===w||m.$$typeof===v)},Oe.typeOf=x,Oe}var _e={};/** @license React v16.13.1
|
|
255
|
+
* react-is.development.js
|
|
256
|
+
*
|
|
257
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the MIT license found in the
|
|
260
|
+
* LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/var yA;function s5(){return yA||(yA=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===o||D===a||D===l||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===p||D.$$typeof===i||D.$$typeof===s||D.$$typeof===f||D.$$typeof===h||D.$$typeof===b||D.$$typeof===w||D.$$typeof===v)}function O(D){if(typeof D=="object"&&D!==null){var ue=D.$$typeof;switch(ue){case t:var z=D.type;switch(z){case c:case u:case n:case o:case a:case l:return z;default:var te=z&&z.$$typeof;switch(te){case s:case f:case g:case p:case i:return te;default:return ue}}case r:return ue}}}var m=c,S=u,P=s,E=i,T=t,k=f,C=n,M=g,N=p,I=r,L=o,$=a,R=l,B=!1;function q(D){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(D)||O(D)===c}function j(D){return O(D)===u}function F(D){return O(D)===s}function W(D){return O(D)===i}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Y(D){return O(D)===f}function Q(D){return O(D)===n}function ee(D){return O(D)===g}function re(D){return O(D)===p}function ie(D){return O(D)===r}function G(D){return O(D)===o}function X(D){return O(D)===a}function K(D){return O(D)===l}_e.AsyncMode=m,_e.ConcurrentMode=S,_e.ContextConsumer=P,_e.ContextProvider=E,_e.Element=T,_e.ForwardRef=k,_e.Fragment=C,_e.Lazy=M,_e.Memo=N,_e.Portal=I,_e.Profiler=L,_e.StrictMode=$,_e.Suspense=R,_e.isAsyncMode=q,_e.isConcurrentMode=j,_e.isContextConsumer=F,_e.isContextProvider=W,_e.isElement=V,_e.isForwardRef=Y,_e.isFragment=Q,_e.isLazy=ee,_e.isMemo=re,_e.isPortal=ie,_e.isProfiler=G,_e.isStrictMode=X,_e.isSuspense=K,_e.isValidElementType=x,_e.typeOf=O}()),_e}var gA;function mA(){return gA||(gA=1,process.env.NODE_ENV==="production"?Ls.exports=i5():Ls.exports=s5()),Ls.exports}/*
|
|
262
|
+
object-assign
|
|
263
|
+
(c) Sindre Sorhus
|
|
264
|
+
@license MIT
|
|
265
|
+
*/var uv,bA;function c5(){if(bA)return uv;bA=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return uv=a()?Object.assign:function(o,i){for(var s,c=n(o),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var l in s)t.call(s,l)&&(c[l]=s[l]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(c[u[d]]=s[u[d]])}}return c},uv}var lv,wA;function fv(){if(wA)return lv;wA=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lv=e,lv}var dv,xA;function SA(){return xA||(xA=1,dv=Function.call.bind(Object.prototype.hasOwnProperty)),dv}var pv,OA;function u5(){if(OA)return pv;OA=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fv(),r={},n=SA();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function a(o,i,s,c,u){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var l;try{if(typeof o[f]!="function"){var d=Error((c||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}l=o[f](i,f,c,s,null,t)}catch(g){l=g}if(l&&!(l instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in r)){r[l.message]=!0;var p=u?u():"";e("Failed "+s+" type: "+l.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},pv=a,pv}var hv,_A;function l5(){if(_A)return hv;_A=1;var e=mA(),t=c5(),r=fv(),n=SA(),a=u5(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return hv=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function l(j){var F=j&&(u&&j[u]||j[f]);if(typeof F=="function")return F}var d="<<anonymous>>",p={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:x,element:O(),elementType:m(),instanceOf:S,node:k(),objectOf:E,oneOf:P,oneOfType:T,shape:M,exact:N};function g(j,F){return j===F?j!==0||1/j===1/F:j!==j&&F!==F}function v(j,F){this.message=j,this.data=F&&typeof F=="object"?F:{},this.stack=""}v.prototype=Error.prototype;function h(j){if(process.env.NODE_ENV!=="production")var F={},W=0;function V(Q,ee,re,ie,G,X,K){if(ie=ie||d,X=X||re,K!==r){if(c){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=ie+":"+re;!F[ue]&&W<3&&(o("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+ie+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[ue]=!0,W++)}}return ee[re]==null?Q?ee[re]===null?new v("The "+G+" `"+X+"` is marked as required "+("in `"+ie+"`, but its value is `null`.")):new v("The "+G+" `"+X+"` is marked as required in "+("`"+ie+"`, but its value is `undefined`.")):null:j(ee,re,ie,G,X)}var Y=V.bind(null,!1);return Y.isRequired=V.bind(null,!0),Y}function b(j){function F(W,V,Y,Q,ee,re){var ie=W[V],G=$(ie);if(G!==j){var X=R(ie);return new v("Invalid "+Q+" `"+ee+"` of type "+("`"+X+"` supplied to `"+Y+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return h(F)}function w(){return h(i)}function x(j){function F(W,V,Y,Q,ee){if(typeof j!="function")return new v("Property `"+ee+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var re=W[V];if(!Array.isArray(re)){var ie=$(re);return new v("Invalid "+Q+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+Y+"`, expected an array."))}for(var G=0;G<re.length;G++){var X=j(re,G,Y,Q,ee+"["+G+"]",r);if(X instanceof Error)return X}return null}return h(F)}function O(){function j(F,W,V,Y,Q){var ee=F[W];if(!s(ee)){var re=$(ee);return new v("Invalid "+Y+" `"+Q+"` of type "+("`"+re+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return h(j)}function m(){function j(F,W,V,Y,Q){var ee=F[W];if(!e.isValidElementType(ee)){var re=$(ee);return new v("Invalid "+Y+" `"+Q+"` of type "+("`"+re+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return h(j)}function S(j){function F(W,V,Y,Q,ee){if(!(W[V]instanceof j)){var re=j.name||d,ie=q(W[V]);return new v("Invalid "+Q+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+Y+"`, expected ")+("instance of `"+re+"`."))}return null}return h(F)}function P(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function F(W,V,Y,Q,ee){for(var re=W[V],ie=0;ie<j.length;ie++)if(g(re,j[ie]))return null;var G=JSON.stringify(j,function(K,D){var ue=R(D);return ue==="symbol"?String(D):D});return new v("Invalid "+Q+" `"+ee+"` of value `"+String(re)+"` "+("supplied to `"+Y+"`, expected one of "+G+"."))}return h(F)}function E(j){function F(W,V,Y,Q,ee){if(typeof j!="function")return new v("Property `"+ee+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var re=W[V],ie=$(re);if(ie!=="object")return new v("Invalid "+Q+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+Y+"`, expected an object."));for(var G in re)if(n(re,G)){var X=j(re,G,Y,Q,ee+"."+G,r);if(X instanceof Error)return X}return null}return h(F)}function T(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var F=0;F<j.length;F++){var W=j[F];if(typeof W!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(W)+" at index "+F+"."),i}function V(Y,Q,ee,re,ie){for(var G=[],X=0;X<j.length;X++){var K=j[X],D=K(Y,Q,ee,re,ie,r);if(D==null)return null;D.data&&n(D.data,"expectedType")&&G.push(D.data.expectedType)}var ue=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new v("Invalid "+re+" `"+ie+"` supplied to "+("`"+ee+"`"+ue+"."))}return h(V)}function k(){function j(F,W,V,Y,Q){return I(F[W])?null:new v("Invalid "+Y+" `"+Q+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return h(j)}function C(j,F,W,V,Y){return new v((j||"React class")+": "+F+" type `"+W+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function M(j){function F(W,V,Y,Q,ee){var re=W[V],ie=$(re);if(ie!=="object")return new v("Invalid "+Q+" `"+ee+"` of type `"+ie+"` "+("supplied to `"+Y+"`, expected `object`."));for(var G in j){var X=j[G];if(typeof X!="function")return C(Y,Q,ee,G,R(X));var K=X(re,G,Y,Q,ee+"."+G,r);if(K)return K}return null}return h(F)}function N(j){function F(W,V,Y,Q,ee){var re=W[V],ie=$(re);if(ie!=="object")return new v("Invalid "+Q+" `"+ee+"` of type `"+ie+"` "+("supplied to `"+Y+"`, expected `object`."));var G=t({},W[V],j);for(var X in G){var K=j[X];if(n(j,X)&&typeof K!="function")return C(Y,Q,ee,X,R(K));if(!K)return new v("Invalid "+Q+" `"+ee+"` key `"+X+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(W[V],null," ")+`
|
|
266
|
+
Valid keys: `+JSON.stringify(Object.keys(j),null," "));var D=K(re,X,Y,Q,ee+"."+X,r);if(D)return D}return null}return h(F)}function I(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(I);if(j===null||s(j))return!0;var F=l(j);if(F){var W=F.call(j),V;if(F!==j.entries){for(;!(V=W.next()).done;)if(!I(V.value))return!1}else for(;!(V=W.next()).done;){var Y=V.value;if(Y&&!I(Y[1]))return!1}}else return!1;return!0;default:return!1}}function L(j,F){return j==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function $(j){var F=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":L(F,j)?"symbol":F}function R(j){if(typeof j>"u"||j===null)return""+j;var F=$(j);if(F==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return F}function B(j){var F=R(j);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function q(j){return!j.constructor||!j.constructor.name?d:j.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},hv}var vv,PA;function f5(){if(PA)return vv;PA=1;var e=fv();function t(){}function r(){}return r.resetWarningCache=t,vv=function(){function n(i,s,c,u,f,l){if(l!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},vv}var AA;function d5(){if(AA)return js.exports;if(AA=1,process.env.NODE_ENV!=="production"){var e=mA(),t=!0;js.exports=l5()(e.isElement,t)}else js.exports=f5()();return js.exports}var p5=d5();const Pe=Te(p5);var h5=Object.getOwnPropertyNames,v5=Object.getOwnPropertySymbols,y5=Object.prototype.hasOwnProperty;function EA(e,t){return function(n,a,o){return e(n,a,o)&&t(n,a,o)}}function qs(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var o=a.cache,i=o.get(r),s=o.get(n);if(i&&s)return i===n&&s===r;o.set(r,n),o.set(n,r);var c=e(r,n,a);return o.delete(r),o.delete(n),c}}function TA(e){return h5(e).concat(v5(e))}var g5=Object.hasOwn||function(e,t){return y5.call(e,t)};function Jr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var m5="__v",b5="__o",w5="_owner",CA=Object.getOwnPropertyDescriptor,MA=Object.keys;function x5(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function S5(e,t){return Jr(e.getTime(),t.getTime())}function O5(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function _5(e,t){return e===t}function NA(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),o=e.entries(),i,s,c=0;(i=o.next())&&!i.done;){for(var u=t.entries(),f=!1,l=0;(s=u.next())&&!s.done;){if(a[l]){l++;continue}var d=i.value,p=s.value;if(r.equals(d[0],p[0],c,l,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=a[l]=!0;break}l++}if(!f)return!1;c++}return!0}var P5=Jr;function A5(e,t,r){var n=MA(e),a=n.length;if(MA(t).length!==a)return!1;for(;a-- >0;)if(!$A(e,t,r,n[a]))return!1;return!0}function wo(e,t,r){var n=TA(e),a=n.length;if(TA(t).length!==a)return!1;for(var o,i,s;a-- >0;)if(o=n[a],!$A(e,t,r,o)||(i=CA(e,o),s=CA(t,o),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function E5(e,t){return Jr(e.valueOf(),t.valueOf())}function T5(e,t){return e.source===t.source&&e.flags===t.flags}function IA(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),o=e.values(),i,s;(i=o.next())&&!i.done;){for(var c=t.values(),u=!1,f=0;(s=c.next())&&!s.done;){if(!a[f]&&r.equals(i.value,s.value,i.value,s.value,e,t,r)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function C5(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function M5(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function $A(e,t,r,n){return(n===w5||n===b5||n===m5)&&(e.$$typeof||t.$$typeof)?!0:g5(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var N5="[object Arguments]",I5="[object Boolean]",$5="[object Date]",D5="[object Error]",k5="[object Map]",j5="[object Number]",L5="[object Object]",q5="[object RegExp]",B5="[object Set]",F5="[object String]",R5="[object URL]",z5=Array.isArray,DA=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,kA=Object.assign,W5=Object.prototype.toString.call.bind(Object.prototype.toString);function U5(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,o=e.areMapsEqual,i=e.areNumbersEqual,s=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,l=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(g,v,h){if(g===v)return!0;if(g==null||v==null)return!1;var b=typeof g;if(b!==typeof v)return!1;if(b!=="object")return b==="number"?i(g,v,h):b==="function"?a(g,v,h):!1;var w=g.constructor;if(w!==v.constructor)return!1;if(w===Object)return s(g,v,h);if(z5(g))return t(g,v,h);if(DA!=null&&DA(g))return l(g,v,h);if(w===Date)return r(g,v,h);if(w===RegExp)return u(g,v,h);if(w===Map)return o(g,v,h);if(w===Set)return f(g,v,h);var x=W5(g);return x===$5?r(g,v,h):x===q5?u(g,v,h):x===k5?o(g,v,h):x===B5?f(g,v,h):x===L5?typeof g.then!="function"&&typeof v.then!="function"&&s(g,v,h):x===R5?d(g,v,h):x===D5?n(g,v,h):x===N5?s(g,v,h):x===I5||x===j5||x===F5?c(g,v,h):!1}}function G5(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?wo:x5,areDatesEqual:S5,areErrorsEqual:O5,areFunctionsEqual:_5,areMapsEqual:n?EA(NA,wo):NA,areNumbersEqual:P5,areObjectsEqual:n?wo:A5,arePrimitiveWrappersEqual:E5,areRegExpsEqual:T5,areSetsEqual:n?EA(IA,wo):IA,areTypedArraysEqual:n?wo:C5,areUrlsEqual:M5};if(r&&(a=kA({},a,r(a))),t){var o=qs(a.areArraysEqual),i=qs(a.areMapsEqual),s=qs(a.areObjectsEqual),c=qs(a.areSetsEqual);a=kA({},a,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:c})}return a}function H5(e){return function(t,r,n,a,o,i,s){return e(t,r,s)}}function V5(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,o=e.strict;if(n)return function(c,u){var f=n(),l=f.cache,d=l===void 0?t?new WeakMap:void 0:l,p=f.meta;return r(c,u,{cache:d,equals:a,meta:p,strict:o})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:o})};var i={cache:void 0,equals:a,meta:void 0,strict:o};return function(c,u){return r(c,u,i)}}var K5=Mr();Mr({strict:!0}),Mr({circular:!0}),Mr({circular:!0,strict:!0}),Mr({createInternalComparator:function(){return Jr}}),Mr({strict:!0,createInternalComparator:function(){return Jr}}),Mr({circular:!0,createInternalComparator:function(){return Jr}}),Mr({circular:!0,createInternalComparator:function(){return Jr},strict:!0});function Mr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,o=e.strict,i=o===void 0?!1:o,s=G5(e),c=U5(s),u=n?n(c):H5(c);return V5({circular:r,comparator:c,createState:a,equals:u,strict:i})}function Y5(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function jA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(o){r<0&&(r=o),o-r>t?(e(o),r=-1):Y5(a)};requestAnimationFrame(n)}function yv(e){"@babel/helpers - typeof";return yv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yv(e)}function X5(e){return eU(e)||J5(e)||Q5(e)||Z5()}function Z5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
267
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q5(e,t){if(e){if(typeof e=="string")return LA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LA(e,t)}}function LA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function J5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eU(e){if(Array.isArray(e))return e}function tU(){var e={},t=function(){return null},r=!1,n=function a(o){if(!r){if(Array.isArray(o)){if(!o.length)return;var i=o,s=X5(i),c=s[0],u=s.slice(1);if(typeof c=="number"){jA(a.bind(null,u),c);return}a(c),jA(a.bind(null,u));return}yv(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){r=!0},start:function(o){r=!1,n(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function xo(e){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(e)}function qA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function BA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qA(Object(r),!0).forEach(function(n){FA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FA(e,t,r){return t=rU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rU(e){var t=nU(e,"string");return xo(t)==="symbol"?t:String(t)}function nU(e,t){if(xo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aU=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(o){return a.includes(o)})})},oU=function(t){return t},iU=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},So=function(t,r){return Object.keys(r).reduce(function(n,a){return BA(BA({},n),{},FA({},a,t(a,r[a])))},{})},RA=function(t,r,n){return t.map(function(a){return"".concat(iU(a)," ").concat(r,"ms ").concat(n)}).join(",")},sU=process.env.NODE_ENV!=="production",Bs=function(t,r,n,a,o,i,s,c){if(sU&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,o,i,s,c],f=0;console.warn(r.replace(/%s/g,function(){return u[f++]}))}};function cU(e,t){return fU(e)||lU(e,t)||zA(e,t)||uU()}function uU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
268
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function fU(e){if(Array.isArray(e))return e}function dU(e){return vU(e)||hU(e)||zA(e)||pU()}function pU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
269
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(e,t){if(e){if(typeof e=="string")return gv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gv(e,t)}}function hU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vU(e){if(Array.isArray(e))return gv(e)}function gv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Fs=1e-4,WA=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},UA=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},GA=function(t,r){return function(n){var a=WA(t,r);return UA(a,n)}},yU=function(t,r){return function(n){var a=WA(t,r),o=[].concat(dU(a.map(function(i,s){return i*s}).slice(1)),[0]);return UA(o,n)}},HA=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],o=r[1],i=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,o=0,i=1,s=1;break;case"ease":a=.25,o=.1,i=.25,s=1;break;case"ease-in":a=.42,o=0,i=1,s=1;break;case"ease-out":a=.42,o=0,i=.58,s=1;break;case"ease-in-out":a=0,o=0,i=.58,s=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(h){return parseFloat(h)}),f=cU(u,4);a=f[0],o=f[1],i=f[2],s=f[3]}else Bs(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}Bs([a,i,o,s].every(function(h){return typeof h=="number"&&h>=0&&h<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var l=GA(a,i),d=GA(o,s),p=yU(a,i),g=function(b){return b>1?1:b<0?0:b},v=function(b){for(var w=b>1?1:b,x=w,O=0;O<8;++O){var m=l(x)-w,S=p(x);if(Math.abs(m-w)<Fs||S<Fs)return d(x);x=g(x-m/S)}return d(x)};return v.isStepper=!1,v},gU=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,i=t.dt,s=i===void 0?17:i,c=function(f,l,d){var p=-(f-l)*n,g=d*o,v=d+(p-g)*s/1e3,h=d*s/1e3+f;return Math.abs(h-l)<Fs&&Math.abs(v)<Fs?[l,0]:[h,v]};return c.isStepper=!0,c.dt=s,c},mU=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HA(a);case"spring":return gU();default:if(a.split("(")[0]==="cubic-bezier")return HA(a);Bs(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(Bs(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function Oo(e){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(e)}function VA(e){return xU(e)||wU(e)||YA(e)||bU()}function bU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
270
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xU(e){if(Array.isArray(e))return bv(e)}function KA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KA(Object(r),!0).forEach(function(n){mv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mv(e,t,r){return t=SU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SU(e){var t=OU(e,"string");return Oo(t)==="symbol"?t:String(t)}function OU(e,t){if(Oo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _U(e,t){return EU(e)||AU(e,t)||YA(e,t)||PU()}function PU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
271
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YA(e,t){if(e){if(typeof e=="string")return bv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bv(e,t)}}function bv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function EU(e){if(Array.isArray(e))return e}var Rs=function(t,r,n){return t+(r-t)*n},wv=function(t){var r=t.from,n=t.to;return r!==n},TU=function e(t,r,n){var a=So(function(o,i){if(wv(i)){var s=t(i.from,i.to,i.velocity),c=_U(s,2),u=c[0],f=c[1];return Ye(Ye({},i),{},{from:u,velocity:f})}return i},r);return n<1?So(function(o,i){return wv(i)?Ye(Ye({},i),{},{velocity:Rs(i.velocity,a[o].velocity,n),from:Rs(i.from,a[o].from,n)}):i},r):e(t,a,n-1)};const CU=function(e,t,r,n,a){var o=aU(e,t),i=o.reduce(function(h,b){return Ye(Ye({},h),{},mv({},b,[e[b],t[b]]))},{}),s=o.reduce(function(h,b){return Ye(Ye({},h),{},mv({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,f,l=function(){return null},d=function(){return So(function(b,w){return w.from},s)},p=function(){return!Object.values(s).filter(wv).length},g=function(b){u||(u=b);var w=b-u,x=w/r.dt;s=TU(r,s,x),a(Ye(Ye(Ye({},e),t),d())),u=b,p()||(c=requestAnimationFrame(l))},v=function(b){f||(f=b);var w=(b-f)/n,x=So(function(m,S){return Rs.apply(void 0,VA(S).concat([r(w)]))},i);if(a(Ye(Ye(Ye({},e),t),x)),w<1)c=requestAnimationFrame(l);else{var O=So(function(m,S){return Rs.apply(void 0,VA(S).concat([r(1)]))},i);a(Ye(Ye(Ye({},e),t),O))}};return l=r.isStepper?g:v,function(){return requestAnimationFrame(l),function(){cancelAnimationFrame(c)}}};function Gn(e){"@babel/helpers - typeof";return Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(e)}var MU=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function NU(e,t){if(e==null)return{};var r=IU(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IU(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function xv(e){return jU(e)||kU(e)||DU(e)||$U()}function $U(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
272
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DU(e,t){if(e){if(typeof e=="string")return Sv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sv(e,t)}}function kU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jU(e){if(Array.isArray(e))return Sv(e)}function Sv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XA(Object(r),!0).forEach(function(n){_o(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _o(e,t,r){return t=ZA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ZA(n.key),n)}}function BU(e,t,r){return t&&qU(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZA(e){var t=FU(e,"string");return Gn(t)==="symbol"?t:String(t)}function FU(e,t){if(Gn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ov(e,t)}function Ov(e,t){return Ov=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ov(e,t)}function zU(e){var t=WU();return function(){var n=zs(e),a;if(t){var o=zs(this).constructor;a=Reflect.construct(n,arguments,o)}else a=n.apply(this,arguments);return _v(this,a)}}function _v(e,t){if(t&&(Gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pv(e)}function Pv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WU(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zs(e)}var dr=function(e){RU(r,e);var t=zU(r);function r(n,a){var o;LU(this,r),o=t.call(this,n,a);var i=o.props,s=i.isActive,c=i.attributeName,u=i.from,f=i.to,l=i.steps,d=i.children,p=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Pv(o)),o.changeStyle=o.changeStyle.bind(Pv(o)),!s||p<=0)return o.state={style:{}},typeof d=="function"&&(o.state={style:f}),_v(o);if(l&&l.length)o.state={style:l[0].style};else if(u){if(typeof d=="function")return o.state={style:u},_v(o);o.state={style:c?_o({},c,u):u}}else o.state={style:{}};return o}return BU(r,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,i=a.canBegin;this.mounted=!0,!(!o||!i)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,i=o.isActive,s=o.canBegin,c=o.attributeName,u=o.shouldReAnimate,f=o.to,l=o.from,d=this.state.style;if(s){if(!i){var p={style:c?_o({},c,f):f};this.state&&d&&(c&&d[c]!==f||!c&&d!==f)&&this.setState(p);return}if(!(K5(a.to,f)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||u?l:a.to;if(this.state&&d){var h={style:c?_o({},c,v):v};(c&&d[c]!==v||!c&&d!==v)&&this.setState(h)}this.runAnimation($t($t({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,i=a.from,s=a.to,c=a.duration,u=a.easing,f=a.begin,l=a.onAnimationEnd,d=a.onAnimationStart,p=CU(i,s,mU(u),c,this.changeStyle),g=function(){o.stopJSAnimation=p()};this.manager.start([d,f,g,c,l])}},{key:"runStepAnimation",value:function(a){var o=this,i=a.steps,s=a.begin,c=a.onAnimationStart,u=i[0],f=u.style,l=u.duration,d=l===void 0?0:l,p=function(v,h,b){if(b===0)return v;var w=h.duration,x=h.easing,O=x===void 0?"ease":x,m=h.style,S=h.properties,P=h.onAnimationEnd,E=b>0?i[b-1]:h,T=S||Object.keys(m);if(typeof O=="function"||O==="spring")return[].concat(xv(v),[o.runJSAnimation.bind(o,{from:E.style,to:m,duration:w,easing:O}),w]);var k=RA(T,w,O),C=$t($t($t({},E.style),m),{},{transition:k});return[].concat(xv(v),[C,w,P]).filter(oU)};return this.manager.start([c].concat(xv(i.reduce(p,[f,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=tU());var o=a.begin,i=a.duration,s=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,l=a.onAnimationEnd,d=a.steps,p=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var v=s?_o({},s,c):c,h=RA(Object.keys(v),i,u);g.start([f,o,$t($t({},v),{},{transition:h}),i,l])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var i=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=NU(a,MU),u=A.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!s||u===0||i<=0)return o;var l=function(p){var g=p.props,v=g.style,h=v===void 0?{}:v,b=g.className,w=A.cloneElement(p,$t($t({},c),{},{style:$t($t({},h),f),className:b}));return w};return u===1?l(A.Children.only(o)):A.createElement("div",null,A.Children.map(o,function(d){return l(d)}))}}]),r}(A.PureComponent);dr.displayName="Animate",dr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},dr.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Po(e){"@babel/helpers - typeof";return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Po(e)}function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ws.apply(this,arguments)}function UU(e,t){return KU(e)||VU(e,t)||HU(e,t)||GU()}function GU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
273
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HU(e,t){if(e){if(typeof e=="string")return QA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QA(e,t)}}function QA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function KU(e){if(Array.isArray(e))return e}function JA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JA(Object(r),!0).forEach(function(n){YU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YU(e,t,r){return t=XU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XU(e){var t=ZU(e,"string");return Po(t)=="symbol"?t:t+""}function ZU(e,t){if(Po(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Po(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tE=function(t,r,n,a,o){var i=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,c=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,f;if(i>0&&o instanceof Array){for(var l=[0,0,0,0],d=0,p=4;d<p;d++)l[d]=o[d]>i?i:o[d];f="M".concat(t,",").concat(r+s*l[0]),l[0]>0&&(f+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(u,",").concat(t+c*l[0],",").concat(r)),f+="L ".concat(t+n-c*l[1],",").concat(r),l[1]>0&&(f+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(u,`,
|
|
274
|
+
`).concat(t+n,",").concat(r+s*l[1])),f+="L ".concat(t+n,",").concat(r+a-s*l[2]),l[2]>0&&(f+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(u,`,
|
|
275
|
+
`).concat(t+n-c*l[2],",").concat(r+a)),f+="L ".concat(t+c*l[3],",").concat(r+a),l[3]>0&&(f+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(u,`,
|
|
276
|
+
`).concat(t,",").concat(r+a-s*l[3])),f+="Z"}else if(i>0&&o===+o&&o>0){var g=Math.min(i,o);f="M ".concat(t,",").concat(r+s*g,`
|
|
277
|
+
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(r,`
|
|
278
|
+
L `).concat(t+n-c*g,",").concat(r,`
|
|
279
|
+
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*g,`
|
|
280
|
+
L `).concat(t+n,",").concat(r+a-s*g,`
|
|
281
|
+
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-c*g,",").concat(r+a,`
|
|
282
|
+
L `).concat(t+c*g,",").concat(r+a,`
|
|
283
|
+
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*g," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},QU=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,o=r.x,i=r.y,s=r.width,c=r.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(o,o+s),f=Math.max(o,o+s),l=Math.min(i,i+c),d=Math.max(i,i+c);return n>=u&&n<=f&&a>=l&&a<=d}return!1},JU={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Av=function(t){var r=eE(eE({},JU),t),n=A.useRef(),a=A.useState(-1),o=UU(a,2),i=o[0],s=o[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var c=r.x,u=r.y,f=r.width,l=r.height,d=r.radius,p=r.className,g=r.animationEasing,v=r.animationDuration,h=r.animationBegin,b=r.isAnimationActive,w=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||l!==+l||f===0||l===0)return null;var x=ge("recharts-rectangle",p);return w?A.createElement(dr,{canBegin:i>0,from:{width:f,height:l,x:c,y:u},to:{width:f,height:l,x:c,y:u},duration:v,animationEasing:g,isActive:w},function(O){var m=O.width,S=O.height,P=O.x,E=O.y;return A.createElement(dr,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:v,isActive:b,easing:g},A.createElement("path",Ws({},pe(r,!0),{className:x,d:tE(P,E,m,S,d),ref:n})))}):A.createElement("path",Ws({},pe(r,!0),{className:x,d:tE(c,u,f,l,d)}))};function Ev(){return Ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ev.apply(this,arguments)}var Tv=function(t){var r=t.cx,n=t.cy,a=t.r,o=t.className,i=ge("recharts-dot",o);return r===+r&&n===+n&&a===+a?A.createElement("circle",Ev({},pe(t,!1),Di(t),{className:i,cx:r,cy:n,r:a})):null};function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}var e4=["x","y","top","left","width","height","className"];function Cv(){return Cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cv.apply(this,arguments)}function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function t4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rE(Object(r),!0).forEach(function(n){r4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r4(e,t,r){return t=n4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n4(e){var t=a4(e,"string");return Ao(t)=="symbol"?t:t+""}function a4(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o4(e,t){if(e==null)return{};var r=i4(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var s4=function(t,r,n,a,o,i){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(i,",").concat(r,"h").concat(n)},c4=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,o=a===void 0?0:a,i=t.top,s=i===void 0?0:i,c=t.left,u=c===void 0?0:c,f=t.width,l=f===void 0?0:f,d=t.height,p=d===void 0?0:d,g=t.className,v=o4(t,e4),h=t4({x:n,y:o,top:s,left:u,width:l,height:p},v);return!Z(n)||!Z(o)||!Z(l)||!Z(p)||!Z(s)||!Z(u)?null:A.createElement("path",Cv({},pe(h,!0),{className:ge("recharts-cross",g),d:s4(n,o,l,p,s,u)}))},Mv,nE;function u4(){if(nE)return Mv;nE=1;var e=F1(),t=e(Object.getPrototypeOf,Object);return Mv=t,Mv}var Nv,aE;function l4(){if(aE)return Nv;aE=1;var e=Jt(),t=u4(),r=er(),n="[object Object]",a=Function.prototype,o=Object.prototype,i=a.toString,s=o.hasOwnProperty,c=i.call(Object);function u(f){if(!r(f)||e(f)!=n)return!1;var l=t(f);if(l===null)return!0;var d=s.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&i.call(d)==c}return Nv=u,Nv}var f4=l4();const d4=Te(f4);var Iv,oE;function p4(){if(oE)return Iv;oE=1;var e=Jt(),t=er(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return Iv=n,Iv}var h4=p4();const v4=Te(h4);function Eo(e){"@babel/helpers - typeof";return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Us.apply(this,arguments)}function y4(e,t){return w4(e)||b4(e,t)||m4(e,t)||g4()}function g4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
284
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m4(e,t){if(e){if(typeof e=="string")return iE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iE(e,t)}}function iE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function w4(e){if(Array.isArray(e))return e}function sE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sE(Object(r),!0).forEach(function(n){x4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x4(e,t,r){return t=S4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S4(e){var t=O4(e,"string");return Eo(t)=="symbol"?t:t+""}function O4(e,t){if(Eo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Eo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uE=function(t,r,n,a,o){var i=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-i/2,",").concat(r+o),s+="L ".concat(t+n-i/2-a,",").concat(r+o),s+="L ".concat(t,",").concat(r," Z"),s},_4={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},P4=function(t){var r=cE(cE({},_4),t),n=A.useRef(),a=A.useState(-1),o=y4(a,2),i=o[0],s=o[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&s(x)}catch{}},[]);var c=r.x,u=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,p=r.className,g=r.animationEasing,v=r.animationDuration,h=r.animationBegin,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var w=ge("recharts-trapezoid",p);return b?A.createElement(dr,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:c,y:u},to:{upperWidth:f,lowerWidth:l,height:d,x:c,y:u},duration:v,animationEasing:g,isActive:b},function(x){var O=x.upperWidth,m=x.lowerWidth,S=x.height,P=x.x,E=x.y;return A.createElement(dr,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:v,easing:g},A.createElement("path",Us({},pe(r,!0),{className:w,d:uE(P,E,O,m,S),ref:n})))}):A.createElement("g",null,A.createElement("path",Us({},pe(r,!0),{className:w,d:uE(c,u,f,l,d)})))},A4=["option","shapeType","propTransformer","activeClassName","isActive"];function To(e){"@babel/helpers - typeof";return To=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},To(e)}function E4(e,t){if(e==null)return{};var r=T4(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lE(Object(r),!0).forEach(function(n){C4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C4(e,t,r){return t=M4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M4(e){var t=N4(e,"string");return To(t)=="symbol"?t:t+""}function N4(e,t){if(To(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(To(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I4(e,t){return Gs(Gs({},t),e)}function $4(e,t){return e==="symbols"}function fE(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return A.createElement(Av,r);case"trapezoid":return A.createElement(P4,r);case"sector":return A.createElement(fA,r);case"symbols":if($4(t))return A.createElement(Wf,r);break;default:return null}}function D4(e){return A.isValidElement(e)?e.props:e}function k4(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?I4:n,o=e.activeClassName,i=o===void 0?"recharts-active-shape":o,s=e.isActive,c=E4(e,A4),u;if(A.isValidElement(t))u=A.cloneElement(t,Gs(Gs({},c),D4(t)));else if(de(t))u=t(c);else if(d4(t)&&!v4(t)){var f=a(t,c);u=A.createElement(fE,{shapeType:r,elementProps:f})}else{var l=c;u=A.createElement(fE,{shapeType:r,elementProps:l})}return s?A.createElement(Ie,{className:i},u):u}function Hs(e,t){return t!=null&&"trapezoids"in e.props}function Vs(e,t){return t!=null&&"sectors"in e.props}function Co(e,t){return t!=null&&"points"in e.props}function j4(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,o=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&o}function L4(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function q4(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function B4(e,t){var r;return Hs(e,t)?r=j4:Vs(e,t)?r=L4:Co(e,t)&&(r=q4),r}function F4(e,t){var r;return Hs(e,t)?r="trapezoids":Vs(e,t)?r="sectors":Co(e,t)&&(r="points"),r}function R4(e,t){if(Hs(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Vs(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Co(e,t)?t.payload:{}}function z4(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=F4(r,t),o=R4(r,t),i=n.filter(function(c,u){var f=ao(o,c),l=r.props[a].filter(function(g){var v=B4(r,t);return v(g,t)}),d=r.props[a].indexOf(l[l.length-1]),p=u===d;return f&&p}),s=n.indexOf(i[i.length-1]);return s}var $v,dE;function W4(){if(dE)return $v;dE=1;var e=Math.ceil,t=Math.max;function r(n,a,o,i){for(var s=-1,c=t(e((a-n)/(o||1)),0),u=Array(c);c--;)u[i?c:++s]=n,n+=o;return u}return $v=r,$v}var Dv,pE;function hE(){if(pE)return Dv;pE=1;var e=OO(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-1/0){var o=a<0?-1:1;return o*r}return a===a?a:0}return Dv=n,Dv}var kv,vE;function U4(){if(vE)return kv;vE=1;var e=W4(),t=Xi(),r=hE();function n(a){return function(o,i,s){return s&&typeof s!="number"&&t(o,i,s)&&(i=s=void 0),o=r(o),i===void 0?(i=o,o=0):i=r(i),s=s===void 0?o<i?1:-1:r(s),e(o,i,s,a)}}return kv=n,kv}var jv,yE;function G4(){if(yE)return jv;yE=1;var e=U4(),t=e();return jv=t,jv}var H4=G4();const Ks=Te(H4);function Mo(e){"@babel/helpers - typeof";return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(e)}function gE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gE(Object(r),!0).forEach(function(n){bE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bE(e,t,r){return t=V4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V4(e){var t=K4(e,"string");return Mo(t)=="symbol"?t:t+""}function K4(e,t){if(Mo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y4=["Webkit","Moz","O","ms"],X4=function(t,r){var n=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=Y4.reduce(function(o,i){return mE(mE({},o),{},bE({},i+n,r))},{});return a[t]=r,a};function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ys.apply(this,arguments)}function wE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wE(Object(r),!0).forEach(function(n){ft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OE(n.key),n)}}function Q4(e,t,r){return t&&xE(e.prototype,t),r&&xE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function J4(e,t,r){return t=Xs(t),eG(e,SE()?Reflect.construct(t,r||[],Xs(e).constructor):t.apply(e,r))}function eG(e,t){if(t&&(Hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tG(e)}function tG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SE=function(){return!!e})()}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(e)}function rG(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qv(e,t)}function qv(e,t){return qv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qv(e,t)}function ft(e,t,r){return t=OE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OE(e){var t=nG(e,"string");return Hn(t)=="symbol"?t:t+""}function nG(e,t){if(Hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var aG=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,o=t.x,i=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=Va().domain(Ks(0,c)).range([o,o+i-s]),f=u.domain().map(function(l){return u(l)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:f}},_E=function(t){return t.changedTouches&&!!t.changedTouches.length},Vn=function(e){function t(r){var n;return Z4(this,t),n=J4(this,t,[r]),ft(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),ft(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),ft(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,o=a.endIndex,i=a.onDragEnd,s=a.startIndex;i==null||i({endIndex:o,startIndex:s})}),n.detachDragEndListener()}),ft(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),ft(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),ft(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),ft(n,"handleSlideDragStart",function(a){var o=_E(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return rG(t,e),Q4(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,o=n.endX,i=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,f=u.length-1,l=Math.min(a,o),d=Math.max(a,o),p=t.getIndexInRange(i,l),g=t.getIndexInRange(i,d);return{startIndex:p-p%c,endIndex:g===f?f:g-g%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,o=a.data,i=a.tickFormatter,s=a.dataKey,c=lt(o[n],s,n);return de(i)?i(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,o=a.slideMoveStartX,i=a.startX,s=a.endX,c=this.props,u=c.x,f=c.width,l=c.travellerWidth,d=c.startIndex,p=c.endIndex,g=c.onChange,v=n.pageX-o;v>0?v=Math.min(v,u+f-l-s,u+f-l-i):v<0&&(v=Math.max(v,u-i,u-s));var h=this.getIndex({startX:i+v,endX:s+v});(h.startIndex!==d||h.endIndex!==p)&&g&&g(h),this.setState({startX:i+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var o=_E(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,o=a.brushMoveStartX,i=a.movingTravellerId,s=a.endX,c=a.startX,u=this.state[i],f=this.props,l=f.x,d=f.width,p=f.travellerWidth,g=f.onChange,v=f.gap,h=f.data,b={startX:this.state.startX,endX:this.state.endX},w=n.pageX-o;w>0?w=Math.min(w,l+d-p-u):w<0&&(w=Math.max(w,l-u)),b[i]=u+w;var x=this.getIndex(b),O=x.startIndex,m=x.endIndex,S=function(){var E=h.length-1;return i==="startX"&&(s>c?O%v===0:m%v===0)||s<c&&m===E||i==="endX"&&(s>c?m%v===0:O%v===0)||s>c&&m===E};this.setState(ft(ft({},i,u+w),"brushMoveStartX",n.pageX),function(){g&&S()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var o=this,i=this.state,s=i.scaleValues,c=i.startX,u=i.endX,f=this.state[a],l=s.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=s.length)){var p=s[d];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(ft({},a,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,o=n.y,i=n.width,s=n.height,c=n.fill,u=n.stroke;return A.createElement("rect",{stroke:u,fill:c,x:a,y:o,width:i,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,o=n.y,i=n.width,s=n.height,c=n.data,u=n.children,f=n.padding,l=A.Children.only(u);return l?A.cloneElement(l,{x:a,y:o,width:i,height:s,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var o,i,s=this,c=this.props,u=c.y,f=c.travellerWidth,l=c.height,d=c.traveller,p=c.ariaLabel,g=c.data,v=c.startIndex,h=c.endIndex,b=Math.max(n,this.props.x),w=Lv(Lv({},pe(this.props,!1)),{},{x:b,y:u,width:f,height:l}),x=p||"Min value: ".concat((o=g[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((i=g[h])===null||i===void 0?void 0:i.name);return A.createElement(Ie,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),s.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,w))}},{key:"renderSlide",value:function(n,a){var o=this.props,i=o.y,s=o.height,c=o.stroke,u=o.travellerWidth,f=Math.min(n,a)+u,l=Math.max(Math.abs(a-n)-u,0);return A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:i,width:l,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,o=n.endIndex,i=n.y,s=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,l=f.startX,d=f.endX,p=5,g={pointerEvents:"none",fill:u};return A.createElement(Ie,{className:"recharts-brush-texts"},A.createElement(ns,Ys({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-p,y:i+s/2},g),this.getTextOfTick(a)),A.createElement(ns,Ys({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+c+p,y:i+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,a=n.data,o=n.className,i=n.children,s=n.x,c=n.y,u=n.width,f=n.height,l=n.alwaysShowText,d=this.state,p=d.startX,g=d.endX,v=d.isTextActive,h=d.isSlideMoving,b=d.isTravellerMoving,w=d.isTravellerFocused;if(!a||!a.length||!Z(s)||!Z(c)||!Z(u)||!Z(f)||u<=0||f<=0)return null;var x=ge("recharts-brush",o),O=A.Children.count(i)===1,m=X4("userSelect","none");return A.createElement(Ie,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(v||h||b||w||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,o=n.y,i=n.width,s=n.height,c=n.stroke,u=Math.floor(o+s/2)-1;return A.createElement(A.Fragment,null,A.createElement("rect",{x:a,y:o,width:i,height:s,fill:c,stroke:"none"}),A.createElement("line",{x1:a+1,y1:u,x2:a+i-1,y2:u,fill:"none",stroke:"#fff"}),A.createElement("line",{x1:a+1,y1:u+2,x2:a+i-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var o;return A.isValidElement(n)?o=A.cloneElement(n,a):de(n)?o=n(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(n,a){var o=n.data,i=n.width,s=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,l=n.endIndex;if(o!==a.prevData||u!==a.prevUpdateId)return Lv({prevData:o,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:i},o&&o.length?aG({data:o,width:i,x:s,travellerWidth:c,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(a.scale&&(i!==a.prevWidth||s!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([s,s+i-c]);var d=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:o,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:i,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var o=n.length,i=0,s=o-1;s-i>1;){var c=Math.floor((i+s)/2);n[c]>a?s=c:i=c}return a>=n[s]?s:i}}])}(A.PureComponent);ft(Vn,"displayName","Brush"),ft(Vn,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Bv,PE;function oG(){if(PE)return Bv;PE=1;var e=Sp();function t(r,n){var a;return e(r,function(o,i,s){return a=n(o,i,s),!a}),!!a}return Bv=t,Bv}var Fv,AE;function iG(){if(AE)return Fv;AE=1;var e=c1(),t=Or(),r=oG(),n=nt(),a=Xi();function o(i,s,c){var u=n(i)?e:r;return c&&a(i,s,c)&&(s=void 0),u(i,t(s,3))}return Fv=o,Fv}var sG=iG();const cG=Te(sG);var Vt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Rv,EE;function uG(){if(EE)return Rv;EE=1;var e=eO();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return Rv=t,Rv}var zv,TE;function lG(){if(TE)return zv;TE=1;var e=uG(),t=RS(),r=Or();function n(a,o){var i={};return o=r(o,3),t(a,function(s,c,u){e(i,c,o(s,c,u))}),i}return zv=n,zv}var fG=lG();const dG=Te(fG);var Wv,CE;function pG(){if(CE)return Wv;CE=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(!r(t[n],n,t))return!1;return!0}return Wv=e,Wv}var Uv,ME;function hG(){if(ME)return Uv;ME=1;var e=Sp();function t(r,n){var a=!0;return e(r,function(o,i,s){return a=!!n(o,i,s),a}),a}return Uv=t,Uv}var Gv,NE;function vG(){if(NE)return Gv;NE=1;var e=pG(),t=hG(),r=Or(),n=nt(),a=Xi();function o(i,s,c){var u=n(i)?e:t;return c&&a(i,s,c)&&(s=void 0),u(i,r(s,3))}return Gv=o,Gv}var yG=vG();const IE=Te(yG);var gG=["x","y"];function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hv.apply(this,arguments)}function $E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function No(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(r),!0).forEach(function(n){mG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mG(e,t,r){return t=bG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bG(e){var t=wG(e,"string");return Kn(t)=="symbol"?t:t+""}function wG(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xG(e,t){if(e==null)return{};var r=SG(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OG(e,t){var r=e.x,n=e.y,a=xG(e,gG),o="".concat(r),i=parseInt(o,10),s="".concat(n),c=parseInt(s,10),u="".concat(t.height||a.height),f=parseInt(u,10),l="".concat(t.width||a.width),d=parseInt(l,10);return No(No(No(No(No({},t),a),i?{x:i}:{}),c?{y:c}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function DE(e){return A.createElement(k4,Hv({shapeType:"rectangle",propTransformer:OG,activeClassName:"recharts-active-bar"},e))}var _G=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var o=typeof n=="number";return o?t(n,a):(o||(process.env.NODE_ENV!=="production"?ot(!1,"minPointSize callback function received a value with type of ".concat(Kn(n),". Currently only numbers are supported.")):ot()),r)}},PG=["value","background"],kE;function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function AG(e,t){if(e==null)return{};var r=EG(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function EG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zs.apply(this,arguments)}function jE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(r),!0).forEach(function(n){Nr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BE(n.key),n)}}function CG(e,t,r){return t&&LE(e.prototype,t),r&&LE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function MG(e,t,r){return t=Qs(t),NG(e,qE()?Reflect.construct(t,r||[],Qs(e).constructor):t.apply(e,r))}function NG(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IG(e)}function IG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qE=function(){return!!e})()}function Qs(e){return Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(e)}function $G(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vv(e,t)}function Vv(e,t){return Vv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vv(e,t)}function Nr(e,t,r){return t=BE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BE(e){var t=DG(e,"string");return Yn(t)=="symbol"?t:t+""}function DG(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Io=function(e){function t(){var r;TG(this,t);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return r=MG(this,t,[].concat(a)),Nr(r,"state",{isAnimationFinished:!1}),Nr(r,"id",Na("recharts-bar-")),Nr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),i&&i()}),Nr(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),i&&i()}),r}return $G(t,e),CG(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,o=this.props,i=o.shape,s=o.dataKey,c=o.activeIndex,u=o.activeBar,f=pe(this.props,!1);return n&&n.map(function(l,d){var p=d===c,g=p?u:i,v=Be(Be(Be({},f),l),{},{isActive:p,option:g,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return A.createElement(Ie,Zs({className:"recharts-bar-rectangle"},ki(a.props,l,d),{key:"rectangle-".concat(l==null?void 0:l.x,"-").concat(l==null?void 0:l.y,"-").concat(l==null?void 0:l.value,"-").concat(d)}),A.createElement(DE,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,o=a.data,i=a.layout,s=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,l=a.animationId,d=this.state.prevData;return A.createElement(dr,{begin:c,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,v=o.map(function(h,b){var w=d&&d[b];if(w){var x=yt(w.x,h.x),O=yt(w.y,h.y),m=yt(w.width,h.width),S=yt(w.height,h.height);return Be(Be({},h),{},{x:x(g),y:O(g),width:m(g),height:S(g)})}if(i==="horizontal"){var P=yt(0,h.height),E=P(g);return Be(Be({},h),{},{y:h.y+h.height-E,height:E})}var T=yt(0,h.width),k=T(g);return Be(Be({},h),{},{width:k})});return A.createElement(Ie,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,o=n.isAnimationActive,i=this.state.prevData;return o&&a&&a.length&&(!i||!ao(i,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,o=a.data,i=a.dataKey,s=a.activeIndex,c=pe(this.props.background,!1);return o.map(function(u,f){u.value;var l=u.background,d=AG(u,PG);if(!l)return null;var p=Be(Be(Be(Be(Be({},d),{},{fill:"#eee"},l),c),ki(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:i,index:f,className:"recharts-bar-background-rectangle"});return A.createElement(DE,Zs({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.data,s=o.xAxis,c=o.yAxis,u=o.layout,f=o.children,l=Ct(f,Cs);if(!l)return null;var d=u==="vertical"?i[0].height/2:i[0].width/2,p=function(h,b){var w=Array.isArray(h.value)?h.value[1]:h.value;return{x:h.x,y:h.y,value:w,errorVal:lt(h,b)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return A.createElement(Ie,g,l.map(function(v){return A.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:i,xAxis:s,yAxis:c,layout:u,offset:d,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,o=n.data,i=n.className,s=n.xAxis,c=n.yAxis,u=n.left,f=n.top,l=n.width,d=n.height,p=n.isAnimationActive,g=n.background,v=n.id;if(a||!o||!o.length)return null;var h=this.state.isAnimationFinished,b=ge("recharts-bar",i),w=s&&s.allowDataOverflow,x=c&&c.allowDataOverflow,O=w||x,m=ve(v)?this.id:v;return A.createElement(Ie,{className:b},w||x?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(m)},A.createElement("rect",{x:w?u:u-l/2,y:x?f:f-d/2,width:w?l:l*2,height:x?d:d*2}))):null,A.createElement(Ie,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(m,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,m),(!p||h)&&Cr.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(A.PureComponent);kE=Io,Nr(Io,"displayName","Bar"),Nr(Io,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Nn.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Nr(Io,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,o=e.xAxis,i=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,p=KW(n,r);if(!p)return null;var g=t.layout,v=r.type.defaultProps,h=v!==void 0?Be(Be({},v),r.props):r.props,b=h.dataKey,w=h.children,x=h.minPointSize,O=g==="horizontal"?i:o,m=u?O.scale.domain():null,S=r3({numericAxis:O}),P=Ct(w,CO),E=l.map(function(T,k){var C,M,N,I,L,$;u?C=YW(u[f+k],m):(C=lt(T,b),Array.isArray(C)||(C=[S,C]));var R=_G(x,kE.defaultProps.minPointSize)(C[1],k);if(g==="horizontal"){var B,q=[i.scale(C[0]),i.scale(C[1])],j=q[0],F=q[1];M=VP({axis:o,ticks:s,bandSize:a,offset:p.offset,entry:T,index:k}),N=(B=F??j)!==null&&B!==void 0?B:void 0,I=p.size;var W=j-F;if(L=Number.isNaN(W)?0:W,$={x:M,y:i.y,width:I,height:i.height},Math.abs(R)>0&&Math.abs(L)<Math.abs(R)){var V=Tt(L||R)*(Math.abs(R)-Math.abs(L));N-=V,L+=V}}else{var Y=[o.scale(C[0]),o.scale(C[1])],Q=Y[0],ee=Y[1];if(M=Q,N=VP({axis:i,ticks:c,bandSize:a,offset:p.offset,entry:T,index:k}),I=ee-Q,L=p.size,$={x:o.x,y:N,width:o.width,height:L},Math.abs(R)>0&&Math.abs(I)<Math.abs(R)){var re=Tt(I||R)*(Math.abs(R)-Math.abs(I));I+=re}}return Be(Be(Be({},T),{},{x:M,y:N,width:I,height:L,value:u?C:C[1],payload:T,background:$},P&&P[k]&&P[k].props),{},{tooltipPayload:[QP(r,T)],tooltipPosition:{x:M+I/2,y:N+L/2}})});return Be({data:E,layout:g},d)});function $o(e){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$o(e)}function kG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zE(n.key),n)}}function jG(e,t,r){return t&&FE(e.prototype,t),r&&FE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function RE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RE(Object(r),!0).forEach(function(n){Js(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Js(e,t,r){return t=zE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zE(e){var t=LG(e,"string");return $o(t)=="symbol"?t:t+""}function LG(e,t){if($o(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qG=function(t,r,n,a,o){var i=t.width,s=t.height,c=t.layout,u=t.children,f=Object.keys(r),l={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!ct(u,Io);return f.reduce(function(p,g){var v=r[g],h=v.orientation,b=v.domain,w=v.padding,x=w===void 0?{}:w,O=v.mirror,m=v.reversed,S="".concat(h).concat(O?"Mirror":""),P,E,T,k,C;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var M=b[1]-b[0],N=1/0,I=v.categoricalDomain.sort();if(I.forEach(function(Y,Q){Q>0&&(N=Math.min((Y||0)-(I[Q-1]||0),N))}),Number.isFinite(N)){var L=N/M,$=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(P=L*$/2),v.padding==="no-gap"){var R=zr(t.barCategoryGap,L*$),B=L*$/2;P=B-R-(B-R)/$*R}}}a==="xAxis"?E=[n.left+(x.left||0)+(P||0),n.left+n.width-(x.right||0)-(P||0)]:a==="yAxis"?E=c==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(P||0),n.top+n.height-(x.bottom||0)-(P||0)]:E=v.range,m&&(E=[E[1],E[0]]);var q=HW(v,o,d),j=q.scale,F=q.realScaleType;j.domain(b).range(E),VW(j);var W=t3(j,Dt(Dt({},v),{},{realScaleType:F}));a==="xAxis"?(C=h==="top"&&!O||h==="bottom"&&O,T=n.left,k=l[S]-C*v.height):a==="yAxis"&&(C=h==="left"&&!O||h==="right"&&O,T=l[S]-C*v.width,k=n.top);var V=Dt(Dt(Dt({},v),W),{},{realScaleType:F,x:T,y:k,scale:j,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return V.bandSize=Ns(V,W),!v.hide&&a==="xAxis"?l[S]+=(C?-1:1)*V.height:v.hide||(l[S]+=(C?-1:1)*V.width),Dt(Dt({},p),{},Js({},g,V))},{})},WE=function(t,r){var n=t.x,a=t.y,o=r.x,i=r.y;return{x:Math.min(n,o),y:Math.min(a,i),width:Math.abs(o-n),height:Math.abs(i-a)}},BG=function(t){var r=t.x1,n=t.y1,a=t.x2,o=t.y2;return WE({x:r,y:n},{x:a,y:o})},UE=function(){function e(t){kG(this,e),this.scale=t}return jG(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+i}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],o=n[n.length-1];return a<=o?r>=a&&r<=o:r>=o&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();Js(UE,"EPS",1e-4);var Kv=function(t){var r=Object.keys(t).reduce(function(n,a){return Dt(Dt({},n),{},Js({},a,UE.create(t[a])))},{});return Dt(Dt({},r),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.bandAware,s=o.position;return dG(a,function(c,u){return r[u].apply(c,{bandAware:i,position:s})})},isInRange:function(a){return IE(a,function(o,i){return r[i].isInRange(o)})}})};function FG(e){return(e%180+180)%180}var RG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=FG(a),i=o*Math.PI/180,s=Math.atan(n/r),c=i>s&&i<Math.PI-s?n/Math.sin(i):r/Math.cos(i);return Math.abs(c)},Yv,GE;function zG(){if(GE)return Yv;GE=1;var e=Or(),t=ja(),r=Vi();function n(a){return function(o,i,s){var c=Object(o);if(!t(o)){var u=e(i,3);o=r(o),i=function(l){return u(c[l],l,c)}}var f=a(o,i,s);return f>-1?c[u?o[f]:f]:void 0}}return Yv=n,Yv}var Xv,HE;function WG(){if(HE)return Xv;HE=1;var e=hE();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return Xv=t,Xv}var Zv,VE;function UG(){if(VE)return Zv;VE=1;var e=mS(),t=Or(),r=WG(),n=Math.max;function a(o,i,s){var c=o==null?0:o.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(o,t(i,3),u)}return Zv=a,Zv}var Qv,KE;function GG(){if(KE)return Qv;KE=1;var e=zG(),t=UG(),r=e(t);return Qv=r,Qv}var HG=GG();const VG=Te(HG);var KG=Rw(),YG=Te(KG)(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}var Jv=A.createContext(void 0),ey=A.createContext(void 0),YE=A.createContext(void 0),XE=A.createContext({}),ZE=A.createContext(void 0),QE=A.createContext(0),JE=A.createContext(0),eT=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,o=r.offset,i=t.clipPathId,s=t.children,c=t.width,u=t.height,f=YG(o);return A.createElement(Jv.Provider,{value:n},A.createElement(ey.Provider,{value:a},A.createElement(XE.Provider,{value:o},A.createElement(YE.Provider,{value:f},A.createElement(ZE.Provider,{value:i},A.createElement(QE.Provider,{value:u},A.createElement(JE.Provider,{value:c},s)))))))},XG=function(){return A.useContext(ZE)};function tT(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var rT=function(t){var r=A.useContext(Jv);r==null&&(process.env.NODE_ENV!=="production"?ot(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ot());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ot(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(ec(t),"]. ").concat(tT(r))):ot()),n},ZG=function(){var t=A.useContext(Jv);return Sr(t)},QG=function(){var t=A.useContext(ey),r=VG(t,function(n){return IE(n.domain,Number.isFinite)});return r||Sr(t)},nT=function(t){var r=A.useContext(ey);r==null&&(process.env.NODE_ENV!=="production"?ot(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ot());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ot(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(ec(t),"]. ").concat(tT(r))):ot()),n},JG=function(){var t=A.useContext(YE);return t},e8=function(){return A.useContext(XE)},ty=function(){return A.useContext(JE)},ry=function(){return A.useContext(QE)};function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function t8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sT(n.key),n)}}function n8(e,t,r){return t&&r8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a8(e,t,r){return t=tc(t),o8(e,aT()?Reflect.construct(t,r||[],tc(e).constructor):t.apply(e,r))}function o8(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i8(e)}function i8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aT=function(){return!!e})()}function tc(e){return tc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tc(e)}function s8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ny(e,t)}function ny(e,t){return ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ny(e,t)}function oT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(r),!0).forEach(function(n){ay(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ay(e,t,r){return t=sT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sT(e){var t=c8(e,"string");return Xn(t)=="symbol"?t:t+""}function c8(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function u8(e,t){return p8(e)||d8(e,t)||f8(e,t)||l8()}function l8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
285
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f8(e,t){if(e){if(typeof e=="string")return cT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cT(e,t)}}function cT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function p8(e){if(Array.isArray(e))return e}function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oy.apply(this,arguments)}var h8=function(t,r){var n;return A.isValidElement(t)?n=A.cloneElement(t,r):de(t)?n=t(r):n=A.createElement("line",oy({},r,{className:"recharts-reference-line-line"})),n},v8=function(t,r,n,a,o,i,s,c,u){var f=o.x,l=o.y,d=o.width,p=o.height;if(n){var g=u.y,v=t.y.apply(g,{position:i});if(Vt(u,"discard")&&!t.y.isInRange(v))return null;var h=[{x:f+d,y:v},{x:f,y:v}];return c==="left"?h.reverse():h}if(r){var b=u.x,w=t.x.apply(b,{position:i});if(Vt(u,"discard")&&!t.x.isInRange(w))return null;var x=[{x:w,y:l+p},{x:w,y:l}];return s==="top"?x.reverse():x}if(a){var O=u.segment,m=O.map(function(S){return t.apply(S,{position:i})});return Vt(u,"discard")&&cG(m,function(S){return!t.isInRange(S)})?null:m}return null};function y8(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,o=e.yAxisId,i=e.shape,s=e.className,c=e.alwaysShow,u=XG(),f=rT(a),l=nT(o),d=JG();if(!u||!d)return null;rr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Kv({x:f.scale,y:l.scale}),g=Fe(t),v=Fe(r),h=n&&n.length===2,b=v8(p,g,v,h,d,e.position,f.orientation,l.orientation,e);if(!b)return null;var w=u8(b,2),x=w[0],O=x.x,m=x.y,S=w[1],P=S.x,E=S.y,T=Vt(e,"hidden")?"url(#".concat(u,")"):void 0,k=iT(iT({clipPath:T},pe(e,!0)),{},{x1:O,y1:m,x2:P,y2:E});return A.createElement(Ie,{className:ge("recharts-reference-line",s)},h8(i,k),Qe.renderCallByParent(e,BG({x1:O,y1:m,x2:P,y2:E})))}var iy=function(e){function t(){return t8(this,t),a8(this,t,arguments)}return s8(t,e),n8(t,[{key:"render",value:function(){return A.createElement(y8,this.props)}}])}(A.Component);ay(iy,"displayName","ReferenceLine"),ay(iy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sy.apply(this,arguments)}function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function uT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(n){nc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dT(n.key),n)}}function b8(e,t,r){return t&&m8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function w8(e,t,r){return t=rc(t),x8(e,fT()?Reflect.construct(t,r||[],rc(e).constructor):t.apply(e,r))}function x8(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S8(e)}function S8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fT=function(){return!!e})()}function rc(e){return rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rc(e)}function O8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cy(e,t)}function cy(e,t){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cy(e,t)}function nc(e,t,r){return t=dT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dT(e){var t=_8(e,"string");return Zn(t)=="symbol"?t:t+""}function _8(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var P8=function(t){var r=t.x,n=t.y,a=t.xAxis,o=t.yAxis,i=Kv({x:a.scale,y:o.scale}),s=i.apply({x:r,y:n},{bandAware:!0});return Vt(t,"discard")&&!i.isInRange(s)?null:s},ac=function(e){function t(){return g8(this,t),w8(this,t,arguments)}return O8(t,e),b8(t,[{key:"render",value:function(){var n=this.props,a=n.x,o=n.y,i=n.r,s=n.alwaysShow,c=n.clipPathId,u=Fe(a),f=Fe(o);if(rr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var l=P8(this.props);if(!l)return null;var d=l.x,p=l.y,g=this.props,v=g.shape,h=g.className,b=Vt(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=lT(lT({clipPath:b},pe(this.props,!0)),{},{cx:d,cy:p});return A.createElement(Ie,{className:ge("recharts-reference-dot",h)},t.renderDot(v,w),Qe.renderCallByParent(this.props,{x:d-i,y:p-i,width:2*i,height:2*i}))}}])}(A.Component);nc(ac,"displayName","ReferenceDot"),nc(ac,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),nc(ac,"renderDot",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):de(e)?r=e(t):r=A.createElement(Tv,sy({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uy.apply(this,arguments)}function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function pT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(r),!0).forEach(function(n){ic(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yT(n.key),n)}}function T8(e,t,r){return t&&E8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C8(e,t,r){return t=oc(t),M8(e,vT()?Reflect.construct(t,r||[],oc(e).constructor):t.apply(e,r))}function M8(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N8(e)}function N8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vT=function(){return!!e})()}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oc(e)}function I8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ly(e,t)}function ly(e,t){return ly=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ly(e,t)}function ic(e,t,r){return t=yT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yT(e){var t=$8(e,"string");return Qn(t)=="symbol"?t:t+""}function $8(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var D8=function(t,r,n,a,o){var i=o.x1,s=o.x2,c=o.y1,u=o.y2,f=o.xAxis,l=o.yAxis;if(!f||!l)return null;var d=Kv({x:f.scale,y:l.scale}),p={x:t?d.x.apply(i,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(c,{position:"start"}):d.y.rangeMin},g={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return Vt(o,"discard")&&(!d.isInRange(p)||!d.isInRange(g))?null:WE(p,g)},sc=function(e){function t(){return A8(this,t),C8(this,t,arguments)}return I8(t,e),T8(t,[{key:"render",value:function(){var n=this.props,a=n.x1,o=n.x2,i=n.y1,s=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;rr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=Fe(a),d=Fe(o),p=Fe(i),g=Fe(s),v=this.props.shape;if(!l&&!d&&!p&&!g&&!v)return null;var h=D8(l,d,p,g,this.props);if(!h&&!v)return null;var b=Vt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return A.createElement(Ie,{className:ge("recharts-reference-area",c)},t.renderRect(v,hT(hT({clipPath:b},pe(this.props,!0)),h)),Qe.renderCallByParent(this.props,h))}}])}(A.Component);ic(sc,"displayName","ReferenceArea"),ic(sc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),ic(sc,"renderRect",function(e,t){var r;return A.isValidElement(e)?r=A.cloneElement(e,t):de(e)?r=e(t):r=A.createElement(Av,uy({},t,{className:"recharts-reference-area-rect"})),r});function gT(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function k8(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return RG(n,r)}function j8(e,t,r){var n=r==="width",a=e.x,o=e.y,i=e.width,s=e.height;return t===1?{start:n?a:o,end:n?a+i:o+s}:{start:n?a+i:o+s,end:n?a:o}}function cc(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function L8(e,t){return gT(e,t+1)}function q8(e,t,r,n,a){for(var o=(n||[]).slice(),i=t.start,s=t.end,c=0,u=1,f=i,l=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:gT(n,u)};var v=c,h,b=function(){return h===void 0&&(h=r(g,v)),h},w=g.coordinate,x=c===0||cc(e,w,b,f,s);x||(c=0,f=i,u+=1),x&&(f=w+e*(b()/2+a),c+=u)},d;u<=o.length;)if(d=l(),d)return d.v;return[]}function Do(e){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(e)}function mT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(r),!0).forEach(function(n){B8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B8(e,t,r){return t=F8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F8(e){var t=R8(e,"string");return Do(t)=="symbol"?t:t+""}function R8(e,t){if(Do(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Do(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z8(e,t,r,n,a){for(var o=(n||[]).slice(),i=o.length,s=t.start,c=t.end,u=function(d){var p=o[d],g,v=function(){return g===void 0&&(g=r(p,d)),g};if(d===i-1){var h=e*(p.coordinate+e*v()/2-c);o[d]=p=Je(Je({},p),{},{tickCoord:h>0?p.coordinate-h*e:p.coordinate})}else o[d]=p=Je(Je({},p),{},{tickCoord:p.coordinate});var b=cc(e,p.tickCoord,v,s,c);b&&(c=p.tickCoord-e*(v()/2+a),o[d]=Je(Je({},p),{},{isShow:!0}))},f=i-1;f>=0;f--)u(f);return o}function W8(e,t,r,n,a,o){var i=(n||[]).slice(),s=i.length,c=t.start,u=t.end;if(o){var f=n[s-1],l=r(f,s-1),d=e*(f.coordinate+e*l/2-u);i[s-1]=f=Je(Je({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=cc(e,f.tickCoord,function(){return l},c,u);p&&(u=f.tickCoord-e*(l/2+a),i[s-1]=Je(Je({},f),{},{isShow:!0}))}for(var g=o?s-1:s,v=function(w){var x=i[w],O,m=function(){return O===void 0&&(O=r(x,w)),O};if(w===0){var S=e*(x.coordinate-e*m()/2-c);i[w]=x=Je(Je({},x),{},{tickCoord:S<0?x.coordinate-S*e:x.coordinate})}else i[w]=x=Je(Je({},x),{},{tickCoord:x.coordinate});var P=cc(e,x.tickCoord,m,c,u);P&&(c=x.tickCoord+e*(m()/2+a),i[w]=Je(Je({},x),{},{isShow:!0}))},h=0;h<g;h++)v(h);return i}function fy(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,i=e.minTickGap,s=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,l=e.angle;if(!a||!a.length||!n)return[];if(Z(c)||Nn.isSsr)return L8(a,typeof c=="number"&&Z(c)?c:0);var d=[],p=s==="top"||s==="bottom"?"width":"height",g=f&&p==="width"?za(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(x,O){var m=de(u)?u(x.value,O):x.value;return p==="width"?k8(za(m,{fontSize:t,letterSpacing:r}),g,l):za(m,{fontSize:t,letterSpacing:r})[p]},h=a.length>=2?Tt(a[1].coordinate-a[0].coordinate):1,b=j8(o,h,p);return c==="equidistantPreserveStart"?q8(h,b,v,a,i):(c==="preserveStart"||c==="preserveStartEnd"?d=W8(h,b,v,a,i,c==="preserveStartEnd"):d=z8(h,b,v,a,i),d.filter(function(w){return w.isShow}))}var U8=["viewBox"],G8=["viewBox"],H8=["ticks"];function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function ea(){return ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ea.apply(this,arguments)}function bT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(r),!0).forEach(function(n){hy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dy(e,t){if(e==null)return{};var r=V8(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function V8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function K8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ST(n.key),n)}}function Y8(e,t,r){return t&&wT(e.prototype,t),r&&wT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function X8(e,t,r){return t=uc(t),Z8(e,xT()?Reflect.construct(t,r||[],uc(e).constructor):t.apply(e,r))}function Z8(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q8(e)}function Q8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xT=function(){return!!e})()}function uc(e){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uc(e)}function J8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&py(e,t)}function py(e,t){return py=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},py(e,t)}function hy(e,t,r){return t=ST(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ST(e){var t=eH(e,"string");return Jn(t)=="symbol"?t:t+""}function eH(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ta=function(e){function t(r){var n;return K8(this,t),n=X8(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return J8(t,e),Y8(t,[{key:"shouldComponentUpdate",value:function(n,a){var o=n.viewBox,i=dy(n,U8),s=this.props,c=s.viewBox,u=dy(s,G8);return!_n(o,c)||!_n(i,u)||!_n(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,o=a.x,i=a.y,s=a.width,c=a.height,u=a.orientation,f=a.tickSize,l=a.mirror,d=a.tickMargin,p,g,v,h,b,w,x=l?-1:1,O=n.tickSize||f,m=Z(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,h=i+ +!l*c,v=h-x*O,w=v-x*d,b=m;break;case"left":v=h=n.coordinate,g=o+ +!l*s,p=g-x*O,b=p-x*d,w=m;break;case"right":v=h=n.coordinate,g=o+ +l*s,p=g+x*O,b=p+x*d,w=m;break;default:p=g=n.coordinate,h=i+ +l*c,v=h+x*O,w=v+x*d,b=m;break}return{line:{x1:p,y1:v,x2:g,y2:h},tick:{x:b,y:w}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,o=n.mirror,i;switch(a){case"left":i=o?"start":"end";break;case"right":i=o?"end":"start";break;default:i="middle";break}return i}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,o=n.mirror,i="end";switch(a){case"left":case"right":i="middle";break;case"top":i=o?"start":"end";break;default:i=o?"end":"start";break}return i}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,o=n.y,i=n.width,s=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,l=rt(rt(rt({},pe(this.props,!1)),pe(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var d=+(c==="top"&&!u||c==="bottom"&&u);l=rt(rt({},l),{},{x1:a,y1:o+d*s,x2:a+i,y2:o+d*s})}else{var p=+(c==="left"&&!u||c==="right"&&u);l=rt(rt({},l),{},{x1:a+p*i,y1:o,x2:a+p*i,y2:o+s})}return A.createElement("line",ea({},l,{className:ge("recharts-cartesian-axis-line",vt(f,"className"))}))}},{key:"renderTicks",value:function(n,a,o){var i=this,s=this.props,c=s.tickLine,u=s.stroke,f=s.tick,l=s.tickFormatter,d=s.unit,p=fy(rt(rt({},this.props),{},{ticks:n}),a,o),g=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),h=pe(this.props,!1),b=pe(f,!1),w=rt(rt({},h),{},{fill:"none"},pe(c,!1)),x=p.map(function(O,m){var S=i.getTickLineCoord(O),P=S.line,E=S.tick,T=rt(rt(rt(rt({textAnchor:g,verticalAnchor:v},h),{},{stroke:"none",fill:u},b),E),{},{index:m,payload:O,visibleTicksCount:p.length,tickFormatter:l});return A.createElement(Ie,ea({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},ki(i.props,O,m)),c&&A.createElement("line",ea({},w,P,{className:ge("recharts-cartesian-axis-tick-line",vt(c,"className"))})),f&&t.renderTickItem(f,T,"".concat(de(l)?l(O.value,m):O.value).concat(d||"")))});return A.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var n=this,a=this.props,o=a.axisLine,i=a.width,s=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var l=this.props,d=l.ticks,p=dy(l,H8),g=d;return de(c)&&(g=d&&d.length>0?c(this.props):c(p)),i<=0||s<=0||!g||!g.length?null:A.createElement(Ie,{className:ge("recharts-cartesian-axis",u),ref:function(h){n.layerReference=h}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Qe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,o){var i;return A.isValidElement(n)?i=A.cloneElement(n,a):de(n)?i=n(a):i=A.createElement(ns,ea({},a,{className:"recharts-cartesian-axis-tick-value"}),o),i}}])}(A.Component);hy(ta,"displayName","CartesianAxis"),hy(ta,"defaultProps",{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"});var tH=["x1","y1","x2","y2","key"],rH=["offset"];function en(e){"@babel/helpers - typeof";return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},en(e)}function OT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(r),!0).forEach(function(n){nH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nH(e,t,r){return t=aH(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aH(e){var t=oH(e,"string");return en(t)=="symbol"?t:t+""}function oH(e,t){if(en(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(en(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tn.apply(this,arguments)}function _T(e,t){if(e==null)return{};var r=iH(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var sH=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,o=t.y,i=t.width,s=t.height,c=t.ry;return A.createElement("rect",{x:a,y:o,ry:c,width:i,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function PT(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(de(e))r=e(t);else{var n=t.x1,a=t.y1,o=t.x2,i=t.y2,s=t.key,c=_T(t,tH),u=pe(c,!1);u.offset;var f=_T(u,rH);r=A.createElement("line",tn({},f,{x1:n,y1:a,x2:o,y2:i,fill:"none",key:s}))}return r}function cH(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var i=o.map(function(s,c){var u=et(et({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(c),index:c});return PT(a,u)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},i)}function uH(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;var i=o.map(function(s,c){var u=et(et({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(c),index:c});return PT(a,u)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},i)}function lH(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,i=e.height,s=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==f[0]&&f.unshift(0);var l=f.map(function(d,p){var g=!f[p+1],v=g?a+i-d:f[p+1]-d;if(v<=0)return null;var h=p%t.length;return A.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:v,width:o,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}function fH(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,i=e.y,s=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(d){return Math.round(d+o-o)}).sort(function(d,p){return d-p});o!==f[0]&&f.unshift(0);var l=f.map(function(d,p){var g=!f[p+1],v=g?o+s-d:f[p+1]-d;if(v<=0)return null;var h=p%n.length;return A.createElement("rect",{key:"react-".concat(p),x:d,y:i,width:v,height:c,stroke:"none",fill:n[h],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var dH=function(t,r){var n=t.xAxis,a=t.width,o=t.height,i=t.offset;return UP(fy(et(et(et({},ta.defaultProps),n),{},{ticks:fr(n,!0),viewBox:{x:0,y:0,width:a,height:o}})),i.left,i.left+i.width,r)},pH=function(t,r){var n=t.yAxis,a=t.width,o=t.height,i=t.offset;return UP(fy(et(et(et({},ta.defaultProps),n),{},{ticks:fr(n,!0),viewBox:{x:0,y:0,width:a,height:o}})),i.top,i.top+i.height,r)},ra={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function AT(e){var t,r,n,a,o,i,s=ty(),c=ry(),u=e8(),f=et(et({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ra.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ra.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ra.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:ra.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ra.vertical,verticalFill:(i=e.verticalFill)!==null&&i!==void 0?i:ra.verticalFill,x:Z(e.x)?e.x:u.left,y:Z(e.y)?e.y:u.top,width:Z(e.width)?e.width:u.width,height:Z(e.height)?e.height:u.height}),l=f.x,d=f.y,p=f.width,g=f.height,v=f.syncWithTicks,h=f.horizontalValues,b=f.verticalValues,w=ZG(),x=QG();if(!Z(p)||p<=0||!Z(g)||g<=0||!Z(l)||l!==+l||!Z(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||dH,m=f.horizontalCoordinatesGenerator||pH,S=f.horizontalPoints,P=f.verticalPoints;if((!S||!S.length)&&de(m)){var E=h&&h.length,T=m({yAxis:x?et(et({},x),{},{ticks:E?h:x.ticks}):void 0,width:s,height:c,offset:u},E?!0:v);rr(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(en(T),"]")),Array.isArray(T)&&(S=T)}if((!P||!P.length)&&de(O)){var k=b&&b.length,C=O({xAxis:w?et(et({},w),{},{ticks:k?b:w.ticks}):void 0,width:s,height:c,offset:u},k?!0:v);rr(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(en(C),"]")),Array.isArray(C)&&(P=C)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(sH,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),A.createElement(cH,tn({},f,{offset:u,horizontalPoints:S,xAxis:w,yAxis:x})),A.createElement(uH,tn({},f,{offset:u,verticalPoints:P,xAxis:w,yAxis:x})),A.createElement(lH,tn({},f,{horizontalPoints:S})),A.createElement(fH,tn({},f,{verticalPoints:P})))}AT.displayName="CartesianGrid";var hH=["layout","type","stroke","connectNulls","isRange","ref"],vH=["key"],ET;function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}function TT(e,t){if(e==null)return{};var r=yH(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rn(){return rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rn.apply(this,arguments)}function CT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,IT(n.key),n)}}function mH(e,t,r){return t&&MT(e.prototype,t),r&&MT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bH(e,t,r){return t=lc(t),wH(e,NT()?Reflect.construct(t,r||[],lc(e).constructor):t.apply(e,r))}function wH(e,t){if(t&&(na(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xH(e)}function xH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NT=function(){return!!e})()}function lc(e){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lc(e)}function SH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vy(e,t)}function vy(e,t){return vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vy(e,t)}function Kt(e,t,r){return t=IT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IT(e){var t=OH(e,"string");return na(t)=="symbol"?t:t+""}function OH(e,t){if(na(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(na(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $r=function(e){function t(){var r;gH(this,t);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return r=bH(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",Na("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),de(i)&&i()}),Kt(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),de(i)&&i()}),r}return SH(t,e),mH(t,[{key:"renderDots",value:function(n,a,o){var i=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(i&&!s)return null;var c=this.props,u=c.dot,f=c.points,l=c.dataKey,d=pe(this.props,!1),p=pe(u,!0),g=f.map(function(h,b){var w=Ir(Ir(Ir({key:"dot-".concat(b),r:3},d),p),{},{index:b,cx:h.x,cy:h.y,dataKey:l,value:h.value,payload:h.payload,points:f});return t.renderDotItem(u,w)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(o,")"):null};return A.createElement(Ie,rn({className:"recharts-area-dots"},v),g)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,o=a.baseLine,i=a.points,s=a.strokeWidth,c=i[0].x,u=i[i.length-1].x,f=n*Math.abs(c-u),l=Er(i.map(function(d){return d.y||0}));return Z(o)&&typeof o=="number"?l=Math.max(o,l):o&&Array.isArray(o)&&o.length&&(l=Math.max(Er(o.map(function(d){return d.y||0})),l)),Z(l)?A.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(l+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,o=a.baseLine,i=a.points,s=a.strokeWidth,c=i[0].y,u=i[i.length-1].y,f=n*Math.abs(c-u),l=Er(i.map(function(d){return d.x||0}));return Z(o)&&typeof o=="number"?l=Math.max(o,l):o&&Array.isArray(o)&&o.length&&(l=Math.max(Er(o.map(function(d){return d.x||0})),l)),Z(l)?A.createElement("rect",{x:0,y:c<u?c:c-f,width:l+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,o,i){var s=this.props,c=s.layout,u=s.type,f=s.stroke,l=s.connectNulls,d=s.isRange;s.ref;var p=TT(s,hH);return A.createElement(Ie,{clipPath:o?"url(#clipPath-".concat(i,")"):null},A.createElement(bo,rn({},pe(p,!0),{points:n,connectNulls:l,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&A.createElement(bo,rn({},pe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:l,fill:"none",points:n})),f!=="none"&&d&&A.createElement(bo,rn({},pe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:l,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var o=this,i=this.props,s=i.points,c=i.baseLine,u=i.isAnimationActive,f=i.animationBegin,l=i.animationDuration,d=i.animationEasing,p=i.animationId,g=this.state,v=g.prevPoints,h=g.prevBaseLine;return A.createElement(dr,{begin:f,duration:l,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var w=b.t;if(v){var x=v.length/s.length,O=s.map(function(E,T){var k=Math.floor(T*x);if(v[k]){var C=v[k],M=yt(C.x,E.x),N=yt(C.y,E.y);return Ir(Ir({},E),{},{x:M(w),y:N(w)})}return E}),m;if(Z(c)&&typeof c=="number"){var S=yt(h,c);m=S(w)}else if(ve(c)||On(c)){var P=yt(h,0);m=P(w)}else m=c.map(function(E,T){var k=Math.floor(T*x);if(h[k]){var C=h[k],M=yt(C.x,E.x),N=yt(C.y,E.y);return Ir(Ir({},E),{},{x:M(w),y:N(w)})}return E});return o.renderAreaStatically(O,m,n,a)}return A.createElement(Ie,null,A.createElement("defs",null,A.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(w))),A.createElement(Ie,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(s,c,n,a)))})}},{key:"renderArea",value:function(n,a){var o=this.props,i=o.points,s=o.baseLine,c=o.isAnimationActive,u=this.state,f=u.prevPoints,l=u.prevBaseLine,d=u.totalLength;return c&&i&&i.length&&(!f&&d>0||!ao(f,i)||!ao(l,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(i,s,n,a)}},{key:"render",value:function(){var n,a=this.props,o=a.hide,i=a.dot,s=a.points,c=a.className,u=a.top,f=a.left,l=a.xAxis,d=a.yAxis,p=a.width,g=a.height,v=a.isAnimationActive,h=a.id;if(o||!s||!s.length)return null;var b=this.state.isAnimationFinished,w=s.length===1,x=ge("recharts-area",c),O=l&&l.allowDataOverflow,m=d&&d.allowDataOverflow,S=O||m,P=ve(h)?this.id:h,E=(n=pe(i,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=E.r,k=T===void 0?3:T,C=E.strokeWidth,M=C===void 0?2:C,N=Fj(i)?i:{},I=N.clipDot,L=I===void 0?!0:I,$=k*2+M;return A.createElement(Ie,{className:x},O||m?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(P)},A.createElement("rect",{x:O?f:f-p/2,y:m?u:u-g/2,width:O?p:p*2,height:m?g:g*2})),!L&&A.createElement("clipPath",{id:"clipPath-dots-".concat(P)},A.createElement("rect",{x:f-$/2,y:u-$/2,width:p+$,height:g+$}))):null,w?null:this.renderArea(S,P),(i||w)&&this.renderDots(S,L,P),(!v||b)&&Cr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(A.PureComponent);ET=$r,Kt($r,"displayName","Area"),Kt($r,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Nn.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Kt($r,"getBaseValue",function(e,t,r,n){var a=e.layout,o=e.baseValue,i=t.props.baseValue,s=i??o;if(Z(s)&&typeof s=="number")return s;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),l=Math.min(u[0],u[1]);return s==="dataMin"?l:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),Kt($r,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,p=t.layout,g=u&&u.length,v=ET.getBaseValue(t,r,n,a),h=p==="horizontal",b=!1,w=l.map(function(O,m){var S;g?S=u[f+m]:(S=lt(O,c),Array.isArray(S)?b=!0:S=[v,S]);var P=S[1]==null||g&<(O,c)==null;return h?{x:HP({axis:n,ticks:o,bandSize:s,entry:O,index:m}),y:P?null:a.scale(S[1]),value:S,payload:O}:{x:P?null:n.scale(S[1]),y:HP({axis:a,ticks:i,bandSize:s,entry:O,index:m}),value:S,payload:O}}),x;return g||b?x=w.map(function(O){var m=Array.isArray(O.value)?O.value[0]:null;return h?{x:O.x,y:m!=null&&O.y!=null?a.scale(m):null}:{x:m!=null?n.scale(m):null,y:O.y}}):x=h?a.scale(v):n.scale(v),Ir({points:w,baseLine:x,layout:p,isRange:b},d)}),Kt($r,"renderDotItem",function(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(de(e))r=e(t);else{var n=ge("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,o=TT(t,vH);r=A.createElement(Tv,rn({},o,{key:a,className:n}))}return r});function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function _H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kT(n.key),n)}}function AH(e,t,r){return t&&PH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EH(e,t,r){return t=fc(t),TH(e,$T()?Reflect.construct(t,r||[],fc(e).constructor):t.apply(e,r))}function TH(e,t){if(t&&(aa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CH(e)}function CH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($T=function(){return!!e})()}function fc(e){return fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fc(e)}function MH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yy(e,t)}function yy(e,t){return yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},yy(e,t)}function DT(e,t,r){return t=kT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kT(e){var t=NH(e,"string");return aa(t)=="symbol"?t:t+""}function NH(e,t){if(aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gy.apply(this,arguments)}function IH(e){var t=e.xAxisId,r=ty(),n=ry(),a=rT(t);return a==null?null:A.createElement(ta,gy({},a,{className:ge("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(i){return fr(i,!0)}}))}var dc=function(e){function t(){return _H(this,t),EH(this,t,arguments)}return MH(t,e),AH(t,[{key:"render",value:function(){return A.createElement(IH,this.props)}}])}(A.Component);DT(dc,"displayName","XAxis"),DT(dc,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function $H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qT(n.key),n)}}function kH(e,t,r){return t&&DH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jH(e,t,r){return t=pc(t),LH(e,jT()?Reflect.construct(t,r||[],pc(e).constructor):t.apply(e,r))}function LH(e,t){if(t&&(oa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qH(e)}function qH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jT=function(){return!!e})()}function pc(e){return pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pc(e)}function BH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&my(e,t)}function my(e,t){return my=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},my(e,t)}function LT(e,t,r){return t=qT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qT(e){var t=FH(e,"string");return oa(t)=="symbol"?t:t+""}function FH(e,t){if(oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function by(){return by=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},by.apply(this,arguments)}var RH=function(t){var r=t.yAxisId,n=ty(),a=ry(),o=nT(r);return o==null?null:A.createElement(ta,by({},o,{className:ge("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return fr(s,!0)}}))},hc=function(e){function t(){return $H(this,t),jH(this,t,arguments)}return BH(t,e),kH(t,[{key:"render",value:function(){return A.createElement(RH,this.props)}}])}(A.Component);LT(hc,"displayName","YAxis"),LT(hc,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function BT(e){return GH(e)||UH(e)||WH(e)||zH()}function zH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
286
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WH(e,t){if(e){if(typeof e=="string")return wy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wy(e,t)}}function UH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GH(e){if(Array.isArray(e))return wy(e)}function wy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xy=function(t,r,n,a,o){var i=Ct(t,iy),s=Ct(t,ac),c=[].concat(BT(i),BT(s)),u=Ct(t,sc),f="".concat(a,"Id"),l=a[0],d=r;if(c.length&&(d=c.reduce(function(v,h){if(h.props[f]===n&&Vt(h.props,"extendDomain")&&Z(h.props[l])){var b=h.props[l];return[Math.min(v[0],b),Math.max(v[1],b)]}return v},d)),u.length){var p="".concat(l,"1"),g="".concat(l,"2");d=u.reduce(function(v,h){if(h.props[f]===n&&Vt(h.props,"extendDomain")&&Z(h.props[p])&&Z(h.props[g])){var b=h.props[p],w=h.props[g];return[Math.min(v[0],b,w),Math.max(v[1],b,w)]}return v},d)}return o&&o.length&&(d=o.reduce(function(v,h){return Z(h)?[Math.min(v[0],h),Math.max(v[1],h)]:v},d)),d},Sy={exports:{}},FT;function HH(){return FT||(FT=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function o(c,u,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new a(f,l||c,d),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function i(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,l;if(this._eventsCount===0)return u;for(l in f=this._events)t.call(f,l)&&u.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=r?r+u:u,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var d=0,p=l.length,g=new Array(p);d<p;d++)g[d]=l[d].fn;return g},s.prototype.listenerCount=function(u){var f=r?r+u:u,l=this._events[f];return l?l.fn?1:l.length:0},s.prototype.emit=function(u,f,l,d,p,g){var v=r?r+u:u;if(!this._events[v])return!1;var h=this._events[v],b=arguments.length,w,x;if(h.fn){switch(h.once&&this.removeListener(u,h.fn,void 0,!0),b){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,f),!0;case 3:return h.fn.call(h.context,f,l),!0;case 4:return h.fn.call(h.context,f,l,d),!0;case 5:return h.fn.call(h.context,f,l,d,p),!0;case 6:return h.fn.call(h.context,f,l,d,p,g),!0}for(x=1,w=new Array(b-1);x<b;x++)w[x-1]=arguments[x];h.fn.apply(h.context,w)}else{var O=h.length,m;for(x=0;x<O;x++)switch(h[x].once&&this.removeListener(u,h[x].fn,void 0,!0),b){case 1:h[x].fn.call(h[x].context);break;case 2:h[x].fn.call(h[x].context,f);break;case 3:h[x].fn.call(h[x].context,f,l);break;case 4:h[x].fn.call(h[x].context,f,l,d);break;default:if(!w)for(m=1,w=new Array(b-1);m<b;m++)w[m-1]=arguments[m];h[x].fn.apply(h[x].context,w)}}return!0},s.prototype.on=function(u,f,l){return o(this,u,f,l,!1)},s.prototype.once=function(u,f,l){return o(this,u,f,l,!0)},s.prototype.removeListener=function(u,f,l,d){var p=r?r+u:u;if(!this._events[p])return this;if(!f)return i(this,p),this;var g=this._events[p];if(g.fn)g.fn===f&&(!d||g.once)&&(!l||g.context===l)&&i(this,p);else{for(var v=0,h=[],b=g.length;v<b;v++)(g[v].fn!==f||d&&!g[v].once||l&&g[v].context!==l)&&h.push(g[v]);h.length?this._events[p]=h.length===1?h[0]:h:i(this,p)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&i(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(Sy)),Sy.exports}var VH=HH();const KH=Te(VH);var Oy=new KH,_y="recharts.syncMouseEvents";function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function YH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RT(n.key),n)}}function ZH(e,t,r){return t&&XH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Py(e,t,r){return t=RT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RT(e){var t=QH(e,"string");return ko(t)=="symbol"?t:t+""}function QH(e,t){if(ko(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ko(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var JH=function(){function e(){YH(this,e),Py(this,"activeIndex",0),Py(this,"coordinateList",[]),Py(this,"layout","horizontal")}return ZH(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,o=a===void 0?null:a,i=r.container,s=i===void 0?null:i,c=r.layout,u=c===void 0?null:c,f=r.offset,l=f===void 0?null:f,d=r.mouseHandlerCallback,p=d===void 0?null:d;this.coordinateList=(n=o??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=l??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),o=a.x,i=a.y,s=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,l=o+c+u,d=i+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])}();function e6(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&Z(n)&&Z(a))return!0}return!1}function t6(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function zT(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,i=Ke(t,r,n,a),s=Ke(t,r,n,o);return{points:[i,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}function r6(e,t,r){var n,a,o,i;if(e==="horizontal")n=t.x,o=n,a=r.top,i=r.top+r.height;else if(e==="vertical")a=t.y,i=a,n=r.left,o=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,l=t.angle,d=Ke(s,c,u,l),p=Ke(s,c,f,l);n=d.x,a=d.y,o=p.x,i=p.y}else return zT(t);return[{x:n,y:a},{x:o,y:i}]}function jo(e){"@babel/helpers - typeof";return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(e)}function WT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(r),!0).forEach(function(n){n6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n6(e,t,r){return t=a6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a6(e){var t=o6(e,"string");return jo(t)=="symbol"?t:t+""}function o6(e,t){if(jo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i6(e){var t,r,n=e.element,a=e.tooltipEventType,o=e.isActive,i=e.activeCoordinate,s=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,l=e.layout,d=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!o||!i||d!=="ScatterChart"&&a!=="axis")return null;var g,v=bo;if(d==="ScatterChart")g=i,v=c4;else if(d==="BarChart")g=t6(l,i,c,f),v=Av;else if(l==="radial"){var h=zT(i),b=h.cx,w=h.cy,x=h.radius,O=h.startAngle,m=h.endAngle;g={cx:b,cy:w,startAngle:O,endAngle:m,innerRadius:x,outerRadius:x},v=fA}else g={points:r6(l,i,c)},v=bo;var S=vc(vc(vc(vc({stroke:"#ccc",pointerEvents:"none"},c),g),pe(p,!1)),{},{payload:s,payloadIndex:u,className:ge("recharts-tooltip-cursor",p.className)});return A.isValidElement(p)?A.cloneElement(p,S):A.createElement(v,S)}var s6=["item"],c6=["children","className","width","height","style","compact","title","desc"];function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}function sa(){return sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sa.apply(this,arguments)}function UT(e,t){return f6(e)||l6(e,t)||VT(e,t)||u6()}function u6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
287
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,i,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return s}}function f6(e){if(Array.isArray(e))return e}function GT(e,t){if(e==null)return{};var r=d6(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function p6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YT(n.key),n)}}function v6(e,t,r){return t&&h6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y6(e,t,r){return t=yc(t),g6(e,HT()?Reflect.construct(t,r||[],yc(e).constructor):t.apply(e,r))}function g6(e,t){if(t&&(ia(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m6(e)}function m6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HT=function(){return!!e})()}function yc(e){return yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yc(e)}function b6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ay(e,t)}function Ay(e,t){return Ay=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ay(e,t)}function ca(e){return S6(e)||x6(e)||VT(e)||w6()}function w6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
288
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VT(e,t){if(e){if(typeof e=="string")return Ey(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ey(e,t)}}function x6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S6(e){if(Array.isArray(e))return Ey(e)}function Ey(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(r),!0).forEach(function(n){ce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ce(e,t,r){return t=YT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YT(e){var t=O6(e,"string");return ia(t)=="symbol"?t:t+""}function O6(e,t){if(ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _6={xAxis:["bottom","top"],yAxis:["left","right"]},P6={width:"100%",height:"100%"},XT={x:0,y:0};function gc(e){return e}var A6=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},E6=function(t,r,n,a){var o=r.find(function(f){return f&&f.index===n});if(o){if(t==="horizontal")return{x:o.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:o.coordinate};if(t==="centric"){var i=o.coordinate,s=a.radius;return U(U(U({},a),Ke(a.cx,a.cy,s,i)),{},{angle:i,radius:s})}var c=o.coordinate,u=a.angle;return U(U(U({},a),Ke(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return XT},mc=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,o=r.dataEndIndex,i=(n??[]).reduce(function(s,c){var u=c.props.data;return u&&u.length?[].concat(ca(s),ca(u)):s},[]);return i.length>0?i:t&&t.length&&Z(a)&&Z(o)?t.slice(a,o+1):[]};function ZT(e){return e==="number"?[0,"auto"]:void 0}var Ty=function(t,r,n,a){var o=t.graphicalItems,i=t.tooltipAxis,s=mc(r,t);return n<0||!o||!o.length||n>=s.length?null:o.reduce(function(c,u){var f,l=(f=u.props.data)!==null&&f!==void 0?f:r;l&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(l=l.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(i.dataKey&&!i.allowDuplicatedCategory){var p=l===void 0?s:l;d=$i(p,i.dataKey,a)}else d=l&&l[n]||s[n];return d?[].concat(ca(c),[QP(u,d)]):c},[])},QT=function(t,r,n,a){var o=a||{x:t.chartX,y:t.chartY},i=A6(o,n),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=FW(i,s,u,c);if(f>=0&&u){var l=u[f]&&u[f].value,d=Ty(t,r,f,l),p=E6(n,s,f,o);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:p}}return null},T6=function(t,r){var n=r.axes,a=r.graphicalItems,o=r.axisType,i=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,l=t.children,d=t.stackOffset,p=WP(f,o);return n.reduce(function(g,v){var h,b=v.type.defaultProps!==void 0?U(U({},v.type.defaultProps),v.props):v.props,w=b.type,x=b.dataKey,O=b.allowDataOverflow,m=b.allowDuplicatedCategory,S=b.scale,P=b.ticks,E=b.includeHidden,T=b[i];if(g[T])return g;var k=mc(t.data,{graphicalItems:a.filter(function(W){var V,Y=i in W.props?W.props[i]:(V=W.type.defaultProps)===null||V===void 0?void 0:V[i];return Y===T}),dataStartIndex:c,dataEndIndex:u}),C=k.length,M,N,I;e6(b.domain,O,w)&&(M=nv(b.domain,null,O),p&&(w==="number"||S!=="auto")&&(I=uo(k,x,"category")));var L=ZT(w);if(!M||M.length===0){var $,R=($=b.domain)!==null&&$!==void 0?$:L;if(x){if(M=uo(k,x,w),w==="category"&&p){var B=Nj(M);m&&B?(N=M,M=Ks(0,C)):m||(M=ZP(R,M,v).reduce(function(W,V){return W.indexOf(V)>=0?W:[].concat(ca(W),[V])},[]))}else if(w==="category")m?M=M.filter(function(W){return W!==""&&!ve(W)}):M=ZP(R,M,v).reduce(function(W,V){return W.indexOf(V)>=0||V===""||ve(V)?W:[].concat(ca(W),[V])},[]);else if(w==="number"){var q=GW(k,a.filter(function(W){var V,Y,Q=i in W.props?W.props[i]:(V=W.type.defaultProps)===null||V===void 0?void 0:V[i],ee="hide"in W.props?W.props.hide:(Y=W.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return Q===T&&(E||!ee)}),x,o,f);q&&(M=q)}p&&(w==="number"||S!=="auto")&&(I=uo(k,x,"category"))}else p?M=Ks(0,C):s&&s[T]&&s[T].hasStack&&w==="number"?M=d==="expand"?[0,1]:KP(s[T].stackGroups,c,u):M=zP(k,a.filter(function(W){var V=i in W.props?W.props[i]:W.type.defaultProps[i],Y="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return V===T&&(E||!Y)}),w,f,!0);if(w==="number")M=xy(l,M,T,o,P),R&&(M=nv(R,M,O));else if(w==="category"&&R){var j=R,F=M.every(function(W){return j.indexOf(W)>=0});F&&(M=j)}}return U(U({},g),{},ce({},T,U(U({},b),{},{axisType:o,domain:M,categoricalDomain:I,duplicateDomain:N,originalDomain:(h=b.domain)!==null&&h!==void 0?h:L,isCategorical:p,layout:f})))},{})},C6=function(t,r){var n=r.graphicalItems,a=r.Axis,o=r.axisType,i=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,l=t.children,d=mc(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=d.length,g=WP(f,o),v=-1;return n.reduce(function(h,b){var w=b.type.defaultProps!==void 0?U(U({},b.type.defaultProps),b.props):b.props,x=w[i],O=ZT("number");if(!h[x]){v++;var m;return g?m=Ks(0,p):s&&s[x]&&s[x].hasStack?(m=KP(s[x].stackGroups,c,u),m=xy(l,m,x,o)):(m=nv(O,zP(d,n.filter(function(S){var P,E,T=i in S.props?S.props[i]:(P=S.type.defaultProps)===null||P===void 0?void 0:P[i],k="hide"in S.props?S.props.hide:(E=S.type.defaultProps)===null||E===void 0?void 0:E.hide;return T===x&&!k}),"number",f),a.defaultProps.allowDataOverflow),m=xy(l,m,x,o)),U(U({},h),{},ce({},x,U(U({axisType:o},a.defaultProps),{},{hide:!0,orientation:vt(_6,"".concat(o,".").concat(v%2),null),domain:m,originalDomain:O,isCategorical:g,layout:f})))}return h},{})},M6=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,o=r.AxisComp,i=r.graphicalItems,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,l="".concat(a,"Id"),d=Ct(f,o),p={};return d&&d.length?p=T6(t,{axes:d,graphicalItems:i,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):i&&i.length&&(p=C6(t,{Axis:o,graphicalItems:i,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),p},N6=function(t){var r=Sr(t),n=fr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:qp(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Ns(r,n)}},JT=function(t){var r=t.children,n=t.defaultShowTooltip,a=ct(r,Vn),o=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(i=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},I6=function(t){return!t||!t.length?!1:t.some(function(r){var n=tr(r&&r.type);return n&&n.indexOf("Bar")>=0})},eC=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},$6=function(t,r){var n=t.props,a=t.graphicalItems,o=t.xAxisMap,i=o===void 0?{}:o,s=t.yAxisMap,c=s===void 0?{}:s,u=n.width,f=n.height,l=n.children,d=n.margin||{},p=ct(l,Vn),g=ct(l,Cn),v=Object.keys(c).reduce(function(m,S){var P=c[S],E=P.orientation;return!P.mirror&&!P.hide?U(U({},m),{},ce({},E,m[E]+P.width)):m},{left:d.left||0,right:d.right||0}),h=Object.keys(i).reduce(function(m,S){var P=i[S],E=P.orientation;return!P.mirror&&!P.hide?U(U({},m),{},ce({},E,vt(m,"".concat(E))+P.height)):m},{top:d.top||0,bottom:d.bottom||0}),b=U(U({},h),v),w=b.bottom;p&&(b.bottom+=p.props.height||Vn.defaultProps.height),g&&r&&(b=WW(b,a,n,r));var x=u-b.left-b.right,O=f-b.top-b.bottom;return U(U({brushBottom:w},b),{},{width:Math.max(x,0),height:Math.max(O,0)})},D6=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},k6=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,i=t.validateTooltipEventTypes,s=i===void 0?["axis"]:i,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,l=t.defaultProps,d=function(b,w){var x=w.graphicalItems,O=w.stackGroups,m=w.offset,S=w.updateId,P=w.dataStartIndex,E=w.dataEndIndex,T=b.barSize,k=b.layout,C=b.barGap,M=b.barCategoryGap,N=b.maxBarSize,I=eC(k),L=I.numericAxisName,$=I.cateAxisName,R=I6(x),B=[];return x.forEach(function(q,j){var F=mc(b.data,{graphicalItems:[q],dataStartIndex:P,dataEndIndex:E}),W=q.type.defaultProps!==void 0?U(U({},q.type.defaultProps),q.props):q.props,V=W.dataKey,Y=W.maxBarSize,Q=W["".concat(L,"Id")],ee=W["".concat($,"Id")],re={},ie=c.reduce(function(St,Le){var jt,dt,Ot=w["".concat(Le.axisType,"Map")],Lt=W["".concat(Le.axisType,"Id")];Ot&&Ot[Lt]||Le.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ot(!1,"Specifying a(n) ".concat(Le.axisType,"Id requires a corresponding ").concat(Le.axisType,"Id on the targeted graphical component ").concat((jt=q==null||(dt=q.type)===null||dt===void 0?void 0:dt.displayName)!==null&&jt!==void 0?jt:"")):ot());var Yt=Ot[Lt];return U(U({},St),{},ce(ce({},Le.axisType,Yt),"".concat(Le.axisType,"Ticks"),fr(Yt)))},re),G=ie[$],X=ie["".concat($,"Ticks")],K=O&&O[Q]&&O[Q].hasStack&&n3(q,O[Q].stackGroups),D=tr(q.type).indexOf("Bar")>=0,ue=Ns(G,X),z=[],te=R&&RW({barSize:T,stackGroups:O,totalSize:D6(ie,$)});if(D){var fe,be,$e=ve(Y)?N:Y,ye=(fe=(be=Ns(G,X,!0))!==null&&be!==void 0?be:$e)!==null&&fe!==void 0?fe:0;z=zW({barGap:C,barCategoryGap:M,bandSize:ye!==ue?ye:ue,sizeList:te[ee],maxBarSize:$e}),ye!==ue&&(z=z.map(function(St){return U(U({},St),{},{position:U(U({},St.position),{},{offset:St.position.offset-ye/2})})}))}var He=q&&q.type&&q.type.getComposedData;He&&B.push({props:U(U({},He(U(U({},ie),{},{displayedData:F,props:b,dataKey:V,item:q,bandSize:ue,barPosition:z,offset:m,stackedData:K,layout:k,dataStartIndex:P,dataEndIndex:E}))),{},ce(ce(ce({key:q.key||"item-".concat(j)},L,ie[L]),$,ie[$]),"animationId",S)),childIndex:Wj(q,b.children),item:q})}),B},p=function(b,w){var x=b.props,O=b.dataStartIndex,m=b.dataEndIndex,S=b.updateId;if(!dx({props:x}))return null;var P=x.children,E=x.layout,T=x.stackOffset,k=x.data,C=x.reverseStackOrder,M=eC(E),N=M.numericAxisName,I=M.cateAxisName,L=Ct(P,n),$=e3(k,L,"".concat(N,"Id"),"".concat(I,"Id"),T,C),R=c.reduce(function(W,V){var Y="".concat(V.axisType,"Map");return U(U({},W),{},ce({},Y,M6(x,U(U({},V),{},{graphicalItems:L,stackGroups:V.axisType===N&&$,dataStartIndex:O,dataEndIndex:m}))))},{}),B=$6(U(U({},R),{},{props:x,graphicalItems:L}),w==null?void 0:w.legendBBox);Object.keys(R).forEach(function(W){R[W]=f(x,R[W],B,W.replace("Map",""),r)});var q=R["".concat(I,"Map")],j=N6(q),F=d(x,U(U({},R),{},{dataStartIndex:O,dataEndIndex:m,updateId:S,graphicalItems:L,stackGroups:$,offset:B}));return U(U({formattedGraphicalItems:F,graphicalItems:L,offset:B,stackGroups:$},j),R)},g=function(h){function b(w){var x,O,m;return p6(this,b),m=y6(this,b,[w]),ce(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ce(m,"accessibilityManager",new JH),ce(m,"handleLegendBBoxUpdate",function(S){if(S){var P=m.state,E=P.dataStartIndex,T=P.dataEndIndex,k=P.updateId;m.setState(U({legendBBox:S},p({props:m.props,dataStartIndex:E,dataEndIndex:T,updateId:k},U(U({},m.state),{},{legendBBox:S}))))}}),ce(m,"handleReceiveSyncEvent",function(S,P,E){if(m.props.syncId===S){if(E===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(P)}}),ce(m,"handleBrushChange",function(S){var P=S.startIndex,E=S.endIndex;if(P!==m.state.dataStartIndex||E!==m.state.dataEndIndex){var T=m.state.updateId;m.setState(function(){return U({dataStartIndex:P,dataEndIndex:E},p({props:m.props,dataStartIndex:P,dataEndIndex:E,updateId:T},m.state))}),m.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),ce(m,"handleMouseEnter",function(S){var P=m.getMouseInfo(S);if(P){var E=U(U({},P),{},{isTooltipActive:!0});m.setState(E),m.triggerSyncEvent(E);var T=m.props.onMouseEnter;de(T)&&T(E,S)}}),ce(m,"triggeredAfterMouseMove",function(S){var P=m.getMouseInfo(S),E=P?U(U({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(E),m.triggerSyncEvent(E);var T=m.props.onMouseMove;de(T)&&T(E,S)}),ce(m,"handleItemMouseEnter",function(S){m.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),ce(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),ce(m,"handleMouseMove",function(S){S.persist(),m.throttleTriggeredAfterMouseMove(S)}),ce(m,"handleMouseLeave",function(S){m.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};m.setState(P),m.triggerSyncEvent(P);var E=m.props.onMouseLeave;de(E)&&E(P,S)}),ce(m,"handleOuterEvent",function(S){var P=zj(S),E=vt(m.props,"".concat(P));if(P&&de(E)){var T,k;/.*touch.*/i.test(P)?k=m.getMouseInfo(S.changedTouches[0]):k=m.getMouseInfo(S),E((T=k)!==null&&T!==void 0?T:{},S)}}),ce(m,"handleClick",function(S){var P=m.getMouseInfo(S);if(P){var E=U(U({},P),{},{isTooltipActive:!0});m.setState(E),m.triggerSyncEvent(E);var T=m.props.onClick;de(T)&&T(E,S)}}),ce(m,"handleMouseDown",function(S){var P=m.props.onMouseDown;if(de(P)){var E=m.getMouseInfo(S);P(E,S)}}),ce(m,"handleMouseUp",function(S){var P=m.props.onMouseUp;if(de(P)){var E=m.getMouseInfo(S);P(E,S)}}),ce(m,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),ce(m,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&m.handleMouseDown(S.changedTouches[0])}),ce(m,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&m.handleMouseUp(S.changedTouches[0])}),ce(m,"handleDoubleClick",function(S){var P=m.props.onDoubleClick;if(de(P)){var E=m.getMouseInfo(S);P(E,S)}}),ce(m,"handleContextMenu",function(S){var P=m.props.onContextMenu;if(de(P)){var E=m.getMouseInfo(S);P(E,S)}}),ce(m,"triggerSyncEvent",function(S){m.props.syncId!==void 0&&Oy.emit(_y,m.props.syncId,S,m.eventEmitterSymbol)}),ce(m,"applySyncEvent",function(S){var P=m.props,E=P.layout,T=P.syncMethod,k=m.state.updateId,C=S.dataStartIndex,M=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)m.setState(U({dataStartIndex:C,dataEndIndex:M},p({props:m.props,dataStartIndex:C,dataEndIndex:M,updateId:k},m.state)));else if(S.activeTooltipIndex!==void 0){var N=S.chartX,I=S.chartY,L=S.activeTooltipIndex,$=m.state,R=$.offset,B=$.tooltipTicks;if(!R)return;if(typeof T=="function")L=T(B,S);else if(T==="value"){L=-1;for(var q=0;q<B.length;q++)if(B[q].value===S.activeLabel){L=q;break}}var j=U(U({},R),{},{x:R.left,y:R.top}),F=Math.min(N,j.x+j.width),W=Math.min(I,j.y+j.height),V=B[L]&&B[L].value,Y=Ty(m.state,m.props.data,L),Q=B[L]?{x:E==="horizontal"?B[L].coordinate:F,y:E==="horizontal"?W:B[L].coordinate}:XT;m.setState(U(U({},S),{},{activeLabel:V,activeCoordinate:Q,activePayload:Y,activeTooltipIndex:L}))}else m.setState(S)}),ce(m,"renderCursor",function(S){var P,E=m.state,T=E.isTooltipActive,k=E.activeCoordinate,C=E.activePayload,M=E.offset,N=E.activeTooltipIndex,I=E.tooltipAxisBandSize,L=m.getTooltipEventType(),$=(P=S.props.active)!==null&&P!==void 0?P:T,R=m.props.layout,B=S.key||"_recharts-cursor";return A.createElement(i6,{key:B,activeCoordinate:k,activePayload:C,activeTooltipIndex:N,chartName:r,element:S,isActive:$,layout:R,offset:M,tooltipAxisBandSize:I,tooltipEventType:L})}),ce(m,"renderPolarAxis",function(S,P,E){var T=vt(S,"type.axisType"),k=vt(m.state,"".concat(T,"Map")),C=S.type.defaultProps,M=C!==void 0?U(U({},C),S.props):S.props,N=k&&k[M["".concat(T,"Id")]];return A.cloneElement(S,U(U({},N),{},{className:ge(T,N.className),key:S.key||"".concat(P,"-").concat(E),ticks:fr(N,!0)}))}),ce(m,"renderPolarGrid",function(S){var P=S.props,E=P.radialLines,T=P.polarAngles,k=P.polarRadius,C=m.state,M=C.radiusAxisMap,N=C.angleAxisMap,I=Sr(M),L=Sr(N),$=L.cx,R=L.cy,B=L.innerRadius,q=L.outerRadius;return A.cloneElement(S,{polarAngles:Array.isArray(T)?T:fr(L,!0).map(function(j){return j.coordinate}),polarRadius:Array.isArray(k)?k:fr(I,!0).map(function(j){return j.coordinate}),cx:$,cy:R,innerRadius:B,outerRadius:q,key:S.key||"polar-grid",radialLines:E})}),ce(m,"renderLegend",function(){var S=m.state.formattedGraphicalItems,P=m.props,E=P.children,T=P.width,k=P.height,C=m.props.margin||{},M=T-(C.left||0)-(C.right||0),N=qP({children:E,formattedGraphicalItems:S,legendWidth:M,legendContent:u});if(!N)return null;var I=N.item,L=GT(N,s6);return A.cloneElement(I,U(U({},L),{},{chartWidth:T,chartHeight:k,margin:C,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),ce(m,"renderTooltip",function(){var S,P=m.props,E=P.children,T=P.accessibilityLayer,k=ct(E,Wt);if(!k)return null;var C=m.state,M=C.isTooltipActive,N=C.activeCoordinate,I=C.activePayload,L=C.activeLabel,$=C.offset,R=(S=k.props.active)!==null&&S!==void 0?S:M;return A.cloneElement(k,{viewBox:U(U({},$),{},{x:$.left,y:$.top}),active:R,label:L,payload:R?I:[],coordinate:N,accessibilityLayer:T})}),ce(m,"renderBrush",function(S){var P=m.props,E=P.margin,T=P.data,k=m.state,C=k.offset,M=k.dataStartIndex,N=k.dataEndIndex,I=k.updateId;return A.cloneElement(S,{key:S.key||"_recharts-brush",onChange:Ms(m.handleBrushChange,S.props.onChange),data:T,x:Z(S.props.x)?S.props.x:C.left,y:Z(S.props.y)?S.props.y:C.top+C.height+C.brushBottom-(E.bottom||0),width:Z(S.props.width)?S.props.width:C.width,startIndex:M,endIndex:N,updateId:"brush-".concat(I)})}),ce(m,"renderReferenceElement",function(S,P,E){if(!S)return null;var T=m,k=T.clipPathId,C=m.state,M=C.xAxisMap,N=C.yAxisMap,I=C.offset,L=S.type.defaultProps||{},$=S.props,R=$.xAxisId,B=R===void 0?L.xAxisId:R,q=$.yAxisId,j=q===void 0?L.yAxisId:q;return A.cloneElement(S,{key:S.key||"".concat(P,"-").concat(E),xAxis:M[B],yAxis:N[j],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:k})}),ce(m,"renderActivePoints",function(S){var P=S.item,E=S.activePoint,T=S.basePoint,k=S.childIndex,C=S.isRange,M=[],N=P.props.key,I=P.item.type.defaultProps!==void 0?U(U({},P.item.type.defaultProps),P.item.props):P.item.props,L=I.activeDot,$=I.dataKey,R=U(U({index:k,dataKey:$,cx:E.x,cy:E.y,r:4,fill:tv(P.item),strokeWidth:2,stroke:"#fff",payload:E.payload,value:E.value},pe(L,!1)),Di(L));return M.push(b.renderActiveDot(L,R,"".concat(N,"-activePoint-").concat(k))),T?M.push(b.renderActiveDot(L,U(U({},R),{},{cx:T.x,cy:T.y}),"".concat(N,"-basePoint-").concat(k))):C&&M.push(null),M}),ce(m,"renderGraphicChild",function(S,P,E){var T=m.filterFormatItem(S,P,E);if(!T)return null;var k=m.getTooltipEventType(),C=m.state,M=C.isTooltipActive,N=C.tooltipAxis,I=C.activeTooltipIndex,L=C.activeLabel,$=m.props.children,R=ct($,Wt),B=T.props,q=B.points,j=B.isRange,F=B.baseLine,W=T.item.type.defaultProps!==void 0?U(U({},T.item.type.defaultProps),T.item.props):T.item.props,V=W.activeDot,Y=W.hide,Q=W.activeBar,ee=W.activeShape,re=!!(!Y&&M&&R&&(V||Q||ee)),ie={};k!=="axis"&&R&&R.props.trigger==="click"?ie={onClick:Ms(m.handleItemMouseEnter,S.props.onClick)}:k!=="axis"&&(ie={onMouseLeave:Ms(m.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:Ms(m.handleItemMouseEnter,S.props.onMouseEnter)});var G=A.cloneElement(S,U(U({},T.props),ie));function X(Le){return typeof N.dataKey=="function"?N.dataKey(Le.payload):null}if(re)if(I>=0){var K,D;if(N.dataKey&&!N.allowDuplicatedCategory){var ue=typeof N.dataKey=="function"?X:"payload.".concat(N.dataKey.toString());K=$i(q,ue,L),D=j&&F&&$i(F,ue,L)}else K=q==null?void 0:q[I],D=j&&F&&F[I];if(ee||Q){var z=S.props.activeIndex!==void 0?S.props.activeIndex:I;return[A.cloneElement(S,U(U(U({},T.props),ie),{},{activeIndex:z})),null,null]}if(!ve(K))return[G].concat(ca(m.renderActivePoints({item:T,activePoint:K,basePoint:D,childIndex:I,isRange:j})))}else{var te,fe=(te=m.getItemByXY(m.state.activeCoordinate))!==null&&te!==void 0?te:{graphicalItem:G},be=fe.graphicalItem,$e=be.item,ye=$e===void 0?S:$e,He=be.childIndex,St=U(U(U({},T.props),ie),{},{activeIndex:He});return[A.cloneElement(ye,St),null,null]}return j?[G,null,null]:[G,null]}),ce(m,"renderCustomized",function(S,P,E){return A.cloneElement(S,U(U({key:"recharts-customized-".concat(E)},m.props),m.state))}),ce(m,"renderMap",{CartesianGrid:{handler:gc,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:gc},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:gc},YAxis:{handler:gc},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((x=w.id)!==null&&x!==void 0?x:Na("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=AO(m.triggeredAfterMouseMove,(O=w.throttleDelay)!==null&&O!==void 0?O:1e3/60),m.state={},m}return b6(b,h),v6(b,[{key:"componentDidMount",value:function(){var x,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,O=x.children,m=x.data,S=x.height,P=x.layout,E=ct(O,Wt);if(E){var T=E.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,C=Ty(this.state,m,T,k),M=this.state.tooltipTicks[T].coordinate,N=(this.state.offset.top+S)/2,I=P==="horizontal",L=I?{x:M,y:N}:{y:M,x:N},$=this.state.formattedGraphicalItems.find(function(B){var q=B.item;return q.type.name==="Scatter"});$&&(L=U(U({},L),$.props.points[T].tooltipPosition),C=$.props.points[T].tooltipPayload);var R={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:k,activePayload:C,activeCoordinate:L};this.setState(R),this.renderCursor(E),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var m,S;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(x){xf([ct(x.children,Wt)],[ct(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=ct(this.props.children,Wt);if(x&&typeof x.props.shared=="boolean"){var O=x.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var O=this.container,m=O.getBoundingClientRect(),S=NB(m),P={chartX:Math.round(x.pageX-S.left),chartY:Math.round(x.pageY-S.top)},E=m.width/O.offsetWidth||1,T=this.inRange(P.chartX,P.chartY,E);if(!T)return null;var k=this.state,C=k.xAxisMap,M=k.yAxisMap,N=this.getTooltipEventType(),I=QT(this.state,this.props.data,this.props.layout,T);if(N!=="axis"&&C&&M){var L=Sr(C).scale,$=Sr(M).scale,R=L&&L.invert?L.invert(P.chartX):null,B=$&&$.invert?$.invert(P.chartY):null;return U(U({},P),{},{xValue:R,yValue:B},I)}return I?U(U({},P),I):null}},{key:"inRange",value:function(x,O){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,P=x/m,E=O/m;if(S==="horizontal"||S==="vertical"){var T=this.state.offset,k=P>=T.left&&P<=T.left+T.width&&E>=T.top&&E<=T.top+T.height;return k?{x:P,y:E}:null}var C=this.state,M=C.angleAxisMap,N=C.radiusAxisMap;if(M&&N){var I=Sr(M);return tA({x:P,y:E},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,O=this.getTooltipEventType(),m=ct(x,Wt),S={};m&&O==="axis"&&(m.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Di(this.props,this.handleOuterEvent);return U(U({},P),S)}},{key:"addListener",value:function(){Oy.on(_y,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Oy.removeListener(_y,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,O,m){for(var S=this.state.formattedGraphicalItems,P=0,E=S.length;P<E;P++){var T=S[P];if(T.item===x||T.props.key===x.key||O===tr(T.item.type)&&m===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,O=this.state.offset,m=O.left,S=O.top,P=O.height,E=O.width;return A.createElement("defs",null,A.createElement("clipPath",{id:x},A.createElement("rect",{x:m,y:S,height:P,width:E})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(O,m){var S=UT(m,2),P=S[0],E=S[1];return U(U({},O),{},ce({},P,E.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(O,m){var S=UT(m,2),P=S[0],E=S[1];return U(U({},O),{},ce({},P,E.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[x])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(x){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[x])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(x){var O=this.state,m=O.formattedGraphicalItems,S=O.activeItem;if(m&&m.length)for(var P=0,E=m.length;P<E;P++){var T=m[P],k=T.props,C=T.item,M=C.type.defaultProps!==void 0?U(U({},C.type.defaultProps),C.props):C.props,N=tr(C.type);if(N==="Bar"){var I=(k.data||[]).find(function(B){return QU(x,B)});if(I)return{graphicalItem:T,payload:I}}else if(N==="RadialBar"){var L=(k.data||[]).find(function(B){return tA(x,B)});if(L)return{graphicalItem:T,payload:L}}else if(Hs(T,S)||Vs(T,S)||Co(T,S)){var $=z4({graphicalItem:T,activeTooltipItem:S,itemData:M.data}),R=M.activeIndex===void 0?$:M.activeIndex;return{graphicalItem:U(U({},T),{},{childIndex:R}),payload:Co(T,S)?M.data[$]:T.props.data[$]}}}return null}},{key:"render",value:function(){var x=this;if(!dx(this))return null;var O=this.props,m=O.children,S=O.className,P=O.width,E=O.height,T=O.style,k=O.compact,C=O.title,M=O.desc,N=GT(O,c6),I=pe(N,!1);if(k)return A.createElement(eT,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(Of,sa({},I,{width:P,height:E,title:C,desc:M}),this.renderClipPath(),hx(m,this.renderMap)));if(this.props.accessibilityLayer){var L,$;I.tabIndex=(L=this.props.tabIndex)!==null&&L!==void 0?L:0,I.role=($=this.props.role)!==null&&$!==void 0?$:"application",I.onKeyDown=function(B){x.accessibilityManager.keyboardEvent(B)},I.onFocus=function(){x.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return A.createElement(eT,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",sa({className:ge("recharts-wrapper",S),style:U({position:"relative",cursor:"default",width:P,height:E},T)},R,{ref:function(q){x.container=q}}),A.createElement(Of,sa({},I,{width:P,height:E,title:C,desc:M,style:P6}),this.renderClipPath(),hx(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(A.Component);ce(g,"displayName",r),ce(g,"defaultProps",U({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),ce(g,"getDerivedStateFromProps",function(h,b){var w=h.dataKey,x=h.data,O=h.children,m=h.width,S=h.height,P=h.layout,E=h.stackOffset,T=h.margin,k=b.dataStartIndex,C=b.dataEndIndex;if(b.updateId===void 0){var M=JT(h);return U(U(U({},M),{},{updateId:0},p(U(U({props:h},M),{},{updateId:0}),b)),{},{prevDataKey:w,prevData:x,prevWidth:m,prevHeight:S,prevLayout:P,prevStackOffset:E,prevMargin:T,prevChildren:O})}if(w!==b.prevDataKey||x!==b.prevData||m!==b.prevWidth||S!==b.prevHeight||P!==b.prevLayout||E!==b.prevStackOffset||!_n(T,b.prevMargin)){var N=JT(h),I={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},L=U(U({},QT(b,x,P)),{},{updateId:b.updateId+1}),$=U(U(U({},N),I),L);return U(U(U({},$),p(U({props:h},$),b)),{},{prevDataKey:w,prevData:x,prevWidth:m,prevHeight:S,prevLayout:P,prevStackOffset:E,prevMargin:T,prevChildren:O})}if(!xf(O,b.prevChildren)){var R,B,q,j,F=ct(O,Vn),W=F&&(R=(B=F.props)===null||B===void 0?void 0:B.startIndex)!==null&&R!==void 0?R:k,V=F&&(q=(j=F.props)===null||j===void 0?void 0:j.endIndex)!==null&&q!==void 0?q:C,Y=W!==k||V!==C,Q=!ve(x),ee=Q&&!Y?b.updateId:b.updateId+1;return U(U({updateId:ee},p(U(U({props:h},b),{},{updateId:ee,dataStartIndex:W,dataEndIndex:V}),b)),{},{prevChildren:O,dataStartIndex:W,dataEndIndex:V})}return null}),ce(g,"renderActiveDot",function(h,b,w){var x;return A.isValidElement(h)?x=A.cloneElement(h,b):de(h)?x=h(b):x=A.createElement(Tv,b),A.createElement(Ie,{className:"recharts-active-dot",key:w},x)});var v=A.forwardRef(function(b,w){return A.createElement(g,sa({},b,{ref:w}))});return v.displayName=g.displayName,v},j6=k6({chartName:"AreaChart",GraphicalChild:$r,axisComponents:[{axisType:"xAxis",AxisComp:dc},{axisType:"yAxis",AxisComp:hc}],formatAxisMap:qG});function L6({active:e,payload:t,label:r,units:n="",unitsPosition:a="right",className:o}){return!e||!(t!=null&&t.length)?null:y.jsxs("div",{className:J("bg-background border border-border rounded-md p-3 shadow-md",o),children:[y.jsx("p",{className:"font-medium text-sm mb-2",children:r}),y.jsx("div",{className:"space-y-2",children:t.map((i,s)=>{const c=i.stroke||i.color||"var(--primary, #8884d8)",u=i.value.toLocaleString();return y.jsxs("div",{className:"flex items-center justify-between gap-4",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[y.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:c}}),y.jsx("span",{className:"capitalize",children:i.dataKey})]}),y.jsxs("p",{className:"text-sm font-medium",children:[a==="left"&&n,u,a==="right"&&n]})]},s)})})]})}function q6({data:e,units:t,unitsPosition:r="right",width:n="100%",height:a=300,className:o}){if(!(e!=null&&e.length))return y.jsx("div",{className:"flex items-center justify-center h-40 text-muted-foreground",children:"No data available"});const i=Object.keys(e[0])[0],s=Object.keys(e[0]).filter(u=>u!==i);if(!s.length)return y.jsx("div",{className:"flex items-center justify-center h-40 text-muted-foreground",children:"Invalid data format"});const c=u=>r==="left"?`${t||""}${u}`:`${u}${t||""}`;return y.jsx("div",{className:J("w-full",o),children:y.jsx(_B,{width:n,height:a,children:y.jsxs(j6,{data:e,margin:{top:10,right:30,left:0,bottom:0},children:[y.jsx("defs",{children:s.map(u=>y.jsxs("linearGradient",{id:`gradient-${u}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"5%",stopColor:"var(--primary, #8884d8)",stopOpacity:.8}),y.jsx("stop",{offset:"95%",stopColor:"var(--primary, #8884d8)",stopOpacity:.1})]},u))}),y.jsx(AT,{strokeDasharray:"3 3",className:"stroke-border/50"}),y.jsx(dc,{dataKey:i,className:"text-xs text-muted-foreground",tickLine:!1,axisLine:!1}),y.jsx(hc,{className:"text-xs text-muted-foreground",tickLine:!1,axisLine:!1,tickFormatter:c}),y.jsx(Wt,{content:y.jsx(L6,{units:t,unitsPosition:r}),cursor:{stroke:"var(--muted)",strokeWidth:1}}),s.map(u=>y.jsx($r,{type:"monotone",dataKey:u,stroke:"var(--primary, #8884d8)",fillOpacity:.6,fill:`url(#gradient-${u})`,strokeWidth:2},u))]})})})}const ua=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));ua.displayName="Card";const tC=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("flex flex-col space-y-1.5 p-6",e),...t}));tC.displayName="CardHeader";const rC=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("font-semibold leading-none tracking-tight",e),...t}));rC.displayName="CardTitle";const nC=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("text-sm text-muted-foreground",e),...t}));nC.displayName="CardDescription";const la=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("p-6 pt-0",e),...t}));la.displayName="CardContent";const aC=_.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,className:J("flex items-center p-6 pt-0",e),...t}));aC.displayName="CardFooter";function B6({id:e,name:t,about:r,voiceName:n,voiceStyle:a,sceneName:o,action:i,loading:s=!1}){const c=`https://api.randmar.io/V4/Partner/${e}/Account/Video`,u=`https://api.randmar.io/V4/Partner/${e}/Account/Video/Exists`,f=`https://api.randmar.io/V4/Partner/${e}/Account/Logo?width=64&height=64`,l=`https://api.randmar.io/V4/Partner/${e}/Account/Logo/Exists`,d=!!(n||a||o),[p,g]=A.useState(null),[v,h]=A.useState(!1),[b,w]=A.useState(!1),[x,O]=A.useState(!1),[m,S]=A.useState(!0);A.useEffect(()=>{if(!e||s)return;const E=async()=>{try{const M=await fetch(l);if(M.ok){const I=(await M.text()).toLowerCase()==="true";return w(I),I}return!1}catch(M){return console.error("Failed to check if logo exists:",M),w(!1),!1}},T=async()=>{h(!0);try{const M=await fetch(f);if(M.ok){const N=await M.blob();g(URL.createObjectURL(N))}}catch(M){console.error("Failed to load logo:",M)}finally{h(!1)}},k=async()=>{try{const M=await fetch(u);if(M.ok){const N=await M.text();O(N.toLowerCase()==="true")}}catch(M){console.error("Failed to check if video exists:",M),O(!1)}};(async()=>{await E()&&T(),k()})()},[e,f,l,u,s]);const P=()=>{S(!1)};return s?y.jsx(ua,{className:"hover:shadow-lg transition-shadow",children:y.jsxs(la,{className:"p-6",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[y.jsxs("div",{className:"flex items-center",children:[y.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:y.jsx(le,{className:"h-10 w-10 rounded-md"})}),y.jsx(le,{className:"h-7 w-40"})]}),y.jsx("div",{className:"w-full sm:w-auto",children:y.jsx(le,{className:"h-9 w-24"})})]}),y.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[y.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(le,{className:"h-4 w-full"}),y.jsx(le,{className:"h-4 w-full"}),y.jsx(le,{className:"h-4 w-3/4"}),y.jsx(le,{className:"h-4 w-5/6"})]}),y.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[y.jsxs("div",{children:[y.jsx(le,{className:"h-3 w-20 mb-1"}),y.jsx(le,{className:"h-5 w-24"})]}),y.jsxs("div",{children:[y.jsx(le,{className:"h-3 w-20 mb-1"}),y.jsx(le,{className:"h-5 w-24"})]}),y.jsxs("div",{children:[y.jsx(le,{className:"h-3 w-20 mb-1"}),y.jsx(le,{className:"h-5 w-24"})]})]})})]}),y.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:y.jsx("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:y.jsx(le,{className:"w-full h-full"})})})]})]})}):y.jsx(ua,{className:"hover:shadow-lg transition-shadow",children:y.jsxs(la,{className:"p-6",children:[y.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[y.jsxs("div",{className:"flex items-center",children:[b&&y.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:v?y.jsx(le,{className:"h-10 w-10 rounded-md"}):p&&y.jsx("img",{src:p||"/placeholder.svg",alt:`${t} logo`,className:"max-h-10 w-auto object-contain"})}),y.jsx("h3",{className:"font-semibold text-xl",children:t})]}),i&&y.jsx("div",{className:"w-full sm:w-auto",children:i})]}),y.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[y.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[y.jsx("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:r}}),d&&y.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[n&&y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Name"}),y.jsx("div",{className:"font-medium",children:n})]}),a&&y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Style"}),y.jsx("div",{className:"font-medium",children:a})]}),o&&y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"Scene Name"}),y.jsx("div",{className:"font-medium",children:o})]})]})})]}),x&&y.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:y.jsxs("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:[m&&y.jsx(le,{className:"w-full h-full"}),y.jsx("video",{src:c,controls:!0,preload:"auto",playsInline:!0,className:`w-full h-full object-contain ${m?"invisible":"visible"}`,style:{objectPosition:"center",imageRendering:"auto"},onLoadedData:P,onError:()=>S(!1)})]})})]})]})})}const Cy=A.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[o,i]=A.useState(""),s=bc.useLocation(),{toast:c}=al();A.useEffect(()=>{const d=new URLSearchParams(s.search).get("q");d&&i(d)},[s.search]);const u=()=>{const l=o.trim();if(!l||l.length<2){c({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(l)},f=l=>{l.key==="Enter"&&u()};return y.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[y.jsx(Lu,{className:"lg:hidden",children:y.jsx(kC,{className:"h-6 w-6"})}),y.jsx("div",{className:"flex flex-1 items-center gap-4",children:y.jsx("div",{className:"relative w-full max-w-sm",children:y.jsxs("div",{children:[y.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:u,"aria-label":"Search",children:y.jsx(RC,{className:"h-4 w-4 text-muted-foreground"})}),y.jsx(wi,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:o,onChange:l=>i(l.target.value),onKeyDown:f,ref:a},"topbar-search")]})})}),r||y.jsx(y.Fragment,{}),e&&y.jsx("div",{className:"flex items-center gap-4",children:y.jsxs(Ve,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[y.jsx(DC,{className:"h-4 w-4 text-sidebar-foreground"}),y.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});Cy.displayName="Topbar";const oC=Pa("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),kt=_.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...o},i)=>y.jsxs("div",{ref:i,className:J(oC({variant:t,size:r}),e),...o,children:[n&&y.jsx("span",{className:"mr-1",children:n}),a]}));kt.displayName="Badge";const iC=({countryCode:e,className:t=""})=>{const[r,n]=A.useState(null),[a,o]=A.useState(!1);return A.useEffect(()=>{if(!e)return;const s=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(s,{method:"HEAD"}).then(c=>{c.ok?(n(s),o(!1)):o(!0)}).catch(()=>{o(!0)})},[e]),a||!r?y.jsx("span",{className:t,children:e}):y.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function sC({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=bc.useParams(),a=e.filter(o=>o.showInNav);return y.jsxs(ju,{className:"border-r border-sidebar-border",children:[y.jsx(qu,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"flex items-center justify-center",children:y.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),y.jsx("span",{className:"font-semibold text-lg",children:r})]})}),y.jsx(Fu,{className:"py-4 bg-sidebar text-sidebar-foreground",children:y.jsx(Ru,{children:a.map(o=>{const i=o.icon,s=`/${o.path.replace(":appID",n)}`;return y.jsx(zu,{children:y.jsx(Wu,{asChild:!0,children:y.jsxs(bc.Link,{to:s,className:"transition-colors hover:bg-muted px-6",children:[i&&y.jsx(i,{className:"h-4 w-4"}),y.jsx("span",{children:o.label})]})})},o.key)})})}),y.jsx(Bu,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const cC=A.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:o,onSignOut:i,searchPlaceholder:s},c)=>y.jsx(y.Fragment,{children:y.jsx(ku,{children:y.jsxs("div",{className:"flex grow",children:[y.jsx(sC,{routes:r,footer:n,dashboardTitle:o}),y.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[y.jsx(Cy,{ref:c,onSignOut:i,rightMenu:t,handleValidSearch:a,searchPlaceholder:s}),y.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),y.jsx(Y0,{})]})]})})}));cC.displayName="Layout";const F6={sm:100,md:200,lg:300,xl:400};function uC({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,o]=_.useState(!1),[i,s]=_.useState(!1),[c,u]=_.useState(!1),[f,l]=_.useState(!1),d=`https://api.randmar.io/Product/${e}/Video`;_.useEffect(()=>{(async()=>{try{const x=await(await fetch(d+"/Exists")).json();s(x)}catch(w){console.error("Error checking for video:",w),s(!1)}})()},[e,d]);async function p(){if(i){l(!0);try{const w=await(await fetch(d)).blob(),x=window.URL.createObjectURL(w),O=document.createElement("a");O.href=x,O.download=`${e||"product"}-video.mp4`,document.body.appendChild(O),O.click(),document.body.removeChild(O),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{l(!1)}}}function g(){navigator.clipboard.writeText(d),u(!0),setTimeout(()=>{u(!1)},2e3)}function v(){o(!0)}const h=F6[t||"xl"];return y.jsxs(y.Fragment,{children:[y.jsx(ha,{open:a,onOpenChange:o,children:y.jsx(va,{className:"max-w-4xl p-0 overflow-hidden",children:n?y.jsxs("div",{className:"flex flex-row",children:[y.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[y.jsx("source",{src:d,type:"video/mp4"}),"Your browser does not support the video tag."]}),y.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):y.jsxs("div",{className:"w-full relative",children:[y.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[y.jsx("source",{src:d,type:"video/mp4"}),"Your browser does not support the video tag."]}),y.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[y.jsx(mn,{children:y.jsxs(bn,{children:[y.jsx(wn,{asChild:!0,children:y.jsx(Ve,{variant:"secondary",size:"icon",onClick:g,children:c?y.jsx(xc,{className:"h-4 w-4"}):y.jsx(NC,{className:"h-4 w-4"})})}),y.jsx(Br,{children:y.jsx("p",{children:"Copy video link"})})]})}),y.jsx(mn,{children:y.jsxs(bn,{children:[y.jsx(wn,{asChild:!0,children:y.jsx(Ve,{variant:"secondary",size:"icon",onClick:p,disabled:f,children:y.jsx(IC,{className:"h-4 w-4"})})}),y.jsx(Br,{children:y.jsx("p",{children:"Download video"})})]})})]})]})})}),y.jsxs("div",{className:"relative w-max h-max",children:[y.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${i?"cursor-pointer":""}`,onClick:i?v:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${h*1.5}&height=${h*1.5}`,width:h,height:h}),i&&y.jsx(mn,{children:y.jsxs(bn,{children:[y.jsx(wn,{asChild:!0,children:y.jsx(Ve,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:v,children:y.jsx(qC,{className:"h-4 w-4"})})}),y.jsx(Br,{children:y.jsx("p",{children:"Play video"})})]})})]})]})}function R6({item:e,addToCart:t=!1,syncToShopify:r=!1,customAction:n=y.jsx(y.Fragment,{}),defaultOpportunityNumber:a="",viewProductAction:o,addToCartAction:i,isAddToCartActionLoading:s=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var q,j,F,W,V,Y,Q,ee,re,ie,G,X;const[f,l]=A.useState(1),[d,p]=A.useState(null),[g,v]=A.useState(0),[h,b]=A.useState(!1),w=((q=e==null?void 0:e.Distribution)==null?void 0:q.Cost)||0,x=((j=e==null?void 0:e.Distribution)==null?void 0:j.RegularPrice)||0,O=((F=e==null?void 0:e.Distribution)==null?void 0:F.Price)||0,[m,S]=A.useState(null),[P,E]=A.useState(!1);A.useEffect(()=>{const K=async()=>{if(e!=null&&e.ManufacturerId){E(!0);try{const D=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(D.ok){const ue=await D.blob();S(URL.createObjectURL(ue))}}catch(D){console.error("Failed to load logo:",D)}finally{E(!1)}}};e!=null&&e.ManufacturerId&&K()},[e==null?void 0:e.ManufacturerId]),A.useEffect(()=>{var K;if(e&&a){const D=(K=e.Opportunities)==null?void 0:K.find(ue=>ue.BidNumber==a);D&&p(D)}},[e,a]),A.useEffect(()=>{if(!e)return;const K=d!=null&&d.Price?d.Price:O;v(x>0?Math.round((x-K)/x*100):0)},[e,d,O,x]),A.useEffect(()=>{s||l(1)},[s]);const T=K=>{if(K.Active!==!0)return!1;const D=new Date().toISOString().split("T")[0];return!(K.EndDate&&K.EndDate<D||K.StartDate&&K.StartDate>D)};if(!e)return y.jsx(ua,{className:"hover:shadow-lg transition-shadow",children:y.jsxs(la,{className:"p-6",children:[y.jsxs("div",{className:"flex justify-between items-start mb-3",children:[y.jsx(le,{className:"h-7 w-3/4"}),y.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:y.jsx(le,{className:"h-10 w-24 rounded-md"})})]}),y.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[y.jsx(le,{className:"h-6 w-20 rounded-full"}),y.jsx(le,{className:"h-6 w-24 rounded-full"}),y.jsx(le,{className:"h-6 w-28 rounded-full"})]}),y.jsxs("div",{className:"flex gap-6",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[y.jsxs("div",{children:[y.jsx(le,{className:"h-4 w-12 mb-1"}),y.jsx(le,{className:"h-5 w-20"})]}),y.jsxs("div",{children:[y.jsx(le,{className:"h-4 w-12 mb-1"}),y.jsx(le,{className:"h-5 w-24"})]}),y.jsxs("div",{children:[y.jsx(le,{className:"h-4 w-20 mb-1"}),y.jsx(le,{className:"h-5 w-16"})]}),y.jsxs("div",{children:[y.jsx(le,{className:"h-4 w-12 mb-1"}),y.jsx(le,{className:"h-5 w-20"})]})]}),y.jsx("div",{className:"flex flex-col",children:y.jsx("div",{className:"w-60 h-40",children:y.jsx(le,{className:"w-full h-full rounded-lg"})})})]}),y.jsxs("div",{className:"flex gap-6 mt-4",children:[y.jsx("div",{className:"flex flex-1",children:y.jsxs("div",{className:"w-full",children:[y.jsx(le,{className:"h-4 w-24 mb-3"}),y.jsx(le,{className:"h-16 w-full rounded-md"})]})}),y.jsxs("div",{className:"flex flex-col items-center",children:[y.jsx(le,{className:"h-10 w-32 rounded-md"}),y.jsx(le,{className:"h-5 w-24 mt-4"})]})]}),y.jsxs("div",{className:"flex gap-6 mt-4",children:[y.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[y.jsx(le,{className:"h-8 w-32"}),y.jsx(le,{className:"h-6 w-24"})]}),y.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[y.jsx(le,{className:"h-10 w-24 rounded-md"}),y.jsx(le,{className:"h-10 flex-1 rounded-md"})]})]})]})});const k=(e==null?void 0:e.Opportunities)||[],C=k.length>0,M=()=>{if(f==null){l(1);return}f>1&&l(f-1)},N=()=>{if(f==null){l(1);return}l(f+1)},I=K=>{const D=parseInt(K.target.value,10);if(!isNaN(D)&&D>0){l(D);return}l(void 0)},L=()=>{(f==null||f<1)&&l(1)},$=((V=(W=e.Distribution)==null?void 0:W.Inventory)==null?void 0:V.reduce((K,D)=>K+(D.AvailableQuantity||0),0))||0,R=K=>{try{return new Date(K).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(D){return console.error(D),K.split("T")[0]||"N/A"}},B=()=>{i&&i({quantity:f??1,bidNumber:(d==null?void 0:d.BidNumber)??null})};return y.jsx(ua,{className:"hover:shadow-lg transition-shadow",children:y.jsxs(la,{className:"p-6",children:[y.jsxs("div",{className:"flex justify-between items-start mb-3",children:[y.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),y.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:P?y.jsx(le,{className:"h-10 w-24 rounded-md"}):m&&y.jsx("img",{src:m||"/placeholder.svg",alt:e.ManufacturerName??"",className:"max-h-10 max-w-24 object-contain"})})]}),y.jsxs("div",{className:"flex gap-6",children:[y.jsxs("div",{className:"flex-1",children:[y.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[y.jsx(xc,{size:"12",className:"mr-1.5"})," ",e.State]}),y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[y.jsx(BC,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&y.jsxs(kt,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[y.jsx(CC,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${(Y=e.ManufacturerCategory)!=null&&Y.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[y.jsx(Ry,{size:"12",className:"mr-1.5"})," ",(Q=e.ManufacturerCategory)!=null&&Q.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[y.jsx(Ry,{size:"12",className:"mr-1.5"})," ",(ee=e.ManufacturerCategory)!=null&&ee.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[y.jsx(FC,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),y.jsxs(kt,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[y.jsx(zC,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),y.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),y.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),y.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),y.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&y.jsxs("div",{children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),y.jsxs("div",{className:"font-medium flex items-center",children:[y.jsx(iC,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),y.jsx("div",{className:"flex flex-col",children:y.jsx(uC,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),y.jsxs("div",{className:"flex gap-6 mt-4",children:[y.jsx("div",{className:"flex flex-1",children:C&&e.Distribution&&y.jsxs("div",{className:"w-full",children:[y.jsx("div",{className:"flex items-center",children:"You have "+k.length+(k.length>1?" opportunities":" opportunity")+" for this product:"}),y.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:k.map((K,D)=>{var ue;return y.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
289
|
+
${K.BidNumber==(d==null?void 0:d.BidNumber)?"cursor-pointer border-2 border-purple-900":T(K)?"hover:bg-purple-200 cursor-pointer":"!bg-neutral-50"}
|
|
290
|
+
`,onClick:()=>{T(K)&&p(K.BidNumber!=(d==null?void 0:d.BidNumber)?K:null)},children:[y.jsx("div",{className:"flex items-center",children:y.jsxs("div",{className:"flex flex-col",children:[y.jsx("span",{className:"font-medium text-sm",children:K.Opportunity}),y.jsxs("span",{className:"text-xs text-neutral-900",children:[K.BidNumber," ",!T(K)&&y.jsx(kt,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),y.jsxs("div",{className:"flex flex-col items-end",children:[y.jsxs("span",{className:"font-semibold",children:["$",(ue=K.Price)==null?void 0:ue.toFixed(2)]}),K.Rebate&&K.Rebate>0&&y.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",K.Rebate.toFixed(2)]}),K.EndDate&&y.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",R(K.EndDate)]})]})]},D)})})]})}),y.jsxs("div",{className:"flex flex-col items-center",children:[o&&y.jsxs(Ve,{variant:"secondary",onClick:o,children:[y.jsx($C,{className:"mr-2"}),"View Product"]}),((re=e.Distribution)==null?void 0:re.Inventory)&&y.jsx("div",{className:"mt-4",children:y.jsxs(ha,{open:h,onOpenChange:b,children:[y.jsx(Vc,{asChild:!0,children:y.jsxs(Ve,{variant:"ghost",className:`flex items-center text-sm ${$>0?"text-green-700":"text-red-700"}`,children:[y.jsx(Wy,{size:"16",className:"mr-2"}),$>0?y.jsxs(y.Fragment,{children:[$," in stock"]}):y.jsx(y.Fragment,{children:"Out of stock"})]})}),y.jsxs(va,{className:"max-w-4xl",children:[y.jsx(ei,{children:y.jsxs(ti,{className:"flex items-center",children:[y.jsx(Wy,{className:"mr-2",size:18}),"Inventory Information"]})}),y.jsx(Rb,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&y.jsxs("div",{className:"flex justify-between items-end mt-4",children:[y.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:w>0?y.jsx("div",{className:"flex items-center",children:y.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[y.jsx("span",{children:"Cost: $"}),w.toFixed(2),y.jsx("span",{children:" CAD"})]})}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex items-center flex-wrap",children:[y.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[y.jsx("span",{children:"$"}),d?(G=(ie=e.Opportunities)==null?void 0:ie.find(K=>K.BidNumber==d.BidNumber))==null?void 0:G.Price:O.toFixed(2),y.jsx("span",{children:" CAD"})]}),g>0&&y.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",x.toFixed(2)]})]}),g>0&&y.jsx("div",{className:"flex items-center",children:y.jsxs(kt,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[y.jsxs("span",{children:[g,"% OFF"]}),((X=e.InstantRebate)==null?void 0:X.EndDate)&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(d==null?void 0:d.EndDate)&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",d.EndDate.split("T")[0]]})]})})]})}),y.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&y.jsxs("div",{className:"flex items-center border rounded-md",children:[y.jsx(Ve,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:M,disabled:typeof f<"u"&&(f<=1||!e.AvailableToBuy||s||!i),children:"-"}),y.jsx("input",{value:f,onChange:I,onBlur:L,onClick:K=>K.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||s||!i?"text-gray-400":""}`,disabled:!e.AvailableToBuy||s||!i}),y.jsx(Ve,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:N,disabled:!e.AvailableToBuy||s||!i,children:"+"})]}),typeof t<"u"&&t&&y.jsx(Ve,{className:"gap-2 whitespace-nowrap",onClick:B,disabled:!e.AvailableToBuy||s||!i,children:s?y.jsxs(y.Fragment,{children:[y.jsx(Fy,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):y.jsxs(y.Fragment,{children:[y.jsx(zy,{className:"mr-2"}),"Add to Cart"]})}),r&&y.jsx(Ve,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:c,disabled:u||!c,children:u?y.jsxs(y.Fragment,{children:[y.jsx(Fy,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):y.jsxs(y.Fragment,{children:[y.jsx(zy,{className:"mr-2"}),"Sync to Shopify"]})}),n]})]})]})})}H.AreaChart=q6,H.AvatarFooter=uk,H.Badge=kt,H.Button=Ve,H.Card=ua,H.CardContent=la,H.CardDescription=nC,H.CardFooter=aC,H.CardHeader=tC,H.CardTitle=rC,H.CountryFlag=iC,H.Dialog=ha,H.DialogClose=Kc,H.DialogContent=va,H.DialogDescription=Zc,H.DialogFooter=Xc,H.DialogHeader=ei,H.DialogOverlay=Yc,H.DialogPortal=Kg,H.DialogTitle=ti,H.DialogTrigger=Vc,H.DropdownMenu=MD,H.DropdownMenuCheckboxItem=jb,H.DropdownMenuContent=Db,H.DropdownMenuGroup=ID,H.DropdownMenuItem=kb,H.DropdownMenuLabel=qb,H.DropdownMenuPortal=$D,H.DropdownMenuRadioGroup=kD,H.DropdownMenuRadioItem=Lb,H.DropdownMenuSeparator=Bb,H.DropdownMenuShortcut=Fb,H.DropdownMenuSub=DD,H.DropdownMenuSubContent=$b,H.DropdownMenuSubTrigger=Ib,H.DropdownMenuTrigger=ND,H.Input=wi,H.InputOTP=MM,H.InputOTPGroup=NM,H.InputOTPSeparator=$M,H.InputOTPSlot=IM,H.Label=dk,H.Layout=cC,H.Navbar=sC,H.PartnerCard=B6,H.ProductCard=R6,H.ProductImage=uC,H.ProductInventoryGrid=Rb,H.Separator=Nu,H.Sheet=r0,H.SheetClose=sk,H.SheetContent=$u,H.SheetDescription=s0,H.SheetFooter=o0,H.SheetHeader=a0,H.SheetOverlay=Iu,H.SheetPortal=n0,H.SheetTitle=i0,H.SheetTrigger=ik,H.Sidebar=ju,H.SidebarContent=Fu,H.SidebarFooter=Bu,H.SidebarGroup=v0,H.SidebarGroupAction=g0,H.SidebarGroupContent=m0,H.SidebarGroupLabel=y0,H.SidebarHeader=qu,H.SidebarInput=p0,H.SidebarInset=d0,H.SidebarMenu=Ru,H.SidebarMenuAction=b0,H.SidebarMenuBadge=w0,H.SidebarMenuButton=Wu,H.SidebarMenuItem=zu,H.SidebarMenuSkeleton=x0,H.SidebarMenuSub=S0,H.SidebarMenuSubButton=_0,H.SidebarMenuSubItem=O0,H.SidebarProvider=ku,H.SidebarRail=f0,H.SidebarSeparator=h0,H.SidebarTrigger=Lu,H.Skeleton=le,H.Toast=Qu,H.ToastAction=H0,H.ToastClose=Ju,H.ToastDescription=tl,H.ToastProvider=G0,H.ToastTitle=el,H.ToastViewport=Zu,H.Toaster=Y0,H.Tooltip=bn,H.TooltipContent=Br,H.TooltipProvider=mn,H.TooltipTrigger=wn,H.Topbar=Cy,H.badgeVariants=oC,H.buttonVariants=Au,H.toast=K0,H.useIsMobile=u0,H.useSidebar=Ea,H.useToast=al,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|