@undp/data-viz 2.3.1 → 2.3.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.
Files changed (154) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.js +2 -2
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.js +15 -15
  7. package/dist/BeeSwarmChart.cjs +1 -1
  8. package/dist/BeeSwarmChart.js +2 -2
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +202 -202
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.js +2 -2
  15. package/dist/ButterflyChart.cjs +1 -1
  16. package/dist/ButterflyChart.js +2 -2
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +33 -33
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +2 -2
  23. package/dist/ColorLegend.cjs +1 -1
  24. package/dist/ColorLegend.js +7 -7
  25. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  26. package/dist/ColorLegendWithMouseOver.js +1 -1
  27. package/dist/CopyTextButton.cjs +1 -1
  28. package/dist/CopyTextButton.js +1 -1
  29. package/dist/CsvDownloadButton.cjs +2 -2
  30. package/dist/CsvDownloadButton.js +1 -1
  31. package/dist/DataCards.cjs +1 -1
  32. package/dist/DataCards.js +3 -3
  33. package/dist/DataCards.js.map +1 -1
  34. package/dist/DataTable.cjs +1 -1
  35. package/dist/DataTable.js +2 -2
  36. package/dist/DifferenceLineChart.cjs +1 -1
  37. package/dist/DifferenceLineChart.js +1 -1
  38. package/dist/DonutChart.cjs +1 -1
  39. package/dist/DonutChart.js +20 -20
  40. package/dist/DotDensityMap.cjs +1 -1
  41. package/dist/DotDensityMap.cjs.map +1 -1
  42. package/dist/DotDensityMap.js +46 -46
  43. package/dist/DotDensityMap.js.map +1 -1
  44. package/dist/DualAxisLineChart.cjs +1 -1
  45. package/dist/DualAxisLineChart.js +1 -1
  46. package/dist/DumbbellChart.cjs +1 -1
  47. package/dist/DumbbellChart.js +2 -2
  48. package/dist/{EmptyState-CGeBqbmR.cjs → EmptyState-DX0t62iF.cjs} +2 -2
  49. package/dist/{EmptyState-CGeBqbmR.cjs.map → EmptyState-DX0t62iF.cjs.map} +1 -1
  50. package/dist/{EmptyState-tZBErBKF.js → EmptyState-Pj-emXt5.js} +3 -3
  51. package/dist/{EmptyState-tZBErBKF.js.map → EmptyState-Pj-emXt5.js.map} +1 -1
  52. package/dist/ExcelDownloadButton.cjs +1 -1
  53. package/dist/ExcelDownloadButton.js +7 -7
  54. package/dist/FootNote.cjs +1 -1
  55. package/dist/FootNote.js +1 -1
  56. package/dist/GeoHubCompareMaps.cjs +1 -1
  57. package/dist/GeoHubCompareMaps.js +1 -1
  58. package/dist/GeoHubMap.cjs +1 -1
  59. package/dist/GeoHubMap.js +1 -1
  60. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.js +2 -2
  62. package/dist/GraphDescription.cjs +1 -1
  63. package/dist/GraphDescription.js +1 -1
  64. package/dist/{GraphEl-ic8C5Ksc.cjs → GraphEl-CWjTuiYd.cjs} +2 -2
  65. package/dist/{GraphEl-ic8C5Ksc.cjs.map → GraphEl-CWjTuiYd.cjs.map} +1 -1
  66. package/dist/{GraphEl-L5hNe7wJ.js → GraphEl-DDXkYObU.js} +7 -7
  67. package/dist/{GraphEl-L5hNe7wJ.js.map → GraphEl-DDXkYObU.js.map} +1 -1
  68. package/dist/GraphFooter.cjs +1 -1
  69. package/dist/GraphFooter.js +1 -1
  70. package/dist/GraphTitle.cjs +1 -1
  71. package/dist/GraphTitle.js +1 -1
  72. package/dist/GriddedGraphs.cjs +1 -1
  73. package/dist/GriddedGraphs.js +1 -1
  74. package/dist/HeatMap.cjs +1 -1
  75. package/dist/HeatMap.js +1 -1
  76. package/dist/Histogram.cjs +1 -1
  77. package/dist/Histogram.js +1 -1
  78. package/dist/HybridMap.cjs +1 -1
  79. package/dist/HybridMap.cjs.map +1 -1
  80. package/dist/HybridMap.js +42 -42
  81. package/dist/HybridMap.js.map +1 -1
  82. package/dist/ImageDownloadButton.cjs +1 -1
  83. package/dist/ImageDownloadButton.js +1 -1
  84. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  85. package/dist/LineChartWithConfidenceInterval.js +1 -1
  86. package/dist/LinearColorLegend.cjs +1 -1
  87. package/dist/LinearColorLegend.js +1 -1
  88. package/dist/MultiLineAltChart.cjs +1 -1
  89. package/dist/MultiLineAltChart.js +1 -1
  90. package/dist/MultiLineChart.cjs +1 -1
  91. package/dist/MultiLineChart.js +1 -1
  92. package/dist/ParetoChart.cjs +1 -1
  93. package/dist/ParetoChart.js +1 -1
  94. package/dist/RadarChart.cjs +1 -1
  95. package/dist/RadarChart.js +1 -1
  96. package/dist/SVGDownloadButton.cjs +1 -1
  97. package/dist/SVGDownloadButton.js +8 -8
  98. package/dist/SankeyChart.cjs +1 -1
  99. package/dist/SankeyChart.js +80 -80
  100. package/dist/ScatterPlot.cjs +1 -1
  101. package/dist/ScatterPlot.js +2 -2
  102. package/dist/SimpleLineChart.cjs +1 -1
  103. package/dist/SimpleLineChart.js +1 -1
  104. package/dist/SingleGraphDashboard.cjs +1 -1
  105. package/dist/SingleGraphDashboard.js +1 -1
  106. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  107. package/dist/SingleGraphDashboardGeoHubMaps.js +10 -10
  108. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  109. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  110. package/dist/SlopeChart.cjs +1 -1
  111. package/dist/SlopeChart.js +1 -1
  112. package/dist/{Source-B5AoSlsi.cjs → Source-B3i0Bx2R.cjs} +2 -2
  113. package/dist/{Source-B5AoSlsi.cjs.map → Source-B3i0Bx2R.cjs.map} +1 -1
  114. package/dist/{Source-F8EYCYkV.js → Source-_STIejqs.js} +14 -14
  115. package/dist/{Source-F8EYCYkV.js.map → Source-_STIejqs.js.map} +1 -1
  116. package/dist/Source.cjs +1 -1
  117. package/dist/Source.js +2 -2
  118. package/dist/StatCardFromData.cjs +1 -1
  119. package/dist/StatCardFromData.js +12 -12
  120. package/dist/StripChart.cjs +1 -1
  121. package/dist/StripChart.js +1 -1
  122. package/dist/ThreeDGlobe.cjs +1 -1
  123. package/dist/ThreeDGlobe.js +2 -2
  124. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  125. package/dist/ThresholdColorLegendWithMouseOver.js +10 -10
  126. package/dist/TreeMapGraph.cjs +1 -1
  127. package/dist/TreeMapGraph.js +29 -29
  128. package/dist/Typography-DrJ7IOdw.cjs +2 -0
  129. package/dist/Typography-DrJ7IOdw.cjs.map +1 -0
  130. package/dist/Typography-iR8PEgdt.js +263 -0
  131. package/dist/Typography-iR8PEgdt.js.map +1 -0
  132. package/dist/UnitChart.cjs +1 -1
  133. package/dist/UnitChart.js +25 -25
  134. package/dist/WaterfallChart.cjs +1 -1
  135. package/dist/WaterfallChart.js +1 -1
  136. package/dist/{index-BQYOuXdl.js → index-B-4y_iGB.js} +19 -17
  137. package/dist/index-B-4y_iGB.js.map +1 -0
  138. package/dist/{index-D5ihtaJJ.js → index-BE-lvE4c.js} +3 -3
  139. package/dist/{index-D5ihtaJJ.js.map → index-BE-lvE4c.js.map} +1 -1
  140. package/dist/{index-Dgjq6aZ2.cjs → index-DlrGwLQA.cjs} +2 -2
  141. package/dist/{index-Dgjq6aZ2.cjs.map → index-DlrGwLQA.cjs.map} +1 -1
  142. package/dist/index-sbKVyHS2.cjs +2 -0
  143. package/dist/index-sbKVyHS2.cjs.map +1 -0
  144. package/dist/index.cjs +1 -1
  145. package/dist/index.js +2 -2
  146. package/dist/style.css +1 -1
  147. package/package.json +3 -3
  148. package/dist/Typography-hWfh3H0J.js +0 -142
  149. package/dist/Typography-hWfh3H0J.js.map +0 -1
  150. package/dist/Typography-sa1UE0oF.cjs +0 -2
  151. package/dist/Typography-sa1UE0oF.cjs.map +0 -1
  152. package/dist/index-BQYOuXdl.js.map +0 -1
  153. package/dist/index-C6er0ety.cjs +0 -2
  154. package/dist/index-C6er0ety.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Jt_tmhxS.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DHttOA80.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-CGeBqbmR.cjs"),ci=require("./index-C6er0ety.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),_t=require("./parse-xYI9yrvL.cjs"),L=require("react"),ei=require("./getSliderMarks-CIuSoedo.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-B1LWQBmM.cjs"),oi=require("./Axis-Jt_tmhxS.cjs"),si=require("./AxisTitle-DV4n0RxE.cjs"),hi=require("./XTicksAndGridLines-CekrPykD.cjs"),li=require("./ReferenceLine-M9aP3dj-.cjs"),gi=require("./RegressionLine-Ci-Dh0w0.cjs"),yi=require("./YTicksAndGridLines-UzVC5eBM.cjs"),vi=require("./index-D69M6klB.cjs"),bi=require("./DetailsModal-DHttOA80.cjs"),Ai=require("./pow-BnyPO-NX.cjs"),ri=require("./linear-CgUCbw9F.cjs"),ji=require("./delaunay-rcy0HhZi.cjs"),Ft=require("./proxy-C4-uo6nS.cjs"),Oi=require("./use-in-view-C3o_ntMv.cjs"),ai=require("./index-CoobIWNj.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),wi=require("./EmptyState-DX0t62iF.cjs"),ci=require("./index-sbKVyHS2.cjs"),Si=require("./ensureCompleteData-D9bQTiVS.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-B1EDxJ0S.cjs");function Ei(i){const e=o.compilerRuntimeExports.c(216),{data:n,width:ne,height:S,showLabels:We,colors:f,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:H,leftMargin:P,rightMargin:ut,topMargin:Ct,bottomMargin:Dt,tooltip:xt,onSeriesMouseOver:oe,refXValues:Rt,refYValues:kt,highlightAreaSettings:wt,selectedColor:Ne,highlightedDataPoints:W,maxRadiusValue:ft,maxXValue:mt,minXValue:k,maxYValue:Be,minYValue:j,onSeriesMouseClick:N,rtl:ze,annotations:Je,customHighlightAreaSettings:$e,regressionLine:se,resetSelectionOnDoubleClick:Me,detailsOnClick:$,noOfXTicks:Ke,noOfYTicks:Qe,labelColor:Ve,xSuffix:qe,ySuffix:De,xPrefix:Ie,yPrefix:le,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,dt=L.useRef(null);let pt;e[0]!==a.amount||e[1]!==a.once?(pt={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=pt):pt=e[2];const b=Oi.useInView(dt,pt),[E,Te]=L.useState(void 0),[X,Ze]=L.useState(void 0),[ht,re]=L.useState(void 0),[h,u]=L.useState(void 0),St=g?Dt+50:Dt,Et=H?P+30:P;let gt;e[3]!==ut||e[4]!==St||e[5]!==Et||e[6]!==Ct?(gt={top:Ct,bottom:St,left:Et,right:ut},e[3]=ut,e[4]=St,e[5]=Et,e[6]=Ct,e[7]=gt):gt=e[7];const p=gt;let B,ae,ce,ue,xe,fe,Y,me,de,pe,z,he,J,ge,K,ye,F,Q;if(e[8]!==a||e[9]!==Je||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==f||e[21]!==$e||e[22]!==q||e[23]!==n||e[24]!==$||e[25]!==M||e[26]!==S||e[27]!==wt||e[28]!==W||e[29]!==b||e[30]!==Ve||e[31]!==P||e[32]!==p.bottom||e[33]!==p.left||e[34]!==p.right||e[35]!==p.top||e[36]!==ft||e[37]!==mt||e[38]!==Be||e[39]!==k||e[40]!==j||e[41]!==X||e[42]!==E||e[43]!==Ke||e[44]!==Qe||e[45]!==N||e[46]!==oe||e[47]!==V||e[48]!==T||e[49]!==Rt||e[50]!==kt||e[51]!==se||e[52]!==Me||e[53]!==ze||e[54]!==Ne||e[55]!==We||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ne||e[66]!==g||e[67]!==Ie||e[68]!==qe||e[69]!==H||e[70]!==le||e[71]!==De){const _=n.map(_i),A=ne-p.left-p.right,y=S-p.top-p.bottom,w=n.filter(Zi).length!==n.length?Ai.sqrt().domain([0,ft]).range([.25,T]).nice():void 0,_e=_.filter(Qi).length===0?_:di.orderBy(_.filter(Ki),"radius","desc"),c=ri.linear().domain([k,mt]).range([0,A]).nice(),d=ri.linear().domain([j,Be]).range([y,0]).nice(),U=c.ticks(Ke),Lt=d.ticks(Qe),It=ji.Delaunay.from(_e.filter(Ji),t=>c(t.x),t=>d(t.y)).voronoi([0,0,A<0?0:A,y<0?0:y]),Tt=ii.linearRegression(n.filter(zi).map(t=>[c(t.x),d(t.y)])),Nt=ii.linearRegressionLine(Tt);ae=Ft.motion.svg,me=`${ne}px`,de=`${S}px`,pe=`0 0 ${ne} ${S}`,z="ltr",he=dt,ce=`translate(${p.left},${p.top})`;let Xe;e[90]!==a||e[91]!==$e||e[92]!==b||e[93]!==c||e[94]!==d?(Xe=o.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:$e,scaleX:c,scaleY:d,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=$e,e[92]=b,e[93]=c,e[94]=d,e[95]=Xe):Xe=e[95],ue=o.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[o.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:wt,width:A,height:y,scaleX:c,scaleY:d,animate:a,isInView:b},"highlight-area"),Xe]});const yt=s?.yAxis?.gridLines,vt=s?.yAxis?.labels;let Ye;e[96]!==yt||e[97]!==vt?(Ye={gridLines:yt,labels:vt},e[96]=yt,e[97]=vt,e[98]=Ye):Ye=e[98];const bt=l?.yAxis?.gridLines,et=l?.yAxis?.labels;let r;e[99]!==bt||e[100]!==et?(r={gridLines:bt,labels:et},e[99]=bt,e[100]=et,e[101]=r):r=e[101];const tt=d(j<0?0:j),Pt=d(j<0?0:j),it=A+p.right,Xt=j<0?0:j;let O;e[102]!==V||e[103]!==Xt||e[104]!==le||e[105]!==De?(O=ni.numberFormattingFunction(Xt,"NA",V,le,De),e[102]=V,e[103]=Xt,e[104]=le,e[105]=De,e[106]=O):O=e[106];const Yt=d(j<0?0:j);let G;e[107]!==Yt?(G={x:0,y:Yt,dy:"0.33em",dx:-4},e[107]=Yt,e[108]=G):G=e[108];const x=l?.xAxis?.axis,D=l?.yAxis?.labels;let Ce;e[109]!==x||e[110]!==D?(Ce={axis:x,label:D},e[109]=x,e[110]=D,e[111]=Ce):Ce=e[111];const At=s?.xAxis?.axis;let nt;e[112]!==s?.yAxis?.labels?(nt=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=nt):nt=e[113];let Re;e[114]!==nt?(Re={textAnchor:"end",...nt},e[114]=nt,e[115]=Re):Re=e[115];let Fe;e[116]!==At||e[117]!==Re?(Fe={axis:At,label:Re},e[116]=At,e[117]=Re,e[118]=Fe):Fe=e[118];let Ue;e[119]!==tt||e[120]!==Pt||e[121]!==it||e[122]!==O||e[123]!==G||e[124]!==Ce||e[125]!==Fe?(Ue=o.jsxRuntimeExports.jsx(oi.Axis,{y1:tt,y2:Pt,x1:0,x2:it,label:O,labelPos:G,classNames:Ce,styles:Fe}),e[119]=tt,e[120]=Pt,e[121]=it,e[122]=O,e[123]=G,e[124]=Ce,e[125]=Fe,e[126]=Ue):Ue=e[126];const ot=0-P-15,st=y/2,lt=s?.yAxis?.title,jt=l?.yAxis?.title;let Ge;e[127]!==ot||e[128]!==st||e[129]!==lt||e[130]!==jt||e[131]!==H?(Ge=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:ot,y:st,style:lt,className:jt,text:H,rotate90:!0}),e[127]=ot,e[128]=st,e[129]=lt,e[130]=jt,e[131]=H,e[132]=Ge):Ge=e[132],xe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Lt.filter(Bi),y:Lt.filter(Wi).map(t=>d(t)),x1:0,x2:A+p.right,styles:Ye,classNames:r,suffix:De,prefix:le,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Ue,Ge]});const rt=s?.xAxis?.gridLines,Ot=s?.xAxis?.labels;let at;e[133]!==rt||e[134]!==Ot?(at={gridLines:rt,labels:Ot},e[133]=rt,e[134]=Ot,e[135]=at):at=e[135];const ke=l?.xAxis?.gridLines,we=l?.xAxis?.labels;let ee;e[136]!==ke||e[137]!==we?(ee={gridLines:ke,labels:we},e[136]=ke,e[137]=we,e[138]=ee):ee=e[138];const Se=c(k<0?0:k),Ee=c(k<0?0:k),Le=k<0?0:k;let I;e[139]!==V||e[140]!==Le||e[141]!==Ie||e[142]!==qe?(I=ni.numberFormattingFunction(Le,"NA",V,Ie,qe),e[139]=V,e[140]=Le,e[141]=Ie,e[142]=qe,e[143]=I):I=e[143];const ct=c(k<0?0:k);let m;e[144]!==y||e[145]!==ct?(m={x:ct,y,dy:"1em",dx:0},e[144]=y,e[145]=ct,e[146]=m):m=e[146];const te=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let $t;e[147]!==te||e[148]!==Ht?($t={axis:te,label:Ht},e[147]=te,e[148]=Ht,e[149]=$t):$t=e[149];const Wt=s?.xAxis?.axis;let Mt;e[150]!==s?.yAxis?.labels?(Mt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Mt):Mt=e[151];let Vt;e[152]!==Mt?(Vt={textAnchor:"middle",...Mt},e[152]=Mt,e[153]=Vt):Vt=e[153];let qt;e[154]!==Wt||e[155]!==Vt?(qt={axis:Wt,label:Vt},e[154]=Wt,e[155]=Vt,e[156]=qt):qt=e[156];let Ut;e[157]!==y||e[158]!==Se||e[159]!==Ee||e[160]!==I||e[161]!==m||e[162]!==$t||e[163]!==qt?(Ut=o.jsxRuntimeExports.jsx(oi.Axis,{x1:Se,x2:Ee,y1:0,y2:y,label:I,labelPos:m,classNames:$t,styles:qt}),e[157]=y,e[158]=Se,e[159]=Ee,e[160]=I,e[161]=m,e[162]=$t,e[163]=qt,e[164]=Ut):Ut=e[164];const Bt=A/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Gt;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Gt=o.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Gt):Gt=e[170],fe=o.jsxRuntimeExports.jsxs("g",{children:[o.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:U.filter(Hi),x:U.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:at,classNames:ee,suffix:qe,prefix:Ie,labelType:"primary",showGridLines:!0,precision:V}),Ut,Gt]}),e[171]!==q?(Y=q.filter(Ui).map(Fi),e[171]=q,e[172]=Y):Y=e[172],B=ai.AnimatePresence,J=_e.filter(Yi).map((t,He)=>o.jsxRuntimeExports.jsx("path",{d:It.renderCell(_e.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))}},`tesselation_${t.label||He}`)),ge=_e.filter(Xi).map((t,He)=>o.jsxRuntimeExports.jsxs(Ft.motion.g,{variants:{initial:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:d(t.y),opacity:Ne?t.color&&f[R.indexOf(`${t.color}`)]===Ne?1:M:E?E.id===t.id?1:M:W.length!==0?W.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{Te(t),u(C.clientY),re(C.clientX),oe?.(t)},onMouseMove:C=>{Te(t),u(C.clientY),re(C.clientX)},onMouseLeave:()=>{Te(void 0),re(void 0),u(void 0),oe?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(X,t)&&Me?(Ze(void 0),N?.(void 0)):(Ze(t),N?.(t)))},children:[o.jsxRuntimeExports.jsx(Ft.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:n.filter(Pi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Ti).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray},whileInView:{r:w?w(t.radius||0):T,fill:n.filter(Ii).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,stroke:n.filter(Di).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),We&&!v.checkIfNullOrUndefined(t.label)?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(qi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter(Vi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):W.length!==0&&!v.checkIfNullOrUndefined(t.label)&&W.indexOf(t.label)!==-1?o.jsxRuntimeExports.jsx(Ft.motion.text,{style:{...s?.graphObjectValues||{}},className:o.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:w?w(t.radius||0):T,opacity:0,fill:Ve||(n.filter(Mi).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray)},whileInView:{x:w?w(t.radius||0):T,opacity:1,fill:Ve||(n.filter($i).length===0?f[0]:t.color?f[R.indexOf(`${t.color}`)]:ie.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||He}`)),K=Rt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>A*.75||ze?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)),ye=kt.map((t,He)=>o.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:d(t.value),x1:0,x2:A,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He));const Qt=Je.map((t,He)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?d(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?d(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?d(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:ze?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:ze?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):A+p.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return o.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},He)});e[173]!==Qt?(F=o.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=F):F=e[174],Q=se?o.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:A,y1:Nt(0),y2:Nt(A),graphHeight:y,graphWidth:A,className:l?.regLine,style:s?.regLine,color:typeof se=="string"?se:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=Je,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=f,e[21]=$e,e[22]=q,e[23]=n,e[24]=$,e[25]=M,e[26]=S,e[27]=wt,e[28]=W,e[29]=b,e[30]=Ve,e[31]=P,e[32]=p.bottom,e[33]=p.left,e[34]=p.right,e[35]=p.top,e[36]=ft,e[37]=mt,e[38]=Be,e[39]=k,e[40]=j,e[41]=X,e[42]=E,e[43]=Ke,e[44]=Qe,e[45]=N,e[46]=oe,e[47]=V,e[48]=T,e[49]=Rt,e[50]=kt,e[51]=se,e[52]=Me,e[53]=ze,e[54]=Ne,e[55]=We,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ne,e[66]=g,e[67]=Ie,e[68]=qe,e[69]=H,e[70]=le,e[71]=De,e[72]=B,e[73]=ae,e[74]=ce,e[75]=ue,e[76]=xe,e[77]=fe,e[78]=Y,e[79]=me,e[80]=de,e[81]=pe,e[82]=z,e[83]=he,e[84]=J,e[85]=ge,e[86]=K,e[87]=ye,e[88]=F,e[89]=Q}else B=e[72],ae=e[73],ce=e[74],ue=e[75],xe=e[76],fe=e[77],Y=e[78],me=e[79],de=e[80],pe=e[81],z=e[82],he=e[83],J=e[84],ge=e[85],K=e[86],ye=e[87],F=e[88],Q=e[89];let ve;e[175]!==B||e[176]!==J||e[177]!==ge||e[178]!==K||e[179]!==ye||e[180]!==F||e[181]!==Q?(ve=o.jsxRuntimeExports.jsxs(B,{children:[J,ge,K,ye,F,Q]}),e[175]=B,e[176]=J,e[177]=ge,e[178]=K,e[179]=ye,e[180]=F,e[181]=Q,e[182]=ve):ve=e[182];let be;e[183]!==q?(be=q.filter(Ni).map(Li),e[183]=q,e[184]=be):be=e[184];let Ae;e[185]!==ce||e[186]!==ue||e[187]!==xe||e[188]!==fe||e[189]!==Y||e[190]!==ve||e[191]!==be?(Ae=o.jsxRuntimeExports.jsxs("g",{transform:ce,children:[ue,xe,fe,Y,ve,be]}),e[185]=ce,e[186]=ue,e[187]=xe,e[188]=fe,e[189]=Y,e[190]=ve,e[191]=be,e[192]=Ae):Ae=e[192];let je;e[193]!==ae||e[194]!==me||e[195]!==de||e[196]!==pe||e[197]!==z||e[198]!==he||e[199]!==Ae?(je=o.jsxRuntimeExports.jsx(ae,{width:me,height:de,viewBox:pe,direction:z,ref:he,children:Ae}),e[193]=ae,e[194]=me,e[195]=de,e[196]=pe,e[197]=z,e[198]=he,e[199]=Ae,e[200]=je):je=e[200];let Oe;e[201]!==l?.tooltip||e[202]!==ht||e[203]!==h||e[204]!==E||e[205]!==s?.tooltip||e[206]!==xt?(Oe=E&&xt&&ht&&h?o.jsxRuntimeExports.jsx(pi.Tooltip,{data:E,body:xt,xPos:ht,yPos:h,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=ht,e[203]=h,e[204]=E,e[205]=s?.tooltip,e[206]=xt,e[207]=Oe):Oe=e[207];let Z;e[208]!==l?.modal||e[209]!==$||e[210]!==X?(Z=$&&X!==void 0?o.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:X,setData:Ze,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=X,e[211]=Z):Z=e[211];let Pe;return e[212]!==je||e[213]!==Oe||e[214]!==Z?(Pe=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[je,Oe,Z]}),e[212]=je,e[213]=Oe,e[214]=Z,e[215]=Pe):Pe=e[215],Pe}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=o.compilerRuntimeExports.c(142),{data:n,graphTitle:ne,colors:S,sources:We,graphDescription:f,showLabels:R,height:T,width:g,footNote:H,colorDomain:P,colorLegendTitle:ut,radius:Ct,xAxisTitle:Dt,yAxisTitle:xt,padding:oe,backgroundColor:Rt,leftMargin:kt,rightMargin:wt,topMargin:Ne,bottomMargin:W,tooltip:ft,relativeHeight:mt,onSeriesMouseOver:k,refXValues:Be,refYValues:j,highlightAreaSettings:N,showColorScale:ze,highlightedDataPoints:Je,graphID:$e,maxRadiusValue:se,maxXValue:Me,minXValue:$,maxYValue:Ke,minYValue:Qe,xSuffix:Ve,ySuffix:qe,xPrefix:De,yPrefix:Ie,onSeriesMouseClick:le,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:dt,theme:pt,regressionLine:b,ariaLabel:E,resetSelectionOnDoubleClick:Te,detailsOnClick:X,noOfXTicks:Ze,noOfYTicks:ht,labelColor:re,styles:h,classNames:u,animate:St,dimmedOpacity:Et,precision:gt,customLayers:p,timeline:B}=i,ae=R===void 0?!1:R,ce=Ct===void 0?5:Ct,ue=Dt===void 0?"X Axis":Dt,xe=xt===void 0?"Y Axis":xt,fe=Rt===void 0?!1:Rt,Y=kt===void 0?0:kt,me=wt===void 0?10:wt,de=Ne===void 0?20:Ne,pe=W===void 0?50:W;let z;e[0]!==Be?(z=Be===void 0?[]:Be,e[0]=Be,e[1]=z):z=e[1];const he=z;let J;e[2]!==j?(J=j===void 0?[]:j,e[2]=j,e[3]=J):J=e[3];const ge=J;let K;e[4]!==N?(K=N===void 0?[]:N,e[4]=N,e[5]=K):K=e[5];const ye=K,F=ze===void 0?!0:ze;let Q;e[6]!==Je?(Q=Je===void 0?[]:Je,e[6]=Je,e[7]=Q):Q=e[7];const ve=Q,be=Ve===void 0?"":Ve,Ae=qe===void 0?"":qe,je=De===void 0?"":De,Oe=Ie===void 0?"":Ie,Z=s===void 0?!1:s,Pe=l===void 0?!1:l,_=a===void 0?"en":a,A=M===void 0?!0:M,y=V===void 0?0:V;let w;e[8]!==q?(w=q===void 0?[]:q,e[8]=q,e[9]=w):w=e[9];const _e=w;let c;e[10]!==dt?(c=dt===void 0?[]:dt,e[10]=dt,e[11]=c):c=e[11];const d=c,U=pt===void 0?"light":pt,Lt=b===void 0?!1:b,It=Te===void 0?!0:Te,Tt=Ze===void 0?5:Ze,Nt=ht===void 0?5:ht,Xe=St===void 0?!1:St,yt=Et===void 0?.3:Et,vt=gt===void 0?2:gt;let Ye;e[12]!==p?(Ye=p===void 0?[]:p,e[12]=p,e[13]=Ye):Ye=e[13];const bt=Ye;let et;e[14]!==B?(et=B===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:B,e[14]=B,e[15]=et):et=e[15];const r=et,[tt,Pt]=L.useState(0),[it,Xt]=L.useState(0),[O,Yt]=L.useState(r.autoplay);let G;if(e[16]!==n||e[17]!==r.dateFormat){let m;e[19]!==r.dateFormat?(m=te=>_t.parse(`${te.date}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=m):m=e[20],G=[...new Set(n.filter(Ln).map(m))],G.sort(En),e[16]=n,e[17]=r.dateFormat,e[18]=G}else G=e[18];const x=G,[D,Ce]=L.useState(r.autoplay?0:x.length-1),[At,nt]=L.useState(void 0),Re=L.useRef(null),Fe=L.useRef(null);let Ue,ot;e[21]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>{const m=new ResizeObserver(te=>{Pt(te[0].target.clientWidth||620),Xt(te[0].target.clientHeight||480)});return Re.current&&m.observe(Re.current),()=>m.disconnect()},ot=[],e[21]=Ue,e[22]=ot):(Ue=e[21],ot=e[22]),L.useEffect(Ue,ot);let st,lt;e[23]!==O||e[24]!==r.speed||e[25]!==x?(st=()=>{const m=setInterval(()=>{Ce(te=>te<x.length-1?te+1:0)},(r.speed||2)*1e3);return O||clearInterval(m),()=>clearInterval(m)},lt=[x,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=x,e[26]=st,e[27]=lt):(st=e[26],lt=e[27]),L.useEffect(st,lt);const jt=r.dateFormat||"yyyy";let Ge;e[28]!==D||e[29]!==jt||e[30]!==r.showOnlyActiveDate||e[31]!==x?(Ge=ei.getSliderMarks(x,D,r.showOnlyActiveDate,jt),e[28]=D,e[29]=jt,e[30]=r.showOnlyActiveDate,e[31]=x,e[32]=Ge):Ge=e[32];const rt=Ge,Ot=u?.graphContainer,at=h?.graphContainer;let ke;e[33]!==u?.description||e[34]!==u?.title||e[35]!==n||e[36]!==Pe||e[37]!==f||e[38]!==Z||e[39]!==ne||e[40]!==h?.description||e[41]!==h?.title||e[42]!==g?(ke=ne||f||Z||Pe?o.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:h?.title,description:h?.description},classNames:{title:u?.title,description:u?.description},graphTitle:ne,graphDescription:f,width:g,graphDownload:Z?Fe:void 0,dataDownload:Pe?n.map(Sn).filter(wn).length>0?n.map(kn).filter(Rn):n.filter(Cn):null}):null,e[33]=u?.description,e[34]=u?.title,e[35]=n,e[36]=Pe,e[37]=f,e[38]=Z,e[39]=ne,e[40]=h?.description,e[41]=h?.title,e[42]=g,e[43]=ke):ke=e[43];let we;e[44]!==D||e[45]!==rt||e[46]!==O||e[47]!==r.enabled||e[48]!==x?(we=r.enabled&&x.length>0&&rt?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Yt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?o.jsxRuntimeExports.jsx(ci.Pause,{}):o.jsxRuntimeExports.jsx(ci.Play,{})}),o.jsxRuntimeExports.jsx(ei.Nr,{min:x[0],max:x[x.length-1],marks:rt,step:null,defaultValue:x[x.length-1],value:x[D],onChangeComplete:m=>{Ce(x.indexOf(m))},onChange:m=>{Ce(x.indexOf(m))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=rt,e[46]=O,e[47]=r.enabled,e[48]=x,e[49]=we):we=e[49];let ee;e[50]!==u?.colorLegend||e[51]!==P||e[52]!==ut||e[53]!==S||e[54]!==n||e[55]!==F||e[56]!==A||e[57]!==U||e[58]!==g?(ee=F&&n.filter(On).length!==0&&n.length>0?o.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:ut,colors:S||ie.Colors[U].categoricalColors.colors,colorDomain:P||ui.uniqBy(n,"color",!0),setSelectedColor:nt,showNAColor:A,className:u?.colorLegend}):null,e[50]=u?.colorLegend,e[51]=P,e[52]=ut,e[53]=S,e[54]=n,e[55]=F,e[56]=A,e[57]=U,e[58]=g,e[59]=ee):ee=e[59];let Se;e[60]!==n.length?(Se=n.length===0&&o.jsxRuntimeExports.jsx(wi.EmptyState,{}),e[60]=n.length,e[61]=Se):Se=e[61];let Ee;e[62]!==Xe||e[63]!==_e||e[64]!==pe||e[65]!==u||e[66]!==P||e[67]!==S||e[68]!==d||e[69]!==bt||e[70]!==n||e[71]!==X||e[72]!==yt||e[73]!==ye||e[74]!==ve||e[75]!==D||e[76]!==re||e[77]!==_||e[78]!==Y||e[79]!==se||e[80]!==Me||e[81]!==Ke||e[82]!==$||e[83]!==Qe||e[84]!==Tt||e[85]!==Nt||e[86]!==le||e[87]!==k||e[88]!==vt||e[89]!==ce||e[90]!==he||e[91]!==ge||e[92]!==Lt||e[93]!==It||e[94]!==me||e[95]!==At||e[96]!==ae||e[97]!==h||e[98]!==it||e[99]!==tt||e[100]!==U||e[101]!==r.dateFormat||e[102]!==r.enabled||e[103]!==ft||e[104]!==de||e[105]!==x||e[106]!==ue||e[107]!==je||e[108]!==be||e[109]!==xe||e[110]!==Oe||e[111]!==Ae?(Ee=tt&&it&&n.length>0?o.jsxRuntimeExports.jsx(Ei,{data:Si.ensureCompleteDataForScatterPlot(n,r.dateFormat||"yyyy").filter(m=>r.enabled?m.date===_t.format(new Date(x[D]),r.dateFormat||"yyyy"):m),width:tt,height:it,colorDomain:n.filter(jn).length===0?[]:P||ui.uniqBy(n,"color",!0),colors:n.filter(An).length===0?S?[S]:[ie.Colors.primaryColors["blue-600"]]:S||ie.Colors[U].categoricalColors.colors,xAxisTitle:ue,yAxisTitle:xe,refXValues:he,refYValues:ge,showLabels:ae,radius:ce,leftMargin:Y,rightMargin:me,topMargin:de,bottomMargin:pe,tooltip:ft,onSeriesMouseOver:k,highlightAreaSettings:ye,highlightedDataPoints:n.filter(bn).length===0?[]:ve,selectedColor:At,maxRadiusValue:v.checkIfNullOrUndefined(se)?Math.max(...n.map(vn).filter(yn)):se,maxXValue:v.checkIfNullOrUndefined(Me)?Math.max(...n.map(gn).filter(hn))>0?Math.max(...n.map(pn).filter(dn)):0:Me,minXValue:v.checkIfNullOrUndefined($)?Math.min(...n.map(mn).filter(fn))>0?0:Math.min(...n.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Ke)?Math.max(...n.map(cn).filter(an))>0?Math.max(...n.map(rn).filter(ln)):0:Ke,minYValue:v.checkIfNullOrUndefined(Qe)?Math.min(...n.map(sn).filter(on))>0?0:Math.min(...n.map(nn).filter(tn)):Qe,onSeriesMouseClick:le,rtl:_==="he"||_==="ar",annotations:_e,customHighlightAreaSettings:d,regressionLine:Lt,resetSelectionOnDoubleClick:It,detailsOnClick:X,noOfXTicks:Tt,noOfYTicks:Nt,labelColor:re,xSuffix:be,ySuffix:Ae,xPrefix:je,yPrefix:Oe,styles:h,classNames:u,animate:Xe===!0?{duration:.5,once:!0,amount:.5}:Xe||{duration:0,once:!0,amount:0},dimmedOpacity:yt,precision:vt,customLayers:bt}):null,e[62]=Xe,e[63]=_e,e[64]=pe,e[65]=u,e[66]=P,e[67]=S,e[68]=d,e[69]=bt,e[70]=n,e[71]=X,e[72]=yt,e[73]=ye,e[74]=ve,e[75]=D,e[76]=re,e[77]=_,e[78]=Y,e[79]=se,e[80]=Me,e[81]=Ke,e[82]=$,e[83]=Qe,e[84]=Tt,e[85]=Nt,e[86]=le,e[87]=k,e[88]=vt,e[89]=ce,e[90]=he,e[91]=ge,e[92]=Lt,e[93]=It,e[94]=me,e[95]=At,e[96]=ae,e[97]=h,e[98]=it,e[99]=tt,e[100]=U,e[101]=r.dateFormat,e[102]=r.enabled,e[103]=ft,e[104]=de,e[105]=x,e[106]=ue,e[107]=je,e[108]=be,e[109]=xe,e[110]=Oe,e[111]=Ae,e[112]=Ee):Ee=e[112];let Le;e[113]!==Se||e[114]!==Ee?(Le=o.jsxRuntimeExports.jsxs(xi.GraphArea,{ref:Re,children:[Se,Ee]}),e[113]=Se,e[114]=Ee,e[115]=Le):Le=e[115];let I;e[116]!==u?.footnote||e[117]!==u?.source||e[118]!==H||e[119]!==We||e[120]!==h?.footnote||e[121]!==h?.source||e[122]!==g?(I=We||H?o.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:h?.footnote,source:h?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:We,footNote:H,width:g}):null,e[116]=u?.footnote,e[117]=u?.source,e[118]=H,e[119]=We,e[120]=h?.footnote,e[121]=h?.source,e[122]=g,e[123]=I):I=e[123];let ct;return e[124]!==E||e[125]!==fe||e[126]!==$e||e[127]!==T||e[128]!==_||e[129]!==y||e[130]!==oe||e[131]!==mt||e[132]!==Ot||e[133]!==at||e[134]!==ke||e[135]!==we||e[136]!==ee||e[137]!==Le||e[138]!==I||e[139]!==U||e[140]!==g?(ct=o.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:Ot,style:at,id:$e,ref:Fe,"aria-label":E,backgroundColor:fe,theme:U,language:_,minHeight:y,width:g,height:T,relativeHeight:mt,padding:oe,children:[ke,we,ee,Le,I]}),e[124]=E,e[125]=fe,e[126]=$e,e[127]=T,e[128]=_,e[129]=y,e[130]=oe,e[131]=mt,e[132]=Ot,e[133]=at,e[134]=ke,e[135]=we,e[136]=ee,e[137]=Le,e[138]=I,e[139]=U,e[140]=g,e[141]=ct):ct=e[141],ct}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function An(i){return i.color}function jn(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function wn(i){return i!==void 0}function Sn(i){return i.data}function En(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
2
2
  //# sourceMappingURL=ScatterPlot.cjs.map
@@ -27,8 +27,8 @@ import { A as li } from "./index-CtMBjvtq.js";
27
27
  import { GraphFooter as ki } from "./GraphFooter.js";
28
28
  import { GraphHeader as Ni } from "./GraphHeader.js";
29
29
  import { ColorLegendWithMouseOver as Pi } from "./ColorLegendWithMouseOver.js";
30
- import { E as Ti } from "./EmptyState-tZBErBKF.js";
31
- import { P as Xi, e as Yi } from "./index-BQYOuXdl.js";
30
+ import { E as Ti } from "./EmptyState-Pj-emXt5.js";
31
+ import { P as Xi, e as Yi } from "./index-B-4y_iGB.js";
32
32
  import { a as Ri } from "./ensureCompleteData-CDIukSG6.js";
33
33
  import { u as ri } from "./uniqBy-BHy4I8PK.js";
34
34
  import { a as Ii, G as Fi } from "./GraphContainer-CF6ws3pd.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("react"),j=require("./parse-xYI9yrvL.cjs"),Le=require("./simple-statistics-xm8c0LQQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ke=require("./customArea-B1LWQBmM.cjs"),Ie=require("./Axis-Jt_tmhxS.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ge=require("./ReferenceLine-M9aP3dj-.cjs"),Pe=require("./RegressionLine-Ci-Dh0w0.cjs"),We=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Ue=require("./linear-CgUCbw9F.cjs"),De=require("./line-DaEMhXmx.cjs"),ge=require("./step-BZ3C8QFW.cjs"),Be=require("./select-Bnfk0lJx.cjs"),ee=require("./proxy-C4-uo6nS.cjs"),ze=require("./init-DU0ybBc_.cjs"),Je=require("./pointer-Dkq5NV1q.cjs"),Ke=require("./use-in-view-C3o_ntMv.cjs"),Qe=require("./GraphFooter.cjs"),Ze=require("./GraphHeader.cjs"),_e=require("./Colors.cjs"),ti=require("./EmptyState-CGeBqbmR.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ei=require("./getNoOfTicks-C_1CFXv_.cjs");function ii(i){const t=n.compilerRuntimeExports.c(110),{data:y,width:W,height:rt,lineColor:Y,suffix:E,prefix:$,dateFormat:s,highlightAreaSettings:at,showValues:O,noOfXTicks:At,rightMargin:Ct,leftMargin:C,topMargin:kt,bottomMargin:lt,tooltip:ct,onSeriesMouseOver:Lt,refValues:Yt,minValue:Xt,maxValue:ut,animate:o,rtl:St,strokeWidth:xt,showDots:Dt,annotations:Ut,customHighlightAreaSettings:mt,regressionLine:ft,yAxisTitle:X,noOfYTicks:Bt,maxDate:zt,minDate:Jt,curveType:pt,styles:d,classNames:f,precision:M,customLayers:V}=i,Kt=w.useRef(null);let I;t[0]!==o.amount||t[1]!==o.once?(I={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=I):I=t[2];const x=Ke.useInView(Kt,I),[b,Qt]=w.useState(!1);let dt,U;t[3]!==o.duration||t[4]!==b||t[5]!==x?(dt=()=>{if(x&&!b){const e=setTimeout(()=>{Qt(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},U=[x,b,o.duration],t[3]=o.duration,t[4]=b,t[5]=x,t[6]=dt,t[7]=U):(dt=t[6],U=t[7]),w.useEffect(dt,U);const ie=pt==="linear"?De.curveLinear:pt==="step"?ge.curveStep:pt==="stepAfter"?ge.stepAfter:pt==="stepBefore"?ge.stepBefore:ge.monotoneX,[k,m]=w.useState(void 0),[c,Zt]=w.useState(void 0),[F,qt]=w.useState(void 0),ht=X?C+30:C;let B;t[8]!==lt||t[9]!==Ct||t[10]!==ht||t[11]!==kt?(B={top:kt,bottom:lt,left:ht,right:Ct},t[8]=lt,t[9]=Ct,t[10]=ht,t[11]=kt,t[12]=B):B=t[12];const v=B,z=w.useRef(null);let J;t[13]!==s?(J=e=>({...e,date:j.parse(`${e.date}`,s,new Date)}),t[13]=s,t[14]=J):J=t[14];const a=Me.orderBy(y.map(J),["date"],["asc"]);let K;if(t[15]!==s||t[16]!==at){let e;t[18]!==s?(e=g=>({...g,coordinates:[g.coordinates[0]===null?null:j.parse(`${g.coordinates[0]}`,s,new Date),g.coordinates[1]===null?null:j.parse(`${g.coordinates[1]}`,s,new Date)]}),t[18]=s,t[19]=e):e=t[19],K=at.map(e),t[15]=s,t[16]=at,t[17]=K}else K=t[17];const gt=K;let Q;if(t[20]!==mt||t[21]!==s){let e;t[23]!==s?(e=g=>({...g,coordinates:g.coordinates.map((P,Wt)=>Wt%2===0?j.parse(`${P}`,s,new Date):P)}),t[23]=s,t[24]=e):e=t[24],Q=mt.map(e),t[20]=mt,t[21]=s,t[22]=Q}else Q=t[22];const Nt=Q,u=W-v.left-v.right,h=rt-v.top-v.bottom,Tt=Jt?j.parse(`${Jt}`,s,new Date):a[0].date,$t=zt?j.parse(`${zt}`,s,new Date):a[a.length-1].date,p=bt.checkIfNullOrUndefined(Xt)?Math.min(...a.map(ji).filter(vi))!==1/0?Math.min(...a.map(yi).filter(gi))>0?0:Math.min(...a.map(hi).filter(di)):0:Xt,L=Math.max(...a.map(pi).filter(fi))!==1/0?Math.max(...a.map(mi).filter(xi)):0,r=Xe.time().domain([Tt,$t]).range([0,u]);let Z;t[25]!==L||t[26]!==ut?(Z=bt.checkIfNullOrUndefined(ut)?L>0?L:0:ut,t[25]=L,t[26]=ut,t[27]=Z):Z=t[27];const l=Ue.linear().domain([p,Z]).range([h,0]).nice(),Mt=De.line().x(e=>r(e.date)).y(e=>l(e.y)).curve(ie),yt=l.ticks(Bt),Vt=r.ticks(At);w.useEffect(()=>{const e=P=>{const Wt=a[ze.bisectCenter(a.map(ui),r.invert(Je.pointer(P)[0]),0)];m(Wt||a[a.length-1]),Lt?.(Wt||a[a.length-1]),qt(P.clientY),Zt(P.clientX)},g=()=>{m(void 0),Zt(void 0),qt(void 0),Lt?.(void 0)};Be.select(z.current).on("mousemove",e).on("mouseout",g)},[r,a,Lt]);const It=Le.linearRegression(a.filter(ci).map(e=>[r(e.date),l(e.y)])),Ft=Le.linearRegressionLine(It);let _;t[28]!==o||t[29]!==h||t[30]!==u||t[31]!==gt||t[32]!==x||t[33]!==r?(_=n.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:gt,width:u,height:h,scale:r,animate:o,isInView:x}),t[28]=o,t[29]=h,t[30]=u,t[31]=gt,t[32]=x,t[33]=r,t[34]=_):_=t[34];const vt=d?.yAxis?.gridLines,jt=d?.yAxis?.labels;let tt;t[35]!==vt||t[36]!==jt?(tt={gridLines:vt,labels:jt},t[35]=vt,t[36]=jt,t[37]=tt):tt=t[37];const Rt=f?.yAxis?.gridLines,et=f?.yAxis?.labels;let it;t[38]!==Rt||t[39]!==et?(it={gridLines:Rt,labels:et},t[38]=Rt,t[39]=et,t[40]=it):it=t[40];const H=l(p<0?0:p),_t=l(p<0?0:p),nt=0-C,te=u+v.right,wt=p<0?0:p;let G;t[41]!==M||t[42]!==$||t[43]!==E||t[44]!==wt?(G=Se.numberFormattingFunction(wt,"NA",M,$,E),t[41]=M,t[42]=$,t[43]=E,t[44]=wt,t[45]=G):G=t[45];const st=0-C,ot=l(p<0?0:p),Et=L<0?"1em":-5;let S;t[46]!==st||t[47]!==ot||t[48]!==Et?(S={x:st,y:ot,dx:0,dy:Et},t[46]=st,t[47]=ot,t[48]=Et,t[49]=S):S=t[49];const D=f?.xAxis?.axis,q=f?.yAxis?.labels;let R;t[50]!==D||t[51]!==q?(R={axis:D,label:q},t[50]=D,t[51]=q,t[52]=R):R=t[52];const N=d?.xAxis?.axis,T=d?.yAxis?.labels;let A;t[53]!==N||t[54]!==T?(A={axis:N,label:T},t[53]=N,t[54]=T,t[55]=A):A=t[55];let Ot;t[56]!==H||t[57]!==_t||t[58]!==nt||t[59]!==te||t[60]!==G||t[61]!==S||t[62]!==R||t[63]!==A?(Ot=n.jsxRuntimeExports.jsx(Ie.Axis,{y1:H,y2:_t,x1:nt,x2:te,label:G,labelPos:S,classNames:R,styles:A}),t[56]=H,t[57]=_t,t[58]=nt,t[59]=te,t[60]=G,t[61]=S,t[62]=R,t[63]=A,t[64]=Ot):Ot=t[64];const Ht=0-C-15,ye=h/2,ve=d?.yAxis?.title,je=f?.yAxis?.title;let ne;t[65]!==Ht||t[66]!==ye||t[67]!==ve||t[68]!==je||t[69]!==X?(ne=n.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:Ht,y:ye,style:ve,className:je,text:X,rotate90:!0}),t[65]=Ht,t[66]=ye,t[67]=ve,t[68]=je,t[69]=X,t[70]=ne):ne=t[70];let se;t[71]!==s?(se=e=>j.format(e,s),t[71]=s,t[72]=se):se=t[72];const Ne=Vt.map(se),Te=Vt.map(e=>r(e)),Re=d?.xAxis?.gridLines,we=d?.xAxis?.labels;let oe;t[73]!==Re||t[74]!==we?(oe={gridLines:Re,labels:we},t[73]=Re,t[74]=we,t[75]=oe):oe=t[75];const Ee=f?.xAxis?.gridLines;let Gt;t[76]!==Ee?(Gt=n.mo("opacity-0",Ee),t[76]=Ee,t[77]=Gt):Gt=t[77];const Oe=f?.xAxis?.labels;let Pt;t[78]!==Oe?(Pt=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Oe),t[78]=Oe,t[79]=Pt):Pt=t[79];let re;t[80]!==Gt||t[81]!==Pt?(re={gridLines:Gt,labels:Pt},t[80]=Gt,t[81]=Pt,t[82]=re):re=t[82];let ae;t[83]!==V?(ae=V.filter(ri).map(oi),t[83]=V,t[84]=ae):ae=t[84];let le;t[85]!==Y||t[86]!==xt?(le={stroke:Y,fill:"none",strokeWidth:xt},t[85]=Y,t[86]=xt,t[87]=le):le=t[87];let ce;t[88]!==o.duration?(ce={opacity:0,transition:{duration:o.duration}},t[88]=o.duration,t[89]=ce):ce=t[89];const be=a.map((e,g)=>n.jsxRuntimeExports.jsx(ee.motion.g,{children:bt.checkIfNullOrUndefined(e.y)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Dt?n.jsxRuntimeExports.jsx(ee.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:r(e.date),cy:l(e.y),fill:Y},whileInView:{opacity:1,fill:Y,transition:{duration:b?o.duration:.5,delay:b?0:o.duration},cx:r(e.date),cy:l(e.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null,O?n.jsxRuntimeExports.jsx(ee.motion.text,{dy:-8,style:{textAnchor:"middle",...d?.graphObjectValues||{}},className:n.mo("graph-value text-xs font-bold",f?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,x:r(e.date),y:l(e.y)},whileInView:{opacity:1,x:r(e.date),y:l(e.y),transition:{duration:b?o.duration:.5,delay:b?0:o.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:Se.numberFormattingFunction(e.y,"NA",M,$,E)}):null]})},g));let ue;t[90]!==be?(ue=n.jsxRuntimeExports.jsx("g",{children:be}),t[90]=be,t[91]=ue):ue=t[91];const Ae=Ut.map((e,g)=>{const P=ke.getLineEndPoint({x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Wt=e.showConnector?{y1:P.y,x1:P.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,circleRadius:bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,$e={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:St?0:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:St?e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return n.jsxRuntimeExports.jsx(ke.Annotation,{color:e.color,connectorsSettings:Wt,labelSettings:$e,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g)});let xe;t[92]!==Ae?(xe=n.jsxRuntimeExports.jsx("g",{children:Ae}),t[92]=Ae,t[93]=xe):xe=t[93];const Ce=ft?n.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:u,y1:Ft(0),y2:Ft(u),graphHeight:h,graphWidth:u,className:f?.regLine,style:d?.regLine,color:typeof ft=="string"?ft:void 0,animate:o,isInView:x}):null;let me;t[94]!==Ce?(me=n.jsxRuntimeExports.jsx("g",{children:Ce}),t[94]=Ce,t[95]=me):me=t[95];let fe;t[96]!==V?(fe=V.filter(si).map(ni),t[96]=V,t[97]=fe):fe=t[97];let pe;t[98]===Symbol.for("react.memo_cache_sentinel")?(pe={fill:"none",pointerEvents:"all"},t[98]=pe):pe=t[98];let de;t[99]!==z||t[100]!==h||t[101]!==u?(de=n.jsxRuntimeExports.jsx("rect",{ref:z,style:pe,width:u,height:h}),t[99]=z,t[100]=h,t[101]=u,t[102]=de):de=t[102];let he;return t[103]!==f?.tooltip||t[104]!==c||t[105]!==F||t[106]!==k||t[107]!==d?.tooltip||t[108]!==ct?(he=k&&ct&&c&&F?n.jsxRuntimeExports.jsx(Ve.Tooltip,{data:k,body:ct,xPos:c,yPos:F,backgroundStyle:d?.tooltip,className:f?.tooltip}):null,t[103]=f?.tooltip,t[104]=c,t[105]=F,t[106]=k,t[107]=d?.tooltip,t[108]=ct,t[109]=he):he=t[109],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ee.motion.svg,{width:`${W}px`,height:`${rt}px`,viewBox:`0 0 ${W} ${rt}`,direction:"ltr",ref:Kt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[_,n.jsxRuntimeExports.jsx(ke.CustomArea,{areaSettings:Nt,scaleX:r,scaleY:l,animate:o,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(We.YTicksAndGridLines,{values:yt.filter(li),y:yt.filter(ai).map(e=>l(e)),x1:0-C,x2:u+v.right,styles:tt,classNames:it,suffix:E,prefix:$,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),Ot,ne]}),n.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:Ne,x:Te,y1:0,y2:h,styles:oe,classNames:re,suffix:E,prefix:$,labelType:"primary",showGridLines:!0,precision:M}),ae,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ee.motion.path,{style:le,exit:ce,variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:h,x1:r(k.date),x2:r(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",f?.mouseOverLine),style:d?.mouseOverLine}):null]}),ue,Yt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Yt.map((e,g)=>n.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:l(e.value),x1:0-C,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g))}):null,xe,me,fe,de]})}),he]})}function ni(i){return i.layer}function si(i){return i.position==="after"}function oi(i){return i.layer}function ri(i){return i.position==="before"}function ai(i){return i!==0}function li(i){return i!==0}function ci(i){return!bt.checkIfNullOrUndefined(i.date)&&!bt.checkIfNullOrUndefined(i.y)}function ui(i){return i.date}function xi(i){return i!=null}function mi(i){return i.y}function fi(i){return i!=null}function pi(i){return i.y}function di(i){return i!=null}function hi(i){return i.y}function gi(i){return i!=null}function yi(i){return i.y}function vi(i){return i!=null}function ji(i){return i.y}function Ri(i){const t=n.compilerRuntimeExports.c(88),{data:y,graphTitle:W,lineColor:rt,suffix:Y,sources:E,prefix:$,graphDescription:s,height:at,width:O,footNote:At,noOfXTicks:Ct,dateFormat:C,showValues:kt,padding:lt,backgroundColor:ct,leftMargin:Lt,rightMargin:Yt,topMargin:Xt,bottomMargin:ut,relativeHeight:o,tooltip:St,onSeriesMouseOver:xt,highlightAreaSettings:Dt,graphID:Ut,minValue:mt,maxValue:ft,maxDate:X,minDate:Bt,graphDownload:zt,dataDownload:Jt,animate:pt,language:d,refValues:f,minHeight:M,strokeWidth:V,showDots:Kt,annotations:I,customHighlightAreaSettings:x,theme:b,ariaLabel:Qt,regressionLine:dt,yAxisTitle:U,noOfYTicks:ie,curveType:k,styles:m,classNames:c,precision:Zt,customLayers:F}=i,qt=Y===void 0?"":Y,ht=$===void 0?"":$,B=Ct===void 0?10:Ct,v=C===void 0?"yyyy":C,z=kt===void 0?!1:kt,J=ct===void 0?!1:ct,a=Lt===void 0?30:Lt,K=Yt===void 0?30:Yt,gt=Xt===void 0?20:Xt,Q=ut===void 0?25:ut;let Nt;t[0]!==Dt?(Nt=Dt===void 0?[]:Dt,t[0]=Dt,t[1]=Nt):Nt=t[1];const u=Nt,h=zt===void 0?!1:zt,Tt=Jt===void 0?!1:Jt,$t=pt===void 0?!1:pt,p=d===void 0?"en":d;let L;t[2]!==f?(L=f===void 0?[]:f,t[2]=f,t[3]=L):L=t[3];const r=L,Z=M===void 0?0:M,l=V===void 0?2:V,Mt=Kt===void 0?!0:Kt;let yt;t[4]!==I?(yt=I===void 0?[]:I,t[4]=I,t[5]=yt):yt=t[5];const Vt=yt;let It;t[6]!==x?(It=x===void 0?[]:x,t[6]=x,t[7]=It):It=t[7];const Ft=It,_=b===void 0?"light":b,vt=dt===void 0?!1:dt,jt=ie===void 0?5:ie,tt=k===void 0?"curve":k,Rt=Zt===void 0?2:Zt;let et;t[8]!==F?(et=F===void 0?[]:F,t[8]=F,t[9]=et):et=t[9];const it=et,[H,_t]=w.useState(0),[nt,te]=w.useState(0),wt=w.useRef(null),G=w.useRef(null);let st,ot;t[10]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{const Ot=new ResizeObserver(Ht=>{_t(Ht[0].target.clientWidth||620),te(Ht[0].target.clientHeight||480)});return wt.current&&Ot.observe(wt.current),()=>Ot.disconnect()},ot=[],t[10]=st,t[11]=ot):(st=t[10],ot=t[11]),w.useEffect(st,ot);const Et=c?.graphContainer,S=m?.graphContainer;let D;t[12]!==c?.description||t[13]!==c?.title||t[14]!==y||t[15]!==Tt||t[16]!==s||t[17]!==h||t[18]!==W||t[19]!==m?.description||t[20]!==m?.title||t[21]!==O?(D=W||s||h||Tt?n.jsxRuntimeExports.jsx(Ze.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:c?.title,description:c?.description},graphTitle:W,graphDescription:s,width:O,graphDownload:h?G:void 0,dataDownload:Tt?y.map(Ai).filter(bi).length>0?y.map(Oi).filter(Ei):y.filter(wi):null}):null,t[12]=c?.description,t[13]=c?.title,t[14]=y,t[15]=Tt,t[16]=s,t[17]=h,t[18]=W,t[19]=m?.description,t[20]=m?.title,t[21]=O,t[22]=D):D=t[22];let q;t[23]!==y.length?(q=y.length===0&&n.jsxRuntimeExports.jsx(ti.EmptyState,{}),t[23]=y.length,t[24]=q):q=t[24];let R;t[25]!==$t||t[26]!==Vt||t[27]!==Q||t[28]!==c||t[29]!==tt||t[30]!==Ft||t[31]!==it||t[32]!==y||t[33]!==v||t[34]!==u||t[35]!==p||t[36]!==a||t[37]!==rt||t[38]!==X||t[39]!==ft||t[40]!==Bt||t[41]!==mt||t[42]!==B||t[43]!==jt||t[44]!==xt||t[45]!==Rt||t[46]!==ht||t[47]!==r||t[48]!==vt||t[49]!==K||t[50]!==Mt||t[51]!==z||t[52]!==l||t[53]!==m||t[54]!==qt||t[55]!==nt||t[56]!==H||t[57]!==St||t[58]!==gt||t[59]!==U?(R=H&&nt&&y.length>0?n.jsxRuntimeExports.jsx(ii,{data:y,lineColor:rt||_e.Colors.primaryColors["blue-600"],width:H,height:nt,suffix:qt,prefix:ht,dateFormat:v,showValues:z,noOfXTicks:B??ei.getNoOfTicks(H),leftMargin:a,rightMargin:K,topMargin:gt,bottomMargin:Q,tooltip:St,highlightAreaSettings:u,onSeriesMouseOver:xt,refValues:r,minValue:mt,maxValue:ft,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},rtl:p==="he"||p==="ar",strokeWidth:l,showDots:Mt,annotations:Vt,customHighlightAreaSettings:Ft,regressionLine:vt,yAxisTitle:U,noOfYTicks:jt,maxDate:X,minDate:Bt,curveType:tt,styles:m,classNames:c,precision:Rt,customLayers:it}):null,t[25]=$t,t[26]=Vt,t[27]=Q,t[28]=c,t[29]=tt,t[30]=Ft,t[31]=it,t[32]=y,t[33]=v,t[34]=u,t[35]=p,t[36]=a,t[37]=rt,t[38]=X,t[39]=ft,t[40]=Bt,t[41]=mt,t[42]=B,t[43]=jt,t[44]=xt,t[45]=Rt,t[46]=ht,t[47]=r,t[48]=vt,t[49]=K,t[50]=Mt,t[51]=z,t[52]=l,t[53]=m,t[54]=qt,t[55]=nt,t[56]=H,t[57]=St,t[58]=gt,t[59]=U,t[60]=R):R=t[60];let N;t[61]!==q||t[62]!==R?(N=n.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:wt,children:[q,R]}),t[61]=q,t[62]=R,t[63]=N):N=t[63];let T;t[64]!==c?.footnote||t[65]!==c?.source||t[66]!==At||t[67]!==E||t[68]!==m?.footnote||t[69]!==m?.source||t[70]!==O?(T=E||At?n.jsxRuntimeExports.jsx(Qe.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:E,footNote:At,width:O}):null,t[64]=c?.footnote,t[65]=c?.source,t[66]=At,t[67]=E,t[68]=m?.footnote,t[69]=m?.source,t[70]=O,t[71]=T):T=t[71];let A;return t[72]!==Qt||t[73]!==J||t[74]!==Ut||t[75]!==at||t[76]!==p||t[77]!==Z||t[78]!==lt||t[79]!==o||t[80]!==Et||t[81]!==S||t[82]!==D||t[83]!==N||t[84]!==T||t[85]!==_||t[86]!==O?(A=n.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:Et,style:S,id:Ut,ref:G,"aria-label":Qt,backgroundColor:J,theme:_,language:p,minHeight:Z,width:O,height:at,relativeHeight:o,padding:lt,children:[D,N,T]}),t[72]=Qt,t[73]=J,t[74]=Ut,t[75]=at,t[76]=p,t[77]=Z,t[78]=lt,t[79]=o,t[80]=Et,t[81]=S,t[82]=D,t[83]=N,t[84]=T,t[85]=_,t[86]=O,t[87]=A):A=t[87],A}function wi(i){return i!==void 0}function Ei(i){return i!==void 0}function Oi(i){return i.data}function bi(i){return i!==void 0}function Ai(i){return i.data}exports.SimpleLineChart=Ri;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),w=require("react"),j=require("./parse-xYI9yrvL.cjs"),Le=require("./simple-statistics-xm8c0LQQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Se=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ke=require("./customArea-B1LWQBmM.cjs"),Ie=require("./Axis-Jt_tmhxS.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ge=require("./ReferenceLine-M9aP3dj-.cjs"),Pe=require("./RegressionLine-Ci-Dh0w0.cjs"),We=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Ue=require("./linear-CgUCbw9F.cjs"),De=require("./line-DaEMhXmx.cjs"),ge=require("./step-BZ3C8QFW.cjs"),Be=require("./select-Bnfk0lJx.cjs"),ee=require("./proxy-C4-uo6nS.cjs"),ze=require("./init-DU0ybBc_.cjs"),Je=require("./pointer-Dkq5NV1q.cjs"),Ke=require("./use-in-view-C3o_ntMv.cjs"),Qe=require("./GraphFooter.cjs"),Ze=require("./GraphHeader.cjs"),_e=require("./Colors.cjs"),ti=require("./EmptyState-DX0t62iF.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ei=require("./getNoOfTicks-C_1CFXv_.cjs");function ii(i){const t=n.compilerRuntimeExports.c(110),{data:y,width:W,height:rt,lineColor:Y,suffix:E,prefix:$,dateFormat:s,highlightAreaSettings:at,showValues:O,noOfXTicks:At,rightMargin:Ct,leftMargin:C,topMargin:kt,bottomMargin:lt,tooltip:ct,onSeriesMouseOver:Lt,refValues:Yt,minValue:Xt,maxValue:ut,animate:o,rtl:St,strokeWidth:xt,showDots:Dt,annotations:Ut,customHighlightAreaSettings:mt,regressionLine:ft,yAxisTitle:X,noOfYTicks:Bt,maxDate:zt,minDate:Jt,curveType:pt,styles:d,classNames:f,precision:M,customLayers:V}=i,Kt=w.useRef(null);let I;t[0]!==o.amount||t[1]!==o.once?(I={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=I):I=t[2];const x=Ke.useInView(Kt,I),[b,Qt]=w.useState(!1);let dt,U;t[3]!==o.duration||t[4]!==b||t[5]!==x?(dt=()=>{if(x&&!b){const e=setTimeout(()=>{Qt(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},U=[x,b,o.duration],t[3]=o.duration,t[4]=b,t[5]=x,t[6]=dt,t[7]=U):(dt=t[6],U=t[7]),w.useEffect(dt,U);const ie=pt==="linear"?De.curveLinear:pt==="step"?ge.curveStep:pt==="stepAfter"?ge.stepAfter:pt==="stepBefore"?ge.stepBefore:ge.monotoneX,[k,m]=w.useState(void 0),[c,Zt]=w.useState(void 0),[F,qt]=w.useState(void 0),ht=X?C+30:C;let B;t[8]!==lt||t[9]!==Ct||t[10]!==ht||t[11]!==kt?(B={top:kt,bottom:lt,left:ht,right:Ct},t[8]=lt,t[9]=Ct,t[10]=ht,t[11]=kt,t[12]=B):B=t[12];const v=B,z=w.useRef(null);let J;t[13]!==s?(J=e=>({...e,date:j.parse(`${e.date}`,s,new Date)}),t[13]=s,t[14]=J):J=t[14];const a=Me.orderBy(y.map(J),["date"],["asc"]);let K;if(t[15]!==s||t[16]!==at){let e;t[18]!==s?(e=g=>({...g,coordinates:[g.coordinates[0]===null?null:j.parse(`${g.coordinates[0]}`,s,new Date),g.coordinates[1]===null?null:j.parse(`${g.coordinates[1]}`,s,new Date)]}),t[18]=s,t[19]=e):e=t[19],K=at.map(e),t[15]=s,t[16]=at,t[17]=K}else K=t[17];const gt=K;let Q;if(t[20]!==mt||t[21]!==s){let e;t[23]!==s?(e=g=>({...g,coordinates:g.coordinates.map((P,Wt)=>Wt%2===0?j.parse(`${P}`,s,new Date):P)}),t[23]=s,t[24]=e):e=t[24],Q=mt.map(e),t[20]=mt,t[21]=s,t[22]=Q}else Q=t[22];const Nt=Q,u=W-v.left-v.right,h=rt-v.top-v.bottom,Tt=Jt?j.parse(`${Jt}`,s,new Date):a[0].date,$t=zt?j.parse(`${zt}`,s,new Date):a[a.length-1].date,p=bt.checkIfNullOrUndefined(Xt)?Math.min(...a.map(ji).filter(vi))!==1/0?Math.min(...a.map(yi).filter(gi))>0?0:Math.min(...a.map(hi).filter(di)):0:Xt,L=Math.max(...a.map(pi).filter(fi))!==1/0?Math.max(...a.map(mi).filter(xi)):0,r=Xe.time().domain([Tt,$t]).range([0,u]);let Z;t[25]!==L||t[26]!==ut?(Z=bt.checkIfNullOrUndefined(ut)?L>0?L:0:ut,t[25]=L,t[26]=ut,t[27]=Z):Z=t[27];const l=Ue.linear().domain([p,Z]).range([h,0]).nice(),Mt=De.line().x(e=>r(e.date)).y(e=>l(e.y)).curve(ie),yt=l.ticks(Bt),Vt=r.ticks(At);w.useEffect(()=>{const e=P=>{const Wt=a[ze.bisectCenter(a.map(ui),r.invert(Je.pointer(P)[0]),0)];m(Wt||a[a.length-1]),Lt?.(Wt||a[a.length-1]),qt(P.clientY),Zt(P.clientX)},g=()=>{m(void 0),Zt(void 0),qt(void 0),Lt?.(void 0)};Be.select(z.current).on("mousemove",e).on("mouseout",g)},[r,a,Lt]);const It=Le.linearRegression(a.filter(ci).map(e=>[r(e.date),l(e.y)])),Ft=Le.linearRegressionLine(It);let _;t[28]!==o||t[29]!==h||t[30]!==u||t[31]!==gt||t[32]!==x||t[33]!==r?(_=n.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:gt,width:u,height:h,scale:r,animate:o,isInView:x}),t[28]=o,t[29]=h,t[30]=u,t[31]=gt,t[32]=x,t[33]=r,t[34]=_):_=t[34];const vt=d?.yAxis?.gridLines,jt=d?.yAxis?.labels;let tt;t[35]!==vt||t[36]!==jt?(tt={gridLines:vt,labels:jt},t[35]=vt,t[36]=jt,t[37]=tt):tt=t[37];const Rt=f?.yAxis?.gridLines,et=f?.yAxis?.labels;let it;t[38]!==Rt||t[39]!==et?(it={gridLines:Rt,labels:et},t[38]=Rt,t[39]=et,t[40]=it):it=t[40];const H=l(p<0?0:p),_t=l(p<0?0:p),nt=0-C,te=u+v.right,wt=p<0?0:p;let G;t[41]!==M||t[42]!==$||t[43]!==E||t[44]!==wt?(G=Se.numberFormattingFunction(wt,"NA",M,$,E),t[41]=M,t[42]=$,t[43]=E,t[44]=wt,t[45]=G):G=t[45];const st=0-C,ot=l(p<0?0:p),Et=L<0?"1em":-5;let S;t[46]!==st||t[47]!==ot||t[48]!==Et?(S={x:st,y:ot,dx:0,dy:Et},t[46]=st,t[47]=ot,t[48]=Et,t[49]=S):S=t[49];const D=f?.xAxis?.axis,q=f?.yAxis?.labels;let R;t[50]!==D||t[51]!==q?(R={axis:D,label:q},t[50]=D,t[51]=q,t[52]=R):R=t[52];const N=d?.xAxis?.axis,T=d?.yAxis?.labels;let A;t[53]!==N||t[54]!==T?(A={axis:N,label:T},t[53]=N,t[54]=T,t[55]=A):A=t[55];let Ot;t[56]!==H||t[57]!==_t||t[58]!==nt||t[59]!==te||t[60]!==G||t[61]!==S||t[62]!==R||t[63]!==A?(Ot=n.jsxRuntimeExports.jsx(Ie.Axis,{y1:H,y2:_t,x1:nt,x2:te,label:G,labelPos:S,classNames:R,styles:A}),t[56]=H,t[57]=_t,t[58]=nt,t[59]=te,t[60]=G,t[61]=S,t[62]=R,t[63]=A,t[64]=Ot):Ot=t[64];const Ht=0-C-15,ye=h/2,ve=d?.yAxis?.title,je=f?.yAxis?.title;let ne;t[65]!==Ht||t[66]!==ye||t[67]!==ve||t[68]!==je||t[69]!==X?(ne=n.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:Ht,y:ye,style:ve,className:je,text:X,rotate90:!0}),t[65]=Ht,t[66]=ye,t[67]=ve,t[68]=je,t[69]=X,t[70]=ne):ne=t[70];let se;t[71]!==s?(se=e=>j.format(e,s),t[71]=s,t[72]=se):se=t[72];const Ne=Vt.map(se),Te=Vt.map(e=>r(e)),Re=d?.xAxis?.gridLines,we=d?.xAxis?.labels;let oe;t[73]!==Re||t[74]!==we?(oe={gridLines:Re,labels:we},t[73]=Re,t[74]=we,t[75]=oe):oe=t[75];const Ee=f?.xAxis?.gridLines;let Gt;t[76]!==Ee?(Gt=n.mo("opacity-0",Ee),t[76]=Ee,t[77]=Gt):Gt=t[77];const Oe=f?.xAxis?.labels;let Pt;t[78]!==Oe?(Pt=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",Oe),t[78]=Oe,t[79]=Pt):Pt=t[79];let re;t[80]!==Gt||t[81]!==Pt?(re={gridLines:Gt,labels:Pt},t[80]=Gt,t[81]=Pt,t[82]=re):re=t[82];let ae;t[83]!==V?(ae=V.filter(ri).map(oi),t[83]=V,t[84]=ae):ae=t[84];let le;t[85]!==Y||t[86]!==xt?(le={stroke:Y,fill:"none",strokeWidth:xt},t[85]=Y,t[86]=xt,t[87]=le):le=t[87];let ce;t[88]!==o.duration?(ce={opacity:0,transition:{duration:o.duration}},t[88]=o.duration,t[89]=ce):ce=t[89];const be=a.map((e,g)=>n.jsxRuntimeExports.jsx(ee.motion.g,{children:bt.checkIfNullOrUndefined(e.y)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Dt?n.jsxRuntimeExports.jsx(ee.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:r(e.date),cy:l(e.y),fill:Y},whileInView:{opacity:1,fill:Y,transition:{duration:b?o.duration:.5,delay:b?0:o.duration},cx:r(e.date),cy:l(e.y)}},initial:"initial",animate:x?"whileInView":"initial"}):null,O?n.jsxRuntimeExports.jsx(ee.motion.text,{dy:-8,style:{textAnchor:"middle",...d?.graphObjectValues||{}},className:n.mo("graph-value text-xs font-bold",f?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,x:r(e.date),y:l(e.y)},whileInView:{opacity:1,x:r(e.date),y:l(e.y),transition:{duration:b?o.duration:.5,delay:b?0:o.duration}}},initial:"initial",animate:x?"whileInView":"initial",children:Se.numberFormattingFunction(e.y,"NA",M,$,E)}):null]})},g));let ue;t[90]!==be?(ue=n.jsxRuntimeExports.jsx("g",{children:be}),t[90]=be,t[91]=ue):ue=t[91];const Ae=Ut.map((e,g)=>{const P=ke.getLineEndPoint({x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,y:e.yCoordinate?l(e.yCoordinate):0},bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Wt=e.showConnector?{y1:P.y,x1:P.x,y2:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?l(e.yCoordinate):0,cx:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date)):0,circleRadius:bt.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,$e={y:e.yCoordinate?l(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:St?0:e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:St?e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?r(j.parse(`${e.xCoordinate}`,s,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return n.jsxRuntimeExports.jsx(ke.Annotation,{color:e.color,connectorsSettings:Wt,labelSettings:$e,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g)});let xe;t[92]!==Ae?(xe=n.jsxRuntimeExports.jsx("g",{children:Ae}),t[92]=Ae,t[93]=xe):xe=t[93];const Ce=ft?n.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:u,y1:Ft(0),y2:Ft(u),graphHeight:h,graphWidth:u,className:f?.regLine,style:d?.regLine,color:typeof ft=="string"?ft:void 0,animate:o,isInView:x}):null;let me;t[94]!==Ce?(me=n.jsxRuntimeExports.jsx("g",{children:Ce}),t[94]=Ce,t[95]=me):me=t[95];let fe;t[96]!==V?(fe=V.filter(si).map(ni),t[96]=V,t[97]=fe):fe=t[97];let pe;t[98]===Symbol.for("react.memo_cache_sentinel")?(pe={fill:"none",pointerEvents:"all"},t[98]=pe):pe=t[98];let de;t[99]!==z||t[100]!==h||t[101]!==u?(de=n.jsxRuntimeExports.jsx("rect",{ref:z,style:pe,width:u,height:h}),t[99]=z,t[100]=h,t[101]=u,t[102]=de):de=t[102];let he;return t[103]!==f?.tooltip||t[104]!==c||t[105]!==F||t[106]!==k||t[107]!==d?.tooltip||t[108]!==ct?(he=k&&ct&&c&&F?n.jsxRuntimeExports.jsx(Ve.Tooltip,{data:k,body:ct,xPos:c,yPos:F,backgroundStyle:d?.tooltip,className:f?.tooltip}):null,t[103]=f?.tooltip,t[104]=c,t[105]=F,t[106]=k,t[107]=d?.tooltip,t[108]=ct,t[109]=he):he=t[109],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ee.motion.svg,{width:`${W}px`,height:`${rt}px`,viewBox:`0 0 ${W} ${rt}`,direction:"ltr",ref:Kt,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[_,n.jsxRuntimeExports.jsx(ke.CustomArea,{areaSettings:Nt,scaleX:r,scaleY:l,animate:o,isInView:x}),n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(We.YTicksAndGridLines,{values:yt.filter(li),y:yt.filter(ai).map(e=>l(e)),x1:0-C,x2:u+v.right,styles:tt,classNames:it,suffix:E,prefix:$,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:M}),Ot,ne]}),n.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:Ne,x:Te,y1:0,y2:h,styles:oe,classNames:re,suffix:E,prefix:$,labelType:"primary",showGridLines:!0,precision:M}),ae,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ee.motion.path,{style:le,exit:ce,variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:x?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:h,x1:r(k.date),x2:r(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",f?.mouseOverLine),style:d?.mouseOverLine}):null]}),ue,Yt?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Yt.map((e,g)=>n.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:l(e.value),x1:0-C,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:x},g))}):null,xe,me,fe,de]})}),he]})}function ni(i){return i.layer}function si(i){return i.position==="after"}function oi(i){return i.layer}function ri(i){return i.position==="before"}function ai(i){return i!==0}function li(i){return i!==0}function ci(i){return!bt.checkIfNullOrUndefined(i.date)&&!bt.checkIfNullOrUndefined(i.y)}function ui(i){return i.date}function xi(i){return i!=null}function mi(i){return i.y}function fi(i){return i!=null}function pi(i){return i.y}function di(i){return i!=null}function hi(i){return i.y}function gi(i){return i!=null}function yi(i){return i.y}function vi(i){return i!=null}function ji(i){return i.y}function Ri(i){const t=n.compilerRuntimeExports.c(88),{data:y,graphTitle:W,lineColor:rt,suffix:Y,sources:E,prefix:$,graphDescription:s,height:at,width:O,footNote:At,noOfXTicks:Ct,dateFormat:C,showValues:kt,padding:lt,backgroundColor:ct,leftMargin:Lt,rightMargin:Yt,topMargin:Xt,bottomMargin:ut,relativeHeight:o,tooltip:St,onSeriesMouseOver:xt,highlightAreaSettings:Dt,graphID:Ut,minValue:mt,maxValue:ft,maxDate:X,minDate:Bt,graphDownload:zt,dataDownload:Jt,animate:pt,language:d,refValues:f,minHeight:M,strokeWidth:V,showDots:Kt,annotations:I,customHighlightAreaSettings:x,theme:b,ariaLabel:Qt,regressionLine:dt,yAxisTitle:U,noOfYTicks:ie,curveType:k,styles:m,classNames:c,precision:Zt,customLayers:F}=i,qt=Y===void 0?"":Y,ht=$===void 0?"":$,B=Ct===void 0?10:Ct,v=C===void 0?"yyyy":C,z=kt===void 0?!1:kt,J=ct===void 0?!1:ct,a=Lt===void 0?30:Lt,K=Yt===void 0?30:Yt,gt=Xt===void 0?20:Xt,Q=ut===void 0?25:ut;let Nt;t[0]!==Dt?(Nt=Dt===void 0?[]:Dt,t[0]=Dt,t[1]=Nt):Nt=t[1];const u=Nt,h=zt===void 0?!1:zt,Tt=Jt===void 0?!1:Jt,$t=pt===void 0?!1:pt,p=d===void 0?"en":d;let L;t[2]!==f?(L=f===void 0?[]:f,t[2]=f,t[3]=L):L=t[3];const r=L,Z=M===void 0?0:M,l=V===void 0?2:V,Mt=Kt===void 0?!0:Kt;let yt;t[4]!==I?(yt=I===void 0?[]:I,t[4]=I,t[5]=yt):yt=t[5];const Vt=yt;let It;t[6]!==x?(It=x===void 0?[]:x,t[6]=x,t[7]=It):It=t[7];const Ft=It,_=b===void 0?"light":b,vt=dt===void 0?!1:dt,jt=ie===void 0?5:ie,tt=k===void 0?"curve":k,Rt=Zt===void 0?2:Zt;let et;t[8]!==F?(et=F===void 0?[]:F,t[8]=F,t[9]=et):et=t[9];const it=et,[H,_t]=w.useState(0),[nt,te]=w.useState(0),wt=w.useRef(null),G=w.useRef(null);let st,ot;t[10]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{const Ot=new ResizeObserver(Ht=>{_t(Ht[0].target.clientWidth||620),te(Ht[0].target.clientHeight||480)});return wt.current&&Ot.observe(wt.current),()=>Ot.disconnect()},ot=[],t[10]=st,t[11]=ot):(st=t[10],ot=t[11]),w.useEffect(st,ot);const Et=c?.graphContainer,S=m?.graphContainer;let D;t[12]!==c?.description||t[13]!==c?.title||t[14]!==y||t[15]!==Tt||t[16]!==s||t[17]!==h||t[18]!==W||t[19]!==m?.description||t[20]!==m?.title||t[21]!==O?(D=W||s||h||Tt?n.jsxRuntimeExports.jsx(Ze.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:c?.title,description:c?.description},graphTitle:W,graphDescription:s,width:O,graphDownload:h?G:void 0,dataDownload:Tt?y.map(Ai).filter(bi).length>0?y.map(Oi).filter(Ei):y.filter(wi):null}):null,t[12]=c?.description,t[13]=c?.title,t[14]=y,t[15]=Tt,t[16]=s,t[17]=h,t[18]=W,t[19]=m?.description,t[20]=m?.title,t[21]=O,t[22]=D):D=t[22];let q;t[23]!==y.length?(q=y.length===0&&n.jsxRuntimeExports.jsx(ti.EmptyState,{}),t[23]=y.length,t[24]=q):q=t[24];let R;t[25]!==$t||t[26]!==Vt||t[27]!==Q||t[28]!==c||t[29]!==tt||t[30]!==Ft||t[31]!==it||t[32]!==y||t[33]!==v||t[34]!==u||t[35]!==p||t[36]!==a||t[37]!==rt||t[38]!==X||t[39]!==ft||t[40]!==Bt||t[41]!==mt||t[42]!==B||t[43]!==jt||t[44]!==xt||t[45]!==Rt||t[46]!==ht||t[47]!==r||t[48]!==vt||t[49]!==K||t[50]!==Mt||t[51]!==z||t[52]!==l||t[53]!==m||t[54]!==qt||t[55]!==nt||t[56]!==H||t[57]!==St||t[58]!==gt||t[59]!==U?(R=H&&nt&&y.length>0?n.jsxRuntimeExports.jsx(ii,{data:y,lineColor:rt||_e.Colors.primaryColors["blue-600"],width:H,height:nt,suffix:qt,prefix:ht,dateFormat:v,showValues:z,noOfXTicks:B??ei.getNoOfTicks(H),leftMargin:a,rightMargin:K,topMargin:gt,bottomMargin:Q,tooltip:St,highlightAreaSettings:u,onSeriesMouseOver:xt,refValues:r,minValue:mt,maxValue:ft,animate:$t===!0?{duration:.5,once:!0,amount:.5}:$t||{duration:0,once:!0,amount:0},rtl:p==="he"||p==="ar",strokeWidth:l,showDots:Mt,annotations:Vt,customHighlightAreaSettings:Ft,regressionLine:vt,yAxisTitle:U,noOfYTicks:jt,maxDate:X,minDate:Bt,curveType:tt,styles:m,classNames:c,precision:Rt,customLayers:it}):null,t[25]=$t,t[26]=Vt,t[27]=Q,t[28]=c,t[29]=tt,t[30]=Ft,t[31]=it,t[32]=y,t[33]=v,t[34]=u,t[35]=p,t[36]=a,t[37]=rt,t[38]=X,t[39]=ft,t[40]=Bt,t[41]=mt,t[42]=B,t[43]=jt,t[44]=xt,t[45]=Rt,t[46]=ht,t[47]=r,t[48]=vt,t[49]=K,t[50]=Mt,t[51]=z,t[52]=l,t[53]=m,t[54]=qt,t[55]=nt,t[56]=H,t[57]=St,t[58]=gt,t[59]=U,t[60]=R):R=t[60];let N;t[61]!==q||t[62]!==R?(N=n.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:wt,children:[q,R]}),t[61]=q,t[62]=R,t[63]=N):N=t[63];let T;t[64]!==c?.footnote||t[65]!==c?.source||t[66]!==At||t[67]!==E||t[68]!==m?.footnote||t[69]!==m?.source||t[70]!==O?(T=E||At?n.jsxRuntimeExports.jsx(Qe.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:E,footNote:At,width:O}):null,t[64]=c?.footnote,t[65]=c?.source,t[66]=At,t[67]=E,t[68]=m?.footnote,t[69]=m?.source,t[70]=O,t[71]=T):T=t[71];let A;return t[72]!==Qt||t[73]!==J||t[74]!==Ut||t[75]!==at||t[76]!==p||t[77]!==Z||t[78]!==lt||t[79]!==o||t[80]!==Et||t[81]!==S||t[82]!==D||t[83]!==N||t[84]!==T||t[85]!==_||t[86]!==O?(A=n.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:Et,style:S,id:Ut,ref:G,"aria-label":Qt,backgroundColor:J,theme:_,language:p,minHeight:Z,width:O,height:at,relativeHeight:o,padding:lt,children:[D,N,T]}),t[72]=Qt,t[73]=J,t[74]=Ut,t[75]=at,t[76]=p,t[77]=Z,t[78]=lt,t[79]=o,t[80]=Et,t[81]=S,t[82]=D,t[83]=N,t[84]=T,t[85]=_,t[86]=O,t[87]=A):A=t[87],A}function wi(i){return i!==void 0}function Ei(i){return i!==void 0}function Oi(i){return i.data}function bi(i){return i!==void 0}function Ai(i){return i.data}exports.SimpleLineChart=Ri;
