@undp/data-viz 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/BiVariateChoroplethMap.cjs +1 -1
  2. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  3. package/dist/BiVariateChoroplethMap.js +297 -289
  4. package/dist/BiVariateChoroplethMap.js.map +1 -1
  5. package/dist/ChoroplethMap.cjs +1 -1
  6. package/dist/ChoroplethMap.cjs.map +1 -1
  7. package/dist/ChoroplethMap.js +307 -299
  8. package/dist/ChoroplethMap.js.map +1 -1
  9. package/dist/CopyTextButton.cjs +1 -1
  10. package/dist/CopyTextButton.cjs.map +1 -1
  11. package/dist/CopyTextButton.js +281 -279
  12. package/dist/CopyTextButton.js.map +1 -1
  13. package/dist/CsvDownloadButton.cjs +4 -4
  14. package/dist/CsvDownloadButton.cjs.map +1 -1
  15. package/dist/CsvDownloadButton.js +268 -266
  16. package/dist/CsvDownloadButton.js.map +1 -1
  17. package/dist/DotDensityMap.cjs +1 -1
  18. package/dist/DotDensityMap.cjs.map +1 -1
  19. package/dist/DotDensityMap.js +277 -269
  20. package/dist/DotDensityMap.js.map +1 -1
  21. package/dist/ExcelDownloadButton.cjs +1 -1
  22. package/dist/ExcelDownloadButton.cjs.map +1 -1
  23. package/dist/ExcelDownloadButton.js +21 -19
  24. package/dist/ExcelDownloadButton.js.map +1 -1
  25. package/dist/HybridMap.cjs +1 -1
  26. package/dist/HybridMap.cjs.map +1 -1
  27. package/dist/HybridMap.js +299 -291
  28. package/dist/HybridMap.js.map +1 -1
  29. package/dist/ImageDownloadButton.cjs +1 -1
  30. package/dist/ImageDownloadButton.cjs.map +1 -1
  31. package/dist/ImageDownloadButton.js +19 -17
  32. package/dist/ImageDownloadButton.js.map +1 -1
  33. package/dist/SVGDownloadButton.cjs +1 -1
  34. package/dist/SVGDownloadButton.cjs.map +1 -1
  35. package/dist/SVGDownloadButton.js +20 -18
  36. package/dist/SVGDownloadButton.js.map +1 -1
  37. package/dist/ScatterPlot.cjs +1 -1
  38. package/dist/ScatterPlot.cjs.map +1 -1
  39. package/dist/ScatterPlot.d.ts +1 -1
  40. package/dist/ScatterPlot.js +107 -107
  41. package/dist/ScatterPlot.js.map +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/package.json +1 -1
package/dist/HybridMap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as Qt, m as _t, a as Gt, j as a, c as eo } from "./index-CHPV5EwG-BzibaIRc.js";
2
2
  import * as to from "react";
3
- import oo, { useMemo as Wt, useState as S, useRef as Ye, useEffect as Xe, useEffectEvent as Vt } from "react";
3
+ import oo, { useMemo as Wt, useState as O, useRef as Ye, useEffect as Xe, useEffectEvent as Vt } from "react";
4
4
  import { f as ao, p as ro } from "./parse-Dv4of-PN.js";
5
5
  import { g as io, N as no } from "./getSliderMarks-X-_goqH9.js";
6
6
  import { w as lo } from "./Spinner-B2IIKg9r.js";
@@ -14,296 +14,298 @@ import { T as xo } from "./Tooltip-3EYDVa3w.js";
14
14
  import { X as bo, E as wo, P as jo, e as ko } from "./index-ApTBN0kp.js";
15
15
  import { D as Do } from "./DetailsModal-GqEbGHY2.js";
16
16
  import { ImageDownloadButton as Co } from "./ImageDownloadButton.js";
17
- import { s as No } from "./pow-BXYLJHCq.js";
18
- import { o as Mo } from "./ordinal-CHaxGJ_l.js";
19
- import { t as So } from "./threshold-DFfqcDMa.js";
17
+ import { CsvDownloadButton as No } from "./CsvDownloadButton.js";
18
+ import { s as Mo } from "./pow-BXYLJHCq.js";
19
+ import { o as So } from "./ordinal-CHaxGJ_l.js";
20
+ import { t as Oo } from "./threshold-DFfqcDMa.js";
20
21
  import { s as Pt } from "./select-DKy99ogv.js";
