@undp/data-viz 2.1.0 → 2.1.2

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 (120) hide show
  1. package/dist/AreaChart.js +3 -3
  2. package/dist/BarGraph.cjs +1 -1
  3. package/dist/BarGraph.cjs.map +1 -1
  4. package/dist/BarGraph.js +1760 -1604
  5. package/dist/BarGraph.js.map +1 -1
  6. package/dist/BeeSwarmChart.js +2 -2
  7. package/dist/BiVariateChoroplethMap.cjs +1 -1
  8. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  9. package/dist/BiVariateChoroplethMap.js +222 -207
  10. package/dist/BiVariateChoroplethMap.js.map +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.cjs.map +1 -1
  13. package/dist/BulletChart.d.ts +11 -0
  14. package/dist/BulletChart.js +726 -640
  15. package/dist/BulletChart.js.map +1 -1
  16. package/dist/ButterflyChart.cjs +1 -1
  17. package/dist/ButterflyChart.cjs.map +1 -1
  18. package/dist/ButterflyChart.js +366 -348
  19. package/dist/ButterflyChart.js.map +1 -1
  20. package/dist/ChoroplethMap.cjs +1 -1
  21. package/dist/ChoroplethMap.cjs.map +1 -1
  22. package/dist/ChoroplethMap.js +311 -297
  23. package/dist/ChoroplethMap.js.map +1 -1
  24. package/dist/CirclePackingGraph.js +1 -1
  25. package/dist/DifferenceLineChart.js +3 -3
  26. package/dist/DotDensityMap.cjs +1 -1
  27. package/dist/DotDensityMap.cjs.map +1 -1
  28. package/dist/DotDensityMap.js +219 -203
  29. package/dist/DotDensityMap.js.map +1 -1
  30. package/dist/DualAxisLineChart.js +3 -3
  31. package/dist/DumbbellChart.cjs +1 -1
  32. package/dist/DumbbellChart.cjs.map +1 -1
  33. package/dist/DumbbellChart.js +606 -556
  34. package/dist/DumbbellChart.js.map +1 -1
  35. package/dist/GraphEl-YKUlz-37.cjs +2 -0
  36. package/dist/GraphEl-YKUlz-37.cjs.map +1 -0
  37. package/dist/{GraphEl-ebgfxefq.js → GraphEl-sVZvlyWe.js} +3 -2
  38. package/dist/GraphEl-sVZvlyWe.js.map +1 -0
  39. package/dist/GriddedGraphs.cjs +1 -1
  40. package/dist/GriddedGraphs.js +2 -2
  41. package/dist/HeatMap.js +4 -4
  42. package/dist/Histogram.js +3 -3
  43. package/dist/HybridMap.cjs +1 -1
  44. package/dist/HybridMap.cjs.map +1 -1
  45. package/dist/HybridMap.js +357 -342
  46. package/dist/HybridMap.js.map +1 -1
  47. package/dist/LineChartWithConfidenceInterval.js +3 -3
  48. package/dist/MultiLineAltChart.cjs +1 -1
  49. package/dist/MultiLineAltChart.cjs.map +1 -1
  50. package/dist/MultiLineAltChart.js +453 -425
  51. package/dist/MultiLineAltChart.js.map +1 -1
  52. package/dist/MultiLineChart.js +3 -3
  53. package/dist/ParetoChart.js +2 -2
  54. package/dist/RadarChart.js +1 -1
  55. package/dist/ScatterPlot.cjs +1 -1
  56. package/dist/ScatterPlot.cjs.map +1 -1
  57. package/dist/ScatterPlot.js +471 -452
  58. package/dist/ScatterPlot.js.map +1 -1
  59. package/dist/SimpleLineChart.js +3 -3
  60. package/dist/SingleGraphDashboard.cjs +1 -1
  61. package/dist/SingleGraphDashboard.js +2 -2
  62. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  63. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  64. package/dist/SlopeChart.js +1 -1
  65. package/dist/SparkLine.js +3 -3
  66. package/dist/StripChart.js +1 -1
  67. package/dist/ThreeDGlobe.js +2 -2
  68. package/dist/Types.d.ts +1 -0
  69. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  70. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  71. package/dist/ensureCompleteData-DS7gCvVd.js +122 -0
  72. package/dist/ensureCompleteData-DS7gCvVd.js.map +1 -0
  73. package/dist/ensureCompleteData-Oib-vGb0.cjs +2 -0
  74. package/dist/ensureCompleteData-Oib-vGb0.cjs.map +1 -0
  75. package/dist/getSchema.cjs +1 -1
  76. package/dist/getSchema.cjs.map +1 -1
  77. package/dist/getSchema.js +15 -15
  78. package/dist/getSchema.js.map +1 -1
  79. package/dist/{index-BBV4tAeA.js → index-DPGq3eIL.js} +2 -2
  80. package/dist/{index-BBV4tAeA.js.map → index-DPGq3eIL.js.map} +1 -1
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.d.ts +3 -0
  83. package/dist/index.js +3 -3
  84. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  85. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  86. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  87. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  88. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  89. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  90. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  91. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  92. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  93. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  94. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  95. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  96. package/dist/transformData.cjs +1 -1
  97. package/dist/transformData.js +2 -2
  98. package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
  99. package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
  100. package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
  101. package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
  102. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
  103. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
  104. package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
  105. package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
  106. package/package.json +4 -4
  107. package/dist/GraphEl-B16EYkko.cjs +0 -2
  108. package/dist/GraphEl-B16EYkko.cjs.map +0 -1
  109. package/dist/GraphEl-ebgfxefq.js.map +0 -1
  110. package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
  111. package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
  112. package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
  113. package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
  114. package/dist/sort-BIvMlUH1.js +0 -34
  115. package/dist/sort-BIvMlUH1.js.map +0 -1
  116. package/dist/sort-O96oMZLb.cjs +0 -2
  117. package/dist/sort-O96oMZLb.cjs.map +0 -1
  118. package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
  119. package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
  120. package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
@@ -1,109 +1,106 @@
1
- import { j as o, m as ue, c as ge } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useState as N, useRef as Pt, useEffect as qt, useEffectEvent as fe } from "react";
3
- import { g as ye, N as xe } from "./getSliderMarks-HIDJ0_Cd.js";
4
- import { w as ve } from "./Spinner-D7rnnwnA.js";
5
- import { p as be, f as ke } from "./parse-DlCRUFh_.js";
6
- import { i as we } from "./index-Bwrro8-q.js";
7
- import { z as je, t as Ce, g as $e, a as De, b as Ne, c as Se, d as Me } from "./zoom-C9MFjAaV.js";
8
- import { t as Ee } from "./index-GEsywGxz.js";
9
- import { j as ne } from "./Typography-PxtFcnJb.js";
10
- import { n as se } from "./numberFormattingFunction-14YCbkN2.js";
11
- import { T as Oe } from "./Tooltip-Dj5eVppQ.js";
12
- import { c as le } from "./checkIfNullOrUndefined-DmfiKkNw.js";
13
- import { X as Le, P as Pe, e as Ie } from "./index-D491FEn1.js";
14
- import { D as ze } from "./DetailsModal-0Ry5nXiC.js";
15
- import { s as re } from "./select-DKy99ogv.js";
16
- import { t as ce } from "./threshold-Bgr20hik.js";
17
- import { u as We } from "./use-in-view-Cxa7y1TH.js";
1
+ import { j as o, m as be, c as ke } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useState as N, useRef as Pt, useEffect as Qt, useEffectEvent as we } from "react";
3
+ import { g as je, N as Ce } from "./getSliderMarks-HIDJ0_Cd.js";
4
+ import { w as De } from "./Spinner-D7rnnwnA.js";
5
+ import { f as $e, p as Ne } from "./parse-DlCRUFh_.js";
6
+ import { i as Se } from "./index-Bwrro8-q.js";
7
+ import { z as Me, t as Ee, g as Oe, a as Le, b as Pe, c as Ie, d as ze } from "./zoom-C9MFjAaV.js";
8
+ import { t as We } from "./index-GEsywGxz.js";
9
+ import { j as me } from "./Typography-PxtFcnJb.js";
10
+ import { n as pe } from "./numberFormattingFunction-14YCbkN2.js";
11
+ import { T as _e } from "./Tooltip-Dj5eVppQ.js";
12
+ import { c as he } from "./checkIfNullOrUndefined-DmfiKkNw.js";
13
+ import { X as Ae, P as Be, e as Fe } from "./index-D491FEn1.js";
14
+ import { D as Te } from "./DetailsModal-0Ry5nXiC.js";
15
+ import { s as le } from "./select-DKy99ogv.js";
16
+ import { t as ue } from "./threshold-DFfqcDMa.js";
17
+ import { u as Ve } from "./use-in-view-Cxa7y1TH.js";
18
18
  import { m as Lt } from "./proxy-BxkFHwUw.js";
