@undp/data-viz 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +3 -2
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.js +1196 -1224
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +130 -142
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +41 -41
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +483 -487
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +99 -99
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +125 -125
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +2 -2
  31. package/dist/DataCards.cjs +2 -2
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +6 -6
  34. package/dist/DataCards.js.map +1 -1
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.cjs.map +1 -1
  37. package/dist/DataTable.js +66 -68
  38. package/dist/DataTable.js.map +1 -1
  39. package/dist/DifferenceLineChart.cjs +1 -1
  40. package/dist/DifferenceLineChart.cjs.map +1 -1
  41. package/dist/DifferenceLineChart.js +3 -2
  42. package/dist/DifferenceLineChart.js.map +1 -1
  43. package/dist/DonutChart.cjs +1 -1
  44. package/dist/DonutChart.cjs.map +1 -1
  45. package/dist/DonutChart.js +205 -205
  46. package/dist/DonutChart.js.map +1 -1
  47. package/dist/DotDensityMap.cjs +1 -1
  48. package/dist/DotDensityMap.cjs.map +1 -1
  49. package/dist/DotDensityMap.js +78 -81
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/DualAxisLineChart.cjs +1 -1
  52. package/dist/DualAxisLineChart.cjs.map +1 -1
  53. package/dist/DualAxisLineChart.js +3 -2
  54. package/dist/DualAxisLineChart.js.map +1 -1
  55. package/dist/DumbbellChart.cjs +1 -1
  56. package/dist/DumbbellChart.cjs.map +1 -1
  57. package/dist/DumbbellChart.js +64 -65
  58. package/dist/DumbbellChart.js.map +1 -1
  59. package/dist/GeoHubMap.cjs +1 -1
  60. package/dist/GeoHubMap.js +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  62. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  63. package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
  64. package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
  65. package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
  66. package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
  67. package/dist/GriddedGraphs.cjs +1 -1
  68. package/dist/GriddedGraphs.js +4 -4
  69. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  70. package/dist/GriddedGraphsFromConfig.js +1 -1
  71. package/dist/HeatMap.cjs +1 -1
  72. package/dist/HeatMap.cjs.map +1 -1
  73. package/dist/HeatMap.js +83 -83
  74. package/dist/HeatMap.js.map +1 -1
  75. package/dist/Histogram.cjs +1 -1
  76. package/dist/Histogram.js +1 -1
  77. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  78. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  79. package/dist/LineChartWithConfidenceInterval.js +7 -6
  80. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  81. package/dist/MultiGraphDashboard.cjs +1 -1
  82. package/dist/MultiGraphDashboard.js +2 -2
  83. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  84. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  85. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  86. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  87. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  88. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  89. package/dist/MultiLineAltChart.cjs +1 -1
  90. package/dist/MultiLineAltChart.cjs.map +1 -1
  91. package/dist/MultiLineAltChart.js +82 -91
  92. package/dist/MultiLineAltChart.js.map +1 -1
  93. package/dist/MultiLineChart.cjs +1 -1
  94. package/dist/MultiLineChart.cjs.map +1 -1
  95. package/dist/MultiLineChart.js +3 -2
  96. package/dist/MultiLineChart.js.map +1 -1
  97. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  98. package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
  99. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  100. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  101. package/dist/RadarChart.cjs +1 -1
  102. package/dist/RadarChart.cjs.map +1 -1
  103. package/dist/RadarChart.js +124 -130
  104. package/dist/RadarChart.js.map +1 -1
  105. package/dist/SankeyChart.cjs +1 -1
  106. package/dist/SankeyChart.cjs.map +1 -1
  107. package/dist/SankeyChart.js +200 -200
  108. package/dist/SankeyChart.js.map +1 -1
  109. package/dist/ScatterPlot.cjs +1 -1
  110. package/dist/ScatterPlot.cjs.map +1 -1
  111. package/dist/ScatterPlot.js +149 -155
  112. package/dist/ScatterPlot.js.map +1 -1
  113. package/dist/SimpleLineChart.cjs +1 -1
  114. package/dist/SimpleLineChart.cjs.map +1 -1
  115. package/dist/SimpleLineChart.js +44 -43
  116. package/dist/SimpleLineChart.js.map +1 -1
  117. package/dist/SingleGraphDashboard.cjs +1 -1
  118. package/dist/SingleGraphDashboard.js +4 -4
  119. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  120. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  121. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  122. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  123. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  124. package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
  125. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  126. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  127. package/dist/SlopeChart.cjs +1 -1
  128. package/dist/SlopeChart.cjs.map +1 -1
  129. package/dist/SlopeChart.js +107 -113
  130. package/dist/SlopeChart.js.map +1 -1
  131. package/dist/SparkLine.cjs +1 -1
  132. package/dist/SparkLine.cjs.map +1 -1
  133. package/dist/SparkLine.js +3 -2
  134. package/dist/SparkLine.js.map +1 -1
  135. package/dist/StripChart.cjs +1 -1
  136. package/dist/StripChart.cjs.map +1 -1
  137. package/dist/StripChart.js +159 -159
  138. package/dist/StripChart.js.map +1 -1
  139. package/dist/ThreeDGlobe.cjs +1 -1
  140. package/dist/ThreeDGlobe.cjs.map +1 -1
  141. package/dist/ThreeDGlobe.js +3 -3
  142. package/dist/ThreeDGlobe.js.map +1 -1
  143. package/dist/TreeMapGraph.cjs +1 -1
  144. package/dist/TreeMapGraph.cjs.map +1 -1
  145. package/dist/TreeMapGraph.js +194 -200
  146. package/dist/TreeMapGraph.js.map +1 -1
  147. package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
  148. package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
  149. package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
  150. package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
  151. package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
  152. package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
  153. package/dist/fetchAndParseData-sapWbnYk.js +583 -0
  154. package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
  155. package/dist/fetchAndParseData.cjs +1 -1
  156. package/dist/fetchAndParseData.js +1 -1
  157. package/dist/getJenks-BbngDoBQ.js +19 -0
  158. package/dist/getJenks-BbngDoBQ.js.map +1 -0
  159. package/dist/getJenks-GYmdwBqm.cjs +2 -0
  160. package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
  161. package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
  162. package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
  163. package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
  164. package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
  165. package/dist/getUniqValue-DiCh_MOD.js +13 -0
  166. package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
  167. package/dist/getUniqValue-RViz8tTw.cjs +2 -0
  168. package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
  169. package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
  170. package/dist/index-37q0ULNQ.js.map +1 -0
  171. package/dist/index-CVlCtJbC.cjs +2 -0
  172. package/dist/index-CVlCtJbC.cjs.map +1 -0
  173. package/dist/index.cjs +1 -1
  174. package/dist/index.d.ts +1 -1
  175. package/dist/index.js +6 -6
  176. package/dist/sort-DfK1b0F5.js +34 -0
  177. package/dist/sort-DfK1b0F5.js.map +1 -0
  178. package/dist/sort-O96oMZLb.cjs +2 -0
  179. package/dist/sort-O96oMZLb.cjs.map +1 -0
  180. package/dist/transformData.cjs +1 -1
  181. package/dist/transformData.js +3 -3
  182. package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
  183. package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
  184. package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
  185. package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
  186. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
  187. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
  188. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
  189. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
  190. package/dist/uniqBy-BHy4I8PK.js +8 -0
  191. package/dist/uniqBy-BHy4I8PK.js.map +1 -0
  192. package/dist/uniqBy-O05lp2S5.cjs +2 -0
  193. package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
  194. package/dist/utils.cjs +1 -1
  195. package/dist/utils.d.ts +1 -1
  196. package/dist/utils.js +2 -2
  197. package/package.json +1 -7
  198. package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
  199. package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
  200. package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
  201. package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
  202. package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
  203. package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
  204. package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
  205. package/dist/getJenks-DW96UYNE.js +0 -23
  206. package/dist/getJenks-DW96UYNE.js.map +0 -1
  207. package/dist/getJenks-vofIZmeb.cjs +0 -2
  208. package/dist/getJenks-vofIZmeb.cjs.map +0 -1
  209. package/dist/getSliderMarks-C0jptXeP.js +0 -1054
  210. package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
  211. package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
  212. package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
  213. package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
  214. package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
  215. package/dist/getUniqValue-CttuU_wn.js +0 -20
  216. package/dist/getUniqValue-CttuU_wn.js.map +0 -1
  217. package/dist/index-AqnpA7_O.js +0 -631
  218. package/dist/index-AqnpA7_O.js.map +0 -1
  219. package/dist/index-BJOeaYTk.cjs +0 -2
  220. package/dist/index-BJOeaYTk.cjs.map +0 -1
  221. package/dist/index-BMgDMxKJ.js.map +0 -1
  222. package/dist/index-DYH8g9WA.cjs +0 -2
  223. package/dist/index-DYH8g9WA.cjs.map +0 -1
  224. package/dist/index-Da2GUKrr.cjs +0 -2
  225. package/dist/index-Da2GUKrr.cjs.map +0 -1
  226. package/dist/index-fwdktvAS.js +0 -707
  227. package/dist/index-fwdktvAS.js.map +0 -1
  228. package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
package/dist/BarGraph.js CHANGED
@@ -1,185 +1,185 @@
1
- import { j as e, m as $e } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { u as Ae } from "./index-AqnpA7_O.js";
1
+ import { j as e, m as De } from "./index-CHPV5EwG-BPSP-7Jg.js";
3
2
  import { useRef as Me, useState as L, useEffect as Ve } from "react";
4
- import { s as rt } from "./index-fwdktvAS.js";
5
- import { p as Be, f as De } from "./parse-DlCRUFh_.js";
6
- import { s as Fe, g as Pe, x as He } from "./getSliderMarks-C0jptXeP.js";
7
- import { i as We } from "./index-Bwrro8-q.js";
8
- import { X as Ge } from "./Modal-DVVwpKhP.js";
3
+ import { p as Se, f as $e } from "./parse-DlCRUFh_.js";
4
+ import { g as Be, x as Fe } from "./getSliderMarks-9cNoRkDx.js";
5
+ import { o as Ie } from "./index-DvVprvy6.js";
6
+ import { i as Pe } from "./index-Bwrro8-q.js";
7
+ import { X as He } from "./Modal-DVVwpKhP.js";
9
8
  import { n as ze } from "./numberFormattingFunction-14YCbkN2.js";
10
- import { T as Xe } from "./Tooltip-CVCGWyzw.js";
11
- import { c as W } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
+ import { T as We } from "./Tooltip-CVCGWyzw.js";
10
+ import { c as X } from "./checkIfNullOrUndefined-DmfiKkNw.js";
12
11
  import { Colors as je } from "./Colors.js";
13
- import { s as Ye } from "./string2HTML-oFCROsus.js";
12
+ import { s as Ge } from "./string2HTML-oFCROsus.js";
14
13
  import { X as st } from "./XTicksAndGridLines-Bn9u5gOM.js";
15
- import { Y as ot } from "./YAxesLabels-CPGZjmZJ.js";
16
- import { A as _e } from "./AxisTitle-BmHLMRJZ.js";
17
- import { A as Ee } from "./Axis-Ddg-seDi.js";
18
- import { a as nt, R as ct } from "./ReferenceLine-CfAW3vKJ.js";
19
- import { u as Re } from "./use-in-view-yS6jzJAp.js";
20
- import { a as qe } from "./linear-DUdu7l2G.js";
21
- import { b as Ie } from "./band-BEjh2CHI.js";
22
- import { A as Ue } from "./index-CNvov0eg.js";
23
- import { m as ye } from "./proxy-CkpFesk1.js";
24
- import { GraphFooter as Je } from "./GraphFooter.js";
25
- import { GraphHeader as Ke } from "./GraphHeader.js";
26
- import { ColorLegendWithMouseOver as Qe } from "./ColorLegendWithMouseOver.js";
27
- import { E as Ze } from "./EmptyState-DdTp-Mdn.js";
28
- import { P as et, f as tt } from "./index-BmCqpO1B.js";
29
- import { c as Se, d as Te } from "./ensureCompleteData-BALdOrsS.js";
30
- import { c as it } from "./init-BhZylTFx.js";
31
- import { o as Le } from "./index-DvVprvy6.js";
14
+ import { Y as rt } from "./YAxesLabels-CPGZjmZJ.js";
15
+ import { A as Xe } from "./AxisTitle-BmHLMRJZ.js";
16
+ import { A as Ye } from "./Axis-Ddg-seDi.js";
17
+ import { a as ot, R as nt } from "./ReferenceLine-CfAW3vKJ.js";
18
+ import { u as _e } from "./use-in-view-yS6jzJAp.js";
19
+ import { a as Ee } from "./linear-DUdu7l2G.js";
20
+ import { b as Le } from "./band-BEjh2CHI.js";
21
+ import { A as Re } from "./index-CNvov0eg.js";
22
+ import { m as pe } from "./proxy-CkpFesk1.js";
23
+ import { GraphFooter as qe } from "./GraphFooter.js";
24
+ import { GraphHeader as Ue } from "./GraphHeader.js";
25
+ import { ColorLegendWithMouseOver as Je } from "./ColorLegendWithMouseOver.js";
26
+ import { E as Ke } from "./EmptyState-DdTp-Mdn.js";
27
+ import { P as Qe, f as Ze } from "./index-BmCqpO1B.js";
28
+ import { c as lt, d as Te } from "./ensureCompleteData-DlmibgaI.js";
29
+ import { u as Ae } from "./uniqBy-BHy4I8PK.js";
30
+ import { s as et } from "./sort-DfK1b0F5.js";
31
+ import { c as tt } from "./init-BhZylTFx.js";
32
32
  import { s as ke } from "./index-CeVNqhMO.js";
