@undp/data-viz 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +1 -1
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1188 -1213
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +126 -131
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +404 -413
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +179 -184
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +268 -273
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +1 -1
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +198 -203
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +1 -1
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +364 -373
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +111 -116
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +1 -1
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +202 -207
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +1 -1
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.d.ts +2 -0
  108. package/dist/MultiLineAltChart.js +1 -1
  109. package/dist/MultiLineChart.cjs +1 -1
  110. package/dist/MultiLineChart.d.ts +2 -0
  111. package/dist/MultiLineChart.js +1 -1
  112. package/dist/ParetoChart.cjs +1 -1
  113. package/dist/ParetoChart.cjs.map +1 -1
  114. package/dist/ParetoChart.d.ts +2 -0
  115. package/dist/ParetoChart.js +187 -192
  116. package/dist/ParetoChart.js.map +1 -1
  117. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  118. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  122. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  123. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  124. package/dist/RadarChart.cjs +1 -1
  125. package/dist/RadarChart.cjs.map +1 -1
  126. package/dist/RadarChart.d.ts +2 -0
  127. package/dist/RadarChart.js +158 -163
  128. package/dist/RadarChart.js.map +1 -1
  129. package/dist/SankeyChart.cjs +1 -1
  130. package/dist/SankeyChart.cjs.map +1 -1
  131. package/dist/SankeyChart.d.ts +2 -0
  132. package/dist/SankeyChart.js +172 -177
  133. package/dist/SankeyChart.js.map +1 -1
  134. package/dist/ScatterPlot.cjs +1 -1
  135. package/dist/ScatterPlot.cjs.map +1 -1
  136. package/dist/ScatterPlot.d.ts +2 -0
  137. package/dist/ScatterPlot.js +222 -227
  138. package/dist/ScatterPlot.js.map +1 -1
  139. package/dist/ScrollStory.d.ts +2 -0
  140. package/dist/SimpleLineChart.cjs +1 -1
  141. package/dist/SimpleLineChart.d.ts +2 -0
  142. package/dist/SimpleLineChart.js +1 -1
  143. package/dist/SingleGraphDashboard.cjs +1 -1
  144. package/dist/SingleGraphDashboard.cjs.map +1 -1
  145. package/dist/SingleGraphDashboard.d.ts +2 -0
  146. package/dist/SingleGraphDashboard.js +24 -24
  147. package/dist/SingleGraphDashboard.js.map +1 -1
  148. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  149. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  150. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  152. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  153. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  154. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  155. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  156. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  157. package/dist/SlopeChart.cjs +1 -1
  158. package/dist/SlopeChart.cjs.map +1 -1
  159. package/dist/SlopeChart.d.ts +2 -0
  160. package/dist/SlopeChart.js +182 -187
  161. package/dist/SlopeChart.js.map +1 -1
  162. package/dist/SparkLine.cjs +1 -1
  163. package/dist/SparkLine.d.ts +2 -0
  164. package/dist/SparkLine.js +1 -1
  165. package/dist/StatCardFromData.d.ts +2 -0
  166. package/dist/StripChart.cjs +1 -1
  167. package/dist/StripChart.cjs.map +1 -1
  168. package/dist/StripChart.d.ts +2 -0
  169. package/dist/StripChart.js +249 -258
  170. package/dist/StripChart.js.map +1 -1
  171. package/dist/ThreeDGlobe.cjs +1 -1
  172. package/dist/ThreeDGlobe.cjs.map +1 -1
  173. package/dist/ThreeDGlobe.d.ts +2 -0
  174. package/dist/ThreeDGlobe.js +142 -147
  175. package/dist/ThreeDGlobe.js.map +1 -1
  176. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  177. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  178. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  179. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  180. package/dist/TreeMapGraph.cjs +1 -1
  181. package/dist/TreeMapGraph.cjs.map +1 -1
  182. package/dist/TreeMapGraph.d.ts +2 -0
  183. package/dist/TreeMapGraph.js +159 -164
  184. package/dist/TreeMapGraph.js.map +1 -1
  185. package/dist/Types.d.ts +2 -0
  186. package/dist/UnitChart.d.ts +2 -0
  187. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  188. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  189. package/dist/index-BBV4tAeA.js +330 -0
  190. package/dist/index-BBV4tAeA.js.map +1 -0
  191. package/dist/index-CF5hnGvG.cjs +2 -0
  192. package/dist/index-CF5hnGvG.cjs.map +1 -0
  193. package/dist/index.cjs +1 -1
  194. package/dist/index.d.ts +2 -0
  195. package/dist/index.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  198. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  199. package/dist/Tooltip-CwWUegPB.js +0 -43
  200. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  201. package/dist/index-B2LQV7Tk.js +0 -335
  202. package/dist/index-B2LQV7Tk.js.map +0 -1
  203. package/dist/index-xRHRLDIp.cjs +0 -2
  204. package/dist/index-xRHRLDIp.cjs.map +0 -1
@@ -1,43 +1,42 @@
1
- import { c as he, j as i, m as se } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useRef as ne, useState as Ct, useEffect as re } from "react";
1
+ import { c as he, j as i, m as ae } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useRef as ne, useState as Lt, useEffect as re } from "react";
3
3
  import { g as pe, N as ge } from "./getSliderMarks-HIDJ0_Cd.js";
4
- import { p as ye, f as ve } from "./parse-DlCRUFh_.js";
4
+ import { p as ye, f as be } from "./parse-DlCRUFh_.js";
5
5
  import { i as le } from "./index-Bwrro8-q.js";
6
- import { l as be } from "./Modal-DGcuAHyK.js";
7
6
  import { n as ce } from "./numberFormattingFunction-14YCbkN2.js";
8
- import { T as we } from "./Tooltip-CwWUegPB.js";
9
- import { s as je } from "./string2HTML-DhG75NqA.js";
7
+ import { T as ve } from "./Tooltip-Dj5eVppQ.js";
10
8
  import { X as me } from "./XTicksAndGridLines-CObVFSm4.js";
11
9
  import { A as ue } from "./Axis-CRyfcLjc.js";
12
- import { Y as Ae } from "./YAxesLabels-a57ZRv-0.js";
10
+ import { Y as we } from "./YAxesLabels-a57ZRv-0.js";
13
11
  import { R as de } from "./ReferenceLine-2XCwHXQ4.js";
14
- import { b as Be } from "./band-CyHaVft5.js";
12
+ import { D as je } from "./DetailsModal-0Ry5nXiC.js";
13
+ import { b as Ae } from "./band-CyHaVft5.js";
15
14
  import { a as fe } from "./linear-BwnDd9KF.js";
16
- import { u as Le } from "./use-in-view-Cxa7y1TH.js";
17
- import { m as Mt } from "./proxy-BxkFHwUw.js";
18
- import { A as ae } from "./index-BqfRwk1n.js";
15
+ import { u as Be } from "./use-in-view-Cxa7y1TH.js";
16
+ import { m as Ct } from "./proxy-BxkFHwUw.js";
17
+ import { A as se } from "./index-BqfRwk1n.js";
19
18
  import { GraphFooter as Me } from "./GraphFooter.js";
20
19
  import { GraphHeader as Ce } from "./GraphHeader.js";
21
- import { ColorLegend as ke } from "./ColorLegend.js";
20
+ import { ColorLegend as Le } from "./ColorLegend.js";
22
21
  import { Colors as xe } from "./Colors.js";
23
- import { E as Ve } from "./EmptyState-BZo1BbAn.js";
24
- import { P as $e, e as Ne } from "./index-D491FEn1.js";
22
+ import { E as ke } from "./EmptyState-BZo1BbAn.js";
23
+ import { P as Ve, e as $e } from "./index-D491FEn1.js";
25
24
  import { c as oe } from "./checkIfNullOrUndefined-DmfiKkNw.js";
