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