@tsiky/components-r19 1.6.166 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SimpleBarChart-BYKV-EEv.cjs → SimpleBarChart-BDlotwdZ.cjs} +14 -14
- package/dist/{SimpleBarChart-Cc2mdbuB.js → SimpleBarChart-j02KrLhw.js} +75 -74
- package/dist/chart.cjs.js +3 -3
- package/dist/chart.js +5 -4
- package/dist/components-r19.css +1 -1
- package/dist/index.cjs.js +142 -141
- package/dist/index.js +6646 -6619
- package/dist/src/components/DataFourBoards/DataFourBoards.d.ts.map +1 -1
- package/dist/src/components/HorizontalBarChart/HorizontalBarChart.d.ts +1 -0
- package/dist/src/components/HorizontalBarChart/HorizontalBarChart.d.ts.map +1 -1
- package/dist/src/components/PatientCard/PatientCard.d.ts +2 -0
- package/dist/src/components/PatientCard/PatientCard.d.ts.map +1 -1
- package/dist/src/components/SankeyChartV2/SankeyChartV2.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -19294,7 +19294,7 @@ const tL = ({ active: e, payload: t, label: r, color: n, valueName: i }) => !e |
|
|
|
19294
19294
|
] });
|
|
19295
19295
|
};
|
|
19296
19296
|
export {
|
|
19297
|
-
|
|
19297
|
+
i0 as $,
|
|
19298
19298
|
Pt as A,
|
|
19299
19299
|
qR as B,
|
|
19300
19300
|
iw as C,
|
|
@@ -19304,88 +19304,89 @@ export {
|
|
|
19304
19304
|
AL as G,
|
|
19305
19305
|
cL as H,
|
|
19306
19306
|
Nw as I,
|
|
19307
|
-
|
|
19308
|
-
|
|
19309
|
-
|
|
19307
|
+
Ye as J,
|
|
19308
|
+
Fr as K,
|
|
19309
|
+
Vi as L,
|
|
19310
19310
|
oL as M,
|
|
19311
|
-
|
|
19312
|
-
|
|
19311
|
+
IL as N,
|
|
19312
|
+
be as O,
|
|
19313
19313
|
qL as P,
|
|
19314
|
-
|
|
19314
|
+
Ln as Q,
|
|
19315
19315
|
lE as R,
|
|
19316
19316
|
KL as S,
|
|
19317
19317
|
sk as T,
|
|
19318
|
-
|
|
19319
|
-
|
|
19320
|
-
|
|
19318
|
+
S as U,
|
|
19319
|
+
Y as V,
|
|
19320
|
+
cn as W,
|
|
19321
19321
|
vw as X,
|
|
19322
19322
|
pw as Y,
|
|
19323
19323
|
At as Z,
|
|
19324
|
-
|
|
19324
|
+
sn as _,
|
|
19325
19325
|
uL as a,
|
|
19326
|
-
|
|
19327
|
-
|
|
19328
|
-
|
|
19329
|
-
|
|
19330
|
-
|
|
19331
|
-
|
|
19332
|
-
|
|
19333
|
-
|
|
19334
|
-
|
|
19335
|
-
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
-
|
|
19342
|
-
|
|
19343
|
-
|
|
19344
|
-
|
|
19345
|
-
|
|
19346
|
-
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
|
|
19350
|
-
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19387
|
-
|
|
19388
|
-
|
|
19326
|
+
lL as a$,
|
|
19327
|
+
Ec as a0,
|
|
19328
|
+
vr as a1,
|
|
19329
|
+
ua as a2,
|
|
19330
|
+
cf as a3,
|
|
19331
|
+
it as a4,
|
|
19332
|
+
Gb as a5,
|
|
19333
|
+
oD as a6,
|
|
19334
|
+
wD as a7,
|
|
19335
|
+
Ja as a8,
|
|
19336
|
+
Hb as a9,
|
|
19337
|
+
K as aA,
|
|
19338
|
+
lo as aB,
|
|
19339
|
+
OL as aC,
|
|
19340
|
+
nf as aD,
|
|
19341
|
+
tj as aE,
|
|
19342
|
+
io as aF,
|
|
19343
|
+
af as aG,
|
|
19344
|
+
of as aH,
|
|
19345
|
+
uf as aI,
|
|
19346
|
+
vL as aJ,
|
|
19347
|
+
Ky as aK,
|
|
19348
|
+
dL as aL,
|
|
19349
|
+
Sw as aM,
|
|
19350
|
+
oi as aN,
|
|
19351
|
+
gL as aO,
|
|
19352
|
+
NR as aP,
|
|
19353
|
+
Pb as aQ,
|
|
19354
|
+
Mr as aR,
|
|
19355
|
+
Je as aS,
|
|
19356
|
+
$t as aT,
|
|
19357
|
+
kL as aU,
|
|
19358
|
+
iT as aV,
|
|
19359
|
+
nT as aW,
|
|
19360
|
+
rb as aX,
|
|
19361
|
+
pg as aY,
|
|
19362
|
+
FR as aZ,
|
|
19363
|
+
Eb as a_,
|
|
19364
|
+
dn as aa,
|
|
19365
|
+
ow as ab,
|
|
19366
|
+
Qb as ac,
|
|
19367
|
+
vn as ad,
|
|
19368
|
+
y$ as ae,
|
|
19369
|
+
m$ as af,
|
|
19370
|
+
ie as ag,
|
|
19371
|
+
mL as ah,
|
|
19372
|
+
co as ai,
|
|
19373
|
+
so as aj,
|
|
19374
|
+
Pe as ak,
|
|
19375
|
+
zb as al,
|
|
19376
|
+
gM as am,
|
|
19377
|
+
tt as an,
|
|
19378
|
+
Vb as ao,
|
|
19379
|
+
DC as ap,
|
|
19380
|
+
xL as aq,
|
|
19381
|
+
Hr as ar,
|
|
19382
|
+
Gr as as,
|
|
19383
|
+
Jl as at,
|
|
19384
|
+
xc as au,
|
|
19385
|
+
AP as av,
|
|
19386
|
+
oI as aw,
|
|
19387
|
+
Zy as ax,
|
|
19388
|
+
Dt as ay,
|
|
19389
|
+
$s as az,
|
|
19389
19390
|
fw as b,
|
|
19390
19391
|
$w as c,
|
|
19391
19392
|
To as d,
|
package/dist/chart.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react/jsx-runtime"),C=require("./SimpleBarChart-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react/jsx-runtime"),C=require("./SimpleBarChart-BDlotwdZ.cjs"),se=require("react"),Vs=require("react-dom");function Us(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const T=Us(se);function Qt(){return Qt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Qt.apply(null,arguments)}function Ra(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function qs(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ra(Object(t),!0).forEach(function(i){$s(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Ra(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function $s(s,e,t){return(e=Zs(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Zs(s){var e=Ks(s,"string");return typeof e=="symbol"?e:e+""}function Ks(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}var De=32,Js={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function Qs(s){var{data:e,iconType:t,inactiveColor:i}=s,a=De/2,r=De/6,n=De/3,o=e.inactive?i:e.color,l=t??e.type;if(l==="none")return null;if(l==="plainline"){var c;return T.createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:(c=e.payload)===null||c===void 0?void 0:c.strokeDasharray,x1:0,y1:a,x2:De,y2:a,className:"recharts-legend-icon"})}if(l==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(a,"h").concat(n,`
|
|
2
2
|
A`).concat(r,",").concat(r,",0,1,1,").concat(2*n,",").concat(a,`
|
|
3
3
|
H`).concat(De,"M").concat(2*n,",").concat(a,`
|
|
4
4
|
A`).concat(r,",").concat(r,",0,1,1,").concat(n,",").concat(a),className:"recharts-legend-icon"});if(l==="rect")return T.createElement("path",{stroke:"none",fill:o,d:"M0,".concat(De/8,"h").concat(De,"v").concat(De*3/4,"h").concat(-De,"z"),className:"recharts-legend-icon"});if(T.isValidElement(e.legendIcon)){var h=qs({},e);return delete h.legendIcon,T.cloneElement(e.legendIcon,h)}return T.createElement(C.Symbols,{fill:o,cx:a,cy:a,size:De,sizeType:"diameter",type:l})}function en(s){var{payload:e,iconSize:t,layout:i,formatter:a,inactiveColor:r,iconType:n}=s,o={x:0,y:0,width:De,height:De},l={display:i==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return e.map((h,d)=>{var u=h.formatter||a,g=C.clsx({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:h.inactive});if(h.type==="none")return null;var p=h.inactive?r:h.color,f=u?u(h.value,h,d):h.value;return T.createElement("li",Qt({className:g,style:l,key:"legend-item-".concat(d)},C.adaptEventsOfChild(s,h,d)),T.createElement(C.Surface,{width:t,height:t,viewBox:o,style:c,"aria-label":"".concat(f," legend icon")},T.createElement(Qs,{data:h,iconType:n,inactiveColor:r})),T.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},f))})}var tn=s=>{var e=C.resolveDefaultProps(s,Js),{payload:t,layout:i,align:a}=e;if(!t||!t.length)return null;var r={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:r},T.createElement(en,Qt({},e,{payload:t})))};function an(){return C.useAppSelector(C.selectLegendPayload)}var rn=["contextPayload"];function Gi(){return Gi=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Gi.apply(null,arguments)}function za(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function pt(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?za(Object(t),!0).forEach(function(i){sn(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):za(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function sn(s,e,t){return(e=nn(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function nn(s){var e=on(s,"string");return typeof e=="symbol"?e:e+""}function on(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function ln(s,e){if(s==null)return{};var t,i,a=cn(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function cn(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function hn(s){return s.value}function dn(s){var{contextPayload:e}=s,t=ln(s,rn),i=C.getUniqPayload(e,s.payloadUniqBy,hn),a=pt(pt({},t),{},{payload:i});return T.isValidElement(s.content)?T.cloneElement(s.content,a):typeof s.content=="function"?T.createElement(s.content,a):T.createElement(tn,a)}function un(s,e,t,i,a,r){var{layout:n,align:o,verticalAlign:l}=e,c,h;return(!s||(s.left===void 0||s.left===null)&&(s.right===void 0||s.right===null))&&(o==="center"&&n==="vertical"?c={left:((i||0)-r.width)/2}:c=o==="right"?{right:t&&t.right||0}:{left:t&&t.left||0}),(!s||(s.top===void 0||s.top===null)&&(s.bottom===void 0||s.bottom===null))&&(l==="middle"?h={top:((a||0)-r.height)/2}:h=l==="bottom"?{bottom:t&&t.bottom||0}:{top:t&&t.top||0}),pt(pt({},c),h)}function gn(s){var e=C.useAppDispatch();return se.useEffect(()=>{e(C.setLegendSettings(s))},[e,s]),null}function fn(s){var e=C.useAppDispatch();return se.useEffect(()=>(e(C.setLegendSize(s)),()=>{e(C.setLegendSize({width:0,height:0}))}),[e,s]),null}function pn(s,e,t,i){return s==="vertical"&&e!=null?{height:e}:s==="horizontal"?{width:t||i}:null}var xn={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function li(s){var e=C.resolveDefaultProps(s,xn),t=an(),i=C.useLegendPortal(),a=C.useMargin(),{width:r,height:n,wrapperStyle:o,portal:l}=e,[c,h]=C.useElementOffset([t]),d=C.useChartWidth(),u=C.useChartHeight();if(d==null||u==null)return null;var g=d-(a?.left||0)-(a?.right||0),p=pn(e.layout,n,r,g),f=l?o:pt(pt({position:"absolute",width:p?.width||r||"auto",height:p?.height||n||"auto"},un(o,e,a,d,u,c)),o),x=l??i;if(x==null||t==null)return null;var m=T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:h},T.createElement(gn,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),!l&&T.createElement(fn,{width:c.width,height:c.height}),T.createElement(dn,Gi({},e,p,{margin:a,chartWidth:d,chartHeight:u,contextPayload:t})));return Vs.createPortal(m,x)}li.displayName="Legend";function Vi(){return Vi=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Vi.apply(null,arguments)}var Mr=s=>{var{cx:e,cy:t,r:i,className:a}=s,r=C.clsx("recharts-dot",a);return C.isNumber(e)&&C.isNumber(t)&&C.isNumber(i)?T.createElement("circle",Vi({},C.svgPropertiesNoEvents(s),C.adaptEventHandlers(s),{className:r,cx:e,cy:t,r:i})):null},ui={},gi={},Da;function mn(){return Da||(Da=1,function(s){Object.defineProperty(s,Symbol.toStringTag,{value:"Module"});function e(t,i){if(t.length===0)return;let a=t[0],r=i(a,0,t);for(let n=1;n<t.length;n++){const o=t[n],l=i(o,n,t);l>r&&(r=l,a=o)}return a}s.maxBy=e}(gi)),gi}var Xa;function vn(){return Xa||(Xa=1,function(s){Object.defineProperty(s,Symbol.toStringTag,{value:"Module"});const e=mn(),t=C.requireIdentity(),i=C.requireIteratee();function a(r,n){if(r!=null)return e.maxBy(Array.from(r),i.iteratee(n??t.identity))}s.maxBy=a}(ui)),ui}var fi,Fa;function bn(){return Fa||(Fa=1,fi=vn().maxBy),fi}var yn=bn();const wn=C.getDefaultExportFromCjs(yn);var kn=["points"];function Ya(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function pi(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ya(Object(t),!0).forEach(function(i){An(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Ya(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function An(s,e,t){return(e=Sn(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Sn(s){var e=Cn(s,"string");return typeof e=="symbol"?e:e+""}function Cn(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function ei(){return ei=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},ei.apply(null,arguments)}function Pn(s,e){if(s==null)return{};var t,i,a=Ln(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function Ln(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function In(s){var{option:e,dotProps:t,className:i}=s;if(se.isValidElement(e))return se.cloneElement(e,t);if(typeof e=="function")return e(t);var a=C.clsx(i,typeof e!="boolean"?e.className:""),r=t??{},{points:n}=r,o=Pn(r,kn);return T.createElement(Mr,ei({},o,{className:a}))}function Mn(s,e){return s==null?!1:e?!0:s.length===1}function Er(s){var{points:e,dot:t,className:i,dotClassName:a,dataKey:r,baseProps:n,needClip:o,clipPathId:l,zIndex:c=C.DefaultZIndexes.scatter}=s;if(!Mn(e,t))return null;var h=C.isClipDot(t),d=C.svgPropertiesAndEventsFromUnknown(t),u=e.map((p,f)=>{var x,m,v=pi(pi(pi({r:3},n),d),{},{index:f,cx:(x=p.x)!==null&&x!==void 0?x:void 0,cy:(m=p.y)!==null&&m!==void 0?m:void 0,dataKey:r,value:p.value,payload:p.payload,points:e});return T.createElement(In,{key:"dot-".concat(f),option:t,dotProps:v,className:a})}),g={};return o&&l!=null&&(g.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(l,")")),T.createElement(C.ZIndexLayer,{zIndex:c},T.createElement(C.Layer,ei({className:i},g),u))}function _a(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function xi(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_a(Object(t),!0).forEach(function(i){En(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):_a(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function En(s,e,t){return(e=On(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function On(s){var e=Tn(s,"string");return typeof e=="symbol"?e:e+""}function Tn(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}var Rn=s=>{var{point:e,childIndex:t,mainColor:i,activeDot:a,dataKey:r,clipPath:n}=s;if(a===!1||e.x==null||e.y==null)return null;var o={index:t,dataKey:r,cx:e.x,cy:e.y,r:4,fill:i??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},l=xi(xi(xi({},o),C.svgPropertiesNoEventsFromUnknown(a)),C.adaptEventHandlers(a)),c;return se.isValidElement(a)?c=se.cloneElement(a,l):typeof a=="function"?c=a(l):c=T.createElement(Mr,l),T.createElement(C.Layer,{className:"recharts-active-dot",clipPath:n},c)};function Ui(s){var{points:e,mainColor:t,activeDot:i,itemDataKey:a,clipPath:r,zIndex:n=C.DefaultZIndexes.activeDot}=s,o=C.useAppSelector(C.selectActiveTooltipIndex),l=C.useActiveTooltipDataPoints();if(e==null||l==null)return null;var c=e.find(h=>l.includes(h.payload));return C.isNullish(c)?null:T.createElement(C.ZIndexLayer,{zIndex:n},T.createElement(Rn,{point:c,childIndex:Number(o),mainColor:t,dataKey:a,activeDot:i,clipPath:r}))}var Or=(s,e,t,i)=>C.selectAxisWithScale(s,"xAxis",e,i),Tr=(s,e,t,i)=>C.selectTicksOfGraphicalItem(s,"xAxis",e,i),Rr=(s,e,t,i)=>C.selectAxisWithScale(s,"yAxis",t,i),zr=(s,e,t,i)=>C.selectTicksOfGraphicalItem(s,"yAxis",t,i),zn=C.createSelector([C.selectChartLayout,Or,Rr,Tr,zr],(s,e,t,i,a)=>C.isCategoricalAxis(s,"xAxis")?C.getBandSizeOfAxis(e,i,!1):C.getBandSizeOfAxis(t,a,!1)),Dn=(s,e,t,i,a)=>a;function Xn(s){return s.type==="line"}var Fn=C.createSelector([C.selectUnfilteredCartesianItems,Dn],(s,e)=>s.filter(Xn).find(t=>t.id===e)),Yn=C.createSelector([C.selectChartLayout,Or,Rr,Tr,zr,Fn,zn,C.selectChartDataWithIndexesIfNotInPanoramaPosition4],(s,e,t,i,a,r,n,o)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:h}=o;if(!(r==null||e==null||t==null||i==null||a==null||i.length===0||a.length===0||n==null||s!=="horizontal"&&s!=="vertical")){var{dataKey:d,data:u}=r,g;if(u!=null&&u.length>0?g=u:g=l?.slice(c,h+1),g!=null)return ro({layout:s,xAxis:e,yAxis:t,xAxisTicks:i,yAxisTicks:a,dataKey:d,bandSize:n,displayedData:g})}});function Dr(s){var e=C.svgPropertiesNoEventsFromUnknown(s),t=3,i=2;if(e!=null){var{r:a,strokeWidth:r}=e,n=Number(a),o=Number(r);return(Number.isNaN(n)||n<0)&&(n=t),(Number.isNaN(o)||o<0)&&(o=i),{r:n,strokeWidth:o}}return{r:t,strokeWidth:i}}var _n=["id"],Nn=["type","layout","connectNulls","needClip","shape"],Hn=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Mt(){return Mt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Mt.apply(null,arguments)}function Na(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function We(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Na(Object(t),!0).forEach(function(i){Wn(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Na(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function Wn(s,e,t){return(e=Bn(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Bn(s){var e=jn(s,"string");return typeof e=="symbol"?e:e+""}function jn(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function pa(s,e){if(s==null)return{};var t,i,a=Gn(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function Gn(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}var Vn=s=>{var{dataKey:e,name:t,stroke:i,legendType:a,hide:r}=s;return[{inactive:r,dataKey:e,type:a,color:i,value:C.getTooltipNameProp(t,e),payload:s}]},Un=T.memo(s=>{var{dataKey:e,data:t,stroke:i,strokeWidth:a,fill:r,name:n,hide:o,unit:l,tooltipType:c,id:h}=s,d={dataDefinedOnItem:t,getPosition:C.noop,settings:{stroke:i,strokeWidth:a,fill:r,dataKey:e,nameKey:void 0,name:C.getTooltipNameProp(n,e),hide:o,type:c,color:i,unit:l,graphicalItemId:h}};return T.createElement(C.SetTooltipEntrySettings,{tooltipEntrySettings:d})}),Xr=(s,e)=>"".concat(e,"px ").concat(s-e,"px");function qn(s,e){for(var t=s.length%2!==0?[...s,0]:s,i=[],a=0;a<e;++a)i=[...i,...t];return i}var $n=(s,e,t)=>{var i=t.reduce((g,p)=>g+p);if(!i)return Xr(e,s);for(var a=Math.floor(s/i),r=s%i,n=e-s,o=[],l=0,c=0;l<t.length;c+=(h=t[l])!==null&&h!==void 0?h:0,++l){var h,d=t[l];if(d!=null&&c+d>r){o=[...t.slice(0,l),r-c];break}}var u=o.length%2===0?[0,n]:[n];return[...qn(t,a),...o,...u].map(g=>"".concat(g,"px")).join(", ")};function Zn(s){var{clipPathId:e,points:t,props:i}=s,{dot:a,dataKey:r,needClip:n}=i,{id:o}=i,l=pa(i,_n),c=C.svgPropertiesNoEvents(l);return T.createElement(Er,{points:t,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:r,baseProps:c,needClip:n,clipPathId:e})}function Kn(s){var{showLabels:e,children:t,points:i}=s,a=se.useMemo(()=>i?.map(r=>{var n,o,l={x:(n=r.x)!==null&&n!==void 0?n:0,y:(o=r.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return We(We({},l),{},{value:r.value,payload:r.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[i]);return T.createElement(C.CartesianLabelListContextProvider,{value:e?a:void 0},t)}function Ha(s){var{clipPathId:e,pathRef:t,points:i,strokeDasharray:a,props:r}=s,{type:n,layout:o,connectNulls:l,needClip:c,shape:h}=r,d=pa(r,Nn),u=We(We({},C.svgPropertiesAndEvents(d)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(e,")"):void 0,points:i,type:n,layout:o,connectNulls:l,strokeDasharray:a??r.strokeDasharray});return T.createElement(T.Fragment,null,i?.length>1&&T.createElement(C.Shape,Mt({shapeType:"curve",option:h},u,{pathRef:t})),T.createElement(Zn,{points:i,clipPathId:e,props:r}))}function Jn(s){try{return s&&s.getTotalLength&&s.getTotalLength()||0}catch{return 0}}function Qn(s){var{clipPathId:e,props:t,pathRef:i,previousPointsRef:a,longestAnimatedLengthRef:r}=s,{points:n,strokeDasharray:o,isAnimationActive:l,animationBegin:c,animationDuration:h,animationEasing:d,animateNewValues:u,width:g,height:p,onAnimationEnd:f,onAnimationStart:x}=t,m=a.current,v=C.useAnimationId(n,"recharts-line-"),w=se.useRef(v),[y,b]=se.useState(!1),A=!y,k=se.useCallback(()=>{typeof f=="function"&&f(),b(!1)},[f]),S=se.useCallback(()=>{typeof x=="function"&&x(),b(!0)},[x]),P=Jn(i.current),L=se.useRef(0);w.current!==v&&(L.current=r.current,w.current=v);var I=L.current;return T.createElement(Kn,{points:n,showLabels:A},t.children,T.createElement(C.JavascriptAnimate,{animationId:v,begin:c,duration:h,isActive:l,easing:d,onAnimationEnd:k,onAnimationStart:S,key:v},E=>{var O=C.interpolate(I,P+I,E),R=Math.min(O,P),D;if(l)if(o){var Y="".concat(o).split(/[,\s]+/gim).map(q=>parseFloat(q));D=$n(R,P,Y)}else D=Xr(P,R);else D=o==null?void 0:String(o);if(E>0&&P>0&&(a.current=n,r.current=Math.max(r.current,R)),m){var _=m.length/n.length,B=E===1?n:n.map((q,z)=>{var F=Math.floor(z*_);if(m[F]){var Z=m[F];return We(We({},q),{},{x:C.interpolate(Z.x,q.x,E),y:C.interpolate(Z.y,q.y,E)})}return u?We(We({},q),{},{x:C.interpolate(g*2,q.x,E),y:C.interpolate(p/2,q.y,E)}):We(We({},q),{},{x:q.x,y:q.y})});return a.current=B,T.createElement(Ha,{props:t,points:B,clipPathId:e,pathRef:i,strokeDasharray:D})}return T.createElement(Ha,{props:t,points:n,clipPathId:e,pathRef:i,strokeDasharray:D})}),T.createElement(C.LabelListFromLabelProp,{label:t.label}))}function eo(s){var{clipPathId:e,props:t}=s,i=se.useRef(null),a=se.useRef(0),r=se.useRef(null);return T.createElement(Qn,{props:t,clipPathId:e,previousPointsRef:i,longestAnimatedLengthRef:a,pathRef:r})}var to=(s,e)=>{var t,i;return{x:(t=s.x)!==null&&t!==void 0?t:void 0,y:(i=s.y)!==null&&i!==void 0?i:void 0,value:s.value,errorVal:C.getValueByDataKey(s.payload,e)}};class io extends se.Component{render(){var{hide:e,dot:t,points:i,className:a,xAxisId:r,yAxisId:n,top:o,left:l,width:c,height:h,id:d,needClip:u,zIndex:g}=this.props;if(e)return null;var p=C.clsx("recharts-line",a),f=d,{r:x,strokeWidth:m}=Dr(t),v=C.isClipDot(t),w=x*2+m,y=u?"url(#clipPath-".concat(v?"":"dots-").concat(f,")"):void 0;return T.createElement(C.ZIndexLayer,{zIndex:g},T.createElement(C.Layer,{className:p},u&&T.createElement("defs",null,T.createElement(C.GraphicalItemClipPath,{clipPathId:f,xAxisId:r,yAxisId:n}),!v&&T.createElement("clipPath",{id:"clipPath-dots-".concat(f)},T.createElement("rect",{x:l-w/2,y:o-w/2,width:c+w,height:h+w}))),T.createElement(C.SetErrorBarContext,{xAxisId:r,yAxisId:n,data:i,dataPointFormatter:to,errorBarOffset:0},T.createElement(eo,{props:this.props,clipPathId:f}))),T.createElement(Ui,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:y}))}}var Fr={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:C.DefaultZIndexes.line,type:"linear"};function ao(s){var e=C.resolveDefaultProps(s,Fr),{activeDot:t,animateNewValues:i,animationBegin:a,animationDuration:r,animationEasing:n,connectNulls:o,dot:l,hide:c,isAnimationActive:h,label:d,legendType:u,xAxisId:g,yAxisId:p,id:f}=e,x=pa(e,Hn),{needClip:m}=C.useNeedsClip(g,p),v=C.usePlotArea(),w=C.useChartLayout(),y=C.useIsPanorama(),b=C.useAppSelector(L=>Yn(L,g,p,y,f));if(w!=="horizontal"&&w!=="vertical"||b==null||v==null)return null;var{height:A,width:k,x:S,y:P}=v;return T.createElement(io,Mt({},x,{id:f,connectNulls:o,dot:l,activeDot:t,animateNewValues:i,animationBegin:a,animationDuration:r,animationEasing:n,isAnimationActive:h,hide:c,label:d,legendType:u,xAxisId:g,yAxisId:p,points:b,layout:w,height:A,width:k,left:S,top:P,needClip:m}))}function ro(s){var{layout:e,xAxis:t,yAxis:i,xAxisTicks:a,yAxisTicks:r,dataKey:n,bandSize:o,displayedData:l}=s;return l.map((c,h)=>{var d=C.getValueByDataKey(c,n);if(e==="horizontal"){var u=C.getCateCoordinateOfLine({axis:t,ticks:a,bandSize:o,entry:c,index:h}),g=C.isNullish(d)?null:i.scale.map(d);return{x:u,y:g??null,value:d,payload:c}}var p=C.isNullish(d)?null:t.scale.map(d),f=C.getCateCoordinateOfLine({axis:i,ticks:r,bandSize:o,entry:c,index:h});return p==null||f==null?null:{x:p,y:f,value:d,payload:c}}).filter(Boolean)}function so(s){var e=C.resolveDefaultProps(s,Fr),t=C.useIsPanorama();return T.createElement(C.RegisterGraphicalItemId,{id:e.id,type:"line"},i=>T.createElement(T.Fragment,null,T.createElement(C.SetLegendPayload,{legendPayload:Vn(e)}),T.createElement(Un,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:i}),T.createElement(C.SetCartesianGraphicalItem,{type:"line",id:i,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:t}),T.createElement(ao,Mt({},e,{id:i}))))}var Yr=T.memo(so,C.propsAreEqual);Yr.displayName="Line";var _r=(s,e,t)=>C.selectAxisWithScale(s,"xAxis",C.selectXAxisIdFromGraphicalItemId(s,e),t),Nr=(s,e,t)=>C.selectTicksOfGraphicalItem(s,"xAxis",C.selectXAxisIdFromGraphicalItemId(s,e),t),Hr=(s,e,t)=>C.selectAxisWithScale(s,"yAxis",C.selectYAxisIdFromGraphicalItemId(s,e),t),Wr=(s,e,t)=>C.selectTicksOfGraphicalItem(s,"yAxis",C.selectYAxisIdFromGraphicalItemId(s,e),t),no=C.createSelector([C.selectChartLayout,_r,Hr,Nr,Wr],(s,e,t,i,a)=>C.isCategoricalAxis(s,"xAxis")?C.getBandSizeOfAxis(e,i,!1):C.getBandSizeOfAxis(t,a,!1)),oo=(s,e)=>e,Br=C.createSelector([C.selectUnfilteredCartesianItems,oo],(s,e)=>s.filter(t=>t.type==="area").find(t=>t.id===e)),jr=s=>{var e=C.selectChartLayout(s),t=C.isCategoricalAxis(e,"xAxis");return t?"yAxis":"xAxis"},lo=(s,e)=>{var t=jr(s);return t==="yAxis"?C.selectYAxisIdFromGraphicalItemId(s,e):C.selectXAxisIdFromGraphicalItemId(s,e)},co=(s,e,t)=>C.selectStackGroups(s,jr(s),lo(s,e),t),ho=C.createSelector([Br,co],(s,e)=>{var t;if(!(s==null||e==null)){var{stackId:i}=s,a=C.getStackSeriesIdentifier(s);if(!(i==null||a==null)){var r=(t=e[i])===null||t===void 0?void 0:t.stackedData,n=r?.find(o=>o.key===a);if(n!=null)return n.map(o=>[o[0],o[1]])}}}),uo=C.createSelector([C.selectChartLayout,_r,Hr,Nr,Wr,ho,C.selectChartDataWithIndexesIfNotInPanoramaPosition3,no,Br,C.selectChartBaseValue],(s,e,t,i,a,r,n,o,l,c)=>{var{chartData:h,dataStartIndex:d,dataEndIndex:u}=n;if(!(l==null||s!=="horizontal"&&s!=="vertical"||e==null||t==null||i==null||a==null||i.length===0||a.length===0||o==null)){var{data:g}=l,p;if(g&&g.length>0?p=g:p=h?.slice(d,u+1),p!=null)return Oo({layout:s,xAxis:e,yAxis:t,xAxisTicks:i,yAxisTicks:a,dataStartIndex:d,areaSettings:l,stackedData:r,displayedData:p,chartBaseValue:c,bandSize:o})}}),go=["id"],fo=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function rt(){return rt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},rt.apply(null,arguments)}function Gr(s,e){if(s==null)return{};var t,i,a=po(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function po(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function Wa(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function ut(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Wa(Object(t),!0).forEach(function(i){xo(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Wa(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function xo(s,e,t){return(e=mo(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function mo(s){var e=vo(s,"string");return typeof e=="symbol"?e:e+""}function vo(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function ti(s,e){return s&&s!=="none"?s:e}var bo=s=>{var{dataKey:e,name:t,stroke:i,fill:a,legendType:r,hide:n}=s;return[{inactive:n,dataKey:e,type:r,color:ti(i,a),value:C.getTooltipNameProp(t,e),payload:s}]},yo=T.memo(s=>{var{dataKey:e,data:t,stroke:i,strokeWidth:a,fill:r,name:n,hide:o,unit:l,tooltipType:c,id:h}=s,d={dataDefinedOnItem:t,getPosition:C.noop,settings:{stroke:i,strokeWidth:a,fill:r,dataKey:e,nameKey:void 0,name:C.getTooltipNameProp(n,e),hide:o,type:c,color:ti(i,r),unit:l,graphicalItemId:h}};return T.createElement(C.SetTooltipEntrySettings,{tooltipEntrySettings:d})});function wo(s){var{clipPathId:e,points:t,props:i}=s,{needClip:a,dot:r,dataKey:n}=i,o=C.svgPropertiesNoEvents(i);return T.createElement(Er,{points:t,dot:r,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:n,baseProps:o,needClip:a,clipPathId:e})}function ko(s){var{showLabels:e,children:t,points:i}=s,a=i.map(r=>{var n,o,l={x:(n=r.x)!==null&&n!==void 0?n:0,y:(o=r.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ut(ut({},l),{},{value:r.value,payload:r.payload,parentViewBox:void 0,viewBox:l,fill:void 0})});return T.createElement(C.CartesianLabelListContextProvider,{value:e?a:void 0},t)}function Ba(s){var{points:e,baseLine:t,needClip:i,clipPathId:a,props:r}=s,{layout:n,type:o,stroke:l,connectNulls:c,isRange:h}=r,{id:d}=r,u=Gr(r,go),g=C.svgPropertiesNoEvents(u),p=C.svgPropertiesAndEvents(u);return T.createElement(T.Fragment,null,e?.length>1&&T.createElement(C.Layer,{clipPath:i?"url(#clipPath-".concat(a,")"):void 0},T.createElement(C.Curve,rt({},p,{id:d,points:e,connectNulls:c,type:o,baseLine:t,layout:n,stroke:"none",className:"recharts-area-area"})),l!=="none"&&T.createElement(C.Curve,rt({},g,{className:"recharts-area-curve",layout:n,type:o,connectNulls:c,fill:"none",points:e})),l!=="none"&&h&&T.createElement(C.Curve,rt({},g,{className:"recharts-area-curve",layout:n,type:o,connectNulls:c,fill:"none",points:t}))),T.createElement(wo,{points:e,props:u,clipPathId:a}))}function Ao(s){var e,t,{alpha:i,baseLine:a,points:r,strokeWidth:n}=s,o=(e=r[0])===null||e===void 0?void 0:e.y,l=(t=r[r.length-1])===null||t===void 0?void 0:t.y;if(!C.isWellBehavedNumber(o)||!C.isWellBehavedNumber(l))return null;var c=i*Math.abs(o-l),h=Math.max(...r.map(d=>d.x||0));return C.isNumber(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(d=>d.x||0),h)),C.isNumber(h)?T.createElement("rect",{x:0,y:o<l?o:o-c,width:h+(n?parseInt("".concat(n),10):1),height:Math.floor(c)}):null}function So(s){var e,t,{alpha:i,baseLine:a,points:r,strokeWidth:n}=s,o=(e=r[0])===null||e===void 0?void 0:e.x,l=(t=r[r.length-1])===null||t===void 0?void 0:t.x;if(!C.isWellBehavedNumber(o)||!C.isWellBehavedNumber(l))return null;var c=i*Math.abs(o-l),h=Math.max(...r.map(d=>d.y||0));return C.isNumber(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(d=>d.y||0),h)),C.isNumber(h)?T.createElement("rect",{x:o<l?o:o-c,y:0,width:c,height:Math.floor(h+(n?parseInt("".concat(n),10):1))}):null}function Co(s){var{alpha:e,layout:t,points:i,baseLine:a,strokeWidth:r}=s;return t==="vertical"?T.createElement(Ao,{alpha:e,points:i,baseLine:a,strokeWidth:r}):T.createElement(So,{alpha:e,points:i,baseLine:a,strokeWidth:r})}function Po(s){var{needClip:e,clipPathId:t,props:i,previousPointsRef:a,previousBaselineRef:r}=s,{points:n,baseLine:o,isAnimationActive:l,animationBegin:c,animationDuration:h,animationEasing:d,onAnimationStart:u,onAnimationEnd:g}=i,p=se.useMemo(()=>({points:n,baseLine:o}),[n,o]),f=C.useAnimationId(p,"recharts-area-"),x=C.useCartesianChartLayout(),[m,v]=se.useState(!1),w=!m,y=se.useCallback(()=>{typeof g=="function"&&g(),v(!1)},[g]),b=se.useCallback(()=>{typeof u=="function"&&u(),v(!0)},[u]);if(x==null)return null;var A=a.current,k=r.current;return T.createElement(ko,{showLabels:w,points:n},i.children,T.createElement(C.JavascriptAnimate,{animationId:f,begin:c,duration:h,isActive:l,easing:d,onAnimationEnd:y,onAnimationStart:b,key:f},S=>{if(A){var P=A.length/n.length,L=S===1?n:n.map((E,O)=>{var R=Math.floor(O*P);if(A[R]){var D=A[R];return ut(ut({},E),{},{x:C.interpolate(D.x,E.x,S),y:C.interpolate(D.y,E.y,S)})}return E}),I;return C.isNumber(o)?I=C.interpolate(k,o,S):C.isNullish(o)||C.isNan(o)?I=C.interpolate(k,0,S):I=o.map((E,O)=>{var R=Math.floor(O*P);if(Array.isArray(k)&&k[R]){var D=k[R];return ut(ut({},E),{},{x:C.interpolate(D.x,E.x,S),y:C.interpolate(D.y,E.y,S)})}return E}),S>0&&(a.current=L,r.current=I),T.createElement(Ba,{points:L,baseLine:I,needClip:e,clipPathId:t,props:i})}return S>0&&(a.current=n,r.current=o),T.createElement(C.Layer,null,l&&T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(t)},T.createElement(Co,{alpha:S,points:n,baseLine:o,layout:x,strokeWidth:i.strokeWidth}))),T.createElement(C.Layer,{clipPath:"url(#animationClipPath-".concat(t,")")},T.createElement(Ba,{points:n,baseLine:o,needClip:e,clipPathId:t,props:i})))}),T.createElement(C.LabelListFromLabelProp,{label:i.label}))}function Lo(s){var{needClip:e,clipPathId:t,props:i}=s,a=se.useRef(null),r=se.useRef();return T.createElement(Po,{needClip:e,clipPathId:t,props:i,previousPointsRef:a,previousBaselineRef:r})}class Io extends se.PureComponent{render(){var{hide:e,dot:t,points:i,className:a,top:r,left:n,needClip:o,xAxisId:l,yAxisId:c,width:h,height:d,id:u,baseLine:g,zIndex:p}=this.props;if(e)return null;var f=C.clsx("recharts-area",a),x=u,{r:m,strokeWidth:v}=Dr(t),w=C.isClipDot(t),y=m*2+v,b=o?"url(#clipPath-".concat(w?"":"dots-").concat(x,")"):void 0;return T.createElement(C.ZIndexLayer,{zIndex:p},T.createElement(C.Layer,{className:f},o&&T.createElement("defs",null,T.createElement(C.GraphicalItemClipPath,{clipPathId:x,xAxisId:l,yAxisId:c}),!w&&T.createElement("clipPath",{id:"clipPath-dots-".concat(x)},T.createElement("rect",{x:n-y/2,y:r-y/2,width:h+y,height:d+y}))),T.createElement(Lo,{needClip:o,clipPathId:x,props:this.props})),T.createElement(Ui,{points:i,mainColor:ti(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}),this.props.isRange&&Array.isArray(g)&&T.createElement(Ui,{points:g,mainColor:ti(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}))}}var Vr={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:C.DefaultZIndexes.area};function Mo(s){var e,t=C.resolveDefaultProps(s,Vr),{activeDot:i,animationBegin:a,animationDuration:r,animationEasing:n,connectNulls:o,dot:l,fill:c,fillOpacity:h,hide:d,isAnimationActive:u,legendType:g,stroke:p,xAxisId:f,yAxisId:x}=t,m=Gr(t,fo),v=C.useChartLayout(),w=C.useChartName(),{needClip:y}=C.useNeedsClip(f,x),b=C.useIsPanorama(),{points:A,isRange:k,baseLine:S}=(e=C.useAppSelector(R=>uo(R,s.id,b)))!==null&&e!==void 0?e:{},P=C.usePlotArea();if(v!=="horizontal"&&v!=="vertical"||P==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:L,width:I,x:E,y:O}=P;return!A||!A.length?null:T.createElement(Io,rt({},m,{activeDot:i,animationBegin:a,animationDuration:r,animationEasing:n,baseLine:S,connectNulls:o,dot:l,fill:c,fillOpacity:h,height:L,hide:d,layout:v,isAnimationActive:u==="auto"?!C.Global.isSsr:u,isRange:k,legendType:g,needClip:y,points:A,stroke:p,width:I,left:E,top:O,xAxisId:f,yAxisId:x}))}var Eo=(s,e,t,i,a)=>{var r=t??e;if(C.isNumber(r))return r;var n=s==="horizontal"?a:i,o=n.scale.domain();if(n.type==="number"){var l=Math.max(o[0],o[1]),c=Math.min(o[0],o[1]);return r==="dataMin"?c:r==="dataMax"||l<0?l:Math.max(Math.min(o[0],o[1]),0)}return r==="dataMin"?o[0]:r==="dataMax"?o[1]:o[0]};function Oo(s){var{areaSettings:{connectNulls:e,baseValue:t,dataKey:i},stackedData:a,layout:r,chartBaseValue:n,xAxis:o,yAxis:l,displayedData:c,dataStartIndex:h,xAxisTicks:d,yAxisTicks:u,bandSize:g}=s,p=a&&a.length,f=Eo(r,n,t,o,l),x=r==="horizontal",m=!1,v=c.map((y,b)=>{var A,k,S,P;if(p)P=a[h+b];else{var L=C.getValueByDataKey(y,i);Array.isArray(L)?(P=L,m=!0):P=[f,L]}var I=(A=(k=P)===null||k===void 0?void 0:k[1])!==null&&A!==void 0?A:null,E=I==null||p&&!e&&C.getValueByDataKey(y,i)==null;if(x){var O;return{x:C.getCateCoordinateOfLine({axis:o,ticks:d,bandSize:g,entry:y,index:b}),y:E?null:(O=l.scale.map(I))!==null&&O!==void 0?O:null,value:P,payload:y}}return{x:E?null:(S=o.scale.map(I))!==null&&S!==void 0?S:null,y:C.getCateCoordinateOfLine({axis:l,ticks:u,bandSize:g,entry:y,index:b}),value:P,payload:y}}),w;return p||m?w=v.map(y=>{var b,A=Array.isArray(y.value)?y.value[0]:null;if(x){var k;return{x:y.x,y:A!=null&&y.y!=null&&(k=l.scale.map(A))!==null&&k!==void 0?k:null,payload:y.payload}}return{x:A!=null&&(b=o.scale.map(A))!==null&&b!==void 0?b:null,y:y.y,payload:y.payload}}):w=x?l.scale.map(f):o.scale.map(f),{points:v,baseLine:w??0,isRange:m}}function To(s){var e=C.resolveDefaultProps(s,Vr),t=C.useIsPanorama();return T.createElement(C.RegisterGraphicalItemId,{id:e.id,type:"area"},i=>T.createElement(T.Fragment,null,T.createElement(C.SetLegendPayload,{legendPayload:bo(e)}),T.createElement(yo,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:i}),T.createElement(C.SetCartesianGraphicalItem,{type:"area",id:i,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:C.getNormalizedStackId(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:t,connectNulls:e.connectNulls}),T.createElement(Mo,rt({},e,{id:i}))))}var xa=T.memo(To,C.propsAreEqual);xa.displayName="Area";var Ro=["option","isActive"];function Pt(){return Pt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Pt.apply(null,arguments)}function zo(s,e){if(s==null)return{};var t,i,a=Do(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function Do(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function Xo(s){var{option:e,isActive:t}=s,i=zo(s,Ro);return typeof e=="string"?T.createElement(C.Shape,Pt({option:T.createElement(C.Symbols,Pt({type:e},i)),isActive:t,shapeType:"symbols"},i)):T.createElement(C.Shape,Pt({option:e,isActive:t,shapeType:"symbols"},i))}var Fo=(s,e,t,i,a,r,n)=>C.selectAxisWithScale(s,"xAxis",e,n),Yo=(s,e,t,i,a,r,n)=>C.selectTicksOfGraphicalItem(s,"xAxis",e,n),_o=(s,e,t,i,a,r,n)=>C.selectAxisWithScale(s,"yAxis",t,n),No=(s,e,t,i,a,r,n)=>C.selectTicksOfGraphicalItem(s,"yAxis",t,n),Ho=(s,e,t,i)=>C.selectZAxisWithScale(s,"zAxis",i,!1),Wo=(s,e,t,i,a)=>a,Bo=(s,e,t,i,a,r)=>r,jo=(s,e,t,i,a,r,n)=>C.selectChartDataWithIndexesIfNotInPanoramaPosition4(s,void 0,void 0,n),Go=C.createSelector([C.selectUnfilteredCartesianItems,Wo],(s,e)=>s.filter(t=>t.type==="scatter").find(t=>t.id===e)),Vo=C.createSelector([jo,Fo,Yo,_o,No,Ho,Go,Bo],(s,e,t,i,a,r,n,o)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:h}=s;if(n!=null){var d;if(n?.data!=null&&n.data.length>0?d=n.data:d=l?.slice(c,h+1),!(d==null||e==null||i==null||t==null||a==null||t?.length===0||a?.length===0))return nl({displayedData:d,xAxis:e,yAxis:i,zAxis:r,scatterSettings:n,xAxisTicks:t,yAxisTicks:a,cells:o})}}),Uo=["id"],qo=["onMouseEnter","onClick","onMouseLeave"],$o=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function qi(s,e){if(s==null)return{};var t,i,a=Zo(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function Zo(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function nt(){return nt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},nt.apply(null,arguments)}function ja(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function Oe(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ja(Object(t),!0).forEach(function(i){Ko(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):ja(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function Ko(s,e,t){return(e=Jo(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Jo(s){var e=Qo(s,"string");return typeof e=="symbol"?e:e+""}function Qo(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}var el=s=>{var{dataKey:e,name:t,fill:i,legendType:a,hide:r}=s;return[{inactive:r,dataKey:e,type:a,color:i,value:C.getTooltipNameProp(t,e),payload:s}]},tl=T.memo(s=>{var{dataKey:e,points:t,stroke:i,strokeWidth:a,fill:r,name:n,hide:o,tooltipType:l,id:c}=s,h={dataDefinedOnItem:t?.map(d=>d.tooltipPayload),getPosition:d=>{var u;return t==null||(u=t[Number(d)])===null||u===void 0?void 0:u.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:r,nameKey:void 0,dataKey:e,name:C.getTooltipNameProp(n,e),hide:o,type:l,color:r,unit:"",graphicalItemId:c}};return T.createElement(C.SetTooltipEntrySettings,{tooltipEntrySettings:h})});function il(s){var{points:e,props:t}=s,{line:i,lineType:a,lineJointType:r}=t;if(!i)return null;var n=C.svgPropertiesNoEvents(t),o=C.svgPropertiesNoEventsFromUnknown(i),l,c;if(a==="joint")l=e.map(x=>{var m,v;return{x:(m=x.cx)!==null&&m!==void 0?m:null,y:(v=x.cy)!==null&&v!==void 0?v:null}});else if(a==="fitting"){var{xmin:h,xmax:d,a:u,b:g}=C.getLinearRegression(e),p=x=>u*x+g;l=[{x:h,y:p(h)},{x:d,y:p(d)}]}var f=Oe(Oe(Oe({},n),{},{fill:"none",stroke:n&&n.fill},o),{},{points:l});return T.isValidElement(i)?c=T.cloneElement(i,f):typeof i=="function"?c=i(f):c=T.createElement(C.Curve,nt({},f,{type:r})),T.createElement(C.Layer,{className:"recharts-scatter-line",key:"recharts-scatter-line"},c)}function al(s){var{showLabels:e,points:t,children:i}=s,a=C.useViewBox(),r=se.useMemo(()=>t?.map(n=>{var o,l,c={x:(o=n.x)!==null&&o!==void 0?o:0,y:(l=n.y)!==null&&l!==void 0?l:0,width:n.width,height:n.height,lowerWidth:n.width,upperWidth:n.width};return Oe(Oe({},c),{},{value:void 0,payload:n.payload,viewBox:c,parentViewBox:a,fill:void 0})}),[a,t]);return T.createElement(C.CartesianLabelListContextProvider,{value:e?r:void 0},i)}function rl(s){var{points:e,allOtherScatterProps:t}=s,{shape:i,activeShape:a,dataKey:r}=t,{id:n}=t,o=qi(t,Uo),l=C.useAppSelector(C.selectActiveTooltipIndex),{onMouseEnter:c,onClick:h,onMouseLeave:d}=t,u=qi(t,qo),g=C.useMouseEnterItemDispatch(c,r,n),p=C.useMouseLeaveItemDispatch(d),f=C.useMouseClickItemDispatch(h,r,n);if(!C.isNonEmptyArray(e))return null;var x=C.svgPropertiesNoEvents(o);return T.createElement(T.Fragment,null,T.createElement(il,{points:e,props:o}),e.map((m,v)=>{var w=a!=null&&a!==!1,y=w&&l===String(v),b=w&&y?a:i,A=Oe(Oe(Oe({},x),m),{},{index:v,[C.DATA_ITEM_GRAPHICAL_ITEM_ID_ATTRIBUTE_NAME]:String(n)});return T.createElement(C.ZIndexLayer,{key:"symbol-".concat(m?.cx,"-").concat(m?.cy,"-").concat(m?.size,"-").concat(v),zIndex:y?C.DefaultZIndexes.activeDot:void 0},T.createElement(C.Layer,nt({className:"recharts-scatter-symbol"},C.adaptEventsOfChild(u,m,v),{onMouseEnter:g(m,v),onMouseLeave:p(m,v),onClick:f(m,v)}),T.createElement(Xo,nt({option:b,isActive:y},A))))}))}function sl(s){var{previousPointsRef:e,props:t}=s,{points:i,isAnimationActive:a,animationBegin:r,animationDuration:n,animationEasing:o}=t,l=e.current,c=C.useAnimationId(t,"recharts-scatter-"),[h,d]=se.useState(!1),u=se.useCallback(()=>{d(!1)},[]),g=se.useCallback(()=>{d(!0)},[]),p=!h;return T.createElement(al,{showLabels:p,points:i},t.children,T.createElement(C.JavascriptAnimate,{animationId:c,begin:r,duration:n,isActive:a,easing:o,onAnimationEnd:u,onAnimationStart:g,key:c},f=>{var x=f===1?i:i?.map((m,v)=>{var w=l&&l[v];return w?Oe(Oe({},m),{},{cx:m.cx==null?void 0:C.interpolate(w.cx,m.cx,f),cy:m.cy==null?void 0:C.interpolate(w.cy,m.cy,f),size:C.interpolate(w.size,m.size,f)}):Oe(Oe({},m),{},{size:C.interpolate(0,m.size,f)})});return f>0&&(e.current=x),T.createElement(C.Layer,null,T.createElement(rl,{points:x,allOtherScatterProps:t,showLabels:p}))}),T.createElement(C.LabelListFromLabelProp,{label:t.label}))}function nl(s){var{displayedData:e,xAxis:t,yAxis:i,zAxis:a,scatterSettings:r,xAxisTicks:n,yAxisTicks:o,cells:l}=s,c=C.isNullish(t.dataKey)?r.dataKey:t.dataKey,h=C.isNullish(i.dataKey)?r.dataKey:i.dataKey,d=a&&a.dataKey,u=a?a.range:C.implicitZAxis.range,g=u&&u[0],p=t.scale.bandwidth?t.scale.bandwidth():0,f=i.scale.bandwidth?i.scale.bandwidth():0;return e.map((x,m)=>{var v=C.getValueByDataKey(x,c),w=C.getValueByDataKey(x,h),y=!C.isNullish(d)&&C.getValueByDataKey(x,d)||"-",b=[{name:C.isNullish(t.dataKey)?r.name:t.name||String(t.dataKey),unit:t.unit||"",value:v,payload:x,dataKey:c,type:r.tooltipType},{name:C.isNullish(i.dataKey)?r.name:i.name||String(i.dataKey),unit:i.unit||"",value:w,payload:x,dataKey:h,type:r.tooltipType}];y!=="-"&&a!=null&&b.push({name:a.name||a.dataKey,unit:a.unit||"",value:y,payload:x,dataKey:d,type:r.tooltipType});var A=C.getCateCoordinateOfLine({axis:t,ticks:n,bandSize:p,entry:x,index:m,dataKey:c}),k=C.getCateCoordinateOfLine({axis:i,ticks:o,bandSize:f,entry:x,index:m,dataKey:h}),S=y!=="-"&&a!=null?a.scale.map(y):g,P=S==null?0:Math.sqrt(Math.max(S,0)/Math.PI);return Oe(Oe({},x),{},{cx:A,cy:k,x:A==null?void 0:A-P,y:k==null?void 0:k-P,width:2*P,height:2*P,size:S,node:{x:v,y:w,z:y},tooltipPayload:b,tooltipPosition:{x:A,y:k},payload:x},l&&l[m]&&l[m].props)})}var ol=(s,e,t)=>({x:s.cx,y:s.cy,value:Number(t==="x"?s.node.x:s.node.y),errorVal:C.getValueByDataKey(s,e)});function ll(s){var{hide:e,points:t,className:i,needClip:a,xAxisId:r,yAxisId:n,id:o}=s,l=se.useRef(null);if(e)return null;var c=C.clsx("recharts-scatter",i),h=o;return T.createElement(C.ZIndexLayer,{zIndex:s.zIndex},T.createElement(C.Layer,{className:c,clipPath:a?"url(#clipPath-".concat(h,")"):void 0,id:o},a&&T.createElement("defs",null,T.createElement(C.GraphicalItemClipPath,{clipPathId:h,xAxisId:r,yAxisId:n})),T.createElement(C.SetErrorBarContext,{xAxisId:r,yAxisId:n,data:t,dataPointFormatter:ol,errorBarOffset:0},T.createElement(C.Layer,{key:"recharts-scatter-symbols"},T.createElement(sl,{props:s,previousPointsRef:l})))))}var Ur={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:C.DefaultZIndexes.scatter};function cl(s){var e=C.resolveDefaultProps(s,Ur),{animationBegin:t,animationDuration:i,animationEasing:a,hide:r,isAnimationActive:n,legendType:o,lineJointType:l,lineType:c,shape:h,xAxisId:d,yAxisId:u,zAxisId:g}=e,p=qi(e,$o),{needClip:f}=C.useNeedsClip(d,u),x=se.useMemo(()=>C.findAllByType(s.children,C.Cell),[s.children]),m=C.useIsPanorama(),v=C.useAppSelector(w=>Vo(w,d,u,g,s.id,x,m));return f==null||v==null?null:T.createElement(T.Fragment,null,T.createElement(tl,{dataKey:s.dataKey,points:v,stroke:s.stroke,strokeWidth:s.strokeWidth,fill:s.fill,name:s.name,hide:s.hide,tooltipType:s.tooltipType,id:s.id}),T.createElement(ll,nt({},p,{xAxisId:d,yAxisId:u,zAxisId:g,lineType:c,lineJointType:l,legendType:o,shape:h,hide:r,isAnimationActive:n,animationBegin:t,animationDuration:i,animationEasing:a,points:v,needClip:f})))}function hl(s){var e=C.resolveDefaultProps(s,Ur),t=C.useIsPanorama();return T.createElement(C.RegisterGraphicalItemId,{id:e.id,type:"scatter"},i=>T.createElement(T.Fragment,null,T.createElement(C.SetLegendPayload,{legendPayload:el(e)}),T.createElement(C.SetCartesianGraphicalItem,{type:"scatter",id:i,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:e.zAxisId,dataKey:e.dataKey,hide:e.hide,name:e.name,tooltipType:e.tooltipType,isPanorama:t}),T.createElement(cl,nt({},e,{id:i}))))}var $i=T.memo(hl,C.propsAreEqual);$i.displayName="Scatter";var mi={},Ga;function dl(){return Ga||(Ga=1,function(s){Object.defineProperty(s,Symbol.toStringTag,{value:"Module"});const e=C.requireIteratee();function t(i,a){if(!i||!i.length)return 0;a!=null&&(a=e.iteratee(a));let r;for(let n=0;n<i.length;n++){const o=a?a(i[n]):i[n];o!==void 0&&(r===void 0?r=o:r+=o)}return r}s.sumBy=t}(mi)),mi}var vi,Va;function ul(){return Va||(Va=1,vi=dl().sumBy),vi}var gl=ul();const fl=C.getDefaultExportFromCjs(gl);var pl=["sourceX","sourceY","sourceControlX","targetX","targetY","targetControlX","linkWidth"],xl=["className","style","children","id"];function xt(){return xt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},xt.apply(null,arguments)}function qr(s,e){if(s==null)return{};var t,i,a=ml(s,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(s,t)&&(a[t]=s[t])}return a}function ml(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)!==-1)continue;t[i]=s[i]}return t}function Ua(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable})),t.push.apply(t,i)}return t}function Be(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ua(Object(t),!0).forEach(function(i){vl(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Ua(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function vl(s,e,t){return(e=bl(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function bl(s){var e=yl(s,"string");return typeof e=="symbol"?e:e+""}function yl(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}var wl=(s,e)=>{var t=+s,i=e-t;return a=>t+i*a},ci=s=>s.y+s.dy/2,Et=s=>s&&s.value||0,ii=(s,e)=>e.reduce((t,i)=>t+Et(s[i]),0),kl=(s,e,t)=>t.reduce((i,a)=>{var r=e[a];if(r==null)return i;var n=s[r.source];return n==null?i:i+ci(n)*Et(e[a])},0),Al=(s,e,t)=>t.reduce((i,a)=>{var r=e[a];if(r==null)return i;var n=s[r.target];return n==null?i:i+ci(n)*Et(e[a])},0),Sl=(s,e)=>s.y-e.y,Cl=(s,e)=>{for(var t=[],i=[],a=[],r=[],n=0,o=s.length;n<o;n++){var l=s[n];l?.source===e&&(a.push(l.target),r.push(n)),l?.target===e&&(t.push(l.source),i.push(n))}return{sourceNodes:t,sourceLinks:i,targetLinks:r,targetNodes:a}},$r=(s,e)=>{for(var{targetNodes:t}=e,i=0,a=t.length;i<a;i++){var r=t[i];if(r!=null){var n=s[r];n&&(n.depth=Math.max(e.depth+1,n.depth),$r(s,n))}}},Pl=(s,e,t,i)=>{for(var a,r,{nodes:n,links:o}=s,l=n.map((m,v)=>{var w=Cl(o,v);return Be(Be(Be({},m),w),{},{value:Math.max(ii(o,w.sourceLinks),ii(o,w.targetLinks)),depth:0})}),c=0,h=l.length;c<h;c++){var d=l[c];d!=null&&!d.sourceNodes.length&&$r(l,d)}var u=(a=(r=wn(l,m=>m.depth))===null||r===void 0?void 0:r.depth)!==null&&a!==void 0?a:0;if(u>=1)for(var g=(e-t)/u,p=0,f=l.length;p<f;p++){var x=l[p];x!=null&&(x.targetNodes.length||i==="justify"&&(x.depth=u),x.x=x.depth*g,x.dx=t)}return{tree:l,maxDepth:u}},Ll=s=>{for(var e=[],t=0,i=s.length;t<i;t++){var a,r=s[t];r!=null&&(e[r.depth]||(e[r.depth]=[]),(a=e[r.depth])===null||a===void 0||a.push(r))}return e},Il=(s,e,t,i,a)=>{for(var r=Math.min(...s.map(x=>(e-(x.length-1)*t)/fl(x,Et))),n=0,o=s.length;n<o;n++){var l=s[n];if(l!=null)if(a==="top")for(var c=0,h=0,d=l.length;h<d;h++){var u=l[h];u!=null&&(u.dy=u.value*r,u.y=c,c+=u.dy+t)}else for(var g=0,p=l.length;g<p;g++){var f=l[g];f!=null&&(f.y=g,f.dy=f.value*r)}}return i.map(x=>Be(Be({},x),{},{dy:Et(x)*r}))},bi=function(e,t,i){for(var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r=0,n=e.length;r<n;r++){var o=e[r];if(o!=null){var l=o.length;a&&o.sort(Sl);for(var c=0,h=0;h<l;h++){var d=o[h];if(d!=null){var u=c-d.y;u>0&&(d.y+=u),c=d.y+d.dy+i}}c=t+i;for(var g=l-1;g>=0;g--){var p=o[g];if(p!=null){var f=p.y+p.dy+i-c;if(f>0)p.y-=f,c=p.y;else break}}}}},Ml=(s,e,t,i)=>{for(var a=0,r=e.length;a<r;a++){var n=e[a];if(n!=null)for(var o=0,l=n.length;o<l;o++){var c=n[o];if(c!=null&&c.sourceLinks.length){var h=ii(t,c.sourceLinks),d=kl(s,t,c.sourceLinks),u=d/h;c.y+=(u-ci(c))*i}}}},El=(s,e,t,i)=>{for(var a=e.length-1;a>=0;a--){var r=e[a];if(r!=null)for(var n=0,o=r.length;n<o;n++){var l=r[n];if(l!=null&&l.targetLinks.length){var c=ii(t,l.targetLinks),h=Al(s,t,l.targetLinks),d=h/c;l.y+=(d-ci(l))*i}}}},Ol=(s,e)=>{for(var t=0,i=s.length;t<i;t++){var a=s[t];if(a!=null){var r=0,n=0;a.targetLinks.sort((f,x)=>{var m,v,w,y,b=(m=e[f])===null||m===void 0?void 0:m.target,A=(v=e[x])===null||v===void 0?void 0:v.target;if(b==null||A==null)return 0;var k=(w=s[b])===null||w===void 0?void 0:w.y,S=(y=s[A])===null||y===void 0?void 0:y.y;return k==null||S==null?0:k-S}),a.sourceLinks.sort((f,x)=>{var m,v,w,y,b=(m=e[f])===null||m===void 0?void 0:m.source,A=(v=e[x])===null||v===void 0?void 0:v.source;if(b==null||A==null)return 0;var k=(w=s[b])===null||w===void 0?void 0:w.y,S=(y=s[A])===null||y===void 0?void 0:y.y;return k==null||S==null?0:k-S});for(var o=0,l=a.targetLinks.length;o<l;o++){var c=a.targetLinks[o];if(c!=null){var h=e[c];h&&(h.sy=r,r+=h.dy)}}for(var d=0,u=a.sourceLinks.length;d<u;d++){var g=a.sourceLinks[d];if(g!=null){var p=e[g];p&&(p.ty=n,n+=p.dy)}}}}},Tl=s=>{var{data:e,width:t,height:i,iterations:a,nodeWidth:r,nodePadding:n,sort:o,verticalAlign:l,align:c}=s,{links:h}=e,{tree:d}=Pl(e,t,r,c),u=Ll(d),g=Il(u,i,n,h,l);if(bi(u,i,n,o),l==="justify")for(var p=1,f=1;f<=a;f++)El(d,u,g,p*=.99),bi(u,i,n,o),Ml(d,u,g,p),bi(u,i,n,o);Ol(d,g);var x=g;return{nodes:d,links:x}},Rl=s=>({x:+s.x+ +s.width/2,y:+s.y+ +s.height/2}),zl=s=>"sourceX"in s?{x:(s.sourceX+s.targetX)/2,y:(s.sourceY+s.targetY)/2}:void 0,Dl=(s,e,t)=>{var{payload:i}=s;if(e==="node")return{payload:i,name:C.getValueByDataKey(i,t,""),value:C.getValueByDataKey(i,"value")};if("source"in i&&i.source&&i.target){var a=C.getValueByDataKey(i.source,t,""),r=C.getValueByDataKey(i.target,t,"");return{payload:i,name:"".concat(a," - ").concat(r),value:C.getValueByDataKey(i,"value")}}},Xl=(s,e,t,i)=>{if(!(e==null||typeof e!="string")&&!(t==null||typeof t!="object")){var a=e.split("-"),[r,n]=a,o=C.get(t,"".concat(r,"s[").concat(n,"]"));if(o){var l=Dl(o,r,i);return l}}},Fl={chartName:"Sankey",defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],tooltipPayloadSearcher:Xl,eventEmitter:void 0},Yl=T.memo(s=>{var{dataKey:e,nameKey:t,stroke:i,strokeWidth:a,fill:r,name:n,data:o,id:l}=s,c={dataDefinedOnItem:o,getPosition:C.noop,settings:{stroke:i,strokeWidth:a,fill:r,dataKey:e,name:n,nameKey:t,hide:!1,type:void 0,color:r,unit:"",graphicalItemId:l}};return T.createElement(C.SetTooltipEntrySettings,{tooltipEntrySettings:c})});function _l(s,e){if(T.isValidElement(s))return T.cloneElement(s,e);if(typeof s=="function")return s(e);var{sourceX:t,sourceY:i,sourceControlX:a,targetX:r,targetY:n,targetControlX:o,linkWidth:l}=e,c=qr(e,pl);return T.createElement("path",xt({className:"recharts-sankey-link",d:`
|
|
@@ -962,9 +962,9 @@ object-assign
|
|
|
962
962
|
*/var _i,br;function xh(){if(br)return _i;br=1;var s=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function a(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var n={},o=0;o<10;o++)n["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(n).map(function(h){return n[h]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _i=a()?Object.assign:function(r,n){for(var o,l=i(r),c,h=1;h<arguments.length;h++){o=Object(arguments[h]);for(var d in o)e.call(o,d)&&(l[d]=o[d]);if(s){c=s(o);for(var u=0;u<c.length;u++)t.call(o,c[u])&&(l[c[u]]=o[c[u]])}}return l},_i}var Ni,yr;function Oa(){if(yr)return Ni;yr=1;var s="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ni=s,Ni}var Hi,wr;function Gs(){return wr||(wr=1,Hi=Function.call.bind(Object.prototype.hasOwnProperty)),Hi}var Wi,kr;function mh(){if(kr)return Wi;kr=1;var s=function(){};if(process.env.NODE_ENV!=="production"){var e=Oa(),t={},i=Gs();s=function(r){var n="Warning: "+r;typeof console<"u"&&console.error(n);try{throw new Error(n)}catch{}}}function a(r,n,o,l,c){if(process.env.NODE_ENV!=="production"){for(var h in r)if(i(r,h)){var d;try{if(typeof r[h]!="function"){var u=Error((l||"React class")+": "+o+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=r[h](n,h,l,o,null,e)}catch(p){d=p}if(d&&!(d instanceof Error)&&s((l||"React class")+": type specification of "+o+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in t)){t[d.message]=!0;var g=c?c():"";s("Failed "+o+" type: "+d.message+(g??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Wi=a,Wi}var Bi,Ar;function vh(){if(Ar)return Bi;Ar=1;var s=js(),e=xh(),t=Oa(),i=Gs(),a=mh(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function n(){return null}return Bi=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function d(z){var F=z&&(c&&z[c]||z[h]);if(typeof F=="function")return F}var u="<<anonymous>>",g={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:v(),arrayOf:w,element:y(),elementType:b(),instanceOf:A,node:L(),objectOf:S,oneOf:k,oneOfType:P,shape:E,exact:O};function p(z,F){return z===F?z!==0||1/z===1/F:z!==z&&F!==F}function f(z,F){this.message=z,this.data=F&&typeof F=="object"?F:{},this.stack=""}f.prototype=Error.prototype;function x(z){if(process.env.NODE_ENV!=="production")var F={},Z=0;function U($,W,G,ee,te,ae,he){if(ee=ee||u,ae=ae||G,he!==t){if(l){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=ee+":"+G;!F[de]&&Z<3&&(r("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+ee+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[de]=!0,Z++)}}return W[G]==null?$?W[G]===null?new f("The "+te+" `"+ae+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new f("The "+te+" `"+ae+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:z(W,G,ee,te,ae)}var N=U.bind(null,!1);return N.isRequired=U.bind(null,!0),N}function m(z){function F(Z,U,N,$,W,G){var ee=Z[U],te=Y(ee);if(te!==z){var ae=_(ee);return new f("Invalid "+$+" `"+W+"` of type "+("`"+ae+"` supplied to `"+N+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return x(F)}function v(){return x(n)}function w(z){function F(Z,U,N,$,W){if(typeof z!="function")return new f("Property `"+W+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var G=Z[U];if(!Array.isArray(G)){var ee=Y(G);return new f("Invalid "+$+" `"+W+"` of type "+("`"+ee+"` supplied to `"+N+"`, expected an array."))}for(var te=0;te<G.length;te++){var ae=z(G,te,N,$,W+"["+te+"]",t);if(ae instanceof Error)return ae}return null}return x(F)}function y(){function z(F,Z,U,N,$){var W=F[Z];if(!o(W)){var G=Y(W);return new f("Invalid "+N+" `"+$+"` of type "+("`"+G+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return x(z)}function b(){function z(F,Z,U,N,$){var W=F[Z];if(!s.isValidElementType(W)){var G=Y(W);return new f("Invalid "+N+" `"+$+"` of type "+("`"+G+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return x(z)}function A(z){function F(Z,U,N,$,W){if(!(Z[U]instanceof z)){var G=z.name||u,ee=q(Z[U]);return new f("Invalid "+$+" `"+W+"` of type "+("`"+ee+"` supplied to `"+N+"`, expected ")+("instance of `"+G+"`."))}return null}return x(F)}function k(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),n;function F(Z,U,N,$,W){for(var G=Z[U],ee=0;ee<z.length;ee++)if(p(G,z[ee]))return null;var te=JSON.stringify(z,function(he,K){var de=_(K);return de==="symbol"?String(K):K});return new f("Invalid "+$+" `"+W+"` of value `"+String(G)+"` "+("supplied to `"+N+"`, expected one of "+te+"."))}return x(F)}function S(z){function F(Z,U,N,$,W){if(typeof z!="function")return new f("Property `"+W+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var G=Z[U],ee=Y(G);if(ee!=="object")return new f("Invalid "+$+" `"+W+"` of type "+("`"+ee+"` supplied to `"+N+"`, expected an object."));for(var te in G)if(i(G,te)){var ae=z(G,te,N,$,W+"."+te,t);if(ae instanceof Error)return ae}return null}return x(F)}function P(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var F=0;F<z.length;F++){var Z=z[F];if(typeof Z!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(Z)+" at index "+F+"."),n}function U(N,$,W,G,ee){for(var te=[],ae=0;ae<z.length;ae++){var he=z[ae],K=he(N,$,W,G,ee,t);if(K==null)return null;K.data&&i(K.data,"expectedType")&&te.push(K.data.expectedType)}var de=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new f("Invalid "+G+" `"+ee+"` supplied to "+("`"+W+"`"+de+"."))}return x(U)}function L(){function z(F,Z,U,N,$){return R(F[Z])?null:new f("Invalid "+N+" `"+$+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return x(z)}function I(z,F,Z,U,N){return new f((z||"React class")+": "+F+" type `"+Z+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function E(z){function F(Z,U,N,$,W){var G=Z[U],ee=Y(G);if(ee!=="object")return new f("Invalid "+$+" `"+W+"` of type `"+ee+"` "+("supplied to `"+N+"`, expected `object`."));for(var te in z){var ae=z[te];if(typeof ae!="function")return I(N,$,W,te,_(ae));var he=ae(G,te,N,$,W+"."+te,t);if(he)return he}return null}return x(F)}function O(z){function F(Z,U,N,$,W){var G=Z[U],ee=Y(G);if(ee!=="object")return new f("Invalid "+$+" `"+W+"` of type `"+ee+"` "+("supplied to `"+N+"`, expected `object`."));var te=e({},Z[U],z);for(var ae in te){var he=z[ae];if(i(z,ae)&&typeof he!="function")return I(N,$,W,ae,_(he));if(!he)return new f("Invalid "+$+" `"+W+"` key `"+ae+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(Z[U],null," ")+`
|
|
963
963
|
Valid keys: `+JSON.stringify(Object.keys(z),null," "));var K=he(G,ae,N,$,W+"."+ae,t);if(K)return K}return null}return x(F)}function R(z){switch(typeof z){case"number":case"string":case"undefined":return!0;case"boolean":return!z;case"object":if(Array.isArray(z))return z.every(R);if(z===null||o(z))return!0;var F=d(z);if(F){var Z=F.call(z),U;if(F!==z.entries){for(;!(U=Z.next()).done;)if(!R(U.value))return!1}else for(;!(U=Z.next()).done;){var N=U.value;if(N&&!R(N[1]))return!1}}else return!1;return!0;default:return!1}}function D(z,F){return z==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function Y(z){var F=typeof z;return Array.isArray(z)?"array":z instanceof RegExp?"object":D(F,z)?"symbol":F}function _(z){if(typeof z>"u"||z===null)return""+z;var F=Y(z);if(F==="object"){if(z instanceof Date)return"date";if(z instanceof RegExp)return"regexp"}return F}function B(z){var F=_(z);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function q(z){return!z.constructor||!z.constructor.name?u:z.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Bi}var ji,Sr;function bh(){if(Sr)return ji;Sr=1;var s=Oa();function e(){}function t(){}return t.resetWarningCache=e,ji=function(){function i(n,o,l,c,h,d){if(d!==s){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}i.isRequired=i;function a(){return i}var r={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:e};return r.PropTypes=r,r},ji}var Cr;function yh(){if(Cr)return Vt.exports;if(Cr=1,process.env.NODE_ENV!=="production"){var s=js(),e=!0;Vt.exports=vh()(s.isElement,e)}else Vt.exports=bh()();return Vt.exports}var Pr;function wh(){return Pr||(Pr=1,function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=w;var e=o(se),t=r(gh),i=r(yh()),a=["type","width","height","series","options","chartRef"];function r(y){return y&&y.__esModule?y:{default:y}}function n(y){var b,A;return typeof WeakMap!="function"?null:(b=new WeakMap,A=new WeakMap,(n=function(k){return k?A:b})(y))}function o(y,b){if(!b&&y&&y.__esModule)return y;if(y===null||d(y)!="object"&&typeof y!="function")return{default:y};if(b=n(b),b&&b.has(y))return b.get(y);var A,k,S={__proto__:null},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(A in y)A!=="default"&&{}.hasOwnProperty.call(y,A)&&((k=P?Object.getOwnPropertyDescriptor(y,A):null)&&(k.get||k.set)?Object.defineProperty(S,A,k):S[A]=y[A]);return S.default=y,b&&b.set(y,S),S}function l(){return(l=Object.assign?Object.assign.bind():function(y){for(var b=1;b<arguments.length;b++){var A,k=arguments[b];for(A in k)!{}.hasOwnProperty.call(k,A)||(y[A]=k[A])}return y}).apply(null,arguments)}function c(y,b){if(y==null)return{};var A,k=h(y,b);if(Object.getOwnPropertySymbols)for(var S=Object.getOwnPropertySymbols(y),P=0;P<S.length;P++)A=S[P],b.includes(A)||{}.propertyIsEnumerable.call(y,A)&&(k[A]=y[A]);return k}function h(y,b){if(y==null)return{};var A,k={};for(A in y)if({}.hasOwnProperty.call(y,A)){if(b.includes(A))continue;k[A]=y[A]}return k}function d(y){return(d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(y)}function u(y,b){var A,k=Object.keys(y);return Object.getOwnPropertySymbols&&(A=Object.getOwnPropertySymbols(y),b&&(A=A.filter(function(S){return Object.getOwnPropertyDescriptor(y,S).enumerable})),k.push.apply(k,A)),k}function g(y){for(var b=1;b<arguments.length;b++){var A=arguments[b]!=null?arguments[b]:{};b%2?u(Object(A),!0).forEach(function(k){p(y,k,A[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(A)):u(Object(A)).forEach(function(k){Object.defineProperty(y,k,Object.getOwnPropertyDescriptor(A,k))})}return y}function p(y,b,A){return(b=f(b))in y?Object.defineProperty(y,b,{value:A,enumerable:!0,configurable:!0,writable:!0}):y[b]=A,y}function f(y){return y=x(y,"string"),d(y)=="symbol"?y:y+""}function x(y,b){if(d(y)!="object"||!y)return y;var A=y[Symbol.toPrimitive];if(A===void 0)return(b==="string"?String:Number)(y);if(A=A.call(y,b),d(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}function m(y,b){var A=g({},y);return b.forEach(function(k){delete A[k]}),A}function v(y,b){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:new WeakSet;if(y!==b){if(d(y)!=="object"||y===null||d(b)!=="object"||b===null)return!1;if(!A.has(y)&&!A.has(b)){A.add(y),A.add(b);var k=Object.keys(y),S=Object.keys(b);if(k.length!==S.length)return!1;for(var P=0,L=k;P<L.length;P++){var I=L[P];if(!S.includes(I)||!v(y[I],b[I],A))return!1}}}return!0}function w(I){function b(B){return B&&d(B)==="object"&&!Array.isArray(B)}var _=I.type,A=_===void 0?"line":_,_=I.width,k=_===void 0?"100%":_,_=I.height,S=_===void 0?"auto":_,P=I.series,L=I.options,_=I.chartRef,I=c(I,a),E=(0,e.useRef)(null),O=_||(0,e.useRef)(null),R=(0,e.useRef)(),D=((0,e.useEffect)(function(){R.current=L;var B=E.current;return O.current=new t.default(B,D()),O.current.render(),function(){O.current&&typeof O.current.destroy=="function"&&O.current.destroy()}},[]),(0,e.useEffect)(function(){var B=!v(O.current.w.config.series,P),q=!v(R.current,L)||S!==O.current.opts.chart.height||k!==O.current.opts.chart.width;(B||q)&&(!B||q?O.current.updateOptions(D()):O.current.updateSeries(P)),R.current=L},[L,P,S,k]),function(){return Y(L,{chart:{type:A,height:S,width:k},series:P})}),Y=function(B,q){var z=g({},B);return b(B)&&b(q)&&Object.keys(q).forEach(function(F){b(q[F])&&F in B?z[F]=Y(B[F],q[F]):Object.assign(z,p({},F,q[F]))}),z},_=m(I,Object.keys(w.propTypes));return e.default.createElement("div",l({ref:E},_))}w.propTypes={type:i.default.string.isRequired,series:i.default.array.isRequired,options:i.default.object.isRequired,width:i.default.oneOfType([i.default.string,i.default.number]),height:i.default.oneOfType([i.default.string,i.default.number]),chartRef:i.default.shape({current:i.default.any})}}(yi)),yi}var kh=wh();const Ta=C.getDefaultExportFromCjs(kh),Ah=["#e24b33","#e2b23a","#6feff0","#2f5be8"],Sh=({categories:s,series:e,height:t=350,title:i="Admissions",draggable:a=!1})=>{const r=Math.max(...s.map((c,h)=>e.reduce((d,u)=>d+(u.data[h]??0),0))),n=Math.max(100,Math.ceil(r/50)*50),o={chart:{foreColor:"var(--color-text)",type:"area",stacked:!0,stackType:"normal",toolbar:{show:!1},zoom:{enabled:!1},animations:{enabled:!0},fontFamily:"Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial"},title:{text:i,align:"center",style:{fontSize:"36px",fontWeight:700,color:"#555"}},colors:Ah,dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1.5},fill:{type:"solid",opacity:.95},markers:{size:0},legend:{show:!0,position:"top",horizontalAlign:"center",itemMargin:{horizontal:8,vertical:0}},xaxis:{categories:s,labels:{rotate:-45,rotateAlways:!0,style:{fontSize:"12px"}},tickPlacement:"on"},yaxis:{min:0,max:n,tickAmount:7,labels:{formatter:c=>String(Math.round(Number(c)))}},grid:{borderColor:"#e9e9e9",strokeDashArray:0},tooltip:{shared:!0,intersect:!1,y:{formatter:c=>String(c)}},responsive:[{breakpoint:768,options:{chart:{height:Math.max(240,Math.round(t*.7))},legend:{position:"top"},xaxis:{labels:{rotate:-45}}}}]},l=e.map(c=>({name:c.name,type:"area",data:c.data}));return X.jsxs("div",{style:{position:"relative",height:t,width:"100%",overflow:"hidden"},children:[X.jsx("div",{style:{opacity:a?0:1,transition:"opacity 0.2s ease-in-out"},children:X.jsx(Ta,{options:o,series:l,type:"area",height:t,width:"100%"})}),a&&X.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.6)",borderRadius:12,backdropFilter:"blur(3px)",pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},children:X.jsx(C.Move,{size:38,strokeWidth:1.5,style:{opacity:.85}})})]})},Lr={color:"#4f9db5",sort:"desc",height:520,showGrid:!0,showLegend:!1},Ch=({data:s,config:e=Lr,draggable:t=!1})=>{const i={...Lr,...e},a=s.labels??[],r=s.values??[],n=Math.min(a.length,r.length),o=[];for(let u=0;u<n;u++)o.push({label:a[u],value:r[u]});i.sort==="desc"?o.sort((u,g)=>g.value-u.value):i.sort==="asc"&&o.sort((u,g)=>u.value-g.value);const l=o.map(u=>u.label),h=[{name:"Valeur",data:o.map(u=>u.value)}],d={chart:{foreColor:"var(--color-text)",type:"bar",toolbar:{show:!1},height:i.height},plotOptions:{bar:{horizontal:!0,barHeight:"60%",distributed:!1,borderRadius:6,borderRadiusApplication:"end"}},dataLabels:{enabled:!1,formatter:u=>String(u),style:{fontSize:"12px"},offsetX:0},yaxis:{labels:{style:{fontSize:"12px"}}},grid:{show:!!i.showGrid,borderColor:"#e6e6e6"},tooltip:{shared:!1,y:{formatter:u=>String(u)}},legend:{show:!!i.showLegend},colors:[i.color],xaxis:{min:0,tickAmount:5,categories:l,labels:{formatter:u=>String(u)}},responsive:[]};return X.jsxs("div",{style:{position:"relative",height:i.height,width:"100%",overflow:"hidden"},children:[X.jsx("div",{style:{opacity:t?0:1,transition:"opacity 0.15s ease-in-out"},children:X.jsx(Ta,{options:d,series:h,type:"bar",height:i.height,width:"100%"})}),t&&X.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.5)",borderRadius:12,backdropFilter:"blur(3px)",pointerEvents:"none",transition:"opacity 0.15s ease-in-out"},children:X.jsx(C.Move,{size:36,strokeWidth:1.5,style:{opacity:.85}})})]})},Ir={colorUpper:"#2db85bff",colorLower:"#b3761bff",showOutliers:!0,tooltipFormatter:s=>String(s),height:420,responsive:!0,fontSize:"12px",fontWeight:"400",columnWidth:"70%"},Ph=({data:s,config:e=Ir})=>{const t={...Ir,...e},a=[{name:"Distribution",data:(Array.isArray(s?.series)?s.series:[]).map(n=>({x:n.x,y:n.y}))}],r={chart:{foreColor:"var(--color-text)",type:"boxPlot",toolbar:{show:!1},height:t.height},yaxis:{tickAmount:10,labels:{formatter:function(n){return n.toFixed(0)}}},plotOptions:{boxPlot:{columnWidth:t.columnWidth,colors:{upper:t.colorUpper,lower:t.colorLower}}},xaxis:{labels:{rotate:-45,rotateAlways:!0,style:{fontSize:t.fontSize,fontWeight:t.fontWeight}}},stroke:{show:!0,width:1,colors:[t.colorStroke??"var(--color-secondary)"]},markers:{size:0},tooltip:{shared:!1,theme:"dark",custom:function({seriesIndex:n,dataPointIndex:o,w:l}){const c=l.globals.initialSeries[n].data[o].y;return!c||c.length!==5?"":['<div style="padding:10px 14px;font-family:sans-serif;font-size:13px;line-height:1.9;">',`<div>max : <b>${c[4]}</b></div>`,`<div>q1 : <b>${c[3]}</b></div>`,`<div>median : <b>${c[2]}</b></div>`,`<div>q3 : <b>${c[1]}</b></div>`,`<div>min : <b>${c[0]}</b></div>`,"</div>"].join("")}},grid:{borderColor:"#e6e6e6"},dataLabels:{enabled:!1},legend:{show:!1,fontSize:t.fontSize,fontWeight:t.fontWeight},responsive:t.responsive?[]:void 0};return X.jsx(Ta,{options:r,series:a,type:"boxPlot",height:t.height})},Lh=({active:s,payload:e,label:t,realColor:i="#D9D9D9",predictionColor:a="#22D3EE",lowerAnomalyColor:r="#C497FF80",upperAnomalyColor:n="#A27DD5",texts:o={max:"Max",min:"Min",predictions:"Prédictions",anomaly:"Anomalie",real:"Réel"}})=>{if(!s||!e||!e.length)return null;const l=e[0].payload;return l?X.jsxs("div",{style:{backgroundColor:"#0B1220",color:"#FFFFFF",padding:"10px 12px",borderRadius:8,fontSize:12,lineHeight:1.4,minWidth:150,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[X.jsx("div",{style:{fontWeight:600,marginBottom:6},children:t}),l.max!=null&&X.jsxs("div",{children:[o.max," : ",l.max]}),l.min!=null&&X.jsxs("div",{children:[o.min," : ",l.min]}),l.pred!=null&&X.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:6},children:[X.jsx("span",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:a,marginRight:6}}),X.jsxs("span",{children:[o.predictions," : ",l.pred]})]}),l.anomaly&&X.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:4},children:[X.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:l.anomaly==="Haute"?n:r,marginRight:6}}),X.jsx("span",{children:o.anomaly})]}),l.reel!=null&&!l.isPrediction&&X.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:4},children:[X.jsx("span",{style:{width:10,height:10,backgroundColor:i,marginRight:6}}),X.jsxs("span",{children:[o.real," : ",l.reel]})]})]}):null},Ih=({onGoingColor:s,realColor:e,upperAnomalyColor:t,lowerAnomalyColor:i,predictionColor:a,textColor:r="#9CA3AF",fontSize:n="12px",fontWeight:o="400",legendTexts:l={onGoing:"En cours",real:"Réel",predictions:"Prédictions Correctes",upperAnomaly:"Anomalie Haute",lowerAnomaly:"Anomalie Basse"},disabledSeries:c,onToggle:h})=>{const d=u=>({display:"flex",alignItems:"center",cursor:"pointer",opacity:c.includes(u)?.3:1,transition:"opacity 0.2s"});return X.jsxs("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap",gap:"20px",marginBottom:"15px",color:r,fontSize:n,fontWeight:o},children:[X.jsxs("div",{style:d("onGoing"),onClick:()=>h("onGoing"),children:[X.jsx("span",{style:{width:15,height:10,backgroundColor:s,marginRight:"5px"}}),l.onGoing]}),X.jsxs("div",{style:d("real"),onClick:()=>h("real"),children:[X.jsx("span",{style:{width:15,height:10,backgroundColor:e,marginRight:"5px"}}),l.real]}),X.jsxs("div",{style:d("predictions"),onClick:()=>h("predictions"),children:[X.jsx("span",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:a,marginRight:"5px"}}),l.predictions]}),X.jsxs("div",{style:d("upperAnomaly"),onClick:()=>h("upperAnomaly"),children:[X.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:t,marginRight:"5px"}}),l.upperAnomaly]}),X.jsxs("div",{style:d("lowerAnomaly"),onClick:()=>h("lowerAnomaly"),children:[X.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:i,marginRight:"5px"}}),l.lowerAnomaly]})]})},Mh=({data:s,config:e,height:t=220,useOnGoing:i,draggable:a=!1,tooltipEnabled:r=!0,disableLegendFilter:n=!1,backgroundColor:o="#ffffff",lowerAnomalyColor:l="#D8B4FE",lowerAnomalyScatterColor:c="#C497FF",upperAnomalyColor:h="#A855F7",upperAnomalyScatterColor:d="#7C46C3",realColor:u="#D9D9D9",onGoingColor:g="#727688",predictionColor:p="#22D3EE",predictionBarColor:f="#22D3EE",textColor:x="#9CA3AF",fontSize:m="8px",fontWeight:v="400",lineColor:w="#F4F4F4",predictionWindow:y=0,legendTexts:b,tooltipTexts:A,yAxisWidth:k=20,tickCount:S=7,padding:P})=>{const L=se.useRef(null),[I,E]=se.useState(50),[O,R]=se.useState([]),D=U=>{n||R(N=>N.includes(U)?N.filter($=>$!==U):[...N,U])};if(se.useLayoutEffect(()=>{const U=()=>{if(L.current){const N=L.current.getBoundingClientRect().width,$=s.labels?.length||1,te=(N-k-30-$*2)/$;E(Math.max(te,14))}};return U(),window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[s.labels,k]),e?.displayCondition&&!e.displayCondition(s))return X.jsx("div",{style:{padding:12},children:"Chart hidden by displayCondition"});const Y=s.labels||[];if(!Y.length)return X.jsx("div",{style:{padding:12},children:"Pas de labels fournis"});const B=s[e?.histogramKey??"histogram"],q=Y.map((U,N)=>{const $=s.main[N];let W=s.upper[N],G=s.lower[N];(W==null&&G!=null||W!=null&&G==null)&&(W=W??0,G=G??0);const ee=i&&typeof s.onGoingIndex=="number"&&N>s.onGoingIndex&&N<s.onGoingIndex+y,te=ee?$??null:B?.[N]??null,ae=W,he=G;let K;!ee&&te!=null&&W!=null&&G!=null&&(te>W?K="Haute":te<G&&(K="Basse"));let de=null,ke=null;if(y>0&&i&&typeof s.onGoingIndex=="number"&&N===s.onGoingIndex)if(te==null&&$==null)de=null,ke=null;else{const je=te??0,Bt=$??0;je<=Bt?(de=je,ke=Bt-je):(de=Bt,ke=je-Bt)}else de=te??null,ke=null;return{time:U,reel:te,pred:$,realPart:de,predPart:ke,range:[G,W],max:ae,min:he,anomaly:K,isPrediction:ee}});function z(U,N){return i&&s.onGoingIndex===N?O.includes("onGoing")?"transparent":g:i&&typeof s.onGoingIndex=="number"&&N>s.onGoingIndex&&N<s.onGoingIndex+y?O.includes("predictions")?"transparent":f:U.anomaly?U.anomaly==="Haute"&&O.includes("upperAnomaly")||U.anomaly==="Basse"&&O.includes("lowerAnomaly")?"transparent":U.anomaly==="Haute"?h:l:O.includes("real")?"transparent":u}const F=typeof t=="string",Z=X.jsxs(Kr,{data:q,margin:{top:20,right:30,left:0,bottom:0},barGap:0,children:[X.jsx(C.CartesianGrid,{strokeDasharray:"0",vertical:!1,stroke:w}),X.jsx(C.XAxis,{dataKey:"time",stroke:x,axisLine:!1,tickLine:!1,tick:{fontSize:m,fontWeight:v}}),X.jsx(C.YAxis,{stroke:x,axisLine:!1,tickLine:!1,tickCount:S,tick:{fontSize:m,fontWeight:v},width:k,allowDecimals:!1}),r&&X.jsx(C.Tooltip,{content:X.jsx(Lh,{realColor:u,predictionColor:p,upperAnomalyColor:d,lowerAnomalyColor:c,texts:A}),cursor:{fill:"transparent"}}),X.jsx(xa,{type:"monotone",dataKey:"range",fill:"rgba(0, 143, 187, 1)",stroke:"none",fillOpacity:"16%",zIndex:999,hide:O.includes("predictions")}),X.jsx(C.Bar,{dataKey:"realPart",stackId:"a",barSize:I,radius:2,children:q.map((U,N)=>{let $;if(y>0&&i&&typeof s.onGoingIndex=="number"&&N===s.onGoingIndex){const W=U.reel??0,G=U.pred??0;W<=G?$=O.includes("onGoing")?"transparent":g:$=O.includes("predictions")?"transparent":f}else $=z(U,N);return X.jsx(C.Cell,{fill:$},`cell-${N}`)})}),X.jsx(C.Bar,{dataKey:"predPart",stackId:"a",barSize:I,radius:2,children:q.map((U,N)=>{if(!(y>0&&N===s.onGoingIndex))return X.jsx(C.Cell,{fill:"none"},`cell-pred-${N}`);const $=U.reel??0,W=U.pred??0;let G;return $<=W?G=O.includes("predictions")?"transparent":f:G=O.includes("onGoing")?"transparent":g,X.jsx(C.Cell,{fill:G},`cell-pred-${N}`)})}),X.jsx(Yr,{type:"monotone",dataKey:"pred",stroke:p,strokeDasharray:"5 5",strokeWidth:2,dot:!1,hide:O.includes("predictions")}),X.jsx($i,{dataKey:"reel",shape:U=>{const{cx:N,cy:$,payload:W}=U;if(N===void 0||$===void 0)return X.jsx("g",{});if(W?.reel==null)return X.jsx("g",{});if(i&&typeof s.onGoingIndex=="number"&&W&&s.labels.indexOf(W.time)===s.onGoingIndex)return X.jsx("g",{});const G=!!W?.anomaly,ee=!W?.min||!W?.max?!1:W.reel<=W?.max&&W.reel>=W?.min;let te=!1;return ee&&!O.includes("predictions")?te=!0:G&&(W.anomaly==="Haute"&&!O.includes("upperAnomaly")&&(te=!0),W.anomaly==="Basse"&&!O.includes("lowerAnomaly")&&(te=!0)),te?X.jsx("circle",{cx:N-.5,cy:$,r:4,fill:p,stroke:"#fff",strokeWidth:"2"}):X.jsx("g",{})}}),X.jsx($i,{dataKey:"reel",shape:U=>{const{cx:N,cy:$,payload:W}=U;if(i&&typeof s.onGoingIndex=="number"&&W&&s.labels.indexOf(W.time)===s.onGoingIndex)return X.jsx("g",{});if(!W?.anomaly||N===void 0||$===void 0)return X.jsx("g",{});if(W?.reel==null)return X.jsx("g",{});if(W.anomaly==="Haute"&&O.includes("upperAnomaly"))return X.jsx("g",{});if(W.anomaly==="Basse"&&O.includes("lowerAnomaly"))return X.jsx("g",{});const G=W.anomaly==="Haute"?d:c;return X.jsx("svg",{x:N-5.5,y:$-5,width:10,height:10,viewBox:"0 0 100 100",children:X.jsx("path",{d:"M50 0 L100 50 L50 100 L0 50 Z",fill:G,stroke:"#fff",strokeWidth:"9"})})}})]});return X.jsxs("div",{ref:L,style:{width:"100%",padding:P,backgroundColor:o,borderRadius:"12px"},children:[F?X.jsx("div",{style:{height:t},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:"100%",children:Z})}):X.jsx(C.ResponsiveContainer,{width:"100%",height:t,children:Z}),!n&&X.jsx(Ih,{onGoingColor:g,realColor:u,upperAnomalyColor:d,lowerAnomalyColor:c,predictionColor:p,textColor:x,fontSize:m,fontWeight:v,legendTexts:b,disabledSeries:O,onToggle:D})]})},Eh=s=>{const{x:e,y:t,payload:i,fontSize:a,fontWeight:r}=s,{value:n}=i;if(n&&n.includes(`
|
|
964
964
|
`)){const o=n.split(`
|
|
965
|
-
`);return X.jsx("g",{transform:`translate(${e},${t})`,children:X.jsxs("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:[X.jsx("tspan",{x:0,dy:"0em",children:o[0]}),X.jsx("tspan",{x:0,dy:"1.2em",children:o[1]})]})})}return X.jsx("text",{x:e,y:t,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:n})},Oh=({data:s,height:e=320,tooltipEnabled:t=!0,legendEnabled:i=!0,backgroundColor:a="#ffffff",stacked:r=!0,fontSize:n="12px",fontWeight:o="400",yDomain:l})=>{const c=s.labels.map((g,p)=>{const f={label:g};return s.series.forEach(x=>{f[x.key]=x.data[p]??0}),f}),h=new Map(s.series.map((g,p)=>[g.key,p])),d=g=>{const p=(g.payload??[]).map(f=>({...f}));return p.sort((f,x)=>{const m=h.get(f.dataKey)??999,v=h.get(x.dataKey)??999;return m-v}),X.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:8,gap:16,flexWrap:"wrap"},children:p.map(f=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[X.jsx("div",{style:{width:12,height:12,backgroundColor:f.color,borderRadius:2}}),X.jsx("span",{style:{fontSize:n,fontWeight:o,color:"#374151"},children:f.value})]},f.value))})},u=se.useMemo(()=>{const g=s.labels.length;if(g<=0)return[];if(g<=12)return s.labels;const p=5,f=(g-1)/(p-1),x=[];for(let m=0;m<p;m++)x.push(s.labels[Math.round(m*f)]);return Array.from(new Set(x))},[s.labels]);return X.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:a},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:e,children:X.jsxs(Kr,{data:c,margin:{left:20,right:45,top:10,bottom:20},children:[X.jsx(C.CartesianGrid,{stroke:"#E5E7EB",vertical:!1}),X.jsx(C.XAxis,{fontSize:n,fontWeight:o,dataKey:"label",axisLine:!1,tickLine:!1,tickMargin:10,interval:0,ticks:u,scale:"point",height:45,tick:X.jsx(Eh,{fontSize:n,fontWeight:o})}),X.jsx(C.YAxis,{fontSize:n,fontWeight:o,axisLine:!1,tickLine:!1,width:30,domain:l}),t&&X.jsx(C.Tooltip,{itemSorter:g=>h.get(g.dataKey)??999}),i&&X.jsx(li,{content:d}),s.series.map(g=>X.jsx(xa,{type:"monotone",dataKey:g.key,stackId:r?"1":void 0,fill:g.color,stroke:"none",fillOpacity:1,name:g.label},g.key))]})})})},Th=s=>{const{x:e,y:t,width:i,height:a,index:r,payload:n,fontSize:o,fontWeight:l}=s;if(isNaN(e)||isNaN(t))return null;const c=e<200,h=
|
|
965
|
+
`);return X.jsx("g",{transform:`translate(${e},${t})`,children:X.jsxs("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:[X.jsx("tspan",{x:0,dy:"0em",children:o[0]}),X.jsx("tspan",{x:0,dy:"1.2em",children:o[1]})]})})}return X.jsx("text",{x:e,y:t,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:n})},Oh=({data:s,height:e=320,tooltipEnabled:t=!0,legendEnabled:i=!0,backgroundColor:a="#ffffff",stacked:r=!0,fontSize:n="12px",fontWeight:o="400",yDomain:l})=>{const c=s.labels.map((g,p)=>{const f={label:g};return s.series.forEach(x=>{f[x.key]=x.data[p]??0}),f}),h=new Map(s.series.map((g,p)=>[g.key,p])),d=g=>{const p=(g.payload??[]).map(f=>({...f}));return p.sort((f,x)=>{const m=h.get(f.dataKey)??999,v=h.get(x.dataKey)??999;return m-v}),X.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:8,gap:16,flexWrap:"wrap"},children:p.map(f=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[X.jsx("div",{style:{width:12,height:12,backgroundColor:f.color,borderRadius:2}}),X.jsx("span",{style:{fontSize:n,fontWeight:o,color:"#374151"},children:f.value})]},f.value))})},u=se.useMemo(()=>{const g=s.labels.length;if(g<=0)return[];if(g<=12)return s.labels;const p=5,f=(g-1)/(p-1),x=[];for(let m=0;m<p;m++)x.push(s.labels[Math.round(m*f)]);return Array.from(new Set(x))},[s.labels]);return X.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:a},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:e,children:X.jsxs(Kr,{data:c,margin:{left:20,right:45,top:10,bottom:20},children:[X.jsx(C.CartesianGrid,{stroke:"#E5E7EB",vertical:!1}),X.jsx(C.XAxis,{fontSize:n,fontWeight:o,dataKey:"label",axisLine:!1,tickLine:!1,tickMargin:10,interval:0,ticks:u,scale:"point",height:45,tick:X.jsx(Eh,{fontSize:n,fontWeight:o})}),X.jsx(C.YAxis,{fontSize:n,fontWeight:o,axisLine:!1,tickLine:!1,width:30,domain:l}),t&&X.jsx(C.Tooltip,{itemSorter:g=>h.get(g.dataKey)??999}),i&&X.jsx(li,{content:d}),s.series.map(g=>X.jsx(xa,{type:"monotone",dataKey:g.key,stackId:r?"1":void 0,fill:g.color,stroke:"none",fillOpacity:1,name:g.label},g.key))]})})})},Th=s=>{const{x:e,y:t,width:i,height:a,index:r,payload:n,fontSize:o,fontWeight:l}=s;if(isNaN(e)||isNaN(t))return null;const c=e<200,h=140;return X.jsxs(C.Layer,{children:[X.jsx(C.Rectangle,{x:e,y:t,width:i,height:a,fill:n.fill}),X.jsx("foreignObject",{x:c?e-h-8:e+i+8,y:t+a/2-25,width:h,height:50,style:{overflow:"visible"},children:X.jsx("div",{style:{fontSize:o||"11px",fontWeight:l||"400",color:"#94a3b8",lineHeight:"1.2",wordBreak:"break-word",display:"flex",alignItems:"center",justifyContent:c?"flex-end":"flex-start",textAlign:c?"right":"left",height:"100%",pointerEvents:"none"},children:n.name})})]},`node-${r}`)},Rh=s=>{const{sourceX:e,sourceY:t,targetX:i,targetY:a,linkWidth:r,index:n,payload:o,uid:l}=s;if(e==null||t==null||i==null||a==null||r==null)return null;const c=`
|
|
966
966
|
M${e},${t}
|
|
967
967
|
C${(e+i)/2},${t}
|
|
968
968
|
${(e+i)/2},${a}
|
|
969
969
|
${i},${a}
|
|
970
|
-
`,h=o?.source?.fill??"#3b82f6",d=o?.target?.fill??"#ef4444",u=`sankey-gradient-${l}-${n}`;return X.jsxs(C.Layer,{children:[X.jsx("defs",{children:X.jsxs("linearGradient",{id:u,gradientUnits:"userSpaceOnUse",x1:e,x2:i,children:[X.jsx("stop",{offset:"0%",stopColor:h,stopOpacity:.2}),X.jsx("stop",{offset:"100%",stopColor:d,stopOpacity:.2})]})}),X.jsx("path",{d:c,fill:"none",stroke:`url(#${u})`,strokeWidth:Math.max(r,1),style:{transition:"all 0.4s ease"}})]})},zh=({data:s,height:e=600,nodePadding:t=30,showTooltip:i=!0,backgroundColor:a="#ffffff",fontSize:r="12px",fontWeight:n="400"})=>{const o=se.useId().replace(/:/g,""),l=se.useMemo(()=>({nodes:s.nodes.map(c=>({...c})),links:s.links.map(c=>({...c}))}),[s]);return X.jsx("div",{style:{width:"100%",height:e,backgroundColor:a,display:"flex",justifyContent:"center",alignItems:"center"},children:X.jsx("div",{style:{width:"100%",maxWidth:1200,height:"100%"},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:"100%",children:X.jsx(Zr,{data:l,node:X.jsx(Th,{}),link:X.jsx(Rh,{uid:o}),nodePadding:t,fontSize:r,fontWeight:n,margin:{left:
|
|
970
|
+
`,h=o?.source?.fill??"#3b82f6",d=o?.target?.fill??"#ef4444",u=`sankey-gradient-${l}-${n}`;return X.jsxs(C.Layer,{children:[X.jsx("defs",{children:X.jsxs("linearGradient",{id:u,gradientUnits:"userSpaceOnUse",x1:e,x2:i,children:[X.jsx("stop",{offset:"0%",stopColor:h,stopOpacity:.2}),X.jsx("stop",{offset:"100%",stopColor:d,stopOpacity:.2})]})}),X.jsx("path",{d:c,fill:"none",stroke:`url(#${u})`,strokeWidth:Math.max(r,1),style:{transition:"all 0.4s ease"}})]})},zh=({data:s,height:e=600,nodePadding:t=30,showTooltip:i=!0,backgroundColor:a="#ffffff",fontSize:r="12px",fontWeight:n="400"})=>{const o=se.useId().replace(/:/g,""),l=se.useMemo(()=>({nodes:s.nodes.map(c=>({...c})),links:s.links.map(c=>({...c}))}),[s]);return X.jsx("div",{style:{width:"100%",height:e,backgroundColor:a,display:"flex",justifyContent:"center",alignItems:"center"},children:X.jsx("div",{style:{width:"100%",maxWidth:1200,height:"100%"},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:"100%",children:X.jsx(Zr,{data:l,node:X.jsx(Th,{}),link:X.jsx(Rh,{uid:o}),sort:!1,nodePadding:t,fontSize:r,fontWeight:n,margin:{left:150,right:170,top:20,bottom:20},children:i&&X.jsx(C.Tooltip,{})})})})})},Dh=({data:s,colors:e,legendEnabled:t=!0,tooltipEnabled:i=!0,tooltipBackgroundColor:a="rgba(0, 0, 0, 0.8)",height:r=300,legendFontSize:n="12px",legendFontWeight:o="400",legendColor:l="#000"})=>{const[c,h]=se.useState(null),d=new Map(s.map((g,p)=>[g.name,p])),u=g=>{const p=(g.payload??[]).map(f=>({...f}));return p.sort((f,x)=>{const m=d.get(f.value)??999,v=d.get(x.value)??999;return m-v}),X.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:8,gap:16,flexWrap:"wrap"},children:p.map(f=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[X.jsx("div",{style:{width:12,height:12,backgroundColor:f.color,borderRadius:2}}),X.jsx("span",{style:{fontSize:n,fontWeight:o,color:l},children:f.value})]},Math.random()))})};return X.jsx(C.ResponsiveContainer,{width:"100%",height:r,children:X.jsxs(C.PieChart,{children:[X.jsx(C.Pie,{data:s,dataKey:"value",cx:"50%",cy:"45%",stroke:"none",outerRadius:100,innerRadius:0,paddingAngle:0,onMouseEnter:(g,p)=>h(p),onMouseLeave:()=>h(null),children:s.map((g,p)=>X.jsx(C.Cell,{fill:e[p%e.length],opacity:c===null||c===p?1:.5,style:{transition:"opacity 0.2s ease",cursor:"pointer"}},`cell-${p}`))}),i&&X.jsx(C.Tooltip,{content:({active:g,payload:p})=>{if(g&&p&&p.length){const f=p[0],x=f.payload.fill||f.color;return X.jsxs("div",{style:{backgroundColor:a,border:"none",borderRadius:4,padding:"8px 12px",color:x,fontSize:"12px",boxShadow:"0 2px 10px rgba(0,0,0,0.5)",display:"flex",alignItems:"center",gap:8},children:[X.jsx("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:x}}),X.jsx("span",{style:{fontWeight:"bold"},children:f.name}),X.jsx("span",{children:":"}),X.jsx("span",{style:{fontWeight:"500"},children:f.value})]})}return null}}),t&&X.jsx(li,{content:u})]})})},Xh=({data:s,series:e,height:t=350,tooltipEnabled:i=!0,legendEnabled:a=!0,barSize:r=15,radius:n=2,yAxisWidth:o=35,yDomain:l,reverseStack:c=!1})=>{const h=d=>{const{payload:u}=d;if(!u||u.length===0)return null;const g=[...u].sort((p,f)=>{const x=e.findIndex(v=>v.name===p.value||v.key===p.dataKey),m=e.findIndex(v=>v.name===f.value||v.key===f.dataKey);return x-m});return X.jsx("div",{style:{display:"flex",justifyContent:"center",gap:"20px",marginTop:"20px",flexWrap:"wrap"},children:g.map((p,f)=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[X.jsx("div",{style:{width:"12px",height:"12px",backgroundColor:p.color,borderRadius:"2px"}}),X.jsx("span",{style:{fontSize:"12px",color:"#666"},children:p.value})]},`item-${f}`))})};return X.jsx("div",{style:{width:"100%",height:t},children:X.jsx(C.ResponsiveContainer,{width:"100%",height:"100%",children:X.jsxs(C.BarChart,{data:s,margin:{top:20,right:0,left:0,bottom:0},children:[X.jsx(C.CartesianGrid,{strokeDasharray:"0",vertical:!1,stroke:"#f1f5f9"}),X.jsx(C.XAxis,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#64748b"},dy:10}),X.jsx(C.YAxis,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#64748b"},width:o,domain:l}),i&&X.jsx(C.Tooltip,{cursor:{fill:"#f1f5f9",opacity:.4},contentStyle:{backgroundColor:"#ffffff",border:"1px solid #f1f5f9",borderRadius:"8px",padding:"10px",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1)"},labelStyle:{color:"#1e293b",fontWeight:"bold",marginBottom:"5px",fontSize:"14px"},itemStyle:{fontSize:"12px",padding:"2px 0"},itemSorter:d=>-e.findIndex(g=>g.name===d.name)}),a&&X.jsx(li,{content:h}),(()=>{const d=c?[...e].reverse():e;return d.map((u,g)=>{const p=g===d.length-1;return X.jsx(C.Bar,{dataKey:u.key,name:u.name,stackId:"a",fill:u.color,barSize:r,radius:p?[n,n,0,0]:0},u.key)})})()]})})})};exports.PeriodRange=C.PeriodRange;exports.SimpleBarChart=C.SimpleBarChart;exports.Area=Sh;exports.AreaChartV2=Oh;exports.BoxPlotChart=Ph;exports.ChartV2=Mh;exports.HorizontalBarChart=Ch;exports.PieChartV2=Dh;exports.SankeyChartV2=zh;exports.StackedBarChartV2=Xh;
|
package/dist/chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as pe, jsx as N } from "react/jsx-runtime";
|
|
2
|
-
import { r as Je, i as Ot, j as Es, k as Os, l as Ts, u as Tt, s as xo, m as mo, n as vo, o as bo, p as Rs, q as zs, t as Xi, v as yo, w as Tr, x as wo, y as $e, z as Ds, A as Qe, D as Xs, E as ko, g as qa, F as Rt, G as $a, H as Ao, Z as zt,
|
|
3
|
-
import { h as ig, S as ag } from "./SimpleBarChart-
|
|
2
|
+
import { r as Je, i as Ot, j as Es, k as Os, l as Ts, u as Tt, s as xo, m as mo, n as vo, o as bo, p as Rs, q as zs, t as Xi, v as yo, w as Tr, x as wo, y as $e, z as Ds, A as Qe, D as Xs, E as ko, g as qa, F as Rt, G as $a, H as Ao, Z as zt, J as Ae, K as Ys, N as So, O as Ue, Q as si, U as et, V as ni, W as Dt, _ as Xt, $ as _s, a0 as Za, a1 as Ka, a2 as Ci, a3 as Ja, a4 as Yt, a5 as Yi, a6 as Qa, a7 as er, a8 as _t, a9 as _i, aa as tr, ab as ir, ac as Fs, ad as Hs, ae as ar, af as Ns, ag as Re, ah as Ct, ai as rr, aj as sr, ak as Ie, al as nr, am as or, an as Ws, ao as ka, ap as Co, aq as Po, ar as lr, as as cr, at as Lo, au as Io, av as Mo, aw as Eo, ax as Oo, ay as To, az as bi, aA as Pi, aB as Ro, aC as zo, aD as Do, f as Ut, aE as Xo, aF as Yo, aG as _o, aH as Fo, aI as Ho, aJ as No, aK as Wo, aL as Bo, aM as jo, aN as Go, aO as Vo, aP as Uo, aQ as qo, aR as $o, aS as Zo, aT as Rr, aU as Ko, aV as Bs, aW as js, aX as Gs, aY as Vs, aZ as Jo, a_ as Qo, a$ as el, M as Us, C as hr, X as dr, Y as ur, T as oi, b as Aa, R as Pt, P as tl, e as il, B as al } from "./SimpleBarChart-j02KrLhw.js";
|
|
3
|
+
import { h as ig, S as ag } from "./SimpleBarChart-j02KrLhw.js";
|
|
4
4
|
import * as O from "react";
|
|
5
5
|
import gr, { useEffect as qs, isValidElement as $s, cloneElement as Zs, Component as rl, useRef as Ze, useState as pt, useCallback as Ke, useMemo as Ft, PureComponent as sl, forwardRef as nl, useLayoutEffect as ol } from "react";
|
|
6
6
|
import { createPortal as ll } from "react-dom";
|
|
@@ -15710,7 +15710,7 @@ const Or = /* @__PURE__ */ qa(Du), Xu = ["#e24b33", "#e2b23a", "#6feff0", "#2f5b
|
|
|
15710
15710
|
}, Hu = (s) => {
|
|
15711
15711
|
const { x: e, y: t, width: i, height: a, index: r, payload: n, fontSize: o, fontWeight: l } = s;
|
|
15712
15712
|
if (isNaN(e) || isNaN(t)) return null;
|
|
15713
|
-
const c = e < 200, h =
|
|
15713
|
+
const c = e < 200, h = 140;
|
|
15714
15714
|
return /* @__PURE__ */ pe(Ae, { children: [
|
|
15715
15715
|
/* @__PURE__ */ N(Vs, { x: e, y: t, width: i, height: a, fill: n.fill }),
|
|
15716
15716
|
/* @__PURE__ */ N(
|
|
@@ -15802,10 +15802,11 @@ const Or = /* @__PURE__ */ qa(Du), Xu = ["#e24b33", "#e2b23a", "#6feff0", "#2f5b
|
|
|
15802
15802
|
data: l,
|
|
15803
15803
|
node: /* @__PURE__ */ N(Hu, {}),
|
|
15804
15804
|
link: /* @__PURE__ */ N(Nu, { uid: o }),
|
|
15805
|
+
sort: !1,
|
|
15805
15806
|
nodePadding: t,
|
|
15806
15807
|
fontSize: r,
|
|
15807
15808
|
fontWeight: n,
|
|
15808
|
-
margin: { left:
|
|
15809
|
+
margin: { left: 150, right: 170, top: 20, bottom: 20 },
|
|
15809
15810
|
children: i && /* @__PURE__ */ N(oi, {})
|
|
15810
15811
|
}
|
|
15811
15812
|
) }) })
|