@undp/data-viz 2.2.2 → 2.3.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.
Files changed (123) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/Axis-D56Gy0se.js +31 -0
  4. package/dist/Axis-D56Gy0se.js.map +1 -0
  5. package/dist/Axis-Jt_tmhxS.cjs +2 -0
  6. package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
  7. package/dist/BarGraph.cjs +1 -1
  8. package/dist/BarGraph.cjs.map +1 -1
  9. package/dist/BarGraph.d.ts +6 -0
  10. package/dist/BarGraph.js +1759 -1750
  11. package/dist/BarGraph.js.map +1 -1
  12. package/dist/BeeSwarmChart.cjs +1 -1
  13. package/dist/BeeSwarmChart.cjs.map +1 -1
  14. package/dist/BeeSwarmChart.d.ts +2 -0
  15. package/dist/BeeSwarmChart.js +270 -267
  16. package/dist/BeeSwarmChart.js.map +1 -1
  17. package/dist/BiVariateChoroplethMap.cjs +1 -1
  18. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  19. package/dist/BiVariateChoroplethMap.d.ts +4 -0
  20. package/dist/BiVariateChoroplethMap.js +328 -401
  21. package/dist/BiVariateChoroplethMap.js.map +1 -1
  22. package/dist/BulletChart.cjs +1 -1
  23. package/dist/BulletChart.cjs.map +1 -1
  24. package/dist/BulletChart.d.ts +2 -0
  25. package/dist/BulletChart.js +544 -542
  26. package/dist/BulletChart.js.map +1 -1
  27. package/dist/ButterflyChart.cjs +1 -1
  28. package/dist/ButterflyChart.cjs.map +1 -1
  29. package/dist/ButterflyChart.d.ts +2 -0
  30. package/dist/ButterflyChart.js +332 -330
  31. package/dist/ButterflyChart.js.map +1 -1
  32. package/dist/ChoroplethMap.cjs +1 -1
  33. package/dist/ChoroplethMap.cjs.map +1 -1
  34. package/dist/ChoroplethMap.d.ts +4 -0
  35. package/dist/ChoroplethMap.js +341 -416
  36. package/dist/ChoroplethMap.js.map +1 -1
  37. package/dist/Data/01.json +4042 -0
  38. package/dist/Data/mapData.json +4543 -0
  39. package/dist/Data/testMap.json +361 -0
  40. package/dist/DifferenceLineChart.cjs +1 -1
  41. package/dist/DifferenceLineChart.js +1 -1
  42. package/dist/DotDensityMap.cjs +1 -1
  43. package/dist/DotDensityMap.cjs.map +1 -1
  44. package/dist/DotDensityMap.d.ts +4 -0
  45. package/dist/DotDensityMap.js +297 -311
  46. package/dist/DotDensityMap.js.map +1 -1
  47. package/dist/DualAxisLineChart.cjs +1 -1
  48. package/dist/DualAxisLineChart.js +1 -1
  49. package/dist/DumbbellChart.cjs +1 -1
  50. package/dist/DumbbellChart.cjs.map +1 -1
  51. package/dist/DumbbellChart.d.ts +2 -0
  52. package/dist/DumbbellChart.js +537 -536
  53. package/dist/DumbbellChart.js.map +1 -1
  54. package/dist/{GraphEl-DcNr5JzH.js → GraphEl-L5hNe7wJ.js} +84 -67
  55. package/dist/GraphEl-L5hNe7wJ.js.map +1 -0
  56. package/dist/GraphEl-ic8C5Ksc.cjs +2 -0
  57. package/dist/GraphEl-ic8C5Ksc.cjs.map +1 -0
  58. package/dist/GriddedGraphs.cjs +1 -1
  59. package/dist/GriddedGraphs.d.ts +3 -0
  60. package/dist/GriddedGraphs.js +1 -1
  61. package/dist/GriddedGraphsFromConfig.d.ts +3 -0
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.cjs.map +1 -1
  64. package/dist/Histogram.d.ts +2 -0
  65. package/dist/Histogram.js +50 -49
  66. package/dist/Histogram.js.map +1 -1
  67. package/dist/HybridMap.cjs +1 -1
  68. package/dist/HybridMap.cjs.map +1 -1
  69. package/dist/HybridMap.d.ts +4 -0
  70. package/dist/HybridMap.js +368 -418
  71. package/dist/HybridMap.js.map +1 -1
  72. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  73. package/dist/LineChartWithConfidenceInterval.js +1 -1
  74. package/dist/MultiGraphDashboard.d.ts +3 -0
  75. package/dist/MultiGraphDashboardFromConfig.d.ts +3 -0
  76. package/dist/MultiLineAltChart.cjs +1 -1
  77. package/dist/MultiLineAltChart.js +1 -1
  78. package/dist/MultiLineChart.cjs +1 -1
  79. package/dist/MultiLineChart.js +1 -1
  80. package/dist/ParetoChart.cjs +1 -1
  81. package/dist/ParetoChart.js +1 -1
  82. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +3 -0
  83. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +3 -0
  84. package/dist/PerformanceIntensiveScrollStory.d.ts +3 -0
  85. package/dist/ScatterPlot.cjs +1 -1
  86. package/dist/ScatterPlot.js +1 -1
  87. package/dist/ScrollStory.d.ts +3 -0
  88. package/dist/SimpleLineChart.cjs +1 -1
  89. package/dist/SimpleLineChart.js +1 -1
  90. package/dist/SingleGraphDashboard.cjs +1 -1
  91. package/dist/SingleGraphDashboard.d.ts +3 -0
  92. package/dist/SingleGraphDashboard.js +1 -1
  93. package/dist/SingleGraphDashboardFromConfig.d.ts +3 -0
  94. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +3 -0
  95. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +3 -0
  96. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +3 -0
  97. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +3 -0
  98. package/dist/SlopeChart.cjs +1 -1
  99. package/dist/SlopeChart.js +1 -1
  100. package/dist/Types.d.ts +3 -0
  101. package/dist/WaterfallChart.cjs +1 -1
  102. package/dist/WaterfallChart.cjs.map +1 -1
  103. package/dist/WaterfallChart.d.ts +2 -0
  104. package/dist/WaterfallChart.js +263 -261
  105. package/dist/WaterfallChart.js.map +1 -1
  106. package/dist/index-DLFt97gy.cjs +2 -0
  107. package/dist/index-DLFt97gy.cjs.map +1 -0
  108. package/dist/index-Dp_SfsUA.js +2344 -0
  109. package/dist/index-Dp_SfsUA.js.map +1 -0
  110. package/dist/index.d.ts +37 -0
  111. package/package.json +2 -1
  112. package/readme.md +0 -7
  113. package/dist/Axis-DoOqnt6g.js +0 -32
  114. package/dist/Axis-DoOqnt6g.js.map +0 -1
  115. package/dist/Axis-Dtjn-EgM.cjs +0 -2
  116. package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
  117. package/dist/GraphEl-CAjJLOGk.cjs +0 -2
  118. package/dist/GraphEl-CAjJLOGk.cjs.map +0 -1
  119. package/dist/GraphEl-DcNr5JzH.js.map +0 -1
  120. package/dist/zoom-5AkJSuWO.js +0 -1864
  121. package/dist/zoom-5AkJSuWO.js.map +0 -1
  122. package/dist/zoom-ChcvXFIz.cjs +0 -2
  123. package/dist/zoom-ChcvXFIz.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n } = props;\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\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 zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\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({\r\n ...mapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? mapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : mapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...mapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? mapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : mapData.features,\r\n });\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\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([0, 0])\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([0, 0])\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([0, 0])\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([0, 0])\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([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\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\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\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 {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) 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.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </motion.g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.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 const xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n key={d.id}\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.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -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 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 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 >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n d={masterPath}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\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 border text-primary-gray-700 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 border text-primary-gray-700 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 {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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\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 /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\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 /** 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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** 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 /** Toggle visibility of color scale. */\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 /** 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 /** 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 BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\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 mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\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,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(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);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [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\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === 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(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\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 collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","findIndex","el","id","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","timeline","t26","t27","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t28","t29","t30","t31","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t32","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t33","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t34","shape","onUpdateShape","useEffectEvent","t35","fetchAndParseJSON","then","d_1","t36","t37","t38","speed","interval","setInterval","clearInterval","t39","t40","getSliderMarks","markObj","console","error","t41","graphContainer","t42","t43","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t44","Pause","Play","SliderUI","nextValue","nextValue_0","t45","GraphArea","d_7","format","_temp8","getJenks","_temp9","_temp0","Spinner","t46","footnote","source","GraphFooter","t47","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,iBAAAA;AAAA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/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\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 { scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n mapData: FeatureCollection;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\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 zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\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 showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\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 [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\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 zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\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({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\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\r\n const pathGenerator = geoPath().projection(projection);\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\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\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\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.length !== 0\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 }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.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 xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n key={d.id}\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.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -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 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 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 >\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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n ))\r\n : null}\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={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\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 border text-primary-gray-700 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 border text-primary-gray-700 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 {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 {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 </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useMemo, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\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 /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\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 /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\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 /** 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 /** Toggle visibility of color scale. */\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 /** 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 /** 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 BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\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 xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\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 mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\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 timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds = false,\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(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);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [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\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === 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(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\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 collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","formattedMapData","useMemo","rewind","reverse","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","pathGenerator","geoPath","xRange","Array","from","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","path","stroke","strokeWidth","fill","AnimatePresence","index","findIndex","el","id","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","j","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","Tooltip","DetailsModal","modal","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","t26","timeline","t27","t28","t29","t30","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t31","t32","t33","t34","enabled","autoplay","showOnlyActiveDate","t35","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t36","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_1","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","console","error","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_7","format","_temp8","getJenks","_temp9","_temp0","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","a","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC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EAAEnD,WAAWiP,SAAU;AAAY;AAhN/D,SAAAxB,GAAAyB,GAAA;AAAA,SA+J4BrP,MAAM9C;AAAS;AA/J3C,SAAAyQ,GAAA2B,GAAA;AAAA,SA8J6CtP,MAAM9C;AAAS;AA9J5D,SAAAwQ,GAAA6B,GAAA;AAAA,SA8JyBvP,EAACxF;AAAK;AA9J/B,SAAAiT,GAAA+B,GAAA;AAAA,SA6J2CxP,MAAM9C;AAAS;AA7J1D,SAAAsQ,GAAAiC,GAAA;AAAA,SA6JuBzP,EAACxF;AAAK;AA7J7B,SAAAkQ,GAAAgF,GAAAC,GAAA;AAAA,SAmEkBD,IAAIC;AAAC;AAnEvB,SAAAnF,GAAAxK,GAAA;AAAA,SA+DgBA,EAACoK;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),F=require("react"),Xe=require("./index-Cno4Q0YE.cjs"),Ve=require("./parse-xYI9yrvL.cjs"),Ce=require("./getSliderMarks-CIuSoedo.cjs"),Se=require("./index-DQA8q5sC.cjs"),Oe=require("./index-CSNtgibC.cjs"),Ee=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-BLa2EfMs.cjs"),b=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./Axis-Dtjn-EgM.cjs"),Te=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./XAxesLabels-C6o9jJal.cjs"),Fe=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Je=require("./XTicksAndGridLines-CekrPykD.cjs"),Ke=require("./YAxesLabels-BQ2aCazV.cjs"),Ue=require("./DetailsModal-DHttOA80.cjs"),Be=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),kt=require("./proxy-C4-uo6nS.cjs"),Ge=require("./use-in-view-C3o_ntMv.cjs"),We=require("./index-CoobIWNj.cjs"),Ne=require("./Colors.cjs"),Qe=require("./EmptyState-CGeBqbmR.cjs"),ze=require("./GraphContainer-B1EDxJ0S.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),ti=require("./ColorLegend.cjs"),qe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./index-C6er0ety.cjs");function ei(e){const t=a.compilerRuntimeExports.c(160),{data:i,width:Rt,height:se,barColor:Wt,suffix:Ot,prefix:N,barPadding:Xt,showLabels:Yt,showValues:le,showTicks:fe,truncateBy:re,leftMargin:he,rightMargin:Ht,topMargin:oe,bottomMargin:ve,tooltip:ht,onSeriesMouseOver:pt,refValues:It,maxValue:v,minValue:gt,highlightedDataPoints:tt,onSeriesMouseClick:ut,labelOrder:A,maxBarThickness:Jt,minBarThickness:Nt,resetSelectionOnDoubleClick:Kt,detailsOnClick:ct,barAxisTitle:U,valueColor:et,noOfTicks:Vt,styles:p,classNames:l,targetStyle:d,targetColor:B,qualitativeRangeColors:it,measureBarWidthFactor:y,animate:o,dimmedOpacity:m,precision:xt,customLayers:nt,naLabel:V,targetLineThickness:ue}=e,P=he===void 0?20:he,Qt=Ht===void 0?20:Ht,pe=oe===void 0?20:oe,Zt=ve===void 0?25:ve,we=F.useRef(null);let ge;t[0]!==o.amount||t[1]!==o.once?(ge={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=ge):ge=t[2];const E=Ge.useInView(we,ge),G=U?P+30:P;let _t;t[3]!==Zt||t[4]!==Qt||t[5]!==G||t[6]!==pe?(_t={top:pe,bottom:Zt,left:G,right:Qt},t[3]=Zt,t[4]=Qt,t[5]=G,t[6]=pe,t[7]=_t):_t=t[7];const g=_t,[at,ye]=F.useState(void 0),[st,yt]=F.useState(void 0),[Et,ce]=F.useState(void 0),[xe,te]=F.useState(void 0),f=Rt-g.left-g.right,Ct=se-g.top-g.bottom;let lt;t[8]!==i?(lt=Math.max(...i.filter(Oi).map(Ri))<0?0:Math.max(...i.filter(ki).map(Ai)),t[8]=i,t[9]=lt):lt=t[9];const bt=lt;let zt;t[10]!==i?(zt=Math.max(...i.filter(Mi).map(ji))<0?0:Math.max(...i.filter(wi).map(vi)),t[10]=i,t[11]=zt):zt=t[11];const qt=zt;let Lt;t[12]!==i?(Lt=Math.max(...i.map(yi)),t[12]=i,t[13]=Lt):Lt=t[13];const St=Lt;let $t;t[14]!==bt||t[15]!==v||t[16]!==St||t[17]!==qt?($t=b.checkIfNullOrUndefined(v)?Math.max(...[bt,qt,St].filter(Number.isFinite))<0?0:Math.max(...[bt,qt,St].filter(Number.isFinite)):v,t[14]=bt,t[15]=v,t[16]=St,t[17]=qt,t[18]=$t):$t=t[18];const Dt=$t;let ee;t[19]!==i?(ee=Math.min(...i.filter(gi).map(pi))>=0?0:Math.min(...i.filter(hi).map(fi)),t[19]=i,t[20]=ee):ee=t[20];const Tt=ee;let Ft;t[21]!==i?(Ft=Math.min(...i.filter(di).map(mi))>=0?0:Math.min(...i.filter(xi).map(ci)),t[21]=i,t[22]=Ft):Ft=t[22];const Ut=Ft;let vt;t[23]!==Tt||t[24]!==gt||t[25]!==Ut?(vt=b.checkIfNullOrUndefined(gt)?Math.min(...[Tt,Ut].filter(Number.isFinite))>=0?0:Math.min(...[Tt,Ut].filter(Number.isFinite)):gt,t[23]=Tt,t[24]=gt,t[25]=Ut,t[26]=vt):vt=t[26];const O=vt;let C;if(t[27]!==i||t[28]!==A){const c=new Set,s=i.map((R,jt)=>{const D=A?`${R.label}`:`${jt}`;return c.add(D),{...R,id:D}}),k=A?A.filter(R=>!c.has(R)):[];C=[...s,...k.map(ui)],t[27]=i,t[28]=A,t[29]=C}else C=t[29];const mt=C;let rt;t[30]!==mt||t[31]!==A?(rt=A??mt.map(oi),t[30]=mt,t[31]=A,t[32]=rt):rt=t[32];const wt=rt;let ot,z,W,X,q,Y,H,M,I,w,j,J,K,Q;if(t[33]!==o||t[34]!==U||t[35]!==Wt||t[36]!==wt||t[37]!==Xt||t[38]!==l?.graphObjectValues||t[39]!==l?.xAxis?.axis||t[40]!==l?.xAxis?.labels||t[41]!==l?.yAxis?.gridLines||t[42]!==l?.yAxis?.labels||t[43]!==l?.yAxis?.title||t[44]!==nt||t[45]!==mt||t[46]!==ct||t[47]!==m||t[48]!==Ct||t[49]!==f||t[50]!==se||t[51]!==tt||t[52]!==E||t[53]!==P||t[54]!==g.bottom||t[55]!==g.left||t[56]!==g.right||t[57]!==g.top||t[58]!==Jt||t[59]!==y||t[60]!==Nt||t[61]!==st||t[62]!==V||t[63]!==Vt||t[64]!==ut||t[65]!==pt||t[66]!==xt||t[67]!==N||t[68]!==it||t[69]!==It||t[70]!==Kt||t[71]!==Yt||t[72]!==fe||t[73]!==le||t[74]!==p?.graphObjectValues||t[75]!==p?.xAxis?.axis||t[76]!==p?.xAxis?.labels||t[77]!==p?.yAxis?.gridLines||t[78]!==p?.yAxis?.labels||t[79]!==p?.yAxis?.title||t[80]!==Ot||t[81]!==B||t[82]!==ue||t[83]!==d||t[84]!==re||t[85]!==et||t[86]!==Rt||t[87]!==Dt||t[88]!==O){const c=Be.linear().domain([O,Dt]).range([Ct,0]).nice(),s=Pe.band().domain(wt).range([0,Nt?Math.max(f,Nt*wt.length):Jt?Math.min(f,Jt*wt.length):f]).paddingInner(Xt),k=c.ticks(Vt);z=kt.motion.svg,w=`${Rt}px`,j=`${se}px`,J=`0 0 ${Rt} ${se}`,K="ltr",Q=we,q=`translate(${g.left},${g.top})`;const R=c(O<0?0:O),jt=c(O<0?0:O),D=O<0?0:O;let x;t[103]!==V||t[104]!==xt||t[105]!==N||t[106]!==Ot||t[107]!==D?(x=Ee.numberFormattingFunction(D,V,xt,N,Ot),t[103]=V,t[104]=xt,t[105]=N,t[106]=Ot,t[107]=D,t[108]=x):x=t[108];const T=l?.xAxis?.axis,me=l?.yAxis?.labels;let Mt;t[109]!==T||t[110]!==me?(Mt={axis:T,label:me},t[109]=T,t[110]=me,t[111]=Mt):Mt=t[111];const ie=p?.xAxis?.axis,Pt=p?.yAxis?.labels;let n;t[112]!==ie||t[113]!==Pt?(n={axis:ie,label:Pt},t[112]=ie,t[113]=Pt,t[114]=n):n=t[114],Y=a.jsxRuntimeExports.jsx(De.Axis,{y1:R,y2:jt,x1:0-P,x2:f+g.right,label:x,labelPos:{x:0-P,dx:0,dy:Dt<0?"1em":-5,y:c(O<0?0:O)},classNames:Mt,styles:n}),H=fe?a.jsxRuntimeExports.jsx(He.YTicksAndGridLines,{values:k.filter(ri),y:k.filter(li).map(r=>c(r)),x1:0-P,x2:f+g.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:l?.yAxis?.gridLines,labels:l?.yAxis?.labels},suffix:Ot,prefix:N,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:xt}):null;const _=0-P-15,At=Ct/2,be=p?.yAxis?.title,je=l?.yAxis?.title;t[115]!==U||t[116]!==_||t[117]!==At||t[118]!==be||t[119]!==je?(M=a.jsxRuntimeExports.jsx(Te.AxisTitle,{x:_,y:At,style:be,className:je,text:U,rotate90:!0}),t[115]=U,t[116]=_,t[117]=At,t[118]=be,t[119]=je,t[120]=M):M=t[120],t[121]!==nt?(I=nt.filter(si).map(ai),t[121]=nt,t[122]=I):I=t[122],ot=We.AnimatePresence,W=mt.map(r=>b.checkIfNullOrUndefined(s(r.id))?null:a.jsxRuntimeExports.jsxs(kt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:ft=>{ye(r),te(ft.clientY),ce(ft.clientX),pt?.(r)},onClick:()=>{(ut||ct)&&(Se.isEqual(st,r)&&Kt?(yt(void 0),ut?.(void 0)):(yt(r),ut?.(r)))},onMouseMove:ft=>{ye(r),te(ft.clientY),ce(ft.clientX)},onMouseLeave:()=>{ye(void 0),ce(void 0),te(void 0),pt?.(void 0)},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{x:s(`${r.id}`),y:0,opacity:tt.length!==0?tt.indexOf(r.label)!==-1?.85:m:.85},whileInView:{x:s(`${r.id}`),y:0,opacity:tt.length!==0?tt.indexOf(r.label)!==-1?.85:m:.85,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",children:[r.qualitativeRange?r.qualitativeRange.map((ft,Gt)=>a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0),fill:it[Gt]},whileInView:{height:Math.abs(c(Oe.sum(r.qualitativeRange.filter((ne,ae)=>ae<=Gt&&ne)))-c(Oe.sum(r.qualitativeRange.filter((ne,ae)=>ae<Gt&&ne)))),y:c(Oe.sum(r.qualitativeRange.filter((ne,ae)=>ae<=Gt&&ne))),fill:it[Gt],transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",width:s.bandwidth()},Gt)):null,r.target&&d==="background"?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,width:s.bandwidth(),exit:{height:0,y:c(0),fill:B,transition:{duration:o.duration}},variants:{initial:{height:0,fill:B,y:c(0)},whileInView:{height:Math.abs(c(r.target)-c(0)),fill:B,y:r.target>0?c(r.target):c(0),transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial"}):null,r.size?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:s.bandwidth()*((1-y)/2),width:s.bandwidth()*y,style:{fill:Wt},exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0)},whileInView:{height:Math.abs(c(r.size)-c(0)),y:r.size>0?c(r.size):c(0),transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial"}):null,r.target&&d==="line"?a.jsxRuntimeExports.jsx(kt.motion.rect,{x:0,width:s.bandwidth(),exit:{y:c(0),opacity:0,fill:B,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:B},whileInView:{y:c(r.target)-ue/2,opacity:1,fill:B,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",height:ue}):null,Yt?a.jsxRuntimeExports.jsx(Ye.XAxesLabels,{value:`${r.label}`.length<re?`${r.label}`:`${`${r.label}`.substring(0,re)}...`,y:(r.size||0)<0?0:c(0)+5,x:0,width:s.bandwidth(),height:(r.size||0)<0?c(0)-5:g.bottom,style:p?.xAxis?.labels,className:l?.xAxis?.labels,alignment:(r.size||0)<0?"bottom":"top",animate:o,isInView:E}):null,le?a.jsxRuntimeExports.jsx(kt.motion.text,{x:s.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!et&&Wt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",l?.graphObjectValues),dy:r.size?r.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:et||Wt},whileInView:{y:c(r.size||0),opacity:1,fill:et||Wt,transition:{duration:o.duration}}},initial:"initial",animate:E?"whileInView":"initial",children:Ee.numberFormattingFunction(r.size,V,xt,N,Ot)}):null]},r.label)),X=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((r,ft)=>a.jsxRuntimeExports.jsx(Fe.RefLineY,{text:r.text,color:r.color,y:c(r.value),x1:0-P,x2:f+g.right,classNames:r.classNames,styles:r.styles,animate:o,isInView:E},ft))}):null,t[33]=o,t[34]=U,t[35]=Wt,t[36]=wt,t[37]=Xt,t[38]=l?.graphObjectValues,t[39]=l?.xAxis?.axis,t[40]=l?.xAxis?.labels,t[41]=l?.yAxis?.gridLines,t[42]=l?.yAxis?.labels,t[43]=l?.yAxis?.title,t[44]=nt,t[45]=mt,t[46]=ct,t[47]=m,t[48]=Ct,t[49]=f,t[50]=se,t[51]=tt,t[52]=E,t[53]=P,t[54]=g.bottom,t[55]=g.left,t[56]=g.right,t[57]=g.top,t[58]=Jt,t[59]=y,t[60]=Nt,t[61]=st,t[62]=V,t[63]=Vt,t[64]=ut,t[65]=pt,t[66]=xt,t[67]=N,t[68]=it,t[69]=It,t[70]=Kt,t[71]=Yt,t[72]=fe,t[73]=le,t[74]=p?.graphObjectValues,t[75]=p?.xAxis?.axis,t[76]=p?.xAxis?.labels,t[77]=p?.yAxis?.gridLines,t[78]=p?.yAxis?.labels,t[79]=p?.yAxis?.title,t[80]=Ot,t[81]=B,t[82]=ue,t[83]=d,t[84]=re,t[85]=et,t[86]=Rt,t[87]=Dt,t[88]=O,t[89]=ot,t[90]=z,t[91]=W,t[92]=X,t[93]=q,t[94]=Y,t[95]=H,t[96]=M,t[97]=I,t[98]=w,t[99]=j,t[100]=J,t[101]=K,t[102]=Q}else ot=t[89],z=t[90],W=t[91],X=t[92],q=t[93],Y=t[94],H=t[95],M=t[96],I=t[97],w=t[98],j=t[99],J=t[100],K=t[101],Q=t[102];let Z;t[123]!==ot||t[124]!==W||t[125]!==X?(Z=a.jsxRuntimeExports.jsxs(ot,{children:[W,X]}),t[123]=ot,t[124]=W,t[125]=X,t[126]=Z):Z=t[126];let L;t[127]!==nt?(L=nt.filter(ni).map(ii),t[127]=nt,t[128]=L):L=t[128];let u;t[129]!==q||t[130]!==Y||t[131]!==H||t[132]!==M||t[133]!==I||t[134]!==Z||t[135]!==L?(u=a.jsxRuntimeExports.jsxs("g",{transform:q,children:[Y,H,M,I,Z,L]}),t[129]=q,t[130]=Y,t[131]=H,t[132]=M,t[133]=I,t[134]=Z,t[135]=L,t[136]=u):u=t[136];let S;t[137]!==z||t[138]!==w||t[139]!==j||t[140]!==J||t[141]!==K||t[142]!==Q||t[143]!==u?(S=a.jsxRuntimeExports.jsx(z,{width:w,height:j,viewBox:J,direction:K,ref:Q,children:u}),t[137]=z,t[138]=w,t[139]=j,t[140]=J,t[141]=K,t[142]=Q,t[143]=u,t[144]=S):S=t[144];let dt;t[145]!==l?.tooltip||t[146]!==Et||t[147]!==xe||t[148]!==at||t[149]!==p?.tooltip||t[150]!==ht?(dt=at&&ht&&Et&&xe?a.jsxRuntimeExports.jsx($e.Tooltip,{data:at,body:ht,xPos:Et,yPos:xe,backgroundStyle:p?.tooltip,className:l?.tooltip}):null,t[145]=l?.tooltip,t[146]=Et,t[147]=xe,t[148]=at,t[149]=p?.tooltip,t[150]=ht,t[151]=dt):dt=t[151];let $;t[152]!==l?.modal||t[153]!==ct||t[154]!==st?($=ct&&st!==void 0?a.jsxRuntimeExports.jsx(Ue.DetailsModal,{body:ct,data:st,setData:yt,className:l?.modal}):null,t[152]=l?.modal,t[153]=ct,t[154]=st,t[155]=$):$=t[155];let Bt;return t[156]!==S||t[157]!==dt||t[158]!==$?(Bt=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[S,dt,$]}),t[156]=S,t[157]=dt,t[158]=$,t[159]=Bt):Bt=t[159],Bt}function ii(e){return e.layer}function ni(e){return e.position==="after"}function ai(e){return e.layer}function si(e){return e.position==="before"}function li(e){return e!==0}function ri(e){return e!==0}function oi(e){return`${e.id}`}function ui(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function ci(e){return e.target}function xi(e){return!b.checkIfNullOrUndefined(e.target)}function mi(e){return e.target}function di(e){return!b.checkIfNullOrUndefined(e.target)}function fi(e){return e.size}function hi(e){return!b.checkIfNullOrUndefined(e.size)}function pi(e){return e.size}function gi(e){return!b.checkIfNullOrUndefined(e.size)}function yi(e){return Oe.sum((e.qualitativeRange||[]).filter(bi))||0}function bi(e){return!b.checkIfNullOrUndefined(e)}function vi(e){return e.target}function wi(e){return!b.checkIfNullOrUndefined(e.size)}function ji(e){return e.target}function Mi(e){return!b.checkIfNullOrUndefined(e.target)}function Ai(e){return e.size}function ki(e){return!b.checkIfNullOrUndefined(e.size)}function Ri(e){return e.size}function Oi(e){return!b.checkIfNullOrUndefined(e.size)}function Ii(e){const t=a.compilerRuntimeExports.c(152),{data:i,topMargin:Rt,bottomMargin:se,leftMargin:Wt,rightMargin:Ot,barColor:N,suffix:Xt,prefix:Yt,barPadding:le,showValues:fe,showTicks:re,truncateBy:he,width:Ht,height:oe,showLabels:ve,tooltip:ht,onSeriesMouseOver:pt,refValues:It,highlightedDataPoints:v,maxValue:gt,minValue:tt,onSeriesMouseClick:ut,labelOrder:A,rtl:Jt,maxBarThickness:Nt,minBarThickness:Kt,resetSelectionOnDoubleClick:ct,detailsOnClick:U,barAxisTitle:et,valueColor:Vt,noOfTicks:p,styles:l,classNames:d,targetStyle:B,targetColor:it,qualitativeRangeColors:y,measureBarWidthFactor:o,animate:m,dimmedOpacity:xt,precision:nt,customLayers:V,naLabel:ue,targetLineThickness:P}=e,Qt=Rt===void 0?25:Rt,pe=se===void 0?10:se,Zt=Wt===void 0?100:Wt,we=Ot===void 0?40:Ot,ge=F.useRef(null);let E;t[0]!==m.amount||t[1]!==m.once?(E={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=E):E=t[2];const G=Ge.useInView(ge,E),[_t,g]=F.useState(void 0),[at,ye]=F.useState(void 0),[st,yt]=F.useState(void 0),[Et,ce]=F.useState(void 0),xe=et?Qt+25:Qt;let te;t[3]!==pe||t[4]!==Zt||t[5]!==we||t[6]!==xe?(te={top:xe,bottom:pe,left:Zt,right:we},t[3]=pe,t[4]=Zt,t[5]=we,t[6]=xe,t[7]=te):te=t[7];const f=te,Ct=Ht-f.left-f.right,lt=oe-f.top-f.bottom;let bt;t[8]!==i?(bt=Math.max(...i.filter(tn).map(_i))<0?0:Math.max(...i.filter(Zi).map(Qi)),t[8]=i,t[9]=bt):bt=t[9];const zt=bt;let qt;t[10]!==i?(qt=Math.max(...i.filter(Ki).map(Ji))<0?0:Math.max(...i.filter(Hi).map(Yi)),t[10]=i,t[11]=qt):qt=t[11];const Lt=qt;let St;t[12]!==i?(St=Math.max(...i.map(Wi)),t[12]=i,t[13]=St):St=t[13];const $t=St;let Dt;t[14]!==zt||t[15]!==gt||t[16]!==$t||t[17]!==Lt?(Dt=b.checkIfNullOrUndefined(gt)?Math.max(...[zt,Lt,$t].filter(Number.isFinite))<0?0:Math.max(...[zt,Lt,$t].filter(Number.isFinite)):gt,t[14]=zt,t[15]=gt,t[16]=$t,t[17]=Lt,t[18]=Dt):Dt=t[18];const ee=Dt;let Tt;t[19]!==i?(Tt=Math.min(...i.filter(Gi).map(Pi))>=0?0:Math.min(...i.filter(Bi).map(Ui)),t[19]=i,t[20]=Tt):Tt=t[20];const Ft=Tt;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(Fi).map(Ti))>=0?0:Math.min(...i.filter(Di).map($i)),t[21]=i,t[22]=Ut):Ut=t[22];const vt=Ut;let O;t[23]!==Ft||t[24]!==tt||t[25]!==vt?(O=b.checkIfNullOrUndefined(tt)?Math.min(...[Ft,vt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,vt].filter(Number.isFinite)):tt,t[23]=Ft,t[24]=tt,t[25]=vt,t[26]=O):O=t[26];const C=O;let mt;if(t[27]!==i||t[28]!==A){const s=new Set,k=i.map((jt,D)=>{const x=A?`${jt.label}`:`${D}`;return s.add(x),{...jt,id:x}}),R=A?A.filter(jt=>!s.has(jt)):[];mt=[...k,...R.map(Si)],t[27]=i,t[28]=A,t[29]=mt}else mt=t[29];const rt=mt;let wt;t[30]!==rt||t[31]!==A?(wt=A??rt.map(Li),t[30]=rt,t[31]=A,t[32]=wt):wt=t[32];const ot=wt;let z,W,X,q,Y,H,M,I,w,j,J,K,Q,Z;if(t[33]!==m||t[34]!==et||t[35]!==N||t[36]!==ot||t[37]!==le||t[38]!==d?.graphObjectValues||t[39]!==d?.xAxis?.gridLines||t[40]!==d?.xAxis?.labels||t[41]!==d?.xAxis?.title||t[42]!==d?.yAxis?.axis||t[43]!==d?.yAxis?.labels||t[44]!==V||t[45]!==rt||t[46]!==U||t[47]!==xt||t[48]!==lt||t[49]!==Ct||t[50]!==oe||t[51]!==v||t[52]!==G||t[53]!==f.bottom||t[54]!==f.left||t[55]!==f.top||t[56]!==Nt||t[57]!==o||t[58]!==Kt||t[59]!==at||t[60]!==ue||t[61]!==p||t[62]!==ut||t[63]!==pt||t[64]!==nt||t[65]!==Yt||t[66]!==y||t[67]!==It||t[68]!==ct||t[69]!==Jt||t[70]!==ve||t[71]!==re||t[72]!==fe||t[73]!==l?.graphObjectValues||t[74]!==l?.xAxis?.gridLines||t[75]!==l?.xAxis?.labels||t[76]!==l?.xAxis?.title||t[77]!==l?.yAxis?.axis||t[78]!==l?.yAxis?.labels||t[79]!==Xt||t[80]!==it||t[81]!==P||t[82]!==B||t[83]!==Qt||t[84]!==he||t[85]!==Vt||t[86]!==Ht||t[87]!==ee||t[88]!==C){const s=Be.linear().domain([C,ee]).range([0,Ct]).nice(),k=Pe.band().domain(ot).range([0,Kt?Math.max(lt,Kt*ot.length):Nt?Math.min(lt,Nt*ot.length):lt]).paddingInner(le),R=s.ticks(p);W=kt.motion.svg,j=`${Ht}px`,J=`${oe}px`,K=`0 0 ${Ht} ${oe}`,Q="ltr",Z=ge,Y=`translate(${f.left},${f.top})`,H=re?a.jsxRuntimeExports.jsx(Je.XTicksAndGridLines,{values:R.filter(qi),x:R.filter(zi).map(n=>s(n)),y1:0-Qt,y2:lt+f.bottom,styles:{gridLines:l?.xAxis?.gridLines,labels:l?.xAxis?.labels},classNames:{gridLines:d?.xAxis?.gridLines,labels:d?.xAxis?.labels},suffix:Xt,prefix:Yt,labelType:"secondary",showGridLines:!0,precision:nt}):null;const jt=Ct/2,D=0-f.top+15,x=l?.xAxis?.title,T=d?.xAxis?.title;t[103]!==et||t[104]!==jt||t[105]!==D||t[106]!==x||t[107]!==T?(M=a.jsxRuntimeExports.jsx(Te.AxisTitle,{x:jt,y:D,style:x,className:T,text:et}),t[103]=et,t[104]=jt,t[105]=D,t[106]=x,t[107]=T,t[108]=M):M=t[108];const me=d?.yAxis?.axis;let Mt;t[109]!==me?(Mt={axis:me},t[109]=me,t[110]=Mt):Mt=t[110];const ie=l?.yAxis?.axis;let Pt;t[111]!==ie?(Pt={axis:ie},t[111]=ie,t[112]=Pt):Pt=t[112],I=a.jsxRuntimeExports.jsx(De.Axis,{x1:s(C<0?0:C),x2:s(C<0?0:C),y1:-2.5,y2:lt+f.bottom,classNames:Mt,styles:Pt}),t[113]!==V?(w=V.filter(Ci).map(Ei),t[113]=V,t[114]=w):w=t[114],z=We.AnimatePresence,X=rt.map(n=>b.checkIfNullOrUndefined(k(n.id))?null:a.jsxRuntimeExports.jsxs(kt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:_=>{g(n),ce(_.clientY),yt(_.clientX),pt?.(n)},onClick:()=>{(ut||U)&&(Se.isEqual(at,n)&&ct?(ye(void 0),ut?.(void 0)):(ye(n),ut?.(n)))},onMouseMove:_=>{g(n),ce(_.clientY),yt(_.clientX)},onMouseLeave:()=>{g(void 0),yt(void 0),ce(void 0),pt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:0,y:k(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:xt:.85},whileInView:{x:0,y:k(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:xt:.85,transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((_,At)=>a.jsxRuntimeExports.jsx(kt.motion.rect,{exit:{width:0,x:s(0),transition:{duration:m.duration}},variants:{initial:{x:s(0),width:0,fill:y[At]},whileInView:{x:s(At===0?0:Oe.sum(n.qualitativeRange.filter((be,je)=>je<At&&be))),width:s(_),fill:y[At],transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial",y:0,height:k.bandwidth()},At)):null,n.target&&B==="background"?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:0,x:n.target>=0?s(0):s(n.target),height:k.bandwidth(),exit:{width:0,x:s(0),fill:it,transition:{duration:m.duration}},variants:{initial:{x:s(0),fill:it,width:0},whileInView:{x:n.target>=0?s(0):s(n.target),fill:it,width:n.target>=0?s(n.target)-s(0):s(0)-s(n.target),transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:k.bandwidth()*((1-o)/2),style:{fill:N},height:k.bandwidth()*o,exit:{width:0,x:s(0),transition:{duration:m.duration}},variants:{initial:{x:s(0),width:0},whileInView:{x:n.size>=0?s(0):s(n.size),width:n.size>=0?s(n.size)-s(0):s(0)-s(n.size),transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial"}):null,n.target&&B==="line"?a.jsxRuntimeExports.jsx(kt.motion.rect,{y:0,height:k.bandwidth(),width:P,exit:{opacity:0,x:s(0),fill:it,transition:{duration:m.duration}},variants:{initial:{x:s(0),opacity:0,fill:it},whileInView:{x:s(n.target)-P/2,opacity:1,fill:it,transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial"}):null,ve?a.jsxRuntimeExports.jsx(Ke.YAxesLabels,{value:`${n.label}`.length<he?`${n.label}`:`${`${n.label}`.substring(0,he)}...`,y:0,x:(n.size||0)<0?s(0):0-f.left,width:(n.size||0)<0?Ht-s(0):s(0)+f.left,height:k.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:l?.yAxis?.labels,className:d?.yAxis?.labels,animate:m,isInView:G}):null,fe?a.jsxRuntimeExports.jsx(kt.motion.text,{y:k.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...l?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Vt&&N.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",d?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:s(0),opacity:0,fill:Vt||N},whileInView:{x:n.size?s(n.size):s(0),opacity:1,fill:Vt||N,transition:{duration:m.duration}}},initial:"initial",animate:G?"whileInView":"initial",children:Ee.numberFormattingFunction(n.size,ue,nt,Yt,Xt)}):null]},n.label)),q=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((n,_)=>a.jsxRuntimeExports.jsx(Fe.RefLineX,{text:n.text,color:n.color,x:s(n.value),y1:0-f.top,y2:lt+f.bottom,textSide:s(n.value)>Ct*.75||Jt?"left":"right",classNames:n.classNames,styles:n.styles,animate:m,isInView:G},_))}):null,t[33]=m,t[34]=et,t[35]=N,t[36]=ot,t[37]=le,t[38]=d?.graphObjectValues,t[39]=d?.xAxis?.gridLines,t[40]=d?.xAxis?.labels,t[41]=d?.xAxis?.title,t[42]=d?.yAxis?.axis,t[43]=d?.yAxis?.labels,t[44]=V,t[45]=rt,t[46]=U,t[47]=xt,t[48]=lt,t[49]=Ct,t[50]=oe,t[51]=v,t[52]=G,t[53]=f.bottom,t[54]=f.left,t[55]=f.top,t[56]=Nt,t[57]=o,t[58]=Kt,t[59]=at,t[60]=ue,t[61]=p,t[62]=ut,t[63]=pt,t[64]=nt,t[65]=Yt,t[66]=y,t[67]=It,t[68]=ct,t[69]=Jt,t[70]=ve,t[71]=re,t[72]=fe,t[73]=l?.graphObjectValues,t[74]=l?.xAxis?.gridLines,t[75]=l?.xAxis?.labels,t[76]=l?.xAxis?.title,t[77]=l?.yAxis?.axis,t[78]=l?.yAxis?.labels,t[79]=Xt,t[80]=it,t[81]=P,t[82]=B,t[83]=Qt,t[84]=he,t[85]=Vt,t[86]=Ht,t[87]=ee,t[88]=C,t[89]=z,t[90]=W,t[91]=X,t[92]=q,t[93]=Y,t[94]=H,t[95]=M,t[96]=I,t[97]=w,t[98]=j,t[99]=J,t[100]=K,t[101]=Q,t[102]=Z}else z=t[89],W=t[90],X=t[91],q=t[92],Y=t[93],H=t[94],M=t[95],I=t[96],w=t[97],j=t[98],J=t[99],K=t[100],Q=t[101],Z=t[102];let L;t[115]!==z||t[116]!==X||t[117]!==q?(L=a.jsxRuntimeExports.jsxs(z,{children:[X,q]}),t[115]=z,t[116]=X,t[117]=q,t[118]=L):L=t[118];let u;t[119]!==V?(u=V.filter(Vi).map(Ni),t[119]=V,t[120]=u):u=t[120];let S;t[121]!==Y||t[122]!==H||t[123]!==M||t[124]!==I||t[125]!==w||t[126]!==L||t[127]!==u?(S=a.jsxRuntimeExports.jsxs("g",{transform:Y,children:[H,M,I,w,L,u]}),t[121]=Y,t[122]=H,t[123]=M,t[124]=I,t[125]=w,t[126]=L,t[127]=u,t[128]=S):S=t[128];let dt;t[129]!==W||t[130]!==j||t[131]!==J||t[132]!==K||t[133]!==Q||t[134]!==Z||t[135]!==S?(dt=a.jsxRuntimeExports.jsx(W,{width:j,height:J,viewBox:K,direction:Q,ref:Z,children:S}),t[129]=W,t[130]=j,t[131]=J,t[132]=K,t[133]=Q,t[134]=Z,t[135]=S,t[136]=dt):dt=t[136];let $;t[137]!==d?.tooltip||t[138]!==st||t[139]!==Et||t[140]!==_t||t[141]!==l?.tooltip||t[142]!==ht?($=_t&&ht&&st&&Et?a.jsxRuntimeExports.jsx($e.Tooltip,{data:_t,body:ht,xPos:st,yPos:Et,backgroundStyle:l?.tooltip,className:d?.tooltip}):null,t[137]=d?.tooltip,t[138]=st,t[139]=Et,t[140]=_t,t[141]=l?.tooltip,t[142]=ht,t[143]=$):$=t[143];let Bt;t[144]!==d?.modal||t[145]!==U||t[146]!==at?(Bt=U&&at!==void 0?a.jsxRuntimeExports.jsx(Ue.DetailsModal,{body:U,data:at,setData:ye,className:d?.modal}):null,t[144]=d?.modal,t[145]=U,t[146]=at,t[147]=Bt):Bt=t[147];let c;return t[148]!==dt||t[149]!==$||t[150]!==Bt?(c=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[dt,$,Bt]}),t[148]=dt,t[149]=$,t[150]=Bt,t[151]=c):c=t[151],c}function Ni(e){return e.layer}function Vi(e){return e.position==="after"}function Ei(e){return e.layer}function Ci(e){return e.position==="before"}function zi(e){return e!==0}function qi(e){return e!==0}function Li(e){return`${e.id}`}function Si(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function $i(e){return e.target}function Di(e){return!b.checkIfNullOrUndefined(e.target)}function Ti(e){return e.target}function Fi(e){return!b.checkIfNullOrUndefined(e.target)}function Ui(e){return e.size}function Bi(e){return!b.checkIfNullOrUndefined(e.size)}function Pi(e){return e.size}function Gi(e){return!b.checkIfNullOrUndefined(e.size)}function Wi(e){return Oe.sum((e.qualitativeRange||[]).filter(Xi))||0}function Xi(e){return!b.checkIfNullOrUndefined(e)}function Yi(e){return e.target}function Hi(e){return!b.checkIfNullOrUndefined(e.target)}function Ji(e){return e.target}function Ki(e){return!b.checkIfNullOrUndefined(e.target)}function Qi(e){return e.size}function Zi(e){return!b.checkIfNullOrUndefined(e.size)}function _i(e){return e.size}function tn(e){return!b.checkIfNullOrUndefined(e.size)}function en(e){const t=a.compilerRuntimeExports.c(136),{data:i,graphTitle:Rt,barColor:se,barPadding:Wt,showTicks:Ot,leftMargin:N,rightMargin:Xt,topMargin:Yt,bottomMargin:le,truncateBy:fe,showLabels:re,showValues:he,backgroundColor:Ht,suffix:oe,prefix:ve,sources:ht,graphDescription:pt,height:It,width:v,footNote:gt,colorDomain:tt,colorLegendTitle:ut,padding:A,relativeHeight:Jt,tooltip:Nt,onSeriesMouseOver:Kt,refValues:ct,showColorScale:U,graphID:et,maxValue:Vt,minValue:p,highlightedDataPoints:l,onSeriesMouseClick:d,valueColor:B,orientation:it,styles:y,classNames:o,qualitativeRangeColors:m,targetColor:xt,filterNA:nt,targetStyle:V,measureBarWidthFactor:ue,animate:P,dimmedOpacity:Qt,precision:pe,customLayers:Zt,naLabel:we,graphDownload:ge,dataDownload:E,language:G,theme:_t,sortData:g,labelOrder:at,minHeight:ye,maxBarThickness:st,maxNumberOfBars:yt,minBarThickness:Et,ariaLabel:ce,resetSelectionOnDoubleClick:xe,detailsOnClick:te,barAxisTitle:f,noOfTicks:Ct,targetLineThickness:lt,timeline:bt}=e,zt=se===void 0?Ne.Colors.primaryColors["blue-600"]:se,qt=Wt===void 0?.25:Wt,Lt=Ot===void 0?!0:Ot,St=fe===void 0?999:fe,$t=re===void 0?!0:re,Dt=he===void 0?!0:he,ee=Ht===void 0?!1:Ht,Tt=oe===void 0?"":oe,Ft=ve===void 0?"":ve,Ut=U===void 0?!0:U;let vt;t[0]!==l?(vt=l===void 0?[]:l,t[0]=l,t[1]=vt):vt=t[1];const O=vt,C=it===void 0?"vertical":it,mt=xt===void 0?Ne.Colors.light.grays["gray-700"]:xt,rt=nt===void 0?!0:nt,wt=V===void 0?"line":V,ot=ue===void 0?.4:ue,z=P===void 0?!1:P,W=Qt===void 0?.3:Qt,X=pe===void 0?2:pe;let q;t[2]!==Zt?(q=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=q):q=t[3];const Y=q,H=we===void 0?"NA":we,M=ge===void 0?!1:ge,I=E===void 0?!1:E,w=G===void 0?"en":G,j=_t===void 0?"light":_t,J=ye===void 0?0:ye,K=xe===void 0?!0:xe,Q=Ct===void 0?5:Ct,Z=lt===void 0?2:lt;let L;t[4]!==bt?(L=bt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:bt,t[4]=bt,t[5]=L):L=t[5];const u=L,[S,dt]=F.useState(0),[$,Bt]=F.useState(0),c=F.useRef(null),s=F.useRef(null),k=C==="horizontal"?Ii:ei,[R,jt]=F.useState(u.autoplay);let D;if(t[6]!==i||t[7]!==u.dateFormat){let h;t[9]!==u.dateFormat?(h=de=>Ve.parse(`${de.date}`,u.dateFormat||"yyyy",new Date).getTime(),t[9]=u.dateFormat,t[10]=h):h=t[10],D=[...new Set(i.filter(cn).map(h))],D.sort(un),t[6]=i,t[7]=u.dateFormat,t[8]=D}else D=t[8];const x=D,[T,me]=F.useState(u.autoplay?0:x.length-1);let Mt,ie;t[11]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>{const h=new ResizeObserver(de=>{dt(de[0].target.clientWidth||620),Bt(de[0].target.clientHeight||480)});return c.current&&h.observe(c.current),()=>h.disconnect()},ie=[],t[11]=Mt,t[12]=ie):(Mt=t[11],ie=t[12]),F.useEffect(Mt,ie);let Pt,n;t[13]!==R||t[14]!==u.speed||t[15]!==x?(Pt=()=>{const h=setInterval(()=>{me(de=>de<x.length-1?de+1:0)},(u.speed||2)*1e3);return R||clearInterval(h),()=>clearInterval(h)},n=[x,R,u.speed],t[13]=R,t[14]=u.speed,t[15]=x,t[16]=Pt,t[17]=n):(Pt=t[16],n=t[17]),F.useEffect(Pt,n);const _=u.dateFormat||"yyyy";let At;t[18]!==T||t[19]!==_||t[20]!==u.showOnlyActiveDate||t[21]!==x?(At=Ce.getSliderMarks(x,T,u.showOnlyActiveDate,_),t[18]=T,t[19]=_,t[20]=u.showOnlyActiveDate,t[21]=x,t[22]=At):At=t[22];const be=At,je=o?.graphContainer,r=y?.graphContainer;let ft;t[23]!==o?.description||t[24]!==o?.title||t[25]!==i||t[26]!==I||t[27]!==pt||t[28]!==M||t[29]!==Rt||t[30]!==y?.description||t[31]!==y?.title||t[32]!==v?(ft=Rt||pt||M||I?a.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:y?.title,description:y?.description},classNames:{title:o?.title,description:o?.description},graphTitle:Rt,graphDescription:pt,width:v,graphDownload:M?s:void 0,dataDownload:I?i.map(on).filter(rn).length>0?i.map(ln).filter(sn):i.filter(an):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=i,t[26]=I,t[27]=pt,t[28]=M,t[29]=Rt,t[30]=y?.description,t[31]=y?.title,t[32]=v,t[33]=ft):ft=t[33];let Gt;t[34]!==T||t[35]!==be||t[36]!==R||t[37]!==u.enabled||t[38]!==x?(Gt=u.enabled&&x.length>0&&be?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{jt(!R)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":R?"Click to pause animation":"Click to play animation",children:R?a.jsxRuntimeExports.jsx(Le.Pause,{}):a.jsxRuntimeExports.jsx(Le.Play,{})}),a.jsxRuntimeExports.jsx(Ce.Nr,{min:x[0],max:x[x.length-1],marks:be,step:null,defaultValue:x[x.length-1],value:x[T],onChangeComplete:h=>{me(x.indexOf(h))},onChange:h=>{me(x.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=T,t[35]=be,t[36]=R,t[37]=u.enabled,t[38]=x,t[39]=Gt):Gt=t[39];let ne;t[40]!==o?.colorLegend||t[41]!==tt||t[42]!==ut||t[43]!==i||t[44]!==m||t[45]!==Ut||t[46]!==j||t[47]!==v?(ne=Ut&&i.filter(nn).length!==0&&tt&&i.length>0?a.jsxRuntimeExports.jsx(ti.ColorLegend,{width:v,colorLegendTitle:ut,colors:m||Ne.Colors[j].sequentialColors.positiveColorsx10,colorDomain:tt,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=tt,t[42]=ut,t[43]=i,t[44]=m,t[45]=Ut,t[46]=j,t[47]=v,t[48]=ne):ne=t[48];let ae;t[49]!==i.length?(ae=i.length===0&&a.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[49]=i.length,t[50]=ae):ae=t[50];let Me;t[51]!==k||t[52]!==z||t[53]!==f||t[54]!==zt||t[55]!==qt||t[56]!==le||t[57]!==o||t[58]!==Y||t[59]!==i||t[60]!==te||t[61]!==W||t[62]!==rt||t[63]!==O||t[64]!==T||t[65]!==at||t[66]!==w||t[67]!==N||t[68]!==st||t[69]!==yt||t[70]!==Vt||t[71]!==ot||t[72]!==Et||t[73]!==p||t[74]!==H||t[75]!==Q||t[76]!==d||t[77]!==Kt||t[78]!==C||t[79]!==X||t[80]!==Ft||t[81]!==m||t[82]!==ct||t[83]!==K||t[84]!==Xt||t[85]!==$t||t[86]!==Lt||t[87]!==Dt||t[88]!==g||t[89]!==y||t[90]!==Tt||t[91]!==$||t[92]!==S||t[93]!==mt||t[94]!==Z||t[95]!==wt||t[96]!==j||t[97]!==u.dateFormat||t[98]!==u.enabled||t[99]!==Nt||t[100]!==Yt||t[101]!==St||t[102]!==x||t[103]!==B?(Me=S&&$&&i.length>0?a.jsxRuntimeExports.jsx(k,{data:g?Xe.orderBy(qe.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ve.format(new Date(x[T]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?g==="asc"?(C==="horizontal"?1:-1)*(1/0):(C==="horizontal"?-1:1)*(1/0):h.size],[g]).filter((h,de)=>yt?de<yt:!0):qe.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ve.format(new Date(x[T]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h).filter((h,de)=>yt?de<yt:!0),barColor:zt,targetColor:mt,width:S,refValues:ct,height:$,suffix:Tt,prefix:Ft,barPadding:qt,showLabels:$t,showValues:Dt,showTicks:Lt,truncateBy:St,leftMargin:N,rightMargin:Xt,qualitativeRangeColors:m||Ne.Colors[j].sequentialColors.positiveColorsx10,topMargin:Yt,bottomMargin:le,tooltip:Nt,onSeriesMouseOver:Kt,maxValue:Vt,minValue:p,highlightedDataPoints:O,onSeriesMouseClick:d,labelOrder:at,maxBarThickness:st,minBarThickness:Et,resetSelectionOnDoubleClick:K,detailsOnClick:te,barAxisTitle:f,noOfTicks:Q,valueColor:B,styles:y,classNames:o,targetStyle:wt,dimmedOpacity:W,measureBarWidthFactor:ot,animate:z===!0?{duration:.5,once:!0,amount:.5}:z||{duration:0,once:!0,amount:0},precision:X,customLayers:Y,naLabel:H,targetLineThickness:Z,rtl:w==="ar"||w==="he"}):null,t[51]=k,t[52]=z,t[53]=f,t[54]=zt,t[55]=qt,t[56]=le,t[57]=o,t[58]=Y,t[59]=i,t[60]=te,t[61]=W,t[62]=rt,t[63]=O,t[64]=T,t[65]=at,t[66]=w,t[67]=N,t[68]=st,t[69]=yt,t[70]=Vt,t[71]=ot,t[72]=Et,t[73]=p,t[74]=H,t[75]=Q,t[76]=d,t[77]=Kt,t[78]=C,t[79]=X,t[80]=Ft,t[81]=m,t[82]=ct,t[83]=K,t[84]=Xt,t[85]=$t,t[86]=Lt,t[87]=Dt,t[88]=g,t[89]=y,t[90]=Tt,t[91]=$,t[92]=S,t[93]=mt,t[94]=Z,t[95]=wt,t[96]=j,t[97]=u.dateFormat,t[98]=u.enabled,t[99]=Nt,t[100]=Yt,t[101]=St,t[102]=x,t[103]=B,t[104]=Me):Me=t[104];let Ae;t[105]!==ae||t[106]!==Me?(Ae=a.jsxRuntimeExports.jsxs(ze.GraphArea,{ref:c,children:[ae,Me]}),t[105]=ae,t[106]=Me,t[107]=Ae):Ae=t[107];let ke;t[108]!==ne||t[109]!==Ae?(ke=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[ne,Ae]}),t[108]=ne,t[109]=Ae,t[110]=ke):ke=t[110];let Re;t[111]!==o?.footnote||t[112]!==o?.source||t[113]!==gt||t[114]!==ht||t[115]!==y?.footnote||t[116]!==y?.source||t[117]!==v?(Re=ht||gt?a.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:y?.footnote,source:y?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:ht,footNote:gt,width:v}):null,t[111]=o?.footnote,t[112]=o?.source,t[113]=gt,t[114]=ht,t[115]=y?.footnote,t[116]=y?.source,t[117]=v,t[118]=Re):Re=t[118];let Ie;return t[119]!==ce||t[120]!==ee||t[121]!==et||t[122]!==It||t[123]!==w||t[124]!==J||t[125]!==A||t[126]!==Jt||t[127]!==je||t[128]!==r||t[129]!==ft||t[130]!==Gt||t[131]!==ke||t[132]!==Re||t[133]!==j||t[134]!==v?(Ie=a.jsxRuntimeExports.jsxs(ze.GraphContainer,{className:je,style:r,id:et,ref:s,"aria-label":ce,backgroundColor:ee,theme:j,language:w,minHeight:J,width:v,height:It,relativeHeight:Jt,padding:A,children:[ft,Gt,ke,Re]}),t[119]=ce,t[120]=ee,t[121]=et,t[122]=It,t[123]=w,t[124]=J,t[125]=A,t[126]=Jt,t[127]=je,t[128]=r,t[129]=ft,t[130]=Gt,t[131]=ke,t[132]=Re,t[133]=j,t[134]=v,t[135]=Ie):Ie=t[135],Ie}function nn(e){return e.qualitativeRange}function an(e){return e!==void 0}function sn(e){return e!==void 0}function ln(e){return e.data}function rn(e){return e!==void 0}function on(e){return e.data}function un(e,t){return e-t}function cn(e){return e.date}exports.BulletChart=en;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),B=require("react"),He=require("./index-Cno4Q0YE.cjs"),Ce=require("./parse-xYI9yrvL.cjs"),Le=require("./getSliderMarks-CIuSoedo.cjs"),De=require("./index-DQA8q5sC.cjs"),Ne=require("./index-CSNtgibC.cjs"),ze=require("./numberFormattingFunction-02t-wJta.cjs"),Te=require("./Tooltip-BLa2EfMs.cjs"),b=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./Axis-Jt_tmhxS.cjs"),Ue=require("./AxisTitle-DV4n0RxE.cjs"),Je=require("./XAxesLabels-C6o9jJal.cjs"),Be=require("./ReferenceLine-M9aP3dj-.cjs"),Ke=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Qe=require("./XTicksAndGridLines-CekrPykD.cjs"),Ze=require("./YAxesLabels-BQ2aCazV.cjs"),Pe=require("./DetailsModal-DHttOA80.cjs"),Ge=require("./linear-CgUCbw9F.cjs"),We=require("./band-VYfcZeJ2.cjs"),Mt=require("./proxy-C4-uo6nS.cjs"),Xe=require("./use-in-view-C3o_ntMv.cjs"),Ye=require("./index-CoobIWNj.cjs"),Ee=require("./Colors.cjs"),_e=require("./EmptyState-CGeBqbmR.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ti=require("./GraphFooter.cjs"),ei=require("./GraphHeader.cjs"),ii=require("./ColorLegend.cjs"),Se=require("./ensureCompleteData-D9bQTiVS.cjs"),$e=require("./index-C6er0ety.cjs");function ni(e){const t=a.compilerRuntimeExports.c(162),{data:i,width:kt,height:ae,barColor:Wt,suffix:Rt,prefix:V,barPadding:Xt,showLabels:Yt,showValues:se,showTicks:Ot,truncateBy:le,leftMargin:de,rightMargin:Ht,topMargin:re,bottomMargin:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,maxValue:v,minValue:vt,highlightedDataPoints:it,onSeriesMouseClick:ct,labelOrder:R,maxBarThickness:Jt,minBarThickness:Nt,resetSelectionOnDoubleClick:Kt,detailsOnClick:xt,barAxisTitle:P,valueColor:nt,noOfTicks:Vt,styles:p,classNames:r,targetStyle:m,targetColor:G,qualitativeRangeColors:at,measureBarWidthFactor:g,animate:o,dimmedOpacity:x,precision:mt,customLayers:st,naLabel:E,targetLineThickness:oe,hideAxisLine:ue}=e,lt=de===void 0?20:de,Qt=Ht===void 0?20:Ht,Zt=re===void 0?20:re,fe=ge===void 0?25:ge,ye=B.useRef(null);let he;t[0]!==o.amount||t[1]!==o.once?(he={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=he):he=t[2];const C=Xe.useInView(ye,he),W=P?lt+30:lt;let dt;t[3]!==fe||t[4]!==Qt||t[5]!==W||t[6]!==Zt?(dt={top:Zt,bottom:fe,left:W,right:Qt},t[3]=fe,t[4]=Qt,t[5]=W,t[6]=Zt,t[7]=dt):dt=t[7];const y=dt,[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),[_t,te]=B.useState(void 0),d=kt-y.left-y.right,Ct=ae-y.top-y.bottom;let z;t[8]!==i?(z=Math.max(...i.filter(Ni).map(Ii))<0?0:Math.max(...i.filter(Oi).map(Ri)),t[8]=i,t[9]=z):z=t[9];const ee=z;let zt;t[10]!==i?(zt=Math.max(...i.filter(ki).map(Mi))<0?0:Math.max(...i.filter(Ai).map(ji)),t[10]=i,t[11]=zt):zt=t[11];const Lt=zt;let qt;t[12]!==i?(qt=Math.max(...i.map(vi)),t[12]=i,t[13]=qt):qt=t[13];const St=qt;let $t;t[14]!==ee||t[15]!==v||t[16]!==St||t[17]!==Lt?($t=b.checkIfNullOrUndefined(v)?Math.max(...[ee,Lt,St].filter(Number.isFinite))<0?0:Math.max(...[ee,Lt,St].filter(Number.isFinite)):v,t[14]=ee,t[15]=v,t[16]=St,t[17]=Lt,t[18]=$t):$t=t[18];const Dt=$t;let ie;t[19]!==i?(ie=Math.min(...i.filter(bi).map(yi))>=0?0:Math.min(...i.filter(gi).map(pi)),t[19]=i,t[20]=ie):ie=t[20];const Tt=ie;let Ft;t[21]!==i?(Ft=Math.min(...i.filter(hi).map(fi))>=0?0:Math.min(...i.filter(di).map(mi)),t[21]=i,t[22]=Ft):Ft=t[22];const Ut=Ft;let wt;t[23]!==Tt||t[24]!==vt||t[25]!==Ut?(wt=b.checkIfNullOrUndefined(vt)?Math.min(...[Tt,Ut].filter(Number.isFinite))>=0?0:Math.min(...[Tt,Ut].filter(Number.isFinite)):vt,t[23]=Tt,t[24]=vt,t[25]=Ut,t[26]=wt):wt=t[26];const M=wt;let L;if(t[27]!==i||t[28]!==R){const c=new Set,s=i.map((T,w)=>{const At=R?`${T.label}`:`${w}`;return c.add(At),{...T,id:At}}),I=R?R.filter(T=>!c.has(T)):[];L=[...s,...I.map(xi)],t[27]=i,t[28]=R,t[29]=L}else L=t[29];const ht=L;let rt;t[30]!==ht||t[31]!==R?(rt=R??ht.map(ci),t[30]=ht,t[31]=R,t[32]=rt):rt=t[32];const jt=rt;let ot,q,X,Y,S,H,J,k,O,j,A,K,Q,Z;if(t[33]!==o||t[34]!==P||t[35]!==Wt||t[36]!==jt||t[37]!==Xt||t[38]!==r?.graphObjectValues||t[39]!==r?.xAxis?.axis||t[40]!==r?.xAxis?.labels||t[41]!==r?.yAxis?.gridLines||t[42]!==r?.yAxis?.labels||t[43]!==r?.yAxis?.title||t[44]!==st||t[45]!==ht||t[46]!==xt||t[47]!==x||t[48]!==Ct||t[49]!==d||t[50]!==ae||t[51]!==ue||t[52]!==it||t[53]!==C||t[54]!==lt||t[55]!==y.bottom||t[56]!==y.left||t[57]!==y.right||t[58]!==y.top||t[59]!==Jt||t[60]!==g||t[61]!==Nt||t[62]!==N||t[63]!==E||t[64]!==Vt||t[65]!==ct||t[66]!==bt||t[67]!==mt||t[68]!==V||t[69]!==at||t[70]!==It||t[71]!==Kt||t[72]!==Yt||t[73]!==Ot||t[74]!==se||t[75]!==p?.graphObjectValues||t[76]!==p?.xAxis?.axis||t[77]!==p?.xAxis?.labels||t[78]!==p?.yAxis?.gridLines||t[79]!==p?.yAxis?.labels||t[80]!==p?.yAxis?.title||t[81]!==Rt||t[82]!==G||t[83]!==oe||t[84]!==m||t[85]!==le||t[86]!==nt||t[87]!==kt||t[88]!==Dt||t[89]!==M){const c=Ge.linear().domain([M,Dt]).range([Ct,0]).nice(),s=We.band().domain(jt).range([0,Nt?Math.max(d,Nt*jt.length):Jt?Math.min(d,Jt*jt.length):d]).paddingInner(Xt),I=c.ticks(Vt);q=Mt.motion.svg,j=`${kt}px`,A=`${ae}px`,K=`0 0 ${kt} ${ae}`,Q="ltr",Z=ye,S=`translate(${y.left},${y.top})`;let T;t[104]!==E||t[105]!==mt||t[106]!==V||t[107]!==Ot||t[108]!==Rt||t[109]!==M?(T=Ot?ze.numberFormattingFunction(M<0?0:M,E,mt,V,Rt):void 0,t[104]=E,t[105]=mt,t[106]=V,t[107]=Ot,t[108]=Rt,t[109]=M,t[110]=T):T=t[110];const w=r?.xAxis?.axis,At=r?.yAxis?.labels;let et;t[111]!==w||t[112]!==At?(et={axis:w,label:At},t[111]=w,t[112]=At,t[113]=et):et=t[113];const f=p?.xAxis?.axis,F=p?.yAxis?.labels;let Bt;t[114]!==f||t[115]!==F?(Bt={axis:f,label:F},t[114]=f,t[115]=F,t[116]=Bt):Bt=t[116],H=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:ue,y1:c(M<0?0:M),y2:c(M<0?0:M),x1:0-lt,x2:d+y.right,label:T,labelPos:{x:0-lt,dx:0,dy:Dt<0?"1em":-5,y:c(M<0?0:M)},classNames:et,styles:Bt}),J=Ot?a.jsxRuntimeExports.jsx(Ke.YTicksAndGridLines,{values:I.filter(ui),y:I.filter(oi).map(l=>c(l)),x1:0-lt,x2:d+y.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:r?.yAxis?.gridLines,labels:r?.yAxis?.labels},suffix:Rt,prefix:V,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:mt}):null;const ne=0-lt-15,Pt=Ct/2,n=p?.yAxis?.title,U=r?.yAxis?.title;t[117]!==P||t[118]!==ne||t[119]!==Pt||t[120]!==n||t[121]!==U?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:ne,y:Pt,style:n,className:U,text:P,rotate90:!0}),t[117]=P,t[118]=ne,t[119]=Pt,t[120]=n,t[121]=U,t[122]=k):k=t[122],t[123]!==st?(O=st.filter(ri).map(li),t[123]=st,t[124]=O):O=t[124],ot=Ye.AnimatePresence,X=ht.map(l=>b.checkIfNullOrUndefined(s(l.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:gt=>{ce(l),te(gt.clientY),pe(gt.clientX),bt?.(l)},onClick:()=>{(ct||xt)&&(De.isEqual(N,l)&&Kt?(xe(void 0),ct?.(void 0)):(xe(l),ct?.(l)))},onMouseMove:gt=>{ce(l),te(gt.clientY),pe(gt.clientX)},onMouseLeave:()=>{ce(void 0),pe(void 0),te(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85},whileInView:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:[l.qualitativeRange?l.qualitativeRange.map((gt,Gt)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0),fill:at[Gt]},whileInView:{height:Math.abs(c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be)))-c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<Gt&&be)))),y:c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be))),fill:at[Gt],transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",width:s.bandwidth()},Gt)):null,l.target&&m==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{height:0,y:c(0),fill:G,transition:{duration:o.duration}},variants:{initial:{height:0,fill:G,y:c(0)},whileInView:{height:Math.abs(c(l.target)-c(0)),fill:G,y:l.target>0?c(l.target):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:s.bandwidth()*((1-g)/2),width:s.bandwidth()*g,style:{fill:Wt},exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0)},whileInView:{height:Math.abs(c(l.size)-c(0)),y:l.size>0?c(l.size):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.target&&m==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{y:c(0),opacity:0,fill:G,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:G},whileInView:{y:c(l.target)-oe/2,opacity:1,fill:G,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",height:oe}):null,Yt?a.jsxRuntimeExports.jsx(Je.XAxesLabels,{value:`${l.label}`.length<le?`${l.label}`:`${`${l.label}`.substring(0,le)}...`,y:(l.size||0)<0?0:c(0)+5,x:0,width:s.bandwidth(),height:(l.size||0)<0?c(0)-5:y.bottom,style:p?.xAxis?.labels,className:r?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:o,isInView:C}):null,se?a.jsxRuntimeExports.jsx(Mt.motion.text,{x:s.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!nt&&Wt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",r?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:nt||Wt},whileInView:{y:c(l.size||0),opacity:1,fill:nt||Wt,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:ze.numberFormattingFunction(l.size,E,mt,V,Rt)}):null]},l.label)),Y=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((l,gt)=>a.jsxRuntimeExports.jsx(Be.RefLineY,{text:l.text,color:l.color,y:c(l.value),x1:0-lt,x2:d+y.right,classNames:l.classNames,styles:l.styles,animate:o,isInView:C},gt))}):null,t[33]=o,t[34]=P,t[35]=Wt,t[36]=jt,t[37]=Xt,t[38]=r?.graphObjectValues,t[39]=r?.xAxis?.axis,t[40]=r?.xAxis?.labels,t[41]=r?.yAxis?.gridLines,t[42]=r?.yAxis?.labels,t[43]=r?.yAxis?.title,t[44]=st,t[45]=ht,t[46]=xt,t[47]=x,t[48]=Ct,t[49]=d,t[50]=ae,t[51]=ue,t[52]=it,t[53]=C,t[54]=lt,t[55]=y.bottom,t[56]=y.left,t[57]=y.right,t[58]=y.top,t[59]=Jt,t[60]=g,t[61]=Nt,t[62]=N,t[63]=E,t[64]=Vt,t[65]=ct,t[66]=bt,t[67]=mt,t[68]=V,t[69]=at,t[70]=It,t[71]=Kt,t[72]=Yt,t[73]=Ot,t[74]=se,t[75]=p?.graphObjectValues,t[76]=p?.xAxis?.axis,t[77]=p?.xAxis?.labels,t[78]=p?.yAxis?.gridLines,t[79]=p?.yAxis?.labels,t[80]=p?.yAxis?.title,t[81]=Rt,t[82]=G,t[83]=oe,t[84]=m,t[85]=le,t[86]=nt,t[87]=kt,t[88]=Dt,t[89]=M,t[90]=ot,t[91]=q,t[92]=X,t[93]=Y,t[94]=S,t[95]=H,t[96]=J,t[97]=k,t[98]=O,t[99]=j,t[100]=A,t[101]=K,t[102]=Q,t[103]=Z}else ot=t[90],q=t[91],X=t[92],Y=t[93],S=t[94],H=t[95],J=t[96],k=t[97],O=t[98],j=t[99],A=t[100],K=t[101],Q=t[102],Z=t[103];let _;t[125]!==ot||t[126]!==X||t[127]!==Y?(_=a.jsxRuntimeExports.jsxs(ot,{children:[X,Y]}),t[125]=ot,t[126]=X,t[127]=Y,t[128]=_):_=t[128];let $;t[129]!==st?($=st.filter(si).map(ai),t[129]=st,t[130]=$):$=t[130];let u;t[131]!==S||t[132]!==H||t[133]!==J||t[134]!==k||t[135]!==O||t[136]!==_||t[137]!==$?(u=a.jsxRuntimeExports.jsxs("g",{transform:S,children:[H,J,k,O,_,$]}),t[131]=S,t[132]=H,t[133]=J,t[134]=k,t[135]=O,t[136]=_,t[137]=$,t[138]=u):u=t[138];let tt;t[139]!==q||t[140]!==j||t[141]!==A||t[142]!==K||t[143]!==Q||t[144]!==Z||t[145]!==u?(tt=a.jsxRuntimeExports.jsx(q,{width:j,height:A,viewBox:K,direction:Q,ref:Z,children:u}),t[139]=q,t[140]=j,t[141]=A,t[142]=K,t[143]=Q,t[144]=Z,t[145]=u,t[146]=tt):tt=t[146];let D;t[147]!==r?.tooltip||t[148]!==Et||t[149]!==_t||t[150]!==ft||t[151]!==p?.tooltip||t[152]!==yt?(D=ft&&yt&&Et&&_t?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:ft,body:yt,xPos:Et,yPos:_t,backgroundStyle:p?.tooltip,className:r?.tooltip}):null,t[147]=r?.tooltip,t[148]=Et,t[149]=_t,t[150]=ft,t[151]=p?.tooltip,t[152]=yt,t[153]=D):D=t[153];let pt;t[154]!==r?.modal||t[155]!==xt||t[156]!==N?(pt=xt&&N!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:xt,data:N,setData:xe,className:r?.modal}):null,t[154]=r?.modal,t[155]=xt,t[156]=N,t[157]=pt):pt=t[157];let ut;return t[158]!==tt||t[159]!==D||t[160]!==pt?(ut=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[tt,D,pt]}),t[158]=tt,t[159]=D,t[160]=pt,t[161]=ut):ut=t[161],ut}function ai(e){return e.layer}function si(e){return e.position==="after"}function li(e){return e.layer}function ri(e){return e.position==="before"}function oi(e){return e!==0}function ui(e){return e!==0}function ci(e){return`${e.id}`}function xi(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function mi(e){return e.target}function di(e){return!b.checkIfNullOrUndefined(e.target)}function fi(e){return e.target}function hi(e){return!b.checkIfNullOrUndefined(e.target)}function pi(e){return e.size}function gi(e){return!b.checkIfNullOrUndefined(e.size)}function yi(e){return e.size}function bi(e){return!b.checkIfNullOrUndefined(e.size)}function vi(e){return Ne.sum((e.qualitativeRange||[]).filter(wi))||0}function wi(e){return!b.checkIfNullOrUndefined(e)}function ji(e){return e.target}function Ai(e){return!b.checkIfNullOrUndefined(e.size)}function Mi(e){return e.target}function ki(e){return!b.checkIfNullOrUndefined(e.target)}function Ri(e){return e.size}function Oi(e){return!b.checkIfNullOrUndefined(e.size)}function Ii(e){return e.size}function Ni(e){return!b.checkIfNullOrUndefined(e.size)}function Vi(e){const t=a.compilerRuntimeExports.c(153),{data:i,topMargin:kt,bottomMargin:ae,leftMargin:Wt,rightMargin:Rt,barColor:V,suffix:Xt,prefix:Yt,barPadding:se,showValues:Ot,showTicks:le,truncateBy:de,width:Ht,height:re,showLabels:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,highlightedDataPoints:v,maxValue:vt,minValue:it,onSeriesMouseClick:ct,labelOrder:R,rtl:Jt,maxBarThickness:Nt,minBarThickness:Kt,resetSelectionOnDoubleClick:xt,detailsOnClick:P,barAxisTitle:nt,valueColor:Vt,noOfTicks:p,styles:r,classNames:m,targetStyle:G,targetColor:at,qualitativeRangeColors:g,measureBarWidthFactor:o,animate:x,dimmedOpacity:mt,precision:st,customLayers:E,naLabel:oe,targetLineThickness:ue,hideAxisLine:lt}=e,Qt=kt===void 0?25:kt,Zt=ae===void 0?10:ae,fe=Wt===void 0?100:Wt,ye=Rt===void 0?40:Rt,he=B.useRef(null);let C;t[0]!==x.amount||t[1]!==x.once?(C={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=C):C=t[2];const W=Xe.useInView(he,C),[dt,y]=B.useState(void 0),[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),_t=nt?Qt+25:Qt;let te;t[3]!==Zt||t[4]!==fe||t[5]!==ye||t[6]!==_t?(te={top:_t,bottom:Zt,left:fe,right:ye},t[3]=Zt,t[4]=fe,t[5]=ye,t[6]=_t,t[7]=te):te=t[7];const d=te,Ct=Ht-d.left-d.right,z=re-d.top-d.bottom;let ee;t[8]!==i?(ee=Math.max(...i.filter(nn).map(en))<0?0:Math.max(...i.filter(tn).map(_i)),t[8]=i,t[9]=ee):ee=t[9];const zt=ee;let Lt;t[10]!==i?(Lt=Math.max(...i.filter(Zi).map(Qi))<0?0:Math.max(...i.filter(Ki).map(Ji)),t[10]=i,t[11]=Lt):Lt=t[11];const qt=Lt;let St;t[12]!==i?(St=Math.max(...i.map(Yi)),t[12]=i,t[13]=St):St=t[13];const $t=St;let Dt;t[14]!==zt||t[15]!==vt||t[16]!==$t||t[17]!==qt?(Dt=b.checkIfNullOrUndefined(vt)?Math.max(...[zt,qt,$t].filter(Number.isFinite))<0?0:Math.max(...[zt,qt,$t].filter(Number.isFinite)):vt,t[14]=zt,t[15]=vt,t[16]=$t,t[17]=qt,t[18]=Dt):Dt=t[18];const ie=Dt;let Tt;t[19]!==i?(Tt=Math.min(...i.filter(Xi).map(Wi))>=0?0:Math.min(...i.filter(Gi).map(Pi)),t[19]=i,t[20]=Tt):Tt=t[20];const Ft=Tt;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(Bi).map(Ui))>=0?0:Math.min(...i.filter(Fi).map(Ti)),t[21]=i,t[22]=Ut):Ut=t[22];const wt=Ut;let M;t[23]!==Ft||t[24]!==it||t[25]!==wt?(M=b.checkIfNullOrUndefined(it)?Math.min(...[Ft,wt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,wt].filter(Number.isFinite)):it,t[23]=Ft,t[24]=it,t[25]=wt,t[26]=M):M=t[26];const L=M;let ht;if(t[27]!==i||t[28]!==R){const s=new Set,I=i.map((w,At)=>{const et=R?`${w.label}`:`${At}`;return s.add(et),{...w,id:et}}),T=R?R.filter(w=>!s.has(w)):[];ht=[...I,...T.map(Di)],t[27]=i,t[28]=R,t[29]=ht}else ht=t[29];const rt=ht;let jt;t[30]!==rt||t[31]!==R?(jt=R??rt.map($i),t[30]=rt,t[31]=R,t[32]=jt):jt=t[32];const ot=jt;let q,X,Y,S,H,J,k,O,j,A,K,Q,Z,_;if(t[33]!==x||t[34]!==nt||t[35]!==V||t[36]!==ot||t[37]!==se||t[38]!==m?.graphObjectValues||t[39]!==m?.xAxis?.gridLines||t[40]!==m?.xAxis?.labels||t[41]!==m?.xAxis?.title||t[42]!==m?.yAxis?.axis||t[43]!==m?.yAxis?.labels||t[44]!==E||t[45]!==rt||t[46]!==P||t[47]!==mt||t[48]!==z||t[49]!==Ct||t[50]!==re||t[51]!==lt||t[52]!==v||t[53]!==W||t[54]!==d.bottom||t[55]!==d.left||t[56]!==d.top||t[57]!==Nt||t[58]!==o||t[59]!==Kt||t[60]!==ft||t[61]!==oe||t[62]!==p||t[63]!==ct||t[64]!==bt||t[65]!==st||t[66]!==Yt||t[67]!==g||t[68]!==It||t[69]!==xt||t[70]!==Jt||t[71]!==ge||t[72]!==le||t[73]!==Ot||t[74]!==r?.graphObjectValues||t[75]!==r?.xAxis?.gridLines||t[76]!==r?.xAxis?.labels||t[77]!==r?.xAxis?.title||t[78]!==r?.yAxis?.axis||t[79]!==r?.yAxis?.labels||t[80]!==Xt||t[81]!==at||t[82]!==ue||t[83]!==G||t[84]!==Qt||t[85]!==de||t[86]!==Vt||t[87]!==Ht||t[88]!==ie||t[89]!==L){const s=Ge.linear().domain([L,ie]).range([0,Ct]).nice(),I=We.band().domain(ot).range([0,Kt?Math.max(z,Kt*ot.length):Nt?Math.min(z,Nt*ot.length):z]).paddingInner(se),T=s.ticks(p);X=Mt.motion.svg,A=`${Ht}px`,K=`${re}px`,Q=`0 0 ${Ht} ${re}`,Z="ltr",_=he,H=`translate(${d.left},${d.top})`,J=le?a.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:T.filter(Si),x:T.filter(qi).map(n=>s(n)),y1:0-Qt,y2:z+d.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:m?.xAxis?.gridLines,labels:m?.xAxis?.labels},suffix:Xt,prefix:Yt,labelType:"secondary",showGridLines:!0,precision:st}):null;const w=Ct/2,At=0-d.top+15,et=r?.xAxis?.title,f=m?.xAxis?.title;t[104]!==nt||t[105]!==w||t[106]!==At||t[107]!==et||t[108]!==f?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:w,y:At,style:et,className:f,text:nt}),t[104]=nt,t[105]=w,t[106]=At,t[107]=et,t[108]=f,t[109]=k):k=t[109];const F=m?.yAxis?.axis;let Bt;t[110]!==F?(Bt={axis:F},t[110]=F,t[111]=Bt):Bt=t[111];const ne=r?.yAxis?.axis;let Pt;t[112]!==ne?(Pt={axis:ne},t[112]=ne,t[113]=Pt):Pt=t[113],O=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:lt,x1:s(L<0?0:L),x2:s(L<0?0:L),y1:-2.5,y2:z+d.bottom,classNames:Bt,styles:Pt}),t[114]!==E?(j=E.filter(Li).map(zi),t[114]=E,t[115]=j):j=t[115],q=Ye.AnimatePresence,Y=rt.map(n=>b.checkIfNullOrUndefined(I(n.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:U=>{y(n),pe(U.clientY),xe(U.clientX),bt?.(n)},onClick:()=>{(ct||P)&&(De.isEqual(ft,n)&&xt?(ce(void 0),ct?.(void 0)):(ce(n),ct?.(n)))},onMouseMove:U=>{y(n),pe(U.clientY),xe(U.clientX)},onMouseLeave:()=>{y(void 0),xe(void 0),pe(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85},whileInView:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((U,l)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0,fill:g[l]},whileInView:{x:s(l===0?0:Ne.sum(n.qualitativeRange.filter((gt,Gt)=>Gt<l&&gt))),width:s(U),fill:g[l],transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",y:0,height:I.bandwidth()},l)):null,n.target&&G==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,x:n.target>=0?s(0):s(n.target),height:I.bandwidth(),exit:{width:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),fill:at,width:0},whileInView:{x:n.target>=0?s(0):s(n.target),fill:at,width:n.target>=0?s(n.target)-s(0):s(0)-s(n.target),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:I.bandwidth()*((1-o)/2),style:{fill:V},height:I.bandwidth()*o,exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0},whileInView:{x:n.size>=0?s(0):s(n.size),width:n.size>=0?s(n.size)-s(0):s(0)-s(n.size),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.target&&G==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,height:I.bandwidth(),width:ue,exit:{opacity:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:at},whileInView:{x:s(n.target)-ue/2,opacity:1,fill:at,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,ge?a.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${n.label}`.length<de?`${n.label}`:`${`${n.label}`.substring(0,de)}...`,y:0,x:(n.size||0)<0?s(0):0-d.left,width:(n.size||0)<0?Ht-s(0):s(0)+d.left,height:I.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:r?.yAxis?.labels,className:m?.yAxis?.labels,animate:x,isInView:W}):null,Ot?a.jsxRuntimeExports.jsx(Mt.motion.text,{y:I.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...r?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Vt&&V.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",m?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:Vt||V},whileInView:{x:n.size?s(n.size):s(0),opacity:1,fill:Vt||V,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:ze.numberFormattingFunction(n.size,oe,st,Yt,Xt)}):null]},n.label)),S=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((n,U)=>a.jsxRuntimeExports.jsx(Be.RefLineX,{text:n.text,color:n.color,x:s(n.value),y1:0-d.top,y2:z+d.bottom,textSide:s(n.value)>Ct*.75||Jt?"left":"right",classNames:n.classNames,styles:n.styles,animate:x,isInView:W},U))}):null,t[33]=x,t[34]=nt,t[35]=V,t[36]=ot,t[37]=se,t[38]=m?.graphObjectValues,t[39]=m?.xAxis?.gridLines,t[40]=m?.xAxis?.labels,t[41]=m?.xAxis?.title,t[42]=m?.yAxis?.axis,t[43]=m?.yAxis?.labels,t[44]=E,t[45]=rt,t[46]=P,t[47]=mt,t[48]=z,t[49]=Ct,t[50]=re,t[51]=lt,t[52]=v,t[53]=W,t[54]=d.bottom,t[55]=d.left,t[56]=d.top,t[57]=Nt,t[58]=o,t[59]=Kt,t[60]=ft,t[61]=oe,t[62]=p,t[63]=ct,t[64]=bt,t[65]=st,t[66]=Yt,t[67]=g,t[68]=It,t[69]=xt,t[70]=Jt,t[71]=ge,t[72]=le,t[73]=Ot,t[74]=r?.graphObjectValues,t[75]=r?.xAxis?.gridLines,t[76]=r?.xAxis?.labels,t[77]=r?.xAxis?.title,t[78]=r?.yAxis?.axis,t[79]=r?.yAxis?.labels,t[80]=Xt,t[81]=at,t[82]=ue,t[83]=G,t[84]=Qt,t[85]=de,t[86]=Vt,t[87]=Ht,t[88]=ie,t[89]=L,t[90]=q,t[91]=X,t[92]=Y,t[93]=S,t[94]=H,t[95]=J,t[96]=k,t[97]=O,t[98]=j,t[99]=A,t[100]=K,t[101]=Q,t[102]=Z,t[103]=_}else q=t[90],X=t[91],Y=t[92],S=t[93],H=t[94],J=t[95],k=t[96],O=t[97],j=t[98],A=t[99],K=t[100],Q=t[101],Z=t[102],_=t[103];let $;t[116]!==q||t[117]!==Y||t[118]!==S?($=a.jsxRuntimeExports.jsxs(q,{children:[Y,S]}),t[116]=q,t[117]=Y,t[118]=S,t[119]=$):$=t[119];let u;t[120]!==E?(u=E.filter(Ci).map(Ei),t[120]=E,t[121]=u):u=t[121];let tt;t[122]!==H||t[123]!==J||t[124]!==k||t[125]!==O||t[126]!==j||t[127]!==$||t[128]!==u?(tt=a.jsxRuntimeExports.jsxs("g",{transform:H,children:[J,k,O,j,$,u]}),t[122]=H,t[123]=J,t[124]=k,t[125]=O,t[126]=j,t[127]=$,t[128]=u,t[129]=tt):tt=t[129];let D;t[130]!==X||t[131]!==A||t[132]!==K||t[133]!==Q||t[134]!==Z||t[135]!==_||t[136]!==tt?(D=a.jsxRuntimeExports.jsx(X,{width:A,height:K,viewBox:Q,direction:Z,ref:_,children:tt}),t[130]=X,t[131]=A,t[132]=K,t[133]=Q,t[134]=Z,t[135]=_,t[136]=tt,t[137]=D):D=t[137];let pt;t[138]!==m?.tooltip||t[139]!==N||t[140]!==Et||t[141]!==dt||t[142]!==r?.tooltip||t[143]!==yt?(pt=dt&&yt&&N&&Et?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:dt,body:yt,xPos:N,yPos:Et,backgroundStyle:r?.tooltip,className:m?.tooltip}):null,t[138]=m?.tooltip,t[139]=N,t[140]=Et,t[141]=dt,t[142]=r?.tooltip,t[143]=yt,t[144]=pt):pt=t[144];let ut;t[145]!==m?.modal||t[146]!==P||t[147]!==ft?(ut=P&&ft!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:P,data:ft,setData:ce,className:m?.modal}):null,t[145]=m?.modal,t[146]=P,t[147]=ft,t[148]=ut):ut=t[148];let c;return t[149]!==D||t[150]!==pt||t[151]!==ut?(c=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[D,pt,ut]}),t[149]=D,t[150]=pt,t[151]=ut,t[152]=c):c=t[152],c}function Ei(e){return e.layer}function Ci(e){return e.position==="after"}function zi(e){return e.layer}function Li(e){return e.position==="before"}function qi(e){return e!==0}function Si(e){return e!==0}function $i(e){return`${e.id}`}function Di(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function Ti(e){return e.target}function Fi(e){return!b.checkIfNullOrUndefined(e.target)}function Ui(e){return e.target}function Bi(e){return!b.checkIfNullOrUndefined(e.target)}function Pi(e){return e.size}function Gi(e){return!b.checkIfNullOrUndefined(e.size)}function Wi(e){return e.size}function Xi(e){return!b.checkIfNullOrUndefined(e.size)}function Yi(e){return Ne.sum((e.qualitativeRange||[]).filter(Hi))||0}function Hi(e){return!b.checkIfNullOrUndefined(e)}function Ji(e){return e.target}function Ki(e){return!b.checkIfNullOrUndefined(e.target)}function Qi(e){return e.target}function Zi(e){return!b.checkIfNullOrUndefined(e.target)}function _i(e){return e.size}function tn(e){return!b.checkIfNullOrUndefined(e.size)}function en(e){return e.size}function nn(e){return!b.checkIfNullOrUndefined(e.size)}function an(e){const t=a.compilerRuntimeExports.c(137),{data:i,graphTitle:kt,barColor:ae,barPadding:Wt,showTicks:Rt,leftMargin:V,rightMargin:Xt,topMargin:Yt,bottomMargin:se,truncateBy:Ot,showLabels:le,showValues:de,backgroundColor:Ht,suffix:re,prefix:ge,sources:yt,graphDescription:bt,height:It,width:v,footNote:vt,colorDomain:it,colorLegendTitle:ct,padding:R,relativeHeight:Jt,tooltip:Nt,onSeriesMouseOver:Kt,refValues:xt,showColorScale:P,graphID:nt,maxValue:Vt,minValue:p,highlightedDataPoints:r,onSeriesMouseClick:m,valueColor:G,orientation:at,styles:g,classNames:o,qualitativeRangeColors:x,targetColor:mt,filterNA:st,targetStyle:E,measureBarWidthFactor:oe,animate:ue,dimmedOpacity:lt,precision:Qt,customLayers:Zt,naLabel:fe,graphDownload:ye,dataDownload:he,language:C,theme:W,sortData:dt,labelOrder:y,minHeight:ft,maxBarThickness:ce,maxNumberOfBars:N,minBarThickness:xe,ariaLabel:Et,resetSelectionOnDoubleClick:pe,detailsOnClick:_t,barAxisTitle:te,noOfTicks:d,targetLineThickness:Ct,timeline:z,hideAxisLine:ee}=e,zt=ae===void 0?Ee.Colors.primaryColors["blue-600"]:ae,Lt=Wt===void 0?.25:Wt,qt=Rt===void 0?!0:Rt,St=Ot===void 0?999:Ot,$t=le===void 0?!0:le,Dt=de===void 0?!0:de,ie=Ht===void 0?!1:Ht,Tt=re===void 0?"":re,Ft=ge===void 0?"":ge,Ut=P===void 0?!0:P;let wt;t[0]!==r?(wt=r===void 0?[]:r,t[0]=r,t[1]=wt):wt=t[1];const M=wt,L=at===void 0?"vertical":at,ht=mt===void 0?Ee.Colors.light.grays["gray-700"]:mt,rt=st===void 0?!0:st,jt=E===void 0?"line":E,ot=oe===void 0?.4:oe,q=ue===void 0?!1:ue,X=lt===void 0?.3:lt,Y=Qt===void 0?2:Qt;let S;t[2]!==Zt?(S=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=S):S=t[3];const H=S,J=fe===void 0?"NA":fe,k=ye===void 0?!1:ye,O=he===void 0?!1:he,j=C===void 0?"en":C,A=W===void 0?"light":W,K=ft===void 0?0:ft,Q=pe===void 0?!0:pe,Z=d===void 0?5:d,_=Ct===void 0?2:Ct;let $;t[4]!==z?($=z===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:z,t[4]=z,t[5]=$):$=t[5];const u=$,tt=ee===void 0?!1:ee,[D,pt]=B.useState(0),[ut,c]=B.useState(0),s=B.useRef(null),I=B.useRef(null),T=L==="horizontal"?Vi:ni,[w,At]=B.useState(u.autoplay);let et;if(t[6]!==i||t[7]!==u.dateFormat){let h;t[9]!==u.dateFormat?(h=me=>Ce.parse(`${me.date}`,u.dateFormat||"yyyy",new Date).getTime(),t[9]=u.dateFormat,t[10]=h):h=t[10],et=[...new Set(i.filter(mn).map(h))],et.sort(xn),t[6]=i,t[7]=u.dateFormat,t[8]=et}else et=t[8];const f=et,[F,Bt]=B.useState(u.autoplay?0:f.length-1);let ne,Pt;t[11]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>{const h=new ResizeObserver(me=>{pt(me[0].target.clientWidth||620),c(me[0].target.clientHeight||480)});return s.current&&h.observe(s.current),()=>h.disconnect()},Pt=[],t[11]=ne,t[12]=Pt):(ne=t[11],Pt=t[12]),B.useEffect(ne,Pt);let n,U;t[13]!==w||t[14]!==u.speed||t[15]!==f?(n=()=>{const h=setInterval(()=>{Bt(me=>me<f.length-1?me+1:0)},(u.speed||2)*1e3);return w||clearInterval(h),()=>clearInterval(h)},U=[f,w,u.speed],t[13]=w,t[14]=u.speed,t[15]=f,t[16]=n,t[17]=U):(n=t[16],U=t[17]),B.useEffect(n,U);const l=u.dateFormat||"yyyy";let gt;t[18]!==F||t[19]!==l||t[20]!==u.showOnlyActiveDate||t[21]!==f?(gt=Le.getSliderMarks(f,F,u.showOnlyActiveDate,l),t[18]=F,t[19]=l,t[20]=u.showOnlyActiveDate,t[21]=f,t[22]=gt):gt=t[22];const Gt=gt,be=o?.graphContainer,ve=g?.graphContainer;let we;t[23]!==o?.description||t[24]!==o?.title||t[25]!==i||t[26]!==O||t[27]!==bt||t[28]!==k||t[29]!==kt||t[30]!==g?.description||t[31]!==g?.title||t[32]!==v?(we=kt||bt||k||O?a.jsxRuntimeExports.jsx(ei.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:o?.title,description:o?.description},graphTitle:kt,graphDescription:bt,width:v,graphDownload:k?I:void 0,dataDownload:O?i.map(cn).filter(un).length>0?i.map(on).filter(rn):i.filter(ln):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=i,t[26]=O,t[27]=bt,t[28]=k,t[29]=kt,t[30]=g?.description,t[31]=g?.title,t[32]=v,t[33]=we):we=t[33];let je;t[34]!==F||t[35]!==Gt||t[36]!==w||t[37]!==u.enabled||t[38]!==f?(je=u.enabled&&f.length>0&&Gt?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{At(!w)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":w?"Click to pause animation":"Click to play animation",children:w?a.jsxRuntimeExports.jsx($e.Pause,{}):a.jsxRuntimeExports.jsx($e.Play,{})}),a.jsxRuntimeExports.jsx(Le.Nr,{min:f[0],max:f[f.length-1],marks:Gt,step:null,defaultValue:f[f.length-1],value:f[F],onChangeComplete:h=>{Bt(f.indexOf(h))},onChange:h=>{Bt(f.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=F,t[35]=Gt,t[36]=w,t[37]=u.enabled,t[38]=f,t[39]=je):je=t[39];let Ae;t[40]!==o?.colorLegend||t[41]!==it||t[42]!==ct||t[43]!==i||t[44]!==x||t[45]!==Ut||t[46]!==A||t[47]!==v?(Ae=Ut&&i.filter(sn).length!==0&&it&&i.length>0?a.jsxRuntimeExports.jsx(ii.ColorLegend,{width:v,colorLegendTitle:ct,colors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,colorDomain:it,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=it,t[42]=ct,t[43]=i,t[44]=x,t[45]=Ut,t[46]=A,t[47]=v,t[48]=Ae):Ae=t[48];let Me;t[49]!==i.length?(Me=i.length===0&&a.jsxRuntimeExports.jsx(_e.EmptyState,{}),t[49]=i.length,t[50]=Me):Me=t[50];let ke;t[51]!==T||t[52]!==q||t[53]!==te||t[54]!==zt||t[55]!==Lt||t[56]!==se||t[57]!==o||t[58]!==H||t[59]!==i||t[60]!==_t||t[61]!==X||t[62]!==rt||t[63]!==tt||t[64]!==M||t[65]!==F||t[66]!==y||t[67]!==j||t[68]!==V||t[69]!==ce||t[70]!==N||t[71]!==Vt||t[72]!==ot||t[73]!==xe||t[74]!==p||t[75]!==J||t[76]!==Z||t[77]!==m||t[78]!==Kt||t[79]!==L||t[80]!==Y||t[81]!==Ft||t[82]!==x||t[83]!==xt||t[84]!==Q||t[85]!==Xt||t[86]!==$t||t[87]!==qt||t[88]!==Dt||t[89]!==dt||t[90]!==g||t[91]!==Tt||t[92]!==ut||t[93]!==D||t[94]!==ht||t[95]!==_||t[96]!==jt||t[97]!==A||t[98]!==u.dateFormat||t[99]!==u.enabled||t[100]!==Nt||t[101]!==Yt||t[102]!==St||t[103]!==f||t[104]!==G?(ke=D&&ut&&i.length>0?a.jsxRuntimeExports.jsx(T,{hideAxisLine:tt,data:dt?He.orderBy(Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?dt==="asc"?(L==="horizontal"?1:-1)*(1/0):(L==="horizontal"?-1:1)*(1/0):h.size],[dt]).filter((h,me)=>N?me<N:!0):Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h).filter((h,me)=>N?me<N:!0),barColor:zt,targetColor:ht,width:D,refValues:xt,height:ut,suffix:Tt,prefix:Ft,barPadding:Lt,showLabels:$t,showValues:Dt,showTicks:qt,truncateBy:St,leftMargin:V,rightMargin:Xt,qualitativeRangeColors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,topMargin:Yt,bottomMargin:se,tooltip:Nt,onSeriesMouseOver:Kt,maxValue:Vt,minValue:p,highlightedDataPoints:M,onSeriesMouseClick:m,labelOrder:y,maxBarThickness:ce,minBarThickness:xe,resetSelectionOnDoubleClick:Q,detailsOnClick:_t,barAxisTitle:te,noOfTicks:Z,valueColor:G,styles:g,classNames:o,targetStyle:jt,dimmedOpacity:X,measureBarWidthFactor:ot,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},precision:Y,customLayers:H,naLabel:J,targetLineThickness:_,rtl:j==="ar"||j==="he"}):null,t[51]=T,t[52]=q,t[53]=te,t[54]=zt,t[55]=Lt,t[56]=se,t[57]=o,t[58]=H,t[59]=i,t[60]=_t,t[61]=X,t[62]=rt,t[63]=tt,t[64]=M,t[65]=F,t[66]=y,t[67]=j,t[68]=V,t[69]=ce,t[70]=N,t[71]=Vt,t[72]=ot,t[73]=xe,t[74]=p,t[75]=J,t[76]=Z,t[77]=m,t[78]=Kt,t[79]=L,t[80]=Y,t[81]=Ft,t[82]=x,t[83]=xt,t[84]=Q,t[85]=Xt,t[86]=$t,t[87]=qt,t[88]=Dt,t[89]=dt,t[90]=g,t[91]=Tt,t[92]=ut,t[93]=D,t[94]=ht,t[95]=_,t[96]=jt,t[97]=A,t[98]=u.dateFormat,t[99]=u.enabled,t[100]=Nt,t[101]=Yt,t[102]=St,t[103]=f,t[104]=G,t[105]=ke):ke=t[105];let Re;t[106]!==Me||t[107]!==ke?(Re=a.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:s,children:[Me,ke]}),t[106]=Me,t[107]=ke,t[108]=Re):Re=t[108];let Oe;t[109]!==Ae||t[110]!==Re?(Oe=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[Ae,Re]}),t[109]=Ae,t[110]=Re,t[111]=Oe):Oe=t[111];let Ie;t[112]!==o?.footnote||t[113]!==o?.source||t[114]!==vt||t[115]!==yt||t[116]!==g?.footnote||t[117]!==g?.source||t[118]!==v?(Ie=yt||vt?a.jsxRuntimeExports.jsx(ti.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:yt,footNote:vt,width:v}):null,t[112]=o?.footnote,t[113]=o?.source,t[114]=vt,t[115]=yt,t[116]=g?.footnote,t[117]=g?.source,t[118]=v,t[119]=Ie):Ie=t[119];let Ve;return t[120]!==Et||t[121]!==ie||t[122]!==nt||t[123]!==It||t[124]!==j||t[125]!==K||t[126]!==R||t[127]!==Jt||t[128]!==be||t[129]!==ve||t[130]!==we||t[131]!==je||t[132]!==Oe||t[133]!==Ie||t[134]!==A||t[135]!==v?(Ve=a.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:be,style:ve,id:nt,ref:I,"aria-label":Et,backgroundColor:ie,theme:A,language:j,minHeight:K,width:v,height:It,relativeHeight:Jt,padding:R,children:[we,je,Oe,Ie]}),t[120]=Et,t[121]=ie,t[122]=nt,t[123]=It,t[124]=j,t[125]=K,t[126]=R,t[127]=Jt,t[128]=be,t[129]=ve,t[130]=we,t[131]=je,t[132]=Oe,t[133]=Ie,t[134]=A,t[135]=v,t[136]=Ve):Ve=t[136],Ve}function sn(e){return e.qualitativeRange}function ln(e){return e!==void 0}function rn(e){return e!==void 0}function on(e){return e.data}function un(e){return e!==void 0}function cn(e){return e.data}function xn(e,t){return e-t}function mn(e){return e.date}exports.BulletChart=an;
2
2
  //# sourceMappingURL=BulletChart.cjs.map