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