@undp/data-viz 2.0.9 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.d.ts +2 -0
  3. package/dist/AreaChart.js +4 -4
  4. package/dist/BarGraph.cjs +1 -1
  5. package/dist/BarGraph.cjs.map +1 -1
  6. package/dist/BarGraph.d.ts +2 -0
  7. package/dist/BarGraph.js +1699 -1577
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BasicStatCard.d.ts +2 -0
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.d.ts +2 -0
  13. package/dist/BeeSwarmChart.js +258 -267
  14. package/dist/BeeSwarmChart.js.map +1 -1
  15. package/dist/BiVariateChoroplethMap.cjs +1 -1
  16. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  17. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  18. package/dist/BiVariateChoroplethMap.js +252 -245
  19. package/dist/BiVariateChoroplethMap.js.map +1 -1
  20. package/dist/BulletChart.cjs +1 -1
  21. package/dist/BulletChart.cjs.map +1 -1
  22. package/dist/BulletChart.d.ts +2 -0
  23. package/dist/BulletChart.js +566 -536
  24. package/dist/BulletChart.js.map +1 -1
  25. package/dist/ButterflyChart.cjs +1 -1
  26. package/dist/ButterflyChart.cjs.map +1 -1
  27. package/dist/ButterflyChart.d.ts +2 -0
  28. package/dist/ButterflyChart.js +388 -378
  29. package/dist/ButterflyChart.js.map +1 -1
  30. package/dist/ChoroplethMap.cjs +1 -1
  31. package/dist/ChoroplethMap.cjs.map +1 -1
  32. package/dist/ChoroplethMap.d.ts +2 -0
  33. package/dist/ChoroplethMap.js +297 -291
  34. package/dist/ChoroplethMap.js.map +1 -1
  35. package/dist/CirclePackingGraph.cjs +1 -1
  36. package/dist/CirclePackingGraph.d.ts +2 -0
  37. package/dist/CirclePackingGraph.js +1 -1
  38. package/dist/DataCards.d.ts +2 -0
  39. package/dist/DataCards.js +1 -1
  40. package/dist/DataTable.d.ts +2 -0
  41. package/dist/DetailsModal-0Ry5nXiC.js +32 -0
  42. package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
  43. package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
  44. package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
  45. package/dist/DifferenceLineChart.cjs +1 -1
  46. package/dist/DifferenceLineChart.d.ts +2 -0
  47. package/dist/DifferenceLineChart.js +4 -4
  48. package/dist/DonutChart.cjs +1 -1
  49. package/dist/DonutChart.cjs.map +1 -1
  50. package/dist/DonutChart.d.ts +2 -0
  51. package/dist/DonutChart.js +185 -190
  52. package/dist/DonutChart.js.map +1 -1
  53. package/dist/DotDensityMap.cjs +1 -1
  54. package/dist/DotDensityMap.cjs.map +1 -1
  55. package/dist/DotDensityMap.d.ts +2 -0
  56. package/dist/DotDensityMap.js +252 -244
  57. package/dist/DotDensityMap.js.map +1 -1
  58. package/dist/DualAxisLineChart.cjs +1 -1
  59. package/dist/DualAxisLineChart.d.ts +2 -0
  60. package/dist/DualAxisLineChart.js +4 -4
  61. package/dist/DumbbellChart.cjs +1 -1
  62. package/dist/DumbbellChart.cjs.map +1 -1
  63. package/dist/DumbbellChart.d.ts +2 -0
  64. package/dist/DumbbellChart.js +563 -525
  65. package/dist/DumbbellChart.js.map +1 -1
  66. package/dist/GeoHubCompareMaps.d.ts +2 -0
  67. package/dist/GeoHubMap.d.ts +2 -0
  68. package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
  69. package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
  70. package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
  71. package/dist/{GraphEl-CGq1EWRn.js → GraphEl-DEzobeOM.js} +3 -3
  72. package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-DEzobeOM.js.map} +1 -1
  73. package/dist/GriddedGraphs.cjs +1 -1
  74. package/dist/GriddedGraphs.cjs.map +1 -1
  75. package/dist/GriddedGraphs.d.ts +2 -0
  76. package/dist/GriddedGraphs.js +19 -19
  77. package/dist/GriddedGraphs.js.map +1 -1
  78. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  79. package/dist/HeatMap.cjs +1 -1
  80. package/dist/HeatMap.cjs.map +1 -1
  81. package/dist/HeatMap.d.ts +2 -0
  82. package/dist/HeatMap.js +112 -117
  83. package/dist/HeatMap.js.map +1 -1
  84. package/dist/Histogram.cjs +1 -1
  85. package/dist/Histogram.d.ts +2 -0
  86. package/dist/Histogram.js +3 -3
  87. package/dist/HybridMap.cjs +1 -1
  88. package/dist/HybridMap.cjs.map +1 -1
  89. package/dist/HybridMap.d.ts +2 -0
  90. package/dist/HybridMap.js +366 -359
  91. package/dist/HybridMap.js.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  93. package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
  94. package/dist/LineChartWithConfidenceInterval.js +4 -4
  95. package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
  96. package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
  97. package/dist/MultiGraphDashboard.cjs +1 -1
  98. package/dist/MultiGraphDashboard.cjs.map +1 -1
  99. package/dist/MultiGraphDashboard.d.ts +2 -0
  100. package/dist/MultiGraphDashboard.js +10 -10
  101. package/dist/MultiGraphDashboard.js.map +1 -1
  102. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  103. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
  104. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  105. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
  106. package/dist/MultiLineAltChart.cjs +1 -1
  107. package/dist/MultiLineAltChart.cjs.map +1 -1
  108. package/dist/MultiLineAltChart.d.ts +2 -0
  109. package/dist/MultiLineAltChart.js +453 -425
  110. package/dist/MultiLineAltChart.js.map +1 -1
  111. package/dist/MultiLineChart.cjs +1 -1
  112. package/dist/MultiLineChart.d.ts +2 -0
  113. package/dist/MultiLineChart.js +4 -4
  114. package/dist/ParetoChart.cjs +1 -1
  115. package/dist/ParetoChart.cjs.map +1 -1
  116. package/dist/ParetoChart.d.ts +2 -0
  117. package/dist/ParetoChart.js +188 -193
  118. package/dist/ParetoChart.js.map +1 -1
  119. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  120. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  121. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  122. package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
  123. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  124. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  125. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  126. package/dist/RadarChart.cjs +1 -1
  127. package/dist/RadarChart.cjs.map +1 -1
  128. package/dist/RadarChart.d.ts +2 -0
  129. package/dist/RadarChart.js +158 -163
  130. package/dist/RadarChart.js.map +1 -1
  131. package/dist/SankeyChart.cjs +1 -1
  132. package/dist/SankeyChart.cjs.map +1 -1
  133. package/dist/SankeyChart.d.ts +2 -0
  134. package/dist/SankeyChart.js +172 -177
  135. package/dist/SankeyChart.js.map +1 -1
  136. package/dist/ScatterPlot.cjs +1 -1
  137. package/dist/ScatterPlot.cjs.map +1 -1
  138. package/dist/ScatterPlot.d.ts +2 -0
  139. package/dist/ScatterPlot.js +494 -483
  140. package/dist/ScatterPlot.js.map +1 -1
  141. package/dist/ScrollStory.d.ts +2 -0
  142. package/dist/SimpleLineChart.cjs +1 -1
  143. package/dist/SimpleLineChart.d.ts +2 -0
  144. package/dist/SimpleLineChart.js +4 -4
  145. package/dist/SingleGraphDashboard.cjs +1 -1
  146. package/dist/SingleGraphDashboard.cjs.map +1 -1
  147. package/dist/SingleGraphDashboard.d.ts +2 -0
  148. package/dist/SingleGraphDashboard.js +24 -24
  149. package/dist/SingleGraphDashboard.js.map +1 -1
  150. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  151. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  152. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  153. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  154. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  155. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  156. package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
  157. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  158. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  159. package/dist/SlopeChart.cjs +1 -1
  160. package/dist/SlopeChart.cjs.map +1 -1
  161. package/dist/SlopeChart.d.ts +2 -0
  162. package/dist/SlopeChart.js +182 -187
  163. package/dist/SlopeChart.js.map +1 -1
  164. package/dist/SparkLine.cjs +1 -1
  165. package/dist/SparkLine.d.ts +2 -0
  166. package/dist/SparkLine.js +4 -4
  167. package/dist/StatCardFromData.d.ts +2 -0
  168. package/dist/StripChart.cjs +1 -1
  169. package/dist/StripChart.cjs.map +1 -1
  170. package/dist/StripChart.d.ts +2 -0
  171. package/dist/StripChart.js +249 -258
  172. package/dist/StripChart.js.map +1 -1
  173. package/dist/ThreeDGlobe.cjs +1 -1
  174. package/dist/ThreeDGlobe.cjs.map +1 -1
  175. package/dist/ThreeDGlobe.d.ts +2 -0
  176. package/dist/ThreeDGlobe.js +142 -147
  177. package/dist/ThreeDGlobe.js.map +1 -1
  178. package/dist/Tooltip-Dj5eVppQ.js +45 -0
  179. package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
  180. package/dist/Tooltip-uUdw6wJL.cjs +2 -0
  181. package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
  182. package/dist/TreeMapGraph.cjs +1 -1
  183. package/dist/TreeMapGraph.cjs.map +1 -1
  184. package/dist/TreeMapGraph.d.ts +2 -0
  185. package/dist/TreeMapGraph.js +159 -164
  186. package/dist/TreeMapGraph.js.map +1 -1
  187. package/dist/Types.d.ts +2 -0
  188. package/dist/UnitChart.d.ts +2 -0
  189. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  190. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  191. package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
  192. package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
  193. package/dist/index-CF5hnGvG.cjs +2 -0
  194. package/dist/index-CF5hnGvG.cjs.map +1 -0
  195. package/dist/index-DPGq3eIL.js +330 -0
  196. package/dist/index-DPGq3eIL.js.map +1 -0
  197. package/dist/index.cjs +1 -1
  198. package/dist/index.d.ts +2 -0
  199. package/dist/index.js +1 -1
  200. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  201. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  202. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  203. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  204. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  205. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  206. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  207. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  208. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  209. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  210. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  211. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  212. package/package.json +4 -4
  213. package/dist/Tooltip-4dJo4_AF.cjs +0 -2
  214. package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
  215. package/dist/Tooltip-CwWUegPB.js +0 -43
  216. package/dist/Tooltip-CwWUegPB.js.map +0 -1
  217. package/dist/index-B2LQV7Tk.js +0 -335
  218. package/dist/index-B2LQV7Tk.js.map +0 -1
  219. package/dist/index-xRHRLDIp.cjs +0 -2
  220. package/dist/index-xRHRLDIp.cjs.map +0 -1
  221. package/dist/sort-BIvMlUH1.js +0 -34
  222. package/dist/sort-BIvMlUH1.js.map +0 -1
  223. package/dist/sort-O96oMZLb.cjs +0 -2
  224. package/dist/sort-O96oMZLb.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HeatMap.js","sources":["../src/Components/Graphs/HeatMap/Graph.tsx","../src/Components/Graphs/HeatMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleBand, scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport { useRef, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n HeatMapDataType,\r\n ScaleDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\nimport { YAxesLabels } from '@/Components/Elements/Axes/YAxesLabels';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\n\r\ninterface Props {\r\n data: HeatMapDataType[];\r\n colorDomain: string[] | number[];\r\n colors: string[];\r\n noDataColor: string;\r\n scaleType: ScaleDataType;\r\n showColumnLabels: boolean;\r\n leftMargin: number;\r\n truncateBy: number;\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n showRowLabels: boolean;\r\n bottomMargin: number;\r\n suffix: string;\r\n prefix: string;\r\n showValues?: boolean;\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 selectedColor?: string;\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 animate: AnimateDataType;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n showColumnLabels,\r\n leftMargin,\r\n rightMargin,\r\n truncateBy,\r\n width,\r\n height,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix,\r\n prefix,\r\n showValues,\r\n colorDomain,\r\n colors,\r\n noDataColor,\r\n scaleType,\r\n showRowLabels,\r\n selectedColor,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [mouseOverData, setMouseOverData] = useState<HeatMapDataType | undefined>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const columns = uniqBy(data, 'column', true) as string[];\r\n const rows = uniqBy(data, 'row', true) as string[];\r\n const y = scaleBand().domain(rows).range([0, graphHeight]);\r\n const barHeight = y.bandwidth();\r\n const x = scaleBand().domain(columns).range([0, graphWidth]);\r\n const barWidth = x.bandwidth();\r\n const colorScale =\r\n scaleType === 'categorical'\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleType === 'threshold'\r\n ? scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors)\r\n : scaleLinear<string, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n style={{ marginLeft: 'auto', marginRight: 'auto' }}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${0})`}>\r\n {showColumnLabels\r\n ? columns.map((d, i) => (\r\n <XAxesLabels\r\n key={i}\r\n y={0}\r\n x={x(d) as number}\r\n width={barWidth}\r\n height={margin.top - 5}\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='bottom'\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${0},${margin.top})`}>\r\n {showRowLabels\r\n ? rows.map((d, i) => (\r\n <YAxesLabels\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n key={i}\r\n y={y(d) as number}\r\n x={0}\r\n width={margin.left}\r\n height={barHeight}\r\n alignment='right'\r\n style={styles?.yAxis?.labels}\r\n className={classNames?.yAxis?.labels}\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {rows.map((d, i) => (\r\n <g key={i} transform={`translate(0,${y(d)})`}>\r\n {columns.map(el => (\r\n <rect\r\n key={`${d}-${el}`}\r\n x={x(el)}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{ fill: noDataColor }}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.value))\r\n .map((d, i) => {\r\n const color = !checkIfNullOrUndefined(d.value)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.value as any)\r\n : noDataColor;\r\n return (\r\n <g\r\n key={`${d.column}-${d.row}`}\r\n transform={`translate(${x(d.column)},${y(d.row)})`}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n opacity={selectedColor ? (selectedColor === color ? 1 : 0.3) : 1}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\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 />\r\n {showValues && !checkIfNullOrUndefined(d.value) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: { opacity: 1, transition: { duration: animate.duration } },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject key={i} y={0} x={0} width={barWidth} height={barHeight}>\r\n <div className='flex flex-col justify-center items-center h-inherit p-1'>\r\n <p\r\n className={cn(\r\n 'text-xs text-center m-0 leading-[1.25] graph-value',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(color),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(d.value, 'NA', precision, prefix, suffix)}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </g>\r\n );\r\n })}\r\n {mouseOverData ? (\r\n <rect\r\n x={x(mouseOverData.column)}\r\n y={y(mouseOverData.row)}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: 1.5,\r\n }}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n />\r\n ) : null}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HeatMapDataType,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { LinearColorLegend } from '@/Components/Elements/LinearColorLegend';\r\nimport { ThresholdColorLegendWithMouseOver } from '@/Components/Elements/ThresholdColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: HeatMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Array of colors for cells */\r\n colors?: string[];\r\n /** Color where data is not available */\r\n noDataColor?: string;\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value for the chart */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels in the column */\r\n showColumnLabels?: boolean;\r\n /** Toggle visibility of labels in the row */\r\n showRowLabels?: boolean;\r\n /** Scale for the colors in the cell */\r\n scaleType?: ScaleDataType;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\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 visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Domain for the colors in the cell. */\r\n colorDomain: number[] | string[];\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\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 HeatMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showColumnLabels = true,\r\n leftMargin = 100,\r\n rightMargin = 10,\r\n truncateBy = 999,\r\n height,\r\n width,\r\n scaleType,\r\n colorDomain,\r\n footNote,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 30,\r\n bottomMargin = 10,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix = '',\r\n prefix = '',\r\n showRowLabels = true,\r\n relativeHeight,\r\n showValues,\r\n graphID,\r\n noDataColor = Colors.gray,\r\n showColorScale = true,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\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 animate = false,\r\n precision = 2,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 const scale =\r\n scaleType ||\r\n (typeof colorDomain[0] === 'string'\r\n ? 'categorical'\r\n : colorDomain.length === 2\r\n ? 'linear'\r\n : 'threshold');\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={fillContainer ? undefined : 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 {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale ? (\r\n scale === 'categorical' ? (\r\n <ColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain.map(d => `${d}`)}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : scale === 'threshold' ? (\r\n <ThresholdColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain as number[]}\r\n setSelectedColor={setSelectedColor}\r\n naColor={noDataColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : (\r\n <LinearColorLegend\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors || [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n }\r\n colorDomain={colorDomain as number[]}\r\n className={classNames?.colorLegend}\r\n />\r\n )\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data}\r\n colorDomain={colorDomain}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n noDataColor={noDataColor}\r\n scaleType={scale}\r\n showColumnLabels={showColumnLabels}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n selectedColor={selectedColor}\r\n truncateBy={truncateBy}\r\n showRowLabels={showRowLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\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 precision={precision}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","$","_c","data","showColumnLabels","leftMargin","rightMargin","truncateBy","width","height","topMargin","bottomMargin","tooltip","onSeriesMouseOver","suffix","prefix","showValues","colorDomain","colors","noDataColor","scaleType","showRowLabels","selectedColor","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","precision","svgRef","useRef","t0","amount","once","isInView","useInView","t1","top","bottom","left","right","margin","mouseClickData","setMouseClickData","useState","undefined","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","graphWidth","graphHeight","T0","t10","t11","t12","t13","t2","t3","t4","t5","t6","t7","t8","t9","duration","graphObjectValues","xAxis","labels","yAxis","columns","uniqBy","rows","y","scaleBand","domain","range","barHeight","bandwidth","x","barWidth","colorScale","scaleOrdinal","scaleThreshold","scaleLinear","motion","svg","Symbol","for","marginLeft","marginRight","jsx","map","d","i","XAxesLabels","length","substring","d_0","i_0","YAxesLabels","d_1","i_1","el","fill","filter","_temp","d_3","i_2","color","checkIfNullOrUndefined","value","jsxs","column","row","event","clientY","clientX","isEqual","event_0","opacity","transition","initial","whileInView","cn","getTextColorBasedOnBgColor","numberFormattingFunction","fillOpacity","strokeWidth","t14","t15","t16","Tooltip","t17","Modal","__html","string2HTML","t18","Fragment","d_2","HeatMap","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","graphID","showColorScale","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","t19","t20","t21","Colors","gray","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t22","t23","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","scale","t24","graphContainer","t25","t26","t27","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","t28","EmptyState","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx09","_temp6","colorLegend","ThresholdColorLegendWithMouseOver","LinearColorLegend","Graph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,OAAA+B,IACCrL,QAAAA,GACQ8I,gBAAAA,GACPF,SAAAA,GAER0C,UAAAA;AAAAA,IAAAA;AAAAA,IAuBAQ;AAAAA,IAmHAW;AAAAA,EAAAA,GAYH,GAAiBjN,QAAAgK,IAAAhK,QAAAqJ,GAAArJ,QAAAuJ,IAAAvJ,QAAAQ,GAAAR,QAAA4J,IAAA5J,QAAA8J,IAAA9J,QAAAoJ,GAAApJ,QAAAsJ,GAAAtJ,QAAA0L,IAAA1L,QAAA4L,IAAA5L,QAAA6L,IAAA7L,QAAA8L,IAAA9L,QAAAsM,IAAAtM,QAAAiN,IAAAjN,QAAA+J,GAAA/J,QAAAqN,MAAAA,KAAArN,EAAA,EAAA,GArKjBqN;AAqKiB;AA/Od,SAAAT,GAAAW,GAAA;AAAA,SAsI2C,GAAGxH,CAAC;AAAE;AAtIjD,SAAAsG,GAAA9F,GAAA;AAAA,SA2G4BR,MAAMlD;AAAS;AA3G3C,SAAAuJ,GAAAhG,GAAA;AAAA,SA0G6CL,MAAMlD;AAAS;AA1G5D,SAAAsJ,GAAApG,GAAA;AAAA,SA0GyBA,EAAC7F;AAAK;AA1G/B,SAAAgM,GAAArF,GAAA;AAAA,SAyG2Cd,MAAMlD;AAAS;AAzG1D,SAAA+D,GAAAiC,GAAA;AAAA,SAyGuB9C,EAAC7F;AAAK;"}
1
+ {"version":3,"file":"HeatMap.js","sources":["../src/Components/Graphs/HeatMap/Graph.tsx","../src/Components/Graphs/HeatMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleBand, scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport { useRef, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n HeatMapDataType,\r\n ScaleDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\nimport { YAxesLabels } from '@/Components/Elements/Axes/YAxesLabels';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HeatMapDataType[];\r\n colorDomain: string[] | number[];\r\n colors: string[];\r\n noDataColor: string;\r\n scaleType: ScaleDataType;\r\n showColumnLabels: boolean;\r\n leftMargin: number;\r\n truncateBy: number;\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n showRowLabels: boolean;\r\n bottomMargin: number;\r\n suffix: string;\r\n prefix: string;\r\n showValues?: boolean;\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 selectedColor?: string;\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 animate: AnimateDataType;\r\n precision: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n showColumnLabels,\r\n leftMargin,\r\n rightMargin,\r\n truncateBy,\r\n width,\r\n height,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix,\r\n prefix,\r\n showValues,\r\n colorDomain,\r\n colors,\r\n noDataColor,\r\n scaleType,\r\n showRowLabels,\r\n selectedColor,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [mouseOverData, setMouseOverData] = useState<HeatMapDataType | undefined>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const columns = uniqBy(data, 'column', true) as string[];\r\n const rows = uniqBy(data, 'row', true) as string[];\r\n const y = scaleBand().domain(rows).range([0, graphHeight]);\r\n const barHeight = y.bandwidth();\r\n const x = scaleBand().domain(columns).range([0, graphWidth]);\r\n const barWidth = x.bandwidth();\r\n const colorScale =\r\n scaleType === 'categorical'\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleType === 'threshold'\r\n ? scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors)\r\n : scaleLinear<string, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n style={{ marginLeft: 'auto', marginRight: 'auto' }}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${0})`}>\r\n {showColumnLabels\r\n ? columns.map((d, i) => (\r\n <XAxesLabels\r\n key={i}\r\n y={0}\r\n x={x(d) as number}\r\n width={barWidth}\r\n height={margin.top - 5}\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='bottom'\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${0},${margin.top})`}>\r\n {showRowLabels\r\n ? rows.map((d, i) => (\r\n <YAxesLabels\r\n value={\r\n `${d}`.length < truncateBy ? `${d}` : `${`${d}`.substring(0, truncateBy)}...`\r\n }\r\n key={i}\r\n y={y(d) as number}\r\n x={0}\r\n width={margin.left}\r\n height={barHeight}\r\n alignment='right'\r\n style={styles?.yAxis?.labels}\r\n className={classNames?.yAxis?.labels}\r\n animate={{ duration: 0, once: true, amount: 0 }}\r\n isInView={isInView}\r\n />\r\n ))\r\n : null}\r\n </g>\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {rows.map((d, i) => (\r\n <g key={i} transform={`translate(0,${y(d)})`}>\r\n {columns.map(el => (\r\n <rect\r\n key={`${d}-${el}`}\r\n x={x(el)}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{ fill: noDataColor }}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.value))\r\n .map((d, i) => {\r\n const color = !checkIfNullOrUndefined(d.value)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.value as any)\r\n : noDataColor;\r\n return (\r\n <g\r\n key={`${d.column}-${d.row}`}\r\n transform={`translate(${x(d.column)},${y(d.row)})`}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n opacity={selectedColor ? (selectedColor === color ? 1 : 0.3) : 1}\r\n >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n width={barWidth}\r\n height={barHeight}\r\n className='stroke-1 stroke-primary-white dark:stroke-primary-gray-700'\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\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 />\r\n {showValues && !checkIfNullOrUndefined(d.value) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: { opacity: 1, transition: { duration: animate.duration } },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject key={i} y={0} x={0} width={barWidth} height={barHeight}>\r\n <div className='flex flex-col justify-center items-center h-inherit p-1'>\r\n <p\r\n className={cn(\r\n 'text-xs text-center m-0 leading-[1.25] graph-value',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(color),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(d.value, 'NA', precision, prefix, suffix)}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </g>\r\n );\r\n })}\r\n {mouseOverData ? (\r\n <rect\r\n x={x(mouseOverData.column)}\r\n y={y(mouseOverData.row)}\r\n width={barWidth}\r\n height={barHeight}\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: 1.5,\r\n }}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n />\r\n ) : null}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HeatMapDataType,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { LinearColorLegend } from '@/Components/Elements/LinearColorLegend';\r\nimport { ThresholdColorLegendWithMouseOver } from '@/Components/Elements/ThresholdColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: HeatMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Array of colors for cells */\r\n colors?: string[];\r\n /** Color where data is not available */\r\n noDataColor?: string;\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n fillContainer?: boolean;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value for the chart */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels in the column */\r\n showColumnLabels?: boolean;\r\n /** Toggle visibility of labels in the row */\r\n showRowLabels?: boolean;\r\n /** Scale for the colors in the cell */\r\n scaleType?: ScaleDataType;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\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 visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Domain for the colors in the cell. */\r\n colorDomain: number[] | string[];\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\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 HeatMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n showColumnLabels = true,\r\n leftMargin = 100,\r\n rightMargin = 10,\r\n truncateBy = 999,\r\n height,\r\n width,\r\n scaleType,\r\n colorDomain,\r\n footNote,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 30,\r\n bottomMargin = 10,\r\n tooltip,\r\n onSeriesMouseOver,\r\n suffix = '',\r\n prefix = '',\r\n showRowLabels = true,\r\n relativeHeight,\r\n showValues,\r\n graphID,\r\n noDataColor = Colors.gray,\r\n showColorScale = true,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n fillContainer = true,\r\n language = 'en',\r\n showNAColor = true,\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 animate = false,\r\n precision = 2,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 const scale =\r\n scaleType ||\r\n (typeof colorDomain[0] === 'string'\r\n ? 'categorical'\r\n : colorDomain.length === 2\r\n ? 'linear'\r\n : 'threshold');\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={fillContainer ? undefined : 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 {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale ? (\r\n scale === 'categorical' ? (\r\n <ColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain.map(d => `${d}`)}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : scale === 'threshold' ? (\r\n <ThresholdColorLegendWithMouseOver\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorDomain={colorDomain as number[]}\r\n setSelectedColor={setSelectedColor}\r\n naColor={noDataColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : (\r\n <LinearColorLegend\r\n width={fillContainer ? undefined : width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n colors || [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n }\r\n colorDomain={colorDomain as number[]}\r\n className={classNames?.colorLegend}\r\n />\r\n )\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data}\r\n colorDomain={colorDomain}\r\n width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (typeof colorDomain[0] === 'string'\r\n ? Colors[theme].categoricalColors.colors\r\n : colorDomain.length === 2\r\n ? [\r\n Colors[theme].sequentialColors.neutralColorsx09[0],\r\n Colors[theme].sequentialColors.neutralColorsx09[8],\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(colorDomain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n noDataColor={noDataColor}\r\n scaleType={scale}\r\n showColumnLabels={showColumnLabels}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n selectedColor={selectedColor}\r\n truncateBy={truncateBy}\r\n showRowLabels={showRowLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\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 precision={precision}\r\n />\r\n ) : null}\r\n </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","$","_c","data","showColumnLabels","leftMargin","rightMargin","truncateBy","width","height","topMargin","bottomMargin","tooltip","onSeriesMouseOver","suffix","prefix","showValues","colorDomain","colors","noDataColor","scaleType","showRowLabels","selectedColor","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","animate","precision","svgRef","useRef","t0","amount","once","isInView","useInView","t1","top","bottom","left","right","margin","mouseClickData","setMouseClickData","useState","undefined","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","graphWidth","graphHeight","T0","t10","t11","t12","t13","t2","t3","t4","t5","t6","t7","t8","t9","duration","graphObjectValues","xAxis","labels","yAxis","columns","uniqBy","rows","y","scaleBand","domain","range","barHeight","bandwidth","x","barWidth","colorScale","scaleOrdinal","scaleThreshold","scaleLinear","motion","svg","Symbol","for","marginLeft","marginRight","jsx","map","d","i","XAxesLabels","length","substring","d_0","i_0","YAxesLabels","d_1","i_1","el","fill","filter","_temp","d_3","i_2","color","checkIfNullOrUndefined","value","jsxs","column","row","event","clientY","clientX","isEqual","event_0","opacity","transition","initial","whileInView","cn","getTextColorBasedOnBgColor","numberFormattingFunction","fillOpacity","strokeWidth","t14","t15","t16","Tooltip","t17","modal","DetailsModal","t18","Fragment","d_2","HeatMap","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","graphID","showColorScale","graphDownload","dataDownload","fillContainer","language","showNAColor","minHeight","theme","ariaLabel","t19","t20","t21","Colors","gray","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t22","t23","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","scale","t24","graphContainer","t25","t26","t27","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","t28","EmptyState","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx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A,IAAAA;AAAAA,IAuBAQ;AAAAA,IAmHAW;AAAAA,EAAAA,GAYH,GAAiBhN,QAAA+J,IAAA/J,QAAAoJ,GAAApJ,QAAAsJ,IAAAtJ,QAAAQ,GAAAR,QAAA2J,IAAA3J,QAAA6J,IAAA7J,QAAAmJ,GAAAnJ,QAAAqJ,GAAArJ,QAAAyL,IAAAzL,QAAA2L,IAAA3L,QAAA4L,IAAA5L,QAAA6L,IAAA7L,QAAAqM,IAAArM,QAAAgN,IAAAhN,QAAA8J,GAAA9J,QAAAoN,MAAAA,KAAApN,EAAA,EAAA,GArKjBoN;AAqKiB;AA/Od,SAAAT,GAAAW,GAAA;AAAA,SAsI2C,GAAGvH,CAAC;AAAE;AAtIjD,SAAAqG,GAAA7F,GAAA;AAAA,SA2G4BR,MAAMlD;AAAS;AA3G3C,SAAAsJ,GAAA/F,GAAA;AAAA,SA0G6CL,MAAMlD;AAAS;AA1G5D,SAAAqJ,GAAAnG,GAAA;AAAA,SA0GyBA,EAAC7F;AAAK;AA1G/B,SAAA+L,GAAApF,GAAA;AAAA,SAyG2Cd,MAAMlD;AAAS;AAzG1D,SAAA+D,GAAAgC,GAAA;AAAA,SAyGuB7C,EAAC7F;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CHPV5EwG-CTPQjnHt.cjs"),oe=require("./Spinner-DRMBUsX7.cjs"),J=require("./index-xRHRLDIp.cjs"),se=require("./TreeMapGraph.cjs"),le=require("./DonutChart.cjs"),ae=require("./BarGraph.cjs"),W=require("./Colors.cjs"),ce=require("./init-DU0ybBc_.cjs"),K=require("./linear-BwPAspcq.cjs");function ue(i,e){let v=0;for(let l of i)l!=null&&(l=+l)>=l&&++v;return v}function he(i){return i}var fe=Array.prototype,pe=fe.slice;function ne(i){return()=>i}function ge(i,e,v){let l;for(;;){const t=K.tickIncrement(i,e,v);if(t===l||t===0||!isFinite(t))return[i,e];t>0?(i=Math.floor(i/t)*t,e=Math.ceil(e/t)*t):t<0&&(i=Math.ceil(i*t)/t,e=Math.floor(e*t)/t),l=t}}function me(i){return Math.max(1,Math.ceil(Math.log(ue(i))/Math.LN2)+1)}function xe(){var i=he,e=J.extent,v=me;function l(t){Array.isArray(t)||(t=Array.from(t));var r,H=t.length,a,P,p=new Array(H);for(r=0;r<H;++r)p[r]=i(t[r],r,t);var b=e(p),o=b[0],n=b[1],s=v(p,o,n);if(!Array.isArray(s)){const d=n,M=+s;if(e===J.extent&&([o,n]=ge(o,n,M)),s=K.ticks(o,n,M),s[0]<=o&&(P=K.tickIncrement(o,n,M)),s[s.length-1]>=n)if(d>=n&&e===J.extent){const c=K.tickIncrement(o,n,M);isFinite(c)&&(c>0?n=(Math.floor(n/c)+1)*c:c<0&&(n=(Math.ceil(n*-c)+1)/-c))}else s.pop()}for(var x=s.length,u=0,h=x;s[u]<=o;)++u;for(;s[h-1]>n;)--h;(u||h<x)&&(s=s.slice(u,h),x=h-u);var m=new Array(x+1),y;for(r=0;r<=x;++r)y=m[r]=[],y.x0=r>0?s[r-1]:o,y.x1=r<x?s[r]:n;if(isFinite(P)){if(P>0)for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[Math.min(x,Math.floor((a-o)/P))].push(t[r]);else if(P<0){for(r=0;r<H;++r)if((a=p[r])!=null&&o<=a&&a<=n){const d=Math.floor((o-a)*P);m[Math.min(x,d+(s[d]<=a))].push(t[r])}}}else for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[ce.bisectRight(s,a,0,x)].push(t[r]);return m}return l.value=function(t){return arguments.length?(i=typeof t=="function"?t:ne(t),l):i},l.domain=function(t){return arguments.length?(e=typeof t=="function"?t:ne([t[0],t[1]]),l):e},l.thresholds=function(t){return arguments.length?(v=typeof t=="function"?t:ne(Array.isArray(t)?pe.call(t):t),l):v},l}function de(i){const e=L.compilerRuntimeExports.c(138),{data:v,graphTitle:l,sources:t,graphDescription:r,barPadding:H,showValues:a,showTicks:P,leftMargin:p,rightMargin:b,height:o,width:n,footNote:s,colors:x,padding:u,backgroundColor:h,topMargin:m,bottomMargin:y,showLabels:d,relativeHeight:M,tooltip:c,onSeriesMouseOver:w,refValues:Q,graphID:j,maxValue:U,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,numberOfBins:X,truncateBy:Y,graphType:Z,barGraphLayout:_,donutStrokeWidth:ee,sortData:N,language:A,minHeight:F,theme:ie,maxBarThickness:te,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}=i,C=ie===void 0?"light":ie;let O;e[0]!==v||e[1]!==X?(O=xe().thresholds(X||10).value(ye)(v).map(Me),e[0]=v,e[1]=X,e[2]=O):O=e[2];const $=O;if($.length===0){const g=`${n}px`,f=`${o}px`;let B;e[3]!==g||e[4]!==f?(B={width:g,height:f,margin:"auto"},e[3]=g,e[4]=f,e[5]=B):B=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=L.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:L.jsxRuntimeExports.jsx(oe.w,{})}),e[6]=I):I=e[6];let z;return e[7]!==B?(z=L.jsxRuntimeExports.jsx("div",{style:B,children:I}),e[7]=B,e[8]=z):z=e[8],z}if(Z==="circlePacking"){const g=x||W.Colors.graphMainColor;let f;return e[9]!==E||e[10]!==h||e[11]!==y||e[12]!==D||e[13]!==q||e[14]!==$||e[15]!==R||e[16]!==s||e[17]!==r||e[18]!==S||e[19]!==j||e[20]!==l||e[21]!==o||e[22]!==A||e[23]!==p||e[24]!==F||e[25]!==k||e[26]!==w||e[27]!==u||e[28]!==T||e[29]!==M||e[30]!==b||e[31]!==d||e[32]!==a||e[33]!==t||e[34]!==G||e[35]!==g||e[36]!==C||e[37]!==c||e[38]!==m||e[39]!==n?(f=L.jsxRuntimeExports.jsx(J.CirclePackingGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[9]=E,e[10]=h,e[11]=y,e[12]=D,e[13]=q,e[14]=$,e[15]=R,e[16]=s,e[17]=r,e[18]=S,e[19]=j,e[20]=l,e[21]=o,e[22]=A,e[23]=p,e[24]=F,e[25]=k,e[26]=w,e[27]=u,e[28]=T,e[29]=M,e[30]=b,e[31]=d,e[32]=a,e[33]=t,e[34]=G,e[35]=g,e[36]=C,e[37]=c,e[38]=m,e[39]=n,e[40]=f):f=e[40],f}if(Z==="treeMap"){const g=x||W.Colors.graphMainColor;let f;return e[41]!==E||e[42]!==h||e[43]!==y||e[44]!==D||e[45]!==q||e[46]!==$||e[47]!==R||e[48]!==s||e[49]!==r||e[50]!==S||e[51]!==j||e[52]!==l||e[53]!==o||e[54]!==A||e[55]!==p||e[56]!==F||e[57]!==k||e[58]!==w||e[59]!==u||e[60]!==T||e[61]!==M||e[62]!==b||e[63]!==d||e[64]!==a||e[65]!==t||e[66]!==G||e[67]!==g||e[68]!==C||e[69]!==c||e[70]!==m||e[71]!==n?(f=L.jsxRuntimeExports.jsx(se.TreeMapGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[41]=E,e[42]=h,e[43]=y,e[44]=D,e[45]=q,e[46]=$,e[47]=R,e[48]=s,e[49]=r,e[50]=S,e[51]=j,e[52]=l,e[53]=o,e[54]=A,e[55]=p,e[56]=F,e[57]=k,e[58]=w,e[59]=u,e[60]=T,e[61]=M,e[62]=b,e[63]=d,e[64]=a,e[65]=t,e[66]=G,e[67]=g,e[68]=C,e[69]=c,e[70]=m,e[71]=n,e[72]=f):f=e[72],f}if(Z==="donutChart"){const g=x||W.Colors[C].categoricalColors.colors,f=n&&o?n<o?n:o:n||o||void 0,B=$;let I;return e[73]!==E||e[74]!==h||e[75]!==D||e[76]!==q||e[77]!==R||e[78]!==ee||e[79]!==s||e[80]!==r||e[81]!==S||e[82]!==j||e[83]!==l||e[84]!==A||e[85]!==k||e[86]!==w||e[87]!==u||e[88]!==T||e[89]!==N||e[90]!==t||e[91]!==G||e[92]!==g||e[93]!==f||e[94]!==B||e[95]!==C||e[96]!==c?(I=L.jsxRuntimeExports.jsx(le.DonutChart,{colors:g,graphTitle:l,graphDescription:r,footNote:s,radius:f,sources:t,backgroundColor:h,padding:u,tooltip:c,onSeriesMouseOver:w,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:B,strokeWidth:ee,showColorScale:!0,sortData:N,language:A,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[73]=E,e[74]=h,e[75]=D,e[76]=q,e[77]=R,e[78]=ee,e[79]=s,e[80]=r,e[81]=S,e[82]=j,e[83]=l,e[84]=A,e[85]=k,e[86]=w,e[87]=u,e[88]=T,e[89]=N,e[90]=t,e[91]=G,e[92]=g,e[93]=f,e[94]=B,e[95]=C,e[96]=c,e[97]=I):I=e[97],I}const re=x||W.Colors.graphMainColor;let V;return e[98]!==E||e[99]!==h||e[100]!==_||e[101]!==H||e[102]!==y||e[103]!==D||e[104]!==q||e[105]!==$||e[106]!==R||e[107]!==s||e[108]!==r||e[109]!==S||e[110]!==j||e[111]!==l||e[112]!==o||e[113]!==A||e[114]!==p||e[115]!==te||e[116]!==U||e[117]!==F||e[118]!==k||e[119]!==w||e[120]!==u||e[121]!==T||e[122]!==Q||e[123]!==M||e[124]!==b||e[125]!==d||e[126]!==P||e[127]!==a||e[128]!==N||e[129]!==t||e[130]!==G||e[131]!==re||e[132]!==C||e[133]!==c||e[134]!==m||e[135]!==Y||e[136]!==n?(V=L.jsxRuntimeExports.jsx(ae.SimpleBarGraph,{colors:re,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,barPadding:H,refValues:Q,truncateBy:Y,maxValue:U,showTicks:P,sortData:N,language:A,minHeight:F,theme:C,maxBarThickness:te,ariaLabel:E,orientation:_,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[98]=E,e[99]=h,e[100]=_,e[101]=H,e[102]=y,e[103]=D,e[104]=q,e[105]=$,e[106]=R,e[107]=s,e[108]=r,e[109]=S,e[110]=j,e[111]=l,e[112]=o,e[113]=A,e[114]=p,e[115]=te,e[116]=U,e[117]=F,e[118]=k,e[119]=w,e[120]=u,e[121]=T,e[122]=Q,e[123]=M,e[124]=b,e[125]=d,e[126]=P,e[127]=a,e[128]=N,e[129]=t,e[130]=G,e[131]=re,e[132]=C,e[133]=c,e[134]=m,e[135]=Y,e[136]=n,e[137]=V):V=e[137],V}function Me(i){return{label:`${i.x0}-${i.x1}`,size:i.length,data:{options:`${i.x0}-${i.x1}`,frequency:i.length}}}function ye(i){return i.value}exports.Histogram=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CHPV5EwG-CTPQjnHt.cjs"),oe=require("./Spinner-DRMBUsX7.cjs"),J=require("./index-CF5hnGvG.cjs"),se=require("./TreeMapGraph.cjs"),le=require("./DonutChart.cjs"),ae=require("./BarGraph.cjs"),W=require("./Colors.cjs"),ce=require("./init-DU0ybBc_.cjs"),K=require("./linear-BwPAspcq.cjs");function ue(i,e){let v=0;for(let l of i)l!=null&&(l=+l)>=l&&++v;return v}function he(i){return i}var fe=Array.prototype,pe=fe.slice;function ne(i){return()=>i}function ge(i,e,v){let l;for(;;){const t=K.tickIncrement(i,e,v);if(t===l||t===0||!isFinite(t))return[i,e];t>0?(i=Math.floor(i/t)*t,e=Math.ceil(e/t)*t):t<0&&(i=Math.ceil(i*t)/t,e=Math.floor(e*t)/t),l=t}}function me(i){return Math.max(1,Math.ceil(Math.log(ue(i))/Math.LN2)+1)}function xe(){var i=he,e=J.extent,v=me;function l(t){Array.isArray(t)||(t=Array.from(t));var r,H=t.length,a,P,p=new Array(H);for(r=0;r<H;++r)p[r]=i(t[r],r,t);var b=e(p),o=b[0],n=b[1],s=v(p,o,n);if(!Array.isArray(s)){const d=n,M=+s;if(e===J.extent&&([o,n]=ge(o,n,M)),s=K.ticks(o,n,M),s[0]<=o&&(P=K.tickIncrement(o,n,M)),s[s.length-1]>=n)if(d>=n&&e===J.extent){const c=K.tickIncrement(o,n,M);isFinite(c)&&(c>0?n=(Math.floor(n/c)+1)*c:c<0&&(n=(Math.ceil(n*-c)+1)/-c))}else s.pop()}for(var x=s.length,u=0,h=x;s[u]<=o;)++u;for(;s[h-1]>n;)--h;(u||h<x)&&(s=s.slice(u,h),x=h-u);var m=new Array(x+1),y;for(r=0;r<=x;++r)y=m[r]=[],y.x0=r>0?s[r-1]:o,y.x1=r<x?s[r]:n;if(isFinite(P)){if(P>0)for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[Math.min(x,Math.floor((a-o)/P))].push(t[r]);else if(P<0){for(r=0;r<H;++r)if((a=p[r])!=null&&o<=a&&a<=n){const d=Math.floor((o-a)*P);m[Math.min(x,d+(s[d]<=a))].push(t[r])}}}else for(r=0;r<H;++r)(a=p[r])!=null&&o<=a&&a<=n&&m[ce.bisectRight(s,a,0,x)].push(t[r]);return m}return l.value=function(t){return arguments.length?(i=typeof t=="function"?t:ne(t),l):i},l.domain=function(t){return arguments.length?(e=typeof t=="function"?t:ne([t[0],t[1]]),l):e},l.thresholds=function(t){return arguments.length?(v=typeof t=="function"?t:ne(Array.isArray(t)?pe.call(t):t),l):v},l}function de(i){const e=L.compilerRuntimeExports.c(138),{data:v,graphTitle:l,sources:t,graphDescription:r,barPadding:H,showValues:a,showTicks:P,leftMargin:p,rightMargin:b,height:o,width:n,footNote:s,colors:x,padding:u,backgroundColor:h,topMargin:m,bottomMargin:y,showLabels:d,relativeHeight:M,tooltip:c,onSeriesMouseOver:w,refValues:Q,graphID:j,maxValue:U,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,numberOfBins:X,truncateBy:Y,graphType:Z,barGraphLayout:_,donutStrokeWidth:ee,sortData:N,language:A,minHeight:F,theme:ie,maxBarThickness:te,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}=i,C=ie===void 0?"light":ie;let O;e[0]!==v||e[1]!==X?(O=xe().thresholds(X||10).value(ye)(v).map(Me),e[0]=v,e[1]=X,e[2]=O):O=e[2];const $=O;if($.length===0){const g=`${n}px`,f=`${o}px`;let B;e[3]!==g||e[4]!==f?(B={width:g,height:f,margin:"auto"},e[3]=g,e[4]=f,e[5]=B):B=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=L.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:L.jsxRuntimeExports.jsx(oe.w,{})}),e[6]=I):I=e[6];let z;return e[7]!==B?(z=L.jsxRuntimeExports.jsx("div",{style:B,children:I}),e[7]=B,e[8]=z):z=e[8],z}if(Z==="circlePacking"){const g=x||W.Colors.graphMainColor;let f;return e[9]!==E||e[10]!==h||e[11]!==y||e[12]!==D||e[13]!==q||e[14]!==$||e[15]!==R||e[16]!==s||e[17]!==r||e[18]!==S||e[19]!==j||e[20]!==l||e[21]!==o||e[22]!==A||e[23]!==p||e[24]!==F||e[25]!==k||e[26]!==w||e[27]!==u||e[28]!==T||e[29]!==M||e[30]!==b||e[31]!==d||e[32]!==a||e[33]!==t||e[34]!==G||e[35]!==g||e[36]!==C||e[37]!==c||e[38]!==m||e[39]!==n?(f=L.jsxRuntimeExports.jsx(J.CirclePackingGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[9]=E,e[10]=h,e[11]=y,e[12]=D,e[13]=q,e[14]=$,e[15]=R,e[16]=s,e[17]=r,e[18]=S,e[19]=j,e[20]=l,e[21]=o,e[22]=A,e[23]=p,e[24]=F,e[25]=k,e[26]=w,e[27]=u,e[28]=T,e[29]=M,e[30]=b,e[31]=d,e[32]=a,e[33]=t,e[34]=G,e[35]=g,e[36]=C,e[37]=c,e[38]=m,e[39]=n,e[40]=f):f=e[40],f}if(Z==="treeMap"){const g=x||W.Colors.graphMainColor;let f;return e[41]!==E||e[42]!==h||e[43]!==y||e[44]!==D||e[45]!==q||e[46]!==$||e[47]!==R||e[48]!==s||e[49]!==r||e[50]!==S||e[51]!==j||e[52]!==l||e[53]!==o||e[54]!==A||e[55]!==p||e[56]!==F||e[57]!==k||e[58]!==w||e[59]!==u||e[60]!==T||e[61]!==M||e[62]!==b||e[63]!==d||e[64]!==a||e[65]!==t||e[66]!==G||e[67]!==g||e[68]!==C||e[69]!==c||e[70]!==m||e[71]!==n?(f=L.jsxRuntimeExports.jsx(se.TreeMapGraph,{colors:g,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,language:A,minHeight:F,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[41]=E,e[42]=h,e[43]=y,e[44]=D,e[45]=q,e[46]=$,e[47]=R,e[48]=s,e[49]=r,e[50]=S,e[51]=j,e[52]=l,e[53]=o,e[54]=A,e[55]=p,e[56]=F,e[57]=k,e[58]=w,e[59]=u,e[60]=T,e[61]=M,e[62]=b,e[63]=d,e[64]=a,e[65]=t,e[66]=G,e[67]=g,e[68]=C,e[69]=c,e[70]=m,e[71]=n,e[72]=f):f=e[72],f}if(Z==="donutChart"){const g=x||W.Colors[C].categoricalColors.colors,f=n&&o?n<o?n:o:n||o||void 0,B=$;let I;return e[73]!==E||e[74]!==h||e[75]!==D||e[76]!==q||e[77]!==R||e[78]!==ee||e[79]!==s||e[80]!==r||e[81]!==S||e[82]!==j||e[83]!==l||e[84]!==A||e[85]!==k||e[86]!==w||e[87]!==u||e[88]!==T||e[89]!==N||e[90]!==t||e[91]!==G||e[92]!==g||e[93]!==f||e[94]!==B||e[95]!==C||e[96]!==c?(I=L.jsxRuntimeExports.jsx(le.DonutChart,{colors:g,graphTitle:l,graphDescription:r,footNote:s,radius:f,sources:t,backgroundColor:h,padding:u,tooltip:c,onSeriesMouseOver:w,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:B,strokeWidth:ee,showColorScale:!0,sortData:N,language:A,theme:C,ariaLabel:E,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[73]=E,e[74]=h,e[75]=D,e[76]=q,e[77]=R,e[78]=ee,e[79]=s,e[80]=r,e[81]=S,e[82]=j,e[83]=l,e[84]=A,e[85]=k,e[86]=w,e[87]=u,e[88]=T,e[89]=N,e[90]=t,e[91]=G,e[92]=g,e[93]=f,e[94]=B,e[95]=C,e[96]=c,e[97]=I):I=e[97],I}const re=x||W.Colors.graphMainColor;let V;return e[98]!==E||e[99]!==h||e[100]!==_||e[101]!==H||e[102]!==y||e[103]!==D||e[104]!==q||e[105]!==$||e[106]!==R||e[107]!==s||e[108]!==r||e[109]!==S||e[110]!==j||e[111]!==l||e[112]!==o||e[113]!==A||e[114]!==p||e[115]!==te||e[116]!==U||e[117]!==F||e[118]!==k||e[119]!==w||e[120]!==u||e[121]!==T||e[122]!==Q||e[123]!==M||e[124]!==b||e[125]!==d||e[126]!==P||e[127]!==a||e[128]!==N||e[129]!==t||e[130]!==G||e[131]!==re||e[132]!==C||e[133]!==c||e[134]!==m||e[135]!==Y||e[136]!==n?(V=L.jsxRuntimeExports.jsx(ae.SimpleBarGraph,{colors:re,graphTitle:l,graphDescription:r,footNote:s,width:n,height:o,sources:t,leftMargin:p,rightMargin:b,backgroundColor:h,padding:u,topMargin:m,bottomMargin:y,relativeHeight:M,showLabels:d,tooltip:c,onSeriesMouseOver:w,showColorScale:!1,showValues:a,graphID:j,onSeriesMouseClick:k,graphDownload:S,dataDownload:q,data:$,barPadding:H,refValues:Q,truncateBy:Y,maxValue:U,showTicks:P,sortData:N,language:A,minHeight:F,theme:C,maxBarThickness:te,ariaLabel:E,orientation:_,detailsOnClick:R,styles:G,classNames:D,precision:T}),e[98]=E,e[99]=h,e[100]=_,e[101]=H,e[102]=y,e[103]=D,e[104]=q,e[105]=$,e[106]=R,e[107]=s,e[108]=r,e[109]=S,e[110]=j,e[111]=l,e[112]=o,e[113]=A,e[114]=p,e[115]=te,e[116]=U,e[117]=F,e[118]=k,e[119]=w,e[120]=u,e[121]=T,e[122]=Q,e[123]=M,e[124]=b,e[125]=d,e[126]=P,e[127]=a,e[128]=N,e[129]=t,e[130]=G,e[131]=re,e[132]=C,e[133]=c,e[134]=m,e[135]=Y,e[136]=n,e[137]=V):V=e[137],V}function Me(i){return{label:`${i.x0}-${i.x1}`,size:i.length,data:{options:`${i.x0}-${i.x1}`,frequency:i.length}}}function ye(i){return i.value}exports.Histogram=de;
2
2
  //# sourceMappingURL=Histogram.cjs.map
@@ -30,6 +30,7 @@ declare interface ClassNameObject {
30
30
  regLine?: string;
31
31
  dataCards?: string;
32
32
  colorLegend?: string;
33
+ modal?: string;
33
34
  }
34
35
 
35
36
  export declare function Histogram(props: Props): JSX.Element;
@@ -161,6 +162,7 @@ declare interface StyleObject {
161
162
  mouseOverLine?: React.CSSProperties;
162
163
  regLine?: React.CSSProperties;
163
164
  dataCards?: React.CSSProperties;
165
+ modal?: React.CSSProperties;
164
166
  }
165
167
 
166
168
  export { }
package/dist/Histogram.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { c as ne, j as R } from "./index-CHPV5EwG-Curnpaqc.js";
2
2
  import { w as ae } from "./Spinner-D7rnnwnA.js";
3
- import { e as te, C as le } from "./index-B2LQV7Tk.js";
3
+ import { e as te, C as le } from "./index-DPGq3eIL.js";
4
4
  import { TreeMapGraph as se } from "./TreeMapGraph.js";
5
5
  import { DonutChart as ce } from "./DonutChart.js";
6
6
  import { SimpleBarGraph as fe } from "./BarGraph.js";
7
7
  import { Colors as q } from "./Colors.js";
8
- import { b as he } from "./init-BJFW6EwE.js";
9
- import { b as oe, d as ue } from "./linear-BwnDd9KF.js";
8
+ import { b as he } from "./init-BhZylTFx.js";
9
+ import { b as oe, d as ue } from "./linear-BqltdMeF.js";
10
10
  function me(i, e) {
11
11
  let b = 0;
12
12
  for (let l of i)
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-CTPQjnHt.cjs"),u=require("react"),bt=require("./parse-hMnG_lRV.cjs"),Et=require("./getSliderMarks-BmADcPQt.cjs"),Ot=require("./Spinner-DRMBUsX7.cjs"),wt=require("./index-DQA8q5sC.cjs"),pe=require("./zoom-DPw8bba-.cjs"),It=require("./Modal-JW_IExO3.cjs"),ft=require("./Typography-DX7PlgQU.cjs"),Pt=require("./index-DxXnJ8Ti.cjs"),kt=require("./Source-DYMJRrsq.cjs"),Lt=require("./index-Dzc_aaI9-BmkfPMyc.cjs"),zt=require("./Tooltip-4dJo4_AF.cjs"),_t=require("./string2HTML-CPGr_I5E.cjs"),vt=require("./index-DRXx7m-C.cjs"),Vt=require("./pow-DgrUorRi.cjs"),Tt=require("./ordinal-CrsysVE-.cjs"),Bt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./select-Bnfk0lJx.cjs"),it=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Wt=require("./numberFormattingFunction-02t-wJta.cjs"),Ft=require("./use-in-view-QcfiW0w3.cjs"),xe=require("./proxy-BxvUI_9l.cjs"),At=require("./index-DG2bgAva.cjs"),Ht=require("./GraphFooter.cjs"),Ut=require("./GraphHeader.cjs"),De=require("./Colors.cjs"),Gt=require("./fetchAndParseData-l5HGMAEs.cjs"),Xt=require("./uniqBy-O05lp2S5.cjs"),Rt=require("./GraphContainer-d8A46BK2.cjs"),Yt=require("./sort-O96oMZLb.cjs"),Jt=require("./getUniqValue-NX8DgwND.cjs"),Kt=require("./getJenks-GYmdwBqm.cjs"),Zt=require("./init-DU0ybBc_.cjs");function Qt(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,c.get?c:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const eo=Qt(u);var to="Separator",Ct="horizontal",oo=["horizontal","vertical"],St=eo.forwardRef((i,e)=>{const{decorative:t,orientation:c=Ct,...j}=i,a=ro(c)?c:Ct,b=t?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return r.ae.jsx(Lt.w.div,{"data-orientation":a,...b,...j,ref:e})});St.displayName=to;function ro(i){return oo.includes(i)}var Nt=St;const Dt=u.forwardRef((i,e)=>{const t=r._.c(14);let c,j,a,b;t[0]!==i?({className:c,variant:a,orientation:b,...j}=i,t[0]=i,t[1]=c,t[2]=j,t[3]=a,t[4]=b):(c=t[1],j=t[2],a=t[3],b=t[4]);const E=a===void 0?"dark":a,d=b===void 0?"horizontal":b,x=d==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",D=E==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let C;t[5]!==c||t[6]!==x||t[7]!==D?(C=r.mo(x,D,c),t[5]=c,t[6]=x,t[7]=D,t[8]=C):C=t[8];let I;return t[9]!==d||t[10]!==j||t[11]!==e||t[12]!==C?(I=r.ae.jsx(Nt,{...j,ref:e,orientation:d,className:C}),t[9]=d,t[10]=j,t[11]=e,t[12]=C,t[13]=I):I=t[13],I});Dt.displayName=Nt.displayName;function io(i){const{data:e,colors:t,mapData:c,mapColorLegendTitle:j,colorDomain:a,radius:b,height:E,width:d,scale:x,centerPoint:D,tooltip:C,showLabels:I,mapBorderWidth:ee,mapBorderColor:te,mapNoDataColor:he,onSeriesMouseOver:J,showColorScale:qe,zoomScaleExtend:Fe,zoomTranslateExtend:Ae,highlightedDataPoints:Me,onSeriesMouseClick:B,resetSelectionOnDoubleClick:$e,detailsOnClick:M,styles:$,classNames:ge,mapProjection:oe,zoomInteraction:K,animate:g,dimmedOpacity:W,customLayers:fe,maxRadiusValue:ye,categorical:re,dotColor:Z,collapseColorScaleByDefault:Oe,highlightedIds:ie,mapProperty:ve,dotLegendTitle:je,dotBorderColor:Ie,labelColor:Pe}=i,[P,L]=u.useState(void 0),[y,f]=u.useState(Oe===void 0?!(d<680):!Oe),ne=u.useRef(null),[F,Q]=u.useState(void 0),[Le,O]=u.useState(void 0),[ae,A]=u.useState(void 0),[be,H]=u.useState(void 0),z=u.useRef(null),U=Ft.useInView(z,{once:g.once,amount:g.amount}),Ee=u.useRef(null),_=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?Vt.sqrt().domain([0,ye]).range([.25,b]).nice():void 0,He=re?Tt.ordinal().domain(a).range(t):Bt.threshold().domain(a).range(t);u.useEffect(()=>{const o=yt.select(Ee.current),n=yt.select(z.current),q=m=>{if(K==="noZoom")return!1;if(K==="button")return!m.type.includes("wheel");const l=m.type==="wheel",w=m.type.startsWith("touch"),p=m.type==="mousedown"||m.type==="mousemove";return w?!0:l?K==="scroll"?!0:m.ctrlKey:p&&!m.button&&!m.ctrlKey},s=pe.zoom().scaleExtent(Fe).translateExtent(Ae||[[-20,-20],[d+20,E+20]]).filter(q).on("zoom",({transform:m})=>{o.attr("transform",m)});n.call(s),ne.current=s},[E,d,K]);const S=pe.turf_bbox_default(c),V=Pt.turf_center_of_mass_default(c),G=S[2]-S[0],ze=S[3]-S[1],_e=d*190/960*360/G,Ve=E*190/678*180/ze,X=x*Math.min(_e,Ve),T=oe==="mercator"?pe.geoMercator().rotate([0,0]).center(D||V.geometry.coordinates).translate([d/2,E/2]).scale(X):oe==="equalEarth"?pe.geoEqualEarth().rotate([0,0]).center(D||V.geometry.coordinates).translate([d/2,E/2]).scale(X):oe==="naturalEarth"?pe.geoNaturalEarth1().rotate([0,0]).center(D||V.geometry.coordinates).translate([d/2,E/2]).scale(X):oe==="orthographic"?pe.geoOrthographic().rotate([0,0]).center(D||V.geometry.coordinates).translate([d/2,E/2]).scale(X):pe.geoAlbersUsa().rotate([0,0]).center(D||V.geometry.coordinates).translate([d/2,E/2]).scale(X),we=o=>{if(!z.current||!ne.current)return;yt.select(z.current).call(ne.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(xe.motion.svg,{width:`${d}px`,height:`${E}px`,viewBox:`0 0 ${d} ${E}`,ref:z,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:Ee,children:[fe.filter(o=>o.position==="before").map(o=>o.layer),c.features.map((o,n)=>e.findIndex(s=>s.id===o.properties[ve])!==-1?null:r.jsxRuntimeExports.jsx("g",{opacity:P?W:ie.length!==0?ie.indexOf(o.properties[ve])!==-1?1:W:1,children:o.geometry.type==="MultiPolygon"?o.geometry.coordinates.map((s,m)=>{let l="";return s.forEach(w=>{let p=" M";w.forEach((h,se)=>{const N=T([h[0],h[1]]);se!==w.length-1?p=`${p}${N[0]} ${N[1]}L`:p=`${p}${N[0]} ${N[1]}`}),l+=p}),r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:te,strokeWidth:ee,fill:he}},m)}):o.geometry.coordinates.map((s,m)=>{let l="M";return s.forEach((w,p)=>{const h=T([w[0],w[1]]);p!==s.length-1?l=`${l}${h[0]} ${h[1]}L`:l=`${l}${h[0]} ${h[1]}`}),r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:te,strokeWidth:ee,fill:he}},m)})},n)),r.jsxRuntimeExports.jsxs(At.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const n=c.features.findIndex(s=>o.id===s.properties[ve]),q=it.checkIfNullOrUndefined(o.x)?he:He(o.x);return r.jsxRuntimeExports.jsx(xe.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:P?P===q?1:W:ie.length!==0?ie.indexOf(o.id)!==-1?1:W:1,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:s=>{O(o),H(s.clientY),A(s.clientX),J?.(o)},onMouseMove:s=>{O(o),H(s.clientY),A(s.clientX)},onMouseLeave:()=>{O(void 0),A(void 0),H(void 0),J?.(void 0)},onClick:()=>{(B||M)&&(wt.isEqual(F,o)&&$e?(Q(void 0),B?.(void 0)):(Q(o),B?.(o)))},children:n===-1?null:c.features[n].geometry.type==="MultiPolygon"?c.features[n].geometry.coordinates.map((s,m)=>{let l="";return s.forEach(w=>{let p=" M";w.forEach((h,se)=>{const N=T([h[0],h[1]]);se!==w.length-1?p=`${p}${N[0]} ${N[1]}L`:p=`${p}${N[0]} ${N[1]}`}),l+=p}),r.jsxRuntimeExports.jsx(xe.motion.path,{d:l,variants:{initial:{fill:q,opacity:0},whileInView:{fill:q,opacity:1,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{stroke:te,strokeWidth:ee}},`${o.id}-${m}`)}):c.features[n].geometry.coordinates.map((s,m)=>{let l="M";return s.forEach((w,p)=>{const h=T([w[0],w[1]]);p!==s.length-1?l=`${l}${h[0]} ${h[1]}L`:l=`${l}${h[0]} ${h[1]}`}),r.jsxRuntimeExports.jsx(xe.motion.path,{d:l,variants:{initial:{fill:q,opacity:0},whileInView:{fill:q,opacity:1,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},style:{stroke:te,strokeWidth:ee}},`${o.id}-${m}`)})},o.id)}),e.filter(o=>!it.checkIfNullOrUndefined(o.lat)&&!it.checkIfNullOrUndefined(o.long)).map(o=>r.jsxRuntimeExports.jsxs(xe.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Me.length!==0?Me.indexOf(o.label||"")!==-1?1:W:1,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},onMouseEnter:n=>{O(o),H(n.clientY),A(n.clientX),J?.(o)},onMouseMove:n=>{O(o),H(n.clientY),A(n.clientX)},onMouseLeave:()=>{O(void 0),A(void 0),H(void 0),J?.(void 0)},onClick:()=>{(B||M)&&(wt.isEqual(F,o)&&$e?(Q(void 0),B?.(void 0)):(Q(o),B?.(o)))},transform:`translate(${T([o.long,o.lat])[0]},${T([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(xe.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:Z,stroke:Ie||Z},whileInView:{r:_?_(o.radius||0):b,fill:Z,stroke:Ie||Z,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{r:0,transition:{duration:g.duration}},style:{fillOpacity:.8}}),I&&o.label?r.jsxRuntimeExports.jsx(xe.motion.text,{variants:{initial:{opacity:0,x:_?_(o.radius||0):b},whileInView:{opacity:1,x:_?_(o.radius||0):b,transition:{duration:g.duration}}},initial:"initial",animate:U?"whileInView":"initial",exit:{opacity:0,transition:{duration:g.duration}},y:0,className:"text-sm",style:{textAnchor:"start",fill:Pe||"#000"},dx:4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`))]}),fe.filter(o=>o.position==="after").map(o=>o.layer)]})}),qe===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",ge?.colorLegend),children:y?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{f(!1)},children:r.jsxRuntimeExports.jsx(vt.X,{})}),r.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:re?void 0:"340px"},children:[je&&je!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Z}}),r.jsxRuntimeExports.jsx(ft.j,{size:"xs",marginBottom:"none",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:je})]}),r.jsxRuntimeExports.jsx(kt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(Dt,{}),r.jsxRuntimeExports.jsx(kt.n,{size:"xl"})]}):null,j&&j!==""?r.jsxRuntimeExports.jsx(ft.j,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:j}):null,re?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:a.map((o,n)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{L(t[n%t.length])},onMouseLeave:()=>{L(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[n%t.length]}}),r.jsxRuntimeExports.jsx(ft.j,{size:"sm",marginBottom:"none",leading:"none",children:o})]},n))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[a.map((o,n)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{L(t[n])},onMouseLeave:()=>{L(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:n*320/t.length+1,y:1,width:320/t.length-2,height:8,className:P===t[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[n],...P===t[n]?{}:{stroke:t[n]}}}),r.jsxRuntimeExports.jsx("text",{x:(n+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Wt.numberFormattingFunction(o,"NA")})]},n)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{L(t[a.length])},onMouseLeave:()=>{L(void 0)},x:a.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${P===t[a.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[a.length],...P===t[a.length]?{}:{stroke:t[a.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{f(!0)},children:r.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),K==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>we("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>we("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),M&&F!==void 0?r.jsxRuntimeExports.jsx(It.le,{open:F!==void 0,onClose:()=>{Q(void 0)},children:r.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof M=="string"?{__html:_t.string2HTML(M,F)}:void 0,children:typeof M=="function"?M(F):null})}):null,Le&&C&&ae&&be?r.jsxRuntimeExports.jsx(zt.Tooltip,{data:Le,body:C,xPos:ae,yPos:be,backgroundStyle:$?.tooltip,className:ge?.tooltip}):null]})}function no(i){const e=r.compilerRuntimeExports.c(116),{data:t,mapData:c,graphTitle:j,colors:a,sources:b,graphDescription:E,height:d,width:x,footNote:D,mapColorLegendTitle:C,colorDomain:I,choroplethScaleType:ee,radius:te,scale:he,centerPoint:J,padding:qe,mapBorderWidth:Fe,mapNoDataColor:Ae,backgroundColor:Me,showLabels:B,mapBorderColor:$e,tooltip:M,relativeHeight:$,onSeriesMouseOver:ge,isWorldMap:oe,showColorScale:K,zoomScaleExtend:g,zoomTranslateExtend:W,graphID:fe,highlightedDataPoints:ye,onSeriesMouseClick:re,graphDownload:Z,dataDownload:Oe,showAntarctica:ie,language:ve,minHeight:je,theme:Ie,ariaLabel:Pe,resetSelectionOnDoubleClick:P,detailsOnClick:L,styles:y,classNames:f,mapProjection:ne,zoomInteraction:F,animate:Q,dimmedOpacity:Le,customLayers:O,maxRadiusValue:ae,timeline:A,collapseColorScaleByDefault:be,dotColor:H,highlightedIds:z,mapProperty:U,dotLegendTitle:Ee,dotBorderColor:_,labelColor:He}=i,S=c===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":c,V=D===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":D,G=ee===void 0?"threshold":ee,ze=te===void 0?5:te,_e=he===void 0?.95:he,Ve=Fe===void 0?.5:Fe,X=Ae===void 0?De.Colors.light.graphNoData:Ae,T=Me===void 0?!1:Me,we=B===void 0?!1:B,o=$e===void 0?De.Colors.light.grays["gray-500"]:$e,n=oe===void 0?!0:oe,q=K===void 0?!0:K;let s;e[0]!==g?(s=g===void 0?[.8,6]:g,e[0]=g,e[1]=s):s=e[1];const m=s;let l;e[2]!==ye?(l=ye===void 0?[]:ye,e[2]=ye,e[3]=l):l=e[3];const w=l,p=Z===void 0?!1:Z,h=Oe===void 0?!1:Oe,se=ie===void 0?!1:ie,N=ve===void 0?"en":ve,Y=je===void 0?0:je,le=Ie===void 0?"light":Ie,nt=P===void 0?!0:P,at=F===void 0?"button":F,Ue=Q===void 0?!1:Q,st=Le===void 0?.3:Le;let Ge;e[4]!==O?(Ge=O===void 0?[]:O,e[4]=O,e[5]=Ge):Ge=e[5];const lt=Ge,R=A===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:A,ct=H===void 0?De.Colors.primaryColors["blue-600"]:H;let Xe;e[6]!==z?(Xe=z===void 0?[]:z,e[6]=z,e[7]=Xe):Xe=e[7];const dt=Xe,ut=U===void 0?"ISO3":U,mt=He===void 0?De.Colors.primaryColors["blue-600"]:He,[ce,qt]=u.useState(0),[Te,Mt]=u.useState(0),[de,pt]=u.useState(R.autoplay),v=Yt.sort(Xt.uniqBy(t,"date",!0).map(k=>bt.parse(`${k}`,R.dateFormat||"yyyy",new Date).getTime()),go),[ue,Be]=u.useState(R.autoplay?0:v.length-1),[ke,$t]=u.useState(void 0),xt=u.useRef(null),jt=u.useRef(null);let Ye;e[8]!==G||e[9]!==I||e[10]!==a?.length||e[11]!==t?(Ye=I||(G==="categorical"?Jt.getUniqValue(t,"x"):Kt.getJenks(t.map(ho),a?.length||4)),e[8]=G,e[9]=I,e[10]=a?.length,e[11]=t,e[12]=Ye):Ye=e[12];const We=Ye;let Je,Ke;e[13]===Symbol.for("react.memo_cache_sentinel")?(Je=()=>{const k=new ResizeObserver(me=>{qt(me[0].target.clientWidth||620),Mt(me[0].target.clientHeight||480)});return xt.current&&k.observe(xt.current),()=>k.disconnect()},Ke=[],e[13]=Je,e[14]=Ke):(Je=e[13],Ke=e[14]),u.useEffect(Je,Ke);let Ze;e[15]===Symbol.for("react.memo_cache_sentinel")?(Ze=k=>{$t(k)},e[15]=Ze):Ze=e[15];const Qe=u.useEffectEvent(Ze);let et;e[16]!==S||e[17]!==Qe?(et=()=>{typeof S=="string"?Gt.fetchAndParseJSON(S).then(me=>{Qe(me)}):Qe(S)},e[16]=S,e[17]=Qe,e[18]=et):et=e[18];let tt;e[19]!==S?(tt=[S],e[19]=S,e[20]=tt):tt=e[20],u.useEffect(et,tt),u.useEffect(()=>{const k=setInterval(()=>{Be(me=>me<v.length-1?me+1:0)},(R.speed||2)*1e3);return de||clearInterval(k),()=>clearInterval(k)},[v,de,R.speed]);const ot=Et.getSliderMarks(v,ue,R.showOnlyActiveDate,R.dateFormat||"yyyy"),ht=f?.graphContainer,gt=y?.graphContainer;let Re;e[21]!==f?.description||e[22]!==f?.title||e[23]!==t||e[24]!==h||e[25]!==E||e[26]!==p||e[27]!==j||e[28]!==y?.description||e[29]!==y?.title||e[30]!==x?(Re=j||E||p||h?r.jsxRuntimeExports.jsx(Ut.GraphHeader,{styles:{title:y?.title,description:y?.description},classNames:{title:f?.title,description:f?.description},graphTitle:j,graphDescription:E,width:x,graphDownload:p?jt:void 0,dataDownload:h?t.map(xo).filter(po).length>0?t.map(mo).filter(uo):t.filter(co):null}):null,e[21]=f?.description,e[22]=f?.title,e[23]=t,e[24]=h,e[25]=E,e[26]=p,e[27]=j,e[28]=y?.description,e[29]=y?.title,e[30]=x,e[31]=Re):Re=e[31];let Ce;e[32]!==ue||e[33]!==ot||e[34]!==de||e[35]!==Be||e[36]!==pt||e[37]!==R.enabled||e[38]!==v?(Ce=R.enabled&&v.length>0&&ot?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{pt(!de)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":de?"Click to pause animation":"Click to play animation",children:de?r.jsxRuntimeExports.jsx(vt.Pause,{}):r.jsxRuntimeExports.jsx(vt.Play,{})}),r.jsxRuntimeExports.jsx(Et.Nr,{min:v[0],max:v[v.length-1],marks:ot,step:null,defaultValue:v[v.length-1],value:v[ue],onChangeComplete:k=>{Be(v.indexOf(k))},onChange:k=>{Be(v.indexOf(k))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[32]=ue,e[33]=ot,e[34]=de,e[35]=Be,e[36]=pt,e[37]=R.enabled,e[38]=v,e[39]=Ce):Ce=e[39];let Se;e[40]!==Ue||e[41]!==J||e[42]!==G||e[43]!==f||e[44]!==be||e[45]!==a||e[46]!==lt||e[47]!==t||e[48]!==L||e[49]!==st||e[50]!==We||e[51]!==_||e[52]!==ct||e[53]!==Ee||e[54]!==d||e[55]!==w||e[56]!==dt||e[57]!==ue||e[58]!==n||e[59]!==mt||e[60]!==o||e[61]!==Ve||e[62]!==C||e[63]!==X||e[64]!==ne||e[65]!==ut||e[66]!==ke||e[67]!==ae||e[68]!==Y||e[69]!==re||e[70]!==ge||e[71]!==ze||e[72]!==$||e[73]!==nt||e[74]!==_e||e[75]!==se||e[76]!==q||e[77]!==we||e[78]!==y||e[79]!==Te||e[80]!==ce||e[81]!==le||e[82]!==R.dateFormat||e[83]!==R.enabled||e[84]!==M||e[85]!==v||e[86]!==x||e[87]!==at||e[88]!==m||e[89]!==W?(Se=r.jsxRuntimeExports.jsx(Rt.GraphArea,{ref:xt,children:ce&&Te&&ke?r.jsxRuntimeExports.jsx(io,{dotColor:ct,data:t.filter(k=>R.enabled?k.date===bt.format(new Date(v[ue]),R.dateFormat||"yyyy"):k),mapData:se?ke:{...ke,features:ke.features.filter(lo)},colorDomain:We,width:ce,height:Te,scale:_e,centerPoint:J,colors:a||(G==="categorical"?De.Colors[le].sequentialColors[`neutralColorsx0${We.length}`]:De.Colors[le].sequentialColors[`neutralColorsx0${We.length+1}`]),mapColorLegendTitle:C,radius:ze,categorical:G==="categorical",mapBorderWidth:Ve,mapNoDataColor:X,mapBorderColor:o,tooltip:M,onSeriesMouseOver:ge,showLabels:we,isWorldMap:n,showColorScale:q,zoomScaleExtend:m,zoomTranslateExtend:W,onSeriesMouseClick:re,highlightedDataPoints:w,resetSelectionOnDoubleClick:nt,styles:y,classNames:f,zoomInteraction:at,detailsOnClick:L,mapProjection:ne||(n?"naturalEarth":"mercator"),animate:Ue===!0?{duration:.5,once:!0,amount:.5}:Ue||{duration:0,once:!0,amount:0},dimmedOpacity:st,customLayers:lt,maxRadiusValue:it.checkIfNullOrUndefined(ae)?Math.max(...t.map(so).filter(ao)):ae,collapseColorScaleByDefault:be,highlightedIds:dt,mapProperty:ut,dotLegendTitle:Ee,dotBorderColor:_,labelColor:mt}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(Y,d||($?Y?(x||ce)*$>Y?(x||ce)*$:Y:(x||ce)*$:Te))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(Ot.w,{"aria-label":"Loading graph"})})}),e[40]=Ue,e[41]=J,e[42]=G,e[43]=f,e[44]=be,e[45]=a,e[46]=lt,e[47]=t,e[48]=L,e[49]=st,e[50]=We,e[51]=_,e[52]=ct,e[53]=Ee,e[54]=d,e[55]=w,e[56]=dt,e[57]=ue,e[58]=n,e[59]=mt,e[60]=o,e[61]=Ve,e[62]=C,e[63]=X,e[64]=ne,e[65]=ut,e[66]=ke,e[67]=ae,e[68]=Y,e[69]=re,e[70]=ge,e[71]=ze,e[72]=$,e[73]=nt,e[74]=_e,e[75]=se,e[76]=q,e[77]=we,e[78]=y,e[79]=Te,e[80]=ce,e[81]=le,e[82]=R.dateFormat,e[83]=R.enabled,e[84]=M,e[85]=v,e[86]=x,e[87]=at,e[88]=m,e[89]=W,e[90]=Se):Se=e[90];let Ne;e[91]!==f?.footnote||e[92]!==f?.source||e[93]!==V||e[94]!==b||e[95]!==y?.footnote||e[96]!==y?.source||e[97]!==x?(Ne=b||V?r.jsxRuntimeExports.jsx(Ht.GraphFooter,{styles:{footnote:y?.footnote,source:y?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:b,footNote:V,width:x}):null,e[91]=f?.footnote,e[92]=f?.source,e[93]=V,e[94]=b,e[95]=y?.footnote,e[96]=y?.source,e[97]=x,e[98]=Ne):Ne=e[98];let rt;return e[99]!==Pe||e[100]!==T||e[101]!==fe||e[102]!==d||e[103]!==N||e[104]!==Y||e[105]!==qe||e[106]!==$||e[107]!==ht||e[108]!==gt||e[109]!==Re||e[110]!==Ce||e[111]!==Se||e[112]!==Ne||e[113]!==le||e[114]!==x?(rt=r.jsxRuntimeExports.jsxs(Rt.GraphContainer,{className:ht,style:gt,id:fe,ref:jt,"aria-label":Pe,backgroundColor:T,theme:le,language:N,minHeight:Y,width:x,height:d,relativeHeight:$,padding:qe,children:[Re,Ce,Se,Ne]}),e[99]=Pe,e[100]=T,e[101]=fe,e[102]=d,e[103]=N,e[104]=Y,e[105]=qe,e[106]=$,e[107]=ht,e[108]=gt,e[109]=Re,e[110]=Ce,e[111]=Se,e[112]=Ne,e[113]=le,e[114]=x,e[115]=rt):rt=e[115],rt}function ao(i){return i!=null}function so(i){return i.radius}function lo(i){return i.properties.NAME!=="Antarctica"}function co(i){return i!==void 0}function uo(i){return i!==void 0}function mo(i){return i.data}function po(i){return i!==void 0}function xo(i){return i.data}function ho(i){return i.x}function go(i,e){return Zt.ascending(i,e)}exports.HybridMap=no;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-CTPQjnHt.cjs"),m=require("react"),Ct=require("./parse-hMnG_lRV.cjs"),St=require("./getSliderMarks-BmADcPQt.cjs"),_t=require("./Spinner-DRMBUsX7.cjs"),Nt=require("./index-DQA8q5sC.cjs"),xe=require("./zoom-DPw8bba-.cjs"),Et=require("./Typography-DX7PlgQU.cjs"),Bt=require("./index-DxXnJ8Ti.cjs"),Dt=require("./Source-DYMJRrsq.cjs"),Ft=require("./index-Dzc_aaI9-BmkfPMyc.cjs"),Tt=require("./Tooltip-uUdw6wJL.cjs"),kt=require("./index-DRXx7m-C.cjs"),Wt=require("./DetailsModal-BN0HDFlV.cjs"),At=require("./pow-DgrUorRi.cjs"),Ut=require("./ordinal-CrsysVE-.cjs"),Gt=require("./threshold-DNsSUf8Q.cjs"),wt=require("./select-Bnfk0lJx.cjs"),lt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ht=require("./numberFormattingFunction-02t-wJta.cjs"),Xt=require("./use-in-view-QcfiW0w3.cjs"),he=require("./proxy-BxvUI_9l.cjs"),Yt=require("./index-DG2bgAva.cjs"),Jt=require("./GraphFooter.cjs"),Kt=require("./GraphHeader.cjs"),De=require("./Colors.cjs"),Zt=require("./fetchAndParseData-l5HGMAEs.cjs"),$t=require("./GraphContainer-d8A46BK2.cjs"),Qt=require("./getUniqValue-NX8DgwND.cjs"),eo=require("./getJenks-GYmdwBqm.cjs");function to(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const d=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,d.get?d:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const oo=to(m);var ro="Separator",Ot="horizontal",io=["horizontal","vertical"],Mt=oo.forwardRef((i,e)=>{const{decorative:t,orientation:d=Ot,...E}=i,n=ao(d)?d:Ot,w=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return r.ae.jsx(Ft.w.div,{"data-orientation":n,...w,...E,ref:e})});Mt.displayName=ro;function ao(i){return io.includes(i)}var qt=Mt;const It=m.forwardRef((i,e)=>{const t=r._.c(14);let d,E,n,w;t[0]!==i?({className:d,variant:n,orientation:w,...E}=i,t[0]=i,t[1]=d,t[2]=E,t[3]=n,t[4]=w):(d=t[1],E=t[2],n=t[3],w=t[4]);const k=n===void 0?"dark":n,u=w===void 0?"horizontal":w,g=u==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",D=k==="dark"?"bg-primary-gray-600 dark:bg-primary-gray-200":"bg-primary-gray-400 dark:bg-primary-gray-550";let C;t[5]!==d||t[6]!==g||t[7]!==D?(C=r.mo(g,D,d),t[5]=d,t[6]=g,t[7]=D,t[8]=C):C=t[8];let I;return t[9]!==u||t[10]!==E||t[11]!==e||t[12]!==C?(I=r.ae.jsx(qt,{...E,ref:e,orientation:u,className:C}),t[9]=u,t[10]=E,t[11]=e,t[12]=C,t[13]=I):I=t[13],I});It.displayName=qt.displayName;function no(i){const{data:e,colors:t,mapData:d,mapColorLegendTitle:E,colorDomain:n,radius:w,height:k,width:u,scale:g,centerPoint:D,tooltip:C,showLabels:I,mapBorderWidth:oe,mapBorderColor:re,mapNoDataColor:ge,onSeriesMouseOver:K,showColorScale:$e,zoomScaleExtend:We,zoomTranslateExtend:Ae,highlightedDataPoints:Oe,onSeriesMouseClick:F,resetSelectionOnDoubleClick:Me,detailsOnClick:Z,styles:O,classNames:ie,mapProjection:ae,zoomInteraction:Q,animate:v,dimmedOpacity:T,customLayers:fe,maxRadiusValue:ye,categorical:ne,dotColor:ee,collapseColorScaleByDefault:qe,highlightedIds:se,mapProperty:ve,dotLegendTitle:je,dotBorderColor:Ie,labelColor:Pe}=i,[P,z]=m.useState(void 0),[b,j]=m.useState(qe===void 0?!(u<680):!qe),le=m.useRef(null),[ce,te]=m.useState(void 0),[ze,M]=m.useState(void 0),[de,q]=m.useState(void 0),[be,W]=m.useState(void 0),L=m.useRef(null),A=Xt.useInView(L,{once:v.once,amount:v.amount}),Ee=m.useRef(null),V=e.filter(o=>o.radius===void 0||o.radius===null).length!==e.length?At.sqrt().domain([0,ye]).range([.25,w]).nice():void 0,Ue=ne?Ut.ordinal().domain(n).range(t):Gt.threshold().domain(n).range(t);m.useEffect(()=>{const o=wt.select(Ee.current),a=wt.select(L.current),$=p=>{if(Q==="noZoom")return!1;if(Q==="button")return!p.type.includes("wheel");const l=p.type==="wheel",R=p.type.startsWith("touch"),x=p.type==="mousedown"||p.type==="mousemove";return R?!0:l?Q==="scroll"?!0:p.ctrlKey:x&&!p.button&&!p.ctrlKey},s=xe.zoom().scaleExtent(We).translateExtent(Ae||[[-20,-20],[u+20,k+20]]).filter($).on("zoom",({transform:p})=>{o.attr("transform",p)});a.call(s),le.current=s},[k,u,Q]);const S=xe.turf_bbox_default(d),_=Bt.turf_center_of_mass_default(d),U=S[2]-S[0],Le=S[3]-S[1],Ve=u*190/960*360/U,_e=k*190/678*180/Le,G=g*Math.min(Ve,_e),B=ae==="mercator"?xe.geoMercator().rotate([0,0]).center(D||_.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="equalEarth"?xe.geoEqualEarth().rotate([0,0]).center(D||_.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="naturalEarth"?xe.geoNaturalEarth1().rotate([0,0]).center(D||_.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="orthographic"?xe.geoOrthographic().rotate([0,0]).center(D||_.geometry.coordinates).translate([u/2,k/2]).scale(G):xe.geoAlbersUsa().rotate([0,0]).center(D||_.geometry.coordinates).translate([u/2,k/2]).scale(G),we=o=>{if(!L.current||!le.current)return;wt.select(L.current).call(le.current.scaleBy,o==="in"?1.2:1/1.2)};return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r.jsxRuntimeExports.jsx(he.motion.svg,{width:`${u}px`,height:`${k}px`,viewBox:`0 0 ${u} ${k}`,ref:L,direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{ref:Ee,children:[fe.filter(o=>o.position==="before").map(o=>o.layer),d.features.map((o,a)=>e.findIndex(s=>s.id===o.properties[ve])!==-1?null:r.jsxRuntimeExports.jsx("g",{opacity:P?T:se.length!==0?se.indexOf(o.properties[ve])!==-1?1:T:1,children:o.geometry.type==="MultiPolygon"?o.geometry.coordinates.map((s,p)=>{let l="";return s.forEach(R=>{let x=" M";R.forEach((f,ue)=>{const N=B([f[0],f[1]]);ue!==R.length-1?x=`${x}${N[0]} ${N[1]}L`:x=`${x}${N[0]} ${N[1]}`}),l+=x}),r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:re,strokeWidth:oe,fill:ge}},p)}):o.geometry.coordinates.map((s,p)=>{let l="M";return s.forEach((R,x)=>{const f=B([R[0],R[1]]);x!==s.length-1?l=`${l}${f[0]} ${f[1]}L`:l=`${l}${f[0]} ${f[1]}`}),r.jsxRuntimeExports.jsx("path",{d:l,style:{stroke:re,strokeWidth:oe,fill:ge}},p)})},a)),r.jsxRuntimeExports.jsxs(Yt.AnimatePresence,{children:[e.filter(o=>o.id).map(o=>{const a=d.features.findIndex(s=>o.id===s.properties[ve]),$=lt.checkIfNullOrUndefined(o.x)?ge:Ue(o.x);return r.jsxRuntimeExports.jsx(he.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:P?P===$?1:T:se.length!==0?se.indexOf(o.id)!==-1?1:T:1,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:v.duration}},onMouseEnter:s=>{M(o),W(s.clientY),q(s.clientX),K?.(o)},onMouseMove:s=>{M(o),W(s.clientY),q(s.clientX)},onMouseLeave:()=>{M(void 0),q(void 0),W(void 0),K?.(void 0)},onClick:()=>{(F||Z)&&(Nt.isEqual(ce,o)&&Me?(te(void 0),F?.(void 0)):(te(o),F?.(o)))},children:a===-1?null:d.features[a].geometry.type==="MultiPolygon"?d.features[a].geometry.coordinates.map((s,p)=>{let l="";return s.forEach(R=>{let x=" M";R.forEach((f,ue)=>{const N=B([f[0],f[1]]);ue!==R.length-1?x=`${x}${N[0]} ${N[1]}L`:x=`${x}${N[0]} ${N[1]}`}),l+=x}),r.jsxRuntimeExports.jsx(he.motion.path,{d:l,variants:{initial:{fill:$,opacity:0},whileInView:{fill:$,opacity:1,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:v.duration}},style:{stroke:re,strokeWidth:oe}},`${o.id}-${p}`)}):d.features[a].geometry.coordinates.map((s,p)=>{let l="M";return s.forEach((R,x)=>{const f=B([R[0],R[1]]);x!==s.length-1?l=`${l}${f[0]} ${f[1]}L`:l=`${l}${f[0]} ${f[1]}`}),r.jsxRuntimeExports.jsx(he.motion.path,{d:l,variants:{initial:{fill:$,opacity:0},whileInView:{fill:$,opacity:1,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:v.duration}},style:{stroke:re,strokeWidth:oe}},`${o.id}-${p}`)})},o.id)}),e.filter(o=>!lt.checkIfNullOrUndefined(o.lat)&&!lt.checkIfNullOrUndefined(o.long)).map(o=>r.jsxRuntimeExports.jsxs(he.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:Oe.length!==0?Oe.indexOf(o.label||"")!==-1?1:T:1,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:v.duration}},onMouseEnter:a=>{M(o),W(a.clientY),q(a.clientX),K?.(o)},onMouseMove:a=>{M(o),W(a.clientY),q(a.clientX)},onMouseLeave:()=>{M(void 0),q(void 0),W(void 0),K?.(void 0)},onClick:()=>{(F||Z)&&(Nt.isEqual(ce,o)&&Me?(te(void 0),F?.(void 0)):(te(o),F?.(o)))},transform:`translate(${B([o.long,o.lat])[0]},${B([o.long,o.lat])[1]})`,children:[r.jsxRuntimeExports.jsx(he.motion.circle,{cx:0,cy:0,variants:{initial:{r:0,fill:ee,stroke:Ie||ee},whileInView:{r:V?V(o.radius||0):w,fill:ee,stroke:Ie||ee,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{r:0,transition:{duration:v.duration}},style:{fillOpacity:.8}}),I&&o.label?r.jsxRuntimeExports.jsx(he.motion.text,{variants:{initial:{opacity:0,x:V?V(o.radius||0):w},whileInView:{opacity:1,x:V?V(o.radius||0):w,transition:{duration:v.duration}}},initial:"initial",animate:A?"whileInView":"initial",exit:{opacity:0,transition:{duration:v.duration}},y:0,className:"text-sm",style:{textAnchor:"start",fill:Pe||"#000"},dx:4,dy:5,children:o.label}):null]},o.label||`${o.lat}-${o.long}`))]}),fe.filter(o=>o.position==="after").map(o=>o.layer)]})}),$e===!1?null:r.jsxRuntimeExports.jsx("div",{className:r.mo("absolute left-4 bottom-4 map-color-legend",ie?.colorLegend),children:b?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{j(!1)},children:r.jsxRuntimeExports.jsx(kt.X,{})}),r.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:ne?void 0:"340px"},children:[je&&je!==""?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:ee}}),r.jsxRuntimeExports.jsx(Et.j,{size:"xs",marginBottom:"none",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:je})]}),r.jsxRuntimeExports.jsx(Dt.n,{size:"xl"}),r.jsxRuntimeExports.jsx(It,{}),r.jsxRuntimeExports.jsx(Dt.n,{size:"xl"})]}):null,E&&E!==""?r.jsxRuntimeExports.jsx(Et.j,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:E}):null,ne?r.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:n.map((o,a)=>r.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{z(t[a%t.length])},onMouseLeave:()=>{z(void 0)},children:[r.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t[a%t.length]}}),r.jsxRuntimeExports.jsx(Et.j,{size:"sm",marginBottom:"none",leading:"none",children:o})]},a))}):r.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:r.jsxRuntimeExports.jsxs("g",{children:[n.map((o,a)=>r.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{z(t[a])},onMouseLeave:()=>{z(void 0)},className:"cursor-pointer",children:[r.jsxRuntimeExports.jsx("rect",{x:a*320/t.length+1,y:1,width:320/t.length-2,height:8,className:P===t[a]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:t[a],...P===t[a]?{}:{stroke:t[a]}}}),r.jsxRuntimeExports.jsx("text",{x:(a+1)*320/t.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Ht.numberFormattingFunction(o,"NA")})]},a)),r.jsxRuntimeExports.jsx("g",{children:r.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{z(t[n.length])},onMouseLeave:()=>{z(void 0)},x:n.length*320/t.length+1,y:1,width:320/t.length-2,height:8,className:`cursor-pointer ${P===t[n.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:t[n.length],...P===t[n.length]?{}:{stroke:t[n.length]}}})})]})})]})]}):r.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start map-legend-button",onClick:()=>{j(!0)},children:r.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),Q==="button"&&r.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[r.jsxRuntimeExports.jsx("button",{onClick:()=>we("in"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),r.jsxRuntimeExports.jsx("button",{onClick:()=>we("out"),className:"leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),Z&&ce!==void 0?r.jsxRuntimeExports.jsx(Wt.DetailsModal,{body:Z,data:ce,setData:te,className:ie?.modal}):null,ze&&C&&de&&be?r.jsxRuntimeExports.jsx(Tt.Tooltip,{data:ze,body:C,xPos:de,yPos:be,backgroundStyle:O?.tooltip,className:ie?.tooltip}):null]})}function so(i){const e=r.compilerRuntimeExports.c(131),{data:t,mapData:d,graphTitle:E,colors:n,sources:w,graphDescription:k,height:u,width:g,footNote:D,mapColorLegendTitle:C,colorDomain:I,choroplethScaleType:oe,radius:re,scale:ge,centerPoint:K,padding:$e,mapBorderWidth:We,mapNoDataColor:Ae,backgroundColor:Oe,showLabels:F,mapBorderColor:Me,tooltip:Z,relativeHeight:O,onSeriesMouseOver:ie,isWorldMap:ae,showColorScale:Q,zoomScaleExtend:v,zoomTranslateExtend:T,graphID:fe,highlightedDataPoints:ye,onSeriesMouseClick:ne,graphDownload:ee,dataDownload:qe,showAntarctica:se,language:ve,minHeight:je,theme:Ie,ariaLabel:Pe,resetSelectionOnDoubleClick:P,detailsOnClick:z,styles:b,classNames:j,mapProjection:le,zoomInteraction:ce,animate:te,dimmedOpacity:ze,customLayers:M,maxRadiusValue:de,timeline:q,collapseColorScaleByDefault:be,dotColor:W,highlightedIds:L,mapProperty:A,dotLegendTitle:Ee,dotBorderColor:V,labelColor:Ue}=i,S=d===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":d,_=D===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":D,U=oe===void 0?"threshold":oe,Le=re===void 0?5:re,Ve=ge===void 0?.95:ge,_e=We===void 0?.5:We,G=Ae===void 0?De.Colors.light.graphNoData:Ae,B=Oe===void 0?!1:Oe,we=F===void 0?!1:F,o=Me===void 0?De.Colors.light.grays["gray-500"]:Me,a=ae===void 0?!0:ae,$=Q===void 0?!0:Q;let s;e[0]!==v?(s=v===void 0?[.8,6]:v,e[0]=v,e[1]=s):s=e[1];const p=s;let l;e[2]!==ye?(l=ye===void 0?[]:ye,e[2]=ye,e[3]=l):l=e[3];const R=l,x=ee===void 0?!1:ee,f=qe===void 0?!1:qe,ue=se===void 0?!1:se,N=ve===void 0?"en":ve,H=je===void 0?0:je,me=Ie===void 0?"light":Ie,ct=P===void 0?!0:P,dt=ce===void 0?"button":ce,Ge=te===void 0?!1:te,ut=ze===void 0?.3:ze;let He;e[4]!==M?(He=M===void 0?[]:M,e[4]=M,e[5]=He):He=e[5];const mt=He;let Xe;e[6]!==q?(Xe=q===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:q,e[6]=q,e[7]=Xe):Xe=e[7];const c=Xe,pt=W===void 0?De.Colors.primaryColors["blue-600"]:W;let Ye;e[8]!==L?(Ye=L===void 0?[]:L,e[8]=L,e[9]=Ye):Ye=e[9];const xt=Ye,ht=A===void 0?"ISO3":A,gt=Ue===void 0?De.Colors.primaryColors["blue-600"]:Ue,[pe,Pt]=m.useState(0),[Be,zt]=m.useState(0),[X,Lt]=m.useState(c.autoplay);let Fe;if(e[10]!==t||e[11]!==c.dateFormat){let y;e[13]!==c.dateFormat?(y=J=>Ct.parse(`${J}`,c.dateFormat||"yyyy",new Date).getTime(),e[13]=c.dateFormat,e[14]=y):y=e[14],Fe=[...new Set(t.map(y))],Fe.sort(yo),e[10]=t,e[11]=c.dateFormat,e[12]=Fe}else Fe=e[12];const h=Fe,[Y,ft]=m.useState(c.autoplay?0:h.length-1),[ke,Vt]=m.useState(void 0),yt=m.useRef(null),Rt=m.useRef(null);let Je;e[15]!==U||e[16]!==I||e[17]!==n?.length||e[18]!==t?(Je=I||(U==="categorical"?Qt.getUniqValue(t,"x"):eo.getJenks(t.map(fo),n?.length||4)),e[15]=U,e[16]=I,e[17]=n?.length,e[18]=t,e[19]=Je):Je=e[19];const Te=Je;let Ke,Ze;e[20]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>{const y=new ResizeObserver(J=>{Pt(J[0].target.clientWidth||620),zt(J[0].target.clientHeight||480)});return yt.current&&y.observe(yt.current),()=>y.disconnect()},Ze=[],e[20]=Ke,e[21]=Ze):(Ke=e[20],Ze=e[21]),m.useEffect(Ke,Ze);let Qe;e[22]===Symbol.for("react.memo_cache_sentinel")?(Qe=y=>{Vt(y)},e[22]=Qe):Qe=e[22];const et=m.useEffectEvent(Qe);let tt;e[23]!==S||e[24]!==et?(tt=()=>{typeof S=="string"?Zt.fetchAndParseJSON(S).then(J=>{et(J)}):et(S)},e[23]=S,e[24]=et,e[25]=tt):tt=e[25];let ot;e[26]!==S?(ot=[S],e[26]=S,e[27]=ot):ot=e[27],m.useEffect(tt,ot);let rt,it;e[28]!==X||e[29]!==c.speed||e[30]!==h?(rt=()=>{const y=setInterval(()=>{ft(J=>J<h.length-1?J+1:0)},(c.speed||2)*1e3);return X||clearInterval(y),()=>clearInterval(y)},it=[h,X,c.speed],e[28]=X,e[29]=c.speed,e[30]=h,e[31]=rt,e[32]=it):(rt=e[31],it=e[32]),m.useEffect(rt,it);const vt=c.dateFormat||"yyyy";let at;e[33]!==Y||e[34]!==vt||e[35]!==c.showOnlyActiveDate||e[36]!==h?(at=St.getSliderMarks(h,Y,c.showOnlyActiveDate,vt),e[33]=Y,e[34]=vt,e[35]=c.showOnlyActiveDate,e[36]=h,e[37]=at):at=e[37];const nt=at,jt=j?.graphContainer,bt=b?.graphContainer;let Re;e[38]!==j?.description||e[39]!==j?.title||e[40]!==t||e[41]!==f||e[42]!==k||e[43]!==x||e[44]!==E||e[45]!==b?.description||e[46]!==b?.title||e[47]!==g?(Re=E||k||x||f?r.jsxRuntimeExports.jsx(Kt.GraphHeader,{styles:{title:b?.title,description:b?.description},classNames:{title:j?.title,description:j?.description},graphTitle:E,graphDescription:k,width:g,graphDownload:x?Rt:void 0,dataDownload:f?t.map(go).filter(ho).length>0?t.map(xo).filter(po):t.filter(mo):null}):null,e[38]=j?.description,e[39]=j?.title,e[40]=t,e[41]=f,e[42]=k,e[43]=x,e[44]=E,e[45]=b?.description,e[46]=b?.title,e[47]=g,e[48]=Re):Re=e[48];let Ce;e[49]!==Y||e[50]!==nt||e[51]!==X||e[52]!==c.enabled||e[53]!==h?(Ce=c.enabled&&h.length>0&&nt?r.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[r.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Lt(!X)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":X?"Click to pause animation":"Click to play animation",children:X?r.jsxRuntimeExports.jsx(kt.Pause,{}):r.jsxRuntimeExports.jsx(kt.Play,{})}),r.jsxRuntimeExports.jsx(St.Nr,{min:h[0],max:h[h.length-1],marks:nt,step:null,defaultValue:h[h.length-1],value:h[Y],onChangeComplete:y=>{ft(h.indexOf(y))},onChange:y=>{ft(h.indexOf(y))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[49]=Y,e[50]=nt,e[51]=X,e[52]=c.enabled,e[53]=h,e[54]=Ce):Ce=e[54];let Se;e[55]!==Ge||e[56]!==K||e[57]!==U||e[58]!==j||e[59]!==be||e[60]!==n||e[61]!==mt||e[62]!==t||e[63]!==z||e[64]!==ut||e[65]!==Te||e[66]!==V||e[67]!==pt||e[68]!==Ee||e[69]!==u||e[70]!==R||e[71]!==xt||e[72]!==Y||e[73]!==a||e[74]!==gt||e[75]!==o||e[76]!==_e||e[77]!==C||e[78]!==G||e[79]!==le||e[80]!==ht||e[81]!==ke||e[82]!==de||e[83]!==H||e[84]!==ne||e[85]!==ie||e[86]!==Le||e[87]!==O||e[88]!==ct||e[89]!==Ve||e[90]!==ue||e[91]!==$||e[92]!==we||e[93]!==b||e[94]!==Be||e[95]!==pe||e[96]!==me||e[97]!==c.dateFormat||e[98]!==c.enabled||e[99]!==Z||e[100]!==h||e[101]!==g||e[102]!==dt||e[103]!==p||e[104]!==T?(Se=r.jsxRuntimeExports.jsx($t.GraphArea,{ref:yt,children:pe&&Be&&ke?r.jsxRuntimeExports.jsx(no,{dotColor:pt,data:t.filter(y=>c.enabled?y.date===Ct.format(new Date(h[Y]),c.dateFormat||"yyyy"):y),mapData:ue?ke:{...ke,features:ke.features.filter(uo)},colorDomain:Te,width:pe,height:Be,scale:Ve,centerPoint:K,colors:n||(U==="categorical"?De.Colors[me].sequentialColors[`neutralColorsx0${Te.length}`]:De.Colors[me].sequentialColors[`neutralColorsx0${Te.length+1}`]),mapColorLegendTitle:C,radius:Le,categorical:U==="categorical",mapBorderWidth:_e,mapNoDataColor:G,mapBorderColor:o,tooltip:Z,onSeriesMouseOver:ie,showLabels:we,isWorldMap:a,showColorScale:$,zoomScaleExtend:p,zoomTranslateExtend:T,onSeriesMouseClick:ne,highlightedDataPoints:R,resetSelectionOnDoubleClick:ct,styles:b,classNames:j,zoomInteraction:dt,detailsOnClick:z,mapProjection:le||(a?"naturalEarth":"mercator"),animate:Ge===!0?{duration:.5,once:!0,amount:.5}:Ge||{duration:0,once:!0,amount:0},dimmedOpacity:ut,customLayers:mt,maxRadiusValue:lt.checkIfNullOrUndefined(de)?Math.max(...t.map(co).filter(lo)):de,collapseColorScaleByDefault:be,highlightedIds:xt,mapProperty:ht,dotLegendTitle:Ee,dotBorderColor:V,labelColor:gt}):r.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(H,u||(O?H?(g||pe)*O>H?(g||pe)*O:H:(g||pe)*O:Be))}px`},className:"flex items-center justify-center",children:r.jsxRuntimeExports.jsx(_t.w,{"aria-label":"Loading graph"})})}),e[55]=Ge,e[56]=K,e[57]=U,e[58]=j,e[59]=be,e[60]=n,e[61]=mt,e[62]=t,e[63]=z,e[64]=ut,e[65]=Te,e[66]=V,e[67]=pt,e[68]=Ee,e[69]=u,e[70]=R,e[71]=xt,e[72]=Y,e[73]=a,e[74]=gt,e[75]=o,e[76]=_e,e[77]=C,e[78]=G,e[79]=le,e[80]=ht,e[81]=ke,e[82]=de,e[83]=H,e[84]=ne,e[85]=ie,e[86]=Le,e[87]=O,e[88]=ct,e[89]=Ve,e[90]=ue,e[91]=$,e[92]=we,e[93]=b,e[94]=Be,e[95]=pe,e[96]=me,e[97]=c.dateFormat,e[98]=c.enabled,e[99]=Z,e[100]=h,e[101]=g,e[102]=dt,e[103]=p,e[104]=T,e[105]=Se):Se=e[105];let Ne;e[106]!==j?.footnote||e[107]!==j?.source||e[108]!==_||e[109]!==w||e[110]!==b?.footnote||e[111]!==b?.source||e[112]!==g?(Ne=w||_?r.jsxRuntimeExports.jsx(Jt.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:w,footNote:_,width:g}):null,e[106]=j?.footnote,e[107]=j?.source,e[108]=_,e[109]=w,e[110]=b?.footnote,e[111]=b?.source,e[112]=g,e[113]=Ne):Ne=e[113];let st;return e[114]!==Pe||e[115]!==B||e[116]!==fe||e[117]!==u||e[118]!==N||e[119]!==H||e[120]!==$e||e[121]!==O||e[122]!==jt||e[123]!==bt||e[124]!==Re||e[125]!==Ce||e[126]!==Se||e[127]!==Ne||e[128]!==me||e[129]!==g?(st=r.jsxRuntimeExports.jsxs($t.GraphContainer,{className:jt,style:bt,id:fe,ref:Rt,"aria-label":Pe,backgroundColor:B,theme:me,language:N,minHeight:H,width:g,height:u,relativeHeight:O,padding:$e,children:[Re,Ce,Se,Ne]}),e[114]=Pe,e[115]=B,e[116]=fe,e[117]=u,e[118]=N,e[119]=H,e[120]=$e,e[121]=O,e[122]=jt,e[123]=bt,e[124]=Re,e[125]=Ce,e[126]=Se,e[127]=Ne,e[128]=me,e[129]=g,e[130]=st):st=e[130],st}function lo(i){return i!=null}function co(i){return i.radius}function uo(i){return i.properties.NAME!=="Antarctica"}function mo(i){return i!==void 0}function po(i){return i!==void 0}function xo(i){return i.data}function ho(i){return i!==void 0}function go(i){return i.data}function fo(i){return i.x}function yo(i,e){return i-e}exports.HybridMap=so;
2
2
  //# sourceMappingURL=HybridMap.cjs.map