@undp/data-viz 2.2.3 → 2.3.1
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/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +4 -0
- package/dist/BiVariateChoroplethMap.js +328 -401
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +4 -0
- package/dist/ChoroplethMap.js +341 -416
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/Data/01.json +4042 -0
- package/dist/Data/mapData.json +4543 -0
- package/dist/Data/testMap.json +361 -0
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +4 -0
- package/dist/DotDensityMap.js +297 -311
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{GraphEl-C1Rz1V__.js → GraphEl-L5hNe7wJ.js} +25 -17
- package/dist/GraphEl-L5hNe7wJ.js.map +1 -0
- package/dist/GraphEl-ic8C5Ksc.cjs +2 -0
- package/dist/GraphEl-ic8C5Ksc.cjs.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +4 -0
- package/dist/HybridMap.js +398 -445
- package/dist/HybridMap.js.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/Types.d.ts +2 -0
- package/dist/index-DLFt97gy.cjs +2 -0
- package/dist/index-DLFt97gy.cjs.map +1 -0
- package/dist/index-Dp_SfsUA.js +2344 -0
- package/dist/index-Dp_SfsUA.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/package.json +2 -1
- package/readme.md +0 -7
- package/dist/GraphEl-BZbunD1_.cjs +0 -2
- package/dist/GraphEl-BZbunD1_.cjs.map +0 -1
- package/dist/GraphEl-C1Rz1V__.js.map +0 -1
- package/dist/zoom-5AkJSuWO.js +0 -1864
- package/dist/zoom-5AkJSuWO.js.map +0 -1
- package/dist/zoom-ChcvXFIz.cjs +0 -2
- package/dist/zoom-ChcvXFIz.cjs.map +0 -1
package/dist/HybridMap.js
CHANGED
|
@@ -1,359 +1,307 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { f as
|
|
5
|
-
import { g as
|
|
6
|
-
import { w as
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import { j as
|
|
10
|
-
import { i as
|
|
11
|
-
import { n as
|
|
12
|
-
import { w as
|
|
13
|
-
import { T as
|
|
14
|
-
import { X as
|
|
15
|
-
import { D as
|
|
16
|
-
import { s as
|
|
17
|
-
import { o as
|
|
18
|
-
import { t as
|
|
19
|
-
import { s as
|
|
20
|
-
import { m as
|
|
21
|
-
import { c as
|
|
22
|
-
import { n as
|
|
23
|
-
import { u as
|
|
24
|
-
import { A as
|
|
25
|
-
import { GraphFooter as
|
|
26
|
-
import { GraphHeader as
|
|
27
|
-
import { Colors as
|
|
28
|
-
import { f as
|
|
29
|
-
import { a as
|
|
30
|
-
import { g as
|
|
31
|
-
import { g as
|
|
32
|
-
var
|
|
33
|
-
const { decorative: e, orientation:
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
1
|
+
import { _ as Ge, m as ze, b as Be, j as a, c as qe } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
+
import * as He from "react";
|
|
3
|
+
import Ue, { useMemo as Xe, useState as S, useRef as Rt, useEffect as de, useEffectEvent as Ye } from "react";
|
|
4
|
+
import { f as Je, p as Ke } from "./parse-Dv4of-PN.js";
|
|
5
|
+
import { g as Ze, N as Qe } from "./getSliderMarks-Cvg8zHBU.js";
|
|
6
|
+
import { w as to } from "./Spinner--r2RrJV8.js";
|
|
7
|
+
import { i as Pe } from "./index-Bwrro8-q.js";
|
|
8
|
+
import { i as eo, z as oo, a as ao, g as ro, b as io, c as no, d as lo, e as so, f as co } from "./index-Dp_SfsUA.js";
|
|
9
|
+
import { j as Oe } from "./Typography-hWfh3H0J.js";
|
|
10
|
+
import { i as mo } from "./index-DCsFBfJ_.js";
|
|
11
|
+
import { n as Le } from "./Source-F8EYCYkV.js";
|
|
12
|
+
import { w as po } from "./index-Dzc_aaI9-CG2Ar7l1.js";
|
|
13
|
+
import { T as uo } from "./Tooltip-BRnAz2Gv.js";
|
|
14
|
+
import { X as ho, P as go, e as fo } from "./index-BQYOuXdl.js";
|
|
15
|
+
import { D as yo } from "./DetailsModal-BMCTgVsk.js";
|
|
16
|
+
import { s as xo } from "./pow-CaIrlM4J.js";
|
|
17
|
+
import { o as vo } from "./ordinal-CHaxGJ_l.js";
|
|
18
|
+
import { t as bo } from "./threshold-DFfqcDMa.js";
|
|
19
|
+
import { s as Ie } from "./select-DKy99ogv.js";
|
|
20
|
+
import { m as lt } from "./proxy-DRuSUlPL.js";
|
|
21
|
+
import { c as me } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
22
|
+
import { n as wo } from "./numberFormattingFunction-14YCbkN2.js";
|
|
23
|
+
import { u as jo } from "./use-in-view-Dl5L8LtP.js";
|
|
24
|
+
import { A as ko } from "./index-CtMBjvtq.js";
|
|
25
|
+
import { GraphFooter as Co } from "./GraphFooter.js";
|
|
26
|
+
import { GraphHeader as Do } from "./GraphHeader.js";
|
|
27
|
+
import { Colors as jt } from "./Colors.js";
|
|
28
|
+
import { f as No } from "./fetchAndParseData-BAXhgTDM.js";
|
|
29
|
+
import { a as So, G as Mo } from "./GraphContainer-CF6ws3pd.js";
|
|
30
|
+
import { g as Oo } from "./getUniqValue-DsqSii6M.js";
|
|
31
|
+
import { g as Io } from "./getJenks-DTCcQSDi.js";
|
|
32
|
+
var zo = "Separator", Ve = "horizontal", Eo = ["horizontal", "vertical"], _e = He.forwardRef((r, t) => {
|
|
33
|
+
const { decorative: e, orientation: b = Ve, ...g } = r, n = Po(b) ? b : Ve, f = e ? { role: "none" } : { "aria-orientation": n === "vertical" ? n : void 0, role: "separator" };
|
|
34
|
+
return /* @__PURE__ */ Be.jsx(
|
|
35
|
+
po.div,
|
|
36
36
|
{
|
|
37
37
|
"data-orientation": n,
|
|
38
|
-
...
|
|
39
|
-
...
|
|
38
|
+
...f,
|
|
39
|
+
...g,
|
|
40
40
|
ref: t
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
function
|
|
46
|
-
return
|
|
44
|
+
_e.displayName = zo;
|
|
45
|
+
function Po(r) {
|
|
46
|
+
return Eo.includes(r);
|
|
47
47
|
}
|
|
48
|
-
var
|
|
49
|
-
const
|
|
50
|
-
const e =
|
|
51
|
-
let
|
|
48
|
+
var $e = _e;
|
|
49
|
+
const Ae = Ue.forwardRef((r, t) => {
|
|
50
|
+
const e = Ge.c(14);
|
|
51
|
+
let b, g, n, f;
|
|
52
52
|
e[0] !== r ? ({
|
|
53
|
-
className:
|
|
53
|
+
className: b,
|
|
54
54
|
variant: n,
|
|
55
|
-
orientation:
|
|
56
|
-
...
|
|
57
|
-
} = r, e[0] = r, e[1] =
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
e[5] !==
|
|
61
|
-
let
|
|
62
|
-
return e[9] !==
|
|
55
|
+
orientation: f,
|
|
56
|
+
...g
|
|
57
|
+
} = r, e[0] = r, e[1] = b, e[2] = g, e[3] = n, e[4] = f) : (b = e[1], g = e[2], n = e[3], f = e[4]);
|
|
58
|
+
const y = n === void 0 ? "dark" : n, l = f === void 0 ? "horizontal" : f, u = l === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", k = y === "dark" ? "bg-primary-gray-600 dark:bg-primary-gray-200" : "bg-primary-gray-400 dark:bg-primary-gray-550";
|
|
59
|
+
let w;
|
|
60
|
+
e[5] !== b || e[6] !== u || e[7] !== k ? (w = ze(u, k, b), e[5] = b, e[6] = u, e[7] = k, e[8] = w) : w = e[8];
|
|
61
|
+
let M;
|
|
62
|
+
return e[9] !== l || e[10] !== g || e[11] !== t || e[12] !== w ? (M = /* @__PURE__ */ Be.jsx($e, { ...g, ref: t, orientation: l, className: w }), e[9] = l, e[10] = g, e[11] = t, e[12] = w, e[13] = M) : M = e[13], M;
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
function
|
|
64
|
+
Ae.displayName = $e.displayName;
|
|
65
|
+
function Lo(r) {
|
|
66
66
|
const {
|
|
67
67
|
data: t,
|
|
68
68
|
colors: e,
|
|
69
|
-
mapData:
|
|
70
|
-
mapColorLegendTitle:
|
|
69
|
+
mapData: b,
|
|
70
|
+
mapColorLegendTitle: g,
|
|
71
71
|
colorDomain: n,
|
|
72
|
-
radius:
|
|
73
|
-
height:
|
|
74
|
-
width:
|
|
75
|
-
scale:
|
|
76
|
-
centerPoint:
|
|
77
|
-
tooltip:
|
|
78
|
-
showLabels:
|
|
79
|
-
mapBorderWidth:
|
|
80
|
-
mapBorderColor:
|
|
81
|
-
mapNoDataColor:
|
|
82
|
-
onSeriesMouseOver:
|
|
83
|
-
showColorScale:
|
|
84
|
-
zoomScaleExtend:
|
|
72
|
+
radius: f,
|
|
73
|
+
height: y,
|
|
74
|
+
width: l,
|
|
75
|
+
scale: u,
|
|
76
|
+
centerPoint: k,
|
|
77
|
+
tooltip: w,
|
|
78
|
+
showLabels: M,
|
|
79
|
+
mapBorderWidth: kt,
|
|
80
|
+
mapBorderColor: Ct,
|
|
81
|
+
mapNoDataColor: Dt,
|
|
82
|
+
onSeriesMouseOver: q,
|
|
83
|
+
showColorScale: Nt,
|
|
84
|
+
zoomScaleExtend: Gt,
|
|
85
85
|
zoomTranslateExtend: qt,
|
|
86
|
-
highlightedDataPoints:
|
|
87
|
-
onSeriesMouseClick:
|
|
88
|
-
resetSelectionOnDoubleClick:
|
|
89
|
-
detailsOnClick:
|
|
90
|
-
styles:
|
|
91
|
-
classNames:
|
|
92
|
-
mapProjection:
|
|
93
|
-
zoomInteraction:
|
|
86
|
+
highlightedDataPoints: St,
|
|
87
|
+
onSeriesMouseClick: P,
|
|
88
|
+
resetSelectionOnDoubleClick: Mt,
|
|
89
|
+
detailsOnClick: H,
|
|
90
|
+
styles: C,
|
|
91
|
+
classNames: U,
|
|
92
|
+
mapProjection: Q,
|
|
93
|
+
zoomInteraction: X,
|
|
94
94
|
animate: x,
|
|
95
|
-
dimmedOpacity:
|
|
96
|
-
customLayers:
|
|
97
|
-
maxRadiusValue:
|
|
98
|
-
categorical:
|
|
99
|
-
dotColor:
|
|
100
|
-
collapseColorScaleByDefault:
|
|
101
|
-
highlightedIds:
|
|
102
|
-
mapProperty:
|
|
103
|
-
dotLegendTitle:
|
|
104
|
-
dotBorderColor:
|
|
105
|
-
labelColor:
|
|
106
|
-
|
|
95
|
+
dimmedOpacity: L,
|
|
96
|
+
customLayers: st,
|
|
97
|
+
maxRadiusValue: ct,
|
|
98
|
+
categorical: tt,
|
|
99
|
+
dotColor: Y,
|
|
100
|
+
collapseColorScaleByDefault: Ot,
|
|
101
|
+
highlightedIds: et,
|
|
102
|
+
mapProperty: dt,
|
|
103
|
+
dotLegendTitle: mt,
|
|
104
|
+
dotBorderColor: It,
|
|
105
|
+
labelColor: zt,
|
|
106
|
+
projectionRotate: J,
|
|
107
|
+
rewindCoordinatesInMapData: pt
|
|
108
|
+
} = r, d = Xe(() => pt ? eo(b, {
|
|
109
|
+
reverse: !0
|
|
110
|
+
}) : b, [b, pt]), [s, V] = S(void 0), [Ht, Et] = S(Ot === void 0 ? !(l < 680) : !Ot), ut = Rt(null), [B, O] = S(void 0), [ot, I] = S(void 0), [Pt, D] = S(void 0), [Lt, z] = S(void 0), _ = Rt(null), K = jo(_, {
|
|
107
111
|
once: x.once,
|
|
108
112
|
amount: x.amount
|
|
109
|
-
}),
|
|
110
|
-
|
|
111
|
-
const o =
|
|
112
|
-
if (
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
115
|
-
return
|
|
116
|
-
},
|
|
113
|
+
}), at = Rt(null), $ = t.filter((o) => o.radius === void 0 || o.radius === null).length !== t.length ? xo().domain([0, ct]).range([0.25, f]).nice() : void 0, E = tt ? vo().domain(n).range(e) : bo().domain(n).range(e);
|
|
114
|
+
de(() => {
|
|
115
|
+
const o = Ie(at.current), i = Ie(_.current), v = (m) => {
|
|
116
|
+
if (X === "noZoom") return !1;
|
|
117
|
+
if (X === "button") return !m.type.includes("wheel");
|
|
118
|
+
const gt = m.type === "wheel", ft = m.type.startsWith("touch"), At = m.type === "mousedown" || m.type === "mousemove";
|
|
119
|
+
return ft ? !0 : gt ? X === "scroll" ? !0 : m.ctrlKey : At && !m.button && !m.ctrlKey;
|
|
120
|
+
}, N = oo().scaleExtent(Gt).translateExtent(qt || [[-20, -20], [l + 20, y + 20]]).filter(v).on("zoom", ({
|
|
117
121
|
transform: m
|
|
118
122
|
}) => {
|
|
119
123
|
o.attr("transform", m);
|
|
120
124
|
});
|
|
121
|
-
i.call(
|
|
122
|
-
}, [
|
|
123
|
-
const
|
|
124
|
-
if (!
|
|
125
|
-
|
|
125
|
+
i.call(N), ut.current = N;
|
|
126
|
+
}, [y, l, X]);
|
|
127
|
+
const A = ao(d), j = mo(d), Vt = A[2] - A[0], Bt = A[3] - A[1], _t = l * 190 / 960 * 360 / Vt, $t = y * 190 / 678 * 180 / Bt, F = u * Math.min(_t, $t), Z = Q === "mercator" ? ro().rotate(J).center(k || j.geometry.coordinates).translate([l / 2, y / 2]).scale(F) : Q === "equalEarth" ? io().rotate(J).center(k || j.geometry.coordinates).translate([l / 2, y / 2]).scale(F) : Q === "naturalEarth" ? no().rotate(J).center(k || j.geometry.coordinates).translate([l / 2, y / 2]).scale(F) : Q === "orthographic" ? lo().rotate(J).center(k || j.geometry.coordinates).translate([l / 2, y / 2]).scale(F) : so().rotate(J).center(k || j.geometry.coordinates).translate([l / 2, y / 2]).scale(F), ht = co().projection(Z), rt = (o) => {
|
|
128
|
+
if (!_.current || !ut.current) return;
|
|
129
|
+
Ie(_.current).call(ut.current.scaleBy, o === "in" ? 1.2 : 1 / 1.2);
|
|
126
130
|
};
|
|
127
131
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
128
132
|
/* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
129
|
-
/* @__PURE__ */ a.jsx(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}), s += p;
|
|
142
|
-
}), /* @__PURE__ */ a.jsx("path", { d: s, style: {
|
|
143
|
-
stroke: rt,
|
|
144
|
-
strokeWidth: at,
|
|
145
|
-
fill: gt
|
|
146
|
-
} }, m);
|
|
147
|
-
})
|
|
148
|
-
) : (
|
|
149
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
|
-
o.geometry.coordinates.map((l, m) => {
|
|
151
|
-
let s = "M";
|
|
152
|
-
return l.forEach((C, p) => {
|
|
153
|
-
const f = A([C[0], C[1]]);
|
|
154
|
-
p !== l.length - 1 ? s = `${s}${f[0]} ${f[1]}L` : s = `${s}${f[0]} ${f[1]}`;
|
|
155
|
-
}), /* @__PURE__ */ a.jsx("path", { d: s, style: {
|
|
156
|
-
stroke: rt,
|
|
157
|
-
strokeWidth: at,
|
|
158
|
-
fill: gt
|
|
159
|
-
} }, m);
|
|
160
|
-
})
|
|
161
|
-
) }, i)),
|
|
162
|
-
/* @__PURE__ */ a.jsxs(ho, { children: [
|
|
133
|
+
/* @__PURE__ */ a.jsx(lt.svg, { width: `${l}px`, height: `${y}px`, viewBox: `0 0 ${l} ${y}`, ref: _, direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { ref: at, children: [
|
|
134
|
+
st.filter((o) => o.position === "before").map((o) => o.layer),
|
|
135
|
+
d.features.map((o, i) => {
|
|
136
|
+
if (!o.properties?.[dt]) return null;
|
|
137
|
+
const v = ht(o);
|
|
138
|
+
return v ? /* @__PURE__ */ a.jsx(lt.g, { opacity: s ? L : et.length !== 0 ? et.indexOf(o.properties[dt]) !== -1 ? 1 : L : 1, children: /* @__PURE__ */ a.jsx("path", { d: v, style: {
|
|
139
|
+
stroke: Ct,
|
|
140
|
+
strokeWidth: kt,
|
|
141
|
+
fill: Dt
|
|
142
|
+
} }) }, i) : null;
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ a.jsxs(ko, { children: [
|
|
163
145
|
t.filter((o) => o.id).map((o) => {
|
|
164
|
-
const i =
|
|
146
|
+
const i = d.features.findIndex(
|
|
165
147
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
166
|
-
(
|
|
167
|
-
)
|
|
148
|
+
(m) => o.id === m.properties[dt]
|
|
149
|
+
);
|
|
150
|
+
if (i === -1) return null;
|
|
151
|
+
const v = ht(d.features[i]);
|
|
152
|
+
if (!v) return null;
|
|
153
|
+
const N = me(o.x) ? Dt : (
|
|
168
154
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
|
-
|
|
155
|
+
E(o.x)
|
|
170
156
|
);
|
|
171
|
-
return /* @__PURE__ */ a.jsx(
|
|
157
|
+
return /* @__PURE__ */ a.jsx(lt.g, { variants: {
|
|
172
158
|
initial: {
|
|
173
159
|
opacity: 0
|
|
174
160
|
},
|
|
175
161
|
whileInView: {
|
|
176
|
-
opacity:
|
|
162
|
+
opacity: s ? s === N ? 1 : L : et.length !== 0 ? et.indexOf(o.id) !== -1 ? 1 : L : 1,
|
|
177
163
|
transition: {
|
|
178
164
|
duration: x.duration
|
|
179
165
|
}
|
|
180
166
|
}
|
|
181
|
-
}, initial: "initial", animate:
|
|
167
|
+
}, initial: "initial", animate: K ? "whileInView" : "initial", exit: {
|
|
182
168
|
opacity: 0,
|
|
183
169
|
transition: {
|
|
184
170
|
duration: x.duration
|
|
185
171
|
}
|
|
186
|
-
}, onMouseEnter: (
|
|
187
|
-
|
|
188
|
-
}, onMouseMove: (
|
|
189
|
-
|
|
172
|
+
}, onMouseEnter: (m) => {
|
|
173
|
+
I(o), z(m.clientY), D(m.clientX), q?.(o);
|
|
174
|
+
}, onMouseMove: (m) => {
|
|
175
|
+
I(o), z(m.clientY), D(m.clientX);
|
|
190
176
|
}, onMouseLeave: () => {
|
|
191
|
-
|
|
177
|
+
I(void 0), D(void 0), z(void 0), q?.(void 0);
|
|
192
178
|
}, onClick: () => {
|
|
193
|
-
(
|
|
194
|
-
}, children:
|
|
195
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
196
|
-
(l, m) => {
|
|
197
|
-
let s = "";
|
|
198
|
-
return l.forEach((C) => {
|
|
199
|
-
let p = " M";
|
|
200
|
-
C.forEach((f, mt) => {
|
|
201
|
-
const $ = A([f[0], f[1]]);
|
|
202
|
-
mt !== C.length - 1 ? p = `${p}${$[0]} ${$[1]}L` : p = `${p}${$[0]} ${$[1]}`;
|
|
203
|
-
}), s += p;
|
|
204
|
-
}), /* @__PURE__ */ a.jsx(ht.path, { d: s, variants: {
|
|
205
|
-
initial: {
|
|
206
|
-
fill: O,
|
|
207
|
-
opacity: 0
|
|
208
|
-
},
|
|
209
|
-
whileInView: {
|
|
210
|
-
fill: O,
|
|
211
|
-
opacity: 1,
|
|
212
|
-
transition: {
|
|
213
|
-
duration: x.duration
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
217
|
-
opacity: 0,
|
|
218
|
-
transition: {
|
|
219
|
-
duration: x.duration
|
|
220
|
-
}
|
|
221
|
-
}, style: {
|
|
222
|
-
stroke: rt,
|
|
223
|
-
strokeWidth: at
|
|
224
|
-
} }, `${o.id}-${m}`);
|
|
225
|
-
}
|
|
226
|
-
) : h.features[i].geometry.coordinates.map(
|
|
227
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
228
|
-
(l, m) => {
|
|
229
|
-
let s = "M";
|
|
230
|
-
return l.forEach((C, p) => {
|
|
231
|
-
const f = A([C[0], C[1]]);
|
|
232
|
-
p !== l.length - 1 ? s = `${s}${f[0]} ${f[1]}L` : s = `${s}${f[0]} ${f[1]}`;
|
|
233
|
-
}), /* @__PURE__ */ a.jsx(ht.path, { d: s, variants: {
|
|
234
|
-
initial: {
|
|
235
|
-
fill: O,
|
|
236
|
-
opacity: 0
|
|
237
|
-
},
|
|
238
|
-
whileInView: {
|
|
239
|
-
fill: O,
|
|
240
|
-
opacity: 1,
|
|
241
|
-
transition: {
|
|
242
|
-
duration: x.duration
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
246
|
-
opacity: 0,
|
|
247
|
-
transition: {
|
|
248
|
-
duration: x.duration
|
|
249
|
-
}
|
|
250
|
-
}, style: {
|
|
251
|
-
stroke: rt,
|
|
252
|
-
strokeWidth: at
|
|
253
|
-
} }, `${o.id}-${m}`);
|
|
254
|
-
}
|
|
255
|
-
) }, o.id);
|
|
256
|
-
}),
|
|
257
|
-
t.filter((o) => !ce(o.lat) && !ce(o.long)).map((o) => /* @__PURE__ */ a.jsxs(ht.g, { variants: {
|
|
258
|
-
initial: {
|
|
259
|
-
opacity: 0
|
|
260
|
-
},
|
|
261
|
-
whileInView: {
|
|
262
|
-
opacity: Ot.length !== 0 ? Ot.indexOf(o.label || "") !== -1 ? 1 : T : 1,
|
|
263
|
-
transition: {
|
|
264
|
-
duration: x.duration
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}, initial: "initial", animate: q ? "whileInView" : "initial", exit: {
|
|
268
|
-
opacity: 0,
|
|
269
|
-
transition: {
|
|
270
|
-
duration: x.duration
|
|
271
|
-
}
|
|
272
|
-
}, onMouseEnter: (i) => {
|
|
273
|
-
E(o), R(i.clientY), I(i.clientX), K?.(o);
|
|
274
|
-
}, onMouseMove: (i) => {
|
|
275
|
-
E(o), R(i.clientY), I(i.clientX);
|
|
276
|
-
}, onMouseLeave: () => {
|
|
277
|
-
E(void 0), I(void 0), R(void 0), K?.(void 0);
|
|
278
|
-
}, onClick: () => {
|
|
279
|
-
(F || Z) && ($e(ct, o) && Et ? (ot(void 0), F?.(void 0)) : (ot(o), F?.(o)));
|
|
280
|
-
}, transform: `translate(${A([o.long, o.lat])[0]},${A([o.long, o.lat])[1]})`, children: [
|
|
281
|
-
/* @__PURE__ */ a.jsx(ht.circle, { cx: 0, cy: 0, variants: {
|
|
179
|
+
(P || H) && (Pe(B, o) && Mt ? (O(void 0), P?.(void 0)) : (O(o), P?.(o)));
|
|
180
|
+
}, children: /* @__PURE__ */ a.jsx(lt.path, { d: v, variants: {
|
|
282
181
|
initial: {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
stroke: zt || et
|
|
182
|
+
fill: N,
|
|
183
|
+
opacity: 0
|
|
286
184
|
},
|
|
287
185
|
whileInView: {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
stroke: zt || et,
|
|
186
|
+
fill: N,
|
|
187
|
+
opacity: 1,
|
|
291
188
|
transition: {
|
|
292
189
|
duration: x.duration
|
|
293
190
|
}
|
|
294
191
|
}
|
|
295
|
-
}, initial: "initial", animate:
|
|
296
|
-
|
|
192
|
+
}, initial: "initial", animate: K ? "whileInView" : "initial", exit: {
|
|
193
|
+
opacity: 0,
|
|
297
194
|
transition: {
|
|
298
195
|
duration: x.duration
|
|
299
196
|
}
|
|
300
197
|
}, style: {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
198
|
+
stroke: Ct,
|
|
199
|
+
strokeWidth: kt
|
|
200
|
+
} }, `${o.id}`) }, o.id);
|
|
201
|
+
}),
|
|
202
|
+
t.filter((o) => !me(o.lat) && !me(o.long)).map((o) => {
|
|
203
|
+
const i = Z([o.long, o.lat])[0] > 0.6 * l ? -1 : 1;
|
|
204
|
+
return /* @__PURE__ */ a.jsxs(lt.g, { variants: {
|
|
304
205
|
initial: {
|
|
305
|
-
opacity: 0
|
|
306
|
-
x: W ? W(o.radius || 0) : j
|
|
206
|
+
opacity: 0
|
|
307
207
|
},
|
|
308
208
|
whileInView: {
|
|
309
|
-
opacity: 1,
|
|
310
|
-
x: W ? W(o.radius || 0) : j,
|
|
209
|
+
opacity: St.length !== 0 ? St.indexOf(o.label || "") !== -1 ? 1 : L : 1,
|
|
311
210
|
transition: {
|
|
312
211
|
duration: x.duration
|
|
313
212
|
}
|
|
314
213
|
}
|
|
315
|
-
}, initial: "initial", animate:
|
|
214
|
+
}, initial: "initial", animate: K ? "whileInView" : "initial", exit: {
|
|
316
215
|
opacity: 0,
|
|
317
216
|
transition: {
|
|
318
217
|
duration: x.duration
|
|
319
218
|
}
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
|
|
219
|
+
}, onMouseEnter: (v) => {
|
|
220
|
+
I(o), z(v.clientY), D(v.clientX), q?.(o);
|
|
221
|
+
}, onMouseMove: (v) => {
|
|
222
|
+
I(o), z(v.clientY), D(v.clientX);
|
|
223
|
+
}, onMouseLeave: () => {
|
|
224
|
+
I(void 0), D(void 0), z(void 0), q?.(void 0);
|
|
225
|
+
}, onClick: () => {
|
|
226
|
+
(P || H) && (Pe(B, o) && Mt ? (O(void 0), P?.(void 0)) : (O(o), P?.(o)));
|
|
227
|
+
}, transform: `translate(${Z([o.long, o.lat])[0]},${Z([o.long, o.lat])[1]})`, children: [
|
|
228
|
+
/* @__PURE__ */ a.jsx(lt.circle, { cx: 0, cy: 0, variants: {
|
|
229
|
+
initial: {
|
|
230
|
+
r: 0,
|
|
231
|
+
fill: Y,
|
|
232
|
+
stroke: It || Y
|
|
233
|
+
},
|
|
234
|
+
whileInView: {
|
|
235
|
+
r: $ ? $(o.radius || 0) : f,
|
|
236
|
+
fill: Y,
|
|
237
|
+
stroke: It || Y,
|
|
238
|
+
transition: {
|
|
239
|
+
duration: x.duration
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}, initial: "initial", animate: K ? "whileInView" : "initial", exit: {
|
|
243
|
+
r: 0,
|
|
244
|
+
transition: {
|
|
245
|
+
duration: x.duration
|
|
246
|
+
}
|
|
247
|
+
}, style: {
|
|
248
|
+
fillOpacity: 0.8
|
|
249
|
+
} }),
|
|
250
|
+
M && o.label ? /* @__PURE__ */ a.jsx(lt.text, { variants: {
|
|
251
|
+
initial: {
|
|
252
|
+
opacity: 0,
|
|
253
|
+
x: i * ($ ? $(o.radius || 0) : f)
|
|
254
|
+
},
|
|
255
|
+
whileInView: {
|
|
256
|
+
opacity: 1,
|
|
257
|
+
x: i * ($ ? $(o.radius || 0) : f),
|
|
258
|
+
transition: {
|
|
259
|
+
duration: x.duration
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}, initial: "initial", animate: K ? "whileInView" : "initial", exit: {
|
|
263
|
+
opacity: 0,
|
|
264
|
+
transition: {
|
|
265
|
+
duration: x.duration
|
|
266
|
+
}
|
|
267
|
+
}, y: 0, className: ze("text-sm", U?.graphObjectValues), style: {
|
|
268
|
+
textAnchor: i === -1 ? "end" : "start",
|
|
269
|
+
fill: zt || "#000",
|
|
270
|
+
...C?.graphObjectValues || {}
|
|
271
|
+
}, dx: i * 4, dy: 5, children: o.label }) : null
|
|
272
|
+
] }, o.label || `${o.lat}-${o.long}`);
|
|
273
|
+
})
|
|
326
274
|
] }),
|
|
327
|
-
|
|
275
|
+
st.filter((o) => o.position === "after").map((o) => o.layer)
|
|
328
276
|
] }) }),
|
|
329
|
-
|
|
277
|
+
Nt === !1 ? null : /* @__PURE__ */ a.jsx("div", { className: ze("absolute left-4 bottom-4 map-color-legend", U?.colorLegend), children: Ht ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
330
278
|
/* @__PURE__ */ a.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: () => {
|
|
331
|
-
|
|
332
|
-
}, children: /* @__PURE__ */ a.jsx(
|
|
279
|
+
Et(!1);
|
|
280
|
+
}, children: /* @__PURE__ */ a.jsx(ho, {}) }),
|
|
333
281
|
/* @__PURE__ */ a.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
334
|
-
width:
|
|
282
|
+
width: tt ? void 0 : "340px"
|
|
335
283
|
}, children: [
|
|
336
|
-
|
|
284
|
+
mt && mt !== "" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
337
285
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
338
286
|
/* @__PURE__ */ a.jsx("div", { className: "w-3 h-3 rounded-full", style: {
|
|
339
|
-
backgroundColor:
|
|
287
|
+
backgroundColor: Y
|
|
340
288
|
} }),
|
|
341
|
-
/* @__PURE__ */ a.jsx(
|
|
289
|
+
/* @__PURE__ */ a.jsx(Oe, { size: "xs", marginBottom: "none", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
342
290
|
display: "-webkit-box",
|
|
343
291
|
WebkitLineClamp: "1",
|
|
344
292
|
WebkitBoxOrient: "vertical"
|
|
345
|
-
}, children:
|
|
293
|
+
}, children: mt })
|
|
346
294
|
] }),
|
|
347
|
-
/* @__PURE__ */ a.jsx(
|
|
348
|
-
/* @__PURE__ */ a.jsx(
|
|
349
|
-
/* @__PURE__ */ a.jsx(
|
|
295
|
+
/* @__PURE__ */ a.jsx(Le, { size: "xl" }),
|
|
296
|
+
/* @__PURE__ */ a.jsx(Ae, {}),
|
|
297
|
+
/* @__PURE__ */ a.jsx(Le, { size: "xl" })
|
|
350
298
|
] }) : null,
|
|
351
|
-
|
|
299
|
+
g && g !== "" ? /* @__PURE__ */ a.jsx(Oe, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
|
|
352
300
|
display: "-webkit-box",
|
|
353
301
|
WebkitLineClamp: "1",
|
|
354
302
|
WebkitBoxOrient: "vertical"
|
|
355
|
-
}, children:
|
|
356
|
-
|
|
303
|
+
}, children: g }) : null,
|
|
304
|
+
tt ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: n.map((o, i) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", onMouseOver: () => {
|
|
357
305
|
V(e[i % e.length]);
|
|
358
306
|
}, onMouseLeave: () => {
|
|
359
307
|
V(void 0);
|
|
@@ -361,250 +309,255 @@ function No(r) {
|
|
|
361
309
|
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
|
|
362
310
|
backgroundColor: e[i % e.length]
|
|
363
311
|
} }),
|
|
364
|
-
/* @__PURE__ */ a.jsx(
|
|
312
|
+
/* @__PURE__ */ a.jsx(Oe, { size: "sm", marginBottom: "none", leading: "none", children: o })
|
|
365
313
|
] }, i)) }) : /* @__PURE__ */ a.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { children: [
|
|
366
314
|
n.map((o, i) => /* @__PURE__ */ a.jsxs("g", { onMouseOver: () => {
|
|
367
315
|
V(e[i]);
|
|
368
316
|
}, onMouseLeave: () => {
|
|
369
317
|
V(void 0);
|
|
370
318
|
}, className: "cursor-pointer", children: [
|
|
371
|
-
/* @__PURE__ */ a.jsx("rect", { x: i * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className:
|
|
319
|
+
/* @__PURE__ */ a.jsx("rect", { x: i * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: s === e[i] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "", style: {
|
|
372
320
|
fill: e[i],
|
|
373
|
-
...
|
|
321
|
+
...s === e[i] ? {} : {
|
|
374
322
|
stroke: e[i]
|
|
375
323
|
}
|
|
376
324
|
} }),
|
|
377
325
|
/* @__PURE__ */ a.jsx("text", { x: (i + 1) * 320 / e.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
|
|
378
326
|
textAnchor: "middle"
|
|
379
|
-
}, children:
|
|
327
|
+
}, children: wo(o, "NA") })
|
|
380
328
|
] }, i)),
|
|
381
329
|
/* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("rect", { onMouseOver: () => {
|
|
382
330
|
V(e[n.length]);
|
|
383
331
|
}, onMouseLeave: () => {
|
|
384
332
|
V(void 0);
|
|
385
|
-
}, x: n.length * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: `cursor-pointer ${
|
|
333
|
+
}, x: n.length * 320 / e.length + 1, y: 1, width: 320 / e.length - 2, height: 8, className: `cursor-pointer ${s === e[n.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`, style: {
|
|
386
334
|
fill: e[n.length],
|
|
387
|
-
...
|
|
335
|
+
...s === e[n.length] ? {} : {
|
|
388
336
|
stroke: e[n.length]
|
|
389
337
|
}
|
|
390
338
|
} }) })
|
|
391
339
|
] }) })
|
|
392
340
|
] })
|
|
393
341
|
] }) : /* @__PURE__ */ a.jsx("button", { type: "button", className: "mb-0 border-0 bg-transparent p-0 self-start map-legend-button", onClick: () => {
|
|
394
|
-
|
|
342
|
+
Et(!0);
|
|
395
343
|
}, children: /* @__PURE__ */ a.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" }) }) }),
|
|
396
|
-
|
|
397
|
-
/* @__PURE__ */ a.jsx("button", { onClick: () =>
|
|
398
|
-
/* @__PURE__ */ a.jsx("button", { onClick: () =>
|
|
344
|
+
X === "button" && /* @__PURE__ */ a.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
|
|
345
|
+
/* @__PURE__ */ a.jsx("button", { onClick: () => rt("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: "+" }),
|
|
346
|
+
/* @__PURE__ */ a.jsx("button", { onClick: () => rt("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: "–" })
|
|
399
347
|
] })
|
|
400
348
|
] }),
|
|
401
|
-
|
|
402
|
-
|
|
349
|
+
H && B !== void 0 ? /* @__PURE__ */ a.jsx(yo, { body: H, data: B, setData: O, className: U?.modal }) : null,
|
|
350
|
+
ot && w && Pt && Lt ? /* @__PURE__ */ a.jsx(uo, { data: ot, body: w, xPos: Pt, yPos: Lt, backgroundStyle: C?.tooltip, className: U?.tooltip }) : null
|
|
403
351
|
] });
|
|
404
352
|
}
|
|
405
|
-
function
|
|
406
|
-
const t =
|
|
353
|
+
function ja(r) {
|
|
354
|
+
const t = qe.c(135), {
|
|
407
355
|
data: e,
|
|
408
|
-
mapData:
|
|
409
|
-
graphTitle:
|
|
356
|
+
mapData: b,
|
|
357
|
+
graphTitle: g,
|
|
410
358
|
colors: n,
|
|
411
|
-
sources:
|
|
412
|
-
graphDescription:
|
|
413
|
-
height:
|
|
414
|
-
width:
|
|
415
|
-
footNote:
|
|
416
|
-
mapColorLegendTitle:
|
|
417
|
-
colorDomain:
|
|
418
|
-
choroplethScaleType:
|
|
419
|
-
radius:
|
|
420
|
-
scale:
|
|
421
|
-
centerPoint:
|
|
422
|
-
padding:
|
|
423
|
-
mapBorderWidth:
|
|
359
|
+
sources: f,
|
|
360
|
+
graphDescription: y,
|
|
361
|
+
height: l,
|
|
362
|
+
width: u,
|
|
363
|
+
footNote: k,
|
|
364
|
+
mapColorLegendTitle: w,
|
|
365
|
+
colorDomain: M,
|
|
366
|
+
choroplethScaleType: kt,
|
|
367
|
+
radius: Ct,
|
|
368
|
+
scale: Dt,
|
|
369
|
+
centerPoint: q,
|
|
370
|
+
padding: Nt,
|
|
371
|
+
mapBorderWidth: Gt,
|
|
424
372
|
mapNoDataColor: qt,
|
|
425
|
-
backgroundColor:
|
|
426
|
-
showLabels:
|
|
427
|
-
mapBorderColor:
|
|
428
|
-
tooltip:
|
|
429
|
-
relativeHeight:
|
|
430
|
-
onSeriesMouseOver:
|
|
431
|
-
isWorldMap:
|
|
432
|
-
showColorScale:
|
|
373
|
+
backgroundColor: St,
|
|
374
|
+
showLabels: P,
|
|
375
|
+
mapBorderColor: Mt,
|
|
376
|
+
tooltip: H,
|
|
377
|
+
relativeHeight: C,
|
|
378
|
+
onSeriesMouseOver: U,
|
|
379
|
+
isWorldMap: Q,
|
|
380
|
+
showColorScale: X,
|
|
433
381
|
zoomScaleExtend: x,
|
|
434
|
-
zoomTranslateExtend:
|
|
435
|
-
graphID:
|
|
436
|
-
highlightedDataPoints:
|
|
437
|
-
onSeriesMouseClick:
|
|
438
|
-
graphDownload:
|
|
439
|
-
dataDownload:
|
|
440
|
-
showAntarctica:
|
|
441
|
-
language:
|
|
442
|
-
minHeight:
|
|
443
|
-
theme:
|
|
444
|
-
ariaLabel:
|
|
445
|
-
resetSelectionOnDoubleClick:
|
|
446
|
-
detailsOnClick:
|
|
447
|
-
styles:
|
|
448
|
-
classNames:
|
|
449
|
-
mapProjection:
|
|
450
|
-
zoomInteraction:
|
|
451
|
-
animate:
|
|
452
|
-
dimmedOpacity:
|
|
453
|
-
customLayers:
|
|
454
|
-
maxRadiusValue:
|
|
455
|
-
timeline:
|
|
456
|
-
collapseColorScaleByDefault:
|
|
457
|
-
dotColor:
|
|
458
|
-
highlightedIds:
|
|
459
|
-
mapProperty:
|
|
460
|
-
dotLegendTitle:
|
|
461
|
-
dotBorderColor:
|
|
462
|
-
labelColor:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
const ue = Ut;
|
|
382
|
+
zoomTranslateExtend: L,
|
|
383
|
+
graphID: st,
|
|
384
|
+
highlightedDataPoints: ct,
|
|
385
|
+
onSeriesMouseClick: tt,
|
|
386
|
+
graphDownload: Y,
|
|
387
|
+
dataDownload: Ot,
|
|
388
|
+
showAntarctica: et,
|
|
389
|
+
language: dt,
|
|
390
|
+
minHeight: mt,
|
|
391
|
+
theme: It,
|
|
392
|
+
ariaLabel: zt,
|
|
393
|
+
resetSelectionOnDoubleClick: J,
|
|
394
|
+
detailsOnClick: pt,
|
|
395
|
+
styles: d,
|
|
396
|
+
classNames: s,
|
|
397
|
+
mapProjection: V,
|
|
398
|
+
zoomInteraction: Ht,
|
|
399
|
+
animate: Et,
|
|
400
|
+
dimmedOpacity: ut,
|
|
401
|
+
customLayers: B,
|
|
402
|
+
maxRadiusValue: O,
|
|
403
|
+
timeline: ot,
|
|
404
|
+
collapseColorScaleByDefault: I,
|
|
405
|
+
dotColor: Pt,
|
|
406
|
+
highlightedIds: D,
|
|
407
|
+
mapProperty: Lt,
|
|
408
|
+
dotLegendTitle: z,
|
|
409
|
+
dotBorderColor: _,
|
|
410
|
+
labelColor: K,
|
|
411
|
+
projectionRotate: at,
|
|
412
|
+
rewindCoordinatesInMapData: $
|
|
413
|
+
} = r, E = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : b, A = k === 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." : k, j = kt === void 0 ? "threshold" : kt, Vt = Ct === void 0 ? 5 : Ct, Bt = Dt === void 0 ? 0.95 : Dt, _t = Gt === void 0 ? 0.5 : Gt, $t = qt === void 0 ? jt.light.graphNoData : qt, F = St === void 0 ? !1 : St, Z = P === void 0 ? !1 : P, ht = Mt === void 0 ? jt.light.grays["gray-500"] : Mt, rt = Q === void 0 ? !0 : Q, o = X === void 0 ? !0 : X;
|
|
414
|
+
let i;
|
|
415
|
+
t[0] !== x ? (i = x === void 0 ? [0.8, 6] : x, t[0] = x, t[1] = i) : i = t[1];
|
|
416
|
+
const v = i;
|
|
417
|
+
let N;
|
|
418
|
+
t[2] !== ct ? (N = ct === void 0 ? [] : ct, t[2] = ct, t[3] = N) : N = t[3];
|
|
419
|
+
const m = N, gt = Y === void 0 ? !1 : Y, ft = Ot === void 0 ? !1 : Ot, At = et === void 0 ? !1 : et, pe = dt === void 0 ? "en" : dt, T = mt === void 0 ? 0 : mt, it = It === void 0 ? "light" : It, ue = J === void 0 ? !0 : J, he = V === void 0 ? "naturalEarth" : V, ge = Ht === void 0 ? "button" : Ht, Ut = Et === void 0 ? !1 : Et, fe = ut === void 0 ? 0.3 : ut;
|
|
473
420
|
let Xt;
|
|
474
|
-
t[
|
|
421
|
+
t[4] !== B ? (Xt = B === void 0 ? [] : B, t[4] = B, t[5] = Xt) : Xt = t[5];
|
|
422
|
+
const ye = Xt;
|
|
423
|
+
let Yt;
|
|
424
|
+
t[6] !== ot ? (Yt = ot === void 0 ? {
|
|
475
425
|
enabled: !1,
|
|
476
426
|
autoplay: !1,
|
|
477
427
|
showOnlyActiveDate: !0
|
|
478
|
-
} :
|
|
479
|
-
const c =
|
|
480
|
-
let Yt;
|
|
481
|
-
t[8] !== B ? (Yt = B === void 0 ? [] : B, t[8] = B, t[9] = Yt) : Yt = t[9];
|
|
482
|
-
const ge = Yt, fe = q === void 0 ? "ISO3" : q, ye = Gt === void 0 ? St.primaryColors["blue-600"] : Gt, [ut, Le] = z(0), [_t, Pe] = z(0), [X, Ve] = z(c.autoplay);
|
|
483
|
-
let At;
|
|
484
|
-
if (t[10] !== e || t[11] !== c.dateFormat) {
|
|
485
|
-
let y;
|
|
486
|
-
t[13] !== c.dateFormat ? (y = (J) => qe(`${J.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[13] = c.dateFormat, t[14] = y) : y = t[14], At = [...new Set(e.filter(Vo).map(y))], At.sort(Po), t[10] = e, t[11] = c.dateFormat, t[12] = At;
|
|
487
|
-
} else
|
|
488
|
-
At = t[12];
|
|
489
|
-
const u = At, [Y, xe] = z(c.autoplay ? 0 : u.length - 1), [kt, Be] = z(void 0), ve = Tt(null), De = Tt(null);
|
|
428
|
+
} : ot, t[6] = ot, t[7] = Yt) : Yt = t[7];
|
|
429
|
+
const c = Yt, xe = Pt === void 0 ? jt.primaryColors["blue-600"] : Pt;
|
|
490
430
|
let Jt;
|
|
491
|
-
t[
|
|
492
|
-
const
|
|
493
|
-
let Kt
|
|
494
|
-
t[
|
|
495
|
-
|
|
496
|
-
|
|
431
|
+
t[8] !== D ? (Jt = D === void 0 ? [] : D, t[8] = D, t[9] = Jt) : Jt = t[9];
|
|
432
|
+
const ve = Jt, be = Lt === void 0 ? "ISO3" : Lt, we = K === void 0 ? jt.primaryColors["blue-600"] : K;
|
|
433
|
+
let Kt;
|
|
434
|
+
t[10] !== at ? (Kt = at === void 0 ? [0, 0] : at, t[10] = at, t[11] = Kt) : Kt = t[11];
|
|
435
|
+
const je = Kt, ke = $ === void 0 ? !0 : $, [nt, Fe] = S(0), [Ft, Te] = S(0), [W, We] = S(c.autoplay);
|
|
436
|
+
let Tt;
|
|
437
|
+
if (t[12] !== e || t[13] !== c.dateFormat) {
|
|
438
|
+
let h;
|
|
439
|
+
t[15] !== c.dateFormat ? (h = (G) => Ke(`${G.date}`, c.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[15] = c.dateFormat, t[16] = h) : h = t[16], Tt = [...new Set(e.filter(qo).map(h))], Tt.sort(Go), t[12] = e, t[13] = c.dateFormat, t[14] = Tt;
|
|
440
|
+
} else
|
|
441
|
+
Tt = t[14];
|
|
442
|
+
const p = Tt, [R, Ce] = S(c.autoplay ? 0 : p.length - 1), [yt, Re] = S(void 0), De = Rt(null), Ee = Rt(null);
|
|
443
|
+
let Zt;
|
|
444
|
+
t[17] !== j || t[18] !== M || t[19] !== n?.length || t[20] !== e ? (Zt = M || (j === "categorical" ? Oo(e, "x") : Io(e.map(Ro), n?.length || 4)), t[17] = j, t[18] = M, t[19] = n?.length, t[20] = e, t[21] = Zt) : Zt = t[21];
|
|
445
|
+
const Wt = Zt;
|
|
446
|
+
let Qt, te;
|
|
447
|
+
t[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Qt = () => {
|
|
448
|
+
const h = new ResizeObserver((G) => {
|
|
449
|
+
Fe(G[0].target.clientWidth || 620), Te(G[0].target.clientHeight || 480);
|
|
497
450
|
});
|
|
498
|
-
return
|
|
499
|
-
},
|
|
500
|
-
let Qt;
|
|
501
|
-
t[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Qt = (y) => {
|
|
502
|
-
Be(y);
|
|
503
|
-
}, t[22] = Qt) : Qt = t[22];
|
|
504
|
-
const te = Te(Qt);
|
|
451
|
+
return De.current && h.observe(De.current), () => h.disconnect();
|
|
452
|
+
}, te = [], t[22] = Qt, t[23] = te) : (Qt = t[22], te = t[23]), de(Qt, te);
|
|
505
453
|
let ee;
|
|
506
|
-
t[
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
454
|
+
t[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ee = (h) => {
|
|
455
|
+
Re(h);
|
|
456
|
+
}, t[24] = ee) : ee = t[24];
|
|
457
|
+
const oe = Ye(ee);
|
|
458
|
+
let ae;
|
|
459
|
+
t[25] !== E || t[26] !== oe ? (ae = () => {
|
|
460
|
+
typeof E == "string" ? No(E).then((G) => {
|
|
461
|
+
oe(G);
|
|
462
|
+
}) : oe(E);
|
|
463
|
+
}, t[25] = E, t[26] = oe, t[27] = ae) : ae = t[27];
|
|
464
|
+
let re;
|
|
465
|
+
t[28] !== E ? (re = [E], t[28] = E, t[29] = re) : re = t[29], de(ae, re);
|
|
466
|
+
let ie, ne;
|
|
467
|
+
t[30] !== W || t[31] !== c.speed || t[32] !== p ? (ie = () => {
|
|
468
|
+
const h = setInterval(() => {
|
|
469
|
+
Ce((G) => G < p.length - 1 ? G + 1 : 0);
|
|
517
470
|
}, (c.speed || 2) * 1e3);
|
|
518
|
-
return
|
|
519
|
-
},
|
|
520
|
-
const
|
|
521
|
-
let
|
|
522
|
-
t[
|
|
523
|
-
const
|
|
524
|
-
let
|
|
525
|
-
t[
|
|
526
|
-
title:
|
|
527
|
-
description:
|
|
471
|
+
return W || clearInterval(h), () => clearInterval(h);
|
|
472
|
+
}, ne = [p, W, c.speed], t[30] = W, t[31] = c.speed, t[32] = p, t[33] = ie, t[34] = ne) : (ie = t[33], ne = t[34]), de(ie, ne);
|
|
473
|
+
const Ne = c.dateFormat || "yyyy";
|
|
474
|
+
let le;
|
|
475
|
+
t[35] !== R || t[36] !== Ne || t[37] !== c.showOnlyActiveDate || t[38] !== p ? (le = Ze(p, R, c.showOnlyActiveDate, Ne), t[35] = R, t[36] = Ne, t[37] = c.showOnlyActiveDate, t[38] = p, t[39] = le) : le = t[39];
|
|
476
|
+
const se = le, Se = s?.graphContainer, Me = d?.graphContainer;
|
|
477
|
+
let xt;
|
|
478
|
+
t[40] !== s?.description || t[41] !== s?.title || t[42] !== e || t[43] !== ft || t[44] !== y || t[45] !== gt || t[46] !== g || t[47] !== d?.description || t[48] !== d?.title || t[49] !== u ? (xt = g || y || gt || ft ? /* @__PURE__ */ a.jsx(Do, { styles: {
|
|
479
|
+
title: d?.title,
|
|
480
|
+
description: d?.description
|
|
528
481
|
}, classNames: {
|
|
529
|
-
title:
|
|
530
|
-
description:
|
|
531
|
-
}, graphTitle:
|
|
532
|
-
let
|
|
533
|
-
t[
|
|
482
|
+
title: s?.title,
|
|
483
|
+
description: s?.description
|
|
484
|
+
}, graphTitle: g, graphDescription: y, width: u, graphDownload: gt ? Ee : void 0, dataDownload: ft ? e.map(Wo).filter(To).length > 0 ? e.map(Fo).filter(Ao) : e.filter($o) : null }) : null, t[40] = s?.description, t[41] = s?.title, t[42] = e, t[43] = ft, t[44] = y, t[45] = gt, t[46] = g, t[47] = d?.description, t[48] = d?.title, t[49] = u, t[50] = xt) : xt = t[50];
|
|
485
|
+
let vt;
|
|
486
|
+
t[51] !== R || t[52] !== se || t[53] !== W || t[54] !== c.enabled || t[55] !== p ? (vt = c.enabled && p.length > 0 && se ? /* @__PURE__ */ a.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
534
487
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
535
|
-
|
|
536
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
537
|
-
/* @__PURE__ */ a.jsx(
|
|
538
|
-
|
|
539
|
-
}, onChange: (
|
|
540
|
-
|
|
488
|
+
We(!W);
|
|
489
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": W ? "Click to pause animation" : "Click to play animation", children: W ? /* @__PURE__ */ a.jsx(go, {}) : /* @__PURE__ */ a.jsx(fo, {}) }),
|
|
490
|
+
/* @__PURE__ */ a.jsx(Qe, { min: p[0], max: p[p.length - 1], marks: se, step: null, defaultValue: p[p.length - 1], value: p[R], onChangeComplete: (h) => {
|
|
491
|
+
Ce(p.indexOf(h));
|
|
492
|
+
}, onChange: (h) => {
|
|
493
|
+
Ce(p.indexOf(h));
|
|
541
494
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
542
|
-
] }) : null, t[
|
|
543
|
-
let
|
|
544
|
-
t[
|
|
545
|
-
...
|
|
546
|
-
features:
|
|
547
|
-
}, colorDomain:
|
|
495
|
+
] }) : null, t[51] = R, t[52] = se, t[53] = W, t[54] = c.enabled, t[55] = p, t[56] = vt) : vt = t[56];
|
|
496
|
+
let bt;
|
|
497
|
+
t[57] !== Ut || t[58] !== q || t[59] !== j || t[60] !== s || t[61] !== I || t[62] !== n || t[63] !== ye || t[64] !== e || t[65] !== pt || t[66] !== fe || t[67] !== Wt || t[68] !== _ || t[69] !== xe || t[70] !== z || t[71] !== l || t[72] !== m || t[73] !== ve || t[74] !== R || t[75] !== rt || t[76] !== we || t[77] !== ht || t[78] !== _t || t[79] !== w || t[80] !== $t || t[81] !== he || t[82] !== be || t[83] !== yt || t[84] !== O || t[85] !== T || t[86] !== tt || t[87] !== U || t[88] !== je || t[89] !== Vt || t[90] !== C || t[91] !== ue || t[92] !== ke || t[93] !== Bt || t[94] !== At || t[95] !== o || t[96] !== Z || t[97] !== d || t[98] !== Ft || t[99] !== nt || t[100] !== it || t[101] !== c.dateFormat || t[102] !== c.enabled || t[103] !== H || t[104] !== p || t[105] !== u || t[106] !== ge || t[107] !== v || t[108] !== L ? (bt = /* @__PURE__ */ a.jsx(So, { ref: De, children: nt && Ft && yt ? /* @__PURE__ */ a.jsx(Lo, { dotColor: xe, data: e.filter((h) => c.enabled ? h.date === Je(new Date(p[R]), c.dateFormat || "yyyy") : h), mapData: At ? yt : {
|
|
498
|
+
...yt,
|
|
499
|
+
features: yt.features.filter(_o)
|
|
500
|
+
}, colorDomain: Wt, width: nt, height: Ft, scale: Bt, centerPoint: q, colors: n || (j === "categorical" ? jt[it].sequentialColors[`neutralColorsx0${Wt.length}`] : jt[it].sequentialColors[`neutralColorsx0${Wt.length + 1}`]), mapColorLegendTitle: w, radius: Vt, categorical: j === "categorical", mapBorderWidth: _t, mapNoDataColor: $t, mapBorderColor: ht, tooltip: H, onSeriesMouseOver: U, showLabels: Z, isWorldMap: rt, showColorScale: o, zoomScaleExtend: v, zoomTranslateExtend: L, onSeriesMouseClick: tt, highlightedDataPoints: m, resetSelectionOnDoubleClick: ue, styles: d, classNames: s, zoomInteraction: ge, detailsOnClick: pt, mapProjection: he || (rt ? "naturalEarth" : "mercator"), animate: Ut === !0 ? {
|
|
548
501
|
duration: 0.5,
|
|
549
502
|
once: !0,
|
|
550
503
|
amount: 0.5
|
|
551
|
-
} :
|
|
504
|
+
} : Ut || {
|
|
552
505
|
duration: 0,
|
|
553
506
|
once: !0,
|
|
554
507
|
amount: 0
|
|
555
|
-
}, dimmedOpacity:
|
|
556
|
-
height: `${Math.max(
|
|
557
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
558
|
-
let
|
|
559
|
-
t[
|
|
560
|
-
footnote:
|
|
561
|
-
source:
|
|
508
|
+
}, dimmedOpacity: fe, customLayers: ye, maxRadiusValue: me(O) ? Math.max(...e.map(Bo).filter(Vo)) : O, collapseColorScaleByDefault: I, highlightedIds: ve, mapProperty: be, dotLegendTitle: z, dotBorderColor: _, labelColor: we, projectionRotate: je, rewindCoordinatesInMapData: ke }) : /* @__PURE__ */ a.jsx("div", { style: {
|
|
509
|
+
height: `${Math.max(T, l || (C ? T ? (u || nt) * C > T ? (u || nt) * C : T : (u || nt) * C : Ft))}px`
|
|
510
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(to, { "aria-label": "Loading graph" }) }) }), t[57] = Ut, t[58] = q, t[59] = j, t[60] = s, t[61] = I, t[62] = n, t[63] = ye, t[64] = e, t[65] = pt, t[66] = fe, t[67] = Wt, t[68] = _, t[69] = xe, t[70] = z, t[71] = l, t[72] = m, t[73] = ve, t[74] = R, t[75] = rt, t[76] = we, t[77] = ht, t[78] = _t, t[79] = w, t[80] = $t, t[81] = he, t[82] = be, t[83] = yt, t[84] = O, t[85] = T, t[86] = tt, t[87] = U, t[88] = je, t[89] = Vt, t[90] = C, t[91] = ue, t[92] = ke, t[93] = Bt, t[94] = At, t[95] = o, t[96] = Z, t[97] = d, t[98] = Ft, t[99] = nt, t[100] = it, t[101] = c.dateFormat, t[102] = c.enabled, t[103] = H, t[104] = p, t[105] = u, t[106] = ge, t[107] = v, t[108] = L, t[109] = bt) : bt = t[109];
|
|
511
|
+
let wt;
|
|
512
|
+
t[110] !== s?.footnote || t[111] !== s?.source || t[112] !== A || t[113] !== f || t[114] !== d?.footnote || t[115] !== d?.source || t[116] !== u ? (wt = f || A ? /* @__PURE__ */ a.jsx(Co, { styles: {
|
|
513
|
+
footnote: d?.footnote,
|
|
514
|
+
source: d?.source
|
|
562
515
|
}, classNames: {
|
|
563
|
-
footnote:
|
|
564
|
-
source:
|
|
565
|
-
}, sources:
|
|
566
|
-
let
|
|
567
|
-
return t[
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
] }), t[
|
|
516
|
+
footnote: s?.footnote,
|
|
517
|
+
source: s?.source
|
|
518
|
+
}, sources: f, footNote: A, width: u }) : null, t[110] = s?.footnote, t[111] = s?.source, t[112] = A, t[113] = f, t[114] = d?.footnote, t[115] = d?.source, t[116] = u, t[117] = wt) : wt = t[117];
|
|
519
|
+
let ce;
|
|
520
|
+
return t[118] !== zt || t[119] !== F || t[120] !== st || t[121] !== l || t[122] !== pe || t[123] !== T || t[124] !== Nt || t[125] !== C || t[126] !== Se || t[127] !== Me || t[128] !== xt || t[129] !== vt || t[130] !== bt || t[131] !== wt || t[132] !== it || t[133] !== u ? (ce = /* @__PURE__ */ a.jsxs(Mo, { className: Se, style: Me, id: st, ref: Ee, "aria-label": zt, backgroundColor: F, theme: it, language: pe, minHeight: T, width: u, height: l, relativeHeight: C, padding: Nt, children: [
|
|
521
|
+
xt,
|
|
522
|
+
vt,
|
|
523
|
+
bt,
|
|
524
|
+
wt
|
|
525
|
+
] }), t[118] = zt, t[119] = F, t[120] = st, t[121] = l, t[122] = pe, t[123] = T, t[124] = Nt, t[125] = C, t[126] = Se, t[127] = Me, t[128] = xt, t[129] = vt, t[130] = bt, t[131] = wt, t[132] = it, t[133] = u, t[134] = ce) : ce = t[134], ce;
|
|
573
526
|
}
|
|
574
|
-
function
|
|
527
|
+
function Vo(r) {
|
|
575
528
|
return r != null;
|
|
576
529
|
}
|
|
577
|
-
function
|
|
530
|
+
function Bo(r) {
|
|
578
531
|
return r.radius;
|
|
579
532
|
}
|
|
580
|
-
function
|
|
533
|
+
function _o(r) {
|
|
581
534
|
return r.properties.NAME !== "Antarctica";
|
|
582
535
|
}
|
|
583
|
-
function
|
|
536
|
+
function $o(r) {
|
|
584
537
|
return r !== void 0;
|
|
585
538
|
}
|
|
586
|
-
function
|
|
539
|
+
function Ao(r) {
|
|
587
540
|
return r !== void 0;
|
|
588
541
|
}
|
|
589
|
-
function
|
|
542
|
+
function Fo(r) {
|
|
590
543
|
return r.data;
|
|
591
544
|
}
|
|
592
|
-
function
|
|
545
|
+
function To(r) {
|
|
593
546
|
return r !== void 0;
|
|
594
547
|
}
|
|
595
|
-
function
|
|
548
|
+
function Wo(r) {
|
|
596
549
|
return r.data;
|
|
597
550
|
}
|
|
598
|
-
function
|
|
551
|
+
function Ro(r) {
|
|
599
552
|
return r.x;
|
|
600
553
|
}
|
|
601
|
-
function
|
|
554
|
+
function Go(r, t) {
|
|
602
555
|
return r - t;
|
|
603
556
|
}
|
|
604
|
-
function
|
|
557
|
+
function qo(r) {
|
|
605
558
|
return r.date;
|
|
606
559
|
}
|
|
607
560
|
export {
|
|
608
|
-
|
|
561
|
+
ja as HybridMap
|
|
609
562
|
};
|
|
610
563
|
//# sourceMappingURL=HybridMap.js.map
|