@undp/data-viz 2.3.13 → 2.3.15

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