@vitessce/statistical-plots 3.5.7 → 3.5.9

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 (51) hide show
  1. package/dist/{deflate-287e693d.js → deflate-19841f78.js} +1 -1
  2. package/dist/{index-1f1b6355.js → index-dc733355.js} +2084 -1065
  3. package/dist/index.js +9 -6
  4. package/dist/{jpeg-1b2c1d25.js → jpeg-a83077be.js} +1 -1
  5. package/dist/{lerc-4f010cd7.js → lerc-1edd075a.js} +1 -1
  6. package/dist/{lzw-e60fb582.js → lzw-9572eac3.js} +1 -1
  7. package/dist/{packbits-a8bfe098.js → packbits-cce11fbc.js} +1 -1
  8. package/dist/{raw-01dff90e.js → raw-f7587aff.js} +1 -1
  9. package/dist/{webimage-6b926ce3.js → webimage-8d38cd8b.js} +1 -1
  10. package/dist-tsc/CellSetCompositionBarPlot.d.ts +5 -0
  11. package/dist-tsc/CellSetCompositionBarPlot.d.ts.map +1 -0
  12. package/dist-tsc/CellSetCompositionBarPlot.js +166 -0
  13. package/dist-tsc/CellSetCompositionBarPlotSubscriber.d.ts +2 -0
  14. package/dist-tsc/CellSetCompositionBarPlotSubscriber.d.ts.map +1 -0
  15. package/dist-tsc/CellSetCompositionBarPlotSubscriber.js +40 -0
  16. package/dist-tsc/FeatureSetEnrichmentBarPlot.d.ts +5 -0
  17. package/dist-tsc/FeatureSetEnrichmentBarPlot.d.ts.map +1 -0
  18. package/dist-tsc/FeatureSetEnrichmentBarPlot.js +164 -0
  19. package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.d.ts +2 -0
  20. package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.d.ts.map +1 -0
  21. package/dist-tsc/FeatureSetEnrichmentBarPlotSubscriber.js +51 -0
  22. package/dist-tsc/Treemap.d.ts.map +1 -1
  23. package/dist-tsc/Treemap.js +11 -15
  24. package/dist-tsc/TreemapSubscriber.d.ts.map +1 -1
  25. package/dist-tsc/TreemapSubscriber.js +6 -2
  26. package/dist-tsc/VolcanoPlot.d.ts +2 -0
  27. package/dist-tsc/VolcanoPlot.d.ts.map +1 -0
  28. package/dist-tsc/VolcanoPlot.js +231 -0
  29. package/dist-tsc/VolcanoPlotOptions.d.ts +2 -0
  30. package/dist-tsc/VolcanoPlotOptions.d.ts.map +1 -0
  31. package/dist-tsc/VolcanoPlotOptions.js +23 -0
  32. package/dist-tsc/VolcanoPlotSubscriber.d.ts +2 -0
  33. package/dist-tsc/VolcanoPlotSubscriber.d.ts.map +1 -0
  34. package/dist-tsc/VolcanoPlotSubscriber.js +33 -0
  35. package/dist-tsc/index.d.ts +3 -0
  36. package/dist-tsc/index.js +3 -0
  37. package/dist-tsc/utils.d.ts +9 -0
  38. package/dist-tsc/utils.d.ts.map +1 -0
  39. package/dist-tsc/utils.js +40 -0
  40. package/package.json +7 -7
  41. package/src/CellSetCompositionBarPlot.js +205 -0
  42. package/src/CellSetCompositionBarPlotSubscriber.js +151 -0
  43. package/src/FeatureSetEnrichmentBarPlot.js +203 -0
  44. package/src/FeatureSetEnrichmentBarPlotSubscriber.js +166 -0
  45. package/src/Treemap.js +12 -19
  46. package/src/TreemapSubscriber.js +7 -1
  47. package/src/VolcanoPlot.js +316 -0
  48. package/src/VolcanoPlotOptions.js +136 -0
  49. package/src/VolcanoPlotSubscriber.js +162 -0
  50. package/src/index.js +3 -0
  51. package/src/utils.js +47 -0
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { useContext, useState, useRef, useCallback, useEffect, useMemo, Suspense } from "react";
3
- import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useGridItemSize, useFeatureSelection, useFeatureLabelsData, useExpandedFeatureLabelsMap, useObsFeatureMatrixIndices, useObsSetsData, useSampleSetsData, useSampleEdgesData, useReady, useUrls, TitleInfo, useObsFeatureMatrixData } from "@vitessce/vit-s";
3
+ import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useGridItemSize, useFeatureSelection, useFeatureLabelsData, useExpandedFeatureLabelsMap, useObsFeatureMatrixIndices, useObsSetsData, useSampleSetsData, useSampleEdgesData, useReady, useUrls, TitleInfo, useObsFeatureMatrixData, useMatchingLoader, useColumnNameMapping, useFeatureStatsData, useObsSetStatsData, useAsyncFunction, useFeatureSetStatsData } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
6
6
  function _mergeNamespaces(n2, m2) {
@@ -958,8 +958,13 @@ const ViewType$1 = {
958
958
  FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
959
959
  DOT_PLOT: "dotPlot",
960
960
  FEATURE_BAR_PLOT: "featureBarPlot",
961
+ VOLCANO_PLOT: "volcanoPlot",
962
+ OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
963
+ FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
961
964
  BIOMARKER_SELECT: "biomarkerSelect",
965
+ COMPARATIVE_HEADING: "comparativeHeading",
962
966
  LINK_CONTROLLER: "linkController",
967
+ NEUROGLANCER: "neuroglancer",
963
968
  DUAL_SCATTERPLOT: "dualScatterplot",
964
969
  TREEMAP: "treemap"
965
970
  };
@@ -977,7 +982,33 @@ const DataType$2 = {
977
982
  OBS_POINTS: "obsPoints",
978
983
  OBS_LOCATIONS: "obsLocations",
979
984
  SAMPLE_SETS: "sampleSets",
980
- SAMPLE_EDGES: "sampleEdges"
985
+ SAMPLE_EDGES: "sampleEdges",
986
+ COMPARISON_METADATA: "comparisonMetadata",
987
+ FEATURE_STATS: "featureStats",
988
+ FEATURE_SET_STATS: "featureSetStats",
989
+ OBS_SET_STATS: "obsSetStats"
990
+ };
991
+ const AsyncFunctionType = {
992
+ // String input (rather than Node input)
993
+ AUTOCOMPLETE_FEATURE: "autocompleteFeature",
994
+ // (partial: string, targetModality: null | 'gene' | 'protein' | 'genomic-region' | 'cell-type') -> list of feature nodes
995
+ GET_ALTERNATIVE_TERMS: "getAlternativeTerms",
996
+ // (curieString) -> list of alternative curie strings
997
+ GET_TERM_MAPPING: "getTermMapping",
998
+ // (keyCuriePrefix, valueCuriePrefix) -> Record<curieString, curieString> for key to value
999
+ TRANSFORM_FEATURE: "transformFeature",
1000
+ // (featureNode, targetModality) -> list of feature nodes from target modality
1001
+ RELATED_FEATURES: "relatedFeatures",
1002
+ // (featureNode) -> list of related feature nodes
1003
+ FEATURE_TO_URL: "featureToUrl",
1004
+ // (featureNode) -> URL
1005
+ FEATURE_TO_INTERVAL: "featureToInterval",
1006
+ // (featureNode) -> genomic interval { chr, start, end }
1007
+ // Cell2Sentence/LLM-based?
1008
+ OBS_SET_TO_FEATURES: "obsSetToFeatures",
1009
+ // (cell type node) -> list of feature nodes
1010
+ FEATURES_TO_OBS_SET: "featuresToObsSet"
1011
+ // (list of feature nodes) -> cell type node
981
1012
  };
982
1013
  const FileType$1 = {
983
1014
  // Joint file types
@@ -1016,6 +1047,10 @@ const FileType$1 = {
1016
1047
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
1017
1048
  SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
1018
1049
  SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
1050
+ COMPARISON_METADATA_ANNDATA_ZARR: "comparisonMetadata.anndata.zarr",
1051
+ COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR: "comparativeFeatureStats.anndata.zarr",
1052
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR: "comparativeFeatureSetStats.anndata.zarr",
1053
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR: "comparativeObsSetStats.anndata.zarr",
1019
1054
  // AnnData - zipped
1020
1055
  OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
1021
1056
  OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
@@ -1029,6 +1064,10 @@ const FileType$1 = {
1029
1064
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
1030
1065
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
1031
1066
  SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
1067
+ COMPARISON_METADATA_ANNDATA_ZARR_ZIP: "comparisonMetadata.anndata.zarr.zip",
1068
+ COMPARATIVE_FEATURE_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureStats.anndata.zarr.zip",
1069
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeFeatureSetStats.anndata.zarr.zip",
1070
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_ZARR_ZIP: "comparativeObsSetStats.anndata.zarr.zip",
1032
1071
  // AnnData - h5ad via reference spec
1033
1072
  OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
1034
1073
  OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
@@ -1042,6 +1081,10 @@ const FileType$1 = {
1042
1081
  FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
1043
1082
  SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
1044
1083
  SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
1084
+ COMPARISON_METADATA_ANNDATA_H5AD: "comparisonMetadata.anndata.h5ad",
1085
+ COMPARATIVE_FEATURE_STATS_ANNDATA_H5AD: "comparativeFeatureStats.anndata.h5ad",
1086
+ COMPARATIVE_FEATURE_SET_STATS_ANNDATA_H5AD: "comparativeFeatureSetStats.anndata.h5ad",
1087
+ COMPARATIVE_OBS_SET_STATS_ANNDATA_H5AD: "comparativeObsSetStats.anndata.h5ad",
1045
1088
  // SpatialData
1046
1089
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
1047
1090
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -1240,6 +1283,11 @@ const CoordinationType$1 = {
1240
1283
  EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
1241
1284
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
1242
1285
  CONTOUR_COLOR: "contourColor",
1286
+ // For volcano plot:
1287
+ FEATURE_POINT_SIGNIFICANCE_THRESHOLD: "featurePointSignificanceThreshold",
1288
+ FEATURE_LABEL_SIGNIFICANCE_THRESHOLD: "featureLabelSignificanceThreshold",
1289
+ FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
1290
+ FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
1243
1291
  // Treemap
1244
1292
  HIERARCHY_LEVELS: "hierarchyLevels"
1245
1293
  };
@@ -1259,9 +1307,16 @@ const ViewHelpMapping = {
1259
1307
  FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
1260
1308
  DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
1261
1309
  FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis.",
1262
- TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering."
1310
+ NEUROGLANCER: "The Neuroglancer view displays 3d meshes using Neuroglancer developed by Google.",
1311
+ TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering.",
1312
+ VOLCANO_PLOT: "The volcano plot displays differential expression results. Each data point represents a feature (as opposed to an observation).",
1313
+ OBS_SET_COMPOSITION_BAR_PLOT: "The set composition bar plot displays the results of a compositional analysis conducted using the scCODA method (Büttner et al. 2021 Nature Communications).",
1314
+ FEATURE_SET_ENRICHMENT_BAR_PLOT: "The feature set enrichment bar plot displays the results of a hypergeometric test applied to the differential expression test results to identify enriched pathway gene sets."
1263
1315
  };
1264
1316
  const COMPONENT_COORDINATION_TYPES = {
1317
+ [ViewType$1.NEUROGLANCER]: [
1318
+ CoordinationType$1.DATASET
1319
+ ],
1265
1320
  [ViewType$1.SCATTERPLOT]: [
1266
1321
  CoordinationType$1.DATASET,
1267
1322
  CoordinationType$1.OBS_TYPE,
@@ -1731,8 +1786,64 @@ const COMPONENT_COORDINATION_TYPES = {
1731
1786
  CoordinationType$1.OBS_COLOR_ENCODING,
1732
1787
  CoordinationType$1.ADDITIONAL_OBS_SETS
1733
1788
  ],
1789
+ [ViewType$1.VOLCANO_PLOT]: [
1790
+ CoordinationType$1.DATASET,
1791
+ CoordinationType$1.OBS_TYPE,
1792
+ CoordinationType$1.FEATURE_TYPE,
1793
+ CoordinationType$1.SAMPLE_TYPE,
1794
+ // For selection of case-control sets of samples:
1795
+ CoordinationType$1.SAMPLE_SET_SELECTION,
1796
+ // For selection of one-vs-others sets of observations:
1797
+ CoordinationType$1.OBS_SET_SELECTION,
1798
+ // TODO: CoordinationType.FEATURE_SET_SELECTION,
1799
+ // TODO: CoordinationType.FEATURE_SET_HIGHLIGHT,
1800
+ // TODO: CoordinationType.FEATURE_SET_COLOR,
1801
+ CoordinationType$1.FEATURE_HIGHLIGHT,
1802
+ CoordinationType$1.FEATURE_SELECTION,
1803
+ CoordinationType$1.FEATURE_VALUE_COLORMAP,
1804
+ CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
1805
+ // TODO: CoordinationType.FEATURE_COLOR_ENCODING,
1806
+ // TODO: CoordinationType.ADDITIONAL_FEATURE_SETS,
1807
+ CoordinationType$1.TOOLTIPS_VISIBLE,
1808
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
1809
+ CoordinationType$1.OBS_SET_COLOR,
1810
+ CoordinationType$1.SAMPLE_SET_COLOR,
1811
+ CoordinationType$1.FEATURE_POINT_SIGNIFICANCE_THRESHOLD,
1812
+ CoordinationType$1.FEATURE_LABEL_SIGNIFICANCE_THRESHOLD,
1813
+ CoordinationType$1.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1814
+ CoordinationType$1.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1815
+ ],
1816
+ [ViewType$1.OBS_SET_COMPOSITION_BAR_PLOT]: [
1817
+ CoordinationType$1.DATASET,
1818
+ CoordinationType$1.OBS_TYPE,
1819
+ CoordinationType$1.SAMPLE_TYPE,
1820
+ // For selection of case-control sets of samples:
1821
+ CoordinationType$1.SAMPLE_SET_SELECTION,
1822
+ // For selection of one-vs-others sets of observations:
1823
+ CoordinationType$1.OBS_SET_SELECTION,
1824
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
1825
+ CoordinationType$1.OBS_SET_COLOR,
1826
+ CoordinationType$1.SAMPLE_SET_COLOR
1827
+ ],
1828
+ [ViewType$1.FEATURE_SET_ENRICHMENT_BAR_PLOT]: [
1829
+ CoordinationType$1.DATASET,
1830
+ CoordinationType$1.OBS_TYPE,
1831
+ CoordinationType$1.FEATURE_TYPE,
1832
+ CoordinationType$1.SAMPLE_TYPE,
1833
+ // For selection of case-control sets of samples:
1834
+ CoordinationType$1.SAMPLE_SET_SELECTION,
1835
+ // For selection of one-vs-others sets of observations:
1836
+ CoordinationType$1.OBS_SET_SELECTION,
1837
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
1838
+ CoordinationType$1.OBS_SET_COLOR,
1839
+ CoordinationType$1.SAMPLE_SET_COLOR,
1840
+ CoordinationType$1.FEATURE_SELECTION
1841
+ ],
1734
1842
  [ViewType$1.LINK_CONTROLLER]: [],
1735
1843
  [ViewType$1.BIOMARKER_SELECT]: [
1844
+ CoordinationType$1.DATASET,
1845
+ CoordinationType$1.OBS_TYPE,
1846
+ CoordinationType$1.SAMPLE_TYPE,
1736
1847
  CoordinationType$1.FEATURE_SELECTION,
1737
1848
  CoordinationType$1.SAMPLE_SET_SELECTION,
1738
1849
  CoordinationType$1.SAMPLE_SET_FILTER,
@@ -1740,6 +1851,16 @@ const COMPONENT_COORDINATION_TYPES = {
1740
1851
  CoordinationType$1.OBS_SET_FILTER
1741
1852
  // TODO: create coordination types for internal state of the biomarker selection view?
1742
1853
  ],
1854
+ [ViewType$1.COMPARATIVE_HEADING]: [
1855
+ CoordinationType$1.DATASET,
1856
+ CoordinationType$1.OBS_TYPE,
1857
+ CoordinationType$1.SAMPLE_TYPE,
1858
+ CoordinationType$1.FEATURE_SELECTION,
1859
+ CoordinationType$1.SAMPLE_SET_SELECTION,
1860
+ CoordinationType$1.SAMPLE_SET_FILTER,
1861
+ CoordinationType$1.OBS_SET_SELECTION,
1862
+ CoordinationType$1.OBS_SET_FILTER
1863
+ ],
1743
1864
  [ViewType$1.TREEMAP]: [
1744
1865
  CoordinationType$1.DATASET,
1745
1866
  CoordinationType$1.OBS_TYPE,
@@ -2448,6 +2569,9 @@ const DEFAULT_LIGHT2_COLOR = [235, 235, 235];
2448
2569
  function getDefaultColor(theme) {
2449
2570
  return theme === "dark" ? DEFAULT_DARK_COLOR : theme === "light" ? DEFAULT_LIGHT_COLOR$3 : DEFAULT_LIGHT2_COLOR;
2450
2571
  }
2572
+ function getDefaultForegroundColor(theme) {
2573
+ return theme === "dark" ? DEFAULT_LIGHT2_COLOR : DEFAULT_DARK_COLOR;
2574
+ }
2451
2575
  const PALETTE = [
2452
2576
  [68, 119, 170],
2453
2577
  [136, 204, 238],
@@ -2578,7 +2702,7 @@ var reTrimStart = /^\s+/;
2578
2702
  function baseTrim(string2) {
2579
2703
  return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2;
2580
2704
  }
2581
- function isObject$5(value2) {
2705
+ function isObject$6(value2) {
2582
2706
  var type2 = typeof value2;
2583
2707
  return value2 != null && (type2 == "object" || type2 == "function");
2584
2708
  }
@@ -2594,9 +2718,9 @@ function toNumber$2(value2) {
2594
2718
  if (isSymbol$1(value2)) {
2595
2719
  return NAN$1;
2596
2720
  }
2597
- if (isObject$5(value2)) {
2721
+ if (isObject$6(value2)) {
2598
2722
  var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2;
2599
- value2 = isObject$5(other) ? other + "" : other;
2723
+ value2 = isObject$6(other) ? other + "" : other;
2600
2724
  }
2601
2725
  if (typeof value2 != "string") {
2602
2726
  return value2 === 0 ? value2 : +value2;
@@ -2618,8 +2742,8 @@ function toFinite(value2) {
2618
2742
  return value2 === value2 ? value2 : 0;
2619
2743
  }
2620
2744
  var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
2621
- function isFunction$4(value2) {
2622
- if (!isObject$5(value2)) {
2745
+ function isFunction$5(value2) {
2746
+ if (!isObject$6(value2)) {
2623
2747
  return false;
2624
2748
  }
2625
2749
  var tag = baseGetTag(value2);
@@ -2658,10 +2782,10 @@ var reIsNative = RegExp(
2658
2782
  "^" + funcToString.call(hasOwnProperty$d).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2659
2783
  );
2660
2784
  function baseIsNative(value2) {
2661
- if (!isObject$5(value2) || isMasked(value2)) {
2785
+ if (!isObject$6(value2) || isMasked(value2)) {
2662
2786
  return false;
2663
2787
  }
2664
- var pattern = isFunction$4(value2) ? reIsNative : reIsHostCtor;
2788
+ var pattern = isFunction$5(value2) ? reIsNative : reIsHostCtor;
2665
2789
  return pattern.test(toSource(value2));
2666
2790
  }
2667
2791
  function getValue$2(object2, key2) {
@@ -2678,7 +2802,7 @@ var baseCreate = function() {
2678
2802
  function object2() {
2679
2803
  }
2680
2804
  return function(proto) {
2681
- if (!isObject$5(proto)) {
2805
+ if (!isObject$6(proto)) {
2682
2806
  return {};
2683
2807
  }
2684
2808
  if (objectCreate) {
@@ -2770,10 +2894,10 @@ function isLength(value2) {
2770
2894
  return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER$4;
2771
2895
  }
2772
2896
  function isArrayLike(value2) {
2773
- return value2 != null && isLength(value2.length) && !isFunction$4(value2);
2897
+ return value2 != null && isLength(value2.length) && !isFunction$5(value2);
2774
2898
  }
2775
2899
  function isIterateeCall(value2, index2, object2) {
2776
- if (!isObject$5(object2)) {
2900
+ if (!isObject$6(object2)) {
2777
2901
  return false;
2778
2902
  }
2779
2903
  var type2 = typeof index2;
@@ -2899,7 +3023,7 @@ function nativeKeysIn(object2) {
2899
3023
  var objectProto$7 = Object.prototype;
2900
3024
  var hasOwnProperty$8 = objectProto$7.hasOwnProperty;
2901
3025
  function baseKeysIn(object2) {
2902
- if (!isObject$5(object2)) {
3026
+ if (!isObject$6(object2)) {
2903
3027
  return nativeKeysIn(object2);
2904
3028
  }
2905
3029
  var isProto = isPrototype(object2), result = [];
@@ -3345,7 +3469,7 @@ function baseClone(value2, bitmask, customizer, key2, object2, stack2) {
3345
3469
  if (result !== void 0) {
3346
3470
  return result;
3347
3471
  }
3348
- if (!isObject$5(value2)) {
3472
+ if (!isObject$6(value2)) {
3349
3473
  return value2;
3350
3474
  }
3351
3475
  var isArr = isArray$5(value2);
@@ -3639,7 +3763,7 @@ function debounce$3(func, wait, options) {
3639
3763
  throw new TypeError(FUNC_ERROR_TEXT$1);
3640
3764
  }
3641
3765
  wait = toNumber$2(wait) || 0;
3642
- if (isObject$5(options)) {
3766
+ if (isObject$6(options)) {
3643
3767
  leading = !!options.leading;
3644
3768
  maxing = "maxWait" in options;
3645
3769
  maxWait = maxing ? nativeMax$2(toNumber$2(options.maxWait) || 0, wait) : maxWait;
@@ -3742,8 +3866,8 @@ function createRange(fromRight) {
3742
3866
  return baseRange(start, end, step, fromRight);
3743
3867
  };
3744
3868
  }
3745
- var range$a = createRange();
3746
- const range$b = range$a;
3869
+ var range$b = createRange();
3870
+ const range$c = range$b;
3747
3871
  var earthRadius = 63710088e-1;
3748
3872
  var factors = {
3749
3873
  centimeters: earthRadius * 100,
@@ -3841,7 +3965,7 @@ function point$9(coordinates2, properties, options) {
3841
3965
  if (coordinates2.length < 2) {
3842
3966
  throw new Error("coordinates must be at least 2 numbers long");
3843
3967
  }
3844
- if (!isNumber$2(coordinates2[0]) || !isNumber$2(coordinates2[1])) {
3968
+ if (!isNumber$3(coordinates2[0]) || !isNumber$3(coordinates2[1])) {
3845
3969
  throw new Error("coordinates must contain numbers");
3846
3970
  }
3847
3971
  var geom = {
@@ -4042,10 +4166,10 @@ function convertArea(area2, originalUnit, finalUnit) {
4042
4166
  }
4043
4167
  return area2 / startFactor * finalFactor;
4044
4168
  }
4045
- function isNumber$2(num) {
4169
+ function isNumber$3(num) {
4046
4170
  return !isNaN(num) && num !== null && !Array.isArray(num);
4047
4171
  }
4048
- function isObject$4(input) {
4172
+ function isObject$5(input) {
4049
4173
  return !!input && input.constructor === Object;
4050
4174
  }
4051
4175
  function validateBBox(bbox2) {
@@ -4059,7 +4183,7 @@ function validateBBox(bbox2) {
4059
4183
  throw new Error("bbox must be an Array of 4 or 6 numbers");
4060
4184
  }
4061
4185
  bbox2.forEach(function(num) {
4062
- if (!isNumber$2(num)) {
4186
+ if (!isNumber$3(num)) {
4063
4187
  throw new Error("bbox must only contain numbers");
4064
4188
  }
4065
4189
  });
@@ -4085,8 +4209,8 @@ const es$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
4085
4209
  featureCollection: featureCollection$1,
4086
4210
  geometry: geometry$1,
4087
4211
  geometryCollection,
4088
- isNumber: isNumber$2,
4089
- isObject: isObject$4,
4212
+ isNumber: isNumber$3,
4213
+ isObject: isObject$5,
4090
4214
  lengthToDegrees,
4091
4215
  lengthToRadians,
4092
4216
  lineString,
@@ -4528,7 +4652,7 @@ function lineReduce$1(geojson, callback, initialValue) {
4528
4652
  }
4529
4653
  function findSegment$1(geojson, options) {
4530
4654
  options = options || {};
4531
- if (!isObject$4(options))
4655
+ if (!isObject$5(options))
4532
4656
  throw new Error("options is invalid");
4533
4657
  var featureIndex = options.featureIndex || 0;
4534
4658
  var multiFeatureIndex = options.multiFeatureIndex || 0;
@@ -4620,7 +4744,7 @@ function findSegment$1(geojson, options) {
4620
4744
  }
4621
4745
  function findPoint$1(geojson, options) {
4622
4746
  options = options || {};
4623
- if (!isObject$4(options))
4747
+ if (!isObject$5(options))
4624
4748
  throw new Error("options is invalid");
4625
4749
  var featureIndex = options.featureIndex || 0;
4626
4750
  var multiFeatureIndex = options.multiFeatureIndex || 0;
@@ -9951,9 +10075,9 @@ var debug_1$1 = debug$6;
9951
10075
  const re2 = exports2.re = [];
9952
10076
  const src = exports2.src = [];
9953
10077
  const t4 = exports2.t = {};
9954
- let R2 = 0;
10078
+ let R = 0;
9955
10079
  const createToken = (name2, value2, isGlobal) => {
9956
- const index2 = R2++;
10080
+ const index2 = R++;
9957
10081
  debug2(name2, index2, value2);
9958
10082
  t4[name2] = index2;
9959
10083
  src[index2] = value2;
@@ -11094,11 +11218,11 @@ const forEachStep$1 = (self2, fn, node, thisp) => {
11094
11218
  fn.call(thisp, hit2.value, hit2.key, self2);
11095
11219
  };
11096
11220
  var lruCache$2 = LRUCache$2;
11097
- var range$9;
11221
+ var range$a;
11098
11222
  var hasRequiredRange$1;
11099
11223
  function requireRange$1() {
11100
11224
  if (hasRequiredRange$1)
11101
- return range$9;
11225
+ return range$a;
11102
11226
  hasRequiredRange$1 = 1;
11103
11227
  class Range2 {
11104
11228
  constructor(range2, options) {
@@ -11223,7 +11347,7 @@ function requireRange$1() {
11223
11347
  return false;
11224
11348
  }
11225
11349
  }
11226
- range$9 = Range2;
11350
+ range$a = Range2;
11227
11351
  const LRU = lruCache$2;
11228
11352
  const cache2 = new LRU({ max: 1e3 });
11229
11353
  const parseOptions2 = parseOptions_1$1;
@@ -11454,7 +11578,7 @@ function requireRange$1() {
11454
11578
  }
11455
11579
  return true;
11456
11580
  };
11457
- return range$9;
11581
+ return range$a;
11458
11582
  }
11459
11583
  var comparator$2;
11460
11584
  var hasRequiredComparator$1;
@@ -12279,6 +12403,42 @@ const annDataConvenienceObsEmbeddingItem = z.object({
12279
12403
  dims: z.array(z.number()).optional(),
12280
12404
  embeddingType: z.string()
12281
12405
  });
12406
+ z.object({
12407
+ path: z.string().describe("Path to the comparison metadata, such as /uns/comparison_metadata")
12408
+ });
12409
+ z.object({
12410
+ // TODO: implement a featureStats.anndata.zarr loader
12411
+ // which does not depend on comparisonMetadata
12412
+ // (instead, would point directly to the root of
12413
+ // the dataframe containing a set of diff exp results)
12414
+ // path: z.string().describe('Path to the dataframe containing the results.'),
12415
+ metadataPath: z.string().describe("Path to the comparison metadata."),
12416
+ indexColumn: z.string().optional().describe("Provide a column to use for the feature index, if different than the default dataframe index."),
12417
+ pValueColumn: z.string(),
12418
+ foldChangeColumn: z.string(),
12419
+ pValueTransformation: z.enum(["minuslog10"]).optional(),
12420
+ pValueAdjusted: z.boolean().optional(),
12421
+ foldChangeTransformation: z.enum(["log2"]).optional()
12422
+ });
12423
+ z.object({
12424
+ metadataPath: z.string().describe("Path to the comparison metadata."),
12425
+ indexColumn: z.string().optional().describe("Provide a column to use for the feature set index, if different than the default dataframe index."),
12426
+ termColumn: z.string().optional(),
12427
+ pValueColumn: z.string(),
12428
+ pValueAdjusted: z.boolean().optional(),
12429
+ analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, pertpy_hypergeometric.")
12430
+ });
12431
+ z.object({
12432
+ metadataPath: z.string().describe("Path to the comparison metadata."),
12433
+ indexColumn: z.string().optional().describe("Provide a column to use for the obs set index, if different than the default dataframe index."),
12434
+ interceptExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
12435
+ effectExpectedSampleColumn: z.string().describe("If we had a new sample (with no active covariates) with a total number of cells equal to the mean sampling depth of the dataset, then this distribution over the cell types would be most likely."),
12436
+ foldChangeColumn: z.string().describe("The log-fold change is then calculated between this expected sample and the expected sample with no active covariates from the intercept section."),
12437
+ foldChangeTransformation: z.enum(["log2"]).optional(),
12438
+ isCredibleEffectColumn: z.string().describe("Column which annotates effects as being credible or not (boolean)."),
12439
+ covariateColumn: z.string().describe("Column which defines the covariate used in the analysis."),
12440
+ analysisType: z.string().optional().describe("Optionally, provide an analysis_type name. By default, sccoda_df.")
12441
+ });
12282
12442
  const annDataObsLabels = annDataObs;
12283
12443
  const annDataFeatureLabels = annDataObs;
12284
12444
  const annDataSampleEdges = annDataObs;
@@ -12598,14 +12758,14 @@ var tinycolor$1 = { exports: {} };
12598
12758
  },
12599
12759
  getLuminance: function() {
12600
12760
  var rgb2 = this.toRgb();
12601
- var RsRGB, GsRGB, BsRGB, R2, G2, B2;
12761
+ var RsRGB, GsRGB, BsRGB, R, G2, B2;
12602
12762
  RsRGB = rgb2.r / 255;
12603
12763
  GsRGB = rgb2.g / 255;
12604
12764
  BsRGB = rgb2.b / 255;
12605
12765
  if (RsRGB <= 0.03928) {
12606
- R2 = RsRGB / 12.92;
12766
+ R = RsRGB / 12.92;
12607
12767
  } else {
12608
- R2 = Math2.pow((RsRGB + 0.055) / 1.055, 2.4);
12768
+ R = Math2.pow((RsRGB + 0.055) / 1.055, 2.4);
12609
12769
  }
12610
12770
  if (GsRGB <= 0.03928) {
12611
12771
  G2 = GsRGB / 12.92;
@@ -12617,7 +12777,7 @@ var tinycolor$1 = { exports: {} };
12617
12777
  } else {
12618
12778
  B2 = Math2.pow((BsRGB + 0.055) / 1.055, 2.4);
12619
12779
  }
12620
- return 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B2;
12780
+ return 0.2126 * R + 0.7152 * G2 + 0.0722 * B2;
12621
12781
  },
12622
12782
  setAlpha: function(value2) {
12623
12783
  this._a = boundAlpha(value2);
@@ -13697,7 +13857,7 @@ var json2csv_umd = { exports: {} };
13697
13857
  }
13698
13858
  this._maxListeners = this._maxListeners || void 0;
13699
13859
  };
13700
- EventEmitter2.prototype.setMaxListeners = function setMaxListeners2(n2) {
13860
+ EventEmitter2.prototype.setMaxListeners = function setMaxListeners(n2) {
13701
13861
  if (typeof n2 !== "number" || n2 < 0 || isNaN(n2))
13702
13862
  throw new TypeError('"n" argument must be a positive number');
13703
13863
  this._maxListeners = n2;
@@ -13708,7 +13868,7 @@ var json2csv_umd = { exports: {} };
13708
13868
  return EventEmitter2.defaultMaxListeners;
13709
13869
  return that._maxListeners;
13710
13870
  }
13711
- EventEmitter2.prototype.getMaxListeners = function getMaxListeners2() {
13871
+ EventEmitter2.prototype.getMaxListeners = function getMaxListeners() {
13712
13872
  return $getMaxListeners(this);
13713
13873
  };
13714
13874
  function emitNone(handler, isFn, self2) {
@@ -13716,9 +13876,9 @@ var json2csv_umd = { exports: {} };
13716
13876
  handler.call(self2);
13717
13877
  else {
13718
13878
  var len2 = handler.length;
13719
- var listeners2 = arrayClone2(handler, len2);
13879
+ var listeners = arrayClone(handler, len2);
13720
13880
  for (var i2 = 0; i2 < len2; ++i2)
13721
- listeners2[i2].call(self2);
13881
+ listeners[i2].call(self2);
13722
13882
  }
13723
13883
  }
13724
13884
  function emitOne(handler, isFn, self2, arg1) {
@@ -13726,9 +13886,9 @@ var json2csv_umd = { exports: {} };
13726
13886
  handler.call(self2, arg1);
13727
13887
  else {
13728
13888
  var len2 = handler.length;
13729
- var listeners2 = arrayClone2(handler, len2);
13889
+ var listeners = arrayClone(handler, len2);
13730
13890
  for (var i2 = 0; i2 < len2; ++i2)
13731
- listeners2[i2].call(self2, arg1);
13891
+ listeners[i2].call(self2, arg1);
13732
13892
  }
13733
13893
  }
13734
13894
  function emitTwo(handler, isFn, self2, arg1, arg2) {
@@ -13736,9 +13896,9 @@ var json2csv_umd = { exports: {} };
13736
13896
  handler.call(self2, arg1, arg2);
13737
13897
  else {
13738
13898
  var len2 = handler.length;
13739
- var listeners2 = arrayClone2(handler, len2);
13899
+ var listeners = arrayClone(handler, len2);
13740
13900
  for (var i2 = 0; i2 < len2; ++i2)
13741
- listeners2[i2].call(self2, arg1, arg2);
13901
+ listeners[i2].call(self2, arg1, arg2);
13742
13902
  }
13743
13903
  }
13744
13904
  function emitThree(handler, isFn, self2, arg1, arg2, arg3) {
@@ -13746,9 +13906,9 @@ var json2csv_umd = { exports: {} };
13746
13906
  handler.call(self2, arg1, arg2, arg3);
13747
13907
  else {
13748
13908
  var len2 = handler.length;
13749
- var listeners2 = arrayClone2(handler, len2);
13909
+ var listeners = arrayClone(handler, len2);
13750
13910
  for (var i2 = 0; i2 < len2; ++i2)
13751
- listeners2[i2].call(self2, arg1, arg2, arg3);
13911
+ listeners[i2].call(self2, arg1, arg2, arg3);
13752
13912
  }
13753
13913
  }
13754
13914
  function emitMany(handler, isFn, self2, args) {
@@ -13756,12 +13916,12 @@ var json2csv_umd = { exports: {} };
13756
13916
  handler.apply(self2, args);
13757
13917
  else {
13758
13918
  var len2 = handler.length;
13759
- var listeners2 = arrayClone2(handler, len2);
13919
+ var listeners = arrayClone(handler, len2);
13760
13920
  for (var i2 = 0; i2 < len2; ++i2)
13761
- listeners2[i2].apply(self2, args);
13921
+ listeners[i2].apply(self2, args);
13762
13922
  }
13763
13923
  }
13764
- EventEmitter2.prototype.emit = function emit3(type3) {
13924
+ EventEmitter2.prototype.emit = function emit2(type3) {
13765
13925
  var er, handler, len2, args, i2, events2, domain3;
13766
13926
  var doError = type3 === "error";
13767
13927
  events2 = this._events;
@@ -13814,7 +13974,7 @@ var json2csv_umd = { exports: {} };
13814
13974
  }
13815
13975
  return true;
13816
13976
  };
13817
- function _addListener2(target2, type3, listener2, prepend) {
13977
+ function _addListener(target2, type3, listener2, prepend) {
13818
13978
  var m2;
13819
13979
  var events2;
13820
13980
  var existing;
@@ -13866,14 +14026,14 @@ var json2csv_umd = { exports: {} };
13866
14026
  function emitWarning(e3) {
13867
14027
  typeof console.warn === "function" ? console.warn(e3) : console.log(e3);
13868
14028
  }
13869
- EventEmitter2.prototype.addListener = function addListener2(type3, listener2) {
13870
- return _addListener2(this, type3, listener2, false);
14029
+ EventEmitter2.prototype.addListener = function addListener(type3, listener2) {
14030
+ return _addListener(this, type3, listener2, false);
13871
14031
  };
13872
14032
  EventEmitter2.prototype.on = EventEmitter2.prototype.addListener;
13873
- EventEmitter2.prototype.prependListener = function prependListener3(type3, listener2) {
13874
- return _addListener2(this, type3, listener2, true);
14033
+ EventEmitter2.prototype.prependListener = function prependListener2(type3, listener2) {
14034
+ return _addListener(this, type3, listener2, true);
13875
14035
  };
13876
- function _onceWrap2(target2, type3, listener2) {
14036
+ function _onceWrap(target2, type3, listener2) {
13877
14037
  var fired = false;
13878
14038
  function g2() {
13879
14039
  target2.removeListener(type3, g2);
@@ -13885,19 +14045,19 @@ var json2csv_umd = { exports: {} };
13885
14045
  g2.listener = listener2;
13886
14046
  return g2;
13887
14047
  }
13888
- EventEmitter2.prototype.once = function once3(type3, listener2) {
14048
+ EventEmitter2.prototype.once = function once(type3, listener2) {
13889
14049
  if (typeof listener2 !== "function")
13890
14050
  throw new TypeError('"listener" argument must be a function');
13891
- this.on(type3, _onceWrap2(this, type3, listener2));
14051
+ this.on(type3, _onceWrap(this, type3, listener2));
13892
14052
  return this;
13893
14053
  };
13894
- EventEmitter2.prototype.prependOnceListener = function prependOnceListener2(type3, listener2) {
14054
+ EventEmitter2.prototype.prependOnceListener = function prependOnceListener(type3, listener2) {
13895
14055
  if (typeof listener2 !== "function")
13896
14056
  throw new TypeError('"listener" argument must be a function');
13897
- this.prependListener(type3, _onceWrap2(this, type3, listener2));
14057
+ this.prependListener(type3, _onceWrap(this, type3, listener2));
13898
14058
  return this;
13899
14059
  };
13900
- EventEmitter2.prototype.removeListener = function removeListener2(type3, listener2) {
14060
+ EventEmitter2.prototype.removeListener = function removeListener(type3, listener2) {
13901
14061
  var list, events2, position2, i2, originalListener;
13902
14062
  if (typeof listener2 !== "function")
13903
14063
  throw new TypeError('"listener" argument must be a function');
@@ -13935,15 +14095,15 @@ var json2csv_umd = { exports: {} };
13935
14095
  delete events2[type3];
13936
14096
  }
13937
14097
  } else {
13938
- spliceOne2(list, position2);
14098
+ spliceOne(list, position2);
13939
14099
  }
13940
14100
  if (events2.removeListener)
13941
14101
  this.emit("removeListener", type3, originalListener || listener2);
13942
14102
  }
13943
14103
  return this;
13944
14104
  };
13945
- EventEmitter2.prototype.removeAllListeners = function removeAllListeners2(type3) {
13946
- var listeners2, events2;
14105
+ EventEmitter2.prototype.removeAllListeners = function removeAllListeners(type3) {
14106
+ var listeners, events2;
13947
14107
  events2 = this._events;
13948
14108
  if (!events2)
13949
14109
  return this;
@@ -13972,17 +14132,17 @@ var json2csv_umd = { exports: {} };
13972
14132
  this._eventsCount = 0;
13973
14133
  return this;
13974
14134
  }
13975
- listeners2 = events2[type3];
13976
- if (typeof listeners2 === "function") {
13977
- this.removeListener(type3, listeners2);
13978
- } else if (listeners2) {
14135
+ listeners = events2[type3];
14136
+ if (typeof listeners === "function") {
14137
+ this.removeListener(type3, listeners);
14138
+ } else if (listeners) {
13979
14139
  do {
13980
- this.removeListener(type3, listeners2[listeners2.length - 1]);
13981
- } while (listeners2[0]);
14140
+ this.removeListener(type3, listeners[listeners.length - 1]);
14141
+ } while (listeners[0]);
13982
14142
  }
13983
14143
  return this;
13984
14144
  };
13985
- EventEmitter2.prototype.listeners = function listeners2(type3) {
14145
+ EventEmitter2.prototype.listeners = function listeners(type3) {
13986
14146
  var evlistener;
13987
14147
  var ret;
13988
14148
  var events2 = this._events;
@@ -13995,7 +14155,7 @@ var json2csv_umd = { exports: {} };
13995
14155
  else if (typeof evlistener === "function")
13996
14156
  ret = [evlistener.listener || evlistener];
13997
14157
  else
13998
- ret = unwrapListeners2(evlistener);
14158
+ ret = unwrapListeners(evlistener);
13999
14159
  }
14000
14160
  return ret;
14001
14161
  };
@@ -14003,11 +14163,11 @@ var json2csv_umd = { exports: {} };
14003
14163
  if (typeof emitter.listenerCount === "function") {
14004
14164
  return emitter.listenerCount(type3);
14005
14165
  } else {
14006
- return listenerCount2.call(emitter, type3);
14166
+ return listenerCount.call(emitter, type3);
14007
14167
  }
14008
14168
  };
14009
- EventEmitter2.prototype.listenerCount = listenerCount2;
14010
- function listenerCount2(type3) {
14169
+ EventEmitter2.prototype.listenerCount = listenerCount;
14170
+ function listenerCount(type3) {
14011
14171
  var events2 = this._events;
14012
14172
  if (events2) {
14013
14173
  var evlistener = events2[type3];
@@ -14019,21 +14179,21 @@ var json2csv_umd = { exports: {} };
14019
14179
  }
14020
14180
  return 0;
14021
14181
  }
14022
- EventEmitter2.prototype.eventNames = function eventNames2() {
14182
+ EventEmitter2.prototype.eventNames = function eventNames() {
14023
14183
  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
14024
14184
  };
14025
- function spliceOne2(list, index2) {
14185
+ function spliceOne(list, index2) {
14026
14186
  for (var i2 = index2, k = i2 + 1, n2 = list.length; k < n2; i2 += 1, k += 1)
14027
14187
  list[i2] = list[k];
14028
14188
  list.pop();
14029
14189
  }
14030
- function arrayClone2(arr, i2) {
14190
+ function arrayClone(arr, i2) {
14031
14191
  var copy2 = new Array(i2);
14032
14192
  while (i2--)
14033
14193
  copy2[i2] = arr[i2];
14034
14194
  return copy2;
14035
14195
  }
14036
- function unwrapListeners2(arr) {
14196
+ function unwrapListeners(arr) {
14037
14197
  var ret = new Array(arr.length);
14038
14198
  for (var i2 = 0; i2 < ret.length; ++i2) {
14039
14199
  ret[i2] = arr[i2].listener || arr[i2];
@@ -15825,7 +15985,7 @@ var json2csv_umd = { exports: {} };
15825
15985
  return str;
15826
15986
  }
15827
15987
  function deprecate(fn, msg) {
15828
- if (isUndefined(global$1.process)) {
15988
+ if (isUndefined2(global$1.process)) {
15829
15989
  return function() {
15830
15990
  return deprecate(fn, msg).apply(this, arguments);
15831
15991
  };
@@ -15845,7 +16005,7 @@ var json2csv_umd = { exports: {} };
15845
16005
  var debugs = {};
15846
16006
  var debugEnviron;
15847
16007
  function debuglog(set3) {
15848
- if (isUndefined(debugEnviron))
16008
+ if (isUndefined2(debugEnviron))
15849
16009
  debugEnviron = "";
15850
16010
  set3 = set3.toUpperCase();
15851
16011
  if (!debugs[set3]) {
@@ -15876,13 +16036,13 @@ var json2csv_umd = { exports: {} };
15876
16036
  } else if (opts2) {
15877
16037
  _extend(ctx, opts2);
15878
16038
  }
15879
- if (isUndefined(ctx.showHidden))
16039
+ if (isUndefined2(ctx.showHidden))
15880
16040
  ctx.showHidden = false;
15881
- if (isUndefined(ctx.depth))
16041
+ if (isUndefined2(ctx.depth))
15882
16042
  ctx.depth = 2;
15883
- if (isUndefined(ctx.colors))
16043
+ if (isUndefined2(ctx.colors))
15884
16044
  ctx.colors = false;
15885
- if (isUndefined(ctx.customInspect))
16045
+ if (isUndefined2(ctx.customInspect))
15886
16046
  ctx.customInspect = true;
15887
16047
  if (ctx.colors)
15888
16048
  ctx.stylize = stylizeWithColor;
@@ -16010,7 +16170,7 @@ var json2csv_umd = { exports: {} };
16010
16170
  return reduceToSingleString(output2, base2, braces);
16011
16171
  }
16012
16172
  function formatPrimitive(ctx, value2) {
16013
- if (isUndefined(value2))
16173
+ if (isUndefined2(value2))
16014
16174
  return ctx.stylize("undefined", "undefined");
16015
16175
  if (isString2(value2)) {
16016
16176
  var simple = "'" + JSON.stringify(value2).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
@@ -16095,7 +16255,7 @@ var json2csv_umd = { exports: {} };
16095
16255
  str = ctx.stylize("[Circular]", "special");
16096
16256
  }
16097
16257
  }
16098
- if (isUndefined(name2)) {
16258
+ if (isUndefined2(name2)) {
16099
16259
  if (array2 && key2.match(/^\d+$/)) {
16100
16260
  return str;
16101
16261
  }
@@ -16136,7 +16296,7 @@ var json2csv_umd = { exports: {} };
16136
16296
  function isString2(arg) {
16137
16297
  return typeof arg === "string";
16138
16298
  }
16139
- function isUndefined(arg) {
16299
+ function isUndefined2(arg) {
16140
16300
  return arg === void 0;
16141
16301
  }
16142
16302
  function isRegExp2(re2) {
@@ -16365,7 +16525,7 @@ var json2csv_umd = { exports: {} };
16365
16525
  Readable.ReadableState = ReadableState;
16366
16526
  var debug2 = debuglog("stream");
16367
16527
  inherits$1(Readable, EventEmitter2);
16368
- function prependListener2(emitter, event2, fn) {
16528
+ function prependListener(emitter, event2, fn) {
16369
16529
  if (typeof emitter.prependListener === "function") {
16370
16530
  return emitter.prependListener(event2, fn);
16371
16531
  } else {
@@ -16719,7 +16879,7 @@ var json2csv_umd = { exports: {} };
16719
16879
  if (listenerCount$1(dest, "error") === 0)
16720
16880
  dest.emit("error", er);
16721
16881
  }
16722
- prependListener2(dest, "error", onerror);
16882
+ prependListener(dest, "error", onerror);
16723
16883
  function onclose() {
16724
16884
  dest.removeListener("finish", onfinish);
16725
16885
  unpipe();
@@ -32844,16 +33004,16 @@ function dirname(url) {
32844
33004
  return slashIndex >= 0 ? url.substr(0, slashIndex) : "";
32845
33005
  }
32846
33006
  const isBoolean$3 = (x2) => typeof x2 === "boolean";
32847
- const isFunction$3 = (x2) => typeof x2 === "function";
32848
- const isObject$3 = (x2) => x2 !== null && typeof x2 === "object";
32849
- const isPureObject = (x2) => isObject$3(x2) && x2.constructor === {}.constructor;
33007
+ const isFunction$4 = (x2) => typeof x2 === "function";
33008
+ const isObject$4 = (x2) => x2 !== null && typeof x2 === "object";
33009
+ const isPureObject = (x2) => isObject$4(x2) && x2.constructor === {}.constructor;
32850
33010
  const isIterable$1 = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
32851
33011
  const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
32852
33012
  const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
32853
33013
  const isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
32854
33014
  const isBuffer$2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
32855
- const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$3(x2) && isFunction$3(x2.tee) && isFunction$3(x2.cancel) && isFunction$3(x2.getReader);
32856
- const isReadableNodeStream = (x2) => isObject$3(x2) && isFunction$3(x2.read) && isFunction$3(x2.pipe) && isBoolean$3(x2.readable);
33015
+ const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$4(x2) && isFunction$4(x2.tee) && isFunction$4(x2.cancel) && isFunction$4(x2.getReader);
33016
+ const isReadableNodeStream = (x2) => isObject$4(x2) && isFunction$4(x2.read) && isFunction$4(x2.pipe) && isBoolean$3(x2.readable);
32857
33017
  const isReadableStream = (x2) => isReadableDOMStream(x2) || isReadableNodeStream(x2);
32858
33018
  const DATA_URL_PATTERN = /^data:([-\w.]+\/[-\w.+]+)(;|,)/;
32859
33019
  const MIME_TYPE_PATTERN = /^([-\w.]+\/[-\w.+]+)/;
@@ -33653,7 +33813,7 @@ function getFetchFunction(options, context2) {
33653
33813
  if (typeof fetchOptions.fetch === "function") {
33654
33814
  return fetchOptions.fetch;
33655
33815
  }
33656
- if (isObject$3(fetchOptions.fetch)) {
33816
+ if (isObject$4(fetchOptions.fetch)) {
33657
33817
  return (url) => fetchFile(url, fetchOptions);
33658
33818
  }
33659
33819
  if (context2 !== null && context2 !== void 0 && context2.fetch) {
@@ -33674,7 +33834,7 @@ function validateOptionsObject(options, id2, defaultOptions2, deprecatedOptions,
33674
33834
  const loaderName = id2 || "Top level";
33675
33835
  const prefix2 = id2 ? "".concat(id2, ".") : "";
33676
33836
  for (const key2 in options) {
33677
- const isSubOptions = !id2 && isObject$3(options[key2]);
33837
+ const isSubOptions = !id2 && isObject$4(options[key2]);
33678
33838
  const isBaseUriOption = key2 === "baseUri" && !id2;
33679
33839
  const isWorkerUrlOption = key2 === "workerUrl" && id2;
33680
33840
  if (!(key2 in defaultOptions2) && !isBaseUriOption && !isWorkerUrlOption) {
@@ -52642,9 +52802,9 @@ class Controller {
52642
52802
  updateTransition() {
52643
52803
  this.transitionManager.updateTransition();
52644
52804
  }
52645
- toggleEvents(eventNames2, enabled) {
52805
+ toggleEvents(eventNames, enabled) {
52646
52806
  if (this.eventManager) {
52647
- eventNames2.forEach((eventName) => {
52807
+ eventNames.forEach((eventName) => {
52648
52808
  if (this._events[eventName] !== enabled) {
52649
52809
  this._events[eventName] = enabled;
52650
52810
  if (enabled) {
@@ -56095,18 +56255,18 @@ var hammer$1 = { exports: {} };
56095
56255
  emit: function(input) {
56096
56256
  var self2 = this;
56097
56257
  var state = this.state;
56098
- function emit3(event2) {
56258
+ function emit2(event2) {
56099
56259
  self2.manager.emit(event2, input);
56100
56260
  }
56101
56261
  if (state < STATE_ENDED) {
56102
- emit3(self2.options.event + stateStr(state));
56262
+ emit2(self2.options.event + stateStr(state));
56103
56263
  }
56104
- emit3(self2.options.event);
56264
+ emit2(self2.options.event);
56105
56265
  if (input.additionalEvent) {
56106
- emit3(input.additionalEvent);
56266
+ emit2(input.additionalEvent);
56107
56267
  }
56108
56268
  if (state >= STATE_ENDED) {
56109
- emit3(self2.options.event + stateStr(state));
56269
+ emit2(self2.options.event + stateStr(state));
56110
56270
  }
56111
56271
  },
56112
56272
  /**
@@ -57466,7 +57626,7 @@ class EventRegistrar {
57466
57626
  isEmpty() {
57467
57627
  return !this._active;
57468
57628
  }
57469
- add(type2, handler, options, once3 = false, passive = false) {
57629
+ add(type2, handler, options, once = false, passive = false) {
57470
57630
  const { handlers, handlersByElement } = this;
57471
57631
  let opts2 = DEFAULT_OPTIONS$4;
57472
57632
  if (typeof options === "string" || options && options.addEventListener) {
@@ -57485,7 +57645,7 @@ class EventRegistrar {
57485
57645
  srcElement: opts2.srcElement,
57486
57646
  priority: opts2.priority
57487
57647
  };
57488
- if (once3) {
57648
+ if (once) {
57489
57649
  entry2.once = true;
57490
57650
  }
57491
57651
  if (passive) {
@@ -57533,7 +57693,7 @@ class EventRegistrar {
57533
57693
  };
57534
57694
  const entriesToRemove = [];
57535
57695
  for (let i2 = 0; i2 < entries2.length; i2++) {
57536
- const { type: type2, handler, once: once3 } = entries2[i2];
57696
+ const { type: type2, handler, once } = entries2[i2];
57537
57697
  handler({
57538
57698
  ...event2,
57539
57699
  // @ts-ignore
@@ -57541,7 +57701,7 @@ class EventRegistrar {
57541
57701
  stopPropagation,
57542
57702
  stopImmediatePropagation
57543
57703
  });
57544
- if (once3) {
57704
+ if (once) {
57545
57705
  entriesToRemove.push(entries2[i2]);
57546
57706
  }
57547
57707
  if (immediatePropagationStopped) {
@@ -57722,11 +57882,11 @@ class EventManager {
57722
57882
  /**
57723
57883
  * Process the event registration for a single event + handler.
57724
57884
  */
57725
- _addEventHandler(event2, handler, opts2, once3, passive) {
57885
+ _addEventHandler(event2, handler, opts2, once, passive) {
57726
57886
  if (typeof event2 !== "string") {
57727
57887
  opts2 = handler;
57728
57888
  for (const eventName in event2) {
57729
- this._addEventHandler(eventName, event2[eventName], opts2, once3, passive);
57889
+ this._addEventHandler(eventName, event2[eventName], opts2, once, passive);
57730
57890
  }
57731
57891
  return;
57732
57892
  }
@@ -57741,7 +57901,7 @@ class EventManager {
57741
57901
  manager.on(eventAlias, eventRegistrar.handleEvent);
57742
57902
  }
57743
57903
  }
57744
- eventRegistrar.add(event2, handler, opts2, once3, passive);
57904
+ eventRegistrar.add(event2, handler, opts2, once, passive);
57745
57905
  if (!eventRegistrar.isEmpty()) {
57746
57906
  this._toggleRecognizer(eventRegistrar.recognizerName, true);
57747
57907
  }
@@ -60462,7 +60622,7 @@ function getPropTypes(props) {
60462
60622
  const ERR_NOT_OBJECT = "count(): argument not an object";
60463
60623
  const ERR_NOT_CONTAINER = "count(): argument not a container";
60464
60624
  function count$2(container) {
60465
- if (!isObject$2(container)) {
60625
+ if (!isObject$3(container)) {
60466
60626
  throw new Error(ERR_NOT_OBJECT);
60467
60627
  }
60468
60628
  if (typeof container.count === "function") {
@@ -60482,7 +60642,7 @@ function count$2(container) {
60482
60642
  function isPlainObject(value2) {
60483
60643
  return value2 !== null && typeof value2 === "object" && value2.constructor === Object;
60484
60644
  }
60485
- function isObject$2(value2) {
60645
+ function isObject$3(value2) {
60486
60646
  return value2 !== null && typeof value2 === "object";
60487
60647
  }
60488
60648
  function mergeShaders(target2, source2) {
@@ -97118,7 +97278,7 @@ function getCoords$1(coords) {
97118
97278
  throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array");
97119
97279
  }
97120
97280
  function containsNumber$1(coordinates2) {
97121
- if (coordinates2.length > 1 && isNumber$2(coordinates2[0]) && isNumber$2(coordinates2[1])) {
97281
+ if (coordinates2.length > 1 && isNumber$3(coordinates2[0]) && isNumber$3(coordinates2[1])) {
97122
97282
  return true;
97123
97283
  }
97124
97284
  if (Array.isArray(coordinates2[0]) && coordinates2[0].length) {
@@ -99317,7 +99477,7 @@ var shams = function hasToStringTagShams() {
99317
99477
  };
99318
99478
  var esErrors = Error;
99319
99479
  var _eval = EvalError;
99320
- var range$8 = RangeError;
99480
+ var range$9 = RangeError;
99321
99481
  var ref$1 = ReferenceError;
99322
99482
  var syntax = SyntaxError;
99323
99483
  var type$1 = TypeError;
@@ -99425,7 +99585,7 @@ var hasown = bind$3.call(call, $hasOwn);
99425
99585
  var undefined$2;
99426
99586
  var $Error = esErrors;
99427
99587
  var $EvalError = _eval;
99428
- var $RangeError = range$8;
99588
+ var $RangeError = range$9;
99429
99589
  var $ReferenceError = ref$1;
99430
99590
  var $SyntaxError$1 = syntax;
99431
99591
  var $TypeError$4 = type$1;
@@ -99941,7 +100101,7 @@ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symb
99941
100101
  var toStr$1 = Object.prototype.toString;
99942
100102
  var concat = Array.prototype.concat;
99943
100103
  var defineDataProperty2 = defineDataProperty$1;
99944
- var isFunction$2 = function(fn) {
100104
+ var isFunction$3 = function(fn) {
99945
100105
  return typeof fn === "function" && toStr$1.call(fn) === "[object Function]";
99946
100106
  };
99947
100107
  var supportsDescriptors$2 = hasPropertyDescriptors_1();
@@ -99951,7 +100111,7 @@ var defineProperty$1 = function(object2, name2, value2, predicate) {
99951
100111
  if (object2[name2] === value2) {
99952
100112
  return;
99953
100113
  }
99954
- } else if (!isFunction$2(predicate) || !predicate()) {
100114
+ } else if (!isFunction$3(predicate) || !predicate()) {
99955
100115
  return;
99956
100116
  }
99957
100117
  }
@@ -100335,7 +100495,7 @@ function lineOverlap(line1, line2, options) {
100335
100495
  options = {};
100336
100496
  }
100337
100497
  options = options || {};
100338
- if (!isObject$4(options))
100498
+ if (!isObject$5(options))
100339
100499
  throw new Error("options is invalid");
100340
100500
  var tolerance = options.tolerance || 0;
100341
100501
  var features = [];
@@ -100895,19 +101055,19 @@ var jsts_min = { exports: {} };
100895
101055
  }, Object.defineProperties(w2, O);
100896
101056
  var T = function(t5, e4) {
100897
101057
  return t5.interfaces_ && t5.interfaces_().indexOf(e4) > -1;
100898
- }, R2 = function() {
101058
+ }, R = function() {
100899
101059
  }, P = { LOG_10: { configurable: true } };
100900
- R2.prototype.interfaces_ = function() {
101060
+ R.prototype.interfaces_ = function() {
100901
101061
  return [];
100902
- }, R2.prototype.getClass = function() {
100903
- return R2;
100904
- }, R2.log10 = function(t5) {
101062
+ }, R.prototype.getClass = function() {
101063
+ return R;
101064
+ }, R.log10 = function(t5) {
100905
101065
  var e4 = Math.log(t5);
100906
- return v.isInfinite(e4) ? e4 : v.isNaN(e4) ? e4 : e4 / R2.LOG_10;
100907
- }, R2.min = function(t5, e4, n3, i3) {
101066
+ return v.isInfinite(e4) ? e4 : v.isNaN(e4) ? e4 : e4 / R.LOG_10;
101067
+ }, R.min = function(t5, e4, n3, i3) {
100908
101068
  var r4 = t5;
100909
101069
  return e4 < r4 && (r4 = e4), n3 < r4 && (r4 = n3), i3 < r4 && (r4 = i3), r4;
100910
- }, R2.clamp = function() {
101070
+ }, R.clamp = function() {
100911
101071
  if ("number" == typeof arguments[2] && "number" == typeof arguments[0] && "number" == typeof arguments[1]) {
100912
101072
  var t5 = arguments[0], e4 = arguments[1], n3 = arguments[2];
100913
101073
  return t5 < e4 ? e4 : t5 > n3 ? n3 : t5;
@@ -100916,9 +101076,9 @@ var jsts_min = { exports: {} };
100916
101076
  var i3 = arguments[0], r4 = arguments[1], o3 = arguments[2];
100917
101077
  return i3 < r4 ? r4 : i3 > o3 ? o3 : i3;
100918
101078
  }
100919
- }, R2.wrap = function(t5, e4) {
101079
+ }, R.wrap = function(t5, e4) {
100920
101080
  return t5 < 0 ? e4 - -t5 % e4 : t5 % e4;
100921
- }, R2.max = function() {
101081
+ }, R.max = function() {
100922
101082
  if (3 === arguments.length) {
100923
101083
  var t5 = arguments[0], e4 = arguments[1], n3 = arguments[2], i3 = t5;
100924
101084
  return e4 > i3 && (i3 = e4), n3 > i3 && (i3 = n3), i3;
@@ -100927,11 +101087,11 @@ var jsts_min = { exports: {} };
100927
101087
  var r4 = arguments[0], o3 = arguments[1], s3 = arguments[2], a3 = arguments[3], u3 = r4;
100928
101088
  return o3 > u3 && (u3 = o3), s3 > u3 && (u3 = s3), a3 > u3 && (u3 = a3), u3;
100929
101089
  }
100930
- }, R2.average = function(t5, e4) {
101090
+ }, R.average = function(t5, e4) {
100931
101091
  return (t5 + e4) / 2;
100932
101092
  }, P.LOG_10.get = function() {
100933
101093
  return Math.log(10);
100934
- }, Object.defineProperties(R2, P);
101094
+ }, Object.defineProperties(R, P);
100935
101095
  var D2 = function(t5) {
100936
101096
  this.str = t5;
100937
101097
  };
@@ -102086,7 +102246,7 @@ var jsts_min = { exports: {} };
102086
102246
  }
102087
102247
  } else
102088
102248
  r4 = true;
102089
- return r4 ? R2.min(at2.distancePointLine(t5, n3, i3), at2.distancePointLine(e4, n3, i3), at2.distancePointLine(n3, t5, e4), at2.distancePointLine(i3, t5, e4)) : 0;
102249
+ return r4 ? R.min(at2.distancePointLine(t5, n3, i3), at2.distancePointLine(e4, n3, i3), at2.distancePointLine(n3, t5, e4), at2.distancePointLine(i3, t5, e4)) : 0;
102090
102250
  }, at2.isPointInRing = function(t5, e4) {
102091
102251
  return at2.locatePointInRing(t5, e4) !== w2.EXTERIOR;
102092
102252
  }, at2.computeLength = function(t5) {
@@ -102676,8 +102836,8 @@ var jsts_min = { exports: {} };
102676
102836
  (null === e4 || e4.compareTo(t5[n3]) > 0) && (e4 = t5[n3]);
102677
102837
  return e4;
102678
102838
  }, Lt.extract = function(t5, e4, n3) {
102679
- e4 = R2.clamp(e4, 0, t5.length);
102680
- var i3 = (n3 = R2.clamp(n3, -1, t5.length)) - e4 + 1;
102839
+ e4 = R.clamp(e4, 0, t5.length);
102840
+ var i3 = (n3 = R.clamp(n3, -1, t5.length)) - e4 + 1;
102681
102841
  n3 < 0 && (i3 = 0), e4 >= t5.length && (i3 = 0), n3 < e4 && (i3 = 0);
102682
102842
  var r4 = new Array(i3).fill(null);
102683
102843
  if (0 === i3)
@@ -108422,7 +108582,7 @@ var jsts_min = { exports: {} };
108422
108582
  return f3.getResultGeometry(c3);
108423
108583
  }
108424
108584
  }, di.precisionScaleFactor = function(t5, e4, n3) {
108425
- var i3 = t5.getEnvelopeInternal(), r4 = R2.max(Math.abs(i3.getMaxX()), Math.abs(i3.getMaxY()), Math.abs(i3.getMinX()), Math.abs(i3.getMinY())) + 2 * (e4 > 0 ? e4 : 0), o3 = n3 - Math.trunc(Math.log(r4) / Math.log(10) + 1);
108585
+ var i3 = t5.getEnvelopeInternal(), r4 = R.max(Math.abs(i3.getMaxX()), Math.abs(i3.getMaxY()), Math.abs(i3.getMinX()), Math.abs(i3.getMinY())) + 2 * (e4 > 0 ? e4 : 0), o3 = n3 - Math.trunc(Math.log(r4) / Math.log(10) + 1);
108426
108586
  return Math.pow(10, o3);
108427
108587
  }, yi.CAP_ROUND.get = function() {
108428
108588
  return Cn.CAP_ROUND;
@@ -110940,7 +111100,7 @@ function cartesianNormalizeInPlace$1(d) {
110940
111100
  var l2 = sqrt$5(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
110941
111101
  d[0] /= l2, d[1] /= l2, d[2] /= l2;
110942
111102
  }
110943
- var lambda0$3, phi0$1, lambda1$1, phi1$1, lambda2$1, lambda00$4, phi00$4, p0$1, deltaSum$1 = adder(), ranges$1, range$7;
111103
+ var lambda0$3, phi0$1, lambda1$1, phi1$1, lambda2$1, lambda00$4, phi00$4, p0$1, deltaSum$1 = adder(), ranges$1, range$8;
110944
111104
  var boundsStream$4 = {
110945
111105
  point: boundsPoint$3,
110946
111106
  lineStart: boundsLineStart$1,
@@ -110963,11 +111123,11 @@ var boundsStream$4 = {
110963
111123
  phi1$1 = 90;
110964
111124
  else if (deltaSum$1 < -epsilon$8)
110965
111125
  phi0$1 = -90;
110966
- range$7[0] = lambda0$3, range$7[1] = lambda1$1;
111126
+ range$8[0] = lambda0$3, range$8[1] = lambda1$1;
110967
111127
  }
110968
111128
  };
110969
111129
  function boundsPoint$3(lambda, phi2) {
110970
- ranges$1.push(range$7 = [lambda0$3 = lambda, lambda1$1 = lambda]);
111130
+ ranges$1.push(range$8 = [lambda0$3 = lambda, lambda1$1 = lambda]);
110971
111131
  if (phi2 < phi0$1)
110972
111132
  phi0$1 = phi2;
110973
111133
  if (phi2 > phi1$1)
@@ -111019,7 +111179,7 @@ function linePoint$1(lambda, phi2) {
111019
111179
  }
111020
111180
  }
111021
111181
  } else {
111022
- ranges$1.push(range$7 = [lambda0$3 = lambda, lambda1$1 = lambda]);
111182
+ ranges$1.push(range$8 = [lambda0$3 = lambda, lambda1$1 = lambda]);
111023
111183
  }
111024
111184
  if (phi2 < phi0$1)
111025
111185
  phi0$1 = phi2;
@@ -111031,7 +111191,7 @@ function boundsLineStart$1() {
111031
111191
  boundsStream$4.point = linePoint$1;
111032
111192
  }
111033
111193
  function boundsLineEnd$1() {
111034
- range$7[0] = lambda0$3, range$7[1] = lambda1$1;
111194
+ range$8[0] = lambda0$3, range$8[1] = lambda1$1;
111035
111195
  boundsStream$4.point = boundsPoint$3;
111036
111196
  p0$1 = null;
111037
111197
  }
@@ -111053,7 +111213,7 @@ function boundsRingEnd$1() {
111053
111213
  areaStream$3.lineEnd();
111054
111214
  if (abs$3(deltaSum$1) > epsilon$8)
111055
111215
  lambda0$3 = -(lambda1$1 = 180);
111056
- range$7[0] = lambda0$3, range$7[1] = lambda1$1;
111216
+ range$8[0] = lambda0$3, range$8[1] = lambda1$1;
111057
111217
  p0$1 = null;
111058
111218
  }
111059
111219
  function angle$1(lambda02, lambda12) {
@@ -111089,7 +111249,7 @@ function bounds$1(feature2) {
111089
111249
  deltaMax = delta, lambda0$3 = b2[0], lambda1$1 = a2[1];
111090
111250
  }
111091
111251
  }
111092
- ranges$1 = range$7 = null;
111252
+ ranges$1 = range$8 = null;
111093
111253
  return lambda0$3 === Infinity || phi0$1 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0$3, phi0$1], [lambda1$1, phi1$1]];
111094
111254
  }
111095
111255
  var W0$1, W1$1, X0$3, Y0$3, Z0$3, X1$3, Y1$3, Z1$3, X2$4, Y2$4, Z2$3, lambda00$3, phi00$3, x0$9, y0$9, z0$1;
@@ -111514,7 +111674,7 @@ function ascendingComparator$1(f2) {
111514
111674
  };
111515
111675
  }
111516
111676
  bisector$3(ascending$6);
111517
- function range$6(start, stop3, step) {
111677
+ function range$7(start, stop3, step) {
111518
111678
  start = +start, stop3 = +stop3, step = (n2 = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n2 < 3 ? 1 : +step;
111519
111679
  var i2 = -1, n2 = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n2);
111520
111680
  while (++i2 < n2) {
@@ -111665,7 +111825,7 @@ function clipExtent(x02, y02, x12, y12) {
111665
111825
  return clipStream;
111666
111826
  };
111667
111827
  }
111668
- function extent$2() {
111828
+ function extent$1() {
111669
111829
  var x02 = 0, y02 = 0, x12 = 960, y12 = 500, cache2, cacheStream, clip2;
111670
111830
  return clip2 = {
111671
111831
  stream: function(stream2) {
@@ -111817,7 +111977,7 @@ function contains$2(object2, point2) {
111817
111977
  return (object2 && containsObjectType.hasOwnProperty(object2.type) ? containsObjectType[object2.type] : containsGeometry)(object2, point2);
111818
111978
  }
111819
111979
  function graticuleX$1(y02, y12, dy) {
111820
- var y2 = range$6(y02, y12 - epsilon$8, dy).concat(y12);
111980
+ var y2 = range$7(y02, y12 - epsilon$8, dy).concat(y12);
111821
111981
  return function(x2) {
111822
111982
  return y2.map(function(y22) {
111823
111983
  return [x2, y22];
@@ -111825,7 +111985,7 @@ function graticuleX$1(y02, y12, dy) {
111825
111985
  };
111826
111986
  }
111827
111987
  function graticuleY$1(x02, x12, dx) {
111828
- var x2 = range$6(x02, x12 - epsilon$8, dx).concat(x12);
111988
+ var x2 = range$7(x02, x12 - epsilon$8, dx).concat(x12);
111829
111989
  return function(y2) {
111830
111990
  return x2.map(function(x22) {
111831
111991
  return [x22, y2];
@@ -111838,9 +111998,9 @@ function graticule$1() {
111838
111998
  return { type: "MultiLineString", coordinates: lines() };
111839
111999
  }
111840
112000
  function lines() {
111841
- return range$6(ceil$1(X02 / DX) * DX, X12, DX).map(X3).concat(range$6(ceil$1(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$6(ceil$1(x02 / dx) * dx, x12, dx).filter(function(x22) {
112001
+ return range$7(ceil$1(X02 / DX) * DX, X12, DX).map(X3).concat(range$7(ceil$1(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$7(ceil$1(x02 / dx) * dx, x12, dx).filter(function(x22) {
111842
112002
  return abs$3(x22 % DX) > epsilon$8;
111843
- }).map(x2)).concat(range$6(ceil$1(y02 / dy) * dy, y12, dy).filter(function(y22) {
112003
+ }).map(x2)).concat(range$7(ceil$1(y02 / dy) * dy, y12, dy).filter(function(y22) {
111844
112004
  return abs$3(y22 % DY) > epsilon$8;
111845
112005
  }).map(y2));
111846
112006
  }
@@ -113072,7 +113232,7 @@ const d3Geo$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
113072
113232
  geoBounds: bounds$1,
113073
113233
  geoCentroid: centroid$3,
113074
113234
  geoCircle: circle$5,
113075
- geoClipExtent: extent$2,
113235
+ geoClipExtent: extent$1,
113076
113236
  geoConicConformal: conicConformal,
113077
113237
  geoConicConformalRaw: conicConformalRaw$1,
113078
113238
  geoConicEqualArea: conicEqualArea,
@@ -115813,372 +115973,216 @@ var layerMouseEvent = {};
115813
115973
  exports2["default"] = LayerMouseEvent;
115814
115974
  })(layerMouseEvent);
115815
115975
  var nebulaLayer = {};
115816
- var events$3 = { exports: {} };
115817
- var R = typeof Reflect === "object" ? Reflect : null;
115818
- var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target2, receiver, args) {
115819
- return Function.prototype.apply.call(target2, receiver, args);
115820
- };
115821
- var ReflectOwnKeys;
115822
- if (R && typeof R.ownKeys === "function") {
115823
- ReflectOwnKeys = R.ownKeys;
115824
- } else if (Object.getOwnPropertySymbols) {
115825
- ReflectOwnKeys = function ReflectOwnKeys2(target2) {
115826
- return Object.getOwnPropertyNames(target2).concat(Object.getOwnPropertySymbols(target2));
115827
- };
115828
- } else {
115829
- ReflectOwnKeys = function ReflectOwnKeys2(target2) {
115830
- return Object.getOwnPropertyNames(target2);
115831
- };
115832
- }
115833
- function ProcessEmitWarning(warning2) {
115834
- if (console && console.warn)
115835
- console.warn(warning2);
115836
- }
115837
- var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value2) {
115838
- return value2 !== value2;
115839
- };
115840
115976
  function EventEmitter() {
115841
- EventEmitter.init.call(this);
115977
+ this._events = this._events || {};
115978
+ this._maxListeners = this._maxListeners || void 0;
115842
115979
  }
115843
- events$3.exports = EventEmitter;
115844
- events$3.exports.once = once2;
115980
+ var events$3 = EventEmitter;
115845
115981
  EventEmitter.EventEmitter = EventEmitter;
115846
115982
  EventEmitter.prototype._events = void 0;
115847
- EventEmitter.prototype._eventsCount = 0;
115848
115983
  EventEmitter.prototype._maxListeners = void 0;
115849
- var defaultMaxListeners = 10;
115850
- function checkListener(listener2) {
115851
- if (typeof listener2 !== "function") {
115852
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener2);
115853
- }
115854
- }
115855
- Object.defineProperty(EventEmitter, "defaultMaxListeners", {
115856
- enumerable: true,
115857
- get: function() {
115858
- return defaultMaxListeners;
115859
- },
115860
- set: function(arg) {
115861
- if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
115862
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
115863
- }
115864
- defaultMaxListeners = arg;
115865
- }
115866
- });
115867
- EventEmitter.init = function() {
115868
- if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
115869
- this._events = /* @__PURE__ */ Object.create(null);
115870
- this._eventsCount = 0;
115871
- }
115872
- this._maxListeners = this._maxListeners || void 0;
115873
- };
115874
- EventEmitter.prototype.setMaxListeners = function setMaxListeners(n2) {
115875
- if (typeof n2 !== "number" || n2 < 0 || NumberIsNaN(n2)) {
115876
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n2 + ".");
115877
- }
115984
+ EventEmitter.defaultMaxListeners = 10;
115985
+ EventEmitter.prototype.setMaxListeners = function(n2) {
115986
+ if (!isNumber$2(n2) || n2 < 0 || isNaN(n2))
115987
+ throw TypeError("n must be a positive number");
115878
115988
  this._maxListeners = n2;
115879
115989
  return this;
115880
115990
  };
115881
- function _getMaxListeners(that) {
115882
- if (that._maxListeners === void 0)
115883
- return EventEmitter.defaultMaxListeners;
115884
- return that._maxListeners;
115885
- }
115886
- EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
115887
- return _getMaxListeners(this);
115888
- };
115889
- EventEmitter.prototype.emit = function emit(type2) {
115890
- var args = [];
115891
- for (var i2 = 1; i2 < arguments.length; i2++)
115892
- args.push(arguments[i2]);
115893
- var doError = type2 === "error";
115894
- var events2 = this._events;
115895
- if (events2 !== void 0)
115896
- doError = doError && events2.error === void 0;
115897
- else if (!doError)
115898
- return false;
115899
- if (doError) {
115900
- var er;
115901
- if (args.length > 0)
115902
- er = args[0];
115903
- if (er instanceof Error) {
115904
- throw er;
115905
- }
115906
- var err2 = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
115907
- err2.context = er;
115908
- throw err2;
115909
- }
115910
- var handler = events2[type2];
115911
- if (handler === void 0)
115991
+ EventEmitter.prototype.emit = function(type2) {
115992
+ var er, handler, len2, args, i2, listeners;
115993
+ if (!this._events)
115994
+ this._events = {};
115995
+ if (type2 === "error") {
115996
+ if (!this._events.error || isObject$2(this._events.error) && !this._events.error.length) {
115997
+ er = arguments[1];
115998
+ if (er instanceof Error) {
115999
+ throw er;
116000
+ } else {
116001
+ var err2 = new Error('Uncaught, unspecified "error" event. (' + er + ")");
116002
+ err2.context = er;
116003
+ throw err2;
116004
+ }
116005
+ }
116006
+ }
116007
+ handler = this._events[type2];
116008
+ if (isUndefined(handler))
115912
116009
  return false;
115913
- if (typeof handler === "function") {
115914
- ReflectApply(handler, this, args);
115915
- } else {
115916
- var len2 = handler.length;
115917
- var listeners2 = arrayClone(handler, len2);
115918
- for (var i2 = 0; i2 < len2; ++i2)
115919
- ReflectApply(listeners2[i2], this, args);
116010
+ if (isFunction$2(handler)) {
116011
+ switch (arguments.length) {
116012
+ case 1:
116013
+ handler.call(this);
116014
+ break;
116015
+ case 2:
116016
+ handler.call(this, arguments[1]);
116017
+ break;
116018
+ case 3:
116019
+ handler.call(this, arguments[1], arguments[2]);
116020
+ break;
116021
+ default:
116022
+ args = Array.prototype.slice.call(arguments, 1);
116023
+ handler.apply(this, args);
116024
+ }
116025
+ } else if (isObject$2(handler)) {
116026
+ args = Array.prototype.slice.call(arguments, 1);
116027
+ listeners = handler.slice();
116028
+ len2 = listeners.length;
116029
+ for (i2 = 0; i2 < len2; i2++)
116030
+ listeners[i2].apply(this, args);
115920
116031
  }
115921
116032
  return true;
115922
116033
  };
115923
- function _addListener(target2, type2, listener2, prepend) {
116034
+ EventEmitter.prototype.addListener = function(type2, listener2) {
115924
116035
  var m2;
115925
- var events2;
115926
- var existing;
115927
- checkListener(listener2);
115928
- events2 = target2._events;
115929
- if (events2 === void 0) {
115930
- events2 = target2._events = /* @__PURE__ */ Object.create(null);
115931
- target2._eventsCount = 0;
115932
- } else {
115933
- if (events2.newListener !== void 0) {
115934
- target2.emit(
115935
- "newListener",
115936
- type2,
115937
- listener2.listener ? listener2.listener : listener2
115938
- );
115939
- events2 = target2._events;
115940
- }
115941
- existing = events2[type2];
115942
- }
115943
- if (existing === void 0) {
115944
- existing = events2[type2] = listener2;
115945
- ++target2._eventsCount;
115946
- } else {
115947
- if (typeof existing === "function") {
115948
- existing = events2[type2] = prepend ? [listener2, existing] : [existing, listener2];
115949
- } else if (prepend) {
115950
- existing.unshift(listener2);
116036
+ if (!isFunction$2(listener2))
116037
+ throw TypeError("listener must be a function");
116038
+ if (!this._events)
116039
+ this._events = {};
116040
+ if (this._events.newListener)
116041
+ this.emit(
116042
+ "newListener",
116043
+ type2,
116044
+ isFunction$2(listener2.listener) ? listener2.listener : listener2
116045
+ );
116046
+ if (!this._events[type2])
116047
+ this._events[type2] = listener2;
116048
+ else if (isObject$2(this._events[type2]))
116049
+ this._events[type2].push(listener2);
116050
+ else
116051
+ this._events[type2] = [this._events[type2], listener2];
116052
+ if (isObject$2(this._events[type2]) && !this._events[type2].warned) {
116053
+ if (!isUndefined(this._maxListeners)) {
116054
+ m2 = this._maxListeners;
115951
116055
  } else {
115952
- existing.push(listener2);
116056
+ m2 = EventEmitter.defaultMaxListeners;
115953
116057
  }
115954
- m2 = _getMaxListeners(target2);
115955
- if (m2 > 0 && existing.length > m2 && !existing.warned) {
115956
- existing.warned = true;
115957
- var w2 = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type2) + " listeners added. Use emitter.setMaxListeners() to increase limit");
115958
- w2.name = "MaxListenersExceededWarning";
115959
- w2.emitter = target2;
115960
- w2.type = type2;
115961
- w2.count = existing.length;
115962
- ProcessEmitWarning(w2);
116058
+ if (m2 && m2 > 0 && this._events[type2].length > m2) {
116059
+ this._events[type2].warned = true;
116060
+ console.error(
116061
+ "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
116062
+ this._events[type2].length
116063
+ );
116064
+ if (typeof console.trace === "function") {
116065
+ console.trace();
116066
+ }
115963
116067
  }
115964
116068
  }
115965
- return target2;
115966
- }
115967
- EventEmitter.prototype.addListener = function addListener(type2, listener2) {
115968
- return _addListener(this, type2, listener2, false);
115969
- };
115970
- EventEmitter.prototype.on = EventEmitter.prototype.addListener;
115971
- EventEmitter.prototype.prependListener = function prependListener(type2, listener2) {
115972
- return _addListener(this, type2, listener2, true);
115973
- };
115974
- function onceWrapper() {
115975
- if (!this.fired) {
115976
- this.target.removeListener(this.type, this.wrapFn);
115977
- this.fired = true;
115978
- if (arguments.length === 0)
115979
- return this.listener.call(this.target);
115980
- return this.listener.apply(this.target, arguments);
115981
- }
115982
- }
115983
- function _onceWrap(target2, type2, listener2) {
115984
- var state = { fired: false, wrapFn: void 0, target: target2, type: type2, listener: listener2 };
115985
- var wrapped = onceWrapper.bind(state);
115986
- wrapped.listener = listener2;
115987
- state.wrapFn = wrapped;
115988
- return wrapped;
115989
- }
115990
- EventEmitter.prototype.once = function once(type2, listener2) {
115991
- checkListener(listener2);
115992
- this.on(type2, _onceWrap(this, type2, listener2));
115993
116069
  return this;
115994
116070
  };
115995
- EventEmitter.prototype.prependOnceListener = function prependOnceListener(type2, listener2) {
115996
- checkListener(listener2);
115997
- this.prependListener(type2, _onceWrap(this, type2, listener2));
116071
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
116072
+ EventEmitter.prototype.once = function(type2, listener2) {
116073
+ if (!isFunction$2(listener2))
116074
+ throw TypeError("listener must be a function");
116075
+ var fired = false;
116076
+ function g2() {
116077
+ this.removeListener(type2, g2);
116078
+ if (!fired) {
116079
+ fired = true;
116080
+ listener2.apply(this, arguments);
116081
+ }
116082
+ }
116083
+ g2.listener = listener2;
116084
+ this.on(type2, g2);
115998
116085
  return this;
115999
116086
  };
116000
- EventEmitter.prototype.removeListener = function removeListener(type2, listener2) {
116001
- var list, events2, position2, i2, originalListener;
116002
- checkListener(listener2);
116003
- events2 = this._events;
116004
- if (events2 === void 0)
116087
+ EventEmitter.prototype.removeListener = function(type2, listener2) {
116088
+ var list, position2, length2, i2;
116089
+ if (!isFunction$2(listener2))
116090
+ throw TypeError("listener must be a function");
116091
+ if (!this._events || !this._events[type2])
116005
116092
  return this;
116006
- list = events2[type2];
116007
- if (list === void 0)
116008
- return this;
116009
- if (list === listener2 || list.listener === listener2) {
116010
- if (--this._eventsCount === 0)
116011
- this._events = /* @__PURE__ */ Object.create(null);
116012
- else {
116013
- delete events2[type2];
116014
- if (events2.removeListener)
116015
- this.emit("removeListener", type2, list.listener || listener2);
116016
- }
116017
- } else if (typeof list !== "function") {
116018
- position2 = -1;
116019
- for (i2 = list.length - 1; i2 >= 0; i2--) {
116020
- if (list[i2] === listener2 || list[i2].listener === listener2) {
116021
- originalListener = list[i2].listener;
116093
+ list = this._events[type2];
116094
+ length2 = list.length;
116095
+ position2 = -1;
116096
+ if (list === listener2 || isFunction$2(list.listener) && list.listener === listener2) {
116097
+ delete this._events[type2];
116098
+ if (this._events.removeListener)
116099
+ this.emit("removeListener", type2, listener2);
116100
+ } else if (isObject$2(list)) {
116101
+ for (i2 = length2; i2-- > 0; ) {
116102
+ if (list[i2] === listener2 || list[i2].listener && list[i2].listener === listener2) {
116022
116103
  position2 = i2;
116023
116104
  break;
116024
116105
  }
116025
116106
  }
116026
116107
  if (position2 < 0)
116027
116108
  return this;
116028
- if (position2 === 0)
116029
- list.shift();
116030
- else {
116031
- spliceOne(list, position2);
116109
+ if (list.length === 1) {
116110
+ list.length = 0;
116111
+ delete this._events[type2];
116112
+ } else {
116113
+ list.splice(position2, 1);
116032
116114
  }
116033
- if (list.length === 1)
116034
- events2[type2] = list[0];
116035
- if (events2.removeListener !== void 0)
116036
- this.emit("removeListener", type2, originalListener || listener2);
116115
+ if (this._events.removeListener)
116116
+ this.emit("removeListener", type2, listener2);
116037
116117
  }
116038
116118
  return this;
116039
116119
  };
116040
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
116041
- EventEmitter.prototype.removeAllListeners = function removeAllListeners(type2) {
116042
- var listeners2, events2, i2;
116043
- events2 = this._events;
116044
- if (events2 === void 0)
116120
+ EventEmitter.prototype.removeAllListeners = function(type2) {
116121
+ var key2, listeners;
116122
+ if (!this._events)
116045
116123
  return this;
116046
- if (events2.removeListener === void 0) {
116047
- if (arguments.length === 0) {
116048
- this._events = /* @__PURE__ */ Object.create(null);
116049
- this._eventsCount = 0;
116050
- } else if (events2[type2] !== void 0) {
116051
- if (--this._eventsCount === 0)
116052
- this._events = /* @__PURE__ */ Object.create(null);
116053
- else
116054
- delete events2[type2];
116055
- }
116124
+ if (!this._events.removeListener) {
116125
+ if (arguments.length === 0)
116126
+ this._events = {};
116127
+ else if (this._events[type2])
116128
+ delete this._events[type2];
116056
116129
  return this;
116057
116130
  }
116058
116131
  if (arguments.length === 0) {
116059
- var keys3 = Object.keys(events2);
116060
- var key2;
116061
- for (i2 = 0; i2 < keys3.length; ++i2) {
116062
- key2 = keys3[i2];
116132
+ for (key2 in this._events) {
116063
116133
  if (key2 === "removeListener")
116064
116134
  continue;
116065
116135
  this.removeAllListeners(key2);
116066
116136
  }
116067
116137
  this.removeAllListeners("removeListener");
116068
- this._events = /* @__PURE__ */ Object.create(null);
116069
- this._eventsCount = 0;
116138
+ this._events = {};
116070
116139
  return this;
116071
116140
  }
116072
- listeners2 = events2[type2];
116073
- if (typeof listeners2 === "function") {
116074
- this.removeListener(type2, listeners2);
116075
- } else if (listeners2 !== void 0) {
116076
- for (i2 = listeners2.length - 1; i2 >= 0; i2--) {
116077
- this.removeListener(type2, listeners2[i2]);
116078
- }
116141
+ listeners = this._events[type2];
116142
+ if (isFunction$2(listeners)) {
116143
+ this.removeListener(type2, listeners);
116144
+ } else if (listeners) {
116145
+ while (listeners.length)
116146
+ this.removeListener(type2, listeners[listeners.length - 1]);
116079
116147
  }
116148
+ delete this._events[type2];
116080
116149
  return this;
116081
116150
  };
116082
- function _listeners(target2, type2, unwrap) {
116083
- var events2 = target2._events;
116084
- if (events2 === void 0)
116085
- return [];
116086
- var evlistener = events2[type2];
116087
- if (evlistener === void 0)
116088
- return [];
116089
- if (typeof evlistener === "function")
116090
- return unwrap ? [evlistener.listener || evlistener] : [evlistener];
116091
- return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
116092
- }
116093
- EventEmitter.prototype.listeners = function listeners(type2) {
116094
- return _listeners(this, type2, true);
116095
- };
116096
- EventEmitter.prototype.rawListeners = function rawListeners(type2) {
116097
- return _listeners(this, type2, false);
116098
- };
116099
- EventEmitter.listenerCount = function(emitter, type2) {
116100
- if (typeof emitter.listenerCount === "function") {
116101
- return emitter.listenerCount(type2);
116102
- } else {
116103
- return listenerCount.call(emitter, type2);
116104
- }
116151
+ EventEmitter.prototype.listeners = function(type2) {
116152
+ var ret;
116153
+ if (!this._events || !this._events[type2])
116154
+ ret = [];
116155
+ else if (isFunction$2(this._events[type2]))
116156
+ ret = [this._events[type2]];
116157
+ else
116158
+ ret = this._events[type2].slice();
116159
+ return ret;
116105
116160
  };
116106
- EventEmitter.prototype.listenerCount = listenerCount;
116107
- function listenerCount(type2) {
116108
- var events2 = this._events;
116109
- if (events2 !== void 0) {
116110
- var evlistener = events2[type2];
116111
- if (typeof evlistener === "function") {
116161
+ EventEmitter.prototype.listenerCount = function(type2) {
116162
+ if (this._events) {
116163
+ var evlistener = this._events[type2];
116164
+ if (isFunction$2(evlistener))
116112
116165
  return 1;
116113
- } else if (evlistener !== void 0) {
116166
+ else if (evlistener)
116114
116167
  return evlistener.length;
116115
- }
116116
116168
  }
116117
116169
  return 0;
116118
- }
116119
- EventEmitter.prototype.eventNames = function eventNames() {
116120
- return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
116121
116170
  };
116122
- function arrayClone(arr, n2) {
116123
- var copy2 = new Array(n2);
116124
- for (var i2 = 0; i2 < n2; ++i2)
116125
- copy2[i2] = arr[i2];
116126
- return copy2;
116127
- }
116128
- function spliceOne(list, index2) {
116129
- for (; index2 + 1 < list.length; index2++)
116130
- list[index2] = list[index2 + 1];
116131
- list.pop();
116132
- }
116133
- function unwrapListeners(arr) {
116134
- var ret = new Array(arr.length);
116135
- for (var i2 = 0; i2 < ret.length; ++i2) {
116136
- ret[i2] = arr[i2].listener || arr[i2];
116137
- }
116138
- return ret;
116171
+ EventEmitter.listenerCount = function(emitter, type2) {
116172
+ return emitter.listenerCount(type2);
116173
+ };
116174
+ function isFunction$2(arg) {
116175
+ return typeof arg === "function";
116139
116176
  }
116140
- function once2(emitter, name2) {
116141
- return new Promise(function(resolve2, reject) {
116142
- function errorListener(err2) {
116143
- emitter.removeListener(name2, resolver);
116144
- reject(err2);
116145
- }
116146
- function resolver() {
116147
- if (typeof emitter.removeListener === "function") {
116148
- emitter.removeListener("error", errorListener);
116149
- }
116150
- resolve2([].slice.call(arguments));
116151
- }
116152
- eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
116153
- if (name2 !== "error") {
116154
- addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
116155
- }
116156
- });
116177
+ function isNumber$2(arg) {
116178
+ return typeof arg === "number";
116157
116179
  }
116158
- function addErrorHandlerIfEventEmitter(emitter, handler, flags3) {
116159
- if (typeof emitter.on === "function") {
116160
- eventTargetAgnosticAddListener(emitter, "error", handler, flags3);
116161
- }
116180
+ function isObject$2(arg) {
116181
+ return typeof arg === "object" && arg !== null;
116162
116182
  }
116163
- function eventTargetAgnosticAddListener(emitter, name2, listener2, flags3) {
116164
- if (typeof emitter.on === "function") {
116165
- if (flags3.once) {
116166
- emitter.once(name2, listener2);
116167
- } else {
116168
- emitter.on(name2, listener2);
116169
- }
116170
- } else if (typeof emitter.addEventListener === "function") {
116171
- emitter.addEventListener(name2, function wrapListener(arg) {
116172
- if (flags3.once) {
116173
- emitter.removeEventListener(name2, wrapListener);
116174
- }
116175
- listener2(arg);
116176
- });
116177
- } else {
116178
- throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
116179
- }
116183
+ function isUndefined(arg) {
116184
+ return arg === void 0;
116180
116185
  }
116181
- var eventsExports = events$3.exports;
116182
116186
  var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
116183
116187
  var rnds8 = new Uint8Array(16);
116184
116188
  function rng() {
@@ -116544,7 +116548,7 @@ const require$$1$3 = /* @__PURE__ */ getAugmentedNamespace(esmBrowser);
116544
116548
  value: true
116545
116549
  });
116546
116550
  exports2["default"] = void 0;
116547
- var _events = _interopRequireDefault2(eventsExports);
116551
+ var _events = _interopRequireDefault2(events$3);
116548
116552
  var _uuid = _interopRequireDefault2(require$$1$3);
116549
116553
  function _interopRequireDefault2(obj) {
116550
116554
  return obj && obj.__esModule ? obj : { "default": obj };
@@ -117028,7 +117032,7 @@ function rhumbDistance$2(from, to, options) {
117028
117032
  }
117029
117033
  function calculateRhumbDistance(origin, destination2, radius2) {
117030
117034
  radius2 = radius2 === void 0 ? helpers_1$9.earthRadius : Number(radius2);
117031
- var R2 = radius2;
117035
+ var R = radius2;
117032
117036
  var phi12 = origin[1] * Math.PI / 180;
117033
117037
  var phi2 = destination2[1] * Math.PI / 180;
117034
117038
  var DeltaPhi = phi2 - phi12;
@@ -117039,7 +117043,7 @@ function calculateRhumbDistance(origin, destination2, radius2) {
117039
117043
  var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi12 / 2 + Math.PI / 4));
117040
117044
  var q = Math.abs(DeltaPsi) > 1e-11 ? DeltaPhi / DeltaPsi : Math.cos(phi12);
117041
117045
  var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda);
117042
- var dist2 = delta * R2;
117046
+ var dist2 = delta * R;
117043
117047
  return dist2;
117044
117048
  }
117045
117049
  js$e.default = rhumbDistance$2;
@@ -131586,7 +131590,7 @@ var document_1 = doccy;
131586
131590
  value: true
131587
131591
  });
131588
131592
  exports2["default"] = void 0;
131589
- var _events = eventsExports;
131593
+ var _events = events$3;
131590
131594
  var _document = _interopRequireDefault2(document_1);
131591
131595
  var _core = require$$2$2;
131592
131596
  var _deckDrawer = _interopRequireDefault2(deckDrawer);
@@ -133507,16 +133511,16 @@ function addDecoder(cases2, importFn) {
133507
133511
  }
133508
133512
  cases2.forEach((c2) => registry$1.set(c2, importFn));
133509
133513
  }
133510
- addDecoder([void 0, 1], () => import("./raw-01dff90e.js").then((m2) => m2.default));
133511
- addDecoder(5, () => import("./lzw-e60fb582.js").then((m2) => m2.default));
133514
+ addDecoder([void 0, 1], () => import("./raw-f7587aff.js").then((m2) => m2.default));
133515
+ addDecoder(5, () => import("./lzw-9572eac3.js").then((m2) => m2.default));
133512
133516
  addDecoder(6, () => {
133513
133517
  throw new Error("old style JPEG compression is not supported.");
133514
133518
  });
133515
- addDecoder(7, () => import("./jpeg-1b2c1d25.js").then((m2) => m2.default));
133516
- addDecoder([8, 32946], () => import("./deflate-287e693d.js").then((m2) => m2.default));
133517
- addDecoder(32773, () => import("./packbits-a8bfe098.js").then((m2) => m2.default));
133518
- addDecoder(34887, () => import("./lerc-4f010cd7.js").then((m2) => m2.default));
133519
- addDecoder(50001, () => import("./webimage-6b926ce3.js").then((m2) => m2.default));
133519
+ addDecoder(7, () => import("./jpeg-a83077be.js").then((m2) => m2.default));
133520
+ addDecoder([8, 32946], () => import("./deflate-19841f78.js").then((m2) => m2.default));
133521
+ addDecoder(32773, () => import("./packbits-cce11fbc.js").then((m2) => m2.default));
133522
+ addDecoder(34887, () => import("./lerc-1edd075a.js").then((m2) => m2.default));
133523
+ addDecoder(50001, () => import("./webimage-8d38cd8b.js").then((m2) => m2.default));
133520
133524
  function decodeRowAcc(row, stride) {
133521
133525
  let length2 = row.length - stride;
133522
133526
  let offset5 = 0;
@@ -133706,16 +133710,16 @@ createCommonjsModule(function(module2) {
133706
133710
  if (!new Events2().__proto__)
133707
133711
  prefix2 = false;
133708
133712
  }
133709
- function EE(fn, context2, once3) {
133713
+ function EE(fn, context2, once) {
133710
133714
  this.fn = fn;
133711
133715
  this.context = context2;
133712
- this.once = once3 || false;
133716
+ this.once = once || false;
133713
133717
  }
133714
- function addListener2(emitter, event2, fn, context2, once3) {
133718
+ function addListener(emitter, event2, fn, context2, once) {
133715
133719
  if (typeof fn !== "function") {
133716
133720
  throw new TypeError("The listener must be a function");
133717
133721
  }
133718
- var listener2 = new EE(fn, context2 || emitter, once3), evt = prefix2 ? prefix2 + event2 : event2;
133722
+ var listener2 = new EE(fn, context2 || emitter, once), evt = prefix2 ? prefix2 + event2 : event2;
133719
133723
  if (!emitter._events[evt])
133720
133724
  emitter._events[evt] = listener2, emitter._eventsCount++;
133721
133725
  else if (!emitter._events[evt].fn)
@@ -133734,7 +133738,7 @@ createCommonjsModule(function(module2) {
133734
133738
  this._events = new Events2();
133735
133739
  this._eventsCount = 0;
133736
133740
  }
133737
- EventEmitter2.prototype.eventNames = function eventNames2() {
133741
+ EventEmitter2.prototype.eventNames = function eventNames() {
133738
133742
  var names = [], events2, name2;
133739
133743
  if (this._eventsCount === 0)
133740
133744
  return names;
@@ -133747,7 +133751,7 @@ createCommonjsModule(function(module2) {
133747
133751
  }
133748
133752
  return names;
133749
133753
  };
133750
- EventEmitter2.prototype.listeners = function listeners2(event2) {
133754
+ EventEmitter2.prototype.listeners = function listeners(event2) {
133751
133755
  var evt = prefix2 ? prefix2 + event2 : event2, handlers = this._events[evt];
133752
133756
  if (!handlers)
133753
133757
  return [];
@@ -133758,76 +133762,76 @@ createCommonjsModule(function(module2) {
133758
133762
  }
133759
133763
  return ee;
133760
133764
  };
133761
- EventEmitter2.prototype.listenerCount = function listenerCount2(event2) {
133762
- var evt = prefix2 ? prefix2 + event2 : event2, listeners2 = this._events[evt];
133763
- if (!listeners2)
133765
+ EventEmitter2.prototype.listenerCount = function listenerCount(event2) {
133766
+ var evt = prefix2 ? prefix2 + event2 : event2, listeners = this._events[evt];
133767
+ if (!listeners)
133764
133768
  return 0;
133765
- if (listeners2.fn)
133769
+ if (listeners.fn)
133766
133770
  return 1;
133767
- return listeners2.length;
133771
+ return listeners.length;
133768
133772
  };
133769
- EventEmitter2.prototype.emit = function emit3(event2, a1, a2, a3, a4, a5) {
133773
+ EventEmitter2.prototype.emit = function emit2(event2, a1, a2, a3, a4, a5) {
133770
133774
  var evt = prefix2 ? prefix2 + event2 : event2;
133771
133775
  if (!this._events[evt])
133772
133776
  return false;
133773
- var listeners2 = this._events[evt], len2 = arguments.length, args, i2;
133774
- if (listeners2.fn) {
133775
- if (listeners2.once)
133776
- this.removeListener(event2, listeners2.fn, void 0, true);
133777
+ var listeners = this._events[evt], len2 = arguments.length, args, i2;
133778
+ if (listeners.fn) {
133779
+ if (listeners.once)
133780
+ this.removeListener(event2, listeners.fn, void 0, true);
133777
133781
  switch (len2) {
133778
133782
  case 1:
133779
- return listeners2.fn.call(listeners2.context), true;
133783
+ return listeners.fn.call(listeners.context), true;
133780
133784
  case 2:
133781
- return listeners2.fn.call(listeners2.context, a1), true;
133785
+ return listeners.fn.call(listeners.context, a1), true;
133782
133786
  case 3:
133783
- return listeners2.fn.call(listeners2.context, a1, a2), true;
133787
+ return listeners.fn.call(listeners.context, a1, a2), true;
133784
133788
  case 4:
133785
- return listeners2.fn.call(listeners2.context, a1, a2, a3), true;
133789
+ return listeners.fn.call(listeners.context, a1, a2, a3), true;
133786
133790
  case 5:
133787
- return listeners2.fn.call(listeners2.context, a1, a2, a3, a4), true;
133791
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
133788
133792
  case 6:
133789
- return listeners2.fn.call(listeners2.context, a1, a2, a3, a4, a5), true;
133793
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
133790
133794
  }
133791
133795
  for (i2 = 1, args = new Array(len2 - 1); i2 < len2; i2++) {
133792
133796
  args[i2 - 1] = arguments[i2];
133793
133797
  }
133794
- listeners2.fn.apply(listeners2.context, args);
133798
+ listeners.fn.apply(listeners.context, args);
133795
133799
  } else {
133796
- var length2 = listeners2.length, j;
133800
+ var length2 = listeners.length, j;
133797
133801
  for (i2 = 0; i2 < length2; i2++) {
133798
- if (listeners2[i2].once)
133799
- this.removeListener(event2, listeners2[i2].fn, void 0, true);
133802
+ if (listeners[i2].once)
133803
+ this.removeListener(event2, listeners[i2].fn, void 0, true);
133800
133804
  switch (len2) {
133801
133805
  case 1:
133802
- listeners2[i2].fn.call(listeners2[i2].context);
133806
+ listeners[i2].fn.call(listeners[i2].context);
133803
133807
  break;
133804
133808
  case 2:
133805
- listeners2[i2].fn.call(listeners2[i2].context, a1);
133809
+ listeners[i2].fn.call(listeners[i2].context, a1);
133806
133810
  break;
133807
133811
  case 3:
133808
- listeners2[i2].fn.call(listeners2[i2].context, a1, a2);
133812
+ listeners[i2].fn.call(listeners[i2].context, a1, a2);
133809
133813
  break;
133810
133814
  case 4:
133811
- listeners2[i2].fn.call(listeners2[i2].context, a1, a2, a3);
133815
+ listeners[i2].fn.call(listeners[i2].context, a1, a2, a3);
133812
133816
  break;
133813
133817
  default:
133814
133818
  if (!args)
133815
133819
  for (j = 1, args = new Array(len2 - 1); j < len2; j++) {
133816
133820
  args[j - 1] = arguments[j];
133817
133821
  }
133818
- listeners2[i2].fn.apply(listeners2[i2].context, args);
133822
+ listeners[i2].fn.apply(listeners[i2].context, args);
133819
133823
  }
133820
133824
  }
133821
133825
  }
133822
133826
  return true;
133823
133827
  };
133824
133828
  EventEmitter2.prototype.on = function on2(event2, fn, context2) {
133825
- return addListener2(this, event2, fn, context2, false);
133829
+ return addListener(this, event2, fn, context2, false);
133826
133830
  };
133827
- EventEmitter2.prototype.once = function once3(event2, fn, context2) {
133828
- return addListener2(this, event2, fn, context2, true);
133831
+ EventEmitter2.prototype.once = function once(event2, fn, context2) {
133832
+ return addListener(this, event2, fn, context2, true);
133829
133833
  };
133830
- EventEmitter2.prototype.removeListener = function removeListener2(event2, fn, context2, once3) {
133834
+ EventEmitter2.prototype.removeListener = function removeListener(event2, fn, context2, once) {
133831
133835
  var evt = prefix2 ? prefix2 + event2 : event2;
133832
133836
  if (!this._events[evt])
133833
133837
  return this;
@@ -133835,15 +133839,15 @@ createCommonjsModule(function(module2) {
133835
133839
  clearEvent(this, evt);
133836
133840
  return this;
133837
133841
  }
133838
- var listeners2 = this._events[evt];
133839
- if (listeners2.fn) {
133840
- if (listeners2.fn === fn && (!once3 || listeners2.once) && (!context2 || listeners2.context === context2)) {
133842
+ var listeners = this._events[evt];
133843
+ if (listeners.fn) {
133844
+ if (listeners.fn === fn && (!once || listeners.once) && (!context2 || listeners.context === context2)) {
133841
133845
  clearEvent(this, evt);
133842
133846
  }
133843
133847
  } else {
133844
- for (var i2 = 0, events2 = [], length2 = listeners2.length; i2 < length2; i2++) {
133845
- if (listeners2[i2].fn !== fn || once3 && !listeners2[i2].once || context2 && listeners2[i2].context !== context2) {
133846
- events2.push(listeners2[i2]);
133848
+ for (var i2 = 0, events2 = [], length2 = listeners.length; i2 < length2; i2++) {
133849
+ if (listeners[i2].fn !== fn || once && !listeners[i2].once || context2 && listeners[i2].context !== context2) {
133850
+ events2.push(listeners[i2]);
133847
133851
  }
133848
133852
  }
133849
133853
  if (events2.length)
@@ -133853,7 +133857,7 @@ createCommonjsModule(function(module2) {
133853
133857
  }
133854
133858
  return this;
133855
133859
  };
133856
- EventEmitter2.prototype.removeAllListeners = function removeAllListeners2(event2) {
133860
+ EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event2) {
133857
133861
  var evt;
133858
133862
  if (event2) {
133859
133863
  evt = prefix2 ? prefix2 + event2 : event2;
@@ -138336,7 +138340,7 @@ var blosc_codec = function() {
138336
138340
  b2 += Ga[z2[a2++]];
138337
138341
  return b2;
138338
138342
  }
138339
- var Q2 = {}, R2 = {}, S = {};
138343
+ var Q2 = {}, R = {}, S = {};
138340
138344
  function Ha(a2) {
138341
138345
  if (void 0 === a2)
138342
138346
  return "_unknown";
@@ -138381,8 +138385,8 @@ var blosc_codec = function() {
138381
138385
  });
138382
138386
  var e3 = Array(a2.length), g2 = [], k = 0;
138383
138387
  a2.forEach(function(h2, l2) {
138384
- R2.hasOwnProperty(h2) ? e3[l2] = R2[h2] : (g2.push(h2), Q2.hasOwnProperty(h2) || (Q2[h2] = []), Q2[h2].push(function() {
138385
- e3[l2] = R2[h2];
138388
+ R.hasOwnProperty(h2) ? e3[l2] = R[h2] : (g2.push(h2), Q2.hasOwnProperty(h2) || (Q2[h2] = []), Q2[h2].push(function() {
138389
+ e3[l2] = R[h2];
138386
138390
  ++k;
138387
138391
  k === g2.length && c2(e3);
138388
138392
  }));
@@ -138395,12 +138399,12 @@ var blosc_codec = function() {
138395
138399
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
138396
138400
  var d = b2.name;
138397
138401
  a2 || T('type "' + d + '" must have a positive integer typeid pointer');
138398
- if (R2.hasOwnProperty(a2)) {
138402
+ if (R.hasOwnProperty(a2)) {
138399
138403
  if (c2.U)
138400
138404
  return;
138401
138405
  T("Cannot register type '" + d + "' twice");
138402
138406
  }
138403
- R2[a2] = b2;
138407
+ R[a2] = b2;
138404
138408
  delete S[a2];
138405
138409
  Q2.hasOwnProperty(a2) && (b2 = Q2[a2], delete Q2[a2], b2.forEach(function(e3) {
138406
138410
  e3();
@@ -138513,7 +138517,7 @@ var blosc_codec = function() {
138513
138517
  }
138514
138518
  function eb(a2, b2) {
138515
138519
  function c2(g2) {
138516
- e3[g2] || R2[g2] || (S[g2] ? S[g2].forEach(c2) : (d.push(g2), e3[g2] = true));
138520
+ e3[g2] || R[g2] || (S[g2] ? S[g2].forEach(c2) : (d.push(g2), e3[g2] = true));
138517
138521
  }
138518
138522
  var d = [], e3 = {};
138519
138523
  b2.forEach(c2);
@@ -138801,7 +138805,7 @@ var blosc_codec = function() {
138801
138805
  }, n: Qa, x: function(a2) {
138802
138806
  4 < a2 && (V[a2].P += 1);
138803
138807
  }, C: function(a2, b2) {
138804
- var c2 = R2[a2];
138808
+ var c2 = R[a2];
138805
138809
  void 0 === c2 && T("_emval_take_value has unknown type " + cb(a2));
138806
138810
  a2 = c2.readValueFromPointer(b2);
138807
138811
  return Ra(a2);
@@ -141269,7 +141273,7 @@ const channels = {
141269
141273
  },
141270
141274
  fs: fs$2
141271
141275
  };
141272
- function range$5(len2) {
141276
+ function range$6(len2) {
141273
141277
  return [...Array(len2).keys()];
141274
141278
  }
141275
141279
  function padWithDefault$2(arr, defaultValue2, padWidth) {
@@ -142373,7 +142377,7 @@ const ScaleBarLayer = class extends CompositeLayer {
142373
142377
  sizeScale: 2 ** -zoom2,
142374
142378
  characterSet: [
142375
142379
  ...displayUnit.split(""),
142376
- ...range$5(10).map((i2) => String(i2)),
142380
+ ...range$6(10).map((i2) => String(i2)),
142377
142381
  ".",
142378
142382
  "e",
142379
142383
  "+"
@@ -143697,7 +143701,7 @@ function deviation$1(values2, valueof) {
143697
143701
  const v = variance$1(values2, valueof);
143698
143702
  return v ? Math.sqrt(v) : v;
143699
143703
  }
143700
- function extent$1(values2, valueof) {
143704
+ function d3_extent(values2, valueof) {
143701
143705
  let min2;
143702
143706
  let max2;
143703
143707
  if (valueof === void 0) {
@@ -143732,6 +143736,47 @@ function extent$1(values2, valueof) {
143732
143736
  }
143733
143737
  return [min2, max2];
143734
143738
  }
143739
+ class Adder {
143740
+ constructor() {
143741
+ this._partials = new Float64Array(32);
143742
+ this._n = 0;
143743
+ }
143744
+ add(x2) {
143745
+ const p = this._partials;
143746
+ let i2 = 0;
143747
+ for (let j = 0; j < this._n && j < 32; j++) {
143748
+ const y2 = p[j], hi = x2 + y2, lo = Math.abs(x2) < Math.abs(y2) ? x2 - (hi - y2) : y2 - (hi - x2);
143749
+ if (lo)
143750
+ p[i2++] = lo;
143751
+ x2 = hi;
143752
+ }
143753
+ p[i2] = x2;
143754
+ this._n = i2 + 1;
143755
+ return this;
143756
+ }
143757
+ valueOf() {
143758
+ const p = this._partials;
143759
+ let n2 = this._n, x2, y2, lo, hi = 0;
143760
+ if (n2 > 0) {
143761
+ hi = p[--n2];
143762
+ while (n2 > 0) {
143763
+ x2 = hi;
143764
+ y2 = p[--n2];
143765
+ hi = x2 + y2;
143766
+ lo = y2 - (hi - x2);
143767
+ if (lo)
143768
+ break;
143769
+ }
143770
+ if (n2 > 0 && (lo < 0 && p[n2 - 1] < 0 || lo > 0 && p[n2 - 1] > 0)) {
143771
+ y2 = lo * 2;
143772
+ x2 = hi + y2;
143773
+ if (y2 == x2 - hi)
143774
+ hi = x2;
143775
+ }
143776
+ }
143777
+ return hi;
143778
+ }
143779
+ }
143735
143780
  class InternMap2 extends Map {
143736
143781
  constructor(entries2, key2 = keyof) {
143737
143782
  super();
@@ -143810,14 +143855,14 @@ function constant$8(x2) {
143810
143855
  };
143811
143856
  }
143812
143857
  var e10$1 = Math.sqrt(50), e5$1 = Math.sqrt(10), e2$1 = Math.sqrt(2);
143813
- function ticks$1(start, stop3, count2) {
143858
+ function ticks(start, stop3, count2) {
143814
143859
  var reverse2, i2 = -1, n2, ticks2, step;
143815
143860
  stop3 = +stop3, start = +start, count2 = +count2;
143816
143861
  if (start === stop3 && count2 > 0)
143817
143862
  return [start];
143818
143863
  if (reverse2 = stop3 < start)
143819
143864
  n2 = start, start = stop3, stop3 = n2;
143820
- if ((step = tickIncrement$1(start, stop3, count2)) === 0 || !isFinite(step))
143865
+ if ((step = tickIncrement(start, stop3, count2)) === 0 || !isFinite(step))
143821
143866
  return [];
143822
143867
  if (step > 0) {
143823
143868
  let r0 = Math.round(start / step), r1 = Math.round(stop3 / step);
@@ -143843,7 +143888,7 @@ function ticks$1(start, stop3, count2) {
143843
143888
  ticks2.reverse();
143844
143889
  return ticks2;
143845
143890
  }
143846
- function tickIncrement$1(start, stop3, count2) {
143891
+ function tickIncrement(start, stop3, count2) {
143847
143892
  var step = (stop3 - start) / Math.max(0, count2), power = Math.floor(Math.log(step) / Math.LN10), error2 = step / Math.pow(10, power);
143848
143893
  return power >= 0 ? (error2 >= e10$1 ? 10 : error2 >= e5$1 ? 5 : error2 >= e2$1 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error2 >= e10$1 ? 10 : error2 >= e5$1 ? 5 : error2 >= e2$1 ? 2 : 1);
143849
143894
  }
@@ -143860,7 +143905,7 @@ function tickStep$1(start, stop3, count2) {
143860
143905
  function nice$3(start, stop3, count2) {
143861
143906
  let prestep;
143862
143907
  while (true) {
143863
- const step = tickIncrement$1(start, stop3, count2);
143908
+ const step = tickIncrement(start, stop3, count2);
143864
143909
  if (step === prestep || step === 0 || !isFinite(step)) {
143865
143910
  return [start, stop3];
143866
143911
  } else if (step > 0) {
@@ -143877,7 +143922,7 @@ function sturges(values2) {
143877
143922
  return Math.ceil(Math.log(count$1(values2)) / Math.LN2) + 1;
143878
143923
  }
143879
143924
  function bin$3() {
143880
- var value2 = identity$c, domain2 = extent$1, threshold2 = sturges;
143925
+ var value2 = identity$c, domain2 = d3_extent, threshold2 = sturges;
143881
143926
  function histogram(data2) {
143882
143927
  if (!Array.isArray(data2))
143883
143928
  data2 = Array.from(data2);
@@ -143888,12 +143933,12 @@ function bin$3() {
143888
143933
  var xz = domain2(values2), x02 = xz[0], x12 = xz[1], tz = threshold2(values2, x02, x12);
143889
143934
  if (!Array.isArray(tz)) {
143890
143935
  const max2 = x12, tn = +tz;
143891
- if (domain2 === extent$1)
143936
+ if (domain2 === d3_extent)
143892
143937
  [x02, x12] = nice$3(x02, x12, tn);
143893
- tz = ticks$1(x02, x12, tn);
143938
+ tz = ticks(x02, x12, tn);
143894
143939
  if (tz[tz.length - 1] >= x12) {
143895
- if (max2 >= x12 && domain2 === extent$1) {
143896
- const step = tickIncrement$1(x02, x12, tn);
143940
+ if (max2 >= x12 && domain2 === d3_extent) {
143941
+ const step = tickIncrement(x02, x12, tn);
143897
143942
  if (isFinite(step)) {
143898
143943
  if (step > 0) {
143899
143944
  x12 = (Math.floor(x12 / step) + 1) * step;
@@ -144002,7 +144047,15 @@ function mean$1(values2, valueof) {
144002
144047
  if (count2)
144003
144048
  return sum2 / count2;
144004
144049
  }
144005
- function sequence$2(start, stop3, step) {
144050
+ function* flatten(arrays) {
144051
+ for (const array2 of arrays) {
144052
+ yield* array2;
144053
+ }
144054
+ }
144055
+ function merge$3(arrays) {
144056
+ return Array.from(flatten(arrays));
144057
+ }
144058
+ function range$5(start, stop3, step) {
144006
144059
  start = +start, stop3 = +stop3, step = (n2 = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n2 < 3 ? 1 : +step;
144007
144060
  var i2 = -1, n2 = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n2);
144008
144061
  while (++i2 < n2) {
@@ -144029,7 +144082,7 @@ function sum$2(values2, valueof) {
144029
144082
  return sum2;
144030
144083
  }
144031
144084
  function normalize$4(arr) {
144032
- const [min2, max2] = extent$1(arr);
144085
+ const [min2, max2] = d3_extent(arr);
144033
144086
  const ratio = 255 / (max2 - min2);
144034
144087
  const data2 = new Uint8Array(arr.map((i2) => Math.floor((i2 - min2) * ratio)));
144035
144088
  return data2;
@@ -144250,7 +144303,7 @@ class BitmaskLayer2 extends XRLayer {
144250
144303
  } = this.state;
144251
144304
  if (textures && model) {
144252
144305
  const scaleFactor = 1 / 2 ** (maxZoom - zoom2);
144253
- const colors2 = Object.fromEntries(range$b(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
144306
+ const colors2 = Object.fromEntries(range$c(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
144254
144307
  model.setUniforms(Object.assign({}, uniforms, {
144255
144308
  ...colors2,
144256
144309
  // Bitmask image channel data textures
@@ -144513,377 +144566,6 @@ function CellSetExpressionPlotOptions(props) {
144513
144566
  ] }, "transform-coefficient-option-row") : null
144514
144567
  ] });
144515
144568
  }
144516
- function ascending$4(a2, b2) {
144517
- return a2 == null || b2 == null ? NaN : a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
144518
- }
144519
- function descending$1(a2, b2) {
144520
- return a2 == null || b2 == null ? NaN : b2 < a2 ? -1 : b2 > a2 ? 1 : b2 >= a2 ? 0 : NaN;
144521
- }
144522
- function bisector$1(f2) {
144523
- let compare12, compare2, delta;
144524
- if (f2.length !== 2) {
144525
- compare12 = ascending$4;
144526
- compare2 = (d, x2) => ascending$4(f2(d), x2);
144527
- delta = (d, x2) => f2(d) - x2;
144528
- } else {
144529
- compare12 = f2 === ascending$4 || f2 === descending$1 ? f2 : zero$6;
144530
- compare2 = f2;
144531
- delta = f2;
144532
- }
144533
- function left2(a2, x2, lo = 0, hi = a2.length) {
144534
- if (lo < hi) {
144535
- if (compare12(x2, x2) !== 0)
144536
- return hi;
144537
- do {
144538
- const mid = lo + hi >>> 1;
144539
- if (compare2(a2[mid], x2) < 0)
144540
- lo = mid + 1;
144541
- else
144542
- hi = mid;
144543
- } while (lo < hi);
144544
- }
144545
- return lo;
144546
- }
144547
- function right2(a2, x2, lo = 0, hi = a2.length) {
144548
- if (lo < hi) {
144549
- if (compare12(x2, x2) !== 0)
144550
- return hi;
144551
- do {
144552
- const mid = lo + hi >>> 1;
144553
- if (compare2(a2[mid], x2) <= 0)
144554
- lo = mid + 1;
144555
- else
144556
- hi = mid;
144557
- } while (lo < hi);
144558
- }
144559
- return lo;
144560
- }
144561
- function center2(a2, x2, lo = 0, hi = a2.length) {
144562
- const i2 = left2(a2, x2, lo, hi - 1);
144563
- return i2 > lo && delta(a2[i2 - 1], x2) > -delta(a2[i2], x2) ? i2 - 1 : i2;
144564
- }
144565
- return { left: left2, center: center2, right: right2 };
144566
- }
144567
- function zero$6() {
144568
- return 0;
144569
- }
144570
- function number$a(x2) {
144571
- return x2 === null ? NaN : +x2;
144572
- }
144573
- function* numbers$3(values2, valueof) {
144574
- if (valueof === void 0) {
144575
- for (let value2 of values2) {
144576
- if (value2 != null && (value2 = +value2) >= value2) {
144577
- yield value2;
144578
- }
144579
- }
144580
- } else {
144581
- let index2 = -1;
144582
- for (let value2 of values2) {
144583
- if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
144584
- yield value2;
144585
- }
144586
- }
144587
- }
144588
- }
144589
- const ascendingBisect = bisector$1(ascending$4);
144590
- const bisectRight$1 = ascendingBisect.right;
144591
- const bisectLeft$1 = ascendingBisect.left;
144592
- bisector$1(number$a).center;
144593
- const bisect$1 = bisectRight$1;
144594
- function variance(values2, valueof) {
144595
- let count2 = 0;
144596
- let delta;
144597
- let mean2 = 0;
144598
- let sum2 = 0;
144599
- if (valueof === void 0) {
144600
- for (let value2 of values2) {
144601
- if (value2 != null && (value2 = +value2) >= value2) {
144602
- delta = value2 - mean2;
144603
- mean2 += delta / ++count2;
144604
- sum2 += delta * (value2 - mean2);
144605
- }
144606
- }
144607
- } else {
144608
- let index2 = -1;
144609
- for (let value2 of values2) {
144610
- if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
144611
- delta = value2 - mean2;
144612
- mean2 += delta / ++count2;
144613
- sum2 += delta * (value2 - mean2);
144614
- }
144615
- }
144616
- }
144617
- if (count2 > 1)
144618
- return sum2 / (count2 - 1);
144619
- }
144620
- function deviation(values2, valueof) {
144621
- const v = variance(values2, valueof);
144622
- return v ? Math.sqrt(v) : v;
144623
- }
144624
- class Adder {
144625
- constructor() {
144626
- this._partials = new Float64Array(32);
144627
- this._n = 0;
144628
- }
144629
- add(x2) {
144630
- const p = this._partials;
144631
- let i2 = 0;
144632
- for (let j = 0; j < this._n && j < 32; j++) {
144633
- const y2 = p[j], hi = x2 + y2, lo = Math.abs(x2) < Math.abs(y2) ? x2 - (hi - y2) : y2 - (hi - x2);
144634
- if (lo)
144635
- p[i2++] = lo;
144636
- x2 = hi;
144637
- }
144638
- p[i2] = x2;
144639
- this._n = i2 + 1;
144640
- return this;
144641
- }
144642
- valueOf() {
144643
- const p = this._partials;
144644
- let n2 = this._n, x2, y2, lo, hi = 0;
144645
- if (n2 > 0) {
144646
- hi = p[--n2];
144647
- while (n2 > 0) {
144648
- x2 = hi;
144649
- y2 = p[--n2];
144650
- hi = x2 + y2;
144651
- lo = y2 - (hi - x2);
144652
- if (lo)
144653
- break;
144654
- }
144655
- if (n2 > 0 && (lo < 0 && p[n2 - 1] < 0 || lo > 0 && p[n2 - 1] > 0)) {
144656
- y2 = lo * 2;
144657
- x2 = hi + y2;
144658
- if (y2 == x2 - hi)
144659
- hi = x2;
144660
- }
144661
- }
144662
- return hi;
144663
- }
144664
- }
144665
- function permute(source2, keys3) {
144666
- return Array.from(keys3, (key2) => source2[key2]);
144667
- }
144668
- function compareDefined(compare2 = ascending$4) {
144669
- if (compare2 === ascending$4)
144670
- return ascendingDefined;
144671
- if (typeof compare2 !== "function")
144672
- throw new TypeError("compare is not a function");
144673
- return (a2, b2) => {
144674
- const x2 = compare2(a2, b2);
144675
- if (x2 || x2 === 0)
144676
- return x2;
144677
- return (compare2(b2, b2) === 0) - (compare2(a2, a2) === 0);
144678
- };
144679
- }
144680
- function ascendingDefined(a2, b2) {
144681
- return (a2 == null || !(a2 >= a2)) - (b2 == null || !(b2 >= b2)) || (a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
144682
- }
144683
- var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
144684
- function ticks(start, stop3, count2) {
144685
- var reverse2, i2 = -1, n2, ticks2, step;
144686
- stop3 = +stop3, start = +start, count2 = +count2;
144687
- if (start === stop3 && count2 > 0)
144688
- return [start];
144689
- if (reverse2 = stop3 < start)
144690
- n2 = start, start = stop3, stop3 = n2;
144691
- if ((step = tickIncrement(start, stop3, count2)) === 0 || !isFinite(step))
144692
- return [];
144693
- if (step > 0) {
144694
- let r0 = Math.round(start / step), r1 = Math.round(stop3 / step);
144695
- if (r0 * step < start)
144696
- ++r0;
144697
- if (r1 * step > stop3)
144698
- --r1;
144699
- ticks2 = new Array(n2 = r1 - r0 + 1);
144700
- while (++i2 < n2)
144701
- ticks2[i2] = (r0 + i2) * step;
144702
- } else {
144703
- step = -step;
144704
- let r0 = Math.round(start * step), r1 = Math.round(stop3 * step);
144705
- if (r0 / step < start)
144706
- ++r0;
144707
- if (r1 / step > stop3)
144708
- --r1;
144709
- ticks2 = new Array(n2 = r1 - r0 + 1);
144710
- while (++i2 < n2)
144711
- ticks2[i2] = (r0 + i2) / step;
144712
- }
144713
- if (reverse2)
144714
- ticks2.reverse();
144715
- return ticks2;
144716
- }
144717
- function tickIncrement(start, stop3, count2) {
144718
- var step = (stop3 - start) / Math.max(0, count2), power = Math.floor(Math.log(step) / Math.LN10), error2 = step / Math.pow(10, power);
144719
- return power >= 0 ? (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1);
144720
- }
144721
- function tickStep(start, stop3, count2) {
144722
- var step0 = Math.abs(stop3 - start) / Math.max(0, count2), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error2 = step0 / step1;
144723
- if (error2 >= e10)
144724
- step1 *= 10;
144725
- else if (error2 >= e5)
144726
- step1 *= 5;
144727
- else if (error2 >= e2)
144728
- step1 *= 2;
144729
- return stop3 < start ? -step1 : step1;
144730
- }
144731
- function max$2(values2, valueof) {
144732
- let max2;
144733
- if (valueof === void 0) {
144734
- for (const value2 of values2) {
144735
- if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
144736
- max2 = value2;
144737
- }
144738
- }
144739
- } else {
144740
- let index2 = -1;
144741
- for (let value2 of values2) {
144742
- if ((value2 = valueof(value2, ++index2, values2)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
144743
- max2 = value2;
144744
- }
144745
- }
144746
- }
144747
- return max2;
144748
- }
144749
- function min$2(values2, valueof) {
144750
- let min2;
144751
- if (valueof === void 0) {
144752
- for (const value2 of values2) {
144753
- if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
144754
- min2 = value2;
144755
- }
144756
- }
144757
- } else {
144758
- let index2 = -1;
144759
- for (let value2 of values2) {
144760
- if ((value2 = valueof(value2, ++index2, values2)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
144761
- min2 = value2;
144762
- }
144763
- }
144764
- }
144765
- return min2;
144766
- }
144767
- function quickselect(array2, k, left2 = 0, right2 = array2.length - 1, compare2) {
144768
- compare2 = compare2 === void 0 ? ascendingDefined : compareDefined(compare2);
144769
- while (right2 > left2) {
144770
- if (right2 - left2 > 600) {
144771
- const n2 = right2 - left2 + 1;
144772
- const m2 = k - left2 + 1;
144773
- const z2 = Math.log(n2);
144774
- const s2 = 0.5 * Math.exp(2 * z2 / 3);
144775
- const sd = 0.5 * Math.sqrt(z2 * s2 * (n2 - s2) / n2) * (m2 - n2 / 2 < 0 ? -1 : 1);
144776
- const newLeft = Math.max(left2, Math.floor(k - m2 * s2 / n2 + sd));
144777
- const newRight = Math.min(right2, Math.floor(k + (n2 - m2) * s2 / n2 + sd));
144778
- quickselect(array2, k, newLeft, newRight, compare2);
144779
- }
144780
- const t4 = array2[k];
144781
- let i2 = left2;
144782
- let j = right2;
144783
- swap$1(array2, left2, k);
144784
- if (compare2(array2[right2], t4) > 0)
144785
- swap$1(array2, left2, right2);
144786
- while (i2 < j) {
144787
- swap$1(array2, i2, j), ++i2, --j;
144788
- while (compare2(array2[i2], t4) < 0)
144789
- ++i2;
144790
- while (compare2(array2[j], t4) > 0)
144791
- --j;
144792
- }
144793
- if (compare2(array2[left2], t4) === 0)
144794
- swap$1(array2, left2, j);
144795
- else
144796
- ++j, swap$1(array2, j, right2);
144797
- if (j <= k)
144798
- left2 = j + 1;
144799
- if (k <= j)
144800
- right2 = j - 1;
144801
- }
144802
- return array2;
144803
- }
144804
- function swap$1(array2, i2, j) {
144805
- const t4 = array2[i2];
144806
- array2[i2] = array2[j];
144807
- array2[j] = t4;
144808
- }
144809
- function quantile$2(values2, p, valueof) {
144810
- values2 = Float64Array.from(numbers$3(values2, valueof));
144811
- if (!(n2 = values2.length))
144812
- return;
144813
- if ((p = +p) <= 0 || n2 < 2)
144814
- return min$2(values2);
144815
- if (p >= 1)
144816
- return max$2(values2);
144817
- var n2, i2 = (n2 - 1) * p, i0 = Math.floor(i2), value0 = max$2(quickselect(values2, i0).subarray(0, i0 + 1)), value1 = min$2(values2.subarray(i0 + 1));
144818
- return value0 + (value1 - value0) * (i2 - i0);
144819
- }
144820
- function quantileSorted(values2, p, valueof = number$a) {
144821
- if (!(n2 = values2.length))
144822
- return;
144823
- if ((p = +p) <= 0 || n2 < 2)
144824
- return +valueof(values2[0], 0, values2);
144825
- if (p >= 1)
144826
- return +valueof(values2[n2 - 1], n2 - 1, values2);
144827
- var n2, i2 = (n2 - 1) * p, i0 = Math.floor(i2), value0 = +valueof(values2[i0], i0, values2), value1 = +valueof(values2[i0 + 1], i0 + 1, values2);
144828
- return value0 + (value1 - value0) * (i2 - i0);
144829
- }
144830
- function mean(values2, valueof) {
144831
- let count2 = 0;
144832
- let sum2 = 0;
144833
- if (valueof === void 0) {
144834
- for (let value2 of values2) {
144835
- if (value2 != null && (value2 = +value2) >= value2) {
144836
- ++count2, sum2 += value2;
144837
- }
144838
- }
144839
- } else {
144840
- let index2 = -1;
144841
- for (let value2 of values2) {
144842
- if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
144843
- ++count2, sum2 += value2;
144844
- }
144845
- }
144846
- }
144847
- if (count2)
144848
- return sum2 / count2;
144849
- }
144850
- function median(values2, valueof) {
144851
- return quantile$2(values2, 0.5, valueof);
144852
- }
144853
- function* flatten(arrays) {
144854
- for (const array2 of arrays) {
144855
- yield* array2;
144856
- }
144857
- }
144858
- function merge$3(arrays) {
144859
- return Array.from(flatten(arrays));
144860
- }
144861
- function range$4(start, stop3, step) {
144862
- start = +start, stop3 = +stop3, step = (n2 = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n2 < 3 ? 1 : +step;
144863
- var i2 = -1, n2 = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n2);
144864
- while (++i2 < n2) {
144865
- range2[i2] = start + i2 * step;
144866
- }
144867
- return range2;
144868
- }
144869
- function sum$1(values2, valueof) {
144870
- let sum2 = 0;
144871
- if (valueof === void 0) {
144872
- for (let value2 of values2) {
144873
- if (value2 = +value2) {
144874
- sum2 += value2;
144875
- }
144876
- }
144877
- } else {
144878
- let index2 = -1;
144879
- for (let value2 of values2) {
144880
- if (value2 = +valueof(value2, ++index2, values2)) {
144881
- sum2 += value2;
144882
- }
144883
- }
144884
- }
144885
- return sum2;
144886
- }
144887
144569
  function initRange$1(domain2, range2) {
144888
144570
  switch (arguments.length) {
144889
144571
  case 0:
@@ -144921,7 +144603,7 @@ function initInterpolator$1(domain2, interpolator) {
144921
144603
  }
144922
144604
  const implicit$1 = Symbol("implicit");
144923
144605
  function ordinal$1() {
144924
- var index2 = new InternMap$1(), domain2 = [], range2 = [], unknown = implicit$1;
144606
+ var index2 = new InternMap2(), domain2 = [], range2 = [], unknown = implicit$1;
144925
144607
  function scale2(d) {
144926
144608
  let i2 = index2.get(d);
144927
144609
  if (i2 === void 0) {
@@ -144934,7 +144616,7 @@ function ordinal$1() {
144934
144616
  scale2.domain = function(_) {
144935
144617
  if (!arguments.length)
144936
144618
  return domain2.slice();
144937
- domain2 = [], index2 = new InternMap$1();
144619
+ domain2 = [], index2 = new InternMap2();
144938
144620
  for (const value2 of _) {
144939
144621
  if (index2.has(value2))
144940
144622
  continue;
@@ -145575,7 +145257,7 @@ function object$3(a2, b2) {
145575
145257
  };
145576
145258
  }
145577
145259
  var reA$2 = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB$2 = new RegExp(reA$2.source, "g");
145578
- function zero$5(b2) {
145260
+ function zero$6(b2) {
145579
145261
  return function() {
145580
145262
  return b2;
145581
145263
  };
@@ -145614,7 +145296,7 @@ function string$2(a2, b2) {
145614
145296
  else
145615
145297
  s2[++i2] = bs;
145616
145298
  }
145617
- return s2.length < 2 ? q[0] ? one$4(q[0].x) : zero$5(b2) : (b2 = q.length, function(t4) {
145299
+ return s2.length < 2 ? q[0] ? one$4(q[0].x) : zero$6(b2) : (b2 = q.length, function(t4) {
145618
145300
  for (var i22 = 0, o2; i22 < b2; ++i22)
145619
145301
  s2[(o2 = q[i22]).i] = o2.x(t4);
145620
145302
  return s2.join("");
@@ -145894,7 +145576,7 @@ function constants$2(x2) {
145894
145576
  return x2;
145895
145577
  };
145896
145578
  }
145897
- function number$9(x2) {
145579
+ function number$a(x2) {
145898
145580
  return +x2;
145899
145581
  }
145900
145582
  var unit$1 = [0, 1];
@@ -145935,7 +145617,7 @@ function polymap$1(domain2, range2, interpolate2) {
145935
145617
  r3[i2] = interpolate2(range2[i2], range2[i2 + 1]);
145936
145618
  }
145937
145619
  return function(x2) {
145938
- var i22 = bisect$1(domain2, x2, 1, j) - 1;
145620
+ var i22 = bisect$2(domain2, x2, 1, j) - 1;
145939
145621
  return r3[i22](d[i22](x2));
145940
145622
  };
145941
145623
  }
@@ -145959,7 +145641,7 @@ function transformer$6() {
145959
145641
  return clamp2(untransform((input || (input = piecewise2(range2, domain2.map(transform2), interpolateNumber$1)))(y2)));
145960
145642
  };
145961
145643
  scale2.domain = function(_) {
145962
- return arguments.length ? (domain2 = Array.from(_, number$9), rescale()) : domain2.slice();
145644
+ return arguments.length ? (domain2 = Array.from(_, number$a), rescale()) : domain2.slice();
145963
145645
  };
145964
145646
  scale2.range = function(_) {
145965
145647
  return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice();
@@ -146212,7 +145894,7 @@ function precisionRound$1(step, max2) {
146212
145894
  return Math.max(0, exponent$1(max2) - exponent$1(step)) + 1;
146213
145895
  }
146214
145896
  function tickFormat$2(start, stop3, count2, specifier) {
146215
- var step = tickStep(start, stop3, count2), precision;
145897
+ var step = tickStep$1(start, stop3, count2), precision;
146216
145898
  specifier = formatSpecifier$1(specifier == null ? ",f" : specifier);
146217
145899
  switch (specifier.type) {
146218
145900
  case "s": {
@@ -146300,7 +145982,7 @@ function identity$8(domain2) {
146300
145982
  }
146301
145983
  scale2.invert = scale2;
146302
145984
  scale2.domain = scale2.range = function(_) {
146303
- return arguments.length ? (domain2 = Array.from(_, number$9), scale2) : domain2.slice();
145985
+ return arguments.length ? (domain2 = Array.from(_, number$a), scale2) : domain2.slice();
146304
145986
  };
146305
145987
  scale2.unknown = function(_) {
146306
145988
  return arguments.length ? (unknown = _, scale2) : unknown;
@@ -146308,7 +145990,7 @@ function identity$8(domain2) {
146308
145990
  scale2.copy = function() {
146309
145991
  return identity$8(domain2).unknown(unknown);
146310
145992
  };
146311
- domain2 = arguments.length ? Array.from(domain2, number$9) : [0, 1];
145993
+ domain2 = arguments.length ? Array.from(domain2, number$a) : [0, 1];
146312
145994
  return linearish$1(scale2);
146313
145995
  }
146314
145996
  function nice$2(domain2, interval2) {
@@ -146502,17 +146184,17 @@ function pow$5() {
146502
146184
  function sqrt$4() {
146503
146185
  return pow$5.apply(null, arguments).exponent(0.5);
146504
146186
  }
146505
- function quantile$1() {
146187
+ function quantile$2() {
146506
146188
  var domain2 = [], range2 = [], thresholds = [], unknown;
146507
146189
  function rescale() {
146508
146190
  var i2 = 0, n2 = Math.max(1, range2.length);
146509
146191
  thresholds = new Array(n2 - 1);
146510
146192
  while (++i2 < n2)
146511
- thresholds[i2 - 1] = quantileSorted(domain2, i2 / n2);
146193
+ thresholds[i2 - 1] = quantileSorted$1(domain2, i2 / n2);
146512
146194
  return scale2;
146513
146195
  }
146514
146196
  function scale2(x2) {
146515
- return x2 == null || isNaN(x2 = +x2) ? unknown : range2[bisect$1(thresholds, x2)];
146197
+ return x2 == null || isNaN(x2 = +x2) ? unknown : range2[bisect$2(thresholds, x2)];
146516
146198
  }
146517
146199
  scale2.invertExtent = function(y2) {
146518
146200
  var i2 = range2.indexOf(y2);
@@ -146528,7 +146210,7 @@ function quantile$1() {
146528
146210
  for (let d of _)
146529
146211
  if (d != null && !isNaN(d = +d))
146530
146212
  domain2.push(d);
146531
- domain2.sort(ascending$4);
146213
+ domain2.sort(ascending$5);
146532
146214
  return rescale();
146533
146215
  };
146534
146216
  scale2.range = function(_) {
@@ -146541,14 +146223,14 @@ function quantile$1() {
146541
146223
  return thresholds.slice();
146542
146224
  };
146543
146225
  scale2.copy = function() {
146544
- return quantile$1().domain(domain2).range(range2).unknown(unknown);
146226
+ return quantile$2().domain(domain2).range(range2).unknown(unknown);
146545
146227
  };
146546
146228
  return initRange$1.apply(scale2, arguments);
146547
146229
  }
146548
146230
  function quantize$3() {
146549
146231
  var x02 = 0, x12 = 1, n2 = 1, domain2 = [0.5], range2 = [0, 1], unknown;
146550
146232
  function scale2(x2) {
146551
- return x2 != null && x2 <= x2 ? range2[bisect$1(domain2, x2, 0, n2)] : unknown;
146233
+ return x2 != null && x2 <= x2 ? range2[bisect$2(domain2, x2, 0, n2)] : unknown;
146552
146234
  }
146553
146235
  function rescale() {
146554
146236
  var i2 = -1;
@@ -146581,7 +146263,7 @@ function quantize$3() {
146581
146263
  function threshold$1() {
146582
146264
  var domain2 = [0.5], range2 = [0, 1], unknown, n2 = 1;
146583
146265
  function scale2(x2) {
146584
- return x2 != null && x2 <= x2 ? range2[bisect$1(domain2, x2, 0, n2)] : unknown;
146266
+ return x2 != null && x2 <= x2 ? range2[bisect$2(domain2, x2, 0, n2)] : unknown;
146585
146267
  }
146586
146268
  scale2.domain = function(_) {
146587
146269
  return arguments.length ? (domain2 = Array.from(_), n2 = Math.min(domain2.length, range2.length - 1), scale2) : domain2.slice();
@@ -146915,11 +146597,11 @@ function ticker$1(year2, month2, week2, day2, hour2, minute2) {
146915
146597
  }
146916
146598
  function tickInterval(start, stop3, count2) {
146917
146599
  const target2 = Math.abs(stop3 - start) / count2;
146918
- const i2 = bisector$1(([, , step2]) => step2).right(tickIntervals, target2);
146600
+ const i2 = bisector$2(([, , step2]) => step2).right(tickIntervals, target2);
146919
146601
  if (i2 === tickIntervals.length)
146920
- return year2.every(tickStep(start / durationYear$2, stop3 / durationYear$2, count2));
146602
+ return year2.every(tickStep$1(start / durationYear$2, stop3 / durationYear$2, count2));
146921
146603
  if (i2 === 0)
146922
- return utcMillisecond.every(Math.max(tickStep(start, stop3, count2), 1));
146604
+ return utcMillisecond.every(Math.max(tickStep$1(start, stop3, count2), 1));
146923
146605
  const [t4, step] = tickIntervals[target2 / tickIntervals[i2 - 1][2] < tickIntervals[i2][2] / target2 ? i2 - 1 : i2];
146924
146606
  return t4.every(step);
146925
146607
  }
@@ -147504,7 +147186,7 @@ function defaultLocale$3(definition2) {
147504
147186
  function date$3(t4) {
147505
147187
  return new Date(t4);
147506
147188
  }
147507
- function number$8(t4) {
147189
+ function number$9(t4) {
147508
147190
  return t4 instanceof Date ? +t4 : +/* @__PURE__ */ new Date(+t4);
147509
147191
  }
147510
147192
  function calendar$1(ticks2, tickInterval, year2, month2, week2, day2, hour2, minute2, second2, format2) {
@@ -147517,7 +147199,7 @@ function calendar$1(ticks2, tickInterval, year2, month2, week2, day2, hour2, min
147517
147199
  return new Date(invert2(y2));
147518
147200
  };
147519
147201
  scale2.domain = function(_) {
147520
- return arguments.length ? domain2(Array.from(_, number$8)) : domain2().map(date$3);
147202
+ return arguments.length ? domain2(Array.from(_, number$9)) : domain2().map(date$3);
147521
147203
  };
147522
147204
  scale2.ticks = function(interval2) {
147523
147205
  var d = domain2();
@@ -147786,7 +147468,7 @@ function field$1(field2, name2, opt) {
147786
147468
  }
147787
147469
  const id = field$1("id");
147788
147470
  const identity$7 = accessor((_) => _, [], "identity");
147789
- const zero$4 = accessor(() => 0, [], "zero");
147471
+ const zero$5 = accessor(() => 0, [], "zero");
147790
147472
  const one$3 = accessor(() => 1, [], "one");
147791
147473
  const truthy = accessor(() => true, [], "true");
147792
147474
  const falsy = accessor(() => false, [], "false");
@@ -147964,10 +147646,10 @@ function compare$9(fields, orders, opt) {
147964
147646
  });
147965
147647
  return get3.length === 0 ? null : accessor(gen(get3, ord), Object.keys(fmap));
147966
147648
  }
147967
- const ascending$3 = (u2, v) => (u2 < v || u2 == null) && v != null ? -1 : (u2 > v || v == null) && u2 != null ? 1 : (v = v instanceof Date ? +v : v, u2 = u2 instanceof Date ? +u2 : u2) !== u2 && v === v ? -1 : v !== v && u2 === u2 ? 1 : 0;
147649
+ const ascending$4 = (u2, v) => (u2 < v || u2 == null) && v != null ? -1 : (u2 > v || v == null) && u2 != null ? 1 : (v = v instanceof Date ? +v : v, u2 = u2 instanceof Date ? +u2 : u2) !== u2 && v === v ? -1 : v !== v && u2 === u2 ? 1 : 0;
147968
147650
  const comparator$1 = (fields, orders) => fields.length === 1 ? compare1(fields[0], orders[0]) : compareN(fields, orders, fields.length);
147969
147651
  const compare1 = (field2, order) => function(a2, b2) {
147970
- return ascending$3(field2(a2), field2(b2)) * order;
147652
+ return ascending$4(field2(a2), field2(b2)) * order;
147971
147653
  };
147972
147654
  const compareN = (fields, orders, n2) => {
147973
147655
  orders.push(0);
@@ -147975,7 +147657,7 @@ const compareN = (fields, orders, n2) => {
147975
147657
  let f2, c2 = 0, i2 = -1;
147976
147658
  while (c2 === 0 && ++i2 < n2) {
147977
147659
  f2 = fields[i2];
147978
- c2 = ascending$3(f2(a2), f2(b2));
147660
+ c2 = ascending$4(f2(a2), f2(b2));
147979
147661
  }
147980
147662
  return c2 * orders[i2];
147981
147663
  };
@@ -148995,7 +148677,7 @@ function object$2(a2, b2) {
148995
148677
  };
148996
148678
  }
148997
148679
  var reA$1 = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB$1 = new RegExp(reA$1.source, "g");
148998
- function zero$3(b2) {
148680
+ function zero$4(b2) {
148999
148681
  return function() {
149000
148682
  return b2;
149001
148683
  };
@@ -149034,7 +148716,7 @@ function string$1(a2, b2) {
149034
148716
  else
149035
148717
  s2[++i2] = bs;
149036
148718
  }
149037
- return s2.length < 2 ? q[0] ? one$2(q[0].x) : zero$3(b2) : (b2 = q.length, function(t4) {
148719
+ return s2.length < 2 ? q[0] ? one$2(q[0].x) : zero$4(b2) : (b2 = q.length, function(t4) {
149038
148720
  for (var i22 = 0, o2; i22 < b2; ++i22)
149039
148721
  s2[(o2 = q[i22]).i] = o2.x(t4);
149040
148722
  return s2.join("");
@@ -149065,7 +148747,7 @@ function constants$1(x2) {
149065
148747
  return x2;
149066
148748
  };
149067
148749
  }
149068
- function number$7(x2) {
148750
+ function number$8(x2) {
149069
148751
  return +x2;
149070
148752
  }
149071
148753
  var unit = [0, 1];
@@ -149130,7 +148812,7 @@ function transformer$3() {
149130
148812
  return clamp2(untransform((input || (input = piecewise2(range2, domain2.map(transform2), interpolateNumber)))(y2)));
149131
148813
  };
149132
148814
  scale2.domain = function(_) {
149133
- return arguments.length ? (domain2 = Array.from(_, number$7), rescale()) : domain2.slice();
148815
+ return arguments.length ? (domain2 = Array.from(_, number$8), rescale()) : domain2.slice();
149134
148816
  };
149135
148817
  scale2.range = function(_) {
149136
148818
  return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice();
@@ -149436,7 +149118,7 @@ function linearish(scale2) {
149436
149118
  var domain2 = scale2.domain;
149437
149119
  scale2.ticks = function(count2) {
149438
149120
  var d = domain2();
149439
- return ticks$1(d[0], d[d.length - 1], count2 == null ? 10 : count2);
149121
+ return ticks(d[0], d[d.length - 1], count2 == null ? 10 : count2);
149440
149122
  };
149441
149123
  scale2.tickFormat = function(count2, specifier) {
149442
149124
  var d = domain2();
@@ -149458,7 +149140,7 @@ function linearish(scale2) {
149458
149140
  step = i0, i0 = i1, i1 = step;
149459
149141
  }
149460
149142
  while (maxIter-- > 0) {
149461
- step = tickIncrement$1(start, stop3, count2);
149143
+ step = tickIncrement(start, stop3, count2);
149462
149144
  if (step === prestep) {
149463
149145
  d[i0] = start;
149464
149146
  d[i1] = stop3;
@@ -149493,7 +149175,7 @@ function identity$4(domain2) {
149493
149175
  }
149494
149176
  scale2.invert = scale2;
149495
149177
  scale2.domain = scale2.range = function(_) {
149496
- return arguments.length ? (domain2 = Array.from(_, number$7), scale2) : domain2.slice();
149178
+ return arguments.length ? (domain2 = Array.from(_, number$8), scale2) : domain2.slice();
149497
149179
  };
149498
149180
  scale2.unknown = function(_) {
149499
149181
  return arguments.length ? (unknown = _, scale2) : unknown;
@@ -149501,7 +149183,7 @@ function identity$4(domain2) {
149501
149183
  scale2.copy = function() {
149502
149184
  return identity$4(domain2).unknown(unknown);
149503
149185
  };
149504
- domain2 = arguments.length ? Array.from(domain2, number$7) : [0, 1];
149186
+ domain2 = arguments.length ? Array.from(domain2, number$8) : [0, 1];
149505
149187
  return linearish(scale2);
149506
149188
  }
149507
149189
  function nice$1(domain2, interval2) {
@@ -149593,9 +149275,9 @@ function loggish(transform2) {
149593
149275
  }
149594
149276
  }
149595
149277
  if (z2.length * 2 < n2)
149596
- z2 = ticks$1(u2, v, n2);
149278
+ z2 = ticks(u2, v, n2);
149597
149279
  } else {
149598
- z2 = ticks$1(i2, j, Math.min(j - i2, n2)).map(pows);
149280
+ z2 = ticks(i2, j, Math.min(j - i2, n2)).map(pows);
149599
149281
  }
149600
149282
  return r3 ? z2.reverse() : z2;
149601
149283
  };
@@ -149692,7 +149374,7 @@ function pow$3() {
149692
149374
  function sqrt$3() {
149693
149375
  return pow$3.apply(null, arguments).exponent(0.5);
149694
149376
  }
149695
- function quantile() {
149377
+ function quantile$1() {
149696
149378
  var domain2 = [], range2 = [], thresholds = [], unknown;
149697
149379
  function rescale() {
149698
149380
  var i2 = 0, n2 = Math.max(1, range2.length);
@@ -149731,7 +149413,7 @@ function quantile() {
149731
149413
  return thresholds.slice();
149732
149414
  };
149733
149415
  scale2.copy = function() {
149734
- return quantile().domain(domain2).range(range2).unknown(unknown);
149416
+ return quantile$1().domain(domain2).range(range2).unknown(unknown);
149735
149417
  };
149736
149418
  return initRange.apply(scale2, arguments);
149737
149419
  }
@@ -150876,7 +150558,7 @@ function defaultLocale$1(definition2) {
150876
150558
  function date$1(t4) {
150877
150559
  return new Date(t4);
150878
150560
  }
150879
- function number$6(t4) {
150561
+ function number$7(t4) {
150880
150562
  return t4 instanceof Date ? +t4 : +/* @__PURE__ */ new Date(+t4);
150881
150563
  }
150882
150564
  function calendar(ticks2, tickInterval, year2, month2, week2, day2, hour2, minute2, second2, format2) {
@@ -150889,7 +150571,7 @@ function calendar(ticks2, tickInterval, year2, month2, week2, day2, hour2, minut
150889
150571
  return new Date(invert2(y2));
150890
150572
  };
150891
150573
  scale2.domain = function(_) {
150892
- return arguments.length ? domain2(Array.from(_, number$6)) : domain2().map(date$1);
150574
+ return arguments.length ? domain2(Array.from(_, number$7)) : domain2().map(date$1);
150893
150575
  };
150894
150576
  scale2.ticks = function(interval2) {
150895
150577
  var d = domain2();
@@ -151055,7 +150737,7 @@ function band$1() {
151055
150737
  start = Math.round(start);
151056
150738
  bandwidth2 = Math.round(bandwidth2);
151057
150739
  }
151058
- var values2 = sequence$2(n2).map(function(i2) {
150740
+ var values2 = range$5(n2).map(function(i2) {
151059
150741
  return start + step * i2;
151060
150742
  });
151061
150743
  return ordinalRange(reverse2 ? values2.reverse() : values2);
@@ -151174,7 +150856,7 @@ function point$8() {
151174
150856
  return pointish$1(band$1().paddingInner(1));
151175
150857
  }
151176
150858
  var map$1 = Array.prototype.map;
151177
- function numbers$2(_) {
150859
+ function numbers$3(_) {
151178
150860
  return map$1.call(_, function(x2) {
151179
150861
  return +x2;
151180
150862
  });
@@ -151187,7 +150869,7 @@ function scaleBinOrdinal$1() {
151187
150869
  }
151188
150870
  scale2.domain = function(_) {
151189
150871
  if (arguments.length) {
151190
- domain2 = numbers$2(_);
150872
+ domain2 = numbers$3(_);
151191
150873
  return scale2;
151192
150874
  } else {
151193
150875
  return domain2.slice();
@@ -151249,7 +150931,7 @@ scale$5(`${Diverging$1}-${Log$1}`, divergingLog, [Continuous$1, Interpolating$1,
151249
150931
  scale$5(`${Diverging$1}-${Pow$1}`, divergingPow, [Continuous$1, Interpolating$1]);
151250
150932
  scale$5(`${Diverging$1}-${Sqrt$1}`, divergingSqrt, [Continuous$1, Interpolating$1]);
151251
150933
  scale$5(`${Diverging$1}-${Symlog$1}`, divergingSymlog, [Continuous$1, Interpolating$1]);
151252
- scale$5(Quantile$2, quantile, [Discretizing$1, Quantile$2]);
150934
+ scale$5(Quantile$2, quantile$1, [Discretizing$1, Quantile$2]);
151253
150935
  scale$5(Quantize$1, quantize$2, Discretizing$1);
151254
150936
  scale$5(Threshold$1, threshold, Discretizing$1);
151255
150937
  scale$5(BinOrdinal$1, scaleBinOrdinal$1, [Discrete$2, Discretizing$1]);
@@ -151377,7 +151059,7 @@ function date(a2, b2) {
151377
151059
  return d.setTime(a2 * (1 - t4) + b2 * t4), d;
151378
151060
  };
151379
151061
  }
151380
- function number$5(a2, b2) {
151062
+ function number$6(a2, b2) {
151381
151063
  return a2 = +a2, b2 = +b2, function(t4) {
151382
151064
  return a2 * (1 - t4) + b2 * t4;
151383
151065
  };
@@ -151402,7 +151084,7 @@ function object$1(a2, b2) {
151402
151084
  };
151403
151085
  }
151404
151086
  var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g");
151405
- function zero$2(b2) {
151087
+ function zero$3(b2) {
151406
151088
  return function() {
151407
151089
  return b2;
151408
151090
  };
@@ -151430,7 +151112,7 @@ function string(a2, b2) {
151430
151112
  s2[++i2] = bm;
151431
151113
  } else {
151432
151114
  s2[++i2] = null;
151433
- q.push({ i: i2, x: number$5(am, bm) });
151115
+ q.push({ i: i2, x: number$6(am, bm) });
151434
151116
  }
151435
151117
  bi = reB.lastIndex;
151436
151118
  }
@@ -151441,7 +151123,7 @@ function string(a2, b2) {
151441
151123
  else
151442
151124
  s2[++i2] = bs;
151443
151125
  }
151444
- return s2.length < 2 ? q[0] ? one$1(q[0].x) : zero$2(b2) : (b2 = q.length, function(t4) {
151126
+ return s2.length < 2 ? q[0] ? one$1(q[0].x) : zero$3(b2) : (b2 = q.length, function(t4) {
151445
151127
  for (var i22 = 0, o2; i22 < b2; ++i22)
151446
151128
  s2[(o2 = q[i22]).i] = o2.x(t4);
151447
151129
  return s2.join("");
@@ -151449,7 +151131,7 @@ function string(a2, b2) {
151449
151131
  }
151450
151132
  function value$3(a2, b2) {
151451
151133
  var t4 = typeof b2, c2;
151452
- return b2 == null || t4 === "boolean" ? constant$4(b2) : (t4 === "number" ? number$5 : t4 === "string" ? (c2 = color$3(b2)) ? (b2 = c2, rgb) : string : b2 instanceof color$3 ? rgb : b2 instanceof Date ? date : isNumberArray(b2) ? numberArray : Array.isArray(b2) ? genericArray : typeof b2.valueOf !== "function" && typeof b2.toString !== "function" || isNaN(b2) ? object$1 : number$5)(a2, b2);
151134
+ return b2 == null || t4 === "boolean" ? constant$4(b2) : (t4 === "number" ? number$6 : t4 === "string" ? (c2 = color$3(b2)) ? (b2 = c2, rgb) : string : b2 instanceof color$3 ? rgb : b2 instanceof Date ? date : isNumberArray(b2) ? numberArray : Array.isArray(b2) ? genericArray : typeof b2.valueOf !== "function" && typeof b2.toString !== "function" || isNaN(b2) ? object$1 : number$6)(a2, b2);
151453
151135
  }
151454
151136
  function discrete$2(range2) {
151455
151137
  var n2 = range2.length;
@@ -151527,7 +151209,7 @@ function interpolateTransform(parse2, pxComma, pxParen, degParen) {
151527
151209
  function translate2(xa, ya, xb, yb, s2, q) {
151528
151210
  if (xa !== xb || ya !== yb) {
151529
151211
  var i2 = s2.push("translate(", null, pxComma, null, pxParen);
151530
- q.push({ i: i2 - 4, x: number$5(xa, xb) }, { i: i2 - 2, x: number$5(ya, yb) });
151212
+ q.push({ i: i2 - 4, x: number$6(xa, xb) }, { i: i2 - 2, x: number$6(ya, yb) });
151531
151213
  } else if (xb || yb) {
151532
151214
  s2.push("translate(" + xb + pxComma + yb + pxParen);
151533
151215
  }
@@ -151538,14 +151220,14 @@ function interpolateTransform(parse2, pxComma, pxParen, degParen) {
151538
151220
  b2 += 360;
151539
151221
  else if (b2 - a2 > 180)
151540
151222
  a2 += 360;
151541
- q.push({ i: s2.push(pop(s2) + "rotate(", null, degParen) - 2, x: number$5(a2, b2) });
151223
+ q.push({ i: s2.push(pop(s2) + "rotate(", null, degParen) - 2, x: number$6(a2, b2) });
151542
151224
  } else if (b2) {
151543
151225
  s2.push(pop(s2) + "rotate(" + b2 + degParen);
151544
151226
  }
151545
151227
  }
151546
151228
  function skewX(a2, b2, s2, q) {
151547
151229
  if (a2 !== b2) {
151548
- q.push({ i: s2.push(pop(s2) + "skewX(", null, degParen) - 2, x: number$5(a2, b2) });
151230
+ q.push({ i: s2.push(pop(s2) + "skewX(", null, degParen) - 2, x: number$6(a2, b2) });
151549
151231
  } else if (b2) {
151550
151232
  s2.push(pop(s2) + "skewX(" + b2 + degParen);
151551
151233
  }
@@ -151553,7 +151235,7 @@ function interpolateTransform(parse2, pxComma, pxParen, degParen) {
151553
151235
  function scale2(xa, ya, xb, yb, s2, q) {
151554
151236
  if (xa !== xb || ya !== yb) {
151555
151237
  var i2 = s2.push(pop(s2) + "scale(", null, ",", null, ")");
151556
- q.push({ i: i2 - 4, x: number$5(xa, xb) }, { i: i2 - 2, x: number$5(ya, yb) });
151238
+ q.push({ i: i2 - 4, x: number$6(xa, xb) }, { i: i2 - 2, x: number$6(ya, yb) });
151557
151239
  } else if (xb !== 1 || yb !== 1) {
151558
151240
  s2.push(pop(s2) + "scale(" + xb + "," + yb + ")");
151559
151241
  }
@@ -151700,7 +151382,7 @@ const $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151700
151382
  interpolateHslLong: hslLong,
151701
151383
  interpolateHue: hue,
151702
151384
  interpolateLab: lab,
151703
- interpolateNumber: number$5,
151385
+ interpolateNumber: number$6,
151704
151386
  interpolateNumberArray: numberArray,
151705
151387
  interpolateObject: object$1,
151706
151388
  interpolateRgb: rgb,
@@ -151827,7 +151509,7 @@ function translateX(x2) {
151827
151509
  function translateY(y2) {
151828
151510
  return "translate(0," + y2 + ")";
151829
151511
  }
151830
- function number$4(scale2) {
151512
+ function number$5(scale2) {
151831
151513
  return (d) => +scale2(d);
151832
151514
  }
151833
151515
  function center(scale2, offset5) {
@@ -151842,7 +151524,7 @@ function entering() {
151842
151524
  function axis(orient2, scale2) {
151843
151525
  var tickArguments = [], tickValues2 = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset5 = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient2 === top || orient2 === left ? -1 : 1, x2 = orient2 === left || orient2 === right ? "x" : "y", transform2 = orient2 === top || orient2 === bottom ? translateX : translateY;
151844
151526
  function axis2(context2) {
151845
- var values2 = tickValues2 == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues2, format2 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity$2 : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset5, range1 = +range2[range2.length - 1] + offset5, position2 = (scale2.bandwidth ? center : number$4)(scale2.copy(), offset5), selection = context2.selection ? context2.selection() : context2, path2 = selection.selectAll(".domain").data([null]), tick2 = selection.selectAll(".tick").data(values2, scale2).order(), tickExit = tick2.exit(), tickEnter = tick2.enter().append("g").attr("class", "tick"), line2 = tick2.select("line"), text2 = tick2.select("text");
151527
+ var values2 = tickValues2 == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues2, format2 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity$2 : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset5, range1 = +range2[range2.length - 1] + offset5, position2 = (scale2.bandwidth ? center : number$5)(scale2.copy(), offset5), selection = context2.selection ? context2.selection() : context2, path2 = selection.selectAll(".domain").data([null]), tick2 = selection.selectAll(".tick").data(values2, scale2).order(), tickExit = tick2.exit(), tickEnter = tick2.enter().append("g").attr("class", "tick"), line2 = tick2.select("line"), text2 = tick2.select("text");
151846
151528
  path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
151847
151529
  tick2 = tick2.merge(tickEnter);
151848
151530
  line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x2 + "2", k * tickSizeInner));
@@ -151918,8 +151600,8 @@ function constant$3(x2) {
151918
151600
  const abs$2 = Math.abs;
151919
151601
  const atan2$1 = Math.atan2;
151920
151602
  const cos$2 = Math.cos;
151921
- const max$1 = Math.max;
151922
- const min$1 = Math.min;
151603
+ const max$2 = Math.max;
151604
+ const min$2 = Math.min;
151923
151605
  const sin$2 = Math.sin;
151924
151606
  const sqrt$2 = Math.sqrt;
151925
151607
  const epsilon$6 = 1e-12;
@@ -152068,7 +151750,7 @@ function intersect$3(x02, y02, x12, y12, x2, y2, x3, y3) {
152068
151750
  return [x02 + t4 * x10, y02 + t4 * y10];
152069
151751
  }
152070
151752
  function cornerTangents(x02, y02, x12, y12, r1, rc, cw2) {
152071
- var x01 = x02 - x12, y01 = y02 - y12, lo = (cw2 ? rc : -rc) / sqrt$2(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x02 + ox, y11 = y02 + oy, x10 = x12 + ox, y10 = y12 + oy, x002 = (x11 + x10) / 2, y002 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r3 = r1 - rc, D2 = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt$2(max$1(0, r3 * r3 * d2 - D2 * D2)), cx0 = (D2 * dy - dx * d) / d2, cy0 = (-D2 * dx - dy * d) / d2, cx1 = (D2 * dy + dx * d) / d2, cy1 = (-D2 * dx + dy * d) / d2, dx0 = cx0 - x002, dy0 = cy0 - y002, dx1 = cx1 - x002, dy1 = cy1 - y002;
151753
+ var x01 = x02 - x12, y01 = y02 - y12, lo = (cw2 ? rc : -rc) / sqrt$2(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x02 + ox, y11 = y02 + oy, x10 = x12 + ox, y10 = y12 + oy, x002 = (x11 + x10) / 2, y002 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r3 = r1 - rc, D2 = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt$2(max$2(0, r3 * r3 * d2 - D2 * D2)), cx0 = (D2 * dy - dx * d) / d2, cy0 = (-D2 * dx - dy * d) / d2, cx1 = (D2 * dy + dx * d) / d2, cy1 = (-D2 * dx + dy * d) / d2, dx0 = cx0 - x002, dy0 = cy0 - y002, dx1 = cx1 - x002, dy1 = cy1 - y002;
152072
151754
  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
152073
151755
  cx0 = cx1, cy0 = cy1;
152074
151756
  return {
@@ -152098,7 +151780,7 @@ function arc$2$1() {
152098
151780
  context2.arc(0, 0, r0, a1, a0, cw2);
152099
151781
  }
152100
151782
  } else {
152101
- var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon$6 && (padRadius ? +padRadius.apply(this, arguments) : sqrt$2(r0 * r0 + r1 * r1)), rc = min$1(abs$2(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t02, t12;
151783
+ var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon$6 && (padRadius ? +padRadius.apply(this, arguments) : sqrt$2(r0 * r0 + r1 * r1)), rc = min$2(abs$2(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t02, t12;
152102
151784
  if (rp > epsilon$6) {
152103
151785
  var p02 = asin$2(rp / r0 * sin$2(ap)), p1 = asin$2(rp / r1 * sin$2(ap));
152104
151786
  if ((da0 -= p02 * 2) > epsilon$6)
@@ -152116,8 +151798,8 @@ function arc$2$1() {
152116
151798
  if (da < pi$3) {
152117
151799
  if (oc = intersect$3(x01, y01, x002, y002, x11, y11, x10, y10)) {
152118
151800
  var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin$2(acos$1((ax * bx + ay * by) / (sqrt$2(ax * ax + ay * ay) * sqrt$2(bx * bx + by * by))) / 2), lc = sqrt$2(oc[0] * oc[0] + oc[1] * oc[1]);
152119
- rc0 = min$1(rc, (r0 - lc) / (kc - 1));
152120
- rc1 = min$1(rc, (r1 - lc) / (kc + 1));
151801
+ rc0 = min$2(rc, (r0 - lc) / (kc - 1));
151802
+ rc1 = min$2(rc, (r1 - lc) / (kc + 1));
152121
151803
  } else {
152122
151804
  rc0 = rc1 = 0;
152123
151805
  }
@@ -153485,7 +153167,7 @@ function selection_order() {
153485
153167
  }
153486
153168
  function selection_sort(compare2) {
153487
153169
  if (!compare2)
153488
- compare2 = ascending$2;
153170
+ compare2 = ascending$3;
153489
153171
  function compareNode(a2, b2) {
153490
153172
  return a2 && b2 ? compare2(a2.__data__, b2.__data__) : !a2 - !b2;
153491
153173
  }
@@ -153499,7 +153181,7 @@ function selection_sort(compare2) {
153499
153181
  }
153500
153182
  return new Selection(sortgroups, this._parents).order();
153501
153183
  }
153502
- function ascending$2(a2, b2) {
153184
+ function ascending$3(a2, b2) {
153503
153185
  return a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
153504
153186
  }
153505
153187
  function selection_call() {
@@ -155026,6 +154708,291 @@ function extractArcs(topology, object2, filter2) {
155026
154708
  });
155027
154709
  return arcs;
155028
154710
  }
154711
+ function ascending$2(a2, b2) {
154712
+ return a2 == null || b2 == null ? NaN : a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
154713
+ }
154714
+ function descending$1(a2, b2) {
154715
+ return a2 == null || b2 == null ? NaN : b2 < a2 ? -1 : b2 > a2 ? 1 : b2 >= a2 ? 0 : NaN;
154716
+ }
154717
+ function bisector$1(f2) {
154718
+ let compare12, compare2, delta;
154719
+ if (f2.length !== 2) {
154720
+ compare12 = ascending$2;
154721
+ compare2 = (d, x2) => ascending$2(f2(d), x2);
154722
+ delta = (d, x2) => f2(d) - x2;
154723
+ } else {
154724
+ compare12 = f2 === ascending$2 || f2 === descending$1 ? f2 : zero$2;
154725
+ compare2 = f2;
154726
+ delta = f2;
154727
+ }
154728
+ function left2(a2, x2, lo = 0, hi = a2.length) {
154729
+ if (lo < hi) {
154730
+ if (compare12(x2, x2) !== 0)
154731
+ return hi;
154732
+ do {
154733
+ const mid = lo + hi >>> 1;
154734
+ if (compare2(a2[mid], x2) < 0)
154735
+ lo = mid + 1;
154736
+ else
154737
+ hi = mid;
154738
+ } while (lo < hi);
154739
+ }
154740
+ return lo;
154741
+ }
154742
+ function right2(a2, x2, lo = 0, hi = a2.length) {
154743
+ if (lo < hi) {
154744
+ if (compare12(x2, x2) !== 0)
154745
+ return hi;
154746
+ do {
154747
+ const mid = lo + hi >>> 1;
154748
+ if (compare2(a2[mid], x2) <= 0)
154749
+ lo = mid + 1;
154750
+ else
154751
+ hi = mid;
154752
+ } while (lo < hi);
154753
+ }
154754
+ return lo;
154755
+ }
154756
+ function center2(a2, x2, lo = 0, hi = a2.length) {
154757
+ const i2 = left2(a2, x2, lo, hi - 1);
154758
+ return i2 > lo && delta(a2[i2 - 1], x2) > -delta(a2[i2], x2) ? i2 - 1 : i2;
154759
+ }
154760
+ return { left: left2, center: center2, right: right2 };
154761
+ }
154762
+ function zero$2() {
154763
+ return 0;
154764
+ }
154765
+ function number$4(x2) {
154766
+ return x2 === null ? NaN : +x2;
154767
+ }
154768
+ function* numbers$2(values2, valueof) {
154769
+ if (valueof === void 0) {
154770
+ for (let value2 of values2) {
154771
+ if (value2 != null && (value2 = +value2) >= value2) {
154772
+ yield value2;
154773
+ }
154774
+ }
154775
+ } else {
154776
+ let index2 = -1;
154777
+ for (let value2 of values2) {
154778
+ if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
154779
+ yield value2;
154780
+ }
154781
+ }
154782
+ }
154783
+ }
154784
+ const ascendingBisect = bisector$1(ascending$2);
154785
+ const bisectRight$1 = ascendingBisect.right;
154786
+ const bisectLeft$1 = ascendingBisect.left;
154787
+ bisector$1(number$4).center;
154788
+ const bisect$1 = bisectRight$1;
154789
+ function variance(values2, valueof) {
154790
+ let count2 = 0;
154791
+ let delta;
154792
+ let mean2 = 0;
154793
+ let sum2 = 0;
154794
+ if (valueof === void 0) {
154795
+ for (let value2 of values2) {
154796
+ if (value2 != null && (value2 = +value2) >= value2) {
154797
+ delta = value2 - mean2;
154798
+ mean2 += delta / ++count2;
154799
+ sum2 += delta * (value2 - mean2);
154800
+ }
154801
+ }
154802
+ } else {
154803
+ let index2 = -1;
154804
+ for (let value2 of values2) {
154805
+ if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
154806
+ delta = value2 - mean2;
154807
+ mean2 += delta / ++count2;
154808
+ sum2 += delta * (value2 - mean2);
154809
+ }
154810
+ }
154811
+ }
154812
+ if (count2 > 1)
154813
+ return sum2 / (count2 - 1);
154814
+ }
154815
+ function deviation(values2, valueof) {
154816
+ const v = variance(values2, valueof);
154817
+ return v ? Math.sqrt(v) : v;
154818
+ }
154819
+ function permute(source2, keys3) {
154820
+ return Array.from(keys3, (key2) => source2[key2]);
154821
+ }
154822
+ function compareDefined(compare2 = ascending$2) {
154823
+ if (compare2 === ascending$2)
154824
+ return ascendingDefined;
154825
+ if (typeof compare2 !== "function")
154826
+ throw new TypeError("compare is not a function");
154827
+ return (a2, b2) => {
154828
+ const x2 = compare2(a2, b2);
154829
+ if (x2 || x2 === 0)
154830
+ return x2;
154831
+ return (compare2(b2, b2) === 0) - (compare2(a2, a2) === 0);
154832
+ };
154833
+ }
154834
+ function ascendingDefined(a2, b2) {
154835
+ return (a2 == null || !(a2 >= a2)) - (b2 == null || !(b2 >= b2)) || (a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
154836
+ }
154837
+ var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
154838
+ function tickStep(start, stop3, count2) {
154839
+ var step0 = Math.abs(stop3 - start) / Math.max(0, count2), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error2 = step0 / step1;
154840
+ if (error2 >= e10)
154841
+ step1 *= 10;
154842
+ else if (error2 >= e5)
154843
+ step1 *= 5;
154844
+ else if (error2 >= e2)
154845
+ step1 *= 2;
154846
+ return stop3 < start ? -step1 : step1;
154847
+ }
154848
+ function max$1(values2, valueof) {
154849
+ let max2;
154850
+ if (valueof === void 0) {
154851
+ for (const value2 of values2) {
154852
+ if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
154853
+ max2 = value2;
154854
+ }
154855
+ }
154856
+ } else {
154857
+ let index2 = -1;
154858
+ for (let value2 of values2) {
154859
+ if ((value2 = valueof(value2, ++index2, values2)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
154860
+ max2 = value2;
154861
+ }
154862
+ }
154863
+ }
154864
+ return max2;
154865
+ }
154866
+ function min$1(values2, valueof) {
154867
+ let min2;
154868
+ if (valueof === void 0) {
154869
+ for (const value2 of values2) {
154870
+ if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
154871
+ min2 = value2;
154872
+ }
154873
+ }
154874
+ } else {
154875
+ let index2 = -1;
154876
+ for (let value2 of values2) {
154877
+ if ((value2 = valueof(value2, ++index2, values2)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
154878
+ min2 = value2;
154879
+ }
154880
+ }
154881
+ }
154882
+ return min2;
154883
+ }
154884
+ function quickselect(array2, k, left2 = 0, right2 = array2.length - 1, compare2) {
154885
+ compare2 = compare2 === void 0 ? ascendingDefined : compareDefined(compare2);
154886
+ while (right2 > left2) {
154887
+ if (right2 - left2 > 600) {
154888
+ const n2 = right2 - left2 + 1;
154889
+ const m2 = k - left2 + 1;
154890
+ const z2 = Math.log(n2);
154891
+ const s2 = 0.5 * Math.exp(2 * z2 / 3);
154892
+ const sd = 0.5 * Math.sqrt(z2 * s2 * (n2 - s2) / n2) * (m2 - n2 / 2 < 0 ? -1 : 1);
154893
+ const newLeft = Math.max(left2, Math.floor(k - m2 * s2 / n2 + sd));
154894
+ const newRight = Math.min(right2, Math.floor(k + (n2 - m2) * s2 / n2 + sd));
154895
+ quickselect(array2, k, newLeft, newRight, compare2);
154896
+ }
154897
+ const t4 = array2[k];
154898
+ let i2 = left2;
154899
+ let j = right2;
154900
+ swap$1(array2, left2, k);
154901
+ if (compare2(array2[right2], t4) > 0)
154902
+ swap$1(array2, left2, right2);
154903
+ while (i2 < j) {
154904
+ swap$1(array2, i2, j), ++i2, --j;
154905
+ while (compare2(array2[i2], t4) < 0)
154906
+ ++i2;
154907
+ while (compare2(array2[j], t4) > 0)
154908
+ --j;
154909
+ }
154910
+ if (compare2(array2[left2], t4) === 0)
154911
+ swap$1(array2, left2, j);
154912
+ else
154913
+ ++j, swap$1(array2, j, right2);
154914
+ if (j <= k)
154915
+ left2 = j + 1;
154916
+ if (k <= j)
154917
+ right2 = j - 1;
154918
+ }
154919
+ return array2;
154920
+ }
154921
+ function swap$1(array2, i2, j) {
154922
+ const t4 = array2[i2];
154923
+ array2[i2] = array2[j];
154924
+ array2[j] = t4;
154925
+ }
154926
+ function quantile(values2, p, valueof) {
154927
+ values2 = Float64Array.from(numbers$2(values2, valueof));
154928
+ if (!(n2 = values2.length))
154929
+ return;
154930
+ if ((p = +p) <= 0 || n2 < 2)
154931
+ return min$1(values2);
154932
+ if (p >= 1)
154933
+ return max$1(values2);
154934
+ var n2, i2 = (n2 - 1) * p, i0 = Math.floor(i2), value0 = max$1(quickselect(values2, i0).subarray(0, i0 + 1)), value1 = min$1(values2.subarray(i0 + 1));
154935
+ return value0 + (value1 - value0) * (i2 - i0);
154936
+ }
154937
+ function quantileSorted(values2, p, valueof = number$4) {
154938
+ if (!(n2 = values2.length))
154939
+ return;
154940
+ if ((p = +p) <= 0 || n2 < 2)
154941
+ return +valueof(values2[0], 0, values2);
154942
+ if (p >= 1)
154943
+ return +valueof(values2[n2 - 1], n2 - 1, values2);
154944
+ var n2, i2 = (n2 - 1) * p, i0 = Math.floor(i2), value0 = +valueof(values2[i0], i0, values2), value1 = +valueof(values2[i0 + 1], i0 + 1, values2);
154945
+ return value0 + (value1 - value0) * (i2 - i0);
154946
+ }
154947
+ function mean(values2, valueof) {
154948
+ let count2 = 0;
154949
+ let sum2 = 0;
154950
+ if (valueof === void 0) {
154951
+ for (let value2 of values2) {
154952
+ if (value2 != null && (value2 = +value2) >= value2) {
154953
+ ++count2, sum2 += value2;
154954
+ }
154955
+ }
154956
+ } else {
154957
+ let index2 = -1;
154958
+ for (let value2 of values2) {
154959
+ if ((value2 = valueof(value2, ++index2, values2)) != null && (value2 = +value2) >= value2) {
154960
+ ++count2, sum2 += value2;
154961
+ }
154962
+ }
154963
+ }
154964
+ if (count2)
154965
+ return sum2 / count2;
154966
+ }
154967
+ function median(values2, valueof) {
154968
+ return quantile(values2, 0.5, valueof);
154969
+ }
154970
+ function range$4(start, stop3, step) {
154971
+ start = +start, stop3 = +stop3, step = (n2 = arguments.length) < 2 ? (stop3 = start, start = 0, 1) : n2 < 3 ? 1 : +step;
154972
+ var i2 = -1, n2 = Math.max(0, Math.ceil((stop3 - start) / step)) | 0, range2 = new Array(n2);
154973
+ while (++i2 < n2) {
154974
+ range2[i2] = start + i2 * step;
154975
+ }
154976
+ return range2;
154977
+ }
154978
+ function sum$1(values2, valueof) {
154979
+ let sum2 = 0;
154980
+ if (valueof === void 0) {
154981
+ for (let value2 of values2) {
154982
+ if (value2 = +value2) {
154983
+ sum2 += value2;
154984
+ }
154985
+ }
154986
+ } else {
154987
+ let index2 = -1;
154988
+ for (let value2 of values2) {
154989
+ if (value2 = +valueof(value2, ++index2, values2)) {
154990
+ sum2 += value2;
154991
+ }
154992
+ }
154993
+ }
154994
+ return sum2;
154995
+ }
155029
154996
  const YEAR = "year";
155030
154997
  const QUARTER = "quarter";
155031
154998
  const MONTH = "month";
@@ -155150,7 +155117,7 @@ function floor(units2, step, get3, inv, newDate2) {
155150
155117
  key2 = key2 || unit2;
155151
155118
  return getUnit(get3[key2], inv[key2], unit2 === b2 && s2, p);
155152
155119
  };
155153
- const t4 = /* @__PURE__ */ new Date(), u2 = toSet(units2), y2 = u2[YEAR] ? _(YEAR) : constant$6(2012), m2 = u2[MONTH] ? _(MONTH) : u2[QUARTER] ? _(QUARTER) : zero$4, d = u2[WEEK] && u2[DAY] ? _(DAY, 1, WEEK + DAY) : u2[WEEK] ? _(WEEK, 1) : u2[DAY] ? _(DAY, 1) : u2[DATE] ? _(DATE, 1) : u2[DAYOFYEAR] ? _(DAYOFYEAR, 1) : one$3, H = u2[HOURS] ? _(HOURS) : zero$4, M2 = u2[MINUTES] ? _(MINUTES) : zero$4, S = u2[SECONDS] ? _(SECONDS) : zero$4, L = u2[MILLISECONDS] ? _(MILLISECONDS) : zero$4;
155120
+ const t4 = /* @__PURE__ */ new Date(), u2 = toSet(units2), y2 = u2[YEAR] ? _(YEAR) : constant$6(2012), m2 = u2[MONTH] ? _(MONTH) : u2[QUARTER] ? _(QUARTER) : zero$5, d = u2[WEEK] && u2[DAY] ? _(DAY, 1, WEEK + DAY) : u2[WEEK] ? _(WEEK, 1) : u2[DAY] ? _(DAY, 1) : u2[DATE] ? _(DATE, 1) : u2[DAYOFYEAR] ? _(DAYOFYEAR, 1) : one$3, H = u2[HOURS] ? _(HOURS) : zero$5, M2 = u2[MINUTES] ? _(MINUTES) : zero$5, S = u2[SECONDS] ? _(SECONDS) : zero$5, L = u2[MILLISECONDS] ? _(MILLISECONDS) : zero$5;
155154
155121
  return function(v) {
155155
155122
  t4.setTime(+v);
155156
155123
  const year2 = y2(t4);
@@ -157267,7 +157234,7 @@ function* numbers$1(values2, valueof) {
157267
157234
  }
157268
157235
  function quantiles(array2, p, f2) {
157269
157236
  const values2 = Float64Array.from(numbers$1(array2, f2));
157270
- values2.sort(ascending$4);
157237
+ values2.sort(ascending$2);
157271
157238
  return p.map((_) => quantileSorted(values2, _));
157272
157239
  }
157273
157240
  function quartiles(array2, f2) {
@@ -157329,8 +157296,8 @@ function bootstrapCI(array2, samples, alpha2, f2) {
157329
157296
  }
157330
157297
  mu[j] = a2 / n2;
157331
157298
  }
157332
- mu.sort(ascending$4);
157333
- return [quantile$2(mu, alpha2 / 2), quantile$2(mu, 1 - alpha2 / 2)];
157299
+ mu.sort(ascending$2);
157300
+ return [quantile(mu, alpha2 / 2), quantile(mu, 1 - alpha2 / 2)];
157334
157301
  }
157335
157302
  function dotbin(array2, step, smooth, f2) {
157336
157303
  f2 = f2 || ((_) => _);
@@ -159753,8 +159720,8 @@ const Methods$1 = {
159753
159720
  value: "value",
159754
159721
  median,
159755
159722
  mean,
159756
- min: min$2,
159757
- max: max$2
159723
+ min: min$1,
159724
+ max: max$1
159758
159725
  };
159759
159726
  const Empty$1 = [];
159760
159727
  function Impute(params2) {
@@ -160237,7 +160204,7 @@ function pivotKeys(key2, limit, pulse2) {
160237
160204
  list.push(k);
160238
160205
  }
160239
160206
  });
160240
- list.sort(ascending$3);
160207
+ list.sort(ascending$4);
160241
160208
  return limit ? list.slice(0, limit) : list;
160242
160209
  }
160243
160210
  function PreFacet$1(params2) {
@@ -160693,7 +160660,7 @@ inherits(Values$1, Transform2, {
160693
160660
  function WindowOp(op, field2, param2, as) {
160694
160661
  const fn = WindowOps[op](field2, param2);
160695
160662
  return {
160696
- init: fn.init || zero$4,
160663
+ init: fn.init || zero$5,
160697
160664
  update: function(w2, t4) {
160698
160665
  t4[as] = fn.next(w2);
160699
160666
  }
@@ -161377,7 +161344,7 @@ scale$4("".concat(Diverging, "-").concat(Log2), divergingLog$1, [Continuous, Int
161377
161344
  scale$4("".concat(Diverging, "-").concat(Pow), divergingPow$1, [Continuous, Interpolating]);
161378
161345
  scale$4("".concat(Diverging, "-").concat(Sqrt), divergingSqrt$1, [Continuous, Interpolating]);
161379
161346
  scale$4("".concat(Diverging, "-").concat(Symlog), divergingSymlog$1, [Continuous, Interpolating]);
161380
- scale$4(Quantile, quantile$1, [Discretizing, Quantile]);
161347
+ scale$4(Quantile, quantile$2, [Discretizing, Quantile]);
161381
161348
  scale$4(Quantize, quantize$3, Discretizing);
161382
161349
  scale$4(Threshold, threshold$1, Discretizing);
161383
161350
  scale$4(BinOrdinal, scaleBinOrdinal, [Discrete$1, Discretizing]);
@@ -163182,9 +163149,9 @@ function transformItem(item) {
163182
163149
  return translate$2(item.x || 0, item.y || 0) + (item.angle ? " " + rotate(item.angle) : "") + (item.scaleX || item.scaleY ? " " + scale$3(item.scaleX || 1, item.scaleY || 1) : "");
163183
163150
  }
163184
163151
  function markItemPath(type2, shape2, isect) {
163185
- function attr2(emit3, item) {
163186
- emit3("transform", rotateItem(item));
163187
- emit3("d", shape2(null, item));
163152
+ function attr2(emit2, item) {
163153
+ emit2("transform", rotateItem(item));
163154
+ emit2("d", shape2(null, item));
163188
163155
  }
163189
163156
  function bound2(bounds2, item) {
163190
163157
  shape2(boundContext(bounds2, item.angle), item);
@@ -163254,10 +163221,10 @@ function pickTrail(a2, p) {
163254
163221
  return null;
163255
163222
  }
163256
163223
  function markMultiItemPath(type2, shape2, tip) {
163257
- function attr2(emit3, item) {
163224
+ function attr2(emit2, item) {
163258
163225
  var items = item.mark.items;
163259
163226
  if (items.length)
163260
- emit3("d", shape2(null, items));
163227
+ emit2("d", shape2(null, items));
163261
163228
  }
163262
163229
  function bound2(bounds2, mark2) {
163263
163230
  var items = mark2.items;
@@ -163315,30 +163282,30 @@ function offset$1(item) {
163315
163282
  const sw = value$2(item.strokeWidth, 1);
163316
163283
  return item.strokeOffset != null ? item.strokeOffset : item.stroke && sw > 0.5 && sw < 1.5 ? 0.5 - Math.abs(sw - 1) : 0;
163317
163284
  }
163318
- function attr$5(emit3, item) {
163319
- emit3("transform", translateItem(item));
163285
+ function attr$5(emit2, item) {
163286
+ emit2("transform", translateItem(item));
163320
163287
  }
163321
- function emitRectangle(emit3, item) {
163288
+ function emitRectangle(emit2, item) {
163322
163289
  const off = offset$1(item);
163323
- emit3("d", rectangle(null, item, off, off));
163290
+ emit2("d", rectangle(null, item, off, off));
163324
163291
  }
163325
- function background$1(emit3, item) {
163326
- emit3("class", "background");
163327
- emit3("aria-hidden", true);
163328
- emitRectangle(emit3, item);
163292
+ function background$1(emit2, item) {
163293
+ emit2("class", "background");
163294
+ emit2("aria-hidden", true);
163295
+ emitRectangle(emit2, item);
163329
163296
  }
163330
- function foreground(emit3, item) {
163331
- emit3("class", "foreground");
163332
- emit3("aria-hidden", true);
163297
+ function foreground(emit2, item) {
163298
+ emit2("class", "foreground");
163299
+ emit2("aria-hidden", true);
163333
163300
  if (item.strokeForeground) {
163334
- emitRectangle(emit3, item);
163301
+ emitRectangle(emit2, item);
163335
163302
  } else {
163336
- emit3("d", "");
163303
+ emit2("d", "");
163337
163304
  }
163338
163305
  }
163339
- function content(emit3, item, renderer) {
163306
+ function content(emit2, item, renderer) {
163340
163307
  const url = item.clip ? clip$1$1(renderer, item, item) : null;
163341
- emit3("clip-path", url);
163308
+ emit2("clip-path", url);
163342
163309
  }
163343
163310
  function bound$5(bounds2, group2) {
163344
163311
  if (!group2.clip && group2.items) {
@@ -163479,13 +163446,13 @@ function imageXOffset(align2, w2) {
163479
163446
  function imageYOffset(baseline2, h2) {
163480
163447
  return baseline2 === "middle" ? h2 / 2 : baseline2 === "bottom" ? h2 : 0;
163481
163448
  }
163482
- function attr$4(emit3, item, renderer) {
163449
+ function attr$4(emit2, item, renderer) {
163483
163450
  const img = getImage(item, renderer), w2 = imageWidth(item, img), h2 = imageHeight(item, img), x2 = (item.x || 0) - imageXOffset(item.align, w2), y2 = (item.y || 0) - imageYOffset(item.baseline, h2), i2 = !img.src && img.toDataURL ? img.toDataURL() : img.src || "";
163484
- emit3("href", i2, metadata["xmlns:xlink"], "xlink:href");
163485
- emit3("transform", translate$2(x2, y2));
163486
- emit3("width", w2);
163487
- emit3("height", h2);
163488
- emit3("preserveAspectRatio", item.aspect === false ? "none" : "xMidYMid");
163451
+ emit2("href", i2, metadata["xmlns:xlink"], "xlink:href");
163452
+ emit2("transform", translate$2(x2, y2));
163453
+ emit2("width", w2);
163454
+ emit2("height", h2);
163455
+ emit2("preserveAspectRatio", item.aspect === false ? "none" : "xMidYMid");
163489
163456
  }
163490
163457
  function bound$4(bounds2, item) {
163491
163458
  const img = item.image, w2 = imageWidth(item, img), h2 = imageHeight(item, img), x2 = (item.x || 0) - imageXOffset(item.align, w2), y2 = (item.y || 0) - imageYOffset(item.baseline, h2);
@@ -163539,13 +163506,13 @@ var image$1 = {
163539
163506
  yOffset: imageYOffset
163540
163507
  };
163541
163508
  var line$2 = markMultiItemPath("line", line$1$1, pickLine);
163542
- function attr$3(emit3, item) {
163509
+ function attr$3(emit2, item) {
163543
163510
  var sx = item.scaleX || 1, sy = item.scaleY || 1;
163544
163511
  if (sx !== 1 || sy !== 1) {
163545
- emit3("vector-effect", "non-scaling-stroke");
163512
+ emit2("vector-effect", "non-scaling-stroke");
163546
163513
  }
163547
- emit3("transform", transformItem(item));
163548
- emit3("d", item.path);
163514
+ emit2("transform", transformItem(item));
163515
+ emit2("d", item.path);
163549
163516
  }
163550
163517
  function path$1(context2, item) {
163551
163518
  var path2 = item.path;
@@ -163578,8 +163545,8 @@ var path$2 = {
163578
163545
  pick: pickPath(path$1),
163579
163546
  isect: intersectPath(path$1)
163580
163547
  };
163581
- function attr$2(emit3, item) {
163582
- emit3("d", rectangle(null, item));
163548
+ function attr$2(emit2, item) {
163549
+ emit2("d", rectangle(null, item));
163583
163550
  }
163584
163551
  function bound$2(bounds2, item) {
163585
163552
  var x2, y2;
@@ -163599,10 +163566,10 @@ var rect$1 = {
163599
163566
  pick: pickPath(draw$2),
163600
163567
  isect: intersectRect
163601
163568
  };
163602
- function attr$1(emit3, item) {
163603
- emit3("transform", translateItem(item));
163604
- emit3("x2", item.x2 != null ? item.x2 - (item.x || 0) : 0);
163605
- emit3("y2", item.y2 != null ? item.y2 - (item.y || 0) : 0);
163569
+ function attr$1(emit2, item) {
163570
+ emit2("transform", translateItem(item));
163571
+ emit2("x2", item.x2 != null ? item.x2 - (item.x || 0) : 0);
163572
+ emit2("y2", item.y2 != null ? item.y2 - (item.y || 0) : 0);
163606
163573
  }
163607
163574
  function bound$1(bounds2, item) {
163608
163575
  var x12, y12;
@@ -163764,9 +163731,9 @@ function anchorPoint(item) {
163764
163731
  tempBounds$1.y1 = y2;
163765
163732
  return tempBounds$1;
163766
163733
  }
163767
- function attr(emit3, item) {
163734
+ function attr(emit2, item) {
163768
163735
  var dx = item.dx || 0, dy = (item.dy || 0) + offset$2(item), p = anchorPoint(item), x2 = p.x1, y2 = p.y1, a2 = item.angle || 0, t4;
163769
- emit3("text-anchor", textAlign[item.align] || "start");
163736
+ emit2("text-anchor", textAlign[item.align] || "start");
163770
163737
  if (a2) {
163771
163738
  t4 = translate$2(x2, y2) + " " + rotate(a2);
163772
163739
  if (dx || dy)
@@ -163774,7 +163741,7 @@ function attr(emit3, item) {
163774
163741
  } else {
163775
163742
  t4 = translate$2(x2 + dx, y2 + dy);
163776
163743
  }
163777
- emit3("transform", t4);
163744
+ emit2("transform", t4);
163778
163745
  }
163779
163746
  function bound(bounds2, item, mode) {
163780
163747
  var h2 = textMetrics.height(item), a2 = item.align, p = anchorPoint(item), x2 = p.x1, y2 = p.y1, dx = item.dx || 0, dy = (item.dy || 0) + offset$2(item) - Math.round(0.8 * h2), tl2 = textLines(item), w2;
@@ -164801,18 +164768,18 @@ const AriaEncode = {
164801
164768
  ariaRoleDescription: ARIA_ROLEDESCRIPTION,
164802
164769
  description: ARIA_LABEL
164803
164770
  };
164804
- function ariaItemAttributes(emit3, item) {
164771
+ function ariaItemAttributes(emit2, item) {
164805
164772
  const hide = item.aria === false;
164806
- emit3(ARIA_HIDDEN, hide || void 0);
164773
+ emit2(ARIA_HIDDEN, hide || void 0);
164807
164774
  if (hide || item.description == null) {
164808
164775
  for (const prop in AriaEncode) {
164809
- emit3(AriaEncode[prop], void 0);
164776
+ emit2(AriaEncode[prop], void 0);
164810
164777
  }
164811
164778
  } else {
164812
164779
  const type2 = item.mark.marktype;
164813
- emit3(ARIA_LABEL, item.description);
164814
- emit3(ARIA_ROLE, item.ariaRole || (type2 === "group" ? GRAPHICS_OBJECT : GRAPHICS_SYMBOL));
164815
- emit3(ARIA_ROLEDESCRIPTION, item.ariaRoleDescription || "".concat(type2, " mark"));
164780
+ emit2(ARIA_LABEL, item.description);
164781
+ emit2(ARIA_ROLE, item.ariaRole || (type2 === "group" ? GRAPHICS_OBJECT : GRAPHICS_SYMBOL));
164782
+ emit2(ARIA_ROLEDESCRIPTION, item.ariaRoleDescription || "".concat(type2, " mark"));
164816
164783
  }
164817
164784
  }
164818
164785
  function ariaMarkAttributes(mark2) {
@@ -165178,8 +165145,8 @@ inherits(SVGRenderer, Renderer, {
165178
165145
  _update(mdef, el2, item) {
165179
165146
  element$1 = el2;
165180
165147
  values$3 = el2.__values__;
165181
- ariaItemAttributes(emit2, item);
165182
- mdef.attr(emit2, item, this);
165148
+ ariaItemAttributes(emit, item);
165149
+ mdef.attr(emit, item, this);
165183
165150
  const extra = mark_extras[mdef.type];
165184
165151
  if (extra)
165185
165152
  extra.call(this, mdef, el2, item);
@@ -165366,12 +165333,12 @@ const mark_extras = {
165366
165333
  group(mdef, el2, item) {
165367
165334
  const fg = element$1 = el2.childNodes[2];
165368
165335
  values$3 = fg.__values__;
165369
- mdef.foreground(emit2, item, this);
165336
+ mdef.foreground(emit, item, this);
165370
165337
  values$3 = el2.__values__;
165371
165338
  element$1 = el2.childNodes[1];
165372
- mdef.content(emit2, item, this);
165339
+ mdef.content(emit, item, this);
165373
165340
  const bg = element$1 = el2.childNodes[0];
165374
- mdef.background(emit2, item, this);
165341
+ mdef.background(emit, item, this);
165375
165342
  const value2 = item.mark.interactive === false ? "none" : null;
165376
165343
  if (value2 !== values$3.events) {
165377
165344
  setAttribute(fg, "pointer-events", value2);
@@ -165438,7 +165405,7 @@ const mark_extras = {
165438
165405
  setAttribute(el2, "font-weight", item.fontWeight);
165439
165406
  }
165440
165407
  };
165441
- function emit2(name2, value2, ns2) {
165408
+ function emit(name2, value2, ns2) {
165442
165409
  if (value2 === values$3[name2])
165443
165410
  return;
165444
165411
  if (ns2) {
@@ -165617,13 +165584,13 @@ inherits(SVGStringRenderer, Renderer, {
165617
165584
  * @param {string} tag - The tag being rendered.
165618
165585
  */
165619
165586
  attr(scene, item, attrs, tag) {
165620
- const object2 = {}, emit3 = (name2, value2, ns2, prefixed2) => {
165587
+ const object2 = {}, emit2 = (name2, value2, ns2, prefixed2) => {
165621
165588
  object2[prefixed2 || name2] = value2;
165622
165589
  };
165623
165590
  if (Array.isArray(attrs)) {
165624
- attrs.forEach((fn) => fn(emit3, item, this));
165591
+ attrs.forEach((fn) => fn(emit2, item, this));
165625
165592
  } else {
165626
- attrs(emit3, item, this);
165593
+ attrs(emit2, item, this);
165627
165594
  }
165628
165595
  if (tag) {
165629
165596
  style(object2, item, scene, tag, this._defs);
@@ -168674,7 +168641,7 @@ function clipRectangle(x02, y02, x12, y12) {
168674
168641
  };
168675
168642
  }
168676
168643
  function graticuleX(y02, y12, dy) {
168677
- var y2 = range$4(y02, y12 - epsilon$3, dy).concat(y12);
168644
+ var y2 = range$5(y02, y12 - epsilon$3, dy).concat(y12);
168678
168645
  return function(x2) {
168679
168646
  return y2.map(function(y22) {
168680
168647
  return [x2, y22];
@@ -168682,7 +168649,7 @@ function graticuleX(y02, y12, dy) {
168682
168649
  };
168683
168650
  }
168684
168651
  function graticuleY(x02, x12, dx) {
168685
- var x2 = range$4(x02, x12 - epsilon$3, dx).concat(x12);
168652
+ var x2 = range$5(x02, x12 - epsilon$3, dx).concat(x12);
168686
168653
  return function(y2) {
168687
168654
  return x2.map(function(x22) {
168688
168655
  return [x22, y2];
@@ -168695,9 +168662,9 @@ function graticule() {
168695
168662
  return { type: "MultiLineString", coordinates: lines() };
168696
168663
  }
168697
168664
  function lines() {
168698
- return range$4(ceil(X02 / DX) * DX, X12, DX).map(X3).concat(range$4(ceil(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$4(ceil(x02 / dx) * dx, x12, dx).filter(function(x22) {
168665
+ return range$5(ceil(X02 / DX) * DX, X12, DX).map(X3).concat(range$5(ceil(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$5(ceil(x02 / dx) * dx, x12, dx).filter(function(x22) {
168699
168666
  return abs$1(x22 % DX) > epsilon$3;
168700
- }).map(x2)).concat(range$4(ceil(y02 / dy) * dy, y12, dy).filter(function(y22) {
168667
+ }).map(x2)).concat(range$5(ceil(y02 / dy) * dy, y12, dy).filter(function(y22) {
168701
168668
  return abs$1(y22 % DY) > epsilon$3;
168702
168669
  }).map(y2));
168703
168670
  }
@@ -170108,7 +170075,7 @@ inherits(Isocontour, Transform2, {
170108
170075
  });
170109
170076
  function levels(values2, f2, _) {
170110
170077
  const q = quantize(_.levels || 10, _.nice, _.zero !== false);
170111
- return _.resolve !== "shared" ? q : q(values2.map((t4) => max$2(f2(t4).values)));
170078
+ return _.resolve !== "shared" ? q : q(values2.map((t4) => max$1(f2(t4).values)));
170112
170079
  }
170113
170080
  function transformPaths(paths, grid, datum2, _) {
170114
170081
  let s2 = _.scale || grid.scale, t4 = _.translate || grid.translate;
@@ -170741,13 +170708,13 @@ inherits(Heatmap, Transform2, {
170741
170708
  $x: 0,
170742
170709
  $y: 0,
170743
170710
  $value: 0,
170744
- $max: shared ? max$2(source2.map((t4) => max$2(field2(t4).values))) : 0
170711
+ $max: shared ? max$1(source2.map((t4) => max$1(field2(t4).values))) : 0
170745
170712
  };
170746
170713
  source2.forEach((t4) => {
170747
170714
  const v = field2(t4);
170748
170715
  const o2 = extend$1({}, t4, obj);
170749
170716
  if (!shared)
170750
- o2.$max = max$2(v.values || []);
170717
+ o2.$max = max$1(v.values || []);
170751
170718
  t4[as] = toCanvas(v, o2, color2.dep ? color2 : constant$6(color2(o2)), opacity2.dep ? opacity2 : constant$6(opacity2(o2)));
170752
170719
  });
170753
170720
  return pulse2.reflow(true).modifies(as);
@@ -170783,7 +170750,7 @@ function dependency(f2) {
170783
170750
  return set3.$x || set3.$y || set3.$value || set3.$max;
170784
170751
  }
170785
170752
  function toCanvas(grid, obj, color2, opacity2) {
170786
- const n2 = grid.width, m2 = grid.height, x12 = grid.x1 || 0, y12 = grid.y1 || 0, x2 = grid.x2 || n2, y2 = grid.y2 || m2, val = grid.values, value2 = val ? (i2) => val[i2] : zero$4, can = domCanvas(x2 - x12, y2 - y12), ctx = can.getContext("2d"), img = ctx.getImageData(0, 0, x2 - x12, y2 - y12), pix = img.data;
170753
+ const n2 = grid.width, m2 = grid.height, x12 = grid.x1 || 0, y12 = grid.y1 || 0, x2 = grid.x2 || n2, y2 = grid.y2 || m2, val = grid.values, value2 = val ? (i2) => val[i2] : zero$5, can = domCanvas(x2 - x12, y2 - y12), ctx = can.getContext("2d"), img = ctx.getImageData(0, 0, x2 - x12, y2 - y12), pix = img.data;
170787
170754
  for (let j = y12, k = 0; j < y2; ++j) {
170788
170755
  obj.$y = j - y12;
170789
170756
  for (let i2 = x12, r3 = j * n2; i2 < x2; ++i2, k += 4) {
@@ -179586,14 +179553,14 @@ function hover(hoverSet, leaveSet) {
179586
179553
  return this;
179587
179554
  }
179588
179555
  function finalize() {
179589
- var tooltip2 = this._tooltip, timers = this._timers, listeners2 = this._eventListeners, n2, m2, e3;
179556
+ var tooltip2 = this._tooltip, timers = this._timers, listeners = this._eventListeners, n2, m2, e3;
179590
179557
  n2 = timers.length;
179591
179558
  while (--n2 >= 0) {
179592
179559
  timers[n2].stop();
179593
179560
  }
179594
- n2 = listeners2.length;
179561
+ n2 = listeners.length;
179595
179562
  while (--n2 >= 0) {
179596
- e3 = listeners2[n2];
179563
+ e3 = listeners[n2];
179597
179564
  m2 = e3.sources.length;
179598
179565
  while (--m2 >= 0) {
179599
179566
  e3.sources[m2].removeEventListener(e3.type, e3.handler);
@@ -183786,7 +183753,7 @@ const vegaImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
183786
183753
  accessorFields,
183787
183754
  accessorName,
183788
183755
  array: array$6,
183789
- ascending: ascending$3,
183756
+ ascending: ascending$4,
183790
183757
  bandwidthNRD: estimateBandwidth,
183791
183758
  bin: bin$1,
183792
183759
  bootstrapCI,
@@ -183967,7 +183934,7 @@ const vegaImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
183967
183934
  visitArray,
183968
183935
  week,
183969
183936
  writeConfig,
183970
- zero: zero$4,
183937
+ zero: zero$5,
183971
183938
  zoomLinear,
183972
183939
  zoomLog,
183973
183940
  zoomPow,
@@ -204077,9 +204044,9 @@ var debug_1 = debug$1;
204077
204044
  var re2 = exports2.re = [];
204078
204045
  var src = exports2.src = [];
204079
204046
  var t4 = exports2.t = {};
204080
- var R2 = 0;
204047
+ var R = 0;
204081
204048
  var createToken = (name2, value2, isGlobal) => {
204082
- var index2 = R2++;
204049
+ var index2 = R++;
204083
204050
  debug2(name2, index2, value2);
204084
204051
  t4[name2] = index2;
204085
204052
  src[index2] = value2;
@@ -207102,6 +207069,30 @@ function FeatureBarPlotSubscriber(props) {
207102
207069
  }
207103
207070
  );
207104
207071
  }
207072
+ function createOrdinalScale(domainArr, rangeArr) {
207073
+ return (queryVal) => {
207074
+ const i2 = domainArr.findIndex((domainVal) => isEqual$2(domainVal, queryVal));
207075
+ return rangeArr[i2];
207076
+ };
207077
+ }
207078
+ function getColorScale(setSelectionArr, setColorArr, theme) {
207079
+ var _a2;
207080
+ const domainArr = setSelectionArr || [];
207081
+ const rangeArr = ((_a2 = setSelectionArr == null ? void 0 : setSelectionArr.map((setNamePath) => {
207082
+ var _a3;
207083
+ return ((_a3 = setColorArr == null ? void 0 : setColorArr.find((d) => isEqual$2(d.path, setNamePath))) == null ? void 0 : _a3.color) || getDefaultColor(theme);
207084
+ })) == null ? void 0 : _a2.map(colorArrayToString)) || [];
207085
+ return createOrdinalScale(domainArr, rangeArr);
207086
+ }
207087
+ function useRawSetPaths(columnNameMapping, setPaths) {
207088
+ return useMemo(() => setPaths == null ? void 0 : setPaths.map((setPath) => {
207089
+ const newSetPath = [...setPath];
207090
+ if ((newSetPath == null ? void 0 : newSetPath[0]) && columnNameMapping[newSetPath[0]]) {
207091
+ newSetPath[0] = columnNameMapping[newSetPath[0]];
207092
+ }
207093
+ return newSetPath;
207094
+ }), [columnNameMapping, setPaths]);
207095
+ }
207105
207096
  function uidGenerator(prefix2) {
207106
207097
  let i2 = 0;
207107
207098
  return () => {
@@ -207109,15 +207100,6 @@ function uidGenerator(prefix2) {
207109
207100
  return { id: `${prefix2}-${i2}`, href: `#${prefix2}-${i2}` };
207110
207101
  };
207111
207102
  }
207112
- function getColorScale(setSelectionArr, setColorArr, theme) {
207113
- var _a2;
207114
- return ordinal$1().domain(setSelectionArr || []).range(
207115
- ((_a2 = setSelectionArr == null ? void 0 : setSelectionArr.map((setNamePath) => {
207116
- var _a3;
207117
- return ((_a3 = setColorArr == null ? void 0 : setColorArr.find((d) => isEqual$2(d.path, setNamePath))) == null ? void 0 : _a3.color) || getDefaultColor(theme);
207118
- })) == null ? void 0 : _a2.map(colorArrayToString)) || []
207119
- );
207120
- }
207121
207103
  function Treemap(props) {
207122
207104
  const {
207123
207105
  obsCounts,
@@ -207135,7 +207117,8 @@ function Treemap(props) {
207135
207117
  marginTop = 5,
207136
207118
  marginRight = 5,
207137
207119
  marginLeft = 80,
207138
- marginBottom
207120
+ marginBottom,
207121
+ onNodeClick
207139
207122
  } = props;
207140
207123
  const hierarchyData = useMemo(() => {
207141
207124
  if (!obsCounts) {
@@ -207200,7 +207183,11 @@ function Treemap(props) {
207200
207183
  leaf.append("rect").attr("id", (d) => {
207201
207184
  d.leafUid = getLeafUid();
207202
207185
  return d.leafUid.id;
207203
- }).attr("fill", (d) => colorScale2(getPathForColoring(d))).attr("fill-opacity", 0.8).attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
207186
+ }).attr("fill", (d) => colorScale2(getPathForColoring(d))).attr("fill-opacity", 0.8).attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0).on("click", (e3, d) => {
207187
+ var _a2, _b, _c;
207188
+ const obsSetPath = hierarchyLevels[0] === "obsSet" ? (_b = (_a2 = d.parent) == null ? void 0 : _a2.data) == null ? void 0 : _b[0] : (_c = d.data) == null ? void 0 : _c[0];
207189
+ onNodeClick(obsSetPath);
207190
+ });
207204
207191
  leaf.append("clipPath").attr("id", (d) => {
207205
207192
  d.clipUid = getClipUid();
207206
207193
  return d.clipUid.id;
@@ -207232,7 +207219,8 @@ function Treemap(props) {
207232
207219
  obsSetColorScale,
207233
207220
  sampleSetColorScale,
207234
207221
  obsColorEncoding,
207235
- hierarchyLevels
207222
+ hierarchyLevels,
207223
+ onNodeClick
207236
207224
  ]);
207237
207225
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
207238
207226
  "svg",
@@ -207504,9 +207492,13 @@ function TreemapSubscriber(props) {
207504
207492
  sampleSetColor,
207505
207493
  mergedObsSets,
207506
207494
  obsSetSelection,
207507
- mergedSampleSets
207495
+ mergedSampleSets,
207496
+ sampleSetSelection
207508
207497
  // TODO: consider filtering-related coordination values
207509
207498
  ]);
207499
+ const onNodeClick = useCallback((obsSetPath) => {
207500
+ setObsSetSelection([obsSetPath]);
207501
+ }, [setObsSetSelection]);
207510
207502
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
207511
207503
  TitleInfo,
207512
207504
  {
@@ -207543,9 +207535,1033 @@ function TreemapSubscriber(props) {
207543
207535
  obsSetColor,
207544
207536
  sampleSetColor,
207545
207537
  obsSetSelection,
207546
- sampleSetSelection
207538
+ sampleSetSelection,
207539
+ onNodeClick
207540
+ }
207541
+ ) })
207542
+ }
207543
+ );
207544
+ }
207545
+ function VolcanoPlot(props) {
207546
+ const {
207547
+ theme,
207548
+ width: width2,
207549
+ height: height2,
207550
+ obsType,
207551
+ featureType,
207552
+ obsSetsColumnNameMapping,
207553
+ sampleSetsColumnNameMapping,
207554
+ sampleSetSelection,
207555
+ obsSetSelection,
207556
+ obsSetColor,
207557
+ sampleSetColor,
207558
+ data: data2,
207559
+ marginTop = 5,
207560
+ marginRight = 5,
207561
+ marginLeft = 50,
207562
+ marginBottom = 50,
207563
+ onFeatureClick,
207564
+ featurePointSignificanceThreshold,
207565
+ featurePointFoldChangeThreshold,
207566
+ featureLabelSignificanceThreshold,
207567
+ featureLabelFoldChangeThreshold
207568
+ } = props;
207569
+ const svgRef = useRef();
207570
+ const computedData = useMemo(() => data2.map((d) => ({
207571
+ ...d,
207572
+ df: {
207573
+ ...d.df,
207574
+ minusLog10p: d.df.featureSignificance.map((v) => -Math.log10(v)),
207575
+ logFoldChange: d.df.featureFoldChange.map((v) => Math.log2(v))
207576
+ }
207577
+ })), [data2]);
207578
+ const [xExtent, yExtent] = useMemo(() => {
207579
+ if (!computedData) {
207580
+ return [null, null];
207581
+ }
207582
+ let xExtentResult = d3_extent(
207583
+ computedData.flatMap((d) => d3_extent(d.df.logFoldChange))
207584
+ );
207585
+ const xAbsMax = Math.max(Math.abs(xExtentResult[0]), Math.abs(xExtentResult[1]));
207586
+ xExtentResult = [-xAbsMax, xAbsMax];
207587
+ const yExtentResult = d3_extent(
207588
+ computedData.flatMap((d) => d3_extent(d.df.minusLog10p.filter((v) => Number.isFinite(v))))
207589
+ );
207590
+ return [xExtentResult, yExtentResult];
207591
+ }, [computedData]);
207592
+ const [obsSetColorScale, sampleSetColorScale] = useMemo(() => [
207593
+ getColorScale(obsSetSelection, obsSetColor, theme),
207594
+ getColorScale(sampleSetSelection, sampleSetColor, theme)
207595
+ ], [obsSetSelection, sampleSetSelection, sampleSetColor, obsSetColor, theme]);
207596
+ useEffect(() => {
207597
+ var _a2;
207598
+ const domElement = svgRef.current;
207599
+ const svg = select$1(domElement);
207600
+ svg.selectAll("g").remove();
207601
+ svg.attr("width", width2).attr("height", height2).attr("viewBox", [0, 0, width2, height2]).attr("style", "font: 10px sans-serif");
207602
+ if (!computedData || !xExtent || !yExtent) {
207603
+ return;
207604
+ }
207605
+ const innerWidth = width2 - marginLeft;
207606
+ const innerHeight = height2 - marginBottom;
207607
+ const xScale = linear$4().range([marginLeft, width2 - marginRight]).domain(xExtent);
207608
+ const yScale = linear$4().domain(yExtent).range([innerHeight, marginTop]).clamp(true);
207609
+ svg.append("g").attr("transform", `translate(0,${height2 - marginBottom})`).call(axisBottom(xScale));
207610
+ svg.append("g").attr("transform", `translate(${marginLeft},0)`).call(axisLeft(yScale));
207611
+ const titleG = svg.append("g");
207612
+ const fgColor = colorArrayToString(
207613
+ getDefaultForegroundColor(theme)
207614
+ );
207615
+ titleG.append("text").attr("text-anchor", "middle").attr("x", -innerHeight / 2).attr("y", 15).attr("transform", "rotate(-90)").text("-log10 p-value").style("font-size", "12px").style("fill", fgColor);
207616
+ titleG.append("text").attr("text-anchor", "middle").attr("x", marginLeft + innerWidth / 2).attr("y", height2 - 10).text("log2 fold-change").style("font-size", "12px").style("fill", fgColor);
207617
+ const obsSetsColumnNameMappingReversed = Object.fromEntries(
207618
+ Object.entries(obsSetsColumnNameMapping).map(([key2, value2]) => [value2, key2])
207619
+ );
207620
+ const sampleSetsColumnNameMappingReversed = Object.fromEntries(
207621
+ Object.entries(sampleSetsColumnNameMapping).map(([key2, value2]) => [value2, key2])
207622
+ );
207623
+ const ruleColor = "silver";
207624
+ const ruleDash = "2,2";
207625
+ titleG.append("line").attr("x1", xScale(featurePointFoldChangeThreshold)).attr("x2", xScale(featurePointFoldChangeThreshold)).attr("y1", yScale.range()[0]).attr("y2", yScale.range()[1]).style("stroke", ruleColor).style("stroke-dasharray", ruleDash);
207626
+ titleG.append("line").attr("x1", xScale(-featurePointFoldChangeThreshold)).attr("x2", xScale(-featurePointFoldChangeThreshold)).attr("y1", yScale.range()[0]).attr("y2", yScale.range()[1]).style("stroke", ruleColor).style("stroke-dasharray", ruleDash);
207627
+ titleG.append("line").attr("x1", xScale.range()[0]).attr("x2", xScale.range()[1]).attr("y1", yScale(-Math.log10(featurePointSignificanceThreshold))).attr("y2", yScale(-Math.log10(featurePointSignificanceThreshold))).style("stroke", ruleColor).style("stroke-dasharray", ruleDash);
207628
+ const lhsText = sampleSetSelection && sampleSetSelection.length === 2 ? sampleSetSelection[0].at(-1) : "__rest__";
207629
+ const rhsText = sampleSetSelection && sampleSetSelection.length === 2 ? sampleSetSelection[1].at(-1) : obsSetSelection && obsSetSelection.length === 1 ? (_a2 = obsSetSelection == null ? void 0 : obsSetSelection[0]) == null ? void 0 : _a2.at(-1) : `${capitalize$2(obsType)} Set`;
207630
+ titleG.append("text").attr("text-anchor", "start").attr("x", marginLeft).attr("y", height2 - 10).text(`← ${lhsText}`).style("font-size", "12px").style("fill", fgColor);
207631
+ titleG.append("text").attr("text-anchor", "end").attr("x", marginLeft + innerWidth).attr("y", height2 - 10).text(`${rhsText} →`).style("font-size", "12px").style("fill", fgColor);
207632
+ const g2 = svg.append("g");
207633
+ computedData.forEach((comparisonObject) => {
207634
+ const obsSetG = g2.append("g");
207635
+ const { df, metadata: metadata2 } = comparisonObject;
207636
+ const coordinationValues = metadata2.coordination_values;
207637
+ const rawObsSetPath = coordinationValues.obsSetFilter ? coordinationValues.obsSetFilter[0] : coordinationValues.obsSetSelection[0];
207638
+ const obsSetPath = [...rawObsSetPath];
207639
+ obsSetPath[0] = obsSetsColumnNameMappingReversed[rawObsSetPath[0]];
207640
+ let shouldSwapFoldChangeDirection = false;
207641
+ if (coordinationValues.sampleSetFilter && coordinationValues.sampleSetFilter.length === 2) {
207642
+ const rawSampleSetPathA = coordinationValues.sampleSetFilter[0];
207643
+ const sampleSetPathA = [...rawSampleSetPathA];
207644
+ sampleSetPathA[0] = sampleSetsColumnNameMappingReversed[rawSampleSetPathA[0]];
207645
+ const rawSampleSetPathB = coordinationValues.sampleSetFilter[1];
207646
+ const sampleSetPathB = [...rawSampleSetPathB];
207647
+ sampleSetPathB[0] = sampleSetsColumnNameMappingReversed[rawSampleSetPathB[0]];
207648
+ if (isEqual$2(sampleSetPathA, sampleSetSelection[1]) && isEqual$2(sampleSetPathB, sampleSetSelection[0])) {
207649
+ shouldSwapFoldChangeDirection = true;
207650
+ }
207651
+ }
207652
+ const filteredDf = df.featureId.map((featureId, i2) => ({
207653
+ featureId,
207654
+ logFoldChange: df.logFoldChange[i2] * (shouldSwapFoldChangeDirection ? -1 : 1),
207655
+ featureSignificance: df.featureSignificance[i2],
207656
+ minusLog10p: df.minusLog10p[i2]
207657
+ })).filter((d) => Math.abs(d.logFoldChange) >= (featurePointFoldChangeThreshold ?? 1) && d.featureSignificance <= (featurePointSignificanceThreshold ?? 0.05));
207658
+ const color2 = obsSetColorScale(obsSetPath);
207659
+ obsSetG.append("g").selectAll("circle").data(filteredDf).join("circle").attr("cx", (d) => xScale(d.logFoldChange)).attr("cy", (d) => yScale(d.minusLog10p)).attr("r", 3).attr("opacity", 0.5).attr("fill", color2).on("click", (event2, d) => {
207660
+ onFeatureClick(d.featureId);
207661
+ });
207662
+ const textElements = obsSetG.append("g").selectAll("text").data(filteredDf).join("text").text((d) => d.featureId).attr("text-anchor", (d) => d.logFoldChange < 0 ? "end" : "start").attr("x", (d) => xScale(d.logFoldChange)).attr("y", (d) => yScale(d.minusLog10p)).style("display", (d) => Math.abs(d.logFoldChange) < (featureLabelFoldChangeThreshold ?? 5) || d.featureSignificance >= (featureLabelSignificanceThreshold ?? 0.01) ? "none" : void 0).attr("fill", color2).on("click", (event2, d) => {
207663
+ onFeatureClick(d.featureId);
207664
+ });
207665
+ textElements.append("title").text((d) => `${featureType}: ${d.featureId}
207666
+ in ${obsSetPath == null ? void 0 : obsSetPath.at(-1)}
207667
+ log2 fold-change: ${d.logFoldChange}
207668
+ p-value: ${d.featureSignificance}`);
207669
+ });
207670
+ }, [
207671
+ width2,
207672
+ height2,
207673
+ theme,
207674
+ sampleSetColor,
207675
+ sampleSetSelection,
207676
+ obsSetSelection,
207677
+ obsSetColor,
207678
+ featureType,
207679
+ computedData,
207680
+ xExtent,
207681
+ yExtent,
207682
+ obsType,
207683
+ marginLeft,
207684
+ marginBottom,
207685
+ marginTop,
207686
+ marginRight,
207687
+ obsSetColorScale,
207688
+ sampleSetColorScale,
207689
+ onFeatureClick,
207690
+ featurePointSignificanceThreshold,
207691
+ featurePointFoldChangeThreshold,
207692
+ featureLabelSignificanceThreshold,
207693
+ featureLabelFoldChangeThreshold
207694
+ ]);
207695
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
207696
+ "svg",
207697
+ {
207698
+ ref: svgRef,
207699
+ style: {
207700
+ top: 0,
207701
+ left: 0,
207702
+ width: `${width2}px`,
207703
+ height: `${height2}px`,
207704
+ position: "relative"
207705
+ }
207706
+ }
207707
+ );
207708
+ }
207709
+ function VolcanoPlotOptions(props) {
207710
+ const {
207711
+ children: children2,
207712
+ featurePointSignificanceThreshold,
207713
+ featurePointFoldChangeThreshold,
207714
+ featureLabelSignificanceThreshold,
207715
+ featureLabelFoldChangeThreshold,
207716
+ setFeaturePointSignificanceThreshold,
207717
+ setFeaturePointFoldChangeThreshold,
207718
+ setFeatureLabelSignificanceThreshold,
207719
+ setFeatureLabelFoldChangeThreshold
207720
+ } = props;
207721
+ const volcanoOptionsId = $bdb11010cef70236$export$f680877a34711e37();
207722
+ const classes = usePlotOptionsStyles();
207723
+ function handlePointSignificanceChange(event2, value2) {
207724
+ setFeaturePointSignificanceThreshold(10 ** -value2);
207725
+ }
207726
+ function handlePointFoldChangeChange(event2, value2) {
207727
+ setFeaturePointFoldChangeThreshold(value2);
207728
+ }
207729
+ function handleLabelSignificanceChange(event2, value2) {
207730
+ setFeatureLabelSignificanceThreshold(10 ** -value2);
207731
+ }
207732
+ function handleLabelFoldChangeChange(event2, value2) {
207733
+ setFeatureLabelFoldChangeThreshold(value2);
207734
+ }
207735
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(OptionsContainer, { children: [
207736
+ children2,
207737
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
207738
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207739
+ "label",
207740
+ {
207741
+ htmlFor: `volcano-label-significance-${volcanoOptionsId}`,
207742
+ children: "Label Significance Threshold"
207743
+ }
207744
+ ) }),
207745
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207746
+ Slider$1,
207747
+ {
207748
+ classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
207749
+ value: -Math.log10(featureLabelSignificanceThreshold),
207750
+ onChange: handleLabelSignificanceChange,
207751
+ "aria-label": "Volcano plot label significance threshold slider",
207752
+ id: `volcano-label-significance-${volcanoOptionsId}`,
207753
+ valueLabelDisplay: "auto",
207754
+ step: 1,
207755
+ min: 0,
207756
+ max: 100
207757
+ }
207758
+ ) })
207759
+ ] }),
207760
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
207761
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207762
+ "label",
207763
+ {
207764
+ htmlFor: `volcano-label-fc-${volcanoOptionsId}`,
207765
+ children: "Label Fold-Change Threshold"
207766
+ }
207767
+ ) }),
207768
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207769
+ Slider$1,
207770
+ {
207771
+ classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
207772
+ value: featureLabelFoldChangeThreshold,
207773
+ onChange: handleLabelFoldChangeChange,
207774
+ "aria-label": "Volcano plot label fold-change threshold slider",
207775
+ id: `volcano-label-fc-${volcanoOptionsId}`,
207776
+ valueLabelDisplay: "auto",
207777
+ step: 0.5,
207778
+ min: 0,
207779
+ max: 50
207780
+ }
207781
+ ) })
207782
+ ] }),
207783
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
207784
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207785
+ "label",
207786
+ {
207787
+ htmlFor: `volcano-point-significance-${volcanoOptionsId}`,
207788
+ children: "Point Significance Threshold"
207789
+ }
207790
+ ) }),
207791
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207792
+ Slider$1,
207793
+ {
207794
+ classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
207795
+ value: -Math.log10(featurePointSignificanceThreshold),
207796
+ onChange: handlePointSignificanceChange,
207797
+ "aria-label": "Volcano plot point significance threshold slider",
207798
+ id: `volcano-point-significance-${volcanoOptionsId}`,
207799
+ valueLabelDisplay: "auto",
207800
+ step: 1,
207801
+ min: 0,
207802
+ max: 100
207803
+ }
207804
+ ) })
207805
+ ] }),
207806
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
207807
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207808
+ "label",
207809
+ {
207810
+ htmlFor: `volcano-point-fc-${volcanoOptionsId}`,
207811
+ children: "Point Fold-Change Threshold"
207812
+ }
207813
+ ) }),
207814
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
207815
+ Slider$1,
207816
+ {
207817
+ classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
207818
+ value: featurePointFoldChangeThreshold,
207819
+ onChange: handlePointFoldChangeChange,
207820
+ "aria-label": "Volcano plot point fold-change threshold slider",
207821
+ id: `volcano-point-fc-${volcanoOptionsId}`,
207822
+ valueLabelDisplay: "auto",
207823
+ step: 0.5,
207824
+ min: 0,
207825
+ max: 50
207547
207826
  }
207548
207827
  ) })
207828
+ ] })
207829
+ ] });
207830
+ }
207831
+ function VolcanoPlotSubscriber(props) {
207832
+ const {
207833
+ coordinationScopes,
207834
+ removeGridComponent,
207835
+ theme,
207836
+ helpText = ViewHelpMapping.VOLCANO_PLOT
207837
+ } = props;
207838
+ const classes = useStyles$1();
207839
+ const loaders = useLoaders();
207840
+ const [{
207841
+ dataset,
207842
+ obsType,
207843
+ sampleType,
207844
+ featureType,
207845
+ featureValueType,
207846
+ obsFilter: cellFilter,
207847
+ obsHighlight: cellHighlight,
207848
+ obsSetSelection,
207849
+ obsSetColor,
207850
+ obsColorEncoding: cellColorEncoding,
207851
+ additionalObsSets: additionalCellSets,
207852
+ featurePointSignificanceThreshold,
207853
+ featurePointFoldChangeThreshold,
207854
+ featureLabelSignificanceThreshold,
207855
+ featureLabelFoldChangeThreshold,
207856
+ featureValueTransform,
207857
+ featureValueTransformCoefficient,
207858
+ gatingFeatureSelectionX,
207859
+ gatingFeatureSelectionY,
207860
+ featureSelection,
207861
+ sampleSetSelection,
207862
+ sampleSetColor
207863
+ }, {
207864
+ setObsFilter: setCellFilter,
207865
+ setObsSetSelection,
207866
+ setObsHighlight: setCellHighlight,
207867
+ setObsSetColor: setCellSetColor,
207868
+ setObsColorEncoding: setCellColorEncoding,
207869
+ setAdditionalObsSets: setAdditionalCellSets,
207870
+ setFeaturePointSignificanceThreshold,
207871
+ setFeaturePointFoldChangeThreshold,
207872
+ setFeatureLabelSignificanceThreshold,
207873
+ setFeatureLabelFoldChangeThreshold,
207874
+ setFeatureValueTransform,
207875
+ setFeatureValueTransformCoefficient,
207876
+ setGatingFeatureSelectionX,
207877
+ setGatingFeatureSelectionY,
207878
+ setFeatureSelection,
207879
+ setSampleSetSelection,
207880
+ setSampleSetColor
207881
+ }] = useCoordination(
207882
+ COMPONENT_COORDINATION_TYPES[ViewType$1.VOLCANO_PLOT],
207883
+ coordinationScopes
207884
+ );
207885
+ const [width2, height2, containerRef] = useGridItemSize();
207886
+ const obsSetsLoader = useMatchingLoader(
207887
+ loaders,
207888
+ dataset,
207889
+ DataType$2.OBS_SETS,
207890
+ { obsType }
207891
+ );
207892
+ const sampleSetsLoader = useMatchingLoader(
207893
+ loaders,
207894
+ dataset,
207895
+ DataType$2.SAMPLE_SETS,
207896
+ { sampleType }
207897
+ );
207898
+ const obsSetsColumnNameMapping = useColumnNameMapping(obsSetsLoader);
207899
+ const sampleSetsColumnNameMapping = useColumnNameMapping(sampleSetsLoader);
207900
+ const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
207901
+ const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
207902
+ const [{ featureStats }, featureStatsStatus] = useFeatureStatsData(
207903
+ loaders,
207904
+ dataset,
207905
+ false,
207906
+ { obsType, featureType, sampleType },
207907
+ // These volcanoOptions are passed to FeatureStatsAnndataLoader.loadMulti():
207908
+ { sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection }
207909
+ );
207910
+ const isReady = useReady([
207911
+ featureStatsStatus
207912
+ ]);
207913
+ const onFeatureClick = useCallback((featureId) => {
207914
+ setFeatureSelection([featureId]);
207915
+ }, [setFeatureSelection]);
207916
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
207917
+ TitleInfo,
207918
+ {
207919
+ title: "Volcano Plot",
207920
+ removeGridComponent,
207921
+ theme,
207922
+ isReady,
207923
+ helpText,
207924
+ options: /* @__PURE__ */ jsxRuntimeExports.jsx(
207925
+ VolcanoPlotOptions,
207926
+ {
207927
+ obsType,
207928
+ featureType,
207929
+ featurePointSignificanceThreshold,
207930
+ featurePointFoldChangeThreshold,
207931
+ featureLabelSignificanceThreshold,
207932
+ featureLabelFoldChangeThreshold,
207933
+ setFeaturePointSignificanceThreshold,
207934
+ setFeaturePointFoldChangeThreshold,
207935
+ setFeatureLabelSignificanceThreshold,
207936
+ setFeatureLabelFoldChangeThreshold
207937
+ }
207938
+ ),
207939
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureStats ? /* @__PURE__ */ jsxRuntimeExports.jsx(
207940
+ VolcanoPlot,
207941
+ {
207942
+ theme,
207943
+ width: width2,
207944
+ height: height2,
207945
+ obsType,
207946
+ featureType,
207947
+ obsSetsColumnNameMapping,
207948
+ sampleSetsColumnNameMapping,
207949
+ sampleSetSelection,
207950
+ obsSetSelection,
207951
+ obsSetColor,
207952
+ sampleSetColor,
207953
+ data: featureStats,
207954
+ onFeatureClick,
207955
+ featurePointSignificanceThreshold,
207956
+ featurePointFoldChangeThreshold,
207957
+ featureLabelSignificanceThreshold,
207958
+ featureLabelFoldChangeThreshold
207959
+ }
207960
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
207961
+ "Select at least one ",
207962
+ obsType,
207963
+ " set."
207964
+ ] }) })
207965
+ }
207966
+ );
207967
+ }
207968
+ function CellSetCompositionBarPlot(props) {
207969
+ const {
207970
+ data: data2,
207971
+ theme,
207972
+ width: width2,
207973
+ height: height2,
207974
+ marginRight = 200,
207975
+ marginBottom = 120,
207976
+ keyLength = 36,
207977
+ obsType,
207978
+ onBarSelect,
207979
+ obsSetsColumnNameMappingReversed,
207980
+ sampleSetsColumnNameMappingReversed,
207981
+ sampleSetSelection,
207982
+ obsSetSelection,
207983
+ obsSetColor,
207984
+ sampleSetColor
207985
+ } = props;
207986
+ const [obsSetColorScale, sampleSetColorScale] = useMemo(() => [
207987
+ getColorScale(obsSetSelection, obsSetColor, theme),
207988
+ getColorScale(sampleSetSelection, sampleSetColor, theme)
207989
+ ], [obsSetSelection, sampleSetSelection, sampleSetColor, obsSetColor, theme]);
207990
+ const computedData = useMemo(() => {
207991
+ var _a2, _b, _c, _d, _e, _f, _g;
207992
+ if (Array.isArray(data2) && data2.length === 1) {
207993
+ const { df, metadata: metadata2 } = data2[0];
207994
+ const referenceCellType = (_a2 = metadata2 == null ? void 0 : metadata2.analysis_params) == null ? void 0 : _a2.reference_cell_type;
207995
+ const coordinationValues = metadata2 == null ? void 0 : metadata2.coordination_values;
207996
+ const obsSetColumnName = (_c = (_b = coordinationValues == null ? void 0 : coordinationValues.obsSetSelection) == null ? void 0 : _b[0]) == null ? void 0 : _c[0];
207997
+ const obsSetGroupName = obsSetsColumnNameMappingReversed == null ? void 0 : obsSetsColumnNameMappingReversed[obsSetColumnName];
207998
+ const sampleSetColumnName = (_e = (_d = coordinationValues == null ? void 0 : coordinationValues.sampleSetFilter) == null ? void 0 : _d[0]) == null ? void 0 : _e[0];
207999
+ const sampleSetGroupName = sampleSetsColumnNameMappingReversed == null ? void 0 : sampleSetsColumnNameMappingReversed[sampleSetColumnName];
208000
+ const covariatePrefix = `${sampleSetColumnName}T.`;
208001
+ const firstCovariateValue = (_g = (_f = df.covariate) == null ? void 0 : _f[0]) == null ? void 0 : _g.substring(covariatePrefix.length);
208002
+ const firstCovariateSetPath = [sampleSetGroupName, firstCovariateValue];
208003
+ let shouldSwapFoldChangeDirection = false;
208004
+ if (isEqual$2(firstCovariateSetPath, sampleSetSelection[0])) {
208005
+ shouldSwapFoldChangeDirection = true;
208006
+ }
208007
+ return df.obsSetId.map((obsSetId, i2) => {
208008
+ const key2 = v4$1();
208009
+ const isReferenceSet = obsSetId === referenceCellType;
208010
+ const name2 = `${obsSetId}${isReferenceSet ? " (reference set)" : ""}`;
208011
+ const obsSetPath = [obsSetGroupName, obsSetId];
208012
+ const color2 = obsSetColorScale(obsSetPath);
208013
+ return {
208014
+ name: name2,
208015
+ // Reconstruct set path array.
208016
+ obsSetPath,
208017
+ color: color2,
208018
+ // Unique key per bar
208019
+ key: key2,
208020
+ // Add a property `keyName` which concatenates the key and the name,
208021
+ // which is both unique and can easily be converted
208022
+ // back to the name by taking a substring.
208023
+ keyName: `${key2}${name2}`,
208024
+ // Swap direction of foldChange/logFC if necessary
208025
+ obsSetFoldChange: df.obsSetFoldChange[i2] * (shouldSwapFoldChangeDirection ? -1 : 1),
208026
+ logFoldChange: Math.log2(df.obsSetFoldChange[i2]) * (shouldSwapFoldChangeDirection ? -1 : 1),
208027
+ interceptExpectedSample: df.interceptExpectedSample[i2],
208028
+ effectExpectedSample: df.effectExpectedSample[i2],
208029
+ isCredibleEffect: df.isCredibleEffect[i2],
208030
+ // Boolean flag for wasReferenceObsSet (check metadata)
208031
+ isReferenceSet: obsSetId === referenceCellType
208032
+ };
208033
+ }).filter((d) => obsSetSelection == null ? void 0 : obsSetSelection.find((setNamePath) => isEqual$2(setNamePath, d.obsSetPath)));
208034
+ }
208035
+ return null;
208036
+ }, [
208037
+ data2,
208038
+ sampleSetSelection,
208039
+ obsSetsColumnNameMappingReversed,
208040
+ sampleSetsColumnNameMappingReversed,
208041
+ obsSetSelection,
208042
+ obsSetColorScale,
208043
+ sampleSetColorScale
208044
+ ]);
208045
+ const keys3 = computedData.map((d) => d.keyName);
208046
+ const colorScale2 = {
208047
+ // Manually set the color scale so that Vega-Lite does
208048
+ // not choose the colors automatically.
208049
+ domain: computedData.map((d) => d.key),
208050
+ range: computedData.map((d) => d.color)
208051
+ };
208052
+ const captializedObsType = capitalize$2(obsType);
208053
+ const opacityScale = {
208054
+ domain: [true, false],
208055
+ range: [1, 0.3]
208056
+ };
208057
+ const strokeWidthScale = {
208058
+ domain: [true, false],
208059
+ range: [2, 0.5]
208060
+ };
208061
+ const spec = {
208062
+ mark: { type: "bar", stroke: "black", cursor: "pointer" },
208063
+ params: [
208064
+ {
208065
+ name: "bar_select",
208066
+ select: {
208067
+ type: "point",
208068
+ on: "click[event.shiftKey === false]",
208069
+ fields: ["obsSetPath"],
208070
+ empty: "none"
208071
+ }
208072
+ },
208073
+ {
208074
+ name: "shift_bar_select",
208075
+ select: {
208076
+ type: "point",
208077
+ on: "click[event.shiftKey]",
208078
+ fields: ["obsSetPath"],
208079
+ empty: "none"
208080
+ }
208081
+ }
208082
+ ],
208083
+ encoding: {
208084
+ y: {
208085
+ field: "keyName",
208086
+ type: "nominal",
208087
+ axis: { labelExpr: `substring(datum.label, ${keyLength})` },
208088
+ title: `${captializedObsType} Set`,
208089
+ sort: keys3
208090
+ },
208091
+ x: {
208092
+ // TODO: support using intercept+effect here based on user-selected options?
208093
+ field: "logFoldChange",
208094
+ type: "quantitative",
208095
+ title: "Log fold-change"
208096
+ },
208097
+ color: {
208098
+ field: "key",
208099
+ type: "nominal",
208100
+ scale: colorScale2,
208101
+ legend: null
208102
+ },
208103
+ fillOpacity: {
208104
+ field: "isCredibleEffect",
208105
+ type: "nominal",
208106
+ scale: opacityScale
208107
+ },
208108
+ strokeWidth: {
208109
+ field: "isReferenceSet",
208110
+ type: "nominal",
208111
+ scale: strokeWidthScale
208112
+ },
208113
+ tooltip: {
208114
+ field: "effectExpectedSample",
208115
+ type: "quantitative"
208116
+ }
208117
+ },
208118
+ // TODO: for width, also subtract length of longest y-axis set name label.
208119
+ width: clamp$5(width2 - marginRight, 10, Infinity),
208120
+ height: clamp$5(height2 - marginBottom, 10, Infinity),
208121
+ config: VEGA_THEMES[theme]
208122
+ };
208123
+ const handleSignal = (name2, value2) => {
208124
+ if (name2 === "bar_select") {
208125
+ onBarSelect(value2.obsSetPath);
208126
+ } else if (name2 === "shift_bar_select") {
208127
+ onBarSelect(value2.obsSetPath, true);
208128
+ }
208129
+ };
208130
+ const signalListeners = { bar_select: handleSignal, shift_bar_select: handleSignal };
208131
+ const getTooltipText = useCallback((item) => ({
208132
+ [`${captializedObsType} Set`]: item.datum.name,
208133
+ "Log fold-change": item.datum.logFoldChange,
208134
+ interceptExpectedSample: item.datum.interceptExpectedSample,
208135
+ effectExpectedSample: item.datum.effectExpectedSample
208136
+ }), [captializedObsType]);
208137
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
208138
+ VegaPlot,
208139
+ {
208140
+ data: computedData,
208141
+ spec,
208142
+ signalListeners,
208143
+ getTooltipText
208144
+ }
208145
+ );
208146
+ }
208147
+ function CellSetCompositionBarPlotSubscriber(props) {
208148
+ const {
208149
+ coordinationScopes,
208150
+ removeGridComponent,
208151
+ theme,
208152
+ helpText = ViewHelpMapping.OBS_SET_COMPOSITION_BAR_PLOT
208153
+ } = props;
208154
+ const classes = useStyles$1();
208155
+ const loaders = useLoaders();
208156
+ const [{
208157
+ dataset,
208158
+ obsType,
208159
+ sampleType,
208160
+ featureType,
208161
+ featureValueType,
208162
+ obsFilter: cellFilter,
208163
+ obsHighlight: cellHighlight,
208164
+ obsSetSelection,
208165
+ obsSetColor,
208166
+ obsColorEncoding: cellColorEncoding,
208167
+ additionalObsSets: additionalCellSets,
208168
+ featurePointSignificanceThreshold,
208169
+ featurePointFoldChangeThreshold,
208170
+ featureLabelSignificanceThreshold,
208171
+ featureLabelFoldChangeThreshold,
208172
+ featureValueTransform,
208173
+ featureValueTransformCoefficient,
208174
+ gatingFeatureSelectionX,
208175
+ gatingFeatureSelectionY,
208176
+ featureSelection,
208177
+ sampleSetSelection,
208178
+ sampleSetColor
208179
+ }, {
208180
+ setObsFilter: setCellFilter,
208181
+ setObsSetSelection,
208182
+ setObsHighlight: setCellHighlight,
208183
+ setObsSetColor: setCellSetColor,
208184
+ setObsColorEncoding: setCellColorEncoding,
208185
+ setAdditionalObsSets: setAdditionalCellSets,
208186
+ setFeaturePointSignificanceThreshold,
208187
+ setFeaturePointFoldChangeThreshold,
208188
+ setFeatureLabelSignificanceThreshold,
208189
+ setFeatureLabelFoldChangeThreshold,
208190
+ setFeatureValueTransform,
208191
+ setFeatureValueTransformCoefficient,
208192
+ setGatingFeatureSelectionX,
208193
+ setGatingFeatureSelectionY,
208194
+ setFeatureSelection,
208195
+ setSampleSetSelection,
208196
+ setSampleSetColor
208197
+ }] = useCoordination(
208198
+ COMPONENT_COORDINATION_TYPES[ViewType$1.OBS_SET_COMPOSITION_BAR_PLOT],
208199
+ coordinationScopes
208200
+ );
208201
+ const [width2, height2, containerRef] = useGridItemSize();
208202
+ const obsSetsLoader = useMatchingLoader(
208203
+ loaders,
208204
+ dataset,
208205
+ DataType$2.OBS_SETS,
208206
+ { obsType }
208207
+ );
208208
+ const sampleSetsLoader = useMatchingLoader(
208209
+ loaders,
208210
+ dataset,
208211
+ DataType$2.SAMPLE_SETS,
208212
+ { sampleType }
208213
+ );
208214
+ const obsSetsColumnNameMapping = useColumnNameMapping(obsSetsLoader);
208215
+ const obsSetsColumnNameMappingReversed = useColumnNameMapping(obsSetsLoader, true);
208216
+ const sampleSetsColumnNameMapping = useColumnNameMapping(sampleSetsLoader);
208217
+ const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
208218
+ const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
208219
+ const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
208220
+ const [{ obsSetStats }, obsSetStatsStatus] = useObsSetStatsData(
208221
+ loaders,
208222
+ dataset,
208223
+ false,
208224
+ { obsType, sampleType },
208225
+ // These volcanoOptions are passed to ObsSetStatsAnndataLoader.loadMulti():
208226
+ { sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection }
208227
+ );
208228
+ const isReady = useReady([
208229
+ obsSetStatsStatus
208230
+ ]);
208231
+ const onBarSelect = useCallback((setNamePath, isShiftDown = false) => {
208232
+ setObsSetSelection([setNamePath]);
208233
+ }, [setObsSetSelection]);
208234
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
208235
+ TitleInfo,
208236
+ {
208237
+ title: `${capitalize$2(obsType)} Set Composition Analysis Plot`,
208238
+ removeGridComponent,
208239
+ theme,
208240
+ isReady,
208241
+ helpText,
208242
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: obsSetStats ? /* @__PURE__ */ jsxRuntimeExports.jsx(
208243
+ CellSetCompositionBarPlot,
208244
+ {
208245
+ theme,
208246
+ width: width2,
208247
+ height: height2,
208248
+ obsType,
208249
+ obsSetsColumnNameMapping,
208250
+ obsSetsColumnNameMappingReversed,
208251
+ sampleSetsColumnNameMapping,
208252
+ sampleSetsColumnNameMappingReversed,
208253
+ sampleSetSelection,
208254
+ obsSetSelection,
208255
+ obsSetColor,
208256
+ sampleSetColor,
208257
+ data: obsSetStats,
208258
+ onBarSelect
208259
+ }
208260
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
208261
+ "Select at least one ",
208262
+ obsType,
208263
+ " set."
208264
+ ] }) })
208265
+ }
208266
+ );
208267
+ }
208268
+ function FeatureSetEnrichmentBarPlot(props) {
208269
+ const {
208270
+ data: data2,
208271
+ theme,
208272
+ width: width2,
208273
+ height: height2,
208274
+ marginRight = 200,
208275
+ marginBottom = 120,
208276
+ keyLength = 36,
208277
+ featureType,
208278
+ onBarSelect,
208279
+ obsSetsColumnNameMappingReversed,
208280
+ sampleSetsColumnNameMappingReversed,
208281
+ sampleSetSelection,
208282
+ obsSetSelection,
208283
+ obsSetColor,
208284
+ sampleSetColor,
208285
+ pValueThreshold
208286
+ } = props;
208287
+ const [obsSetColorScale, sampleSetColorScale] = useMemo(() => [
208288
+ getColorScale(obsSetSelection, obsSetColor, theme),
208289
+ getColorScale(sampleSetSelection, sampleSetColor, theme)
208290
+ ], [obsSetSelection, sampleSetSelection, sampleSetColor, obsSetColor, theme]);
208291
+ const computedData = useMemo(() => {
208292
+ if (Array.isArray(data2)) {
208293
+ let result = [];
208294
+ data2.forEach((comparisonObject) => {
208295
+ const { df, metadata: metadata2 } = comparisonObject;
208296
+ const coordinationValues = metadata2 == null ? void 0 : metadata2.coordination_values;
208297
+ const rawObsSetPath = coordinationValues.obsSetFilter ? coordinationValues.obsSetFilter[0] : coordinationValues.obsSetSelection[0];
208298
+ const obsSetPath = [...rawObsSetPath];
208299
+ obsSetPath[0] = obsSetsColumnNameMappingReversed[rawObsSetPath[0]];
208300
+ const color2 = obsSetColorScale(obsSetPath);
208301
+ df.featureSetName.forEach((featureSetName, i2) => {
208302
+ const key2 = v4$1();
208303
+ result.push({
208304
+ key: key2,
208305
+ name: featureSetName,
208306
+ term: df.featureSetTerm[i2],
208307
+ color: color2,
208308
+ obsSetPath,
208309
+ obsSetPaths: [obsSetPath],
208310
+ obsSetNameToPval: { [obsSetPath.at(-1)]: df.featureSetSignificance[i2] },
208311
+ keyName: `${key2}${featureSetName}`,
208312
+ featureSetSignificance: df.featureSetSignificance[i2],
208313
+ minusLog10p: -Math.log10(df.featureSetSignificance[i2])
208314
+ // Color based on obsSet
208315
+ });
208316
+ });
208317
+ });
208318
+ result = result.map((d) => ({
208319
+ ...d,
208320
+ minusLog10p: Math.min(50, d.minusLog10p)
208321
+ // Clamp infinite values at 50
208322
+ })).filter((d) => d.featureSetSignificance <= pValueThreshold).toSorted((a2, b2) => a2.featureSetSignificance - b2.featureSetSignificance).reduce((a2, h2) => {
208323
+ const match2 = a2.find((d) => d.name === h2.name);
208324
+ if (match2) {
208325
+ match2.obsSetPaths.push(h2.obsSetPath);
208326
+ match2.obsSetNameToPval[h2.obsSetPath.at(-1)] = h2.featureSetSignificance;
208327
+ return a2;
208328
+ }
208329
+ return [...a2, h2];
208330
+ }, []);
208331
+ const MAX_ROWS = 25;
208332
+ result = result.slice(0, MAX_ROWS);
208333
+ return result;
208334
+ }
208335
+ return null;
208336
+ }, [
208337
+ data2,
208338
+ sampleSetSelection,
208339
+ obsSetsColumnNameMappingReversed,
208340
+ sampleSetsColumnNameMappingReversed,
208341
+ obsSetSelection,
208342
+ obsSetColorScale,
208343
+ sampleSetColorScale,
208344
+ pValueThreshold
208345
+ ]);
208346
+ const keys3 = computedData.map((d) => d.keyName);
208347
+ const colorScale2 = {
208348
+ // Manually set the color scale so that Vega-Lite does
208349
+ // not choose the colors automatically.
208350
+ domain: computedData.map((d) => d.key),
208351
+ range: computedData.map((d) => d.color)
208352
+ };
208353
+ const captializedFeatureType = capitalize$2(featureType);
208354
+ const spec = {
208355
+ mark: { type: "bar", stroke: "black", cursor: "pointer" },
208356
+ params: [
208357
+ {
208358
+ name: "bar_select",
208359
+ select: {
208360
+ type: "point",
208361
+ on: "click[event.shiftKey === false]",
208362
+ fields: ["name"],
208363
+ empty: "none"
208364
+ }
208365
+ },
208366
+ {
208367
+ name: "shift_bar_select",
208368
+ select: {
208369
+ type: "point",
208370
+ on: "click[event.shiftKey]",
208371
+ fields: ["name"],
208372
+ empty: "none"
208373
+ }
208374
+ }
208375
+ ],
208376
+ encoding: {
208377
+ y: {
208378
+ field: "keyName",
208379
+ type: "nominal",
208380
+ axis: { labelExpr: `substring(datum.label, ${keyLength})` },
208381
+ title: `${captializedFeatureType} Set`,
208382
+ sort: keys3
208383
+ },
208384
+ x: {
208385
+ field: "minusLog10p",
208386
+ type: "quantitative",
208387
+ title: "-log10 p-value"
208388
+ },
208389
+ color: {
208390
+ field: "key",
208391
+ type: "nominal",
208392
+ scale: colorScale2,
208393
+ legend: null
208394
+ },
208395
+ /*
208396
+ fillOpacity: {
208397
+ field: 'isCredibleEffect',
208398
+ type: 'nominal',
208399
+ scale: opacityScale,
208400
+ },
208401
+ strokeWidth: {
208402
+ field: 'isReferenceSet',
208403
+ type: 'nominal',
208404
+ scale: strokeWidthScale,
208405
+ },
208406
+ */
208407
+ tooltip: {
208408
+ field: "featureSetSignificance",
208409
+ type: "quantitative"
208410
+ }
208411
+ },
208412
+ // TODO: for width, also subtract length of longest y-axis set name label.
208413
+ width: clamp$5(width2 - marginRight, 10, Infinity),
208414
+ height: clamp$5(height2 - marginBottom, 10, Infinity),
208415
+ config: VEGA_THEMES[theme]
208416
+ };
208417
+ const handleSignal = (name2, value2) => {
208418
+ if (name2 === "bar_select") {
208419
+ onBarSelect(value2.obsSetPath);
208420
+ } else if (name2 === "shift_bar_select") {
208421
+ onBarSelect(value2.obsSetPath, true);
208422
+ }
208423
+ };
208424
+ const signalListeners = { bar_select: handleSignal, shift_bar_select: handleSignal };
208425
+ const getTooltipText = useCallback((item) => ({
208426
+ [`${captializedFeatureType} Set`]: item.datum.name,
208427
+ "Ontology Term": item.datum.term,
208428
+ ...Object.fromEntries(
208429
+ Object.entries(item.datum.obsSetNameToPval).map(([cellSetName, pVal]) => [
208430
+ `p-value for ${cellSetName}`,
208431
+ pVal
208432
+ ])
208433
+ )
208434
+ }), [captializedFeatureType]);
208435
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
208436
+ VegaPlot,
208437
+ {
208438
+ data: computedData,
208439
+ spec,
208440
+ signalListeners,
208441
+ getTooltipText
208442
+ }
208443
+ );
208444
+ }
208445
+ function FeatureSetEnrichmentBarPlotSubscriber(props) {
208446
+ const {
208447
+ coordinationScopes,
208448
+ removeGridComponent,
208449
+ theme,
208450
+ helpText = ViewHelpMapping.FEATURE_SET_ENRICHMENT_BAR_PLOT
208451
+ } = props;
208452
+ const classes = useStyles$1();
208453
+ const loaders = useLoaders();
208454
+ useAsyncFunction(AsyncFunctionType.TRANSFORM_FEATURE);
208455
+ const [{
208456
+ dataset,
208457
+ obsType,
208458
+ sampleType,
208459
+ featureType,
208460
+ featureValueType,
208461
+ obsFilter: cellFilter,
208462
+ obsHighlight: cellHighlight,
208463
+ obsSetSelection,
208464
+ obsSetColor,
208465
+ obsColorEncoding: cellColorEncoding,
208466
+ additionalObsSets: additionalCellSets,
208467
+ featurePointSignificanceThreshold,
208468
+ featurePointFoldChangeThreshold,
208469
+ featureLabelSignificanceThreshold,
208470
+ featureLabelFoldChangeThreshold,
208471
+ featureValueTransform,
208472
+ featureValueTransformCoefficient,
208473
+ gatingFeatureSelectionX,
208474
+ gatingFeatureSelectionY,
208475
+ featureSelection,
208476
+ sampleSetSelection,
208477
+ sampleSetColor
208478
+ }, {
208479
+ setObsFilter: setCellFilter,
208480
+ setObsSetSelection,
208481
+ setObsHighlight: setCellHighlight,
208482
+ setObsSetColor: setCellSetColor,
208483
+ setObsColorEncoding: setCellColorEncoding,
208484
+ setAdditionalObsSets: setAdditionalCellSets,
208485
+ setFeaturePointSignificanceThreshold,
208486
+ setFeaturePointFoldChangeThreshold,
208487
+ setFeatureLabelSignificanceThreshold,
208488
+ setFeatureLabelFoldChangeThreshold,
208489
+ setFeatureValueTransform,
208490
+ setFeatureValueTransformCoefficient,
208491
+ setGatingFeatureSelectionX,
208492
+ setGatingFeatureSelectionY,
208493
+ setFeatureSelection,
208494
+ setSampleSetSelection,
208495
+ setSampleSetColor
208496
+ }] = useCoordination(
208497
+ COMPONENT_COORDINATION_TYPES[ViewType$1.FEATURE_SET_ENRICHMENT_BAR_PLOT],
208498
+ coordinationScopes
208499
+ );
208500
+ const [width2, height2, containerRef] = useGridItemSize();
208501
+ const obsSetsLoader = useMatchingLoader(
208502
+ loaders,
208503
+ dataset,
208504
+ DataType$2.OBS_SETS,
208505
+ { obsType }
208506
+ );
208507
+ const sampleSetsLoader = useMatchingLoader(
208508
+ loaders,
208509
+ dataset,
208510
+ DataType$2.SAMPLE_SETS,
208511
+ { sampleType }
208512
+ );
208513
+ const obsSetsColumnNameMapping = useColumnNameMapping(obsSetsLoader);
208514
+ const obsSetsColumnNameMappingReversed = useColumnNameMapping(obsSetsLoader, true);
208515
+ const sampleSetsColumnNameMapping = useColumnNameMapping(sampleSetsLoader);
208516
+ const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
208517
+ const rawSampleSetSelection = useRawSetPaths(sampleSetsColumnNameMapping, sampleSetSelection);
208518
+ const rawObsSetSelection = useRawSetPaths(obsSetsColumnNameMapping, obsSetSelection);
208519
+ const [{ featureSetStats }, featureSetStatsStatus] = useFeatureSetStatsData(
208520
+ loaders,
208521
+ dataset,
208522
+ false,
208523
+ { obsType, featureType, sampleType },
208524
+ // These volcanoOptions are passed to ObsSetStatsAnndataLoader.loadMulti():
208525
+ { sampleSetSelection: rawSampleSetSelection, obsSetSelection: rawObsSetSelection }
208526
+ );
208527
+ const isReady = useReady([
208528
+ featureSetStatsStatus
208529
+ ]);
208530
+ const onBarSelect = useCallback(async (featureSetName, featureSetTerm, isShiftDown = false) => {
208531
+ }, [setFeatureSelection]);
208532
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
208533
+ TitleInfo,
208534
+ {
208535
+ title: `${capitalize$2(featureType)} Set Enrichment Plot`,
208536
+ removeGridComponent,
208537
+ theme,
208538
+ isReady,
208539
+ helpText,
208540
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes.vegaContainer, children: featureSetStats ? /* @__PURE__ */ jsxRuntimeExports.jsx(
208541
+ FeatureSetEnrichmentBarPlot,
208542
+ {
208543
+ theme,
208544
+ width: width2,
208545
+ height: height2,
208546
+ obsType,
208547
+ featureType,
208548
+ obsSetsColumnNameMapping,
208549
+ obsSetsColumnNameMappingReversed,
208550
+ sampleSetsColumnNameMapping,
208551
+ sampleSetsColumnNameMappingReversed,
208552
+ sampleSetSelection,
208553
+ obsSetSelection,
208554
+ obsSetColor,
208555
+ sampleSetColor,
208556
+ data: featureSetStats,
208557
+ onBarSelect,
208558
+ pValueThreshold: 0.01
208559
+ }
208560
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
208561
+ "Select at least one ",
208562
+ obsType,
208563
+ " set."
208564
+ ] }) })
207549
208565
  }
207550
208566
  );
207551
208567
  }
@@ -207556,10 +208572,13 @@ export {
207556
208572
  ExpressionHistogramSubscriber as E,
207557
208573
  FeatureBarPlotSubscriber as F,
207558
208574
  TreemapSubscriber as T,
208575
+ VolcanoPlotSubscriber as V,
207559
208576
  CellSetSizesPlotSubscriber as a,
207560
- CellSetSizesPlot as b,
207561
- CellSetExpressionPlot as c,
207562
- ExpressionHistogram as d,
207563
- DotPlot as e,
207564
- getDefaultExportFromCjs as g
208577
+ CellSetCompositionBarPlotSubscriber as b,
208578
+ FeatureSetEnrichmentBarPlotSubscriber as c,
208579
+ CellSetSizesPlot as d,
208580
+ CellSetExpressionPlot as e,
208581
+ ExpressionHistogram as f,
208582
+ getDefaultExportFromCjs as g,
208583
+ DotPlot as h
207565
208584
  };