@undp/data-viz 2.1.0 → 2.1.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.
- package/dist/AreaChart.js +3 -3
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +1760 -1604
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +222 -207
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +11 -0
- package/dist/BulletChart.js +726 -640
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +366 -348
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +311 -297
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DifferenceLineChart.js +3 -3
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +219 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.js +3 -3
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +606 -556
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GraphEl-YKUlz-37.cjs +2 -0
- package/dist/GraphEl-YKUlz-37.cjs.map +1 -0
- package/dist/{GraphEl-ebgfxefq.js → GraphEl-sVZvlyWe.js} +3 -2
- package/dist/GraphEl-sVZvlyWe.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +2 -2
- package/dist/HeatMap.js +4 -4
- package/dist/Histogram.js +3 -3
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +357 -342
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +3 -3
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +453 -425
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.js +3 -3
- package/dist/ParetoChart.js +2 -2
- package/dist/RadarChart.js +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +471 -452
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.js +3 -3
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/SparkLine.js +3 -3
- package/dist/StripChart.js +1 -1
- package/dist/ThreeDGlobe.js +2 -2
- package/dist/Types.d.ts +1 -0
- package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
- package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
- package/dist/ensureCompleteData-DS7gCvVd.js +122 -0
- package/dist/ensureCompleteData-DS7gCvVd.js.map +1 -0
- package/dist/ensureCompleteData-Oib-vGb0.cjs +2 -0
- package/dist/ensureCompleteData-Oib-vGb0.cjs.map +1 -0
- package/dist/getSchema.cjs +1 -1
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.js +15 -15
- package/dist/getSchema.js.map +1 -1
- package/dist/{index-BBV4tAeA.js → index-DPGq3eIL.js} +2 -2
- package/dist/{index-BBV4tAeA.js.map → index-DPGq3eIL.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -3
- package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
- package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
- package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
- package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
- package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
- package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
- package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
- package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
- package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
- package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
- package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
- package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
- package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
- package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
- package/package.json +4 -4
- package/dist/GraphEl-B16EYkko.cjs +0 -2
- package/dist/GraphEl-B16EYkko.cjs.map +0 -1
- package/dist/GraphEl-ebgfxefq.js.map +0 -1
- package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
- package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
- package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
- package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
- package/dist/sort-BIvMlUH1.js +0 -34
- package/dist/sort-BIvMlUH1.js.map +0 -1
- package/dist/sort-O96oMZLb.cjs +0 -2
- package/dist/sort-O96oMZLb.cjs.map +0 -1
- package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
- package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
- package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
|
@@ -1,109 +1,106 @@
|
|
|
1
|
-
import { j as o, m as
|
|
2
|
-
import { useState as N, useRef as Pt, useEffect as
|
|
3
|
-
import { g as
|
|
4
|
-
import { w as
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import { z as
|
|
8
|
-
import { t as
|
|
9
|
-
import { j as
|
|
10
|
-
import { n as
|
|
11
|
-
import { T as
|
|
12
|
-
import { c as
|
|
13
|
-
import { X as
|
|
14
|
-
import { D as
|
|
15
|
-
import { s as
|
|
16
|
-
import { t as
|
|
17
|
-
import { u as
|
|
1
|
+
import { j as o, m as be, c as ke } from "./index-CHPV5EwG-Curnpaqc.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-HIDJ0_Cd.js";
|
|
4
|
+
import { w as De } from "./Spinner-D7rnnwnA.js";
|
|
5
|
+
import { f as $e, p as Ne } from "./parse-DlCRUFh_.js";
|
|
6
|
+
import { i as Se } from "./index-Bwrro8-q.js";
|
|
7
|
+
import { z as Me, t as Ee, g as Oe, a as Le, b as Pe, c as Ie, d as ze } from "./zoom-C9MFjAaV.js";
|
|
8
|
+
import { t as We } from "./index-GEsywGxz.js";
|
|
9
|
+
import { j as me } from "./Typography-PxtFcnJb.js";
|
|
10
|
+
import { n as pe } from "./numberFormattingFunction-14YCbkN2.js";
|
|
11
|
+
import { T as _e } from "./Tooltip-Dj5eVppQ.js";
|
|
12
|
+
import { c as he } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
13
|
+
import { X as Ae, P as Be, e as Fe } from "./index-D491FEn1.js";
|
|
14
|
+
import { D as Te } from "./DetailsModal-0Ry5nXiC.js";
|
|
15
|
+
import { s as le } from "./select-DKy99ogv.js";
|
|
16
|
+
import { t as ue } from "./threshold-DFfqcDMa.js";
|
|
17
|
+
import { u as Ve } from "./use-in-view-Cxa7y1TH.js";
|
|
18
18
|
import { m as Lt } from "./proxy-BxkFHwUw.js";
|
|
19
|
-
import { A as
|
|
20
|
-
import { GraphHeader as
|
|
21
|
-
import { GraphFooter as
|
|
22
|
-
import { Colors as
|
|
23
|
-
import { f as
|
|
24
|
-
import { g as
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
import { s as He } from "./sort-BIvMlUH1.js";
|
|
28
|
-
import { a as Re } from "./init-BJFW6EwE.js";
|
|
29
|
-
function Ue(d) {
|
|
19
|
+
import { A as Ge } from "./index-BqfRwk1n.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-BpqkBPQL.js";
|
|
24
|
+
import { g as ge } from "./getJenks-BbngDoBQ.js";
|
|
25
|
+
import { a as Xe, G as Ye } from "./GraphContainer-CRqzdKu2.js";
|
|
26
|
+
function qe(d) {
|
|
30
27
|
const {
|
|
31
28
|
data: t,
|
|
32
|
-
xDomain:
|
|
29
|
+
xDomain: y,
|
|
33
30
|
mapData: j,
|
|
34
31
|
xColorLegendTitle: It,
|
|
35
32
|
yDomain: Q,
|
|
36
33
|
yColorLegendTitle: tt,
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
39
|
-
colors:
|
|
34
|
+
width: w,
|
|
35
|
+
height: b,
|
|
36
|
+
colors: k,
|
|
40
37
|
scale: zt,
|
|
41
|
-
centerPoint:
|
|
38
|
+
centerPoint: D,
|
|
42
39
|
mapBorderWidth: S,
|
|
43
|
-
mapNoDataColor:
|
|
40
|
+
mapNoDataColor: F,
|
|
44
41
|
mapBorderColor: gt,
|
|
45
42
|
tooltip: et,
|
|
46
43
|
onSeriesMouseOver: ft,
|
|
47
44
|
zoomScaleExtend: yt,
|
|
48
45
|
zoomTranslateExtend: xt,
|
|
49
|
-
highlightedIds:
|
|
46
|
+
highlightedIds: X,
|
|
50
47
|
onSeriesMouseClick: ot,
|
|
51
|
-
mapProperty:
|
|
48
|
+
mapProperty: Y,
|
|
52
49
|
resetSelectionOnDoubleClick: Wt,
|
|
53
50
|
detailsOnClick: C,
|
|
54
51
|
showColorScale: vt,
|
|
55
52
|
styles: _t,
|
|
56
|
-
classNames:
|
|
57
|
-
mapProjection:
|
|
53
|
+
classNames: T,
|
|
54
|
+
mapProjection: V,
|
|
58
55
|
zoomInteraction: O,
|
|
59
|
-
animate:
|
|
56
|
+
animate: $,
|
|
60
57
|
dimmedOpacity: L,
|
|
61
58
|
customLayers: rt,
|
|
62
59
|
collapseColorScaleByDefault: bt
|
|
63
|
-
} = d, [
|
|
64
|
-
once:
|
|
65
|
-
amount:
|
|
66
|
-
}), jt = Pt(null),
|
|
67
|
-
|
|
68
|
-
const e =
|
|
60
|
+
} = d, [At, 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) => {
|
|
69
66
|
if (O === "noZoom") return !1;
|
|
70
67
|
if (O === "button") return !r.type.includes("wheel");
|
|
71
68
|
const a = r.type === "wheel", l = r.type.startsWith("touch"), i = r.type === "mousedown" || r.type === "mousemove";
|
|
72
69
|
return l ? !0 : a ? O === "scroll" ? !0 : r.ctrlKey : i && !r.button && !r.ctrlKey;
|
|
73
|
-
}, s =
|
|
70
|
+
}, s = Me().scaleExtent(yt).translateExtent(xt || [[-20, -20], [w + 20, b + 20]]).filter(x).on("zoom", ({
|
|
74
71
|
transform: r
|
|
75
72
|
}) => {
|
|
76
73
|
e.attr("transform", r);
|
|
77
74
|
});
|
|
78
|
-
n.call(s),
|
|
79
|
-
}, [
|
|
80
|
-
const
|
|
81
|
-
length:
|
|
82
|
-
}, (e, n) => n),
|
|
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({
|
|
78
|
+
length: y.length
|
|
79
|
+
}, (e, n) => n), $t = Array.from({
|
|
83
80
|
length: Q.length
|
|
84
|
-
}, (e, n) => n), Nt =
|
|
85
|
-
if (!
|
|
86
|
-
|
|
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);
|
|
87
84
|
};
|
|
88
85
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
89
86
|
/* @__PURE__ */ o.jsxs("div", { className: "relative", children: [
|
|
90
|
-
/* @__PURE__ */ o.jsx(Lt.svg, { viewBox: `0 0 ${
|
|
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: [
|
|
91
88
|
rt.filter((e) => e.position === "before").map((e) => e.layer),
|
|
92
89
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
-
j.features.map((e, n) => t.findIndex((s) => s.id === e.properties[
|
|
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" ? (
|
|
94
91
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
92
|
e.geometry.coordinates.map((s, r) => {
|
|
96
93
|
let a = "";
|
|
97
94
|
return s.forEach((l) => {
|
|
98
95
|
let i = " M";
|
|
99
|
-
l.forEach((
|
|
100
|
-
const
|
|
101
|
-
|
|
96
|
+
l.forEach((f, v) => {
|
|
97
|
+
const m = E([f[0], f[1]]);
|
|
98
|
+
v !== l.length - 1 ? i = `${i}${m[0]} ${m[1]}L` : i = `${i}${m[0]} ${m[1]}`;
|
|
102
99
|
}), a += i;
|
|
103
100
|
}), /* @__PURE__ */ o.jsx("path", { d: a, style: {
|
|
104
101
|
stroke: gt,
|
|
105
102
|
strokeWidth: S,
|
|
106
|
-
fill:
|
|
103
|
+
fill: F
|
|
107
104
|
} }, r);
|
|
108
105
|
})
|
|
109
106
|
) : (
|
|
@@ -111,53 +108,53 @@ function Ue(d) {
|
|
|
111
108
|
e.geometry.coordinates.map((s, r) => {
|
|
112
109
|
let a = "M";
|
|
113
110
|
return s.forEach((l, i) => {
|
|
114
|
-
const
|
|
115
|
-
i !== s.length - 1 ? a = `${a}${
|
|
111
|
+
const f = E([l[0], l[1]]);
|
|
112
|
+
i !== s.length - 1 ? a = `${a}${f[0]} ${f[1]}L` : a = `${a}${f[0]} ${f[1]}`;
|
|
116
113
|
}), /* @__PURE__ */ o.jsx("path", { d: a, style: {
|
|
117
114
|
stroke: gt,
|
|
118
115
|
strokeWidth: S,
|
|
119
|
-
fill:
|
|
116
|
+
fill: F
|
|
120
117
|
} }, r);
|
|
121
118
|
})
|
|
122
119
|
) }, n)),
|
|
123
|
-
/* @__PURE__ */ o.jsx(
|
|
120
|
+
/* @__PURE__ */ o.jsx(Ge, { children: t.map((e) => {
|
|
124
121
|
const n = j.features.findIndex(
|
|
125
122
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
|
-
(a) => e.id === a.properties[
|
|
127
|
-
),
|
|
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;
|
|
128
125
|
return /* @__PURE__ */ o.jsx(Lt.g, { variants: {
|
|
129
126
|
initial: {
|
|
130
127
|
opacity: 0
|
|
131
128
|
},
|
|
132
129
|
whileInView: {
|
|
133
|
-
opacity:
|
|
130
|
+
opacity: q ? q === r ? 1 : L : X.length !== 0 ? X.indexOf(e.id) !== -1 ? 1 : L : 1,
|
|
134
131
|
transition: {
|
|
135
|
-
duration:
|
|
132
|
+
duration: $.duration
|
|
136
133
|
}
|
|
137
134
|
}
|
|
138
135
|
}, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
|
|
139
136
|
opacity: 0,
|
|
140
137
|
transition: {
|
|
141
|
-
duration:
|
|
138
|
+
duration: $.duration
|
|
142
139
|
}
|
|
143
140
|
}, onMouseEnter: (a) => {
|
|
144
|
-
nt(e),
|
|
141
|
+
nt(e), J(a.clientY), h(a.clientX), ft?.(e);
|
|
145
142
|
}, onClick: () => {
|
|
146
|
-
(ot || C) && (
|
|
143
|
+
(ot || C) && (Se(at, e) && Wt ? (it(void 0), ot?.(void 0)) : (it(e), ot?.(e)));
|
|
147
144
|
}, onMouseMove: (a) => {
|
|
148
|
-
nt(e),
|
|
145
|
+
nt(e), J(a.clientY), h(a.clientX);
|
|
149
146
|
}, onMouseLeave: () => {
|
|
150
|
-
nt(void 0),
|
|
147
|
+
nt(void 0), h(void 0), J(void 0), ft?.(void 0);
|
|
151
148
|
}, children: n === -1 ? null : j.features[n].geometry.type === "MultiPolygon" ? j.features[n].geometry.coordinates.map(
|
|
152
149
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
153
150
|
(a, l) => {
|
|
154
151
|
let i = "";
|
|
155
|
-
return a.forEach((
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
Mt !==
|
|
160
|
-
}), i +=
|
|
152
|
+
return a.forEach((f) => {
|
|
153
|
+
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]}`;
|
|
157
|
+
}), i += v;
|
|
161
158
|
}), /* @__PURE__ */ o.jsx(Lt.path, { variants: {
|
|
162
159
|
initial: {
|
|
163
160
|
fill: r,
|
|
@@ -167,15 +164,15 @@ function Ue(d) {
|
|
|
167
164
|
fill: r,
|
|
168
165
|
opacity: 1,
|
|
169
166
|
transition: {
|
|
170
|
-
duration:
|
|
167
|
+
duration: $.duration
|
|
171
168
|
}
|
|
172
169
|
}
|
|
173
170
|
}, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
|
|
174
171
|
opacity: 0,
|
|
175
172
|
transition: {
|
|
176
|
-
duration:
|
|
173
|
+
duration: $.duration
|
|
177
174
|
}
|
|
178
|
-
}, d: i, className: `${r ===
|
|
175
|
+
}, d: i, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
|
|
179
176
|
strokeWidth: S
|
|
180
177
|
} }, `${e.id}-${l}`);
|
|
181
178
|
}
|
|
@@ -183,9 +180,9 @@ function Ue(d) {
|
|
|
183
180
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
184
181
|
(a, l) => {
|
|
185
182
|
let i = "M";
|
|
186
|
-
return a.forEach((
|
|
187
|
-
const
|
|
188
|
-
|
|
183
|
+
return a.forEach((f, v) => {
|
|
184
|
+
const m = E([f[0], f[1]]);
|
|
185
|
+
v !== a.length - 1 ? i = `${i}${m[0]} ${m[1]}L` : i = `${i}${m[0]} ${m[1]}`;
|
|
189
186
|
}), /* @__PURE__ */ o.jsx(Lt.path, { d: i, variants: {
|
|
190
187
|
initial: {
|
|
191
188
|
fill: r,
|
|
@@ -195,32 +192,32 @@ function Ue(d) {
|
|
|
195
192
|
fill: r,
|
|
196
193
|
opacity: 1,
|
|
197
194
|
transition: {
|
|
198
|
-
duration:
|
|
195
|
+
duration: $.duration
|
|
199
196
|
}
|
|
200
197
|
}
|
|
201
198
|
}, initial: "initial", animate: lt ? "whileInView" : "initial", exit: {
|
|
202
199
|
opacity: 0,
|
|
203
200
|
transition: {
|
|
204
|
-
duration:
|
|
201
|
+
duration: $.duration
|
|
205
202
|
}
|
|
206
|
-
}, className: `${r ===
|
|
203
|
+
}, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
|
|
207
204
|
strokeWidth: S
|
|
208
205
|
} }, `${e.id}-${l}`);
|
|
209
206
|
}
|
|
210
207
|
) }, e.id);
|
|
211
208
|
}) }),
|
|
212
|
-
|
|
209
|
+
G ? j.features.filter(
|
|
213
210
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
214
|
-
(e) => e.properties[
|
|
211
|
+
(e) => e.properties[Y] === G.id
|
|
215
212
|
).map((e, n) => /* @__PURE__ */ o.jsx("g", { children: e.geometry.type === "MultiPolygon" ? (
|
|
216
213
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
217
|
-
e.geometry.coordinates.map((
|
|
214
|
+
e.geometry.coordinates.map((x, s) => {
|
|
218
215
|
let r = "";
|
|
219
|
-
return
|
|
216
|
+
return x.forEach((a) => {
|
|
220
217
|
let l = " M";
|
|
221
|
-
a.forEach((i,
|
|
222
|
-
const
|
|
223
|
-
|
|
218
|
+
a.forEach((i, f) => {
|
|
219
|
+
const v = E([i[0], i[1]]);
|
|
220
|
+
f !== a.length - 1 ? l = `${l}${v[0]} ${v[1]}L` : l = `${l}${v[0]} ${v[1]}`;
|
|
224
221
|
}), r += l;
|
|
225
222
|
}), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
226
223
|
fill: "none",
|
|
@@ -230,11 +227,11 @@ function Ue(d) {
|
|
|
230
227
|
})
|
|
231
228
|
) : (
|
|
232
229
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
233
|
-
e.geometry.coordinates.map((
|
|
230
|
+
e.geometry.coordinates.map((x, s) => {
|
|
234
231
|
let r = "M";
|
|
235
|
-
return
|
|
232
|
+
return x.forEach((a, l) => {
|
|
236
233
|
const i = E([a[0], a[1]]);
|
|
237
|
-
l !==
|
|
234
|
+
l !== x.length - 1 ? r = `${r}${i[0]} ${i[1]}L` : r = `${r}${i[0]} ${i[1]}`;
|
|
238
235
|
}), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
239
236
|
fill: "none",
|
|
240
237
|
fillOpacity: 0,
|
|
@@ -244,26 +241,26 @@ function Ue(d) {
|
|
|
244
241
|
) }, n)) : null,
|
|
245
242
|
rt.filter((e) => e.position === "after").map((e) => e.layer)
|
|
246
243
|
] }) }),
|
|
247
|
-
vt === !1 ? null : /* @__PURE__ */ o.jsx("div", { className:
|
|
244
|
+
vt === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: be("absolute left-4 bottom-4 map-color-legend", T?.colorLegend), children: At ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
248
245
|
/* @__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: () => {
|
|
249
246
|
kt(!1);
|
|
250
|
-
}, children: /* @__PURE__ */ o.jsx(
|
|
247
|
+
}, children: /* @__PURE__ */ o.jsx(Ae, {}) }),
|
|
251
248
|
/* @__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: {
|
|
252
249
|
width: "175px"
|
|
253
250
|
}, children: [
|
|
254
251
|
/* @__PURE__ */ o.jsxs("div", { className: "flex gap-1 items-center", children: [
|
|
255
252
|
/* @__PURE__ */ o.jsx("svg", { width: "136px", viewBox: "0 0 136 136", className: "shrink-0", children: /* @__PURE__ */ o.jsxs("g", { children: [
|
|
256
|
-
|
|
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: {
|
|
257
254
|
cursor: "pointer"
|
|
258
255
|
}, onMouseOver: () => {
|
|
259
|
-
wt(
|
|
256
|
+
wt(x);
|
|
260
257
|
}, onMouseLeave: () => {
|
|
261
258
|
wt(void 0);
|
|
262
259
|
} }, s)) }, n)),
|
|
263
|
-
/* @__PURE__ */ o.jsx("g", { transform: "translate(0,125)", children:
|
|
264
|
-
Q.map((e, n) => /* @__PURE__ */ o.jsx("g", { transform: `translate(${Math.max(Math.min(
|
|
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))
|
|
265
262
|
] }) }),
|
|
266
|
-
/* @__PURE__ */ o.jsx(
|
|
263
|
+
/* @__PURE__ */ o.jsx(me, { marginBottom: "none", size: "xs", className: "leading-normal text-center shrink-0", style: {
|
|
267
264
|
display: "-webkit-box",
|
|
268
265
|
WebkitLineClamp: "1",
|
|
269
266
|
WebkitBoxOrient: "vertical",
|
|
@@ -273,7 +270,7 @@ function Ue(d) {
|
|
|
273
270
|
transform: "rotate(180deg)"
|
|
274
271
|
}, children: tt })
|
|
275
272
|
] }),
|
|
276
|
-
/* @__PURE__ */ o.jsx(
|
|
273
|
+
/* @__PURE__ */ o.jsx(me, { marginBottom: "none", size: "xs", className: "mt-1 leading-normal text-center", style: {
|
|
277
274
|
display: "-webkit-box",
|
|
278
275
|
WebkitLineClamp: "1",
|
|
279
276
|
width: "8.5rem",
|
|
@@ -285,186 +282,204 @@ function Ue(d) {
|
|
|
285
282
|
kt(!0);
|
|
286
283
|
}, 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" }) }) }),
|
|
287
284
|
O === "button" && /* @__PURE__ */ o.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
|
|
288
|
-
/* @__PURE__ */ o.jsx("button", { onClick: () =>
|
|
289
|
-
/* @__PURE__ */ o.jsx("button", { onClick: () =>
|
|
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: "–" })
|
|
290
287
|
] })
|
|
291
288
|
] }),
|
|
292
|
-
|
|
293
|
-
C && at !== void 0 ? /* @__PURE__ */ o.jsx(
|
|
289
|
+
G && et && st && g ? /* @__PURE__ */ o.jsx(_e, { data: G, body: et, xPos: st, yPos: g, backgroundStyle: _t?.tooltip, className: T?.tooltip }) : null,
|
|
290
|
+
C && at !== void 0 ? /* @__PURE__ */ o.jsx(Te, { body: C, data: at, setData: it, className: T?.modal }) : null
|
|
294
291
|
] });
|
|
295
292
|
}
|
|
296
|
-
function
|
|
297
|
-
const t =
|
|
298
|
-
data:
|
|
293
|
+
function Lo(d) {
|
|
294
|
+
const t = ke.c(116), {
|
|
295
|
+
data: y,
|
|
299
296
|
graphTitle: j,
|
|
300
297
|
mapData: It,
|
|
301
298
|
colors: Q,
|
|
302
299
|
sources: tt,
|
|
303
|
-
graphDescription:
|
|
304
|
-
height:
|
|
305
|
-
width:
|
|
300
|
+
graphDescription: w,
|
|
301
|
+
height: b,
|
|
302
|
+
width: k,
|
|
306
303
|
footNote: zt,
|
|
307
|
-
xDomain:
|
|
304
|
+
xDomain: D,
|
|
308
305
|
yDomain: S,
|
|
309
|
-
xColorLegendTitle:
|
|
306
|
+
xColorLegendTitle: F,
|
|
310
307
|
yColorLegendTitle: gt,
|
|
311
308
|
tooltip: et,
|
|
312
309
|
scale: ft,
|
|
313
310
|
centerPoint: yt,
|
|
314
311
|
padding: xt,
|
|
315
|
-
mapBorderWidth:
|
|
312
|
+
mapBorderWidth: X,
|
|
316
313
|
mapNoDataColor: ot,
|
|
317
|
-
backgroundColor:
|
|
314
|
+
backgroundColor: Y,
|
|
318
315
|
mapBorderColor: Wt,
|
|
319
316
|
relativeHeight: C,
|
|
320
317
|
onSeriesMouseOver: vt,
|
|
321
318
|
isWorldMap: _t,
|
|
322
|
-
zoomScaleExtend:
|
|
323
|
-
zoomTranslateExtend:
|
|
319
|
+
zoomScaleExtend: T,
|
|
320
|
+
zoomTranslateExtend: V,
|
|
324
321
|
graphID: O,
|
|
325
|
-
showColorScale:
|
|
322
|
+
showColorScale: $,
|
|
326
323
|
highlightedIds: L,
|
|
327
324
|
onSeriesMouseClick: rt,
|
|
328
325
|
mapProperty: bt,
|
|
329
|
-
graphDownload:
|
|
326
|
+
graphDownload: At,
|
|
330
327
|
dataDownload: kt,
|
|
331
|
-
showAntarctica:
|
|
328
|
+
showAntarctica: q,
|
|
332
329
|
language: wt,
|
|
333
330
|
minHeight: at,
|
|
334
331
|
theme: it,
|
|
335
|
-
ariaLabel:
|
|
332
|
+
ariaLabel: G,
|
|
336
333
|
resetSelectionOnDoubleClick: nt,
|
|
337
334
|
detailsOnClick: st,
|
|
338
|
-
styles:
|
|
339
|
-
classNames:
|
|
340
|
-
mapProjection:
|
|
341
|
-
zoomInteraction:
|
|
335
|
+
styles: h,
|
|
336
|
+
classNames: g,
|
|
337
|
+
mapProjection: J,
|
|
338
|
+
zoomInteraction: H,
|
|
342
339
|
animate: lt,
|
|
343
340
|
dimmedOpacity: jt,
|
|
344
|
-
customLayers:
|
|
345
|
-
timeline:
|
|
346
|
-
collapseColorScaleByDefault:
|
|
347
|
-
} = d, M = It === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json" : It,
|
|
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 = _t === void 0 ? !0 : _t;
|
|
348
345
|
let e;
|
|
349
|
-
t[0] !==
|
|
350
|
-
const n = e,
|
|
346
|
+
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 : $;
|
|
351
348
|
let s;
|
|
352
349
|
t[2] !== L ? (s = L === void 0 ? [] : L, t[2] = L, t[3] = s) : s = t[3];
|
|
353
|
-
const r = s, a = bt === void 0 ? "ISO3" : bt, l =
|
|
350
|
+
const r = s, a = bt === void 0 ? "ISO3" : bt, l = At === void 0 ? !1 : At, 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, Bt = 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;
|
|
354
354
|
let Tt;
|
|
355
|
-
t[
|
|
356
|
-
const Zt = Tt, w = X === void 0 ? {
|
|
355
|
+
t[6] !== P ? (Tt = P === void 0 ? {
|
|
357
356
|
enabled: !1,
|
|
358
357
|
autoplay: !1,
|
|
359
358
|
showOnlyActiveDate: !0
|
|
360
|
-
} :
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
} : P, t[6] = P, t[7] = Tt) : Tt = t[7];
|
|
360
|
+
const c = Tt, [Z, fe] = N(0), [Et, ye] = N(0), [_, xe] = N(c.autoplay);
|
|
361
|
+
let Ot;
|
|
362
|
+
if (t[8] !== y || t[9] !== c.dateFormat) {
|
|
363
|
+
let u;
|
|
364
|
+
t[11] !== c.dateFormat ? (u = (B) => Ne(`${B.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;
|
|
365
|
+
} else
|
|
366
|
+
Ot = t[10];
|
|
367
|
+
const p = Ot, [A, 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] === Symbol.for("react.memo_cache_sentinel") ? (Vt = () => {
|
|
370
|
+
const u = new ResizeObserver((B) => {
|
|
371
|
+
fe(B[0].target.clientWidth || 620), ye(B[0].target.clientHeight || 480);
|
|
365
372
|
});
|
|
366
|
-
return
|
|
367
|
-
},
|
|
368
|
-
let
|
|
369
|
-
t[
|
|
370
|
-
|
|
371
|
-
}, t[
|
|
372
|
-
const
|
|
373
|
-
let Rt;
|
|
374
|
-
t[9] !== M || t[10] !== Ht ? (Rt = () => {
|
|
375
|
-
typeof M == "string" ? Te(M).then((Z) => {
|
|
376
|
-
Ht(Z);
|
|
377
|
-
}) : Ht(M);
|
|
378
|
-
}, t[9] = M, t[10] = Ht, t[11] = Rt) : Rt = t[11];
|
|
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] === Symbol.for("react.memo_cache_sentinel") ? (Ht = (u) => {
|
|
377
|
+
ve(u);
|
|
378
|
+
}, t[15] = Ht) : Ht = t[15];
|
|
379
|
+
const Rt = we(Ht);
|
|
379
380
|
let Ut;
|
|
380
|
-
t[
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
381
|
+
t[16] !== M || t[17] !== Rt ? (Ut = () => {
|
|
382
|
+
typeof M == "string" ? Ue(M).then((B) => {
|
|
383
|
+
Rt(B);
|
|
384
|
+
}) : Rt(M);
|
|
385
|
+
}, t[16] = M, t[17] = Rt, t[18] = Ut) : Ut = t[18];
|
|
386
|
+
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] !== _ || t[22] !== c.speed || t[23] !== p ? (Yt = () => {
|
|
390
|
+
const u = setInterval(() => {
|
|
391
|
+
re((B) => B < p.length - 1 ? B + 1 : 0);
|
|
392
|
+
}, (c.speed || 2) * 1e3);
|
|
393
|
+
return _ || clearInterval(u), () => clearInterval(u);
|
|
394
|
+
}, qt = [p, _, c.speed], t[21] = _, 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] !== A || t[27] !== ie || t[28] !== c.showOnlyActiveDate || t[29] !== p ? (Jt = je(p, A, c.showOnlyActiveDate, ie), t[26] = A, 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))
|
|
388
400
|
return console.error("the xDomain and yDomain array length don't match to the color array length"), null;
|
|
389
|
-
const
|
|
401
|
+
const ne = g?.graphContainer, se = h?.graphContainer;
|
|
390
402
|
let mt;
|
|
391
|
-
t[
|
|
392
|
-
title:
|
|
393
|
-
description:
|
|
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
|
|
394
406
|
}, classNames: {
|
|
395
|
-
title:
|
|
396
|
-
description:
|
|
397
|
-
}, graphTitle: j, graphDescription:
|
|
407
|
+
title: g?.title,
|
|
408
|
+
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];
|
|
398
410
|
let pt;
|
|
399
|
-
t[
|
|
411
|
+
t[42] !== A || t[43] !== Kt || t[44] !== _ || 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: [
|
|
400
412
|
/* @__PURE__ */ o.jsx("button", { type: "button", onClick: () => {
|
|
401
|
-
|
|
402
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
403
|
-
/* @__PURE__ */ o.jsx(
|
|
404
|
-
|
|
405
|
-
}, onChange: (
|
|
406
|
-
|
|
413
|
+
xe(!_);
|
|
414
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": _ ? "Click to pause animation" : "Click to play animation", children: _ ? /* @__PURE__ */ o.jsx(Be, {}) : /* @__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[A], onChangeComplete: (u) => {
|
|
416
|
+
re(p.indexOf(u));
|
|
417
|
+
}, onChange: (u) => {
|
|
418
|
+
re(p.indexOf(u));
|
|
407
419
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
408
|
-
] }) : null, t[
|
|
420
|
+
] }) : null, t[42] = A, t[43] = Kt, t[44] = _, t[45] = c.enabled, t[46] = p, t[47] = pt) : pt = t[47];
|
|
409
421
|
let ht;
|
|
410
|
-
t[
|
|
422
|
+
t[48] !== Bt || 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] !== A || 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[A]), c.dateFormat || "yyyy") : u), mapData: f ? dt : {
|
|
411
423
|
...dt,
|
|
412
|
-
features: dt.features.filter(
|
|
413
|
-
}, xDomain:
|
|
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: Bt === !0 ? {
|
|
414
426
|
duration: 0.5,
|
|
415
427
|
once: !0,
|
|
416
428
|
amount: 0.5
|
|
417
|
-
} :
|
|
429
|
+
} : Bt || {
|
|
418
430
|
duration: 0,
|
|
419
431
|
once: !0,
|
|
420
432
|
amount: 0
|
|
421
|
-
}, dimmedOpacity:
|
|
422
|
-
height: `${Math.max(
|
|
423
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
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] = Bt, 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] = A, 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];
|
|
424
436
|
let ut;
|
|
425
|
-
t[
|
|
426
|
-
footnote:
|
|
427
|
-
source:
|
|
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
|
|
428
440
|
}, classNames: {
|
|
429
|
-
footnote:
|
|
430
|
-
source:
|
|
431
|
-
}, sources: tt, footNote: ct, width:
|
|
432
|
-
let
|
|
433
|
-
return t[
|
|
441
|
+
footnote: g?.footnote,
|
|
442
|
+
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: [
|
|
434
446
|
mt,
|
|
435
447
|
pt,
|
|
436
448
|
ht,
|
|
437
449
|
ut
|
|
438
|
-
] }), t[
|
|
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;
|
|
439
451
|
}
|
|
440
|
-
function
|
|
452
|
+
function Je(d) {
|
|
441
453
|
return d.y;
|
|
442
454
|
}
|
|
443
|
-
function
|
|
455
|
+
function Ke(d) {
|
|
444
456
|
return d.x;
|
|
445
457
|
}
|
|
446
|
-
function
|
|
458
|
+
function Ze(d) {
|
|
447
459
|
return d.properties.NAME !== "Antarctica";
|
|
448
460
|
}
|
|
449
|
-
function
|
|
461
|
+
function Qe(d) {
|
|
450
462
|
return d !== void 0;
|
|
451
463
|
}
|
|
452
|
-
function
|
|
464
|
+
function to(d) {
|
|
453
465
|
return d !== void 0;
|
|
454
466
|
}
|
|
455
|
-
function
|
|
467
|
+
function eo(d) {
|
|
456
468
|
return d.data;
|
|
457
469
|
}
|
|
458
|
-
function
|
|
470
|
+
function oo(d) {
|
|
459
471
|
return d !== void 0;
|
|
460
472
|
}
|
|
461
|
-
function
|
|
473
|
+
function ro(d) {
|
|
462
474
|
return d.data;
|
|
463
475
|
}
|
|
464
|
-
function
|
|
465
|
-
return
|
|
476
|
+
function ao(d, t) {
|
|
477
|
+
return d - t;
|
|
478
|
+
}
|
|
479
|
+
function io(d) {
|
|
480
|
+
return d.date;
|
|
466
481
|
}
|
|
467
482
|
export {
|
|
468
|
-
|
|
483
|
+
Lo as BiVariateChoroplethMap
|
|
469
484
|
};
|
|
470
485
|
//# sourceMappingURL=BiVariateChoroplethMap.js.map
|