@undp/data-viz 2.2.0 → 2.2.2

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