@undp/data-viz 2.5.1 → 2.5.3

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