2
2
  //# sourceMappingURL=SimpleLineChart.cjs.map
@@ -26,7 +26,7 @@ import { u as ri } from "./use-in-view-Dl5L8LtP.js";
26
26
  import { GraphFooter as li } from "./GraphFooter.js";
27
27
  import { GraphHeader as ci } from "./GraphHeader.js";
28
28
  import { Colors as mi } from "./Colors.js";
29
- import { E as fi } from "./EmptyState-tZBErBKF.js";
29
+ import { E as fi } from "./EmptyState-Pj-emXt5.js";
30
30
  import { a as ui, G as pi } from "./GraphContainer-CF6ws3pd.js";
31
31
  import { g as xi } from "./getNoOfTicks-CpmRjcRF.js";
32
32
  function di(i) {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-DxnGtm3t.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-ic8C5Ksc.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),o=require("react"),te=require("./index-CyZ1lmi_.cjs"),q=require("./index-BS2TADPj.cjs"),le=require("./index-DQA8q5sC.cjs"),C=require("./DropdownSelect-NNpOs7DX.cjs"),d=require("./checkIfMultiple-DxnGtm3t.cjs"),ne=require("./Spinner-jTMOLuw_.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),re=require("./GraphEl-CWjTuiYd.cjs"),$=require("./fetchAndParseData-QTF6tjij.cjs"),U=require("./transformDataForAggregation-BFdha9Dx.cjs"),z=require("./getUniqValue-NX8DgwND.cjs"),se=require("./GraphHeader.cjs"),W=require("./filterData-T5DQBE9b.cjs"),oe=require("./getGraphList-DQ24IzAn.cjs"),J=require("./transformDataForSelect-YmStusCI.cjs"),ue=u=>{if(u.findIndex(n=>n.chartConfigId==="yMin")!==-1&&u.findIndex(n=>n.chartConfigId==="yMax")!==-1)return u;const i=[...u];return u.findIndex(n=>n.chartConfigId==="yMin")===-1&&i.push({chartConfigId:"yMin",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Min`}),u.findIndex(n=>n.chartConfigId==="yMax")===-1&&i.push({chartConfigId:"yMax",columnId:`${u[u.findIndex(n=>n.chartConfigId==="y")].columnId}Max`}),i},M=(u,i)=>{const n=i?.map(D=>{const b=u?.findIndex(s=>s.chartConfigId===D.chartConfigId);if(b===-1)return{};const w=u[b]?.allowedColumnIds?.findIndex(s=>s.value===D.columnId);return w===-1?{}:u[b].allowedColumnIds[w].graphSettings||{}})||[];return Object.assign({},...n)};function de(u){const{graphSettings:i,dataSettings:n,filters:D,graphType:b,dataTransform:w,graphDataConfiguration:s,dataFilters:A,debugMode:S,dataSelectionOptions:I,advancedDataSelectionOptions:N,readableHeader:B,noOfFiltersPerRow:p=4,updateFilters:K,uiMode:f="normal",highlightDataPointSettings:m}=u,[P,F]=o.useState(void 0),[c,Q]=o.useState(void 0),[v,j]=o.useState(s),[x,V]=o.useState({}),[E,X]=o.useState(void 0),[Y,Z]=o.useState([]),H=o.useRef(null),O=o.useRef(s),[R,k]=o.useState([]),G={ignoreCase:!0,ignoreAccents:!0,trim:!0},L=o.useEffectEvent(()=>{const e=(D||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,ui:r.ui,defaultValue:J.transformDefaultValue(r.defaultValue),value:J.transformDefaultValue(r.defaultValue),availableValues:z.getUniqValue(c,r.column).filter(a=>!r.excludeValues?.includes(`${a}`)).map(a=>({value:a,label:a})),allowSelectAll:r.allowSelectAll,width:r.width}));k(e)});o.useEffect(()=>{(async()=>{try{const r=n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?await $.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,S):n.fileType==="api"?await $.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,S):await $.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,S,n.delimiter,!0):await $.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):await $.transformColumnsToArray(n.data,n.columnsToArray);Q(r)}catch(r){console.error("Data fetching error:",r)}})(),L()},[n,S]),o.useEffect(()=>{L()},[D,c]);const _=o.useEffectEvent(()=>{if(!c||R.length===0)F(c);else{const e=c.filter(r=>R.every(a=>a.value&&q.flattenDeep([a.value]).length>0?te.intersection(q.flattenDeep([r[a.filter]]),q.flattenDeep([a.value]).map(t=>t.value)).length>0:!0));F(e)}});o.useEffect(()=>{_()},[R,c]),o.useEffect(()=>{I&&V(M(I,s))},[I,s]);const ee=o.useEffectEvent(()=>{m?.column&&P&&Z(z.getUniqValue(P,m.column).filter(e=>!m?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});o.useEffect(()=>{ee()},[m]),o.useEffect(()=>{le.isEqual(O.current,s)||(j(s),O.current=s)},[s]);const y=(e,r)=>{k(a=>a.map(t=>t.filter===e?{...t,value:r}:t))},ae=c?U.transformDataForGraph(w?U.transformDataForAggregation(W.filterData(c,A||[]),w.keyColumn,w.aggregationColumnsSetting):W.filterData(c,A||[]),b,b==="lineChartWithConfidenceInterval"&&v?ue(v):v):void 0;return l.jsxRuntimeExports.jsx(ie.GraphContainer,{className:i?.classNames?.graphContainer,style:i?.styles?.graphContainer,id:i?.graphID,ref:H,"aria-label":i?.ariaLabel,backgroundColor:i?.backgroundColor??!1,theme:i?.theme||"light",language:i?.language||"en",width:i?.width,height:i?.height,padding:i?.padding,minHeight:i?.minHeight,relativeHeight:i?.relativeHeight,children:c||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(b)!==-1?l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||i?.graphTitle||i?.graphDescription||i?.graphDownload||i?.dataDownload?l.jsxRuntimeExports.jsx(se.GraphHeader,{styles:{title:x?.styles?.title||i?.styles?.title,description:x?.styles?.description||i?.styles?.description},classNames:{title:x?.classNames?.title||i?.classNames?.title,description:x?.classNames?.description||i?.classNames?.description},graphTitle:x?.graphTitle||i?.graphTitle,graphDescription:x?.graphDescription||i?.graphDescription,width:x?.width||i?.width,graphDownload:i?.graphDownload?H:void 0,dataDownload:i?.dataDownload&&c&&c.length>0?c:null}):null,R.length!==0||(I||[]).length!==0||(N||[]).length!==0||m?l.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[N?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{V(a?.graphSettings||{}),j(a?.dataConfiguration)}}):l.jsxRuntimeExports.jsx(d.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:a=>{const t=e.options[e.options.findIndex(g=>g.label===a)];V(t.graphSettings||{}),j(t.dataConfiguration)},children:e.options.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),I?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,v||[])?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Du(G),onChange:a=>{const t={columnId:(a||[]).map(h=>h.value),chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)}}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:s?s[s.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);j(g)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:a.label,value:a.label},t))}):e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},g=v?.map(h=>h.chartConfigId===t.chartConfigId?t:h);V(M(I,g)),j(g)}}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:s?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===s[s.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const g={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},h=v?.map(T=>T.chartConfigId===g.chartConfigId?g:T);V(M(I,h)),j(h)},children:e.allowedColumnIds.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:a.label,value:a.label},t))})]},r)),R?.map((e,r)=>l.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:e.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.ye,{variant:f,defaultValue:e.defaultValue.value,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>t.value===a))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.he,{label:`${a.label}`,value:`${a.value}`},t))}):l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?l.jsxRuntimeExports.jsx(C.ja,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:a=>{y(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):l.jsxRuntimeExports.jsx(d.$,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{y(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>l.jsxRuntimeExports.jsx(d.P,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?l.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{y(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),m?l.jsxRuntimeExports.jsxs("div",{style:{width:m.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:m.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[l.jsxRuntimeExports.jsx(d.b,{className:"mb-2",children:m.label||"Highlight data"}),l.jsxRuntimeExports.jsx(C.ja,{options:Y,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Du(G),onChange:e=>{X(e?.map(r=>r.value))},value:E?.map(e=>({label:e,value:e})),defaultValue:m.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,l.jsxRuntimeExports.jsx(re.GraphEl,{graph:b,graphData:ae,graphDataConfiguration:v,debugMode:S,readableHeader:B||[],updateFilters:K,settings:{...i||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",theme:i?.theme,...E?{highlightedDataPoints:E,highlightedIds:E?.map(e=>`${e}`),highlightedLines:E?.map(e=>e)}:{}}})]}):l.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:l.jsxRuntimeExports.jsx(ne.w,{})})})}exports.SingleGraphDashboard=de;
