@undp/data-viz 2.5.2 → 2.5.4

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