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