2
2
  //# sourceMappingURL=SingleGraphDashboard.cjs.map
@@ -7,7 +7,7 @@ import { j as V, D as M } from "./DropdownSelect-D8rFbygC.js";
7
7
  import { b as A, y as H, h as O, c as da, $ as K, P as Q } from "./checkIfMultiple-D9fVkeOq.js";
8
8
  import { w as ha } from "./Spinner--r2RrJV8.js";
9
9
  import { G as ca } from "./GraphContainer-CF6ws3pd.js";
10
- import { G as fa } from "./GraphEl-L5hNe7wJ.js";
10
+ import { G as fa } from "./GraphEl-DDXkYObU.js";
11
11
  import { f as ga, a as pa, b as ma, c as Ca, t as va } from "./fetchAndParseData-BAXhgTDM.js";
12
12
  import { a as Ia, t as ba } from "./transformDataForAggregation-wdPf8bNt.js";
13
13
  import { g as X } from "./getUniqValue-DsqSii6M.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),q=require("./Typography-sa1UE0oF.cjs"),P=require("./GeoHubCompareMaps.cjs"),$=require("./GeoHubMap.cjs"),W=require("./GeoHubMapWithLayerSelection.cjs"),_=require("./GraphHeader.cjs"),B=require("./GraphContainer-B1EDxJ0S.cjs");function O(S){const e=l.compilerRuntimeExports.c(38),{settings:t,graph:a,debugMode:f}=S;f&&(console.log(`Graph: ${a}`),console.log("Settings:",t));let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={geoHubCompareMap:P.GeoHubCompareMaps,geoHubMap:$.GeoHubMap,geoHubMapWithLayerSelection:W.GeoHubMapWithLayerSelection},e[0]=g):g=e[0];const x=g;let d;e[1]!==t?.ariaLabel||e[2]!==t?.backgroundColor||e[3]!==t?.center||e[4]!==t?.classNames||e[5]!==t?.excludeLayers||e[6]!==t?.footNote||e[7]!==t?.graphDescription||e[8]!==t?.graphID||e[9]!==t?.graphTitle||e[10]!==t?.height||e[11]!==t?.includeLayers||e[12]!==t?.language||e[13]!==t?.layerSelection||e[14]!==t?.mapLegend||e[15]!==t?.mapStyle||e[16]!==t?.mapStyles||e[17]!==t?.minHeight||e[18]!==t?.padding||e[19]!==t?.relativeHeight||e[20]!==t?.sources||e[21]!==t?.styles||e[22]!==t?.theme||e[23]!==t?.uiMode||e[24]!==t?.width||e[25]!==t?.zoomLevel?(d=v=>{switch(v){case"geoHubCompareMap":return{theme:t?.theme,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,mapStyles:t?.mapStyles,center:t?.center,zoomLevel:t?.zoomLevel,language:t?.language,minHeight:t?.minHeight,ariaLabel:t?.ariaLabel,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMap":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,includeLayers:t?.includeLayers,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMapWithLayerSelection":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,layerSelection:t?.layerSelection,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,mapLegend:t?.mapLegend};default:return{}}},e[1]=t?.ariaLabel,e[2]=t?.backgroundColor,e[3]=t?.center,e[4]=t?.classNames,e[5]=t?.excludeLayers,e[6]=t?.footNote,e[7]=t?.graphDescription,e[8]=t?.graphID,e[9]=t?.graphTitle,e[10]=t?.height,e[11]=t?.includeLayers,e[12]=t?.language,e[13]=t?.layerSelection,e[14]=t?.mapLegend,e[15]=t?.mapStyle,e[16]=t?.mapStyles,e[17]=t?.minHeight,e[18]=t?.padding,e[19]=t?.relativeHeight,e[20]=t?.sources,e[21]=t?.styles,e[22]=t?.theme,e[23]=t?.uiMode,e[24]=t?.width,e[25]=t?.zoomLevel,e[26]=d):d=e[26];const c=d,o=x[a];let r;e[27]!==c||e[28]!==a?(r=c(a),e[27]=c,e[28]=a,e[29]=r):r=e[29];const h=r,p=`grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme||"light"}`;let s;e[30]===Symbol.for("react.memo_cache_sentinel")?(s={minHeight:"inherit"},e[30]=s):s=e[30];let i;e[31]!==o||e[32]!==a||e[33]!==h?(i=o?l.jsxRuntimeExports.jsx(o,{...h}):l.jsxRuntimeExports.jsx(q.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${a}`}),e[31]=o,e[32]=a,e[33]=h,e[34]=i):i=e[34];let n;return e[35]!==p||e[36]!==i?(n=l.jsxRuntimeExports.jsx("div",{className:p,style:s,children:i}),e[35]=p,e[36]=i,e[37]=n):n=e[37],n}function V(S){const e=l.compilerRuntimeExports.c(37),{graphSettings:t,graphType:a,debugMode:f,uiMode:g}=S,x=g===void 0?"normal":g,d=R.useRef(null),c=t?.classNames?.graphContainer,o=t?.styles?.graphContainer,r=t?.graphID,h=t?.ariaLabel,p=t?.backgroundColor??!1,s=t?.theme||"light",i=t?.language||"en",n=t?.width,v=t?.height,D=t?.padding,C=t?.minHeight,N=t?.relativeHeight,w=t?.styles?.title,G=t?.styles?.description;let u;e[0]!==w||e[1]!==G?(u={title:w,description:G},e[0]=w,e[1]=G,e[2]=u):u=e[2];const j=t?.classNames?.title,T=t?.classNames?.description;let m;e[3]!==j||e[4]!==T?(m={title:j,description:T},e[3]=j,e[4]=T,e[5]=m):m=e[5];const k=t?.graphTitle,E=t?.graphDescription,I=t?.width;let y;e[6]!==u||e[7]!==m||e[8]!==k||e[9]!==E||e[10]!==I?(y=l.jsxRuntimeExports.jsx(_.GraphHeader,{styles:u,classNames:m,graphTitle:k,graphDescription:E,width:I}),e[6]=u,e[7]=m,e[8]=k,e[9]=E,e[10]=I,e[11]=y):y=e[11];let b;e[12]!==t?(b=t||{},e[12]=t,e[13]=b):b=e[13];const z=t?.theme;let H;e[14]!==b||e[15]!==z||e[16]!==x?(H={...b,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",uiMode:x,theme:z},e[14]=b,e[15]=z,e[16]=x,e[17]=H):H=e[17];let L;e[18]!==f||e[19]!==a||e[20]!==H?(L=l.jsxRuntimeExports.jsx(O,{graph:a,debugMode:f,settings:H}),e[18]=f,e[19]=a,e[20]=H,e[21]=L):L=e[21];let M;return e[22]!==c||e[23]!==D||e[24]!==C||e[25]!==N||e[26]!==o||e[27]!==y||e[28]!==L||e[29]!==r||e[30]!==h||e[31]!==p||e[32]!==s||e[33]!==i||e[34]!==n||e[35]!==v?(M=l.jsxRuntimeExports.jsxs(B.GraphContainer,{className:c,style:o,id:r,ref:d,"aria-label":h,backgroundColor:p,theme:s,language:i,width:n,height:v,padding:D,minHeight:C,relativeHeight:N,children:[y,L]}),e[22]=c,e[23]=D,e[24]=C,e[25]=N,e[26]=o,e[27]=y,e[28]=L,e[29]=r,e[30]=h,e[31]=p,e[32]=s,e[33]=i,e[34]=n,e[35]=v,e[36]=M):M=e[36],M}exports.SingleGraphDashboardGeoHubMaps=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),R=require("react"),q=require("./Typography-DrJ7IOdw.cjs"),P=require("./GeoHubCompareMaps.cjs"),_=require("./GeoHubMap.cjs"),$=require("./GeoHubMapWithLayerSelection.cjs"),W=require("./GraphHeader.cjs"),B=require("./GraphContainer-B1EDxJ0S.cjs");function O(S){const e=l.compilerRuntimeExports.c(38),{settings:t,graph:a,debugMode:f}=S;f&&(console.log(`Graph: ${a}`),console.log("Settings:",t));let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={geoHubCompareMap:P.GeoHubCompareMaps,geoHubMap:_.GeoHubMap,geoHubMapWithLayerSelection:$.GeoHubMapWithLayerSelection},e[0]=g):g=e[0];const x=g;let d;e[1]!==t?.ariaLabel||e[2]!==t?.backgroundColor||e[3]!==t?.center||e[4]!==t?.classNames||e[5]!==t?.excludeLayers||e[6]!==t?.footNote||e[7]!==t?.graphDescription||e[8]!==t?.graphID||e[9]!==t?.graphTitle||e[10]!==t?.height||e[11]!==t?.includeLayers||e[12]!==t?.language||e[13]!==t?.layerSelection||e[14]!==t?.mapLegend||e[15]!==t?.mapStyle||e[16]!==t?.mapStyles||e[17]!==t?.minHeight||e[18]!==t?.padding||e[19]!==t?.relativeHeight||e[20]!==t?.sources||e[21]!==t?.styles||e[22]!==t?.theme||e[23]!==t?.uiMode||e[24]!==t?.width||e[25]!==t?.zoomLevel?(d=v=>{switch(v){case"geoHubCompareMap":return{theme:t?.theme,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,mapStyles:t?.mapStyles,center:t?.center,zoomLevel:t?.zoomLevel,language:t?.language,minHeight:t?.minHeight,ariaLabel:t?.ariaLabel,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMap":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,includeLayers:t?.includeLayers,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,styles:t?.styles,classNames:t?.classNames,mapLegend:t?.mapLegend};case"geoHubMapWithLayerSelection":return{theme:t?.theme,mapStyle:t?.mapStyle,center:t?.center,zoomLevel:t?.zoomLevel,graphTitle:t?.graphTitle,sources:t?.sources,graphDescription:t?.graphDescription,footNote:t?.footNote,backgroundColor:t?.backgroundColor,padding:t?.padding,width:t?.width,height:t?.height,relativeHeight:t?.relativeHeight,graphID:t?.graphID,language:t?.language,minHeight:t?.minHeight,layerSelection:t?.layerSelection,excludeLayers:t?.excludeLayers,ariaLabel:t?.ariaLabel,uiMode:t?.uiMode,mapLegend:t?.mapLegend};default:return{}}},e[1]=t?.ariaLabel,e[2]=t?.backgroundColor,e[3]=t?.center,e[4]=t?.classNames,e[5]=t?.excludeLayers,e[6]=t?.footNote,e[7]=t?.graphDescription,e[8]=t?.graphID,e[9]=t?.graphTitle,e[10]=t?.height,e[11]=t?.includeLayers,e[12]=t?.language,e[13]=t?.layerSelection,e[14]=t?.mapLegend,e[15]=t?.mapStyle,e[16]=t?.mapStyles,e[17]=t?.minHeight,e[18]=t?.padding,e[19]=t?.relativeHeight,e[20]=t?.sources,e[21]=t?.styles,e[22]=t?.theme,e[23]=t?.uiMode,e[24]=t?.width,e[25]=t?.zoomLevel,e[26]=d):d=e[26];const c=d,o=x[a];let r;e[27]!==c||e[28]!==a?(r=c(a),e[27]=c,e[28]=a,e[29]=r):r=e[29];const h=r,p=`grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme||"light"}`;let s;e[30]===Symbol.for("react.memo_cache_sentinel")?(s={minHeight:"inherit"},e[30]=s):s=e[30];let i;e[31]!==o||e[32]!==a||e[33]!==h?(i=o?l.jsxRuntimeExports.jsx(o,{...h}):l.jsxRuntimeExports.jsx(q._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${a}`}),e[31]=o,e[32]=a,e[33]=h,e[34]=i):i=e[34];let n;return e[35]!==p||e[36]!==i?(n=l.jsxRuntimeExports.jsx("div",{className:p,style:s,children:i}),e[35]=p,e[36]=i,e[37]=n):n=e[37],n}function V(S){const e=l.compilerRuntimeExports.c(37),{graphSettings:t,graphType:a,debugMode:f,uiMode:g}=S,x=g===void 0?"normal":g,d=R.useRef(null),c=t?.classNames?.graphContainer,o=t?.styles?.graphContainer,r=t?.graphID,h=t?.ariaLabel,p=t?.backgroundColor??!1,s=t?.theme||"light",i=t?.language||"en",n=t?.width,v=t?.height,D=t?.padding,C=t?.minHeight,N=t?.relativeHeight,w=t?.styles?.title,G=t?.styles?.description;let u;e[0]!==w||e[1]!==G?(u={title:w,description:G},e[0]=w,e[1]=G,e[2]=u):u=e[2];const j=t?.classNames?.title,T=t?.classNames?.description;let m;e[3]!==j||e[4]!==T?(m={title:j,description:T},e[3]=j,e[4]=T,e[5]=m):m=e[5];const k=t?.graphTitle,E=t?.graphDescription,I=t?.width;let y;e[6]!==u||e[7]!==m||e[8]!==k||e[9]!==E||e[10]!==I?(y=l.jsxRuntimeExports.jsx(W.GraphHeader,{styles:u,classNames:m,graphTitle:k,graphDescription:E,width:I}),e[6]=u,e[7]=m,e[8]=k,e[9]=E,e[10]=I,e[11]=y):y=e[11];let b;e[12]!==t?(b=t||{},e[12]=t,e[13]=b):b=e[13];const z=t?.theme;let H;e[14]!==b||e[15]!==z||e[16]!==x?(H={...b,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,padding:"0",uiMode:x,theme:z},e[14]=b,e[15]=z,e[16]=x,e[17]=H):H=e[17];let L;e[18]!==f||e[19]!==a||e[20]!==H?(L=l.jsxRuntimeExports.jsx(O,{graph:a,debugMode:f,settings:H}),e[18]=f,e[19]=a,e[20]=H,e[21]=L):L=e[21];let M;return e[22]!==c||e[23]!==D||e[24]!==C||e[25]!==N||e[26]!==o||e[27]!==y||e[28]!==L||e[29]!==r||e[30]!==h||e[31]!==p||e[32]!==s||e[33]!==i||e[34]!==n||e[35]!==v?(M=l.jsxRuntimeExports.jsxs(B.GraphContainer,{className:c,style:o,id:r,ref:d,"aria-label":h,backgroundColor:p,theme:s,language:i,width:n,height:v,padding:D,minHeight:C,relativeHeight:N,children:[y,L]}),e[22]=c,e[23]=D,e[24]=C,e[25]=N,e[26]=o,e[27]=y,e[28]=L,e[29]=r,e[30]=h,e[31]=p,e[32]=s,e[33]=i,e[34]=n,e[35]=v,e[36]=M):M=e[36],M}exports.SingleGraphDashboardGeoHubMaps=V;
2
2
  //# sourceMappingURL=SingleGraphDashboardGeoHubMaps.cjs.map
@@ -1,13 +1,13 @@
1
- import { c as _, j as b } from "./index-CHPV5EwG-DecW7_qr.js";
1
+ import { c as $, j as b } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import { useRef as E } from "react";
3
- import { j as P } from "./Typography-hWfh3H0J.js";
3
+ import { _ as P } from "./Typography-iR8PEgdt.js";
4
4
  import { GeoHubCompareMaps as R } from "./GeoHubCompareMaps.js";
5
5
  import { GeoHubMap as W } from "./GeoHubMap.js";
6
6
  import { GeoHubMapWithLayerSelection as B } from "./GeoHubMapWithLayerSelection.js";
7
7
  import { GraphHeader as q } from "./GraphHeader.js";
8
8
  import { G as A } from "./GraphContainer-CF6ws3pd.js";
9
9
  function F(S) {
10
- const e = _.c(38), {
10
+ const e = $.c(38), {
11
11
  settings: t,
12
12
  graph: a,
13
13
  debugMode: H
@@ -114,7 +114,7 @@ function F(S) {
114
114
  return e[35] !== h || e[36] !== o ? (l = /* @__PURE__ */ b.jsx("div", { className: h, style: s, children: o }), e[35] = h, e[36] = o, e[37] = l) : l = e[37], l;
115
115
  }
116
116
  function Z(S) {
117
- const e = _.c(37), {
117
+ const e = $.c(37), {
118
118
  graphSettings: t,
119
119
  graphType: a,
120
120
  debugMode: H,
@@ -131,14 +131,14 @@ function Z(S) {
131
131
  title: G,
132
132
  description: T
133
133
  }, e[3] = G, e[4] = T, e[5] = m) : m = e[5];
134
- const j = t?.graphTitle, I = t?.graphDescription, z = t?.width;
134
+ const I = t?.graphTitle, j = t?.graphDescription, z = t?.width;
135
135
  let u;
136
- e[6] !== d || e[7] !== m || e[8] !== j || e[9] !== I || e[10] !== z ? (u = /* @__PURE__ */ b.jsx(q, { styles: d, classNames: m, graphTitle: j, graphDescription: I, width: z }), e[6] = d, e[7] = m, e[8] = j, e[9] = I, e[10] = z, e[11] = u) : u = e[11];
136
+ e[6] !== d || e[7] !== m || e[8] !== I || e[9] !== j || e[10] !== z ? (u = /* @__PURE__ */ b.jsx(q, { styles: d, classNames: m, graphTitle: I, graphDescription: j, width: z }), e[6] = d, e[7] = m, e[8] = I, e[9] = j, e[10] = z, e[11] = u) : u = e[11];
137
137
  let y;
138
138
  e[12] !== t ? (y = t || {}, e[12] = t, e[13] = y) : y = e[13];
139
- const $ = t?.theme;
139
+ const _ = t?.theme;
140
140
  let f;
141
- e[14] !== y || e[15] !== $ || e[16] !== v ? (f = {
141
+ e[14] !== y || e[15] !== _ || e[16] !== v ? (f = {
142
142
  ...y,
143
143
  graphTitle: void 0,
144
144
  graphDescription: void 0,
@@ -151,8 +151,8 @@ function Z(S) {
151
151
  minHeight: void 0,
152
152
  padding: "0",
153
153
  uiMode: v,
154
- theme: $
155
- }, e[14] = y, e[15] = $, e[16] = v, e[17] = f) : f = e[17];
154
+ theme: _
155
+ }, e[14] = y, e[15] = _, e[16] = v, e[17] = f) : f = e[17];
156
156
  let L;
157
157
  e[18] !== H || e[19] !== a || e[20] !== f ? (L = /* @__PURE__ */ b.jsx(F, { graph: a, debugMode: H, settings: f }), e[18] = H, e[19] = a, e[20] = f, e[21] = L) : L = e[21];
158
158
  let x;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),le=require("./index-CyZ1lmi_.cjs"),F=require("./index-BS2TADPj.cjs"),ie=require("./index-DQA8q5sC.cjs"),D=require("./DropdownSelect-NNpOs7DX.cjs"),g=require("./checkIfMultiple-DxnGtm3t.cjs"),oe=require("./Spinner-jTMOLuw_.cjs"),W=require("./Typography-sa1UE0oF.cjs"),ne=require("./ThreeDGlobe.cjs"),A=require("./fetchAndParseData-QTF6tjij.cjs"),Z=require("./transformDataForAggregation-BFdha9Dx.cjs"),J=require("./getUniqValue-NX8DgwND.cjs"),re=require("./GraphHeader.cjs"),K=require("./filterData-T5DQBE9b.cjs"),se=require("./getGraphList-DQ24IzAn.cjs"),Q=require("./transformDataForSelect-YmStusCI.cjs"),ue=require("./GraphContainer-B1EDxJ0S.cjs");function ce(y){const t=i.compilerRuntimeExports.c(24),{settings:a,graph:m,graphData:d,debugMode:S,graphDataConfiguration:n,readableHeader:E,updateFilters:I}=y;if(S&&(console.log(`Graph: ${m}`),console.log("Transformed data:",d),console.log("Settings:",a)),typeof d=="string"){const b=`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x={height:"inherit"},t[0]=x):x=t[0];let c;t[1]!==d?(c=i.jsxRuntimeExports.jsx(W.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:d}),t[1]=d,t[2]=c):c=t[2];let w;return t[3]!==b||t[4]!==c?(w=i.jsxRuntimeExports.jsx("div",{className:b,style:x,children:c}),t[3]=b,t[4]=c,t[5]=w):w=t[5],w}let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v={threeDGlobe:ne.ThreeDGlobe},t[6]=v):v=t[6];const O=v;let V;t[7]!==d||t[8]!==n||t[9]!==E||t[10]!==a||t[11]!==I?(V=b=>b==="threeDGlobe"?{globeOffset:a?.globeOffset,collapseColorScaleByDefault:a?.collapseColorScaleByDefault,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:g.getValues("x",n||[],E||[]),scaleType:a?.scaleType,data:d,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:x=>{I?.(x.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom,atmosphereAltitude:a?.atmosphereAltitude,globeCurvatureResolution:a?.globeCurvatureResolution,fogSettings:a?.fogSetting,lights:a?.lights,highlightedAltitude:a?.highlightedAltitude,selectedId:a?.selectedId}:{},t[7]=d,t[8]=n,t[9]=E,t[10]=a,t[11]=I,t[12]=V):V=t[12];const h=V,T=O[m];let p;t[13]!==h||t[14]!==m?(p=h(m),t[13]=h,t[14]=m,t[15]=p):p=t[15];const f=p,G=`grow my-0 mx-auto flex flex-col w-full justify-center ${a?.theme||"light"}`;let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R={minHeight:"inherit"},t[16]=R):R=t[16];let s;t[17]!==T||t[18]!==m||t[19]!==f?(s=T?i.jsxRuntimeExports.jsx(T,{...f}):i.jsxRuntimeExports.jsx(W.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${m}`}),t[17]=T,t[18]=m,t[19]=f,t[20]=s):s=t[20];let N;return t[21]!==G||t[22]!==s?(N=i.jsxRuntimeExports.jsx("div",{className:G,style:R,children:s}),t[21]=G,t[22]=s,t[23]=N):N=t[23],N}const L=(y,t)=>{const a=t?.map(m=>{const d=y?.findIndex(n=>n.chartConfigId===m.chartConfigId);if(d===-1)return{};const S=y[d]?.allowedColumnIds?.findIndex(n=>n.value===m.columnId);return S===-1?{}:y[d].allowedColumnIds[S].graphSettings||{}})||[];return Object.assign({},...a)};function de(y){const{graphSettings:t,dataSettings:a,filters:m,graphType:d,dataTransform:S,graphDataConfiguration:n,dataFilters:E,debugMode:I,dataSelectionOptions:v,advancedDataSelectionOptions:O,readableHeader:V,noOfFiltersPerRow:h=4,updateFilters:T,uiMode:p="normal",highlightDataPointSettings:f}=y,[G,R]=u.useState(void 0),[s,N]=u.useState(void 0),[b,x]=u.useState(n),[c,w]=u.useState({}),[$,X]=u.useState(void 0),[Y,_]=u.useState([]),M=u.useRef(null),U=u.useRef(n),[P,z]=u.useState([]),H={ignoreCase:!0,ignoreAccents:!0,trim:!0},B=u.useEffectEvent(()=>{const e=(m||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:Q.transformDefaultValue(r.defaultValue),value:Q.transformDefaultValue(r.defaultValue),availableValues:J.getUniqValue(s,r.column).filter(l=>!r.excludeValues?.includes(`${l}`)).map(l=>({value:l,label:l})),allowSelectAll:r.allowSelectAll,width:r.width}));z(e)});u.useEffect(()=>{(async()=>{try{const r=a.dataURL?typeof a.dataURL=="string"?a.fileType==="json"?await A.fetchAndParseJSON(a.dataURL,a.columnsToArray,a.dataTransformation,I):a.fileType==="api"?await A.fetchAndTransformDataFromAPI(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,I):await A.fetchAndParseCSV(a.dataURL,a.dataTransformation,a.columnsToArray,I,a.delimiter,!0):await A.fetchAndParseMultipleDataSources(a.dataURL,a.idColumnTitle):await A.transformColumnsToArray(a.data,a.columnsToArray);N(r)}catch(r){console.error("Data fetching error:",r)}})(),B()},[a,I]),u.useEffect(()=>{B()},[m,s]);const ee=u.useEffectEvent(()=>{if(!s||P.length===0)R(s);else{const e=s.filter(r=>P.every(l=>l.value&&F.flattenDeep([l.value]).length>0?le.intersection(F.flattenDeep([r[l.filter]]),F.flattenDeep([l.value]).map(o=>o.value)).length>0:!0));R(e)}});u.useEffect(()=>{ee()},[P,s]),u.useEffect(()=>{v&&w(L(v,n))},[v,n]);const te=u.useEffectEvent(()=>{f?.column&&G&&_(J.getUniqValue(G,f.column).filter(e=>!f?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});u.useEffect(()=>{te()},[f]),u.useEffect(()=>{ie.isEqual(U.current,n)||(x(n),U.current=n)},[n]);const k=(e,r)=>{z(l=>l.map(o=>o.filter===e?{...o,value:r}:o))},ae=s?Z.transformDataForGraph(S?Z.transformDataForAggregation(K.filterData(s,E||[]),S.keyColumn,S.aggregationColumnsSetting):K.filterData(s,E||[]),d,b):void 0;return i.jsxRuntimeExports.jsx(ue.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel,backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,minHeight:t?.minHeight,relativeHeight:t?.relativeHeight,children:s||se.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(d)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[c?.graphTitle||c?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?i.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:c?.styles?.title||t?.styles?.title,description:c?.styles?.description||t?.styles?.description},classNames:{title:c?.classNames?.title||t?.classNames?.title,description:c?.classNames?.description||t?.classNames?.description},graphTitle:c?.graphTitle||t?.graphTitle,graphDescription:c?.graphDescription||t?.graphDescription,width:c?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&s&&s.length>0?s:null}):null,P.length!==0||(v||[]).length!==0||(O||[]).length!==0||f?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.options.map(l=>({...l,value:l.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:l=>{w(l?.graphSettings||{}),x(l?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(g.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:p,onValueChange:l=>{const o=e.options[e.options.findIndex(j=>j.label===l)];w(o.graphSettings||{}),x(o.dataConfiguration)},children:e.options.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),v?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),g.checkIfMultiple(e.chartConfigId,b||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]):void 0,filterOption:D.Du(H),onChange:l=>{const o={columnId:(l||[]).map(C=>C.value),chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)}}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]).map(l=>l.value):[],onValueChange:l=>{const o={columnId:l||[],chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:l.label,value:l.label},o))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:l=>{const o={columnId:l?.value,chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);w(L(v,j)),x(j)}}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:l=>{const j={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(q=>q.label===l)].value,chartConfigId:e.chartConfigId},C=b?.map(q=>q.chartConfigId===j.chartConfigId?j:q);w(L(v,C)),x(C)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),P?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:e.defaultValue.value,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>o.value===l))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:`${l.label}`,value:`${l.value}`},o))}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:e.defaultValue?e.defaultValue.map(l=>`${l.value}`):[],value:e.value?e.value.map(l=>`${l.value}`):void 0,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>l.indexOf(`${o.value}`)!==-1))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:`${l.label}`,value:`${l.value}`},o))}),e.allowSelectAll?i.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{k(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),f?i.jsxRuntimeExports.jsxs("div",{style:{width:f.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:f.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:f.label||"Highlight data"}),i.jsxRuntimeExports.jsx(D.ja,{options:Y,variant:p,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:e=>{X(e?.map(r=>r.value))},value:$?.map(e=>({label:e,value:e})),defaultValue:f.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(ce,{graph:d,graphData:ae,graphDataConfiguration:b,debugMode:I,readableHeader:V||[],updateFilters:T,settings:{...t||{},...c,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,theme:t?.theme,...$?{highlightedDataPoints:$,highlightedIds:$?.map(e=>`${e}`),highlightedLines:$?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(oe.w,{})})})}exports.SingleGraphDashboardThreeDGraphs=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),le=require("./index-CyZ1lmi_.cjs"),F=require("./index-BS2TADPj.cjs"),ie=require("./index-DQA8q5sC.cjs"),D=require("./DropdownSelect-NNpOs7DX.cjs"),g=require("./checkIfMultiple-DxnGtm3t.cjs"),oe=require("./Spinner-jTMOLuw_.cjs"),W=require("./Typography-DrJ7IOdw.cjs"),ne=require("./ThreeDGlobe.cjs"),A=require("./fetchAndParseData-QTF6tjij.cjs"),Z=require("./transformDataForAggregation-BFdha9Dx.cjs"),J=require("./getUniqValue-NX8DgwND.cjs"),re=require("./GraphHeader.cjs"),K=require("./filterData-T5DQBE9b.cjs"),se=require("./getGraphList-DQ24IzAn.cjs"),Q=require("./transformDataForSelect-YmStusCI.cjs"),ue=require("./GraphContainer-B1EDxJ0S.cjs");function ce(y){const t=i.compilerRuntimeExports.c(24),{settings:a,graph:m,graphData:d,debugMode:S,graphDataConfiguration:n,readableHeader:E,updateFilters:I}=y;if(S&&(console.log(`Graph: ${m}`),console.log("Transformed data:",d),console.log("Settings:",a)),typeof d=="string"){const b=`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`;let x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x={height:"inherit"},t[0]=x):x=t[0];let c;t[1]!==d?(c=i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:d}),t[1]=d,t[2]=c):c=t[2];let w;return t[3]!==b||t[4]!==c?(w=i.jsxRuntimeExports.jsx("div",{className:b,style:x,children:c}),t[3]=b,t[4]=c,t[5]=w):w=t[5],w}let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v={threeDGlobe:ne.ThreeDGlobe},t[6]=v):v=t[6];const O=v;let V;t[7]!==d||t[8]!==n||t[9]!==E||t[10]!==a||t[11]!==I?(V=b=>b==="threeDGlobe"?{globeOffset:a?.globeOffset,collapseColorScaleByDefault:a?.collapseColorScaleByDefault,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:g.getValues("x",n||[],E||[]),scaleType:a?.scaleType,data:d,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:x=>{I?.(x.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom,atmosphereAltitude:a?.atmosphereAltitude,globeCurvatureResolution:a?.globeCurvatureResolution,fogSettings:a?.fogSetting,lights:a?.lights,highlightedAltitude:a?.highlightedAltitude,selectedId:a?.selectedId}:{},t[7]=d,t[8]=n,t[9]=E,t[10]=a,t[11]=I,t[12]=V):V=t[12];const h=V,T=O[m];let p;t[13]!==h||t[14]!==m?(p=h(m),t[13]=h,t[14]=m,t[15]=p):p=t[15];const f=p,G=`grow my-0 mx-auto flex flex-col w-full justify-center ${a?.theme||"light"}`;let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R={minHeight:"inherit"},t[16]=R):R=t[16];let s;t[17]!==T||t[18]!==m||t[19]!==f?(s=T?i.jsxRuntimeExports.jsx(T,{...f}):i.jsxRuntimeExports.jsx(W._,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${m}`}),t[17]=T,t[18]=m,t[19]=f,t[20]=s):s=t[20];let N;return t[21]!==G||t[22]!==s?(N=i.jsxRuntimeExports.jsx("div",{className:G,style:R,children:s}),t[21]=G,t[22]=s,t[23]=N):N=t[23],N}const L=(y,t)=>{const a=t?.map(m=>{const d=y?.findIndex(n=>n.chartConfigId===m.chartConfigId);if(d===-1)return{};const S=y[d]?.allowedColumnIds?.findIndex(n=>n.value===m.columnId);return S===-1?{}:y[d].allowedColumnIds[S].graphSettings||{}})||[];return Object.assign({},...a)};function de(y){const{graphSettings:t,dataSettings:a,filters:m,graphType:d,dataTransform:S,graphDataConfiguration:n,dataFilters:E,debugMode:I,dataSelectionOptions:v,advancedDataSelectionOptions:O,readableHeader:V,noOfFiltersPerRow:h=4,updateFilters:T,uiMode:p="normal",highlightDataPointSettings:f}=y,[G,R]=u.useState(void 0),[s,N]=u.useState(void 0),[b,x]=u.useState(n),[c,w]=u.useState({}),[$,X]=u.useState(void 0),[Y,_]=u.useState([]),M=u.useRef(null),U=u.useRef(n),[P,z]=u.useState([]),H={ignoreCase:!0,ignoreAccents:!0,trim:!0},B=u.useEffectEvent(()=>{const e=(m||[]).map(r=>({filter:r.column,label:r.label||`Filter by ${r.column}`,singleSelect:r.singleSelect,clearable:r.clearable,defaultValue:Q.transformDefaultValue(r.defaultValue),value:Q.transformDefaultValue(r.defaultValue),availableValues:J.getUniqValue(s,r.column).filter(l=>!r.excludeValues?.includes(`${l}`)).map(l=>({value:l,label:l})),allowSelectAll:r.allowSelectAll,width:r.width}));z(e)});u.useEffect(()=>{(async()=>{try{const r=a.dataURL?typeof a.dataURL=="string"?a.fileType==="json"?await A.fetchAndParseJSON(a.dataURL,a.columnsToArray,a.dataTransformation,I):a.fileType==="api"?await A.fetchAndTransformDataFromAPI(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,I):await A.fetchAndParseCSV(a.dataURL,a.dataTransformation,a.columnsToArray,I,a.delimiter,!0):await A.fetchAndParseMultipleDataSources(a.dataURL,a.idColumnTitle):await A.transformColumnsToArray(a.data,a.columnsToArray);N(r)}catch(r){console.error("Data fetching error:",r)}})(),B()},[a,I]),u.useEffect(()=>{B()},[m,s]);const ee=u.useEffectEvent(()=>{if(!s||P.length===0)R(s);else{const e=s.filter(r=>P.every(l=>l.value&&F.flattenDeep([l.value]).length>0?le.intersection(F.flattenDeep([r[l.filter]]),F.flattenDeep([l.value]).map(o=>o.value)).length>0:!0));R(e)}});u.useEffect(()=>{ee()},[P,s]),u.useEffect(()=>{v&&w(L(v,n))},[v,n]);const te=u.useEffectEvent(()=>{f?.column&&G&&_(J.getUniqValue(G,f.column).filter(e=>!f?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))});u.useEffect(()=>{te()},[f]),u.useEffect(()=>{ie.isEqual(U.current,n)||(x(n),U.current=n)},[n]);const k=(e,r)=>{z(l=>l.map(o=>o.filter===e?{...o,value:r}:o))},ae=s?Z.transformDataForGraph(S?Z.transformDataForAggregation(K.filterData(s,E||[]),S.keyColumn,S.aggregationColumnsSetting):K.filterData(s,E||[]),d,b):void 0;return i.jsxRuntimeExports.jsx(ue.GraphContainer,{className:t?.classNames?.graphContainer,style:t?.styles?.graphContainer,id:t?.graphID,ref:M,"aria-label":t?.ariaLabel,backgroundColor:t?.backgroundColor??!1,theme:t?.theme||"light",language:t?.language||"en",width:t?.width,height:t?.height,padding:t?.padding,minHeight:t?.minHeight,relativeHeight:t?.relativeHeight,children:s||se.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(d)!==-1?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[c?.graphTitle||c?.graphDescription||t?.graphTitle||t?.graphDescription||t?.graphDownload||t?.dataDownload?i.jsxRuntimeExports.jsx(re.GraphHeader,{styles:{title:c?.styles?.title||t?.styles?.title,description:c?.styles?.description||t?.styles?.description},classNames:{title:c?.classNames?.title||t?.classNames?.title,description:c?.classNames?.description||t?.classNames?.description},graphTitle:c?.graphTitle||t?.graphTitle,graphDescription:c?.graphDescription||t?.graphDescription,width:c?.width||t?.width,graphDownload:t?.graphDownload?M:void 0,dataDownload:t?.dataDownload&&s&&s.length>0?s:null}):null,P.length!==0||(v||[]).length!==0||(O||[]).length!==0||f?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-0 w-full",children:[O?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.options.map(l=>({...l,value:l.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:l=>{w(l?.graphSettings||{}),x(l?.dataConfiguration)}}):i.jsxRuntimeExports.jsx(g.ye,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:p,onValueChange:l=>{const o=e.options[e.options.findIndex(j=>j.label===l)];w(o.graphSettings||{}),x(o.dataConfiguration)},children:e.options.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),v?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),g.checkIfMultiple(e.chartConfigId,b||[])?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]):void 0,filterOption:D.Du(H),onChange:l=>{const o={columnId:(l||[]).map(C=>C.value),chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)}}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:n?n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId.map(l=>e.allowedColumnIds[e.allowedColumnIds.findIndex(o=>o.value===l)]).map(l=>l.value):[],onValueChange:l=>{const o={columnId:l||[],chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);x(j)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:l.label,value:l.label},o))}):e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:p,controlShouldRenderValue:!0,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:l=>{const o={columnId:l?.value,chartConfigId:e.chartConfigId},j=b?.map(C=>C.chartConfigId===o.chartConfigId?o:C);w(L(v,j)),x(j)}}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===n[n.findIndex(o=>o.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:l=>{const j={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(q=>q.label===l)].value,chartConfigId:e.chartConfigId},C=b?.map(q=>q.chartConfigId===j.chartConfigId?j:q);w(L(v,C)),x(C)},children:e.allowedColumnIds.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:l.label,value:l.label},o))})]},r)),P?.map((e,r)=>i.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:e.width?0:1,flexShrink:e.ui!=="radio"||e.width?0:1,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:e.label}),e.singleSelect?e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.ye,{variant:p,defaultValue:e.defaultValue.value,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>o.value===l))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.he,{label:`${l.label}`,value:`${l.value}`},o))}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?i.jsxRuntimeExports.jsx(D.ja,{options:e.availableValues,variant:p,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:l=>{k(e.filter,l)},value:e.value,defaultValue:e.defaultValue}):i.jsxRuntimeExports.jsx(g.$,{variant:p,defaultValue:e.defaultValue?e.defaultValue.map(l=>`${l.value}`):[],value:e.value?e.value.map(l=>`${l.value}`):void 0,onValueChange:l=>{k(e.filter,e.availableValues.filter(o=>l.indexOf(`${o.value}`)!==-1))},children:e.availableValues.map((l,o)=>i.jsxRuntimeExports.jsx(g.P,{label:`${l.label}`,value:`${l.value}`},o))}),e.allowSelectAll?i.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{k(e.filter,e.availableValues)},children:"Select all options"}):null]})]},r)),f?i.jsxRuntimeExports.jsxs("div",{style:{width:f.width||`calc(${100/h}% - ${(h-1)/h}rem)`,flexGrow:f.width?0:1,flexShrink:0,minWidth:"240px"},className:"pb-4",children:[i.jsxRuntimeExports.jsx(g.b,{className:"mb-2",children:f.label||"Highlight data"}),i.jsxRuntimeExports.jsx(D.ja,{options:Y,variant:p,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:D.Du(H),onChange:e=>{X(e?.map(r=>r.value))},value:$?.map(e=>({label:e,value:e})),defaultValue:f.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,i.jsxRuntimeExports.jsx(ce,{graph:d,graphData:ae,graphDataConfiguration:b,debugMode:I,readableHeader:V||[],updateFilters:T,settings:{...t||{},...c,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",width:void 0,height:void 0,relativeHeight:void 0,minHeight:void 0,theme:t?.theme,...$?{highlightedDataPoints:$,highlightedIds:$?.map(e=>`${e}`),highlightedLines:$?.map(e=>e)}:{}}})]}):i.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:i.jsxRuntimeExports.jsx(oe.w,{})})})}exports.SingleGraphDashboardThreeDGraphs=de;
2
2
  //# sourceMappingURL=SingleGraphDashboardThreeDGraphs.cjs.map
@@ -6,7 +6,7 @@ import { i as ce } from "./index-Bwrro8-q.js";
6
6
  import { j as k, D as L } from "./DropdownSelect-D8rFbygC.js";
7
7
  import { g as he, b as M, y as U, h as B, c as ge, $ as X, P as Y } from "./checkIfMultiple-D9fVkeOq.js";
8
8
  import { w as pe } from "./Spinner--r2RrJV8.js";
9
- import { j as _ } from "./Typography-hWfh3H0J.js";
9
+ import { _ } from "./Typography-iR8PEgdt.js";
10
10
  import { ThreeDGlobe as fe } from "./ThreeDGlobe.js";
11
11
  import { f as me, a as Ce, b as be, c as ve, t as xe } from "./fetchAndParseData-BAXhgTDM.js";
12
12
  import { a as we, t as Ie } from "./transformDataForAggregation-wdPf8bNt.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),Bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),m=require("./Colors.cjs"),Xt=require("./Axis-Jt_tmhxS.cjs"),Ft=require("./AxisTitle-DV4n0RxE.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),pt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),ie=require("./index-CoobIWNj.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-CGeBqbmR.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:st,colors:n,colorDomain:x,radius:a,leftMargin:y,rightMargin:yt,topMargin:P,bottomMargin:Et,tooltip:$t,onSeriesMouseOver:at,axisTitles:g,highlightedDataPoints:j,selectedColor:ct,minValue:ut,maxValue:xt,onSeriesMouseClick:dt,resetSelectionOnDoubleClick:kt,detailsOnClick:D,styles:p,classNames:u,animate:s,dimmedOpacity:v,customLayers:$}=e,St=H.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const w=ee.useInView(St,ht),[b,Nt]=H.useState(void 0),[W,It]=H.useState(void 0),[Rt,Vt]=H.useState(void 0),[gt,qt]=H.useState(void 0);let vt;t[3]!==Et||t[4]!==y||t[5]!==yt||t[6]!==P?(vt={top:P,bottom:Et,left:y,right:yt},t[3]=Et,t[4]=y,t[5]=yt,t[6]=P,t[7]=vt):vt=t[7];const c=vt,r=G-c.left-c.right,C=h-c.top-c.bottom;let Mt;t[8]!==o?(Mt=Math.min(...o.map(Ne)),t[8]=o,t[9]=Mt):Mt=t[9];let ft;t[10]!==o?(ft=Math.min(...o.map(Se)),t[10]=o,t[11]=ft):ft=t[11];const Y=Math.min(Mt,ft);let Ct;t[12]!==o?(Ct=Math.max(...o.map(De)),t[12]=o,t[13]=Ct):Ct=t[13];let mt;t[14]!==o?(mt=Math.max(...o.map(Me)),t[14]=o,t[15]=mt):mt=t[15];const U=Math.max(Ct,mt);let B,X,k,F,z,J,S,K,N,I,V,R,M;if(t[16]!==s.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==$||t[26]!==o||t[27]!==D||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==xt||t[37]!==U||t[38]!==ut||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==dt||t[43]!==at||t[44]!==a||t[45]!==kt||t[46]!==ct||t[47]!==st||t[48]!==p?.dataConnectors||t[49]!==p?.yAxis?.labels||t[50]!==p?.yAxis?.title||t[51]!==G){let T;t[65]!==ut||t[66]!==Y?(T=Bt.checkIfNullOrUndefined(ut)?Y>0?0:Y:ut,t[65]=ut,t[66]=Y,t[67]=T):T=t[67];let Lt;t[68]!==xt||t[69]!==U?(Lt=Bt.checkIfNullOrUndefined(xt)?U>0?U:0:xt,t[68]=xt,t[69]=U,t[70]=Lt):Lt=t[70];const f=te.linear().domain([T,Lt]).range([C,0]).nice();X=pt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,S="mx-auto",K="ltr",N=St,V=`translate(${c.left},${c.top})`;const Yt=u?.yAxis?.axis;let tt;t[71]!==Yt?(tt=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Yt),t[71]=Yt,t[72]=tt):tt=t[72];let wt;t[73]!==tt?(wt={axis:tt},t[73]=tt,t[74]=wt):wt=t[74];let et;t[75]!==C||t[76]!==a||t[77]!==wt?(et=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:a,x2:a,classNames:wt}),t[75]=C,t[76]=a,t[77]=wt,t[78]=et):et=t[78];const Tt=C+15,bt=p?.yAxis?.title,Ot=u?.yAxis?.title;let it;t[79]!==Ot?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Ot),t[79]=Ot,t[80]=it):it=t[80];let ot;t[81]!==g[0]||t[82]!==a||t[83]!==Tt||t[84]!==bt||t[85]!==it?(ot=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:a,y:Tt,style:bt,className:it,text:g[0]}),t[81]=g[0],t[82]=a,t[83]=Tt,t[84]=bt,t[85]=it,t[86]=ot):ot=t[86],t[87]!==et||t[88]!==ot?(R=l.jsxRuntimeExports.jsxs("g",{children:[et,ot]}),t[87]=et,t[88]=ot,t[89]=R):R=t[89];const Dt=r-a,nt=r-a,lt=u?.yAxis?.axis;let O;t[90]!==lt?(O=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=O):O=t[91];let A;t[92]!==O?(A={axis:O},t[92]=O,t[93]=A):A=t[93];let E;t[94]!==C||t[95]!==Dt||t[96]!==nt||t[97]!==A?(E=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:Dt,x2:nt,classNames:A}),t[94]=C,t[95]=Dt,t[96]=nt,t[97]=A,t[98]=E):E=t[98];const rt=r-a,At=C+15,Ht=p?.yAxis?.title,Gt=u?.yAxis?.title;let Pt;t[99]!==Gt?(Pt=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Gt),t[99]=Gt,t[100]=Pt):Pt=t[100];let Wt;t[101]!==g[1]||t[102]!==rt||t[103]!==At||t[104]!==Ht||t[105]!==Pt?(Wt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:rt,y:At,style:Ht,className:Pt,text:g[1]}),t[101]=g[1],t[102]=rt,t[103]=At,t[104]=Ht,t[105]=Pt,t[106]=Wt):Wt=t[106],t[107]!==E||t[108]!==Wt?(M=l.jsxRuntimeExports.jsxs("g",{children:[E,Wt]}),t[107]=E,t[108]=Wt,t[109]=M):M=t[109],t[110]!==$?(k=$.filter(Re).map(ke),t[110]=$,t[111]=k):k=t[111],B=ie.AnimatePresence,I=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(pt.motion.g,{variants:{initial:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},onMouseEnter:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX),at?.(i)},onMouseMove:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX)},onMouseLeave:()=>{Nt(void 0),Vt(void 0),qt(void 0),at?.(void 0)},onClick:()=>{(dt||D)&&(Qt.isEqual(W,i)&&kt?(It(void 0),dt?.(void 0)):(It(i),dt?.(i)))},children:[l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:a,cy:f(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:a,cy:f(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-a-3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:r-a,cy:f(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:r-a,cy:f(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:a+3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.line,{variants:{initial:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray},whileInView:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...p?.dataConnectors}})]},Kt)),t[16]=s.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=$,t[26]=o,t[27]=D,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=xt,t[37]=U,t[38]=ut,t[39]=Y,t[40]=W,t[41]=b,t[42]=dt,t[43]=at,t[44]=a,t[45]=kt,t[46]=ct,t[47]=st,t[48]=p?.dataConnectors,t[49]=p?.yAxis?.labels,t[50]=p?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=k,t[55]=F,t[56]=z,t[57]=J,t[58]=S,t[59]=K,t[60]=N,t[61]=I,t[62]=V,t[63]=R,t[64]=M}else B=t[52],X=t[53],k=t[54],F=t[55],z=t[56],J=t[57],S=t[58],K=t[59],N=t[60],I=t[61],V=t[62],R=t[63],M=t[64];let Q;t[112]!==B||t[113]!==I?(Q=l.jsxRuntimeExports.jsx(B,{children:I}),t[112]=B,t[113]=I,t[114]=Q):Q=t[114];let d;t[115]!==$?(d=$.filter(ce).map(ae),t[115]=$,t[116]=d):d=t[116];let Z;t[117]!==k||t[118]!==Q||t[119]!==d||t[120]!==V||t[121]!==R||t[122]!==M?(Z=l.jsxRuntimeExports.jsxs("g",{transform:V,children:[R,M,k,Q,d]}),t[117]=k,t[118]=Q,t[119]=d,t[120]=V,t[121]=R,t[122]=M,t[123]=Z):Z=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==S||t[129]!==K||t[130]!==N||t[131]!==Z?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:S,direction:K,ref:N,children:Z}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=S,t[129]=K,t[130]=N,t[131]=Z,t[132]=q):q=t[132];let _;t[133]!==u?.tooltip||t[134]!==Rt||t[135]!==gt||t[136]!==b||t[137]!==p?.tooltip||t[138]!==$t?(_=b&&$t&&Rt&&gt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:$t,xPos:Rt,yPos:gt,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Rt,t[135]=gt,t[136]=b,t[137]=p?.tooltip,t[138]=$t,t[139]=_):_=t[139];let L;t[140]!==u?.modal||t[141]!==D||t[142]!==W?(L=D&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:D,data:W,setData:It,className:u?.modal}):null,t[140]=u?.modal,t[141]=D,t[142]=W,t[143]=L):L=t[143];let jt;return t[144]!==q||t[145]!==_||t[146]!==L?(jt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,_,L]}),t[144]=q,t[145]=_,t[146]=L,t[147]=jt):jt=t[147],jt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function De(e){return e.y1}function Se(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(89),{data:o,graphTitle:G,colors:h,sources:st,graphDescription:n,showLabels:x,height:a,width:y,footNote:yt,colorDomain:P,colorLegendTitle:Et,radius:$t,axisTitles:at,padding:g,backgroundColor:j,leftMargin:ct,rightMargin:ut,topMargin:xt,bottomMargin:dt,tooltip:kt,relativeHeight:D,onSeriesMouseOver:p,showColorScale:u,highlightedDataPoints:s,graphID:v,minValue:$,maxValue:St,onSeriesMouseClick:ht,graphDownload:w,dataDownload:b,fillContainer:Nt,language:W,showNAColor:It,minHeight:Rt,theme:Vt,ariaLabel:gt,resetSelectionOnDoubleClick:qt,detailsOnClick:vt,styles:c,classNames:r,animate:C,dimmedOpacity:Mt,customLayers:ft}=e,Y=x===void 0?!1:x,Ct=$t===void 0?5:$t;let mt;t[0]!==at?(mt=at===void 0?["",""]:at,t[0]=at,t[1]=mt):mt=t[1];const U=mt,B=j===void 0?!1:j,X=ct===void 0?50:ct,k=ut===void 0?50:ut,F=xt===void 0?20:xt,z=dt===void 0?20:dt,J=u===void 0?!0:u;let S;t[2]!==s?(S=s===void 0?[]:s,t[2]=s,t[3]=S):S=t[3];const K=S,N=w===void 0?!1:w,I=b===void 0?!1:b,V=Nt===void 0?!0:Nt,R=W===void 0?"en":W,M=It===void 0?!0:It,Q=Rt===void 0?0:Rt,d=Vt===void 0?"light":Vt,Z=qt===void 0?!0:qt,q=C===void 0?!1:C,_=Mt===void 0?.3:Mt;let L;t[4]!==ft?(L=ft===void 0?[]:ft,t[4]=ft,t[5]=L):L=t[5];const jt=L,[T,Lt]=H.useState(0),[f,Yt]=H.useState(0),[tt,wt]=H.useState(void 0),et=H.useRef(null),Tt=H.useRef(null);let bt,Ot;t[6]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const Ht=new ResizeObserver(Gt=>{Lt(Gt[0].target.clientWidth||620),Yt(Gt[0].target.clientHeight||480)});return et.current&&Ht.observe(et.current),()=>Ht.disconnect()},Ot=[],t[6]=bt,t[7]=Ot):(bt=t[6],Ot=t[7]),H.useEffect(bt,Ot);const it=r?.graphContainer,ot=c?.graphContainer,Dt=V?void 0:y;let nt;t[8]!==r?.description||t[9]!==r?.title||t[10]!==o||t[11]!==I||t[12]!==n||t[13]!==N||t[14]!==G||t[15]!==c?.description||t[16]!==c?.title||t[17]!==y?(nt=G||n||N||I?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:N?Tt:void 0,dataDownload:I?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[8]=r?.description,t[9]=r?.title,t[10]=o,t[11]=I,t[12]=n,t[13]=N,t[14]=G,t[15]=c?.description,t[16]=c?.title,t[17]=y,t[18]=nt):nt=t[18];let lt;t[19]!==r?.colorLegend||t[20]!==P||t[21]!==Et||t[22]!==h||t[23]!==o||t[24]!==J||t[25]!==M||t[26]!==d||t[27]!==y?(lt=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:Et,colors:h||m.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:wt,showNAColor:M,className:r?.colorLegend}):null,t[19]=r?.colorLegend,t[20]=P,t[21]=Et,t[22]=h,t[23]=o,t[24]=J,t[25]=M,t[26]=d,t[27]=y,t[28]=lt):lt=t[28];let O;t[29]!==o.length?(O=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[29]=o.length,t[30]=O):O=t[30];let A;t[31]!==q||t[32]!==U||t[33]!==z||t[34]!==r||t[35]!==P||t[36]!==h||t[37]!==jt||t[38]!==o||t[39]!==vt||t[40]!==_||t[41]!==V||t[42]!==K||t[43]!==X||t[44]!==St||t[45]!==$||t[46]!==ht||t[47]!==p||t[48]!==Ct||t[49]!==Z||t[50]!==k||t[51]!==tt||t[52]!==Y||t[53]!==c||t[54]!==f||t[55]!==T||t[56]!==d||t[57]!==kt||t[58]!==F||t[59]!==y?(A=T&&f&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:V||!y||T<y?T:y,height:f,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[m.Colors.primaryColors["blue-600"]]:h||m.Colors[d].categoricalColors.colors,selectedColor:tt,axisTitles:U,showLabels:Y,radius:Ct,leftMargin:X,rightMargin:k,topMargin:F,bottomMargin:z,tooltip:kt,onSeriesMouseOver:p,highlightedDataPoints:K,minValue:$,maxValue:St,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:Z,detailsOnClick:vt,styles:c,classNames:r,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:jt}):null,t[31]=q,t[32]=U,t[33]=z,t[34]=r,t[35]=P,t[36]=h,t[37]=jt,t[38]=o,t[39]=vt,t[40]=_,t[41]=V,t[42]=K,t[43]=X,t[44]=St,t[45]=$,t[46]=ht,t[47]=p,t[48]=Ct,t[49]=Z,t[50]=k,t[51]=tt,t[52]=Y,t[53]=c,t[54]=f,t[55]=T,t[56]=d,t[57]=kt,t[58]=F,t[59]=y,t[60]=A):A=t[60];let E;t[61]!==O||t[62]!==A?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[O,A]}),t[61]=O,t[62]=A,t[63]=E):E=t[63];let rt;t[64]!==r?.footnote||t[65]!==r?.source||t[66]!==yt||t[67]!==st||t[68]!==c?.footnote||t[69]!==c?.source||t[70]!==y?(rt=st||yt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:st,footNote:yt,width:y}):null,t[64]=r?.footnote,t[65]=r?.source,t[66]=yt,t[67]=st,t[68]=c?.footnote,t[69]=c?.source,t[70]=y,t[71]=rt):rt=t[71];let At;return t[72]!==gt||t[73]!==B||t[74]!==v||t[75]!==a||t[76]!==R||t[77]!==Q||t[78]!==g||t[79]!==D||t[80]!==it||t[81]!==ot||t[82]!==Dt||t[83]!==nt||t[84]!==lt||t[85]!==E||t[86]!==rt||t[87]!==d?(At=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:it,style:ot,id:v,ref:Tt,"aria-label":gt,backgroundColor:B,theme:d,language:R,minHeight:Q,width:Dt,height:a,relativeHeight:D,padding:g,children:[nt,lt,E,rt]}),t[72]=gt,t[73]=B,t[74]=v,t[75]=a,t[76]=R,t[77]=Q,t[78]=g,t[79]=D,t[80]=it,t[81]=ot,t[82]=Dt,t[83]=nt,t[84]=lt,t[85]=E,t[86]=rt,t[87]=d,t[88]=At):At=t[88],At}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Bt.checkIfNullOrUndefined(e.y1)&&!Bt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CHPV5EwG-6v2a2njQ.cjs"),H=require("react"),Qt=require("./index-DQA8q5sC.cjs"),Zt=require("./Tooltip-BLa2EfMs.cjs"),Bt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),m=require("./Colors.cjs"),Xt=require("./Axis-Jt_tmhxS.cjs"),Ft=require("./AxisTitle-DV4n0RxE.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),te=require("./linear-CgUCbw9F.cjs"),pt=require("./proxy-C4-uo6nS.cjs"),ee=require("./use-in-view-C3o_ntMv.cjs"),ie=require("./index-CoobIWNj.cjs"),oe=require("./GraphFooter.cjs"),ne=require("./GraphHeader.cjs"),le=require("./ColorLegendWithMouseOver.cjs"),re=require("./EmptyState-DX0t62iF.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Jt=require("./GraphContainer-B1EDxJ0S.cjs");function se(e){const t=l.compilerRuntimeExports.c(148),{data:o,width:G,height:h,showLabels:st,colors:n,colorDomain:x,radius:a,leftMargin:y,rightMargin:yt,topMargin:P,bottomMargin:Et,tooltip:$t,onSeriesMouseOver:at,axisTitles:g,highlightedDataPoints:j,selectedColor:ct,minValue:ut,maxValue:xt,onSeriesMouseClick:dt,resetSelectionOnDoubleClick:kt,detailsOnClick:D,styles:p,classNames:u,animate:s,dimmedOpacity:v,customLayers:$}=e,St=H.useRef(null);let ht;t[0]!==s.amount||t[1]!==s.once?(ht={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ht):ht=t[2];const w=ee.useInView(St,ht),[b,Nt]=H.useState(void 0),[W,It]=H.useState(void 0),[Rt,Vt]=H.useState(void 0),[gt,qt]=H.useState(void 0);let vt;t[3]!==Et||t[4]!==y||t[5]!==yt||t[6]!==P?(vt={top:P,bottom:Et,left:y,right:yt},t[3]=Et,t[4]=y,t[5]=yt,t[6]=P,t[7]=vt):vt=t[7];const c=vt,r=G-c.left-c.right,C=h-c.top-c.bottom;let Mt;t[8]!==o?(Mt=Math.min(...o.map(Ne)),t[8]=o,t[9]=Mt):Mt=t[9];let ft;t[10]!==o?(ft=Math.min(...o.map(Se)),t[10]=o,t[11]=ft):ft=t[11];const Y=Math.min(Mt,ft);let Ct;t[12]!==o?(Ct=Math.max(...o.map(De)),t[12]=o,t[13]=Ct):Ct=t[13];let mt;t[14]!==o?(mt=Math.max(...o.map(Me)),t[14]=o,t[15]=mt):mt=t[15];const U=Math.max(Ct,mt);let B,X,k,F,z,J,S,K,N,I,V,R,M;if(t[16]!==s.duration||t[17]!==g[0]||t[18]!==g[1]||t[19]!==u?.dataConnectors||t[20]!==u?.yAxis?.axis||t[21]!==u?.yAxis?.labels||t[22]!==u?.yAxis?.title||t[23]!==x||t[24]!==n||t[25]!==$||t[26]!==o||t[27]!==D||t[28]!==v||t[29]!==C||t[30]!==r||t[31]!==h||t[32]!==j||t[33]!==w||t[34]!==c.left||t[35]!==c.top||t[36]!==xt||t[37]!==U||t[38]!==ut||t[39]!==Y||t[40]!==W||t[41]!==b||t[42]!==dt||t[43]!==at||t[44]!==a||t[45]!==kt||t[46]!==ct||t[47]!==st||t[48]!==p?.dataConnectors||t[49]!==p?.yAxis?.labels||t[50]!==p?.yAxis?.title||t[51]!==G){let T;t[65]!==ut||t[66]!==Y?(T=Bt.checkIfNullOrUndefined(ut)?Y>0?0:Y:ut,t[65]=ut,t[66]=Y,t[67]=T):T=t[67];let Lt;t[68]!==xt||t[69]!==U?(Lt=Bt.checkIfNullOrUndefined(xt)?U>0?U:0:xt,t[68]=xt,t[69]=U,t[70]=Lt):Lt=t[70];const f=te.linear().domain([T,Lt]).range([C,0]).nice();X=pt.motion.svg,F=`${G}px`,z=`${h}px`,J=`0 0 ${G} ${h}`,S="mx-auto",K="ltr",N=St,V=`translate(${c.left},${c.top})`;const Yt=u?.yAxis?.axis;let tt;t[71]!==Yt?(tt=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",Yt),t[71]=Yt,t[72]=tt):tt=t[72];let wt;t[73]!==tt?(wt={axis:tt},t[73]=tt,t[74]=wt):wt=t[74];let et;t[75]!==C||t[76]!==a||t[77]!==wt?(et=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:a,x2:a,classNames:wt}),t[75]=C,t[76]=a,t[77]=wt,t[78]=et):et=t[78];const Tt=C+15,bt=p?.yAxis?.title,Ot=u?.yAxis?.title;let it;t[79]!==Ot?(it=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Ot),t[79]=Ot,t[80]=it):it=t[80];let ot;t[81]!==g[0]||t[82]!==a||t[83]!==Tt||t[84]!==bt||t[85]!==it?(ot=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:a,y:Tt,style:bt,className:it,text:g[0]}),t[81]=g[0],t[82]=a,t[83]=Tt,t[84]=bt,t[85]=it,t[86]=ot):ot=t[86],t[87]!==et||t[88]!==ot?(R=l.jsxRuntimeExports.jsxs("g",{children:[et,ot]}),t[87]=et,t[88]=ot,t[89]=R):R=t[89];const Dt=r-a,nt=r-a,lt=u?.yAxis?.axis;let O;t[90]!==lt?(O=l.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",lt),t[90]=lt,t[91]=O):O=t[91];let A;t[92]!==O?(A={axis:O},t[92]=O,t[93]=A):A=t[93];let E;t[94]!==C||t[95]!==Dt||t[96]!==nt||t[97]!==A?(E=l.jsxRuntimeExports.jsx(Xt.Axis,{y1:0,y2:C,x1:Dt,x2:nt,classNames:A}),t[94]=C,t[95]=Dt,t[96]=nt,t[97]=A,t[98]=E):E=t[98];const rt=r-a,At=C+15,Ht=p?.yAxis?.title,Gt=u?.yAxis?.title;let Pt;t[99]!==Gt?(Pt=l.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",Gt),t[99]=Gt,t[100]=Pt):Pt=t[100];let Wt;t[101]!==g[1]||t[102]!==rt||t[103]!==At||t[104]!==Ht||t[105]!==Pt?(Wt=l.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:rt,y:At,style:Ht,className:Pt,text:g[1]}),t[101]=g[1],t[102]=rt,t[103]=At,t[104]=Ht,t[105]=Pt,t[106]=Wt):Wt=t[106],t[107]!==E||t[108]!==Wt?(M=l.jsxRuntimeExports.jsxs("g",{children:[E,Wt]}),t[107]=E,t[108]=Wt,t[109]=M):M=t[109],t[110]!==$?(k=$.filter(Re).map(ke),t[110]=$,t[111]=k):k=t[111],B=ie.AnimatePresence,I=o.map((i,Kt)=>l.jsxRuntimeExports.jsxs(pt.motion.g,{variants:{initial:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1},whileInView:{opacity:ct?i.color&&n[x.indexOf(`${i.color}`)]===ct?1:v:b?b.label===i.label?1:v:j.length!==0?j.indexOf(i.label)!==-1?1:v:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},onMouseEnter:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX),at?.(i)},onMouseMove:Ut=>{Nt(i),qt(Ut.clientY),Vt(Ut.clientX)},onMouseLeave:()=>{Nt(void 0),Vt(void 0),qt(void 0),at?.(void 0)},onClick:()=>{(dt||D)&&(Qt.isEqual(W,i)&&kt?(It(void 0),dt?.(void 0)):(It(i),dt?.(i)))},children:[l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:a,cy:f(i.y1),fill:o.filter($e).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Ee).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:a,cy:f(i.y1),fill:o.filter(Ae).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(Oe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(be).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(we).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",textAnchor:"end",dx:0-a-3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y1),fill:o.filter(je).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y1),fill:o.filter(Ce).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"end",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:5,dy:"0.33em",dx:-3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.circle,{variants:{initial:{cx:r-a,cy:f(i.y2),fill:o.filter(ve).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(ge).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{cx:r-a,cy:f(i.y2),fill:o.filter(he).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,stroke:o.filter(de).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},r:a,style:{fillOpacity:.6}}),st?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(ye).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(pe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:a+3,children:i.label}):j.length!==0&&j.indexOf(i.label)!==-1?l.jsxRuntimeExports.jsx(pt.motion.text,{variants:{initial:{y:f(i.y2),fill:o.filter(me).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:0},whileInView:{y:f(i.y2),fill:o.filter(fe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},style:{textAnchor:"start",...p?.yAxis?.labels||{}},className:l.mo("text-xs",u?.yAxis?.labels),x:r-5,dy:"0.33em",dx:3,children:i.label}):null,l.jsxRuntimeExports.jsx(pt.motion.line,{variants:{initial:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y1),stroke:o.filter(xe).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray},whileInView:{x1:a,x2:r-a,y1:f(i.y1),y2:f(i.y2),stroke:o.filter(ue).length===0?n[0]:i.color?n[x.indexOf(`${i.color}`)]:m.Colors.gray,transition:{duration:s.duration}}},initial:"initial",animate:w?"whileInView":"initial",exit:{opacity:0,transition:{duration:s.duration}},className:u?.dataConnectors,style:{fill:"none",strokeWidth:1,...p?.dataConnectors}})]},Kt)),t[16]=s.duration,t[17]=g[0],t[18]=g[1],t[19]=u?.dataConnectors,t[20]=u?.yAxis?.axis,t[21]=u?.yAxis?.labels,t[22]=u?.yAxis?.title,t[23]=x,t[24]=n,t[25]=$,t[26]=o,t[27]=D,t[28]=v,t[29]=C,t[30]=r,t[31]=h,t[32]=j,t[33]=w,t[34]=c.left,t[35]=c.top,t[36]=xt,t[37]=U,t[38]=ut,t[39]=Y,t[40]=W,t[41]=b,t[42]=dt,t[43]=at,t[44]=a,t[45]=kt,t[46]=ct,t[47]=st,t[48]=p?.dataConnectors,t[49]=p?.yAxis?.labels,t[50]=p?.yAxis?.title,t[51]=G,t[52]=B,t[53]=X,t[54]=k,t[55]=F,t[56]=z,t[57]=J,t[58]=S,t[59]=K,t[60]=N,t[61]=I,t[62]=V,t[63]=R,t[64]=M}else B=t[52],X=t[53],k=t[54],F=t[55],z=t[56],J=t[57],S=t[58],K=t[59],N=t[60],I=t[61],V=t[62],R=t[63],M=t[64];let Q;t[112]!==B||t[113]!==I?(Q=l.jsxRuntimeExports.jsx(B,{children:I}),t[112]=B,t[113]=I,t[114]=Q):Q=t[114];let d;t[115]!==$?(d=$.filter(ce).map(ae),t[115]=$,t[116]=d):d=t[116];let Z;t[117]!==k||t[118]!==Q||t[119]!==d||t[120]!==V||t[121]!==R||t[122]!==M?(Z=l.jsxRuntimeExports.jsxs("g",{transform:V,children:[R,M,k,Q,d]}),t[117]=k,t[118]=Q,t[119]=d,t[120]=V,t[121]=R,t[122]=M,t[123]=Z):Z=t[123];let q;t[124]!==X||t[125]!==F||t[126]!==z||t[127]!==J||t[128]!==S||t[129]!==K||t[130]!==N||t[131]!==Z?(q=l.jsxRuntimeExports.jsx(X,{width:F,height:z,viewBox:J,className:S,direction:K,ref:N,children:Z}),t[124]=X,t[125]=F,t[126]=z,t[127]=J,t[128]=S,t[129]=K,t[130]=N,t[131]=Z,t[132]=q):q=t[132];let _;t[133]!==u?.tooltip||t[134]!==Rt||t[135]!==gt||t[136]!==b||t[137]!==p?.tooltip||t[138]!==$t?(_=b&&$t&&Rt&&gt?l.jsxRuntimeExports.jsx(Zt.Tooltip,{data:b,body:$t,xPos:Rt,yPos:gt,backgroundStyle:p?.tooltip,className:u?.tooltip}):null,t[133]=u?.tooltip,t[134]=Rt,t[135]=gt,t[136]=b,t[137]=p?.tooltip,t[138]=$t,t[139]=_):_=t[139];let L;t[140]!==u?.modal||t[141]!==D||t[142]!==W?(L=D&&W!==void 0?l.jsxRuntimeExports.jsx(_t.DetailsModal,{body:D,data:W,setData:It,className:u?.modal}):null,t[140]=u?.modal,t[141]=D,t[142]=W,t[143]=L):L=t[143];let jt;return t[144]!==q||t[145]!==_||t[146]!==L?(jt=l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[q,_,L]}),t[144]=q,t[145]=_,t[146]=L,t[147]=jt):jt=t[147],jt}function ae(e){return e.layer}function ce(e){return e.position==="after"}function ue(e){return e.color}function xe(e){return e.color}function fe(e){return e.color}function me(e){return e.color}function pe(e){return e.color}function ye(e){return e.color}function de(e){return e.color}function he(e){return e.color}function ge(e){return e.color}function ve(e){return e.color}function Ce(e){return e.color}function je(e){return e.color}function we(e){return e.color}function be(e){return e.color}function Oe(e){return e.color}function Ae(e){return e.color}function Ee(e){return e.color}function $e(e){return e.color}function ke(e){return e.layer}function Re(e){return e.position==="before"}function Me(e){return e.y2}function De(e){return e.y1}function Se(e){return e.y2}function Ne(e){return e.y1}function Ie(e){const t=l.compilerRuntimeExports.c(89),{data:o,graphTitle:G,colors:h,sources:st,graphDescription:n,showLabels:x,height:a,width:y,footNote:yt,colorDomain:P,colorLegendTitle:Et,radius:$t,axisTitles:at,padding:g,backgroundColor:j,leftMargin:ct,rightMargin:ut,topMargin:xt,bottomMargin:dt,tooltip:kt,relativeHeight:D,onSeriesMouseOver:p,showColorScale:u,highlightedDataPoints:s,graphID:v,minValue:$,maxValue:St,onSeriesMouseClick:ht,graphDownload:w,dataDownload:b,fillContainer:Nt,language:W,showNAColor:It,minHeight:Rt,theme:Vt,ariaLabel:gt,resetSelectionOnDoubleClick:qt,detailsOnClick:vt,styles:c,classNames:r,animate:C,dimmedOpacity:Mt,customLayers:ft}=e,Y=x===void 0?!1:x,Ct=$t===void 0?5:$t;let mt;t[0]!==at?(mt=at===void 0?["",""]:at,t[0]=at,t[1]=mt):mt=t[1];const U=mt,B=j===void 0?!1:j,X=ct===void 0?50:ct,k=ut===void 0?50:ut,F=xt===void 0?20:xt,z=dt===void 0?20:dt,J=u===void 0?!0:u;let S;t[2]!==s?(S=s===void 0?[]:s,t[2]=s,t[3]=S):S=t[3];const K=S,N=w===void 0?!1:w,I=b===void 0?!1:b,V=Nt===void 0?!0:Nt,R=W===void 0?"en":W,M=It===void 0?!0:It,Q=Rt===void 0?0:Rt,d=Vt===void 0?"light":Vt,Z=qt===void 0?!0:qt,q=C===void 0?!1:C,_=Mt===void 0?.3:Mt;let L;t[4]!==ft?(L=ft===void 0?[]:ft,t[4]=ft,t[5]=L):L=t[5];const jt=L,[T,Lt]=H.useState(0),[f,Yt]=H.useState(0),[tt,wt]=H.useState(void 0),et=H.useRef(null),Tt=H.useRef(null);let bt,Ot;t[6]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const Ht=new ResizeObserver(Gt=>{Lt(Gt[0].target.clientWidth||620),Yt(Gt[0].target.clientHeight||480)});return et.current&&Ht.observe(et.current),()=>Ht.disconnect()},Ot=[],t[6]=bt,t[7]=Ot):(bt=t[6],Ot=t[7]),H.useEffect(bt,Ot);const it=r?.graphContainer,ot=c?.graphContainer,Dt=V?void 0:y;let nt;t[8]!==r?.description||t[9]!==r?.title||t[10]!==o||t[11]!==I||t[12]!==n||t[13]!==N||t[14]!==G||t[15]!==c?.description||t[16]!==c?.title||t[17]!==y?(nt=G||n||N||I?l.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:r?.title,description:r?.description},graphTitle:G,graphDescription:n,width:y,graphDownload:N?Tt:void 0,dataDownload:I?o.map(Ye).filter(We).length>0?o.map(Pe).filter(Ge):o.filter(He):null}):null,t[8]=r?.description,t[9]=r?.title,t[10]=o,t[11]=I,t[12]=n,t[13]=N,t[14]=G,t[15]=c?.description,t[16]=c?.title,t[17]=y,t[18]=nt):nt=t[18];let lt;t[19]!==r?.colorLegend||t[20]!==P||t[21]!==Et||t[22]!==h||t[23]!==o||t[24]!==J||t[25]!==M||t[26]!==d||t[27]!==y?(lt=J&&o.filter(Te).length!==0&&o.length>0?l.jsxRuntimeExports.jsx(le.ColorLegendWithMouseOver,{width:y,colorLegendTitle:Et,colors:h||m.Colors[d].categoricalColors.colors,colorDomain:P||zt.uniqBy(o,"color",!0),setSelectedColor:wt,showNAColor:M,className:r?.colorLegend}):null,t[19]=r?.colorLegend,t[20]=P,t[21]=Et,t[22]=h,t[23]=o,t[24]=J,t[25]=M,t[26]=d,t[27]=y,t[28]=lt):lt=t[28];let O;t[29]!==o.length?(O=o.length===0&&l.jsxRuntimeExports.jsx(re.EmptyState,{}),t[29]=o.length,t[30]=O):O=t[30];let A;t[31]!==q||t[32]!==U||t[33]!==z||t[34]!==r||t[35]!==P||t[36]!==h||t[37]!==jt||t[38]!==o||t[39]!==vt||t[40]!==_||t[41]!==V||t[42]!==K||t[43]!==X||t[44]!==St||t[45]!==$||t[46]!==ht||t[47]!==p||t[48]!==Ct||t[49]!==Z||t[50]!==k||t[51]!==tt||t[52]!==Y||t[53]!==c||t[54]!==f||t[55]!==T||t[56]!==d||t[57]!==kt||t[58]!==F||t[59]!==y?(A=T&&f&&o.length>0?l.jsxRuntimeExports.jsx(se,{data:o.filter(Le),width:V||!y||T<y?T:y,height:f,colorDomain:o.filter(qe).length===0?[]:P||zt.uniqBy(o,"color",!0),colors:o.filter(Ve).length===0?h?[h]:[m.Colors.primaryColors["blue-600"]]:h||m.Colors[d].categoricalColors.colors,selectedColor:tt,axisTitles:U,showLabels:Y,radius:Ct,leftMargin:X,rightMargin:k,topMargin:F,bottomMargin:z,tooltip:kt,onSeriesMouseOver:p,highlightedDataPoints:K,minValue:$,maxValue:St,onSeriesMouseClick:ht,resetSelectionOnDoubleClick:Z,detailsOnClick:vt,styles:c,classNames:r,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},dimmedOpacity:_,customLayers:jt}):null,t[31]=q,t[32]=U,t[33]=z,t[34]=r,t[35]=P,t[36]=h,t[37]=jt,t[38]=o,t[39]=vt,t[40]=_,t[41]=V,t[42]=K,t[43]=X,t[44]=St,t[45]=$,t[46]=ht,t[47]=p,t[48]=Ct,t[49]=Z,t[50]=k,t[51]=tt,t[52]=Y,t[53]=c,t[54]=f,t[55]=T,t[56]=d,t[57]=kt,t[58]=F,t[59]=y,t[60]=A):A=t[60];let E;t[61]!==O||t[62]!==A?(E=l.jsxRuntimeExports.jsxs(Jt.GraphArea,{ref:et,children:[O,A]}),t[61]=O,t[62]=A,t[63]=E):E=t[63];let rt;t[64]!==r?.footnote||t[65]!==r?.source||t[66]!==yt||t[67]!==st||t[68]!==c?.footnote||t[69]!==c?.source||t[70]!==y?(rt=st||yt?l.jsxRuntimeExports.jsx(oe.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:st,footNote:yt,width:y}):null,t[64]=r?.footnote,t[65]=r?.source,t[66]=yt,t[67]=st,t[68]=c?.footnote,t[69]=c?.source,t[70]=y,t[71]=rt):rt=t[71];let At;return t[72]!==gt||t[73]!==B||t[74]!==v||t[75]!==a||t[76]!==R||t[77]!==Q||t[78]!==g||t[79]!==D||t[80]!==it||t[81]!==ot||t[82]!==Dt||t[83]!==nt||t[84]!==lt||t[85]!==E||t[86]!==rt||t[87]!==d?(At=l.jsxRuntimeExports.jsxs(Jt.GraphContainer,{className:it,style:ot,id:v,ref:Tt,"aria-label":gt,backgroundColor:B,theme:d,language:R,minHeight:Q,width:Dt,height:a,relativeHeight:D,padding:g,children:[nt,lt,E,rt]}),t[72]=gt,t[73]=B,t[74]=v,t[75]=a,t[76]=R,t[77]=Q,t[78]=g,t[79]=D,t[80]=it,t[81]=ot,t[82]=Dt,t[83]=nt,t[84]=lt,t[85]=E,t[86]=rt,t[87]=d,t[88]=At):At=t[88],At}function Ve(e){return e.color}function qe(e){return e.color}function Le(e){return!Bt.checkIfNullOrUndefined(e.y1)&&!Bt.checkIfNullOrUndefined(e.y2)}function Te(e){return e.color}function He(e){return e!==void 0}function Ge(e){return e!==void 0}function Pe(e){return e.data}function We(e){return e!==void 0}function Ye(e){return e.data}exports.SlopeChart=Ie;
2
2
  //# sourceMappingURL=SlopeChart.cjs.map