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