26
- import { b as Te } from "./ensureCompleteData-DNKEGRiP.js";
25
+ import { b as Ne } from "./ensureCompleteData-DNKEGRiP.js";
27
26
  import { u as Oe } from "./uniqBy-BHy4I8PK.js";
28
- import { a as De, G as Se } from "./GraphContainer-CRqzdKu2.js";
29
- import { s as Ie } from "./sort-BIvMlUH1.js";
30
- import { a as Fe } from "./init-BJFW6EwE.js";
31
- function Ge(s) {
32
- const t = he.c(139), {
27
+ import { a as De, G as Te } from "./GraphContainer-CRqzdKu2.js";
28
+ import { s as Se } from "./sort-BIvMlUH1.js";
29
+ import { a as Ie } from "./init-BJFW6EwE.js";
30
+ function Fe(a) {
31
+ const t = he.c(140), {
33
32
  data: c,
34
- width: L,
35
- height: v,
33
+ width: A,
34
+ height: b,
36
35
  barColors: r,
37
- centerGap: b,
36
+ centerGap: v,
38
37
  refValues: u,
39
- maxValue: X,
40
- minValue: st,
38
+ maxValue: H,
39
+ minValue: at,
41
40
  showValues: Y,
42
41
  axisTitles: W,
43
42
  rightMargin: Gt,
@@ -47,15 +46,15 @@ function Ge(s) {
47
46
  tooltip: kt,
48
47
  onSeriesMouseOver: z,
49
48
  barPadding: Jt,
50
- truncateBy: at,
49
+ truncateBy: st,
51
50
  onSeriesMouseClick: R,
52
51
  showTicks: ot,
53
52
  suffix: q,
54
53
  prefix: U,
55
54
  resetSelectionOnDoubleClick: Et,
56
- detailsOnClick: j,
55
+ detailsOnClick: L,
57
56
  styles: o,
58
- classNames: a,
57
+ classNames: s,
59
58
  noOfTicks: k,
60
59
  animate: n,
61
60
  precision: J,
@@ -63,26 +62,26 @@ function Ge(s) {
63
62
  minValueLeftBar: $,
64
63
  minValueRightBar: N,
65
64
  naLabel: Vt
66
- } = s, Kt = ne(null);
65
+ } = a, Kt = ne(null);
67
66
  let $t;
68
67
  t[0] !== n.amount || t[1] !== n.once ? ($t = {
69
68
  once: n.once,
70
69
  amount: n.amount
71
70
  }, t[0] = n.amount, t[1] = n.once, t[2] = $t) : $t = t[2];
72
- const T = Le(Kt, $t), [Nt, K] = Ct(void 0), [A, nt] = Ct(void 0), [Ht, m] = Ct(void 0), [d, Q] = Ct(void 0);
73
- let Tt;
74
- t[3] !== Pt || t[4] !== Rt || t[5] !== Gt || t[6] !== G ? (Tt = {
71
+ const O = Be(Kt, $t), [Nt, K] = Lt(void 0), [C, nt] = Lt(void 0), [Xt, m] = Lt(void 0), [d, Q] = Lt(void 0);
72
+ let Ot;
73
+ t[3] !== Pt || t[4] !== Rt || t[5] !== Gt || t[6] !== G ? (Ot = {
75
74
  top: G,
76
75
  bottom: Pt,
77
76
  left: Rt,
78
77
  right: Gt
79
- }, t[3] = Pt, t[4] = Rt, t[5] = Gt, t[6] = G, t[7] = Tt) : Tt = t[7];
80
- const l = Tt, M = L - l.left - l.right, C = v - l.top - l.bottom;
81
- let Z, O, _, P, rt, lt, ct, mt, tt, D, ut, dt, ft, xt;
82
- if (t[8] !== n || t[9] !== r[0] || t[10] !== r[1] || t[11] !== Jt || t[12] !== b || t[13] !== a?.graphObjectValues || t[14] !== a?.xAxis?.gridLines || t[15] !== a?.xAxis?.labels || t[16] !== a?.yAxis?.axis || t[17] !== a?.yAxis?.labels || t[18] !== V || t[19] !== c || t[20] !== j || t[21] !== C || t[22] !== M || t[23] !== v || t[24] !== T || t[25] !== l.bottom || t[26] !== l.left || t[27] !== l.top || t[28] !== X || t[29] !== st || t[30] !== $ || t[31] !== N || t[32] !== A || t[33] !== Vt || t[34] !== k || t[35] !== R || t[36] !== z || t[37] !== J || t[38] !== U || t[39] !== u || t[40] !== Et || t[41] !== ot || t[42] !== Y || t[43] !== o?.graphObjectValues || t[44] !== o?.xAxis?.gridLines || t[45] !== o?.xAxis?.labels || t[46] !== o?.yAxis?.axis || t[47] !== o?.yAxis?.labels || t[48] !== q || t[49] !== G || t[50] !== at || t[51] !== L) {
83
- const Yt = c.map(Ue), g = Be().domain(Yt.map(qe)).range([C, 0]).paddingInner(Jt), h = fe().domain([st, X]).range([0, (M - b) / 2]).nice(), p = h.ticks(k), f = fe().domain([st, X]).range([(M - b) / 2, 0]).nice(), Wt = f.ticks(k);
84
- _ = Mt.svg, ft = `${L}px`, xt = `${v}px`, P = `0 0 ${L} ${v}`, rt = "ltr", lt = Kt, tt = `translate(${l.left},${l.top})`, t[66] !== V ? (D = V.filter(ze).map(We), t[66] = V, t[67] = D) : D = t[67];
85
- const St = a?.yAxis?.axis;
78
+ }, t[3] = Pt, t[4] = Rt, t[5] = Gt, t[6] = G, t[7] = Ot) : Ot = t[7];
79
+ const l = Ot, B = A - l.left - l.right, M = b - l.top - l.bottom;
80
+ let Z, D, _, P, rt, lt, ct, mt, tt, T, ut, dt, ft, xt;
81
+ if (t[8] !== n || t[9] !== r[0] || t[10] !== r[1] || t[11] !== Jt || t[12] !== v || t[13] !== s?.graphObjectValues || t[14] !== s?.xAxis?.gridLines || t[15] !== s?.xAxis?.labels || t[16] !== s?.yAxis?.axis || t[17] !== s?.yAxis?.labels || t[18] !== V || t[19] !== c || t[20] !== L || t[21] !== M || t[22] !== B || t[23] !== b || t[24] !== O || t[25] !== l.bottom || t[26] !== l.left || t[27] !== l.top || t[28] !== H || t[29] !== at || t[30] !== $ || t[31] !== N || t[32] !== C || t[33] !== Vt || t[34] !== k || t[35] !== R || t[36] !== z || t[37] !== J || t[38] !== U || t[39] !== u || t[40] !== Et || t[41] !== ot || t[42] !== Y || t[43] !== o?.graphObjectValues || t[44] !== o?.xAxis?.gridLines || t[45] !== o?.xAxis?.labels || t[46] !== o?.yAxis?.axis || t[47] !== o?.yAxis?.labels || t[48] !== q || t[49] !== G || t[50] !== st || t[51] !== A) {
82
+ const Yt = c.map(qe), g = Ae().domain(Yt.map(ze)).range([M, 0]).paddingInner(Jt), h = fe().domain([at, H]).range([0, (B - v) / 2]).nice(), p = h.ticks(k), f = fe().domain([at, H]).range([(B - v) / 2, 0]).nice(), Wt = f.ticks(k);
83
+ _ = Ct.svg, ft = `${A}px`, xt = `${b}px`, P = `0 0 ${A} ${b}`, rt = "ltr", lt = Kt, tt = `translate(${l.left},${l.top})`, t[66] !== V ? (T = V.filter(We).map(Ye), t[66] = V, t[67] = T) : T = t[67];
84
+ const St = s?.yAxis?.axis;
86
85
  let It;
87
86
  t[68] !== St ? (It = {
88
87
  axis: St
@@ -92,24 +91,24 @@ function Ge(s) {
92
91
  t[70] !== At ? (it = {
93
92
  axis: At
94
93
  }, t[70] = At, t[71] = it) : it = t[71], ut = /* @__PURE__ */ i.jsxs("g", { transform: "translate(0,0)", children: [
95
- ot ? /* @__PURE__ */ i.jsx(me, { values: Wt.filter(Ye), x: Wt.filter(Xe).map((e) => f(e)), y1: 0 - G, y2: C + l.bottom, styles: {
94
+ ot ? /* @__PURE__ */ i.jsx(me, { values: Wt.filter(He), x: Wt.filter(Xe).map((e) => f(e)), y1: 0 - G, y2: M + l.bottom, styles: {
96
95
  gridLines: o?.xAxis?.gridLines,
97
96
  labels: o?.xAxis?.labels
98
97
  }, classNames: {
99
- gridLines: a?.xAxis?.gridLines,
100
- labels: a?.xAxis?.labels
98
+ gridLines: s?.xAxis?.gridLines,
99
+ labels: s?.xAxis?.labels
101
100
  }, suffix: q, prefix: U, labelType: "secondary", showGridLines: !0, leftLabel: !0, precision: J }) : null,
102
- /* @__PURE__ */ i.jsxs(ae, { children: [
103
- Yt.map((e, y) => /* @__PURE__ */ i.jsxs(Mt.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (w) => {
101
+ /* @__PURE__ */ i.jsxs(se, { children: [
102
+ Yt.map((e, y) => /* @__PURE__ */ i.jsxs(Ct.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (w) => {
104
103
  K(e), Q(w.clientY), m(w.clientX), z?.(e);
105
104
  }, onClick: () => {
106
- (R || j) && (le(A, e) && Et ? (nt(void 0), R?.(void 0)) : (nt(e), R?.(e)));
105
+ (R || L) && (le(C, e) && Et ? (nt(void 0), R?.(void 0)) : (nt(e), R?.(e)));
107
106
  }, onMouseMove: (w) => {
108
107
  K(e), Q(w.clientY), m(w.clientX);
109
108
  }, onMouseLeave: () => {
110
109
  K(void 0), m(void 0), Q(void 0), z?.(void 0);
111
110
  }, children: [
112
- e.leftBar ? /* @__PURE__ */ i.jsx(Mt.rect, { y: g(`${y}`), style: {
111
+ e.leftBar ? /* @__PURE__ */ i.jsx(Ct.rect, { y: g(`${y}`), style: {
113
112
  fill: r[0]
114
113
  }, height: g.bandwidth(), variants: {
115
114
  initial: {
@@ -123,17 +122,17 @@ function Ge(s) {
123
122
  duration: n.duration
124
123
  }
125
124
  }
126
- }, initial: "initial", animate: T ? "whileInView" : "initial", exit: {
125
+ }, initial: "initial", animate: O ? "whileInView" : "initial", exit: {
127
126
  x: f(0),
128
127
  width: 0,
129
128
  transition: {
130
129
  duration: n.duration
131
130
  }
132
131
  } }) : null,
133
- Y ? /* @__PURE__ */ i.jsx(Mt.text, { y: g(`${y}`) + g.bandwidth() / 2, style: {
132
+ Y ? /* @__PURE__ */ i.jsx(Ct.text, { y: g(`${y}`) + g.bandwidth() / 2, style: {
134
133
  textAnchor: e.rightBar && e.rightBar > 0 ? "end" : "start",
135
134
  ...o?.graphObjectValues || {}
136
- }, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className: se("graph-value text-sm", a?.graphObjectValues), exit: {
135
+ }, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className: ae("graph-value text-sm", s?.graphObjectValues), exit: {
137
136
  opacity: 0,
138
137
  transition: {
139
138
  duration: n.duration
@@ -152,40 +151,40 @@ function Ge(s) {
152
151
  duration: n.duration
153
152
  }
154
153
  }
155
- }, initial: "initial", animate: T ? "whileInView" : "initial", children: ce(e.rightBar, Vt, J, U, q) }) : null
154
+ }, initial: "initial", animate: O ? "whileInView" : "initial", children: ce(e.rightBar, Vt, J, U, q) }) : null
156
155
  ] }, e.label)),
157
- /* @__PURE__ */ i.jsx(ue, { y1: -2.5, y2: C + l.bottom, x1: f($ < 0 ? 0 : $), x2: f($ < 0 ? 0 : $), classNames: It, styles: it }),
158
- u ? /* @__PURE__ */ i.jsx(i.Fragment, { children: u.map((e, y) => /* @__PURE__ */ i.jsx(de, { text: e.text, color: e.color, x: f(e.value), y1: 0 - l.top, y2: C + l.bottom, textSide: "left", classNames: e.classNames, styles: e.styles, animate: n, isInView: T }, y)) }) : null
156
+ /* @__PURE__ */ i.jsx(ue, { y1: -2.5, y2: M + l.bottom, x1: f($ < 0 ? 0 : $), x2: f($ < 0 ? 0 : $), classNames: It, styles: it }),
157
+ u ? /* @__PURE__ */ i.jsx(i.Fragment, { children: u.map((e, y) => /* @__PURE__ */ i.jsx(de, { text: e.text, color: e.color, x: f(e.value), y1: 0 - l.top, y2: M + l.bottom, textSide: "left", classNames: e.classNames, styles: e.styles, animate: n, isInView: O }, y)) }) : null
159
158
  ] })
160
159
  ] });
161
- const zt = a?.yAxis?.axis;
160
+ const zt = s?.yAxis?.axis;
162
161
  let Bt;
163
162
  t[72] !== zt ? (Bt = {
164
163
  axis: zt
165
164
  }, t[72] = zt, t[73] = Bt) : Bt = t[73];
166
165
  const Ft = o?.yAxis?.axis;
167
- let Lt;
168
- t[74] !== Ft ? (Lt = {
166
+ let Mt;
167
+ t[74] !== Ft ? (Mt = {
169
168
  axis: Ft
170
- }, t[74] = Ft, t[75] = Lt) : Lt = t[75], dt = /* @__PURE__ */ i.jsxs("g", { transform: `translate(${(M + b) / 2},0)`, children: [
171
- ot ? /* @__PURE__ */ i.jsx(me, { values: p.filter(He), x: p.filter(Ee).map((e) => h(e)), y1: 0 - G, y2: C + l.bottom, styles: {
169
+ }, t[74] = Ft, t[75] = Mt) : Mt = t[75], dt = /* @__PURE__ */ i.jsxs("g", { transform: `translate(${(B + v) / 2},0)`, children: [
170
+ ot ? /* @__PURE__ */ i.jsx(me, { values: p.filter(Ee), x: p.filter(Pe).map((e) => h(e)), y1: 0 - G, y2: M + l.bottom, styles: {
172
171
  gridLines: o?.xAxis?.gridLines,
173
172
  labels: o?.xAxis?.labels
174
173
  }, classNames: {
175
- gridLines: a?.xAxis?.gridLines,
176
- labels: a?.xAxis?.labels
174
+ gridLines: s?.xAxis?.gridLines,
175
+ labels: s?.xAxis?.labels
177
176
  }, suffix: q, prefix: U, labelType: "secondary", showGridLines: !0, precision: J }) : null,
178
- /* @__PURE__ */ i.jsxs(ae, { children: [
179
- Yt.map((e, y) => /* @__PURE__ */ i.jsxs(Mt.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (w) => {
177
+ /* @__PURE__ */ i.jsxs(se, { children: [
178
+ Yt.map((e, y) => /* @__PURE__ */ i.jsxs(Ct.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (w) => {
180
179
  K(e), Q(w.clientY), m(w.clientX), z?.(e);
181
180
  }, onClick: () => {
182
- (R || j) && (le(A, e) && Et ? (nt(void 0), R?.(void 0)) : (nt(e), R?.(e)));
181
+ (R || L) && (le(C, e) && Et ? (nt(void 0), R?.(void 0)) : (nt(e), R?.(e)));
183
182
  }, onMouseMove: (w) => {
184
183
  K(e), Q(w.clientY), m(w.clientX);
185
184
  }, onMouseLeave: () => {
186
185
  K(void 0), m(void 0), Q(void 0), z?.(void 0);
187
186
  }, children: [
188
- e.rightBar ? /* @__PURE__ */ i.jsx(Mt.rect, { y: g(`${y}`), style: {
187
+ e.rightBar ? /* @__PURE__ */ i.jsx(Ct.rect, { y: g(`${y}`), style: {
189
188
  fill: r[1]
190
189
  }, height: g.bandwidth(), exit: {
191
190
  x: h(0),
@@ -205,11 +204,11 @@ function Ge(s) {
205
204
  duration: n.duration
206
205
  }
207
206
  }
208
- }, initial: "initial", animate: T ? "whileInView" : "initial" }) : null,
209
- Y ? /* @__PURE__ */ i.jsx(Mt.text, { y: g(`${y}`) + g.bandwidth() / 2, style: {
207
+ }, initial: "initial", animate: O ? "whileInView" : "initial" }) : null,
208
+ Y ? /* @__PURE__ */ i.jsx(Ct.text, { y: g(`${y}`) + g.bandwidth() / 2, style: {
210
209
  textAnchor: e.rightBar && e.rightBar < 0 ? "end" : "start",
211
210
  ...o?.graphObjectValues || {}
212
- }, className: se("graph-value text-sm", a?.graphObjectValues), dx: e.rightBar && e.rightBar < 0 ? -5 : 5, dy: "0.33em", exit: {
211
+ }, className: ae("graph-value text-sm", s?.graphObjectValues), dx: e.rightBar && e.rightBar < 0 ? -5 : 5, dy: "0.33em", exit: {
213
212
  opacity: 0,
214
213
  transition: {
215
214
  duration: n.duration
@@ -228,127 +227,123 @@ function Ge(s) {
228
227
  duration: n.duration
229
228
  }
230
229
  }
231
- }, initial: "initial", animate: T ? "whileInView" : "initial", children: ce(e.rightBar, Vt, J, U, q) }) : null
230
+ }, initial: "initial", animate: O ? "whileInView" : "initial", children: ce(e.rightBar, Vt, J, U, q) }) : null
232
231
  ] }, y)),
233
- /* @__PURE__ */ i.jsx(ue, { y1: -2.5, y2: C + l.bottom, x1: h(N < 0 ? 0 : N), x2: h(N < 0 ? 0 : N), classNames: Bt, styles: Lt }),
234
- u ? /* @__PURE__ */ i.jsx(i.Fragment, { children: u.map((e, y) => /* @__PURE__ */ i.jsx(de, { text: e.text, color: e.color, x: h(e.value), y1: 0 - l.top, y2: C + l.bottom, textSide: "right", classNames: e.classNames, styles: e.styles, animate: n, isInView: T }, y)) }) : null
232
+ /* @__PURE__ */ i.jsx(ue, { y1: -2.5, y2: M + l.bottom, x1: h(N < 0 ? 0 : N), x2: h(N < 0 ? 0 : N), classNames: Bt, styles: Mt }),
233
+ u ? /* @__PURE__ */ i.jsx(i.Fragment, { children: u.map((e, y) => /* @__PURE__ */ i.jsx(de, { text: e.text, color: e.color, x: h(e.value), y1: 0 - l.top, y2: M + l.bottom, textSide: "right", classNames: e.classNames, styles: e.styles, animate: n, isInView: O }, y)) }) : null
235
234
  ] })
236
- ] }), O = ae, Z = Mt.g, ct = `translate(${M / 2},0)`, mt = Yt.map((e, y) => /* @__PURE__ */ i.jsx(Ae, { value: `${e.label}`.length < at ? `${e.label}` : `${`${e.label}`.substring(0, at)}...`, y: g(`${e.id}`), x: 0 - b / 2, width: b, height: g.bandwidth(), alignment: "center", style: o?.yAxis?.labels, className: a?.yAxis?.labels, animate: n, isInView: T }, y)), t[8] = n, t[9] = r[0], t[10] = r[1], t[11] = Jt, t[12] = b, t[13] = a?.graphObjectValues, t[14] = a?.xAxis?.gridLines, t[15] = a?.xAxis?.labels, t[16] = a?.yAxis?.axis, t[17] = a?.yAxis?.labels, t[18] = V, t[19] = c, t[20] = j, t[21] = C, t[22] = M, t[23] = v, t[24] = T, t[25] = l.bottom, t[26] = l.left, t[27] = l.top, t[28] = X, t[29] = st, t[30] = $, t[31] = N, t[32] = A, t[33] = Vt, t[34] = k, t[35] = R, t[36] = z, t[37] = J, t[38] = U, t[39] = u, t[40] = Et, t[41] = ot, t[42] = Y, t[43] = o?.graphObjectValues, t[44] = o?.xAxis?.gridLines, t[45] = o?.xAxis?.labels, t[46] = o?.yAxis?.axis, t[47] = o?.yAxis?.labels, t[48] = q, t[49] = G, t[50] = at, t[51] = L, t[52] = Z, t[53] = O, t[54] = _, t[55] = P, t[56] = rt, t[57] = lt, t[58] = ct, t[59] = mt, t[60] = tt, t[61] = D, t[62] = ut, t[63] = dt, t[64] = ft, t[65] = xt;
235
+ ] }), D = se, Z = Ct.g, ct = `translate(${B / 2},0)`, mt = Yt.map((e, y) => /* @__PURE__ */ i.jsx(we, { value: `${e.label}`.length < st ? `${e.label}` : `${`${e.label}`.substring(0, st)}...`, y: g(`${e.id}`), x: 0 - v / 2, width: v, height: g.bandwidth(), alignment: "center", style: o?.yAxis?.labels, className: s?.yAxis?.labels, animate: n, isInView: O }, y)), t[8] = n, t[9] = r[0], t[10] = r[1], t[11] = Jt, t[12] = v, t[13] = s?.graphObjectValues, t[14] = s?.xAxis?.gridLines, t[15] = s?.xAxis?.labels, t[16] = s?.yAxis?.axis, t[17] = s?.yAxis?.labels, t[18] = V, t[19] = c, t[20] = L, t[21] = M, t[22] = B, t[23] = b, t[24] = O, t[25] = l.bottom, t[26] = l.left, t[27] = l.top, t[28] = H, t[29] = at, t[30] = $, t[31] = N, t[32] = C, t[33] = Vt, t[34] = k, t[35] = R, t[36] = z, t[37] = J, t[38] = U, t[39] = u, t[40] = Et, t[41] = ot, t[42] = Y, t[43] = o?.graphObjectValues, t[44] = o?.xAxis?.gridLines, t[45] = o?.xAxis?.labels, t[46] = o?.yAxis?.axis, t[47] = o?.yAxis?.labels, t[48] = q, t[49] = G, t[50] = st, t[51] = A, t[52] = Z, t[53] = D, t[54] = _, t[55] = P, t[56] = rt, t[57] = lt, t[58] = ct, t[59] = mt, t[60] = tt, t[61] = T, t[62] = ut, t[63] = dt, t[64] = ft, t[65] = xt;
237
236
  } else
238
- Z = t[52], O = t[53], _ = t[54], P = t[55], rt = t[56], lt = t[57], ct = t[58], mt = t[59], tt = t[60], D = t[61], ut = t[62], dt = t[63], ft = t[64], xt = t[65];
237
+ Z = t[52], D = t[53], _ = t[54], P = t[55], rt = t[56], lt = t[57], ct = t[58], mt = t[59], tt = t[60], T = t[61], ut = t[62], dt = t[63], ft = t[64], xt = t[65];
239
238
  let S;
240
239
  t[76] !== Z || t[77] !== ct || t[78] !== mt ? (S = /* @__PURE__ */ i.jsx(Z, { transform: ct, children: mt }), t[76] = Z, t[77] = ct, t[78] = mt, t[79] = S) : S = t[79];
241
240
  let ht;
242
- t[80] !== O || t[81] !== S ? (ht = /* @__PURE__ */ i.jsx(O, { children: S }), t[80] = O, t[81] = S, t[82] = ht) : ht = t[82];
243
- const Qt = `translate(0,${C})`, Zt = o?.yAxis?.title;
241
+ t[80] !== D || t[81] !== S ? (ht = /* @__PURE__ */ i.jsx(D, { children: S }), t[80] = D, t[81] = S, t[82] = ht) : ht = t[82];
242
+ const Qt = `translate(0,${M})`, Zt = o?.yAxis?.title;
244
243
  let pt;
245
244
  t[83] !== r[0] || t[84] !== Zt ? (pt = {
246
245
  fill: r[0],
247
246
  textAnchor: "end",
248
247
  ...Zt
249
248
  }, t[83] = r[0], t[84] = Zt, t[85] = pt) : pt = t[85];
250
- const _t = a?.yAxis?.title;
249
+ const _t = s?.yAxis?.title;
251
250
  let I;
252
- t[86] !== _t ? (I = se("text-base", _t), t[86] = _t, t[87] = I) : I = t[87];
253
- const gt = M / 2 - b / 2;
251
+ t[86] !== _t ? (I = ae("text-base", _t), t[86] = _t, t[87] = I) : I = t[87];
252
+ const gt = B / 2 - v / 2;
254
253
  let E;
255
254
  t[88] !== W[0] || t[89] !== pt || t[90] !== I || t[91] !== gt ? (E = /* @__PURE__ */ i.jsx("text", { style: pt, className: I, x: gt, y: 0, dx: -5, dy: 20, children: W[0] }), t[88] = W[0], t[89] = pt, t[90] = I, t[91] = gt, t[92] = E) : E = t[92];
256
- const Ot = o?.yAxis?.title;
257
- let H;
258
- t[93] !== r[1] || t[94] !== Ot ? (H = {
255
+ const Dt = o?.yAxis?.title;
256
+ let X;
257
+ t[93] !== r[1] || t[94] !== Dt ? (X = {
259
258
  fill: r[1],
260
259
  textAnchor: "start",
261
- ...Ot
262
- }, t[93] = r[1], t[94] = Ot, t[95] = H) : H = t[95];
263
- const te = a?.yAxis?.title;
260
+ ...Dt
261
+ }, t[93] = r[1], t[94] = Dt, t[95] = X) : X = t[95];
262
+ const te = s?.yAxis?.title;
264
263
  let yt;
265
- t[96] !== te ? (yt = se("text-base", te), t[96] = te, t[97] = yt) : yt = t[97];
266
- const Xt = M / 2 + b / 2;
267
- let vt;
268
- t[98] !== W[1] || t[99] !== H || t[100] !== yt || t[101] !== Xt ? (vt = /* @__PURE__ */ i.jsx("text", { style: H, className: yt, x: Xt, y: 0, dx: 5, dy: 20, children: W[1] }), t[98] = W[1], t[99] = H, t[100] = yt, t[101] = Xt, t[102] = vt) : vt = t[102];
264
+ t[96] !== te ? (yt = ae("text-base", te), t[96] = te, t[97] = yt) : yt = t[97];
265
+ const Ht = B / 2 + v / 2;
266
+ let bt;
267
+ t[98] !== W[1] || t[99] !== X || t[100] !== yt || t[101] !== Ht ? (bt = /* @__PURE__ */ i.jsx("text", { style: X, className: yt, x: Ht, y: 0, dx: 5, dy: 20, children: W[1] }), t[98] = W[1], t[99] = X, t[100] = yt, t[101] = Ht, t[102] = bt) : bt = t[102];
269
268
  let F;
270
- t[103] !== Qt || t[104] !== E || t[105] !== vt ? (F = /* @__PURE__ */ i.jsxs("g", { transform: Qt, children: [
269
+ t[103] !== Qt || t[104] !== E || t[105] !== bt ? (F = /* @__PURE__ */ i.jsxs("g", { transform: Qt, children: [
271
270
  E,
272
- vt
273
- ] }), t[103] = Qt, t[104] = E, t[105] = vt, t[106] = F) : F = t[106];
274
- let bt;
275
- t[107] !== V ? (bt = V.filter(Pe).map(Re), t[107] = V, t[108] = bt) : bt = t[108];
271
+ bt
272
+ ] }), t[103] = Qt, t[104] = E, t[105] = bt, t[106] = F) : F = t[106];
273
+ let vt;
274
+ t[107] !== V ? (vt = V.filter(Re).map(Ge), t[107] = V, t[108] = vt) : vt = t[108];
276
275
  let x;
277
- t[109] !== ht || t[110] !== F || t[111] !== bt || t[112] !== tt || t[113] !== D || t[114] !== ut || t[115] !== dt ? (x = /* @__PURE__ */ i.jsxs("g", { transform: tt, children: [
278
- D,
276
+ t[109] !== ht || t[110] !== F || t[111] !== vt || t[112] !== tt || t[113] !== T || t[114] !== ut || t[115] !== dt ? (x = /* @__PURE__ */ i.jsxs("g", { transform: tt, children: [
277
+ T,
279
278
  ut,
280
279
  dt,
281
280
  ht,
282
281
  F,
283
- bt
284
- ] }), t[109] = ht, t[110] = F, t[111] = bt, t[112] = tt, t[113] = D, t[114] = ut, t[115] = dt, t[116] = x) : x = t[116];
282
+ vt
283
+ ] }), t[109] = ht, t[110] = F, t[111] = vt, t[112] = tt, t[113] = T, t[114] = ut, t[115] = dt, t[116] = x) : x = t[116];
285
284
  let wt;
286
285
  t[117] !== _ || t[118] !== P || t[119] !== rt || t[120] !== lt || t[121] !== x || t[122] !== ft || t[123] !== xt ? (wt = /* @__PURE__ */ i.jsx(_, { width: ft, height: xt, viewBox: P, direction: rt, ref: lt, children: x }), t[117] = _, t[118] = P, t[119] = rt, t[120] = lt, t[121] = x, t[122] = ft, t[123] = xt, t[124] = wt) : wt = t[124];
287
286
  let et;
288
- t[125] !== a?.tooltip || t[126] !== Ht || t[127] !== d || t[128] !== Nt || t[129] !== o?.tooltip || t[130] !== kt ? (et = Nt && kt && Ht && d ? /* @__PURE__ */ i.jsx(we, { data: Nt, body: kt, xPos: Ht, yPos: d, backgroundStyle: o?.tooltip, className: a?.tooltip }) : null, t[125] = a?.tooltip, t[126] = Ht, t[127] = d, t[128] = Nt, t[129] = o?.tooltip, t[130] = kt, t[131] = et) : et = t[131];
287
+ t[125] !== s?.tooltip || t[126] !== Xt || t[127] !== d || t[128] !== Nt || t[129] !== o?.tooltip || t[130] !== kt ? (et = Nt && kt && Xt && d ? /* @__PURE__ */ i.jsx(ve, { data: Nt, body: kt, xPos: Xt, yPos: d, backgroundStyle: o?.tooltip, className: s?.tooltip }) : null, t[125] = s?.tooltip, t[126] = Xt, t[127] = d, t[128] = Nt, t[129] = o?.tooltip, t[130] = kt, t[131] = et) : et = t[131];
289
288
  let jt;
290
- t[132] !== j || t[133] !== A ? (jt = j && A !== void 0 ? /* @__PURE__ */ i.jsx(be, { open: A !== void 0, onClose: () => {
291
- nt(void 0);
292
- }, children: /* @__PURE__ */ i.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof j == "string" ? {
293
- __html: je(j, A)
294
- } : void 0, children: typeof j == "function" ? j(A) : null }) }) : null, t[132] = j, t[133] = A, t[134] = jt) : jt = t[134];
295
- let Dt;
296
- return t[135] !== wt || t[136] !== et || t[137] !== jt ? (Dt = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
289
+ t[132] !== s?.modal || t[133] !== L || t[134] !== C ? (jt = L && C !== void 0 ? /* @__PURE__ */ i.jsx(je, { body: L, data: C, setData: nt, className: s?.modal }) : null, t[132] = s?.modal, t[133] = L, t[134] = C, t[135] = jt) : jt = t[135];
290
+ let Tt;
291
+ return t[136] !== wt || t[137] !== et || t[138] !== jt ? (Tt = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
297
292
  wt,
298
293
  et,
299
294
  jt
300
- ] }), t[135] = wt, t[136] = et, t[137] = jt, t[138] = Dt) : Dt = t[138], Dt;
295
+ ] }), t[136] = wt, t[137] = et, t[138] = jt, t[139] = Tt) : Tt = t[139], Tt;
301
296
  }
302
- function Re(s) {
303
- return s.layer;
297
+ function Ge(a) {
298
+ return a.layer;
304
299
  }
305
- function Pe(s) {
306
- return s.position === "after";
300
+ function Re(a) {
301
+ return a.position === "after";
307
302
  }
308
- function Ee(s) {
309
- return s !== 0;
303
+ function Pe(a) {
304
+ return a !== 0;
310
305
  }
311
- function He(s) {
312
- return s !== 0;
306
+ function Ee(a) {
307
+ return a !== 0;
313
308
  }
314
- function Xe(s) {
315
- return s !== 0;
309
+ function Xe(a) {
310
+ return a !== 0;
316
311
  }
317
- function Ye(s) {
318
- return s !== 0;
312
+ function He(a) {
313
+ return a !== 0;
319
314
  }
320
- function We(s) {
321
- return s.layer;
315
+ function Ye(a) {
316
+ return a.layer;
322
317
  }
323
- function ze(s) {
324
- return s.position === "before";
318
+ function We(a) {
319
+ return a.position === "before";
325
320
  }
326
- function qe(s) {
327
- return `${s.id}`;
321
+ function ze(a) {
322
+ return `${a.id}`;
328
323
  }
329
- function Ue(s, t) {
324
+ function qe(a, t) {
330
325
  return {
331
- ...s,
326
+ ...a,
332
327
  id: `${t}`
333
328
  };
334
329
  }
335
- function Ut(s, t, c, L) {
336
- const v = s.map((u) => u[t]).filter((u) => !oe(u)), r = oe(c) ? Math.min(...v) >= 0 ? 0 : Math.min(...v) : c, b = oe(L) ? Math.max(...v) < 0 ? 0 : Math.max(...v) : L;
330
+ function Ut(a, t, c, A) {
331
+ const b = a.map((u) => u[t]).filter((u) => !oe(u)), r = oe(c) ? Math.min(...b) >= 0 ? 0 : Math.min(...b) : c, v = oe(A) ? Math.max(...b) < 0 ? 0 : Math.max(...b) : A;
337
332
  return {
338
333
  min: r,
339
- max: b
334
+ max: v
340
335
  };
341
336
  }
342
- function Ni(s) {
337
+ function Vi(a) {
343
338
  const t = he.c(45), {
344
339
  data: c,
345
- graphTitle: L,
346
- sources: v,
340
+ graphTitle: A,
341
+ sources: b,
347
342
  graphDescription: r,
348
- height: b,
343
+ height: v,
349
344
  width: u,
350
- footNote: X,
351
- padding: st,
345
+ footNote: H,
346
+ padding: at,
352
347
  barColors: Y,
353
348
  backgroundColor: W,
354
349
  leftMargin: Gt,
@@ -358,15 +353,15 @@ function Ni(s) {
358
353
  rightBarTitle: kt,
359
354
  leftBarTitle: z,
360
355
  tooltip: Jt,
361
- relativeHeight: at,
356
+ relativeHeight: st,
362
357
  onSeriesMouseOver: R,
363
358
  graphID: ot,
364
359
  barPadding: q,
365
360
  truncateBy: U,
366
361
  onSeriesMouseClick: Et,
367
- centerGap: j,
362
+ centerGap: L,
368
363
  showValues: o,
369
- maxValue: a,
364
+ maxValue: s,
370
365
  minValue: k,
371
366
  refValues: n,
372
367
  suffix: J,
@@ -376,111 +371,111 @@ function Ni(s) {
376
371
  graphDownload: Vt,
377
372
  dataDownload: Kt,
378
373
  language: $t,
379
- colorLegendTitle: T,
374
+ colorLegendTitle: O,
380
375
  minHeight: Nt,
381
376
  theme: K,
382
- ariaLabel: A,
377
+ ariaLabel: C,
383
378
  resetSelectionOnDoubleClick: nt,
384
- detailsOnClick: Ht,
379
+ detailsOnClick: Xt,
385
380
  styles: m,
386
381
  classNames: d,
387
382
  noOfTicks: Q,
388
- animate: Tt,
383
+ animate: Ot,
389
384
  precision: l,
390
- customLayers: M,
391
- timeline: C,
385
+ customLayers: B,
386
+ timeline: M,
392
387
  naLabel: Z
393
- } = s;
394
- let O;
395
- t[0] !== Y ? (O = Y === void 0 ? [xe.light.categoricalColors.colors[0], xe.light.categoricalColors.colors[1]] : Y, t[0] = Y, t[1] = O) : O = t[1];
396
- const _ = O, P = W === void 0 ? !1 : W, rt = Gt === void 0 ? 20 : Gt, lt = Rt === void 0 ? 20 : Rt, ct = G === void 0 ? 25 : G, mt = Pt === void 0 ? 30 : Pt, tt = kt === void 0 ? "Right bar graph" : kt, D = z === void 0 ? "Left bar graph" : z, ut = q === void 0 ? 0.25 : q, dt = U === void 0 ? 999 : U, ft = j === void 0 ? 100 : j, xt = o === void 0 ? !0 : o;
388
+ } = a;
389
+ let D;
390
+ t[0] !== Y ? (D = Y === void 0 ? [xe.light.categoricalColors.colors[0], xe.light.categoricalColors.colors[1]] : Y, t[0] = Y, t[1] = D) : D = t[1];
391
+ const _ = D, P = W === void 0 ? !1 : W, rt = Gt === void 0 ? 20 : Gt, lt = Rt === void 0 ? 20 : Rt, ct = G === void 0 ? 25 : G, mt = Pt === void 0 ? 30 : Pt, tt = kt === void 0 ? "Right bar graph" : kt, T = z === void 0 ? "Left bar graph" : z, ut = q === void 0 ? 0.25 : q, dt = U === void 0 ? 999 : U, ft = L === void 0 ? 100 : L, xt = o === void 0 ? !0 : o;
397
392
  let S;
398
393
  t[2] !== n ? (S = n === void 0 ? [] : n, t[2] = n, t[3] = S) : S = t[3];
399
- const ht = S, Qt = J === void 0 ? "" : J, Zt = V === void 0 ? "" : V, pt = $ === void 0 ? !0 : $, _t = N === void 0 ? !1 : N, I = Vt === void 0 ? !1 : Vt, gt = Kt === void 0 ? !1 : Kt, E = $t === void 0 ? "en" : $t, Ot = Nt === void 0 ? 0 : Nt, H = K === void 0 ? "light" : K, te = nt === void 0 ? !0 : nt, yt = Q === void 0 ? 5 : Q, Xt = Tt === void 0 ? !1 : Tt, vt = l === void 0 ? 2 : l;
394
+ const ht = S, Qt = J === void 0 ? "" : J, Zt = V === void 0 ? "" : V, pt = $ === void 0 ? !0 : $, _t = N === void 0 ? !1 : N, I = Vt === void 0 ? !1 : Vt, gt = Kt === void 0 ? !1 : Kt, E = $t === void 0 ? "en" : $t, Dt = Nt === void 0 ? 0 : Nt, X = K === void 0 ? "light" : K, te = nt === void 0 ? !0 : nt, yt = Q === void 0 ? 5 : Q, Ht = Ot === void 0 ? !1 : Ot, bt = l === void 0 ? 2 : l;
400
395
  let F;
401
- t[4] !== M ? (F = M === void 0 ? [] : M, t[4] = M, t[5] = F) : F = t[5];
402
- const bt = F, x = C === void 0 ? {
396
+ t[4] !== B ? (F = B === void 0 ? [] : B, t[4] = B, t[5] = F) : F = t[5];
397
+ const vt = F, x = M === void 0 ? {
403
398
  enabled: !1,
404
399
  autoplay: !1,
405
400
  showOnlyActiveDate: !0
406
- } : C, wt = Z === void 0 ? "NA" : Z, [et, jt] = Ct(0), [Dt, Yt] = Ct(0), [g, h] = Ct(x.autoplay), p = Ie(Oe(c, "date", !0).map((B) => ye(`${B}`, x.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), ti), [f, Wt] = Ct(x.autoplay ? 0 : p.length - 1), St = ne(null), It = ne(null);
401
+ } : M, wt = Z === void 0 ? "NA" : Z, [et, jt] = Lt(0), [Tt, Yt] = Lt(0), [g, h] = Lt(x.autoplay), p = Se(Oe(c, "date", !0).map((j) => ye(`${j}`, x.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), _e), [f, Wt] = Lt(x.autoplay ? 0 : p.length - 1), St = ne(null), It = ne(null);
407
402
  let At, it;
408
403
  t[6] === Symbol.for("react.memo_cache_sentinel") ? (At = () => {
409
- const B = new ResizeObserver((ee) => {
404
+ const j = new ResizeObserver((ee) => {
410
405
  jt(ee[0].target.clientWidth || 620), Yt(ee[0].target.clientHeight || 480);
411
406
  });
412
- return St.current && B.observe(St.current), () => B.disconnect();
407
+ return St.current && j.observe(St.current), () => j.disconnect();
413
408
  }, it = [], t[6] = At, t[7] = it) : (At = t[6], it = t[7]), re(At, it), re(() => {
414
- const B = setInterval(() => {
409
+ const j = setInterval(() => {
415
410
  Wt((ee) => ee < p.length - 1 ? ee + 1 : 0);
416
411
  }, (x.speed || 2) * 1e3);
417
- return g || clearInterval(B), () => clearInterval(B);
412
+ return g || clearInterval(j), () => clearInterval(j);
418
413
  }, [p, g, x.speed]);
419
- const zt = pe(p, f, x.showOnlyActiveDate, x.dateFormat || "yyyy"), Bt = Se, Ft = d?.graphContainer, Lt = m?.graphContainer;
414
+ const zt = pe(p, f, x.showOnlyActiveDate, x.dateFormat || "yyyy"), Bt = Te, Ft = d?.graphContainer, Mt = m?.graphContainer;
420
415
  let e;
421
- t[8] !== d?.description || t[9] !== d?.title || t[10] !== c || t[11] !== gt || t[12] !== r || t[13] !== I || t[14] !== L || t[15] !== m?.description || t[16] !== m?.title || t[17] !== u ? (e = L || r || I || gt ? /* @__PURE__ */ i.jsx(Ce, { styles: {
416
+ t[8] !== d?.description || t[9] !== d?.title || t[10] !== c || t[11] !== gt || t[12] !== r || t[13] !== I || t[14] !== A || t[15] !== m?.description || t[16] !== m?.title || t[17] !== u ? (e = A || r || I || gt ? /* @__PURE__ */ i.jsx(Ce, { styles: {
422
417
  title: m?.title,
423
418
  description: m?.description
424
419
  }, classNames: {
425
420
  title: d?.title,
426
421
  description: d?.description
427
- }, graphTitle: L, graphDescription: r, width: u, graphDownload: I ? It : void 0, dataDownload: gt ? c.map(_e).filter(Ze).length > 0 ? c.map(Qe).filter(Ke) : c.filter(Je) : null }) : null, t[8] = d?.description, t[9] = d?.title, t[10] = c, t[11] = gt, t[12] = r, t[13] = I, t[14] = L, t[15] = m?.description, t[16] = m?.title, t[17] = u, t[18] = e) : e = t[18];
422
+ }, graphTitle: A, graphDescription: r, width: u, graphDownload: I ? It : void 0, dataDownload: gt ? c.map(Ze).filter(Qe).length > 0 ? c.map(Ke).filter(Je) : c.filter(Ue) : null }) : null, t[8] = d?.description, t[9] = d?.title, t[10] = c, t[11] = gt, t[12] = r, t[13] = I, t[14] = A, t[15] = m?.description, t[16] = m?.title, t[17] = u, t[18] = e) : e = t[18];
428
423
  const y = x.enabled && p.length > 0 && zt ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
429
424
  /* @__PURE__ */ i.jsx("button", { type: "button", onClick: () => {
430
425
  h(!g);
431
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": g ? "Click to pause animation" : "Click to play animation", children: g ? /* @__PURE__ */ i.jsx($e, {}) : /* @__PURE__ */ i.jsx(Ne, {}) }),
432
- /* @__PURE__ */ i.jsx(ge, { min: p[0], max: p[p.length - 1], marks: zt, step: null, defaultValue: p[p.length - 1], value: p[f], onChangeComplete: (B) => {
433
- Wt(p.indexOf(B));
434
- }, onChange: (B) => {
435
- Wt(p.indexOf(B));
426
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": g ? "Click to pause animation" : "Click to play animation", children: g ? /* @__PURE__ */ i.jsx(Ve, {}) : /* @__PURE__ */ i.jsx($e, {}) }),
427
+ /* @__PURE__ */ i.jsx(ge, { min: p[0], max: p[p.length - 1], marks: zt, step: null, defaultValue: p[p.length - 1], value: p[f], onChangeComplete: (j) => {
428
+ Wt(p.indexOf(j));
429
+ }, onChange: (j) => {
430
+ Wt(p.indexOf(j));
436
431
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
437
- ] }) : null, w = c.length === 0 ? /* @__PURE__ */ i.jsx(Ve, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
438
- _t ? /* @__PURE__ */ i.jsx(ke, { colorLegendTitle: T, colorDomain: [D, tt], colors: _, showNAColor: !1, className: d?.colorLegend }) : null,
439
- /* @__PURE__ */ i.jsx(De, { ref: St, children: et && Dt ? /* @__PURE__ */ i.jsx(Ge, { data: Te(c, x.dateFormat || "yyyy").filter((B) => x.enabled ? B.date === ve(new Date(p[f]), x.dateFormat || "yyyy") : B), barColors: _, width: et, centerGap: ft, height: Dt, truncateBy: dt, leftMargin: rt, rightMargin: lt, topMargin: ct, bottomMargin: mt, axisTitles: [D, tt], tooltip: Jt, onSeriesMouseOver: R, barPadding: ut, refValues: ht, maxValue: Math.max(Ut(c, "leftBar", k, a).max, Ut(c, "rightBar", k, a).max), minValue: Math.min(Ut(c, "leftBar", k, a).min, Ut(c, "rightBar", k, a).min), minValueLeftBar: Ut(c, "leftBar", k, a).min, minValueRightBar: Ut(c, "rightBar", k, a).min, showValues: xt, onSeriesMouseClick: Et, showTicks: pt, suffix: Qt, prefix: Zt, resetSelectionOnDoubleClick: te, detailsOnClick: Ht, styles: m, classNames: d, noOfTicks: yt, animate: Xt === !0 ? {
432
+ ] }) : null, w = c.length === 0 ? /* @__PURE__ */ i.jsx(ke, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
433
+ _t ? /* @__PURE__ */ i.jsx(Le, { colorLegendTitle: O, colorDomain: [T, tt], colors: _, showNAColor: !1, className: d?.colorLegend }) : null,
434
+ /* @__PURE__ */ i.jsx(De, { ref: St, children: et && Tt ? /* @__PURE__ */ i.jsx(Fe, { data: Ne(c, x.dateFormat || "yyyy").filter((j) => x.enabled ? j.date === be(new Date(p[f]), x.dateFormat || "yyyy") : j), barColors: _, width: et, centerGap: ft, height: Tt, truncateBy: dt, leftMargin: rt, rightMargin: lt, topMargin: ct, bottomMargin: mt, axisTitles: [T, tt], tooltip: Jt, onSeriesMouseOver: R, barPadding: ut, refValues: ht, maxValue: Math.max(Ut(c, "leftBar", k, s).max, Ut(c, "rightBar", k, s).max), minValue: Math.min(Ut(c, "leftBar", k, s).min, Ut(c, "rightBar", k, s).min), minValueLeftBar: Ut(c, "leftBar", k, s).min, minValueRightBar: Ut(c, "rightBar", k, s).min, showValues: xt, onSeriesMouseClick: Et, showTicks: pt, suffix: Qt, prefix: Zt, resetSelectionOnDoubleClick: te, detailsOnClick: Xt, styles: m, classNames: d, noOfTicks: yt, animate: Ht === !0 ? {
440
435
  duration: 0.5,
441
436
  once: !0,
442
437
  amount: 0.5
443
- } : Xt || {
438
+ } : Ht || {
444
439
  duration: 0,
445
440
  once: !0,
446
441
  amount: 0
447
- }, precision: vt, customLayers: bt, naLabel: wt }) : null })
442
+ }, precision: bt, customLayers: vt, naLabel: wt }) : null })
448
443
  ] });
449
444
  let qt;
450
- t[19] !== d?.footnote || t[20] !== d?.source || t[21] !== X || t[22] !== v || t[23] !== m?.footnote || t[24] !== m?.source || t[25] !== u ? (qt = v || X ? /* @__PURE__ */ i.jsx(Me, { styles: {
445
+ t[19] !== d?.footnote || t[20] !== d?.source || t[21] !== H || t[22] !== b || t[23] !== m?.footnote || t[24] !== m?.source || t[25] !== u ? (qt = b || H ? /* @__PURE__ */ i.jsx(Me, { styles: {
451
446
  footnote: m?.footnote,
452
447
  source: m?.source
453
448
  }, classNames: {
454
449
  footnote: d?.footnote,
455
450
  source: d?.source
456
- }, sources: v, footNote: X, width: u }) : null, t[19] = d?.footnote, t[20] = d?.source, t[21] = X, t[22] = v, t[23] = m?.footnote, t[24] = m?.source, t[25] = u, t[26] = qt) : qt = t[26];
451
+ }, sources: b, footNote: H, width: u }) : null, t[19] = d?.footnote, t[20] = d?.source, t[21] = H, t[22] = b, t[23] = m?.footnote, t[24] = m?.source, t[25] = u, t[26] = qt) : qt = t[26];
457
452
  let ie;
458
- return t[27] !== Bt || t[28] !== A || t[29] !== P || t[30] !== ot || t[31] !== b || t[32] !== E || t[33] !== Ot || t[34] !== st || t[35] !== at || t[36] !== Ft || t[37] !== Lt || t[38] !== e || t[39] !== y || t[40] !== w || t[41] !== qt || t[42] !== H || t[43] !== u ? (ie = /* @__PURE__ */ i.jsxs(Bt, { className: Ft, style: Lt, id: ot, ref: It, "aria-label": A, backgroundColor: P, theme: H, language: E, minHeight: Ot, width: u, height: b, relativeHeight: at, padding: st, children: [
453
+ return t[27] !== Bt || t[28] !== C || t[29] !== P || t[30] !== ot || t[31] !== v || t[32] !== E || t[33] !== Dt || t[34] !== at || t[35] !== st || t[36] !== Ft || t[37] !== Mt || t[38] !== e || t[39] !== y || t[40] !== w || t[41] !== qt || t[42] !== X || t[43] !== u ? (ie = /* @__PURE__ */ i.jsxs(Bt, { className: Ft, style: Mt, id: ot, ref: It, "aria-label": C, backgroundColor: P, theme: X, language: E, minHeight: Dt, width: u, height: v, relativeHeight: st, padding: at, children: [
459
454
  e,
460
455
  y,
461
456
  w,
462
457
  qt
463
- ] }), t[27] = Bt, t[28] = A, t[29] = P, t[30] = ot, t[31] = b, t[32] = E, t[33] = Ot, t[34] = st, t[35] = at, t[36] = Ft, t[37] = Lt, t[38] = e, t[39] = y, t[40] = w, t[41] = qt, t[42] = H, t[43] = u, t[44] = ie) : ie = t[44], ie;
458
+ ] }), t[27] = Bt, t[28] = C, t[29] = P, t[30] = ot, t[31] = v, t[32] = E, t[33] = Dt, t[34] = at, t[35] = st, t[36] = Ft, t[37] = Mt, t[38] = e, t[39] = y, t[40] = w, t[41] = qt, t[42] = X, t[43] = u, t[44] = ie) : ie = t[44], ie;
464
459
  }
465
- function Je(s) {
466
- return s !== void 0;
460
+ function Ue(a) {
461
+ return a !== void 0;
467
462
  }
468
- function Ke(s) {
469
- return s !== void 0;
463
+ function Je(a) {
464
+ return a !== void 0;
470
465
  }
471
- function Qe(s) {
472
- return s.data;
466
+ function Ke(a) {
467
+ return a.data;
473
468
  }
474
- function Ze(s) {
475
- return s !== void 0;
469
+ function Qe(a) {
470
+ return a !== void 0;
476
471
  }
477
- function _e(s) {
478
- return s.data;
472
+ function Ze(a) {
473
+ return a.data;
479
474
  }
480
- function ti(s, t) {
481
- return Fe(s, t);
475
+ function _e(a, t) {
476
+ return Ie(a, t);
482
477
  }
483
478
  export {
484
- Ni as ButterflyChart
479
+ Vi as ButterflyChart
485
480
  };
486
481
  //# sourceMappingURL=ButterflyChart.js.map