21
- import { m as se } from "./proxy-BsxtcZKa.js";
22
+ import { m as le } from "./proxy-BsxtcZKa.js";
22
23
  import { c as vt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
23
- import { n as Oo } from "./numberFormattingFunction-BUUV_luR.js";
24
- import { u as Eo } from "./use-in-view-KOXq5Kmc.js";
24
+ import { n as Eo } from "./numberFormattingFunction-BUUV_luR.js";
25
+ import { u as Bo } from "./use-in-view-KOXq5Kmc.js";
25
26
  import { A as Io } from "./index-Cv_5q6Rb.js";
26
- import { GraphFooter as Bo } from "./GraphFooter.js";
27
- import { GraphHeader as zo } from "./GraphHeader.js";
28
- import { Colors as Ce } from "./Colors.js";
27
+ import { GraphFooter as zo } from "./GraphFooter.js";
28
+ import { GraphHeader as Po } from "./GraphHeader.js";
29
+ import { Colors as Me } from "./Colors.js";
29
30
  import { f as At } from "./fetchAndParseData-BAXhgTDM.js";
30
- import { a as Po, G as _o } from "./GraphContainer-B8ZqOzKI.js";
31
- import { g as Lo } from "./getUniqValue-DsqSii6M.js";
32
- import { g as Wo } from "./getJenks-DTCcQSDi.js";
33
- var Vo = "Separator", Rt = "horizontal", $o = ["horizontal", "vertical"], Ut = to.forwardRef((r, e) => {
34
- const { decorative: o, orientation: w = Rt, ...y } = r, n = Fo(w) ? w : Rt, v = o ? { role: "none" } : { "aria-orientation": n === "vertical" ? n : void 0, role: "separator" };
31
+ import { a as _o, G as Lo } from "./GraphContainer-B8ZqOzKI.js";
32
+ import { g as Wo } from "./getUniqValue-DsqSii6M.js";
33
+ import { g as Vo } from "./getJenks-DTCcQSDi.js";
34
+ var $o = "Separator", Rt = "horizontal", Fo = ["horizontal", "vertical"], Ut = to.forwardRef((r, e) => {
35
+ const { decorative: o, orientation: b = Rt, ...g } = r, n = To(b) ? b : Rt, y = o ? { role: "none" } : { "aria-orientation": n === "vertical" ? n : void 0, role: "separator" };
35
36
  return /* @__PURE__ */ Gt.jsx(
36
37
  vo.div,
37
38
  {
38
39
  "data-orientation": n,
39
- ...v,
40
40
  ...y,
41
+ ...g,
41
42
  ref: e
42
43
  }
43
44
  );
44
45
  });
45
- Ut.displayName = Vo;
46
- function Fo(r) {
47
- return $o.includes(r);
46
+ Ut.displayName = $o;
47
+ function To(r) {
48
+ return Fo.includes(r);
48
49
  }
49
50
  var qt = Ut;
50
51
  const Ht = oo.forwardRef((r, e) => {
51
52
  const o = Qt.c(14);
52
- let w, y, n, v;
53
+ let b, g, n, y;
53
54
  o[0] !== r ? ({
54
- className: w,
55
+ className: b,
55
56
  variant: n,
56
- orientation: v,
57
- ...y
58
- } = r, o[0] = r, o[1] = w, o[2] = y, o[3] = n, o[4] = v) : (w = o[1], y = o[2], n = o[3], v = o[4]);
59
- const x = n === void 0 ? "dark" : n, s = v === void 0 ? "horizontal" : v, u = s === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", C = x === "dark" ? "bg-primary-gray-600 dark:bg-primary-gray-200" : "bg-primary-gray-400 dark:bg-primary-gray-550";
57
+ orientation: y,
58
+ ...g
59
+ } = r, o[0] = r, o[1] = b, o[2] = g, o[3] = n, o[4] = y) : (b = o[1], g = o[2], n = o[3], y = o[4]);
60
+ const v = n === void 0 ? "dark" : n, s = y === void 0 ? "horizontal" : y, h = s === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", N = v === "dark" ? "bg-primary-gray-600 dark:bg-primary-gray-200" : "bg-primary-gray-400 dark:bg-primary-gray-550";
60
61
  let D;
61
- o[5] !== w || o[6] !== u || o[7] !== C ? (D = _t(u, C, w), o[5] = w, o[6] = u, o[7] = C, o[8] = D) : D = o[8];
62
+ o[5] !== b || o[6] !== h || o[7] !== N ? (D = _t(h, N, b), o[5] = b, o[6] = h, o[7] = N, o[8] = D) : D = o[8];
62
63
  let I;
63
- return o[9] !== s || o[10] !== y || o[11] !== e || o[12] !== D ? (I = /* @__PURE__ */ Gt.jsx(qt, { ...y, ref: e, orientation: s, className: D }), o[9] = s, o[10] = y, o[11] = e, o[12] = D, o[13] = I) : I = o[13], I;
64
+ return o[9] !== s || o[10] !== g || o[11] !== e || o[12] !== D ? (I = /* @__PURE__ */ Gt.jsx(qt, { ...g, ref: e, orientation: s, className: D }), o[9] = s, o[10] = g, o[11] = e, o[12] = D, o[13] = I) : I = o[13], I;
64
65
  });
65
66
  Ht.displayName = qt.displayName;
66
- function To(r) {
67
+ function Ao(r) {
67
68
  const {
68
69
  data: e,
69
70
  colors: o,
70
- mapData: w,
71
- mapColorLegendTitle: y,
71
+ mapData: b,
72
+ mapColorLegendTitle: g,
72
73
  colorDomain: n,
73
- radius: v,
74
- height: x,
74
+ radius: y,
75
+ height: v,
75
76
  width: s,
76
- scale: u,
77
- centerPoint: C,
77
+ scale: h,
78
+ centerPoint: N,
78
79
  tooltip: D,
79
80
  showLabels: I,
80
- mapBorderWidth: ce,
81
- mapBorderColor: de,
82
- mapNoDataColor: Ne,
81
+ mapBorderWidth: se,
82
+ mapBorderColor: ce,
83
+ mapNoDataColor: Se,
83
84
  onSeriesMouseOver: q,
84
- showColorScale: Me,
85
+ showColorScale: Oe,
85
86
  zoomScaleExtend: Ze,
86
87
  zoomTranslateExtend: Je,
87
- highlightedDataPoints: Se,
88
- onSeriesMouseClick: L,
89
- resetSelectionOnDoubleClick: Oe,
88
+ highlightedDataPoints: Ee,
89
+ onSeriesMouseClick: F,
90
+ resetSelectionOnDoubleClick: Be,
90
91
  detailsOnClick: H,
91
- styles: N,
92
+ styles: M,
92
93
  classNames: X,
93
- mapProjection: te,
94
+ mapProjection: ae,
94
95
  zoomInteraction: Y,
95
- animate: b,
96
- dimmedOpacity: B,
97
- customLayers: me,
98
- maxRadiusValue: Ee,
99
- categorical: oe,
96
+ animate: x,
97
+ dimmedOpacity: z,
98
+ customLayers: de,
99
+ maxRadiusValue: Ie,
100
+ categorical: re,
100
101
  dotColor: Z,
101
- collapseColorScaleByDefault: Ie,
102
- highlightedIds: W,
103
- mapProperty: pe,
104
- dotLegendTitle: ue,
105
- dotBorderColor: Be,
106
- labelColor: ze,
102
+ collapseColorScaleByDefault: ze,
103
+ highlightedIds: T,
104
+ mapProperty: me,
105
+ dotLegendTitle: pe,
106
+ dotBorderColor: Pe,
107
+ labelColor: _e,
107
108
  projectionRotate: J,
108
109
  rewindCoordinatesInMapData: K,
109
- overlayMapData: p,
110
- overlayMapBorderColor: g,
110
+ overlayMapData: u,
111
+ overlayMapBorderColor: f,
111
112
  overlayMapBorderWidth: Ke,
112
- numberDisplayOptions: he,
113
- graphDownload: Pe
114
- } = r, Q = Wt(() => K ? Ft(w, {
113
+ numberDisplayOptions: ue,
114
+ graphDownload: he,
115
+ dataDownload: Q
116
+ } = r, P = Wt(() => K ? Ft(b, {
115
117
  reverse: !0
116
- }) : w, [w, K]), fe = Wt(() => !K || !p ? p : Ft(p, {
118
+ }) : b, [b, K]), fe = Wt(() => !K || !u ? u : Ft(u, {
117
119
  reverse: !0
118
- }), [p, K]), [M, O] = S(void 0), [_e, Le] = S(Ie === void 0 ? !(s < 680) : !Ie), ae = Ye(null), [re, V] = S(void 0), [ge, $] = S(void 0), [ie, F] = S(void 0), [ye, h] = S(void 0), k = Ye(null), z = Eo(k, {
119
- once: b.once,
120
- amount: b.amount
121
- }), P = Ye(null), _ = e.filter((t) => t.radius === void 0 || t.radius === null).length !== e.length ? No().domain([0, Ee]).range([0.25, v]).nice() : void 0, We = oe ? Mo().domain(n).range(o) : So().domain(n).range(o);
120
+ }), [u, K]), [S, _] = O(void 0), [Qe, ge] = O(ze === void 0 ? !(s < 680) : !ze), ye = Ye(null), [ee, A] = O(void 0), [Le, E] = O(void 0), [We, L] = O(void 0), [w, j] = O(void 0), W = Ye(null), C = Bo(W, {
121
+ once: x.once,
122
+ amount: x.amount
123
+ }), ve = Ye(null), V = e.filter((t) => t.radius === void 0 || t.radius === null).length !== e.length ? Mo().domain([0, Ie]).range([0.25, y]).nice() : void 0, Ve = re ? So().domain(n).range(o) : Oo().domain(n).range(o);
122
124
  Xe(() => {
123
- const t = Pt(P.current), i = Pt(k.current), f = (l) => {
125
+ const t = Pt(ve.current), i = Pt(W.current), l = (m) => {
124
126
  if (Y === "noZoom") return !1;
125
- if (Y === "button") return !l.type.includes("wheel");
126
- const Te = l.type === "wheel", Ae = l.type.startsWith("touch"), Re = l.type === "mousedown" || l.type === "mousemove";
127
- return Ae ? !0 : Te ? Y === "scroll" ? !0 : l.ctrlKey : Re && !l.button && !l.ctrlKey;
128
- }, j = so().scaleExtent(Ze).translateExtent(Je || [[-20, -20], [s + 20, x + 20]]).filter(f).on("zoom", ({
129
- transform: l
127
+ if (Y === "button") return !m.type.includes("wheel");
128
+ const Ae = m.type === "wheel", Re = m.type.startsWith("touch"), we = m.type === "mousedown" || m.type === "mousemove";
129
+ return Re ? !0 : Ae ? Y === "scroll" ? !0 : m.ctrlKey : we && !m.button && !m.ctrlKey;
130
+ }, k = so().scaleExtent(Ze).translateExtent(Je || [[-20, -20], [s + 20, v + 20]]).filter(l).on("zoom", ({
131
+ transform: m
130
132
  }) => {
131
- t.attr("transform", l);
133
+ t.attr("transform", m);
132
134
  });
133
- i.call(j), ae.current = j;
134
- }, [x, s, Y]);
135
- const ee = co(Q), T = yo(Q), Ve = (ee[2] - ee[0]) * 1.15, $e = (ee[3] - ee[1]) * 1.15, Fe = s * 190 / 960 * 360 / Ve, ve = x * 190 / 678 * 180 / $e, A = u * Math.min(Fe, ve), R = te === "mercator" ? mo().rotate(J).center(C || T.geometry.coordinates).translate([s / 2, x / 2]).scale(A) : te === "equalEarth" ? po().rotate(J).center(C || T.geometry.coordinates).translate([s / 2, x / 2]).scale(A) : te === "naturalEarth" ? uo().rotate(J).center(C || T.geometry.coordinates).translate([s / 2, x / 2]).scale(A) : te === "orthographic" ? ho().rotate(J).center(C || T.geometry.coordinates).translate([s / 2, x / 2]).scale(A) : fo().rotate(J).center(C || T.geometry.coordinates).translate([s / 2, x / 2]).scale(A), ne = go().projection(R), xe = (t) => {
136
- if (!k.current || !ae.current) return;
137
- Pt(k.current).call(ae.current.scaleBy, t === "in" ? 1.2 : 1 / 1.2);
135
+ i.call(k), ye.current = k;
136
+ }, [v, s, Y]);
137
+ const te = co(P), R = yo(P), $e = (te[2] - te[0]) * 1.15, Fe = (te[3] - te[1]) * 1.15, xe = s * 190 / 960 * 360 / $e, Te = v * 190 / 678 * 180 / Fe, $ = h * Math.min(xe, Te), oe = ae === "mercator" ? mo().rotate(J).center(N || R.geometry.coordinates).translate([s / 2, v / 2]).scale($) : ae === "equalEarth" ? po().rotate(J).center(N || R.geometry.coordinates).translate([s / 2, v / 2]).scale($) : ae === "naturalEarth" ? uo().rotate(J).center(N || R.geometry.coordinates).translate([s / 2, v / 2]).scale($) : ae === "orthographic" ? ho().rotate(J).center(N || R.geometry.coordinates).translate([s / 2, v / 2]).scale($) : fo().rotate(J).center(N || R.geometry.coordinates).translate([s / 2, v / 2]).scale($), ie = go().projection(oe), be = (t) => {
138
+ if (!W.current || !ye.current) return;
139
+ Pt(W.current).call(ye.current.scaleBy, t === "in" ? 1.2 : 1 / 1.2);
138
140
  };
139
141
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
140
142
  /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
141
- /* @__PURE__ */ a.jsx(se.svg, { width: `${s}px`, height: `${x}px`, viewBox: `0 0 ${s} ${x}`, ref: k, direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { ref: P, children: [
142
- me.filter((t) => t.position === "before").map((t) => t.layer),
143
- Q.features.map((t, i) => {
144
- if (!t.properties?.[pe]) return null;
145
- const f = ne(t);
146
- return f ? /* @__PURE__ */ a.jsx(se.g, { opacity: M ? B : W ? W.indexOf(t.properties[pe]) !== -1 ? 1 : B : 1, children: /* @__PURE__ */ a.jsx("path", { d: f, style: {
147
- stroke: de,
148
- strokeWidth: ce,
149
- fill: Ne,
143
+ /* @__PURE__ */ a.jsx(le.svg, { width: `${s}px`, height: `${v}px`, viewBox: `0 0 ${s} ${v}`, ref: W, direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { ref: ve, children: [
144
+ de.filter((t) => t.position === "before").map((t) => t.layer),
145
+ P.features.map((t, i) => {
146
+ if (!t.properties?.[me]) return null;
147
+ const l = ie(t);
148
+ return l ? /* @__PURE__ */ a.jsx(le.g, { opacity: S ? z : T ? T.indexOf(t.properties[me]) !== -1 ? 1 : z : 1, children: /* @__PURE__ */ a.jsx("path", { d: l, style: {
149
+ stroke: ce,
150
+ strokeWidth: se,
151
+ fill: Se,
150
152
  vectorEffect: "non-scaling-stroke"
151
153
  } }) }, i) : null;
152
154
  }),
153
155
  /* @__PURE__ */ a.jsxs(Io, { children: [
154
156
  e.filter((t) => t.id).map((t) => {
155
- const i = Q.features.findIndex(
157
+ const i = P.features.findIndex(
156
158
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
157
- (l) => t.id === l.properties[pe]
159
+ (m) => t.id === m.properties[me]
158
160
  );
159
161
  if (i === -1) return null;
160
- const f = ne(Q.features[i]);
161
- if (!f) return null;
162
- const j = vt(t.x) ? Ne : (
162
+ const l = ie(P.features[i]);
163
+ if (!l) return null;
164
+ const k = vt(t.x) ? Se : (
163
165
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
164
- We(t.x)
166
+ Ve(t.x)
165
167
  );
166
- return /* @__PURE__ */ a.jsx(se.g, { className: "undp-map-shapes", variants: {
168
+ return /* @__PURE__ */ a.jsx(le.g, { className: "undp-map-shapes", variants: {
167
169
  initial: {
168
170
  opacity: 0
169
171
  },
170
172
  whileInView: {
171
- opacity: M ? M === j && (!W || W.indexOf(t.id) !== -1) ? 1 : B : W ? W.indexOf(t.id) !== -1 ? 1 : B : 1,
173
+ opacity: S ? S === k && (!T || T.indexOf(t.id) !== -1) ? 1 : z : T ? T.indexOf(t.id) !== -1 ? 1 : z : 1,
172
174
  transition: {
173
- duration: b.duration
175
+ duration: x.duration
174
176
  }
175
177
  }
176
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
178
+ }, initial: "initial", animate: C ? "whileInView" : "initial", exit: {
177
179
  opacity: 0,
178
180
  transition: {
179
- duration: b.duration
181
+ duration: x.duration
180
182
  }
181
- }, onMouseEnter: (l) => {
182
- $(t), h(l.clientY), F(l.clientX), q?.(t);
183
- }, onMouseMove: (l) => {
184
- $(t), h(l.clientY), F(l.clientX);
183
+ }, onMouseEnter: (m) => {
184
+ E(t), j(m.clientY), L(m.clientX), q?.(t);
185
+ }, onMouseMove: (m) => {
186
+ E(t), j(m.clientY), L(m.clientX);
185
187
  }, onMouseLeave: () => {
186
- $(void 0), F(void 0), h(void 0), q?.(void 0);
188
+ E(void 0), L(void 0), j(void 0), q?.(void 0);
187
189
  }, onClick: () => {
188
- (L || H) && ($t(re, t) && Oe ? (V(void 0), L?.(void 0)) : (V(t), L?.(t)));
189
- }, children: /* @__PURE__ */ a.jsx(se.path, { d: f, variants: {
190
+ (F || H) && ($t(ee, t) && Be ? (A(void 0), F?.(void 0)) : (A(t), F?.(t)));
191
+ }, children: /* @__PURE__ */ a.jsx(le.path, { d: l, variants: {
190
192
  initial: {
191
- fill: j,
193
+ fill: k,
192
194
  opacity: 0
193
195
  },
194
196
  whileInView: {
195
- fill: j,
197
+ fill: k,
196
198
  opacity: 1,
197
199
  transition: {
198
- duration: b.duration
200
+ duration: x.duration
199
201
  }
200
202
  }
201
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
203
+ }, initial: "initial", animate: C ? "whileInView" : "initial", exit: {
202
204
  opacity: 0,
203
205
  transition: {
204
- duration: b.duration
206
+ duration: x.duration
205
207
  }
206
208
  }, style: {
207
- stroke: de,
208
- strokeWidth: ce,
209
+ stroke: ce,
210
+ strokeWidth: se,
209
211
  vectorEffect: "non-scaling-stroke"
210
212
  } }, `${t.id}`) }, t.id);
211
213
  }),
212
214
  fe?.features.map((t, i) => {
213
- const f = ne(t);
214
- return f ? /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("path", { d: f, style: {
215
- stroke: g || de,
216
- strokeWidth: Ke || ce + 1,
215
+ const l = ie(t);
216
+ return l ? /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("path", { d: l, style: {
217
+ stroke: f || ce,
218
+ strokeWidth: Ke || se + 1,
217
219
  fill: "none",
218
220
  pointerEvents: "none",
219
221
  vectorEffect: "non-scaling-stroke"
220
222
  } }) }, i) : null;
221
223
  }),
222
224
  e.filter((t) => !vt(t.lat) && !vt(t.long)).map((t) => {
223
- const i = R([t.long, t.lat])[0] > 0.8 * s ? -1 : 1;
224
- return /* @__PURE__ */ a.jsxs(se.g, { className: "undp-map-dots", variants: {
225
+ const i = oe([t.long, t.lat])[0] > 0.8 * s ? -1 : 1;
226
+ return /* @__PURE__ */ a.jsxs(le.g, { className: "undp-map-dots", variants: {
225
227
  initial: {
226
228
  opacity: 0
227
229
  },
228
230
  whileInView: {
229
- opacity: Se ? Se.indexOf(t.label || "") !== -1 ? 1 : B : 1,
231
+ opacity: Ee ? Ee.indexOf(t.label || "") !== -1 ? 1 : z : 1,
230
232
  transition: {
231
- duration: b.duration
233
+ duration: x.duration
232
234
  }
233
235
  }
234
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
236
+ }, initial: "initial", animate: C ? "whileInView" : "initial", exit: {
235
237
  opacity: 0,
236
238
  transition: {
237
- duration: b.duration
239
+ duration: x.duration
238
240
  }
239
- }, onMouseEnter: (f) => {
240
- $(t), h(f.clientY), F(f.clientX), q?.(t);
241
- }, onMouseMove: (f) => {
242
- $(t), h(f.clientY), F(f.clientX);
241
+ }, onMouseEnter: (l) => {
242
+ E(t), j(l.clientY), L(l.clientX), q?.(t);
243
+ }, onMouseMove: (l) => {
244
+ E(t), j(l.clientY), L(l.clientX);
243
245
  }, onMouseLeave: () => {
244
- $(void 0), F(void 0), h(void 0), q?.(void 0);
246
+ E(void 0), L(void 0), j(void 0), q?.(void 0);
245
247
  }, onClick: () => {
246
- (L || H) && ($t(re, t) && Oe ? (V(void 0), L?.(void 0)) : (V(t), L?.(t)));
247
- }, transform: `translate(${R([t.long, t.lat])[0]},${R([t.long, t.lat])[1]})`, children: [
248
- /* @__PURE__ */ a.jsx(se.circle, { cx: 0, cy: 0, variants: {
248
+ (F || H) && ($t(ee, t) && Be ? (A(void 0), F?.(void 0)) : (A(t), F?.(t)));
249
+ }, transform: `translate(${oe([t.long, t.lat])[0]},${oe([t.long, t.lat])[1]})`, children: [
250
+ /* @__PURE__ */ a.jsx(le.circle, { cx: 0, cy: 0, variants: {
249
251
  initial: {
250
252
  r: 0,
251
253
  fill: Z,
252
- stroke: Be || Z
254
+ stroke: Pe || Z
253
255
  },
254
256
  whileInView: {
255
- r: _ ? _(t.radius || 0) : v,
257
+ r: V ? V(t.radius || 0) : y,
256
258
  fill: Z,
257
- stroke: Be || Z,
259
+ stroke: Pe || Z,
258
260
  transition: {
259
- duration: b.duration
261
+ duration: x.duration
260
262
  }
261
263
  }
262
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
264
+ }, initial: "initial", animate: C ? "whileInView" : "initial", exit: {
263
265
  r: 0,
264
266
  transition: {
265
- duration: b.duration
267
+ duration: x.duration
266
268
  }
267
269
  }, style: {
268
270
  fillOpacity: 0.8,
269
271
  vectorEffect: "non-scaling-stroke"
270
272
  } }),
271
- I && t.label ? /* @__PURE__ */ a.jsx(se.text, { variants: {
273
+ I && t.label ? /* @__PURE__ */ a.jsx(le.text, { variants: {
272
274
  initial: {
273
275
  opacity: 0,
274
- x: i * (_ ? _(t.radius || 0) : v)
276
+ x: i * (V ? V(t.radius || 0) : y)
275
277
  },
276
278
  whileInView: {
277
279
  opacity: 1,
278
- x: i * (_ ? _(t.radius || 0) : v),
280
+ x: i * (V ? V(t.radius || 0) : y),
279
281
  transition: {
280
- duration: b.duration
282
+ duration: x.duration
281
283
  }
282
284
  }
283
- }, initial: "initial", animate: z ? "whileInView" : "initial", exit: {
285
+ }, initial: "initial", animate: C ? "whileInView" : "initial", exit: {
284
286
  opacity: 0,
285
287
  transition: {
286
- duration: b.duration
288
+ duration: x.duration
287
289
  }
288
290
  }, y: 0, className: _t("text-sm", X?.graphObjectValues), style: {
289
291
  textAnchor: i === -1 ? "end" : "start",
290
- fill: ze || "#000",
292
+ fill: _e || "#000",
291
293
  vectorEffect: "non-scaling-stroke",
292
- ...N?.graphObjectValues || {}
294
+ ...M?.graphObjectValues || {}
293
295
  }, dx: i * 4, dy: 5, children: t.label }) : null
294
296
  ] }, t.label || `${t.lat}-${t.long}`);
295
297
  })
296
298
  ] }),
297
- me.filter((t) => t.position === "after").map((t) => t.layer)
299
+ de.filter((t) => t.position === "after").map((t) => t.layer)
298
300
  ] }) }),
299
- Me === !1 ? null : /* @__PURE__ */ a.jsx("div", { className: _t("absolute left-4 bottom-4 map-color-legend", X?.colorLegend), children: _e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
301
+ Oe === !1 ? null : /* @__PURE__ */ a.jsx("div", { className: _t("absolute left-4 bottom-4 map-color-legend", X?.colorLegend), children: Qe ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
300
302
  /* @__PURE__ */ a.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: () => {
301
- Le(!1);
303
+ ge(!1);
302
304
  }, children: /* @__PURE__ */ a.jsx(bo, {}) }),
303
305
  /* @__PURE__ */ a.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
304
- width: oe ? void 0 : "340px"
306
+ width: re ? void 0 : "340px"
305
307
  }, children: [
306
- ue && ue !== "" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
308
+ pe && pe !== "" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
307
309
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
308
310
  /* @__PURE__ */ a.jsx("div", { className: "w-3 h-3 rounded-full", style: {
309
311
  backgroundColor: Z
@@ -312,21 +314,21 @@ function To(r) {
312
314
  display: "-webkit-box",
313
315
  WebkitLineClamp: "1",
314
316
  WebkitBoxOrient: "vertical"
315
- }, children: ue })
317
+ }, children: pe })
316
318
  ] }),
317
319
  /* @__PURE__ */ a.jsx(Tt, { size: "xl" }),
318
320
  /* @__PURE__ */ a.jsx(Ht, {}),
319
321
  /* @__PURE__ */ a.jsx(Tt, { size: "xl" })
320
322
  ] }) : null,
321
- y && y !== "" ? /* @__PURE__ */ a.jsx(zt, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
323
+ g && g !== "" ? /* @__PURE__ */ a.jsx(zt, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
322
324
  display: "-webkit-box",
323
325
  WebkitLineClamp: "1",
324
326
  WebkitBoxOrient: "vertical"
325
- }, children: y }) : null,
326
- oe ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: n.map((t, i) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
327
- O(o[i % o.length]);
327
+ }, children: g }) : null,
328
+ re ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: n.map((t, i) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
329
+ _(o[i % o.length]);
328
330
  }, onMouseLeave: () => {
329
- O(void 0);
331
+ _(void 0);
330
332
  }, children: [
331
333
  /* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
332
334
  backgroundColor: o[i % o.length]
@@ -334,138 +336,144 @@ function To(r) {
334
336
  /* @__PURE__ */ a.jsx(zt, { size: "sm", marginBottom: "none", leading: "none", children: t })
335
337
  ] }, i)) }) : /* @__PURE__ */ a.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { children: [
336
338
  n.map((t, i) => /* @__PURE__ */ a.jsxs("g", { onMouseOver: () => {
337
- O(o[i]);
339
+ _(o[i]);
338
340
  }, onMouseLeave: () => {
339
- O(void 0);
341
+ _(void 0);
340
342
  }, className: "cursor-pointer", children: [
341
- /* @__PURE__ */ a.jsx("rect", { x: i * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: M === o[i] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
343
+ /* @__PURE__ */ a.jsx("rect", { x: i * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: S === o[i] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
342
344
  fill: o[i],
343
- ...M === o[i] ? {} : {
345
+ ...S === o[i] ? {} : {
344
346
  stroke: o[i]
345
347
  }
346
348
  } }),
347
349
  /* @__PURE__ */ a.jsx("text", { x: (i + 1) * 320 / o.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
348
350
  textAnchor: "middle"
349
- }, children: Oo(t, void 0, he?.precision ?? 2, void 0, void 0, he?.locale || "en", he?.padZeros || !1) })
351
+ }, children: Eo(t, void 0, ue?.precision ?? 2, void 0, void 0, ue?.locale || "en", ue?.padZeros || !1) })
350
352
  ] }, i)),
351
353
  /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("rect", { onMouseOver: () => {
352
- O(o[n.length]);
354
+ _(o[n.length]);
353
355
  }, onMouseLeave: () => {
354
- O(void 0);
355
- }, x: n.length * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: `cursor-pointer ${M === o[n.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
356
+ _(void 0);
357
+ }, x: n.length * 320 / o.length + 1, y: 1, width: 320 / o.length - 2, height: 8, className: `cursor-pointer ${S === o[n.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
356
358
  fill: o[n.length],
357
- ...M === o[n.length] ? {} : {
359
+ ...S === o[n.length] ? {} : {
358
360
  stroke: o[n.length]
359
361
  }
360
362
  } }) })
361
363
  ] }) })
362
364
  ] })
363
365
  ] }) : /* @__PURE__ */ a.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
364
- Le(!0);
366
+ ge(!0);
365
367
  }, children: /* @__PURE__ */ a.jsx(wo, {}) }) }),
366
368
  Y === "button" && /* @__PURE__ */ a.jsxs("div", { className: "absolute left-4 top-4 flex flex-col undp-viz-zoom-buttons", children: [
367
- /* @__PURE__ */ a.jsx("button", { onClick: () => xe("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: "+" }),
368
- /* @__PURE__ */ a.jsx("button", { onClick: () => xe("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: "–" })
369
+ /* @__PURE__ */ a.jsx("button", { onClick: () => be("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: "+" }),
370
+ /* @__PURE__ */ a.jsx("button", { onClick: () => be("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: "–" })
369
371
  ] }),
370
- Pe && /* @__PURE__ */ a.jsx("div", { className: "absolute right-4 top-4 flex flex-col image-download-button", children: /* @__PURE__ */ a.jsx(Co, { nodeID: Pe, buttonSmall: !0 }) })
372
+ (he || Q) && /* @__PURE__ */ a.jsxs("div", { className: "absolute right-4 top-4 flex flex-col image-download-button gap-2", children: [
373
+ he && /* @__PURE__ */ a.jsx(Co, { nodeID: he, buttonSmall: !0, className: "p-1" }),
374
+ Q && Q.length > 0 && /* @__PURE__ */ a.jsx(No, { csvData: Q, buttonSmall: !0, headers: Object.keys(Q[0]).map((t) => ({
375
+ label: t,
376
+ key: t
377
+ })), className: "p-1" })
378
+ ] })
371
379
  ] }),
372
- H && re !== void 0 ? /* @__PURE__ */ a.jsx(Do, { body: H, data: re, setData: V, className: X?.modal }) : null,
373
- ge && D && ie && ye ? /* @__PURE__ */ a.jsx(xo, { data: ge, body: D, xPos: ie, yPos: ye, backgroundStyle: N?.tooltip, className: X?.tooltip }) : null
380
+ H && ee !== void 0 ? /* @__PURE__ */ a.jsx(Do, { body: H, data: ee, setData: A, className: X?.modal }) : null,
381
+ Le && D && We && w ? /* @__PURE__ */ a.jsx(xo, { data: Le, body: D, xPos: We, yPos: w, backgroundStyle: M?.tooltip, className: X?.tooltip }) : null
374
382
  ] });
375
383
  }
376
- function Ea(r) {
377
- const e = eo.c(141), {
384
+ function Ia(r) {
385
+ const e = eo.c(140), {
378
386
  data: o,
379
- mapData: w,
380
- graphTitle: y,
387
+ mapData: b,
388
+ graphTitle: g,
381
389
  colors: n,
382
- sources: v,
383
- graphDescription: x,
390
+ sources: y,
391
+ graphDescription: v,
384
392
  height: s,
385
- width: u,
386
- footNote: C,
393
+ width: h,
394
+ footNote: N,
387
395
  mapColorLegendTitle: D,
388
396
  colorDomain: I,
389
- choroplethScaleType: ce,
390
- radius: de,
391
- scale: Ne,
397
+ choroplethScaleType: se,
398
+ radius: ce,
399
+ scale: Se,
392
400
  centerPoint: q,
393
- padding: Me,
401
+ padding: Oe,
394
402
  mapBorderWidth: Ze,
395
403
  mapNoDataColor: Je,
396
- backgroundColor: Se,
397
- showLabels: L,
398
- mapBorderColor: Oe,
404
+ backgroundColor: Ee,
405
+ showLabels: F,
406
+ mapBorderColor: Be,
399
407
  tooltip: H,
400
- relativeHeight: N,
408
+ relativeHeight: M,
401
409
  onSeriesMouseOver: X,
402
- isWorldMap: te,
410
+ isWorldMap: ae,
403
411
  showColorScale: Y,
404
- zoomScaleExtend: b,
405
- zoomTranslateExtend: B,
406
- graphID: me,
407
- highlightedDataPoints: Ee,
408
- onSeriesMouseClick: oe,
412
+ zoomScaleExtend: x,
413
+ zoomTranslateExtend: z,
414
+ graphID: de,
415
+ highlightedDataPoints: Ie,
416
+ onSeriesMouseClick: re,
409
417
  graphDownload: Z,
410
- dataDownload: Ie,
411
- showAntarctica: W,
412
- language: pe,
413
- minHeight: ue,
414
- theme: Be,
415
- ariaLabel: ze,
418
+ dataDownload: ze,
419
+ showAntarctica: T,
420
+ language: me,
421
+ minHeight: pe,
422
+ theme: Pe,
423
+ ariaLabel: _e,
416
424
  resetSelectionOnDoubleClick: J,
417
425
  detailsOnClick: K,
418
- styles: p,
419
- classNames: g,
426
+ styles: u,
427
+ classNames: f,
420
428
  mapProjection: Ke,
421
- zoomInteraction: he,
422
- animate: Pe,
429
+ zoomInteraction: ue,
430
+ animate: he,
423
431
  dimmedOpacity: Q,
424
- customLayers: fe,
425
- maxRadiusValue: M,
426
- timeline: O,
427
- collapseColorScaleByDefault: _e,
428
- dotColor: Le,
429
- highlightedIds: ae,
430
- mapProperty: re,
431
- dotLegendTitle: V,
432
- dotBorderColor: ge,
433
- labelColor: $,
434
- projectionRotate: ie,
435
- rewindCoordinatesInMapData: F,
436
- numberDisplayOptions: ye,
437
- mapOverlay: h
438
- } = r, k = w === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : w, z = C === 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." : C, P = ce === void 0 ? "threshold" : ce, _ = de === void 0 ? 5 : de, We = Ne === void 0 ? 0.95 : Ne, ee = Ze === void 0 ? 0.5 : Ze, T = Je === void 0 ? Ce.light.graphNoData : Je, Ve = Se === void 0 ? !1 : Se, $e = L === void 0 ? !1 : L, Fe = Oe === void 0 ? Ce.light.grays["gray-500"] : Oe, ve = te === void 0 ? !0 : te, A = Y === void 0 ? !0 : Y;
439
- let R;
440
- e[0] !== b ? (R = b === void 0 ? [0.8, 6] : b, e[0] = b, e[1] = R) : R = e[1];
441
- const ne = R, xe = Z === void 0 ? !1 : Z, t = Ie === void 0 ? !1 : Ie, i = W === void 0 ? !1 : W, f = pe === void 0 ? "en" : pe, j = ue === void 0 ? 0 : ue, l = Be === void 0 ? "light" : Be, Te = J === void 0 ? !0 : J, Ae = Ke === void 0 ? "naturalEarth" : Ke, Re = he === void 0 ? "button" : he, Qe = Pe === void 0 ? !1 : Pe, xt = Q === void 0 ? 0.3 : Q;
432
+ customLayers: P,
433
+ maxRadiusValue: fe,
434
+ timeline: S,
435
+ collapseColorScaleByDefault: _,
436
+ dotColor: Qe,
437
+ highlightedIds: ge,
438
+ mapProperty: ye,
439
+ dotLegendTitle: ee,
440
+ dotBorderColor: A,
441
+ labelColor: Le,
442
+ projectionRotate: E,
443
+ rewindCoordinatesInMapData: We,
444
+ numberDisplayOptions: L,
445
+ mapOverlay: w
446
+ } = r, j = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : b, W = N === 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." : N, C = se === void 0 ? "threshold" : se, ve = ce === void 0 ? 5 : ce, V = Se === void 0 ? 0.95 : Se, Ve = Ze === void 0 ? 0.5 : Ze, te = Je === void 0 ? Me.light.graphNoData : Je, R = Ee === void 0 ? !1 : Ee, $e = F === void 0 ? !1 : F, Fe = Be === void 0 ? Me.light.grays["gray-500"] : Be, xe = ae === void 0 ? !0 : ae, Te = Y === void 0 ? !0 : Y;
447
+ let $;
448
+ e[0] !== x ? ($ = x === void 0 ? [0.8, 6] : x, e[0] = x, e[1] = $) : $ = e[1];
449
+ const oe = $, ie = Z === void 0 ? !1 : Z, be = ze === void 0 ? !1 : ze, t = T === void 0 ? !1 : T, i = me === void 0 ? "en" : me, l = pe === void 0 ? 0 : pe, k = Pe === void 0 ? "light" : Pe, m = J === void 0 ? !0 : J, Ae = Ke === void 0 ? "naturalEarth" : Ke, Re = ue === void 0 ? "button" : ue, we = he === void 0 ? !1 : he, xt = Q === void 0 ? 0.3 : Q;
442
450
  let et;
443
- e[2] !== fe ? (et = fe === void 0 ? [] : fe, e[2] = fe, e[3] = et) : et = e[3];
451
+ e[2] !== P ? (et = P === void 0 ? [] : P, e[2] = P, e[3] = et) : et = e[3];
444
452
  const bt = et;
445
453
  let tt;
446
- e[4] !== O ? (tt = O === void 0 ? {
454
+ e[4] !== S ? (tt = S === void 0 ? {
447
455
  enabled: !1,
448
456
  autoplay: !1,
449
457
  showOnlyActiveDate: !0
450
- } : O, e[4] = O, e[5] = tt) : tt = e[5];
451
- const c = tt, wt = Le === void 0 ? Ce.primaryColors["blue-600"] : Le, jt = re === void 0 ? "ISO3" : re, kt = $ === void 0 ? Ce.primaryColors["blue-600"] : $;
458
+ } : S, e[4] = S, e[5] = tt) : tt = e[5];
459
+ const c = tt, wt = Qe === void 0 ? Me.primaryColors["blue-600"] : Qe, jt = ye === void 0 ? "ISO3" : ye, kt = Le === void 0 ? Me.primaryColors["blue-600"] : Le;
452
460
  let ot;
453
- e[6] !== ie ? (ot = ie === void 0 ? [0, 0] : ie, e[6] = ie, e[7] = ot) : ot = e[7];
454
- const Dt = ot, Ct = F === void 0 ? !0 : F, [le, Xt] = S(0), [Ge, Yt] = S(0), [G, Zt] = S(c.autoplay);
461
+ e[6] !== E ? (ot = E === void 0 ? [0, 0] : E, e[6] = E, e[7] = ot) : ot = e[7];
462
+ const Dt = ot, Ct = We === void 0 ? !0 : We, [ne, Xt] = O(0), [Ge, Yt] = O(0), [G, Zt] = O(c.autoplay);
455
463
  let Ue;
456
464
  if (e[8] !== o || e[9] !== c.dateFormat) {
457
465
  let d;
458
- e[11] !== c.dateFormat ? (d = (E) => ro(`${E.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = c.dateFormat, e[12] = d) : d = e[12], Ue = [...new Set(o.filter(Ko).map(d))], Ue.sort(Jo), e[8] = o, e[9] = c.dateFormat, e[10] = Ue;
466
+ e[11] !== c.dateFormat ? (d = (B) => ro(`${B.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), e[11] = c.dateFormat, e[12] = d) : d = e[12], Ue = [...new Set(o.filter(Qo).map(d))], Ue.sort(Ko), e[8] = o, e[9] = c.dateFormat, e[10] = Ue;
459
467
  } else
460
468
  Ue = e[10];
461
- const m = Ue, [U, Nt] = S(c.autoplay ? 0 : m.length - 1), [be, Jt] = S(void 0), [Mt, Kt] = S(void 0), St = Ye(null), Lt = Ye(null);
469
+ const p = Ue, [U, Nt] = O(c.autoplay ? 0 : p.length - 1), [je, Jt] = O(void 0), [Mt, Kt] = O(void 0), St = Ye(null), Lt = Ye(null);
462
470
  let at;
463
- e[13] !== P || e[14] !== I || e[15] !== n?.length || e[16] !== o ? (at = I || (P === "categorical" ? Lo(o, "x") : Wo(o.map(Zo), n?.length || 4)), e[13] = P, e[14] = I, e[15] = n?.length, e[16] = o, e[17] = at) : at = e[17];
471
+ e[13] !== C || e[14] !== I || e[15] !== n?.length || e[16] !== o ? (at = I || (C === "categorical" ? Wo(o, "x") : Vo(o.map(Jo), n?.length || 4)), e[13] = C, e[14] = I, e[15] = n?.length, e[16] = o, e[17] = at) : at = e[17];
464
472
  const qe = at;
465
473
  let rt, it;
466
474
  e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (rt = () => {
467
- const d = new ResizeObserver((E) => {
468
- Xt(E[0].target.clientWidth || 620), Yt(E[0].target.clientHeight || 480);
475
+ const d = new ResizeObserver((B) => {
476
+ Xt(B[0].target.clientWidth || 620), Yt(B[0].target.clientHeight || 480);
469
477
  });
470
478
  return St.current && d.observe(St.current), () => d.disconnect();
471
479
  }, it = [], e[18] = rt, e[19] = it) : (rt = e[18], it = e[19]), Xe(rt, it);
@@ -480,94 +488,91 @@ function Ea(r) {
480
488
  }, e[21] = st) : st = e[21];
481
489
  const He = Vt(st);
482
490
  let ct;
483
- e[22] !== k || e[23] !== lt ? (ct = () => {
484
- typeof k == "string" ? At(k).then((E) => {
485
- lt(E);
486
- }) : lt(k);
487
- }, e[22] = k, e[23] = lt, e[24] = ct) : ct = e[24];
491
+ e[22] !== j || e[23] !== lt ? (ct = () => {
492
+ typeof j == "string" ? At(j).then((B) => {
493
+ lt(B);
494
+ }) : lt(j);
495
+ }, e[22] = j, e[23] = lt, e[24] = ct) : ct = e[24];
488
496
  let dt;
489
- e[25] !== k ? (dt = [k], e[25] = k, e[26] = dt) : dt = e[26], Xe(ct, dt);
497
+ e[25] !== j ? (dt = [j], e[25] = j, e[26] = dt) : dt = e[26], Xe(ct, dt);
490
498
  let mt;
491
- e[27] !== h?.mapData || e[28] !== He ? (mt = () => {
492
- h?.mapData || He(void 0), typeof h?.mapData == "string" ? At(h?.mapData).then((E) => {
493
- He(E);
494
- }) : He(h?.mapData);
495
- }, e[27] = h?.mapData, e[28] = He, e[29] = mt) : mt = e[29];
496
- const Ot = h?.mapData;
499
+ e[27] !== w?.mapData || e[28] !== He ? (mt = () => {
500
+ w?.mapData || He(void 0), typeof w?.mapData == "string" ? At(w?.mapData).then((B) => {
501
+ He(B);
502
+ }) : He(w?.mapData);
503
+ }, e[27] = w?.mapData, e[28] = He, e[29] = mt) : mt = e[29];
504
+ const Ot = w?.mapData;
497
505
  let pt;
498
506
  e[30] !== Ot ? (pt = [Ot], e[30] = Ot, e[31] = pt) : pt = e[31], Xe(mt, pt);
499
507
  let ut, ht;
500
- e[32] !== G || e[33] !== c.speed || e[34] !== m ? (ut = () => {
508
+ e[32] !== G || e[33] !== c.speed || e[34] !== p ? (ut = () => {
501
509
  const d = setInterval(() => {
502
- Nt((E) => E < m.length - 1 ? E + 1 : 0);
510
+ Nt((B) => B < p.length - 1 ? B + 1 : 0);
503
511
  }, (c.speed || 2) * 1e3);
504
512
  return G || clearInterval(d), () => clearInterval(d);
505
- }, ht = [m, G, c.speed], e[32] = G, e[33] = c.speed, e[34] = m, e[35] = ut, e[36] = ht) : (ut = e[35], ht = e[36]), Xe(ut, ht);
513
+ }, ht = [p, G, c.speed], e[32] = G, e[33] = c.speed, e[34] = p, e[35] = ut, e[36] = ht) : (ut = e[35], ht = e[36]), Xe(ut, ht);
506
514
  const Et = c.dateFormat || "yyyy";
507
515
  let ft;
508
- e[37] !== U || e[38] !== Et || e[39] !== c.showOnlyActiveDate || e[40] !== m ? (ft = io(m, U, c.showOnlyActiveDate, Et), e[37] = U, e[38] = Et, e[39] = c.showOnlyActiveDate, e[40] = m, e[41] = ft) : ft = e[41];
509
- const gt = ft, It = g?.graphContainer, Bt = p?.graphContainer;
510
- let we;
511
- e[42] !== g?.description || e[43] !== g?.title || e[44] !== o || e[45] !== t || e[46] !== x || e[47] !== y || e[48] !== p?.description || e[49] !== p?.title || e[50] !== u ? (we = y || x || t ? /* @__PURE__ */ a.jsx(zo, { styles: {
512
- title: p?.title,
513
- description: p?.description
516
+ e[37] !== U || e[38] !== Et || e[39] !== c.showOnlyActiveDate || e[40] !== p ? (ft = io(p, U, c.showOnlyActiveDate, Et), e[37] = U, e[38] = Et, e[39] = c.showOnlyActiveDate, e[40] = p, e[41] = ft) : ft = e[41];
517
+ const gt = ft, Bt = f?.graphContainer, It = u?.graphContainer;
518
+ let ke;
519
+ e[42] !== f?.description || e[43] !== f?.title || e[44] !== v || e[45] !== g || e[46] !== u?.description || e[47] !== u?.title || e[48] !== h ? (ke = g || v ? /* @__PURE__ */ a.jsx(Po, { styles: {
520
+ title: u?.title,
521
+ description: u?.description
514
522
  }, classNames: {
515
- title: g?.title,
516
- description: g?.description
517
- }, graphTitle: y, graphDescription: x, width: u, dataDownload: t ? o.map(Yo).filter(Xo).length > 0 ? o.map(Ho).filter(qo) : o.filter(Uo) : null }) : null, e[42] = g?.description, e[43] = g?.title, e[44] = o, e[45] = t, e[46] = x, e[47] = y, e[48] = p?.description, e[49] = p?.title, e[50] = u, e[51] = we) : we = e[51];
518
- let je;
519
- e[52] !== U || e[53] !== gt || e[54] !== G || e[55] !== c.enabled || e[56] !== m ? (je = c.enabled && m.length > 0 && gt ? /* @__PURE__ */ a.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
523
+ title: f?.title,
524
+ description: f?.description
525
+ }, graphTitle: g, graphDescription: v, width: h }) : null, e[42] = f?.description, e[43] = f?.title, e[44] = v, e[45] = g, e[46] = u?.description, e[47] = u?.title, e[48] = h, e[49] = ke) : ke = e[49];
526
+ let De;
527
+ e[50] !== U || e[51] !== gt || e[52] !== G || e[53] !== c.enabled || e[54] !== p ? (De = c.enabled && p.length > 0 && gt ? /* @__PURE__ */ a.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
520
528
  /* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
521
529
  Zt(!G);
522
530
  }, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": G ? "Click to pause animation" : "Click to play animation", children: G ? /* @__PURE__ */ a.jsx(jo, {}) : /* @__PURE__ */ a.jsx(ko, {}) }),
523
- /* @__PURE__ */ a.jsx(no, { min: m[0], max: m[m.length - 1], marks: gt, step: null, defaultValue: m[m.length - 1], value: m[U], onChangeComplete: (d) => {
524
- Nt(m.indexOf(d));
531
+ /* @__PURE__ */ a.jsx(no, { min: p[0], max: p[p.length - 1], marks: gt, step: null, defaultValue: p[p.length - 1], value: p[U], onChangeComplete: (d) => {
532
+ Nt(p.indexOf(d));
525
533
  }, onChange: (d) => {
526
- Nt(m.indexOf(d));
534
+ Nt(p.indexOf(d));
527
535
  }, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
528
- ] }) : null, e[52] = U, e[53] = gt, e[54] = G, e[55] = c.enabled, e[56] = m, e[57] = je) : je = e[57];
529
- let ke;
530
- e[58] !== Qe || e[59] !== q || e[60] !== P || e[61] !== g || e[62] !== _e || e[63] !== n || e[64] !== bt || e[65] !== o || e[66] !== K || e[67] !== xt || e[68] !== qe || e[69] !== ge || e[70] !== wt || e[71] !== V || e[72] !== xe || e[73] !== s || e[74] !== Ee || e[75] !== ae || e[76] !== U || e[77] !== ve || e[78] !== kt || e[79] !== Fe || e[80] !== ee || e[81] !== D || e[82] !== T || e[83] !== h?.mapBorderColor || e[84] !== h?.mapBorderWidth || e[85] !== Ae || e[86] !== jt || e[87] !== be || e[88] !== M || e[89] !== j || e[90] !== ye || e[91] !== oe || e[92] !== X || e[93] !== Mt || e[94] !== Dt || e[95] !== _ || e[96] !== N || e[97] !== Te || e[98] !== Ct || e[99] !== We || e[100] !== i || e[101] !== A || e[102] !== $e || e[103] !== p || e[104] !== Ge || e[105] !== le || e[106] !== l || e[107] !== c.dateFormat || e[108] !== c.enabled || e[109] !== H || e[110] !== m || e[111] !== u || e[112] !== Re || e[113] !== ne || e[114] !== B ? (ke = /* @__PURE__ */ a.jsx(Po, { ref: St, children: le && Ge && be ? /* @__PURE__ */ a.jsx(To, { dotColor: wt, data: o.filter((d) => c.enabled ? `${d.date}` === ao(new Date(m[U]), c.dateFormat || "yyyy") : d), mapData: i ? be : {
531
- ...be,
532
- features: be.features.filter(Go)
533
- }, overlayMapData: Mt, overlayMapBorderColor: h?.mapBorderColor, overlayMapBorderWidth: h?.mapBorderWidth, colorDomain: qe, width: le, height: Ge, scale: We, centerPoint: q, colors: n || (P === "categorical" ? Ce[l].sequentialColors[`neutralColorsx0${qe.length}`] : Ce[l].sequentialColors[`neutralColorsx0${qe.length + 1}`]), mapColorLegendTitle: D, radius: _, categorical: P === "categorical", mapBorderWidth: ee, mapNoDataColor: T, mapBorderColor: Fe, tooltip: H, onSeriesMouseOver: X, showLabels: $e, isWorldMap: ve, showColorScale: A, zoomScaleExtend: ne, zoomTranslateExtend: B, onSeriesMouseClick: oe, highlightedDataPoints: Ee, resetSelectionOnDoubleClick: Te, styles: p, classNames: g, zoomInteraction: Re, detailsOnClick: K, mapProjection: Ae || (ve ? "naturalEarth" : "mercator"), animate: Qe === !0 ? {
536
+ ] }) : null, e[50] = U, e[51] = gt, e[52] = G, e[53] = c.enabled, e[54] = p, e[55] = De) : De = e[55];
537
+ let Ce;
538
+ e[56] !== we || e[57] !== q || e[58] !== C || e[59] !== f || e[60] !== _ || e[61] !== n || e[62] !== bt || e[63] !== o || e[64] !== be || e[65] !== K || e[66] !== xt || e[67] !== qe || e[68] !== A || e[69] !== wt || e[70] !== ee || e[71] !== ie || e[72] !== s || e[73] !== Ie || e[74] !== ge || e[75] !== U || e[76] !== xe || e[77] !== kt || e[78] !== Fe || e[79] !== Ve || e[80] !== D || e[81] !== te || e[82] !== w?.mapBorderColor || e[83] !== w?.mapBorderWidth || e[84] !== Ae || e[85] !== jt || e[86] !== je || e[87] !== fe || e[88] !== l || e[89] !== L || e[90] !== re || e[91] !== X || e[92] !== Mt || e[93] !== Dt || e[94] !== ve || e[95] !== M || e[96] !== m || e[97] !== Ct || e[98] !== V || e[99] !== t || e[100] !== Te || e[101] !== $e || e[102] !== u || e[103] !== Ge || e[104] !== ne || e[105] !== k || e[106] !== c.dateFormat || e[107] !== c.enabled || e[108] !== H || e[109] !== p || e[110] !== h || e[111] !== Re || e[112] !== oe || e[113] !== z ? (Ce = /* @__PURE__ */ a.jsx(_o, { ref: St, children: ne && Ge && je ? /* @__PURE__ */ a.jsx(Ao, { dotColor: wt, data: o.filter((d) => c.enabled ? `${d.date}` === ao(new Date(p[U]), c.dateFormat || "yyyy") : d), mapData: t ? je : {
539
+ ...je,
540
+ features: je.features.filter(Zo)
541
+ }, overlayMapData: Mt, overlayMapBorderColor: w?.mapBorderColor, overlayMapBorderWidth: w?.mapBorderWidth, colorDomain: qe, width: ne, height: Ge, scale: V, centerPoint: q, colors: n || (C === "categorical" ? Me[k].sequentialColors[`neutralColorsx0${qe.length}`] : Me[k].sequentialColors[`neutralColorsx0${qe.length + 1}`]), mapColorLegendTitle: D, radius: ve, categorical: C === "categorical", mapBorderWidth: Ve, mapNoDataColor: te, mapBorderColor: Fe, tooltip: H, onSeriesMouseOver: X, showLabels: $e, isWorldMap: xe, showColorScale: Te, zoomScaleExtend: oe, zoomTranslateExtend: z, onSeriesMouseClick: re, highlightedDataPoints: Ie, resetSelectionOnDoubleClick: m, styles: u, classNames: f, zoomInteraction: Re, detailsOnClick: K, mapProjection: Ae || (xe ? "naturalEarth" : "mercator"), animate: we === !0 ? {
534
542
  duration: 0.5,
535
543
  once: !0,
536
544
  amount: 0.5
537
- } : Qe || {
545
+ } : we || {
538
546
  duration: 0,
539
547
  once: !0,
540
548
  amount: 0
541
- }, dimmedOpacity: xt, customLayers: bt, maxRadiusValue: vt(M) ? Math.max(...o.map(Ro).filter(Ao)) : M, collapseColorScaleByDefault: _e, highlightedIds: ae, mapProperty: jt, dotLegendTitle: V, dotBorderColor: ge, labelColor: kt, projectionRotate: Dt, rewindCoordinatesInMapData: Ct, numberDisplayOptions: ye, graphDownload: xe ? Lt : void 0 }) : /* @__PURE__ */ a.jsx("div", { style: {
542
- height: `${Math.max(j, s || (N ? j ? (u || le) * N > j ? (u || le) * N : j : (u || le) * N : Ge))}px`
543
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(lo, { "aria-label": "Loading graph" }) }) }), e[58] = Qe, e[59] = q, e[60] = P, e[61] = g, e[62] = _e, e[63] = n, e[64] = bt, e[65] = o, e[66] = K, e[67] = xt, e[68] = qe, e[69] = ge, e[70] = wt, e[71] = V, e[72] = xe, e[73] = s, e[74] = Ee, e[75] = ae, e[76] = U, e[77] = ve, e[78] = kt, e[79] = Fe, e[80] = ee, e[81] = D, e[82] = T, e[83] = h?.mapBorderColor, e[84] = h?.mapBorderWidth, e[85] = Ae, e[86] = jt, e[87] = be, e[88] = M, e[89] = j, e[90] = ye, e[91] = oe, e[92] = X, e[93] = Mt, e[94] = Dt, e[95] = _, e[96] = N, e[97] = Te, e[98] = Ct, e[99] = We, e[100] = i, e[101] = A, e[102] = $e, e[103] = p, e[104] = Ge, e[105] = le, e[106] = l, e[107] = c.dateFormat, e[108] = c.enabled, e[109] = H, e[110] = m, e[111] = u, e[112] = Re, e[113] = ne, e[114] = B, e[115] = ke) : ke = e[115];
544
- let De;
545
- e[116] !== g?.footnote || e[117] !== g?.source || e[118] !== z || e[119] !== v || e[120] !== p?.footnote || e[121] !== p?.source || e[122] !== u ? (De = v || z ? /* @__PURE__ */ a.jsx(Bo, { styles: {
546
- footnote: p?.footnote,
547
- source: p?.source
549
+ }, dimmedOpacity: xt, customLayers: bt, maxRadiusValue: vt(fe) ? Math.max(...o.map(Yo).filter(Xo)) : fe, collapseColorScaleByDefault: _, highlightedIds: ge, mapProperty: jt, dotLegendTitle: ee, dotBorderColor: A, labelColor: kt, projectionRotate: Dt, rewindCoordinatesInMapData: Ct, numberDisplayOptions: L, graphDownload: ie ? Lt : void 0, dataDownload: be ? o.map(Ho).filter(qo).length > 0 ? o.map(Uo).filter(Go) : o.filter(Ro) : null }) : /* @__PURE__ */ a.jsx("div", { style: {
550
+ height: `${Math.max(l, s || (M ? l ? (h || ne) * M > l ? (h || ne) * M : l : (h || ne) * M : Ge))}px`
551
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(lo, { "aria-label": "Loading graph" }) }) }), e[56] = we, e[57] = q, e[58] = C, e[59] = f, e[60] = _, e[61] = n, e[62] = bt, e[63] = o, e[64] = be, e[65] = K, e[66] = xt, e[67] = qe, e[68] = A, e[69] = wt, e[70] = ee, e[71] = ie, e[72] = s, e[73] = Ie, e[74] = ge, e[75] = U, e[76] = xe, e[77] = kt, e[78] = Fe, e[79] = Ve, e[80] = D, e[81] = te, e[82] = w?.mapBorderColor, e[83] = w?.mapBorderWidth, e[84] = Ae, e[85] = jt, e[86] = je, e[87] = fe, e[88] = l, e[89] = L, e[90] = re, e[91] = X, e[92] = Mt, e[93] = Dt, e[94] = ve, e[95] = M, e[96] = m, e[97] = Ct, e[98] = V, e[99] = t, e[100] = Te, e[101] = $e, e[102] = u, e[103] = Ge, e[104] = ne, e[105] = k, e[106] = c.dateFormat, e[107] = c.enabled, e[108] = H, e[109] = p, e[110] = h, e[111] = Re, e[112] = oe, e[113] = z, e[114] = Ce) : Ce = e[114];
552
+ let Ne;
553
+ e[115] !== f?.footnote || e[116] !== f?.source || e[117] !== W || e[118] !== y || e[119] !== u?.footnote || e[120] !== u?.source || e[121] !== h ? (Ne = y || W ? /* @__PURE__ */ a.jsx(zo, { styles: {
554
+ footnote: u?.footnote,
555
+ source: u?.source
548
556
  }, classNames: {
549
- footnote: g?.footnote,
550
- source: g?.source
551
- }, sources: v, footNote: z, width: u }) : null, e[116] = g?.footnote, e[117] = g?.source, e[118] = z, e[119] = v, e[120] = p?.footnote, e[121] = p?.source, e[122] = u, e[123] = De) : De = e[123];
557
+ footnote: f?.footnote,
558
+ source: f?.source
559
+ }, sources: y, footNote: W, width: h }) : null, e[115] = f?.footnote, e[116] = f?.source, e[117] = W, e[118] = y, e[119] = u?.footnote, e[120] = u?.source, e[121] = h, e[122] = Ne) : Ne = e[122];
552
560
  let yt;
553
- return e[124] !== ze || e[125] !== Ve || e[126] !== me || e[127] !== s || e[128] !== f || e[129] !== j || e[130] !== Me || e[131] !== N || e[132] !== It || e[133] !== Bt || e[134] !== we || e[135] !== je || e[136] !== ke || e[137] !== De || e[138] !== l || e[139] !== u ? (yt = /* @__PURE__ */ a.jsxs(_o, { className: It, style: Bt, id: me, ref: Lt, "aria-label": ze, backgroundColor: Ve, theme: l, language: f, minHeight: j, width: u, height: s, relativeHeight: N, padding: Me, children: [
554
- we,
555
- je,
561
+ return e[123] !== _e || e[124] !== R || e[125] !== de || e[126] !== s || e[127] !== i || e[128] !== l || e[129] !== Oe || e[130] !== M || e[131] !== Bt || e[132] !== It || e[133] !== ke || e[134] !== De || e[135] !== Ce || e[136] !== Ne || e[137] !== k || e[138] !== h ? (yt = /* @__PURE__ */ a.jsxs(Lo, { className: Bt, style: It, id: de, ref: Lt, "aria-label": _e, backgroundColor: R, theme: k, language: i, minHeight: l, width: h, height: s, relativeHeight: M, padding: Oe, children: [
556
562
  ke,
557
- De
558
- ] }), e[124] = ze, e[125] = Ve, e[126] = me, e[127] = s, e[128] = f, e[129] = j, e[130] = Me, e[131] = N, e[132] = It, e[133] = Bt, e[134] = we, e[135] = je, e[136] = ke, e[137] = De, e[138] = l, e[139] = u, e[140] = yt) : yt = e[140], yt;
559
- }
560
- function Ao(r) {
561
- return r != null;
563
+ De,
564
+ Ce,
565
+ Ne
566
+ ] }), e[123] = _e, e[124] = R, e[125] = de, e[126] = s, e[127] = i, e[128] = l, e[129] = Oe, e[130] = M, e[131] = Bt, e[132] = It, e[133] = ke, e[134] = De, e[135] = Ce, e[136] = Ne, e[137] = k, e[138] = h, e[139] = yt) : yt = e[139], yt;
562
567
  }
563
568
  function Ro(r) {
564
- return r.radius;
569
+ return r !== void 0;
565
570
  }
566
571
  function Go(r) {
567
- return r.properties?.NAME !== "Antarctica";
572
+ return r !== void 0;
568
573
  }
569
574
  function Uo(r) {
570
- return r !== void 0;
575
+ return r.data;
571
576
  }
572
577
  function qo(r) {
573
578
  return r !== void 0;
@@ -576,21 +581,24 @@ function Ho(r) {
576
581
  return r.data;
577
582
  }
578
583
  function Xo(r) {
579
- return r !== void 0;
584
+ return r != null;
580
585
  }
581
586
  function Yo(r) {
582
- return r.data;
587
+ return r.radius;
583
588
  }
584
589
  function Zo(r) {
590
+ return r.properties?.NAME !== "Antarctica";
591
+ }
592
+ function Jo(r) {
585
593
  return r.x;
586
594
  }
587
- function Jo(r, e) {
595
+ function Ko(r, e) {
588
596
  return r - e;
589
597
  }
590
- function Ko(r) {
598
+ function Qo(r) {
591
599
  return r.date;
592
600
  }
593
601
  export {
594
- Ea as HybridMap
602
+ Ia as HybridMap
595
603
  };
596
604
  //# sourceMappingURL=HybridMap.js.map