@undp/data-viz 2.1.3 → 2.1.5

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 (154) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +279 -272
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.d.ts +2 -0
  8. package/dist/BarGraph.js +1795 -1724
  9. package/dist/BarGraph.js.map +1 -1
  10. package/dist/BeeSwarmChart.cjs +1 -1
  11. package/dist/BeeSwarmChart.cjs.map +1 -1
  12. package/dist/BeeSwarmChart.js +312 -305
  13. package/dist/BeeSwarmChart.js.map +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs +1 -1
  15. package/dist/BiVariateChoroplethMap.js +1 -1
  16. package/dist/BulletChart.cjs +1 -1
  17. package/dist/BulletChart.cjs.map +1 -1
  18. package/dist/BulletChart.js +298 -287
  19. package/dist/BulletChart.js.map +1 -1
  20. package/dist/ButterflyChart.cjs +1 -1
  21. package/dist/ButterflyChart.cjs.map +1 -1
  22. package/dist/ButterflyChart.js +224 -217
  23. package/dist/ButterflyChart.js.map +1 -1
  24. package/dist/ChoroplethMap.cjs +1 -1
  25. package/dist/ChoroplethMap.js +1 -1
  26. package/dist/CirclePackingGraph.cjs +1 -1
  27. package/dist/CirclePackingGraph.js +2 -2
  28. package/dist/DifferenceLineChart.cjs +1 -1
  29. package/dist/DifferenceLineChart.cjs.map +1 -1
  30. package/dist/DifferenceLineChart.js +404 -397
  31. package/dist/DifferenceLineChart.js.map +1 -1
  32. package/dist/DonutChart.cjs +1 -1
  33. package/dist/DonutChart.cjs.map +1 -1
  34. package/dist/DonutChart.js +116 -113
  35. package/dist/DonutChart.js.map +1 -1
  36. package/dist/DotDensityMap.cjs +1 -1
  37. package/dist/DotDensityMap.js +1 -1
  38. package/dist/DualAxisLineChart.cjs +1 -1
  39. package/dist/DualAxisLineChart.cjs.map +1 -1
  40. package/dist/DualAxisLineChart.js +320 -313
  41. package/dist/DualAxisLineChart.js.map +1 -1
  42. package/dist/DumbbellChart.cjs +1 -1
  43. package/dist/DumbbellChart.cjs.map +1 -1
  44. package/dist/DumbbellChart.js +298 -291
  45. package/dist/DumbbellChart.js.map +1 -1
  46. package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
  47. package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
  48. package/dist/EmptyState-gLDRXBHm.cjs +2 -0
  49. package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
  50. package/dist/GraphEl-BixTEyKW.cjs +2 -0
  51. package/dist/GraphEl-BixTEyKW.cjs.map +1 -0
  52. package/dist/{GraphEl-CRrAlbcr.js → GraphEl-Dyu_EIQb.js} +3 -2
  53. package/dist/GraphEl-Dyu_EIQb.js.map +1 -0
  54. package/dist/GriddedGraphs.cjs +1 -1
  55. package/dist/GriddedGraphs.js +2 -2
  56. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  57. package/dist/GriddedGraphsFromConfig.js +1 -1
  58. package/dist/HeatMap.cjs +1 -1
  59. package/dist/HeatMap.cjs.map +1 -1
  60. package/dist/HeatMap.js +179 -172
  61. package/dist/HeatMap.js.map +1 -1
  62. package/dist/Histogram.cjs +1 -1
  63. package/dist/Histogram.js +2 -2
  64. package/dist/HybridMap.cjs +1 -1
  65. package/dist/HybridMap.js +1 -1
  66. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  67. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  68. package/dist/LineChartWithConfidenceInterval.js +368 -361
  69. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  70. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  71. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  72. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  73. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  74. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  75. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  76. package/dist/MultiLineAltChart.cjs +1 -1
  77. package/dist/MultiLineAltChart.cjs.map +1 -1
  78. package/dist/MultiLineAltChart.js +327 -320
  79. package/dist/MultiLineAltChart.js.map +1 -1
  80. package/dist/MultiLineChart.cjs +1 -1
  81. package/dist/MultiLineChart.cjs.map +1 -1
  82. package/dist/MultiLineChart.js +374 -367
  83. package/dist/MultiLineChart.js.map +1 -1
  84. package/dist/ParetoChart.cjs +1 -1
  85. package/dist/ParetoChart.cjs.map +1 -1
  86. package/dist/ParetoChart.js +385 -378
  87. package/dist/ParetoChart.js.map +1 -1
  88. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  89. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  90. package/dist/RadarChart.cjs +1 -1
  91. package/dist/RadarChart.cjs.map +1 -1
  92. package/dist/RadarChart.js +34 -33
  93. package/dist/RadarChart.js.map +1 -1
  94. package/dist/SankeyChart.cjs +1 -1
  95. package/dist/SankeyChart.cjs.map +1 -1
  96. package/dist/SankeyChart.js +176 -169
  97. package/dist/SankeyChart.js.map +1 -1
  98. package/dist/ScatterPlot.cjs +1 -1
  99. package/dist/ScatterPlot.cjs.map +1 -1
  100. package/dist/ScatterPlot.js +366 -359
  101. package/dist/ScatterPlot.js.map +1 -1
  102. package/dist/SimpleLineChart.cjs +1 -1
  103. package/dist/SimpleLineChart.cjs.map +1 -1
  104. package/dist/SimpleLineChart.js +285 -278
  105. package/dist/SimpleLineChart.js.map +1 -1
  106. package/dist/SingleGraphDashboard.cjs +1 -1
  107. package/dist/SingleGraphDashboard.js +2 -2
  108. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  109. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  110. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  111. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  112. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  113. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  114. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  115. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  116. package/dist/SlopeChart.cjs +1 -1
  117. package/dist/SlopeChart.cjs.map +1 -1
  118. package/dist/SlopeChart.js +243 -236
  119. package/dist/SlopeChart.js.map +1 -1
  120. package/dist/Spinner-CQZcjzwd.cjs +2 -0
  121. package/dist/Spinner-CQZcjzwd.cjs.map +1 -0
  122. package/dist/{Spinner-D7rnnwnA.js → Spinner-DVBnY6Vg.js} +5 -5
  123. package/dist/Spinner-DVBnY6Vg.js.map +1 -0
  124. package/dist/StripChart.cjs +1 -1
  125. package/dist/StripChart.cjs.map +1 -1
  126. package/dist/StripChart.js +293 -286
  127. package/dist/StripChart.js.map +1 -1
  128. package/dist/ThreeDGlobe.cjs +1 -1
  129. package/dist/ThreeDGlobe.js +1 -1
  130. package/dist/TreeMapGraph.cjs +1 -1
  131. package/dist/TreeMapGraph.cjs.map +1 -1
  132. package/dist/TreeMapGraph.js +222 -215
  133. package/dist/TreeMapGraph.js.map +1 -1
  134. package/dist/index-R1gTfap5.js +337 -0
  135. package/dist/index-R1gTfap5.js.map +1 -0
  136. package/dist/index-WML2dCZ0.cjs +2 -0
  137. package/dist/{index-CF5hnGvG.cjs.map → index-WML2dCZ0.cjs.map} +1 -1
  138. package/dist/index.cjs +1 -1
  139. package/dist/index.d.ts +2 -0
  140. package/dist/index.js +1 -1
  141. package/dist/style.css +1 -1
  142. package/package.json +2 -2
  143. package/dist/EmptyState-BZo1BbAn.js.map +0 -1
  144. package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
  145. package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
  146. package/dist/GraphEl-BLMih7RN.cjs +0 -2
  147. package/dist/GraphEl-BLMih7RN.cjs.map +0 -1
  148. package/dist/GraphEl-CRrAlbcr.js.map +0 -1
  149. package/dist/Spinner-D7rnnwnA.js.map +0 -1
  150. package/dist/Spinner-DRMBUsX7.cjs +0 -2
  151. package/dist/Spinner-DRMBUsX7.cjs.map +0 -1
  152. package/dist/index-CF5hnGvG.cjs +0 -2
  153. package/dist/index-DPGq3eIL.js +0 -330
  154. package/dist/index-DPGq3eIL.js.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 { 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","neutralColorsx09","_temp6","colorLegend","ThresholdColorLegendWithMouseOver","LinearColorLegend","GraphArea","t29","footnote","source","GraphFooter","t30","GraphContainer","d_4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwDO,SAAAA,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,kBAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,mBAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AA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A3G3C,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
+ {"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 {showColorScale && data.length > 0 ? (\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 {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\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 {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","colorLegend","ColorLegendWithMouseOver","categoricalColors","sequentialColors","neutralColorsx09","_temp6","ThresholdColorLegendWithMouseOver","LinearColorLegend","t29","EmptyState","t30","t31","GraphArea","t32","footnote","source","GraphFooter","t33","GraphContainer","d_4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwDO,SAAAA,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,kBAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,mBAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,WAAA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AAAA,IACKX,iBAAAA,GACVU,OAAAA,GACGH,UAAAA,IACCE,WAAAA,IACJ,OAAA+B,IACCpL,QAAAA,GACQ6I,gBAAAA,GACPF,SAAAA,GAER0C,UAAAA;AAAAA,IAAAA;AAAAA,IAuBAQ;AAAAA,IA4DDY;AAAAA,IAkDCE;AAAAA,EAAAA,GAYH,GAAiBnN,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,QAAAiN,IAAAjN,QAAAmN,IAAAnN,QAAA8J,GAAA9J,QAAAuN,MAAAA,KAAAvN,EAAA,EAAA,GAhKjBuN;AAgKiB;AA1Od,SAAAZ,GAAAc,GAAA;AAAA,SAkIuC,GAAG1H,CAAC;AAAE;AAlI7C,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-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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-CHPV5EwG-CTPQjnHt.cjs"),oe=require("./Spinner-CQZcjzwd.cjs"),J=require("./index-WML2dCZ0.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
package/dist/Histogram.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as ne, j as R } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { w as ae } from "./Spinner-D7rnnwnA.js";
3
- import { e as te, C as le } from "./index-DPGq3eIL.js";
2
+ import { w as ae } from "./Spinner-DVBnY6Vg.js";
3
+ import { e as te, C as le } from "./index-R1gTfap5.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";
@@ -1,2 +1,2 @@
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"),Vt=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),_=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),V=Bt.turf_center_of_mass_default(d),U=S[2]-S[0],Le=S[3]-S[1],_e=u*190/960*360/U,Ve=k*190/678*180/Le,G=g*Math.min(_e,Ve),B=ae==="mercator"?xe.geoMercator().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="equalEarth"?xe.geoEqualEarth().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="naturalEarth"?xe.geoNaturalEarth1().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="orthographic"?xe.geoOrthographic().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):xe.geoAlbersUsa().rotate([0,0]).center(D||V.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:_?_(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:_?_(o.radius||0):w},whileInView:{opacity:1,x:_?_(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:_,labelColor:Ue}=i,S=d===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":d,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,U=oe===void 0?"threshold":oe,Le=re===void 0?5:re,_e=ge===void 0?.95:ge,Ve=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.date}`,c.dateFormat||"yyyy",new Date).getTime(),e[13]=c.dateFormat,e[14]=y):y=e[14],Fe=[...new Set(t.filter(vo).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,_t]=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=>{_t(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]!==_||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]!==Ve||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]!==_e||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:_e,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:Ve,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:_,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(Vt.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]=_,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]=Ve,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]=_e,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]!==V||e[109]!==w||e[110]!==b?.footnote||e[111]!==b?.source||e[112]!==g?(Ne=w||V?r.jsxRuntimeExports.jsx(Jt.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:w,footNote:V,width:g}):null,e[106]=j?.footnote,e[107]=j?.source,e[108]=V,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}function vo(i){return i.date}exports.HybridMap=so;
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"),Vt=require("./Spinner-CQZcjzwd.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),_=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),V=Bt.turf_center_of_mass_default(d),U=S[2]-S[0],Le=S[3]-S[1],_e=u*190/960*360/U,Ve=k*190/678*180/Le,G=g*Math.min(_e,Ve),B=ae==="mercator"?xe.geoMercator().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="equalEarth"?xe.geoEqualEarth().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="naturalEarth"?xe.geoNaturalEarth1().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):ae==="orthographic"?xe.geoOrthographic().rotate([0,0]).center(D||V.geometry.coordinates).translate([u/2,k/2]).scale(G):xe.geoAlbersUsa().rotate([0,0]).center(D||V.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:_?_(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:_?_(o.radius||0):w},whileInView:{opacity:1,x:_?_(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:_,labelColor:Ue}=i,S=d===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json":d,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,U=oe===void 0?"threshold":oe,Le=re===void 0?5:re,_e=ge===void 0?.95:ge,Ve=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.date}`,c.dateFormat||"yyyy",new Date).getTime(),e[13]=c.dateFormat,e[14]=y):y=e[14],Fe=[...new Set(t.filter(vo).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,_t]=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=>{_t(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]!==_||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]!==Ve||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]!==_e||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:_e,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:Ve,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:_,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(Vt.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]=_,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]=Ve,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]=_e,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]!==V||e[109]!==w||e[110]!==b?.footnote||e[111]!==b?.source||e[112]!==g?(Ne=w||V?r.jsxRuntimeExports.jsx(Jt.GraphFooter,{styles:{footnote:b?.footnote,source:b?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:w,footNote:V,width:g}):null,e[106]=j?.footnote,e[107]=j?.source,e[108]=V,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}function vo(i){return i.date}exports.HybridMap=so;
2
2
  //# sourceMappingURL=HybridMap.cjs.map
package/dist/HybridMap.js CHANGED
@@ -3,7 +3,7 @@ import * as Ae from "react";
3
3
  import Fe, { useState as z, useRef as Tt, useEffect as se, useEffectEvent as Te } from "react";
4
4
  import { f as Re, p as qe } from "./parse-DlCRUFh_.js";
5
5
  import { g as Ge, N as He } from "./getSliderMarks-HIDJ0_Cd.js";
6
- import { w as Ue } from "./Spinner-D7rnnwnA.js";
6
+ import { w as Ue } from "./Spinner-DVBnY6Vg.js";
7
7
  import { i as De } from "./index-Bwrro8-q.js";
8
8
  import { z as Xe, t as Ye, g as Je, a as Ke, b as Ze, c as Qe, d as to } from "./zoom-C9MFjAaV.js";
9
9
  import { j as je } from "./Typography-PxtFcnJb.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),w=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-uUdw6wJL.cjs"),F=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),O=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-sAEZ_5rU.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:A,width:J,height:qt,lineColor:b,suffix:V,prefix:C,dateFormat:l,highlightAreaSettings:h,showValues:Tt,noOfXTicks:me,rightMargin:$t,leftMargin:N,topMargin:Ft,bottomMargin:xt,tooltip:K,onSeriesMouseOver:Wt,refValues:_t,minValue:te,maxValue:mt,animate:o,rtl:pt,strokeWidth:Q,showDots:ee,annotations:ie,customHighlightAreaSettings:dt,regressionLine:ht,showIntervalDots:ne,showIntervalValues:pe,intervalLineStrokeWidth:Ht,intervalLineColors:R,intervalAreaColor:Gt,intervalAreaOpacity:Pt,yAxisTitle:ft,noOfYTicks:de,minDate:oe,maxDate:se,curveType:yt,styles:f,classNames:y,precision:S,customLayers:W}=n,gt=E.useRef(null);let H;t[0]!==o.amount||t[1]!==o.once?(H={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=H):H=t[2];const c=Qe.useInView(gt,H),[m,ae]=E.useState(!1);let vt,Z;t[3]!==o.duration||t[4]!==m||t[5]!==c?(vt=()=>{if(c&&!m){const e=setTimeout(()=>{ae(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},Z=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=vt,t[7]=Z):(vt=t[6],Z=t[7]),E.useEffect(vt,Z);const _=yt==="linear"?Ae.curveLinear:yt==="step"?be.curveStep:yt==="stepAfter"?be.stepAfter:yt==="stepBefore"?be.stepBefore:be.monotoneX,[k,jt]=E.useState(void 0),[G,re]=E.useState(void 0),[x,p]=E.useState(void 0),Yt=ft?N+30:N;let P;t[8]!==xt||t[9]!==$t||t[10]!==Yt||t[11]!==Ft?(P={top:Ft,bottom:xt,left:Yt,right:$t},t[8]=xt,t[9]=$t,t[10]=Yt,t[11]=Ft,t[12]=P):P=t[12];const v=P,tt=E.useRef(null);let et;t[13]!==l?(et=e=>({date:w.parse(`${e.date}`,l,new Date),y:e.y,yMin:F.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:F.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=et):et=t[14];const a=Te.orderBy(A.filter(yi).map(et),["date"],["asc"]);let it;if(t[15]!==l||t[16]!==h){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:w.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:w.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],it=h.map(e),t[15]=l,t[16]=h,t[17]=it}else it=t[17];const wt=it;let nt;if(t[20]!==dt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((z,Zt)=>Zt%2===0?w.parse(`${z}`,l,new Date):z)}),t[23]=l,t[24]=e):e=t[24],nt=dt.map(e),t[20]=dt,t[21]=l,t[22]=nt}else nt=t[22];const le=nt,u=J-v.left-v.right,g=qt-v.top-v.bottom,Ut=oe?w.parse(`${oe}`,l,new Date):a[0].date,ce=se?w.parse(`${se}`,l,new Date):a[a.length-1].date,j=F.checkIfNullOrUndefined(te)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:te,Y=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([Ut,ce]).range([0,u]);let ot;t[25]!==Y||t[26]!==mt?(ot=F.checkIfNullOrUndefined(mt)?Y>0?Y:0:mt,t[25]=Y,t[26]=mt,t[27]=ot):ot=t[27];const r=Xe.linear().domain([j,ot]).range([g,0]).nice(),Xt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(_),Rt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(_),Bt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(_),zt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(_),Jt=r.ticks(de),Kt=s.ticks(me);E.useEffect(()=>{const e=z=>{const Zt=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(z)[0]),0)];jt(Zt||a[a.length-1]),Wt?.(Zt||a[a.length-1]),p(z.clientY),re(z.clientX)},d=()=>{jt(void 0),re(void 0),p(void 0),Wt?.(void 0)};ze.select(tt.current).on("mousemove",e).on("mouseout",d)},[s,a,Wt]);const Qt=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Et=Se.linearRegressionLine(Qt);let M;t[28]!==o||t[29]!==g||t[30]!==u||t[31]!==wt||t[32]!==c||t[33]!==s?(M=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:wt,width:u,height:g,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=g,t[30]=u,t[31]=wt,t[32]=c,t[33]=s,t[34]=M):M=t[34];const Ct=f?.yAxis?.gridLines,Mt=f?.yAxis?.labels;let st;t[35]!==Ct||t[36]!==Mt?(st={gridLines:Ct,labels:Mt},t[35]=Ct,t[36]=Mt,t[37]=st):st=t[37];const at=y?.yAxis?.gridLines,Ot=y?.yAxis?.labels;let U;t[38]!==at||t[39]!==Ot?(U={gridLines:at,labels:Ot},t[38]=at,t[39]=Ot,t[40]=U):U=t[40];const At=r(j<0?0:j),bt=r(j<0?0:j),kt=0-N,Lt=u+v.right,It=j<0?0:j;let L;t[41]!==S||t[42]!==C||t[43]!==V||t[44]!==It?(L=Oe.numberFormattingFunction(It,"NA",S,C,V),t[41]=S,t[42]=C,t[43]=V,t[44]=It,t[45]=L):L=t[45];const Vt=0-N,X=r(j<0?0:j),ue=Y<0?"1em":-5;let I;t[46]!==Vt||t[47]!==X||t[48]!==ue?(I={x:Vt,y:X,dx:0,dy:ue},t[46]=Vt,t[47]=X,t[48]=ue,t[49]=I):I=t[49];const xe=y?.xAxis?.axis,Nt=y?.yAxis?.labels;let B;t[50]!==xe||t[51]!==Nt?(B={axis:xe,label:Nt},t[50]=xe,t[51]=Nt,t[52]=B):B=t[52];const rt=f?.xAxis?.axis,lt=f?.yAxis?.labels;let D;t[53]!==rt||t[54]!==lt?(D={axis:rt,label:lt},t[53]=rt,t[54]=lt,t[55]=D):D=t[55];let ct;t[56]!==At||t[57]!==bt||t[58]!==kt||t[59]!==Lt||t[60]!==L||t[61]!==I||t[62]!==B||t[63]!==D?(ct=i.jsxRuntimeExports.jsx(We.Axis,{y1:At,y2:bt,x1:kt,x2:Lt,label:L,labelPos:I,classNames:B,styles:D}),t[56]=At,t[57]=bt,t[58]=kt,t[59]=Lt,t[60]=L,t[61]=I,t[62]=B,t[63]=D,t[64]=ct):ct=t[64];const q=0-N+15,T=g/2,$=f?.yAxis?.title,ut=y?.yAxis?.title;let St;t[65]!==q||t[66]!==T||t[67]!==$||t[68]!==ut||t[69]!==ft?(St=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:q,y:T,style:$,className:ut,text:ft,rotate90:!0}),t[65]=q,t[66]=T,t[67]=$,t[68]=ut,t[69]=ft,t[70]=St):St=t[70];let Dt;t[71]!==W?(Dt=W.filter(ri).map(ai),t[71]=W,t[72]=Dt):Dt=t[72];let he;t[73]!==Gt?(he={fill:Gt},t[73]=Gt,t[74]=he):he=t[74];let fe;t[75]!==o.duration?(fe={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=fe):fe=t[76];let ye;t[77]!==b||t[78]!==Q?(ye={stroke:b,fill:"none",strokeWidth:Q},t[77]=b,t[78]=Q,t[79]=ye):ye=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const Le=a.map((e,d)=>i.jsxRuntimeExports.jsx(O.motion.g,{children:F.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[ee?i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ne?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:R[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:R[1],transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Tt?i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",S,C,V)}):null,pe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.text,{dy:"1em",style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:R[0],transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",S,C,V)}),i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:R[1],x:s(e.date),y:r(e.yMax),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",S,C,V)})]}):null]})},d));let ve;t[82]!==Le?(ve=i.jsxRuntimeExports.jsx("g",{children:Le}),t[82]=Le,t[83]=ve):ve=t[83];const Ie=ie.map((e,d)=>{const z=Ne.getLineEndPoint({x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Zt=e.showConnector?{y1:z.y,x1:z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:pt?0:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:pt?e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:Zt,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=ht?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Et(0),y2:Et(u),graphHeight:g,graphWidth:u,className:y?.regLine,style:f?.regLine,color:typeof ht=="string"?ht:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==W?(Re=W.filter(si).map(oi),t[88]=W,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==tt||t[92]!==g||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:tt,style:Ee,width:u,height:g}),t[91]=tt,t[92]=g,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==y?.tooltip||t[96]!==G||t[97]!==x||t[98]!==k||t[99]!==f?.tooltip||t[100]!==K?(Me=k&&K&&G&&x?i.jsxRuntimeExports.jsx($e.Tooltip,{data:k,body:K,xPos:G,yPos:x,backgroundStyle:f?.tooltip,className:y?.tooltip}):null,t[95]=y?.tooltip,t[96]=G,t[97]=x,t[98]=k,t[99]=f?.tooltip,t[100]=K,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.svg,{width:`${J}px`,height:`${qt}px`,viewBox:`0 0 ${J} ${qt}`,direction:"ltr",ref:gt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[M,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:le,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Jt.filter(ci),y:Jt.filter(li).map(e=>r(e)),x1:0-N,x2:u+v.right,styles:st,classNames:U,suffix:V,prefix:C,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:S}),ct,St]}),i.jsxRuntimeExports.jsx("g",{children:Kt.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:g,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:w.format(e,l)})},d))}),Dt,i.jsxRuntimeExports.jsx(O.motion.path,{style:he,exit:fe,variants:{initial:{opacity:0,d:zt(a)||""},whileInView:{opacity:Pt,d:zt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Ht?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[0],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Rt(a)||"",opacity:1},whileInView:{pathLength:1,d:Rt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[1],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Bt(a)||"",opacity:1},whileInView:{pathLength:1,d:Bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(O.motion.path,{style:ye,exit:ge,variants:{initial:{pathLength:0,d:Xt(a)||"",opacity:1},whileInView:{pathLength:1,d:Xt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),k?i.jsxRuntimeExports.jsx("line",{y1:0,y2:g,x1:s(k.date),x2:s(k.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",y?.mouseOverLine),style:f?.mouseOverLine}):null,ve,_t?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-N,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!F.checkIfNullOrUndefined(n.date)&&!F.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!F.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(95),{data:A,graphTitle:J,suffix:qt,sources:b,prefix:V,graphDescription:C,height:l,width:h,footNote:Tt,noOfXTicks:me,dateFormat:$t,showValues:N,backgroundColor:Ft,padding:xt,lineColor:K,leftMargin:Wt,rightMargin:_t,topMargin:te,bottomMargin:mt,tooltip:o,refValues:pt,highlightAreaSettings:Q,relativeHeight:ee,onSeriesMouseOver:ie,graphID:dt,minValue:ht,maxValue:ne,regressionLine:pe,showIntervalDots:Ht,showIntervalValues:R,intervalLineStrokeWidth:Gt,intervalLineColors:Pt,intervalAreaColor:ft,intervalAreaOpacity:de,graphDownload:oe,dataDownload:se,animate:yt,language:f,minHeight:y,strokeWidth:S,showDots:W,annotations:gt,customHighlightAreaSettings:H,theme:c,ariaLabel:m,yAxisTitle:ae,noOfYTicks:vt,minDate:Z,maxDate:_,colorLegendTitle:k,colorLegendColors:jt,colorLegendDomain:G,curveType:re,styles:x,classNames:p,precision:Yt,customLayers:P}=n,v=qt===void 0?"":qt,tt=V===void 0?"":V,et=me===void 0?10:me,a=$t===void 0?"yyyy":$t,it=N===void 0?!1:N,wt=Ft===void 0?!1:Ft,nt=Wt===void 0?30:Wt,le=_t===void 0?30:_t,u=te===void 0?20:te,g=mt===void 0?25:mt;let Ut;t[0]!==pt?(Ut=pt===void 0?[]:pt,t[0]=pt,t[1]=Ut):Ut=t[1];const ce=Ut;let j;t[2]!==Q?(j=Q===void 0?[]:Q,t[2]=Q,t[3]=j):j=t[3];const Y=j,s=pe===void 0?!1:pe,ot=Ht===void 0?!1:Ht,r=R===void 0?!1:R,Xt=Gt===void 0?0:Gt;let Rt;t[4]!==Pt?(Rt=Pt===void 0?[ke.Colors.light.grays["gray-500"],ke.Colors.light.grays["gray-500"]]:Pt,t[4]=Pt,t[5]=Rt):Rt=t[5];const Bt=Rt,zt=ft===void 0?ke.Colors.primaryColors["blue-100"]:ft,Jt=de===void 0?.4:de,Kt=oe===void 0?!1:oe,Qt=se===void 0?!1:se,Et=yt===void 0?!1:yt,M=f===void 0?"en":f,Ct=y===void 0?0:y,Mt=S===void 0?2:S,st=W===void 0?!0:W;let at;t[6]!==gt?(at=gt===void 0?[]:gt,t[6]=gt,t[7]=at):at=t[7];const Ot=at;let U;t[8]!==H?(U=H===void 0?[]:H,t[8]=H,t[9]=U):U=t[9];const At=U,bt=c===void 0?"light":c,kt=vt===void 0?5:vt,Lt=re===void 0?"curve":re,It=Yt===void 0?2:Yt;let L;t[10]!==P?(L=P===void 0?[]:P,t[10]=P,t[11]=L):L=t[11];const Vt=L,[X,ue]=E.useState(0),[I,xe]=E.useState(0),Nt=E.useRef(null),B=E.useRef(null);let rt,lt;t[12]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const St=new ResizeObserver(Dt=>{ue(Dt[0].target.clientWidth||620),xe(Dt[0].target.clientHeight||480)});return Nt.current&&St.observe(Nt.current),()=>St.disconnect()},lt=[],t[12]=rt,t[13]=lt):(rt=t[12],lt=t[13]),E.useEffect(rt,lt);const D=p?.graphContainer,ct=x?.graphContainer;let q;t[14]!==p?.description||t[15]!==p?.title||t[16]!==A||t[17]!==Qt||t[18]!==C||t[19]!==Kt||t[20]!==J||t[21]!==x?.description||t[22]!==x?.title||t[23]!==h?(q=J||C||Kt||Qt?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:x?.title,description:x?.description},classNames:{title:p?.title,description:p?.description},graphTitle:J,graphDescription:C,width:h,graphDownload:Kt?B:void 0,dataDownload:Qt?A.map(Ei).filter(Ri).length>0?A.map(wi).filter(ji):A.filter(vi):null}):null,t[14]=p?.description,t[15]=p?.title,t[16]=A,t[17]=Qt,t[18]=C,t[19]=Kt,t[20]=J,t[21]=x?.description,t[22]=x?.title,t[23]=h,t[24]=q):q=t[24];let T;t[25]!==Et||t[26]!==Ot||t[27]!==g||t[28]!==p||t[29]!==jt||t[30]!==G||t[31]!==k||t[32]!==Lt||t[33]!==At||t[34]!==Vt||t[35]!==A||t[36]!==a||t[37]!==Y||t[38]!==zt||t[39]!==Jt||t[40]!==Bt||t[41]!==Xt||t[42]!==M||t[43]!==nt||t[44]!==K||t[45]!==_||t[46]!==ne||t[47]!==Z||t[48]!==ht||t[49]!==et||t[50]!==kt||t[51]!==ie||t[52]!==It||t[53]!==tt||t[54]!==ce||t[55]!==s||t[56]!==le||t[57]!==st||t[58]!==ot||t[59]!==r||t[60]!==it||t[61]!==Mt||t[62]!==x||t[63]!==v||t[64]!==I||t[65]!==X||t[66]!==o||t[67]!==u||t[68]!==h||t[69]!==ae?(T=A.length===0?i.jsxRuntimeExports.jsx(ei.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt&&G?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:h,colorLegendTitle:k,colors:jt,colorDomain:G,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(De.GraphArea,{ref:Nt,children:X&&I?i.jsxRuntimeExports.jsx(ni,{data:A,lineColor:K||ke.Colors.primaryColors["blue-600"],width:X,height:I,suffix:v,prefix:tt,dateFormat:a,showValues:it,noOfXTicks:et??ii.getNoOfTicks(X),leftMargin:nt,rightMargin:le,topMargin:u,bottomMargin:g,tooltip:o,highlightAreaSettings:Y,onSeriesMouseOver:ie,refValues:ce,minValue:ht,maxValue:ne,animate:Et===!0?{duration:.5,once:!0,amount:.5}:Et||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:Mt,showDots:st,annotations:Ot,customHighlightAreaSettings:At,regressionLine:s,showIntervalDots:ot,showIntervalValues:r,intervalLineStrokeWidth:Xt,intervalLineColors:Bt,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:ae,noOfYTicks:kt,minDate:Z,maxDate:_,curveType:Lt,styles:x,classNames:p,precision:It,customLayers:Vt}):null})]}),t[25]=Et,t[26]=Ot,t[27]=g,t[28]=p,t[29]=jt,t[30]=G,t[31]=k,t[32]=Lt,t[33]=At,t[34]=Vt,t[35]=A,t[36]=a,t[37]=Y,t[38]=zt,t[39]=Jt,t[40]=Bt,t[41]=Xt,t[42]=M,t[43]=nt,t[44]=K,t[45]=_,t[46]=ne,t[47]=Z,t[48]=ht,t[49]=et,t[50]=kt,t[51]=ie,t[52]=It,t[53]=tt,t[54]=ce,t[55]=s,t[56]=le,t[57]=st,t[58]=ot,t[59]=r,t[60]=it,t[61]=Mt,t[62]=x,t[63]=v,t[64]=I,t[65]=X,t[66]=o,t[67]=u,t[68]=h,t[69]=ae,t[70]=T):T=t[70];let $;t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==Tt||t[74]!==b||t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==h?($=b||Tt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:x?.footnote,source:x?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:b,footNote:Tt,width:h}):null,t[71]=p?.footnote,t[72]=p?.source,t[73]=Tt,t[74]=b,t[75]=x?.footnote,t[76]=x?.source,t[77]=h,t[78]=$):$=t[78];let ut;return t[79]!==m||t[80]!==wt||t[81]!==dt||t[82]!==l||t[83]!==M||t[84]!==Ct||t[85]!==xt||t[86]!==ee||t[87]!==D||t[88]!==ct||t[89]!==q||t[90]!==T||t[91]!==$||t[92]!==bt||t[93]!==h?(ut=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:D,style:ct,id:dt,ref:B,"aria-label":m,backgroundColor:wt,theme:bt,language:M,minHeight:Ct,width:h,height:l,relativeHeight:ee,padding:xt,children:[q,T,$]}),t[79]=m,t[80]=wt,t[81]=dt,t[82]=l,t[83]=M,t[84]=Ct,t[85]=xt,t[86]=ee,t[87]=D,t[88]=ct,t[89]=q,t[90]=T,t[91]=$,t[92]=bt,t[93]=h,t[94]=ut):ut=t[94],ut}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),C=require("react"),R=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-uUdw6wJL.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),A=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),Le=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-gLDRXBHm.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:h,width:_,height:Ft,lineColor:b,suffix:S,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Wt,noOfXTicks:he,rightMargin:Ht,leftMargin:D,topMargin:Gt,bottomMargin:dt,tooltip:tt,onSeriesMouseOver:Pt,refValues:ie,minValue:ne,maxValue:ht,animate:o,rtl:ft,strokeWidth:et,showDots:oe,annotations:se,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ae,showIntervalValues:fe,intervalLineStrokeWidth:Yt,intervalLineColors:E,intervalAreaColor:Ut,intervalAreaOpacity:Xt,yAxisTitle:vt,noOfYTicks:ye,minDate:re,maxDate:le,curveType:jt,styles:y,classNames:g,precision:q,customLayers:P}=n,wt=C.useRef(null);let Y;t[0]!==o.amount||t[1]!==o.once?(Y={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Y):Y=t[2];const c=Qe.useInView(wt,Y),[p,ce]=C.useState(!1);let Rt,it;t[3]!==o.duration||t[4]!==p||t[5]!==c?(Rt=()=>{if(c&&!p){const e=setTimeout(()=>{ce(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},it=[c,p,o.duration],t[3]=o.duration,t[4]=p,t[5]=c,t[6]=Rt,t[7]=it):(Rt=t[6],it=t[7]),C.useEffect(Rt,it);const nt=jt==="linear"?Ae.curveLinear:jt==="step"?be.curveStep:jt==="stepAfter"?be.stepAfter:jt==="stepBefore"?be.stepBefore:be.monotoneX,[L,Et]=C.useState(void 0),[U,ue]=C.useState(void 0),[m,x]=C.useState(void 0),Bt=vt?D+30:D;let X;t[8]!==dt||t[9]!==Ht||t[10]!==Bt||t[11]!==Gt?(X={top:Gt,bottom:dt,left:Bt,right:Ht},t[8]=dt,t[9]=Ht,t[10]=Bt,t[11]=Gt,t[12]=X):X=t[12];const j=X,ot=C.useRef(null);let st;t[13]!==l?(st=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=st):st=t[14];const a=Te.orderBy(h.filter(yi).map(st),["date"],["asc"]);let at;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],at=f.map(e),t[15]=l,t[16]=f,t[17]=at}else at=t[17];const Ct=at;let rt;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((Z,ee)=>ee%2===0?R.parse(`${Z}`,l,new Date):Z)}),t[23]=l,t[24]=e):e=t[24],rt=yt.map(e),t[20]=yt,t[21]=l,t[22]=rt}else rt=t[22];const xe=rt,u=_-j.left-j.right,v=Ft-j.top-j.bottom,zt=re?R.parse(`${re}`,l,new Date):a[0].date,me=le?R.parse(`${le}`,l,new Date):a[a.length-1].date,w=G.checkIfNullOrUndefined(ne)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:ne,B=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([zt,me]).range([0,u]);let lt;t[25]!==B||t[26]!==ht?(lt=G.checkIfNullOrUndefined(ht)?B>0?B:0:ht,t[25]=B,t[26]=ht,t[27]=lt):lt=t[27];const r=Xe.linear().domain([w,lt]).range([v,0]).nice(),Jt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(nt),Mt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(nt),Kt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(nt),Qt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(nt),Zt=r.ticks(ye),_t=s.ticks(he);C.useEffect(()=>{const e=Z=>{const ee=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(Z)[0]),0)];Et(ee||a[a.length-1]),Pt?.(ee||a[a.length-1]),x(Z.clientY),ue(Z.clientX)},d=()=>{Et(void 0),ue(void 0),x(void 0),Pt?.(void 0)};ze.select(ot.current).on("mousemove",e).on("mouseout",d)},[s,a,Pt]);const te=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Ot=Se.linearRegressionLine(te);let O;t[28]!==o||t[29]!==v||t[30]!==u||t[31]!==Ct||t[32]!==c||t[33]!==s?(O=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:Ct,width:u,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=u,t[31]=Ct,t[32]=c,t[33]=s,t[34]=O):O=t[34];const At=y?.yAxis?.gridLines,bt=y?.yAxis?.labels;let ct;t[35]!==At||t[36]!==bt?(ct={gridLines:At,labels:bt},t[35]=At,t[36]=bt,t[37]=ct):ct=t[37];const ut=g?.yAxis?.gridLines,Lt=g?.yAxis?.labels;let z;t[38]!==ut||t[39]!==Lt?(z={gridLines:ut,labels:Lt},t[38]=ut,t[39]=Lt,t[40]=z):z=t[40];const kt=r(w<0?0:w),It=r(w<0?0:w),Vt=0-D,Nt=u+j.right,St=w<0?0:w;let k;t[41]!==q||t[42]!==M||t[43]!==S||t[44]!==St?(k=Oe.numberFormattingFunction(St,"NA",q,M,S),t[41]=q,t[42]=M,t[43]=S,t[44]=St,t[45]=k):k=t[45];const Dt=0-D,J=r(w<0?0:w),pe=B<0?"1em":-5;let I;t[46]!==Dt||t[47]!==J||t[48]!==pe?(I={x:Dt,y:J,dx:0,dy:pe},t[46]=Dt,t[47]=J,t[48]=pe,t[49]=I):I=t[49];const de=g?.xAxis?.axis,qt=g?.yAxis?.labels;let K;t[50]!==de||t[51]!==qt?(K={axis:de,label:qt},t[50]=de,t[51]=qt,t[52]=K):K=t[52];const xt=y?.xAxis?.axis,mt=y?.yAxis?.labels;let T;t[53]!==xt||t[54]!==mt?(T={axis:xt,label:mt},t[53]=xt,t[54]=mt,t[55]=T):T=t[55];let pt;t[56]!==kt||t[57]!==It||t[58]!==Vt||t[59]!==Nt||t[60]!==k||t[61]!==I||t[62]!==K||t[63]!==T?(pt=i.jsxRuntimeExports.jsx(We.Axis,{y1:kt,y2:It,x1:Vt,x2:Nt,label:k,labelPos:I,classNames:K,styles:T}),t[56]=kt,t[57]=It,t[58]=Vt,t[59]=Nt,t[60]=k,t[61]=I,t[62]=K,t[63]=T,t[64]=pt):pt=t[64];const $=0-D+15,F=v/2,W=y?.yAxis?.title,H=g?.yAxis?.title;let V;t[65]!==$||t[66]!==F||t[67]!==W||t[68]!==H||t[69]!==vt?(V=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:$,y:F,style:W,className:H,text:vt,rotate90:!0}),t[65]=$,t[66]=F,t[67]=W,t[68]=H,t[69]=vt,t[70]=V):V=t[70];let N;t[71]!==P?(N=P.filter(ri).map(ai),t[71]=P,t[72]=N):N=t[72];let Q;t[73]!==Ut?(Q={fill:Ut},t[73]=Ut,t[74]=Q):Q=t[74];let Tt;t[75]!==o.duration?(Tt={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=Tt):Tt=t[76];let $t;t[77]!==b||t[78]!==et?($t={stroke:b,fill:"none",strokeWidth:et},t[77]=b,t[78]=et,t[79]=$t):$t=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const ke=a.map((e,d)=>i.jsxRuntimeExports.jsx(A.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe?i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ae?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Wt?i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",q,M,S)}):null,fe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",q,M,S)}),i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",q,M,S)})]}):null]})},d));let ve;t[82]!==ke?(ve=i.jsxRuntimeExports.jsx("g",{children:ke}),t[82]=ke,t[83]=ve):ve=t[83];const Ie=se.map((e,d)=>{const Z=Ne.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ee=e.showConnector?{y1:Z.y,x1:Z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:ee,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=gt?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Ot(0),y2:Ot(u),graphHeight:v,graphWidth:u,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==P?(Re=P.filter(si).map(oi),t[88]=P,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==ot||t[92]!==v||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:ot,style:Ee,width:u,height:v}),t[91]=ot,t[92]=v,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==g?.tooltip||t[96]!==U||t[97]!==m||t[98]!==L||t[99]!==y?.tooltip||t[100]!==tt?(Me=L&&tt&&U&&m?i.jsxRuntimeExports.jsx($e.Tooltip,{data:L,body:tt,xPos:U,yPos:m,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[95]=g?.tooltip,t[96]=U,t[97]=m,t[98]=L,t[99]=y?.tooltip,t[100]=tt,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.svg,{width:`${_}px`,height:`${Ft}px`,viewBox:`0 0 ${_} ${Ft}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[O,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:xe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Zt.filter(ci),y:Zt.filter(li).map(e=>r(e)),x1:0-D,x2:u+j.right,styles:ct,classNames:z,suffix:S,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:q}),pt,V]}),i.jsxRuntimeExports.jsx("g",{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),N,i.jsxRuntimeExports.jsx(A.motion.path,{style:Q,exit:Tt,variants:{initial:{opacity:0,d:Qt(a)||""},whileInView:{opacity:Xt,d:Qt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Yt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Kt(a)||"",opacity:1},whileInView:{pathLength:1,d:Kt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(A.motion.path,{style:$t,exit:ge,variants:{initial:{pathLength:0,d:Jt(a)||"",opacity:1},whileInView:{pathLength:1,d:Jt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),L?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(L.date),x2:s(L.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,ve,ie?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:ie.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-D,x2:u+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!G.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(104),{data:h,graphTitle:_,suffix:Ft,sources:b,prefix:S,graphDescription:M,height:l,width:f,footNote:Wt,noOfXTicks:he,dateFormat:Ht,showValues:D,backgroundColor:Gt,padding:dt,lineColor:tt,leftMargin:Pt,rightMargin:ie,topMargin:ne,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:et,relativeHeight:oe,onSeriesMouseOver:se,graphID:yt,minValue:gt,maxValue:ae,regressionLine:fe,showIntervalDots:Yt,showIntervalValues:E,intervalLineStrokeWidth:Ut,intervalLineColors:Xt,intervalAreaColor:vt,intervalAreaOpacity:ye,graphDownload:re,dataDownload:le,animate:jt,language:y,minHeight:g,strokeWidth:q,showDots:P,annotations:wt,customHighlightAreaSettings:Y,theme:c,ariaLabel:p,yAxisTitle:ce,noOfYTicks:Rt,minDate:it,maxDate:nt,colorLegendTitle:L,colorLegendColors:Et,colorLegendDomain:U,curveType:ue,styles:m,classNames:x,precision:Bt,customLayers:X}=n,j=Ft===void 0?"":Ft,ot=S===void 0?"":S,st=he===void 0?10:he,a=Ht===void 0?"yyyy":Ht,at=D===void 0?!1:D,Ct=Gt===void 0?!1:Gt,rt=Pt===void 0?30:Pt,xe=ie===void 0?30:ie,u=ne===void 0?20:ne,v=ht===void 0?25:ht;let zt;t[0]!==ft?(zt=ft===void 0?[]:ft,t[0]=ft,t[1]=zt):zt=t[1];const me=zt;let w;t[2]!==et?(w=et===void 0?[]:et,t[2]=et,t[3]=w):w=t[3];const B=w,s=fe===void 0?!1:fe,lt=Yt===void 0?!1:Yt,r=E===void 0?!1:E,Jt=Ut===void 0?0:Ut;let Mt;t[4]!==Xt?(Mt=Xt===void 0?[Le.Colors.light.grays["gray-500"],Le.Colors.light.grays["gray-500"]]:Xt,t[4]=Xt,t[5]=Mt):Mt=t[5];const Kt=Mt,Qt=vt===void 0?Le.Colors.primaryColors["blue-100"]:vt,Zt=ye===void 0?.4:ye,_t=re===void 0?!1:re,te=le===void 0?!1:le,Ot=jt===void 0?!1:jt,O=y===void 0?"en":y,At=g===void 0?0:g,bt=q===void 0?2:q,ct=P===void 0?!0:P;let ut;t[6]!==wt?(ut=wt===void 0?[]:wt,t[6]=wt,t[7]=ut):ut=t[7];const Lt=ut;let z;t[8]!==Y?(z=Y===void 0?[]:Y,t[8]=Y,t[9]=z):z=t[9];const kt=z,It=c===void 0?"light":c,Vt=Rt===void 0?5:Rt,Nt=ue===void 0?"curve":ue,St=Bt===void 0?2:Bt;let k;t[10]!==X?(k=X===void 0?[]:X,t[10]=X,t[11]=k):k=t[11];const Dt=k,[J,pe]=C.useState(0),[I,de]=C.useState(0),qt=C.useRef(null),K=C.useRef(null);let xt,mt;t[12]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{const Tt=new ResizeObserver($t=>{pe($t[0].target.clientWidth||620),de($t[0].target.clientHeight||480)});return qt.current&&Tt.observe(qt.current),()=>Tt.disconnect()},mt=[],t[12]=xt,t[13]=mt):(xt=t[12],mt=t[13]),C.useEffect(xt,mt);const T=x?.graphContainer,pt=m?.graphContainer;let $;t[14]!==x?.description||t[15]!==x?.title||t[16]!==h||t[17]!==te||t[18]!==M||t[19]!==_t||t[20]!==_||t[21]!==m?.description||t[22]!==m?.title||t[23]!==f?($=_||M||_t||te?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:x?.title,description:x?.description},graphTitle:_,graphDescription:M,width:f,graphDownload:_t?K:void 0,dataDownload:te?h.map(Ei).filter(Ri).length>0?h.map(wi).filter(ji):h.filter(vi):null}):null,t[14]=x?.description,t[15]=x?.title,t[16]=h,t[17]=te,t[18]=M,t[19]=_t,t[20]=_,t[21]=m?.description,t[22]=m?.title,t[23]=f,t[24]=$):$=t[24];let F;t[25]!==x?.colorLegend||t[26]!==Et||t[27]!==U||t[28]!==L||t[29]!==h.length||t[30]!==f?(F=Et&&U&&h.length>0?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:f,colorLegendTitle:L,colors:Et,colorDomain:U,showNAColor:!1,className:x?.colorLegend}):null,t[25]=x?.colorLegend,t[26]=Et,t[27]=U,t[28]=L,t[29]=h.length,t[30]=f,t[31]=F):F=t[31];let W;t[32]!==h.length?(W=h.length===0&&i.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[32]=h.length,t[33]=W):W=t[33];let H;t[34]!==Ot||t[35]!==Lt||t[36]!==v||t[37]!==x||t[38]!==Nt||t[39]!==kt||t[40]!==Dt||t[41]!==h||t[42]!==a||t[43]!==B||t[44]!==Qt||t[45]!==Zt||t[46]!==Kt||t[47]!==Jt||t[48]!==O||t[49]!==rt||t[50]!==tt||t[51]!==nt||t[52]!==ae||t[53]!==it||t[54]!==gt||t[55]!==st||t[56]!==Vt||t[57]!==se||t[58]!==St||t[59]!==ot||t[60]!==me||t[61]!==s||t[62]!==xe||t[63]!==ct||t[64]!==lt||t[65]!==r||t[66]!==at||t[67]!==bt||t[68]!==m||t[69]!==j||t[70]!==I||t[71]!==J||t[72]!==o||t[73]!==u||t[74]!==ce?(H=J&&I&&h.length>0?i.jsxRuntimeExports.jsx(ni,{data:h,lineColor:tt||Le.Colors.primaryColors["blue-600"],width:J,height:I,suffix:j,prefix:ot,dateFormat:a,showValues:at,noOfXTicks:st??ii.getNoOfTicks(J),leftMargin:rt,rightMargin:xe,topMargin:u,bottomMargin:v,tooltip:o,highlightAreaSettings:B,onSeriesMouseOver:se,refValues:me,minValue:gt,maxValue:ae,animate:Ot===!0?{duration:.5,once:!0,amount:.5}:Ot||{duration:0,once:!0,amount:0},rtl:O==="he"||O==="ar",strokeWidth:bt,showDots:ct,annotations:Lt,customHighlightAreaSettings:kt,regressionLine:s,showIntervalDots:lt,showIntervalValues:r,intervalLineStrokeWidth:Jt,intervalLineColors:Kt,intervalAreaColor:Qt,intervalAreaOpacity:Zt,yAxisTitle:ce,noOfYTicks:Vt,minDate:it,maxDate:nt,curveType:Nt,styles:m,classNames:x,precision:St,customLayers:Dt}):null,t[34]=Ot,t[35]=Lt,t[36]=v,t[37]=x,t[38]=Nt,t[39]=kt,t[40]=Dt,t[41]=h,t[42]=a,t[43]=B,t[44]=Qt,t[45]=Zt,t[46]=Kt,t[47]=Jt,t[48]=O,t[49]=rt,t[50]=tt,t[51]=nt,t[52]=ae,t[53]=it,t[54]=gt,t[55]=st,t[56]=Vt,t[57]=se,t[58]=St,t[59]=ot,t[60]=me,t[61]=s,t[62]=xe,t[63]=ct,t[64]=lt,t[65]=r,t[66]=at,t[67]=bt,t[68]=m,t[69]=j,t[70]=I,t[71]=J,t[72]=o,t[73]=u,t[74]=ce,t[75]=H):H=t[75];let V;t[76]!==W||t[77]!==H?(V=i.jsxRuntimeExports.jsxs(De.GraphArea,{ref:qt,children:[W,H]}),t[76]=W,t[77]=H,t[78]=V):V=t[78];let N;t[79]!==x?.footnote||t[80]!==x?.source||t[81]!==Wt||t[82]!==b||t[83]!==m?.footnote||t[84]!==m?.source||t[85]!==f?(N=b||Wt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:b,footNote:Wt,width:f}):null,t[79]=x?.footnote,t[80]=x?.source,t[81]=Wt,t[82]=b,t[83]=m?.footnote,t[84]=m?.source,t[85]=f,t[86]=N):N=t[86];let Q;return t[87]!==p||t[88]!==Ct||t[89]!==yt||t[90]!==l||t[91]!==O||t[92]!==At||t[93]!==dt||t[94]!==oe||t[95]!==T||t[96]!==pt||t[97]!==$||t[98]!==F||t[99]!==V||t[100]!==N||t[101]!==It||t[102]!==f?(Q=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:T,style:pt,id:yt,ref:K,"aria-label":p,backgroundColor:Ct,theme:It,language:O,minHeight:At,width:f,height:l,relativeHeight:oe,padding:dt,children:[$,F,V,N]}),t[87]=p,t[88]=Ct,t[89]=yt,t[90]=l,t[91]=O,t[92]=At,t[93]=dt,t[94]=oe,t[95]=T,t[96]=pt,t[97]=$,t[98]=F,t[99]=V,t[100]=N,t[101]=It,t[102]=f,t[103]=Q):Q=t[103],Q}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
2
2
  //# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map