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