{"version":3,"file":"Histogram-DXfs3hry.cjs","names":["tickIncrement","extent","sturges","ticks","tickIncrement","bisect"],"sources":["../node_modules/d3-array/src/count.js","../node_modules/d3-array/src/identity.js","../node_modules/d3-array/src/array.js","../node_modules/d3-array/src/constant.js","../node_modules/d3-array/src/nice.js","../node_modules/d3-array/src/threshold/sturges.js","../node_modules/d3-array/src/bin.js","../src/Components/Graphs/Histogram/index.tsx"],"sourcesContent":["export default function count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n","export default function identity(x) {\n  return x;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function constant(x) {\n  return () => x;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = tickIncrement(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n  return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n  var value = identity,\n      domain = extent,\n      threshold = sturges;\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        step,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n      tz = ticks(x0, x1, tn);\n\n      // If the domain is aligned with the first tick (which it will by\n      // default), then we can use quantization rather than bisection to bin\n      // values, which is substantially faster.\n      if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain’s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don’t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === extent) {\n          const step = tickIncrement(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    // Be careful not to mutate an array owned by the user!\n    var m = tz.length, a = 0, b = m;\n    while (tz[a] <= x0) ++a;\n    while (tz[b - 1] > x1) --b;\n    if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    if (isFinite(step)) {\n      if (step > 0) {\n        for (i = 0; i < n; ++i) {\n          if ((x = values[i]) != null && x0 <= x && x <= x1) {\n            bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n          }\n        }\n      } else if (step < 0) {\n        for (i = 0; i < n; ++i) {\n          if ((x = values[i]) != null && x0 <= x && x <= x1) {\n            const j = Math.floor((x0 - x) * step);\n            bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n          }\n        }\n      }\n    } else {\n      for (i = 0; i < n; ++i) {\n        if ((x = values[i]) != null && x0 <= x && x <= x1) {\n          bins[bisect(tz, x, 0, m)].push(data[i]);\n        }\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n  };\n\n  return histogram;\n}\n","import { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { bin } from 'd3-array';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport type {\r\n  ClassNameObject,\r\n  DonutChartDataType,\r\n  HistogramDataType,\r\n  Languages,\r\n  NumberFormatOptions,\r\n  ReferenceDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { SimpleBarGraph } from '../BarGraph';\r\nimport { CirclePackingGraph } from '../CirclePackingGraph';\r\nimport { DonutChart } from '../DonutChart';\r\nimport { TreeMapGraph } from '../TreeMapGraph';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: HistogramDataType[];\r\n\r\n  /** Type of the graph for histogram */\r\n  graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';\r\n\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Colors for visualization */\r\n  colors?: string[] | 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  /** Padding between bars */\r\n  barPadding?: number;\r\n  /** Maximum thickness of bars */\r\n  maxBarThickness?: number;\r\n\r\n  // Values and Ticks\r\n  /** Maximum value for the chart */\r\n  maxValue?: number;\r\n  /** Truncate labels by specified length */\r\n  truncateBy?: number;\r\n  /** Reference values for comparison */\r\n  refValues?: ReferenceDataType[];\r\n\r\n  // Graph Parameters\r\n  /** Number of bins for the histogram */\r\n  numberOfBins?: number;\r\n  /** Orientation of the bar graph. Only applicable if graphType is barGraph. */\r\n  barGraphLayout?: 'vertical' | 'horizontal';\r\n  /** Stroke width of the arcs and circle of the donut. Only applicable if graphType is donutChart.  */\r\n  donutStrokeWidth?: number;\r\n  /** Sorting order for data. This is overwritten by labelOrder prop */\r\n  sortData?: 'asc' | 'desc';\r\n  /** Toggle visibility of labels */\r\n  showLabels?: boolean;\r\n  /** Toggle visibility of values */\r\n  showValues?: boolean;\r\n  /** Toggle visibility of axis ticks */\r\n  showTicks?: boolean;\r\n  /** Toggle visibility of axis line for the  main axis. Only applicable if `graphType` is `barGraph`. */\r\n  hideAxisLine?: boolean;\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  numberDisplayOptions?: NumberFormatOptions;\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\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  /** Callback for mouse over event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  /** Callback for mouse click event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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 Histogram(props: Props) {\r\n  const {\r\n    data,\r\n    graphTitle,\r\n    sources,\r\n    graphDescription,\r\n    barPadding,\r\n    showValues,\r\n    showTicks,\r\n    leftMargin,\r\n    rightMargin,\r\n    height,\r\n    width,\r\n    footNote,\r\n    colors,\r\n    padding,\r\n    backgroundColor,\r\n    topMargin,\r\n    bottomMargin,\r\n    showLabels,\r\n    relativeHeight,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    refValues,\r\n    graphID,\r\n    maxValue,\r\n    onSeriesMouseClick,\r\n    graphDownload,\r\n    dataDownload,\r\n    numberOfBins,\r\n    truncateBy,\r\n    graphType,\r\n    barGraphLayout,\r\n    donutStrokeWidth,\r\n    sortData,\r\n    language,\r\n    minHeight,\r\n    theme = 'light',\r\n    maxBarThickness,\r\n    ariaLabel,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    hideAxisLine = false,\r\n    numberDisplayOptions,\r\n  } = props;\r\n\r\n  const bins = bin()\r\n    .thresholds(numberOfBins || 10)\r\n    // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n    .value((d: any) => d.value)(data as any);\r\n  const dataFormatted = bins.map((d) => ({\r\n    label: `${d.x0}-${d.x1}`,\r\n    size: d.length,\r\n    data: {\r\n      options: `${d.x0}-${d.x1}`,\r\n      frequency: d.length,\r\n    },\r\n  }));\r\n  if (dataFormatted.length === 0)\r\n    return (\r\n      <div style={{ width: `${width}px`, height: `${height}px`, margin: 'auto' }}>\r\n        <div className='flex m-auto items-center justify-center p-0 leading-xs text-base h-40'>\r\n          <Spinner />\r\n        </div>\r\n      </div>\r\n    );\r\n  if (graphType === 'circlePacking')\r\n    return (\r\n      <CirclePackingGraph\r\n        colors={colors || Colors.graphMainColor}\r\n        graphTitle={graphTitle}\r\n        graphDescription={graphDescription}\r\n        footNote={footNote}\r\n        width={width}\r\n        height={height}\r\n        sources={sources}\r\n        leftMargin={leftMargin}\r\n        rightMargin={rightMargin}\r\n        backgroundColor={backgroundColor}\r\n        padding={padding}\r\n        topMargin={topMargin}\r\n        bottomMargin={bottomMargin}\r\n        relativeHeight={relativeHeight}\r\n        showLabels={showLabels}\r\n        tooltip={tooltip}\r\n        onSeriesMouseOver={onSeriesMouseOver}\r\n        showColorScale={false}\r\n        showValues={showValues}\r\n        graphID={graphID}\r\n        onSeriesMouseClick={onSeriesMouseClick}\r\n        graphDownload={graphDownload}\r\n        dataDownload={dataDownload}\r\n        data={dataFormatted}\r\n        language={language}\r\n        minHeight={minHeight}\r\n        theme={theme}\r\n        ariaLabel={ariaLabel}\r\n        detailsOnClick={detailsOnClick}\r\n        styles={styles}\r\n        classNames={classNames}\r\n        numberDisplayOptions={numberDisplayOptions}\r\n      />\r\n    );\r\n  if (graphType === 'treeMap')\r\n    return (\r\n      <TreeMapGraph\r\n        colors={colors || Colors.graphMainColor}\r\n        graphTitle={graphTitle}\r\n        graphDescription={graphDescription}\r\n        footNote={footNote}\r\n        width={width}\r\n        height={height}\r\n        sources={sources}\r\n        leftMargin={leftMargin}\r\n        rightMargin={rightMargin}\r\n        backgroundColor={backgroundColor}\r\n        padding={padding}\r\n        topMargin={topMargin}\r\n        bottomMargin={bottomMargin}\r\n        relativeHeight={relativeHeight}\r\n        showLabels={showLabels}\r\n        tooltip={tooltip}\r\n        onSeriesMouseOver={onSeriesMouseOver}\r\n        showColorScale={false}\r\n        showValues={showValues}\r\n        graphID={graphID}\r\n        onSeriesMouseClick={onSeriesMouseClick}\r\n        graphDownload={graphDownload}\r\n        dataDownload={dataDownload}\r\n        data={dataFormatted}\r\n        language={language}\r\n        minHeight={minHeight}\r\n        theme={theme}\r\n        ariaLabel={ariaLabel}\r\n        detailsOnClick={detailsOnClick}\r\n        styles={styles}\r\n        classNames={classNames}\r\n        numberDisplayOptions={numberDisplayOptions}\r\n      />\r\n    );\r\n  if (graphType === 'donutChart')\r\n    return (\r\n      <DonutChart\r\n        colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n        graphTitle={graphTitle}\r\n        graphDescription={graphDescription}\r\n        footNote={footNote}\r\n        radius={width && height ? (width < height ? width : height) : width || height || undefined}\r\n        sources={sources}\r\n        backgroundColor={backgroundColor}\r\n        padding={padding}\r\n        tooltip={tooltip}\r\n        onSeriesMouseOver={onSeriesMouseOver}\r\n        graphID={graphID}\r\n        onSeriesMouseClick={onSeriesMouseClick}\r\n        graphDownload={graphDownload}\r\n        dataDownload={dataDownload}\r\n        data={dataFormatted as DonutChartDataType[]}\r\n        strokeWidth={donutStrokeWidth}\r\n        showColorScale\r\n        sortData={sortData}\r\n        language={language}\r\n        theme={theme}\r\n        ariaLabel={ariaLabel}\r\n        detailsOnClick={detailsOnClick}\r\n        styles={styles}\r\n        classNames={classNames}\r\n        numberDisplayOptions={numberDisplayOptions}\r\n      />\r\n    );\r\n  return (\r\n    <SimpleBarGraph\r\n      colors={colors || Colors.graphMainColor}\r\n      graphTitle={graphTitle}\r\n      graphDescription={graphDescription}\r\n      footNote={footNote}\r\n      width={width}\r\n      height={height}\r\n      sources={sources}\r\n      leftMargin={leftMargin}\r\n      rightMargin={rightMargin}\r\n      backgroundColor={backgroundColor}\r\n      padding={padding}\r\n      topMargin={topMargin}\r\n      bottomMargin={bottomMargin}\r\n      relativeHeight={relativeHeight}\r\n      showLabels={showLabels}\r\n      tooltip={tooltip}\r\n      onSeriesMouseOver={onSeriesMouseOver}\r\n      showColorScale={false}\r\n      showValues={showValues}\r\n      graphID={graphID}\r\n      onSeriesMouseClick={onSeriesMouseClick}\r\n      graphDownload={graphDownload}\r\n      dataDownload={dataDownload}\r\n      data={dataFormatted}\r\n      barPadding={barPadding}\r\n      refValues={refValues}\r\n      truncateBy={truncateBy}\r\n      maxValue={maxValue}\r\n      showTicks={showTicks}\r\n      sortData={sortData}\r\n      language={language}\r\n      minHeight={minHeight}\r\n      theme={theme}\r\n      maxBarThickness={maxBarThickness}\r\n      ariaLabel={ariaLabel}\r\n      orientation={barGraphLayout}\r\n      detailsOnClick={detailsOnClick}\r\n      styles={styles}\r\n      classNames={classNames}\r\n      hideAxisLine={hideAxisLine}\r\n      numberDisplayOptions={numberDisplayOptions}\r\n    />\r\n  );\r\n}\r\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":"0VAAA,SAAwB,EAAM,EAAQ,EAAS,C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,GACxE,UACQ,kBACR,UACA,UACU,oBACV,UACW,qBACL,gBACD,eACd,KAAM,EACN,YAAa,EACb,eAAA,GACU,WACA,WACH,QACI,YACK,iBACR,SACI,aACU,sBACvB,CAAA,GAGH,EAAA,EAAA,KAAC,EAAA,EAAD,CACE,OAAQ,GAAU,EAAA,OAAO,eACb,aACM,mBACR,WACH,QACC,SACC,UACG,aACC,cACI,kBACR,UACE,YACG,eACE,iBACJ,aACH,UACU,oBACnB,eAAgB,GACJ,aACH,UACW,qBACL,gBACD,eACd,KAAM,EACM,aACD,YACC,aACF,WACC,YACD,WACA,WACC,YACJ,QACU,kBACN,YACX,YAAa,EACG,iBACR,SACI,aACE,eACQ,sBACvB,CAAA,CAEL"}