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