@undp/data-viz 2.3.3 → 2.3.5

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 (146) 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 +1 -1
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.js +1 -1
  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.js +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.js +1 -1
  13. package/dist/ButterflyChart.cjs +1 -1
  14. package/dist/ButterflyChart.js +1 -1
  15. package/dist/ChoroplethMap.cjs +1 -1
  16. package/dist/ChoroplethMap.js +1 -1
  17. package/dist/CirclePackingGraph.cjs +1 -1
  18. package/dist/CirclePackingGraph.d.ts +2 -0
  19. package/dist/CirclePackingGraph.js +2 -2
  20. package/dist/ColorLegend.cjs +1 -1
  21. package/dist/ColorLegend.js +1 -1
  22. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  23. package/dist/ColorLegendWithMouseOver.js +1 -1
  24. package/dist/DataCards.cjs +1 -1
  25. package/dist/DataCards.js +2 -2
  26. package/dist/DataTable.cjs +1 -1
  27. package/dist/DataTable.js +1 -1
  28. package/dist/DifferenceLineChart.cjs +1 -1
  29. package/dist/DifferenceLineChart.js +1 -1
  30. package/dist/DonutChart.cjs +1 -1
  31. package/dist/DonutChart.js +3 -3
  32. package/dist/DotDensityMap.cjs +1 -1
  33. package/dist/DotDensityMap.js +1 -1
  34. package/dist/DualAxisLineChart.cjs +1 -1
  35. package/dist/DualAxisLineChart.js +1 -1
  36. package/dist/DumbbellChart.cjs +1 -1
  37. package/dist/DumbbellChart.js +1 -1
  38. package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
  39. package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
  40. package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
  41. package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
  42. package/dist/FootNote.cjs +1 -1
  43. package/dist/FootNote.js +1 -1
  44. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  45. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  46. package/dist/GraphDescription.cjs +1 -1
  47. package/dist/GraphDescription.js +1 -1
  48. package/dist/{GraphEl-DDXkYObU.js → GraphEl-Bw-9MUym.js} +8 -7
  49. package/dist/GraphEl-Bw-9MUym.js.map +1 -0
  50. package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-DjElfY07.cjs} +2 -2
  51. package/dist/GraphEl-DjElfY07.cjs.map +1 -0
  52. package/dist/GraphFooter.cjs +1 -1
  53. package/dist/GraphFooter.js +1 -1
  54. package/dist/GraphTitle.cjs +1 -1
  55. package/dist/GraphTitle.js +1 -1
  56. package/dist/GriddedGraphs.cjs +1 -1
  57. package/dist/GriddedGraphs.d.ts +1 -0
  58. package/dist/GriddedGraphs.js +1 -1
  59. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  60. package/dist/HeatMap.cjs +1 -1
  61. package/dist/HeatMap.js +1 -1
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.js +1 -1
  64. package/dist/HybridMap.cjs +1 -1
  65. package/dist/HybridMap.js +2 -2
  66. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  67. package/dist/LineChartWithConfidenceInterval.js +1 -1
  68. package/dist/LinearColorLegend.cjs +1 -1
  69. package/dist/LinearColorLegend.js +1 -1
  70. package/dist/MultiGraphDashboard.d.ts +1 -0
  71. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  72. package/dist/MultiLineAltChart.cjs +1 -1
  73. package/dist/MultiLineAltChart.js +1 -1
  74. package/dist/MultiLineChart.cjs +1 -1
  75. package/dist/MultiLineChart.js +1 -1
  76. package/dist/ParetoChart.cjs +1 -1
  77. package/dist/ParetoChart.js +1 -1
  78. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  79. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  80. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  81. package/dist/RadarChart.cjs +1 -1
  82. package/dist/RadarChart.js +1 -1
  83. package/dist/SankeyChart.cjs +1 -1
  84. package/dist/SankeyChart.js +2 -2
  85. package/dist/ScatterPlot.cjs +1 -1
  86. package/dist/ScatterPlot.js +1 -1
  87. package/dist/ScrollStory.d.ts +1 -0
  88. package/dist/SimpleLineChart.cjs +1 -1
  89. package/dist/SimpleLineChart.js +1 -1
  90. package/dist/SingleGraphDashboard.cjs +1 -1
  91. package/dist/SingleGraphDashboard.d.ts +1 -0
  92. package/dist/SingleGraphDashboard.js +1 -1
  93. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  94. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  95. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  96. package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
  97. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  98. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  99. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  100. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  101. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  102. package/dist/SlopeChart.cjs +1 -1
  103. package/dist/SlopeChart.js +1 -1
  104. package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
  105. package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
  106. package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
  107. package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
  108. package/dist/Source.cjs +1 -1
  109. package/dist/Source.js +2 -2
  110. package/dist/StatCardFromData.cjs +1 -1
  111. package/dist/StatCardFromData.js +1 -1
  112. package/dist/StripChart.cjs +1 -1
  113. package/dist/StripChart.js +1 -1
  114. package/dist/ThreeDGlobe.cjs +1 -1
  115. package/dist/ThreeDGlobe.js +1 -1
  116. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  117. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  118. package/dist/TreeMapGraph.cjs +1 -1
  119. package/dist/TreeMapGraph.js +2 -2
  120. package/dist/Types.d.ts +1 -0
  121. package/dist/Typography-Cc_iHQB-.cjs +2 -0
  122. package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
  123. package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
  124. package/dist/Typography-CdMGooqp.js.map +1 -0
  125. package/dist/UnitChart.cjs +1 -1
  126. package/dist/UnitChart.js +1 -1
  127. package/dist/WaterfallChart.cjs +1 -1
  128. package/dist/WaterfallChart.js +1 -1
  129. package/dist/index-BzNfurbO.js +378 -0
  130. package/dist/index-BzNfurbO.js.map +1 -0
  131. package/dist/index-CXobQn-E.cjs +2 -0
  132. package/dist/index-CXobQn-E.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +3 -0
  135. package/dist/index.js +2 -2
  136. package/dist/style.css +1 -1
  137. package/package.json +3 -3
  138. package/dist/GraphEl-CWjTuiYd.cjs.map +0 -1
  139. package/dist/GraphEl-DDXkYObU.js.map +0 -1
  140. package/dist/Typography-DrJ7IOdw.cjs +0 -2
  141. package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
  142. package/dist/Typography-iR8PEgdt.js.map +0 -1
  143. package/dist/index-BE-lvE4c.js +0 -337
  144. package/dist/index-BE-lvE4c.js.map +0 -1
  145. package/dist/index-DlrGwLQA.cjs +0 -2
  146. package/dist/index-DlrGwLQA.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),lt=require("react"),xe=require("./index-DQA8q5sC.cjs"),se=require("./numberFormattingFunction-02t-wJta.cjs"),he=require("./Tooltip-BLa2EfMs.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),me=require("./AxisTitle-DV4n0RxE.cjs"),ge=require("./XAxesLabels-C6o9jJal.cjs"),ye=require("./DetailsModal-DHttOA80.cjs"),be=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-CgUCbw9F.cjs"),de=require("./line-DaEMhXmx.cjs"),oe=require("./step-BZ3C8QFW.cjs"),Yt=require("./proxy-C4-uo6nS.cjs"),ve=require("./use-in-view-C3o_ntMv.cjs"),Ae=require("./index-CoobIWNj.cjs"),je=require("./GraphFooter.cjs"),we=require("./GraphHeader.cjs"),Ee=require("./ColorLegend.cjs"),le=require("./Colors.cjs"),Re=require("./EmptyState-DX0t62iF.cjs"),fe=require("./GraphContainer-B1EDxJ0S.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(157),{data:d,width:F,height:Y,barColor:f,lineColor:p,axisTitles:x,sameAxes:A,rightMargin:Qt,leftMargin:te,topMargin:Ht,bottomMargin:Gt,tooltip:Ct,showValues:Mt,onSeriesMouseOver:rt,barPadding:Xt,truncateBy:kt,showLabels:Wt,onSeriesMouseClick:N,resetSelectionOnDoubleClick:ft,detailsOnClick:k,noOfTicks:ht,lineSuffix:gt,barSuffix:Lt,linePrefix:St,barPrefix:Nt,curveType:Ot,styles:s,classNames:o,animate:r,precision:H,customLayers:O,naLabel:at,showAxisLabels:L}=e,Zt=lt.useRef(null);let yt;t[0]!==r.amount||t[1]!==r.once?(yt={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=yt):yt=t[2];const $=ve.useInView(Zt,yt),Bt=Ot==="linear"?de.curveLinear:Ot==="step"?oe.curveStep:Ot==="stepAfter"?oe.stepAfter:Ot==="stepBefore"?oe.stepBefore:oe.monotoneX,[$t,ct]=lt.useState(void 0),[q,bt]=lt.useState(void 0),[qt,u]=lt.useState(void 0),[a,ut]=lt.useState(void 0),Ut=te+50,vt=Qt+65;let Vt;t[3]!==Gt||t[4]!==Ut||t[5]!==vt||t[6]!==Ht?(Vt={top:Ht,bottom:Gt,left:Ut,right:vt},t[3]=Gt,t[4]=Ut,t[5]=vt,t[6]=Ht,t[7]=Vt):Vt=t[7];const c=Vt,g=F-c.left-c.right,l=Y-c.top-c.bottom;let j,G,X,S,W,B,U,w,E,V,I,z,J,K,Q;if(t[8]!==r||t[9]!==x||t[10]!==f||t[11]!==Xt||t[12]!==Nt||t[13]!==Lt||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Bt||t[21]!==O||t[22]!==d||t[23]!==k||t[24]!==l||t[25]!==g||t[26]!==Y||t[27]!==$||t[28]!==p||t[29]!==St||t[30]!==gt||t[31]!==c.bottom||t[32]!==c.left||t[33]!==c.right||t[34]!==c.top||t[35]!==q||t[36]!==at||t[37]!==ht||t[38]!==N||t[39]!==rt||t[40]!==H||t[41]!==ft||t[42]!==A||t[43]!==L||t[44]!==Wt||t[45]!==Mt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==kt||t[53]!==F){const m=d.map(ti),y=be.band().domain(m.map(_e)).range([0,g]).paddingInner(Xt),It=Math.min(...m.map(Ze).filter(Qe))!==1/0?Math.min(...m.map(Ke).filter(Je))>0?0:Math.min(...m.map(ze).filter(Ue)):0,jt=Math.min(...m.map(Be).filter(We))!==1/0?Math.min(...m.map(Xe).filter(Ge))>0?0:Math.min(...m.map(He).filter(Ye)):0,wt=Math.max(...m.map(Fe).filter(De))!==1/0?Math.max(...m.map(Pe).filter(Te)):0,xt=Math.max(...m.map(Ie).filter(Ve))!==1/0?Math.max(...m.map(qe).filter($e)):0,zt=It<jt?It:jt,Et=wt>xt?wt:xt,h=pe.linear().domain([A?zt:It,A?Et>0?Et:0:wt>0?wt:0]).range([l,0]).nice(),b=pe.linear().domain([A?zt:jt,A?Et>0?Et:0:xt>0?xt:0]).range([l,0]).nice(),Tt=de.line().defined(Oe).x(i=>y(`${i.id}`)+y.bandwidth()/2).y(i=>b(i.line)).curve(Bt),re=h.ticks(ht),Jt=b.ticks(ht);G=Yt.motion.svg,W=`${F}px`,B=`${Y}px`,U=`0 0 ${F} ${Y}`,w="ltr",E=Zt,J=`translate(${c.left},${c.top})`;const _t=o?.xAxis?.axis;let nt;t[69]!==_t?(nt={axis:_t},t[69]=_t,t[70]=nt):nt=t[70];let mt;t[71]!==s?.xAxis?.axis?(mt=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=mt):mt=t[72];let T;t[73]!==f||t[74]!==mt?(T={axis:{stroke:f,...mt}},t[73]=f,t[74]=mt,t[75]=T):T=t[75];let pt;t[76]!==l||t[77]!==nt||t[78]!==T?(pt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:nt,styles:T}),t[76]=l,t[77]=nt,t[78]=T,t[79]=pt):pt=t[79];let Rt;t[80]!==x||t[81]!==f||t[82]!==o?.yAxis?.title||t[83]!==l||t[84]!==c.left||t[85]!==L||t[86]!==s?.yAxis?.title?(Rt=L?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-c.left,y:l/2,style:{fill:f,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:x[0].length>100?`${x[0].substring(0,100)}...`:x[0],rotate90:!0}):null,t[80]=x,t[81]=f,t[82]=o?.yAxis?.title,t[83]=l,t[84]=c.left,t[85]=L,t[86]=s?.yAxis?.title,t[87]=Rt):Rt=t[87],K=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Ft)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:h(i),y2:h(i),x1:-15,x2:-20,style:{stroke:f,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:h(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:f,...s?.yAxis?.labels||{}},children:se.numberFormattingFunction(i,at,H,Nt,Lt)})]},Ft)),pt,Rt]});const Pt=g+15,st=g+15,ot=o?.xAxis?.axis;let R;t[88]!==ot?(R={axis:ot},t[88]=ot,t[89]=R):R=t[89];let C;t[90]!==s?.xAxis?.axis?(C=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=C):C=t[91];let M;t[92]!==p||t[93]!==C?(M={axis:{stroke:p,...C}},t[92]=p,t[93]=C,t[94]=M):M=t[94];let P;t[95]!==l||t[96]!==Pt||t[97]!==st||t[98]!==R||t[99]!==M?(P=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:l,x1:Pt,x2:st,classNames:R,styles:M}),t[95]=l,t[96]=Pt,t[97]=st,t[98]=R,t[99]=M,t[100]=P):P=t[100];let dt;t[101]!==x||t[102]!==o?.yAxis?.title||t[103]!==l||t[104]!==g||t[105]!==p||t[106]!==c.right||t[107]!==L||t[108]!==s?.yAxis?.title?(dt=L?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:g+c.right-15,y:l/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:x[1].length>100?`${x[1].substring(0,100)}...`:x[1],rotate90:!0}):null,t[101]=x,t[102]=o?.yAxis?.title,t[103]=l,t[104]=g,t[105]=p,t[106]=c.right,t[107]=L,t[108]=s?.yAxis?.title,t[109]=dt):dt=t[109],Q=n.jsxRuntimeExports.jsxs("g",{children:[Jt.map((i,Ft)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:g+15,x2:g+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:g+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:se.numberFormattingFunction(i,at,H,St,gt)})]},Ft)),P,dt]});const Kt=o?.xAxis?.axis;let Dt;t[110]!==Kt?(Dt={axis:Kt},t[110]=Kt,t[111]=Dt):Dt=t[111];const ae=s?.xAxis?.axis;let ee;t[112]!==ae?(ee={axis:ae},t[112]=ae,t[113]=ee):ee=t[113],X=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?h(0):l,y2:A?h(0):l,x1:-15,x2:g+15,classNames:Dt,styles:ee}),t[114]!==O?(S=O.filter(Ne).map(Se),t[114]=O,t[115]=S):S=t[115],j=Ae.AnimatePresence,V=m.map((i,Ft)=>n.jsxRuntimeExports.jsxs(Yt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:D=>{ct(i),ut(D.clientY),u(D.clientX),rt?.(i)},onClick:()=>{(N||k)&&(xe.isEqual(q,i)&&ft?(bt(void 0),N?.(void 0)):(bt(i),N?.(i)))},onMouseMove:D=>{ct(i),ut(D.clientY),u(D.clientX)},onMouseLeave:()=>{ct(void 0),u(void 0),ut(void 0),rt?.(void 0)},children:[n.jsxRuntimeExports.jsx(Yt.motion.rect,{variants:{initial:{attrY:h(0),height:0,opacity:1,fill:f},whileInView:{attrY:i.bar?i.bar>0?h(i.bar):h(0):0,height:i.bar?Math.abs(h(i.bar)-h(0)):0,opacity:1,fill:f,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{attrY:h(0),height:0,opacity:0,transition:{duration:r.duration}},x:y(`${Ft}`),width:y.bandwidth()}),Mt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Yt.motion.text,{x:y(`${i.id}`)+y.bandwidth()/2,exit:{attrY:h(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:h(0),opacity:0,fill:f},whileInView:{attrY:h(i.bar||0),opacity:1,fill:f,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:se.numberFormattingFunction(i.bar,at,H,Nt,Lt)}):null,Wt?n.jsxRuntimeExports.jsx(ge.XAxesLabels,{value:`${i.label}`.length<kt?`${i.label}`:`${`${i.label}`.substring(0,kt)}...`,y:l+5,x:y(`${i.id}`),width:y.bandwidth(),height:c.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:$}):null]},i.label));let ie;t[116]!==r.duration?(ie={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ie):ie=t[117];let ne;t[118]===Symbol.for("react.memo_cache_sentinel")?(ne={fill:"none",strokeWidth:2},t[118]=ne):ne=t[118],I=n.jsxRuntimeExports.jsx(Yt.motion.path,{exit:ie,variants:{initial:{d:Tt(m.map(Le)),opacity:0,stroke:p},whileInView:{d:Tt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",style:ne}),z=m.map((i,Ft)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:D=>{ct(i),ut(D.clientY),u(D.clientX),rt?.(i)},onClick:()=>{(N||k)&&(xe.isEqual(q,i)&&ft?(bt(void 0),N?.(void 0)):(bt(i),N?.(i)))},onMouseMove:D=>{ct(i),ut(D.clientY),u(D.clientX)},onMouseLeave:()=>{ct(void 0),u(void 0),ut(void 0),rt?.(void 0)},children:[n.jsxRuntimeExports.jsx(Yt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",cx:y(i.id)+y.bandwidth()/2,r:g/m.length<5?0:g/m.length<20?2:4}),Mt?n.jsxRuntimeExports.jsx(Yt.motion.text,{x:y(`${i.id}`)+y.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:se.numberFormattingFunction(i.line,at,H,St,gt)}):null]})},Ft)),t[8]=r,t[9]=x,t[10]=f,t[11]=Xt,t[12]=Nt,t[13]=Lt,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Bt,t[21]=O,t[22]=d,t[23]=k,t[24]=l,t[25]=g,t[26]=Y,t[27]=$,t[28]=p,t[29]=St,t[30]=gt,t[31]=c.bottom,t[32]=c.left,t[33]=c.right,t[34]=c.top,t[35]=q,t[36]=at,t[37]=ht,t[38]=N,t[39]=rt,t[40]=H,t[41]=ft,t[42]=A,t[43]=L,t[44]=Wt,t[45]=Mt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=kt,t[53]=F,t[54]=j,t[55]=G,t[56]=X,t[57]=S,t[58]=W,t[59]=B,t[60]=U,t[61]=w,t[62]=E,t[63]=V,t[64]=I,t[65]=z,t[66]=J,t[67]=K,t[68]=Q}else j=t[54],G=t[55],X=t[56],S=t[57],W=t[58],B=t[59],U=t[60],w=t[61],E=t[62],V=t[63],I=t[64],z=t[65],J=t[66],K=t[67],Q=t[68];let Z;t[119]!==j||t[120]!==V||t[121]!==I||t[122]!==z?(Z=n.jsxRuntimeExports.jsxs(j,{children:[V,I,z]}),t[119]=j,t[120]=V,t[121]=I,t[122]=z,t[123]=Z):Z=t[123];let v;t[124]!==O?(v=O.filter(ke).map(Me),t[124]=O,t[125]=v):v=t[125];let _;t[126]!==X||t[127]!==S||t[128]!==Z||t[129]!==v||t[130]!==J||t[131]!==K||t[132]!==Q?(_=n.jsxRuntimeExports.jsxs("g",{transform:J,children:[K,Q,X,S,Z,v]}),t[126]=X,t[127]=S,t[128]=Z,t[129]=v,t[130]=J,t[131]=K,t[132]=Q,t[133]=_):_=t[133];let tt;t[134]!==G||t[135]!==W||t[136]!==B||t[137]!==U||t[138]!==w||t[139]!==E||t[140]!==_?(tt=n.jsxRuntimeExports.jsx(G,{width:W,height:B,viewBox:U,direction:w,ref:E,children:_}),t[134]=G,t[135]=W,t[136]=B,t[137]=U,t[138]=w,t[139]=E,t[140]=_,t[141]=tt):tt=t[141];let et;t[142]!==o?.tooltip||t[143]!==qt||t[144]!==a||t[145]!==$t||t[146]!==s?.tooltip||t[147]!==Ct?(et=$t&&Ct&&qt&&a?n.jsxRuntimeExports.jsx(he.Tooltip,{data:$t,body:Ct,xPos:qt,yPos:a,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=qt,t[144]=a,t[145]=$t,t[146]=s?.tooltip,t[147]=Ct,t[148]=et):et=t[148];let it;t[149]!==o?.modal||t[150]!==k||t[151]!==q?(it=k&&q!==void 0?n.jsxRuntimeExports.jsx(ye.DetailsModal,{body:k,data:q,setData:bt,className:o?.modal}):null,t[149]=o?.modal,t[150]=k,t[151]=q,t[152]=it):it=t[152];let At;return t[153]!==tt||t[154]!==et||t[155]!==it?(At=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[tt,et,it]}),t[153]=tt,t[154]=et,t[155]=it,t[156]=At):At=t[156],At}function Me(e){return e.layer}function ke(e){return e.position==="after"}function Le(e){return{...e,line:0}}function Se(e){return e.layer}function Ne(e){return e.position==="before"}function Oe(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ve(e){return e!=null}function Ie(e){return e.line}function Te(e){return e!=null}function Pe(e){return e.bar}function De(e){return e!=null}function Fe(e){return e.bar}function Ye(e){return e!=null}function He(e){return e.line}function Ge(e){return e!=null}function Xe(e){return e.line}function We(e){return e!=null}function Be(e){return e.line}function Ue(e){return e!=null}function ze(e){return e.bar}function Je(e){return e!=null}function Ke(e){return e.bar}function Qe(e){return e!=null}function Ze(e){return e.bar}function _e(e){return`${e.id}`}function ti(e,t){return{...e,id:`${t}`}}function ei(e){const t=n.compilerRuntimeExports.c(90),{data:d,graphTitle:F,sources:Y,graphDescription:f,height:p,width:x,footNote:A,padding:Qt,lineColor:te,barColor:Ht,sameAxes:Gt,backgroundColor:Ct,leftMargin:Mt,rightMargin:rt,topMargin:Xt,bottomMargin:kt,lineAxisTitle:Wt,barAxisTitle:N,tooltip:ft,relativeHeight:k,onSeriesMouseOver:ht,graphID:gt,graphDownload:Lt,dataDownload:St,barPadding:Nt,truncateBy:Ot,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:H,minHeight:O,theme:at,ariaLabel:L,resetSelectionOnDoubleClick:Zt,detailsOnClick:yt,showValues:$,noOfTicks:Bt,lineSuffix:$t,barSuffix:ct,linePrefix:q,barPrefix:bt,curveType:qt,styles:u,classNames:a,animate:ut,precision:Ut,customLayers:vt,naLabel:Vt,showColorScale:c,showAxisLabels:g}=e,l=te===void 0?le.Colors.light.categoricalColors.colors[1]:te,j=Ht===void 0?le.Colors.light.categoricalColors.colors[0]:Ht,G=Gt===void 0?!1:Gt,X=Ct===void 0?!1:Ct,S=Mt===void 0?80:Mt,W=rt===void 0?80:rt,B=Xt===void 0?20:Xt,U=kt===void 0?25:kt,w=Wt===void 0?"Line chart":Wt,E=N===void 0?"Bar graph":N,V=Lt===void 0?!1:Lt,I=St===void 0?!1:St,z=Nt===void 0?.25:Nt,J=Ot===void 0?999:Ot,K=s===void 0?!0:s,Q=r===void 0?"en":r,Z=O===void 0?0:O,v=at===void 0?"light":at,_=Zt===void 0?!0:Zt,tt=$===void 0?!0:$,et=Bt===void 0?5:Bt,it=$t===void 0?"":$t,At=ct===void 0?"":ct,m=q===void 0?"":q,y=bt===void 0?"":bt,It=qt===void 0?"curve":qt,jt=ut===void 0?!1:ut,wt=Ut===void 0?2:Ut;let xt;t[0]!==vt?(xt=vt===void 0?[]:vt,t[0]=vt,t[1]=xt):xt=t[1];const zt=xt,Et=Vt===void 0?"NA":Vt,h=c===void 0?!0:c,b=g===void 0?!0:g,[Tt,re]=lt.useState(0),[Jt,_t]=lt.useState(0),nt=lt.useRef(null),mt=lt.useRef(null);let T,pt;t[2]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const Kt=new ResizeObserver(Dt=>{re(Dt[0].target.clientWidth||620),_t(Dt[0].target.clientHeight||480)});return nt.current&&Kt.observe(nt.current),()=>Kt.disconnect()},pt=[],t[2]=T,t[3]=pt):(T=t[2],pt=t[3]),lt.useEffect(T,pt);const Rt=a?.graphContainer,Pt=u?.graphContainer;let st;t[4]!==a?.description||t[5]!==a?.title||t[6]!==d||t[7]!==I||t[8]!==f||t[9]!==V||t[10]!==F||t[11]!==u?.description||t[12]!==u?.title||t[13]!==x?(st=F||f||V||I?n.jsxRuntimeExports.jsx(we.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:a?.title,description:a?.description},graphTitle:F,graphDescription:f,width:x,graphDownload:V?mt:void 0,dataDownload:I?d.map(li).filter(oi).length>0?d.map(si).filter(ni):d.filter(ii):null}):null,t[4]=a?.description,t[5]=a?.title,t[6]=d,t[7]=I,t[8]=f,t[9]=V,t[10]=F,t[11]=u?.description,t[12]=u?.title,t[13]=x,t[14]=st):st=t[14];let ot;t[15]!==E||t[16]!==j||t[17]!==a?.colorLegend||t[18]!==H||t[19]!==d.length||t[20]!==w||t[21]!==l||t[22]!==h||t[23]!==v?(ot=!h&&d.length>0?null:n.jsxRuntimeExports.jsx(Ee.ColorLegend,{colorDomain:[E,w],colors:[j||le.Colors[v].categoricalColors.colors[0],l||le.Colors[v].categoricalColors.colors[1]],colorLegendTitle:H,showNAColor:!1,className:a?.colorLegend}),t[15]=E,t[16]=j,t[17]=a?.colorLegend,t[18]=H,t[19]=d.length,t[20]=w,t[21]=l,t[22]=h,t[23]=v,t[24]=ot):ot=t[24];let R;t[25]!==d.length?(R=d.length===0&&n.jsxRuntimeExports.jsx(Re.EmptyState,{}),t[25]=d.length,t[26]=R):R=t[26];let C;t[27]!==jt||t[28]!==E||t[29]!==j||t[30]!==z||t[31]!==y||t[32]!==At||t[33]!==U||t[34]!==a||t[35]!==It||t[36]!==zt||t[37]!==d||t[38]!==yt||t[39]!==S||t[40]!==w||t[41]!==l||t[42]!==m||t[43]!==it||t[44]!==Et||t[45]!==et||t[46]!==o||t[47]!==ht||t[48]!==wt||t[49]!==_||t[50]!==W||t[51]!==G||t[52]!==b||t[53]!==K||t[54]!==tt||t[55]!==u||t[56]!==Jt||t[57]!==Tt||t[58]!==ft||t[59]!==B||t[60]!==J?(C=Tt&&Jt&&d.length>0?n.jsxRuntimeExports.jsx(Ce,{data:d,sameAxes:G,lineColor:l,barColor:j,width:Tt,height:Jt,truncateBy:J,leftMargin:S,rightMargin:W,topMargin:B,bottomMargin:U,axisTitles:[E,w],tooltip:ft,onSeriesMouseOver:ht,barPadding:z,showLabels:K,onSeriesMouseClick:o,resetSelectionOnDoubleClick:_,detailsOnClick:yt,noOfTicks:et,lineSuffix:it,barSuffix:At,linePrefix:m,barPrefix:y,curveType:It,showValues:tt,styles:u,classNames:a,animate:jt===!0?{duration:.5,once:!0,amount:.5}:jt||{duration:0,once:!0,amount:0},precision:wt,customLayers:zt,naLabel:Et,showAxisLabels:b}):null,t[27]=jt,t[28]=E,t[29]=j,t[30]=z,t[31]=y,t[32]=At,t[33]=U,t[34]=a,t[35]=It,t[36]=zt,t[37]=d,t[38]=yt,t[39]=S,t[40]=w,t[41]=l,t[42]=m,t[43]=it,t[44]=Et,t[45]=et,t[46]=o,t[47]=ht,t[48]=wt,t[49]=_,t[50]=W,t[51]=G,t[52]=b,t[53]=K,t[54]=tt,t[55]=u,t[56]=Jt,t[57]=Tt,t[58]=ft,t[59]=B,t[60]=J,t[61]=C):C=t[61];let M;t[62]!==R||t[63]!==C?(M=n.jsxRuntimeExports.jsxs(fe.GraphArea,{ref:nt,children:[R,C]}),t[62]=R,t[63]=C,t[64]=M):M=t[64];let P;t[65]!==a?.footnote||t[66]!==a?.source||t[67]!==A||t[68]!==Y||t[69]!==u?.footnote||t[70]!==u?.source||t[71]!==x?(P=Y||A?n.jsxRuntimeExports.jsx(je.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:Y,footNote:A,width:x}):null,t[65]=a?.footnote,t[66]=a?.source,t[67]=A,t[68]=Y,t[69]=u?.footnote,t[70]=u?.source,t[71]=x,t[72]=P):P=t[72];let dt;return t[73]!==L||t[74]!==X||t[75]!==gt||t[76]!==p||t[77]!==Q||t[78]!==Z||t[79]!==Qt||t[80]!==k||t[81]!==Rt||t[82]!==Pt||t[83]!==st||t[84]!==ot||t[85]!==M||t[86]!==P||t[87]!==v||t[88]!==x?(dt=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:Rt,style:Pt,id:gt,ref:mt,"aria-label":L,backgroundColor:X,theme:v,language:Q,minHeight:Z,width:x,height:p,relativeHeight:k,padding:Qt,children:[st,ot,M,P]}),t[73]=L,t[74]=X,t[75]=gt,t[76]=p,t[77]=Q,t[78]=Z,t[79]=Qt,t[80]=k,t[81]=Rt,t[82]=Pt,t[83]=st,t[84]=ot,t[85]=M,t[86]=P,t[87]=v,t[88]=x,t[89]=dt):dt=t[89],dt}function ii(e){return e!==void 0}function ni(e){return e!==void 0}function si(e){return e.data}function oi(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ei;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),lt=require("react"),xe=require("./index-DQA8q5sC.cjs"),se=require("./numberFormattingFunction-02t-wJta.cjs"),he=require("./Tooltip-BLa2EfMs.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),me=require("./AxisTitle-DV4n0RxE.cjs"),ge=require("./XAxesLabels-C6o9jJal.cjs"),ye=require("./DetailsModal-DHttOA80.cjs"),be=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-CgUCbw9F.cjs"),de=require("./line-DaEMhXmx.cjs"),oe=require("./step-BZ3C8QFW.cjs"),Yt=require("./proxy-C4-uo6nS.cjs"),ve=require("./use-in-view-C3o_ntMv.cjs"),Ae=require("./index-CoobIWNj.cjs"),je=require("./GraphFooter.cjs"),we=require("./GraphHeader.cjs"),Ee=require("./ColorLegend.cjs"),le=require("./Colors.cjs"),Re=require("./EmptyState-N1eHt3vq.cjs"),fe=require("./GraphContainer-B1EDxJ0S.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(157),{data:d,width:F,height:Y,barColor:f,lineColor:p,axisTitles:x,sameAxes:A,rightMargin:Qt,leftMargin:te,topMargin:Ht,bottomMargin:Gt,tooltip:Ct,showValues:Mt,onSeriesMouseOver:rt,barPadding:Xt,truncateBy:kt,showLabels:Wt,onSeriesMouseClick:N,resetSelectionOnDoubleClick:ft,detailsOnClick:k,noOfTicks:ht,lineSuffix:gt,barSuffix:Lt,linePrefix:St,barPrefix:Nt,curveType:Ot,styles:s,classNames:o,animate:r,precision:H,customLayers:O,naLabel:at,showAxisLabels:L}=e,Zt=lt.useRef(null);let yt;t[0]!==r.amount||t[1]!==r.once?(yt={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=yt):yt=t[2];const $=ve.useInView(Zt,yt),Bt=Ot==="linear"?de.curveLinear:Ot==="step"?oe.curveStep:Ot==="stepAfter"?oe.stepAfter:Ot==="stepBefore"?oe.stepBefore:oe.monotoneX,[$t,ct]=lt.useState(void 0),[q,bt]=lt.useState(void 0),[qt,u]=lt.useState(void 0),[a,ut]=lt.useState(void 0),Ut=te+50,vt=Qt+65;let Vt;t[3]!==Gt||t[4]!==Ut||t[5]!==vt||t[6]!==Ht?(Vt={top:Ht,bottom:Gt,left:Ut,right:vt},t[3]=Gt,t[4]=Ut,t[5]=vt,t[6]=Ht,t[7]=Vt):Vt=t[7];const c=Vt,g=F-c.left-c.right,l=Y-c.top-c.bottom;let j,G,X,S,W,B,U,w,E,V,I,z,J,K,Q;if(t[8]!==r||t[9]!==x||t[10]!==f||t[11]!==Xt||t[12]!==Nt||t[13]!==Lt||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Bt||t[21]!==O||t[22]!==d||t[23]!==k||t[24]!==l||t[25]!==g||t[26]!==Y||t[27]!==$||t[28]!==p||t[29]!==St||t[30]!==gt||t[31]!==c.bottom||t[32]!==c.left||t[33]!==c.right||t[34]!==c.top||t[35]!==q||t[36]!==at||t[37]!==ht||t[38]!==N||t[39]!==rt||t[40]!==H||t[41]!==ft||t[42]!==A||t[43]!==L||t[44]!==Wt||t[45]!==Mt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==kt||t[53]!==F){const m=d.map(ti),y=be.band().domain(m.map(_e)).range([0,g]).paddingInner(Xt),It=Math.min(...m.map(Ze).filter(Qe))!==1/0?Math.min(...m.map(Ke).filter(Je))>0?0:Math.min(...m.map(ze).filter(Ue)):0,jt=Math.min(...m.map(Be).filter(We))!==1/0?Math.min(...m.map(Xe).filter(Ge))>0?0:Math.min(...m.map(He).filter(Ye)):0,wt=Math.max(...m.map(Fe).filter(De))!==1/0?Math.max(...m.map(Pe).filter(Te)):0,xt=Math.max(...m.map(Ie).filter(Ve))!==1/0?Math.max(...m.map(qe).filter($e)):0,zt=It<jt?It:jt,Et=wt>xt?wt:xt,h=pe.linear().domain([A?zt:It,A?Et>0?Et:0:wt>0?wt:0]).range([l,0]).nice(),b=pe.linear().domain([A?zt:jt,A?Et>0?Et:0:xt>0?xt:0]).range([l,0]).nice(),Tt=de.line().defined(Oe).x(i=>y(`${i.id}`)+y.bandwidth()/2).y(i=>b(i.line)).curve(Bt),re=h.ticks(ht),Jt=b.ticks(ht);G=Yt.motion.svg,W=`${F}px`,B=`${Y}px`,U=`0 0 ${F} ${Y}`,w="ltr",E=Zt,J=`translate(${c.left},${c.top})`;const _t=o?.xAxis?.axis;let nt;t[69]!==_t?(nt={axis:_t},t[69]=_t,t[70]=nt):nt=t[70];let mt;t[71]!==s?.xAxis?.axis?(mt=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=mt):mt=t[72];let T;t[73]!==f||t[74]!==mt?(T={axis:{stroke:f,...mt}},t[73]=f,t[74]=mt,t[75]=T):T=t[75];let pt;t[76]!==l||t[77]!==nt||t[78]!==T?(pt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:nt,styles:T}),t[76]=l,t[77]=nt,t[78]=T,t[79]=pt):pt=t[79];let Rt;t[80]!==x||t[81]!==f||t[82]!==o?.yAxis?.title||t[83]!==l||t[84]!==c.left||t[85]!==L||t[86]!==s?.yAxis?.title?(Rt=L?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-c.left,y:l/2,style:{fill:f,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:x[0].length>100?`${x[0].substring(0,100)}...`:x[0],rotate90:!0}):null,t[80]=x,t[81]=f,t[82]=o?.yAxis?.title,t[83]=l,t[84]=c.left,t[85]=L,t[86]=s?.yAxis?.title,t[87]=Rt):Rt=t[87],K=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Ft)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:h(i),y2:h(i),x1:-15,x2:-20,style:{stroke:f,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:h(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:f,...s?.yAxis?.labels||{}},children:se.numberFormattingFunction(i,at,H,Nt,Lt)})]},Ft)),pt,Rt]});const Pt=g+15,st=g+15,ot=o?.xAxis?.axis;let R;t[88]!==ot?(R={axis:ot},t[88]=ot,t[89]=R):R=t[89];let C;t[90]!==s?.xAxis?.axis?(C=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=C):C=t[91];let M;t[92]!==p||t[93]!==C?(M={axis:{stroke:p,...C}},t[92]=p,t[93]=C,t[94]=M):M=t[94];let P;t[95]!==l||t[96]!==Pt||t[97]!==st||t[98]!==R||t[99]!==M?(P=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:l,x1:Pt,x2:st,classNames:R,styles:M}),t[95]=l,t[96]=Pt,t[97]=st,t[98]=R,t[99]=M,t[100]=P):P=t[100];let dt;t[101]!==x||t[102]!==o?.yAxis?.title||t[103]!==l||t[104]!==g||t[105]!==p||t[106]!==c.right||t[107]!==L||t[108]!==s?.yAxis?.title?(dt=L?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:g+c.right-15,y:l/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:x[1].length>100?`${x[1].substring(0,100)}...`:x[1],rotate90:!0}):null,t[101]=x,t[102]=o?.yAxis?.title,t[103]=l,t[104]=g,t[105]=p,t[106]=c.right,t[107]=L,t[108]=s?.yAxis?.title,t[109]=dt):dt=t[109],Q=n.jsxRuntimeExports.jsxs("g",{children:[Jt.map((i,Ft)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:g+15,x2:g+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:g+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:se.numberFormattingFunction(i,at,H,St,gt)})]},Ft)),P,dt]});const Kt=o?.xAxis?.axis;let Dt;t[110]!==Kt?(Dt={axis:Kt},t[110]=Kt,t[111]=Dt):Dt=t[111];const ae=s?.xAxis?.axis;let ee;t[112]!==ae?(ee={axis:ae},t[112]=ae,t[113]=ee):ee=t[113],X=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?h(0):l,y2:A?h(0):l,x1:-15,x2:g+15,classNames:Dt,styles:ee}),t[114]!==O?(S=O.filter(Ne).map(Se),t[114]=O,t[115]=S):S=t[115],j=Ae.AnimatePresence,V=m.map((i,Ft)=>n.jsxRuntimeExports.jsxs(Yt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:D=>{ct(i),ut(D.clientY),u(D.clientX),rt?.(i)},onClick:()=>{(N||k)&&(xe.isEqual(q,i)&&ft?(bt(void 0),N?.(void 0)):(bt(i),N?.(i)))},onMouseMove:D=>{ct(i),ut(D.clientY),u(D.clientX)},onMouseLeave:()=>{ct(void 0),u(void 0),ut(void 0),rt?.(void 0)},children:[n.jsxRuntimeExports.jsx(Yt.motion.rect,{variants:{initial:{attrY:h(0),height:0,opacity:1,fill:f},whileInView:{attrY:i.bar?i.bar>0?h(i.bar):h(0):0,height:i.bar?Math.abs(h(i.bar)-h(0)):0,opacity:1,fill:f,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",exit:{attrY:h(0),height:0,opacity:0,transition:{duration:r.duration}},x:y(`${Ft}`),width:y.bandwidth()}),Mt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Yt.motion.text,{x:y(`${i.id}`)+y.bandwidth()/2,exit:{attrY:h(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:h(0),opacity:0,fill:f},whileInView:{attrY:h(i.bar||0),opacity:1,fill:f,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:se.numberFormattingFunction(i.bar,at,H,Nt,Lt)}):null,Wt?n.jsxRuntimeExports.jsx(ge.XAxesLabels,{value:`${i.label}`.length<kt?`${i.label}`:`${`${i.label}`.substring(0,kt)}...`,y:l+5,x:y(`${i.id}`),width:y.bandwidth(),height:c.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:$}):null]},i.label));let ie;t[116]!==r.duration?(ie={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ie):ie=t[117];let ne;t[118]===Symbol.for("react.memo_cache_sentinel")?(ne={fill:"none",strokeWidth:2},t[118]=ne):ne=t[118],I=n.jsxRuntimeExports.jsx(Yt.motion.path,{exit:ie,variants:{initial:{d:Tt(m.map(Le)),opacity:0,stroke:p},whileInView:{d:Tt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",style:ne}),z=m.map((i,Ft)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:D=>{ct(i),ut(D.clientY),u(D.clientX),rt?.(i)},onClick:()=>{(N||k)&&(xe.isEqual(q,i)&&ft?(bt(void 0),N?.(void 0)):(bt(i),N?.(i)))},onMouseMove:D=>{ct(i),ut(D.clientY),u(D.clientX)},onMouseLeave:()=>{ct(void 0),u(void 0),ut(void 0),rt?.(void 0)},children:[n.jsxRuntimeExports.jsx(Yt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",cx:y(i.id)+y.bandwidth()/2,r:g/m.length<5?0:g/m.length<20?2:4}),Mt?n.jsxRuntimeExports.jsx(Yt.motion.text,{x:y(`${i.id}`)+y.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:$?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:se.numberFormattingFunction(i.line,at,H,St,gt)}):null]})},Ft)),t[8]=r,t[9]=x,t[10]=f,t[11]=Xt,t[12]=Nt,t[13]=Lt,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Bt,t[21]=O,t[22]=d,t[23]=k,t[24]=l,t[25]=g,t[26]=Y,t[27]=$,t[28]=p,t[29]=St,t[30]=gt,t[31]=c.bottom,t[32]=c.left,t[33]=c.right,t[34]=c.top,t[35]=q,t[36]=at,t[37]=ht,t[38]=N,t[39]=rt,t[40]=H,t[41]=ft,t[42]=A,t[43]=L,t[44]=Wt,t[45]=Mt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=kt,t[53]=F,t[54]=j,t[55]=G,t[56]=X,t[57]=S,t[58]=W,t[59]=B,t[60]=U,t[61]=w,t[62]=E,t[63]=V,t[64]=I,t[65]=z,t[66]=J,t[67]=K,t[68]=Q}else j=t[54],G=t[55],X=t[56],S=t[57],W=t[58],B=t[59],U=t[60],w=t[61],E=t[62],V=t[63],I=t[64],z=t[65],J=t[66],K=t[67],Q=t[68];let Z;t[119]!==j||t[120]!==V||t[121]!==I||t[122]!==z?(Z=n.jsxRuntimeExports.jsxs(j,{children:[V,I,z]}),t[119]=j,t[120]=V,t[121]=I,t[122]=z,t[123]=Z):Z=t[123];let v;t[124]!==O?(v=O.filter(ke).map(Me),t[124]=O,t[125]=v):v=t[125];let _;t[126]!==X||t[127]!==S||t[128]!==Z||t[129]!==v||t[130]!==J||t[131]!==K||t[132]!==Q?(_=n.jsxRuntimeExports.jsxs("g",{transform:J,children:[K,Q,X,S,Z,v]}),t[126]=X,t[127]=S,t[128]=Z,t[129]=v,t[130]=J,t[131]=K,t[132]=Q,t[133]=_):_=t[133];let tt;t[134]!==G||t[135]!==W||t[136]!==B||t[137]!==U||t[138]!==w||t[139]!==E||t[140]!==_?(tt=n.jsxRuntimeExports.jsx(G,{width:W,height:B,viewBox:U,direction:w,ref:E,children:_}),t[134]=G,t[135]=W,t[136]=B,t[137]=U,t[138]=w,t[139]=E,t[140]=_,t[141]=tt):tt=t[141];let et;t[142]!==o?.tooltip||t[143]!==qt||t[144]!==a||t[145]!==$t||t[146]!==s?.tooltip||t[147]!==Ct?(et=$t&&Ct&&qt&&a?n.jsxRuntimeExports.jsx(he.Tooltip,{data:$t,body:Ct,xPos:qt,yPos:a,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=qt,t[144]=a,t[145]=$t,t[146]=s?.tooltip,t[147]=Ct,t[148]=et):et=t[148];let it;t[149]!==o?.modal||t[150]!==k||t[151]!==q?(it=k&&q!==void 0?n.jsxRuntimeExports.jsx(ye.DetailsModal,{body:k,data:q,setData:bt,className:o?.modal}):null,t[149]=o?.modal,t[150]=k,t[151]=q,t[152]=it):it=t[152];let At;return t[153]!==tt||t[154]!==et||t[155]!==it?(At=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[tt,et,it]}),t[153]=tt,t[154]=et,t[155]=it,t[156]=At):At=t[156],At}function Me(e){return e.layer}function ke(e){return e.position==="after"}function Le(e){return{...e,line:0}}function Se(e){return e.layer}function Ne(e){return e.position==="before"}function Oe(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ve(e){return e!=null}function Ie(e){return e.line}function Te(e){return e!=null}function Pe(e){return e.bar}function De(e){return e!=null}function Fe(e){return e.bar}function Ye(e){return e!=null}function He(e){return e.line}function Ge(e){return e!=null}function Xe(e){return e.line}function We(e){return e!=null}function Be(e){return e.line}function Ue(e){return e!=null}function ze(e){return e.bar}function Je(e){return e!=null}function Ke(e){return e.bar}function Qe(e){return e!=null}function Ze(e){return e.bar}function _e(e){return`${e.id}`}function ti(e,t){return{...e,id:`${t}`}}function ei(e){const t=n.compilerRuntimeExports.c(90),{data:d,graphTitle:F,sources:Y,graphDescription:f,height:p,width:x,footNote:A,padding:Qt,lineColor:te,barColor:Ht,sameAxes:Gt,backgroundColor:Ct,leftMargin:Mt,rightMargin:rt,topMargin:Xt,bottomMargin:kt,lineAxisTitle:Wt,barAxisTitle:N,tooltip:ft,relativeHeight:k,onSeriesMouseOver:ht,graphID:gt,graphDownload:Lt,dataDownload:St,barPadding:Nt,truncateBy:Ot,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:H,minHeight:O,theme:at,ariaLabel:L,resetSelectionOnDoubleClick:Zt,detailsOnClick:yt,showValues:$,noOfTicks:Bt,lineSuffix:$t,barSuffix:ct,linePrefix:q,barPrefix:bt,curveType:qt,styles:u,classNames:a,animate:ut,precision:Ut,customLayers:vt,naLabel:Vt,showColorScale:c,showAxisLabels:g}=e,l=te===void 0?le.Colors.light.categoricalColors.colors[1]:te,j=Ht===void 0?le.Colors.light.categoricalColors.colors[0]:Ht,G=Gt===void 0?!1:Gt,X=Ct===void 0?!1:Ct,S=Mt===void 0?80:Mt,W=rt===void 0?80:rt,B=Xt===void 0?20:Xt,U=kt===void 0?25:kt,w=Wt===void 0?"Line chart":Wt,E=N===void 0?"Bar graph":N,V=Lt===void 0?!1:Lt,I=St===void 0?!1:St,z=Nt===void 0?.25:Nt,J=Ot===void 0?999:Ot,K=s===void 0?!0:s,Q=r===void 0?"en":r,Z=O===void 0?0:O,v=at===void 0?"light":at,_=Zt===void 0?!0:Zt,tt=$===void 0?!0:$,et=Bt===void 0?5:Bt,it=$t===void 0?"":$t,At=ct===void 0?"":ct,m=q===void 0?"":q,y=bt===void 0?"":bt,It=qt===void 0?"curve":qt,jt=ut===void 0?!1:ut,wt=Ut===void 0?2:Ut;let xt;t[0]!==vt?(xt=vt===void 0?[]:vt,t[0]=vt,t[1]=xt):xt=t[1];const zt=xt,Et=Vt===void 0?"NA":Vt,h=c===void 0?!0:c,b=g===void 0?!0:g,[Tt,re]=lt.useState(0),[Jt,_t]=lt.useState(0),nt=lt.useRef(null),mt=lt.useRef(null);let T,pt;t[2]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{const Kt=new ResizeObserver(Dt=>{re(Dt[0].target.clientWidth||620),_t(Dt[0].target.clientHeight||480)});return nt.current&&Kt.observe(nt.current),()=>Kt.disconnect()},pt=[],t[2]=T,t[3]=pt):(T=t[2],pt=t[3]),lt.useEffect(T,pt);const Rt=a?.graphContainer,Pt=u?.graphContainer;let st;t[4]!==a?.description||t[5]!==a?.title||t[6]!==d||t[7]!==I||t[8]!==f||t[9]!==V||t[10]!==F||t[11]!==u?.description||t[12]!==u?.title||t[13]!==x?(st=F||f||V||I?n.jsxRuntimeExports.jsx(we.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:a?.title,description:a?.description},graphTitle:F,graphDescription:f,width:x,graphDownload:V?mt:void 0,dataDownload:I?d.map(li).filter(oi).length>0?d.map(si).filter(ni):d.filter(ii):null}):null,t[4]=a?.description,t[5]=a?.title,t[6]=d,t[7]=I,t[8]=f,t[9]=V,t[10]=F,t[11]=u?.description,t[12]=u?.title,t[13]=x,t[14]=st):st=t[14];let ot;t[15]!==E||t[16]!==j||t[17]!==a?.colorLegend||t[18]!==H||t[19]!==d.length||t[20]!==w||t[21]!==l||t[22]!==h||t[23]!==v?(ot=!h&&d.length>0?null:n.jsxRuntimeExports.jsx(Ee.ColorLegend,{colorDomain:[E,w],colors:[j||le.Colors[v].categoricalColors.colors[0],l||le.Colors[v].categoricalColors.colors[1]],colorLegendTitle:H,showNAColor:!1,className:a?.colorLegend}),t[15]=E,t[16]=j,t[17]=a?.colorLegend,t[18]=H,t[19]=d.length,t[20]=w,t[21]=l,t[22]=h,t[23]=v,t[24]=ot):ot=t[24];let R;t[25]!==d.length?(R=d.length===0&&n.jsxRuntimeExports.jsx(Re.EmptyState,{}),t[25]=d.length,t[26]=R):R=t[26];let C;t[27]!==jt||t[28]!==E||t[29]!==j||t[30]!==z||t[31]!==y||t[32]!==At||t[33]!==U||t[34]!==a||t[35]!==It||t[36]!==zt||t[37]!==d||t[38]!==yt||t[39]!==S||t[40]!==w||t[41]!==l||t[42]!==m||t[43]!==it||t[44]!==Et||t[45]!==et||t[46]!==o||t[47]!==ht||t[48]!==wt||t[49]!==_||t[50]!==W||t[51]!==G||t[52]!==b||t[53]!==K||t[54]!==tt||t[55]!==u||t[56]!==Jt||t[57]!==Tt||t[58]!==ft||t[59]!==B||t[60]!==J?(C=Tt&&Jt&&d.length>0?n.jsxRuntimeExports.jsx(Ce,{data:d,sameAxes:G,lineColor:l,barColor:j,width:Tt,height:Jt,truncateBy:J,leftMargin:S,rightMargin:W,topMargin:B,bottomMargin:U,axisTitles:[E,w],tooltip:ft,onSeriesMouseOver:ht,barPadding:z,showLabels:K,onSeriesMouseClick:o,resetSelectionOnDoubleClick:_,detailsOnClick:yt,noOfTicks:et,lineSuffix:it,barSuffix:At,linePrefix:m,barPrefix:y,curveType:It,showValues:tt,styles:u,classNames:a,animate:jt===!0?{duration:.5,once:!0,amount:.5}:jt||{duration:0,once:!0,amount:0},precision:wt,customLayers:zt,naLabel:Et,showAxisLabels:b}):null,t[27]=jt,t[28]=E,t[29]=j,t[30]=z,t[31]=y,t[32]=At,t[33]=U,t[34]=a,t[35]=It,t[36]=zt,t[37]=d,t[38]=yt,t[39]=S,t[40]=w,t[41]=l,t[42]=m,t[43]=it,t[44]=Et,t[45]=et,t[46]=o,t[47]=ht,t[48]=wt,t[49]=_,t[50]=W,t[51]=G,t[52]=b,t[53]=K,t[54]=tt,t[55]=u,t[56]=Jt,t[57]=Tt,t[58]=ft,t[59]=B,t[60]=J,t[61]=C):C=t[61];let M;t[62]!==R||t[63]!==C?(M=n.jsxRuntimeExports.jsxs(fe.GraphArea,{ref:nt,children:[R,C]}),t[62]=R,t[63]=C,t[64]=M):M=t[64];let P;t[65]!==a?.footnote||t[66]!==a?.source||t[67]!==A||t[68]!==Y||t[69]!==u?.footnote||t[70]!==u?.source||t[71]!==x?(P=Y||A?n.jsxRuntimeExports.jsx(je.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:a?.footnote,source:a?.source},sources:Y,footNote:A,width:x}):null,t[65]=a?.footnote,t[66]=a?.source,t[67]=A,t[68]=Y,t[69]=u?.footnote,t[70]=u?.source,t[71]=x,t[72]=P):P=t[72];let dt;return t[73]!==L||t[74]!==X||t[75]!==gt||t[76]!==p||t[77]!==Q||t[78]!==Z||t[79]!==Qt||t[80]!==k||t[81]!==Rt||t[82]!==Pt||t[83]!==st||t[84]!==ot||t[85]!==M||t[86]!==P||t[87]!==v||t[88]!==x?(dt=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:Rt,style:Pt,id:gt,ref:mt,"aria-label":L,backgroundColor:X,theme:v,language:Q,minHeight:Z,width:x,height:p,relativeHeight:k,padding:Qt,children:[st,ot,M,P]}),t[73]=L,t[74]=X,t[75]=gt,t[76]=p,t[77]=Q,t[78]=Z,t[79]=Qt,t[80]=k,t[81]=Rt,t[82]=Pt,t[83]=st,t[84]=ot,t[85]=M,t[86]=P,t[87]=v,t[88]=x,t[89]=dt):dt=t[89],dt}function ii(e){return e!==void 0}function ni(e){return e!==void 0}function si(e){return e.data}function oi(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ei;
2
2
  //# sourceMappingURL=ParetoChart.cjs.map
@@ -19,7 +19,7 @@ import { GraphFooter as Ne } from "./GraphFooter.js";
19
19
  import { GraphHeader as Se } from "./GraphHeader.js";
20
20
  import { ColorLegend as Oe } from "./ColorLegend.js";
21
21
  import { Colors as le } from "./Colors.js";
22
- import { E as Ve } from "./EmptyState-Pj-emXt5.js";
22
+ import { E as Ve } from "./EmptyState-dScPFkLy.js";
23
23
  import { a as De, G as Te } from "./GraphContainer-CF6ws3pd.js";
24
24
  function Ie(e) {
25
25
  const t = de.c(157), {
@@ -489,6 +489,7 @@ declare interface GraphSettingsDataType {
489
489
  hideAxisLine?: boolean;
490
490
  projectionRotate?: [number, number] | [number, number, number];
491
491
  rewindCoordinatesInMapData?: boolean;
492
+ circularBoundary?: boolean;
492
493
  }
493
494
 
494
495
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -508,6 +508,7 @@ declare interface GraphSettingsDataType {
508
508
  hideAxisLine?: boolean;
509
509
  projectionRotate?: [number, number] | [number, number, number];
510
510
  rewindCoordinatesInMapData?: boolean;
511
+ circularBoundary?: boolean;
511
512
  }
512
513
 
513
514
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -410,6 +410,7 @@ declare interface GraphSettingsDataType {
410
410
  hideAxisLine?: boolean;
411
411
  projectionRotate?: [number, number] | [number, number, number];
412
412
  rewindCoordinatesInMapData?: boolean;
413
+ circularBoundary?: boolean;
413
414
  }
414
415
 
415
416
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("react"),Ht=require("./index-DQA8q5sC.cjs"),Wt=require("./Tooltip-BLa2EfMs.cjs"),N=require("./Colors.cjs"),Pt=require("./numberFormattingFunction-02t-wJta.cjs"),z=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Bt=require("./DetailsModal-DHttOA80.cjs"),Nt=require("./linear-CgUCbw9F.cjs"),Vt=require("./line-DaEMhXmx.cjs"),bt=require("./proxy-C4-uo6nS.cjs"),Xt=require("./use-in-view-C3o_ntMv.cjs"),Yt=require("./index-CoobIWNj.cjs"),zt=require("./GraphFooter.cjs"),Jt=require("./GraphHeader.cjs"),Kt=require("./EmptyState-DX0t62iF.cjs"),Qt=require("./ColorLegendWithMouseOver.cjs"),St=require("./uniqBy-O05lp2S5.cjs"),At=require("./GraphContainer-B1EDxJ0S.cjs");var Zt=Dt(Vt.curveLinear);function qt(e){this._curve=e}qt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Dt(e){function t(o){return new qt(e(o))}return t._curve=e,t}function te(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(o){return arguments.length?t(Dt(o)):t()._curve},e}function ee(){return te(Vt.line().curve(Zt))}function wt(){}function Ot(e,t,o){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-o),e._x2,e._y2)}function Lt(e,t){this._context=e,this._k=(1-t)/6}Lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ot(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ot(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function o(c){return new Lt(c,t)}return o.tension=function(c){return e(+c)},o})(0);function Tt(e,t){this._context=e,this._k=(1-t)/6}Tt.prototype={areaStart:wt,areaEnd:wt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ot(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ie=(function e(t){function o(c){return new Tt(c,t)}return o.tension=function(c){return e(+c)},o})(0);function $t(e){this._context=e}$t.prototype={areaStart:wt,areaEnd:wt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ne(e){return new $t(e)}function oe(e){const t=n.compilerRuntimeExports.c(106),{data:o,radius:c,lineColors:r,tooltip:H,onSeriesMouseOver:W,onSeriesMouseClick:p,colorDomain:g,detailsOnClick:R,styles:u,classNames:a,selectedColor:S,axisLabels:J,strokeWidth:K,showValues:mt,showDots:ft,rightMargin:Q,topMargin:Z,bottomMargin:B,leftMargin:X,curveType:jt,noOfTicks:dt,minValue:j,maxValue:A,resetSelectionOnDoubleClick:V,fillShape:tt,highlightedLines:q,animate:h,dimmedOpacity:y,precision:et,customLayers:k}=e,kt=C.useRef(null);let M;t[0]!==h.amount||t[1]!==h.once?(M={once:h.once,amount:h.amount},t[0]=h.amount,t[1]=h.once,t[2]=M):M=t[2];const f=Xt.useInView(kt,M),gt=jt==="linear"?ne:ie;let it;t[3]!==B||t[4]!==X||t[5]!==Q||t[6]!==Z?(it={top:Z,bottom:B,left:X,right:Q},t[3]=B,t[4]=X,t[5]=Q,t[6]=Z,t[7]=it):it=t[7];const D=it,v=Math.min((2*c-X-Q)/2,(2*c-Z-B)/2),[_,yt]=C.useState(void 0),[I,_t]=C.useState(void 0),[nt,Mt]=C.useState(void 0),[Y,vt]=C.useState(void 0);let L,T,w,$,F,G,E,O,s,P,ot,U,st,rt;if(t[8]!==h.duration||t[9]!==J||t[10]!==a?.graphObjectValues||t[11]!==a?.xAxis?.axis||t[12]!==a?.xAxis?.gridLines||t[13]!==a?.xAxis?.labels||t[14]!==g||t[15]!==gt||t[16]!==k||t[17]!==o||t[18]!==R||t[19]!==y||t[20]!==tt||t[21]!==q||t[22]!==f||t[23]!==r||t[24]!==D.left||t[25]!==D.top||t[26]!==A||t[27]!==j||t[28]!==I||t[29]!==_||t[30]!==dt||t[31]!==p||t[32]!==W||t[33]!==et||t[34]!==c||t[35]!==v||t[36]!==V||t[37]!==S||t[38]!==ft||t[39]!==mt||t[40]!==K||t[41]!==u?.graphObjectValues||t[42]!==u?.xAxis?.axis||t[43]!==u?.xAxis?.gridLines||t[44]!==u?.xAxis?.labels){const l=Nt.linear().domain([0,o[0].values.length]).range([0,2*Math.PI]);let Ct;t[59]!==o||t[60]!==A?(Ct=z.checkIfNullOrUndefined(A)?Math.max(...o.map(be))<0?0:Math.max(...o.map(Me)):A,t[59]=o,t[60]=A,t[61]=Ct):Ct=t[61];const Ft=Ct;let Rt;t[62]!==o||t[63]!==j?(Rt=z.checkIfNullOrUndefined(j)?Math.min(...o.map(ye))>=0?0:Math.min(...o.map(de)):j,t[62]=o,t[63]=j,t[64]=Rt):Rt=t[64];const Gt=Rt,b=Nt.linear().domain([Gt,Ft]).range([0,v]).nice(),Ut=b.ticks(dt),It=ee().radius(i=>b(i)).angle((i,x)=>l(x)).curve(gt);T=bt.motion.svg,st=`${c*2}px`,rt=`${c*2}px`,w=`0 0 ${c*2} ${c*2}`,$="ltr",F=kt,G="mx-auto",ot=`translate(${D.left},${D.top})`,t[65]!==k?(U=k.filter(fe).map(me),t[65]=k,t[66]=U):U=t[66],O=`translate(${v},${v})`,s=J.map((i,x)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{x1:0,y1:0,x2:Math.cos(l(x)-Math.PI/2)*v,y2:Math.sin(l(x)-Math.PI/2)*v,className:n.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",a?.xAxis?.axis),style:u?.xAxis?.axis},x),n.jsxRuntimeExports.jsx("text",{x:Math.cos(l(x)-Math.PI/2)*(v+6),y:Math.sin(l(x)-Math.PI/2)*(v+6),style:{textAnchor:Math.cos(l(x)-Math.PI/2)<0?"end":Math.cos(l(x)-Math.PI/2)<1e-5?"middle":"start",...u?.xAxis?.labels||""},dy:Math.sin(l(x)-Math.PI/2)<0?0:Math.sin(l(x)-Math.PI/2)<1e-5?5:10,className:n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",a?.xAxis?.labels),children:i})]},x)),P=Ut.map((i,x)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("path",{d:It(Array(J.length).fill(i))||"",className:n.mo("stroke-primary-gray-500 dark:stroke-primary-gray-550",a?.xAxis?.gridLines),style:{...u?.xAxis?.gridLines,fill:"none"}}),n.jsxRuntimeExports.jsx("foreignObject",{x:-25,y:Math.sin(-Math.PI/2)*b(i)>-1e-4?Math.sin(-Math.PI/2)*b(i)-7:Math.sin(-Math.PI/2)*b(i)-5,width:50,height:12,children:n.jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:n.jsxRuntimeExports.jsx("p",{className:n.mo("fill-primary-gray-500 dark:fill-primary-gray-550 text-xs m-0 py-0 px-1.5 text-center leading-none bg-primary-white dark:bg-primary-gray-700",a?.xAxis?.labels),style:u?.xAxis?.labels,children:Pt.numberFormattingFunction(i,"NA",et)})})})]},x)),L=Yt.AnimatePresence,E=o.map((i,x)=>n.jsxRuntimeExports.jsxs(bt.motion.g,{variants:{initial:{opacity:_?i.label===_.label?1:y:S?i.color&&r[g.indexOf(i.color)]===S?1:y:q.length!==0?i.label&&q.indexOf(i.label)!==-1?1:.3:1},whileInView:{opacity:_?i.label===_.label?1:y:S?i.color&&r[g.indexOf(i.color)]===S?1:y:q.length!==0?i.label&&q.indexOf(i.label)!==-1?1:y:1,transition:{duration:h.duration}}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},onMouseEnter:m=>{yt(i),vt(m.clientY),Mt(m.clientX),W?.(i)},onMouseMove:m=>{yt(i),vt(m.clientY),Mt(m.clientX)},onMouseLeave:()=>{yt(void 0),Mt(void 0),vt(void 0),W?.(void 0)},onClick:()=>{(p||R)&&(Ht.isEqual(I,i)&&V?(_t(void 0),p?.(void 0)):(_t(i),p?.(i)))},children:[n.jsxRuntimeExports.jsx(bt.motion.path,{d:It(i.values)||"",variants:{initial:{d:It(i.values.map(pe))||"",stroke:o.filter(xe).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray,fill:tt?o.filter(he).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray:"none",strokeWidth:K},whileInView:{d:It(i.values)||"",transition:{duration:h.duration},stroke:o.filter(ue).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray,fill:tt?o.filter(ce).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray:"none",strokeWidth:K}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},style:{fillOpacity:.1}}),n.jsxRuntimeExports.jsx("g",{children:i.values.map((m,d)=>n.jsxRuntimeExports.jsx("g",{children:z.checkIfNullOrUndefined(m)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[ft?n.jsxRuntimeExports.jsx(bt.motion.circle,{r:4,variants:{initial:{cx:0,cy:0,opacity:0,fill:o.filter(le).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray},whileInView:{cx:Math.cos(l(d)-Math.PI/2)*b(m),cy:Math.sin(l(d)-Math.PI/2)*b(m),opacity:1,transition:{duration:h.duration},fill:o.filter(ae).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}}}):null,mt?n.jsxRuntimeExports.jsx(bt.motion.text,{style:{...u?.graphObjectValues||{}},dy:Math.sin(l(d)-Math.PI/2)<0?10:(Math.sin(l(d)-Math.PI/2)<1e-5,0),className:n.mo("graph-value text-xs font-bold",a?.graphObjectValues),variants:{initial:{opacity:0,x:Math.cos(l(d)-Math.PI/2)*(b(m)+6),y:Math.sin(l(d)-Math.PI/2)*(b(m)+6),fill:r[x],textAnchor:Math.cos(l(d)-Math.PI/2)<0?"end":Math.cos(l(d)-Math.PI/2)<1e-5?"middle":"start"},whileInView:{opacity:1,x:Math.cos(l(d)-Math.PI/2)*(b(m)+6),y:Math.sin(l(d)-Math.PI/2)*(b(m)+6),fill:r[x],textAnchor:Math.cos(l(d)-Math.PI/2)<0?"end":Math.cos(l(d)-Math.PI/2)<1e-5?"middle":"start",transition:{duration:h.duration}}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},children:Pt.numberFormattingFunction(m,"NA",et)}):null]})},d))})]},i.label||x)),t[8]=h.duration,t[9]=J,t[10]=a?.graphObjectValues,t[11]=a?.xAxis?.axis,t[12]=a?.xAxis?.gridLines,t[13]=a?.xAxis?.labels,t[14]=g,t[15]=gt,t[16]=k,t[17]=o,t[18]=R,t[19]=y,t[20]=tt,t[21]=q,t[22]=f,t[23]=r,t[24]=D.left,t[25]=D.top,t[26]=A,t[27]=j,t[28]=I,t[29]=_,t[30]=dt,t[31]=p,t[32]=W,t[33]=et,t[34]=c,t[35]=v,t[36]=V,t[37]=S,t[38]=ft,t[39]=mt,t[40]=K,t[41]=u?.graphObjectValues,t[42]=u?.xAxis?.axis,t[43]=u?.xAxis?.gridLines,t[44]=u?.xAxis?.labels,t[45]=L,t[46]=T,t[47]=w,t[48]=$,t[49]=F,t[50]=G,t[51]=E,t[52]=O,t[53]=s,t[54]=P,t[55]=ot,t[56]=U,t[57]=st,t[58]=rt}else L=t[45],T=t[46],w=t[47],$=t[48],F=t[49],G=t[50],E=t[51],O=t[52],s=t[53],P=t[54],ot=t[55],U=t[56],st=t[57],rt=t[58];let at;t[67]!==L||t[68]!==E?(at=n.jsxRuntimeExports.jsx(L,{children:E}),t[67]=L,t[68]=E,t[69]=at):at=t[69];let lt;t[70]!==at||t[71]!==O||t[72]!==s||t[73]!==P?(lt=n.jsxRuntimeExports.jsxs("g",{transform:O,children:[s,P,at]}),t[70]=at,t[71]=O,t[72]=s,t[73]=P,t[74]=lt):lt=t[74];let ct;t[75]!==k?(ct=k.filter(re).map(se),t[75]=k,t[76]=ct):ct=t[76];let ut;t[77]!==lt||t[78]!==ct||t[79]!==ot||t[80]!==U?(ut=n.jsxRuntimeExports.jsxs("g",{transform:ot,children:[U,lt,ct]}),t[77]=lt,t[78]=ct,t[79]=ot,t[80]=U,t[81]=ut):ut=t[81];let ht;t[82]!==T||t[83]!==w||t[84]!==$||t[85]!==F||t[86]!==G||t[87]!==ut||t[88]!==st||t[89]!==rt?(ht=n.jsxRuntimeExports.jsx(T,{width:st,height:rt,viewBox:w,direction:$,ref:F,className:G,children:ut}),t[82]=T,t[83]=w,t[84]=$,t[85]=F,t[86]=G,t[87]=ut,t[88]=st,t[89]=rt,t[90]=ht):ht=t[90];let xt;t[91]!==a?.tooltip||t[92]!==nt||t[93]!==Y||t[94]!==_||t[95]!==u?.tooltip||t[96]!==H?(xt=_&&H&&nt&&Y?n.jsxRuntimeExports.jsx(Wt.Tooltip,{data:_,body:H,xPos:nt,yPos:Y,backgroundStyle:u?.tooltip,className:a?.tooltip}):null,t[91]=a?.tooltip,t[92]=nt,t[93]=Y,t[94]=_,t[95]=u?.tooltip,t[96]=H,t[97]=xt):xt=t[97];let pt;t[98]!==a?.modal||t[99]!==R||t[100]!==I?(pt=R&&I!==void 0?n.jsxRuntimeExports.jsx(Bt.DetailsModal,{body:R,data:I,setData:_t,className:a?.modal}):null,t[98]=a?.modal,t[99]=R,t[100]=I,t[101]=pt):pt=t[101];let Et;return t[102]!==ht||t[103]!==xt||t[104]!==pt?(Et=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[ht,xt,pt]}),t[102]=ht,t[103]=xt,t[104]=pt,t[105]=Et):Et=t[105],Et}function se(e){return e.layer}function re(e){return e.position==="after"}function ae(e){return e.color}function le(e){return e.color}function ce(e){return e.color}function ue(e){return e.color}function he(e){return e.color}function xe(e){return e.color}function pe(e){return 0}function me(e){return e.layer}function fe(e){return e.position==="before"}function de(e){return Math.min(...e.values.filter(ge))}function ge(e){return!z.checkIfNullOrUndefined(e)}function ye(e){return Math.min(...e.values.filter(_e))}function _e(e){return!z.checkIfNullOrUndefined(e)}function Me(e){return Math.max(...e.values.filter(ve))}function ve(e){return!z.checkIfNullOrUndefined(e)}function be(e){return Math.max(...e.values.filter(je))}function je(e){return!z.checkIfNullOrUndefined(e)}function ke(e){const{graphTitle:t,colors:o,sources:c,graphDescription:r,footNote:H,radius:W,data:p,showColorScale:g=!0,padding:R,backgroundColor:u=!1,tooltip:a,onSeriesMouseOver:S,graphID:J,onSeriesMouseClick:K,topMargin:mt=75,bottomMargin:ft=75,leftMargin:Q=75,rightMargin:Z=75,graphDownload:B=!1,dataDownload:X=!1,colorDomain:jt,language:dt="en",theme:j="light",highlightedLines:A=[],width:V,height:tt,minHeight:q=0,strokeWidth:h=2,relativeHeight:y,ariaLabel:et,colorLegendTitle:k,detailsOnClick:kt,styles:M,classNames:f,showNAColor:gt=!0,axisLabels:it,showDots:D=!0,showValues:v=!1,curveType:_="curve",noOfTicks:yt=5,minValue:I,maxValue:_t,fillShape:nt=!1,resetSelectionOnDoubleClick:Mt=!0,animate:Y=!1,dimmedOpacity:vt=.3,precision:L=2,customLayers:T=[]}=e,[w,$]=C.useState(0),[F,G]=C.useState(void 0),E=C.useRef(null),O=C.useRef(null);return C.useEffect(()=>{const s=new ResizeObserver(P=>{$((Math.min(P[0].target.clientWidth||620,P[0].target.clientHeight||480,W||1/0)||420)/2)});return E.current&&s.observe(E.current),()=>s.disconnect()},[W]),n.jsxRuntimeExports.jsxs(At.GraphContainer,{className:f?.graphContainer,style:M?.graphContainer,id:J,ref:O,"aria-label":et,backgroundColor:u,theme:j,language:dt,minHeight:q,width:V,height:tt,relativeHeight:y,padding:R,children:[t||r||B||X?n.jsxRuntimeExports.jsx(Jt.GraphHeader,{styles:{title:M?.title,description:M?.description},classNames:{title:f?.title,description:f?.description},graphTitle:t,graphDescription:r,width:V,graphDownload:B?O:void 0,dataDownload:X?p.map(s=>s.data).filter(s=>s!==void 0).length>0?p.map(s=>s.data).filter(s=>s!==void 0):p.filter(s=>s!==void 0):null}):null,g&&p.filter(s=>s.color).length!==0&&p.length>0?n.jsxRuntimeExports.jsx(Qt.ColorLegendWithMouseOver,{width:V,colorLegendTitle:k,colors:o||N.Colors[j].categoricalColors.colors,colorDomain:jt||St.uniqBy(p,"color",!0),setSelectedColor:G,showNAColor:gt,className:f?.colorLegend,isCenter:!0}):null,n.jsxRuntimeExports.jsxs(At.GraphArea,{ref:E,children:[p.length===0&&n.jsxRuntimeExports.jsx(Kt.EmptyState,{}),w&&p.length>0?n.jsxRuntimeExports.jsx(oe,{data:p,lineColors:p.filter(s=>s.color).length===0?o?[o]:[N.Colors.primaryColors["blue-600"]]:o||N.Colors[j].categoricalColors.colors,radius:w,tooltip:a,colorDomain:jt||St.uniqBy(p,"color",!0),onSeriesMouseOver:S,onSeriesMouseClick:K,styles:M,detailsOnClick:kt,selectedColor:F,axisLabels:it,strokeWidth:h,showValues:v,showDots:D,topMargin:mt,bottomMargin:ft,leftMargin:Q,rightMargin:Z,curveType:_,noOfTicks:yt,minValue:I,maxValue:_t,fillShape:nt,highlightedLines:A,resetSelectionOnDoubleClick:Mt,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},dimmedOpacity:vt,precision:L,customLayers:T}):null]}),c||H?n.jsxRuntimeExports.jsx(zt.GraphFooter,{styles:{footnote:M?.footnote,source:M?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:c,footNote:H,width:V}):null]})}exports.RadarChart=ke;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("react"),Ht=require("./index-DQA8q5sC.cjs"),Wt=require("./Tooltip-BLa2EfMs.cjs"),N=require("./Colors.cjs"),Pt=require("./numberFormattingFunction-02t-wJta.cjs"),z=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Bt=require("./DetailsModal-DHttOA80.cjs"),Nt=require("./linear-CgUCbw9F.cjs"),Vt=require("./line-DaEMhXmx.cjs"),bt=require("./proxy-C4-uo6nS.cjs"),Xt=require("./use-in-view-C3o_ntMv.cjs"),Yt=require("./index-CoobIWNj.cjs"),zt=require("./GraphFooter.cjs"),Jt=require("./GraphHeader.cjs"),Kt=require("./EmptyState-N1eHt3vq.cjs"),Qt=require("./ColorLegendWithMouseOver.cjs"),St=require("./uniqBy-O05lp2S5.cjs"),At=require("./GraphContainer-B1EDxJ0S.cjs");var Zt=Dt(Vt.curveLinear);function qt(e){this._curve=e}qt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Dt(e){function t(o){return new qt(e(o))}return t._curve=e,t}function te(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(o){return arguments.length?t(Dt(o)):t()._curve},e}function ee(){return te(Vt.line().curve(Zt))}function wt(){}function Ot(e,t,o){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-o),e._x2,e._y2)}function Lt(e,t){this._context=e,this._k=(1-t)/6}Lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ot(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ot(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function o(c){return new Lt(c,t)}return o.tension=function(c){return e(+c)},o})(0);function Tt(e,t){this._context=e,this._k=(1-t)/6}Tt.prototype={areaStart:wt,areaEnd:wt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ot(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ie=(function e(t){function o(c){return new Tt(c,t)}return o.tension=function(c){return e(+c)},o})(0);function $t(e){this._context=e}$t.prototype={areaStart:wt,areaEnd:wt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ne(e){return new $t(e)}function oe(e){const t=n.compilerRuntimeExports.c(106),{data:o,radius:c,lineColors:r,tooltip:H,onSeriesMouseOver:W,onSeriesMouseClick:p,colorDomain:g,detailsOnClick:R,styles:u,classNames:a,selectedColor:S,axisLabels:J,strokeWidth:K,showValues:mt,showDots:ft,rightMargin:Q,topMargin:Z,bottomMargin:B,leftMargin:X,curveType:jt,noOfTicks:dt,minValue:j,maxValue:A,resetSelectionOnDoubleClick:V,fillShape:tt,highlightedLines:q,animate:h,dimmedOpacity:y,precision:et,customLayers:k}=e,kt=C.useRef(null);let M;t[0]!==h.amount||t[1]!==h.once?(M={once:h.once,amount:h.amount},t[0]=h.amount,t[1]=h.once,t[2]=M):M=t[2];const f=Xt.useInView(kt,M),gt=jt==="linear"?ne:ie;let it;t[3]!==B||t[4]!==X||t[5]!==Q||t[6]!==Z?(it={top:Z,bottom:B,left:X,right:Q},t[3]=B,t[4]=X,t[5]=Q,t[6]=Z,t[7]=it):it=t[7];const D=it,v=Math.min((2*c-X-Q)/2,(2*c-Z-B)/2),[_,yt]=C.useState(void 0),[I,_t]=C.useState(void 0),[nt,Mt]=C.useState(void 0),[Y,vt]=C.useState(void 0);let L,T,w,$,F,G,E,O,s,P,ot,U,st,rt;if(t[8]!==h.duration||t[9]!==J||t[10]!==a?.graphObjectValues||t[11]!==a?.xAxis?.axis||t[12]!==a?.xAxis?.gridLines||t[13]!==a?.xAxis?.labels||t[14]!==g||t[15]!==gt||t[16]!==k||t[17]!==o||t[18]!==R||t[19]!==y||t[20]!==tt||t[21]!==q||t[22]!==f||t[23]!==r||t[24]!==D.left||t[25]!==D.top||t[26]!==A||t[27]!==j||t[28]!==I||t[29]!==_||t[30]!==dt||t[31]!==p||t[32]!==W||t[33]!==et||t[34]!==c||t[35]!==v||t[36]!==V||t[37]!==S||t[38]!==ft||t[39]!==mt||t[40]!==K||t[41]!==u?.graphObjectValues||t[42]!==u?.xAxis?.axis||t[43]!==u?.xAxis?.gridLines||t[44]!==u?.xAxis?.labels){const l=Nt.linear().domain([0,o[0].values.length]).range([0,2*Math.PI]);let Ct;t[59]!==o||t[60]!==A?(Ct=z.checkIfNullOrUndefined(A)?Math.max(...o.map(be))<0?0:Math.max(...o.map(Me)):A,t[59]=o,t[60]=A,t[61]=Ct):Ct=t[61];const Ft=Ct;let Rt;t[62]!==o||t[63]!==j?(Rt=z.checkIfNullOrUndefined(j)?Math.min(...o.map(ye))>=0?0:Math.min(...o.map(de)):j,t[62]=o,t[63]=j,t[64]=Rt):Rt=t[64];const Gt=Rt,b=Nt.linear().domain([Gt,Ft]).range([0,v]).nice(),Ut=b.ticks(dt),It=ee().radius(i=>b(i)).angle((i,x)=>l(x)).curve(gt);T=bt.motion.svg,st=`${c*2}px`,rt=`${c*2}px`,w=`0 0 ${c*2} ${c*2}`,$="ltr",F=kt,G="mx-auto",ot=`translate(${D.left},${D.top})`,t[65]!==k?(U=k.filter(fe).map(me),t[65]=k,t[66]=U):U=t[66],O=`translate(${v},${v})`,s=J.map((i,x)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{x1:0,y1:0,x2:Math.cos(l(x)-Math.PI/2)*v,y2:Math.sin(l(x)-Math.PI/2)*v,className:n.mo("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",a?.xAxis?.axis),style:u?.xAxis?.axis},x),n.jsxRuntimeExports.jsx("text",{x:Math.cos(l(x)-Math.PI/2)*(v+6),y:Math.sin(l(x)-Math.PI/2)*(v+6),style:{textAnchor:Math.cos(l(x)-Math.PI/2)<0?"end":Math.cos(l(x)-Math.PI/2)<1e-5?"middle":"start",...u?.xAxis?.labels||""},dy:Math.sin(l(x)-Math.PI/2)<0?0:Math.sin(l(x)-Math.PI/2)<1e-5?5:10,className:n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",a?.xAxis?.labels),children:i})]},x)),P=Ut.map((i,x)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("path",{d:It(Array(J.length).fill(i))||"",className:n.mo("stroke-primary-gray-500 dark:stroke-primary-gray-550",a?.xAxis?.gridLines),style:{...u?.xAxis?.gridLines,fill:"none"}}),n.jsxRuntimeExports.jsx("foreignObject",{x:-25,y:Math.sin(-Math.PI/2)*b(i)>-1e-4?Math.sin(-Math.PI/2)*b(i)-7:Math.sin(-Math.PI/2)*b(i)-5,width:50,height:12,children:n.jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:n.jsxRuntimeExports.jsx("p",{className:n.mo("fill-primary-gray-500 dark:fill-primary-gray-550 text-xs m-0 py-0 px-1.5 text-center leading-none bg-primary-white dark:bg-primary-gray-700",a?.xAxis?.labels),style:u?.xAxis?.labels,children:Pt.numberFormattingFunction(i,"NA",et)})})})]},x)),L=Yt.AnimatePresence,E=o.map((i,x)=>n.jsxRuntimeExports.jsxs(bt.motion.g,{variants:{initial:{opacity:_?i.label===_.label?1:y:S?i.color&&r[g.indexOf(i.color)]===S?1:y:q.length!==0?i.label&&q.indexOf(i.label)!==-1?1:.3:1},whileInView:{opacity:_?i.label===_.label?1:y:S?i.color&&r[g.indexOf(i.color)]===S?1:y:q.length!==0?i.label&&q.indexOf(i.label)!==-1?1:y:1,transition:{duration:h.duration}}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},onMouseEnter:m=>{yt(i),vt(m.clientY),Mt(m.clientX),W?.(i)},onMouseMove:m=>{yt(i),vt(m.clientY),Mt(m.clientX)},onMouseLeave:()=>{yt(void 0),Mt(void 0),vt(void 0),W?.(void 0)},onClick:()=>{(p||R)&&(Ht.isEqual(I,i)&&V?(_t(void 0),p?.(void 0)):(_t(i),p?.(i)))},children:[n.jsxRuntimeExports.jsx(bt.motion.path,{d:It(i.values)||"",variants:{initial:{d:It(i.values.map(pe))||"",stroke:o.filter(xe).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray,fill:tt?o.filter(he).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray:"none",strokeWidth:K},whileInView:{d:It(i.values)||"",transition:{duration:h.duration},stroke:o.filter(ue).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray,fill:tt?o.filter(ce).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray:"none",strokeWidth:K}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},style:{fillOpacity:.1}}),n.jsxRuntimeExports.jsx("g",{children:i.values.map((m,d)=>n.jsxRuntimeExports.jsx("g",{children:z.checkIfNullOrUndefined(m)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[ft?n.jsxRuntimeExports.jsx(bt.motion.circle,{r:4,variants:{initial:{cx:0,cy:0,opacity:0,fill:o.filter(le).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray},whileInView:{cx:Math.cos(l(d)-Math.PI/2)*b(m),cy:Math.sin(l(d)-Math.PI/2)*b(m),opacity:1,transition:{duration:h.duration},fill:o.filter(ae).length===0?r[0]:i.color?r[g.indexOf(i.color)]:N.Colors.gray}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}}}):null,mt?n.jsxRuntimeExports.jsx(bt.motion.text,{style:{...u?.graphObjectValues||{}},dy:Math.sin(l(d)-Math.PI/2)<0?10:(Math.sin(l(d)-Math.PI/2)<1e-5,0),className:n.mo("graph-value text-xs font-bold",a?.graphObjectValues),variants:{initial:{opacity:0,x:Math.cos(l(d)-Math.PI/2)*(b(m)+6),y:Math.sin(l(d)-Math.PI/2)*(b(m)+6),fill:r[x],textAnchor:Math.cos(l(d)-Math.PI/2)<0?"end":Math.cos(l(d)-Math.PI/2)<1e-5?"middle":"start"},whileInView:{opacity:1,x:Math.cos(l(d)-Math.PI/2)*(b(m)+6),y:Math.sin(l(d)-Math.PI/2)*(b(m)+6),fill:r[x],textAnchor:Math.cos(l(d)-Math.PI/2)<0?"end":Math.cos(l(d)-Math.PI/2)<1e-5?"middle":"start",transition:{duration:h.duration}}},initial:"initial",animate:f?"whileInView":"initial",exit:{opacity:0,transition:{duration:h.duration}},children:Pt.numberFormattingFunction(m,"NA",et)}):null]})},d))})]},i.label||x)),t[8]=h.duration,t[9]=J,t[10]=a?.graphObjectValues,t[11]=a?.xAxis?.axis,t[12]=a?.xAxis?.gridLines,t[13]=a?.xAxis?.labels,t[14]=g,t[15]=gt,t[16]=k,t[17]=o,t[18]=R,t[19]=y,t[20]=tt,t[21]=q,t[22]=f,t[23]=r,t[24]=D.left,t[25]=D.top,t[26]=A,t[27]=j,t[28]=I,t[29]=_,t[30]=dt,t[31]=p,t[32]=W,t[33]=et,t[34]=c,t[35]=v,t[36]=V,t[37]=S,t[38]=ft,t[39]=mt,t[40]=K,t[41]=u?.graphObjectValues,t[42]=u?.xAxis?.axis,t[43]=u?.xAxis?.gridLines,t[44]=u?.xAxis?.labels,t[45]=L,t[46]=T,t[47]=w,t[48]=$,t[49]=F,t[50]=G,t[51]=E,t[52]=O,t[53]=s,t[54]=P,t[55]=ot,t[56]=U,t[57]=st,t[58]=rt}else L=t[45],T=t[46],w=t[47],$=t[48],F=t[49],G=t[50],E=t[51],O=t[52],s=t[53],P=t[54],ot=t[55],U=t[56],st=t[57],rt=t[58];let at;t[67]!==L||t[68]!==E?(at=n.jsxRuntimeExports.jsx(L,{children:E}),t[67]=L,t[68]=E,t[69]=at):at=t[69];let lt;t[70]!==at||t[71]!==O||t[72]!==s||t[73]!==P?(lt=n.jsxRuntimeExports.jsxs("g",{transform:O,children:[s,P,at]}),t[70]=at,t[71]=O,t[72]=s,t[73]=P,t[74]=lt):lt=t[74];let ct;t[75]!==k?(ct=k.filter(re).map(se),t[75]=k,t[76]=ct):ct=t[76];let ut;t[77]!==lt||t[78]!==ct||t[79]!==ot||t[80]!==U?(ut=n.jsxRuntimeExports.jsxs("g",{transform:ot,children:[U,lt,ct]}),t[77]=lt,t[78]=ct,t[79]=ot,t[80]=U,t[81]=ut):ut=t[81];let ht;t[82]!==T||t[83]!==w||t[84]!==$||t[85]!==F||t[86]!==G||t[87]!==ut||t[88]!==st||t[89]!==rt?(ht=n.jsxRuntimeExports.jsx(T,{width:st,height:rt,viewBox:w,direction:$,ref:F,className:G,children:ut}),t[82]=T,t[83]=w,t[84]=$,t[85]=F,t[86]=G,t[87]=ut,t[88]=st,t[89]=rt,t[90]=ht):ht=t[90];let xt;t[91]!==a?.tooltip||t[92]!==nt||t[93]!==Y||t[94]!==_||t[95]!==u?.tooltip||t[96]!==H?(xt=_&&H&&nt&&Y?n.jsxRuntimeExports.jsx(Wt.Tooltip,{data:_,body:H,xPos:nt,yPos:Y,backgroundStyle:u?.tooltip,className:a?.tooltip}):null,t[91]=a?.tooltip,t[92]=nt,t[93]=Y,t[94]=_,t[95]=u?.tooltip,t[96]=H,t[97]=xt):xt=t[97];let pt;t[98]!==a?.modal||t[99]!==R||t[100]!==I?(pt=R&&I!==void 0?n.jsxRuntimeExports.jsx(Bt.DetailsModal,{body:R,data:I,setData:_t,className:a?.modal}):null,t[98]=a?.modal,t[99]=R,t[100]=I,t[101]=pt):pt=t[101];let Et;return t[102]!==ht||t[103]!==xt||t[104]!==pt?(Et=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[ht,xt,pt]}),t[102]=ht,t[103]=xt,t[104]=pt,t[105]=Et):Et=t[105],Et}function se(e){return e.layer}function re(e){return e.position==="after"}function ae(e){return e.color}function le(e){return e.color}function ce(e){return e.color}function ue(e){return e.color}function he(e){return e.color}function xe(e){return e.color}function pe(e){return 0}function me(e){return e.layer}function fe(e){return e.position==="before"}function de(e){return Math.min(...e.values.filter(ge))}function ge(e){return!z.checkIfNullOrUndefined(e)}function ye(e){return Math.min(...e.values.filter(_e))}function _e(e){return!z.checkIfNullOrUndefined(e)}function Me(e){return Math.max(...e.values.filter(ve))}function ve(e){return!z.checkIfNullOrUndefined(e)}function be(e){return Math.max(...e.values.filter(je))}function je(e){return!z.checkIfNullOrUndefined(e)}function ke(e){const{graphTitle:t,colors:o,sources:c,graphDescription:r,footNote:H,radius:W,data:p,showColorScale:g=!0,padding:R,backgroundColor:u=!1,tooltip:a,onSeriesMouseOver:S,graphID:J,onSeriesMouseClick:K,topMargin:mt=75,bottomMargin:ft=75,leftMargin:Q=75,rightMargin:Z=75,graphDownload:B=!1,dataDownload:X=!1,colorDomain:jt,language:dt="en",theme:j="light",highlightedLines:A=[],width:V,height:tt,minHeight:q=0,strokeWidth:h=2,relativeHeight:y,ariaLabel:et,colorLegendTitle:k,detailsOnClick:kt,styles:M,classNames:f,showNAColor:gt=!0,axisLabels:it,showDots:D=!0,showValues:v=!1,curveType:_="curve",noOfTicks:yt=5,minValue:I,maxValue:_t,fillShape:nt=!1,resetSelectionOnDoubleClick:Mt=!0,animate:Y=!1,dimmedOpacity:vt=.3,precision:L=2,customLayers:T=[]}=e,[w,$]=C.useState(0),[F,G]=C.useState(void 0),E=C.useRef(null),O=C.useRef(null);return C.useEffect(()=>{const s=new ResizeObserver(P=>{$((Math.min(P[0].target.clientWidth||620,P[0].target.clientHeight||480,W||1/0)||420)/2)});return E.current&&s.observe(E.current),()=>s.disconnect()},[W]),n.jsxRuntimeExports.jsxs(At.GraphContainer,{className:f?.graphContainer,style:M?.graphContainer,id:J,ref:O,"aria-label":et,backgroundColor:u,theme:j,language:dt,minHeight:q,width:V,height:tt,relativeHeight:y,padding:R,children:[t||r||B||X?n.jsxRuntimeExports.jsx(Jt.GraphHeader,{styles:{title:M?.title,description:M?.description},classNames:{title:f?.title,description:f?.description},graphTitle:t,graphDescription:r,width:V,graphDownload:B?O:void 0,dataDownload:X?p.map(s=>s.data).filter(s=>s!==void 0).length>0?p.map(s=>s.data).filter(s=>s!==void 0):p.filter(s=>s!==void 0):null}):null,g&&p.filter(s=>s.color).length!==0&&p.length>0?n.jsxRuntimeExports.jsx(Qt.ColorLegendWithMouseOver,{width:V,colorLegendTitle:k,colors:o||N.Colors[j].categoricalColors.colors,colorDomain:jt||St.uniqBy(p,"color",!0),setSelectedColor:G,showNAColor:gt,className:f?.colorLegend,isCenter:!0}):null,n.jsxRuntimeExports.jsxs(At.GraphArea,{ref:E,children:[p.length===0&&n.jsxRuntimeExports.jsx(Kt.EmptyState,{}),w&&p.length>0?n.jsxRuntimeExports.jsx(oe,{data:p,lineColors:p.filter(s=>s.color).length===0?o?[o]:[N.Colors.primaryColors["blue-600"]]:o||N.Colors[j].categoricalColors.colors,radius:w,tooltip:a,colorDomain:jt||St.uniqBy(p,"color",!0),onSeriesMouseOver:S,onSeriesMouseClick:K,styles:M,detailsOnClick:kt,selectedColor:F,axisLabels:it,strokeWidth:h,showValues:v,showDots:D,topMargin:mt,bottomMargin:ft,leftMargin:Q,rightMargin:Z,curveType:_,noOfTicks:yt,minValue:I,maxValue:_t,fillShape:nt,highlightedLines:A,resetSelectionOnDoubleClick:Mt,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},dimmedOpacity:vt,precision:L,customLayers:T}):null]}),c||H?n.jsxRuntimeExports.jsx(zt.GraphFooter,{styles:{footnote:M?.footnote,source:M?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:c,footNote:H,width:V}):null]})}exports.RadarChart=ke;
2
2
  //# sourceMappingURL=RadarChart.cjs.map
@@ -13,7 +13,7 @@ import { u as Kt } from "./use-in-view-Dl5L8LtP.js";
13
13
  import { A as Qt } from "./index-CtMBjvtq.js";
14
14
  import { GraphFooter as Zt } from "./GraphFooter.js";
15
15
  import { GraphHeader as ti } from "./GraphHeader.js";
16
- import { E as ii } from "./EmptyState-Pj-emXt5.js";
16
+ import { E as ii } from "./EmptyState-dScPFkLy.js";
17
17
  import { ColorLegendWithMouseOver as ei } from "./ColorLegendWithMouseOver.js";
18
18
  import { u as Lt } from "./uniqBy-BHy4I8PK.js";
19
19
  import { G as ni, a as oi } from "./GraphContainer-CF6ws3pd.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),de=require("./index-CSNtgibC.cjs"),pe=require("./index-Cno4Q0YE.cjs"),Oe=require("./index-DQA8q5sC.cjs"),Ut=require("./Typography-DrJ7IOdw.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),Ce=require("./Tooltip-BLa2EfMs.cjs"),Ve=require("./DetailsModal-DHttOA80.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),Ne=require("./use-in-view-C3o_ntMv.cjs"),De=require("./index-CoobIWNj.cjs"),Te=require("./GraphHeader.cjs"),qe=require("./GraphFooter.cjs"),xe=require("./Colors.cjs"),Be=require("./generateRandomString-B5zBiJzS.cjs"),Pe=require("./EmptyState-DX0t62iF.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),ye=require("./GraphContainer-B1EDxJ0S.cjs");function ve(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o<r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function Ee(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o>r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function re(e,t){let o=0;if(t===void 0)for(let r of e)(r=+r)&&(o+=r);else{let r=-1;for(let a of e)(a=+t(a,++r,e))&&(o+=a)}return o}function ze(e){return e.target.depth}function Ie(e,t){return e.sourceLinks.length?e.depth:t-1}function se(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Ee(e.sourceLinks,ze)-1:0}function Zt(e){return function(){return e}}function je(e,t){return Qt(e.source,t.source)||e.index-t.index}function ke(e,t){return Qt(e.target,t.target)||e.index-t.index}function Qt(e,t){return e.y0-t.y0}function le(e){return e.value}function Ae(e){return e.index}function He(e){return e.nodes}function Ge(e){return e.links}function be(e,t){const o=e.get(t);if(!o)throw new Error("missing: "+t);return o}function we({nodes:e}){for(const t of e){let o=t.y0,r=o;for(const a of t.sourceLinks)a.y0=o+a.width/2,o+=a.width;for(const a of t.targetLinks)a.y1=r+a.width/2,r+=a.width}}function ae(){let e=0,t=0,o=1,r=1,a=24,x=8,h,g=Ae,y=Ie,k,b,$=He,D=Ge,j=6;function p(){const n={nodes:$.apply(null,arguments),links:D.apply(null,arguments)};return M(n),H(n),w(n),S(n),F(n),we(n),n}p.update=function(n){return we(n),n},p.nodeId=function(n){return arguments.length?(g=typeof n=="function"?n:Zt(n),p):g},p.nodeAlign=function(n){return arguments.length?(y=typeof n=="function"?n:Zt(n),p):y},p.nodeSort=function(n){return arguments.length?(k=n,p):k},p.nodeWidth=function(n){return arguments.length?(a=+n,p):a},p.nodePadding=function(n){return arguments.length?(x=h=+n,p):x},p.nodes=function(n){return arguments.length?($=typeof n=="function"?n:Zt(n),p):$},p.links=function(n){return arguments.length?(D=typeof n=="function"?n:Zt(n),p):D},p.linkSort=function(n){return arguments.length?(b=n,p):b},p.size=function(n){return arguments.length?(e=t=0,o=+n[0],r=+n[1],p):[o-e,r-t]},p.extent=function(n){return arguments.length?(e=+n[0][0],o=+n[1][0],t=+n[0][1],r=+n[1][1],p):[[e,t],[o,r]]},p.iterations=function(n){return arguments.length?(j=+n,p):j};function M({nodes:n,links:l}){for(const[u,i]of n.entries())i.index=u,i.sourceLinks=[],i.targetLinks=[];const s=new Map(n.map((u,i)=>[g(u,i,n),u]));for(const[u,i]of l.entries()){i.index=u;let{source:f,target:v}=i;typeof f!="object"&&(f=i.source=be(s,f)),typeof v!="object"&&(v=i.target=be(s,v)),f.sourceLinks.push(i),v.targetLinks.push(i)}if(b!=null)for(const{sourceLinks:u,targetLinks:i}of n)u.sort(b),i.sort(b)}function H({nodes:n}){for(const l of n)l.value=l.fixedValue===void 0?Math.max(re(l.sourceLinks,le),re(l.targetLinks,le)):l.fixedValue}function w({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.depth=i;for(const{target:v}of f.sourceLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function S({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.height=i;for(const{source:v}of f.targetLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function B({nodes:n}){const l=ve(n,i=>i.depth)+1,s=(o-e-a)/(l-1),u=new Array(l);for(const i of n){const f=Math.max(0,Math.min(l-1,Math.floor(y.call(null,i,l))));i.layer=f,i.x0=e+f*s,i.x1=i.x0+a,u[f]?u[f].push(i):u[f]=[i]}if(k)for(const i of u)i.sort(k);return u}function z(n){const l=Ee(n,s=>(r-t-(s.length-1)*h)/re(s,le));for(const s of n){let u=t;for(const i of s){i.y0=u,i.y1=u+i.value*l,u=i.y1+h;for(const f of i.sourceLinks)f.width=f.value*l}u=(r-u+h)/(s.length+1);for(let i=0;i<s.length;++i){const f=s[i];f.y0+=u*(i+1),f.y1+=u*(i+1)}X(s)}}function F(n){const l=B(n);h=Math.min(x,(r-t)/(ve(l,s=>s.length)-1)),z(l);for(let s=0;s<j;++s){const u=Math.pow(.99,s),i=Math.max(1-u,(s+1)/j);_(l,u,i),G(l,u,i)}}function G(n,l,s){for(let u=1,i=n.length;u<i;++u){const f=n[u];for(const v of f){let C=0,T=0;for(const{source:I,value:Y}of v.targetLinks){let U=Y*(v.layer-I.layer);C+=O(I,v)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function _(n,l,s){for(let u=n.length,i=u-2;i>=0;--i){const f=n[i];for(const v of f){let C=0,T=0;for(const{target:I,value:Y}of v.sourceLinks){let U=Y*(I.layer-v.layer);C+=E(v,I)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function W(n,l){const s=n.length>>1,u=n[s];tt(n,u.y0-h,s-1,l),R(n,u.y1+h,s+1,l),tt(n,r,n.length-1,l),R(n,t,0,l)}function R(n,l,s,u){for(;s<n.length;++s){const i=n[s],f=(l-i.y0)*u;f>1e-6&&(i.y0+=f,i.y1+=f),l=i.y1+h}}function tt(n,l,s,u){for(;s>=0;--s){const i=n[s],f=(i.y1-l)*u;f>1e-6&&(i.y0-=f,i.y1-=f),l=i.y0-h}}function kt({sourceLinks:n,targetLinks:l}){if(b===void 0){for(const{source:{sourceLinks:s}}of l)s.sort(ke);for(const{target:{targetLinks:s}}of n)s.sort(je)}}function X(n){if(b===void 0)for(const{sourceLinks:l,targetLinks:s}of n)l.sort(ke),s.sort(je)}function O(n,l){let s=n.y0-(n.sourceLinks.length-1)*h/2;for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s+=i+h}for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s-=i}return s}function E(n,l){let s=l.y0-(l.targetLinks.length-1)*h/2;for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s+=i+h}for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s-=i}return s}return p}var ue=Math.PI,ce=2*ue,Ct=1e-6,We=ce-Ct;function fe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Le(){return new fe}fe.prototype=Le.prototype={constructor:fe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,o,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+o)+","+(this._y1=+r)},bezierCurveTo:function(e,t,o,r,a,x){this._+="C"+ +e+","+ +t+","+ +o+","+ +r+","+(this._x1=+a)+","+(this._y1=+x)},arcTo:function(e,t,o,r,a){e=+e,t=+t,o=+o,r=+r,a=+a;var x=this._x1,h=this._y1,g=o-e,y=r-t,k=x-e,b=h-t,$=k*k+b*b;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if($>Ct)if(!(Math.abs(b*g-y*k)>Ct)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var D=o-x,j=r-h,p=g*g+y*y,M=D*D+j*j,H=Math.sqrt(p),w=Math.sqrt($),S=a*Math.tan((ue-Math.acos((p+$-M)/(2*H*w)))/2),B=S/w,z=S/H;Math.abs(B-1)>Ct&&(this._+="L"+(e+B*k)+","+(t+B*b)),this._+="A"+a+","+a+",0,0,"+ +(b*D>k*j)+","+(this._x1=e+z*g)+","+(this._y1=t+z*y)}},arc:function(e,t,o,r,a,x){e=+e,t=+t,o=+o,x=!!x;var h=o*Math.cos(r),g=o*Math.sin(r),y=e+h,k=t+g,b=1^x,$=x?r-a:a-r;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+y+","+k:(Math.abs(this._x1-y)>Ct||Math.abs(this._y1-k)>Ct)&&(this._+="L"+y+","+k),o&&($<0&&($=$%ce+ce),$>We?this._+="A"+o+","+o+",0,1,"+b+","+(e-h)+","+(t-g)+"A"+o+","+o+",0,1,"+b+","+(this._x1=y)+","+(this._y1=k):$>Ct&&(this._+="A"+o+","+o+",0,"+ +($>=ue)+","+b+","+(this._x1=e+o*Math.cos(a))+","+(this._y1=t+o*Math.sin(a))))},rect:function(e,t,o,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +o+"v"+ +r+"h"+-o+"Z"},toString:function(){return this._}};function $e(e){return function(){return e}}function Fe(e){return e[0]}function _e(e){return e[1]}var Xe=Array.prototype.slice;function Ye(e){return e.source}function Ue(e){return e.target}function Ze(e){var t=Ye,o=Ue,r=Fe,a=_e,x=null;function h(){var g,y=Xe.call(arguments),k=t.apply(this,y),b=o.apply(this,y);if(x||(x=g=Le()),e(x,+r.apply(this,(y[0]=k,y)),+a.apply(this,y),+r.apply(this,(y[0]=b,y)),+a.apply(this,y)),g)return x=null,g+""||null}return h.source=function(g){return arguments.length?(t=g,h):t},h.target=function(g){return arguments.length?(o=g,h):o},h.x=function(g){return arguments.length?(r=typeof g=="function"?g:$e(+g),h):r},h.y=function(g){return arguments.length?(a=typeof g=="function"?g:$e(+g),h):a},h.context=function(g){return arguments.length?(x=g??null,h):x},h}function Qe(e,t,o,r,a){e.moveTo(t,o),e.bezierCurveTo(t=(t+r)/2,o,t,a,r,a)}function Je(){return Ze(Qe)}function Ke(e){return[e.source.x1,e.y0]}function tn(e){return[e.target.x0,e.y1]}function en(){return Je().source(Ke).target(tn)}function nn(e){const t=d.compilerRuntimeExports.c(136),{data:o,showLabels:r,leftMargin:a,rightMargin:x,truncateBy:h,width:g,height:y,topMargin:k,bottomMargin:b,tooltip:$,onSeriesMouseOver:D,suffix:j,prefix:p,showValues:M,onSeriesMouseClick:H,nodePadding:w,nodeWidth:S,id:B,highlightedSourceDataPoints:z,highlightedTargetDataPoints:F,defaultLinkOpacity:G,sourceTitle:_,targetTitle:W,animate:R,sortNodes:tt,resetSelectionOnDoubleClick:kt,detailsOnClick:X,styles:O,classNames:E,precision:n,customLayers:l}=e,s=A.useRef(null);let u;t[0]!==R.amount||t[1]!==R.once?(u={once:R.once,amount:R.amount},t[0]=R.amount,t[1]=R.once,t[2]=u):u=t[2];const i=Ne.useInView(s,u),[f,v]=A.useState(void 0),[C,T]=A.useState(void 0),[V,I]=A.useState(void 0),[Y,U]=A.useState(void 0),[St,Rt]=A.useState(void 0);let L;t[3]!==b||t[4]!==a||t[5]!==x||t[6]!==k?(L={top:k,bottom:b,left:a,right:x},t[3]=b,t[4]=a,t[5]=x,t[6]=k,t[7]=L):L=t[7];const m=L,wt=g-m.left-m.right,$t=y-m.top-m.bottom;let et,lt,at,Z,ut,ct,Q,J,ft,ht,K,nt,ot,it,gt,dt;if(t[8]!==R.duration||t[9]!==E?.graphObjectValues||t[10]!==l||t[11]!==o||t[12]!==G||t[13]!==X||t[14]!==$t||t[15]!==wt||t[16]!==y||t[17]!==z||t[18]!==F||t[19]!==B||t[20]!==i||t[21]!==a||t[22]!==m.left||t[23]!==m.right||t[24]!==m.top||t[25]!==C||t[26]!==w||t[27]!==S||t[28]!==H||t[29]!==D||t[30]!==n||t[31]!==p||t[32]!==kt||t[33]!==x||t[34]!==V||t[35]!==r||t[36]!==M||t[37]!==tt||t[38]!==_||t[39]!==O?.graphObjectValues||t[40]!==j||t[41]!==W||t[42]!==h||t[43]!==g){const It=tt==="mostReadable"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se):tt==="none"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(null).linkSort(null):ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(tt==="desc"?fn:cn),{nodes:N,links:Vt}=It(o),Nt=en();lt=ie.motion.svg,gt=`${g}px`,dt=`${y}px`,at=`0 0 ${g} ${y}`,t[60]===Symbol.for("react.memo_cache_sentinel")?(Z={marginLeft:"auto",marginRight:"auto"},t[60]=Z):Z=t[60],ut="ltr",ct=s,t[61]!==m.left||t[62]!==m.top||t[63]!==_?(Q=_?d.jsxRuntimeExports.jsx("text",{x:m.left,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:_}):null,t[61]=m.left,t[62]=m.top,t[63]=_,t[64]=Q):Q=t[64],t[65]!==m.right||t[66]!==m.top||t[67]!==W||t[68]!==g?(J=W?d.jsxRuntimeExports.jsx("text",{x:g-m.right,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:W}):null,t[65]=m.right,t[66]=m.top,t[67]=W,t[68]=g,t[69]=J):J=t[69],ht=`translate(${m.left},${m.top})`,t[70]!==l?(K=l.filter(un).map(an),t[70]=l,t[71]=K):K=t[71];let Lt;t[72]!==E?.graphObjectValues||t[73]!==a||t[74]!==w||t[75]!==n||t[76]!==p||t[77]!==r||t[78]!==M||t[79]!==O?.graphObjectValues||t[80]!==j||t[81]!==h?(Lt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:0-a,width:a,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`,overflow:"visible"},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-right-label text-right",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:"none",size:"sm",leading:"none",className:d.mo("sankey-right-value text-right font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[72]=E?.graphObjectValues,t[73]=a,t[74]=w,t[75]=n,t[76]=p,t[77]=r,t[78]=M,t[79]=O?.graphObjectValues,t[80]=j,t[81]=h,t[82]=Lt):Lt=t[82],nt=N.filter(ln).map(Lt);let bt;t[83]!==E?.graphObjectValues||t[84]!==w||t[85]!==S||t[86]!==n||t[87]!==p||t[88]!==x||t[89]!==r||t[90]!==M||t[91]!==O?.graphObjectValues||t[92]!==j||t[93]!==h?(bt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:S,width:x-S,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-left-label text-left",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{size:"sm",leading:"none",marginBottom:"none",className:d.mo("sankey-left-value text-left font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[83]=E?.graphObjectValues,t[84]=w,t[85]=S,t[86]=n,t[87]=p,t[88]=x,t[89]=r,t[90]=M,t[91]=O?.graphObjectValues,t[92]=j,t[93]=h,t[94]=bt):bt=t[94],ot=N.filter(sn).map(bt);let Mt;t[95]!==B?(Mt=(c,vt)=>d.jsxRuntimeExports.jsxs("linearGradient",{id:`${B}-gradient-${vt}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[d.jsxRuntimeExports.jsx("stop",{offset:"0%",style:{stopColor:c.source.color,stopOpacity:1}}),d.jsxRuntimeExports.jsx("stop",{offset:"100%",style:{stopColor:c.target.color,stopOpacity:1}})]},vt),t[95]=B,t[96]=Mt):Mt=t[96],it=d.jsxRuntimeExports.jsx("defs",{children:Vt.map(Mt)}),et=De.AnimatePresence,ft=Vt.map((c,vt)=>d.jsxRuntimeExports.jsx(ie.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX),D?.(c)},onMouseMove:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX)},onClick:()=>{(H||X)&&(Oe.isEqual(C,c.data)&&kt?(T(void 0),H?.(void 0)):(T(c.data),H?.(c.data)))},onMouseLeave:()=>{v(void 0),U(void 0),Rt(void 0),D?.(void 0)},variants:{initial:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G},whileInView:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial",exit:{opacity:0,transition:{duration:R.duration}},children:d.jsxRuntimeExports.jsx(ie.motion.path,{d:Nt(c)||"",style:{stroke:`url(#${B}-gradient-${vt})`,strokeWidth:c.width,fill:"none"},exit:{opacity:0,transition:{duration:R.duration}},variants:{initial:{pathLength:0,opacity:1},whileInView:{pathLength:1,opacity:1,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial"},`${c.source}-${c.target}`)},`${c.source}-${c.target}`)),t[8]=R.duration,t[9]=E?.graphObjectValues,t[10]=l,t[11]=o,t[12]=G,t[13]=X,t[14]=$t,t[15]=wt,t[16]=y,t[17]=z,t[18]=F,t[19]=B,t[20]=i,t[21]=a,t[22]=m.left,t[23]=m.right,t[24]=m.top,t[25]=C,t[26]=w,t[27]=S,t[28]=H,t[29]=D,t[30]=n,t[31]=p,t[32]=kt,t[33]=x,t[34]=V,t[35]=r,t[36]=M,t[37]=tt,t[38]=_,t[39]=O?.graphObjectValues,t[40]=j,t[41]=W,t[42]=h,t[43]=g,t[44]=et,t[45]=lt,t[46]=at,t[47]=Z,t[48]=ut,t[49]=ct,t[50]=Q,t[51]=J,t[52]=ft,t[53]=ht,t[54]=K,t[55]=nt,t[56]=ot,t[57]=it,t[58]=gt,t[59]=dt}else et=t[44],lt=t[45],at=t[46],Z=t[47],ut=t[48],ct=t[49],Q=t[50],J=t[51],ft=t[52],ht=t[53],K=t[54],nt=t[55],ot=t[56],it=t[57],gt=t[58],dt=t[59];let pt;t[97]!==et||t[98]!==ft?(pt=d.jsxRuntimeExports.jsx("g",{children:d.jsxRuntimeExports.jsx(et,{children:ft})}),t[97]=et,t[98]=ft,t[99]=pt):pt=t[99];let mt;t[100]!==l?(mt=l.filter(rn).map(on),t[100]=l,t[101]=mt):mt=t[101];let xt;t[102]!==pt||t[103]!==mt||t[104]!==ht||t[105]!==K||t[106]!==nt||t[107]!==ot||t[108]!==it?(xt=d.jsxRuntimeExports.jsxs("g",{transform:ht,children:[K,nt,ot,it,pt,mt]}),t[102]=pt,t[103]=mt,t[104]=ht,t[105]=K,t[106]=nt,t[107]=ot,t[108]=it,t[109]=xt):xt=t[109];let rt;t[110]!==lt||t[111]!==at||t[112]!==Z||t[113]!==ut||t[114]!==ct||t[115]!==Q||t[116]!==J||t[117]!==xt||t[118]!==gt||t[119]!==dt?(rt=d.jsxRuntimeExports.jsxs(lt,{width:gt,height:dt,viewBox:at,style:Z,direction:ut,ref:ct,children:[Q,J,xt]}),t[110]=lt,t[111]=at,t[112]=Z,t[113]=ut,t[114]=ct,t[115]=Q,t[116]=J,t[117]=xt,t[118]=gt,t[119]=dt,t[120]=rt):rt=t[120];let yt;t[121]!==E?.tooltip||t[122]!==Y||t[123]!==St||t[124]!==f||t[125]!==O?.tooltip||t[126]!==$?(yt=f&&$&&Y&&St?d.jsxRuntimeExports.jsx(Ce.Tooltip,{data:f,body:$,xPos:Y,yPos:St,backgroundStyle:O?.tooltip,className:E?.tooltip}):null,t[121]=E?.tooltip,t[122]=Y,t[123]=St,t[124]=f,t[125]=O?.tooltip,t[126]=$,t[127]=yt):yt=t[127];let st;t[128]!==E?.modal||t[129]!==X||t[130]!==C?(st=X&&C!==void 0?d.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:X,data:C,setData:T,className:E?.modal}):null,t[128]=E?.modal,t[129]=X,t[130]=C,t[131]=st):st=t[131];let Et;return t[132]!==rt||t[133]!==yt||t[134]!==st?(Et=d.jsxRuntimeExports.jsxs(d.jsxRuntimeExports.Fragment,{children:[rt,yt,st]}),t[132]=rt,t[133]=yt,t[134]=st,t[135]=Et):Et=t[135],Et}function on(e){return e.layer}function rn(e){return e.position==="after"}function sn(e){return e.type==="target"}function ln(e){return e.type==="source"}function an(e){return e.layer}function un(e){return e.position==="before"}function cn(e,t){return(e.value||0)-(t.value||0)}function fn(e,t){return(t.value||0)-(e.value||0)}function hn(e){const t=d.compilerRuntimeExports.c(98),{data:o,graphTitle:r,sources:a,graphDescription:x,showLabels:h,leftMargin:g,rightMargin:y,topMargin:k,bottomMargin:b,truncateBy:$,height:D,width:j,footNote:p,padding:M,backgroundColor:H,tooltip:w,onSeriesMouseOver:S,suffix:B,prefix:z,relativeHeight:F,showValues:G,graphID:_,onSeriesMouseClick:W,graphDownload:R,dataDownload:tt,fillContainer:kt,language:X,minHeight:O,theme:E,ariaLabel:n,sourceColors:l,targetColors:s,sourceColorDomain:u,targetColorDomain:i,nodePadding:f,nodeWidth:v,highlightedSourceDataPoints:C,highlightedTargetDataPoints:T,defaultLinkOpacity:V,sourceTitle:I,targetTitle:Y,sortNodes:U,resetSelectionOnDoubleClick:St,detailsOnClick:Rt,styles:L,classNames:m,animate:wt,precision:$t,customLayers:et}=e,lt=h===void 0?!0:h,at=g===void 0?75:g,Z=y===void 0?75:y,ut=k===void 0?30:k,ct=b===void 0?10:b,Q=$===void 0?999:$,J=H===void 0?!1:H,ft=B===void 0?"":B,ht=z===void 0?"":z,K=G===void 0?!0:G,nt=R===void 0?!1:R,ot=tt===void 0?!1:tt,it=kt===void 0?!0:kt,gt=X===void 0?"en":X,dt=O===void 0?0:O,pt=E===void 0?"light":E,mt=f===void 0?5:f,xt=v===void 0?5:v;let rt;t[0]!==C?(rt=C===void 0?[]:C,t[0]=C,t[1]=rt):rt=t[1];const yt=rt;let st;t[2]!==T?(st=T===void 0?[]:T,t[2]=T,t[3]=st):st=t[3];const Et=st,It=V===void 0?.3:V,N=U===void 0?"mostReadable":U,Vt=St===void 0?!0:St,Nt=wt===void 0?!1:wt,Lt=$t===void 0?2:$t;let bt;t[4]!==et?(bt=et===void 0?[]:et,t[4]=et,t[5]=bt):bt=t[5];const Mt=bt,[c,vt]=A.useState(0),[jt,Me]=A.useState(0),[At,Se]=A.useState(void 0),Jt=A.useRef(null),he=A.useRef(null);let Ht;t[6]===Symbol.for("react.memo_cache_sentinel")?(Ht=Ot=>{Se(Ot)},t[6]=Ht):Ht=t[6];const Kt=A.useEffectEvent(Ht);let Gt;t[7]!==o||t[8]!==N||t[9]!==u||t[10]!==l||t[11]!==i||t[12]!==s||t[13]!==Kt?(Gt=()=>{const Ot=zt.uniqBy(o,"source",!0).map(q=>({name:`source_${q}`,type:"source",label:`${q}`,color:typeof l=="string"||!l?l||xe.Colors.graphMainColor:l[(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)>l.length?l.length-1:(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.source}`==`${q}`).map(kn))})),Yt=N==="asc"||N==="desc"?pe.orderBy(Ot,["totalValue"],[N]):Ot,ge=zt.uniqBy(o,"target",!0).map(q=>({name:`target_${q}`,type:"target",label:`${q}`,color:typeof s=="string"||!s?s||xe.Colors.graphMainColor:s[(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)>s.length?s.length-1:(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.target}`==`${q}`).map(jn))})),Re=N==="asc"||N==="desc"?pe.orderBy(ge,["totalValue"],[N]):ge,oe=[...Yt,...Re];Kt({nodes:oe,links:o.map(q=>({source:oe.findIndex(P=>P.name===`source_${q.source}`),target:oe.findIndex(P=>P.name===`target_${q.target}`),value:q.value,data:{...q}}))})},t[7]=o,t[8]=N,t[9]=u,t[10]=l,t[11]=i,t[12]=s,t[13]=Kt,t[14]=Gt):Gt=t[14];let Wt;t[15]!==o||t[16]!==N||t[17]!==u||t[18]!==l||t[19]!==i||t[20]!==s?(Wt=[o,N,u,l,i,s],t[15]=o,t[16]=N,t[17]=u,t[18]=l,t[19]=i,t[20]=s,t[21]=Wt):Wt=t[21],A.useEffect(Gt,Wt);let Ft,_t;t[22]===Symbol.for("react.memo_cache_sentinel")?(Ft=()=>{const Ot=new ResizeObserver(Yt=>{vt(Yt[0].target.clientWidth||620),Me(Yt[0].target.clientHeight||480)});return Jt.current&&Ot.observe(Jt.current),()=>Ot.disconnect()},_t=[],t[22]=Ft,t[23]=_t):(Ft=t[22],_t=t[23]),A.useEffect(Ft,_t);const te=m?.graphContainer,ee=L?.graphContainer,ne=it?void 0:j;let Dt;t[24]!==m?.description||t[25]!==m?.title||t[26]!==o||t[27]!==ot||t[28]!==x||t[29]!==nt||t[30]!==r||t[31]!==L?.description||t[32]!==L?.title||t[33]!==j?(Dt=r||x||nt||ot?d.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:L?.title,description:L?.description},classNames:{title:m?.title,description:m?.description},graphTitle:r,graphDescription:x,width:j,graphDownload:nt?he:void 0,dataDownload:ot?o.map(vn).filter(yn).length>0?o.map(xn).filter(mn):o.filter(pn):null}):null,t[24]=m?.description,t[25]=m?.title,t[26]=o,t[27]=ot,t[28]=x,t[29]=nt,t[30]=r,t[31]=L?.description,t[32]=L?.title,t[33]=j,t[34]=Dt):Dt=t[34];let Tt;t[35]!==o.length?(Tt=o.length===0&&d.jsxRuntimeExports.jsx(Pe.EmptyState,{}),t[35]=o.length,t[36]=Tt):Tt=t[36];let qt;t[37]!==Nt||t[38]!==ct||t[39]!==m||t[40]!==Mt||t[41]!==o.length||t[42]!==It||t[43]!==Rt||t[44]!==it||t[45]!==yt||t[46]!==Et||t[47]!==at||t[48]!==mt||t[49]!==xt||t[50]!==W||t[51]!==S||t[52]!==Lt||t[53]!==ht||t[54]!==Vt||t[55]!==Z||t[56]!==At||t[57]!==lt||t[58]!==K||t[59]!==N||t[60]!==I||t[61]!==L||t[62]!==ft||t[63]!==jt||t[64]!==c||t[65]!==Y||t[66]!==w||t[67]!==ut||t[68]!==Q||t[69]!==j?(qt=c&&jt&&At&&o.length>0?d.jsxRuntimeExports.jsx(nn,{data:At,nodePadding:mt,nodeWidth:xt,width:it||!j||c<j?c:j,height:jt,showLabels:lt,leftMargin:at,rightMargin:Z,topMargin:ut,bottomMargin:ct,truncateBy:Q,tooltip:w,onSeriesMouseOver:S,showValues:K,suffix:ft,prefix:ht,onSeriesMouseClick:W,id:Be.generateRandomString(8),highlightedSourceDataPoints:yt.map(dn),highlightedTargetDataPoints:Et.map(gn),defaultLinkOpacity:It,sourceTitle:I,targetTitle:Y,sortNodes:N,resetSelectionOnDoubleClick:Vt,styles:L,classNames:m,detailsOnClick:Rt,animate:Nt===!0?{duration:.5,once:!0,amount:.5}:Nt||{duration:0,once:!0,amount:0},precision:Lt,customLayers:Mt}):null,t[37]=Nt,t[38]=ct,t[39]=m,t[40]=Mt,t[41]=o.length,t[42]=It,t[43]=Rt,t[44]=it,t[45]=yt,t[46]=Et,t[47]=at,t[48]=mt,t[49]=xt,t[50]=W,t[51]=S,t[52]=Lt,t[53]=ht,t[54]=Vt,t[55]=Z,t[56]=At,t[57]=lt,t[58]=K,t[59]=N,t[60]=I,t[61]=L,t[62]=ft,t[63]=jt,t[64]=c,t[65]=Y,t[66]=w,t[67]=ut,t[68]=Q,t[69]=j,t[70]=qt):qt=t[70];let Bt;t[71]!==Tt||t[72]!==qt?(Bt=d.jsxRuntimeExports.jsxs(ye.GraphArea,{ref:Jt,children:[Tt,qt]}),t[71]=Tt,t[72]=qt,t[73]=Bt):Bt=t[73];let Pt;t[74]!==m?.footnote||t[75]!==m?.source||t[76]!==p||t[77]!==a||t[78]!==L?.footnote||t[79]!==L?.source||t[80]!==j?(Pt=a||p?d.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:L?.footnote,source:L?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:a,footNote:p,width:j}):null,t[74]=m?.footnote,t[75]=m?.source,t[76]=p,t[77]=a,t[78]=L?.footnote,t[79]=L?.source,t[80]=j,t[81]=Pt):Pt=t[81];let Xt;return t[82]!==n||t[83]!==J||t[84]!==_||t[85]!==D||t[86]!==gt||t[87]!==dt||t[88]!==M||t[89]!==F||t[90]!==te||t[91]!==ee||t[92]!==ne||t[93]!==Dt||t[94]!==Bt||t[95]!==Pt||t[96]!==pt?(Xt=d.jsxRuntimeExports.jsxs(ye.GraphContainer,{className:te,style:ee,id:_,ref:he,"aria-label":n,backgroundColor:J,theme:pt,language:gt,minHeight:dt,width:ne,height:D,relativeHeight:F,padding:M,children:[Dt,Bt,Pt]}),t[82]=n,t[83]=J,t[84]=_,t[85]=D,t[86]=gt,t[87]=dt,t[88]=M,t[89]=F,t[90]=te,t[91]=ee,t[92]=ne,t[93]=Dt,t[94]=Bt,t[95]=Pt,t[96]=pt,t[97]=Xt):Xt=t[97],Xt}function gn(e){return`${e}`}function dn(e){return`${e}`}function pn(e){return e!==void 0}function mn(e){return e!==void 0}function xn(e){return e.data}function yn(e){return e!==void 0}function vn(e){return e.data}function jn(e){return e.value}function kn(e){return e.value}exports.SankeyChart=hn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-6v2a2njQ.cjs"),A=require("react"),de=require("./index-CSNtgibC.cjs"),pe=require("./index-Cno4Q0YE.cjs"),Oe=require("./index-DQA8q5sC.cjs"),Ut=require("./Typography-Cc_iHQB-.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),Ce=require("./Tooltip-BLa2EfMs.cjs"),Ve=require("./DetailsModal-DHttOA80.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),Ne=require("./use-in-view-C3o_ntMv.cjs"),De=require("./index-CoobIWNj.cjs"),Te=require("./GraphHeader.cjs"),qe=require("./GraphFooter.cjs"),xe=require("./Colors.cjs"),Be=require("./generateRandomString-B5zBiJzS.cjs"),Pe=require("./EmptyState-N1eHt3vq.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),ye=require("./GraphContainer-B1EDxJ0S.cjs");function ve(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o<r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}return o}function Ee(e,t){let o;if(t===void 0)for(const r of e)r!=null&&(o>r||o===void 0&&r>=r)&&(o=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}return o}function re(e,t){let o=0;if(t===void 0)for(let r of e)(r=+r)&&(o+=r);else{let r=-1;for(let a of e)(a=+t(a,++r,e))&&(o+=a)}return o}function ze(e){return e.target.depth}function Ie(e,t){return e.sourceLinks.length?e.depth:t-1}function se(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Ee(e.sourceLinks,ze)-1:0}function Zt(e){return function(){return e}}function je(e,t){return Qt(e.source,t.source)||e.index-t.index}function ke(e,t){return Qt(e.target,t.target)||e.index-t.index}function Qt(e,t){return e.y0-t.y0}function le(e){return e.value}function Ae(e){return e.index}function He(e){return e.nodes}function Ge(e){return e.links}function be(e,t){const o=e.get(t);if(!o)throw new Error("missing: "+t);return o}function we({nodes:e}){for(const t of e){let o=t.y0,r=o;for(const a of t.sourceLinks)a.y0=o+a.width/2,o+=a.width;for(const a of t.targetLinks)a.y1=r+a.width/2,r+=a.width}}function ae(){let e=0,t=0,o=1,r=1,a=24,x=8,h,g=Ae,y=Ie,k,b,$=He,D=Ge,j=6;function p(){const n={nodes:$.apply(null,arguments),links:D.apply(null,arguments)};return M(n),H(n),w(n),S(n),F(n),we(n),n}p.update=function(n){return we(n),n},p.nodeId=function(n){return arguments.length?(g=typeof n=="function"?n:Zt(n),p):g},p.nodeAlign=function(n){return arguments.length?(y=typeof n=="function"?n:Zt(n),p):y},p.nodeSort=function(n){return arguments.length?(k=n,p):k},p.nodeWidth=function(n){return arguments.length?(a=+n,p):a},p.nodePadding=function(n){return arguments.length?(x=h=+n,p):x},p.nodes=function(n){return arguments.length?($=typeof n=="function"?n:Zt(n),p):$},p.links=function(n){return arguments.length?(D=typeof n=="function"?n:Zt(n),p):D},p.linkSort=function(n){return arguments.length?(b=n,p):b},p.size=function(n){return arguments.length?(e=t=0,o=+n[0],r=+n[1],p):[o-e,r-t]},p.extent=function(n){return arguments.length?(e=+n[0][0],o=+n[1][0],t=+n[0][1],r=+n[1][1],p):[[e,t],[o,r]]},p.iterations=function(n){return arguments.length?(j=+n,p):j};function M({nodes:n,links:l}){for(const[u,i]of n.entries())i.index=u,i.sourceLinks=[],i.targetLinks=[];const s=new Map(n.map((u,i)=>[g(u,i,n),u]));for(const[u,i]of l.entries()){i.index=u;let{source:f,target:v}=i;typeof f!="object"&&(f=i.source=be(s,f)),typeof v!="object"&&(v=i.target=be(s,v)),f.sourceLinks.push(i),v.targetLinks.push(i)}if(b!=null)for(const{sourceLinks:u,targetLinks:i}of n)u.sort(b),i.sort(b)}function H({nodes:n}){for(const l of n)l.value=l.fixedValue===void 0?Math.max(re(l.sourceLinks,le),re(l.targetLinks,le)):l.fixedValue}function w({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.depth=i;for(const{target:v}of f.sourceLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function S({nodes:n}){const l=n.length;let s=new Set(n),u=new Set,i=0;for(;s.size;){for(const f of s){f.height=i;for(const{source:v}of f.targetLinks)u.add(v)}if(++i>l)throw new Error("circular link");s=u,u=new Set}}function B({nodes:n}){const l=ve(n,i=>i.depth)+1,s=(o-e-a)/(l-1),u=new Array(l);for(const i of n){const f=Math.max(0,Math.min(l-1,Math.floor(y.call(null,i,l))));i.layer=f,i.x0=e+f*s,i.x1=i.x0+a,u[f]?u[f].push(i):u[f]=[i]}if(k)for(const i of u)i.sort(k);return u}function z(n){const l=Ee(n,s=>(r-t-(s.length-1)*h)/re(s,le));for(const s of n){let u=t;for(const i of s){i.y0=u,i.y1=u+i.value*l,u=i.y1+h;for(const f of i.sourceLinks)f.width=f.value*l}u=(r-u+h)/(s.length+1);for(let i=0;i<s.length;++i){const f=s[i];f.y0+=u*(i+1),f.y1+=u*(i+1)}X(s)}}function F(n){const l=B(n);h=Math.min(x,(r-t)/(ve(l,s=>s.length)-1)),z(l);for(let s=0;s<j;++s){const u=Math.pow(.99,s),i=Math.max(1-u,(s+1)/j);_(l,u,i),G(l,u,i)}}function G(n,l,s){for(let u=1,i=n.length;u<i;++u){const f=n[u];for(const v of f){let C=0,T=0;for(const{source:I,value:Y}of v.targetLinks){let U=Y*(v.layer-I.layer);C+=O(I,v)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function _(n,l,s){for(let u=n.length,i=u-2;i>=0;--i){const f=n[i];for(const v of f){let C=0,T=0;for(const{target:I,value:Y}of v.sourceLinks){let U=Y*(I.layer-v.layer);C+=E(v,I)*U,T+=U}if(!(T>0))continue;let V=(C/T-v.y0)*l;v.y0+=V,v.y1+=V,kt(v)}k===void 0&&f.sort(Qt),W(f,s)}}function W(n,l){const s=n.length>>1,u=n[s];tt(n,u.y0-h,s-1,l),R(n,u.y1+h,s+1,l),tt(n,r,n.length-1,l),R(n,t,0,l)}function R(n,l,s,u){for(;s<n.length;++s){const i=n[s],f=(l-i.y0)*u;f>1e-6&&(i.y0+=f,i.y1+=f),l=i.y1+h}}function tt(n,l,s,u){for(;s>=0;--s){const i=n[s],f=(i.y1-l)*u;f>1e-6&&(i.y0-=f,i.y1-=f),l=i.y0-h}}function kt({sourceLinks:n,targetLinks:l}){if(b===void 0){for(const{source:{sourceLinks:s}}of l)s.sort(ke);for(const{target:{targetLinks:s}}of n)s.sort(je)}}function X(n){if(b===void 0)for(const{sourceLinks:l,targetLinks:s}of n)l.sort(ke),s.sort(je)}function O(n,l){let s=n.y0-(n.sourceLinks.length-1)*h/2;for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s+=i+h}for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s-=i}return s}function E(n,l){let s=l.y0-(l.targetLinks.length-1)*h/2;for(const{source:u,width:i}of l.targetLinks){if(u===n)break;s+=i+h}for(const{target:u,width:i}of n.sourceLinks){if(u===l)break;s-=i}return s}return p}var ue=Math.PI,ce=2*ue,Ct=1e-6,We=ce-Ct;function fe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Le(){return new fe}fe.prototype=Le.prototype={constructor:fe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,o,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+o)+","+(this._y1=+r)},bezierCurveTo:function(e,t,o,r,a,x){this._+="C"+ +e+","+ +t+","+ +o+","+ +r+","+(this._x1=+a)+","+(this._y1=+x)},arcTo:function(e,t,o,r,a){e=+e,t=+t,o=+o,r=+r,a=+a;var x=this._x1,h=this._y1,g=o-e,y=r-t,k=x-e,b=h-t,$=k*k+b*b;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if($>Ct)if(!(Math.abs(b*g-y*k)>Ct)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var D=o-x,j=r-h,p=g*g+y*y,M=D*D+j*j,H=Math.sqrt(p),w=Math.sqrt($),S=a*Math.tan((ue-Math.acos((p+$-M)/(2*H*w)))/2),B=S/w,z=S/H;Math.abs(B-1)>Ct&&(this._+="L"+(e+B*k)+","+(t+B*b)),this._+="A"+a+","+a+",0,0,"+ +(b*D>k*j)+","+(this._x1=e+z*g)+","+(this._y1=t+z*y)}},arc:function(e,t,o,r,a,x){e=+e,t=+t,o=+o,x=!!x;var h=o*Math.cos(r),g=o*Math.sin(r),y=e+h,k=t+g,b=1^x,$=x?r-a:a-r;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+y+","+k:(Math.abs(this._x1-y)>Ct||Math.abs(this._y1-k)>Ct)&&(this._+="L"+y+","+k),o&&($<0&&($=$%ce+ce),$>We?this._+="A"+o+","+o+",0,1,"+b+","+(e-h)+","+(t-g)+"A"+o+","+o+",0,1,"+b+","+(this._x1=y)+","+(this._y1=k):$>Ct&&(this._+="A"+o+","+o+",0,"+ +($>=ue)+","+b+","+(this._x1=e+o*Math.cos(a))+","+(this._y1=t+o*Math.sin(a))))},rect:function(e,t,o,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +o+"v"+ +r+"h"+-o+"Z"},toString:function(){return this._}};function $e(e){return function(){return e}}function Fe(e){return e[0]}function _e(e){return e[1]}var Xe=Array.prototype.slice;function Ye(e){return e.source}function Ue(e){return e.target}function Ze(e){var t=Ye,o=Ue,r=Fe,a=_e,x=null;function h(){var g,y=Xe.call(arguments),k=t.apply(this,y),b=o.apply(this,y);if(x||(x=g=Le()),e(x,+r.apply(this,(y[0]=k,y)),+a.apply(this,y),+r.apply(this,(y[0]=b,y)),+a.apply(this,y)),g)return x=null,g+""||null}return h.source=function(g){return arguments.length?(t=g,h):t},h.target=function(g){return arguments.length?(o=g,h):o},h.x=function(g){return arguments.length?(r=typeof g=="function"?g:$e(+g),h):r},h.y=function(g){return arguments.length?(a=typeof g=="function"?g:$e(+g),h):a},h.context=function(g){return arguments.length?(x=g??null,h):x},h}function Qe(e,t,o,r,a){e.moveTo(t,o),e.bezierCurveTo(t=(t+r)/2,o,t,a,r,a)}function Je(){return Ze(Qe)}function Ke(e){return[e.source.x1,e.y0]}function tn(e){return[e.target.x0,e.y1]}function en(){return Je().source(Ke).target(tn)}function nn(e){const t=d.compilerRuntimeExports.c(136),{data:o,showLabels:r,leftMargin:a,rightMargin:x,truncateBy:h,width:g,height:y,topMargin:k,bottomMargin:b,tooltip:$,onSeriesMouseOver:D,suffix:j,prefix:p,showValues:M,onSeriesMouseClick:H,nodePadding:w,nodeWidth:S,id:B,highlightedSourceDataPoints:z,highlightedTargetDataPoints:F,defaultLinkOpacity:G,sourceTitle:_,targetTitle:W,animate:R,sortNodes:tt,resetSelectionOnDoubleClick:kt,detailsOnClick:X,styles:O,classNames:E,precision:n,customLayers:l}=e,s=A.useRef(null);let u;t[0]!==R.amount||t[1]!==R.once?(u={once:R.once,amount:R.amount},t[0]=R.amount,t[1]=R.once,t[2]=u):u=t[2];const i=Ne.useInView(s,u),[f,v]=A.useState(void 0),[C,T]=A.useState(void 0),[V,I]=A.useState(void 0),[Y,U]=A.useState(void 0),[St,Rt]=A.useState(void 0);let L;t[3]!==b||t[4]!==a||t[5]!==x||t[6]!==k?(L={top:k,bottom:b,left:a,right:x},t[3]=b,t[4]=a,t[5]=x,t[6]=k,t[7]=L):L=t[7];const m=L,wt=g-m.left-m.right,$t=y-m.top-m.bottom;let et,lt,at,Z,ut,ct,Q,J,ft,ht,K,nt,ot,it,gt,dt;if(t[8]!==R.duration||t[9]!==E?.graphObjectValues||t[10]!==l||t[11]!==o||t[12]!==G||t[13]!==X||t[14]!==$t||t[15]!==wt||t[16]!==y||t[17]!==z||t[18]!==F||t[19]!==B||t[20]!==i||t[21]!==a||t[22]!==m.left||t[23]!==m.right||t[24]!==m.top||t[25]!==C||t[26]!==w||t[27]!==S||t[28]!==H||t[29]!==D||t[30]!==n||t[31]!==p||t[32]!==kt||t[33]!==x||t[34]!==V||t[35]!==r||t[36]!==M||t[37]!==tt||t[38]!==_||t[39]!==O?.graphObjectValues||t[40]!==j||t[41]!==W||t[42]!==h||t[43]!==g){const It=tt==="mostReadable"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se):tt==="none"?ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(null).linkSort(null):ae().nodeWidth(S).nodePadding(w).size([wt,$t]).nodeAlign(se).nodeSort(tt==="desc"?fn:cn),{nodes:N,links:Vt}=It(o),Nt=en();lt=ie.motion.svg,gt=`${g}px`,dt=`${y}px`,at=`0 0 ${g} ${y}`,t[60]===Symbol.for("react.memo_cache_sentinel")?(Z={marginLeft:"auto",marginRight:"auto"},t[60]=Z):Z=t[60],ut="ltr",ct=s,t[61]!==m.left||t[62]!==m.top||t[63]!==_?(Q=_?d.jsxRuntimeExports.jsx("text",{x:m.left,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:_}):null,t[61]=m.left,t[62]=m.top,t[63]=_,t[64]=Q):Q=t[64],t[65]!==m.right||t[66]!==m.top||t[67]!==W||t[68]!==g?(J=W?d.jsxRuntimeExports.jsx("text",{x:g-m.right,y:m.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:W}):null,t[65]=m.right,t[66]=m.top,t[67]=W,t[68]=g,t[69]=J):J=t[69],ht=`translate(${m.left},${m.top})`,t[70]!==l?(K=l.filter(un).map(an),t[70]=l,t[71]=K):K=t[71];let Lt;t[72]!==E?.graphObjectValues||t[73]!==a||t[74]!==w||t[75]!==n||t[76]!==p||t[77]!==r||t[78]!==M||t[79]!==O?.graphObjectValues||t[80]!==j||t[81]!==h?(Lt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:0-a,width:a,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`,overflow:"visible"},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-right-label text-right",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:"none",size:"sm",leading:"none",className:d.mo("sankey-right-value text-right font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[72]=E?.graphObjectValues,t[73]=a,t[74]=w,t[75]=n,t[76]=p,t[77]=r,t[78]=M,t[79]=O?.graphObjectValues,t[80]=j,t[81]=h,t[82]=Lt):Lt=t[82],nt=N.filter(ln).map(Lt);let bt;t[83]!==E?.graphObjectValues||t[84]!==w||t[85]!==S||t[86]!==n||t[87]!==p||t[88]!==x||t[89]!==r||t[90]!==M||t[91]!==O?.graphObjectValues||t[92]!==j||t[93]!==h?(bt=(c,vt)=>d.jsxRuntimeExports.jsx("g",{onMouseEnter:()=>{I(c)},onMouseLeave:()=>{I(void 0)},children:d.jsxRuntimeExports.jsxs("g",{transform:`translate(${c.x0},${c.y0})`,children:[d.jsxRuntimeExports.jsx("rect",{x:0,y:0,width:(c.x1||0)-(c.x0||0),height:(c.y1||0)-(c.y0||0),style:{fill:c.color}}),r||M?d.jsxRuntimeExports.jsx("foreignObject",{y:0-w/2,x:S,width:x-S,height:(c.y1||0)-(c.y0||0)+w,children:d.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(c.y1||0)-(c.y0||0)+w}px`},children:[r?d.jsxRuntimeExports.jsx(Ut._,{marginBottom:M?"3xs":"none",size:"sm",leading:"none",className:d.mo("sankey-left-label text-left",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:`${c.label}`.length<h?`${c.label}`:`${`${c.label}`.substring(0,h)}...`}):null,M?d.jsxRuntimeExports.jsx(Ut._,{size:"sm",leading:"none",marginBottom:"none",className:d.mo("sankey-left-value text-left font-bold",E?.graphObjectValues),style:{hyphens:"auto",color:c.color,...O?.graphObjectValues},children:me.numberFormattingFunction(c.value,"NA",n,p,j)}):null]})}):null]})},vt),t[83]=E?.graphObjectValues,t[84]=w,t[85]=S,t[86]=n,t[87]=p,t[88]=x,t[89]=r,t[90]=M,t[91]=O?.graphObjectValues,t[92]=j,t[93]=h,t[94]=bt):bt=t[94],ot=N.filter(sn).map(bt);let Mt;t[95]!==B?(Mt=(c,vt)=>d.jsxRuntimeExports.jsxs("linearGradient",{id:`${B}-gradient-${vt}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[d.jsxRuntimeExports.jsx("stop",{offset:"0%",style:{stopColor:c.source.color,stopOpacity:1}}),d.jsxRuntimeExports.jsx("stop",{offset:"100%",style:{stopColor:c.target.color,stopOpacity:1}})]},vt),t[95]=B,t[96]=Mt):Mt=t[96],it=d.jsxRuntimeExports.jsx("defs",{children:Vt.map(Mt)}),et=De.AnimatePresence,ft=Vt.map((c,vt)=>d.jsxRuntimeExports.jsx(ie.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX),D?.(c)},onMouseMove:jt=>{v(c.data),Rt(jt.clientY),U(jt.clientX)},onClick:()=>{(H||X)&&(Oe.isEqual(C,c.data)&&kt?(T(void 0),H?.(void 0)):(T(c.data),H?.(c.data)))},onMouseLeave:()=>{v(void 0),U(void 0),Rt(void 0),D?.(void 0)},variants:{initial:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G},whileInView:{opacity:V?c.source.name===V.name||c.target.name===V.name?.85:G:(z.length!==0||F.length!==0)&&(z.indexOf(c.source.label)!==-1||F.indexOf(c.target.label)!==-1)?.85:G,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial",exit:{opacity:0,transition:{duration:R.duration}},children:d.jsxRuntimeExports.jsx(ie.motion.path,{d:Nt(c)||"",style:{stroke:`url(#${B}-gradient-${vt})`,strokeWidth:c.width,fill:"none"},exit:{opacity:0,transition:{duration:R.duration}},variants:{initial:{pathLength:0,opacity:1},whileInView:{pathLength:1,opacity:1,transition:{duration:R.duration}}},initial:"initial",animate:i?"whileInView":"initial"},`${c.source}-${c.target}`)},`${c.source}-${c.target}`)),t[8]=R.duration,t[9]=E?.graphObjectValues,t[10]=l,t[11]=o,t[12]=G,t[13]=X,t[14]=$t,t[15]=wt,t[16]=y,t[17]=z,t[18]=F,t[19]=B,t[20]=i,t[21]=a,t[22]=m.left,t[23]=m.right,t[24]=m.top,t[25]=C,t[26]=w,t[27]=S,t[28]=H,t[29]=D,t[30]=n,t[31]=p,t[32]=kt,t[33]=x,t[34]=V,t[35]=r,t[36]=M,t[37]=tt,t[38]=_,t[39]=O?.graphObjectValues,t[40]=j,t[41]=W,t[42]=h,t[43]=g,t[44]=et,t[45]=lt,t[46]=at,t[47]=Z,t[48]=ut,t[49]=ct,t[50]=Q,t[51]=J,t[52]=ft,t[53]=ht,t[54]=K,t[55]=nt,t[56]=ot,t[57]=it,t[58]=gt,t[59]=dt}else et=t[44],lt=t[45],at=t[46],Z=t[47],ut=t[48],ct=t[49],Q=t[50],J=t[51],ft=t[52],ht=t[53],K=t[54],nt=t[55],ot=t[56],it=t[57],gt=t[58],dt=t[59];let pt;t[97]!==et||t[98]!==ft?(pt=d.jsxRuntimeExports.jsx("g",{children:d.jsxRuntimeExports.jsx(et,{children:ft})}),t[97]=et,t[98]=ft,t[99]=pt):pt=t[99];let mt;t[100]!==l?(mt=l.filter(rn).map(on),t[100]=l,t[101]=mt):mt=t[101];let xt;t[102]!==pt||t[103]!==mt||t[104]!==ht||t[105]!==K||t[106]!==nt||t[107]!==ot||t[108]!==it?(xt=d.jsxRuntimeExports.jsxs("g",{transform:ht,children:[K,nt,ot,it,pt,mt]}),t[102]=pt,t[103]=mt,t[104]=ht,t[105]=K,t[106]=nt,t[107]=ot,t[108]=it,t[109]=xt):xt=t[109];let rt;t[110]!==lt||t[111]!==at||t[112]!==Z||t[113]!==ut||t[114]!==ct||t[115]!==Q||t[116]!==J||t[117]!==xt||t[118]!==gt||t[119]!==dt?(rt=d.jsxRuntimeExports.jsxs(lt,{width:gt,height:dt,viewBox:at,style:Z,direction:ut,ref:ct,children:[Q,J,xt]}),t[110]=lt,t[111]=at,t[112]=Z,t[113]=ut,t[114]=ct,t[115]=Q,t[116]=J,t[117]=xt,t[118]=gt,t[119]=dt,t[120]=rt):rt=t[120];let yt;t[121]!==E?.tooltip||t[122]!==Y||t[123]!==St||t[124]!==f||t[125]!==O?.tooltip||t[126]!==$?(yt=f&&$&&Y&&St?d.jsxRuntimeExports.jsx(Ce.Tooltip,{data:f,body:$,xPos:Y,yPos:St,backgroundStyle:O?.tooltip,className:E?.tooltip}):null,t[121]=E?.tooltip,t[122]=Y,t[123]=St,t[124]=f,t[125]=O?.tooltip,t[126]=$,t[127]=yt):yt=t[127];let st;t[128]!==E?.modal||t[129]!==X||t[130]!==C?(st=X&&C!==void 0?d.jsxRuntimeExports.jsx(Ve.DetailsModal,{body:X,data:C,setData:T,className:E?.modal}):null,t[128]=E?.modal,t[129]=X,t[130]=C,t[131]=st):st=t[131];let Et;return t[132]!==rt||t[133]!==yt||t[134]!==st?(Et=d.jsxRuntimeExports.jsxs(d.jsxRuntimeExports.Fragment,{children:[rt,yt,st]}),t[132]=rt,t[133]=yt,t[134]=st,t[135]=Et):Et=t[135],Et}function on(e){return e.layer}function rn(e){return e.position==="after"}function sn(e){return e.type==="target"}function ln(e){return e.type==="source"}function an(e){return e.layer}function un(e){return e.position==="before"}function cn(e,t){return(e.value||0)-(t.value||0)}function fn(e,t){return(t.value||0)-(e.value||0)}function hn(e){const t=d.compilerRuntimeExports.c(98),{data:o,graphTitle:r,sources:a,graphDescription:x,showLabels:h,leftMargin:g,rightMargin:y,topMargin:k,bottomMargin:b,truncateBy:$,height:D,width:j,footNote:p,padding:M,backgroundColor:H,tooltip:w,onSeriesMouseOver:S,suffix:B,prefix:z,relativeHeight:F,showValues:G,graphID:_,onSeriesMouseClick:W,graphDownload:R,dataDownload:tt,fillContainer:kt,language:X,minHeight:O,theme:E,ariaLabel:n,sourceColors:l,targetColors:s,sourceColorDomain:u,targetColorDomain:i,nodePadding:f,nodeWidth:v,highlightedSourceDataPoints:C,highlightedTargetDataPoints:T,defaultLinkOpacity:V,sourceTitle:I,targetTitle:Y,sortNodes:U,resetSelectionOnDoubleClick:St,detailsOnClick:Rt,styles:L,classNames:m,animate:wt,precision:$t,customLayers:et}=e,lt=h===void 0?!0:h,at=g===void 0?75:g,Z=y===void 0?75:y,ut=k===void 0?30:k,ct=b===void 0?10:b,Q=$===void 0?999:$,J=H===void 0?!1:H,ft=B===void 0?"":B,ht=z===void 0?"":z,K=G===void 0?!0:G,nt=R===void 0?!1:R,ot=tt===void 0?!1:tt,it=kt===void 0?!0:kt,gt=X===void 0?"en":X,dt=O===void 0?0:O,pt=E===void 0?"light":E,mt=f===void 0?5:f,xt=v===void 0?5:v;let rt;t[0]!==C?(rt=C===void 0?[]:C,t[0]=C,t[1]=rt):rt=t[1];const yt=rt;let st;t[2]!==T?(st=T===void 0?[]:T,t[2]=T,t[3]=st):st=t[3];const Et=st,It=V===void 0?.3:V,N=U===void 0?"mostReadable":U,Vt=St===void 0?!0:St,Nt=wt===void 0?!1:wt,Lt=$t===void 0?2:$t;let bt;t[4]!==et?(bt=et===void 0?[]:et,t[4]=et,t[5]=bt):bt=t[5];const Mt=bt,[c,vt]=A.useState(0),[jt,Me]=A.useState(0),[At,Se]=A.useState(void 0),Jt=A.useRef(null),he=A.useRef(null);let Ht;t[6]===Symbol.for("react.memo_cache_sentinel")?(Ht=Ot=>{Se(Ot)},t[6]=Ht):Ht=t[6];const Kt=A.useEffectEvent(Ht);let Gt;t[7]!==o||t[8]!==N||t[9]!==u||t[10]!==l||t[11]!==i||t[12]!==s||t[13]!==Kt?(Gt=()=>{const Ot=zt.uniqBy(o,"source",!0).map(q=>({name:`source_${q}`,type:"source",label:`${q}`,color:typeof l=="string"||!l?l||xe.Colors.graphMainColor:l[(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)>l.length?l.length-1:(u||zt.uniqBy(o,"source",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.source}`==`${q}`).map(kn))})),Yt=N==="asc"||N==="desc"?pe.orderBy(Ot,["totalValue"],[N]):Ot,ge=zt.uniqBy(o,"target",!0).map(q=>({name:`target_${q}`,type:"target",label:`${q}`,color:typeof s=="string"||!s?s||xe.Colors.graphMainColor:s[(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)>s.length?s.length-1:(i||zt.uniqBy(o,"target",!0)).findIndex(P=>`${P}`==`${q}`)],totalValue:de.sum(o.filter(P=>`${P.target}`==`${q}`).map(jn))})),Re=N==="asc"||N==="desc"?pe.orderBy(ge,["totalValue"],[N]):ge,oe=[...Yt,...Re];Kt({nodes:oe,links:o.map(q=>({source:oe.findIndex(P=>P.name===`source_${q.source}`),target:oe.findIndex(P=>P.name===`target_${q.target}`),value:q.value,data:{...q}}))})},t[7]=o,t[8]=N,t[9]=u,t[10]=l,t[11]=i,t[12]=s,t[13]=Kt,t[14]=Gt):Gt=t[14];let Wt;t[15]!==o||t[16]!==N||t[17]!==u||t[18]!==l||t[19]!==i||t[20]!==s?(Wt=[o,N,u,l,i,s],t[15]=o,t[16]=N,t[17]=u,t[18]=l,t[19]=i,t[20]=s,t[21]=Wt):Wt=t[21],A.useEffect(Gt,Wt);let Ft,_t;t[22]===Symbol.for("react.memo_cache_sentinel")?(Ft=()=>{const Ot=new ResizeObserver(Yt=>{vt(Yt[0].target.clientWidth||620),Me(Yt[0].target.clientHeight||480)});return Jt.current&&Ot.observe(Jt.current),()=>Ot.disconnect()},_t=[],t[22]=Ft,t[23]=_t):(Ft=t[22],_t=t[23]),A.useEffect(Ft,_t);const te=m?.graphContainer,ee=L?.graphContainer,ne=it?void 0:j;let Dt;t[24]!==m?.description||t[25]!==m?.title||t[26]!==o||t[27]!==ot||t[28]!==x||t[29]!==nt||t[30]!==r||t[31]!==L?.description||t[32]!==L?.title||t[33]!==j?(Dt=r||x||nt||ot?d.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:L?.title,description:L?.description},classNames:{title:m?.title,description:m?.description},graphTitle:r,graphDescription:x,width:j,graphDownload:nt?he:void 0,dataDownload:ot?o.map(vn).filter(yn).length>0?o.map(xn).filter(mn):o.filter(pn):null}):null,t[24]=m?.description,t[25]=m?.title,t[26]=o,t[27]=ot,t[28]=x,t[29]=nt,t[30]=r,t[31]=L?.description,t[32]=L?.title,t[33]=j,t[34]=Dt):Dt=t[34];let Tt;t[35]!==o.length?(Tt=o.length===0&&d.jsxRuntimeExports.jsx(Pe.EmptyState,{}),t[35]=o.length,t[36]=Tt):Tt=t[36];let qt;t[37]!==Nt||t[38]!==ct||t[39]!==m||t[40]!==Mt||t[41]!==o.length||t[42]!==It||t[43]!==Rt||t[44]!==it||t[45]!==yt||t[46]!==Et||t[47]!==at||t[48]!==mt||t[49]!==xt||t[50]!==W||t[51]!==S||t[52]!==Lt||t[53]!==ht||t[54]!==Vt||t[55]!==Z||t[56]!==At||t[57]!==lt||t[58]!==K||t[59]!==N||t[60]!==I||t[61]!==L||t[62]!==ft||t[63]!==jt||t[64]!==c||t[65]!==Y||t[66]!==w||t[67]!==ut||t[68]!==Q||t[69]!==j?(qt=c&&jt&&At&&o.length>0?d.jsxRuntimeExports.jsx(nn,{data:At,nodePadding:mt,nodeWidth:xt,width:it||!j||c<j?c:j,height:jt,showLabels:lt,leftMargin:at,rightMargin:Z,topMargin:ut,bottomMargin:ct,truncateBy:Q,tooltip:w,onSeriesMouseOver:S,showValues:K,suffix:ft,prefix:ht,onSeriesMouseClick:W,id:Be.generateRandomString(8),highlightedSourceDataPoints:yt.map(dn),highlightedTargetDataPoints:Et.map(gn),defaultLinkOpacity:It,sourceTitle:I,targetTitle:Y,sortNodes:N,resetSelectionOnDoubleClick:Vt,styles:L,classNames:m,detailsOnClick:Rt,animate:Nt===!0?{duration:.5,once:!0,amount:.5}:Nt||{duration:0,once:!0,amount:0},precision:Lt,customLayers:Mt}):null,t[37]=Nt,t[38]=ct,t[39]=m,t[40]=Mt,t[41]=o.length,t[42]=It,t[43]=Rt,t[44]=it,t[45]=yt,t[46]=Et,t[47]=at,t[48]=mt,t[49]=xt,t[50]=W,t[51]=S,t[52]=Lt,t[53]=ht,t[54]=Vt,t[55]=Z,t[56]=At,t[57]=lt,t[58]=K,t[59]=N,t[60]=I,t[61]=L,t[62]=ft,t[63]=jt,t[64]=c,t[65]=Y,t[66]=w,t[67]=ut,t[68]=Q,t[69]=j,t[70]=qt):qt=t[70];let Bt;t[71]!==Tt||t[72]!==qt?(Bt=d.jsxRuntimeExports.jsxs(ye.GraphArea,{ref:Jt,children:[Tt,qt]}),t[71]=Tt,t[72]=qt,t[73]=Bt):Bt=t[73];let Pt;t[74]!==m?.footnote||t[75]!==m?.source||t[76]!==p||t[77]!==a||t[78]!==L?.footnote||t[79]!==L?.source||t[80]!==j?(Pt=a||p?d.jsxRuntimeExports.jsx(qe.GraphFooter,{styles:{footnote:L?.footnote,source:L?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:a,footNote:p,width:j}):null,t[74]=m?.footnote,t[75]=m?.source,t[76]=p,t[77]=a,t[78]=L?.footnote,t[79]=L?.source,t[80]=j,t[81]=Pt):Pt=t[81];let Xt;return t[82]!==n||t[83]!==J||t[84]!==_||t[85]!==D||t[86]!==gt||t[87]!==dt||t[88]!==M||t[89]!==F||t[90]!==te||t[91]!==ee||t[92]!==ne||t[93]!==Dt||t[94]!==Bt||t[95]!==Pt||t[96]!==pt?(Xt=d.jsxRuntimeExports.jsxs(ye.GraphContainer,{className:te,style:ee,id:_,ref:he,"aria-label":n,backgroundColor:J,theme:pt,language:gt,minHeight:dt,width:ne,height:D,relativeHeight:F,padding:M,children:[Dt,Bt,Pt]}),t[82]=n,t[83]=J,t[84]=_,t[85]=D,t[86]=gt,t[87]=dt,t[88]=M,t[89]=F,t[90]=te,t[91]=ee,t[92]=ne,t[93]=Dt,t[94]=Bt,t[95]=Pt,t[96]=pt,t[97]=Xt):Xt=t[97],Xt}function gn(e){return`${e}`}function dn(e){return`${e}`}function pn(e){return e!==void 0}function mn(e){return e!==void 0}function xn(e){return e.data}function yn(e){return e!==void 0}function vn(e){return e.data}function jn(e){return e.value}function kn(e){return e.value}exports.SankeyChart=hn;
2
2
  //# sourceMappingURL=SankeyChart.cjs.map
@@ -3,7 +3,7 @@ import { useRef as ce, useState as St, useEffectEvent as Te, useEffect as me } f
3
3
  import { s as ye } from "./index-CeVNqhMO.js";
4
4
  import { o as xe } from "./index-BZQYSqar.js";
5
5
  import { i as Pe } from "./index-Bwrro8-q.js";
6
- import { _ as Zt } from "./Typography-iR8PEgdt.js";
6
+ import { _ as Zt } from "./Typography-CdMGooqp.js";
7
7
  import { n as ve } from "./numberFormattingFunction-14YCbkN2.js";
8
8
  import { T as ze } from "./Tooltip-BRnAz2Gv.js";
9
9
  import { D as Ee } from "./DetailsModal-BMCTgVsk.js";
@@ -14,7 +14,7 @@ import { GraphHeader as Ie } from "./GraphHeader.js";
14
14
  import { GraphFooter as He } from "./GraphFooter.js";
15
15
  import { Colors as ke } from "./Colors.js";
16
16
  import { g as We } from "./generateRandomString-za3IQGfQ.js";
17
- import { E as Re } from "./EmptyState-Pj-emXt5.js";
17
+ import { E as Re } from "./EmptyState-dScPFkLy.js";
18
18
  import { u as It } from "./uniqBy-BHy4I8PK.js";
19
19
  import { a as Ge, G as qe } from "./GraphContainer-CF6ws3pd.js";
20
20
  function be(e, t) {
@@ -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-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;
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-N1eHt3vq.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,7 +27,7 @@ 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-Pj-emXt5.js";
30
+ import { E as Ti } from "./EmptyState-dScPFkLy.js";
31
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";
@@ -416,6 +416,7 @@ declare interface GraphSettingsDataType {
416
416
  hideAxisLine?: boolean;
417
417
  projectionRotate?: [number, number] | [number, number, number];
418
418
  rewindCoordinatesInMapData?: boolean;
419
+ circularBoundary?: boolean;
419
420
  }
420
421
 
421
422
  declare type GraphType = GraphTypeForGriddedGraph;