33
- import { g as lt } from "./getTextColorBasedOnBgColor-B6Nk2WBf.js";
34
- import { X as dt } from "./XAxesLabels-CaV2q-6H.js";
35
- import { Y as ht } from "./YTicksAndGridLines-B6ah7CRf.js";
36
- function ut(pe) {
33
+ import { g as at } from "./getTextColorBasedOnBgColor-B6Nk2WBf.js";
34
+ import { X as ct } from "./XAxesLabels-CaV2q-6H.js";
35
+ import { Y as dt } from "./YTicksAndGridLines-B6ah7CRf.js";
36
+ function ht(ye) {
37
37
  const {
38
38
  data: n,
39
39
  barColor: g,
40
40
  suffix: Y,
41
- prefix: A,
41
+ prefix: V,
42
42
  barPadding: _,
43
43
  showValues: me,
44
44
  showTicks: ue,
45
45
  leftMargin: ge,
46
46
  truncateBy: Z,
47
- width: X,
47
+ width: G,
48
48
  height: ie,
49
- colorDomain: O,
50
- rightMargin: se,
51
- topMargin: he,
49
+ colorDomain: N,
50
+ rightMargin: re,
51
+ topMargin: de,
52
52
  bottomMargin: j,
53
53
  showLabels: E,
54
54
  tooltip: J,
55
55
  onSeriesMouseOver: ee,
56
56
  refValues: v,
57
- selectedColor: y,
58
- highlightedDataPoints: F,
57
+ selectedColor: p,
58
+ highlightedDataPoints: B,
59
59
  maxValue: ae,
60
60
  minValue: le,
61
61
  onSeriesMouseClick: K,
62
62
  labelOrder: te,
63
- rtl: re,
63
+ rtl: se,
64
64
  maxBarThickness: R,
65
65
  minBarThickness: xe,
66
66
  resetSelectionOnDoubleClick: ne,
67
67
  detailsOnClick: $,
68
- barAxisTitle: p,
68
+ barAxisTitle: y,
69
69
  valueColor: x,
70
70
  noOfTicks: C,
71
71
  styles: z,
72
- classNames: N,
73
- animate: D,
74
- dimmedOpacity: I,
75
- precision: S,
72
+ classNames: D,
73
+ animate: O,
74
+ dimmedOpacity: A,
75
+ precision: I,
76
76
  customLayers: b,
77
77
  naLabel: w
78
- } = pe, q = Me(null), T = Re(q, {
79
- once: D.once,
80
- amount: D.amount
81
- }), [V, oe] = L(void 0), [G, P] = L(void 0), [Q, M] = L(void 0), [H, u] = L(void 0), k = {
82
- top: p ? he + 25 : he,
78
+ } = ye, q = Me(null), T = _e(q, {
79
+ once: O.once,
80
+ amount: O.amount
81
+ }), [F, oe] = L(void 0), [W, P] = L(void 0), [Q, M] = L(void 0), [H, u] = L(void 0), k = {
82
+ top: y ? de + 25 : de,
83
83
  bottom: j,
84
84
  left: ge,
85
- right: se
86
- }, m = X - k.left - k.right, d = ie - k.top - k.bottom, h = n.map((r, f) => ({
87
- ...r,
88
- id: te ? `${r.label}` : `${f}`
89
- })), c = qe().domain([le, ae]).range([0, m]).nice(), l = te || h.map((r) => `${r.id}`), s = Ie().domain(l).range([
85
+ right: re
86
+ }, m = G - k.left - k.right, d = ie - k.top - k.bottom, h = n.map((l, f) => ({
87
+ ...l,
88
+ id: te ? `${l.label}` : `${f}`
89
+ })), c = Ee().domain([le, ae]).range([0, m]).nice(), a = te || h.map((l) => `${l.id}`), s = Le().domain(a).range([
90
90
  0,
91
- xe ? Math.max(d, xe * l.length) : R ? Math.min(d, R * l.length) : d
91
+ xe ? Math.max(d, xe * a.length) : R ? Math.min(d, R * a.length) : d
92
92
  ]).paddingInner(_), t = c.ticks(C);
93
93
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
94
94
  /* @__PURE__ */ e.jsx(
95
- ye.svg,
95
+ pe.svg,
96
96
  {
97
97
  ref: q,
98
- width: `${X}px`,
98
+ width: `${G}px`,
99
99
  height: `${ie}px`,
100
- viewBox: `0 0 ${X} ${ie}`,
100
+ viewBox: `0 0 ${G} ${ie}`,
101
101
  direction: "ltr",
102
102
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${k.left},${k.top})`, children: [
103
103
  ue ? /* @__PURE__ */ e.jsx(
104
104
  st,
105
105
  {
106
- values: t.filter((r) => r !== 0),
107
- x: t.filter((r) => r !== 0).map((r) => c(r)),
108
- y1: 0 - he,
106
+ values: t.filter((l) => l !== 0),
107
+ x: t.filter((l) => l !== 0).map((l) => c(l)),
108
+ y1: 0 - de,
109
109
  y2: d + k.bottom,
110
110
  styles: {
111
111
  gridLines: z?.xAxis?.gridLines,
112
112
  labels: z?.xAxis?.labels
113
113
  },
114
114
  classNames: {
115
- gridLines: N?.xAxis?.gridLines,
116
- labels: N?.xAxis?.labels
115
+ gridLines: D?.xAxis?.gridLines,
116
+ labels: D?.xAxis?.labels
117
117
  },
118
118
  suffix: Y,
119
- prefix: A,
119
+ prefix: V,
120
120
  labelType: "secondary",
121
121
  showGridLines: !0,
122
- precision: S
122
+ precision: I
123
123
  }
124
124
  ) : null,
125
125
  /* @__PURE__ */ e.jsx(
126
- _e,
126
+ Xe,
127
127
  {
128
128
  x: m / 2,
129
129
  y: 0 - k.top + 15,
130
130
  style: z?.xAxis?.title,
131
- className: N?.xAxis?.title,
132
- text: p
131
+ className: D?.xAxis?.title,
132
+ text: y
133
133
  }
134
134
  ),
135
- b.filter((r) => r.position === "before").map((r) => r.layer),
136
- /* @__PURE__ */ e.jsxs(Ue, { children: [
135
+ b.filter((l) => l.position === "before").map((l) => l.layer),
136
+ /* @__PURE__ */ e.jsxs(Re, { children: [
137
137
  h.map(
138
- (r) => W(s(r.id)) ? null : /* @__PURE__ */ e.jsxs(
139
- ye.g,
138
+ (l) => X(s(l.id)) ? null : /* @__PURE__ */ e.jsxs(
139
+ pe.g,
140
140
  {
141
141
  className: "undp-viz-g-with-hover",
142
142
  variants: {
143
143
  initial: {
144
- opacity: y ? r.color && g[O.indexOf(r.color)] === y ? 1 : I : F.length !== 0 ? F.indexOf(r.label) !== -1 ? 0.85 : I : 0.85
144
+ opacity: p ? l.color && g[N.indexOf(l.color)] === p ? 1 : A : B.length !== 0 ? B.indexOf(l.label) !== -1 ? 0.85 : A : 0.85
145
145
  },
146
146
  whileInView: {
147
- opacity: y ? r.color && g[O.indexOf(r.color)] === y ? 1 : I : F.length !== 0 ? F.indexOf(r.label) !== -1 ? 0.85 : I : 0.85,
148
- transition: { duration: D.duration }
147
+ opacity: p ? l.color && g[N.indexOf(l.color)] === p ? 1 : A : B.length !== 0 ? B.indexOf(l.label) !== -1 ? 0.85 : A : 0.85,
148
+ transition: { duration: O.duration }
149
149
  }
150
150
  },
151
151
  initial: "initial",
152
152
  animate: T ? "whileInView" : "initial",
153
- exit: { opacity: 0, transition: { duration: D.duration } },
153
+ exit: { opacity: 0, transition: { duration: O.duration } },
154
154
  onMouseEnter: (f) => {
155
- oe(r), u(f.clientY), M(f.clientX), ee?.(r);
155
+ oe(l), u(f.clientY), M(f.clientX), ee?.(l);
156
156
  },
157
157
  onClick: () => {
158
- (K || $) && (We(G, r) && ne ? (P(void 0), K?.(void 0)) : (P(r), K?.(r)));
158
+ (K || $) && (Pe(W, l) && ne ? (P(void 0), K?.(void 0)) : (P(l), K?.(l)));
159
159
  },
160
160
  onMouseMove: (f) => {
161
- oe(r), u(f.clientY), M(f.clientX);
161
+ oe(l), u(f.clientY), M(f.clientX);
162
162
  },
163
163
  onMouseLeave: () => {
164
164
  oe(void 0), M(void 0), u(void 0), ee?.(void 0);
165
165
  },
166
166
  children: [
167
- r.size ? /* @__PURE__ */ e.jsx(
168
- ye.rect,
167
+ l.size ? /* @__PURE__ */ e.jsx(
168
+ pe.rect,
169
169
  {
170
170
  variants: {
171
171
  initial: {
172
172
  width: 0,
173
173
  x: c(0),
174
- y: s(`${r.id}`),
175
- fill: n.filter((f) => f.color).length === 0 ? g[0] : r.color ? g[O.indexOf(r.color)] : je.gray
174
+ y: s(`${l.id}`),
175
+ fill: n.filter((f) => f.color).length === 0 ? g[0] : l.color ? g[N.indexOf(l.color)] : je.gray
176
176
  },
177
177
  whileInView: {
178
- width: r.size >= 0 ? c(r.size) - c(0) : c(0) - c(r.size),
179
- x: r.size >= 0 ? c(0) : c(r.size),
180
- y: s(`${r.id}`),
181
- fill: n.filter((f) => f.color).length === 0 ? g[0] : r.color ? g[O.indexOf(r.color)] : je.gray,
182
- transition: { duration: D.duration }
178
+ width: l.size >= 0 ? c(l.size) - c(0) : c(0) - c(l.size),
179
+ x: l.size >= 0 ? c(0) : c(l.size),
180
+ y: s(`${l.id}`),
181
+ fill: n.filter((f) => f.color).length === 0 ? g[0] : l.color ? g[N.indexOf(l.color)] : je.gray,
182
+ transition: { duration: O.duration }
183
183
  }
184
184
  },
185
185
  initial: "initial",
@@ -187,116 +187,116 @@ function ut(pe) {
187
187
  exit: {
188
188
  width: 0,
189
189
  x: c(0),
190
- transition: { duration: D.duration }
190
+ transition: { duration: O.duration }
191
191
  },
192
192
  height: s.bandwidth()
193
193
  }
194
194
  ) : null,
195
195
  E ? /* @__PURE__ */ e.jsx(
196
- ot,
196
+ rt,
197
197
  {
198
- value: `${r.label}`.length < Z ? `${r.label}` : `${`${r.label}`.substring(0, Z)}...`,
199
- y: s(r.id) || 0,
200
- x: (r.size || 0) < 0 ? c(0) : 0 - k.left,
201
- width: (r.size || 0) < 0 ? X - c(0) : c(0) + k.left,
198
+ value: `${l.label}`.length < Z ? `${l.label}` : `${`${l.label}`.substring(0, Z)}...`,
199
+ y: s(l.id) || 0,
200
+ x: (l.size || 0) < 0 ? c(0) : 0 - k.left,
201
+ width: (l.size || 0) < 0 ? G - c(0) : c(0) + k.left,
202
202
  height: s.bandwidth(),
203
- alignment: r.size && r.size < 0 ? "left" : "right",
203
+ alignment: l.size && l.size < 0 ? "left" : "right",
204
204
  style: z?.yAxis?.labels,
205
- className: N?.yAxis?.labels,
206
- animate: D,
205
+ className: D?.yAxis?.labels,
206
+ animate: O,
207
207
  isInView: T
208
208
  }
209
209
  ) : null,
210
210
  me ? /* @__PURE__ */ e.jsx(
211
- ye.text,
211
+ pe.text,
212
212
  {
213
213
  style: {
214
- textAnchor: r.size && r.size < 0 ? "end" : "start",
214
+ textAnchor: l.size && l.size < 0 ? "end" : "start",
215
215
  ...z?.graphObjectValues || {}
216
216
  },
217
- className: $e(
217
+ className: De(
218
218
  "graph-value text-sm",
219
219
  !x && g.length > 1 ? " fill-primary-gray-600 dark:fill-primary-gray-300" : "",
220
- N?.graphObjectValues
220
+ D?.graphObjectValues
221
221
  ),
222
- dx: r.size && r.size < 0 ? -5 : 5,
222
+ dx: l.size && l.size < 0 ? -5 : 5,
223
223
  dy: "0.33em",
224
224
  variants: {
225
225
  initial: {
226
226
  x: c(0),
227
- y: s(`${r.id}`) + s.bandwidth() / 2,
227
+ y: s(`${l.id}`) + s.bandwidth() / 2,
228
228
  opacity: 0,
229
- fill: x || (n.filter((f) => f.color).length === 0 ? g[0] : r.color ? g[O.indexOf(r.color)] : je.gray)
229
+ fill: x || (n.filter((f) => f.color).length === 0 ? g[0] : l.color ? g[N.indexOf(l.color)] : je.gray)
230
230
  },
231
231
  whileInView: {
232
- x: r.size ? c(r.size) : c(0),
232
+ x: l.size ? c(l.size) : c(0),
233
233
  opacity: 1,
234
- y: s(`${r.id}`) + s.bandwidth() / 2,
235
- fill: x || (n.filter((f) => f.color).length === 0 ? g[0] : r.color ? g[O.indexOf(r.color)] : je.gray),
236
- transition: { duration: D.duration }
234
+ y: s(`${l.id}`) + s.bandwidth() / 2,
235
+ fill: x || (n.filter((f) => f.color).length === 0 ? g[0] : l.color ? g[N.indexOf(l.color)] : je.gray),
236
+ transition: { duration: O.duration }
237
237
  }
238
238
  },
239
239
  initial: "initial",
240
240
  animate: T ? "whileInView" : "initial",
241
241
  exit: {
242
242
  opacity: 0,
243
- transition: { duration: D.duration }
243
+ transition: { duration: O.duration }
244
244
  },
245
- children: ze(r.size, w, S, A, Y)
245
+ children: ze(l.size, w, I, V, Y)
246
246
  }
247
247
  ) : null
248
248
  ]
249
249
  },
250
- r.label
250
+ l.label
251
251
  )
252
252
  ),
253
253
  /* @__PURE__ */ e.jsx(
254
- Ee,
254
+ Ye,
255
255
  {
256
256
  x1: c(le < 0 ? 0 : le),
257
257
  x2: c(le < 0 ? 0 : le),
258
258
  y1: -2.5,
259
259
  y2: d + k.bottom,
260
- classNames: { axis: N?.yAxis?.axis },
260
+ classNames: { axis: D?.yAxis?.axis },
261
261
  styles: { axis: z?.yAxis?.axis }
262
262
  }
263
263
  ),
264
- v ? /* @__PURE__ */ e.jsx(e.Fragment, { children: v.map((r, f) => /* @__PURE__ */ e.jsx(
265
- nt,
264
+ v ? /* @__PURE__ */ e.jsx(e.Fragment, { children: v.map((l, f) => /* @__PURE__ */ e.jsx(
265
+ ot,
266
266
  {
267
- text: r.text,
268
- color: r.color,
269
- x: c(r.value),
267
+ text: l.text,
268
+ color: l.color,
269
+ x: c(l.value),
270
270
  y1: 0 - k.top,
271
271
  y2: d + k.bottom,
272
- textSide: c(r.value) > m * 0.75 || re ? "left" : "right",
273
- classNames: r.classNames,
274
- styles: r.styles,
275
- animate: D,
272
+ textSide: c(l.value) > m * 0.75 || se ? "left" : "right",
273
+ classNames: l.classNames,
274
+ styles: l.styles,
275
+ animate: O,
276
276
  isInView: T
277
277
  },
278
278
  f
279
279
  )) }) : null
280
280
  ] }),
281
- b.filter((r) => r.position === "after").map((r) => r.layer)
281
+ b.filter((l) => l.position === "after").map((l) => l.layer)
282
282
  ] })
283
283
  }
284
284
  ),
285
- V && J && Q && H ? /* @__PURE__ */ e.jsx(
286
- Xe,
285
+ F && J && Q && H ? /* @__PURE__ */ e.jsx(
286
+ We,
287
287
  {
288
- data: V,
288
+ data: F,
289
289
  body: J,
290
290
  xPos: Q,
291
291
  yPos: H,
292
292
  backgroundStyle: z?.tooltip,
293
- className: N?.tooltip
293
+ className: D?.tooltip
294
294
  }
295
295
  ) : null,
296
- $ && G !== void 0 ? /* @__PURE__ */ e.jsx(
297
- Ge,
296
+ $ && W !== void 0 ? /* @__PURE__ */ e.jsx(
297
+ He,
298
298
  {
299
- open: G !== void 0,
299
+ open: W !== void 0,
300
300
  onClose: () => {
301
301
  P(void 0);
302
302
  },
@@ -304,61 +304,61 @@ function ut(pe) {
304
304
  "div",
305
305
  {
306
306
  className: "graph-modal-content m-0",
307
- dangerouslySetInnerHTML: typeof $ == "string" ? { __html: Ye($, G) } : void 0,
308
- children: typeof $ == "function" ? $(G) : null
307
+ dangerouslySetInnerHTML: typeof $ == "string" ? { __html: Ge($, W) } : void 0,
308
+ children: typeof $ == "function" ? $(W) : null
309
309
  }
310
310
  )
311
311
  }
312
312
  ) : null
313
313
  ] });
314
314
  }
315
- function mt(pe) {
315
+ function ut(ye) {
316
316
  const {
317
317
  data: n,
318
318
  graphTitle: g,
319
319
  colors: Y,
320
- suffix: A = "",
320
+ suffix: V = "",
321
321
  sources: _,
322
322
  prefix: me = "",
323
323
  graphDescription: ue,
324
324
  barPadding: ge = 0.25,
325
325
  showValues: Z = !0,
326
- showTicks: X = !0,
326
+ showTicks: G = !0,
327
327
  leftMargin: ie = 100,
328
- rightMargin: O = 40,
329
- truncateBy: se = 999,
330
- height: he,
328
+ rightMargin: N = 40,
329
+ truncateBy: re = 999,
330
+ height: de,
331
331
  width: j,
332
332
  footNote: E,
333
333
  colorDomain: J,
334
334
  colorLegendTitle: ee,
335
335
  highlightedDataPoints: v = [],
336
- padding: y,
337
- backgroundColor: F = !1,
336
+ padding: p,
337
+ backgroundColor: B = !1,
338
338
  topMargin: ae = 25,
339
339
  bottomMargin: le = 10,
340
340
  showLabels: K = !0,
341
341
  relativeHeight: te,
342
- tooltip: re,
342
+ tooltip: se,
343
343
  onSeriesMouseOver: R,
344
344
  refValues: xe,
345
345
  showColorScale: ne = !0,
346
346
  graphID: $,
347
- maxValue: p,
347
+ maxValue: y,
348
348
  minValue: x,
349
349
  onSeriesMouseClick: C,
350
350
  graphDownload: z = !1,
351
- dataDownload: N = !1,
352
- sortData: D,
353
- labelOrder: I,
354
- language: S = "en",
351
+ dataDownload: D = !1,
352
+ sortData: O,
353
+ labelOrder: A,
354
+ language: I = "en",
355
355
  showNAColor: b = !0,
356
356
  minHeight: w = 0,
357
357
  theme: q = "light",
358
358
  maxBarThickness: T,
359
- maxNumberOfBars: V,
359
+ maxNumberOfBars: F,
360
360
  minBarThickness: oe,
361
- ariaLabel: G,
361
+ ariaLabel: W,
362
362
  resetSelectionOnDoubleClick: P = !0,
363
363
  detailsOnClick: Q,
364
364
  barAxisTitle: M,
@@ -369,33 +369,32 @@ function mt(pe) {
369
369
  filterNA: d = !0,
370
370
  animate: h = !1,
371
371
  dimmedOpacity: c = 0.3,
372
- precision: l = 2,
372
+ precision: a = 2,
373
373
  customLayers: s = [],
374
374
  timeline: t = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 },
375
- naLabel: r = "NA"
376
- } = pe, [f, Ce] = L(0), [ce, U] = L(0), [fe, Oe] = L(t.autoplay), de = Fe(
377
- Ae(
378
- n.filter((a) => a.date !== void 0 && a.date !== null),
379
- (a) => a.date
380
- ).map((a) => Be(`${a.date}`, t.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
381
- (a, ve) => it(a, ve)
382
- ), [be, we] = L(t.autoplay ? 0 : de.length - 1), [Ne, o] = L(void 0), i = Me(null), B = Me(null);
375
+ naLabel: l = "NA"
376
+ } = ye, [f, Ce] = L(0), [ce, U] = L(0), [fe, Oe] = L(t.autoplay), he = et(
377
+ Ae(n, "date", !0).map(
378
+ (r) => Se(`${r}`, t.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
379
+ ),
380
+ (r, we) => tt(r, we)
381
+ ), [be, ve] = L(t.autoplay ? 0 : he.length - 1), [Ne, o] = L(void 0), i = Me(null), S = Me(null);
383
382
  Ve(() => {
384
- const a = new ResizeObserver((ve) => {
385
- Ce(j || ve[0].target.clientWidth || 620), U(he || ve[0].target.clientHeight || 480);
383
+ const r = new ResizeObserver((we) => {
384
+ Ce(j || we[0].target.clientWidth || 620), U(de || we[0].target.clientHeight || 480);
386
385
  });
387
- return i.current && (U(i.current.clientHeight || 480), Ce(i.current.clientWidth || 620), j || a.observe(i.current)), () => a.disconnect();
388
- }, [j, he]), Ve(() => {
389
- const a = setInterval(
386
+ return i.current && (U(i.current.clientHeight || 480), Ce(i.current.clientWidth || 620), j || r.observe(i.current)), () => r.disconnect();
387
+ }, [j, de]), Ve(() => {
388
+ const r = setInterval(
390
389
  () => {
391
- we((ve) => ve < de.length - 1 ? ve + 1 : 0);
390
+ ve((we) => we < he.length - 1 ? we + 1 : 0);
392
391
  },
393
392
  (t.speed || 2) * 1e3
394
393
  );
395
- return fe || clearInterval(a), () => clearInterval(a);
396
- }, [de, fe, t.speed]);
397
- const at = Pe(
398
- de,
394
+ return fe || clearInterval(r), () => clearInterval(r);
395
+ }, [he, fe, t.speed]);
396
+ const it = Be(
397
+ he,
399
398
  be,
400
399
  t.showOnlyActiveDate,
401
400
  t.dateFormat || "yyyy"
@@ -404,30 +403,30 @@ function mt(pe) {
404
403
  "div",
405
404
  {
406
405
  className: `${q || "light"} flex ${j ? "w-fit grow-0" : "w-full grow"}`,
407
- dir: S === "he" || S === "ar" ? "rtl" : void 0,
406
+ dir: I === "he" || I === "ar" ? "rtl" : void 0,
408
407
  children: /* @__PURE__ */ e.jsx(
409
408
  "div",
410
409
  {
411
- className: $e(
412
- `${F ? F === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${S || "en"}`,
410
+ className: De(
411
+ `${B ? B === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${I || "en"}`,
413
412
  j ? "w-fit" : "w-full",
414
413
  m?.graphContainer
415
414
  ),
416
415
  style: {
417
416
  ...k?.graphContainer || {},
418
- ...F && F !== !0 ? { backgroundColor: F } : {}
417
+ ...B && B !== !0 ? { backgroundColor: B } : {}
419
418
  },
420
419
  id: $,
421
- ref: B,
422
- "aria-label": G || `${g ? `The graph shows ${g}. ` : ""}This is a bar chart. ${ue ? ` ${ue}` : ""}`,
420
+ ref: S,
421
+ "aria-label": W || `${g ? `The graph shows ${g}. ` : ""}This is a bar chart. ${ue ? ` ${ue}` : ""}`,
423
422
  children: /* @__PURE__ */ e.jsx(
424
423
  "div",
425
424
  {
426
425
  className: "flex grow",
427
- style: { padding: F ? y || "1rem" : y || 0 },
426
+ style: { padding: B ? p || "1rem" : p || 0 },
428
427
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
429
- g || ue || z || N ? /* @__PURE__ */ e.jsx(
430
- Ke,
428
+ g || ue || z || D ? /* @__PURE__ */ e.jsx(
429
+ Ue,
431
430
  {
432
431
  styles: {
433
432
  title: k?.title,
@@ -440,11 +439,11 @@ function mt(pe) {
440
439
  graphTitle: g,
441
440
  graphDescription: ue,
442
441
  width: j,
443
- graphDownload: z ? B.current : void 0,
444
- dataDownload: N ? n.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? n.map((a) => a.data).filter((a) => a !== void 0) : n.filter((a) => a !== void 0) : null
442
+ graphDownload: z ? S.current : void 0,
443
+ dataDownload: D ? n.map((r) => r.data).filter((r) => r !== void 0).length > 0 ? n.map((r) => r.data).filter((r) => r !== void 0) : n.filter((r) => r !== void 0) : null
445
444
  }
446
445
  ) : null,
447
- t.enabled && de.length > 0 && at ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
446
+ t.enabled && he.length > 0 && it ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
448
447
  /* @__PURE__ */ e.jsx(
449
448
  "button",
450
449
  {
@@ -454,39 +453,36 @@ function mt(pe) {
454
453
  },
455
454
  className: "p-0 border-0 cursor-pointer bg-transparent",
456
455
  "aria-label": fe ? "Click to pause animation" : "Click to play animation",
457
- children: fe ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
456
+ children: fe ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
458
457
  }
459
458
  ),
460
459
  /* @__PURE__ */ e.jsx(
461
- He,
460
+ Fe,
462
461
  {
463
- min: de[0],
464
- max: de[de.length - 1],
465
- marks: at,
462
+ min: he[0],
463
+ max: he[he.length - 1],
464
+ marks: it,
466
465
  step: null,
467
- defaultValue: de[de.length - 1],
468
- value: de[be],
469
- onChangeComplete: (a) => {
470
- we(de.indexOf(a));
466
+ defaultValue: he[he.length - 1],
467
+ value: he[be],
468
+ onChangeComplete: (r) => {
469
+ ve(he.indexOf(r));
471
470
  },
472
- onChange: (a) => {
473
- we(de.indexOf(a));
471
+ onChange: (r) => {
472
+ ve(he.indexOf(r));
474
473
  },
475
474
  "aria-label": "Time slider. Use arrow keys to adjust selected time period."
476
475
  }
477
476
  )
478
477
  ] }) : null,
479
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
480
- ne && n.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ e.jsx(
481
- Qe,
478
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
479
+ ne && n.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ e.jsx(
480
+ Je,
482
481
  {
483
482
  width: j,
484
483
  colorLegendTitle: ee,
485
484
  colors: Y || je[q].categoricalColors.colors,
486
- colorDomain: J || Ae(
487
- n.filter((a) => a.color),
488
- "color"
489
- ).map((a) => a.color),
485
+ colorDomain: J || Ae(n, "color", !0),
490
486
  setSelectedColor: o,
491
487
  showNAColor: b
492
488
  }
@@ -497,70 +493,62 @@ function mt(pe) {
497
493
  className: "flex grow flex-col justify-center w-full leading-0",
498
494
  ref: i,
499
495
  "aria-label": "Graph area",
500
- children: (j || f) && (he || ce) ? /* @__PURE__ */ e.jsx(
501
- ut,
496
+ children: (j || f) && (de || ce) ? /* @__PURE__ */ e.jsx(
497
+ ht,
502
498
  {
503
- data: D === "asc" ? rt(
504
- Se(n, t.dateFormat || "yyyy").filter(
505
- (a) => t.enabled ? a.date === De(
506
- new Date(de[be]),
499
+ data: O ? Ie(
500
+ lt(n, t.dateFormat || "yyyy").filter(
501
+ (r) => t.enabled ? r.date === $e(
502
+ new Date(he[be]),
507
503
  t.dateFormat || "yyyy"
508
- ) : a
509
- ).filter((a) => d ? !W(a.size) : a),
510
- (a) => a.size
511
- ).filter((a, ve) => V ? ve < V : !0) : D === "desc" ? rt(
512
- Se(n, t.dateFormat || "yyyy").filter(
513
- (a) => t.enabled ? a.date === De(
514
- new Date(de[be]),
515
- t.dateFormat || "yyyy"
516
- ) : a
517
- ).filter((a) => d ? !W(a.size) : a),
518
- (a) => a.size
519
- ).reverse().filter((a, ve) => V ? ve < V : !0) : Se(n, t.dateFormat || "yyyy").filter(
520
- (a) => t.enabled ? a.date === De(
521
- new Date(de[be]),
504
+ ) : r
505
+ ).filter((r) => d ? !X(r.size) : r),
506
+ [
507
+ (r) => r.size === void 0 ? O === "asc" ? 1 / 0 : -1 / 0 : r.size
508
+ ],
509
+ [O]
510
+ ).filter((r, we) => F ? we < F : !0) : lt(n, t.dateFormat || "yyyy").filter(
511
+ (r) => t.enabled ? r.date === $e(
512
+ new Date(he[be]),
522
513
  t.dateFormat || "yyyy"
523
- ) : a
524
- ).filter((a) => d ? !W(a.size) : a).filter((a, ve) => V ? ve < V : !0),
525
- barColor: n.filter((a) => a.color).length === 0 ? Y ? [Y] : [je.primaryColors["blue-600"]] : Y || je[q].categoricalColors.colors,
526
- colorDomain: n.filter((a) => a.color).length === 0 ? [] : J || Ae(
527
- n.filter((a) => a.color),
528
- "color"
529
- ).map((a) => a.color),
514
+ ) : r
515
+ ).filter((r) => d ? !X(r.size) : r).filter((r, we) => F ? we < F : !0),
516
+ barColor: n.filter((r) => r.color).length === 0 ? Y ? [Y] : [je.primaryColors["blue-600"]] : Y || je[q].categoricalColors.colors,
517
+ colorDomain: n.filter((r) => r.color).length === 0 ? [] : J || Ae(n, "color", !0),
530
518
  width: j || f,
531
519
  selectedColor: Ne,
532
520
  height: Math.max(
533
521
  w,
534
- he || (te ? w ? (j || f) * te > w ? (j || f) * te : w : (j || f) * te : ce)
522
+ de || (te ? w ? (j || f) * te > w ? (j || f) * te : w : (j || f) * te : ce)
535
523
  ),
536
- suffix: A,
524
+ suffix: V,
537
525
  prefix: me,
538
526
  barPadding: ge,
539
527
  showValues: Z,
540
- showTicks: X,
528
+ showTicks: G,
541
529
  leftMargin: ie,
542
- rightMargin: O,
530
+ rightMargin: N,
543
531
  topMargin: ae,
544
532
  bottomMargin: le,
545
- truncateBy: se,
533
+ truncateBy: re,
546
534
  showLabels: K,
547
- tooltip: re,
535
+ tooltip: se,
548
536
  onSeriesMouseOver: R,
549
537
  refValues: xe,
550
- maxValue: W(p) ? Math.max(
551
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
538
+ maxValue: X(y) ? Math.max(
539
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
552
540
  ) < 0 ? 0 : Math.max(
553
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
554
- ) : p,
555
- minValue: W(x) ? Math.min(
556
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
541
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
542
+ ) : y,
543
+ minValue: X(x) ? Math.min(
544
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
557
545
  ) >= 0 ? 0 : Math.min(
558
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
546
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
559
547
  ) : x,
560
548
  highlightedDataPoints: v,
561
549
  onSeriesMouseClick: C,
562
- labelOrder: I,
563
- rtl: S === "he" || S === "ar",
550
+ labelOrder: A,
551
+ rtl: I === "he" || I === "ar",
564
552
  maxBarThickness: T,
565
553
  minBarThickness: oe,
566
554
  resetSelectionOnDoubleClick: P,
@@ -572,16 +560,16 @@ function mt(pe) {
572
560
  styles: k,
573
561
  animate: h === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : h || { duration: 0, once: !0, amount: 0 },
574
562
  dimmedOpacity: c,
575
- precision: l,
563
+ precision: a,
576
564
  customLayers: s,
577
- naLabel: r
565
+ naLabel: l
578
566
  }
579
567
  ) : null
580
568
  }
581
569
  )
582
570
  ] }) }),
583
571
  _ || E ? /* @__PURE__ */ e.jsx(
584
- Je,
572
+ qe,
585
573
  {
586
574
  sources: _,
587
575
  footNote: E,
@@ -601,107 +589,107 @@ function mt(pe) {
601
589
  }
602
590
  );
603
591
  }
604
- function gt(pe) {
592
+ function mt(ye) {
605
593
  const {
606
594
  data: n,
607
595
  barColors: g,
608
596
  barPadding: Y,
609
- showTicks: A,
597
+ showTicks: V,
610
598
  leftMargin: _,
611
599
  truncateBy: me,
612
600
  width: ue,
613
601
  height: ge,
614
602
  suffix: Z,
615
- prefix: X,
603
+ prefix: G,
616
604
  showValues: ie,
617
- rightMargin: O,
618
- topMargin: se,
619
- bottomMargin: he,
605
+ rightMargin: N,
606
+ topMargin: re,
607
+ bottomMargin: de,
620
608
  showLabels: j,
621
609
  tooltip: E,
622
610
  onSeriesMouseOver: J,
623
611
  refValues: ee,
624
612
  maxValue: v,
625
- minValue: y,
626
- onSeriesMouseClick: F,
613
+ minValue: p,
614
+ onSeriesMouseClick: B,
627
615
  selectedColor: ae,
628
616
  rtl: le,
629
617
  labelOrder: K,
630
618
  maxBarThickness: te,
631
- resetSelectionOnDoubleClick: re,
619
+ resetSelectionOnDoubleClick: se,
632
620
  detailsOnClick: R,
633
621
  barAxisTitle: xe,
634
622
  valueColor: ne,
635
623
  noOfTicks: $,
636
- styles: p,
624
+ styles: y,
637
625
  classNames: x,
638
626
  animate: C,
639
627
  colorDomain: z,
640
- precision: N,
641
- customLayers: D,
642
- naLabel: I
643
- } = pe, S = Me(null), b = Re(S, {
628
+ precision: D,
629
+ customLayers: O,
630
+ naLabel: A
631
+ } = ye, I = Me(null), b = _e(I, {
644
632
  once: C.once,
645
633
  amount: C.amount
646
634
  }), w = {
647
- top: xe ? se + 25 : se,
648
- bottom: he,
635
+ top: xe ? re + 25 : re,
636
+ bottom: de,
649
637
  left: _,
650
- right: O
651
- }, [q, T] = L(void 0), [V, oe] = L(void 0), [G, P] = L(void 0), [Q, M] = L(void 0), H = ue - w.left - w.right, u = ge - w.top - w.bottom, k = n.map((s, t) => ({
638
+ right: N
639
+ }, [q, T] = L(void 0), [F, oe] = L(void 0), [W, P] = L(void 0), [Q, M] = L(void 0), H = ue - w.left - w.right, u = ge - w.top - w.bottom, k = n.map((s, t) => ({
652
640
  ...s,
653
641
  id: K ? `${s.label}` : `${t}`
654
- })), m = K || k.map((s) => `${s.id}`), d = qe().domain([y, v]).range([0, H]).nice(), h = Ie().domain(m).range([
642
+ })), m = K || k.map((s) => `${s.id}`), d = Ee().domain([p, v]).range([0, H]).nice(), h = Le().domain(m).range([
655
643
  0,
656
644
  te ? Math.min(u, te * m.length) : u
657
- ]).paddingInner(Y), c = Ie().domain(n[0].size.map((s, t) => `${t}`)).range([0, h.bandwidth()]).paddingInner(0.1), l = d.ticks($);
645
+ ]).paddingInner(Y), c = Le().domain(n[0].size.map((s, t) => `${t}`)).range([0, h.bandwidth()]).paddingInner(0.1), a = d.ticks($);
658
646
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
659
647
  /* @__PURE__ */ e.jsx(
660
- ye.svg,
648
+ pe.svg,
661
649
  {
662
- ref: S,
650
+ ref: I,
663
651
  width: `${ue}px`,
664
652
  height: `${ge}px`,
665
653
  viewBox: `0 0 ${ue} ${ge}`,
666
654
  direction: "ltr",
667
655
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${w.left},${w.top})`, children: [
668
- A ? /* @__PURE__ */ e.jsx(
656
+ V ? /* @__PURE__ */ e.jsx(
669
657
  st,
670
658
  {
671
- values: l.filter((s) => s !== 0),
672
- x: l.filter((s) => s !== 0).map((s) => d(s)),
673
- y1: 0 - se,
659
+ values: a.filter((s) => s !== 0),
660
+ x: a.filter((s) => s !== 0).map((s) => d(s)),
661
+ y1: 0 - re,
674
662
  y2: u + w.bottom,
675
663
  styles: {
676
- gridLines: p?.xAxis?.gridLines,
677
- labels: p?.xAxis?.labels
664
+ gridLines: y?.xAxis?.gridLines,
665
+ labels: y?.xAxis?.labels
678
666
  },
679
667
  classNames: {
680
668
  gridLines: x?.xAxis?.gridLines,
681
669
  labels: x?.xAxis?.labels
682
670
  },
683
671
  suffix: Z,
684
- prefix: X,
672
+ prefix: G,
685
673
  labelType: "secondary",
686
674
  showGridLines: !0,
687
- precision: N
675
+ precision: D
688
676
  }
689
677
  ) : null,
690
678
  /* @__PURE__ */ e.jsx(
691
- _e,
679
+ Xe,
692
680
  {
693
681
  x: H / 2,
694
682
  y: 0 - w.top + 15,
695
- style: p?.xAxis?.title,
683
+ style: y?.xAxis?.title,
696
684
  className: x?.xAxis?.title,
697
685
  text: xe
698
686
  }
699
687
  ),
700
- D.filter((s) => s.position === "before").map((s) => s.layer),
701
- /* @__PURE__ */ e.jsxs(Ue, { children: [
688
+ O.filter((s) => s.position === "before").map((s) => s.layer),
689
+ /* @__PURE__ */ e.jsxs(Re, { children: [
702
690
  k.map(
703
- (s) => W(h(s.id)) ? null : /* @__PURE__ */ e.jsxs(
704
- ye.g,
691
+ (s) => X(h(s.id)) ? null : /* @__PURE__ */ e.jsxs(
692
+ pe.g,
705
693
  {
706
694
  variants: {
707
695
  initial: {
@@ -718,38 +706,38 @@ function gt(pe) {
718
706
  animate: b ? "whileInView" : "initial",
719
707
  exit: { opacity: 0, transition: { duration: C.duration } },
720
708
  children: [
721
- s.size.map((t, r) => /* @__PURE__ */ e.jsxs(
722
- ye.g,
709
+ s.size.map((t, l) => /* @__PURE__ */ e.jsxs(
710
+ pe.g,
723
711
  {
724
712
  className: "undp-viz-g-with-hover",
725
- opacity: ae ? g[r] === ae ? 1 : 0.3 : 0.85,
713
+ opacity: ae ? g[l] === ae ? 1 : 0.3 : 0.85,
726
714
  onMouseEnter: (f) => {
727
- T({ ...s, sizeIndex: r }), M(f.clientY), P(f.clientX), J?.({ ...s, sizeIndex: r });
715
+ T({ ...s, sizeIndex: l }), M(f.clientY), P(f.clientX), J?.({ ...s, sizeIndex: l });
728
716
  },
729
717
  onMouseMove: (f) => {
730
- T({ ...s, sizeIndex: r }), M(f.clientY), P(f.clientX);
718
+ T({ ...s, sizeIndex: l }), M(f.clientY), P(f.clientX);
731
719
  },
732
720
  onMouseLeave: () => {
733
721
  T(void 0), P(void 0), M(void 0), J?.(void 0);
734
722
  },
735
723
  onClick: () => {
736
- (F || R) && (We(V, { ...s, sizeIndex: r }) && re ? (oe(void 0), F?.(void 0)) : (oe({ ...s, sizeIndex: r }), F && F({ ...s, sizeIndex: r })));
724
+ (B || R) && (Pe(F, { ...s, sizeIndex: l }) && se ? (oe(void 0), B?.(void 0)) : (oe({ ...s, sizeIndex: l }), B && B({ ...s, sizeIndex: l })));
737
725
  },
738
726
  children: [
739
- W(t) ? null : /* @__PURE__ */ e.jsx(
740
- ye.rect,
727
+ X(t) ? null : /* @__PURE__ */ e.jsx(
728
+ pe.rect,
741
729
  {
742
- y: c(`${r}`),
730
+ y: c(`${l}`),
743
731
  variants: {
744
732
  initial: {
745
733
  width: 0,
746
734
  x: d(0),
747
- fill: g[r]
735
+ fill: g[l]
748
736
  },
749
737
  whileInView: {
750
- width: W(t) ? 0 : t >= 0 ? d(t) - d(0) : d(0) - d(t),
738
+ width: X(t) ? 0 : t >= 0 ? d(t) - d(0) : d(0) - d(t),
751
739
  x: t >= 0 ? d(0) : d(t),
752
- fill: g[r],
740
+ fill: g[l],
753
741
  transition: { duration: C.duration }
754
742
  }
755
743
  },
@@ -764,15 +752,15 @@ function gt(pe) {
764
752
  }
765
753
  ),
766
754
  ie ? /* @__PURE__ */ e.jsx(
767
- ye.text,
755
+ pe.text,
768
756
  {
769
- y: c(`${r}`) + c.bandwidth() / 2,
757
+ y: c(`${l}`) + c.bandwidth() / 2,
770
758
  style: {
771
- fill: ne || g[r],
759
+ fill: ne || g[l],
772
760
  textAnchor: t && t < 0 ? "end" : "start",
773
- ...p?.graphObjectValues || {}
761
+ ...y?.graphObjectValues || {}
774
762
  },
775
- className: $e("graph-value text-sm", x?.graphObjectValues),
763
+ className: De("graph-value text-sm", x?.graphObjectValues),
776
764
  dx: t && t < 0 ? -5 : 5,
777
765
  dy: "0.33em",
778
766
  variants: {
@@ -789,22 +777,22 @@ function gt(pe) {
789
777
  opacity: 0,
790
778
  transition: { duration: C.duration }
791
779
  },
792
- children: ze(t, I, N, X, Z)
780
+ children: ze(t, A, D, G, Z)
793
781
  }
794
782
  ) : null
795
783
  ]
796
784
  },
797
- `${s.label}-${z[r] || r}`
785
+ `${s.label}-${z[l] || l}`
798
786
  )),
799
787
  j ? /* @__PURE__ */ e.jsx(
800
- ot,
788
+ rt,
801
789
  {
802
790
  value: `${s.label}`.length < me ? `${s.label}` : `${`${s.label}`.substring(0, me)}...`,
803
791
  y: 0,
804
792
  x: 0 - w.left,
805
- width: d(y < 0 ? 0 : y) + w.left,
793
+ width: d(p < 0 ? 0 : p) + w.left,
806
794
  height: h.bandwidth(),
807
- style: p?.yAxis?.labels,
795
+ style: y?.yAxis?.labels,
808
796
  className: x?.yAxis?.labels,
809
797
  animate: C,
810
798
  isInView: b
@@ -816,18 +804,18 @@ function gt(pe) {
816
804
  )
817
805
  ),
818
806
  /* @__PURE__ */ e.jsx(
819
- Ee,
807
+ Ye,
820
808
  {
821
- x1: d(y < 0 ? 0 : y),
822
- x2: d(y < 0 ? 0 : y),
809
+ x1: d(p < 0 ? 0 : p),
810
+ x2: d(p < 0 ? 0 : p),
823
811
  y1: -2.5,
824
812
  y2: u + w.bottom,
825
813
  classNames: { axis: x?.yAxis?.axis },
826
- styles: { axis: p?.yAxis?.axis }
814
+ styles: { axis: y?.yAxis?.axis }
827
815
  }
828
816
  ),
829
817
  ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((s, t) => /* @__PURE__ */ e.jsx(
830
- nt,
818
+ ot,
831
819
  {
832
820
  text: s.text,
833
821
  color: s.color,
@@ -843,25 +831,25 @@ function gt(pe) {
843
831
  t
844
832
  )) }) : null
845
833
  ] }),
846
- D.filter((s) => s.position === "after").map((s) => s.layer)
834
+ O.filter((s) => s.position === "after").map((s) => s.layer)
847
835
  ] })
848
836
  }
849
837
  ),
850
- q && E && G && Q ? /* @__PURE__ */ e.jsx(
851
- Xe,
838
+ q && E && W && Q ? /* @__PURE__ */ e.jsx(
839
+ We,
852
840
  {
853
841
  data: q,
854
842
  body: E,
855
- xPos: G,
843
+ xPos: W,
856
844
  yPos: Q,
857
- backgroundStyle: p?.tooltip,
845
+ backgroundStyle: y?.tooltip,
858
846
  className: x?.tooltip
859
847
  }
860
848
  ) : null,
861
- R && V !== void 0 ? /* @__PURE__ */ e.jsx(
862
- Ge,
849
+ R && F !== void 0 ? /* @__PURE__ */ e.jsx(
850
+ He,
863
851
  {
864
- open: V !== void 0,
852
+ open: F !== void 0,
865
853
  onClose: () => {
866
854
  oe(void 0);
867
855
  },
@@ -869,61 +857,61 @@ function gt(pe) {
869
857
  "div",
870
858
  {
871
859
  className: "graph-modal-content m-0",
872
- dangerouslySetInnerHTML: typeof R == "string" ? { __html: Ye(R, V) } : void 0,
873
- children: typeof R == "function" ? R(V) : null
860
+ dangerouslySetInnerHTML: typeof R == "string" ? { __html: Ge(R, F) } : void 0,
861
+ children: typeof R == "function" ? R(F) : null
874
862
  }
875
863
  )
876
864
  }
877
865
  ) : null
878
866
  ] });
879
867
  }
880
- function xt(pe) {
868
+ function gt(ye) {
881
869
  const {
882
870
  data: n,
883
871
  graphTitle: g,
884
872
  colors: Y = je.light.categoricalColors.colors,
885
- sources: A,
873
+ sources: V,
886
874
  graphDescription: _,
887
875
  barPadding: me = 0.25,
888
876
  showTicks: ue = !0,
889
877
  truncateBy: ge = 999,
890
878
  height: Z,
891
- width: X,
879
+ width: G,
892
880
  footNote: ie,
893
- colorDomain: O,
894
- colorLegendTitle: se,
895
- suffix: he = "",
881
+ colorDomain: N,
882
+ colorLegendTitle: re,
883
+ suffix: de = "",
896
884
  prefix: j = "",
897
885
  showValues: E = !0,
898
886
  showColorScale: J = !0,
899
887
  padding: ee,
900
888
  backgroundColor: v = !1,
901
- leftMargin: y = 100,
902
- rightMargin: F = 40,
889
+ leftMargin: p = 100,
890
+ rightMargin: B = 40,
903
891
  topMargin: ae = 25,
904
892
  bottomMargin: le = 10,
905
893
  showLabels: K = !0,
906
894
  relativeHeight: te,
907
- tooltip: re,
895
+ tooltip: se,
908
896
  onSeriesMouseOver: R,
909
897
  refValues: xe,
910
898
  graphID: ne,
911
899
  maxValue: $,
912
- minValue: p,
900
+ minValue: y,
913
901
  onSeriesMouseClick: x,
914
902
  graphDownload: C = !1,
915
903
  dataDownload: z = !1,
916
- language: N = "en",
917
- labelOrder: D,
918
- minHeight: I = 0,
919
- theme: S = "light",
904
+ language: D = "en",
905
+ labelOrder: O,
906
+ minHeight: A = 0,
907
+ theme: I = "light",
920
908
  maxBarThickness: b,
921
909
  ariaLabel: w,
922
910
  resetSelectionOnDoubleClick: q = !0,
923
911
  detailsOnClick: T,
924
- barAxisTitle: V,
912
+ barAxisTitle: F,
925
913
  noOfTicks: oe = 5,
926
- valueColor: G,
914
+ valueColor: W,
927
915
  styles: P,
928
916
  classNames: Q,
929
917
  filterNA: M = !0,
@@ -934,19 +922,18 @@ function xt(pe) {
934
922
  naLabel: d = "NA",
935
923
  sortParameter: h,
936
924
  sortData: c
937
- } = pe, [l, s] = L(0), [t, r] = L(0), [f, Ce] = L(m.autoplay), ce = Fe(
938
- Ae(
939
- n.filter((o) => o.date !== void 0 && o.date !== null),
940
- (o) => o.date
941
- ).map((o) => Be(`${o.date}`, m.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
942
- (o, i) => it(o, i)
943
- ), [U, fe] = L(m.autoplay ? 0 : ce.length - 1), [Oe, de] = L(void 0), be = Me(null), we = Me(null);
925
+ } = ye, [a, s] = L(0), [t, l] = L(0), [f, Ce] = L(m.autoplay), ce = et(
926
+ Ae(n, "date", !0).map(
927
+ (o) => Se(`${o}`, m.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
928
+ ),
929
+ (o, i) => tt(o, i)
930
+ ), [U, fe] = L(m.autoplay ? 0 : ce.length - 1), [Oe, he] = L(void 0), be = Me(null), ve = Me(null);
944
931
  Ve(() => {
945
932
  const o = new ResizeObserver((i) => {
946
- s(X || i[0].target.clientWidth || 620), r(Z || i[0].target.clientHeight || 480);
933
+ s(G || i[0].target.clientWidth || 620), l(Z || i[0].target.clientHeight || 480);
947
934
  });
948
- return be.current && (r(be.current.clientHeight || 480), s(be.current.clientWidth || 620), X || o.observe(be.current)), () => o.disconnect();
949
- }, [X, Z]), Ve(() => {
935
+ return be.current && (l(be.current.clientHeight || 480), s(be.current.clientWidth || 620), G || o.observe(be.current)), () => o.disconnect();
936
+ }, [G, Z]), Ve(() => {
950
937
  const o = setInterval(
951
938
  () => {
952
939
  fe((i) => i < ce.length - 1 ? i + 1 : 0);
@@ -955,7 +942,7 @@ function xt(pe) {
955
942
  );
956
943
  return f || clearInterval(o), () => clearInterval(o);
957
944
  }, [ce, f, m.speed]);
958
- const Ne = Pe(
945
+ const Ne = Be(
959
946
  ce,
960
947
  U,
961
948
  m.showOnlyActiveDate,
@@ -964,14 +951,14 @@ function xt(pe) {
964
951
  return /* @__PURE__ */ e.jsx(
965
952
  "div",
966
953
  {
967
- className: `${S || "light"} flex ${X ? "w-fit grow-0" : "w-full grow"}`,
968
- dir: N === "he" || N === "ar" ? "rtl" : void 0,
954
+ className: `${I || "light"} flex ${G ? "w-fit grow-0" : "w-full grow"}`,
955
+ dir: D === "he" || D === "ar" ? "rtl" : void 0,
969
956
  children: /* @__PURE__ */ e.jsx(
970
957
  "div",
971
958
  {
972
- className: $e(
973
- `${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N || "en"}`,
974
- X ? "w-fit" : "w-full",
959
+ className: De(
960
+ `${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D || "en"}`,
961
+ G ? "w-fit" : "w-full",
975
962
  Q?.graphContainer
976
963
  ),
977
964
  style: {
@@ -979,7 +966,7 @@ function xt(pe) {
979
966
  ...v && v !== !0 ? { backgroundColor: v } : {}
980
967
  },
981
968
  id: ne,
982
- ref: we,
969
+ ref: ve,
983
970
  "aria-label": w || `${g ? `The graph shows ${g}. ` : ""}This is a grouped bar chart. ${_ ? ` ${_}` : ""}`,
984
971
  children: /* @__PURE__ */ e.jsx(
985
972
  "div",
@@ -988,7 +975,7 @@ function xt(pe) {
988
975
  style: { padding: v ? ee || "1rem" : ee || 0 },
989
976
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 w-full grow justify-between", children: [
990
977
  g || _ || C || z ? /* @__PURE__ */ e.jsx(
991
- Ke,
978
+ Ue,
992
979
  {
993
980
  styles: {
994
981
  title: P?.title,
@@ -1000,8 +987,8 @@ function xt(pe) {
1000
987
  },
1001
988
  graphTitle: g,
1002
989
  graphDescription: _,
1003
- width: X,
1004
- graphDownload: C ? we.current : void 0,
990
+ width: G,
991
+ graphDownload: C ? ve.current : void 0,
1005
992
  dataDownload: z ? n.map((o) => o.data).filter((o) => o !== void 0).length > 0 ? n.map((o) => o.data).filter((o) => o !== void 0) : n.filter((o) => o !== void 0) : null
1006
993
  }
1007
994
  ) : null,
@@ -1015,11 +1002,11 @@ function xt(pe) {
1015
1002
  },
1016
1003
  className: "p-0 border-0 cursor-pointer bg-transparent",
1017
1004
  "aria-label": f ? "Click to pause animation" : "Click to play animation",
1018
- children: f ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
1005
+ children: f ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
1019
1006
  }
1020
1007
  ),
1021
1008
  /* @__PURE__ */ e.jsx(
1022
- He,
1009
+ Fe,
1023
1010
  {
1024
1011
  min: ce[0],
1025
1012
  max: ce[ce.length - 1],
@@ -1037,78 +1024,78 @@ function xt(pe) {
1037
1024
  }
1038
1025
  )
1039
1026
  ] }) : null,
1040
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1027
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1041
1028
  J ? /* @__PURE__ */ e.jsx(
1042
- Qe,
1029
+ Je,
1043
1030
  {
1044
- width: X,
1045
- colorDomain: O,
1031
+ width: G,
1032
+ colorDomain: N,
1046
1033
  colors: Y,
1047
- colorLegendTitle: se,
1048
- setSelectedColor: de,
1034
+ colorLegendTitle: re,
1035
+ setSelectedColor: he,
1049
1036
  showNAColor: !1
1050
1037
  }
1051
1038
  ) : null,
1052
- /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: be, "aria-label": "Graph area", children: (X || l) && (Z || t) ? /* @__PURE__ */ e.jsx(
1053
- gt,
1039
+ /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: be, "aria-label": "Graph area", children: (G || a) && (Z || t) ? /* @__PURE__ */ e.jsx(
1040
+ mt,
1054
1041
  {
1055
- data: h !== void 0 ? h === "total" ? Le(
1042
+ data: h !== void 0 ? h === "total" ? Ie(
1056
1043
  Te(
1057
1044
  n,
1058
1045
  m.dateFormat || "yyyy"
1059
1046
  ).filter(
1060
- (o) => m.enabled ? o.date === De(
1047
+ (o) => m.enabled ? o.date === $e(
1061
1048
  new Date(ce[U]),
1062
1049
  m.dateFormat || "yyyy"
1063
1050
  ) : o
1064
1051
  ).filter(
1065
1052
  (o) => M ? !o.size.every((i) => i == null) : o
1066
1053
  ),
1067
- (o) => ke(o.size.filter((i) => !W(i))),
1054
+ (o) => ke(o.size.filter((i) => !X(i))),
1068
1055
  [c || "asc"]
1069
- ) : Le(
1056
+ ) : Ie(
1070
1057
  Te(
1071
1058
  n,
1072
1059
  m.dateFormat || "yyyy"
1073
1060
  ).filter(
1074
- (o) => m.enabled ? o.date === De(
1061
+ (o) => m.enabled ? o.date === $e(
1075
1062
  new Date(ce[U]),
1076
1063
  m.dateFormat || "yyyy"
1077
1064
  ) : o
1078
1065
  ).filter(
1079
1066
  (o) => M ? !o.size.every((i) => i == null) : o
1080
1067
  ),
1081
- (o) => W(o.size[h]) ? -1 / 0 : o.size[h],
1068
+ (o) => X(o.size[h]) ? -1 / 0 : o.size[h],
1082
1069
  [c || "asc"]
1083
1070
  ) : Te(
1084
1071
  n,
1085
1072
  m.dateFormat || "yyyy"
1086
1073
  ).filter((o) => M ? !o.size.every((i) => i == null) : o),
1087
1074
  barColors: Y,
1088
- width: X || l,
1075
+ width: G || a,
1089
1076
  height: Math.max(
1090
- I,
1091
- Z || (te ? I ? (X || l) * te > I ? (X || l) * te : I : (X || l) * te : t)
1077
+ A,
1078
+ Z || (te ? A ? (G || a) * te > A ? (G || a) * te : A : (G || a) * te : t)
1092
1079
  ),
1093
- suffix: he,
1080
+ suffix: de,
1094
1081
  prefix: j,
1095
1082
  showValues: E,
1096
1083
  barPadding: me,
1097
1084
  showTicks: ue,
1098
- leftMargin: y,
1099
- rightMargin: F,
1085
+ leftMargin: p,
1086
+ rightMargin: B,
1100
1087
  topMargin: ae,
1101
1088
  bottomMargin: le,
1102
1089
  truncateBy: ge,
1103
1090
  showLabels: K,
1104
- tooltip: re,
1091
+ tooltip: se,
1105
1092
  onSeriesMouseOver: R,
1106
1093
  refValues: xe,
1107
- maxValue: W($) ? Math.max(
1094
+ maxValue: X($) ? Math.max(
1108
1095
  ...n.map(
1109
1096
  (o) => Math.max(
1110
1097
  ...o.size.filter(
1111
- (i) => !W(i)
1098
+ (i) => !X(i)
1112
1099
  )
1113
1100
  )
1114
1101
  )
@@ -1116,16 +1103,16 @@ function xt(pe) {
1116
1103
  ...n.map(
1117
1104
  (o) => Math.max(
1118
1105
  ...o.size.filter(
1119
- (i) => !W(i)
1106
+ (i) => !X(i)
1120
1107
  )
1121
1108
  )
1122
1109
  )
1123
1110
  ) : $,
1124
- minValue: W(p) ? Math.min(
1111
+ minValue: X(y) ? Math.min(
1125
1112
  ...n.map(
1126
1113
  (o) => Math.min(
1127
1114
  ...o.size.filter(
1128
- (i) => !W(i)
1115
+ (i) => !X(i)
1129
1116
  )
1130
1117
  )
1131
1118
  )
@@ -1133,24 +1120,24 @@ function xt(pe) {
1133
1120
  ...n.map(
1134
1121
  (o) => Math.min(
1135
1122
  ...o.size.filter(
1136
- (i) => !W(i)
1123
+ (i) => !X(i)
1137
1124
  )
1138
1125
  )
1139
1126
  )
1140
- ) : p,
1127
+ ) : y,
1141
1128
  onSeriesMouseClick: x,
1142
1129
  selectedColor: Oe,
1143
- labelOrder: D,
1144
- rtl: N === "he" || N === "ar",
1130
+ labelOrder: O,
1131
+ rtl: D === "he" || D === "ar",
1145
1132
  maxBarThickness: b,
1146
1133
  resetSelectionOnDoubleClick: q,
1147
1134
  detailsOnClick: T,
1148
- barAxisTitle: V,
1135
+ barAxisTitle: F,
1149
1136
  noOfTicks: oe,
1150
- valueColor: G,
1137
+ valueColor: W,
1151
1138
  styles: P,
1152
1139
  classNames: Q,
1153
- colorDomain: O,
1140
+ colorDomain: N,
1154
1141
  animate: H === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : H || { duration: 0, once: !0, amount: 0 },
1155
1142
  precision: u,
1156
1143
  customLayers: k,
@@ -1158,17 +1145,17 @@ function xt(pe) {
1158
1145
  }
1159
1146
  ) : null })
1160
1147
  ] }) }),
1161
- A || ie ? /* @__PURE__ */ e.jsx(
1162
- Je,
1148
+ V || ie ? /* @__PURE__ */ e.jsx(
1149
+ qe,
1163
1150
  {
1164
1151
  styles: { footnote: P?.footnote, source: P?.source },
1165
1152
  classNames: {
1166
1153
  footnote: Q?.footnote,
1167
1154
  source: Q?.source
1168
1155
  },
1169
- sources: A,
1156
+ sources: V,
1170
1157
  footNote: ie,
1171
- width: X
1158
+ width: G
1172
1159
  }
1173
1160
  ) : null
1174
1161
  ] })
@@ -1179,80 +1166,80 @@ function xt(pe) {
1179
1166
  }
1180
1167
  );
1181
1168
  }
1182
- function ft(pe) {
1169
+ function xt(ye) {
1183
1170
  const {
1184
1171
  data: n,
1185
1172
  barColors: g,
1186
1173
  barPadding: Y,
1187
- showTicks: A,
1174
+ showTicks: V,
1188
1175
  leftMargin: _,
1189
1176
  rightMargin: me,
1190
1177
  truncateBy: ue,
1191
1178
  width: ge,
1192
1179
  height: Z,
1193
- topMargin: X,
1180
+ topMargin: G,
1194
1181
  bottomMargin: ie,
1195
- tooltip: O,
1196
- onSeriesMouseOver: se,
1197
- showLabels: he,
1182
+ tooltip: N,
1183
+ onSeriesMouseOver: re,
1184
+ showLabels: de,
1198
1185
  suffix: j,
1199
1186
  prefix: E,
1200
1187
  showValues: J,
1201
1188
  refValues: ee,
1202
1189
  maxValue: v,
1203
- onSeriesMouseClick: y,
1204
- selectedColor: F,
1190
+ onSeriesMouseClick: p,
1191
+ selectedColor: B,
1205
1192
  rtl: ae,
1206
1193
  labelOrder: le,
1207
1194
  maxBarThickness: K,
1208
1195
  minBarThickness: te,
1209
- resetSelectionOnDoubleClick: re,
1196
+ resetSelectionOnDoubleClick: se,
1210
1197
  detailsOnClick: R,
1211
1198
  barAxisTitle: xe,
1212
1199
  valueColor: ne,
1213
1200
  noOfTicks: $,
1214
- styles: p,
1201
+ styles: y,
1215
1202
  classNames: x,
1216
1203
  animate: C,
1217
1204
  colorDomain: z,
1218
- precision: N,
1219
- customLayers: D,
1220
- naLabel: I
1221
- } = pe, S = Me(null), b = Re(S, {
1205
+ precision: D,
1206
+ customLayers: O,
1207
+ naLabel: A
1208
+ } = ye, I = Me(null), b = _e(I, {
1222
1209
  once: C.once,
1223
1210
  amount: C.amount
1224
1211
  }), w = {
1225
- top: xe ? X + 25 : X,
1212
+ top: xe ? G + 25 : G,
1226
1213
  bottom: ie,
1227
1214
  left: _,
1228
1215
  right: me
1229
- }, [q, T] = L(void 0), [V, oe] = L(void 0), [G, P] = L(void 0), [Q, M] = L(void 0), H = ge - w.left - w.right, u = Z - w.top - w.bottom, k = n.map((l, s) => ({
1230
- ...l,
1231
- id: le ? `${l.label}` : `${s}`
1232
- })), m = le || k.map((l) => `${l.id}`), d = qe().domain([0, v]).range([0, H]).nice(), h = Ie().domain(m).range([
1216
+ }, [q, T] = L(void 0), [F, oe] = L(void 0), [W, P] = L(void 0), [Q, M] = L(void 0), H = ge - w.left - w.right, u = Z - w.top - w.bottom, k = n.map((a, s) => ({
1217
+ ...a,
1218
+ id: le ? `${a.label}` : `${s}`
1219
+ })), m = le || k.map((a) => `${a.id}`), d = Ee().domain([0, v]).range([0, H]).nice(), h = Le().domain(m).range([
1233
1220
  0,
1234
1221
  te ? Math.max(u, te * m.length) : K ? Math.min(u, K * m.length) : u
1235
1222
  ]).paddingInner(Y), c = d.ticks($);
1236
1223
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1237
1224
  /* @__PURE__ */ e.jsx(
1238
- ye.svg,
1225
+ pe.svg,
1239
1226
  {
1240
- ref: S,
1227
+ ref: I,
1241
1228
  width: `${ge}px`,
1242
1229
  height: `${Z}px`,
1243
1230
  viewBox: `0 0 ${ge} ${Z}`,
1244
1231
  direction: "ltr",
1245
1232
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${w.left},${w.top})`, children: [
1246
- A ? /* @__PURE__ */ e.jsx(
1233
+ V ? /* @__PURE__ */ e.jsx(
1247
1234
  st,
1248
1235
  {
1249
- values: c.filter((l) => l !== 0),
1250
- x: c.filter((l) => l !== 0).map((l) => d(l)),
1251
- y1: 0 - X,
1236
+ values: c.filter((a) => a !== 0),
1237
+ x: c.filter((a) => a !== 0).map((a) => d(a)),
1238
+ y1: 0 - G,
1252
1239
  y2: u + w.bottom,
1253
1240
  styles: {
1254
- gridLines: p?.xAxis?.gridLines,
1255
- labels: p?.xAxis?.labels
1241
+ gridLines: y?.xAxis?.gridLines,
1242
+ labels: y?.xAxis?.labels
1256
1243
  },
1257
1244
  classNames: {
1258
1245
  gridLines: x?.xAxis?.gridLines,
@@ -1262,31 +1249,31 @@ function ft(pe) {
1262
1249
  prefix: E,
1263
1250
  labelType: "secondary",
1264
1251
  showGridLines: !0,
1265
- precision: N
1252
+ precision: D
1266
1253
  }
1267
1254
  ) : null,
1268
1255
  /* @__PURE__ */ e.jsx(
1269
- _e,
1256
+ Xe,
1270
1257
  {
1271
1258
  x: H / 2,
1272
1259
  y: 0 - w.top + 15,
1273
- style: p?.xAxis?.title,
1260
+ style: y?.xAxis?.title,
1274
1261
  className: x?.xAxis?.title,
1275
1262
  text: xe
1276
1263
  }
1277
1264
  ),
1278
- D.filter((l) => l.position === "before").map((l) => l.layer),
1279
- /* @__PURE__ */ e.jsxs(Ue, { children: [
1265
+ O.filter((a) => a.position === "before").map((a) => a.layer),
1266
+ /* @__PURE__ */ e.jsxs(Re, { children: [
1280
1267
  k.map(
1281
- (l) => W(h(l.id)) ? null : /* @__PURE__ */ e.jsxs(
1282
- ye.g,
1268
+ (a) => X(h(a.id)) ? null : /* @__PURE__ */ e.jsxs(
1269
+ pe.g,
1283
1270
  {
1284
1271
  className: "undp-viz-low-opacity undp-viz-g-with-hover",
1285
1272
  variants: {
1286
- initial: { x: 0, y: h(`${l.id}`) },
1273
+ initial: { x: 0, y: h(`${a.id}`) },
1287
1274
  whileInView: {
1288
1275
  x: 0,
1289
- y: h(`${l.id}`),
1276
+ y: h(`${a.id}`),
1290
1277
  transition: { duration: C.duration }
1291
1278
  }
1292
1279
  },
@@ -1294,25 +1281,25 @@ function ft(pe) {
1294
1281
  animate: b ? "whileInView" : "initial",
1295
1282
  exit: { opacity: 0, transition: { duration: C.duration } },
1296
1283
  children: [
1297
- l.size.map((s, t) => /* @__PURE__ */ e.jsxs(
1298
- ye.g,
1284
+ a.size.map((s, t) => /* @__PURE__ */ e.jsxs(
1285
+ pe.g,
1299
1286
  {
1300
- opacity: F ? g[t] === F ? 1 : 0.3 : 1,
1301
- onMouseEnter: (r) => {
1302
- T({ ...l, sizeIndex: t }), M(r.clientY), P(r.clientX), se?.({ ...l, sizeIndex: t });
1287
+ opacity: B ? g[t] === B ? 1 : 0.3 : 1,
1288
+ onMouseEnter: (l) => {
1289
+ T({ ...a, sizeIndex: t }), M(l.clientY), P(l.clientX), re?.({ ...a, sizeIndex: t });
1303
1290
  },
1304
- onMouseMove: (r) => {
1305
- T({ ...l, sizeIndex: t }), M(r.clientY), P(r.clientX);
1291
+ onMouseMove: (l) => {
1292
+ T({ ...a, sizeIndex: t }), M(l.clientY), P(l.clientX);
1306
1293
  },
1307
1294
  onMouseLeave: () => {
1308
- T(void 0), P(void 0), M(void 0), se?.(void 0);
1295
+ T(void 0), P(void 0), M(void 0), re?.(void 0);
1309
1296
  },
1310
1297
  onClick: () => {
1311
- (y || R) && (We(V, { ...l, sizeIndex: t }) && re ? (oe(void 0), y?.(void 0)) : (oe({ ...l, sizeIndex: t }), y && y({ ...l, sizeIndex: t })));
1298
+ (p || R) && (Pe(F, { ...a, sizeIndex: t }) && se ? (oe(void 0), p?.(void 0)) : (oe({ ...a, sizeIndex: t }), p && p({ ...a, sizeIndex: t })));
1312
1299
  },
1313
1300
  children: [
1314
1301
  s ? /* @__PURE__ */ e.jsx(
1315
- ye.rect,
1302
+ pe.rect,
1316
1303
  {
1317
1304
  y: 0,
1318
1305
  style: { fill: g[t] },
@@ -1331,7 +1318,7 @@ function ft(pe) {
1331
1318
  whileInView: {
1332
1319
  width: d(s || 0),
1333
1320
  x: d(
1334
- t === 0 ? 0 : ke(l.size.filter((r, f) => f < t && r))
1321
+ t === 0 ? 0 : ke(a.size.filter((l, f) => f < t && l))
1335
1322
  ),
1336
1323
  fill: g[t],
1337
1324
  transition: { duration: C.duration }
@@ -1343,15 +1330,15 @@ function ft(pe) {
1343
1330
  t
1344
1331
  ) : null,
1345
1332
  J ? /* @__PURE__ */ e.jsx(
1346
- ye.text,
1333
+ pe.text,
1347
1334
  {
1348
1335
  y: h.bandwidth() / 2,
1349
1336
  style: {
1350
1337
  textAnchor: "middle",
1351
- ...p?.graphObjectValues || {}
1338
+ ...y?.graphObjectValues || {}
1352
1339
  },
1353
1340
  dy: "0.33em",
1354
- className: $e("graph-value text-sm", x?.graphObjectValues),
1341
+ className: De("graph-value text-sm", x?.graphObjectValues),
1355
1342
  exit: {
1356
1343
  opacity: 0,
1357
1344
  transition: { duration: C.duration }
@@ -1360,44 +1347,44 @@ function ft(pe) {
1360
1347
  initial: {
1361
1348
  x: d(0),
1362
1349
  opacity: 0,
1363
- fill: lt(g[t])
1350
+ fill: at(g[t])
1364
1351
  },
1365
1352
  whileInView: {
1366
1353
  x: d(
1367
- t === 0 ? 0 : ke(l.size.filter((r, f) => f < t && r))
1354
+ t === 0 ? 0 : ke(a.size.filter((l, f) => f < t && l))
1368
1355
  ) + d(s || 0) / 2,
1369
- opacity: s && d(s) / ze(s, I, N, E, j).length > 12 ? 1 : 0,
1370
- fill: lt(g[t]),
1356
+ opacity: s && d(s) / ze(s, A, D, E, j).length > 12 ? 1 : 0,
1357
+ fill: at(g[t]),
1371
1358
  transition: { duration: C.duration }
1372
1359
  }
1373
1360
  },
1374
1361
  initial: "initial",
1375
1362
  animate: b ? "whileInView" : "initial",
1376
- children: ze(s, I, N, E, j)
1363
+ children: ze(s, A, D, E, j)
1377
1364
  }
1378
1365
  ) : null
1379
1366
  ]
1380
1367
  },
1381
- `${l.label}-${z[t] || t}`
1368
+ `${a.label}-${z[t] || t}`
1382
1369
  )),
1383
- he ? /* @__PURE__ */ e.jsx(
1384
- ot,
1370
+ de ? /* @__PURE__ */ e.jsx(
1371
+ rt,
1385
1372
  {
1386
- value: `${l.label}`.length < ue ? `${l.label}` : `${`${l.label}`.substring(0, ue)}...`,
1373
+ value: `${a.label}`.length < ue ? `${a.label}` : `${`${a.label}`.substring(0, ue)}...`,
1387
1374
  y: 0,
1388
1375
  x: 0 - w.left,
1389
1376
  width: 0 + w.left,
1390
1377
  height: h.bandwidth(),
1391
- style: p?.yAxis?.labels,
1378
+ style: y?.yAxis?.labels,
1392
1379
  className: x?.yAxis?.labels,
1393
1380
  animate: C,
1394
1381
  isInView: b
1395
1382
  }
1396
1383
  ) : null,
1397
1384
  J ? /* @__PURE__ */ e.jsx(
1398
- ye.text,
1385
+ pe.text,
1399
1386
  {
1400
- className: $e(
1387
+ className: De(
1401
1388
  "graph-value graph-value-total text-sm",
1402
1389
  ne ? "" : " fill-primary-gray-700 dark:fill-primary-gray-300",
1403
1390
  x?.graphObjectValues
@@ -1405,7 +1392,7 @@ function ft(pe) {
1405
1392
  style: {
1406
1393
  ...ne ? { fill: ne } : {},
1407
1394
  textAnchor: "start",
1408
- ...p?.graphObjectValues || {}
1395
+ ...y?.graphObjectValues || {}
1409
1396
  },
1410
1397
  y: h.bandwidth() / 2,
1411
1398
  dx: 5,
@@ -1416,7 +1403,7 @@ function ft(pe) {
1416
1403
  opacity: 0
1417
1404
  },
1418
1405
  whileInView: {
1419
- x: d(ke(l.size.map((s) => s || 0))),
1406
+ x: d(ke(a.size.map((s) => s || 0))),
1420
1407
  opacity: 1,
1421
1408
  transition: { duration: C.duration }
1422
1409
  }
@@ -1428,9 +1415,9 @@ function ft(pe) {
1428
1415
  initial: "initial",
1429
1416
  animate: b ? "whileInView" : "initial",
1430
1417
  children: ze(
1431
- ke(l.size.filter((s) => s)),
1432
- I,
1433
- N,
1418
+ ke(a.size.filter((s) => s)),
1419
+ A,
1420
+ D,
1434
1421
  E,
1435
1422
  j
1436
1423
  )
@@ -1438,56 +1425,56 @@ function ft(pe) {
1438
1425
  ) : null
1439
1426
  ]
1440
1427
  },
1441
- l.label
1428
+ a.label
1442
1429
  )
1443
1430
  ),
1444
1431
  /* @__PURE__ */ e.jsx(
1445
- Ee,
1432
+ Ye,
1446
1433
  {
1447
1434
  x1: d(0),
1448
1435
  x2: d(0),
1449
1436
  y1: -2.5,
1450
1437
  y2: u + w.bottom,
1451
1438
  classNames: { axis: x?.yAxis?.axis },
1452
- styles: { axis: p?.yAxis?.axis }
1439
+ styles: { axis: y?.yAxis?.axis }
1453
1440
  }
1454
1441
  ),
1455
- ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((l, s) => /* @__PURE__ */ e.jsx(
1456
- nt,
1442
+ ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((a, s) => /* @__PURE__ */ e.jsx(
1443
+ ot,
1457
1444
  {
1458
- text: l.text,
1459
- color: l.color,
1460
- x: d(l.value),
1445
+ text: a.text,
1446
+ color: a.color,
1447
+ x: d(a.value),
1461
1448
  y1: 0 - w.top,
1462
1449
  y2: u + w.bottom,
1463
- textSide: d(l.value) > H * 0.75 || ae ? "left" : "right",
1464
- classNames: l.classNames,
1465
- styles: l.styles,
1450
+ textSide: d(a.value) > H * 0.75 || ae ? "left" : "right",
1451
+ classNames: a.classNames,
1452
+ styles: a.styles,
1466
1453
  animate: C,
1467
1454
  isInView: b
1468
1455
  },
1469
1456
  s
1470
1457
  )) }) : null
1471
1458
  ] }),
1472
- D.filter((l) => l.position === "after").map((l) => l.layer)
1459
+ O.filter((a) => a.position === "after").map((a) => a.layer)
1473
1460
  ] })
1474
1461
  }
1475
1462
  ),
1476
- q && O && G && Q ? /* @__PURE__ */ e.jsx(
1477
- Xe,
1463
+ q && N && W && Q ? /* @__PURE__ */ e.jsx(
1464
+ We,
1478
1465
  {
1479
1466
  data: q,
1480
- body: O,
1481
- xPos: G,
1467
+ body: N,
1468
+ xPos: W,
1482
1469
  yPos: Q,
1483
- backgroundStyle: p?.tooltip,
1470
+ backgroundStyle: y?.tooltip,
1484
1471
  className: x?.tooltip
1485
1472
  }
1486
1473
  ) : null,
1487
- R && V !== void 0 ? /* @__PURE__ */ e.jsx(
1488
- Ge,
1474
+ R && F !== void 0 ? /* @__PURE__ */ e.jsx(
1475
+ He,
1489
1476
  {
1490
- open: V !== void 0,
1477
+ open: F !== void 0,
1491
1478
  onClose: () => {
1492
1479
  oe(void 0);
1493
1480
  },
@@ -1495,61 +1482,61 @@ function ft(pe) {
1495
1482
  "div",
1496
1483
  {
1497
1484
  className: "graph-modal-content m-0",
1498
- dangerouslySetInnerHTML: typeof R == "string" ? { __html: Ye(R, V) } : void 0,
1499
- children: typeof R == "function" ? R(V) : null
1485
+ dangerouslySetInnerHTML: typeof R == "string" ? { __html: Ge(R, F) } : void 0,
1486
+ children: typeof R == "function" ? R(F) : null
1500
1487
  }
1501
1488
  )
1502
1489
  }
1503
1490
  ) : null
1504
1491
  ] });
1505
1492
  }
1506
- function yt(pe) {
1493
+ function ft(ye) {
1507
1494
  const {
1508
1495
  data: n,
1509
1496
  graphTitle: g,
1510
1497
  colors: Y = je.light.categoricalColors.colors,
1511
- sources: A,
1498
+ sources: V,
1512
1499
  graphDescription: _,
1513
1500
  barPadding: me = 0.25,
1514
1501
  showTicks: ue = !0,
1515
1502
  leftMargin: ge = 100,
1516
1503
  rightMargin: Z = 40,
1517
- truncateBy: X = 999,
1504
+ truncateBy: G = 999,
1518
1505
  height: ie,
1519
- width: O,
1520
- footNote: se,
1521
- colorDomain: he,
1506
+ width: N,
1507
+ footNote: re,
1508
+ colorDomain: de,
1522
1509
  colorLegendTitle: j,
1523
1510
  padding: E,
1524
1511
  backgroundColor: J = !1,
1525
1512
  topMargin: ee = 25,
1526
1513
  bottomMargin: v = 10,
1527
- tooltip: y,
1528
- onSeriesMouseOver: F,
1514
+ tooltip: p,
1515
+ onSeriesMouseOver: B,
1529
1516
  suffix: ae = "",
1530
1517
  prefix: le = "",
1531
1518
  showLabels: K = !0,
1532
1519
  relativeHeight: te,
1533
- showValues: re = !0,
1520
+ showValues: se = !0,
1534
1521
  refValues: R,
1535
1522
  graphID: xe,
1536
1523
  maxValue: ne,
1537
1524
  onSeriesMouseClick: $,
1538
- graphDownload: p = !1,
1525
+ graphDownload: y = !1,
1539
1526
  dataDownload: x = !1,
1540
1527
  language: C = "en",
1541
1528
  labelOrder: z,
1542
- minHeight: N = 0,
1543
- theme: D = "light",
1544
- maxBarThickness: I,
1545
- sortParameter: S,
1529
+ minHeight: D = 0,
1530
+ theme: O = "light",
1531
+ maxBarThickness: A,
1532
+ sortParameter: I,
1546
1533
  maxNumberOfBars: b,
1547
1534
  minBarThickness: w,
1548
1535
  showColorScale: q = !0,
1549
1536
  ariaLabel: T,
1550
- resetSelectionOnDoubleClick: V = !0,
1537
+ resetSelectionOnDoubleClick: F = !0,
1551
1538
  detailsOnClick: oe,
1552
- barAxisTitle: G,
1539
+ barAxisTitle: W,
1553
1540
  noOfTicks: P = 5,
1554
1541
  valueColor: Q,
1555
1542
  styles: M,
@@ -1560,29 +1547,28 @@ function yt(pe) {
1560
1547
  customLayers: d = [],
1561
1548
  timeline: h = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 },
1562
1549
  naLabel: c = "NA",
1563
- sortData: l
1564
- } = pe, [s, t] = L(0), [r, f] = L(0), [Ce, ce] = L(h.autoplay), U = Fe(
1565
- Ae(
1566
- n.filter((i) => i.date !== void 0 && i.date !== null),
1567
- (i) => i.date
1568
- ).map((i) => Be(`${i.date}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
1569
- (i, B) => it(i, B)
1570
- ), [fe, Oe] = L(h.autoplay ? 0 : U.length - 1), [de, be] = L(void 0), we = Me(null), Ne = Me(null);
1550
+ sortData: a
1551
+ } = ye, [s, t] = L(0), [l, f] = L(0), [Ce, ce] = L(h.autoplay), U = et(
1552
+ Ae(n, "date", !0).map(
1553
+ (i) => Se(`${i}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
1554
+ ),
1555
+ (i, S) => tt(i, S)
1556
+ ), [fe, Oe] = L(h.autoplay ? 0 : U.length - 1), [he, be] = L(void 0), ve = Me(null), Ne = Me(null);
1571
1557
  Ve(() => {
1572
- const i = new ResizeObserver((B) => {
1573
- t(O || B[0].target.clientWidth || 620), f(ie || B[0].target.clientHeight || 480);
1558
+ const i = new ResizeObserver((S) => {
1559
+ t(N || S[0].target.clientWidth || 620), f(ie || S[0].target.clientHeight || 480);
1574
1560
  });
1575
- return we.current && (f(we.current.clientHeight || 480), t(we.current.clientWidth || 620), O || i.observe(we.current)), () => i.disconnect();
1576
- }, [O, ie]), Ve(() => {
1561
+ return ve.current && (f(ve.current.clientHeight || 480), t(ve.current.clientWidth || 620), N || i.observe(ve.current)), () => i.disconnect();
1562
+ }, [N, ie]), Ve(() => {
1577
1563
  const i = setInterval(
1578
1564
  () => {
1579
- Oe((B) => B < U.length - 1 ? B + 1 : 0);
1565
+ Oe((S) => S < U.length - 1 ? S + 1 : 0);
1580
1566
  },
1581
1567
  (h.speed || 2) * 1e3
1582
1568
  );
1583
1569
  return Ce || clearInterval(i), () => clearInterval(i);
1584
1570
  }, [U, Ce, h.speed]);
1585
- const o = Pe(
1571
+ const o = Be(
1586
1572
  U,
1587
1573
  fe,
1588
1574
  h.showOnlyActiveDate,
@@ -1591,14 +1577,14 @@ function yt(pe) {
1591
1577
  return /* @__PURE__ */ e.jsx(
1592
1578
  "div",
1593
1579
  {
1594
- className: `${D || "light"} flex ${O ? "w-fit grow-0" : "w-full grow"}`,
1580
+ className: `${O || "light"} flex ${N ? "w-fit grow-0" : "w-full grow"}`,
1595
1581
  dir: C === "he" || C === "ar" ? "rtl" : void 0,
1596
1582
  children: /* @__PURE__ */ e.jsx(
1597
1583
  "div",
1598
1584
  {
1599
- className: $e(
1585
+ className: De(
1600
1586
  `${J ? J === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${C || "en"}`,
1601
- O ? "w-fit" : "w-full",
1587
+ N ? "w-fit" : "w-full",
1602
1588
  H?.graphContainer
1603
1589
  ),
1604
1590
  style: {
@@ -1614,8 +1600,8 @@ function yt(pe) {
1614
1600
  className: "flex grow",
1615
1601
  style: { padding: J ? E || "1rem" : E || 0 },
1616
1602
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 w-full grow justify-between", children: [
1617
- g || _ || p || x ? /* @__PURE__ */ e.jsx(
1618
- Ke,
1603
+ g || _ || y || x ? /* @__PURE__ */ e.jsx(
1604
+ Ue,
1619
1605
  {
1620
1606
  styles: {
1621
1607
  title: M?.title,
@@ -1627,8 +1613,8 @@ function yt(pe) {
1627
1613
  },
1628
1614
  graphTitle: g,
1629
1615
  graphDescription: _,
1630
- width: O,
1631
- graphDownload: p ? Ne.current : void 0,
1616
+ width: N,
1617
+ graphDownload: y ? Ne.current : void 0,
1632
1618
  dataDownload: x ? n.map((i) => i.data).filter((i) => i !== void 0).length > 0 ? n.map((i) => i.data).filter((i) => i !== void 0) : n.filter((i) => i !== void 0) : null
1633
1619
  }
1634
1620
  ) : null,
@@ -1642,11 +1628,11 @@ function yt(pe) {
1642
1628
  },
1643
1629
  className: "p-0 border-0 cursor-pointer bg-transparent",
1644
1630
  "aria-label": Ce ? "Click to pause animation" : "Click to play animation",
1645
- children: Ce ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
1631
+ children: Ce ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
1646
1632
  }
1647
1633
  ),
1648
1634
  /* @__PURE__ */ e.jsx(
1649
- He,
1635
+ Fe,
1650
1636
  {
1651
1637
  min: U[0],
1652
1638
  max: U[U.length - 1],
@@ -1664,63 +1650,63 @@ function yt(pe) {
1664
1650
  }
1665
1651
  )
1666
1652
  ] }) : null,
1667
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1653
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1668
1654
  q ? /* @__PURE__ */ e.jsx(
1669
- Qe,
1655
+ Je,
1670
1656
  {
1671
- width: O,
1672
- colorDomain: he,
1657
+ width: N,
1658
+ colorDomain: de,
1673
1659
  colors: Y,
1674
1660
  colorLegendTitle: j,
1675
1661
  setSelectedColor: be,
1676
1662
  showNAColor: !1
1677
1663
  }
1678
1664
  ) : null,
1679
- /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: we, "aria-label": "Graph area", children: (O || s) && (ie || r) ? /* @__PURE__ */ e.jsx(
1680
- ft,
1665
+ /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: ve, "aria-label": "Graph area", children: (N || s) && (ie || l) ? /* @__PURE__ */ e.jsx(
1666
+ xt,
1681
1667
  {
1682
- data: S !== void 0 ? S === "total" ? Le(
1668
+ data: I !== void 0 ? I === "total" ? Ie(
1683
1669
  Te(
1684
1670
  n,
1685
1671
  h.dateFormat || "yyyy"
1686
1672
  ).filter(
1687
- (i) => h.enabled ? i.date === De(
1673
+ (i) => h.enabled ? i.date === $e(
1688
1674
  new Date(U[fe]),
1689
1675
  h.dateFormat || "yyyy"
1690
1676
  ) : i
1691
1677
  ).filter(
1692
- (i) => u ? !i.size.every((B) => B == null) : i
1678
+ (i) => u ? !i.size.every((S) => S == null) : i
1693
1679
  ),
1694
- (i) => ke(i.size.filter((B) => !W(B))),
1695
- [l || "asc"]
1696
- ).filter((i, B) => b ? B < b : !0) : Le(
1680
+ (i) => ke(i.size.filter((S) => !X(S))),
1681
+ [a || "asc"]
1682
+ ).filter((i, S) => b ? S < b : !0) : Ie(
1697
1683
  Te(
1698
1684
  n,
1699
1685
  h.dateFormat || "yyyy"
1700
1686
  ).filter(
1701
- (i) => h.enabled ? i.date === De(
1687
+ (i) => h.enabled ? i.date === $e(
1702
1688
  new Date(U[fe]),
1703
1689
  h.dateFormat || "yyyy"
1704
1690
  ) : i
1705
1691
  ).filter(
1706
- (i) => u ? !i.size.every((B) => B == null) : i
1692
+ (i) => u ? !i.size.every((S) => S == null) : i
1707
1693
  ),
1708
- (i) => W(i.size[S]) ? -1 / 0 : i.size[S],
1709
- [l || "asc"]
1710
- ).filter((i, B) => b ? B < b : !0) : Te(
1694
+ (i) => X(i.size[I]) ? -1 / 0 : i.size[I],
1695
+ [a || "asc"]
1696
+ ).filter((i, S) => b ? S < b : !0) : Te(
1711
1697
  n,
1712
1698
  h.dateFormat || "yyyy"
1713
1699
  ).filter(
1714
- (i) => h.enabled ? i.date === De(
1700
+ (i) => h.enabled ? i.date === $e(
1715
1701
  new Date(U[fe]),
1716
1702
  h.dateFormat || "yyyy"
1717
1703
  ) : i
1718
- ).filter((i) => u ? !i.size.every((B) => B == null) : i).filter((i, B) => b ? B < b : !0),
1704
+ ).filter((i) => u ? !i.size.every((S) => S == null) : i).filter((i, S) => b ? S < b : !0),
1719
1705
  barColors: Y,
1720
- width: O || s,
1706
+ width: N || s,
1721
1707
  height: Math.max(
1722
- N,
1723
- ie || (te ? N ? (O || s) * te > N ? (O || s) * te : N : (O || s) * te : r)
1708
+ D,
1709
+ ie || (te ? D ? (N || s) * te > D ? (N || s) * te : D : (N || s) * te : l)
1724
1710
  ),
1725
1711
  barPadding: me,
1726
1712
  showTicks: ue,
@@ -1728,51 +1714,51 @@ function yt(pe) {
1728
1714
  rightMargin: Z,
1729
1715
  topMargin: ee,
1730
1716
  bottomMargin: v,
1731
- truncateBy: X,
1717
+ truncateBy: G,
1732
1718
  showLabels: K,
1733
- tooltip: y,
1734
- onSeriesMouseOver: F,
1735
- showValues: re,
1719
+ tooltip: p,
1720
+ onSeriesMouseOver: B,
1721
+ showValues: se,
1736
1722
  suffix: ae,
1737
1723
  prefix: le,
1738
1724
  refValues: R,
1739
- maxValue: W(ne) ? Math.max(
1725
+ maxValue: X(ne) ? Math.max(
1740
1726
  ...n.map(
1741
- (i) => ke(i.size.filter((B) => !W(B))) || 0
1727
+ (i) => ke(i.size.filter((S) => !X(S))) || 0
1742
1728
  )
1743
1729
  ) : ne,
1744
1730
  onSeriesMouseClick: $,
1745
- selectedColor: de,
1731
+ selectedColor: he,
1746
1732
  rtl: C === "he" || C === "ar",
1747
1733
  labelOrder: z,
1748
- maxBarThickness: I,
1734
+ maxBarThickness: A,
1749
1735
  minBarThickness: w,
1750
- resetSelectionOnDoubleClick: V,
1736
+ resetSelectionOnDoubleClick: F,
1751
1737
  detailsOnClick: oe,
1752
- barAxisTitle: G,
1738
+ barAxisTitle: W,
1753
1739
  noOfTicks: P,
1754
1740
  valueColor: Q,
1755
1741
  classNames: H,
1756
1742
  styles: M,
1757
1743
  animate: k === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : k || { duration: 0, once: !0, amount: 0 },
1758
- colorDomain: he,
1744
+ colorDomain: de,
1759
1745
  precision: m,
1760
1746
  customLayers: d,
1761
1747
  naLabel: c
1762
1748
  }
1763
1749
  ) : null })
1764
1750
  ] }) }),
1765
- A || se ? /* @__PURE__ */ e.jsx(
1766
- Je,
1751
+ V || re ? /* @__PURE__ */ e.jsx(
1752
+ qe,
1767
1753
  {
1768
1754
  styles: { footnote: M?.footnote, source: M?.source },
1769
1755
  classNames: {
1770
1756
  footnote: H?.footnote,
1771
1757
  source: H?.source
1772
1758
  },
1773
- sources: A,
1774
- footNote: se,
1775
- width: O
1759
+ sources: V,
1760
+ footNote: re,
1761
+ width: N
1776
1762
  }
1777
1763
  ) : null
1778
1764
  ] })
@@ -1783,65 +1769,65 @@ function yt(pe) {
1783
1769
  }
1784
1770
  );
1785
1771
  }
1786
- function pt(pe) {
1772
+ function pt(ye) {
1787
1773
  const {
1788
1774
  data: n,
1789
1775
  width: g,
1790
1776
  height: Y,
1791
- barColor: A,
1777
+ barColor: V,
1792
1778
  suffix: _,
1793
1779
  prefix: me,
1794
1780
  barPadding: ue,
1795
1781
  showLabels: ge,
1796
1782
  showValues: Z,
1797
- showTicks: X,
1783
+ showTicks: G,
1798
1784
  colorDomain: ie,
1799
- truncateBy: O,
1800
- rightMargin: se,
1801
- topMargin: he,
1785
+ truncateBy: N,
1786
+ rightMargin: re,
1787
+ topMargin: de,
1802
1788
  bottomMargin: j,
1803
1789
  leftMargin: E,
1804
1790
  tooltip: J,
1805
1791
  onSeriesMouseOver: ee,
1806
1792
  refValues: v,
1807
- selectedColor: y,
1808
- maxValue: F,
1793
+ selectedColor: p,
1794
+ maxValue: B,
1809
1795
  minValue: ae,
1810
1796
  highlightedDataPoints: le,
1811
1797
  onSeriesMouseClick: K,
1812
1798
  labelOrder: te,
1813
- maxBarThickness: re,
1799
+ maxBarThickness: se,
1814
1800
  minBarThickness: R,
1815
1801
  resetSelectionOnDoubleClick: xe,
1816
1802
  detailsOnClick: ne,
1817
1803
  barAxisTitle: $,
1818
- valueColor: p,
1804
+ valueColor: y,
1819
1805
  noOfTicks: x,
1820
1806
  styles: C,
1821
1807
  classNames: z,
1822
- dimmedOpacity: N,
1823
- animate: D,
1824
- precision: I,
1825
- customLayers: S,
1808
+ dimmedOpacity: D,
1809
+ animate: O,
1810
+ precision: A,
1811
+ customLayers: I,
1826
1812
  naLabel: b
1827
- } = pe, w = Me(null), q = Re(w, {
1828
- once: D.once,
1829
- amount: D.amount
1813
+ } = ye, w = Me(null), q = _e(w, {
1814
+ once: O.once,
1815
+ amount: O.amount
1830
1816
  }), T = {
1831
- top: he,
1817
+ top: de,
1832
1818
  bottom: j,
1833
1819
  left: $ ? E + 30 : E,
1834
- right: se
1835
- }, [V, oe] = L(void 0), [G, P] = L(void 0), [Q, M] = L(void 0), [H, u] = L(void 0), k = g - T.left - T.right, m = Y - T.top - T.bottom, d = qe().domain([ae, F]).range([m, 0]).nice(), h = n.map((t, r) => ({
1820
+ right: re
1821
+ }, [F, oe] = L(void 0), [W, P] = L(void 0), [Q, M] = L(void 0), [H, u] = L(void 0), k = g - T.left - T.right, m = Y - T.top - T.bottom, d = Ee().domain([ae, B]).range([m, 0]).nice(), h = n.map((t, l) => ({
1836
1822
  ...t,
1837
- id: te ? `${t.label}` : `${r}`
1838
- })), c = te || h.map((t) => `${t.id}`), l = Ie().domain(c).range([
1823
+ id: te ? `${t.label}` : `${l}`
1824
+ })), c = te || h.map((t) => `${t.id}`), a = Le().domain(c).range([
1839
1825
  0,
1840
- R ? Math.max(k, R * c.length) : re ? Math.min(k, re * c.length) : k
1826
+ R ? Math.max(k, R * c.length) : se ? Math.min(k, se * c.length) : k
1841
1827
  ]).paddingInner(ue), s = d.ticks(x);
1842
1828
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1843
1829
  /* @__PURE__ */ e.jsx(
1844
- ye.svg,
1830
+ pe.svg,
1845
1831
  {
1846
1832
  ref: w,
1847
1833
  width: `${g}px`,
@@ -1850,7 +1836,7 @@ function pt(pe) {
1850
1836
  direction: "ltr",
1851
1837
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${T.left},${T.top})`, children: [
1852
1838
  /* @__PURE__ */ e.jsx(
1853
- Ee,
1839
+ Ye,
1854
1840
  {
1855
1841
  y1: d(ae < 0 ? 0 : ae),
1856
1842
  y2: d(ae < 0 ? 0 : ae),
@@ -1859,14 +1845,14 @@ function pt(pe) {
1859
1845
  label: ze(
1860
1846
  ae < 0 ? 0 : ae,
1861
1847
  b,
1862
- I,
1848
+ A,
1863
1849
  me,
1864
1850
  _
1865
1851
  ),
1866
1852
  labelPos: {
1867
1853
  x: 0 - E,
1868
1854
  dx: 0,
1869
- dy: F < 0 ? "1em" : -5,
1855
+ dy: B < 0 ? "1em" : -5,
1870
1856
  y: d(ae < 0 ? 0 : ae)
1871
1857
  },
1872
1858
  classNames: {
@@ -1876,8 +1862,8 @@ function pt(pe) {
1876
1862
  styles: { axis: C?.xAxis?.axis, label: C?.yAxis?.labels }
1877
1863
  }
1878
1864
  ),
1879
- X ? /* @__PURE__ */ e.jsx(
1880
- ht,
1865
+ G ? /* @__PURE__ */ e.jsx(
1866
+ dt,
1881
1867
  {
1882
1868
  values: s.filter((t) => t !== 0),
1883
1869
  y: s.filter((t) => t !== 0).map((t) => d(t)),
@@ -1896,11 +1882,11 @@ function pt(pe) {
1896
1882
  labelType: "secondary",
1897
1883
  showGridLines: !0,
1898
1884
  labelPos: "vertical",
1899
- precision: I
1885
+ precision: A
1900
1886
  }
1901
1887
  ) : null,
1902
1888
  /* @__PURE__ */ e.jsx(
1903
- _e,
1889
+ Xe,
1904
1890
  {
1905
1891
  x: 0 - E - 15,
1906
1892
  y: m / 2,
@@ -1910,30 +1896,30 @@ function pt(pe) {
1910
1896
  rotate90: !0
1911
1897
  }
1912
1898
  ),
1913
- S.filter((t) => t.position === "before").map((t) => t.layer),
1914
- /* @__PURE__ */ e.jsxs(Ue, { children: [
1899
+ I.filter((t) => t.position === "before").map((t) => t.layer),
1900
+ /* @__PURE__ */ e.jsxs(Re, { children: [
1915
1901
  h.map(
1916
- (t, r) => W(l(t.id)) ? null : /* @__PURE__ */ e.jsxs(
1917
- ye.g,
1902
+ (t, l) => X(a(t.id)) ? null : /* @__PURE__ */ e.jsxs(
1903
+ pe.g,
1918
1904
  {
1919
1905
  className: "undp-viz-g-with-hover",
1920
1906
  initial: "initial",
1921
1907
  animate: q ? "whileInView" : "initial",
1922
1908
  variants: {
1923
1909
  initial: {
1924
- opacity: y ? t.color && A[ie.indexOf(t.color)] === y ? 1 : N : le.length !== 0 ? le.indexOf(t.label) !== -1 ? 0.85 : N : 0.85
1910
+ opacity: p ? t.color && V[ie.indexOf(t.color)] === p ? 1 : D : le.length !== 0 ? le.indexOf(t.label) !== -1 ? 0.85 : D : 0.85
1925
1911
  },
1926
1912
  whileInView: {
1927
- opacity: y ? t.color && A[ie.indexOf(t.color)] === y ? 1 : N : le.length !== 0 ? le.indexOf(t.label) !== -1 ? 0.85 : N : 0.85,
1928
- transition: { duration: D.duration }
1913
+ opacity: p ? t.color && V[ie.indexOf(t.color)] === p ? 1 : D : le.length !== 0 ? le.indexOf(t.label) !== -1 ? 0.85 : D : 0.85,
1914
+ transition: { duration: O.duration }
1929
1915
  }
1930
1916
  },
1931
- exit: { opacity: 0, transition: { duration: D.duration } },
1917
+ exit: { opacity: 0, transition: { duration: O.duration } },
1932
1918
  onMouseEnter: (f) => {
1933
1919
  oe(t), u(f.clientY), M(f.clientX), ee?.(t);
1934
1920
  },
1935
1921
  onClick: () => {
1936
- (K || ne) && (We(G, t) && xe ? (P(void 0), K?.(void 0)) : (P(t), K?.(t)));
1922
+ (K || ne) && (Pe(W, t) && xe ? (P(void 0), K?.(void 0)) : (P(t), K?.(t)));
1937
1923
  },
1938
1924
  onMouseMove: (f) => {
1939
1925
  oe(t), u(f.clientY), M(f.clientX);
@@ -1943,83 +1929,83 @@ function pt(pe) {
1943
1929
  },
1944
1930
  children: [
1945
1931
  t.size ? /* @__PURE__ */ e.jsx(
1946
- ye.rect,
1932
+ pe.rect,
1947
1933
  {
1948
- width: l.bandwidth(),
1934
+ width: a.bandwidth(),
1949
1935
  initial: "initial",
1950
1936
  animate: q ? "whileInView" : "initial",
1951
1937
  variants: {
1952
1938
  initial: {
1953
1939
  height: 0,
1954
- x: l(`${t.id}`),
1940
+ x: a(`${t.id}`),
1955
1941
  y: d(0),
1956
- fill: n.filter((f) => f.color).length === 0 ? A[0] : t.color ? A[ie.indexOf(t.color)] : je.gray
1942
+ fill: n.filter((f) => f.color).length === 0 ? V[0] : t.color ? V[ie.indexOf(t.color)] : je.gray
1957
1943
  },
1958
1944
  whileInView: {
1959
1945
  height: t.size ? Math.abs(d(t.size) - d(0)) : 0,
1960
1946
  y: t.size && t.size > 0 ? d(t.size) : d(0),
1961
- x: l(`${t.id}`),
1962
- fill: n.filter((f) => f.color).length === 0 ? A[0] : t.color ? A[ie.indexOf(t.color)] : je.gray,
1963
- transition: { duration: D.duration }
1947
+ x: a(`${t.id}`),
1948
+ fill: n.filter((f) => f.color).length === 0 ? V[0] : t.color ? V[ie.indexOf(t.color)] : je.gray,
1949
+ transition: { duration: O.duration }
1964
1950
  }
1965
1951
  },
1966
1952
  exit: {
1967
1953
  height: 0,
1968
1954
  y: d(0),
1969
- transition: { duration: D.duration }
1955
+ transition: { duration: O.duration }
1970
1956
  }
1971
1957
  }
1972
1958
  ) : null,
1973
1959
  ge ? /* @__PURE__ */ e.jsx(
1974
- dt,
1960
+ ct,
1975
1961
  {
1976
- value: `${t.label}`.length < O ? `${t.label}` : `${`${t.label}`.substring(0, O)}...`,
1962
+ value: `${t.label}`.length < N ? `${t.label}` : `${`${t.label}`.substring(0, N)}...`,
1977
1963
  y: (t.size || 0) < 0 ? 0 : d(0) + 5,
1978
- x: l(`${t.id}`),
1979
- width: l.bandwidth(),
1964
+ x: a(`${t.id}`),
1965
+ width: a.bandwidth(),
1980
1966
  height: (t.size || 0) < 0 ? d(0) - 5 : T.bottom,
1981
1967
  style: C?.xAxis?.labels,
1982
1968
  className: z?.xAxis?.labels,
1983
1969
  alignment: (t.size || 0) < 0 ? "bottom" : "top",
1984
- animate: D,
1970
+ animate: O,
1985
1971
  isInView: q
1986
1972
  }
1987
1973
  ) : null,
1988
1974
  Z ? /* @__PURE__ */ e.jsx(
1989
- ye.text,
1975
+ pe.text,
1990
1976
  {
1991
1977
  style: {
1992
1978
  textAnchor: "middle",
1993
1979
  ...C?.graphObjectValues || {}
1994
1980
  },
1995
- className: $e(
1981
+ className: De(
1996
1982
  "graph-value text-sm",
1997
- !p && A.length > 1 ? " fill-primary-gray-600 dark:fill-primary-gray-300" : "",
1983
+ !y && V.length > 1 ? " fill-primary-gray-600 dark:fill-primary-gray-300" : "",
1998
1984
  z?.graphObjectValues
1999
1985
  ),
2000
1986
  dy: t.size ? t.size >= 0 ? "-5px" : "1em" : "-5px",
2001
1987
  variants: {
2002
1988
  initial: {
2003
- x: l(`${t.id}`) + l.bandwidth() / 2,
1989
+ x: a(`${t.id}`) + a.bandwidth() / 2,
2004
1990
  y: d(0),
2005
1991
  opacity: 0,
2006
- fill: p || (n.filter((f) => f.color).length === 0 ? A[0] : t.color ? A[ie.indexOf(t.color)] : je.gray)
1992
+ fill: y || (n.filter((f) => f.color).length === 0 ? V[0] : t.color ? V[ie.indexOf(t.color)] : je.gray)
2007
1993
  },
2008
1994
  whileInView: {
2009
- x: l(`${t.id}`) + l.bandwidth() / 2,
1995
+ x: a(`${t.id}`) + a.bandwidth() / 2,
2010
1996
  y: d(t.size || 0),
2011
- fill: p || (n.filter((f) => f.color).length === 0 ? A[0] : t.color ? A[ie.indexOf(t.color)] : je.gray),
1997
+ fill: y || (n.filter((f) => f.color).length === 0 ? V[0] : t.color ? V[ie.indexOf(t.color)] : je.gray),
2012
1998
  opacity: 1,
2013
- transition: { duration: D.duration }
1999
+ transition: { duration: O.duration }
2014
2000
  }
2015
2001
  },
2016
2002
  initial: "initial",
2017
2003
  animate: q ? "whileInView" : "initial",
2018
2004
  exit: {
2019
2005
  opacity: 0,
2020
- transition: { duration: D.duration }
2006
+ transition: { duration: O.duration }
2021
2007
  },
2022
- children: ze(t.size, b, I, me, _)
2008
+ children: ze(t.size, b, A, me, _)
2023
2009
  }
2024
2010
  ) : null
2025
2011
  ]
@@ -2027,8 +2013,8 @@ function pt(pe) {
2027
2013
  t.label
2028
2014
  )
2029
2015
  ),
2030
- v ? /* @__PURE__ */ e.jsx(e.Fragment, { children: v.map((t, r) => /* @__PURE__ */ e.jsx(
2031
- ct,
2016
+ v ? /* @__PURE__ */ e.jsx(e.Fragment, { children: v.map((t, l) => /* @__PURE__ */ e.jsx(
2017
+ nt,
2032
2018
  {
2033
2019
  text: t.text,
2034
2020
  color: t.color,
@@ -2037,20 +2023,20 @@ function pt(pe) {
2037
2023
  x2: k + T.right,
2038
2024
  classNames: t.classNames,
2039
2025
  styles: t.styles,
2040
- animate: D,
2026
+ animate: O,
2041
2027
  isInView: q
2042
2028
  },
2043
- r
2029
+ l
2044
2030
  )) }) : null
2045
2031
  ] }),
2046
- S.filter((t) => t.position === "after").map((t) => t.layer)
2032
+ I.filter((t) => t.position === "after").map((t) => t.layer)
2047
2033
  ] })
2048
2034
  }
2049
2035
  ),
2050
- V && J && Q && H ? /* @__PURE__ */ e.jsx(
2051
- Xe,
2036
+ F && J && Q && H ? /* @__PURE__ */ e.jsx(
2037
+ We,
2052
2038
  {
2053
- data: V,
2039
+ data: F,
2054
2040
  body: J,
2055
2041
  xPos: Q,
2056
2042
  yPos: H,
@@ -2058,10 +2044,10 @@ function pt(pe) {
2058
2044
  className: z?.tooltip
2059
2045
  }
2060
2046
  ) : null,
2061
- ne && G !== void 0 ? /* @__PURE__ */ e.jsx(
2062
- Ge,
2047
+ ne && W !== void 0 ? /* @__PURE__ */ e.jsx(
2048
+ He,
2063
2049
  {
2064
- open: G !== void 0,
2050
+ open: W !== void 0,
2065
2051
  onClose: () => {
2066
2052
  P(void 0);
2067
2053
  },
@@ -2069,61 +2055,61 @@ function pt(pe) {
2069
2055
  "div",
2070
2056
  {
2071
2057
  className: "graph-modal-content m-0",
2072
- dangerouslySetInnerHTML: typeof ne == "string" ? { __html: Ye(ne, G) } : void 0,
2073
- children: typeof ne == "function" ? ne(G) : null
2058
+ dangerouslySetInnerHTML: typeof ne == "string" ? { __html: Ge(ne, W) } : void 0,
2059
+ children: typeof ne == "function" ? ne(W) : null
2074
2060
  }
2075
2061
  )
2076
2062
  }
2077
2063
  ) : null
2078
2064
  ] });
2079
2065
  }
2080
- function bt(pe) {
2066
+ function yt(ye) {
2081
2067
  const {
2082
2068
  data: n,
2083
2069
  graphTitle: g,
2084
2070
  colors: Y,
2085
- barPadding: A = 0.25,
2071
+ barPadding: V = 0.25,
2086
2072
  showTicks: _ = !0,
2087
2073
  leftMargin: me = 20,
2088
2074
  rightMargin: ue = 20,
2089
2075
  topMargin: ge = 20,
2090
2076
  bottomMargin: Z = 25,
2091
- truncateBy: X = 999,
2077
+ truncateBy: G = 999,
2092
2078
  showLabels: ie = !0,
2093
- showValues: O = !0,
2094
- backgroundColor: se = !1,
2095
- suffix: he = "",
2079
+ showValues: N = !0,
2080
+ backgroundColor: re = !1,
2081
+ suffix: de = "",
2096
2082
  prefix: j = "",
2097
2083
  sources: E,
2098
2084
  graphDescription: J,
2099
2085
  height: ee,
2100
2086
  width: v,
2101
- footNote: y,
2102
- colorDomain: F,
2087
+ footNote: p,
2088
+ colorDomain: B,
2103
2089
  colorLegendTitle: ae,
2104
2090
  padding: le,
2105
2091
  relativeHeight: K,
2106
2092
  tooltip: te,
2107
- onSeriesMouseOver: re,
2093
+ onSeriesMouseOver: se,
2108
2094
  refValues: R,
2109
2095
  showColorScale: xe = !0,
2110
2096
  graphID: ne,
2111
2097
  maxValue: $,
2112
- minValue: p,
2098
+ minValue: y,
2113
2099
  highlightedDataPoints: x = [],
2114
2100
  onSeriesMouseClick: C,
2115
2101
  graphDownload: z = !1,
2116
- dataDownload: N = !1,
2117
- language: D = "en",
2118
- theme: I = "light",
2119
- sortData: S,
2102
+ dataDownload: D = !1,
2103
+ language: O = "en",
2104
+ theme: A = "light",
2105
+ sortData: I,
2120
2106
  labelOrder: b,
2121
2107
  showNAColor: w = !0,
2122
2108
  minHeight: q = 0,
2123
2109
  maxBarThickness: T,
2124
- maxNumberOfBars: V,
2110
+ maxNumberOfBars: F,
2125
2111
  minBarThickness: oe,
2126
- ariaLabel: G,
2112
+ ariaLabel: W,
2127
2113
  resetSelectionOnDoubleClick: P = !0,
2128
2114
  detailsOnClick: Q,
2129
2115
  barAxisTitle: M,
@@ -2134,33 +2120,32 @@ function bt(pe) {
2134
2120
  filterNA: d = !0,
2135
2121
  animate: h = !1,
2136
2122
  dimmedOpacity: c = 0.3,
2137
- precision: l = 2,
2123
+ precision: a = 2,
2138
2124
  customLayers: s = [],
2139
2125
  timeline: t = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 },
2140
- naLabel: r = "NA"
2141
- } = pe, [f, Ce] = L(0), [ce, U] = L(0), [fe, Oe] = L(t.autoplay), de = Fe(
2142
- Ae(
2143
- n.filter((a) => a.date !== void 0 && a.date !== null),
2144
- (a) => a.date
2145
- ).map((a) => Be(`${a.date}`, t.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
2146
- (a, ve) => it(a, ve)
2147
- ), [be, we] = L(t.autoplay ? 0 : de.length - 1), [Ne, o] = L(void 0), i = Me(null), B = Me(null);
2126
+ naLabel: l = "NA"
2127
+ } = ye, [f, Ce] = L(0), [ce, U] = L(0), [fe, Oe] = L(t.autoplay), he = et(
2128
+ Ae(n, "date", !0).map(
2129
+ (r) => Se(`${r}`, t.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
2130
+ ),
2131
+ (r, we) => tt(r, we)
2132
+ ), [be, ve] = L(t.autoplay ? 0 : he.length - 1), [Ne, o] = L(void 0), i = Me(null), S = Me(null);
2148
2133
  Ve(() => {
2149
- const a = new ResizeObserver((ve) => {
2150
- Ce(v || ve[0].target.clientWidth || 620), U(ee || ve[0].target.clientHeight || 480);
2134
+ const r = new ResizeObserver((we) => {
2135
+ Ce(v || we[0].target.clientWidth || 620), U(ee || we[0].target.clientHeight || 480);
2151
2136
  });
2152
- return i.current && (U(i.current.clientHeight || 480), Ce(i.current.clientWidth || 620), v || a.observe(i.current)), () => a.disconnect();
2137
+ return i.current && (U(i.current.clientHeight || 480), Ce(i.current.clientWidth || 620), v || r.observe(i.current)), () => r.disconnect();
2153
2138
  }, [v, ee]), Ve(() => {
2154
- const a = setInterval(
2139
+ const r = setInterval(
2155
2140
  () => {
2156
- we((ve) => ve < de.length - 1 ? ve + 1 : 0);
2141
+ ve((we) => we < he.length - 1 ? we + 1 : 0);
2157
2142
  },
2158
2143
  (t.speed || 2) * 1e3
2159
2144
  );
2160
- return fe || clearInterval(a), () => clearInterval(a);
2161
- }, [de, fe, t.speed]);
2162
- const at = Pe(
2163
- de,
2145
+ return fe || clearInterval(r), () => clearInterval(r);
2146
+ }, [he, fe, t.speed]);
2147
+ const it = Be(
2148
+ he,
2164
2149
  be,
2165
2150
  t.showOnlyActiveDate,
2166
2151
  t.dateFormat || "yyyy"
@@ -2168,31 +2153,31 @@ function bt(pe) {
2168
2153
  return /* @__PURE__ */ e.jsx(
2169
2154
  "div",
2170
2155
  {
2171
- className: `${I || "light"} flex ${v ? "w-fit grow-0" : "w-full grow"}`,
2172
- dir: D === "he" || D === "ar" ? "rtl" : void 0,
2156
+ className: `${A || "light"} flex ${v ? "w-fit grow-0" : "w-full grow"}`,
2157
+ dir: O === "he" || O === "ar" ? "rtl" : void 0,
2173
2158
  children: /* @__PURE__ */ e.jsx(
2174
2159
  "div",
2175
2160
  {
2176
- className: $e(
2177
- `${se ? se === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D || "en"}`,
2161
+ className: De(
2162
+ `${re ? re === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${O || "en"}`,
2178
2163
  v ? "w-fit" : "w-full",
2179
2164
  m?.graphContainer
2180
2165
  ),
2181
2166
  style: {
2182
2167
  ...k?.graphContainer || {},
2183
- ...se && se !== !0 ? { backgroundColor: se } : {}
2168
+ ...re && re !== !0 ? { backgroundColor: re } : {}
2184
2169
  },
2185
2170
  id: ne,
2186
- ref: B,
2187
- "aria-label": G || `${g ? `The graph shows ${g}. ` : ""}This is a grouped bar chart. ${J ? ` ${J}` : ""}`,
2171
+ ref: S,
2172
+ "aria-label": W || `${g ? `The graph shows ${g}. ` : ""}This is a grouped bar chart. ${J ? ` ${J}` : ""}`,
2188
2173
  children: /* @__PURE__ */ e.jsx(
2189
2174
  "div",
2190
2175
  {
2191
2176
  className: "flex grow",
2192
- style: { padding: se ? le || "1rem" : le || 0 },
2177
+ style: { padding: re ? le || "1rem" : le || 0 },
2193
2178
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
2194
- g || J || z || N ? /* @__PURE__ */ e.jsx(
2195
- Ke,
2179
+ g || J || z || D ? /* @__PURE__ */ e.jsx(
2180
+ Ue,
2196
2181
  {
2197
2182
  styles: {
2198
2183
  title: k?.title,
@@ -2205,11 +2190,11 @@ function bt(pe) {
2205
2190
  graphTitle: g,
2206
2191
  graphDescription: J,
2207
2192
  width: v,
2208
- graphDownload: z ? B.current : void 0,
2209
- dataDownload: N ? n.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? n.map((a) => a.data).filter((a) => a !== void 0) : n.filter((a) => a !== void 0) : null
2193
+ graphDownload: z ? S.current : void 0,
2194
+ dataDownload: D ? n.map((r) => r.data).filter((r) => r !== void 0).length > 0 ? n.map((r) => r.data).filter((r) => r !== void 0) : n.filter((r) => r !== void 0) : null
2210
2195
  }
2211
2196
  ) : null,
2212
- t.enabled && de.length > 0 && at ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
2197
+ t.enabled && he.length > 0 && it ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
2213
2198
  /* @__PURE__ */ e.jsx(
2214
2199
  "button",
2215
2200
  {
@@ -2219,39 +2204,36 @@ function bt(pe) {
2219
2204
  },
2220
2205
  className: "p-0 border-0 cursor-pointer bg-transparent",
2221
2206
  "aria-label": fe ? "Click to pause animation" : "Click to play animation",
2222
- children: fe ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
2207
+ children: fe ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
2223
2208
  }
2224
2209
  ),
2225
2210
  /* @__PURE__ */ e.jsx(
2226
- He,
2211
+ Fe,
2227
2212
  {
2228
- min: de[0],
2229
- max: de[de.length - 1],
2230
- marks: at,
2213
+ min: he[0],
2214
+ max: he[he.length - 1],
2215
+ marks: it,
2231
2216
  step: null,
2232
- defaultValue: de[de.length - 1],
2233
- value: de[be],
2234
- onChangeComplete: (a) => {
2235
- we(de.indexOf(a));
2217
+ defaultValue: he[he.length - 1],
2218
+ value: he[be],
2219
+ onChangeComplete: (r) => {
2220
+ ve(he.indexOf(r));
2236
2221
  },
2237
- onChange: (a) => {
2238
- we(de.indexOf(a));
2222
+ onChange: (r) => {
2223
+ ve(he.indexOf(r));
2239
2224
  },
2240
2225
  "aria-label": "Time slider. Use arrow keys to adjust selected time period."
2241
2226
  }
2242
2227
  )
2243
2228
  ] }) : null,
2244
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2245
- xe && n.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ e.jsx(
2246
- Qe,
2229
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2230
+ xe && n.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ e.jsx(
2231
+ Je,
2247
2232
  {
2248
2233
  width: v,
2249
2234
  colorLegendTitle: ae,
2250
- colors: Y || je[I].categoricalColors.colors,
2251
- colorDomain: F || Ae(
2252
- n.filter((a) => a.color),
2253
- "color"
2254
- ).map((a) => a.color),
2235
+ colors: Y || je[A].categoricalColors.colors,
2236
+ colorDomain: B || Ae(n, "color", !0),
2255
2237
  setSelectedColor: o,
2256
2238
  showNAColor: w
2257
2239
  }
@@ -2265,63 +2247,55 @@ function bt(pe) {
2265
2247
  children: (v || f) && (ee || ce) ? /* @__PURE__ */ e.jsx(
2266
2248
  pt,
2267
2249
  {
2268
- data: S === "asc" ? rt(
2269
- Se(n, t.dateFormat || "yyyy").filter(
2270
- (a) => t.enabled ? a.date === De(
2271
- new Date(de[be]),
2250
+ data: I ? Ie(
2251
+ lt(n, t.dateFormat || "yyyy").filter(
2252
+ (r) => t.enabled ? r.date === $e(
2253
+ new Date(he[be]),
2272
2254
  t.dateFormat || "yyyy"
2273
- ) : a
2274
- ).filter((a) => d ? !W(a.size) : a),
2275
- (a) => a.size
2276
- ).filter((a, ve) => V ? ve < V : !0) : S === "desc" ? rt(
2277
- Se(n, t.dateFormat || "yyyy").filter(
2278
- (a) => t.enabled ? a.date === De(
2279
- new Date(de[be]),
2280
- t.dateFormat || "yyyy"
2281
- ) : a
2282
- ).filter((a) => d ? !W(a.size) : a),
2283
- (a) => a.size
2284
- ).reverse().filter((a, ve) => V ? ve < V : !0) : Se(n, t.dateFormat || "yyyy").filter(
2285
- (a) => t.enabled ? a.date === De(
2286
- new Date(de[be]),
2255
+ ) : r
2256
+ ).filter((r) => d ? !X(r.size) : r),
2257
+ [
2258
+ (r) => r.size === void 0 ? I === "asc" ? -1 / 0 : 1 / 0 : r.size
2259
+ ],
2260
+ [I]
2261
+ ).filter((r, we) => F ? we < F : !0) : lt(n, t.dateFormat || "yyyy").filter(
2262
+ (r) => t.enabled ? r.date === $e(
2263
+ new Date(he[be]),
2287
2264
  t.dateFormat || "yyyy"
2288
- ) : a
2289
- ).filter((a) => d ? !W(a.size) : a).filter((a, ve) => V ? ve < V : !0),
2290
- barColor: n.filter((a) => a.color).length === 0 ? Y ? [Y] : [je.primaryColors["blue-600"]] : Y || je[I].categoricalColors.colors,
2291
- colorDomain: n.filter((a) => a.color).length === 0 ? [] : F || Ae(
2292
- n.filter((a) => a.color),
2293
- "color"
2294
- ).map((a) => a.color),
2265
+ ) : r
2266
+ ).filter((r) => d ? !X(r.size) : r).filter((r, we) => F ? we < F : !0),
2267
+ barColor: n.filter((r) => r.color).length === 0 ? Y ? [Y] : [je.primaryColors["blue-600"]] : Y || je[A].categoricalColors.colors,
2268
+ colorDomain: n.filter((r) => r.color).length === 0 ? [] : B || Ae(n, "color", !0),
2295
2269
  width: v || f,
2296
2270
  refValues: R,
2297
2271
  height: Math.max(
2298
2272
  q,
2299
2273
  ee || (K ? q ? (v || f) * K > q ? (v || f) * K : q : (v || f) * K : ce)
2300
2274
  ),
2301
- suffix: he,
2275
+ suffix: de,
2302
2276
  prefix: j,
2303
- barPadding: A,
2277
+ barPadding: V,
2304
2278
  showLabels: ie,
2305
- showValues: O,
2279
+ showValues: N,
2306
2280
  showTicks: _,
2307
- truncateBy: X,
2281
+ truncateBy: G,
2308
2282
  leftMargin: me,
2309
2283
  rightMargin: ue,
2310
2284
  selectedColor: Ne,
2311
2285
  topMargin: ge,
2312
2286
  bottomMargin: Z,
2313
2287
  tooltip: te,
2314
- onSeriesMouseOver: re,
2315
- maxValue: W($) ? Math.max(
2316
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
2288
+ onSeriesMouseOver: se,
2289
+ maxValue: X($) ? Math.max(
2290
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
2317
2291
  ) < 0 ? 0 : Math.max(
2318
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
2292
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
2319
2293
  ) : $,
2320
- minValue: W(p) ? Math.min(
2321
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
2294
+ minValue: X(y) ? Math.min(
2295
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
2322
2296
  ) >= 0 ? 0 : Math.min(
2323
- ...n.filter((a) => !W(a.size)).map((a) => a.size)
2324
- ) : p,
2297
+ ...n.filter((r) => !X(r.size)).map((r) => r.size)
2298
+ ) : y,
2325
2299
  highlightedDataPoints: x,
2326
2300
  onSeriesMouseClick: C,
2327
2301
  labelOrder: b,
@@ -2336,16 +2310,16 @@ function bt(pe) {
2336
2310
  classNames: m,
2337
2311
  animate: h === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : h || { duration: 0, once: !0, amount: 0 },
2338
2312
  dimmedOpacity: c,
2339
- precision: l,
2313
+ precision: a,
2340
2314
  customLayers: s,
2341
- naLabel: r
2315
+ naLabel: l
2342
2316
  }
2343
2317
  ) : null
2344
2318
  }
2345
2319
  )
2346
2320
  ] }) }),
2347
- E || y ? /* @__PURE__ */ e.jsx(
2348
- Je,
2321
+ E || p ? /* @__PURE__ */ e.jsx(
2322
+ qe,
2349
2323
  {
2350
2324
  styles: { footnote: k?.footnote, source: k?.source },
2351
2325
  classNames: {
@@ -2353,7 +2327,7 @@ function bt(pe) {
2353
2327
  source: m?.source
2354
2328
  },
2355
2329
  sources: E,
2356
- footNote: y,
2330
+ footNote: p,
2357
2331
  width: v
2358
2332
  }
2359
2333
  ) : null
@@ -2365,110 +2339,110 @@ function bt(pe) {
2365
2339
  }
2366
2340
  );
2367
2341
  }
2368
- function vt(pe) {
2342
+ function bt(ye) {
2369
2343
  const {
2370
2344
  data: n,
2371
2345
  width: g,
2372
2346
  height: Y,
2373
- barColors: A,
2347
+ barColors: V,
2374
2348
  suffix: _,
2375
2349
  prefix: me,
2376
2350
  barPadding: ue,
2377
2351
  showLabels: ge,
2378
2352
  showValues: Z,
2379
- showTicks: X,
2353
+ showTicks: G,
2380
2354
  truncateBy: ie,
2381
- leftMargin: O,
2382
- rightMargin: se,
2383
- topMargin: he,
2355
+ leftMargin: N,
2356
+ rightMargin: re,
2357
+ topMargin: de,
2384
2358
  bottomMargin: j,
2385
2359
  tooltip: E,
2386
2360
  onSeriesMouseOver: J,
2387
2361
  refValues: ee,
2388
2362
  maxValue: v,
2389
- minValue: y,
2390
- onSeriesMouseClick: F,
2363
+ minValue: p,
2364
+ onSeriesMouseClick: B,
2391
2365
  selectedColor: ae,
2392
2366
  labelOrder: le,
2393
2367
  maxBarThickness: K,
2394
2368
  resetSelectionOnDoubleClick: te,
2395
- detailsOnClick: re,
2369
+ detailsOnClick: se,
2396
2370
  barAxisTitle: R,
2397
2371
  valueColor: xe,
2398
2372
  noOfTicks: ne,
2399
2373
  styles: $,
2400
- classNames: p,
2374
+ classNames: y,
2401
2375
  animate: x,
2402
2376
  colorDomain: C,
2403
2377
  precision: z,
2404
- customLayers: N,
2405
- naLabel: D
2406
- } = pe, I = Me(null), S = Re(I, {
2378
+ customLayers: D,
2379
+ naLabel: O
2380
+ } = ye, A = Me(null), I = _e(A, {
2407
2381
  once: x.once,
2408
2382
  amount: x.amount
2409
2383
  }), b = {
2410
- top: he,
2384
+ top: de,
2411
2385
  bottom: j,
2412
- left: R ? O + 30 : O,
2413
- right: se
2414
- }, [w, q] = L(void 0), [T, V] = L(void 0), [oe, G] = L(void 0), [P, Q] = L(void 0), M = g - b.left - b.right, H = Y - b.top - b.bottom, u = qe().domain([y, v]).range([H, 0]).nice(), k = n.map((l, s) => ({
2415
- ...l,
2416
- id: le ? `${l.label}` : `${s}`
2417
- })), m = le || k.map((l) => `${l.id}`), d = Ie().domain(m).range([
2386
+ left: R ? N + 30 : N,
2387
+ right: re
2388
+ }, [w, q] = L(void 0), [T, F] = L(void 0), [oe, W] = L(void 0), [P, Q] = L(void 0), M = g - b.left - b.right, H = Y - b.top - b.bottom, u = Ee().domain([p, v]).range([H, 0]).nice(), k = n.map((a, s) => ({
2389
+ ...a,
2390
+ id: le ? `${a.label}` : `${s}`
2391
+ })), m = le || k.map((a) => `${a.id}`), d = Le().domain(m).range([
2418
2392
  0,
2419
2393
  K ? Math.min(M, K * m.length) : M
2420
- ]).paddingInner(ue), h = Ie().domain(n[0].size.map((l, s) => `${s}`)).range([0, d.bandwidth()]).paddingInner(0.1), c = u.ticks(ne);
2394
+ ]).paddingInner(ue), h = Le().domain(n[0].size.map((a, s) => `${s}`)).range([0, d.bandwidth()]).paddingInner(0.1), c = u.ticks(ne);
2421
2395
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2422
2396
  /* @__PURE__ */ e.jsx(
2423
- ye.svg,
2397
+ pe.svg,
2424
2398
  {
2425
2399
  width: `${g}px`,
2426
2400
  height: `${Y}px`,
2427
2401
  viewBox: `0 0 ${g} ${Y}`,
2428
2402
  direction: "ltr",
2429
- ref: I,
2403
+ ref: A,
2430
2404
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${b.left},${b.top})`, children: [
2431
2405
  /* @__PURE__ */ e.jsx(
2432
- Ee,
2406
+ Ye,
2433
2407
  {
2434
- y1: u(y < 0 ? 0 : y),
2435
- y2: u(y < 0 ? 0 : y),
2436
- x1: 0 - O,
2408
+ y1: u(p < 0 ? 0 : p),
2409
+ y2: u(p < 0 ? 0 : p),
2410
+ x1: 0 - N,
2437
2411
  x2: M + b.right,
2438
2412
  label: ze(
2439
- y < 0 ? 0 : y,
2440
- D,
2413
+ p < 0 ? 0 : p,
2414
+ O,
2441
2415
  z,
2442
2416
  me,
2443
2417
  _
2444
2418
  ),
2445
2419
  labelPos: {
2446
- x: 0 - O,
2420
+ x: 0 - N,
2447
2421
  dx: 0,
2448
2422
  dy: v < 0 ? "1em" : -5,
2449
- y: u(y < 0 ? 0 : y)
2423
+ y: u(p < 0 ? 0 : p)
2450
2424
  },
2451
2425
  classNames: {
2452
- axis: p?.xAxis?.axis,
2453
- label: p?.yAxis?.labels
2426
+ axis: y?.xAxis?.axis,
2427
+ label: y?.yAxis?.labels
2454
2428
  },
2455
2429
  styles: { axis: $?.xAxis?.axis, label: $?.yAxis?.labels }
2456
2430
  }
2457
2431
  ),
2458
- X ? /* @__PURE__ */ e.jsx(
2459
- ht,
2432
+ G ? /* @__PURE__ */ e.jsx(
2433
+ dt,
2460
2434
  {
2461
- values: c.filter((l) => l !== 0),
2462
- y: c.filter((l) => l !== 0).map((l) => u(l)),
2463
- x1: 0 - O,
2435
+ values: c.filter((a) => a !== 0),
2436
+ y: c.filter((a) => a !== 0).map((a) => u(a)),
2437
+ x1: 0 - N,
2464
2438
  x2: M + b.right,
2465
2439
  styles: {
2466
2440
  gridLines: $?.yAxis?.gridLines,
2467
2441
  labels: $?.yAxis?.labels
2468
2442
  },
2469
2443
  classNames: {
2470
- gridLines: p?.yAxis?.gridLines,
2471
- labels: p?.yAxis?.labels
2444
+ gridLines: y?.yAxis?.gridLines,
2445
+ labels: y?.yAxis?.labels
2472
2446
  },
2473
2447
  suffix: _,
2474
2448
  prefix: me,
@@ -2479,57 +2453,57 @@ function vt(pe) {
2479
2453
  }
2480
2454
  ) : null,
2481
2455
  /* @__PURE__ */ e.jsx(
2482
- _e,
2456
+ Xe,
2483
2457
  {
2484
- x: 0 - O - 15,
2458
+ x: 0 - N - 15,
2485
2459
  y: H / 2,
2486
2460
  style: $?.yAxis?.title,
2487
- className: p?.yAxis?.title,
2461
+ className: y?.yAxis?.title,
2488
2462
  text: R,
2489
2463
  rotate90: !0
2490
2464
  }
2491
2465
  ),
2492
- N.filter((l) => l.position === "before").map((l) => l.layer),
2493
- /* @__PURE__ */ e.jsxs(Ue, { children: [
2466
+ D.filter((a) => a.position === "before").map((a) => a.layer),
2467
+ /* @__PURE__ */ e.jsxs(Re, { children: [
2494
2468
  k.map(
2495
- (l) => W(d(l.id)) ? null : /* @__PURE__ */ e.jsxs(
2496
- ye.g,
2469
+ (a) => X(d(a.id)) ? null : /* @__PURE__ */ e.jsxs(
2470
+ pe.g,
2497
2471
  {
2498
2472
  variants: {
2499
2473
  initial: {
2500
- x: d(`${l.id}`),
2474
+ x: d(`${a.id}`),
2501
2475
  y: 0
2502
2476
  },
2503
2477
  whileInView: {
2504
- x: d(`${l.id}`),
2478
+ x: d(`${a.id}`),
2505
2479
  y: 0,
2506
2480
  transition: { duration: x.duration }
2507
2481
  }
2508
2482
  },
2509
2483
  initial: "initial",
2510
- animate: S ? "whileInView" : "initial",
2484
+ animate: I ? "whileInView" : "initial",
2511
2485
  exit: { opacity: 0, transition: { duration: x.duration } },
2512
2486
  children: [
2513
- l.size.map((s, t) => /* @__PURE__ */ e.jsxs(
2514
- ye.g,
2487
+ a.size.map((s, t) => /* @__PURE__ */ e.jsxs(
2488
+ pe.g,
2515
2489
  {
2516
2490
  className: "undp-viz-g-with-hover",
2517
- opacity: ae ? A[t] === ae ? 1 : 0.3 : 0.85,
2518
- onMouseEnter: (r) => {
2519
- q({ ...l, sizeIndex: t }), Q(r.clientY), G(r.clientX), J?.({ ...l, sizeIndex: t });
2491
+ opacity: ae ? V[t] === ae ? 1 : 0.3 : 0.85,
2492
+ onMouseEnter: (l) => {
2493
+ q({ ...a, sizeIndex: t }), Q(l.clientY), W(l.clientX), J?.({ ...a, sizeIndex: t });
2520
2494
  },
2521
- onMouseMove: (r) => {
2522
- q({ ...l, sizeIndex: t }), Q(r.clientY), G(r.clientX);
2495
+ onMouseMove: (l) => {
2496
+ q({ ...a, sizeIndex: t }), Q(l.clientY), W(l.clientX);
2523
2497
  },
2524
2498
  onMouseLeave: () => {
2525
- q(void 0), G(void 0), Q(void 0), J?.(void 0);
2499
+ q(void 0), W(void 0), Q(void 0), J?.(void 0);
2526
2500
  },
2527
2501
  onClick: () => {
2528
- (F || re) && (We(T, { ...l, sizeIndex: t }) && te ? (V(void 0), F?.(void 0)) : (V({ ...l, sizeIndex: t }), F && F({ ...l, sizeIndex: t })));
2502
+ (B || se) && (Pe(T, { ...a, sizeIndex: t }) && te ? (F(void 0), B?.(void 0)) : (F({ ...a, sizeIndex: t }), B && B({ ...a, sizeIndex: t })));
2529
2503
  },
2530
2504
  children: [
2531
2505
  /* @__PURE__ */ e.jsx(
2532
- ye.rect,
2506
+ pe.rect,
2533
2507
  {
2534
2508
  x: h(`${t}`),
2535
2509
  width: h.bandwidth(),
@@ -2537,12 +2511,12 @@ function vt(pe) {
2537
2511
  initial: {
2538
2512
  height: 0,
2539
2513
  y: u(0),
2540
- fill: A[t]
2514
+ fill: V[t]
2541
2515
  },
2542
2516
  whileInView: {
2543
- height: W(s) ? 0 : Math.abs(u(s) - u(0)),
2544
- y: W(s) ? u(0) : s > 0 ? u(s) : u(0),
2545
- fill: A[t],
2517
+ height: X(s) ? 0 : Math.abs(u(s) - u(0)),
2518
+ y: X(s) ? u(0) : s > 0 ? u(s) : u(0),
2519
+ fill: V[t],
2546
2520
  transition: { duration: x.duration }
2547
2521
  }
2548
2522
  },
@@ -2552,19 +2526,19 @@ function vt(pe) {
2552
2526
  transition: { duration: x.duration }
2553
2527
  },
2554
2528
  initial: "initial",
2555
- animate: S ? "whileInView" : "initial"
2529
+ animate: I ? "whileInView" : "initial"
2556
2530
  }
2557
2531
  ),
2558
2532
  Z ? /* @__PURE__ */ e.jsx(
2559
- ye.text,
2533
+ pe.text,
2560
2534
  {
2561
2535
  x: h(`${t}`) + h.bandwidth() / 2,
2562
2536
  style: {
2563
- fill: xe || A[t],
2537
+ fill: xe || V[t],
2564
2538
  textAnchor: "middle",
2565
2539
  ...$?.graphObjectValues || {}
2566
2540
  },
2567
- className: $e("graph-value text-sm", p?.graphObjectValues),
2541
+ className: De("graph-value text-sm", y?.graphObjectValues),
2568
2542
  dy: s ? s >= 0 ? "-5px" : "1em" : "-5px",
2569
2543
  variants: {
2570
2544
  initial: { y: u(0), opacity: 0 },
@@ -2575,135 +2549,135 @@ function vt(pe) {
2575
2549
  }
2576
2550
  },
2577
2551
  initial: "initial",
2578
- animate: S ? "whileInView" : "initial",
2552
+ animate: I ? "whileInView" : "initial",
2579
2553
  exit: {
2580
2554
  opacity: 0,
2581
2555
  transition: { duration: x.duration }
2582
2556
  },
2583
- children: ze(s, D, z, me, _)
2557
+ children: ze(s, O, z, me, _)
2584
2558
  }
2585
2559
  ) : null
2586
2560
  ]
2587
2561
  },
2588
- `${l.label}-${C[t] || t}`
2562
+ `${a.label}-${C[t] || t}`
2589
2563
  )),
2590
2564
  ge ? /* @__PURE__ */ e.jsx(
2591
- dt,
2565
+ ct,
2592
2566
  {
2593
- value: `${l.label}`.length < ie ? `${l.label}` : `${`${l.label}`.substring(0, ie)}...`,
2567
+ value: `${a.label}`.length < ie ? `${a.label}` : `${`${a.label}`.substring(0, ie)}...`,
2594
2568
  y: u(0) + 5,
2595
2569
  x: 0,
2596
2570
  width: d.bandwidth(),
2597
2571
  height: b.bottom,
2598
2572
  style: $?.xAxis?.labels,
2599
- className: p?.xAxis?.labels,
2573
+ className: y?.xAxis?.labels,
2600
2574
  alignment: "top",
2601
2575
  animate: x,
2602
- isInView: S
2576
+ isInView: I
2603
2577
  }
2604
2578
  ) : null
2605
2579
  ]
2606
2580
  },
2607
- l.label
2581
+ a.label
2608
2582
  )
2609
2583
  ),
2610
- ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((l, s) => /* @__PURE__ */ e.jsx(
2611
- ct,
2584
+ ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((a, s) => /* @__PURE__ */ e.jsx(
2585
+ nt,
2612
2586
  {
2613
- text: l.text,
2614
- color: l.color,
2615
- y: u(l.value),
2616
- x1: 0 - O,
2587
+ text: a.text,
2588
+ color: a.color,
2589
+ y: u(a.value),
2590
+ x1: 0 - N,
2617
2591
  x2: M + b.right,
2618
- classNames: l.classNames,
2619
- styles: l.styles,
2592
+ classNames: a.classNames,
2593
+ styles: a.styles,
2620
2594
  animate: x,
2621
- isInView: S
2595
+ isInView: I
2622
2596
  },
2623
2597
  s
2624
2598
  )) }) : null
2625
2599
  ] }),
2626
- N.filter((l) => l.position === "after").map((l) => l.layer)
2600
+ D.filter((a) => a.position === "after").map((a) => a.layer)
2627
2601
  ] })
2628
2602
  }
2629
2603
  ),
2630
2604
  w && E && oe && P ? /* @__PURE__ */ e.jsx(
2631
- Xe,
2605
+ We,
2632
2606
  {
2633
2607
  data: w,
2634
2608
  body: E,
2635
2609
  xPos: oe,
2636
2610
  yPos: P,
2637
2611
  backgroundStyle: $?.tooltip,
2638
- className: p?.tooltip
2612
+ className: y?.tooltip
2639
2613
  }
2640
2614
  ) : null,
2641
- re && T !== void 0 ? /* @__PURE__ */ e.jsx(
2642
- Ge,
2615
+ se && T !== void 0 ? /* @__PURE__ */ e.jsx(
2616
+ He,
2643
2617
  {
2644
2618
  open: T !== void 0,
2645
2619
  onClose: () => {
2646
- V(void 0);
2620
+ F(void 0);
2647
2621
  },
2648
2622
  children: /* @__PURE__ */ e.jsx(
2649
2623
  "div",
2650
2624
  {
2651
2625
  className: "graph-modal-content m-0",
2652
- dangerouslySetInnerHTML: typeof re == "string" ? { __html: Ye(re, T) } : void 0,
2653
- children: typeof re == "function" ? re(T) : null
2626
+ dangerouslySetInnerHTML: typeof se == "string" ? { __html: Ge(se, T) } : void 0,
2627
+ children: typeof se == "function" ? se(T) : null
2654
2628
  }
2655
2629
  )
2656
2630
  }
2657
2631
  ) : null
2658
2632
  ] });
2659
2633
  }
2660
- function wt(pe) {
2634
+ function vt(ye) {
2661
2635
  const {
2662
2636
  data: n,
2663
2637
  graphTitle: g,
2664
2638
  colors: Y = je.light.categoricalColors.colors,
2665
- sources: A,
2639
+ sources: V,
2666
2640
  graphDescription: _,
2667
2641
  barPadding: me = 0.25,
2668
2642
  showTicks: ue = !0,
2669
2643
  leftMargin: ge = 20,
2670
2644
  rightMargin: Z = 20,
2671
- topMargin: X = 20,
2645
+ topMargin: G = 20,
2672
2646
  bottomMargin: ie = 25,
2673
- truncateBy: O = 999,
2674
- showLabels: se = !0,
2675
- showValues: he = !0,
2647
+ truncateBy: N = 999,
2648
+ showLabels: re = !0,
2649
+ showValues: de = !0,
2676
2650
  backgroundColor: j = !1,
2677
2651
  suffix: E = "",
2678
2652
  prefix: J = "",
2679
2653
  height: ee,
2680
2654
  width: v,
2681
- footNote: y,
2682
- colorDomain: F,
2655
+ footNote: p,
2656
+ colorDomain: B,
2683
2657
  colorLegendTitle: ae,
2684
2658
  padding: le,
2685
2659
  relativeHeight: K,
2686
2660
  tooltip: te,
2687
- onSeriesMouseOver: re,
2661
+ onSeriesMouseOver: se,
2688
2662
  refValues: R,
2689
2663
  graphID: xe,
2690
2664
  maxValue: ne,
2691
2665
  minValue: $,
2692
- onSeriesMouseClick: p,
2666
+ onSeriesMouseClick: y,
2693
2667
  graphDownload: x = !1,
2694
2668
  dataDownload: C = !1,
2695
2669
  language: z = "en",
2696
- theme: N = "light",
2697
- labelOrder: D,
2698
- minHeight: I = 0,
2699
- maxBarThickness: S,
2670
+ theme: D = "light",
2671
+ labelOrder: O,
2672
+ minHeight: A = 0,
2673
+ maxBarThickness: I,
2700
2674
  ariaLabel: b,
2701
2675
  resetSelectionOnDoubleClick: w = !0,
2702
2676
  detailsOnClick: q,
2703
2677
  barAxisTitle: T,
2704
- noOfTicks: V = 5,
2678
+ noOfTicks: F = 5,
2705
2679
  valueColor: oe,
2706
- styles: G,
2680
+ styles: W,
2707
2681
  classNames: P,
2708
2682
  filterNA: Q = !0,
2709
2683
  showColorScale: M = !0,
@@ -2714,18 +2688,17 @@ function wt(pe) {
2714
2688
  naLabel: d = "NA",
2715
2689
  sortParameter: h,
2716
2690
  sortData: c
2717
- } = pe, [l, s] = L(0), [t, r] = L(0), [f, Ce] = L(m.autoplay), ce = Fe(
2718
- Ae(
2719
- n.filter((o) => o.date !== void 0 && o.date !== null),
2720
- (o) => o.date
2721
- ).map((o) => Be(`${o.date}`, m.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
2722
- (o, i) => it(o, i)
2723
- ), [U, fe] = L(m.autoplay ? 0 : ce.length - 1), [Oe, de] = L(void 0), be = Me(null), we = Me(null);
2691
+ } = ye, [a, s] = L(0), [t, l] = L(0), [f, Ce] = L(m.autoplay), ce = et(
2692
+ Ae(n, "date", !0).map(
2693
+ (o) => Se(`${o}`, m.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
2694
+ ),
2695
+ (o, i) => tt(o, i)
2696
+ ), [U, fe] = L(m.autoplay ? 0 : ce.length - 1), [Oe, he] = L(void 0), be = Me(null), ve = Me(null);
2724
2697
  Ve(() => {
2725
2698
  const o = new ResizeObserver((i) => {
2726
- s(v || i[0].target.clientWidth || 620), r(ee || i[0].target.clientHeight || 480);
2699
+ s(v || i[0].target.clientWidth || 620), l(ee || i[0].target.clientHeight || 480);
2727
2700
  });
2728
- return be.current && (r(be.current.clientHeight || 480), s(be.current.clientWidth || 620), v || o.observe(be.current)), () => o.disconnect();
2701
+ return be.current && (l(be.current.clientHeight || 480), s(be.current.clientWidth || 620), v || o.observe(be.current)), () => o.disconnect();
2729
2702
  }, [v, ee]), Ve(() => {
2730
2703
  const o = setInterval(
2731
2704
  () => {
@@ -2735,7 +2708,7 @@ function wt(pe) {
2735
2708
  );
2736
2709
  return f || clearInterval(o), () => clearInterval(o);
2737
2710
  }, [ce, f, m.speed]);
2738
- const Ne = Pe(
2711
+ const Ne = Be(
2739
2712
  ce,
2740
2713
  U,
2741
2714
  m.showOnlyActiveDate,
@@ -2744,22 +2717,22 @@ function wt(pe) {
2744
2717
  return /* @__PURE__ */ e.jsx(
2745
2718
  "div",
2746
2719
  {
2747
- className: `${N || "light"} flex ${v ? "w-fit grow-0" : "w-full grow"}`,
2720
+ className: `${D || "light"} flex ${v ? "w-fit grow-0" : "w-full grow"}`,
2748
2721
  dir: z === "he" || z === "ar" ? "rtl" : void 0,
2749
2722
  children: /* @__PURE__ */ e.jsx(
2750
2723
  "div",
2751
2724
  {
2752
- className: $e(
2725
+ className: De(
2753
2726
  `${j ? j === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z || "en"}`,
2754
2727
  v ? "w-fit" : "w-full",
2755
2728
  P?.graphContainer
2756
2729
  ),
2757
2730
  style: {
2758
- ...G?.graphContainer || {},
2731
+ ...W?.graphContainer || {},
2759
2732
  ...j && j !== !0 ? { backgroundColor: j } : {}
2760
2733
  },
2761
2734
  id: xe,
2762
- ref: we,
2735
+ ref: ve,
2763
2736
  "aria-label": b || `${g ? `The graph shows ${g}. ` : ""}This is a grouped bar chart. ${_ ? ` ${_}` : ""}`,
2764
2737
  children: /* @__PURE__ */ e.jsx(
2765
2738
  "div",
@@ -2768,11 +2741,11 @@ function wt(pe) {
2768
2741
  style: { padding: j ? le || "1rem" : le || 0 },
2769
2742
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
2770
2743
  g || _ || x || C ? /* @__PURE__ */ e.jsx(
2771
- Ke,
2744
+ Ue,
2772
2745
  {
2773
2746
  styles: {
2774
- title: G?.title,
2775
- description: G?.description
2747
+ title: W?.title,
2748
+ description: W?.description
2776
2749
  },
2777
2750
  classNames: {
2778
2751
  title: P?.title,
@@ -2781,7 +2754,7 @@ function wt(pe) {
2781
2754
  graphTitle: g,
2782
2755
  graphDescription: _,
2783
2756
  width: v,
2784
- graphDownload: x ? we.current : void 0,
2757
+ graphDownload: x ? ve.current : void 0,
2785
2758
  dataDownload: C ? n.map((o) => o.data).filter((o) => o !== void 0).length > 0 ? n.map((o) => o.data).filter((o) => o !== void 0) : n.filter((o) => o !== void 0) : null
2786
2759
  }
2787
2760
  ) : null,
@@ -2795,11 +2768,11 @@ function wt(pe) {
2795
2768
  },
2796
2769
  className: "p-0 border-0 cursor-pointer bg-transparent",
2797
2770
  "aria-label": f ? "Click to pause animation" : "Click to play animation",
2798
- children: f ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
2771
+ children: f ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
2799
2772
  }
2800
2773
  ),
2801
2774
  /* @__PURE__ */ e.jsx(
2802
- He,
2775
+ Fe,
2803
2776
  {
2804
2777
  min: ce[0],
2805
2778
  max: ce[ce.length - 1],
@@ -2817,78 +2790,78 @@ function wt(pe) {
2817
2790
  }
2818
2791
  )
2819
2792
  ] }) : null,
2820
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2793
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2821
2794
  M ? /* @__PURE__ */ e.jsx(
2822
- Qe,
2795
+ Je,
2823
2796
  {
2824
2797
  width: v,
2825
- colorDomain: F,
2798
+ colorDomain: B,
2826
2799
  colors: Y,
2827
2800
  colorLegendTitle: ae,
2828
- setSelectedColor: de,
2801
+ setSelectedColor: he,
2829
2802
  showNAColor: !1
2830
2803
  }
2831
2804
  ) : null,
2832
- /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: be, "aria-label": "Graph area", children: (v || l) && (ee || t) ? /* @__PURE__ */ e.jsx(
2833
- vt,
2805
+ /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: be, "aria-label": "Graph area", children: (v || a) && (ee || t) ? /* @__PURE__ */ e.jsx(
2806
+ bt,
2834
2807
  {
2835
- data: h !== void 0 ? h === "total" ? Le(
2808
+ data: h !== void 0 ? h === "total" ? Ie(
2836
2809
  Te(
2837
2810
  n,
2838
2811
  m.dateFormat || "yyyy"
2839
2812
  ).filter(
2840
- (o) => m.enabled ? o.date === De(
2813
+ (o) => m.enabled ? o.date === $e(
2841
2814
  new Date(ce[U]),
2842
2815
  m.dateFormat || "yyyy"
2843
2816
  ) : o
2844
2817
  ).filter(
2845
2818
  (o) => Q ? !o.size.every((i) => i == null) : o
2846
2819
  ),
2847
- (o) => ke(o.size.filter((i) => !W(i))),
2820
+ (o) => ke(o.size.filter((i) => !X(i))),
2848
2821
  [c || "asc"]
2849
- ) : Le(
2822
+ ) : Ie(
2850
2823
  Te(
2851
2824
  n,
2852
2825
  m.dateFormat || "yyyy"
2853
2826
  ).filter(
2854
- (o) => m.enabled ? o.date === De(
2827
+ (o) => m.enabled ? o.date === $e(
2855
2828
  new Date(ce[U]),
2856
2829
  m.dateFormat || "yyyy"
2857
2830
  ) : o
2858
2831
  ).filter(
2859
2832
  (o) => Q ? !o.size.every((i) => i == null) : o
2860
2833
  ),
2861
- (o) => W(o.size[h]) ? -1 / 0 : o.size[h],
2834
+ (o) => X(o.size[h]) ? -1 / 0 : o.size[h],
2862
2835
  [c || "asc"]
2863
2836
  ) : Te(
2864
2837
  n,
2865
2838
  m.dateFormat || "yyyy"
2866
2839
  ).filter((o) => Q ? !o.size.every((i) => i == null) : o),
2867
2840
  barColors: Y,
2868
- width: v || l,
2841
+ width: v || a,
2869
2842
  height: Math.max(
2870
- I,
2871
- ee || (K ? I ? (v || l) * K > I ? (v || l) * K : I : (v || l) * K : t)
2843
+ A,
2844
+ ee || (K ? A ? (v || a) * K > A ? (v || a) * K : A : (v || a) * K : t)
2872
2845
  ),
2873
2846
  suffix: E,
2874
2847
  prefix: J,
2875
2848
  barPadding: me,
2876
- showLabels: se,
2877
- showValues: he,
2849
+ showLabels: re,
2850
+ showValues: de,
2878
2851
  showTicks: ue,
2879
- truncateBy: O,
2852
+ truncateBy: N,
2880
2853
  leftMargin: ge,
2881
2854
  rightMargin: Z,
2882
- topMargin: X,
2855
+ topMargin: G,
2883
2856
  bottomMargin: ie,
2884
2857
  tooltip: te,
2885
- onSeriesMouseOver: re,
2858
+ onSeriesMouseOver: se,
2886
2859
  refValues: R,
2887
- maxValue: W(ne) ? Math.max(
2860
+ maxValue: X(ne) ? Math.max(
2888
2861
  ...n.map(
2889
2862
  (o) => Math.max(
2890
2863
  ...o.size.filter(
2891
- (i) => !W(i)
2864
+ (i) => !X(i)
2892
2865
  )
2893
2866
  )
2894
2867
  )
@@ -2896,16 +2869,16 @@ function wt(pe) {
2896
2869
  ...n.map(
2897
2870
  (o) => Math.max(
2898
2871
  ...o.size.filter(
2899
- (i) => !W(i)
2872
+ (i) => !X(i)
2900
2873
  )
2901
2874
  )
2902
2875
  )
2903
2876
  ) : ne,
2904
- minValue: W($) ? Math.min(
2877
+ minValue: X($) ? Math.min(
2905
2878
  ...n.map(
2906
2879
  (o) => Math.min(
2907
2880
  ...o.size.filter(
2908
- (i) => !W(i)
2881
+ (i) => !X(i)
2909
2882
  )
2910
2883
  )
2911
2884
  )
@@ -2913,40 +2886,40 @@ function wt(pe) {
2913
2886
  ...n.map(
2914
2887
  (o) => Math.min(
2915
2888
  ...o.size.filter(
2916
- (i) => !W(i)
2889
+ (i) => !X(i)
2917
2890
  )
2918
2891
  )
2919
2892
  )
2920
2893
  ) : $,
2921
- onSeriesMouseClick: p,
2894
+ onSeriesMouseClick: y,
2922
2895
  selectedColor: Oe,
2923
- labelOrder: D,
2924
- maxBarThickness: S,
2896
+ labelOrder: O,
2897
+ maxBarThickness: I,
2925
2898
  resetSelectionOnDoubleClick: w,
2926
2899
  detailsOnClick: q,
2927
2900
  barAxisTitle: T,
2928
- noOfTicks: V,
2901
+ noOfTicks: F,
2929
2902
  valueColor: oe,
2930
- styles: G,
2903
+ styles: W,
2931
2904
  classNames: P,
2932
2905
  animate: H === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : H || { duration: 0, once: !0, amount: 0 },
2933
- colorDomain: F,
2906
+ colorDomain: B,
2934
2907
  precision: u,
2935
2908
  customLayers: k,
2936
2909
  naLabel: d
2937
2910
  }
2938
2911
  ) : null })
2939
2912
  ] }) }),
2940
- A || y ? /* @__PURE__ */ e.jsx(
2941
- Je,
2913
+ V || p ? /* @__PURE__ */ e.jsx(
2914
+ qe,
2942
2915
  {
2943
- styles: { footnote: G?.footnote, source: G?.source },
2916
+ styles: { footnote: W?.footnote, source: W?.source },
2944
2917
  classNames: {
2945
2918
  footnote: P?.footnote,
2946
2919
  source: P?.source
2947
2920
  },
2948
- sources: A,
2949
- footNote: y,
2921
+ sources: V,
2922
+ footNote: p,
2950
2923
  width: v
2951
2924
  }
2952
2925
  ) : null
@@ -2958,77 +2931,77 @@ function wt(pe) {
2958
2931
  }
2959
2932
  );
2960
2933
  }
2961
- function Ct(pe) {
2934
+ function wt(ye) {
2962
2935
  const {
2963
2936
  data: n,
2964
2937
  width: g,
2965
2938
  height: Y,
2966
- barColors: A,
2939
+ barColors: V,
2967
2940
  barPadding: _,
2968
2941
  showLabels: me,
2969
2942
  showTicks: ue,
2970
2943
  truncateBy: ge,
2971
2944
  leftMargin: Z,
2972
- topMargin: X,
2945
+ topMargin: G,
2973
2946
  bottomMargin: ie,
2974
- rightMargin: O,
2975
- tooltip: se,
2976
- onSeriesMouseOver: he,
2947
+ rightMargin: N,
2948
+ tooltip: re,
2949
+ onSeriesMouseOver: de,
2977
2950
  suffix: j,
2978
2951
  prefix: E,
2979
2952
  showValues: J,
2980
2953
  refValues: ee,
2981
2954
  maxValue: v,
2982
- onSeriesMouseClick: y,
2983
- selectedColor: F,
2955
+ onSeriesMouseClick: p,
2956
+ selectedColor: B,
2984
2957
  labelOrder: ae,
2985
2958
  maxBarThickness: le,
2986
2959
  minBarThickness: K,
2987
2960
  resetSelectionOnDoubleClick: te,
2988
- detailsOnClick: re,
2961
+ detailsOnClick: se,
2989
2962
  barAxisTitle: R,
2990
2963
  valueColor: xe,
2991
2964
  noOfTicks: ne,
2992
2965
  styles: $,
2993
- classNames: p,
2966
+ classNames: y,
2994
2967
  animate: x,
2995
2968
  colorDomain: C,
2996
2969
  precision: z,
2997
- customLayers: N,
2998
- naLabel: D
2999
- } = pe, I = Me(null), S = Re(I, {
2970
+ customLayers: D,
2971
+ naLabel: O
2972
+ } = ye, A = Me(null), I = _e(A, {
3000
2973
  once: x.once,
3001
2974
  amount: x.amount
3002
2975
  }), b = {
3003
- top: X,
2976
+ top: G,
3004
2977
  bottom: ie,
3005
2978
  left: R ? Z + 30 : Z,
3006
- right: O
3007
- }, [w, q] = L(void 0), [T, V] = L(void 0), [oe, G] = L(void 0), [P, Q] = L(void 0), M = g - b.left - b.right, H = Y - b.top - b.bottom, u = qe().domain([0, v]).range([H, 0]).nice(), k = n.map((c, l) => ({
2979
+ right: N
2980
+ }, [w, q] = L(void 0), [T, F] = L(void 0), [oe, W] = L(void 0), [P, Q] = L(void 0), M = g - b.left - b.right, H = Y - b.top - b.bottom, u = Ee().domain([0, v]).range([H, 0]).nice(), k = n.map((c, a) => ({
3008
2981
  ...c,
3009
- id: ae ? `${c.label}` : `${l}`
3010
- })), m = ae || k.map((c) => `${c.id}`), d = Ie().domain(m).range([
2982
+ id: ae ? `${c.label}` : `${a}`
2983
+ })), m = ae || k.map((c) => `${c.id}`), d = Le().domain(m).range([
3011
2984
  0,
3012
2985
  K ? Math.max(M, K * m.length) : le ? Math.min(M, le * m.length) : M
3013
2986
  ]).paddingInner(_), h = u.ticks(ne);
3014
2987
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3015
2988
  /* @__PURE__ */ e.jsx(
3016
- ye.svg,
2989
+ pe.svg,
3017
2990
  {
3018
2991
  width: `${g}px`,
3019
2992
  height: `${Y}px`,
3020
2993
  viewBox: `0 0 ${g} ${Y}`,
3021
2994
  direction: "ltr",
3022
- ref: I,
2995
+ ref: A,
3023
2996
  children: /* @__PURE__ */ e.jsxs("g", { transform: `translate(${b.left},${b.top})`, children: [
3024
2997
  /* @__PURE__ */ e.jsx(
3025
- Ee,
2998
+ Ye,
3026
2999
  {
3027
3000
  y1: u(0),
3028
3001
  y2: u(0),
3029
3002
  x1: 0 - Z,
3030
3003
  x2: M + b.right,
3031
- label: ze(0, D, z, E, j),
3004
+ label: ze(0, O, z, E, j),
3032
3005
  labelPos: {
3033
3006
  x: 0 - Z,
3034
3007
  y: u(0),
@@ -3036,14 +3009,14 @@ function Ct(pe) {
3036
3009
  dy: -5
3037
3010
  },
3038
3011
  classNames: {
3039
- axis: p?.xAxis?.axis,
3040
- label: p?.yAxis?.labels
3012
+ axis: y?.xAxis?.axis,
3013
+ label: y?.yAxis?.labels
3041
3014
  },
3042
3015
  styles: { axis: $?.xAxis?.axis, label: $?.yAxis?.labels }
3043
3016
  }
3044
3017
  ),
3045
3018
  ue ? /* @__PURE__ */ e.jsx(
3046
- ht,
3019
+ dt,
3047
3020
  {
3048
3021
  values: h.filter((c) => c !== 0),
3049
3022
  y: h.filter((c) => c !== 0).map((c) => u(c)),
@@ -3054,8 +3027,8 @@ function Ct(pe) {
3054
3027
  labels: $?.yAxis?.labels
3055
3028
  },
3056
3029
  classNames: {
3057
- gridLines: p?.yAxis?.gridLines,
3058
- labels: p?.yAxis?.labels
3030
+ gridLines: y?.yAxis?.gridLines,
3031
+ labels: y?.yAxis?.labels
3059
3032
  },
3060
3033
  suffix: j,
3061
3034
  prefix: E,
@@ -3066,21 +3039,21 @@ function Ct(pe) {
3066
3039
  }
3067
3040
  ) : null,
3068
3041
  /* @__PURE__ */ e.jsx(
3069
- _e,
3042
+ Xe,
3070
3043
  {
3071
3044
  x: 0 - Z - 15,
3072
3045
  y: H / 2,
3073
3046
  style: $?.yAxis?.title,
3074
- className: p?.yAxis?.title,
3047
+ className: y?.yAxis?.title,
3075
3048
  text: R,
3076
3049
  rotate90: !0
3077
3050
  }
3078
3051
  ),
3079
- N.filter((c) => c.position === "before").map((c) => c.layer),
3080
- /* @__PURE__ */ e.jsxs(Ue, { children: [
3052
+ D.filter((c) => c.position === "before").map((c) => c.layer),
3053
+ /* @__PURE__ */ e.jsxs(Re, { children: [
3081
3054
  k.map(
3082
- (c) => W(d(c.id)) ? null : /* @__PURE__ */ e.jsxs(
3083
- ye.g,
3055
+ (c) => X(d(c.id)) ? null : /* @__PURE__ */ e.jsxs(
3056
+ pe.g,
3084
3057
  {
3085
3058
  className: "undp-viz-low-opacity undp-viz-g-with-hover",
3086
3059
  variants: {
@@ -3093,48 +3066,48 @@ function Ct(pe) {
3093
3066
  },
3094
3067
  transition: { duration: x.duration },
3095
3068
  initial: "initial",
3096
- animate: S ? "whileInView" : "initial",
3069
+ animate: I ? "whileInView" : "initial",
3097
3070
  exit: { opacity: 0, transition: { duration: x.duration } },
3098
3071
  children: [
3099
- c.size.map((l, s) => /* @__PURE__ */ e.jsxs(
3100
- ye.g,
3072
+ c.size.map((a, s) => /* @__PURE__ */ e.jsxs(
3073
+ pe.g,
3101
3074
  {
3102
- opacity: F ? A[s] === F ? 1 : 0.3 : 1,
3075
+ opacity: B ? V[s] === B ? 1 : 0.3 : 1,
3103
3076
  onMouseEnter: (t) => {
3104
- q({ ...c, sizeIndex: s }), Q(t.clientY), G(t.clientX), he?.({ ...c, sizeIndex: s });
3077
+ q({ ...c, sizeIndex: s }), Q(t.clientY), W(t.clientX), de?.({ ...c, sizeIndex: s });
3105
3078
  },
3106
3079
  onMouseMove: (t) => {
3107
- q({ ...c, sizeIndex: s }), Q(t.clientY), G(t.clientX);
3080
+ q({ ...c, sizeIndex: s }), Q(t.clientY), W(t.clientX);
3108
3081
  },
3109
3082
  onMouseLeave: () => {
3110
- q(void 0), G(void 0), Q(void 0), he?.(void 0);
3083
+ q(void 0), W(void 0), Q(void 0), de?.(void 0);
3111
3084
  },
3112
3085
  onClick: () => {
3113
- (y || re) && (We(T, { ...c, sizeIndex: s }) && te ? (V(void 0), y?.(void 0)) : (V({ ...c, sizeIndex: s }), y && y({ ...c, sizeIndex: s })));
3086
+ (p || se) && (Pe(T, { ...c, sizeIndex: s }) && te ? (F(void 0), p?.(void 0)) : (F({ ...c, sizeIndex: s }), p && p({ ...c, sizeIndex: s })));
3114
3087
  },
3115
3088
  children: [
3116
3089
  /* @__PURE__ */ e.jsx(
3117
- ye.rect,
3090
+ pe.rect,
3118
3091
  {
3119
3092
  x: 0,
3120
3093
  width: d.bandwidth(),
3121
3094
  variants: {
3122
3095
  initial: {
3123
3096
  height: 0,
3124
- fill: A[s],
3097
+ fill: V[s],
3125
3098
  y: u(0)
3126
3099
  },
3127
3100
  whileInView: {
3128
3101
  height: Math.abs(
3129
- u(ke(c.size.filter((t, r) => r <= s && t))) - u(ke(c.size.filter((t, r) => r < s && t)))
3102
+ u(ke(c.size.filter((t, l) => l <= s && t))) - u(ke(c.size.filter((t, l) => l < s && t)))
3130
3103
  ),
3131
- y: u(ke(c.size.filter((t, r) => r <= s && t))),
3132
- fill: A[s],
3104
+ y: u(ke(c.size.filter((t, l) => l <= s && t))),
3105
+ fill: V[s],
3133
3106
  transition: { duration: x.duration }
3134
3107
  }
3135
3108
  },
3136
3109
  initial: "initial",
3137
- animate: S ? "whileInView" : "initial",
3110
+ animate: I ? "whileInView" : "initial",
3138
3111
  exit: {
3139
3112
  height: 0,
3140
3113
  y: u(0),
@@ -3143,37 +3116,37 @@ function Ct(pe) {
3143
3116
  }
3144
3117
  ),
3145
3118
  J ? /* @__PURE__ */ e.jsx(
3146
- ye.text,
3119
+ pe.text,
3147
3120
  {
3148
3121
  x: d.bandwidth() / 2,
3149
3122
  style: {
3150
- fill: lt(A[s]),
3123
+ fill: at(V[s]),
3151
3124
  textAnchor: "middle",
3152
3125
  ...$?.graphObjectValues || {}
3153
3126
  },
3154
- className: $e("graph-value text-sm", p?.graphObjectValues),
3127
+ className: De("graph-value text-sm", y?.graphObjectValues),
3155
3128
  dy: "0.33em",
3156
3129
  variants: {
3157
3130
  initial: {
3158
3131
  y: u(0),
3159
3132
  opacity: 0,
3160
- fill: lt(A[s])
3133
+ fill: at(V[s])
3161
3134
  },
3162
3135
  whileInView: {
3163
- y: u(ke(c.size.filter((t, r) => r <= s && t))) + Math.abs(
3164
- u(ke(c.size.filter((t, r) => r <= s && t))) - u(ke(c.size.filter((t, r) => r < s && t)))
3136
+ y: u(ke(c.size.filter((t, l) => l <= s && t))) + Math.abs(
3137
+ u(ke(c.size.filter((t, l) => l <= s && t))) - u(ke(c.size.filter((t, l) => l < s && t)))
3165
3138
  ) / 2,
3166
- opacity: l && Math.abs(
3167
- u(ke(c.size.filter((t, r) => r <= s && t))) - u(ke(c.size.filter((t, r) => r < s && t)))
3139
+ opacity: a && Math.abs(
3140
+ u(ke(c.size.filter((t, l) => l <= s && t))) - u(ke(c.size.filter((t, l) => l < s && t)))
3168
3141
  ) > 20 ? 1 : 0,
3169
- fill: lt(A[s]),
3142
+ fill: at(V[s]),
3170
3143
  transition: { duration: x.duration }
3171
3144
  }
3172
3145
  },
3173
3146
  initial: "initial",
3174
- animate: S ? "whileInView" : "initial",
3147
+ animate: I ? "whileInView" : "initial",
3175
3148
  exit: { opacity: 0, transition: { duration: x.duration } },
3176
- children: ze(l, D, z, E, j)
3149
+ children: ze(a, O, z, E, j)
3177
3150
  }
3178
3151
  ) : null
3179
3152
  ]
@@ -3181,7 +3154,7 @@ function Ct(pe) {
3181
3154
  `${c.label}-${C[s] || s}`
3182
3155
  )),
3183
3156
  me ? /* @__PURE__ */ e.jsx(
3184
- dt,
3157
+ ct,
3185
3158
  {
3186
3159
  value: `${c.label}`.length < ge ? `${c.label}` : `${`${c.label}`.substring(0, ge)}...`,
3187
3160
  y: u(0) + 5,
@@ -3189,14 +3162,14 @@ function Ct(pe) {
3189
3162
  width: d.bandwidth(),
3190
3163
  height: b.bottom,
3191
3164
  style: $?.xAxis?.labels,
3192
- className: p?.xAxis?.labels,
3165
+ className: y?.xAxis?.labels,
3193
3166
  alignment: "top",
3194
3167
  animate: x,
3195
- isInView: S
3168
+ isInView: I
3196
3169
  }
3197
3170
  ) : null,
3198
3171
  J ? /* @__PURE__ */ e.jsx(
3199
- ye.text,
3172
+ pe.text,
3200
3173
  {
3201
3174
  style: {
3202
3175
  ...xe && { fill: xe },
@@ -3205,10 +3178,10 @@ function Ct(pe) {
3205
3178
  },
3206
3179
  x: d.bandwidth() / 2,
3207
3180
  dy: -10,
3208
- className: $e(
3181
+ className: De(
3209
3182
  "graph-value graph-value-total",
3210
3183
  xe ? "text-sm" : "fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",
3211
- p?.graphObjectValues
3184
+ y?.graphObjectValues
3212
3185
  ),
3213
3186
  variants: {
3214
3187
  initial: {
@@ -3216,7 +3189,7 @@ function Ct(pe) {
3216
3189
  opacity: 0
3217
3190
  },
3218
3191
  whileInView: {
3219
- y: u(ke(c.size.map((l) => l || 0))),
3192
+ y: u(ke(c.size.map((a) => a || 0))),
3220
3193
  opacity: 1,
3221
3194
  transition: { duration: x.duration }
3222
3195
  }
@@ -3226,10 +3199,10 @@ function Ct(pe) {
3226
3199
  transition: { duration: x.duration }
3227
3200
  },
3228
3201
  initial: "initial",
3229
- animate: S ? "whileInView" : "initial",
3202
+ animate: I ? "whileInView" : "initial",
3230
3203
  children: ze(
3231
- ke(c.size.filter((l) => l)),
3232
- D,
3204
+ ke(c.size.filter((a) => a)),
3205
+ O,
3233
3206
  z,
3234
3207
  E,
3235
3208
  j
@@ -3241,8 +3214,8 @@ function Ct(pe) {
3241
3214
  c.label
3242
3215
  )
3243
3216
  ),
3244
- ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((c, l) => /* @__PURE__ */ e.jsx(
3245
- ct,
3217
+ ee ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ee.map((c, a) => /* @__PURE__ */ e.jsx(
3218
+ nt,
3246
3219
  {
3247
3220
  text: c.text,
3248
3221
  color: c.color,
@@ -3252,92 +3225,92 @@ function Ct(pe) {
3252
3225
  classNames: c.classNames,
3253
3226
  styles: c.styles,
3254
3227
  animate: x,
3255
- isInView: S
3228
+ isInView: I
3256
3229
  },
3257
- l
3230
+ a
3258
3231
  )) }) : null
3259
3232
  ] }),
3260
- N.filter((c) => c.position === "after").map((c) => c.layer)
3233
+ D.filter((c) => c.position === "after").map((c) => c.layer)
3261
3234
  ] })
3262
3235
  }
3263
3236
  ),
3264
- w && se && oe && P ? /* @__PURE__ */ e.jsx(
3265
- Xe,
3237
+ w && re && oe && P ? /* @__PURE__ */ e.jsx(
3238
+ We,
3266
3239
  {
3267
3240
  data: w,
3268
- body: se,
3241
+ body: re,
3269
3242
  xPos: oe,
3270
3243
  yPos: P,
3271
3244
  backgroundStyle: $?.tooltip,
3272
- className: p?.tooltip
3245
+ className: y?.tooltip
3273
3246
  }
3274
3247
  ) : null,
3275
- re && T !== void 0 ? /* @__PURE__ */ e.jsx(
3276
- Ge,
3248
+ se && T !== void 0 ? /* @__PURE__ */ e.jsx(
3249
+ He,
3277
3250
  {
3278
3251
  open: T !== void 0,
3279
3252
  onClose: () => {
3280
- V(void 0);
3253
+ F(void 0);
3281
3254
  },
3282
3255
  children: /* @__PURE__ */ e.jsx(
3283
3256
  "div",
3284
3257
  {
3285
3258
  className: "graph-modal-content m-0",
3286
- dangerouslySetInnerHTML: typeof re == "string" ? { __html: Ye(re, T) } : void 0,
3287
- children: typeof re == "function" ? re(T) : null
3259
+ dangerouslySetInnerHTML: typeof se == "string" ? { __html: Ge(se, T) } : void 0,
3260
+ children: typeof se == "function" ? se(T) : null
3288
3261
  }
3289
3262
  )
3290
3263
  }
3291
3264
  ) : null
3292
3265
  ] });
3293
3266
  }
3294
- function kt(pe) {
3267
+ function Ct(ye) {
3295
3268
  const {
3296
3269
  data: n,
3297
3270
  graphTitle: g,
3298
3271
  colors: Y = je.light.categoricalColors.colors,
3299
- sources: A,
3272
+ sources: V,
3300
3273
  graphDescription: _,
3301
3274
  barPadding: me = 0.25,
3302
3275
  showTicks: ue = !0,
3303
3276
  leftMargin: ge = 20,
3304
3277
  rightMargin: Z = 20,
3305
- topMargin: X = 20,
3278
+ topMargin: G = 20,
3306
3279
  bottomMargin: ie = 25,
3307
- truncateBy: O = 999,
3308
- showLabels: se = !0,
3309
- showValues: he = !0,
3280
+ truncateBy: N = 999,
3281
+ showLabels: re = !0,
3282
+ showValues: de = !0,
3310
3283
  backgroundColor: j = !1,
3311
3284
  showColorScale: E = !0,
3312
3285
  suffix: J = "",
3313
3286
  prefix: ee = "",
3314
3287
  height: v,
3315
- width: y,
3316
- footNote: F,
3288
+ width: p,
3289
+ footNote: B,
3317
3290
  colorDomain: ae,
3318
3291
  colorLegendTitle: le,
3319
3292
  padding: K,
3320
3293
  tooltip: te,
3321
- onSeriesMouseOver: re,
3294
+ onSeriesMouseOver: se,
3322
3295
  relativeHeight: R,
3323
3296
  refValues: xe,
3324
3297
  graphID: ne,
3325
3298
  maxValue: $,
3326
- onSeriesMouseClick: p,
3299
+ onSeriesMouseClick: y,
3327
3300
  graphDownload: x = !1,
3328
3301
  dataDownload: C = !1,
3329
3302
  language: z = "en",
3330
- theme: N = "light",
3331
- labelOrder: D,
3332
- minHeight: I = 0,
3333
- maxBarThickness: S,
3303
+ theme: D = "light",
3304
+ labelOrder: O,
3305
+ minHeight: A = 0,
3306
+ maxBarThickness: I,
3334
3307
  sortParameter: b,
3335
3308
  maxNumberOfBars: w,
3336
3309
  minBarThickness: q,
3337
3310
  ariaLabel: T,
3338
- resetSelectionOnDoubleClick: V = !0,
3311
+ resetSelectionOnDoubleClick: F = !0,
3339
3312
  detailsOnClick: oe,
3340
- barAxisTitle: G,
3313
+ barAxisTitle: W,
3341
3314
  noOfTicks: P = 5,
3342
3315
  valueColor: Q,
3343
3316
  styles: M,
@@ -3348,29 +3321,28 @@ function kt(pe) {
3348
3321
  customLayers: d = [],
3349
3322
  timeline: h = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 },
3350
3323
  naLabel: c = "NA",
3351
- sortData: l
3352
- } = pe, [s, t] = L(0), [r, f] = L(0), [Ce, ce] = L(h.autoplay), U = Fe(
3353
- Ae(
3354
- n.filter((i) => i.date !== void 0 && i.date !== null),
3355
- (i) => i.date
3356
- ).map((i) => Be(`${i.date}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
3357
- (i, B) => it(i, B)
3358
- ), [fe, Oe] = L(h.autoplay ? 0 : U.length - 1), [de, be] = L(void 0), we = Me(null), Ne = Me(null);
3324
+ sortData: a
3325
+ } = ye, [s, t] = L(0), [l, f] = L(0), [Ce, ce] = L(h.autoplay), U = et(
3326
+ Ae(n, "date", !0).map(
3327
+ (i) => Se(`${i}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
3328
+ ),
3329
+ (i, S) => tt(i, S)
3330
+ ), [fe, Oe] = L(h.autoplay ? 0 : U.length - 1), [he, be] = L(void 0), ve = Me(null), Ne = Me(null);
3359
3331
  Ve(() => {
3360
- const i = new ResizeObserver((B) => {
3361
- t(y || B[0].target.clientWidth || 620), f(v || B[0].target.clientHeight || 480);
3332
+ const i = new ResizeObserver((S) => {
3333
+ t(p || S[0].target.clientWidth || 620), f(v || S[0].target.clientHeight || 480);
3362
3334
  });
3363
- return we.current && (f(we.current.clientHeight || 480), t(we.current.clientWidth || 620), y || i.observe(we.current)), () => i.disconnect();
3364
- }, [y, v]), Ve(() => {
3335
+ return ve.current && (f(ve.current.clientHeight || 480), t(ve.current.clientWidth || 620), p || i.observe(ve.current)), () => i.disconnect();
3336
+ }, [p, v]), Ve(() => {
3365
3337
  const i = setInterval(
3366
3338
  () => {
3367
- Oe((B) => B < U.length - 1 ? B + 1 : 0);
3339
+ Oe((S) => S < U.length - 1 ? S + 1 : 0);
3368
3340
  },
3369
3341
  (h.speed || 2) * 1e3
3370
3342
  );
3371
3343
  return Ce || clearInterval(i), () => clearInterval(i);
3372
3344
  }, [U, Ce, h.speed]);
3373
- const o = Pe(
3345
+ const o = Be(
3374
3346
  U,
3375
3347
  fe,
3376
3348
  h.showOnlyActiveDate,
@@ -3379,14 +3351,14 @@ function kt(pe) {
3379
3351
  return /* @__PURE__ */ e.jsx(
3380
3352
  "div",
3381
3353
  {
3382
- className: `${N || "light"} flex ${y ? "w-fit grow-0" : "w-full grow"}`,
3354
+ className: `${D || "light"} flex ${p ? "w-fit grow-0" : "w-full grow"}`,
3383
3355
  dir: z === "he" || z === "ar" ? "rtl" : void 0,
3384
3356
  children: /* @__PURE__ */ e.jsx(
3385
3357
  "div",
3386
3358
  {
3387
- className: $e(
3359
+ className: De(
3388
3360
  `${j ? j === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z || "en"}`,
3389
- y ? "w-fit" : "w-full",
3361
+ p ? "w-fit" : "w-full",
3390
3362
  H?.graphContainer
3391
3363
  ),
3392
3364
  style: {
@@ -3398,7 +3370,7 @@ function kt(pe) {
3398
3370
  "aria-label": T || `${g ? `The graph shows ${g}. ` : ""}This is a stacked bar chart. ${_ ? ` ${_}` : ""}`,
3399
3371
  children: /* @__PURE__ */ e.jsx("div", { style: { padding: j ? K || "1rem" : K || 0 }, children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
3400
3372
  g || _ || x || C ? /* @__PURE__ */ e.jsx(
3401
- Ke,
3373
+ Ue,
3402
3374
  {
3403
3375
  styles: {
3404
3376
  title: M?.title,
@@ -3410,7 +3382,7 @@ function kt(pe) {
3410
3382
  },
3411
3383
  graphTitle: g,
3412
3384
  graphDescription: _,
3413
- width: y,
3385
+ width: p,
3414
3386
  graphDownload: x ? Ne.current : void 0,
3415
3387
  dataDownload: C ? n.map((i) => i.data).filter((i) => i !== void 0).length > 0 ? n.map((i) => i.data).filter((i) => i !== void 0) : n.filter((i) => i !== void 0) : null
3416
3388
  }
@@ -3425,11 +3397,11 @@ function kt(pe) {
3425
3397
  },
3426
3398
  className: "p-0 border-0 cursor-pointer bg-transparent",
3427
3399
  "aria-label": Ce ? "Click to pause animation" : "Click to play animation",
3428
- children: Ce ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx(tt, {})
3400
+ children: Ce ? /* @__PURE__ */ e.jsx(Qe, {}) : /* @__PURE__ */ e.jsx(Ze, {})
3429
3401
  }
3430
3402
  ),
3431
3403
  /* @__PURE__ */ e.jsx(
3432
- He,
3404
+ Fe,
3433
3405
  {
3434
3406
  min: U[0],
3435
3407
  max: U[U.length - 1],
@@ -3447,11 +3419,11 @@ function kt(pe) {
3447
3419
  }
3448
3420
  )
3449
3421
  ] }) : null,
3450
- /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ze, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3422
+ /* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: n.length === 0 ? /* @__PURE__ */ e.jsx(Ke, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3451
3423
  E ? /* @__PURE__ */ e.jsx(
3452
- Qe,
3424
+ Je,
3453
3425
  {
3454
- width: y,
3426
+ width: p,
3455
3427
  colorDomain: ae,
3456
3428
  colors: Y,
3457
3429
  colorLegendTitle: le,
@@ -3459,74 +3431,74 @@ function kt(pe) {
3459
3431
  showNAColor: !1
3460
3432
  }
3461
3433
  ) : null,
3462
- /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: we, "aria-label": "Graph area", children: (y || s) && (v || r) ? /* @__PURE__ */ e.jsx(
3463
- Ct,
3434
+ /* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: ve, "aria-label": "Graph area", children: (p || s) && (v || l) ? /* @__PURE__ */ e.jsx(
3435
+ wt,
3464
3436
  {
3465
- data: b !== void 0 ? b === "total" ? Le(
3437
+ data: b !== void 0 ? b === "total" ? Ie(
3466
3438
  Te(
3467
3439
  n,
3468
3440
  h.dateFormat || "yyyy"
3469
3441
  ).filter(
3470
- (i) => h.enabled ? i.date === De(
3442
+ (i) => h.enabled ? i.date === $e(
3471
3443
  new Date(U[fe]),
3472
3444
  h.dateFormat || "yyyy"
3473
3445
  ) : i
3474
3446
  ).filter(
3475
- (i) => u ? !i.size.every((B) => B == null) : i
3447
+ (i) => u ? !i.size.every((S) => S == null) : i
3476
3448
  ),
3477
- (i) => ke(i.size.filter((B) => !W(B))),
3478
- [l || "asc"]
3479
- ).filter((i, B) => w ? B < w : !0) : Le(
3449
+ (i) => ke(i.size.filter((S) => !X(S))),
3450
+ [a || "asc"]
3451
+ ).filter((i, S) => w ? S < w : !0) : Ie(
3480
3452
  Te(
3481
3453
  n,
3482
3454
  h.dateFormat || "yyyy"
3483
3455
  ).filter(
3484
- (i) => h.enabled ? i.date === De(
3456
+ (i) => h.enabled ? i.date === $e(
3485
3457
  new Date(U[fe]),
3486
3458
  h.dateFormat || "yyyy"
3487
3459
  ) : i
3488
3460
  ).filter(
3489
- (i) => u ? !i.size.every((B) => B == null) : i
3461
+ (i) => u ? !i.size.every((S) => S == null) : i
3490
3462
  ),
3491
- (i) => W(i.size[b]) ? -1 / 0 : i.size[b],
3492
- [l || "asc"]
3493
- ).filter((i, B) => w ? B < w : !0) : Te(
3463
+ (i) => X(i.size[b]) ? -1 / 0 : i.size[b],
3464
+ [a || "asc"]
3465
+ ).filter((i, S) => w ? S < w : !0) : Te(
3494
3466
  n,
3495
3467
  h.dateFormat || "yyyy"
3496
- ).filter((i) => u ? !i.size.every((B) => B == null) : i).filter((i, B) => w ? B < w : !0),
3468
+ ).filter((i) => u ? !i.size.every((S) => S == null) : i).filter((i, S) => w ? S < w : !0),
3497
3469
  barColors: Y,
3498
- width: y || s,
3470
+ width: p || s,
3499
3471
  height: Math.max(
3500
- I,
3501
- v || (R ? I ? (y || s) * R > I ? (y || s) * R : I : (y || s) * R : r)
3472
+ A,
3473
+ v || (R ? A ? (p || s) * R > A ? (p || s) * R : A : (p || s) * R : l)
3502
3474
  ),
3503
3475
  barPadding: me,
3504
- showLabels: se,
3476
+ showLabels: re,
3505
3477
  showTicks: ue,
3506
- truncateBy: O,
3478
+ truncateBy: N,
3507
3479
  leftMargin: ge,
3508
3480
  rightMargin: Z,
3509
- topMargin: X,
3481
+ topMargin: G,
3510
3482
  bottomMargin: ie,
3511
3483
  tooltip: te,
3512
- onSeriesMouseOver: re,
3513
- showValues: he,
3484
+ onSeriesMouseOver: se,
3485
+ showValues: de,
3514
3486
  suffix: J,
3515
3487
  prefix: ee,
3516
3488
  refValues: xe,
3517
- maxValue: W($) ? Math.max(
3489
+ maxValue: X($) ? Math.max(
3518
3490
  ...n.map(
3519
- (i) => ke(i.size.filter((B) => !W(B))) || 0
3491
+ (i) => ke(i.size.filter((S) => !X(S))) || 0
3520
3492
  )
3521
3493
  ) : $,
3522
- onSeriesMouseClick: p,
3523
- selectedColor: de,
3524
- labelOrder: D,
3525
- maxBarThickness: S,
3494
+ onSeriesMouseClick: y,
3495
+ selectedColor: he,
3496
+ labelOrder: O,
3497
+ maxBarThickness: I,
3526
3498
  minBarThickness: q,
3527
- resetSelectionOnDoubleClick: V,
3499
+ resetSelectionOnDoubleClick: F,
3528
3500
  detailsOnClick: oe,
3529
- barAxisTitle: G,
3501
+ barAxisTitle: W,
3530
3502
  noOfTicks: P,
3531
3503
  valueColor: Q,
3532
3504
  styles: M,
@@ -3539,17 +3511,17 @@ function kt(pe) {
3539
3511
  }
3540
3512
  ) : null })
3541
3513
  ] }) }),
3542
- A || F ? /* @__PURE__ */ e.jsx(
3543
- Je,
3514
+ V || B ? /* @__PURE__ */ e.jsx(
3515
+ qe,
3544
3516
  {
3545
3517
  styles: { footnote: M?.footnote, source: M?.source },
3546
3518
  classNames: {
3547
3519
  footnote: H?.footnote,
3548
3520
  source: H?.source
3549
3521
  },
3550
- sources: A,
3551
- footNote: F,
3552
- width: y
3522
+ sources: V,
3523
+ footNote: B,
3524
+ width: p
3553
3525
  }
3554
3526
  ) : null
3555
3527
  ] }) })
@@ -3558,53 +3530,53 @@ function kt(pe) {
3558
3530
  }
3559
3531
  );
3560
3532
  }
3561
- function ri(pe) {
3533
+ function li(ye) {
3562
3534
  const {
3563
3535
  data: n,
3564
3536
  graphTitle: g,
3565
3537
  colors: Y,
3566
- barPadding: A,
3538
+ barPadding: V,
3567
3539
  showTicks: _,
3568
3540
  leftMargin: me,
3569
3541
  rightMargin: ue,
3570
3542
  topMargin: ge,
3571
3543
  bottomMargin: Z,
3572
- truncateBy: X,
3544
+ truncateBy: G,
3573
3545
  showLabels: ie,
3574
- showValues: O,
3575
- backgroundColor: se,
3576
- suffix: he,
3546
+ showValues: N,
3547
+ backgroundColor: re,
3548
+ suffix: de,
3577
3549
  prefix: j,
3578
3550
  sources: E,
3579
3551
  graphDescription: J,
3580
3552
  height: ee,
3581
3553
  width: v,
3582
- footNote: y,
3583
- colorDomain: F,
3554
+ footNote: p,
3555
+ colorDomain: B,
3584
3556
  colorLegendTitle: ae,
3585
3557
  padding: le,
3586
3558
  relativeHeight: K,
3587
3559
  tooltip: te,
3588
- onSeriesMouseOver: re,
3560
+ onSeriesMouseOver: se,
3589
3561
  refValues: R,
3590
3562
  showColorScale: xe,
3591
3563
  graphID: ne,
3592
3564
  maxValue: $,
3593
- minValue: p,
3565
+ minValue: y,
3594
3566
  highlightedDataPoints: x,
3595
3567
  onSeriesMouseClick: C,
3596
3568
  graphDownload: z,
3597
- dataDownload: N,
3598
- language: D,
3599
- theme: I,
3600
- sortData: S,
3569
+ dataDownload: D,
3570
+ language: O,
3571
+ theme: A,
3572
+ sortData: I,
3601
3573
  labelOrder: b,
3602
3574
  showNAColor: w,
3603
3575
  minHeight: q,
3604
3576
  maxBarThickness: T,
3605
- maxNumberOfBars: V,
3577
+ maxNumberOfBars: F,
3606
3578
  minBarThickness: oe,
3607
- ariaLabel: G,
3579
+ ariaLabel: W,
3608
3580
  resetSelectionOnDoubleClick: P,
3609
3581
  detailsOnClick: Q,
3610
3582
  barAxisTitle: M,
@@ -3615,60 +3587,60 @@ function ri(pe) {
3615
3587
  classNames: d,
3616
3588
  filterNA: h,
3617
3589
  animate: c,
3618
- dimmedOpacity: l,
3590
+ dimmedOpacity: a,
3619
3591
  precision: s,
3620
3592
  customLayers: t,
3621
- timeline: r,
3593
+ timeline: l,
3622
3594
  naLabel: f
3623
- } = pe;
3595
+ } = ye;
3624
3596
  return k === "vertical" ? /* @__PURE__ */ e.jsx(
3625
- bt,
3597
+ yt,
3626
3598
  {
3627
3599
  data: n,
3628
3600
  graphTitle: g,
3629
3601
  colors: Y,
3630
- barPadding: A,
3602
+ barPadding: V,
3631
3603
  showTicks: _,
3632
3604
  leftMargin: me,
3633
3605
  rightMargin: ue,
3634
3606
  topMargin: ge,
3635
3607
  bottomMargin: Z,
3636
- truncateBy: X,
3608
+ truncateBy: G,
3637
3609
  showLabels: ie,
3638
- showValues: O,
3639
- backgroundColor: se,
3640
- suffix: he,
3610
+ showValues: N,
3611
+ backgroundColor: re,
3612
+ suffix: de,
3641
3613
  prefix: j,
3642
3614
  sources: E,
3643
3615
  graphDescription: J,
3644
3616
  height: ee,
3645
3617
  width: v,
3646
- footNote: y,
3647
- colorDomain: F,
3618
+ footNote: p,
3619
+ colorDomain: B,
3648
3620
  colorLegendTitle: ae,
3649
3621
  padding: le,
3650
3622
  relativeHeight: K,
3651
3623
  tooltip: te,
3652
- onSeriesMouseOver: re,
3624
+ onSeriesMouseOver: se,
3653
3625
  refValues: R,
3654
3626
  showColorScale: xe,
3655
3627
  graphID: ne,
3656
3628
  maxValue: $,
3657
- minValue: p,
3629
+ minValue: y,
3658
3630
  highlightedDataPoints: x,
3659
3631
  onSeriesMouseClick: C,
3660
3632
  graphDownload: z,
3661
- dataDownload: N,
3662
- language: D,
3663
- theme: I,
3664
- sortData: S,
3633
+ dataDownload: D,
3634
+ language: O,
3635
+ theme: A,
3636
+ sortData: I,
3665
3637
  labelOrder: b,
3666
3638
  showNAColor: w,
3667
3639
  minHeight: q,
3668
3640
  maxBarThickness: T,
3669
- maxNumberOfBars: V,
3641
+ maxNumberOfBars: F,
3670
3642
  minBarThickness: oe,
3671
- ariaLabel: G,
3643
+ ariaLabel: W,
3672
3644
  resetSelectionOnDoubleClick: P,
3673
3645
  styles: m,
3674
3646
  detailsOnClick: Q,
@@ -3678,60 +3650,60 @@ function ri(pe) {
3678
3650
  classNames: d,
3679
3651
  filterNA: h,
3680
3652
  animate: c,
3681
- dimmedOpacity: l,
3653
+ dimmedOpacity: a,
3682
3654
  precision: s,
3683
3655
  customLayers: t,
3684
- timeline: r,
3656
+ timeline: l,
3685
3657
  naLabel: f
3686
3658
  }
3687
3659
  ) : /* @__PURE__ */ e.jsx(
3688
- mt,
3660
+ ut,
3689
3661
  {
3690
3662
  data: n,
3691
3663
  graphTitle: g,
3692
3664
  colors: Y,
3693
- barPadding: A,
3665
+ barPadding: V,
3694
3666
  showTicks: _,
3695
3667
  leftMargin: me,
3696
3668
  rightMargin: ue,
3697
3669
  topMargin: ge,
3698
3670
  bottomMargin: Z,
3699
- truncateBy: X,
3671
+ truncateBy: G,
3700
3672
  showLabels: ie,
3701
- showValues: O,
3702
- backgroundColor: se,
3703
- suffix: he,
3673
+ showValues: N,
3674
+ backgroundColor: re,
3675
+ suffix: de,
3704
3676
  prefix: j,
3705
3677
  sources: E,
3706
3678
  graphDescription: J,
3707
3679
  height: ee,
3708
3680
  width: v,
3709
- footNote: y,
3710
- colorDomain: F,
3681
+ footNote: p,
3682
+ colorDomain: B,
3711
3683
  colorLegendTitle: ae,
3712
3684
  padding: le,
3713
3685
  relativeHeight: K,
3714
3686
  tooltip: te,
3715
- onSeriesMouseOver: re,
3687
+ onSeriesMouseOver: se,
3716
3688
  refValues: R,
3717
3689
  showColorScale: xe,
3718
3690
  graphID: ne,
3719
3691
  maxValue: $,
3720
- minValue: p,
3692
+ minValue: y,
3721
3693
  highlightedDataPoints: x,
3722
3694
  onSeriesMouseClick: C,
3723
3695
  graphDownload: z,
3724
- dataDownload: N,
3725
- language: D,
3726
- theme: I,
3727
- sortData: S,
3696
+ dataDownload: D,
3697
+ language: O,
3698
+ theme: A,
3699
+ sortData: I,
3728
3700
  labelOrder: b,
3729
3701
  showNAColor: w,
3730
3702
  minHeight: q,
3731
3703
  maxBarThickness: T,
3732
- maxNumberOfBars: V,
3704
+ maxNumberOfBars: F,
3733
3705
  minBarThickness: oe,
3734
- ariaLabel: G,
3706
+ ariaLabel: W,
3735
3707
  resetSelectionOnDoubleClick: P,
3736
3708
  styles: m,
3737
3709
  detailsOnClick: Q,
@@ -3741,61 +3713,61 @@ function ri(pe) {
3741
3713
  classNames: d,
3742
3714
  filterNA: h,
3743
3715
  animate: c,
3744
- dimmedOpacity: l,
3716
+ dimmedOpacity: a,
3745
3717
  precision: s,
3746
3718
  customLayers: t,
3747
- timeline: r,
3719
+ timeline: l,
3748
3720
  naLabel: f
3749
3721
  }
3750
3722
  );
3751
3723
  }
3752
- function si(pe) {
3724
+ function si(ye) {
3753
3725
  const {
3754
3726
  data: n,
3755
3727
  graphTitle: g,
3756
3728
  colors: Y,
3757
- sources: A,
3729
+ sources: V,
3758
3730
  graphDescription: _,
3759
3731
  barPadding: me,
3760
3732
  showTicks: ue,
3761
3733
  truncateBy: ge,
3762
3734
  height: Z,
3763
- width: X,
3735
+ width: G,
3764
3736
  footNote: ie,
3765
- colorDomain: O,
3766
- colorLegendTitle: se,
3767
- suffix: he,
3737
+ colorDomain: N,
3738
+ colorLegendTitle: re,
3739
+ suffix: de,
3768
3740
  prefix: j,
3769
3741
  showValues: E,
3770
3742
  padding: J,
3771
3743
  backgroundColor: ee,
3772
3744
  leftMargin: v,
3773
- rightMargin: y,
3774
- topMargin: F,
3745
+ rightMargin: p,
3746
+ topMargin: B,
3775
3747
  bottomMargin: ae,
3776
3748
  showLabels: le,
3777
3749
  relativeHeight: K,
3778
3750
  tooltip: te,
3779
- onSeriesMouseOver: re,
3751
+ onSeriesMouseOver: se,
3780
3752
  refValues: R,
3781
3753
  graphID: xe,
3782
3754
  maxValue: ne,
3783
3755
  minValue: $,
3784
- onSeriesMouseClick: p,
3756
+ onSeriesMouseClick: y,
3785
3757
  graphDownload: x,
3786
3758
  dataDownload: C,
3787
3759
  language: z,
3788
- labelOrder: N,
3789
- minHeight: D,
3790
- theme: I,
3791
- sortParameter: S,
3760
+ labelOrder: D,
3761
+ minHeight: O,
3762
+ theme: A,
3763
+ sortParameter: I,
3792
3764
  sortData: b,
3793
3765
  maxBarThickness: w,
3794
3766
  ariaLabel: q,
3795
3767
  resetSelectionOnDoubleClick: T,
3796
- detailsOnClick: V,
3768
+ detailsOnClick: F,
3797
3769
  barAxisTitle: oe,
3798
- noOfTicks: G,
3770
+ noOfTicks: W,
3799
3771
  valueColor: P,
3800
3772
  orientation: Q = "vertical",
3801
3773
  styles: M,
@@ -3806,57 +3778,57 @@ function si(pe) {
3806
3778
  customLayers: d,
3807
3779
  showColorScale: h,
3808
3780
  timeline: c,
3809
- naLabel: l
3810
- } = pe;
3781
+ naLabel: a
3782
+ } = ye;
3811
3783
  return Q === "vertical" ? /* @__PURE__ */ e.jsx(
3812
- wt,
3784
+ vt,
3813
3785
  {
3814
3786
  data: n,
3815
3787
  graphTitle: g,
3816
3788
  colors: Y,
3817
- sources: A,
3789
+ sources: V,
3818
3790
  graphDescription: _,
3819
3791
  barPadding: me,
3820
3792
  showTicks: ue,
3821
3793
  truncateBy: ge,
3822
3794
  height: Z,
3823
- width: X,
3795
+ width: G,
3824
3796
  footNote: ie,
3825
- colorDomain: O,
3826
- colorLegendTitle: se,
3827
- suffix: he,
3797
+ colorDomain: N,
3798
+ colorLegendTitle: re,
3799
+ suffix: de,
3828
3800
  prefix: j,
3829
3801
  showValues: E,
3830
3802
  padding: J,
3831
3803
  backgroundColor: ee,
3832
3804
  leftMargin: v,
3833
- rightMargin: y,
3834
- sortParameter: S,
3805
+ rightMargin: p,
3806
+ sortParameter: I,
3835
3807
  sortData: b,
3836
- topMargin: F,
3808
+ topMargin: B,
3837
3809
  bottomMargin: ae,
3838
3810
  showLabels: le,
3839
3811
  relativeHeight: K,
3840
3812
  tooltip: te,
3841
- onSeriesMouseOver: re,
3813
+ onSeriesMouseOver: se,
3842
3814
  refValues: R,
3843
3815
  graphID: xe,
3844
3816
  maxValue: ne,
3845
3817
  minValue: $,
3846
- onSeriesMouseClick: p,
3818
+ onSeriesMouseClick: y,
3847
3819
  graphDownload: x,
3848
3820
  dataDownload: C,
3849
3821
  language: z,
3850
- labelOrder: N,
3851
- minHeight: D,
3852
- theme: I,
3822
+ labelOrder: D,
3823
+ minHeight: O,
3824
+ theme: A,
3853
3825
  maxBarThickness: w,
3854
3826
  ariaLabel: q,
3855
3827
  resetSelectionOnDoubleClick: T,
3856
3828
  styles: M,
3857
- detailsOnClick: V,
3829
+ detailsOnClick: F,
3858
3830
  barAxisTitle: oe,
3859
- noOfTicks: G,
3831
+ noOfTicks: W,
3860
3832
  valueColor: P,
3861
3833
  classNames: H,
3862
3834
  filterNA: u,
@@ -3865,57 +3837,57 @@ function si(pe) {
3865
3837
  customLayers: d,
3866
3838
  showColorScale: h,
3867
3839
  timeline: c,
3868
- naLabel: l
3840
+ naLabel: a
3869
3841
  }
3870
3842
  ) : /* @__PURE__ */ e.jsx(
3871
- xt,
3843
+ gt,
3872
3844
  {
3873
3845
  data: n,
3874
3846
  graphTitle: g,
3875
3847
  colors: Y,
3876
- sortParameter: S,
3848
+ sortParameter: I,
3877
3849
  sortData: b,
3878
- sources: A,
3850
+ sources: V,
3879
3851
  graphDescription: _,
3880
3852
  barPadding: me,
3881
3853
  showTicks: ue,
3882
3854
  truncateBy: ge,
3883
3855
  height: Z,
3884
- width: X,
3856
+ width: G,
3885
3857
  footNote: ie,
3886
- colorDomain: O,
3887
- colorLegendTitle: se,
3888
- suffix: he,
3858
+ colorDomain: N,
3859
+ colorLegendTitle: re,
3860
+ suffix: de,
3889
3861
  prefix: j,
3890
3862
  showValues: E,
3891
3863
  padding: J,
3892
3864
  backgroundColor: ee,
3893
3865
  leftMargin: v,
3894
- rightMargin: y,
3895
- topMargin: F,
3866
+ rightMargin: p,
3867
+ topMargin: B,
3896
3868
  bottomMargin: ae,
3897
3869
  showLabels: le,
3898
3870
  relativeHeight: K,
3899
3871
  tooltip: te,
3900
- onSeriesMouseOver: re,
3872
+ onSeriesMouseOver: se,
3901
3873
  refValues: R,
3902
3874
  graphID: xe,
3903
3875
  maxValue: ne,
3904
3876
  minValue: $,
3905
- onSeriesMouseClick: p,
3877
+ onSeriesMouseClick: y,
3906
3878
  graphDownload: x,
3907
3879
  dataDownload: C,
3908
3880
  language: z,
3909
- labelOrder: N,
3910
- minHeight: D,
3911
- theme: I,
3881
+ labelOrder: D,
3882
+ minHeight: O,
3883
+ theme: A,
3912
3884
  maxBarThickness: w,
3913
3885
  ariaLabel: q,
3914
3886
  resetSelectionOnDoubleClick: T,
3915
3887
  styles: M,
3916
- detailsOnClick: V,
3888
+ detailsOnClick: F,
3917
3889
  barAxisTitle: oe,
3918
- noOfTicks: G,
3890
+ noOfTicks: W,
3919
3891
  valueColor: P,
3920
3892
  classNames: H,
3921
3893
  filterNA: u,
@@ -3924,57 +3896,57 @@ function si(pe) {
3924
3896
  customLayers: d,
3925
3897
  showColorScale: h,
3926
3898
  timeline: c,
3927
- naLabel: l
3899
+ naLabel: a
3928
3900
  }
3929
3901
  );
3930
3902
  }
3931
- function oi(pe) {
3903
+ function ri(ye) {
3932
3904
  const {
3933
3905
  data: n,
3934
3906
  graphTitle: g,
3935
3907
  colors: Y,
3936
- sources: A,
3908
+ sources: V,
3937
3909
  graphDescription: _,
3938
3910
  barPadding: me,
3939
3911
  showTicks: ue,
3940
3912
  leftMargin: ge,
3941
3913
  rightMargin: Z,
3942
- topMargin: X,
3914
+ topMargin: G,
3943
3915
  bottomMargin: ie,
3944
- truncateBy: O,
3945
- showLabels: se,
3946
- showValues: he,
3916
+ truncateBy: N,
3917
+ showLabels: re,
3918
+ showValues: de,
3947
3919
  backgroundColor: j,
3948
3920
  suffix: E,
3949
3921
  prefix: J,
3950
3922
  height: ee,
3951
3923
  width: v,
3952
- footNote: y,
3953
- colorDomain: F,
3924
+ footNote: p,
3925
+ colorDomain: B,
3954
3926
  colorLegendTitle: ae,
3955
3927
  padding: le,
3956
3928
  tooltip: K,
3957
3929
  onSeriesMouseOver: te,
3958
- relativeHeight: re,
3930
+ relativeHeight: se,
3959
3931
  refValues: R,
3960
3932
  graphID: xe,
3961
3933
  maxValue: ne,
3962
3934
  onSeriesMouseClick: $,
3963
- graphDownload: p,
3935
+ graphDownload: y,
3964
3936
  dataDownload: x,
3965
3937
  language: C,
3966
3938
  theme: z,
3967
- labelOrder: N,
3968
- minHeight: D,
3969
- maxBarThickness: I,
3970
- sortParameter: S,
3939
+ labelOrder: D,
3940
+ minHeight: O,
3941
+ maxBarThickness: A,
3942
+ sortParameter: I,
3971
3943
  sortData: b,
3972
3944
  maxNumberOfBars: w,
3973
3945
  minBarThickness: q,
3974
3946
  ariaLabel: T,
3975
- resetSelectionOnDoubleClick: V,
3947
+ resetSelectionOnDoubleClick: F,
3976
3948
  detailsOnClick: oe,
3977
- barAxisTitle: G,
3949
+ barAxisTitle: W,
3978
3950
  noOfTicks: P,
3979
3951
  valueColor: Q,
3980
3952
  orientation: M = "vertical",
@@ -3985,58 +3957,58 @@ function oi(pe) {
3985
3957
  precision: d,
3986
3958
  customLayers: h,
3987
3959
  showColorScale: c,
3988
- timeline: l,
3960
+ timeline: a,
3989
3961
  naLabel: s
3990
- } = pe;
3962
+ } = ye;
3991
3963
  return M === "vertical" ? /* @__PURE__ */ e.jsx(
3992
- kt,
3964
+ Ct,
3993
3965
  {
3994
3966
  data: n,
3995
3967
  graphTitle: g,
3996
3968
  colors: Y,
3997
- sources: A,
3969
+ sources: V,
3998
3970
  graphDescription: _,
3999
3971
  barPadding: me,
4000
3972
  showTicks: ue,
4001
3973
  leftMargin: ge,
4002
3974
  rightMargin: Z,
4003
- topMargin: X,
3975
+ topMargin: G,
4004
3976
  bottomMargin: ie,
4005
- truncateBy: O,
4006
- showLabels: se,
4007
- showValues: he,
3977
+ truncateBy: N,
3978
+ showLabels: re,
3979
+ showValues: de,
4008
3980
  backgroundColor: j,
4009
3981
  suffix: E,
4010
3982
  prefix: J,
4011
3983
  height: ee,
4012
3984
  width: v,
4013
- footNote: y,
4014
- colorDomain: F,
3985
+ footNote: p,
3986
+ colorDomain: B,
4015
3987
  colorLegendTitle: ae,
4016
3988
  padding: le,
4017
3989
  tooltip: K,
4018
3990
  onSeriesMouseOver: te,
4019
- relativeHeight: re,
3991
+ relativeHeight: se,
4020
3992
  refValues: R,
4021
3993
  graphID: xe,
4022
3994
  maxValue: ne,
4023
3995
  onSeriesMouseClick: $,
4024
- graphDownload: p,
3996
+ graphDownload: y,
4025
3997
  dataDownload: x,
4026
3998
  language: C,
4027
3999
  theme: z,
4028
- labelOrder: N,
4029
- minHeight: D,
4030
- maxBarThickness: I,
4031
- sortParameter: S,
4000
+ labelOrder: D,
4001
+ minHeight: O,
4002
+ maxBarThickness: A,
4003
+ sortParameter: I,
4032
4004
  sortData: b,
4033
4005
  maxNumberOfBars: w,
4034
4006
  minBarThickness: q,
4035
4007
  ariaLabel: T,
4036
- resetSelectionOnDoubleClick: V,
4008
+ resetSelectionOnDoubleClick: F,
4037
4009
  styles: H,
4038
4010
  detailsOnClick: oe,
4039
- barAxisTitle: G,
4011
+ barAxisTitle: W,
4040
4012
  noOfTicks: P,
4041
4013
  valueColor: Q,
4042
4014
  classNames: u,
@@ -4045,58 +4017,58 @@ function oi(pe) {
4045
4017
  precision: d,
4046
4018
  customLayers: h,
4047
4019
  showColorScale: c,
4048
- timeline: l,
4020
+ timeline: a,
4049
4021
  naLabel: s
4050
4022
  }
4051
4023
  ) : /* @__PURE__ */ e.jsx(
4052
- yt,
4024
+ ft,
4053
4025
  {
4054
4026
  data: n,
4055
4027
  graphTitle: g,
4056
4028
  colors: Y,
4057
- sources: A,
4029
+ sources: V,
4058
4030
  graphDescription: _,
4059
4031
  barPadding: me,
4060
4032
  showTicks: ue,
4061
4033
  leftMargin: ge,
4062
4034
  rightMargin: Z,
4063
- topMargin: X,
4035
+ topMargin: G,
4064
4036
  bottomMargin: ie,
4065
- truncateBy: O,
4066
- showLabels: se,
4067
- showValues: he,
4037
+ truncateBy: N,
4038
+ showLabels: re,
4039
+ showValues: de,
4068
4040
  backgroundColor: j,
4069
4041
  suffix: E,
4070
4042
  prefix: J,
4071
4043
  height: ee,
4072
4044
  width: v,
4073
- footNote: y,
4074
- colorDomain: F,
4045
+ footNote: p,
4046
+ colorDomain: B,
4075
4047
  colorLegendTitle: ae,
4076
4048
  padding: le,
4077
4049
  tooltip: K,
4078
4050
  onSeriesMouseOver: te,
4079
- relativeHeight: re,
4051
+ relativeHeight: se,
4080
4052
  refValues: R,
4081
4053
  graphID: xe,
4082
4054
  maxValue: ne,
4083
4055
  onSeriesMouseClick: $,
4084
- graphDownload: p,
4056
+ graphDownload: y,
4085
4057
  dataDownload: x,
4086
4058
  language: C,
4087
4059
  theme: z,
4088
- labelOrder: N,
4089
- minHeight: D,
4090
- maxBarThickness: I,
4091
- sortParameter: S,
4060
+ labelOrder: D,
4061
+ minHeight: O,
4062
+ maxBarThickness: A,
4063
+ sortParameter: I,
4092
4064
  sortData: b,
4093
4065
  maxNumberOfBars: w,
4094
4066
  minBarThickness: q,
4095
4067
  ariaLabel: T,
4096
- resetSelectionOnDoubleClick: V,
4068
+ resetSelectionOnDoubleClick: F,
4097
4069
  styles: H,
4098
4070
  detailsOnClick: oe,
4099
- barAxisTitle: G,
4071
+ barAxisTitle: W,
4100
4072
  noOfTicks: P,
4101
4073
  valueColor: Q,
4102
4074
  classNames: u,
@@ -4105,14 +4077,14 @@ function oi(pe) {
4105
4077
  precision: d,
4106
4078
  customLayers: h,
4107
4079
  showColorScale: c,
4108
- timeline: l,
4080
+ timeline: a,
4109
4081
  naLabel: s
4110
4082
  }
4111
4083
  );
4112
4084
  }
4113
4085
  export {
4114
4086
  si as GroupedBarGraph,
4115
- ri as SimpleBarGraph,
4116
- oi as StackedBarGraph
4087
+ li as SimpleBarGraph,
4088
+ ri as StackedBarGraph
4117
4089
  };
4118
4090
  //# sourceMappingURL=BarGraph.js.map