@undp/data-viz 2.2.2 → 2.2.3
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +1 -1
- package/dist/Axis-D56Gy0se.js +31 -0
- package/dist/Axis-D56Gy0se.js.map +1 -0
- package/dist/Axis-Jt_tmhxS.cjs +2 -0
- package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +6 -0
- package/dist/BarGraph.js +1759 -1750
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +270 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +544 -542
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +332 -330
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +537 -536
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GraphEl-BZbunD1_.cjs +2 -0
- package/dist/GraphEl-BZbunD1_.cjs.map +1 -0
- package/dist/{GraphEl-DcNr5JzH.js → GraphEl-C1Rz1V__.js} +60 -51
- package/dist/GraphEl-C1Rz1V__.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +50 -49
- package/dist/Histogram.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +2 -0
- package/dist/WaterfallChart.js +263 -261
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/package.json +1 -1
- package/dist/Axis-DoOqnt6g.js +0 -32
- package/dist/Axis-DoOqnt6g.js.map +0 -1
- package/dist/Axis-Dtjn-EgM.cjs +0 -2
- package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
- package/dist/GraphEl-CAjJLOGk.cjs +0 -2
- package/dist/GraphEl-CAjJLOGk.cjs.map +0 -1
- package/dist/GraphEl-DcNr5JzH.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { n as fe } from "./numberFormattingFunction-14YCbkN2.js";
|
|
|
6
6
|
import { T as Oe } from "./Tooltip-BRnAz2Gv.js";
|
|
7
7
|
import { c as V } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { X as Se } from "./XTicksAndGridLines-CVZkZkpS.js";
|
|
9
|
-
import { A as ve } from "./Axis-
|
|
9
|
+
import { A as ve } from "./Axis-D56Gy0se.js";
|
|
10
10
|
import { A as je } from "./AxisTitle-VFq89Olw.js";
|
|
11
11
|
import { H as Te } from "./index-CSiFiXPj.js";
|
|
12
12
|
import { t as Ve } from "./time-CAtex-RV.js";
|
package/dist/DumbbellChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Re=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Me=require("./getSliderMarks-CIuSoedo.cjs"),$e=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ne=require("./Tooltip-BLa2EfMs.cjs"),qt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ve=require("./AxisTitle-DV4n0RxE.cjs"),Ge=require("./Axis-Dtjn-EgM.cjs"),Be=require("./XAxesLabels-C6o9jJal.cjs"),De=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Se=require("./ReferenceLine-M9aP3dj-.cjs"),Ye=require("./XTicksAndGridLines-CekrPykD.cjs"),Xe=require("./YAxesLabels-BQ2aCazV.cjs"),Te=require("./DetailsModal-DHttOA80.cjs"),qe=require("./linear-CgUCbw9F.cjs"),Fe=require("./band-VYfcZeJ2.cjs"),Tt=require("./proxy-C4-uo6nS.cjs"),Pe=require("./use-in-view-C3o_ntMv.cjs"),We=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Ie=require("./GraphContainer-B1EDxJ0S.cjs"),He=require("./GraphHeader.cjs"),Le=require("./index-C6er0ety.cjs"),Ue=require("./GraphFooter.cjs"),ze=require("./ColorLegendWithMouseOver.cjs"),Je=require("./EmptyState-CGeBqbmR.cjs"),Ke=require("./Colors.cjs");function Qe(e){const t=i.compilerRuntimeExports.c(146),{data:u,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:E,barPadding:Ft,showTicks:Mt,truncateBy:It,width:wt,height:jt,radius:ht,showLabels:At,tooltip:g,onSeriesMouseOver:at,maxValue:Lt,minValue:O,onSeriesMouseClick:ct,showValues:Zt,suffix:ft,prefix:q,selectedColor:F,arrowConnector:$,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:C,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:ut}=e,b=Jt===void 0?20:Jt,Gt=se===void 0?20:se,Bt=Kt===void 0?20:Kt,Dt=Qt===void 0?25:Qt,te=T.useRef(null);let Yt;t[0]!==p.amount||t[1]!==p.once?(Yt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Yt):Yt=t[2];const H=Pe.useInView(te,Yt),U=P?b+30:b;let Xt;t[3]!==Dt||t[4]!==Gt||t[5]!==U||t[6]!==Bt?(Xt={top:Bt,bottom:Dt,left:U,right:Gt},t[3]=Dt,t[4]=Gt,t[5]=U,t[6]=Bt,t[7]=Xt):Xt=t[7];const l=Xt,o=wt-l.left-l.right,rt=jt-l.top-l.bottom,[lt,Ht]=T.useState(void 0),[yt,gt]=T.useState(void 0),[Ut,Et]=T.useState(void 0),[Ot,zt]=T.useState(void 0);let Ct;if(t[8]!==u||t[9]!==y){const f=new Set,h=u.map((v,w)=>{const a=y?`${v.label}`:`${w}`;return f.add(a),{...v,id:a}}),I=y?y.filter(v=>!f.has(v)):[];let mt;t[11]!==u[0]?(mt=v=>({id:v,label:v,x:Array(u[0].x.length).fill(null)}),t[11]=u[0],t[12]=mt):mt=t[12],Ct=[...h,...I.map(mt)],t[8]=u,t[9]=y,t[10]=Ct}else Ct=t[10];const G=Ct;let j;t[13]!==G||t[14]!==y?(j=y??G.map(li),t[13]=G,t[14]=y,t[15]=j):j=t[15];const St=j;let bt,z,J,K,Q,Z,A,R,M,_,tt,et,k,N,V;if(t[16]!==p||t[17]!==$||t[18]!==P||t[19]!==St||t[20]!==Ft||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Pt||t[29]!==X||t[30]!==G||t[31]!==C||t[32]!==ut||t[33]!==E||t[34]!==rt||t[35]!==o||t[36]!==jt||t[37]!==W||t[38]!==H||t[39]!==b||t[40]!==l.bottom||t[41]!==l.left||t[42]!==l.right||t[43]!==l.top||t[44]!==kt||t[45]!==Lt||t[46]!==$t||t[47]!==O||t[48]!==yt||t[49]!==Wt||t[50]!==ct||t[51]!==at||t[52]!==m||t[53]!==q||t[54]!==ht||t[55]!==Vt||t[56]!==_t||t[57]!==F||t[58]!==At||t[59]!==Mt||t[60]!==Zt||t[61]!==s?.dataConnectors||t[62]!==s?.graphObjectValues||t[63]!==s?.xAxis?.axis||t[64]!==s?.xAxis?.labels||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==s?.yAxis?.title||t[68]!==ft||t[69]!==It||t[70]!==Nt||t[71]!==wt){const f=qe.linear().domain([O,Lt]).range([rt,0]).nice(),h=Fe.band().domain(St).range([0,$t?Math.max(o,$t*G.length):kt?Math.min(o,kt*G.length):o]).paddingInner(Ft),I=f.ticks(Wt);z=Tt.motion.svg,M=`${wt}px`,_=`${jt}px`,tt=`0 0 ${wt} ${jt}`,et="ltr",k=te,t[87]!==$?(N=$?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=$,t[88]=N):N=t[88],K=`translate(${l.left},${l.top})`;const mt=f(O<0?0:O),v=f(O<0?0:O),w=O<0?0:O;let a;t[89]!==m||t[90]!==q||t[91]!==ft||t[92]!==w?(a=Ce.numberFormattingFunction(w,"NA",m,q,ft),t[89]=m,t[90]=q,t[91]=ft,t[92]=w,t[93]=a):a=t[93];const pt=n?.xAxis?.axis,ie=n?.yAxis?.labels;let vt;t[94]!==pt||t[95]!==ie?(vt={axis:pt,label:ie},t[94]=pt,t[95]=ie,t[96]=vt):vt=t[96];const ne=s?.xAxis?.axis,Y=s?.yAxis?.labels;let c;t[97]!==ne||t[98]!==Y?(c={axis:ne,label:Y},t[97]=ne,t[98]=Y,t[99]=c):c=t[99],Q=i.jsxRuntimeExports.jsx(Ge.Axis,{y1:mt,y2:v,x1:0-b,x2:o+l.right,label:a,labelPos:{x:0-b,dx:0,dy:Lt<0?"1em":-5,y:f(O<0?0:O)},classNames:vt,styles:c}),Z=Mt?i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{values:I.filter(ri),y:I.filter(ai).map(d=>f(d)),x1:0-b,x2:o+l.right,styles:{gridLines:s?.yAxis?.gridLines,labels:s?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ft,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const S=0-b-15,r=rt/2,L=s?.yAxis?.title,ae=n?.yAxis?.title;t[100]!==P||t[101]!==S||t[102]!==r||t[103]!==L||t[104]!==ae?(A=i.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:S,y:r,style:L,className:ae,text:P,rotate90:!0}),t[100]=P,t[101]=S,t[102]=r,t[103]=L,t[104]=ae,t[105]=A):A=t[105],t[106]!==X?(R=X.filter(oi).map(si),t[106]=X,t[107]=R):R=t[107],bt=We.AnimatePresence,V=G.map(d=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:h(`${d.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(d.label)!==-1?.85:ut:.85},whileInView:{x:h(`${d.id}`)+h.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(d.label)!==-1?.85:ut:.85,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[At?i.jsxRuntimeExports.jsx(Be.XAxesLabels,{value:`${d.label}`.length<It?`${d.label}`:`${`${d.label}`.substring(0,It)}...`,y:rt+5,x:0-h.bandwidth()/2,width:h.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:H}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{x1:0,x2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:$&&d.x.indexOf(Math.min(...d.x.filter(ni)))===0?"url(#arrow)":"",markerStart:$&&d.x.indexOf(Math.min(...d.x.filter(ii)))===d.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:f(Math.min(...d.x.filter(ei)))+ht,y2:f(Math.max(...d.x.filter(ti)))-ht,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),d.x.map((ee,ot)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:oe=>{Ht({...d,xIndex:ot}),zt(oe.clientY),Et(oe.clientX),at?.({...d,xIndex:ot})},onClick:()=>{(ct||C)&&($e.isEqual(yt,{...d,xIndex:ot})&&_t?(gt(void 0),ct?.(void 0)):(gt({...d,xIndex:ot}),ct&&ct({...d,xIndex:ot})))},onMouseMove:oe=>{Ht({...d,xIndex:ot}),zt(oe.clientY),Et(oe.clientX)},onMouseLeave:()=>{Ht(void 0),Et(void 0),zt(void 0),at?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?E[ot]===F?1:.3:1},whileInView:{opacity:F?E[ot]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:qt.checkIfNullOrUndefined(ee)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cx:0,r:ht,style:{fill:E[ot],fillOpacity:.85,stroke:E[ot],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:f(0),opacity:0},whileInView:{cy:f(ee||0),opacity:qt.checkIfNullOrUndefined(ee)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial"}),Zt?i.jsxRuntimeExports.jsx(Tt.motion.text,{x:0,style:{textAnchor:"start",...s?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(ee)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:ht+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:f(0),opacity:0,fill:Nt||E[ot]},whileInView:{y:f(ee||0),fill:Nt||E[ot],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:H?"whileInView":"initial",children:Ce.numberFormattingFunction(ee,"NA",m,q,ft)}):null]})},ot))]},d.label)),J=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((d,ee)=>i.jsxRuntimeExports.jsx(Se.RefLineY,{text:d.text,color:d.color,y:f(d.value),x1:0-b,x2:o+l.right,classNames:d.classNames,styles:d.styles,animate:p,isInView:H},ee))}):null,t[16]=p,t[17]=$,t[18]=P,t[19]=St,t[20]=Ft,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Pt,t[29]=X,t[30]=G,t[31]=C,t[32]=ut,t[33]=E,t[34]=rt,t[35]=o,t[36]=jt,t[37]=W,t[38]=H,t[39]=b,t[40]=l.bottom,t[41]=l.left,t[42]=l.right,t[43]=l.top,t[44]=kt,t[45]=Lt,t[46]=$t,t[47]=O,t[48]=yt,t[49]=Wt,t[50]=ct,t[51]=at,t[52]=m,t[53]=q,t[54]=ht,t[55]=Vt,t[56]=_t,t[57]=F,t[58]=At,t[59]=Mt,t[60]=Zt,t[61]=s?.dataConnectors,t[62]=s?.graphObjectValues,t[63]=s?.xAxis?.axis,t[64]=s?.xAxis?.labels,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=s?.yAxis?.title,t[68]=ft,t[69]=It,t[70]=Nt,t[71]=wt,t[72]=bt,t[73]=z,t[74]=J,t[75]=K,t[76]=Q,t[77]=Z,t[78]=A,t[79]=R,t[80]=M,t[81]=_,t[82]=tt,t[83]=et,t[84]=k,t[85]=N,t[86]=V}else bt=t[72],z=t[73],J=t[74],K=t[75],Q=t[76],Z=t[77],A=t[78],R=t[79],M=t[80],_=t[81],tt=t[82],et=t[83],k=t[84],N=t[85],V=t[86];let it;t[108]!==bt||t[109]!==J||t[110]!==V?(it=i.jsxRuntimeExports.jsxs(bt,{children:[V,J]}),t[108]=bt,t[109]=J,t[110]=V,t[111]=it):it=t[111];let nt;t[112]!==X?(nt=X.filter(_e).map(Ze),t[112]=X,t[113]=nt):nt=t[113];let xt;t[114]!==K||t[115]!==Q||t[116]!==Z||t[117]!==A||t[118]!==R||t[119]!==it||t[120]!==nt?(xt=i.jsxRuntimeExports.jsxs("g",{transform:K,children:[Q,Z,A,R,it,nt]}),t[114]=K,t[115]=Q,t[116]=Z,t[117]=A,t[118]=R,t[119]=it,t[120]=nt,t[121]=xt):xt=t[121];let D;t[122]!==z||t[123]!==M||t[124]!==_||t[125]!==tt||t[126]!==et||t[127]!==k||t[128]!==N||t[129]!==xt?(D=i.jsxRuntimeExports.jsxs(z,{width:M,height:_,viewBox:tt,direction:et,ref:k,children:[N,xt]}),t[122]=z,t[123]=M,t[124]=_,t[125]=tt,t[126]=et,t[127]=k,t[128]=N,t[129]=xt,t[130]=D):D=t[130];let B;t[131]!==n?.tooltip||t[132]!==Ut||t[133]!==Ot||t[134]!==lt||t[135]!==s?.tooltip||t[136]!==g?(B=lt&&g&&Ut&&Ot?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:lt,body:g,xPos:Ut,yPos:Ot,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[131]=n?.tooltip,t[132]=Ut,t[133]=Ot,t[134]=lt,t[135]=s?.tooltip,t[136]=g,t[137]=B):B=t[137];let st;t[138]!==n?.modal||t[139]!==C||t[140]!==yt?(st=C&&yt!==void 0?i.jsxRuntimeExports.jsx(Te.DetailsModal,{body:C,data:yt,setData:gt,className:n?.modal}):null,t[138]=n?.modal,t[139]=C,t[140]=yt,t[141]=st):st=t[141];let dt;return t[142]!==D||t[143]!==B||t[144]!==st?(dt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,B,st]}),t[142]=D,t[143]=B,t[144]=st,t[145]=dt):dt=t[145],dt}function Ze(e){return e.layer}function _e(e){return e.position==="after"}function ti(e){return e!==null}function ei(e){return e!==null}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e.layer}function oi(e){return e.position==="before"}function ai(e){return e!==0}function ri(e){return e!==0}function li(e){return`${e.id}`}function ci(e){const t=i.compilerRuntimeExports.c(139),{data:u,leftMargin:Jt,rightMargin:se,topMargin:Kt,bottomMargin:Qt,dotColors:E,suffix:Ft,prefix:Mt,barPadding:It,showValues:wt,showTicks:jt,truncateBy:ht,width:At,height:g,radius:at,showLabels:Lt,tooltip:O,onSeriesMouseOver:ct,maxValue:Zt,minValue:ft,onSeriesMouseClick:q,selectedColor:F,arrowConnector:$,connectorStrokeWidth:Pt,maxBarThickness:kt,minBarThickness:$t,resetSelectionOnDoubleClick:_t,detailsOnClick:C,axisTitle:P,noOfTicks:Wt,valueColor:Nt,styles:s,classNames:n,labelOrder:y,refValues:Vt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:ut,dimmedOpacity:b}=e,Gt=Jt===void 0?100:Jt,Bt=se===void 0?40:se,Dt=Kt===void 0?20:Kt,te=Qt===void 0?10:Qt,Yt=T.useRef(null);let H;t[0]!==m.amount||t[1]!==m.once?(H={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=H):H=t[2];const U=Pe.useInView(Yt,H),Xt=P?Dt+25:Dt;let l;t[3]!==te||t[4]!==Gt||t[5]!==Bt||t[6]!==Xt?(l={top:Xt,bottom:te,left:Gt,right:Bt},t[3]=te,t[4]=Gt,t[5]=Bt,t[6]=Xt,t[7]=l):l=t[7];const o=l,rt=At-o.left-o.right,lt=g-o.top-o.bottom,[Ht,yt]=T.useState(void 0),[gt,Ut]=T.useState(void 0),[Et,Ot]=T.useState(void 0),[zt,Ct]=T.useState(void 0);let G;if(t[8]!==u||t[9]!==y){const h=new Set,I=u.map((w,a)=>{const pt=y?`${w.label}`:`${a}`;return h.add(pt),{...w,id:pt}}),mt=y?y.filter(w=>!h.has(w)):[];let v;t[11]!==u[0]?(v=w=>({id:w,label:w,x:Array(u[0].x.length).fill(null)}),t[11]=u[0],t[12]=v):v=t[12],G=[...I,...mt.map(v)],t[8]=u,t[9]=y,t[10]=G}else G=t[10];const j=G;let St;t[13]!==j||t[14]!==y?(St=y??j.map(vi),t[13]=j,t[14]=y,t[15]=St):St=t[15];const bt=St;let z,J,K,Q,Z,A,R,M,_,tt,et,k,N,V,it;if(t[16]!==m||t[17]!==$||t[18]!==P||t[19]!==bt||t[20]!==It||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Pt||t[29]!==W||t[30]!==j||t[31]!==C||t[32]!==b||t[33]!==E||t[34]!==lt||t[35]!==rt||t[36]!==g||t[37]!==ut||t[38]!==U||t[39]!==o.bottom||t[40]!==o.left||t[41]!==o.top||t[42]!==kt||t[43]!==Zt||t[44]!==$t||t[45]!==ft||t[46]!==gt||t[47]!==Wt||t[48]!==q||t[49]!==ct||t[50]!==X||t[51]!==Mt||t[52]!==at||t[53]!==Vt||t[54]!==_t||t[55]!==p||t[56]!==F||t[57]!==Lt||t[58]!==jt||t[59]!==wt||t[60]!==s?.dataConnectors||t[61]!==s?.graphObjectValues||t[62]!==s?.xAxis?.gridLines||t[63]!==s?.xAxis?.labels||t[64]!==s?.xAxis?.title||t[65]!==s?.yAxis?.gridLines||t[66]!==s?.yAxis?.labels||t[67]!==Ft||t[68]!==Dt||t[69]!==ht||t[70]!==Nt||t[71]!==At){const h=qe.linear().domain([ft,Zt]).range([0,rt]).nice(),I=Fe.band().domain(bt).range([0,$t?Math.max(lt,$t*j.length):kt?Math.min(lt,kt*j.length):lt]).paddingInner(It),mt=h.ticks(Wt);J=Tt.motion.svg,_=`${At}px`,tt=`${g}px`,et=`0 0 ${At} ${g}`,k="ltr",N=Yt,t[87]!==$?(V=$?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=$,t[88]=V):V=t[88],Q=`translate(${o.left},${o.top})`,Z=jt?i.jsxRuntimeExports.jsx(Ye.XTicksAndGridLines,{values:mt.filter(bi),x:mt.filter(gi).map(c=>h(c)),y1:0-Dt,y2:lt+o.bottom,styles:{gridLines:s?.xAxis?.gridLines,labels:s?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Ft,prefix:Mt,labelType:"secondary",showGridLines:!0,precision:X}):null;const v=rt/2,w=0-o.top+15,a=s?.xAxis?.title,pt=n?.xAxis?.title;t[89]!==P||t[90]!==v||t[91]!==w||t[92]!==a||t[93]!==pt?(A=i.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:v,y:w,style:a,className:pt,text:P}),t[89]=P,t[90]=v,t[91]=w,t[92]=a,t[93]=pt,t[94]=A):A=t[94];const ie=s?.yAxis?.gridLines;let vt;t[95]!==ie?(vt={gridLines:ie},t[95]=ie,t[96]=vt):vt=t[96];const ne=n?.yAxis?.gridLines;let Y;t[97]!==ne?(Y={gridLines:ne},t[97]=ne,t[98]=Y):Y=t[98],R=i.jsxRuntimeExports.jsx(De.YTicksAndGridLines,{y:j.map(c=>I(`${c.id}`)+I.bandwidth()/2),x1:0,x2:rt,styles:vt,classNames:Y,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(M=W.filter(yi).map(fi),t[99]=W,t[100]=M):M=t[100],z=We.AnimatePresence,it=j.map(c=>i.jsxRuntimeExports.jsxs(Tt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:I(`${c.id}`)+I.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85},whileInView:{x:0,y:I(`${c.id}`)+I.bandwidth()/2,opacity:ut.length!==0?ut.indexOf(c.label)!==-1?.85:b:.85,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Lt?i.jsxRuntimeExports.jsx(Xe.YAxesLabels,{value:`${c.label}`.length<ht?`${c.label}`:`${`${c.label}`.substring(0,ht)}...`,y:0-I.bandwidth()/2,x:0-o.left,width:o.left,height:I.bandwidth(),alignment:"right",style:s?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:U}):null,i.jsxRuntimeExports.jsx(Tt.motion.line,{y1:0,y2:0,style:{strokeWidth:Pt,...s?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:$&&c.x.indexOf(Math.min(...c.x.filter(hi)))===0?"url(#arrow)":"",markerStart:$&&c.x.indexOf(Math.min(...c.x.filter(pi)))===c.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:h(Math.min(...c.x.filter(mi)))+at,x2:h(Math.max(...c.x.filter(di)))-at,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),c.x.map((S,r)=>i.jsxRuntimeExports.jsx(Tt.motion.g,{onMouseEnter:L=>{yt({...c,xIndex:r}),Ct(L.clientY),Ot(L.clientX),ct?.({...c,xIndex:r})},onClick:()=>{(q||C)&&($e.isEqual(gt,{...c,xIndex:r})&&_t?(Ut(void 0),q?.(void 0)):(Ut({...c,xIndex:r}),q&&q({...c,xIndex:r})))},onMouseMove:L=>{yt({...c,xIndex:r}),Ct(L.clientY),Ot(L.clientX)},onMouseLeave:()=>{yt(void 0),Ot(void 0),Ct(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?E[r]===F?1:.3:1},whileInView:{opacity:F?E[r]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:qt.checkIfNullOrUndefined(S)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Tt.motion.circle,{cy:0,r:at,style:{fill:E[r],fillOpacity:.85,stroke:E[r],strokeWidth:1,opacity:qt.checkIfNullOrUndefined(S)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:h(0),opacity:0},whileInView:{cx:h(S||0),opacity:qt.checkIfNullOrUndefined(S)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial"}),wt?i.jsxRuntimeExports.jsx(Tt.motion.text,{y:0,style:{textAnchor:"middle",...s?.graphObjectValues||{}},dx:0,dy:0-at-3,className:i.mo("graph-value text-sm font-bold",qt.checkIfNullOrUndefined(S)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:h(0),opacity:0,fill:Nt||E[r]},whileInView:{x:h(S||0),fill:Nt||E[r],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:U?"whileInView":"initial",children:Ce.numberFormattingFunction(S,"NA",X,Mt,Ft)}):null]})},r))]},c.label)),K=Vt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Vt.map((c,S)=>i.jsxRuntimeExports.jsx(Se.RefLineX,{text:c.text,color:c.color,x:h(c.value),y1:0-o.top,y2:lt+o.bottom,textSide:h(c.value)>rt*.75||p?"left":"right",classNames:c.classNames,styles:c.styles,animate:m,isInView:U},S))}):null,t[16]=m,t[17]=$,t[18]=P,t[19]=bt,t[20]=It,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Pt,t[29]=W,t[30]=j,t[31]=C,t[32]=b,t[33]=E,t[34]=lt,t[35]=rt,t[36]=g,t[37]=ut,t[38]=U,t[39]=o.bottom,t[40]=o.left,t[41]=o.top,t[42]=kt,t[43]=Zt,t[44]=$t,t[45]=ft,t[46]=gt,t[47]=Wt,t[48]=q,t[49]=ct,t[50]=X,t[51]=Mt,t[52]=at,t[53]=Vt,t[54]=_t,t[55]=p,t[56]=F,t[57]=Lt,t[58]=jt,t[59]=wt,t[60]=s?.dataConnectors,t[61]=s?.graphObjectValues,t[62]=s?.xAxis?.gridLines,t[63]=s?.xAxis?.labels,t[64]=s?.xAxis?.title,t[65]=s?.yAxis?.gridLines,t[66]=s?.yAxis?.labels,t[67]=Ft,t[68]=Dt,t[69]=ht,t[70]=Nt,t[71]=At,t[72]=z,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=A,t[78]=R,t[79]=M,t[80]=_,t[81]=tt,t[82]=et,t[83]=k,t[84]=N,t[85]=V,t[86]=it}else z=t[72],J=t[73],K=t[74],Q=t[75],Z=t[76],A=t[77],R=t[78],M=t[79],_=t[80],tt=t[81],et=t[82],k=t[83],N=t[84],V=t[85],it=t[86];let nt;t[101]!==z||t[102]!==K||t[103]!==it?(nt=i.jsxRuntimeExports.jsxs(z,{children:[it,K]}),t[101]=z,t[102]=K,t[103]=it,t[104]=nt):nt=t[104];let xt;t[105]!==W?(xt=W.filter(xi).map(ui),t[105]=W,t[106]=xt):xt=t[106];let D;t[107]!==Q||t[108]!==Z||t[109]!==A||t[110]!==R||t[111]!==M||t[112]!==nt||t[113]!==xt?(D=i.jsxRuntimeExports.jsxs("g",{transform:Q,children:[Z,A,R,M,nt,xt]}),t[107]=Q,t[108]=Z,t[109]=A,t[110]=R,t[111]=M,t[112]=nt,t[113]=xt,t[114]=D):D=t[114];let B;t[115]!==J||t[116]!==_||t[117]!==tt||t[118]!==et||t[119]!==k||t[120]!==N||t[121]!==V||t[122]!==D?(B=i.jsxRuntimeExports.jsxs(J,{width:_,height:tt,viewBox:et,direction:k,ref:N,children:[V,D]}),t[115]=J,t[116]=_,t[117]=tt,t[118]=et,t[119]=k,t[120]=N,t[121]=V,t[122]=D,t[123]=B):B=t[123];let st;t[124]!==n?.tooltip||t[125]!==Et||t[126]!==zt||t[127]!==Ht||t[128]!==s?.tooltip||t[129]!==O?(st=Ht&&O&&Et&&zt?i.jsxRuntimeExports.jsx(Ne.Tooltip,{data:Ht,body:O,xPos:Et,yPos:zt,backgroundStyle:s?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=Et,t[126]=zt,t[127]=Ht,t[128]=s?.tooltip,t[129]=O,t[130]=st):st=t[130];let dt;t[131]!==n?.modal||t[132]!==C||t[133]!==gt?(dt=C&>!==void 0?i.jsxRuntimeExports.jsx(Te.DetailsModal,{body:C,data:gt,setData:Ut,className:n?.modal}):null,t[131]=n?.modal,t[132]=C,t[133]=gt,t[134]=dt):dt=t[134];let f;return t[135]!==B||t[136]!==st||t[137]!==dt?(f=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[B,st,dt]}),t[135]=B,t[136]=st,t[137]=dt,t[138]=f):f=t[138],f}function ui(e){return e.layer}function xi(e){return e.position==="after"}function di(e){return e!==null}function mi(e){return e!==null}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e.layer}function yi(e){return e.position==="before"}function gi(e,t){return t!==0}function bi(e,t){return t!==0}function vi(e){return`${e.id}`}function wi(e){const t=i.compilerRuntimeExports.c(130),{data:u,graphTitle:Jt,colors:se,sources:Kt,graphDescription:Qt,barPadding:E,showTicks:Ft,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:ht,height:At,width:g,footNote:at,colorDomain:Lt,colorLegendTitle:O,padding:ct,backgroundColor:Zt,radius:ft,tooltip:q,showLabels:F,relativeHeight:$,onSeriesMouseOver:Pt,graphID:kt,suffix:$t,prefix:_t,maxValue:C,minValue:P,onSeriesMouseClick:Wt,graphDownload:Nt,dataDownload:s,showValues:n,sortParameter:y,arrowConnector:Vt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:ut,maxNumberOfBars:b,minBarThickness:Gt,ariaLabel:Bt,resetSelectionOnDoubleClick:Dt,detailsOnClick:te,axisTitle:Yt,noOfTicks:H,valueColor:U,orientation:Xt,styles:l,classNames:o,labelOrder:rt,refValues:lt,filterNA:Ht,animate:yt,precision:gt,showColorScale:Ut,customLayers:Et,highlightedDataPoints:Ot,dimmedOpacity:zt,timeline:Ct,sortData:G}=e,j=se===void 0?Ke.Colors.light.categoricalColors.colors:se,St=E===void 0?.25:E,bt=Ft===void 0?!0:Ft,z=ht===void 0?999:ht,J=Zt===void 0?!0:Zt,K=ft===void 0?3:ft,Q=F===void 0?!0:F,Z=$t===void 0?"":$t,A=_t===void 0?"":_t,R=Nt===void 0?!1:Nt,M=s===void 0?!1:s,_=n===void 0?!0:n,tt=Vt===void 0?!1:Vt,et=p===void 0?2:p,k=m===void 0?"en":m,N=X===void 0?0:X,V=W===void 0?"light":W,it=Dt===void 0?!0:Dt,nt=H===void 0?5:H,xt=Xt===void 0?"vertical":Xt,D=Ht===void 0?!0:Ht,B=yt===void 0?!1:yt,st=gt===void 0?2:gt,dt=Ut===void 0?!0:Ut;let f;t[0]!==Et?(f=Et===void 0?[]:Et,t[0]=Et,t[1]=f):f=t[1];const h=f;let I;t[2]!==Ot?(I=Ot===void 0?[]:Ot,t[2]=Ot,t[3]=I):I=t[3];const mt=I,v=zt===void 0?.3:zt;let w;t[4]!==Ct?(w=Ct===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Ct,t[4]=Ct,t[5]=w):w=t[5];const a=w,[pt,ie]=T.useState(0),[vt,ne]=T.useState(0),[Y,c]=T.useState(a.autoplay);let S;if(t[6]!==u||t[7]!==a.dateFormat){let x;t[9]!==a.dateFormat?(x=Rt=>Ee.parse(`${Rt.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=x):x=t[10],S=[...new Set(u.filter(Pi).map(x))],S.sort(Fi),t[6]=u,t[7]=a.dateFormat,t[8]=S}else S=t[8];const r=S,[L,ae]=T.useState(a.autoplay?0:r.length-1),[d,ee]=T.useState(void 0),ot=T.useRef(null),oe=T.useRef(null);let pe,he;t[11]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>{const x=new ResizeObserver(Rt=>{ie(Rt[0].target.clientWidth||620),ne(Rt[0].target.clientHeight||480)});return ot.current&&x.observe(ot.current),()=>x.disconnect()},he=[],t[11]=pe,t[12]=he):(pe=t[11],he=t[12]),T.useEffect(pe,he);let fe,ye;t[13]!==Y||t[14]!==a.speed||t[15]!==r?(fe=()=>{const x=setInterval(()=>{ae(Rt=>Rt<r.length-1?Rt+1:0)},(a.speed||2)*1e3);return Y||clearInterval(x),()=>clearInterval(x)},ye=[r,Y,a.speed],t[13]=Y,t[14]=a.speed,t[15]=r,t[16]=fe,t[17]=ye):(fe=t[16],ye=t[17]),T.useEffect(fe,ye);const we=a.dateFormat||"yyyy";let ge;t[18]!==L||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==r?(ge=Me.getSliderMarks(r,L,a.showOnlyActiveDate,we),t[18]=L,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=r,t[22]=ge):ge=t[22];const be=ge,je=xt==="horizontal"?ci:Qe,Ae=o?.graphContainer,ke=l?.graphContainer;let re;t[23]!==o?.description||t[24]!==o?.title||t[25]!==u||t[26]!==M||t[27]!==Qt||t[28]!==R||t[29]!==Jt||t[30]!==l?.description||t[31]!==l?.title||t[32]!==g?(re=Jt||Qt||R||M?i.jsxRuntimeExports.jsx(He.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Jt,graphDescription:Qt,width:g,graphDownload:R?oe:void 0,dataDownload:M?u.map(qi).filter(Ti).length>0?u.map(Si).filter(Di):u.filter(Vi):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=u,t[26]=M,t[27]=Qt,t[28]=R,t[29]=Jt,t[30]=l?.description,t[31]=l?.title,t[32]=g,t[33]=re):re=t[33];let le;t[34]!==L||t[35]!==be||t[36]!==Y||t[37]!==a.enabled||t[38]!==r?(le=a.enabled&&r.length>0&&be?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{c(!Y)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Y?"Click to pause animation":"Click to play animation",children:Y?i.jsxRuntimeExports.jsx(Le.Pause,{}):i.jsxRuntimeExports.jsx(Le.Play,{})}),i.jsxRuntimeExports.jsx(Me.Nr,{min:r[0],max:r[r.length-1],marks:be,step:null,defaultValue:r[r.length-1],value:r[L],onChangeComplete:x=>{ae(r.indexOf(x))},onChange:x=>{ae(r.indexOf(x))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=L,t[35]=be,t[36]=Y,t[37]=a.enabled,t[38]=r,t[39]=le):le=t[39];let ce;t[40]!==o?.colorLegend||t[41]!==Lt||t[42]!==O||t[43]!==j||t[44]!==u.length||t[45]!==dt||t[46]!==g?(ce=dt&&u.length>0?i.jsxRuntimeExports.jsx(ze.ColorLegendWithMouseOver,{width:g,colorDomain:Lt,colors:j,colorLegendTitle:O,setSelectedColor:ee,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=Lt,t[42]=O,t[43]=j,t[44]=u.length,t[45]=dt,t[46]=g,t[47]=ce):ce=t[47];let ue;t[48]!==u.length?(ue=u.length===0&&i.jsxRuntimeExports.jsx(Je.EmptyState,{}),t[48]=u.length,t[49]=ue):ue=t[49];let xe;t[50]!==je||t[51]!==B||t[52]!==tt||t[53]!==Yt||t[54]!==St||t[55]!==jt||t[56]!==o||t[57]!==j||t[58]!==et||t[59]!==h||t[60]!==u||t[61]!==te||t[62]!==v||t[63]!==D||t[64]!==mt||t[65]!==L||t[66]!==rt||t[67]!==k||t[68]!==Mt||t[69]!==ut||t[70]!==b||t[71]!==C||t[72]!==Gt||t[73]!==P||t[74]!==nt||t[75]!==Wt||t[76]!==Pt||t[77]!==st||t[78]!==A||t[79]!==K||t[80]!==lt||t[81]!==it||t[82]!==It||t[83]!==d||t[84]!==Q||t[85]!==bt||t[86]!==_||t[87]!==G||t[88]!==y||t[89]!==l||t[90]!==Z||t[91]!==vt||t[92]!==pt||t[93]!==a.dateFormat||t[94]!==a.enabled||t[95]!==q||t[96]!==wt||t[97]!==z||t[98]!==r||t[99]!==U?(xe=pt&&vt&&u.length>0?i.jsxRuntimeExports.jsx(je,{data:y!==void 0?y==="diff"?Re.orderBy(Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>a.enabled?x.date===Ee.format(new Date(r[L]),a.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Ni):x),$i,[G||"asc"]).filter((x,Rt)=>b?Rt<b:!0):Re.orderBy(Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>a.enabled?x.date===Ee.format(new Date(r[L]),a.dateFormat||"yyyy"):x).filter(x=>D?!x.x.every(Li):x),x=>qt.checkIfNullOrUndefined(x.x[y])?-1/0:x.x[y],[G||"asc"]).filter((x,Rt)=>b?Rt<b:!0):Oe.ensureCompleteDataForDumbbellChart(u,a.dateFormat||"yyyy").filter(x=>D?!x.x.every(Ii):x).filter((x,Rt)=>b?Rt<b:!0),dotColors:j,width:pt,height:vt,radius:K,barPadding:St,showTicks:bt,leftMargin:Mt,rightMargin:It,topMargin:wt,bottomMargin:jt,truncateBy:z,showLabels:Q,showValues:_,tooltip:q,suffix:Z,prefix:A,onSeriesMouseOver:Pt,maxValue:qt.checkIfNullOrUndefined(C)?Math.max(...u.map(Ri))<0?0:Math.max(...u.map(Oi)):C,minValue:qt.checkIfNullOrUndefined(P)?Math.min(...u.map(ki))>0?0:Math.min(...u.map(ji)):P,onSeriesMouseClick:Wt,selectedColor:d,arrowConnector:tt,connectorStrokeWidth:et,maxBarThickness:ut,minBarThickness:Gt,resetSelectionOnDoubleClick:it,detailsOnClick:te,axisTitle:Yt,noOfTicks:nt,valueColor:U,styles:l,classNames:o,labelOrder:rt,refValues:lt,animate:B===!0?{duration:.5,once:!0,amount:.5}:B||{duration:0,once:!0,amount:0},precision:st,customLayers:h,highlightedDataPoints:mt,dimmedOpacity:v,rtl:k==="ar"||k==="he"}):null,t[50]=je,t[51]=B,t[52]=tt,t[53]=Yt,t[54]=St,t[55]=jt,t[56]=o,t[57]=j,t[58]=et,t[59]=h,t[60]=u,t[61]=te,t[62]=v,t[63]=D,t[64]=mt,t[65]=L,t[66]=rt,t[67]=k,t[68]=Mt,t[69]=ut,t[70]=b,t[71]=C,t[72]=Gt,t[73]=P,t[74]=nt,t[75]=Wt,t[76]=Pt,t[77]=st,t[78]=A,t[79]=K,t[80]=lt,t[81]=it,t[82]=It,t[83]=d,t[84]=Q,t[85]=bt,t[86]=_,t[87]=G,t[88]=y,t[89]=l,t[90]=Z,t[91]=vt,t[92]=pt,t[93]=a.dateFormat,t[94]=a.enabled,t[95]=q,t[96]=wt,t[97]=z,t[98]=r,t[99]=U,t[100]=xe):xe=t[100];let de;t[101]!==ue||t[102]!==xe?(de=i.jsxRuntimeExports.jsxs(Ie.GraphArea,{ref:ot,children:[ue,xe]}),t[101]=ue,t[102]=xe,t[103]=de):de=t[103];let me;t[104]!==o?.footnote||t[105]!==o?.source||t[106]!==at||t[107]!==Kt||t[108]!==l?.footnote||t[109]!==l?.source||t[110]!==g?(me=Kt||at?i.jsxRuntimeExports.jsx(Ue.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:Kt,footNote:at,width:g}):null,t[104]=o?.footnote,t[105]=o?.source,t[106]=at,t[107]=Kt,t[108]=l?.footnote,t[109]=l?.source,t[110]=g,t[111]=me):me=t[111];let ve;return t[112]!==Bt||t[113]!==J||t[114]!==kt||t[115]!==At||t[116]!==k||t[117]!==N||t[118]!==ct||t[119]!==$||t[120]!==Ae||t[121]!==ke||t[122]!==re||t[123]!==le||t[124]!==ce||t[125]!==de||t[126]!==me||t[127]!==V||t[128]!==g?(ve=i.jsxRuntimeExports.jsxs(Ie.GraphContainer,{className:Ae,style:ke,id:kt,ref:oe,"aria-label":Bt,backgroundColor:J,theme:V,language:k,minHeight:N,width:g,height:At,relativeHeight:$,padding:ct,children:[re,le,ce,de,me]}),t[112]=Bt,t[113]=J,t[114]=kt,t[115]=At,t[116]=k,t[117]=N,t[118]=ct,t[119]=$,t[120]=Ae,t[121]=ke,t[122]=re,t[123]=le,t[124]=ce,t[125]=de,t[126]=me,t[127]=V,t[128]=g,t[129]=ve):ve=t[129],ve}function ji(e){return Math.min(...e.x.filter(Ai))}function Ai(e){return e!==null}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.max(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return e==null}function Li(e){return e==null}function $i(e){return qt.checkIfNullOrUndefined(e.x[e.x.length-1])||qt.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Ni(e){return e==null}function Vi(e){return e!==void 0}function Di(e){return e!==void 0}function Si(e){return e.data}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e,t){return e-t}function Pi(e){return e.date}exports.DumbbellChart=wi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-C6er0ety.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-CGeBqbmR.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
|
|
2
2
|
//# sourceMappingURL=DumbbellChart.cjs.map
|