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