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