@undp/data-viz 2.4.1 → 2.5.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.cjs.map +1 -1
- package/dist/AreaChart.d.ts +11 -9
- package/dist/AreaChart.js +320 -322
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +15 -25
- package/dist/BarGraph.js +1694 -1694
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +13 -9
- package/dist/BasicStatCard.js +79 -81
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +11 -9
- package/dist/BeeSwarmChart.js +335 -336
- 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 +13 -3
- package/dist/BiVariateChoroplethMap.js +247 -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 +11 -5
- package/dist/BulletChart.js +560 -559
- 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 +11 -9
- package/dist/ButterflyChart.js +348 -350
- 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 +11 -3
- package/dist/ChoroplethMap.js +213 -213
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +11 -9
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.d.ts +1 -1
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +4 -5
- package/dist/DataTable.js +114 -116
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
- package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
- package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
- package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +11 -9
- package/dist/DifferenceLineChart.js +502 -504
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +14 -9
- package/dist/DonutChart.js +174 -179
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.d.ts +1 -1
- package/dist/DotDensityMap.js +2 -2
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +13 -9
- package/dist/DualAxisLineChart.js +341 -351
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +11 -9
- package/dist/DumbbellChart.js +592 -593
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -1
- package/dist/GeoHubCompareMaps.js +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.d.ts +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphEl-B7x5ku_y.cjs +2 -0
- package/dist/GraphEl-B7x5ku_y.cjs.map +1 -0
- package/dist/GraphEl-B8tGXqWk.js +1829 -0
- package/dist/GraphEl-B8tGXqWk.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +28 -16
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +28 -16
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +11 -9
- package/dist/HeatMap.js +203 -205
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +11 -5
- package/dist/Histogram.js +88 -89
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +11 -3
- package/dist/HybridMap.js +279 -279
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
- package/dist/LineChartWithConfidenceInterval.js +393 -395
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +28 -16
- package/dist/MultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +11 -9
- package/dist/MultiLineAltChart.js +411 -413
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +11 -9
- package/dist/MultiLineChart.js +438 -440
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +13 -13
- package/dist/ParetoChart.js +347 -355
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +28 -16
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +28 -16
- package/dist/PerformanceIntensiveScrollStory.d.ts +28 -16
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +11 -5
- package/dist/RadarChart.js +213 -213
- 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 +11 -9
- package/dist/SankeyChart.js +448 -450
- 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 +13 -13
- package/dist/ScatterPlot.js +490 -498
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +28 -16
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +11 -9
- package/dist/SimpleLineChart.js +362 -364
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +28 -16
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +28 -16
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +28 -16
- package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +28 -16
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.d.ts +1 -1
- package/dist/SlopeChart.js +2 -2
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +1 -1
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +11 -9
- package/dist/StatCardFromData.js +113 -116
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +11 -9
- package/dist/StripChart.js +434 -435
- 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 +11 -3
- package/dist/ThreeDGlobe.js +143 -143
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
- package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
- package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
- package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +11 -9
- package/dist/TreeMapGraph.js +369 -371
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +28 -16
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +11 -5
- package/dist/UnitChart.js +118 -119
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +11 -9
- package/dist/WaterfallChart.js +306 -308
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
- package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
- package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
- package/dist/index-BPyj_6hG.js +375 -0
- package/dist/index-BPyj_6hG.js.map +1 -0
- package/dist/index-DuLvdHo2.cjs +2 -0
- package/dist/index-DuLvdHo2.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +105 -245
- package/dist/index.js +2 -2
- package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
- package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
- package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
- package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
- package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
- package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
- package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-B73N4RIA.js +0 -1906
- package/dist/GraphEl-B73N4RIA.js.map +0 -1
- package/dist/GraphEl-Lt1og0C-.cjs +0 -2
- package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
- package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
- package/dist/index-B0Awa_de.js +0 -377
- package/dist/index-B0Awa_de.js.map +0 -1
- package/dist/index-CP8cmNzt.cjs +0 -2
- package/dist/index-CP8cmNzt.cjs.map +0 -1
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
- package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
package/dist/HybridMap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n locale: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n locale,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds,\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n locale = 'en',\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n locale={locale}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","ExpandIcon","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","t31","mapOverlay","Colors","light","graphNoData","grays","t32","t33","t34","enabled","autoplay","showOnlyActiveDate","primaryColors","t35","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t36","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t37","t38","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t39","shape","onUpdateShape","useEffectEvent","t40","shape_0","onUpdateOverlayMapShape","t41","fetchAndParseJSON","then","d_2","t42","t43","d_3","t44","t45","t46","t47","speed","interval","setInterval","clearInterval","t48","t49","getSliderMarks","markObj","t50","graphContainer","t51","t52","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t53","Pause","Play","SliderUI","nextValue","nextValue_0","t54","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t55","footnote","source","GraphFooter","t56","GraphContainer","d_11","d_10","NAME","d_6","d_5","d_4","d_8","d_7","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIP,IAAG,GAAGQ,EAAC,IAAKJ,GAAGK,IAAIC,GAAEH,CAAC,IAAIA,IAAIP,IAAGW,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,GAAE,cAAcH;AAChB,SAASW,GAAEN,GAAG;AACZ,SAAOH,GAAE,SAASG,CAAC;AACrB;AACA,IAAIU,KAAIZ;AACR,MAAMa,KAAIC,GAAE,WAAW,CAACZ,GAAGC,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EAAE;AAChB,MAAIV,GAAGC,GAAGC,GAAGS;AACb,EAAAZ,EAAE,CAAC,MAAMF,KAAK;AAAA,IACZ,WAAWG;AAAA,IACX,SAASE;AAAA,IACT,aAAaS;AAAA,IACb,GAAGV;AAAA,EACP,IAAMJ,GAAGE,EAAE,CAAC,IAAIF,GAAGE,EAAE,CAAC,IAAIC,GAAGD,EAAE,CAAC,IAAIE,GAAGF,EAAE,CAAC,IAAIG,GAAGH,EAAE,CAAC,IAAIY,MAAMX,IAAID,EAAE,CAAC,GAAGE,IAAIF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AAQ,GAAA;AAAA,SA4R8EpW,KAAM;AAAI;AA5RxF,SAAA2V,GAAAU,GAAA;AAAA,SA4RqCrW,EAACW;AAAO;AA5R7C,SAAA6U,GAAA5L,GAAA;AAAA,SAwOsDA,EAAEX,YAAiBqN,SAAK;AAAY;AAxO1F,SAAAzB,GAAA0B,GAAA;AAAA,SAuL4BvW,MAAM2D;AAAS;AAvL3C,SAAAiR,GAAA4B,GAAA;AAAA,SAsL6CxW,MAAM2D;AAAS;AAtL5D,SAAAgR,GAAA8B,GAAA;AAAA,SAsLyBzW,EAACM;AAAK;AAtL/B,SAAAoU,GAAAgC,GAAA;AAAA,SAqL2C1W,MAAM2D;AAAS;AArL1D,SAAA8Q,GAAAkC,GAAA;AAAA,SAqLuB3W,EAACM;AAAK;AArL7B,SAAAqR,GAAAiF,GAAA;AAAA,SAyFiB5W,EAACR;AAA+B;AAzFjD,SAAAwR,GAAA9R,GAAA2X,GAAA;AAAA,SA2EkB3X,IAAI2X;AAAC;AA3EvB,SAAA/F,GAAA9Q,GAAA;AAAA,SAuEgBA,EAAC0Q;AAAK;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n NumberFormatOptions,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds?: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n numberDisplayOptions,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n className='undp-map-shapes'\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? !highlightedIds || highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <motion.path\r\n key={`${d.id}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(\r\n d as number,\r\n undefined,\r\n numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n 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'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n MapOverlayDataType,\r\n NumberFormatOptions,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds,\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n numberDisplayOptions,\r\n mapOverlay,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n numberDisplayOptions={numberDisplayOptions}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","numberDisplayOptions","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","mapOverlay","Colors","light","graphNoData","grays","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","shape_0","onUpdateOverlayMapShape","t40","fetchAndParseJSON","then","d_2","t41","t42","d_3","t43","t44","t45","t46","speed","interval","setInterval","clearInterval","t47","t48","getSliderMarks","markObj","t49","graphContainer","t50","t51","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t52","Pause","Play","SliderUI","nextValue","nextValue_0","t53","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t54","footnote","source","GraphFooter","t55","GraphContainer","d_11","d_10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AAA6V,GAAAU,GAAA;AAAA,SA4RqCvW,EAACW;AAAO;AA5R7C,SAAA+U,GAAA9L,GAAA;AAAA,SAwOsDA,EAAEX,YAAiBuN,SAAK;AAAY;AAxO1F,SAAAzB,GAAA0B,GAAA;AAAA,SAuL4BzW,MAAM2D;AAAS;AAvL3C,SAAAmR,GAAA4B,GAAA;AAAA,SAsL6C1W,MAAM2D;AAAS;AAtL5D,SAAAkR,GAAA8B,GAAA;AAAA,SAsLyB3W,EAACM;AAAK;AAtL/B,SAAAsU,GAAAgC,GAAA;AAAA,SAqL2C5W,MAAM2D;AAAS;AArL1D,SAAAgR,GAAAkC,GAAA;AAAA,SAqLuB7W,EAACM;AAAK;AArL7B,SAAAuR,GAAAiF,GAAA;AAAA,SAyFiB9W,EAACR;AAA+B;AAzFjD,SAAA0R,GAAAhS,GAAA6X,GAAA;AAAA,SA2EkB7X,IAAI6X;AAAC;AA3EvB,SAAA/F,GAAAhR,GAAA;AAAA,SAuEgBA,EAAC4Q;AAAK;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),C=require("react"),R=require("./parse-xYI9yrvL.cjs"),Ne=require("./simple-statistics-xm8c0LQQ.cjs"),$e=require("./index-Cno4Q0YE.cjs"),be=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Fe=require("./Tooltip-Hr46paWP.cjs"),P=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./customArea-BAcQ3pBM.cjs"),We=require("./AxisTitle-DP_evhbe.cjs"),He=require("./Axis-BTaS9oPQ.cjs"),Ge=require("./ReferenceLine-CpU4G01Y.cjs"),Pe=require("./RegressionLine-BFoBiVJk.cjs"),Ye=require("./YTicksAndGridLines-DFjm8RCc.cjs"),Ue=require("./index-BuhBhuCq.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Be=require("./linear-CgUCbw9F.cjs"),Le=require("./line-DaEMhXmx.cjs"),ke=require("./step-BZ3C8QFW.cjs"),ze=require("./area-C1gxfNGD.cjs"),Je=require("./select-Bnfk0lJx.cjs"),k=require("./proxy-CqH8m8IQ.cjs"),Ke=require("./init-DU0ybBc_.cjs"),Qe=require("./pointer-Dkq5NV1q.cjs"),Ze=require("./use-in-view-dnRv_qqF.cjs"),_e=require("./GraphFooter.cjs"),ti=require("./GraphHeader.cjs"),Ae=require("./Colors.cjs"),ei=require("./ColorLegend.cjs"),ii=require("./EmptyState-CFmiFPHz.cjs"),qe=require("./GraphContainer-Cul9b74X.cjs"),ni=require("./getNoOfTicks-C_1CFXv_.cjs");function oi(n){const t=i.compilerRuntimeExports.c(103),{data:h,width:K,height:Gt,lineColor:A,suffix:q,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Pt,noOfXTicks:fe,rightMargin:Yt,leftMargin:T,topMargin:Ut,bottomMargin:dt,tooltip:Q,onSeriesMouseOver:Xt,refValues:se,minValue:ae,maxValue:ht,animate:o,rtl:ft,strokeWidth:Z,showDots:re,annotations:le,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ce,showIntervalValues:ye,intervalLineStrokeWidth:Bt,intervalLineColors:E,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:vt,noOfYTicks:ge,minDate:ue,maxDate:xe,curveType:jt,styles:y,classNames:g,precision:$,customLayers:Y,locale:O}=n,wt=C.useRef(null);let Rt;t[0]!==o.amount||t[1]!==o.once?(Rt={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Rt):Rt=t[2];const c=Ze.useInView(wt,Rt),[m,ve]=C.useState(!1);let _,tt;t[3]!==o.duration||t[4]!==m||t[5]!==c?(_=()=>{if(c&&!m){const e=setTimeout(()=>{ve(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},tt=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=_,t[7]=tt):(_=t[6],tt=t[7]),C.useEffect(_,tt);const et=jt==="linear"?Le.curveLinear:jt==="step"?ke.curveStep:jt==="stepAfter"?ke.stepAfter:jt==="stepBefore"?ke.stepBefore:ke.monotoneX,[b,Et]=C.useState(void 0),[Ct,p]=C.useState(void 0),[u,me]=C.useState(void 0),it=vt?T+30:T;let Mt;t[8]!==dt||t[9]!==Yt||t[10]!==it||t[11]!==Ut?(Mt={top:Ut,bottom:dt,left:it,right:Yt},t[8]=dt,t[9]=Yt,t[10]=it,t[11]=Ut,t[12]=Mt):Mt=t[12];const j=Mt,nt=C.useRef(null);let ot;t[13]!==l?(ot=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:P.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:P.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=ot):ot=t[14];const a=$e.orderBy(h.filter(gi).map(ot),["date"],["asc"]);let st;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],st=f.map(e),t[15]=l,t[16]=f,t[17]=st}else st=t[17];const Ot=st;let at;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((J,oe)=>oe%2===0?R.parse(`${J}`,l,new Date):J)}),t[23]=l,t[24]=e):e=t[24],at=yt.map(e),t[20]=yt,t[21]=l,t[22]=at}else at=t[22];const pe=at,x=K-j.left-j.right,v=Gt-j.top-j.bottom,Kt=ue?R.parse(`${ue}`,l,new Date):a[0].date,de=xe?R.parse(`${xe}`,l,new Date):a[a.length-1].date,w=P.checkIfNullOrUndefined(ae)?Math.min(...a.map(yi))?Math.min(...a.map(fi))>0?0:Math.min(...a.map(hi)):0:ae,U=Math.max(...a.map(di))?Math.max(...a.map(pi)):0,s=Xe.time().domain([Kt,de]).range([0,x]);let rt;t[25]!==U||t[26]!==ht?(rt=P.checkIfNullOrUndefined(ht)?U>0?U:0:ht,t[25]=U,t[26]=ht,t[27]=rt):rt=t[27];const r=Be.linear().domain([w,rt]).range([v,0]).nice(),Qt=Le.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(et),bt=Le.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(et),Zt=Le.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(et),_t=ze.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(et),te=r.ticks(ge),ee=s.ticks(fe);C.useEffect(()=>{const e=J=>{const oe=a[Ke.bisectCenter(a.map(mi),s.invert(Qe.pointer(J)[0]),0)];Et(oe||a[a.length-1]),Xt?.(oe||a[a.length-1]),me(J.clientY),p(J.clientX)},d=()=>{Et(void 0),p(void 0),me(void 0),Xt?.(void 0)};Je.select(nt.current).on("mousemove",e).on("mouseout",d)},[s,a,Xt]);const ie=Ne.linearRegression(a.filter(xi).map(e=>[s(e.date),r(e.y)])),Lt=Ne.linearRegressionLine(ie);let L;t[28]!==o||t[29]!==v||t[30]!==x||t[31]!==Ot||t[32]!==c||t[33]!==s?(L=i.jsxRuntimeExports.jsx(Ue.HighlightArea,{areaSettings:Ot,width:x,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=x,t[31]=Ot,t[32]=c,t[33]=s,t[34]=L):L=t[34];const kt=y?.yAxis?.gridLines,At=y?.yAxis?.labels;let lt;t[35]!==kt||t[36]!==At?(lt={gridLines:kt,labels:At},t[35]=kt,t[36]=At,t[37]=lt):lt=t[37];const ct=g?.yAxis?.gridLines,It=g?.yAxis?.labels;let X;t[38]!==ct||t[39]!==It?(X={gridLines:ct,labels:It},t[38]=ct,t[39]=It,t[40]=X):X=t[40];const Vt=r(w<0?0:w),St=r(w<0?0:w),Dt=0-T,Nt=x+j.right,qt=w<0?0:w;let I;t[41]!==O||t[42]!==$||t[43]!==M||t[44]!==q||t[45]!==qt?(I=be.numberFormattingFunction(qt,void 0,$,M,q,O),t[41]=O,t[42]=$,t[43]=M,t[44]=q,t[45]=qt,t[46]=I):I=t[46];const Tt=0-T,$t=r(w<0?0:w),B=U<0?"1em":-5;let ut;t[47]!==Tt||t[48]!==$t||t[49]!==B?(ut={x:Tt,y:$t,dx:0,dy:B},t[47]=Tt,t[48]=$t,t[49]=B,t[50]=ut):ut=t[50];const xt=g?.xAxis?.axis,he=g?.yAxis?.labels;let F;t[51]!==xt||t[52]!==he?(F={axis:xt,label:he},t[51]=xt,t[52]=he,t[53]=F):F=t[53];const ne=y?.xAxis?.axis,mt=y?.yAxis?.labels;let V;t[54]!==ne||t[55]!==mt?(V={axis:ne,label:mt},t[54]=ne,t[55]=mt,t[56]=V):V=t[56];let pt;t[57]!==Vt||t[58]!==St||t[59]!==Dt||t[60]!==Nt||t[61]!==I||t[62]!==ut||t[63]!==F||t[64]!==V?(pt=i.jsxRuntimeExports.jsx(He.Axis,{y1:Vt,y2:St,x1:Dt,x2:Nt,label:I,labelPos:ut,classNames:F,styles:V}),t[57]=Vt,t[58]=St,t[59]=Dt,t[60]=Nt,t[61]=I,t[62]=ut,t[63]=F,t[64]=V,t[65]=pt):pt=t[65];const Ft=0-T+15,W=v/2,H=y?.yAxis?.title,G=g?.yAxis?.title;let S;t[66]!==Ft||t[67]!==W||t[68]!==H||t[69]!==G||t[70]!==vt?(S=i.jsxRuntimeExports.jsx(We.AxisTitle,{x:Ft,y:W,style:H,className:G,text:vt,rotate90:!0}),t[66]=Ft,t[67]=W,t[68]=H,t[69]=G,t[70]=vt,t[71]=S):S=t[71];let D;t[72]!==Y?(D=Y.filter(li).map(ri),t[72]=Y,t[73]=D):D=t[73];let N;t[74]!==zt?(N={fill:zt},t[74]=zt,t[75]=N):N=t[75];let z;t[76]!==o.duration?(z={opacity:0,transition:{duration:o.duration}},t[76]=o.duration,t[77]=z):z=t[77];let Wt;t[78]!==A||t[79]!==Z?(Wt={stroke:A,fill:"none",strokeWidth:Z},t[78]=A,t[79]=Z,t[80]=Wt):Wt=t[80];let Ht;t[81]!==o.duration?(Ht={opacity:0,transition:{duration:o.duration}},t[81]=o.duration,t[82]=Ht):Ht=t[82];const Ie=a.map((e,d)=>i.jsxRuntimeExports.jsx(k.motion.g,{children:P.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[re?i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,style:{fill:A},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ce?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Pt?i.jsxRuntimeExports.jsx(k.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:A,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:A,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.y,void 0,$,M,q,O)}):null,ye?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.yMin,void 0,$,M,q,O)}),i.jsxRuntimeExports.jsx(k.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.yMax,void 0,$,M,q,O)})]}):null]})},d));let je;t[83]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[83]=Ie,t[84]=je):je=t[84];const Ve=le.map((e,d)=>{const J=De.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},P.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),oe=e.showConnector?{y1:J.y,x1:J.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:P.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Te={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):x+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(De.Annotation,{color:e.color,connectorsSettings:oe,labelSettings:Te,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let we;t[85]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[85]=Ve,t[86]=we):we=t[86];const Se=gt?i.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:x,y1:Lt(0),y2:Lt(x),graphHeight:v,graphWidth:x,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let Re;t[87]!==Se?(Re=i.jsxRuntimeExports.jsx("g",{children:Se}),t[87]=Se,t[88]=Re):Re=t[88];let Ee;t[89]!==Y?(Ee=Y.filter(ai).map(si),t[89]=Y,t[90]=Ee):Ee=t[90];let Ce;t[91]===Symbol.for("react.memo_cache_sentinel")?(Ce={fill:"none",pointerEvents:"all"},t[91]=Ce):Ce=t[91];let Me;t[92]!==nt||t[93]!==v||t[94]!==x?(Me=i.jsxRuntimeExports.jsx("rect",{ref:nt,style:Ce,width:x,height:v}),t[92]=nt,t[93]=v,t[94]=x,t[95]=Me):Me=t[95];let Oe;return t[96]!==g?.tooltip||t[97]!==Ct||t[98]!==u||t[99]!==b||t[100]!==y?.tooltip||t[101]!==Q?(Oe=b&&Q&&Ct&&u?i.jsxRuntimeExports.jsx(Fe.Tooltip,{data:b,body:Q,xPos:Ct,yPos:u,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[96]=g?.tooltip,t[97]=Ct,t[98]=u,t[99]=b,t[100]=y?.tooltip,t[101]=Q,t[102]=Oe):Oe=t[102],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.svg,{width:`${K}px`,height:`${Gt}px`,viewBox:`0 0 ${K} ${Gt}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[L,i.jsxRuntimeExports.jsx(De.CustomArea,{areaSettings:pe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Ye.YTicksAndGridLines,{values:te.filter(ui),y:te.filter(ci).map(e=>r(e)),x1:0-T,x2:x+j.right,styles:lt,classNames:X,suffix:q,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:$,locale:O}),pt,S]}),i.jsxRuntimeExports.jsx("g",{children:ee.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),D,i.jsxRuntimeExports.jsx(k.motion.path,{style:N,exit:z,variants:{initial:{opacity:0,d:_t(a)||""},whileInView:{opacity:Jt,d:_t(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Bt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Bt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:bt(a)||"",opacity:1},whileInView:{pathLength:1,d:bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Bt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Zt(a)||"",opacity:1},whileInView:{pathLength:1,d:Zt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(k.motion.path,{style:Wt,exit:Ht,variants:{initial:{pathLength:0,d:Qt(a)||"",opacity:1},whileInView:{pathLength:1,d:Qt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),b?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(b.date),x2:s(b.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,je,se?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:se.map((e,d)=>i.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-T,x2:x+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,we,Re,Ee,Me]})}),Oe]})}function si(n){return n.layer}function ai(n){return n.position==="after"}function ri(n){return n.layer}function li(n){return n.position==="before"}function ci(n){return n!==0}function ui(n){return n!==0}function xi(n){return!P.checkIfNullOrUndefined(n.date)&&!P.checkIfNullOrUndefined(n.y)}function mi(n){return n.date}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.max(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return Math.min(n.y,n.yMax,n.yMin)}function gi(n){return!P.checkIfNullOrUndefined(n.y)}function vi(n){const t=i.compilerRuntimeExports.c(105),{data:h,graphTitle:K,suffix:Gt,sources:A,prefix:q,graphDescription:M,height:l,width:f,footNote:Pt,noOfXTicks:fe,dateFormat:Yt,showValues:T,backgroundColor:Ut,padding:dt,lineColor:Q,leftMargin:Xt,rightMargin:se,topMargin:ae,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:Z,relativeHeight:re,onSeriesMouseOver:le,graphID:yt,minValue:gt,maxValue:ce,regressionLine:ye,showIntervalDots:Bt,showIntervalValues:E,intervalLineStrokeWidth:zt,intervalLineColors:Jt,intervalAreaColor:vt,intervalAreaOpacity:ge,graphDownload:ue,dataDownload:xe,animate:jt,language:y,minHeight:g,strokeWidth:$,showDots:Y,annotations:O,customHighlightAreaSettings:wt,theme:Rt,ariaLabel:c,yAxisTitle:m,noOfYTicks:ve,minDate:_,maxDate:tt,colorLegendTitle:et,colorLegendColors:b,colorLegendDomain:Et,curveType:Ct,styles:p,classNames:u,precision:me,customLayers:it,locale:Mt}=n,j=Gt===void 0?"":Gt,nt=q===void 0?"":q,ot=fe===void 0?10:fe,a=Yt===void 0?"yyyy":Yt,st=T===void 0?!1:T,Ot=Ut===void 0?!1:Ut,at=Xt===void 0?30:Xt,pe=se===void 0?30:se,x=ae===void 0?20:ae,v=ht===void 0?25:ht;let Kt;t[0]!==ft?(Kt=ft===void 0?[]:ft,t[0]=ft,t[1]=Kt):Kt=t[1];const de=Kt;let w;t[2]!==Z?(w=Z===void 0?[]:Z,t[2]=Z,t[3]=w):w=t[3];const U=w,s=ye===void 0?!1:ye,rt=Bt===void 0?!1:Bt,r=E===void 0?!1:E,Qt=zt===void 0?0:zt;let bt;t[4]!==Jt?(bt=Jt===void 0?[Ae.Colors.light.grays["gray-500"],Ae.Colors.light.grays["gray-500"]]:Jt,t[4]=Jt,t[5]=bt):bt=t[5];const Zt=bt,_t=vt===void 0?Ae.Colors.primaryColors["blue-100"]:vt,te=ge===void 0?.4:ge,ee=ue===void 0?!1:ue,ie=xe===void 0?!1:xe,Lt=jt===void 0?!1:jt,L=y===void 0?"en":y,kt=g===void 0?0:g,At=$===void 0?2:$,lt=Y===void 0?!0:Y;let ct;t[6]!==O?(ct=O===void 0?[]:O,t[6]=O,t[7]=ct):ct=t[7];const It=ct;let X;t[8]!==wt?(X=wt===void 0?[]:wt,t[8]=wt,t[9]=X):X=t[9];const Vt=X,St=Rt===void 0?"light":Rt,Dt=ve===void 0?5:ve,Nt=Ct===void 0?"curve":Ct,qt=me===void 0?2:me;let I;t[10]!==it?(I=it===void 0?[]:it,t[10]=it,t[11]=I):I=t[11];const Tt=I,$t=Mt===void 0?"en":Mt,[B,ut]=C.useState(0),[xt,he]=C.useState(0),F=C.useRef(null),ne=C.useRef(null);let mt,V;t[12]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>{const Wt=new ResizeObserver(Ht=>{ut(Ht[0].target.clientWidth||620),he(Ht[0].target.clientHeight||480)});return F.current&&Wt.observe(F.current),()=>Wt.disconnect()},V=[],t[12]=mt,t[13]=V):(mt=t[12],V=t[13]),C.useEffect(mt,V);const pt=u?.graphContainer,Ft=p?.graphContainer;let W;t[14]!==u?.description||t[15]!==u?.title||t[16]!==h||t[17]!==ie||t[18]!==M||t[19]!==ee||t[20]!==K||t[21]!==p?.description||t[22]!==p?.title||t[23]!==f?(W=K||M||ee||ie?i.jsxRuntimeExports.jsx(ti.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:M,width:f,graphDownload:ee?ne:void 0,dataDownload:ie?h.map(Ci).filter(Ei).length>0?h.map(Ri).filter(wi):h.filter(ji):null}):null,t[14]=u?.description,t[15]=u?.title,t[16]=h,t[17]=ie,t[18]=M,t[19]=ee,t[20]=K,t[21]=p?.description,t[22]=p?.title,t[23]=f,t[24]=W):W=t[24];let H;t[25]!==u?.colorLegend||t[26]!==b||t[27]!==Et||t[28]!==et||t[29]!==h.length||t[30]!==f?(H=b&&Et&&h.length>0?i.jsxRuntimeExports.jsx(ei.ColorLegend,{width:f,colorLegendTitle:et,colors:b,colorDomain:Et,showNAColor:!1,className:u?.colorLegend}):null,t[25]=u?.colorLegend,t[26]=b,t[27]=Et,t[28]=et,t[29]=h.length,t[30]=f,t[31]=H):H=t[31];let G;t[32]!==h.length?(G=h.length===0&&i.jsxRuntimeExports.jsx(ii.EmptyState,{}),t[32]=h.length,t[33]=G):G=t[33];let S;t[34]!==Lt||t[35]!==It||t[36]!==v||t[37]!==u||t[38]!==Nt||t[39]!==Vt||t[40]!==Tt||t[41]!==h||t[42]!==a||t[43]!==U||t[44]!==_t||t[45]!==te||t[46]!==Zt||t[47]!==Qt||t[48]!==L||t[49]!==at||t[50]!==Q||t[51]!==$t||t[52]!==tt||t[53]!==ce||t[54]!==_||t[55]!==gt||t[56]!==ot||t[57]!==Dt||t[58]!==le||t[59]!==qt||t[60]!==nt||t[61]!==de||t[62]!==s||t[63]!==pe||t[64]!==lt||t[65]!==rt||t[66]!==r||t[67]!==st||t[68]!==At||t[69]!==p||t[70]!==j||t[71]!==xt||t[72]!==B||t[73]!==o||t[74]!==x||t[75]!==m?(S=B&&xt&&h.length>0?i.jsxRuntimeExports.jsx(oi,{data:h,lineColor:Q||Ae.Colors.primaryColors["blue-600"],width:B,height:xt,suffix:j,prefix:nt,dateFormat:a,showValues:st,noOfXTicks:ot??ni.getNoOfTicks(B),leftMargin:at,rightMargin:pe,topMargin:x,bottomMargin:v,tooltip:o,highlightAreaSettings:U,onSeriesMouseOver:le,refValues:de,minValue:gt,maxValue:ce,animate:Lt===!0?{duration:.5,once:!0,amount:.5}:Lt||{duration:0,once:!0,amount:0},rtl:L==="he"||L==="ar",strokeWidth:At,showDots:lt,annotations:It,customHighlightAreaSettings:Vt,regressionLine:s,showIntervalDots:rt,showIntervalValues:r,intervalLineStrokeWidth:Qt,intervalLineColors:Zt,intervalAreaColor:_t,intervalAreaOpacity:te,yAxisTitle:m,noOfYTicks:Dt,minDate:_,maxDate:tt,curveType:Nt,styles:p,classNames:u,precision:qt,customLayers:Tt,locale:$t}):null,t[34]=Lt,t[35]=It,t[36]=v,t[37]=u,t[38]=Nt,t[39]=Vt,t[40]=Tt,t[41]=h,t[42]=a,t[43]=U,t[44]=_t,t[45]=te,t[46]=Zt,t[47]=Qt,t[48]=L,t[49]=at,t[50]=Q,t[51]=$t,t[52]=tt,t[53]=ce,t[54]=_,t[55]=gt,t[56]=ot,t[57]=Dt,t[58]=le,t[59]=qt,t[60]=nt,t[61]=de,t[62]=s,t[63]=pe,t[64]=lt,t[65]=rt,t[66]=r,t[67]=st,t[68]=At,t[69]=p,t[70]=j,t[71]=xt,t[72]=B,t[73]=o,t[74]=x,t[75]=m,t[76]=S):S=t[76];let D;t[77]!==G||t[78]!==S?(D=i.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:F,children:[G,S]}),t[77]=G,t[78]=S,t[79]=D):D=t[79];let N;t[80]!==u?.footnote||t[81]!==u?.source||t[82]!==Pt||t[83]!==A||t[84]!==p?.footnote||t[85]!==p?.source||t[86]!==f?(N=A||Pt?i.jsxRuntimeExports.jsx(_e.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:A,footNote:Pt,width:f}):null,t[80]=u?.footnote,t[81]=u?.source,t[82]=Pt,t[83]=A,t[84]=p?.footnote,t[85]=p?.source,t[86]=f,t[87]=N):N=t[87];let z;return t[88]!==c||t[89]!==Ot||t[90]!==yt||t[91]!==l||t[92]!==L||t[93]!==kt||t[94]!==dt||t[95]!==re||t[96]!==pt||t[97]!==Ft||t[98]!==W||t[99]!==H||t[100]!==D||t[101]!==N||t[102]!==St||t[103]!==f?(z=i.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:pt,style:Ft,id:yt,ref:ne,"aria-label":c,backgroundColor:Ot,theme:St,language:L,minHeight:kt,width:f,height:l,relativeHeight:re,padding:dt,children:[W,H,D,N]}),t[88]=c,t[89]=Ot,t[90]=yt,t[91]=l,t[92]=L,t[93]=kt,t[94]=dt,t[95]=re,t[96]=pt,t[97]=Ft,t[98]=W,t[99]=H,t[100]=D,t[101]=N,t[102]=St,t[103]=f,t[104]=z):z=t[104],z}function ji(n){return n!==void 0}function wi(n){return n!==void 0}function Ri(n){return n.data}function Ei(n){return n!==void 0}function Ci(n){return n.data}exports.LineChartWithConfidenceInterval=vi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),b=require("react"),C=require("./parse-xYI9yrvL.cjs"),qe=require("./simple-statistics-xm8c0LQQ.cjs"),Fe=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-u2iNHL_c.cjs"),We=require("./Tooltip-C9F3uYG0.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-BAcQ3pBM.cjs"),He=require("./AxisTitle-DP_evhbe.cjs"),Ge=require("./Axis-BTaS9oPQ.cjs"),Pe=require("./ReferenceLine-CpU4G01Y.cjs"),Ye=require("./RegressionLine-BFoBiVJk.cjs"),Ue=require("./YTicksAndGridLines-sT3zdCs6.cjs"),Xe=require("./index-BuhBhuCq.cjs"),Ze=require("./time-CkcKbhwe.cjs"),Be=require("./linear-CgUCbw9F.cjs"),be=require("./line-DaEMhXmx.cjs"),Le=require("./step-BZ3C8QFW.cjs"),ze=require("./area-C1gxfNGD.cjs"),Je=require("./select-Bnfk0lJx.cjs"),k=require("./proxy-CqH8m8IQ.cjs"),Ke=require("./init-DU0ybBc_.cjs"),Qe=require("./pointer-Dkq5NV1q.cjs"),_e=require("./use-in-view-dnRv_qqF.cjs"),ti=require("./GraphFooter.cjs"),ei=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),ii=require("./ColorLegend.cjs"),ni=require("./EmptyState-CFmiFPHz.cjs"),Te=require("./GraphContainer-Cul9b74X.cjs"),oi=require("./getNoOfTicks-C_1CFXv_.cjs");function si(n){const t=i.compilerRuntimeExports.c(104),{data:y,width:et,height:it,lineColor:A,suffix:I,prefix:p,dateFormat:l,highlightAreaSettings:It,showValues:re,noOfXTicks:le,rightMargin:Vt,leftMargin:V,topMargin:dt,bottomMargin:Dt,tooltip:ft,onSeriesMouseOver:St,refValues:zt,minValue:Nt,maxValue:P,animate:o,rtl:qt,strokeWidth:ht,showDots:Jt,annotations:Kt,customHighlightAreaSettings:yt,regressionLine:Tt,showIntervalDots:ce,showIntervalValues:ue,intervalLineStrokeWidth:$t,intervalLineColors:j,intervalAreaColor:Ft,intervalAreaOpacity:xe,yAxisTitle:gt,noOfYTicks:me,minDate:Qt,maxDate:_t,curveType:vt,styles:g,classNames:v,precision:L,customLayers:D,locale:N,padZeros:S}=n,Wt=b.useRef(null);let jt;t[0]!==o.amount||t[1]!==o.once?(jt={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=jt):jt=t[2];const c=_e.useInView(Wt,jt),[d,te]=b.useState(!1);let Y,U;t[3]!==o.duration||t[4]!==d||t[5]!==c?(Y=()=>{if(c&&!d){const e=setTimeout(()=>{te(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},U=[c,d,o.duration],t[3]=o.duration,t[4]=d,t[5]=c,t[6]=Y,t[7]=U):(Y=t[6],U=t[7]),b.useEffect(Y,U);const wt=vt==="linear"?be.curveLinear:vt==="step"?Le.curveStep:vt==="stepAfter"?Le.stepAfter:vt==="stepBefore"?Le.stepBefore:Le.monotoneX,[u,m]=b.useState(void 0),[X,f]=b.useState(void 0),[nt,Ht]=b.useState(void 0),Rt=gt?V+30:V;let ot;t[8]!==Dt||t[9]!==Vt||t[10]!==Rt||t[11]!==dt?(ot={top:dt,bottom:Dt,left:Rt,right:Vt},t[8]=Dt,t[9]=Vt,t[10]=Rt,t[11]=dt,t[12]=ot):ot=t[12];const R=ot,st=b.useRef(null);let at;t[13]!==l?(at=e=>({date:C.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=at):at=t[14];const a=Fe.orderBy(y.filter(vi).map(at),["date"],["asc"]);let Z;if(t[15]!==l||t[16]!==It){let e;t[18]!==l?(e=h=>({...h,coordinates:[h.coordinates[0]===null?null:C.parse(`${h.coordinates[0]}`,l,new Date),h.coordinates[1]===null?null:C.parse(`${h.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],Z=It.map(e),t[15]=l,t[16]=It,t[17]=Z}else Z=t[17];const Et=Z;let B;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=h=>({...h,coordinates:h.coordinates.map((tt,Bt)=>Bt%2===0?C.parse(`${tt}`,l,new Date):tt)}),t[23]=l,t[24]=e):e=t[24],B=yt.map(e),t[20]=yt,t[21]=l,t[22]=B}else B=t[22];const ee=B,x=et-R.left-R.right,w=it-R.top-R.bottom,ie=Qt?C.parse(`${Qt}`,l,new Date):a[0].date,ne=_t?C.parse(`${_t}`,l,new Date):a[a.length-1].date,E=G.checkIfNullOrUndefined(Nt)?Math.min(...a.map(gi))?Math.min(...a.map(yi))>0?0:Math.min(...a.map(hi)):0:Nt,z=Math.max(...a.map(fi))?Math.max(...a.map(di)):0,s=Ze.time().domain([ie,ne]).range([0,x]);let rt;t[25]!==z||t[26]!==P?(rt=G.checkIfNullOrUndefined(P)?z>0?z:0:P,t[25]=z,t[26]=P,t[27]=rt):rt=t[27];const r=Be.linear().domain([E,rt]).range([w,0]).nice(),Ct=be.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(wt),Mt=be.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(wt),q=be.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(wt),Gt=ze.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(wt),Pt=r.ticks(me),oe=s.ticks(le);b.useEffect(()=>{const e=tt=>{const Bt=a[Ke.bisectCenter(a.map(pi),s.invert(Qe.pointer(tt)[0]),0)];m(Bt||a[a.length-1]),St?.(Bt||a[a.length-1]),Ht(tt.clientY),f(tt.clientX)},h=()=>{m(void 0),f(void 0),Ht(void 0),St?.(void 0)};Je.select(st.current).on("mousemove",e).on("mouseout",h)},[s,a,St]);const Yt=qe.linearRegression(a.filter(mi).map(e=>[s(e.date),r(e.y)])),Ut=qe.linearRegressionLine(Yt);let J;t[28]!==o||t[29]!==w||t[30]!==x||t[31]!==Et||t[32]!==c||t[33]!==s?(J=i.jsxRuntimeExports.jsx(Xe.HighlightArea,{areaSettings:Et,width:x,height:w,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=w,t[30]=x,t[31]=Et,t[32]=c,t[33]=s,t[34]=J):J=t[34];const Ot=g?.yAxis?.gridLines,bt=g?.yAxis?.labels;let lt;t[35]!==Ot||t[36]!==bt?(lt={gridLines:Ot,labels:bt},t[35]=Ot,t[36]=bt,t[37]=lt):lt=t[37];const Lt=v?.yAxis?.gridLines,ct=v?.yAxis?.labels;let ut;t[38]!==Lt||t[39]!==ct?(ut={gridLines:Lt,labels:ct},t[38]=Lt,t[39]=ct,t[40]=ut):ut=t[40];const K=r(E<0?0:E),se=r(E<0?0:E),xt=0-V,ae=x+R.right,kt=E<0?0:E;let Q;t[41]!==N||t[42]!==S||t[43]!==L||t[44]!==p||t[45]!==I||t[46]!==kt?(Q=Oe.numberFormattingFunction(kt,void 0,L,p,I,N,S),t[41]=N,t[42]=S,t[43]=L,t[44]=p,t[45]=I,t[46]=kt,t[47]=Q):Q=t[47];const mt=0-V,pt=r(E<0?0:E),At=z<0?"1em":-5;let T;t[48]!==mt||t[49]!==pt||t[50]!==At?(T={x:mt,y:pt,dx:0,dy:At},t[48]=mt,t[49]=pt,t[50]=At,t[51]=T):T=t[51];const $=v?.xAxis?.axis,F=v?.yAxis?.labels;let M;t[52]!==$||t[53]!==F?(M={axis:$,label:F},t[52]=$,t[53]=F,t[54]=M):M=t[54];const W=g?.xAxis?.axis,H=g?.yAxis?.labels;let O;t[55]!==W||t[56]!==H?(O={axis:W,label:H},t[55]=W,t[56]=H,t[57]=O):O=t[57];let _;t[58]!==K||t[59]!==se||t[60]!==xt||t[61]!==ae||t[62]!==Q||t[63]!==T||t[64]!==M||t[65]!==O?(_=i.jsxRuntimeExports.jsx(Ge.Axis,{y1:K,y2:se,x1:xt,x2:ae,label:Q,labelPos:T,classNames:M,styles:O}),t[58]=K,t[59]=se,t[60]=xt,t[61]=ae,t[62]=Q,t[63]=T,t[64]=M,t[65]=O,t[66]=_):_=t[66];const Xt=0-V+15,Zt=w/2,Ae=g?.yAxis?.title,Ie=v?.yAxis?.title;let pe;t[67]!==Xt||t[68]!==Zt||t[69]!==Ae||t[70]!==Ie||t[71]!==gt?(pe=i.jsxRuntimeExports.jsx(He.AxisTitle,{x:Xt,y:Zt,style:Ae,className:Ie,text:gt,rotate90:!0}),t[67]=Xt,t[68]=Zt,t[69]=Ae,t[70]=Ie,t[71]=gt,t[72]=pe):pe=t[72];let de;t[73]!==D?(de=D.filter(ci).map(li),t[73]=D,t[74]=de):de=t[74];let fe;t[75]!==Ft?(fe={fill:Ft},t[75]=Ft,t[76]=fe):fe=t[76];let he;t[77]!==o.duration?(he={opacity:0,transition:{duration:o.duration}},t[77]=o.duration,t[78]=he):he=t[78];let ye;t[79]!==A||t[80]!==ht?(ye={stroke:A,fill:"none",strokeWidth:ht},t[79]=A,t[80]=ht,t[81]=ye):ye=t[81];let ge;t[82]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[82]=o.duration,t[83]=ge):ge=t[83];const Ve=a.map((e,h)=>i.jsxRuntimeExports.jsx(k.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Jt?i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,style:{fill:A},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:d?o.duration:.5,delay:d?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ce?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:j[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:d?o.duration:.5,delay:d?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:j[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:j[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:j[1],transition:{duration:d?o.duration:.5,delay:d?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,re?i.jsxRuntimeExports.jsx(k.motion.text,{dy:-8,style:{textAnchor:"middle",...g?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",v?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:A,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:A,y:r(e.y),transition:{duration:d?o.duration:.5,delay:d?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,void 0,L,p,I,N,S)}):null,ue?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.text,{dy:"1em",style:{textAnchor:"middle",...g?.graphObjectValues||{}},className:i.mo("text-xs font-bold",v?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:j[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:j[0],transition:{duration:d?o.duration:.5,delay:d?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,void 0,L,p,I,N,S)}),i.jsxRuntimeExports.jsx(k.motion.text,{dy:-8,style:{textAnchor:"middle",...g?.graphObjectValues||{}},className:i.mo("text-xs font-bold",v?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:j[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:j[1],x:s(e.date),y:r(e.yMax),transition:{duration:d?o.duration:.5,delay:d?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,void 0,L,p,I,N,S)})]}):null]})},h));let ve;t[84]!==Ve?(ve=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[84]=Ve,t[85]=ve):ve=t[85];const De=Kt.map((e,h)=>{const tt=Ne.getLineEndPoint({x:e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Bt=e.showConnector?{y1:tt.y,x1:tt.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,$e={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:qt?0:e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:qt?e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):x+R.right-(e.xCoordinate?s(C.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:Bt,labelSettings:$e,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},h)});let je;t[86]!==De?(je=i.jsxRuntimeExports.jsx("g",{children:De}),t[86]=De,t[87]=je):je=t[87];const Se=Tt?i.jsxRuntimeExports.jsx(Ye.RegressionLine,{x1:0,x2:x,y1:Ut(0),y2:Ut(x),graphHeight:w,graphWidth:x,className:v?.regLine,style:g?.regLine,color:typeof Tt=="string"?Tt:void 0,animate:o,isInView:c}):null;let we;t[88]!==Se?(we=i.jsxRuntimeExports.jsx("g",{children:Se}),t[88]=Se,t[89]=we):we=t[89];let Re;t[90]!==D?(Re=D.filter(ri).map(ai),t[90]=D,t[91]=Re):Re=t[91];let Ee;t[92]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[92]=Ee):Ee=t[92];let Ce;t[93]!==st||t[94]!==w||t[95]!==x?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:st,style:Ee,width:x,height:w}),t[93]=st,t[94]=w,t[95]=x,t[96]=Ce):Ce=t[96];let Me;return t[97]!==v?.tooltip||t[98]!==X||t[99]!==nt||t[100]!==u||t[101]!==g?.tooltip||t[102]!==ft?(Me=u&&ft&&X&&nt?i.jsxRuntimeExports.jsx(We.Tooltip,{data:u,body:ft,xPos:X,yPos:nt,backgroundStyle:g?.tooltip,className:v?.tooltip}):null,t[97]=v?.tooltip,t[98]=X,t[99]=nt,t[100]=u,t[101]=g?.tooltip,t[102]=ft,t[103]=Me):Me=t[103],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.svg,{width:`${et}px`,height:`${it}px`,viewBox:`0 0 ${et} ${it}`,direction:"ltr",ref:Wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[J,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:ee,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Ue.YTicksAndGridLines,{values:Pt.filter(xi),y:Pt.filter(ui).map(e=>r(e)),x1:0-V,x2:x+R.right,styles:lt,classNames:ut,suffix:I,prefix:p,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:L,locale:N,padZeros:S}),_,pe]}),i.jsxRuntimeExports.jsx("g",{children:oe.map((e,h)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:w,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:C.format(e,l)})},h))}),de,i.jsxRuntimeExports.jsx(k.motion.path,{style:fe,exit:he,variants:{initial:{opacity:0,d:Gt(a)||""},whileInView:{opacity:xe,d:Gt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),$t?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:j[0],fill:"none",strokeWidth:$t},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:j[1],fill:"none",strokeWidth:$t},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:q(a)||"",opacity:1},whileInView:{pathLength:1,d:q(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(k.motion.path,{style:ye,exit:ge,variants:{initial:{pathLength:0,d:Ct(a)||"",opacity:1},whileInView:{pathLength:1,d:Ct(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),u?i.jsxRuntimeExports.jsx("line",{y1:0,y2:w,x1:s(u.date),x2:s(u.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",v?.mouseOverLine),style:g?.mouseOverLine}):null,ve,zt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:zt.map((e,h)=>i.jsxRuntimeExports.jsx(Pe.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-V,x2:x+R.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},h))}):null,je,we,Re,Ce]})}),Me]})}function ai(n){return n.layer}function ri(n){return n.position==="after"}function li(n){return n.layer}function ci(n){return n.position==="before"}function ui(n){return n!==0}function xi(n){return n!==0}function mi(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function pi(n){return n.date}function di(n){return Math.max(n.y,n.yMax,n.yMin)}function fi(n){return Math.max(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return Math.min(n.y,n.yMax,n.yMin)}function gi(n){return Math.min(n.y,n.yMax,n.yMin)}function vi(n){return!G.checkIfNullOrUndefined(n.y)}function ji(n){const t=i.compilerRuntimeExports.c(106),{data:y,graphTitle:et,sources:it,graphDescription:A,height:I,width:p,footNote:l,noOfXTicks:It,dateFormat:re,showValues:le,backgroundColor:Vt,padding:V,lineColor:dt,leftMargin:Dt,rightMargin:ft,topMargin:St,bottomMargin:zt,tooltip:Nt,refValues:P,highlightAreaSettings:o,relativeHeight:qt,onSeriesMouseOver:ht,graphID:Jt,minValue:Kt,maxValue:yt,regressionLine:Tt,showIntervalDots:ce,showIntervalValues:ue,intervalLineStrokeWidth:$t,intervalLineColors:j,intervalAreaColor:Ft,intervalAreaOpacity:xe,graphDownload:gt,dataDownload:me,animate:Qt,language:_t,minHeight:vt,strokeWidth:g,showDots:v,annotations:L,customHighlightAreaSettings:D,theme:N,ariaLabel:S,yAxisTitle:Wt,noOfYTicks:jt,minDate:c,maxDate:d,colorLegendTitle:te,colorLegendColors:Y,colorLegendDomain:U,curveType:wt,styles:u,classNames:m,customLayers:X,numberDisplayOptions:f}=n,nt=It===void 0?10:It,Ht=re===void 0?"yyyy":re,Rt=le===void 0?!1:le,ot=Vt===void 0?!1:Vt,R=Dt===void 0?30:Dt,st=ft===void 0?30:ft,at=St===void 0?20:St,a=zt===void 0?25:zt;let Z;t[0]!==P?(Z=P===void 0?[]:P,t[0]=P,t[1]=Z):Z=t[1];const Et=Z;let B;t[2]!==o?(B=o===void 0?[]:o,t[2]=o,t[3]=B):B=t[3];const ee=B,x=Tt===void 0?!1:Tt,w=ce===void 0?!1:ce,ie=ue===void 0?!1:ue,ne=$t===void 0?0:$t;let E;t[4]!==j?(E=j===void 0?[ke.Colors.light.grays["gray-500"],ke.Colors.light.grays["gray-500"]]:j,t[4]=j,t[5]=E):E=t[5];const z=E,s=Ft===void 0?ke.Colors.primaryColors["blue-100"]:Ft,rt=xe===void 0?.4:xe,r=gt===void 0?!1:gt,Ct=me===void 0?!1:me,Mt=Qt===void 0?!1:Qt,q=_t===void 0?"en":_t,Gt=vt===void 0?0:vt,Pt=g===void 0?2:g,oe=v===void 0?!0:v;let Yt;t[6]!==L?(Yt=L===void 0?[]:L,t[6]=L,t[7]=Yt):Yt=t[7];const Ut=Yt;let J;t[8]!==D?(J=D===void 0?[]:D,t[8]=D,t[9]=J):J=t[9];const Ot=J,bt=N===void 0?"light":N,lt=jt===void 0?5:jt,Lt=wt===void 0?"curve":wt;let ct;t[10]!==X?(ct=X===void 0?[]:X,t[10]=X,t[11]=ct):ct=t[11];const ut=ct,[K,se]=b.useState(0),[xt,ae]=b.useState(0),kt=b.useRef(null),Q=b.useRef(null);let mt,pt;t[12]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>{const Xt=new ResizeObserver(Zt=>{se(Zt[0].target.clientWidth||620),ae(Zt[0].target.clientHeight||480)});return kt.current&&Xt.observe(kt.current),()=>Xt.disconnect()},pt=[],t[12]=mt,t[13]=pt):(mt=t[12],pt=t[13]),b.useEffect(mt,pt);const At=m?.graphContainer,T=u?.graphContainer;let $;t[14]!==m?.description||t[15]!==m?.title||t[16]!==y||t[17]!==Ct||t[18]!==A||t[19]!==r||t[20]!==et||t[21]!==u?.description||t[22]!==u?.title||t[23]!==p?($=et||A||r||Ct?i.jsxRuntimeExports.jsx(ei.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:m?.title,description:m?.description},graphTitle:et,graphDescription:A,width:p,graphDownload:r?Q:void 0,dataDownload:Ct?y.map(Mi).filter(Ci).length>0?y.map(Ei).filter(Ri):y.filter(wi):null}):null,t[14]=m?.description,t[15]=m?.title,t[16]=y,t[17]=Ct,t[18]=A,t[19]=r,t[20]=et,t[21]=u?.description,t[22]=u?.title,t[23]=p,t[24]=$):$=t[24];let F;t[25]!==m?.colorLegend||t[26]!==Y||t[27]!==U||t[28]!==te||t[29]!==y.length||t[30]!==p?(F=Y&&U&&y.length>0?i.jsxRuntimeExports.jsx(ii.ColorLegend,{width:p,colorLegendTitle:te,colors:Y,colorDomain:U,showNAColor:!1,className:m?.colorLegend}):null,t[25]=m?.colorLegend,t[26]=Y,t[27]=U,t[28]=te,t[29]=y.length,t[30]=p,t[31]=F):F=t[31];let M;t[32]!==y.length?(M=y.length===0&&i.jsxRuntimeExports.jsx(ni.EmptyState,{}),t[32]=y.length,t[33]=M):M=t[33];let W;t[34]!==Mt||t[35]!==Ut||t[36]!==a||t[37]!==m||t[38]!==Lt||t[39]!==Ot||t[40]!==ut||t[41]!==y||t[42]!==Ht||t[43]!==ee||t[44]!==s||t[45]!==rt||t[46]!==z||t[47]!==ne||t[48]!==q||t[49]!==R||t[50]!==dt||t[51]!==d||t[52]!==yt||t[53]!==c||t[54]!==Kt||t[55]!==nt||t[56]!==lt||t[57]!==f?.locale||t[58]!==f?.padZeros||t[59]!==f?.precision||t[60]!==f?.prefix||t[61]!==f?.suffix||t[62]!==ht||t[63]!==Et||t[64]!==x||t[65]!==st||t[66]!==oe||t[67]!==w||t[68]!==ie||t[69]!==Rt||t[70]!==Pt||t[71]!==u||t[72]!==xt||t[73]!==K||t[74]!==Nt||t[75]!==at||t[76]!==Wt?(W=K&&xt&&y.length>0?i.jsxRuntimeExports.jsx(si,{data:y,lineColor:dt||ke.Colors.primaryColors["blue-600"],width:K,height:xt,dateFormat:Ht,showValues:Rt,noOfXTicks:nt??oi.getNoOfTicks(K),leftMargin:R,rightMargin:st,topMargin:at,bottomMargin:a,tooltip:Nt,highlightAreaSettings:ee,onSeriesMouseOver:ht,refValues:Et,minValue:Kt,maxValue:yt,animate:Mt===!0?{duration:.5,once:!0,amount:.5}:Mt||{duration:0,once:!0,amount:0},rtl:q==="he"||q==="ar",strokeWidth:Pt,showDots:oe,annotations:Ut,customHighlightAreaSettings:Ot,regressionLine:x,showIntervalDots:w,showIntervalValues:ie,intervalLineStrokeWidth:ne,intervalLineColors:z,intervalAreaColor:s,intervalAreaOpacity:rt,yAxisTitle:Wt,noOfYTicks:lt,minDate:c,maxDate:d,curveType:Lt,styles:u,classNames:m,customLayers:ut,locale:f?.locale||"en",padZeros:f?.padZeros||!1,suffix:f?.suffix||"",prefix:f?.prefix||"",precision:f?.precision??2}):null,t[34]=Mt,t[35]=Ut,t[36]=a,t[37]=m,t[38]=Lt,t[39]=Ot,t[40]=ut,t[41]=y,t[42]=Ht,t[43]=ee,t[44]=s,t[45]=rt,t[46]=z,t[47]=ne,t[48]=q,t[49]=R,t[50]=dt,t[51]=d,t[52]=yt,t[53]=c,t[54]=Kt,t[55]=nt,t[56]=lt,t[57]=f?.locale,t[58]=f?.padZeros,t[59]=f?.precision,t[60]=f?.prefix,t[61]=f?.suffix,t[62]=ht,t[63]=Et,t[64]=x,t[65]=st,t[66]=oe,t[67]=w,t[68]=ie,t[69]=Rt,t[70]=Pt,t[71]=u,t[72]=xt,t[73]=K,t[74]=Nt,t[75]=at,t[76]=Wt,t[77]=W):W=t[77];let H;t[78]!==M||t[79]!==W?(H=i.jsxRuntimeExports.jsxs(Te.GraphArea,{ref:kt,children:[M,W]}),t[78]=M,t[79]=W,t[80]=H):H=t[80];let O;t[81]!==m?.footnote||t[82]!==m?.source||t[83]!==l||t[84]!==it||t[85]!==u?.footnote||t[86]!==u?.source||t[87]!==p?(O=it||l?i.jsxRuntimeExports.jsx(ti.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:it,footNote:l,width:p}):null,t[81]=m?.footnote,t[82]=m?.source,t[83]=l,t[84]=it,t[85]=u?.footnote,t[86]=u?.source,t[87]=p,t[88]=O):O=t[88];let _;return t[89]!==S||t[90]!==ot||t[91]!==Jt||t[92]!==I||t[93]!==q||t[94]!==Gt||t[95]!==V||t[96]!==qt||t[97]!==At||t[98]!==T||t[99]!==$||t[100]!==F||t[101]!==H||t[102]!==O||t[103]!==bt||t[104]!==p?(_=i.jsxRuntimeExports.jsxs(Te.GraphContainer,{className:At,style:T,id:Jt,ref:Q,"aria-label":S,backgroundColor:ot,theme:bt,language:q,minHeight:Gt,width:p,height:I,relativeHeight:qt,padding:V,children:[$,F,H,O]}),t[89]=S,t[90]=ot,t[91]=Jt,t[92]=I,t[93]=q,t[94]=Gt,t[95]=V,t[96]=qt,t[97]=At,t[98]=T,t[99]=$,t[100]=F,t[101]=H,t[102]=O,t[103]=bt,t[104]=p,t[105]=_):_=t[105],_}function wi(n){return n!==void 0}function Ri(n){return n!==void 0}function Ei(n){return n.data}function Ci(n){return n!==void 0}function Mi(n){return n.data}exports.LineChartWithConfidenceInterval=ji;
|
|
2
2
|
//# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
|