@undp/data-viz 2.1.1 → 2.1.2

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 (80) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +129 -120
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BiVariateChoroplethMap.cjs +1 -1
  6. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  7. package/dist/BiVariateChoroplethMap.js +49 -46
  8. package/dist/BiVariateChoroplethMap.js.map +1 -1
  9. package/dist/BulletChart.cjs +1 -1
  10. package/dist/BulletChart.cjs.map +1 -1
  11. package/dist/BulletChart.d.ts +11 -0
  12. package/dist/BulletChart.js +747 -700
  13. package/dist/BulletChart.js.map +1 -1
  14. package/dist/ButterflyChart.cjs +1 -1
  15. package/dist/ButterflyChart.cjs.map +1 -1
  16. package/dist/ButterflyChart.js +7 -4
  17. package/dist/ButterflyChart.js.map +1 -1
  18. package/dist/ChoroplethMap.cjs +1 -1
  19. package/dist/ChoroplethMap.cjs.map +1 -1
  20. package/dist/ChoroplethMap.js +52 -49
  21. package/dist/ChoroplethMap.js.map +1 -1
  22. package/dist/DotDensityMap.cjs +1 -1
  23. package/dist/DotDensityMap.cjs.map +1 -1
  24. package/dist/DotDensityMap.js +37 -34
  25. package/dist/DotDensityMap.js.map +1 -1
  26. package/dist/DumbbellChart.cjs +1 -1
  27. package/dist/DumbbellChart.cjs.map +1 -1
  28. package/dist/DumbbellChart.js +41 -38
  29. package/dist/DumbbellChart.js.map +1 -1
  30. package/dist/GraphEl-YKUlz-37.cjs +2 -0
  31. package/dist/GraphEl-YKUlz-37.cjs.map +1 -0
  32. package/dist/{GraphEl-DEzobeOM.js → GraphEl-sVZvlyWe.js} +2 -1
  33. package/dist/GraphEl-sVZvlyWe.js.map +1 -0
  34. package/dist/GriddedGraphs.cjs +1 -1
  35. package/dist/GriddedGraphs.js +2 -2
  36. package/dist/HybridMap.cjs +1 -1
  37. package/dist/HybridMap.cjs.map +1 -1
  38. package/dist/HybridMap.js +62 -59
  39. package/dist/HybridMap.js.map +1 -1
  40. package/dist/ScatterPlot.cjs +1 -1
  41. package/dist/ScatterPlot.cjs.map +1 -1
  42. package/dist/ScatterPlot.js +7 -4
  43. package/dist/ScatterPlot.js.map +1 -1
  44. package/dist/SingleGraphDashboard.cjs +1 -1
  45. package/dist/SingleGraphDashboard.js +2 -2
  46. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  47. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  48. package/dist/Types.d.ts +1 -0
  49. package/dist/ensureCompleteData-DS7gCvVd.js +122 -0
  50. package/dist/ensureCompleteData-DS7gCvVd.js.map +1 -0
  51. package/dist/ensureCompleteData-Oib-vGb0.cjs +2 -0
  52. package/dist/ensureCompleteData-Oib-vGb0.cjs.map +1 -0
  53. package/dist/getSchema.cjs +1 -1
  54. package/dist/getSchema.cjs.map +1 -1
  55. package/dist/getSchema.js +15 -15
  56. package/dist/getSchema.js.map +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.ts +3 -0
  59. package/dist/index.js +2 -2
  60. package/dist/transformData.cjs +1 -1
  61. package/dist/transformData.js +2 -2
  62. package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
  63. package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
  64. package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
  65. package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
  66. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
  67. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
  68. package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
  69. package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
  70. package/package.json +1 -1
  71. package/dist/GraphEl-B16EYkko.cjs +0 -2
  72. package/dist/GraphEl-B16EYkko.cjs.map +0 -1
  73. package/dist/GraphEl-DEzobeOM.js.map +0 -1
  74. package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
  75. package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
  76. package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
  77. package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
  78. package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
  79. package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
  80. package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, 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 { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\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 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 width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\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 <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 </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .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 color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n 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 as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {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 d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\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={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className='text-sm'\r\n style={{ textAnchor: 'start', fill: labelColor || '#000' }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\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 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // 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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n } = 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(data.map(d => parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime())),\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 const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // 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 return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === 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 colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","parse","Date","getTime","Set","sort","_temp","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp2","t36","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","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_7","date","format","_temp8","sequentialColors","max","_temp9","_temp0","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_9","d_8","NAME","d_4","d_3","d_2","d_6","d_5","d_0","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAAC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIN,IAAG,GAAGO,EAAC,IAAK,GAAGC,IAAIC,GAAEH,CAAC,IAAIA,IAAIN,IAAGU,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDF,GAAE,cAAcH;AAChB,SAASU,GAAE,GAAG;AACZ,SAAOR,GAAE,SAAS,CAAC;AACrB;AACA,IAAIY,KAAIX;AACR,MAAMY,KAAIC,GAAE,WAAW,CAAC,GAAGX,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EAAE;AAChB,MAAIV,GAAGC,GAAGC,GAAGS;AACb,EAAAZ,EAAE,CAAC,MAAM,KAAK;AAAA,IACZ,WAAWC;AAAA,IACX,SAASE;AAAA,IACT,aAAaS;AAAA,IACb,GAAGV;AAAA,EACP,IAAM,GAAGF,EAAE,CAAC,IAAI,GAAGA,EAAE,CAAC,IAAIC,GAAGD,EAAE,CAAC,IAAIE,GAAGF,EAAE,CAAC,IAAIG,GAAGH,EAAE,CAAC,IAAIY,MAAMX,IAAID,EAAE,CAAC,GAAGE,IAAIF,EAA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,IAAAxH,SAAAiI,IAAAjI,SAAAuI,IAAAvI,SAAAkJ,IAAAlJ,SAAAmC,IAAAnC,SAAAvK,GAAAuK,SAAAsJ,MAAAA,KAAAtJ,EAAA,GAAA,GA/KjBsJ;AA+KiB;AA/Sd,SAAAN,GAAAQ,GAAA;AAAA,SAqQ8E5U,KAAM;AAAI;AArQxF,SAAAmU,GAAAU,GAAA;AAAA,SAqQqC7U,EAACW;AAAO;AArQ7C,SAAAqT,GAAA1L,GAAA;AAAA,SAmN4BA,EAAEE,WAAWsM,SAAU;AAAY;AAnN/D,SAAA1B,GAAA2B,GAAA;AAAA,SAiK4B/U,MAAMgD;AAAS;AAjK3C,SAAAmQ,GAAA6B,GAAA;AAAA,SAgK6ChV,MAAMgD;AAAS;AAhK5D,SAAAkQ,GAAA+B,GAAA;AAAA,SAgKyBjV,EAACM;AAAK;AAhK/B,SAAA2S,GAAAiC,GAAA;AAAA,SA+J2ClV,MAAMgD;AAAS;AA/J1D,SAAAgQ,GAAAmC,GAAA;AAAA,SA+JuBnV,EAACM;AAAK;AA/J7B,SAAAmQ,GAAA2E,GAAA;AAAA,SAkFiBpV,EAACR;AAA+B;AAlFjD,SAAAwQ,GAAA9Q,GAAAmW,GAAA;AAAA,SAmEkBnW,IAAImW;AAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, 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 { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\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 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 width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\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 <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 </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .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 color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n 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 as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {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 d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\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={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className='text-sm'\r\n style={{ textAnchor: 'start', fill: labelColor || '#000' }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\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 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // 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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n } = 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 const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // 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 return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === 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 colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_2","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_8","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIP,IAAG,GAAGQ,EAAC,IAAKJ,GAAGK,IAAIC,GAAEH,CAAC,IAAIA,IAAIP,IAAGW,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,GAAE,cAAcH;AAChB,SAASW,GAAEN,GAAG;AACZ,SAAOH,GAAE,SAASG,CAAC;AACrB;AACA,IAAIU,KAAIZ;AACR,MAAMa,KAAIC,GAAE,WAAW,CAACZ,GAAGC,MAAM;AAC/B,QAAMC,IAAIW,GAAE,EAAE,EA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2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),_t=require("./parse-hMnG_lRV.cjs"),L=require("react"),ei=require("./getSliderMarks-BmADcPQt.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-uUdw6wJL.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),_=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-CMF5g-C3.cjs"),oi=require("./Axis-DxRV2yMi.cjs"),si=require("./AxisTitle-sS5bLLR7.cjs"),hi=require("./XTicksAndGridLines-B6CELS7q.cjs"),li=require("./ReferenceLine-BH0qdf4R.cjs"),gi=require("./RegressionLine-BOTTNSrr.cjs"),yi=require("./YTicksAndGridLines-4pxTRlRK.cjs"),vi=require("./index-B_sAFsEV.cjs"),bi=require("./DetailsModal-BN0HDFlV.cjs"),ji=require("./pow-DgrUorRi.cjs"),ri=require("./linear-BwPAspcq.cjs"),Ai=require("./delaunay-rcy0HhZi.cjs"),Oi=require("./use-in-view-QcfiW0w3.cjs"),Xt=require("./proxy-BxvUI_9l.cjs"),ai=require("./index-DG2bgAva.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),Ei=require("./EmptyState-sAEZ_5rU.cjs"),ci=require("./index-DRXx7m-C.cjs"),wi=require("./ensureCompleteData-I6nYmT8E.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-d8A46BK2.cjs");function Si(i){const e=n.compilerRuntimeExports.c(216),{data:o,width:ee,height:I,showLabels:Ue,colors:x,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:U,leftMargin:te,rightMargin:rt,topMargin:jt,bottomMargin:Vt,tooltip:at,onSeriesMouseOver:ie,refXValues:At,refYValues:Ot,highlightAreaSettings:Ct,selectedColor:we,highlightedDataPoints:G,maxRadiusValue:ct,maxXValue:ut,minXValue:k,maxYValue:Ge,minYValue:A,onSeriesMouseClick:N,rtl:He,annotations:We,customHighlightAreaSettings:Se,regressionLine:ne,resetSelectionOnDoubleClick:Le,detailsOnClick:$,noOfXTicks:Be,noOfYTicks:ze,labelColor:Ne,xSuffix:$e,ySuffix:Me,xPrefix:Ve,yPrefix:oe,styles:s,classNames:l,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,xt=L.useRef(null);let ft;e[0]!==a.amount||e[1]!==a.once?(ft={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=ft):ft=e[2];const b=Oi.useInView(xt,ft),[w,qe]=L.useState(void 0),[P,Je]=L.useState(void 0),[mt,se]=L.useState(void 0),[p,f]=L.useState(void 0),Rt=g?Vt+50:Vt,kt=U?te+30:te;let dt;e[3]!==rt||e[4]!==Rt||e[5]!==kt||e[6]!==jt?(dt={top:jt,bottom:Rt,left:kt,right:rt},e[3]=rt,e[4]=Rt,e[5]=kt,e[6]=jt,e[7]=dt):dt=e[7];const d=dt;let H,le,re,ae,ce,ue,X,xe,fe,me,W,de,B,pe,z,he,Y,J;if(e[8]!==a||e[9]!==We||e[10]!==l?.graphObjectValues||e[11]!==l?.regLine||e[12]!==l?.xAxis?.axis||e[13]!==l?.xAxis?.gridLines||e[14]!==l?.xAxis?.labels||e[15]!==l?.xAxis?.title||e[16]!==l?.yAxis?.gridLines||e[17]!==l?.yAxis?.labels||e[18]!==l?.yAxis?.title||e[19]!==R||e[20]!==x||e[21]!==Se||e[22]!==q||e[23]!==o||e[24]!==$||e[25]!==M||e[26]!==I||e[27]!==Ct||e[28]!==G||e[29]!==b||e[30]!==Ne||e[31]!==te||e[32]!==d.bottom||e[33]!==d.left||e[34]!==d.right||e[35]!==d.top||e[36]!==ct||e[37]!==ut||e[38]!==Ge||e[39]!==k||e[40]!==A||e[41]!==P||e[42]!==w||e[43]!==Be||e[44]!==ze||e[45]!==N||e[46]!==ie||e[47]!==V||e[48]!==T||e[49]!==At||e[50]!==Ot||e[51]!==ne||e[52]!==Le||e[53]!==He||e[54]!==we||e[55]!==Ue||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ee||e[66]!==g||e[67]!==Ve||e[68]!==$e||e[69]!==U||e[70]!==oe||e[71]!==Me){const Q=o.map(_i),j=ee-d.left-d.right,y=I-d.top-d.bottom,E=o.filter(Zi).length!==o.length?ji.sqrt().domain([0,ct]).range([.25,T]).nice():void 0,Ke=Q.filter(Qi).length===0?Q:di.orderBy(Q.filter(Ki),"radius","desc"),c=ri.linear().domain([k,ut]).range([0,j]).nice(),m=ri.linear().domain([A,Ge]).range([y,0]).nice(),Ae=c.ticks(Be),Et=m.ticks(ze),qt=Ai.Delaunay.from(Ke.filter(Ji),t=>c(t.x),t=>m(t.y)).voronoi([0,0,j<0?0:j,y<0?0:y]),Dt=ii.linearRegression(o.filter(zi).map(t=>[c(t.x),m(t.y)])),wt=ii.linearRegressionLine(Dt);le=Xt.motion.svg,xe=`${ee}px`,fe=`${I}px`,me=`0 0 ${ee} ${I}`,W="ltr",de=xt,re=`translate(${d.left},${d.top})`;let Ie;e[90]!==a||e[91]!==Se||e[92]!==b||e[93]!==c||e[94]!==m?(Ie=n.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:Se,scaleX:c,scaleY:m,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=Se,e[92]=b,e[93]=c,e[94]=m,e[95]=Ie):Ie=e[95],ae=n.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[n.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:Ct,width:j,height:y,scaleX:c,scaleY:m,animate:a,isInView:b},"highlight-area"),Ie]});const pt=s?.yAxis?.gridLines,ht=s?.yAxis?.labels;let Te;e[96]!==pt||e[97]!==ht?(Te={gridLines:pt,labels:ht},e[96]=pt,e[97]=ht,e[98]=Te):Te=e[98];const gt=l?.yAxis?.gridLines,Qe=l?.yAxis?.labels;let r;e[99]!==gt||e[100]!==Qe?(r={gridLines:gt,labels:Qe},e[99]=gt,e[100]=Qe,e[101]=r):r=e[101];const Ze=m(A<0?0:A),It=m(A<0?0:A),_e=j+d.right,Tt=A<0?0:A;let O;e[102]!==V||e[103]!==Tt||e[104]!==oe||e[105]!==Me?(O=ni.numberFormattingFunction(Tt,"NA",V,oe,Me),e[102]=V,e[103]=Tt,e[104]=oe,e[105]=Me,e[106]=O):O=e[106];const Pt=m(A<0?0:A);let F;e[107]!==Pt?(F={x:0,y:Pt,dy:"0.33em",dx:-4},e[107]=Pt,e[108]=F):F=e[108];const u=l?.xAxis?.axis,D=l?.yAxis?.labels;let Oe;e[109]!==u||e[110]!==D?(Oe={axis:u,label:D},e[109]=u,e[110]=D,e[111]=Oe):Oe=e[111];const yt=s?.xAxis?.axis;let et;e[112]!==s?.yAxis?.labels?(et=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=et):et=e[113];let Ce;e[114]!==et?(Ce={textAnchor:"end",...et},e[114]=et,e[115]=Ce):Ce=e[115];let Pe;e[116]!==yt||e[117]!==Ce?(Pe={axis:yt,label:Ce},e[116]=yt,e[117]=Ce,e[118]=Pe):Pe=e[118];let Xe;e[119]!==Ze||e[120]!==It||e[121]!==_e||e[122]!==O||e[123]!==F||e[124]!==Oe||e[125]!==Pe?(Xe=n.jsxRuntimeExports.jsx(oi.Axis,{y1:Ze,y2:It,x1:0,x2:_e,label:O,labelPos:F,classNames:Oe,styles:Pe}),e[119]=Ze,e[120]=It,e[121]=_e,e[122]=O,e[123]=F,e[124]=Oe,e[125]=Pe,e[126]=Xe):Xe=e[126];const tt=0-te-15,it=y/2,nt=s?.yAxis?.title,vt=l?.yAxis?.title;let Ye;e[127]!==tt||e[128]!==it||e[129]!==nt||e[130]!==vt||e[131]!==U?(Ye=n.jsxRuntimeExports.jsx(si.AxisTitle,{x:tt,y:it,style:nt,className:vt,text:U,rotate90:!0}),e[127]=tt,e[128]=it,e[129]=nt,e[130]=vt,e[131]=U,e[132]=Ye):Ye=e[132],ce=n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Et.filter(Bi),y:Et.filter(Wi).map(t=>m(t)),x1:0,x2:j+d.right,styles:Te,classNames:r,suffix:Me,prefix:oe,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Xe,Ye]});const ot=s?.xAxis?.gridLines,bt=s?.xAxis?.labels;let st;e[133]!==ot||e[134]!==bt?(st={gridLines:ot,labels:bt},e[133]=ot,e[134]=bt,e[135]=st):st=e[135];const Re=l?.xAxis?.gridLines,ke=l?.xAxis?.labels;let Z;e[136]!==Re||e[137]!==ke?(Z={gridLines:Re,labels:ke},e[136]=Re,e[137]=ke,e[138]=Z):Z=e[138];const Ee=c(k<0?0:k),lt=c(k<0?0:k),h=k<0?0:k;let S;e[139]!==V||e[140]!==h||e[141]!==Ve||e[142]!==$e?(S=ni.numberFormattingFunction(h,"NA",V,Ve,$e),e[139]=V,e[140]=h,e[141]=Ve,e[142]=$e,e[143]=S):S=e[143];const Ut=c(k<0?0:k);let St;e[144]!==y||e[145]!==Ut?(St={x:Ut,y,dy:"1em",dx:0},e[144]=y,e[145]=Ut,e[146]=St):St=e[146];const Gt=l?.xAxis?.axis,Ht=l?.yAxis?.labels;let Lt;e[147]!==Gt||e[148]!==Ht?(Lt={axis:Gt,label:Ht},e[147]=Gt,e[148]=Ht,e[149]=Lt):Lt=e[149];const Wt=s?.xAxis?.axis;let Nt;e[150]!==s?.yAxis?.labels?(Nt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Nt):Nt=e[151];let $t;e[152]!==Nt?($t={textAnchor:"middle",...Nt},e[152]=Nt,e[153]=$t):$t=e[153];let Mt;e[154]!==Wt||e[155]!==$t?(Mt={axis:Wt,label:$t},e[154]=Wt,e[155]=$t,e[156]=Mt):Mt=e[156];let Yt;e[157]!==y||e[158]!==Ee||e[159]!==lt||e[160]!==S||e[161]!==St||e[162]!==Lt||e[163]!==Mt?(Yt=n.jsxRuntimeExports.jsx(oi.Axis,{x1:Ee,x2:lt,y1:0,y2:y,label:S,labelPos:St,classNames:Lt,styles:Mt}),e[157]=y,e[158]=Ee,e[159]=lt,e[160]=S,e[161]=St,e[162]=Lt,e[163]=Mt,e[164]=Yt):Yt=e[164];const Bt=j/2,zt=y+30,Jt=s?.xAxis?.title,Kt=l?.xAxis?.title;let Ft;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Ft=n.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Ft):Ft=e[170],ue=n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:Ae.filter(Hi),x:Ae.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:st,classNames:Z,suffix:$e,prefix:Ve,labelType:"primary",showGridLines:!0,precision:V}),Yt,Ft]}),e[171]!==q?(X=q.filter(Ui).map(Fi),e[171]=q,e[172]=X):X=e[172],H=ai.AnimatePresence,B=Ke.filter(Yi).map((t,Fe)=>n.jsxRuntimeExports.jsx("path",{d:qt.renderCell(Ke.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{qe(t),f(C.clientY),se(C.clientX),ie?.(t)},onMouseMove:C=>{qe(t),f(C.clientY),se(C.clientX)},onMouseLeave:()=>{qe(void 0),se(void 0),f(void 0),ie?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(P,t)&&Le?(Je(void 0),N?.(void 0)):(Je(t),N?.(t)))}},`tesselation_${t.label||Fe}`)),pe=Ke.filter(Xi).map((t,Fe)=>n.jsxRuntimeExports.jsxs(Xt.motion.g,{variants:{initial:{x:c(t.x),y:m(t.y),opacity:we?t.color&&x[R.indexOf(`${t.color}`)]===we?1:M:w?w.id===t.id?1:M:G.length!==0?G.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:m(t.y),opacity:we?t.color&&x[R.indexOf(`${t.color}`)]===we?1:M:w?w.id===t.id?1:M:G.length!==0?G.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{qe(t),f(C.clientY),se(C.clientX),ie?.(t)},onMouseMove:C=>{qe(t),f(C.clientY),se(C.clientX)},onMouseLeave:()=>{qe(void 0),se(void 0),f(void 0),ie?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(P,t)&&Le?(Je(void 0),N?.(void 0)):(Je(t),N?.(t)))},children:[n.jsxRuntimeExports.jsx(Xt.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:o.filter(Pi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,stroke:o.filter(Ti).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray},whileInView:{r:E?E(t.radius||0):T,fill:o.filter(Ii).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,stroke:o.filter(Di).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),Ue&&!v.checkIfNullOrUndefined(t.label)?n.jsxRuntimeExports.jsx(Xt.motion.text,{style:{...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:E?E(t.radius||0):T,opacity:0,fill:Ne||(o.filter(qi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray)},whileInView:{x:E?E(t.radius||0):T,opacity:1,fill:Ne||(o.filter(Vi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):G.length!==0&&!v.checkIfNullOrUndefined(t.label)&&G.indexOf(t.label)!==-1?n.jsxRuntimeExports.jsx(Xt.motion.text,{style:{...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",l?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:E?E(t.radius||0):T,opacity:0,fill:Ne||(o.filter(Mi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray)},whileInView:{x:E?E(t.radius||0):T,opacity:1,fill:Ne||(o.filter($i).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||Fe}`)),z=At.map((t,Fe)=>n.jsxRuntimeExports.jsx(li.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>j*.75||He?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe)),he=Ot.map((t,Fe)=>n.jsxRuntimeExports.jsx(li.RefLineY,{text:t.text,color:t.color,y:m(t.value),x1:0,x2:j,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe));const Qt=We.map((t,Fe)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?m(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?m(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:He?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:He?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):j+d.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return n.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe)});e[173]!==Qt?(Y=n.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=Y):Y=e[174],J=ne?n.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:j,y1:wt(0),y2:wt(j),graphHeight:y,graphWidth:j,className:l?.regLine,style:s?.regLine,color:typeof ne=="string"?ne:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=We,e[10]=l?.graphObjectValues,e[11]=l?.regLine,e[12]=l?.xAxis?.axis,e[13]=l?.xAxis?.gridLines,e[14]=l?.xAxis?.labels,e[15]=l?.xAxis?.title,e[16]=l?.yAxis?.gridLines,e[17]=l?.yAxis?.labels,e[18]=l?.yAxis?.title,e[19]=R,e[20]=x,e[21]=Se,e[22]=q,e[23]=o,e[24]=$,e[25]=M,e[26]=I,e[27]=Ct,e[28]=G,e[29]=b,e[30]=Ne,e[31]=te,e[32]=d.bottom,e[33]=d.left,e[34]=d.right,e[35]=d.top,e[36]=ct,e[37]=ut,e[38]=Ge,e[39]=k,e[40]=A,e[41]=P,e[42]=w,e[43]=Be,e[44]=ze,e[45]=N,e[46]=ie,e[47]=V,e[48]=T,e[49]=At,e[50]=Ot,e[51]=ne,e[52]=Le,e[53]=He,e[54]=we,e[55]=Ue,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ee,e[66]=g,e[67]=Ve,e[68]=$e,e[69]=U,e[70]=oe,e[71]=Me,e[72]=H,e[73]=le,e[74]=re,e[75]=ae,e[76]=ce,e[77]=ue,e[78]=X,e[79]=xe,e[80]=fe,e[81]=me,e[82]=W,e[83]=de,e[84]=B,e[85]=pe,e[86]=z,e[87]=he,e[88]=Y,e[89]=J}else H=e[72],le=e[73],re=e[74],ae=e[75],ce=e[76],ue=e[77],X=e[78],xe=e[79],fe=e[80],me=e[81],W=e[82],de=e[83],B=e[84],pe=e[85],z=e[86],he=e[87],Y=e[88],J=e[89];let ge;e[175]!==H||e[176]!==B||e[177]!==pe||e[178]!==z||e[179]!==he||e[180]!==Y||e[181]!==J?(ge=n.jsxRuntimeExports.jsxs(H,{children:[B,pe,z,he,Y,J]}),e[175]=H,e[176]=B,e[177]=pe,e[178]=z,e[179]=he,e[180]=Y,e[181]=J,e[182]=ge):ge=e[182];let ye;e[183]!==q?(ye=q.filter(Ni).map(Li),e[183]=q,e[184]=ye):ye=e[184];let ve;e[185]!==re||e[186]!==ae||e[187]!==ce||e[188]!==ue||e[189]!==X||e[190]!==ge||e[191]!==ye?(ve=n.jsxRuntimeExports.jsxs("g",{transform:re,children:[ae,ce,ue,X,ge,ye]}),e[185]=re,e[186]=ae,e[187]=ce,e[188]=ue,e[189]=X,e[190]=ge,e[191]=ye,e[192]=ve):ve=e[192];let be;e[193]!==le||e[194]!==xe||e[195]!==fe||e[196]!==me||e[197]!==W||e[198]!==de||e[199]!==ve?(be=n.jsxRuntimeExports.jsx(le,{width:xe,height:fe,viewBox:me,direction:W,ref:de,children:ve}),e[193]=le,e[194]=xe,e[195]=fe,e[196]=me,e[197]=W,e[198]=de,e[199]=ve,e[200]=be):be=e[200];let je;e[201]!==l?.tooltip||e[202]!==mt||e[203]!==p||e[204]!==w||e[205]!==s?.tooltip||e[206]!==at?(je=w&&at&&mt&&p?n.jsxRuntimeExports.jsx(pi.Tooltip,{data:w,body:at,xPos:mt,yPos:p,backgroundStyle:s?.tooltip,className:l?.tooltip}):null,e[201]=l?.tooltip,e[202]=mt,e[203]=p,e[204]=w,e[205]=s?.tooltip,e[206]=at,e[207]=je):je=e[207];let K;e[208]!==l?.modal||e[209]!==$||e[210]!==P?(K=$&&P!==void 0?n.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:P,setData:Je,className:l?.modal}):null,e[208]=l?.modal,e[209]=$,e[210]=P,e[211]=K):K=e[211];let De;return e[212]!==be||e[213]!==je||e[214]!==K?(De=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[be,je,K]}),e[212]=be,e[213]=je,e[214]=K,e[215]=De):De=e[215],De}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=n.compilerRuntimeExports.c(130),{data:o,graphTitle:ee,colors:I,sources:Ue,graphDescription:x,showLabels:R,height:T,width:g,footNote:U,colorDomain:te,colorLegendTitle:rt,radius:jt,xAxisTitle:Vt,yAxisTitle:at,padding:ie,backgroundColor:At,leftMargin:Ot,rightMargin:Ct,topMargin:we,bottomMargin:G,tooltip:ct,relativeHeight:ut,onSeriesMouseOver:k,refXValues:Ge,refYValues:A,highlightAreaSettings:N,showColorScale:He,highlightedDataPoints:We,graphID:Se,maxRadiusValue:ne,maxXValue:Le,minXValue:$,maxYValue:Be,minYValue:ze,xSuffix:Ne,ySuffix:$e,xPrefix:Me,yPrefix:Ve,onSeriesMouseClick:oe,graphDownload:s,dataDownload:l,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:xt,theme:ft,regressionLine:b,ariaLabel:w,resetSelectionOnDoubleClick:qe,detailsOnClick:P,noOfXTicks:Je,noOfYTicks:mt,labelColor:se,styles:p,classNames:f,animate:Rt,dimmedOpacity:kt,precision:dt,customLayers:d,timeline:H}=i,le=R===void 0?!1:R,re=jt===void 0?5:jt,ae=Vt===void 0?"X Axis":Vt,ce=at===void 0?"Y Axis":at,ue=At===void 0?!1:At,X=Ot===void 0?0:Ot,xe=Ct===void 0?10:Ct,fe=we===void 0?20:we,me=G===void 0?50:G;let W;e[0]!==Ge?(W=Ge===void 0?[]:Ge,e[0]=Ge,e[1]=W):W=e[1];const de=W;let B;e[2]!==A?(B=A===void 0?[]:A,e[2]=A,e[3]=B):B=e[3];const pe=B;let z;e[4]!==N?(z=N===void 0?[]:N,e[4]=N,e[5]=z):z=e[5];const he=z,Y=He===void 0?!0:He;let J;e[6]!==We?(J=We===void 0?[]:We,e[6]=We,e[7]=J):J=e[7];const ge=J,ye=Ne===void 0?"":Ne,ve=$e===void 0?"":$e,be=Me===void 0?"":Me,je=Ve===void 0?"":Ve,K=s===void 0?!1:s,De=l===void 0?!1:l,Q=a===void 0?"en":a,j=M===void 0?!0:M,y=V===void 0?0:V;let E;e[8]!==q?(E=q===void 0?[]:q,e[8]=q,e[9]=E):E=e[9];const Ke=E;let c;e[10]!==xt?(c=xt===void 0?[]:xt,e[10]=xt,e[11]=c):c=e[11];const m=c,Ae=ft===void 0?"light":ft,Et=b===void 0?!1:b,qt=qe===void 0?!0:qe,Dt=Je===void 0?5:Je,wt=mt===void 0?5:mt,Ie=Rt===void 0?!1:Rt,pt=kt===void 0?.3:kt,ht=dt===void 0?2:dt;let Te;e[12]!==d?(Te=d===void 0?[]:d,e[12]=d,e[13]=Te):Te=e[13];const gt=Te;let Qe;e[14]!==H?(Qe=H===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:H,e[14]=H,e[15]=Qe):Qe=e[15];const r=Qe,[Ze,It]=L.useState(0),[_e,Tt]=L.useState(0),[O,Pt]=L.useState(r.autoplay);let F;if(e[16]!==o||e[17]!==r.dateFormat){let h;e[19]!==r.dateFormat?(h=S=>_t.parse(`${S}`,r.dateFormat||"yyyy",new Date).getTime(),e[19]=r.dateFormat,e[20]=h):h=e[20],F=[...new Set(o.map(h))],F.sort(Sn),e[16]=o,e[17]=r.dateFormat,e[18]=F}else F=e[18];const u=F,[D,Oe]=L.useState(r.autoplay?0:u.length-1),[yt,et]=L.useState(void 0),Ce=L.useRef(null),Pe=L.useRef(null);let Xe,tt;e[21]===Symbol.for("react.memo_cache_sentinel")?(Xe=()=>{const h=new ResizeObserver(S=>{It(S[0].target.clientWidth||620),Tt(S[0].target.clientHeight||480)});return Ce.current&&h.observe(Ce.current),()=>h.disconnect()},tt=[],e[21]=Xe,e[22]=tt):(Xe=e[21],tt=e[22]),L.useEffect(Xe,tt);let it,nt;e[23]!==O||e[24]!==r.speed||e[25]!==u?(it=()=>{const h=setInterval(()=>{Oe(S=>S<u.length-1?S+1:0)},(r.speed||2)*1e3);return O||clearInterval(h),()=>clearInterval(h)},nt=[u,O,r.speed],e[23]=O,e[24]=r.speed,e[25]=u,e[26]=it,e[27]=nt):(it=e[26],nt=e[27]),L.useEffect(it,nt);const vt=r.dateFormat||"yyyy";let Ye;e[28]!==D||e[29]!==vt||e[30]!==r.showOnlyActiveDate||e[31]!==u?(Ye=ei.getSliderMarks(u,D,r.showOnlyActiveDate,vt),e[28]=D,e[29]=vt,e[30]=r.showOnlyActiveDate,e[31]=u,e[32]=Ye):Ye=e[32];const ot=Ye,bt=f?.graphContainer,st=p?.graphContainer;let Re;e[33]!==f?.description||e[34]!==f?.title||e[35]!==o||e[36]!==De||e[37]!==x||e[38]!==K||e[39]!==ee||e[40]!==p?.description||e[41]!==p?.title||e[42]!==g?(Re=ee||x||K||De?n.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:f?.title,description:f?.description},graphTitle:ee,graphDescription:x,width:g,graphDownload:K?Pe:void 0,dataDownload:De?o.map(wn).filter(En).length>0?o.map(kn).filter(Rn):o.filter(Cn):null}):null,e[33]=f?.description,e[34]=f?.title,e[35]=o,e[36]=De,e[37]=x,e[38]=K,e[39]=ee,e[40]=p?.description,e[41]=p?.title,e[42]=g,e[43]=Re):Re=e[43];let ke;e[44]!==D||e[45]!==ot||e[46]!==O||e[47]!==r.enabled||e[48]!==u?(ke=r.enabled&&u.length>0&&ot?n.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[n.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?n.jsxRuntimeExports.jsx(ci.Pause,{}):n.jsxRuntimeExports.jsx(ci.Play,{})}),n.jsxRuntimeExports.jsx(ei.Nr,{min:u[0],max:u[u.length-1],marks:ot,step:null,defaultValue:u[u.length-1],value:u[D],onChangeComplete:h=>{Oe(u.indexOf(h))},onChange:h=>{Oe(u.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=ot,e[46]=O,e[47]=r.enabled,e[48]=u,e[49]=ke):ke=e[49];let Z;e[50]!==Ie||e[51]!==Ke||e[52]!==me||e[53]!==f||e[54]!==te||e[55]!==rt||e[56]!==I||e[57]!==m||e[58]!==gt||e[59]!==o||e[60]!==P||e[61]!==pt||e[62]!==he||e[63]!==ge||e[64]!==D||e[65]!==se||e[66]!==Q||e[67]!==X||e[68]!==ne||e[69]!==Le||e[70]!==Be||e[71]!==$||e[72]!==ze||e[73]!==Dt||e[74]!==wt||e[75]!==oe||e[76]!==k||e[77]!==ht||e[78]!==re||e[79]!==de||e[80]!==pe||e[81]!==Et||e[82]!==qt||e[83]!==xe||e[84]!==yt||e[85]!==Y||e[86]!==le||e[87]!==j||e[88]!==p||e[89]!==_e||e[90]!==Ze||e[91]!==Ae||e[92]!==r.dateFormat||e[93]!==r.enabled||e[94]!==ct||e[95]!==fe||e[96]!==u||e[97]!==g||e[98]!==ae||e[99]!==be||e[100]!==ye||e[101]!==ce||e[102]!==je||e[103]!==ve?(Z=o.length===0?n.jsxRuntimeExports.jsx(Ei.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Y&&o.filter(On).length!==0?n.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:rt,colors:I||_.Colors[Ae].categoricalColors.colors,colorDomain:te||ui.uniqBy(o,"color",!0),setSelectedColor:et,showNAColor:j,className:f?.colorLegend}):null,n.jsxRuntimeExports.jsx(xi.GraphArea,{ref:Ce,children:Ze&&_e?n.jsxRuntimeExports.jsx(Si,{data:wi.ensureCompleteDataForScatterPlot(o,r.dateFormat||"yyyy").filter(h=>r.enabled?h.date===_t.format(new Date(u[D]),r.dateFormat||"yyyy"):h),width:Ze,height:_e,colorDomain:o.filter(An).length===0?[]:te||ui.uniqBy(o,"color",!0),colors:o.filter(jn).length===0?I?[I]:[_.Colors.primaryColors["blue-600"]]:I||_.Colors[Ae].categoricalColors.colors,xAxisTitle:ae,yAxisTitle:ce,refXValues:de,refYValues:pe,showLabels:le,radius:re,leftMargin:X,rightMargin:xe,topMargin:fe,bottomMargin:me,tooltip:ct,onSeriesMouseOver:k,highlightAreaSettings:he,highlightedDataPoints:o.filter(bn).length===0?[]:ge,selectedColor:yt,maxRadiusValue:v.checkIfNullOrUndefined(ne)?Math.max(...o.map(vn).filter(yn)):ne,maxXValue:v.checkIfNullOrUndefined(Le)?Math.max(...o.map(gn).filter(hn))>0?Math.max(...o.map(pn).filter(dn)):0:Le,minXValue:v.checkIfNullOrUndefined($)?Math.min(...o.map(mn).filter(fn))>0?0:Math.min(...o.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Be)?Math.max(...o.map(cn).filter(an))>0?Math.max(...o.map(rn).filter(ln)):0:Be,minYValue:v.checkIfNullOrUndefined(ze)?Math.min(...o.map(sn).filter(on))>0?0:Math.min(...o.map(nn).filter(tn)):ze,onSeriesMouseClick:oe,rtl:Q==="he"||Q==="ar",annotations:Ke,customHighlightAreaSettings:m,regressionLine:Et,resetSelectionOnDoubleClick:qt,detailsOnClick:P,noOfXTicks:Dt,noOfYTicks:wt,labelColor:se,xSuffix:ye,ySuffix:ve,xPrefix:be,yPrefix:je,styles:p,classNames:f,animate:Ie===!0?{duration:.5,once:!0,amount:.5}:Ie||{duration:0,once:!0,amount:0},dimmedOpacity:pt,precision:ht,customLayers:gt}):null})]}),e[50]=Ie,e[51]=Ke,e[52]=me,e[53]=f,e[54]=te,e[55]=rt,e[56]=I,e[57]=m,e[58]=gt,e[59]=o,e[60]=P,e[61]=pt,e[62]=he,e[63]=ge,e[64]=D,e[65]=se,e[66]=Q,e[67]=X,e[68]=ne,e[69]=Le,e[70]=Be,e[71]=$,e[72]=ze,e[73]=Dt,e[74]=wt,e[75]=oe,e[76]=k,e[77]=ht,e[78]=re,e[79]=de,e[80]=pe,e[81]=Et,e[82]=qt,e[83]=xe,e[84]=yt,e[85]=Y,e[86]=le,e[87]=j,e[88]=p,e[89]=_e,e[90]=Ze,e[91]=Ae,e[92]=r.dateFormat,e[93]=r.enabled,e[94]=ct,e[95]=fe,e[96]=u,e[97]=g,e[98]=ae,e[99]=be,e[100]=ye,e[101]=ce,e[102]=je,e[103]=ve,e[104]=Z):Z=e[104];let Ee;e[105]!==f?.footnote||e[106]!==f?.source||e[107]!==U||e[108]!==Ue||e[109]!==p?.footnote||e[110]!==p?.source||e[111]!==g?(Ee=Ue||U?n.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:Ue,footNote:U,width:g}):null,e[105]=f?.footnote,e[106]=f?.source,e[107]=U,e[108]=Ue,e[109]=p?.footnote,e[110]=p?.source,e[111]=g,e[112]=Ee):Ee=e[112];let lt;return e[113]!==w||e[114]!==ue||e[115]!==Se||e[116]!==T||e[117]!==Q||e[118]!==y||e[119]!==ie||e[120]!==ut||e[121]!==bt||e[122]!==st||e[123]!==Re||e[124]!==ke||e[125]!==Z||e[126]!==Ee||e[127]!==Ae||e[128]!==g?(lt=n.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:bt,style:st,id:Se,ref:Pe,"aria-label":w,backgroundColor:ue,theme:Ae,language:Q,minHeight:y,width:g,height:T,relativeHeight:ut,padding:ie,children:[Re,ke,Z,Ee]}),e[113]=w,e[114]=ue,e[115]=Se,e[116]=T,e[117]=Q,e[118]=y,e[119]=ie,e[120]=ut,e[121]=bt,e[122]=st,e[123]=Re,e[124]=ke,e[125]=Z,e[126]=Ee,e[127]=Ae,e[128]=g,e[129]=lt):lt=e[129],lt}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function ln(i){return i!=null}function rn(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function jn(i){return i.color}function An(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function En(i){return i!==void 0}function wn(i){return i.data}function Sn(i,e){return i-e}exports.ScatterPlot=en;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),_t=require("./parse-hMnG_lRV.cjs"),L=require("react"),ei=require("./getSliderMarks-BmADcPQt.cjs"),ti=require("./index-DQA8q5sC.cjs"),di=require("./index-Cno4Q0YE.cjs"),ii=require("./simple-statistics-xm8c0LQQ.cjs"),pi=require("./Tooltip-uUdw6wJL.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),_=require("./Colors.cjs"),ni=require("./numberFormattingFunction-02t-wJta.cjs"),Zt=require("./customArea-CMF5g-C3.cjs"),oi=require("./Axis-DxRV2yMi.cjs"),si=require("./AxisTitle-sS5bLLR7.cjs"),hi=require("./XTicksAndGridLines-B6CELS7q.cjs"),ri=require("./ReferenceLine-BH0qdf4R.cjs"),gi=require("./RegressionLine-BOTTNSrr.cjs"),yi=require("./YTicksAndGridLines-4pxTRlRK.cjs"),vi=require("./index-B_sAFsEV.cjs"),bi=require("./DetailsModal-BN0HDFlV.cjs"),ji=require("./pow-DgrUorRi.cjs"),li=require("./linear-BwPAspcq.cjs"),Ai=require("./delaunay-rcy0HhZi.cjs"),Oi=require("./use-in-view-QcfiW0w3.cjs"),Xt=require("./proxy-BxvUI_9l.cjs"),ai=require("./index-DG2bgAva.cjs"),Ci=require("./GraphFooter.cjs"),Ri=require("./GraphHeader.cjs"),ki=require("./ColorLegendWithMouseOver.cjs"),Ei=require("./EmptyState-sAEZ_5rU.cjs"),ci=require("./index-DRXx7m-C.cjs"),wi=require("./ensureCompleteData-Oib-vGb0.cjs"),ui=require("./uniqBy-O05lp2S5.cjs"),xi=require("./GraphContainer-d8A46BK2.cjs");function Si(i){const e=n.compilerRuntimeExports.c(216),{data:o,width:ee,height:I,showLabels:Ue,colors:x,colorDomain:R,radius:T,xAxisTitle:g,yAxisTitle:U,leftMargin:te,rightMargin:lt,topMargin:jt,bottomMargin:Vt,tooltip:at,onSeriesMouseOver:ie,refXValues:At,refYValues:Ot,highlightAreaSettings:Ct,selectedColor:we,highlightedDataPoints:G,maxRadiusValue:ct,maxXValue:ut,minXValue:k,maxYValue:Ge,minYValue:A,onSeriesMouseClick:N,rtl:He,annotations:We,customHighlightAreaSettings:Se,regressionLine:ne,resetSelectionOnDoubleClick:Le,detailsOnClick:$,noOfXTicks:Be,noOfYTicks:ze,labelColor:Ne,xSuffix:$e,ySuffix:Me,xPrefix:Ve,yPrefix:oe,styles:s,classNames:r,animate:a,dimmedOpacity:M,precision:V,customLayers:q}=i,xt=L.useRef(null);let ft;e[0]!==a.amount||e[1]!==a.once?(ft={once:a.once,amount:a.amount},e[0]=a.amount,e[1]=a.once,e[2]=ft):ft=e[2];const b=Oi.useInView(xt,ft),[w,qe]=L.useState(void 0),[P,Je]=L.useState(void 0),[mt,se]=L.useState(void 0),[p,f]=L.useState(void 0),Rt=g?Vt+50:Vt,kt=U?te+30:te;let dt;e[3]!==lt||e[4]!==Rt||e[5]!==kt||e[6]!==jt?(dt={top:jt,bottom:Rt,left:kt,right:lt},e[3]=lt,e[4]=Rt,e[5]=kt,e[6]=jt,e[7]=dt):dt=e[7];const d=dt;let H,re,le,ae,ce,ue,X,xe,fe,me,W,de,B,pe,z,he,Y,J;if(e[8]!==a||e[9]!==We||e[10]!==r?.graphObjectValues||e[11]!==r?.regLine||e[12]!==r?.xAxis?.axis||e[13]!==r?.xAxis?.gridLines||e[14]!==r?.xAxis?.labels||e[15]!==r?.xAxis?.title||e[16]!==r?.yAxis?.gridLines||e[17]!==r?.yAxis?.labels||e[18]!==r?.yAxis?.title||e[19]!==R||e[20]!==x||e[21]!==Se||e[22]!==q||e[23]!==o||e[24]!==$||e[25]!==M||e[26]!==I||e[27]!==Ct||e[28]!==G||e[29]!==b||e[30]!==Ne||e[31]!==te||e[32]!==d.bottom||e[33]!==d.left||e[34]!==d.right||e[35]!==d.top||e[36]!==ct||e[37]!==ut||e[38]!==Ge||e[39]!==k||e[40]!==A||e[41]!==P||e[42]!==w||e[43]!==Be||e[44]!==ze||e[45]!==N||e[46]!==ie||e[47]!==V||e[48]!==T||e[49]!==At||e[50]!==Ot||e[51]!==ne||e[52]!==Le||e[53]!==He||e[54]!==we||e[55]!==Ue||e[56]!==s?.graphObjectValues||e[57]!==s?.regLine||e[58]!==s?.xAxis?.axis||e[59]!==s?.xAxis?.gridLines||e[60]!==s?.xAxis?.labels||e[61]!==s?.xAxis?.title||e[62]!==s?.yAxis?.gridLines||e[63]!==s?.yAxis?.labels||e[64]!==s?.yAxis?.title||e[65]!==ee||e[66]!==g||e[67]!==Ve||e[68]!==$e||e[69]!==U||e[70]!==oe||e[71]!==Me){const Q=o.map(_i),j=ee-d.left-d.right,y=I-d.top-d.bottom,E=o.filter(Zi).length!==o.length?ji.sqrt().domain([0,ct]).range([.25,T]).nice():void 0,Ke=Q.filter(Qi).length===0?Q:di.orderBy(Q.filter(Ki),"radius","desc"),c=li.linear().domain([k,ut]).range([0,j]).nice(),m=li.linear().domain([A,Ge]).range([y,0]).nice(),Ae=c.ticks(Be),Et=m.ticks(ze),qt=Ai.Delaunay.from(Ke.filter(Ji),t=>c(t.x),t=>m(t.y)).voronoi([0,0,j<0?0:j,y<0?0:y]),Dt=ii.linearRegression(o.filter(zi).map(t=>[c(t.x),m(t.y)])),wt=ii.linearRegressionLine(Dt);re=Xt.motion.svg,xe=`${ee}px`,fe=`${I}px`,me=`0 0 ${ee} ${I}`,W="ltr",de=xt,le=`translate(${d.left},${d.top})`;let Ie;e[90]!==a||e[91]!==Se||e[92]!==b||e[93]!==c||e[94]!==m?(Ie=n.jsxRuntimeExports.jsx(Zt.CustomArea,{areaSettings:Se,scaleX:c,scaleY:m,animate:a,isInView:b},"custom-area"),e[90]=a,e[91]=Se,e[92]=b,e[93]=c,e[94]=m,e[95]=Ie):Ie=e[95],ae=n.jsxRuntimeExports.jsxs(ai.AnimatePresence,{children:[n.jsxRuntimeExports.jsx(vi.HighlightAreaForScatterPlot,{areaSettings:Ct,width:j,height:y,scaleX:c,scaleY:m,animate:a,isInView:b},"highlight-area"),Ie]});const pt=s?.yAxis?.gridLines,ht=s?.yAxis?.labels;let Te;e[96]!==pt||e[97]!==ht?(Te={gridLines:pt,labels:ht},e[96]=pt,e[97]=ht,e[98]=Te):Te=e[98];const gt=r?.yAxis?.gridLines,Qe=r?.yAxis?.labels;let l;e[99]!==gt||e[100]!==Qe?(l={gridLines:gt,labels:Qe},e[99]=gt,e[100]=Qe,e[101]=l):l=e[101];const Ze=m(A<0?0:A),It=m(A<0?0:A),_e=j+d.right,Tt=A<0?0:A;let O;e[102]!==V||e[103]!==Tt||e[104]!==oe||e[105]!==Me?(O=ni.numberFormattingFunction(Tt,"NA",V,oe,Me),e[102]=V,e[103]=Tt,e[104]=oe,e[105]=Me,e[106]=O):O=e[106];const Pt=m(A<0?0:A);let F;e[107]!==Pt?(F={x:0,y:Pt,dy:"0.33em",dx:-4},e[107]=Pt,e[108]=F):F=e[108];const u=r?.xAxis?.axis,D=r?.yAxis?.labels;let Oe;e[109]!==u||e[110]!==D?(Oe={axis:u,label:D},e[109]=u,e[110]=D,e[111]=Oe):Oe=e[111];const yt=s?.xAxis?.axis;let et;e[112]!==s?.yAxis?.labels?(et=s?.yAxis?.labels||{},e[112]=s?.yAxis?.labels,e[113]=et):et=e[113];let Ce;e[114]!==et?(Ce={textAnchor:"end",...et},e[114]=et,e[115]=Ce):Ce=e[115];let Pe;e[116]!==yt||e[117]!==Ce?(Pe={axis:yt,label:Ce},e[116]=yt,e[117]=Ce,e[118]=Pe):Pe=e[118];let Xe;e[119]!==Ze||e[120]!==It||e[121]!==_e||e[122]!==O||e[123]!==F||e[124]!==Oe||e[125]!==Pe?(Xe=n.jsxRuntimeExports.jsx(oi.Axis,{y1:Ze,y2:It,x1:0,x2:_e,label:O,labelPos:F,classNames:Oe,styles:Pe}),e[119]=Ze,e[120]=It,e[121]=_e,e[122]=O,e[123]=F,e[124]=Oe,e[125]=Pe,e[126]=Xe):Xe=e[126];const tt=0-te-15,it=y/2,nt=s?.yAxis?.title,vt=r?.yAxis?.title;let Ye;e[127]!==tt||e[128]!==it||e[129]!==nt||e[130]!==vt||e[131]!==U?(Ye=n.jsxRuntimeExports.jsx(si.AxisTitle,{x:tt,y:it,style:nt,className:vt,text:U,rotate90:!0}),e[127]=tt,e[128]=it,e[129]=nt,e[130]=vt,e[131]=U,e[132]=Ye):Ye=e[132],ce=n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(yi.YTicksAndGridLines,{values:Et.filter(Bi),y:Et.filter(Wi).map(t=>m(t)),x1:0,x2:j+d.right,styles:Te,classNames:l,suffix:Me,prefix:oe,labelType:"secondary",showGridLines:!0,labelPos:"side",precision:V}),Xe,Ye]});const ot=s?.xAxis?.gridLines,bt=s?.xAxis?.labels;let st;e[133]!==ot||e[134]!==bt?(st={gridLines:ot,labels:bt},e[133]=ot,e[134]=bt,e[135]=st):st=e[135];const Re=r?.xAxis?.gridLines,ke=r?.xAxis?.labels;let Z;e[136]!==Re||e[137]!==ke?(Z={gridLines:Re,labels:ke},e[136]=Re,e[137]=ke,e[138]=Z):Z=e[138];const Ee=c(k<0?0:k),rt=c(k<0?0:k),h=k<0?0:k;let S;e[139]!==V||e[140]!==h||e[141]!==Ve||e[142]!==$e?(S=ni.numberFormattingFunction(h,"NA",V,Ve,$e),e[139]=V,e[140]=h,e[141]=Ve,e[142]=$e,e[143]=S):S=e[143];const Ut=c(k<0?0:k);let St;e[144]!==y||e[145]!==Ut?(St={x:Ut,y,dy:"1em",dx:0},e[144]=y,e[145]=Ut,e[146]=St):St=e[146];const Gt=r?.xAxis?.axis,Ht=r?.yAxis?.labels;let Lt;e[147]!==Gt||e[148]!==Ht?(Lt={axis:Gt,label:Ht},e[147]=Gt,e[148]=Ht,e[149]=Lt):Lt=e[149];const Wt=s?.xAxis?.axis;let Nt;e[150]!==s?.yAxis?.labels?(Nt=s?.yAxis?.labels||{},e[150]=s?.yAxis?.labels,e[151]=Nt):Nt=e[151];let $t;e[152]!==Nt?($t={textAnchor:"middle",...Nt},e[152]=Nt,e[153]=$t):$t=e[153];let Mt;e[154]!==Wt||e[155]!==$t?(Mt={axis:Wt,label:$t},e[154]=Wt,e[155]=$t,e[156]=Mt):Mt=e[156];let Yt;e[157]!==y||e[158]!==Ee||e[159]!==rt||e[160]!==S||e[161]!==St||e[162]!==Lt||e[163]!==Mt?(Yt=n.jsxRuntimeExports.jsx(oi.Axis,{x1:Ee,x2:rt,y1:0,y2:y,label:S,labelPos:St,classNames:Lt,styles:Mt}),e[157]=y,e[158]=Ee,e[159]=rt,e[160]=S,e[161]=St,e[162]=Lt,e[163]=Mt,e[164]=Yt):Yt=e[164];const Bt=j/2,zt=y+30,Jt=s?.xAxis?.title,Kt=r?.xAxis?.title;let Ft;e[165]!==Bt||e[166]!==zt||e[167]!==Jt||e[168]!==Kt||e[169]!==g?(Ft=n.jsxRuntimeExports.jsx(si.AxisTitle,{x:Bt,y:zt,style:Jt,className:Kt,text:g}),e[165]=Bt,e[166]=zt,e[167]=Jt,e[168]=Kt,e[169]=g,e[170]=Ft):Ft=e[170],ue=n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(hi.XTicksAndGridLines,{values:Ae.filter(Hi),x:Ae.filter(Gi).map(t=>c(t)),y1:0,y2:y,styles:st,classNames:Z,suffix:$e,prefix:Ve,labelType:"primary",showGridLines:!0,precision:V}),Yt,Ft]}),e[171]!==q?(X=q.filter(Ui).map(Fi),e[171]=q,e[172]=X):X=e[172],H=ai.AnimatePresence,B=Ke.filter(Yi).map((t,Fe)=>n.jsxRuntimeExports.jsx("path",{d:qt.renderCell(Ke.findIndex(C=>C.id===t.id)),opacity:0,onMouseEnter:C=>{qe(t),f(C.clientY),se(C.clientX),ie?.(t)},onMouseMove:C=>{qe(t),f(C.clientY),se(C.clientX)},onMouseLeave:()=>{qe(void 0),se(void 0),f(void 0),ie?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(P,t)&&Le?(Je(void 0),N?.(void 0)):(Je(t),N?.(t)))}},`tesselation_${t.label||Fe}`)),pe=Ke.filter(Xi).map((t,Fe)=>n.jsxRuntimeExports.jsxs(Xt.motion.g,{variants:{initial:{x:c(t.x),y:m(t.y),opacity:we?t.color&&x[R.indexOf(`${t.color}`)]===we?1:M:w?w.id===t.id?1:M:G.length!==0?G.indexOf(t.label||"")!==-1?1:M:1},whileInView:{x:c(t.x),y:m(t.y),opacity:we?t.color&&x[R.indexOf(`${t.color}`)]===we?1:M:w?w.id===t.id?1:M:G.length!==0?G.indexOf(t.label||"")!==-1?1:M:1,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",exit:{opacity:0,transition:{duration:a.duration}},onMouseEnter:C=>{qe(t),f(C.clientY),se(C.clientX),ie?.(t)},onMouseMove:C=>{qe(t),f(C.clientY),se(C.clientX)},onMouseLeave:()=>{qe(void 0),se(void 0),f(void 0),ie?.(void 0)},onClick:()=>{(N||$)&&(ti.isEqual(P,t)&&Le?(Je(void 0),N?.(void 0)):(Je(t),N?.(t)))},children:[n.jsxRuntimeExports.jsx(Xt.motion.circle,{cx:0,cy:0,exit:{r:0,transition:{duration:a.duration}},variants:{initial:{r:0,fill:o.filter(Pi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,stroke:o.filter(Ti).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray},whileInView:{r:E?E(t.radius||0):T,fill:o.filter(Ii).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,stroke:o.filter(Di).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray,transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",style:{fillOpacity:.6}}),Ue&&!v.checkIfNullOrUndefined(t.label)?n.jsxRuntimeExports.jsx(Xt.motion.text,{style:{...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",r?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:E?E(t.radius||0):T,opacity:0,fill:Ne||(o.filter(qi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray)},whileInView:{x:E?E(t.radius||0):T,opacity:1,fill:Ne||(o.filter(Vi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):G.length!==0&&!v.checkIfNullOrUndefined(t.label)&&G.indexOf(t.label)!==-1?n.jsxRuntimeExports.jsx(Xt.motion.text,{style:{...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",r?.graphObjectValues),y:0,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{x:E?E(t.radius||0):T,opacity:0,fill:Ne||(o.filter(Mi).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray)},whileInView:{x:E?E(t.radius||0):T,opacity:1,fill:Ne||(o.filter($i).length===0?x[0]:t.color?x[R.indexOf(`${t.color}`)]:_.Colors.gray),transition:{duration:a.duration}}},initial:"initial",animate:b?"whileInView":"initial",dy:"0.33em",dx:3,children:t.label}):null]},`${t.label||Fe}`)),z=At.map((t,Fe)=>n.jsxRuntimeExports.jsx(ri.RefLineX,{text:t.text,color:t.color,x:c(t.value),y1:0,y2:y,textSide:c(t.value)>j*.75||He?"left":"right",classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe)),he=Ot.map((t,Fe)=>n.jsxRuntimeExports.jsx(ri.RefLineY,{text:t.text,color:t.color,y:m(t.value),x1:0,x2:j,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe));const Qt=We.map((t,Fe)=>{const C=Zt.getLineEndPoint({x:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?c(t.xCoordinate):0,y:t.yCoordinate?m(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),fi=t.showConnector?{y1:C.y,x1:C.x,y2:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?m(t.yCoordinate):0,cx:t.xCoordinate?c(t.xCoordinate):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,mi={y:t.yCoordinate?m(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:He?0:t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0),width:He?t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0):j+d.right-(t.xCoordinate?c(t.xCoordinate)+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return n.jsxRuntimeExports.jsx(Zt.Annotation,{color:t.color,connectorsSettings:fi,labelSettings:mi,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:b},Fe)});e[173]!==Qt?(Y=n.jsxRuntimeExports.jsx("g",{children:Qt}),e[173]=Qt,e[174]=Y):Y=e[174],J=ne?n.jsxRuntimeExports.jsx(gi.RegressionLine,{x1:0,x2:j,y1:wt(0),y2:wt(j),graphHeight:y,graphWidth:j,className:r?.regLine,style:s?.regLine,color:typeof ne=="string"?ne:void 0,animate:a,isInView:b}):null,e[8]=a,e[9]=We,e[10]=r?.graphObjectValues,e[11]=r?.regLine,e[12]=r?.xAxis?.axis,e[13]=r?.xAxis?.gridLines,e[14]=r?.xAxis?.labels,e[15]=r?.xAxis?.title,e[16]=r?.yAxis?.gridLines,e[17]=r?.yAxis?.labels,e[18]=r?.yAxis?.title,e[19]=R,e[20]=x,e[21]=Se,e[22]=q,e[23]=o,e[24]=$,e[25]=M,e[26]=I,e[27]=Ct,e[28]=G,e[29]=b,e[30]=Ne,e[31]=te,e[32]=d.bottom,e[33]=d.left,e[34]=d.right,e[35]=d.top,e[36]=ct,e[37]=ut,e[38]=Ge,e[39]=k,e[40]=A,e[41]=P,e[42]=w,e[43]=Be,e[44]=ze,e[45]=N,e[46]=ie,e[47]=V,e[48]=T,e[49]=At,e[50]=Ot,e[51]=ne,e[52]=Le,e[53]=He,e[54]=we,e[55]=Ue,e[56]=s?.graphObjectValues,e[57]=s?.regLine,e[58]=s?.xAxis?.axis,e[59]=s?.xAxis?.gridLines,e[60]=s?.xAxis?.labels,e[61]=s?.xAxis?.title,e[62]=s?.yAxis?.gridLines,e[63]=s?.yAxis?.labels,e[64]=s?.yAxis?.title,e[65]=ee,e[66]=g,e[67]=Ve,e[68]=$e,e[69]=U,e[70]=oe,e[71]=Me,e[72]=H,e[73]=re,e[74]=le,e[75]=ae,e[76]=ce,e[77]=ue,e[78]=X,e[79]=xe,e[80]=fe,e[81]=me,e[82]=W,e[83]=de,e[84]=B,e[85]=pe,e[86]=z,e[87]=he,e[88]=Y,e[89]=J}else H=e[72],re=e[73],le=e[74],ae=e[75],ce=e[76],ue=e[77],X=e[78],xe=e[79],fe=e[80],me=e[81],W=e[82],de=e[83],B=e[84],pe=e[85],z=e[86],he=e[87],Y=e[88],J=e[89];let ge;e[175]!==H||e[176]!==B||e[177]!==pe||e[178]!==z||e[179]!==he||e[180]!==Y||e[181]!==J?(ge=n.jsxRuntimeExports.jsxs(H,{children:[B,pe,z,he,Y,J]}),e[175]=H,e[176]=B,e[177]=pe,e[178]=z,e[179]=he,e[180]=Y,e[181]=J,e[182]=ge):ge=e[182];let ye;e[183]!==q?(ye=q.filter(Ni).map(Li),e[183]=q,e[184]=ye):ye=e[184];let ve;e[185]!==le||e[186]!==ae||e[187]!==ce||e[188]!==ue||e[189]!==X||e[190]!==ge||e[191]!==ye?(ve=n.jsxRuntimeExports.jsxs("g",{transform:le,children:[ae,ce,ue,X,ge,ye]}),e[185]=le,e[186]=ae,e[187]=ce,e[188]=ue,e[189]=X,e[190]=ge,e[191]=ye,e[192]=ve):ve=e[192];let be;e[193]!==re||e[194]!==xe||e[195]!==fe||e[196]!==me||e[197]!==W||e[198]!==de||e[199]!==ve?(be=n.jsxRuntimeExports.jsx(re,{width:xe,height:fe,viewBox:me,direction:W,ref:de,children:ve}),e[193]=re,e[194]=xe,e[195]=fe,e[196]=me,e[197]=W,e[198]=de,e[199]=ve,e[200]=be):be=e[200];let je;e[201]!==r?.tooltip||e[202]!==mt||e[203]!==p||e[204]!==w||e[205]!==s?.tooltip||e[206]!==at?(je=w&&at&&mt&&p?n.jsxRuntimeExports.jsx(pi.Tooltip,{data:w,body:at,xPos:mt,yPos:p,backgroundStyle:s?.tooltip,className:r?.tooltip}):null,e[201]=r?.tooltip,e[202]=mt,e[203]=p,e[204]=w,e[205]=s?.tooltip,e[206]=at,e[207]=je):je=e[207];let K;e[208]!==r?.modal||e[209]!==$||e[210]!==P?(K=$&&P!==void 0?n.jsxRuntimeExports.jsx(bi.DetailsModal,{body:$,data:P,setData:Je,className:r?.modal}):null,e[208]=r?.modal,e[209]=$,e[210]=P,e[211]=K):K=e[211];let De;return e[212]!==be||e[213]!==je||e[214]!==K?(De=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[be,je,K]}),e[212]=be,e[213]=je,e[214]=K,e[215]=De):De=e[215],De}function Li(i){return i.layer}function Ni(i){return i.position==="after"}function $i(i){return i.color}function Mi(i){return i.color}function Vi(i){return i.color}function qi(i){return i.color}function Di(i){return i.color}function Ii(i){return i.color}function Ti(i){return i.color}function Pi(i){return i.color}function Xi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Yi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Fi(i){return i.layer}function Ui(i){return i.position==="before"}function Gi(i){return i!==0}function Hi(i){return i!==0}function Wi(i){return i!==0}function Bi(i){return i!==0}function zi(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ji(i){return!v.checkIfNullOrUndefined(i.x)&&!v.checkIfNullOrUndefined(i.y)}function Ki(i){return!v.checkIfNullOrUndefined(i.radius)}function Qi(i){return!v.checkIfNullOrUndefined(i.radius)}function Zi(i){return i.radius===void 0||i.radius===null}function _i(i,e){return{...i,id:`${e}`}}function en(i){const e=n.compilerRuntimeExports.c(130),{data:o,graphTitle:ee,colors:I,sources:Ue,graphDescription:x,showLabels:R,height:T,width:g,footNote:U,colorDomain:te,colorLegendTitle:lt,radius:jt,xAxisTitle:Vt,yAxisTitle:at,padding:ie,backgroundColor:At,leftMargin:Ot,rightMargin:Ct,topMargin:we,bottomMargin:G,tooltip:ct,relativeHeight:ut,onSeriesMouseOver:k,refXValues:Ge,refYValues:A,highlightAreaSettings:N,showColorScale:He,highlightedDataPoints:We,graphID:Se,maxRadiusValue:ne,maxXValue:Le,minXValue:$,maxYValue:Be,minYValue:ze,xSuffix:Ne,ySuffix:$e,xPrefix:Me,yPrefix:Ve,onSeriesMouseClick:oe,graphDownload:s,dataDownload:r,language:a,showNAColor:M,minHeight:V,annotations:q,customHighlightAreaSettings:xt,theme:ft,regressionLine:b,ariaLabel:w,resetSelectionOnDoubleClick:qe,detailsOnClick:P,noOfXTicks:Je,noOfYTicks:mt,labelColor:se,styles:p,classNames:f,animate:Rt,dimmedOpacity:kt,precision:dt,customLayers:d,timeline:H}=i,re=R===void 0?!1:R,le=jt===void 0?5:jt,ae=Vt===void 0?"X Axis":Vt,ce=at===void 0?"Y Axis":at,ue=At===void 0?!1:At,X=Ot===void 0?0:Ot,xe=Ct===void 0?10:Ct,fe=we===void 0?20:we,me=G===void 0?50:G;let W;e[0]!==Ge?(W=Ge===void 0?[]:Ge,e[0]=Ge,e[1]=W):W=e[1];const de=W;let B;e[2]!==A?(B=A===void 0?[]:A,e[2]=A,e[3]=B):B=e[3];const pe=B;let z;e[4]!==N?(z=N===void 0?[]:N,e[4]=N,e[5]=z):z=e[5];const he=z,Y=He===void 0?!0:He;let J;e[6]!==We?(J=We===void 0?[]:We,e[6]=We,e[7]=J):J=e[7];const ge=J,ye=Ne===void 0?"":Ne,ve=$e===void 0?"":$e,be=Me===void 0?"":Me,je=Ve===void 0?"":Ve,K=s===void 0?!1:s,De=r===void 0?!1:r,Q=a===void 0?"en":a,j=M===void 0?!0:M,y=V===void 0?0:V;let E;e[8]!==q?(E=q===void 0?[]:q,e[8]=q,e[9]=E):E=e[9];const Ke=E;let c;e[10]!==xt?(c=xt===void 0?[]:xt,e[10]=xt,e[11]=c):c=e[11];const m=c,Ae=ft===void 0?"light":ft,Et=b===void 0?!1:b,qt=qe===void 0?!0:qe,Dt=Je===void 0?5:Je,wt=mt===void 0?5:mt,Ie=Rt===void 0?!1:Rt,pt=kt===void 0?.3:kt,ht=dt===void 0?2:dt;let Te;e[12]!==d?(Te=d===void 0?[]:d,e[12]=d,e[13]=Te):Te=e[13];const gt=Te;let Qe;e[14]!==H?(Qe=H===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:H,e[14]=H,e[15]=Qe):Qe=e[15];const l=Qe,[Ze,It]=L.useState(0),[_e,Tt]=L.useState(0),[O,Pt]=L.useState(l.autoplay);let F;if(e[16]!==o||e[17]!==l.dateFormat){let h;e[19]!==l.dateFormat?(h=S=>_t.parse(`${S.date}`,l.dateFormat||"yyyy",new Date).getTime(),e[19]=l.dateFormat,e[20]=h):h=e[20],F=[...new Set(o.filter(Ln).map(h))],F.sort(Sn),e[16]=o,e[17]=l.dateFormat,e[18]=F}else F=e[18];const u=F,[D,Oe]=L.useState(l.autoplay?0:u.length-1),[yt,et]=L.useState(void 0),Ce=L.useRef(null),Pe=L.useRef(null);let Xe,tt;e[21]===Symbol.for("react.memo_cache_sentinel")?(Xe=()=>{const h=new ResizeObserver(S=>{It(S[0].target.clientWidth||620),Tt(S[0].target.clientHeight||480)});return Ce.current&&h.observe(Ce.current),()=>h.disconnect()},tt=[],e[21]=Xe,e[22]=tt):(Xe=e[21],tt=e[22]),L.useEffect(Xe,tt);let it,nt;e[23]!==O||e[24]!==l.speed||e[25]!==u?(it=()=>{const h=setInterval(()=>{Oe(S=>S<u.length-1?S+1:0)},(l.speed||2)*1e3);return O||clearInterval(h),()=>clearInterval(h)},nt=[u,O,l.speed],e[23]=O,e[24]=l.speed,e[25]=u,e[26]=it,e[27]=nt):(it=e[26],nt=e[27]),L.useEffect(it,nt);const vt=l.dateFormat||"yyyy";let Ye;e[28]!==D||e[29]!==vt||e[30]!==l.showOnlyActiveDate||e[31]!==u?(Ye=ei.getSliderMarks(u,D,l.showOnlyActiveDate,vt),e[28]=D,e[29]=vt,e[30]=l.showOnlyActiveDate,e[31]=u,e[32]=Ye):Ye=e[32];const ot=Ye,bt=f?.graphContainer,st=p?.graphContainer;let Re;e[33]!==f?.description||e[34]!==f?.title||e[35]!==o||e[36]!==De||e[37]!==x||e[38]!==K||e[39]!==ee||e[40]!==p?.description||e[41]!==p?.title||e[42]!==g?(Re=ee||x||K||De?n.jsxRuntimeExports.jsx(Ri.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:f?.title,description:f?.description},graphTitle:ee,graphDescription:x,width:g,graphDownload:K?Pe:void 0,dataDownload:De?o.map(wn).filter(En).length>0?o.map(kn).filter(Rn):o.filter(Cn):null}):null,e[33]=f?.description,e[34]=f?.title,e[35]=o,e[36]=De,e[37]=x,e[38]=K,e[39]=ee,e[40]=p?.description,e[41]=p?.title,e[42]=g,e[43]=Re):Re=e[43];let ke;e[44]!==D||e[45]!==ot||e[46]!==O||e[47]!==l.enabled||e[48]!==u?(ke=l.enabled&&u.length>0&&ot?n.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[n.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Pt(!O)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":O?"Click to pause animation":"Click to play animation",children:O?n.jsxRuntimeExports.jsx(ci.Pause,{}):n.jsxRuntimeExports.jsx(ci.Play,{})}),n.jsxRuntimeExports.jsx(ei.Nr,{min:u[0],max:u[u.length-1],marks:ot,step:null,defaultValue:u[u.length-1],value:u[D],onChangeComplete:h=>{Oe(u.indexOf(h))},onChange:h=>{Oe(u.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=D,e[45]=ot,e[46]=O,e[47]=l.enabled,e[48]=u,e[49]=ke):ke=e[49];let Z;e[50]!==Ie||e[51]!==Ke||e[52]!==me||e[53]!==f||e[54]!==te||e[55]!==lt||e[56]!==I||e[57]!==m||e[58]!==gt||e[59]!==o||e[60]!==P||e[61]!==pt||e[62]!==he||e[63]!==ge||e[64]!==D||e[65]!==se||e[66]!==Q||e[67]!==X||e[68]!==ne||e[69]!==Le||e[70]!==Be||e[71]!==$||e[72]!==ze||e[73]!==Dt||e[74]!==wt||e[75]!==oe||e[76]!==k||e[77]!==ht||e[78]!==le||e[79]!==de||e[80]!==pe||e[81]!==Et||e[82]!==qt||e[83]!==xe||e[84]!==yt||e[85]!==Y||e[86]!==re||e[87]!==j||e[88]!==p||e[89]!==_e||e[90]!==Ze||e[91]!==Ae||e[92]!==l.dateFormat||e[93]!==l.enabled||e[94]!==ct||e[95]!==fe||e[96]!==u||e[97]!==g||e[98]!==ae||e[99]!==be||e[100]!==ye||e[101]!==ce||e[102]!==je||e[103]!==ve?(Z=o.length===0?n.jsxRuntimeExports.jsx(Ei.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Y&&o.filter(On).length!==0?n.jsxRuntimeExports.jsx(ki.ColorLegendWithMouseOver,{width:g,colorLegendTitle:lt,colors:I||_.Colors[Ae].categoricalColors.colors,colorDomain:te||ui.uniqBy(o,"color",!0),setSelectedColor:et,showNAColor:j,className:f?.colorLegend}):null,n.jsxRuntimeExports.jsx(xi.GraphArea,{ref:Ce,children:Ze&&_e?n.jsxRuntimeExports.jsx(Si,{data:wi.ensureCompleteDataForScatterPlot(o,l.dateFormat||"yyyy").filter(h=>l.enabled?h.date===_t.format(new Date(u[D]),l.dateFormat||"yyyy"):h),width:Ze,height:_e,colorDomain:o.filter(An).length===0?[]:te||ui.uniqBy(o,"color",!0),colors:o.filter(jn).length===0?I?[I]:[_.Colors.primaryColors["blue-600"]]:I||_.Colors[Ae].categoricalColors.colors,xAxisTitle:ae,yAxisTitle:ce,refXValues:de,refYValues:pe,showLabels:re,radius:le,leftMargin:X,rightMargin:xe,topMargin:fe,bottomMargin:me,tooltip:ct,onSeriesMouseOver:k,highlightAreaSettings:he,highlightedDataPoints:o.filter(bn).length===0?[]:ge,selectedColor:yt,maxRadiusValue:v.checkIfNullOrUndefined(ne)?Math.max(...o.map(vn).filter(yn)):ne,maxXValue:v.checkIfNullOrUndefined(Le)?Math.max(...o.map(gn).filter(hn))>0?Math.max(...o.map(pn).filter(dn)):0:Le,minXValue:v.checkIfNullOrUndefined($)?Math.min(...o.map(mn).filter(fn))>0?0:Math.min(...o.map(xn).filter(un)):$,maxYValue:v.checkIfNullOrUndefined(Be)?Math.max(...o.map(cn).filter(an))>0?Math.max(...o.map(ln).filter(rn)):0:Be,minYValue:v.checkIfNullOrUndefined(ze)?Math.min(...o.map(sn).filter(on))>0?0:Math.min(...o.map(nn).filter(tn)):ze,onSeriesMouseClick:oe,rtl:Q==="he"||Q==="ar",annotations:Ke,customHighlightAreaSettings:m,regressionLine:Et,resetSelectionOnDoubleClick:qt,detailsOnClick:P,noOfXTicks:Dt,noOfYTicks:wt,labelColor:se,xSuffix:ye,ySuffix:ve,xPrefix:be,yPrefix:je,styles:p,classNames:f,animate:Ie===!0?{duration:.5,once:!0,amount:.5}:Ie||{duration:0,once:!0,amount:0},dimmedOpacity:pt,precision:ht,customLayers:gt}):null})]}),e[50]=Ie,e[51]=Ke,e[52]=me,e[53]=f,e[54]=te,e[55]=lt,e[56]=I,e[57]=m,e[58]=gt,e[59]=o,e[60]=P,e[61]=pt,e[62]=he,e[63]=ge,e[64]=D,e[65]=se,e[66]=Q,e[67]=X,e[68]=ne,e[69]=Le,e[70]=Be,e[71]=$,e[72]=ze,e[73]=Dt,e[74]=wt,e[75]=oe,e[76]=k,e[77]=ht,e[78]=le,e[79]=de,e[80]=pe,e[81]=Et,e[82]=qt,e[83]=xe,e[84]=yt,e[85]=Y,e[86]=re,e[87]=j,e[88]=p,e[89]=_e,e[90]=Ze,e[91]=Ae,e[92]=l.dateFormat,e[93]=l.enabled,e[94]=ct,e[95]=fe,e[96]=u,e[97]=g,e[98]=ae,e[99]=be,e[100]=ye,e[101]=ce,e[102]=je,e[103]=ve,e[104]=Z):Z=e[104];let Ee;e[105]!==f?.footnote||e[106]!==f?.source||e[107]!==U||e[108]!==Ue||e[109]!==p?.footnote||e[110]!==p?.source||e[111]!==g?(Ee=Ue||U?n.jsxRuntimeExports.jsx(Ci.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:Ue,footNote:U,width:g}):null,e[105]=f?.footnote,e[106]=f?.source,e[107]=U,e[108]=Ue,e[109]=p?.footnote,e[110]=p?.source,e[111]=g,e[112]=Ee):Ee=e[112];let rt;return e[113]!==w||e[114]!==ue||e[115]!==Se||e[116]!==T||e[117]!==Q||e[118]!==y||e[119]!==ie||e[120]!==ut||e[121]!==bt||e[122]!==st||e[123]!==Re||e[124]!==ke||e[125]!==Z||e[126]!==Ee||e[127]!==Ae||e[128]!==g?(rt=n.jsxRuntimeExports.jsxs(xi.GraphContainer,{className:bt,style:st,id:Se,ref:Pe,"aria-label":w,backgroundColor:ue,theme:Ae,language:Q,minHeight:y,width:g,height:T,relativeHeight:ut,padding:ie,children:[Re,ke,Z,Ee]}),e[113]=w,e[114]=ue,e[115]=Se,e[116]=T,e[117]=Q,e[118]=y,e[119]=ie,e[120]=ut,e[121]=bt,e[122]=st,e[123]=Re,e[124]=ke,e[125]=Z,e[126]=Ee,e[127]=Ae,e[128]=g,e[129]=rt):rt=e[129],rt}function tn(i){return i!=null}function nn(i){return i.y}function on(i){return i!=null}function sn(i){return i.y}function rn(i){return i!=null}function ln(i){return i.y}function an(i){return i!=null}function cn(i){return i.y}function un(i){return i!=null}function xn(i){return i.x}function fn(i){return i!=null}function mn(i){return i.x}function dn(i){return i!=null}function pn(i){return i.x}function hn(i){return i!=null}function gn(i){return i.x}function yn(i){return i!=null}function vn(i){return i.radius}function bn(i){return i.label}function jn(i){return i.color}function An(i){return i.color}function On(i){return i.color}function Cn(i){return i!==void 0}function Rn(i){return i!==void 0}function kn(i){return i.data}function En(i){return i!==void 0}function wn(i){return i.data}function Sn(i,e){return i-e}function Ln(i){return i.date}exports.ScatterPlot=en;
2
2
  //# sourceMappingURL=ScatterPlot.cjs.map