19
- import { A as _e } from "./index-BqfRwk1n.js";
20
- import { GraphHeader as Be } from "./GraphHeader.js";
21
- import { GraphFooter as Ae } from "./GraphFooter.js";
22
- import { Colors as ae } from "./Colors.js";
23
- import { f as Te } from "./fetchAndParseData-BpqkBPQL.js";
24
- import { g as de } from "./getJenks-BbngDoBQ.js";
25
- import { u as Fe } from "./uniqBy-BHy4I8PK.js";
26
- import { a as Ve, G as Ge } from "./GraphContainer-CRqzdKu2.js";
27
- import { s as He } from "./sort-BIvMlUH1.js";
28
- import { a as Re } from "./init-BJFW6EwE.js";
29
- function Ue(d) {
19
+ import { A as Ge } from "./index-BqfRwk1n.js";
20
+ import { GraphHeader as He } from "./GraphHeader.js";
21
+ import { GraphFooter as Re } from "./GraphFooter.js";
22
+ import { Colors as ce } from "./Colors.js";
23
+ import { f as Ue } from "./fetchAndParseData-BpqkBPQL.js";
24
+ import { g as ge } from "./getJenks-BbngDoBQ.js";
25
+ import { a as Xe, G as Ye } from "./GraphContainer-CRqzdKu2.js";
26
+ function qe(d) {
30
27
  const {
31
28
  data: t,
32
- xDomain: b,
29
+ xDomain: y,
33
30
  mapData: j,
34
31
  xColorLegendTitle: It,
35
32
  yDomain: Q,
36
33
  yColorLegendTitle: tt,
37
- width: k,
38
- height: y,
39
- colors: x,
34
+ width: w,
35
+ height: b,
36
+ colors: k,
40
37
  scale: zt,
41
- centerPoint: $,
38
+ centerPoint: D,
42
39
  mapBorderWidth: S,
43
- mapNoDataColor: W,
40
+ mapNoDataColor: F,
44
41
  mapBorderColor: gt,
45
42
  tooltip: et,
46
43
  onSeriesMouseOver: ft,
47
44
  zoomScaleExtend: yt,
48
45
  zoomTranslateExtend: xt,
49
- highlightedIds: G,
46
+ highlightedIds: X,
50
47
  onSeriesMouseClick: ot,
51
- mapProperty: H,
48
+ mapProperty: Y,
52
49
  resetSelectionOnDoubleClick: Wt,
53
50
  detailsOnClick: C,
54
51
  showColorScale: vt,
55
52
  styles: _t,
56
- classNames: _,
57
- mapProjection: B,
53
+ classNames: T,
54
+ mapProjection: V,
58
55
  zoomInteraction: O,
59
- animate: D,
56
+ animate: $,
60
57
  dimmedOpacity: L,
61
58
  customLayers: rt,
62
59
  collapseColorScaleByDefault: bt
63
- } = d, [Bt, kt] = N(bt === void 0 ? !(k < 680) : !bt), [R, wt] = N(void 0), [at, it] = N(void 0), [A, nt] = N(void 0), [st, m] = N(void 0), [p, U] = N(void 0), T = Pt(null), lt = We(T, {
64
- once: D.once,
65
- amount: D.amount
66
- }), jt = Pt(null), F = Pt(null);
67
- qt(() => {
68
- const e = re(jt.current), n = re(T.current), u = (r) => {
60
+ } = d, [At, kt] = N(bt === void 0 ? !(w < 680) : !bt), [q, wt] = N(void 0), [at, it] = N(void 0), [G, nt] = N(void 0), [st, h] = N(void 0), [g, J] = N(void 0), H = Pt(null), lt = Ve(H, {
61
+ once: $.once,
62
+ amount: $.amount
63
+ }), jt = Pt(null), R = Pt(null);
64
+ Qt(() => {
65
+ const e = le(jt.current), n = le(H.current), x = (r) => {
69
66
  if (O === "noZoom") return !1;
70
67
  if (O === "button") return !r.type.includes("wheel");
71
68
  const a = r.type === "wheel", l = r.type.startsWith("touch"), i = r.type === "mousedown" || r.type === "mousemove";
72
69
  return l ? !0 : a ? O === "scroll" ? !0 : r.ctrlKey : i && !r.button && !r.ctrlKey;
73
- }, s = je().scaleExtent(yt).translateExtent(xt || [[-20, -20], [k + 20, y + 20]]).filter(u).on("zoom", ({
70
+ }, s = Me().scaleExtent(yt).translateExtent(xt || [[-20, -20], [w + 20, b + 20]]).filter(x).on("zoom", ({
74
71
  transform: r
75
72
  }) => {
76
73
  e.attr("transform", r);
77
74
  });
78
- n.call(s), F.current = s;
79
- }, [y, k, O]);
80
- const X = Ce(j), P = Ee(j), M = X[2] - X[0], I = X[3] - X[1], ct = k * 190 / 960 * 360 / M, Ct = y * 190 / 678 * 180 / I, z = zt * Math.min(ct, Ct), E = B === "mercator" ? $e().rotate([0, 0]).center($ || P.geometry.coordinates).translate([k / 2, y / 2]).scale(z) : B === "equalEarth" ? De().rotate([0, 0]).center($ || P.geometry.coordinates).translate([k / 2, y / 2]).scale(z) : B === "naturalEarth" ? Ne().rotate([0, 0]).center($ || P.geometry.coordinates).translate([k / 2, y / 2]).scale(z) : B === "orthographic" ? Se().rotate([0, 0]).center($ || P.geometry.coordinates).translate([k / 2, y / 2]).scale(z) : Me().rotate([0, 0]).center($ || P.geometry.coordinates).translate([k / 2, y / 2]).scale(z), $t = Array.from({
81
- length: b.length
82
- }, (e, n) => n), Dt = Array.from({
75
+ n.call(s), R.current = s;
76
+ }, [b, w, O]);
77
+ const P = Ee(j), I = We(j), M = P[2] - P[0], z = P[3] - P[1], ct = w * 190 / 960 * 360 / M, Ct = b * 190 / 678 * 180 / z, W = zt * Math.min(ct, Ct), E = V === "mercator" ? Oe().rotate([0, 0]).center(D || I.geometry.coordinates).translate([w / 2, b / 2]).scale(W) : V === "equalEarth" ? Le().rotate([0, 0]).center(D || I.geometry.coordinates).translate([w / 2, b / 2]).scale(W) : V === "naturalEarth" ? Pe().rotate([0, 0]).center(D || I.geometry.coordinates).translate([w / 2, b / 2]).scale(W) : V === "orthographic" ? Ie().rotate([0, 0]).center(D || I.geometry.coordinates).translate([w / 2, b / 2]).scale(W) : ze().rotate([0, 0]).center(D || I.geometry.coordinates).translate([w / 2, b / 2]).scale(W), Dt = Array.from({
78
+ length: y.length
79
+ }, (e, n) => n), $t = Array.from({
83
80
  length: Q.length
84
- }, (e, n) => n), Nt = ce().domain(b).range($t), St = ce().domain(Q).range(Dt), Y = (e) => {
85
- if (!T.current || !F.current) return;
86
- re(T.current).call(F.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
81
+ }, (e, n) => n), Nt = ue().domain(y).range(Dt), St = ue().domain(Q).range($t), K = (e) => {
82
+ if (!H.current || !R.current) return;
83
+ le(H.current).call(R.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
87
84
  };
88
85
  return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
89
86
  /* @__PURE__ */ o.jsxs("div", { className: "relative", children: [
90
- /* @__PURE__ */ o.jsx(Lt.svg, { viewBox: `0 0 ${k} ${y}`, width: `${k}px`, height: `${y}px`, ref: T, direction: "ltr", children: /* @__PURE__ */ o.jsxs("g", { ref: jt, children: [
87
+ /* @__PURE__ */ o.jsx(Lt.svg, { viewBox: `0 0 ${w} ${b}`, width: `${w}px`, height: `${b}px`, ref: H, direction: "ltr", children: /* @__PURE__ */ o.jsxs("g", { ref: jt, children: [
91
88
  rt.filter((e) => e.position === "before").map((e) => e.layer),
92
89
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
- j.features.map((e, n) => t.findIndex((s) => s.id === e.properties[H]) !== -1 ? null : /* @__PURE__ */ o.jsx(Lt.g, { opacity: R ? L : G.length !== 0 ? G.indexOf(e.properties[H]) !== -1 ? 1 : L : 1, children: e.geometry.type === "MultiPolygon" ? (
90
+ j.features.map((e, n) => t.findIndex((s) => s.id === e.properties[Y]) !== -1 ? null : /* @__PURE__ */ o.jsx(Lt.g, { opacity: q ? L : X.length !== 0 ? X.indexOf(e.properties[Y]) !== -1 ? 1 : L : 1, children: e.geometry.type === "MultiPolygon" ? (
94
91
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
92
  e.geometry.coordinates.map((s, r) => {
96
93
  let a = "";
97
94
  return s.forEach((l) => {
98
95
  let i = " M";
99
- l.forEach((h, g) => {
100
- const c = E([h[0], h[1]]);
101
- g !== l.length - 1 ? i = `${i}${c[0]} ${c[1]}L` : i = `${i}${c[0]} ${c[1]}`;
96
+ l.forEach((f, v) => {
97
+ const m = E([f[0], f[1]]);
98
+ v !== l.length - 1 ? i = `${i}${m[0]} ${m[1]}L` : i = `${i}${m[0]} ${m[1]}`;
102
99
  }), a += i;
103
100
  }), /* @__PURE__ */ o.jsx("path", { d: a, style: {
104
101
  stroke: gt,
105
102
  strokeWidth: S,
106
- fill: W
103
+ fill: F
107
104
  } }, r);
108
105
  })
109
106
  ) : (
@@ -111,53 +108,53 @@ function Ue(d) {
111
108
  e.geometry.coordinates.map((s, r) => {
112
109
  let a = "M";
113
110
  return s.forEach((l, i) => {
114
- const h = E([l[0], l[1]]);
115
- i !== s.length - 1 ? a = `${a}${h[0]} ${h[1]}L` : a = `${a}${h[0]} ${h[1]}`;
111
+ const f = E([l[0], l[1]]);
112
+ i !== s.length - 1 ? a = `${a}${f[0]} ${f[1]}L` : a = `${a}${f[0]} ${f[1]}`;
116
113
  }), /* @__PURE__ */ o.jsx("path", { d: a, style: {
117
114
  stroke: gt,
118
115
  strokeWidth: S,
119
- fill: W
116
+ fill: F
120
117
  } }, r);
121
118
  })
122
119
  ) }, n)),
123
- /* @__PURE__ */ o.jsx(_e, { children: t.map((e) => {
120
+ /* @__PURE__ */ o.jsx(Ge, { children: t.map((e) => {
124
121
  const n = j.features.findIndex(
125
122
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
- (a) => e.id === a.properties[H]
127
- ), u = le(e.x) ? void 0 : Nt(e.x), s = le(e.y) ? void 0 : St(e.y), r = u !== void 0 && s !== void 0 ? x[s][u] : W;
123
+ (a) => e.id === a.properties[Y]
124
+ ), x = he(e.x) ? void 0 : Nt(e.x), s = he(e.y) ? void 0 : St(e.y), r = x !== void 0 && s !== void 0 ? k[s][x] : F;
128
125
  return /* @__PURE__ */ o.jsx(Lt.g, { variants: {
129
126
  initial: {
130
127
  opacity: 0
131
128
  },
132
129
  whileInView: {
133
- opacity: R ? R === r ? 1 : L : G.length !== 0 ? G.indexOf(e.id) !== -1 ? 1 : L : 1,
130
+ opacity: q ? q === r ? 1 : L : X.length !== 0 ? X.indexOf(e.id) !== -1 ? 1 : L : 1,
134
131
  transition: {
135
- duration: D.duration
132
+ duration: $.duration
136
133
  }
137
134
  }
138
135
  }, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
139
136
  opacity: 0,
140
137
  transition: {
141
- duration: D.duration
138
+ duration: $.duration
142
139
  }
143
140
  }, onMouseEnter: (a) => {
144
- nt(e), U(a.clientY), m(a.clientX), ft?.(e);
141
+ nt(e), J(a.clientY), h(a.clientX), ft?.(e);
145
142
  }, onClick: () => {
146
- (ot || C) && (we(at, e) && Wt ? (it(void 0), ot?.(void 0)) : (it(e), ot?.(e)));
143
+ (ot || C) && (Se(at, e) && Wt ? (it(void 0), ot?.(void 0)) : (it(e), ot?.(e)));
147
144
  }, onMouseMove: (a) => {
148
- nt(e), U(a.clientY), m(a.clientX);
145
+ nt(e), J(a.clientY), h(a.clientX);
149
146
  }, onMouseLeave: () => {
150
- nt(void 0), m(void 0), U(void 0), ft?.(void 0);
147
+ nt(void 0), h(void 0), J(void 0), ft?.(void 0);
151
148
  }, children: n === -1 ? null : j.features[n].geometry.type === "MultiPolygon" ? j.features[n].geometry.coordinates.map(
152
149
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
150
  (a, l) => {
154
151
  let i = "";
155
- return a.forEach((h) => {
156
- let g = " M";
157
- h.forEach((c, Mt) => {
158
- const V = E([c[0], c[1]]);
159
- Mt !== h.length - 1 ? g = `${g}${V[0]} ${V[1]}L` : g = `${g}${V[0]} ${V[1]}`;
160
- }), i += g;
152
+ return a.forEach((f) => {
153
+ let v = " M";
154
+ f.forEach((m, Mt) => {
155
+ const U = E([m[0], m[1]]);
156
+ Mt !== f.length - 1 ? v = `${v}${U[0]} ${U[1]}L` : v = `${v}${U[0]} ${U[1]}`;
157
+ }), i += v;
161
158
  }), /* @__PURE__ */ o.jsx(Lt.path, { variants: {
162
159
  initial: {
163
160
  fill: r,
@@ -167,15 +164,15 @@ function Ue(d) {
167
164
  fill: r,
168
165
  opacity: 1,
169
166
  transition: {
170
- duration: D.duration
167
+ duration: $.duration
171
168
  }
172
169
  }
173
170
  }, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
174
171
  opacity: 0,
175
172
  transition: {
176
- duration: D.duration
173
+ duration: $.duration
177
174
  }
178
- }, d: i, className: `${r === W ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
175
+ }, d: i, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
179
176
  strokeWidth: S
180
177
  } }, `${e.id}-${l}`);
181
178
  }
@@ -183,9 +180,9 @@ function Ue(d) {
183
180
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
184
181
  (a, l) => {
185
182
  let i = "M";
186
- return a.forEach((h, g) => {
187
- const c = E([h[0], h[1]]);
188
- g !== a.length - 1 ? i = `${i}${c[0]} ${c[1]}L` : i = `${i}${c[0]} ${c[1]}`;
183
+ return a.forEach((f, v) => {
184
+ const m = E([f[0], f[1]]);
185
+ v !== a.length - 1 ? i = `${i}${m[0]} ${m[1]}L` : i = `${i}${m[0]} ${m[1]}`;
189
186
  }), /* @__PURE__ */ o.jsx(Lt.path, { d: i, variants: {
190
187
  initial: {
191
188
  fill: r,
@@ -195,32 +192,32 @@ function Ue(d) {
195
192
  fill: r,
196
193
  opacity: 1,
197
194
  transition: {
198
- duration: D.duration
195
+ duration: $.duration
199
196
  }
200
197
  }
201
198
  }, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
202
199
  opacity: 0,
203
200
  transition: {
204
- duration: D.duration
201
+ duration: $.duration
205
202
  }
206
- }, className: `${r === W ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
203
+ }, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
207
204
  strokeWidth: S
208
205
  } }, `${e.id}-${l}`);
209
206
  }
210
207
  ) }, e.id);
211
208
  }) }),
212
- A ? j.features.filter(
209
+ G ? j.features.filter(
213
210
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
214
- (e) => e.properties[H] === A.id
211
+ (e) => e.properties[Y] === G.id
215
212
  ).map((e, n) => /* @__PURE__ */ o.jsx("g", { children: e.geometry.type === "MultiPolygon" ? (
216
213
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
217
- e.geometry.coordinates.map((u, s) => {
214
+ e.geometry.coordinates.map((x, s) => {
218
215
  let r = "";
219
- return u.forEach((a) => {
216
+ return x.forEach((a) => {
220
217
  let l = " M";
221
- a.forEach((i, h) => {
222
- const g = E([i[0], i[1]]);
223
- h !== a.length - 1 ? l = `${l}${g[0]} ${g[1]}L` : l = `${l}${g[0]} ${g[1]}`;
218
+ a.forEach((i, f) => {
219
+ const v = E([i[0], i[1]]);
220
+ f !== a.length - 1 ? l = `${l}${v[0]} ${v[1]}L` : l = `${l}${v[0]} ${v[1]}`;
224
221
  }), r += l;
225
222
  }), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
226
223
  fill: "none",
@@ -230,11 +227,11 @@ function Ue(d) {
230
227
  })
231
228
  ) : (
232
229
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
233
- e.geometry.coordinates.map((u, s) => {
230
+ e.geometry.coordinates.map((x, s) => {
234
231
  let r = "M";
235
- return u.forEach((a, l) => {
232
+ return x.forEach((a, l) => {
236
233
  const i = E([a[0], a[1]]);
237
- l !== u.length - 1 ? r = `${r}${i[0]} ${i[1]}L` : r = `${r}${i[0]} ${i[1]}`;
234
+ l !== x.length - 1 ? r = `${r}${i[0]} ${i[1]}L` : r = `${r}${i[0]} ${i[1]}`;
238
235
  }), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
239
236
  fill: "none",
240
237
  fillOpacity: 0,
@@ -244,26 +241,26 @@ function Ue(d) {
244
241
  ) }, n)) : null,
245
242
  rt.filter((e) => e.position === "after").map((e) => e.layer)
246
243
  ] }) }),
247
- vt === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: ue("absolute left-4 bottom-4 map-color-legend", _?.colorLegend), children: Bt ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
244
+ vt === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: be("absolute left-4 bottom-4 map-color-legend", T?.colorLegend), children: At ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
248
245
  /* @__PURE__ */ o.jsx("div", { className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]", onClick: () => {
249
246
  kt(!1);
250
- }, children: /* @__PURE__ */ o.jsx(Le, {}) }),
247
+ }, children: /* @__PURE__ */ o.jsx(Ae, {}) }),
251
248
  /* @__PURE__ */ o.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
252
249
  width: "175px"
253
250
  }, children: [
254
251
  /* @__PURE__ */ o.jsxs("div", { className: "flex gap-1 items-center", children: [
255
252
  /* @__PURE__ */ o.jsx("svg", { width: "136px", viewBox: "0 0 136 136", className: "shrink-0", children: /* @__PURE__ */ o.jsxs("g", { children: [
256
- x.map((e, n) => /* @__PURE__ */ o.jsx("g", { transform: `translate(0,${100 - n * 25})`, children: e.map((u, s) => /* @__PURE__ */ o.jsx("rect", { y: 1, x: s * 25 + 1, fill: u, width: 23, height: 23, strokeWidth: R === u ? 2 : 0.25, style: {
253
+ k.map((e, n) => /* @__PURE__ */ o.jsx("g", { transform: `translate(0,${100 - n * 25})`, children: e.map((x, s) => /* @__PURE__ */ o.jsx("rect", { y: 1, x: s * 25 + 1, fill: x, width: 23, height: 23, strokeWidth: q === x ? 2 : 0.25, style: {
257
254
  cursor: "pointer"
258
255
  }, onMouseOver: () => {
259
- wt(u);
256
+ wt(x);
260
257
  }, onMouseLeave: () => {
261
258
  wt(void 0);
262
259
  } }, s)) }, n)),
263
- /* @__PURE__ */ o.jsx("g", { transform: "translate(0,125)", children: b.map((e, n) => /* @__PURE__ */ o.jsx("text", { y: 10, x: (n + 1) * 25, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : se(e, "NA") }, n)) }),
264
- Q.map((e, n) => /* @__PURE__ */ o.jsx("g", { transform: `translate(${Math.max(Math.min(b.length + 1, 5), 4) * 25 + 10},${100 - n * 25})`, children: /* @__PURE__ */ o.jsx("text", { x: 0, transform: "rotate(-90)", y: 0, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : se(e, "NA") }) }, n))
260
+ /* @__PURE__ */ o.jsx("g", { transform: "translate(0,125)", children: y.map((e, n) => /* @__PURE__ */ o.jsx("text", { y: 10, x: (n + 1) * 25, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : pe(e, "NA") }, n)) }),
261
+ Q.map((e, n) => /* @__PURE__ */ o.jsx("g", { transform: `translate(${Math.max(Math.min(y.length + 1, 5), 4) * 25 + 10},${100 - n * 25})`, children: /* @__PURE__ */ o.jsx("text", { x: 0, transform: "rotate(-90)", y: 0, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : pe(e, "NA") }) }, n))
265
262
  ] }) }),
266
- /* @__PURE__ */ o.jsx(ne, { marginBottom: "none", size: "xs", className: "leading-normal text-center shrink-0", style: {
263
+ /* @__PURE__ */ o.jsx(me, { marginBottom: "none", size: "xs", className: "leading-normal text-center shrink-0", style: {
267
264
  display: "-webkit-box",
268
265
  WebkitLineClamp: "1",
269
266
  WebkitBoxOrient: "vertical",
@@ -273,7 +270,7 @@ function Ue(d) {
273
270
  transform: "rotate(180deg)"
274
271
  }, children: tt })
275
272
  ] }),
276
- /* @__PURE__ */ o.jsx(ne, { marginBottom: "none", size: "xs", className: "mt-1 leading-normal text-center", style: {
273
+ /* @__PURE__ */ o.jsx(me, { marginBottom: "none", size: "xs", className: "mt-1 leading-normal text-center", style: {
277
274
  display: "-webkit-box",
278
275
  WebkitLineClamp: "1",
279
276
  width: "8.5rem",
@@ -285,186 +282,204 @@ function Ue(d) {
285
282
  kt(!0);
286
283
  }, children: /* @__PURE__ */ o.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" }) }) }),
287
284
  O === "button" && /* @__PURE__ */ o.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
288
- /* @__PURE__ */ o.jsx("button", { onClick: () => Y("in"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "+" }),
289
- /* @__PURE__ */ o.jsx("button", { onClick: () => Y("out"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "–" })
285
+ /* @__PURE__ */ o.jsx("button", { onClick: () => K("in"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "+" }),
286
+ /* @__PURE__ */ o.jsx("button", { onClick: () => K("out"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "–" })
290
287
  ] })
291
288
  ] }),
292
- A && et && st && p ? /* @__PURE__ */ o.jsx(Oe, { data: A, body: et, xPos: st, yPos: p, backgroundStyle: _t?.tooltip, className: _?.tooltip }) : null,
293
- C && at !== void 0 ? /* @__PURE__ */ o.jsx(ze, { body: C, data: at, setData: it, className: _?.modal }) : null
289
+ G && et && st && g ? /* @__PURE__ */ o.jsx(_e, { data: G, body: et, xPos: st, yPos: g, backgroundStyle: _t?.tooltip, className: T?.tooltip }) : null,
290
+ C && at !== void 0 ? /* @__PURE__ */ o.jsx(Te, { body: C, data: at, setData: it, className: T?.modal }) : null
294
291
  ] });
295
292
  }
296
- function Oo(d) {
297
- const t = ge.c(101), {
298
- data: b,
293
+ function Lo(d) {
294
+ const t = ke.c(116), {
295
+ data: y,
299
296
  graphTitle: j,
300
297
  mapData: It,
301
298
  colors: Q,
302
299
  sources: tt,
303
- graphDescription: k,
304
- height: y,
305
- width: x,
300
+ graphDescription: w,
301
+ height: b,
302
+ width: k,
306
303
  footNote: zt,
307
- xDomain: $,
304
+ xDomain: D,
308
305
  yDomain: S,
309
- xColorLegendTitle: W,
306
+ xColorLegendTitle: F,
310
307
  yColorLegendTitle: gt,
311
308
  tooltip: et,
312
309
  scale: ft,
313
310
  centerPoint: yt,
314
311
  padding: xt,
315
- mapBorderWidth: G,
312
+ mapBorderWidth: X,
316
313
  mapNoDataColor: ot,
317
- backgroundColor: H,
314
+ backgroundColor: Y,
318
315
  mapBorderColor: Wt,
319
316
  relativeHeight: C,
320
317
  onSeriesMouseOver: vt,
321
318
  isWorldMap: _t,
322
- zoomScaleExtend: _,
323
- zoomTranslateExtend: B,
319
+ zoomScaleExtend: T,
320
+ zoomTranslateExtend: V,
324
321
  graphID: O,
325
- showColorScale: D,
322
+ showColorScale: $,
326
323
  highlightedIds: L,
327
324
  onSeriesMouseClick: rt,
328
325
  mapProperty: bt,
329
- graphDownload: Bt,
326
+ graphDownload: At,
330
327
  dataDownload: kt,
331
- showAntarctica: R,
328
+ showAntarctica: q,
332
329
  language: wt,
333
330
  minHeight: at,
334
331
  theme: it,
335
- ariaLabel: A,
332
+ ariaLabel: G,
336
333
  resetSelectionOnDoubleClick: nt,
337
334
  detailsOnClick: st,
338
- styles: m,
339
- classNames: p,
340
- mapProjection: U,
341
- zoomInteraction: T,
335
+ styles: h,
336
+ classNames: g,
337
+ mapProjection: J,
338
+ zoomInteraction: H,
342
339
  animate: lt,
343
340
  dimmedOpacity: jt,
344
- customLayers: F,
345
- timeline: X,
346
- collapseColorScaleByDefault: P
347
- } = d, M = It === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : It, I = Q === void 0 ? ae.light.bivariateColors.colors05x05 : Q, ct = zt === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : zt, Ct = W === void 0 ? "X Color key" : W, z = gt === void 0 ? "Y Color key" : gt, E = ft === void 0 ? 0.95 : ft, $t = G === void 0 ? 0.5 : G, Dt = ot === void 0 ? ae.light.graphNoData : ot, Nt = H === void 0 ? !1 : H, St = Wt === void 0 ? ae.light.grays["gray-500"] : Wt, Y = _t === void 0 ? !0 : _t;
341
+ customLayers: R,
342
+ timeline: P,
343
+ collapseColorScaleByDefault: I
344
+ } = d, M = It === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : It, z = Q === void 0 ? ce.light.bivariateColors.colors05x05 : Q, ct = zt === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : zt, Ct = F === void 0 ? "X Color key" : F, W = gt === void 0 ? "Y Color key" : gt, E = ft === void 0 ? 0.95 : ft, Dt = X === void 0 ? 0.5 : X, $t = ot === void 0 ? ce.light.graphNoData : ot, Nt = Y === void 0 ? !1 : Y, St = Wt === void 0 ? ce.light.grays["gray-500"] : Wt, K = _t === void 0 ? !0 : _t;
348
345
  let e;
349
- t[0] !== _ ? (e = _ === void 0 ? [0.8, 6] : _, t[0] = _, t[1] = e) : e = t[1];
350
- const n = e, u = D === void 0 ? !0 : D;
346
+ t[0] !== T ? (e = T === void 0 ? [0.8, 6] : T, t[0] = T, t[1] = e) : e = t[1];
347
+ const n = e, x = $ === void 0 ? !0 : $;
351
348
  let s;
352
349
  t[2] !== L ? (s = L === void 0 ? [] : L, t[2] = L, t[3] = s) : s = t[3];
353
- const r = s, a = bt === void 0 ? "ISO3" : bt, l = Bt === void 0 ? !1 : Bt, i = kt === void 0 ? !1 : kt, h = R === void 0 ? !1 : R, g = wt === void 0 ? "en" : wt, c = at === void 0 ? 0 : at, Mt = it === void 0 ? "light" : it, V = nt === void 0 ? !0 : nt, Jt = T === void 0 ? "button" : T, At = lt === void 0 ? !1 : lt, Kt = jt === void 0 ? 0.3 : jt;
350
+ const r = s, a = bt === void 0 ? "ISO3" : bt, l = At === void 0 ? !1 : At, i = kt === void 0 ? !1 : kt, f = q === void 0 ? !1 : q, v = wt === void 0 ? "en" : wt, m = at === void 0 ? 0 : at, Mt = it === void 0 ? "light" : it, U = nt === void 0 ? !0 : nt, te = H === void 0 ? "button" : H, Bt = lt === void 0 ? !1 : lt, ee = jt === void 0 ? 0.3 : jt;
351
+ let Ft;
352
+ t[4] !== R ? (Ft = R === void 0 ? [] : R, t[4] = R, t[5] = Ft) : Ft = t[5];
353
+ const oe = Ft;
354
354
  let Tt;
355
- t[4] !== F ? (Tt = F === void 0 ? [] : F, t[4] = F, t[5] = Tt) : Tt = t[5];
356
- const Zt = Tt, w = X === void 0 ? {
355
+ t[6] !== P ? (Tt = P === void 0 ? {
357
356
  enabled: !1,
358
357
  autoplay: !1,
359
358
  showOnlyActiveDate: !0
360
- } : X, [q, me] = N(0), [Et, pe] = N(0), [J, Qt] = N(w.autoplay), f = He(Fe(b, "date", !0).map((v) => be(`${v}`, w.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()), eo), [K, Ot] = N(w.autoplay ? 0 : f.length - 1), [dt, he] = N(void 0), te = Pt(null), ie = Pt(null);
361
- let Ft, Vt;
362
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (Ft = () => {
363
- const v = new ResizeObserver((Z) => {
364
- me(Z[0].target.clientWidth || 620), pe(Z[0].target.clientHeight || 480);
359
+ } : P, t[6] = P, t[7] = Tt) : Tt = t[7];
360
+ const c = Tt, [Z, fe] = N(0), [Et, ye] = N(0), [_, xe] = N(c.autoplay);
361
+ let Ot;
362
+ if (t[8] !== y || t[9] !== c.dateFormat) {
363
+ let u;
364
+ t[11] !== c.dateFormat ? (u = (B) => Ne(`${B.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[11] = c.dateFormat, t[12] = u) : u = t[12], Ot = [...new Set(y.filter(io).map(u))], Ot.sort(ao), t[8] = y, t[9] = c.dateFormat, t[10] = Ot;
365
+ } else
366
+ Ot = t[10];
367
+ const p = Ot, [A, re] = N(c.autoplay ? 0 : p.length - 1), [dt, ve] = N(void 0), ae = Pt(null), de = Pt(null);
368
+ let Vt, Gt;
369
+ t[13] === Symbol.for("react.memo_cache_sentinel") ? (Vt = () => {
370
+ const u = new ResizeObserver((B) => {
371
+ fe(B[0].target.clientWidth || 620), ye(B[0].target.clientHeight || 480);
365
372
  });
366
- return te.current && v.observe(te.current), () => v.disconnect();
367
- }, Vt = [], t[6] = Ft, t[7] = Vt) : (Ft = t[6], Vt = t[7]), qt(Ft, Vt);
368
- let Gt;
369
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (Gt = (v) => {
370
- he(v);
371
- }, t[8] = Gt) : Gt = t[8];
372
- const Ht = fe(Gt);
373
- let Rt;
374
- t[9] !== M || t[10] !== Ht ? (Rt = () => {
375
- typeof M == "string" ? Te(M).then((Z) => {
376
- Ht(Z);
377
- }) : Ht(M);
378
- }, t[9] = M, t[10] = Ht, t[11] = Rt) : Rt = t[11];
373
+ return ae.current && u.observe(ae.current), () => u.disconnect();
374
+ }, Gt = [], t[13] = Vt, t[14] = Gt) : (Vt = t[13], Gt = t[14]), Qt(Vt, Gt);
375
+ let Ht;
376
+ t[15] === Symbol.for("react.memo_cache_sentinel") ? (Ht = (u) => {
377
+ ve(u);
378
+ }, t[15] = Ht) : Ht = t[15];
379
+ const Rt = we(Ht);
379
380
  let Ut;
380
- t[12] !== M ? (Ut = [M], t[12] = M, t[13] = Ut) : Ut = t[13], qt(Rt, Ut), qt(() => {
381
- const v = setInterval(() => {
382
- Ot((Z) => Z < f.length - 1 ? Z + 1 : 0);
383
- }, (w.speed || 2) * 1e3);
384
- return J || clearInterval(v), () => clearInterval(v);
385
- }, [f, J, w.speed]);
386
- const Xt = ye(f, K, w.showOnlyActiveDate, w.dateFormat || "yyyy");
387
- if ($ && S && ($.length !== I[0].length - 1 || S.length !== I.length - 1))
381
+ t[16] !== M || t[17] !== Rt ? (Ut = () => {
382
+ typeof M == "string" ? Ue(M).then((B) => {
383
+ Rt(B);
384
+ }) : Rt(M);
385
+ }, t[16] = M, t[17] = Rt, t[18] = Ut) : Ut = t[18];
386
+ let Xt;
387
+ t[19] !== M ? (Xt = [M], t[19] = M, t[20] = Xt) : Xt = t[20], Qt(Ut, Xt);
388
+ let Yt, qt;
389
+ t[21] !== _ || t[22] !== c.speed || t[23] !== p ? (Yt = () => {
390
+ const u = setInterval(() => {
391
+ re((B) => B < p.length - 1 ? B + 1 : 0);
392
+ }, (c.speed || 2) * 1e3);
393
+ return _ || clearInterval(u), () => clearInterval(u);
394
+ }, qt = [p, _, c.speed], t[21] = _, t[22] = c.speed, t[23] = p, t[24] = Yt, t[25] = qt) : (Yt = t[24], qt = t[25]), Qt(Yt, qt);
395
+ const ie = c.dateFormat || "yyyy";
396
+ let Jt;
397
+ t[26] !== A || t[27] !== ie || t[28] !== c.showOnlyActiveDate || t[29] !== p ? (Jt = je(p, A, c.showOnlyActiveDate, ie), t[26] = A, t[27] = ie, t[28] = c.showOnlyActiveDate, t[29] = p, t[30] = Jt) : Jt = t[30];
398
+ const Kt = Jt;
399
+ if (D && S && (D.length !== z[0].length - 1 || S.length !== z.length - 1))
388
400
  return console.error("the xDomain and yDomain array length don't match to the color array length"), null;
389
- const ee = p?.graphContainer, oe = m?.graphContainer;
401
+ const ne = g?.graphContainer, se = h?.graphContainer;
390
402
  let mt;
391
- t[14] !== p?.description || t[15] !== p?.title || t[16] !== b || t[17] !== i || t[18] !== k || t[19] !== l || t[20] !== j || t[21] !== m?.description || t[22] !== m?.title || t[23] !== x ? (mt = j || k || l || i ? /* @__PURE__ */ o.jsx(Be, { styles: {
392
- title: m?.title,
393
- description: m?.description
403
+ t[31] !== g?.description || t[32] !== g?.title || t[33] !== y || t[34] !== i || t[35] !== w || t[36] !== l || t[37] !== j || t[38] !== h?.description || t[39] !== h?.title || t[40] !== k ? (mt = j || w || l || i ? /* @__PURE__ */ o.jsx(He, { styles: {
404
+ title: h?.title,
405
+ description: h?.description
394
406
  }, classNames: {
395
- title: p?.title,
396
- description: p?.description
397
- }, graphTitle: j, graphDescription: k, width: x, graphDownload: l ? ie : void 0, dataDownload: i ? b.map(to).filter(Qe).length > 0 ? b.map(Ze).filter(Ke) : b.filter(Je) : null }) : null, t[14] = p?.description, t[15] = p?.title, t[16] = b, t[17] = i, t[18] = k, t[19] = l, t[20] = j, t[21] = m?.description, t[22] = m?.title, t[23] = x, t[24] = mt) : mt = t[24];
407
+ title: g?.title,
408
+ description: g?.description
409
+ }, graphTitle: j, graphDescription: w, width: k, graphDownload: l ? de : void 0, dataDownload: i ? y.map(ro).filter(oo).length > 0 ? y.map(eo).filter(to) : y.filter(Qe) : null }) : null, t[31] = g?.description, t[32] = g?.title, t[33] = y, t[34] = i, t[35] = w, t[36] = l, t[37] = j, t[38] = h?.description, t[39] = h?.title, t[40] = k, t[41] = mt) : mt = t[41];
398
410
  let pt;
399
- t[25] !== K || t[26] !== Xt || t[27] !== J || t[28] !== Ot || t[29] !== Qt || t[30] !== w.enabled || t[31] !== f ? (pt = w.enabled && f.length > 0 && Xt ? /* @__PURE__ */ o.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
411
+ t[42] !== A || t[43] !== Kt || t[44] !== _ || t[45] !== c.enabled || t[46] !== p ? (pt = c.enabled && p.length > 0 && Kt ? /* @__PURE__ */ o.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
400
412
  /* @__PURE__ */ o.jsx("button", { type: "button", onClick: () => {
401
- Qt(!J);
402
- }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": J ? "Click to pause animation" : "Click to play animation", children: J ? /* @__PURE__ */ o.jsx(Pe, {}) : /* @__PURE__ */ o.jsx(Ie, {}) }),
403
- /* @__PURE__ */ o.jsx(xe, { min: f[0], max: f[f.length - 1], marks: Xt, step: null, defaultValue: f[f.length - 1], value: f[K], onChangeComplete: (v) => {
404
- Ot(f.indexOf(v));
405
- }, onChange: (v) => {
406
- Ot(f.indexOf(v));
413
+ xe(!_);
414
+ }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": _ ? "Click to pause animation" : "Click to play animation", children: _ ? /* @__PURE__ */ o.jsx(Be, {}) : /* @__PURE__ */ o.jsx(Fe, {}) }),
415
+ /* @__PURE__ */ o.jsx(Ce, { min: p[0], max: p[p.length - 1], marks: Kt, step: null, defaultValue: p[p.length - 1], value: p[A], onChangeComplete: (u) => {
416
+ re(p.indexOf(u));
417
+ }, onChange: (u) => {
418
+ re(p.indexOf(u));
407
419
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
408
- ] }) : null, t[25] = K, t[26] = Xt, t[27] = J, t[28] = Ot, t[29] = Qt, t[30] = w.enabled, t[31] = f, t[32] = pt) : pt = t[32];
420
+ ] }) : null, t[42] = A, t[43] = Kt, t[44] = _, t[45] = c.enabled, t[46] = p, t[47] = pt) : pt = t[47];
409
421
  let ht;
410
- t[33] !== At || t[34] !== yt || t[35] !== p || t[36] !== P || t[37] !== I || t[38] !== Zt || t[39] !== b || t[40] !== st || t[41] !== Kt || t[42] !== y || t[43] !== r || t[44] !== K || t[45] !== Y || t[46] !== St || t[47] !== $t || t[48] !== Dt || t[49] !== U || t[50] !== a || t[51] !== dt || t[52] !== c || t[53] !== rt || t[54] !== vt || t[55] !== C || t[56] !== V || t[57] !== E || t[58] !== h || t[59] !== u || t[60] !== m || t[61] !== Et || t[62] !== q || t[63] !== w.dateFormat || t[64] !== w.enabled || t[65] !== et || t[66] !== f || t[67] !== x || t[68] !== Ct || t[69] !== $ || t[70] !== z || t[71] !== S || t[72] !== Jt || t[73] !== n || t[74] !== B ? (ht = /* @__PURE__ */ o.jsx(Ve, { ref: te, children: q && Et && dt ? /* @__PURE__ */ o.jsx(Ue, { data: b.filter((v) => w.enabled ? v.date === ke(new Date(f[K]), w.dateFormat || "yyyy") : v), mapData: h ? dt : {
422
+ t[48] !== Bt || t[49] !== yt || t[50] !== g || t[51] !== I || t[52] !== z || t[53] !== oe || t[54] !== y || t[55] !== st || t[56] !== ee || t[57] !== b || t[58] !== r || t[59] !== A || t[60] !== K || t[61] !== St || t[62] !== Dt || t[63] !== $t || t[64] !== J || t[65] !== a || t[66] !== dt || t[67] !== m || t[68] !== rt || t[69] !== vt || t[70] !== C || t[71] !== U || t[72] !== E || t[73] !== f || t[74] !== x || t[75] !== h || t[76] !== Et || t[77] !== Z || t[78] !== c.dateFormat || t[79] !== c.enabled || t[80] !== et || t[81] !== p || t[82] !== k || t[83] !== Ct || t[84] !== D || t[85] !== W || t[86] !== S || t[87] !== te || t[88] !== n || t[89] !== V ? (ht = /* @__PURE__ */ o.jsx(Xe, { ref: ae, children: Z && Et && dt ? /* @__PURE__ */ o.jsx(qe, { data: y.filter((u) => c.enabled ? u.date === $e(new Date(p[A]), c.dateFormat || "yyyy") : u), mapData: f ? dt : {
411
423
  ...dt,
412
- features: dt.features.filter(qe)
413
- }, xDomain: $ || de(b.map(Ye), I[0].length), yDomain: S || de(b.map(Xe), I.length), width: q, height: Et, scale: E, centerPoint: yt, colors: I, xColorLegendTitle: Ct, yColorLegendTitle: z, mapBorderWidth: $t, mapNoDataColor: Dt, mapBorderColor: St, tooltip: et, onSeriesMouseOver: vt, isWorldMap: Y, zoomScaleExtend: n, zoomTranslateExtend: B, onSeriesMouseClick: rt, mapProperty: a, highlightedIds: r, resetSelectionOnDoubleClick: V, styles: m, showColorScale: u, classNames: p, mapProjection: U || (Y ? "naturalEarth" : "mercator"), detailsOnClick: st, zoomInteraction: Jt, animate: At === !0 ? {
424
+ features: dt.features.filter(Ze)
425
+ }, xDomain: D || ge(y.map(Ke), z[0].length), yDomain: S || ge(y.map(Je), z.length), width: Z, height: Et, scale: E, centerPoint: yt, colors: z, xColorLegendTitle: Ct, yColorLegendTitle: W, mapBorderWidth: Dt, mapNoDataColor: $t, mapBorderColor: St, tooltip: et, onSeriesMouseOver: vt, isWorldMap: K, zoomScaleExtend: n, zoomTranslateExtend: V, onSeriesMouseClick: rt, mapProperty: a, highlightedIds: r, resetSelectionOnDoubleClick: U, styles: h, showColorScale: x, classNames: g, mapProjection: J || (K ? "naturalEarth" : "mercator"), detailsOnClick: st, zoomInteraction: te, animate: Bt === !0 ? {
414
426
  duration: 0.5,
415
427
  once: !0,
416
428
  amount: 0.5
417
- } : At || {
429
+ } : Bt || {
418
430
  duration: 0,
419
431
  once: !0,
420
432
  amount: 0
421
- }, dimmedOpacity: Kt, customLayers: Zt, collapseColorScaleByDefault: P }) : /* @__PURE__ */ o.jsx("div", { style: {
422
- height: `${Math.max(c, y || (C ? c ? (x || q) * C > c ? (x || q) * C : c : (x || q) * C : Et))}px`
423
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(ve, { "aria-label": "Loading graph" }) }) }), t[33] = At, t[34] = yt, t[35] = p, t[36] = P, t[37] = I, t[38] = Zt, t[39] = b, t[40] = st, t[41] = Kt, t[42] = y, t[43] = r, t[44] = K, t[45] = Y, t[46] = St, t[47] = $t, t[48] = Dt, t[49] = U, t[50] = a, t[51] = dt, t[52] = c, t[53] = rt, t[54] = vt, t[55] = C, t[56] = V, t[57] = E, t[58] = h, t[59] = u, t[60] = m, t[61] = Et, t[62] = q, t[63] = w.dateFormat, t[64] = w.enabled, t[65] = et, t[66] = f, t[67] = x, t[68] = Ct, t[69] = $, t[70] = z, t[71] = S, t[72] = Jt, t[73] = n, t[74] = B, t[75] = ht) : ht = t[75];
433
+ }, dimmedOpacity: ee, customLayers: oe, collapseColorScaleByDefault: I }) : /* @__PURE__ */ o.jsx("div", { style: {
434
+ height: `${Math.max(m, b || (C ? m ? (k || Z) * C > m ? (k || Z) * C : m : (k || Z) * C : Et))}px`
435
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(De, { "aria-label": "Loading graph" }) }) }), t[48] = Bt, t[49] = yt, t[50] = g, t[51] = I, t[52] = z, t[53] = oe, t[54] = y, t[55] = st, t[56] = ee, t[57] = b, t[58] = r, t[59] = A, t[60] = K, t[61] = St, t[62] = Dt, t[63] = $t, t[64] = J, t[65] = a, t[66] = dt, t[67] = m, t[68] = rt, t[69] = vt, t[70] = C, t[71] = U, t[72] = E, t[73] = f, t[74] = x, t[75] = h, t[76] = Et, t[77] = Z, t[78] = c.dateFormat, t[79] = c.enabled, t[80] = et, t[81] = p, t[82] = k, t[83] = Ct, t[84] = D, t[85] = W, t[86] = S, t[87] = te, t[88] = n, t[89] = V, t[90] = ht) : ht = t[90];
424
436
  let ut;
425
- t[76] !== p?.footnote || t[77] !== p?.source || t[78] !== ct || t[79] !== tt || t[80] !== m?.footnote || t[81] !== m?.source || t[82] !== x ? (ut = tt || ct ? /* @__PURE__ */ o.jsx(Ae, { styles: {
426
- footnote: m?.footnote,
427
- source: m?.source
437
+ t[91] !== g?.footnote || t[92] !== g?.source || t[93] !== ct || t[94] !== tt || t[95] !== h?.footnote || t[96] !== h?.source || t[97] !== k ? (ut = tt || ct ? /* @__PURE__ */ o.jsx(Re, { styles: {
438
+ footnote: h?.footnote,
439
+ source: h?.source
428
440
  }, classNames: {
429
- footnote: p?.footnote,
430
- source: p?.source
431
- }, sources: tt, footNote: ct, width: x }) : null, t[76] = p?.footnote, t[77] = p?.source, t[78] = ct, t[79] = tt, t[80] = m?.footnote, t[81] = m?.source, t[82] = x, t[83] = ut) : ut = t[83];
432
- let Yt;
433
- return t[84] !== A || t[85] !== Nt || t[86] !== O || t[87] !== y || t[88] !== g || t[89] !== c || t[90] !== xt || t[91] !== C || t[92] !== ee || t[93] !== oe || t[94] !== mt || t[95] !== pt || t[96] !== ht || t[97] !== ut || t[98] !== Mt || t[99] !== x ? (Yt = /* @__PURE__ */ o.jsxs(Ge, { className: ee, style: oe, id: O, ref: ie, "aria-label": A, backgroundColor: Nt, theme: Mt, language: g, minHeight: c, width: x, height: y, relativeHeight: C, padding: xt, children: [
441
+ footnote: g?.footnote,
442
+ source: g?.source
443
+ }, sources: tt, footNote: ct, width: k }) : null, t[91] = g?.footnote, t[92] = g?.source, t[93] = ct, t[94] = tt, t[95] = h?.footnote, t[96] = h?.source, t[97] = k, t[98] = ut) : ut = t[98];
444
+ let Zt;
445
+ return t[99] !== G || t[100] !== Nt || t[101] !== O || t[102] !== b || t[103] !== v || t[104] !== m || t[105] !== xt || t[106] !== C || t[107] !== ne || t[108] !== se || t[109] !== mt || t[110] !== pt || t[111] !== ht || t[112] !== ut || t[113] !== Mt || t[114] !== k ? (Zt = /* @__PURE__ */ o.jsxs(Ye, { className: ne, style: se, id: O, ref: de, "aria-label": G, backgroundColor: Nt, theme: Mt, language: v, minHeight: m, width: k, height: b, relativeHeight: C, padding: xt, children: [
434
446
  mt,
435
447
  pt,
436
448
  ht,
437
449
  ut
438
- ] }), t[84] = A, t[85] = Nt, t[86] = O, t[87] = y, t[88] = g, t[89] = c, t[90] = xt, t[91] = C, t[92] = ee, t[93] = oe, t[94] = mt, t[95] = pt, t[96] = ht, t[97] = ut, t[98] = Mt, t[99] = x, t[100] = Yt) : Yt = t[100], Yt;
450
+ ] }), t[99] = G, t[100] = Nt, t[101] = O, t[102] = b, t[103] = v, t[104] = m, t[105] = xt, t[106] = C, t[107] = ne, t[108] = se, t[109] = mt, t[110] = pt, t[111] = ht, t[112] = ut, t[113] = Mt, t[114] = k, t[115] = Zt) : Zt = t[115], Zt;
439
451
  }
440
- function Xe(d) {
452
+ function Je(d) {
441
453
  return d.y;
442
454
  }
443
- function Ye(d) {
455
+ function Ke(d) {
444
456
  return d.x;
445
457
  }
446
- function qe(d) {
458
+ function Ze(d) {
447
459
  return d.properties.NAME !== "Antarctica";
448
460
  }
449
- function Je(d) {
461
+ function Qe(d) {
450
462
  return d !== void 0;
451
463
  }
452
- function Ke(d) {
464
+ function to(d) {
453
465
  return d !== void 0;
454
466
  }
455
- function Ze(d) {
467
+ function eo(d) {
456
468
  return d.data;
457
469
  }
458
- function Qe(d) {
470
+ function oo(d) {
459
471
  return d !== void 0;
460
472
  }
461
- function to(d) {
473
+ function ro(d) {
462
474
  return d.data;
463
475
  }
464
- function eo(d, t) {
465
- return Re(d, t);
476
+ function ao(d, t) {
477
+ return d - t;
478
+ }
479
+ function io(d) {
480
+ return d.date;
466
481
  }
467
482
  export {
468
- Oo as BiVariateChoroplethMap
483
+ Lo as BiVariateChoroplethMap
469
484
  };
470
485
  //# sourceMappingURL=BiVariateChoroplethMap.js.map