@vitessce/biomarker-select 3.5.9 → 3.5.11

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { Children, isValidElement, cloneElement, createElement, PureComponent, useRef, useEffect, useMemo, useState, useCallback } from "react";
3
- import { useLoaders, useCoordination, useViewConfigStoreApi, useViewConfig, useSetViewConfig, useMatchingLoader, useColumnNameMapping, useAsyncFunction, useComparisonMetadata } from "@vitessce/vit-s";
3
+ import { useLoaders, useCoordination, useViewConfigStoreApi, useViewConfig, useSetViewConfig, useMatchingLoader, useColumnNameMapping, useAsyncFunction, useComparisonMetadata, useReady, TitleInfo } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
6
6
  function getDefaultExportFromCjs(x) {
@@ -917,7 +917,9 @@ const ViewType = {
917
917
  LINK_CONTROLLER: "linkController",
918
918
  NEUROGLANCER: "neuroglancer",
919
919
  DUAL_SCATTERPLOT: "dualScatterplot",
920
- TREEMAP: "treemap"
920
+ TREEMAP: "treemap",
921
+ SAMPLE_SET_PAIR_MANAGER: "sampleSetPairManager",
922
+ FEATURE_STATS_TABLE: "featureStatsTable"
921
923
  };
922
924
  const DataType = {
923
925
  OBS_LABELS: "obsLabels",
@@ -1021,6 +1023,7 @@ const CoordinationType = {
1021
1023
  FEATURE_VALUE_COLORMAP: "featureValueColormap",
1022
1024
  FEATURE_VALUE_TRANSFORM: "featureValueTransform",
1023
1025
  FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
1026
+ FEATURE_AGGREGATION_STRATEGY: "featureAggregationStrategy",
1024
1027
  OBS_COLOR_ENCODING: "obsColorEncoding",
1025
1028
  SPATIAL_IMAGE_LAYER: "spatialImageLayer",
1026
1029
  SPATIAL_SEGMENTATION_LAYER: "spatialSegmentationLayer",
@@ -1106,6 +1109,30 @@ const CoordinationType = {
1106
1109
  // Treemap
1107
1110
  HIERARCHY_LEVELS: "hierarchyLevels"
1108
1111
  };
1112
+ const ViewHelpMapping = {
1113
+ SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
1114
+ HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
1115
+ SPATIAL: "The spatial view displays (potentially layered) spatially-resolved data including RGB or multiplexed images, segmentations of observations (bitmask- or polygon-based), and/or points (e.g., representing FISH transcripts).",
1116
+ DESCRIPTION: "The description view displays additional information about a dataset. When images are included in a dataset, the description view also includes image metadata (if contained in the image files).",
1117
+ STATUS: "The status view displays debugging messages, including app-wide error messages when datasets fail to load or when schemas fail to validate. Details about the entity under the mouse cursor (cell, gene, and/or molecule) are displayed during hover interactions.",
1118
+ LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
1119
+ GENOMIC_PROFILES: "The genomic profiles view displays genome browser tracks (using the genomic-profiles data type) containing bar plots, where the genome is along the x-axis and the value at each genome position is encoded with a bar along the y-axis.",
1120
+ GATING: "The gating scatterplot displays expression data for two genes (along the X and Y axes). Users can select two genes, and the scatterplot is dynamically generated using observation-by-feature matrix data. Gating can then be performed by using the lasso or box select tools.",
1121
+ FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
1122
+ OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
1123
+ OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
1124
+ OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
1125
+ FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
1126
+ 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).",
1127
+ 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.",
1128
+ NEUROGLANCER: "The Neuroglancer view displays 3d meshes using Neuroglancer developed by Google.",
1129
+ TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering.",
1130
+ VOLCANO_PLOT: "The volcano plot displays differential expression results. Each data point represents a feature (as opposed to an observation).",
1131
+ 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).",
1132
+ 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.",
1133
+ SAMPLE_SET_PAIR_MANAGER: "Select pairs of sample groups.",
1134
+ FEATURE_STATS_TABLE: "This table displays per-feature statistics, for example, from a differential expression test."
1135
+ };
1109
1136
  const COMPONENT_COORDINATION_TYPES = {
1110
1137
  [ViewType.NEUROGLANCER]: [
1111
1138
  CoordinationType.DATASET
@@ -1139,6 +1166,7 @@ const COMPONENT_COORDINATION_TYPES = {
1139
1166
  CoordinationType.FEATURE_SELECTION,
1140
1167
  CoordinationType.FEATURE_VALUE_COLORMAP,
1141
1168
  CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1169
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1142
1170
  CoordinationType.OBS_COLOR_ENCODING,
1143
1171
  CoordinationType.ADDITIONAL_OBS_SETS,
1144
1172
  CoordinationType.TOOLTIPS_VISIBLE,
@@ -1182,6 +1210,7 @@ const COMPONENT_COORDINATION_TYPES = {
1182
1210
  CoordinationType.FEATURE_SELECTION,
1183
1211
  CoordinationType.FEATURE_VALUE_COLORMAP,
1184
1212
  CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1213
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1185
1214
  CoordinationType.OBS_COLOR_ENCODING,
1186
1215
  CoordinationType.ADDITIONAL_OBS_SETS,
1187
1216
  CoordinationType.TOOLTIPS_VISIBLE,
@@ -1261,6 +1290,7 @@ const COMPONENT_COORDINATION_TYPES = {
1261
1290
  CoordinationType.FEATURE_SELECTION,
1262
1291
  CoordinationType.FEATURE_VALUE_COLORMAP,
1263
1292
  CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1293
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1264
1294
  CoordinationType.OBS_COLOR_ENCODING,
1265
1295
  CoordinationType.ADDITIONAL_OBS_SETS,
1266
1296
  CoordinationType.MOLECULE_HIGHLIGHT,
@@ -1298,6 +1328,7 @@ const COMPONENT_COORDINATION_TYPES = {
1298
1328
  CoordinationType.FEATURE_SELECTION,
1299
1329
  CoordinationType.FEATURE_VALUE_COLORMAP,
1300
1330
  CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1331
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1301
1332
  CoordinationType.OBS_COLOR_ENCODING,
1302
1333
  CoordinationType.ADDITIONAL_OBS_SETS,
1303
1334
  CoordinationType.MOLECULE_HIGHLIGHT,
@@ -1411,6 +1442,7 @@ const COMPONENT_COORDINATION_TYPES = {
1411
1442
  CoordinationType.FEATURE_SELECTION,
1412
1443
  CoordinationType.FEATURE_VALUE_TRANSFORM,
1413
1444
  CoordinationType.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
1445
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1414
1446
  CoordinationType.OBS_SET_SELECTION,
1415
1447
  CoordinationType.OBS_SET_FILTER,
1416
1448
  CoordinationType.OBS_SET_HIGHLIGHT,
@@ -1426,6 +1458,7 @@ const COMPONENT_COORDINATION_TYPES = {
1426
1458
  CoordinationType.FEATURE_TYPE,
1427
1459
  CoordinationType.FEATURE_VALUE_TYPE,
1428
1460
  CoordinationType.FEATURE_SELECTION,
1461
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1429
1462
  CoordinationType.ADDITIONAL_OBS_SETS,
1430
1463
  CoordinationType.OBS_SET_COLOR,
1431
1464
  CoordinationType.OBS_COLOR_ENCODING,
@@ -1504,6 +1537,7 @@ const COMPONENT_COORDINATION_TYPES = {
1504
1537
  CoordinationType.FEATURE_VALUE_COLORMAP,
1505
1538
  CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1506
1539
  CoordinationType.FEATURE_SELECTION,
1540
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1507
1541
  CoordinationType.TOOLTIPS_VISIBLE,
1508
1542
  CoordinationType.TOOLTIP_CROSSHAIRS_VISIBLE,
1509
1543
  CoordinationType.LEGEND_VISIBLE,
@@ -1544,6 +1578,7 @@ const COMPONENT_COORDINATION_TYPES = {
1544
1578
  CoordinationType.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
1545
1579
  CoordinationType.FEATURE_VALUE_POSITIVITY_THRESHOLD,
1546
1580
  CoordinationType.FEATURE_VALUE_COLORMAP,
1581
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1547
1582
  CoordinationType.OBS_SET_SELECTION,
1548
1583
  CoordinationType.OBS_SET_FILTER,
1549
1584
  CoordinationType.OBS_SET_HIGHLIGHT,
@@ -1572,6 +1607,7 @@ const COMPONENT_COORDINATION_TYPES = {
1572
1607
  CoordinationType.FEATURE_SELECTION,
1573
1608
  CoordinationType.FEATURE_VALUE_TRANSFORM,
1574
1609
  CoordinationType.FEATURE_VALUE_TRANSFORM_COEFFICIENT,
1610
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1575
1611
  CoordinationType.OBS_SET_SELECTION,
1576
1612
  CoordinationType.OBS_SET_HIGHLIGHT,
1577
1613
  CoordinationType.OBS_HIGHLIGHT,
@@ -1606,6 +1642,33 @@ const COMPONENT_COORDINATION_TYPES = {
1606
1642
  CoordinationType.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1607
1643
  CoordinationType.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1608
1644
  ],
1645
+ [ViewType.FEATURE_STATS_TABLE]: [
1646
+ CoordinationType.DATASET,
1647
+ CoordinationType.OBS_TYPE,
1648
+ CoordinationType.FEATURE_TYPE,
1649
+ CoordinationType.SAMPLE_TYPE,
1650
+ // For selection of case-control sets of samples:
1651
+ CoordinationType.SAMPLE_SET_SELECTION,
1652
+ // For selection of one-vs-others sets of observations:
1653
+ CoordinationType.OBS_SET_SELECTION,
1654
+ // TODO: CoordinationType.FEATURE_SET_SELECTION,
1655
+ // TODO: CoordinationType.FEATURE_SET_HIGHLIGHT,
1656
+ // TODO: CoordinationType.FEATURE_SET_COLOR,
1657
+ CoordinationType.FEATURE_HIGHLIGHT,
1658
+ CoordinationType.FEATURE_SELECTION,
1659
+ CoordinationType.FEATURE_VALUE_COLORMAP,
1660
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1661
+ // TODO: CoordinationType.FEATURE_COLOR_ENCODING,
1662
+ // TODO: CoordinationType.ADDITIONAL_FEATURE_SETS,
1663
+ CoordinationType.TOOLTIPS_VISIBLE,
1664
+ CoordinationType.ADDITIONAL_OBS_SETS,
1665
+ CoordinationType.OBS_SET_COLOR,
1666
+ CoordinationType.SAMPLE_SET_COLOR,
1667
+ CoordinationType.FEATURE_POINT_SIGNIFICANCE_THRESHOLD,
1668
+ CoordinationType.FEATURE_LABEL_SIGNIFICANCE_THRESHOLD,
1669
+ CoordinationType.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1670
+ CoordinationType.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1671
+ ],
1609
1672
  [ViewType.OBS_SET_COMPOSITION_BAR_PLOT]: [
1610
1673
  CoordinationType.DATASET,
1611
1674
  CoordinationType.OBS_TYPE,
@@ -1649,11 +1712,19 @@ const COMPONENT_COORDINATION_TYPES = {
1649
1712
  CoordinationType.OBS_TYPE,
1650
1713
  CoordinationType.SAMPLE_TYPE,
1651
1714
  CoordinationType.FEATURE_SELECTION,
1715
+ CoordinationType.FEATURE_AGGREGATION_STRATEGY,
1652
1716
  CoordinationType.SAMPLE_SET_SELECTION,
1653
1717
  CoordinationType.SAMPLE_SET_FILTER,
1654
1718
  CoordinationType.OBS_SET_SELECTION,
1655
1719
  CoordinationType.OBS_SET_FILTER
1656
1720
  ],
1721
+ [ViewType.SAMPLE_SET_PAIR_MANAGER]: [
1722
+ CoordinationType.DATASET,
1723
+ CoordinationType.OBS_TYPE,
1724
+ CoordinationType.SAMPLE_TYPE,
1725
+ CoordinationType.SAMPLE_SET_SELECTION,
1726
+ CoordinationType.SAMPLE_SET_FILTER
1727
+ ],
1657
1728
  [ViewType.TREEMAP]: [
1658
1729
  CoordinationType.DATASET,
1659
1730
  CoordinationType.OBS_TYPE,
@@ -2022,7 +2093,7 @@ object-assign
2022
2093
  @license MIT
2023
2094
  */
2024
2095
  var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
2025
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2096
+ var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
2026
2097
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2027
2098
  function toObject(val) {
2028
2099
  if (val === null || val === void 0) {
@@ -2069,7 +2140,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function(target, source)
2069
2140
  for (var s = 1; s < arguments.length; s++) {
2070
2141
  from = Object(arguments[s]);
2071
2142
  for (var key in from) {
2072
- if (hasOwnProperty.call(from, key)) {
2143
+ if (hasOwnProperty$9.call(from, key)) {
2073
2144
  to2[key] = from[key];
2074
2145
  }
2075
2146
  }
@@ -3102,7 +3173,7 @@ function _objectWithoutProperties(source, excluded) {
3102
3173
  }
3103
3174
  return target;
3104
3175
  }
3105
- var keys = ["xs", "sm", "md", "lg", "xl"];
3176
+ var keys$1 = ["xs", "sm", "md", "lg", "xl"];
3106
3177
  function createBreakpoints(breakpoints) {
3107
3178
  var _breakpoints$values = breakpoints.values, values2 = _breakpoints$values === void 0 ? {
3108
3179
  xs: 0,
@@ -3116,20 +3187,20 @@ function createBreakpoints(breakpoints) {
3116
3187
  return "@media (min-width:".concat(value).concat(unit, ")");
3117
3188
  }
3118
3189
  function down(key) {
3119
- var endIndex = keys.indexOf(key) + 1;
3120
- var upperbound = values2[keys[endIndex]];
3121
- if (endIndex === keys.length) {
3190
+ var endIndex = keys$1.indexOf(key) + 1;
3191
+ var upperbound = values2[keys$1[endIndex]];
3192
+ if (endIndex === keys$1.length) {
3122
3193
  return up2("xs");
3123
3194
  }
3124
3195
  var value = typeof upperbound === "number" && endIndex > 0 ? upperbound : key;
3125
3196
  return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
3126
3197
  }
3127
3198
  function between(start, end) {
3128
- var endIndex = keys.indexOf(end);
3129
- if (endIndex === keys.length - 1) {
3199
+ var endIndex = keys$1.indexOf(end);
3200
+ if (endIndex === keys$1.length - 1) {
3130
3201
  return up2(start);
3131
3202
  }
3132
- return "@media (min-width:".concat(typeof values2[start] === "number" ? values2[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values2[keys[endIndex + 1]] === "number" ? values2[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")");
3203
+ return "@media (min-width:".concat(typeof values2[start] === "number" ? values2[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values2[keys$1[endIndex + 1]] === "number" ? values2[keys$1[endIndex + 1]] : end) - step / 100).concat(unit, ")");
3133
3204
  }
3134
3205
  function only(key) {
3135
3206
  return between(key, key);
@@ -3145,7 +3216,7 @@ function createBreakpoints(breakpoints) {
3145
3216
  return values2[key];
3146
3217
  }
3147
3218
  return _extends$2({
3148
- keys,
3219
+ keys: keys$1,
3149
3220
  values: values2,
3150
3221
  up: up2,
3151
3222
  down,
@@ -3959,7 +4030,7 @@ function createUnarySpacing(theme) {
3959
4030
  return void 0;
3960
4031
  };
3961
4032
  }
3962
- function getValue(transformer, propValue) {
4033
+ function getValue$1(transformer, propValue) {
3963
4034
  if (typeof propValue === "string" || propValue == null) {
3964
4035
  return propValue;
3965
4036
  }
@@ -3976,7 +4047,7 @@ function getValue(transformer, propValue) {
3976
4047
  function getStyleFromPropValue(cssProperties, transformer) {
3977
4048
  return function(propValue) {
3978
4049
  return cssProperties.reduce(function(acc, cssProperty) {
3979
- acc[cssProperty] = getValue(transformer, propValue);
4050
+ acc[cssProperty] = getValue$1(transformer, propValue);
3980
4051
  return acc;
3981
4052
  }, {});
3982
4053
  };
@@ -7325,7 +7396,7 @@ function styled$2(Component) {
7325
7396
  }
7326
7397
  var stylesOrCreator = typeof style === "function" ? function(theme) {
7327
7398
  return {
7328
- root: function root(props) {
7399
+ root: function root2(props) {
7329
7400
  return style(_extends$2({
7330
7401
  theme
7331
7402
  }, props));
@@ -17751,7 +17822,7 @@ function taskDebounce(fn2) {
17751
17822
  }
17752
17823
  var supportsMicroTasks = isBrowser && window.Promise;
17753
17824
  var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
17754
- function isFunction(functionToCheck) {
17825
+ function isFunction$1(functionToCheck) {
17755
17826
  var getType = {};
17756
17827
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
17757
17828
  }
@@ -18209,7 +18280,7 @@ function runModifiers(modifiers2, data, ends) {
18209
18280
  console.warn("`modifier.function` is deprecated, use `modifier.fn`!");
18210
18281
  }
18211
18282
  var fn2 = modifier["function"] || modifier.fn;
18212
- if (modifier.enabled && isFunction(fn2)) {
18283
+ if (modifier.enabled && isFunction$1(fn2)) {
18213
18284
  data.offsets.popper = getClientRect(data.offsets.popper);
18214
18285
  data.offsets.reference = getClientRect(data.offsets.reference);
18215
18286
  data = fn2(data, modifier);
@@ -19172,7 +19243,7 @@ var Popper$1 = function() {
19172
19243
  return a.order - b.order;
19173
19244
  });
19174
19245
  this.modifiers.forEach(function(modifierOptions) {
19175
- if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
19246
+ if (modifierOptions.enabled && isFunction$1(modifierOptions.onLoad)) {
19176
19247
  modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
19177
19248
  }
19178
19249
  });
@@ -22462,7 +22533,7 @@ const ExpandMoreIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path",
22462
22533
  const InfoIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
22463
22534
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
22464
22535
  }), "Info");
22465
- const useStyles$1 = makeStyles(() => ({
22536
+ const useStyles$2 = makeStyles(() => ({
22466
22537
  header: {
22467
22538
  marginTop: "10px",
22468
22539
  marginBottom: "10px"
@@ -22505,7 +22576,7 @@ function ConfirmatoryCart(props) {
22505
22576
  // eslint-disable-next-line no-unused-vars
22506
22577
  setCurrentStratificationSelection
22507
22578
  } = props;
22508
- const classes = useStyles$1();
22579
+ const classes = useStyles$2();
22509
22580
  const [expandedAccordions, setExpandedAccordions] = React__default.useState([
22510
22581
  "agnostic",
22511
22582
  "specific",
@@ -24098,7 +24169,7 @@ const Autocomplete$1 = withStyles2(styles42, {
24098
24169
  var safeIsNaN = Number.isNaN || function ponyfill(value) {
24099
24170
  return typeof value === "number" && value !== value;
24100
24171
  };
24101
- function isEqual(first, second) {
24172
+ function isEqual$1(first, second) {
24102
24173
  if (first === second) {
24103
24174
  return true;
24104
24175
  }
@@ -24112,7 +24183,7 @@ function areInputsEqual(newInputs, lastInputs) {
24112
24183
  return false;
24113
24184
  }
24114
24185
  for (var i = 0; i < newInputs.length; i++) {
24115
- if (!isEqual(newInputs[i], lastInputs[i])) {
24186
+ if (!isEqual$1(newInputs[i], lastInputs[i])) {
24116
24187
  return false;
24117
24188
  }
24118
24189
  }
@@ -24767,7 +24838,7 @@ function SelectAgnostic(props) {
24767
24838
  currentModalityAgnosticSelection,
24768
24839
  setCurrentModalityAgnosticSelection
24769
24840
  } = props;
24770
- const classes = useStyles$1();
24841
+ const classes = useStyles$2();
24771
24842
  const [selectedItem, setSelectedItem] = React__default.useState(null);
24772
24843
  const [potentialItems, setPotentialItems] = React__default.useState([]);
24773
24844
  const handleChange = async (event) => {
@@ -30750,7 +30821,7 @@ function SelectSpecific(props) {
30750
30821
  setCurrentModalitySpecificSelection,
30751
30822
  getEdges
30752
30823
  } = props;
30753
- const classes = useStyles$1();
30824
+ const classes = useStyles$2();
30754
30825
  const queries = useQueries({
30755
30826
  queries: (currentModalityAgnosticSelection == null ? void 0 : currentModalityAgnosticSelection.map((item) => ({
30756
30827
  queryKey: [item.nodeType, item.kgId],
@@ -30886,7 +30957,7 @@ function ConfirmatoryStepper(props) {
30886
30957
  stratifications,
30887
30958
  onFinish
30888
30959
  } = props;
30889
- const classes = useStyles$1();
30960
+ const classes = useStyles$2();
30890
30961
  const [activeStep, setActiveStep] = React__default.useState(0);
30891
30962
  const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
30892
30963
  const isStepOptional = (step) => step === 2;
@@ -31028,7 +31099,7 @@ function ExploratoryStepper(props) {
31028
31099
  stratifications,
31029
31100
  onFinish
31030
31101
  } = props;
31031
- const classes = useStyles$1();
31102
+ const classes = useStyles$2();
31032
31103
  const [activeStep, setActiveStep] = React__default.useState(0);
31033
31104
  const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
31034
31105
  const isStepOptional = (step) => step === 2;
@@ -31141,7 +31212,7 @@ function ScmdUi(props) {
31141
31212
  stratifications,
31142
31213
  onFinish
31143
31214
  } = props;
31144
- const classes = useStyles$1();
31215
+ const classes = useStyles$2();
31145
31216
  const mode = modeProp || "confirmatory";
31146
31217
  const [tempIsVisible, setTempIsVisible] = useState(true);
31147
31218
  const isConfirmatoryMode = mode === "confirmatory";
@@ -31309,14 +31380,21 @@ function BiomarkerSelectSubscriber(props) {
31309
31380
  }
31310
31381
  ) : null });
31311
31382
  }
31312
- const useStyles = makeStyles((theme) => ({
31383
+ const useStyles$1 = makeStyles((theme) => ({
31313
31384
  buttonContainer: {
31314
31385
  position: "absolute",
31315
31386
  right: 0,
31316
31387
  display: "flex",
31317
31388
  flexDirection: "column",
31318
31389
  justifyContent: "center",
31319
- height: "100%"
31390
+ height: "100%",
31391
+ "& div": {
31392
+ display: "flex",
31393
+ flexDirection: "row"
31394
+ },
31395
+ "& div > button": {
31396
+ height: "auto"
31397
+ }
31320
31398
  },
31321
31399
  headingContainer: {
31322
31400
  backgroundColor: "transparent"
@@ -31341,14 +31419,13 @@ function ComparativeHeadingSubscriber(props) {
31341
31419
  sampleSetSelection,
31342
31420
  featureSelection
31343
31421
  }, {
31344
- setSampleSetSelection
31345
- // TODO: buttons for modification of featureSelection
31346
- // setFeatureSelection,
31422
+ setSampleSetSelection,
31423
+ setFeatureSelection
31347
31424
  }] = useCoordination(
31348
31425
  COMPONENT_COORDINATION_TYPES[ViewType.COMPARATIVE_HEADING],
31349
31426
  coordinationScopes
31350
31427
  );
31351
- const classes = useStyles();
31428
+ const classes = useStyles$1();
31352
31429
  const swapSampleSets = useCallback(() => {
31353
31430
  if ((sampleSetSelection == null ? void 0 : sampleSetSelection.length) === 2) {
31354
31431
  setSampleSetSelection([
@@ -31357,22 +31434,874 @@ function ComparativeHeadingSubscriber(props) {
31357
31434
  ]);
31358
31435
  }
31359
31436
  }, [sampleSetSelection, setSampleSetSelection]);
31437
+ const clearSampleSetSelection = useCallback(() => {
31438
+ if ((sampleSetSelection == null ? void 0 : sampleSetSelection.length) === 2) {
31439
+ setSampleSetSelection(null);
31440
+ }
31441
+ }, [sampleSetSelection, setSampleSetSelection]);
31442
+ const clearFeatureSelection = useCallback(() => {
31443
+ if (Array.isArray(featureSelection) && featureSelection.length > 0) {
31444
+ setFeatureSelection(null);
31445
+ }
31446
+ }, [featureSelection, setFeatureSelection]);
31360
31447
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingContainer, children: [
31361
31448
  sampleSetSelection && sampleSetSelection.length === 2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
31362
31449
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "45%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_a2 = sampleSetSelection == null ? void 0 : sampleSetSelection[0]) == null ? void 0 : _a2.at(-1) }) }),
31363
31450
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, style: { textAlign: "right" }, children: "vs. " }) }),
31364
31451
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_b = sampleSetSelection == null ? void 0 : sampleSetSelection[1]) == null ? void 0 : _b.at(-1) }) }),
31365
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: swapSampleSets, type: "button", children: "Swap" }) })
31366
- ] }) : null,
31452
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
31453
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: swapSampleSets, type: "button", children: "Swap" }),
31454
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: clearSampleSetSelection, type: "button", children: "Clear" })
31455
+ ] }) })
31456
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.headingSectionContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: "All samples" }) }) }),
31367
31457
  featureSelection && featureSelection.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
31368
31458
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: classes.headingText, children: "Selected Biomarkers: " }) }),
31369
31459
  featureSelection == null ? void 0 : featureSelection.map((featureName, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: classes.headingText, children: [
31370
31460
  featureName,
31371
31461
  i < featureSelection.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: ", " }) : null
31372
- ] }) }))
31462
+ ] }) }, featureName)),
31463
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: clearFeatureSelection, type: "button", children: "Clear" }) }) })
31373
31464
  ] }) : null
31374
31465
  ] });
31375
31466
  }
31467
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
31468
+ const freeGlobal$1 = freeGlobal;
31469
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
31470
+ var root = freeGlobal$1 || freeSelf || Function("return this")();
31471
+ const root$1 = root;
31472
+ var Symbol$1 = root$1.Symbol;
31473
+ const Symbol$2 = Symbol$1;
31474
+ var objectProto$b = Object.prototype;
31475
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
31476
+ var nativeObjectToString$1 = objectProto$b.toString;
31477
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
31478
+ function getRawTag(value) {
31479
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
31480
+ try {
31481
+ value[symToStringTag$1] = void 0;
31482
+ var unmasked = true;
31483
+ } catch (e) {
31484
+ }
31485
+ var result = nativeObjectToString$1.call(value);
31486
+ if (unmasked) {
31487
+ if (isOwn) {
31488
+ value[symToStringTag$1] = tag;
31489
+ } else {
31490
+ delete value[symToStringTag$1];
31491
+ }
31492
+ }
31493
+ return result;
31494
+ }
31495
+ var objectProto$a = Object.prototype;
31496
+ var nativeObjectToString = objectProto$a.toString;
31497
+ function objectToString(value) {
31498
+ return nativeObjectToString.call(value);
31499
+ }
31500
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
31501
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
31502
+ function baseGetTag(value) {
31503
+ if (value == null) {
31504
+ return value === void 0 ? undefinedTag : nullTag;
31505
+ }
31506
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
31507
+ }
31508
+ function isObjectLike$1(value) {
31509
+ return value != null && typeof value == "object";
31510
+ }
31511
+ var isArray$1 = Array.isArray;
31512
+ const isArray$2 = isArray$1;
31513
+ function isObject$1(value) {
31514
+ var type = typeof value;
31515
+ return value != null && (type == "object" || type == "function");
31516
+ }
31517
+ var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
31518
+ function isFunction(value) {
31519
+ if (!isObject$1(value)) {
31520
+ return false;
31521
+ }
31522
+ var tag = baseGetTag(value);
31523
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
31524
+ }
31525
+ var coreJsData = root$1["__core-js_shared__"];
31526
+ const coreJsData$1 = coreJsData;
31527
+ var maskSrcKey = function() {
31528
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
31529
+ return uid ? "Symbol(src)_1." + uid : "";
31530
+ }();
31531
+ function isMasked(func) {
31532
+ return !!maskSrcKey && maskSrcKey in func;
31533
+ }
31534
+ var funcProto$1 = Function.prototype;
31535
+ var funcToString$1 = funcProto$1.toString;
31536
+ function toSource(func) {
31537
+ if (func != null) {
31538
+ try {
31539
+ return funcToString$1.call(func);
31540
+ } catch (e) {
31541
+ }
31542
+ try {
31543
+ return func + "";
31544
+ } catch (e) {
31545
+ }
31546
+ }
31547
+ return "";
31548
+ }
31549
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
31550
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
31551
+ var funcProto = Function.prototype, objectProto$9 = Object.prototype;
31552
+ var funcToString = funcProto.toString;
31553
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
31554
+ var reIsNative = RegExp(
31555
+ "^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
31556
+ );
31557
+ function baseIsNative(value) {
31558
+ if (!isObject$1(value) || isMasked(value)) {
31559
+ return false;
31560
+ }
31561
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
31562
+ return pattern.test(toSource(value));
31563
+ }
31564
+ function getValue(object, key) {
31565
+ return object == null ? void 0 : object[key];
31566
+ }
31567
+ function getNative(object, key) {
31568
+ var value = getValue(object, key);
31569
+ return baseIsNative(value) ? value : void 0;
31570
+ }
31571
+ var WeakMap$1 = getNative(root$1, "WeakMap");
31572
+ const WeakMap$2 = WeakMap$1;
31573
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
31574
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
31575
+ function isIndex(value, length) {
31576
+ var type = typeof value;
31577
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
31578
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
31579
+ }
31580
+ function eq(value, other) {
31581
+ return value === other || value !== value && other !== other;
31582
+ }
31583
+ var MAX_SAFE_INTEGER = 9007199254740991;
31584
+ function isLength(value) {
31585
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
31586
+ }
31587
+ function isArrayLike(value) {
31588
+ return value != null && isLength(value.length) && !isFunction(value);
31589
+ }
31590
+ var objectProto$8 = Object.prototype;
31591
+ function isPrototype(value) {
31592
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$8;
31593
+ return value === proto;
31594
+ }
31595
+ function baseTimes(n2, iteratee) {
31596
+ var index = -1, result = Array(n2);
31597
+ while (++index < n2) {
31598
+ result[index] = iteratee(index);
31599
+ }
31600
+ return result;
31601
+ }
31602
+ var argsTag$2 = "[object Arguments]";
31603
+ function baseIsArguments(value) {
31604
+ return isObjectLike$1(value) && baseGetTag(value) == argsTag$2;
31605
+ }
31606
+ var objectProto$7 = Object.prototype;
31607
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
31608
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
31609
+ var isArguments = baseIsArguments(function() {
31610
+ return arguments;
31611
+ }()) ? baseIsArguments : function(value) {
31612
+ return isObjectLike$1(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
31613
+ };
31614
+ const isArguments$1 = isArguments;
31615
+ function stubFalse() {
31616
+ return false;
31617
+ }
31618
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
31619
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
31620
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
31621
+ var Buffer = moduleExports$1 ? root$1.Buffer : void 0;
31622
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
31623
+ var isBuffer = nativeIsBuffer || stubFalse;
31624
+ const isBuffer$1 = isBuffer;
31625
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
31626
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
31627
+ var typedArrayTags = {};
31628
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
31629
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
31630
+ function baseIsTypedArray(value) {
31631
+ return isObjectLike$1(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
31632
+ }
31633
+ function baseUnary(func) {
31634
+ return function(value) {
31635
+ return func(value);
31636
+ };
31637
+ }
31638
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
31639
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
31640
+ var moduleExports = freeModule && freeModule.exports === freeExports;
31641
+ var freeProcess = moduleExports && freeGlobal$1.process;
31642
+ var nodeUtil = function() {
31643
+ try {
31644
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
31645
+ if (types) {
31646
+ return types;
31647
+ }
31648
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
31649
+ } catch (e) {
31650
+ }
31651
+ }();
31652
+ const nodeUtil$1 = nodeUtil;
31653
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
31654
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
31655
+ const isTypedArray$1 = isTypedArray;
31656
+ var objectProto$6 = Object.prototype;
31657
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
31658
+ function arrayLikeKeys(value, inherited) {
31659
+ var isArr = isArray$2(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
31660
+ for (var key in value) {
31661
+ if ((inherited || hasOwnProperty$5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
31662
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
31663
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
31664
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
31665
+ isIndex(key, length)))) {
31666
+ result.push(key);
31667
+ }
31668
+ }
31669
+ return result;
31670
+ }
31671
+ function overArg(func, transform3) {
31672
+ return function(arg) {
31673
+ return func(transform3(arg));
31674
+ };
31675
+ }
31676
+ var nativeKeys = overArg(Object.keys, Object);
31677
+ const nativeKeys$1 = nativeKeys;
31678
+ var objectProto$5 = Object.prototype;
31679
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
31680
+ function baseKeys(object) {
31681
+ if (!isPrototype(object)) {
31682
+ return nativeKeys$1(object);
31683
+ }
31684
+ var result = [];
31685
+ for (var key in Object(object)) {
31686
+ if (hasOwnProperty$4.call(object, key) && key != "constructor") {
31687
+ result.push(key);
31688
+ }
31689
+ }
31690
+ return result;
31691
+ }
31692
+ function keys(object) {
31693
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
31694
+ }
31695
+ var nativeCreate = getNative(Object, "create");
31696
+ const nativeCreate$1 = nativeCreate;
31697
+ function hashClear() {
31698
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
31699
+ this.size = 0;
31700
+ }
31701
+ function hashDelete(key) {
31702
+ var result = this.has(key) && delete this.__data__[key];
31703
+ this.size -= result ? 1 : 0;
31704
+ return result;
31705
+ }
31706
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
31707
+ var objectProto$4 = Object.prototype;
31708
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
31709
+ function hashGet(key) {
31710
+ var data = this.__data__;
31711
+ if (nativeCreate$1) {
31712
+ var result = data[key];
31713
+ return result === HASH_UNDEFINED$2 ? void 0 : result;
31714
+ }
31715
+ return hasOwnProperty$3.call(data, key) ? data[key] : void 0;
31716
+ }
31717
+ var objectProto$3 = Object.prototype;
31718
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
31719
+ function hashHas(key) {
31720
+ var data = this.__data__;
31721
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$2.call(data, key);
31722
+ }
31723
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
31724
+ function hashSet(key, value) {
31725
+ var data = this.__data__;
31726
+ this.size += this.has(key) ? 0 : 1;
31727
+ data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
31728
+ return this;
31729
+ }
31730
+ function Hash(entries) {
31731
+ var index = -1, length = entries == null ? 0 : entries.length;
31732
+ this.clear();
31733
+ while (++index < length) {
31734
+ var entry = entries[index];
31735
+ this.set(entry[0], entry[1]);
31736
+ }
31737
+ }
31738
+ Hash.prototype.clear = hashClear;
31739
+ Hash.prototype["delete"] = hashDelete;
31740
+ Hash.prototype.get = hashGet;
31741
+ Hash.prototype.has = hashHas;
31742
+ Hash.prototype.set = hashSet;
31743
+ function listCacheClear() {
31744
+ this.__data__ = [];
31745
+ this.size = 0;
31746
+ }
31747
+ function assocIndexOf(array, key) {
31748
+ var length = array.length;
31749
+ while (length--) {
31750
+ if (eq(array[length][0], key)) {
31751
+ return length;
31752
+ }
31753
+ }
31754
+ return -1;
31755
+ }
31756
+ var arrayProto = Array.prototype;
31757
+ var splice = arrayProto.splice;
31758
+ function listCacheDelete(key) {
31759
+ var data = this.__data__, index = assocIndexOf(data, key);
31760
+ if (index < 0) {
31761
+ return false;
31762
+ }
31763
+ var lastIndex = data.length - 1;
31764
+ if (index == lastIndex) {
31765
+ data.pop();
31766
+ } else {
31767
+ splice.call(data, index, 1);
31768
+ }
31769
+ --this.size;
31770
+ return true;
31771
+ }
31772
+ function listCacheGet(key) {
31773
+ var data = this.__data__, index = assocIndexOf(data, key);
31774
+ return index < 0 ? void 0 : data[index][1];
31775
+ }
31776
+ function listCacheHas(key) {
31777
+ return assocIndexOf(this.__data__, key) > -1;
31778
+ }
31779
+ function listCacheSet(key, value) {
31780
+ var data = this.__data__, index = assocIndexOf(data, key);
31781
+ if (index < 0) {
31782
+ ++this.size;
31783
+ data.push([key, value]);
31784
+ } else {
31785
+ data[index][1] = value;
31786
+ }
31787
+ return this;
31788
+ }
31789
+ function ListCache(entries) {
31790
+ var index = -1, length = entries == null ? 0 : entries.length;
31791
+ this.clear();
31792
+ while (++index < length) {
31793
+ var entry = entries[index];
31794
+ this.set(entry[0], entry[1]);
31795
+ }
31796
+ }
31797
+ ListCache.prototype.clear = listCacheClear;
31798
+ ListCache.prototype["delete"] = listCacheDelete;
31799
+ ListCache.prototype.get = listCacheGet;
31800
+ ListCache.prototype.has = listCacheHas;
31801
+ ListCache.prototype.set = listCacheSet;
31802
+ var Map$1 = getNative(root$1, "Map");
31803
+ const Map$2 = Map$1;
31804
+ function mapCacheClear() {
31805
+ this.size = 0;
31806
+ this.__data__ = {
31807
+ "hash": new Hash(),
31808
+ "map": new (Map$2 || ListCache)(),
31809
+ "string": new Hash()
31810
+ };
31811
+ }
31812
+ function isKeyable(value) {
31813
+ var type = typeof value;
31814
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
31815
+ }
31816
+ function getMapData(map, key) {
31817
+ var data = map.__data__;
31818
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
31819
+ }
31820
+ function mapCacheDelete(key) {
31821
+ var result = getMapData(this, key)["delete"](key);
31822
+ this.size -= result ? 1 : 0;
31823
+ return result;
31824
+ }
31825
+ function mapCacheGet(key) {
31826
+ return getMapData(this, key).get(key);
31827
+ }
31828
+ function mapCacheHas(key) {
31829
+ return getMapData(this, key).has(key);
31830
+ }
31831
+ function mapCacheSet(key, value) {
31832
+ var data = getMapData(this, key), size2 = data.size;
31833
+ data.set(key, value);
31834
+ this.size += data.size == size2 ? 0 : 1;
31835
+ return this;
31836
+ }
31837
+ function MapCache(entries) {
31838
+ var index = -1, length = entries == null ? 0 : entries.length;
31839
+ this.clear();
31840
+ while (++index < length) {
31841
+ var entry = entries[index];
31842
+ this.set(entry[0], entry[1]);
31843
+ }
31844
+ }
31845
+ MapCache.prototype.clear = mapCacheClear;
31846
+ MapCache.prototype["delete"] = mapCacheDelete;
31847
+ MapCache.prototype.get = mapCacheGet;
31848
+ MapCache.prototype.has = mapCacheHas;
31849
+ MapCache.prototype.set = mapCacheSet;
31850
+ function arrayPush(array, values2) {
31851
+ var index = -1, length = values2.length, offset2 = array.length;
31852
+ while (++index < length) {
31853
+ array[offset2 + index] = values2[index];
31854
+ }
31855
+ return array;
31856
+ }
31857
+ function stackClear() {
31858
+ this.__data__ = new ListCache();
31859
+ this.size = 0;
31860
+ }
31861
+ function stackDelete(key) {
31862
+ var data = this.__data__, result = data["delete"](key);
31863
+ this.size = data.size;
31864
+ return result;
31865
+ }
31866
+ function stackGet(key) {
31867
+ return this.__data__.get(key);
31868
+ }
31869
+ function stackHas(key) {
31870
+ return this.__data__.has(key);
31871
+ }
31872
+ var LARGE_ARRAY_SIZE = 200;
31873
+ function stackSet(key, value) {
31874
+ var data = this.__data__;
31875
+ if (data instanceof ListCache) {
31876
+ var pairs = data.__data__;
31877
+ if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
31878
+ pairs.push([key, value]);
31879
+ this.size = ++data.size;
31880
+ return this;
31881
+ }
31882
+ data = this.__data__ = new MapCache(pairs);
31883
+ }
31884
+ data.set(key, value);
31885
+ this.size = data.size;
31886
+ return this;
31887
+ }
31888
+ function Stack(entries) {
31889
+ var data = this.__data__ = new ListCache(entries);
31890
+ this.size = data.size;
31891
+ }
31892
+ Stack.prototype.clear = stackClear;
31893
+ Stack.prototype["delete"] = stackDelete;
31894
+ Stack.prototype.get = stackGet;
31895
+ Stack.prototype.has = stackHas;
31896
+ Stack.prototype.set = stackSet;
31897
+ function arrayFilter(array, predicate) {
31898
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
31899
+ while (++index < length) {
31900
+ var value = array[index];
31901
+ if (predicate(value, index, array)) {
31902
+ result[resIndex++] = value;
31903
+ }
31904
+ }
31905
+ return result;
31906
+ }
31907
+ function stubArray() {
31908
+ return [];
31909
+ }
31910
+ var objectProto$2 = Object.prototype;
31911
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
31912
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
31913
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
31914
+ if (object == null) {
31915
+ return [];
31916
+ }
31917
+ object = Object(object);
31918
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
31919
+ return propertyIsEnumerable.call(object, symbol);
31920
+ });
31921
+ };
31922
+ const getSymbols$1 = getSymbols;
31923
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
31924
+ var result = keysFunc(object);
31925
+ return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object));
31926
+ }
31927
+ function getAllKeys(object) {
31928
+ return baseGetAllKeys(object, keys, getSymbols$1);
31929
+ }
31930
+ var DataView = getNative(root$1, "DataView");
31931
+ const DataView$1 = DataView;
31932
+ var Promise$1 = getNative(root$1, "Promise");
31933
+ const Promise$2 = Promise$1;
31934
+ var Set$1 = getNative(root$1, "Set");
31935
+ const Set$2 = Set$1;
31936
+ var mapTag$1 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
31937
+ var dataViewTag$1 = "[object DataView]";
31938
+ var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$2);
31939
+ var getTag$1 = baseGetTag;
31940
+ if (DataView$1 && getTag$1(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1 || Map$2 && getTag$1(new Map$2()) != mapTag$1 || Promise$2 && getTag$1(Promise$2.resolve()) != promiseTag || Set$2 && getTag$1(new Set$2()) != setTag$1 || WeakMap$2 && getTag$1(new WeakMap$2()) != weakMapTag) {
31941
+ getTag$1 = function(value) {
31942
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
31943
+ if (ctorString) {
31944
+ switch (ctorString) {
31945
+ case dataViewCtorString:
31946
+ return dataViewTag$1;
31947
+ case mapCtorString:
31948
+ return mapTag$1;
31949
+ case promiseCtorString:
31950
+ return promiseTag;
31951
+ case setCtorString:
31952
+ return setTag$1;
31953
+ case weakMapCtorString:
31954
+ return weakMapTag;
31955
+ }
31956
+ }
31957
+ return result;
31958
+ };
31959
+ }
31960
+ const getTag$2 = getTag$1;
31961
+ var Uint8Array$1 = root$1.Uint8Array;
31962
+ const Uint8Array$2 = Uint8Array$1;
31963
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
31964
+ function setCacheAdd(value) {
31965
+ this.__data__.set(value, HASH_UNDEFINED);
31966
+ return this;
31967
+ }
31968
+ function setCacheHas(value) {
31969
+ return this.__data__.has(value);
31970
+ }
31971
+ function SetCache(values2) {
31972
+ var index = -1, length = values2 == null ? 0 : values2.length;
31973
+ this.__data__ = new MapCache();
31974
+ while (++index < length) {
31975
+ this.add(values2[index]);
31976
+ }
31977
+ }
31978
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
31979
+ SetCache.prototype.has = setCacheHas;
31980
+ function arraySome(array, predicate) {
31981
+ var index = -1, length = array == null ? 0 : array.length;
31982
+ while (++index < length) {
31983
+ if (predicate(array[index], index, array)) {
31984
+ return true;
31985
+ }
31986
+ }
31987
+ return false;
31988
+ }
31989
+ function cacheHas(cache2, key) {
31990
+ return cache2.has(key);
31991
+ }
31992
+ var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
31993
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
31994
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
31995
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
31996
+ return false;
31997
+ }
31998
+ var arrStacked = stack.get(array);
31999
+ var othStacked = stack.get(other);
32000
+ if (arrStacked && othStacked) {
32001
+ return arrStacked == other && othStacked == array;
32002
+ }
32003
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
32004
+ stack.set(array, other);
32005
+ stack.set(other, array);
32006
+ while (++index < arrLength) {
32007
+ var arrValue = array[index], othValue = other[index];
32008
+ if (customizer) {
32009
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
32010
+ }
32011
+ if (compared !== void 0) {
32012
+ if (compared) {
32013
+ continue;
32014
+ }
32015
+ result = false;
32016
+ break;
32017
+ }
32018
+ if (seen) {
32019
+ if (!arraySome(other, function(othValue2, othIndex) {
32020
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
32021
+ return seen.push(othIndex);
32022
+ }
32023
+ })) {
32024
+ result = false;
32025
+ break;
32026
+ }
32027
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
32028
+ result = false;
32029
+ break;
32030
+ }
32031
+ }
32032
+ stack["delete"](array);
32033
+ stack["delete"](other);
32034
+ return result;
32035
+ }
32036
+ function mapToArray(map) {
32037
+ var index = -1, result = Array(map.size);
32038
+ map.forEach(function(value, key) {
32039
+ result[++index] = [key, value];
32040
+ });
32041
+ return result;
32042
+ }
32043
+ function setToArray(set2) {
32044
+ var index = -1, result = Array(set2.size);
32045
+ set2.forEach(function(value) {
32046
+ result[++index] = value;
32047
+ });
32048
+ return result;
32049
+ }
32050
+ var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
32051
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
32052
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
32053
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
32054
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
32055
+ switch (tag) {
32056
+ case dataViewTag:
32057
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
32058
+ return false;
32059
+ }
32060
+ object = object.buffer;
32061
+ other = other.buffer;
32062
+ case arrayBufferTag:
32063
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object), new Uint8Array$2(other))) {
32064
+ return false;
32065
+ }
32066
+ return true;
32067
+ case boolTag:
32068
+ case dateTag:
32069
+ case numberTag:
32070
+ return eq(+object, +other);
32071
+ case errorTag:
32072
+ return object.name == other.name && object.message == other.message;
32073
+ case regexpTag:
32074
+ case stringTag:
32075
+ return object == other + "";
32076
+ case mapTag:
32077
+ var convert = mapToArray;
32078
+ case setTag:
32079
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
32080
+ convert || (convert = setToArray);
32081
+ if (object.size != other.size && !isPartial) {
32082
+ return false;
32083
+ }
32084
+ var stacked = stack.get(object);
32085
+ if (stacked) {
32086
+ return stacked == other;
32087
+ }
32088
+ bitmask |= COMPARE_UNORDERED_FLAG;
32089
+ stack.set(object, other);
32090
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
32091
+ stack["delete"](object);
32092
+ return result;
32093
+ case symbolTag:
32094
+ if (symbolValueOf) {
32095
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
32096
+ }
32097
+ }
32098
+ return false;
32099
+ }
32100
+ var COMPARE_PARTIAL_FLAG$1 = 1;
32101
+ var objectProto$1 = Object.prototype;
32102
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
32103
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
32104
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
32105
+ if (objLength != othLength && !isPartial) {
32106
+ return false;
32107
+ }
32108
+ var index = objLength;
32109
+ while (index--) {
32110
+ var key = objProps[index];
32111
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
32112
+ return false;
32113
+ }
32114
+ }
32115
+ var objStacked = stack.get(object);
32116
+ var othStacked = stack.get(other);
32117
+ if (objStacked && othStacked) {
32118
+ return objStacked == other && othStacked == object;
32119
+ }
32120
+ var result = true;
32121
+ stack.set(object, other);
32122
+ stack.set(other, object);
32123
+ var skipCtor = isPartial;
32124
+ while (++index < objLength) {
32125
+ key = objProps[index];
32126
+ var objValue = object[key], othValue = other[key];
32127
+ if (customizer) {
32128
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
32129
+ }
32130
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
32131
+ result = false;
32132
+ break;
32133
+ }
32134
+ skipCtor || (skipCtor = key == "constructor");
32135
+ }
32136
+ if (result && !skipCtor) {
32137
+ var objCtor = object.constructor, othCtor = other.constructor;
32138
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
32139
+ result = false;
32140
+ }
32141
+ }
32142
+ stack["delete"](object);
32143
+ stack["delete"](other);
32144
+ return result;
32145
+ }
32146
+ var COMPARE_PARTIAL_FLAG = 1;
32147
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
32148
+ var objectProto = Object.prototype;
32149
+ var hasOwnProperty = objectProto.hasOwnProperty;
32150
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
32151
+ var objIsArr = isArray$2(object), othIsArr = isArray$2(other), objTag = objIsArr ? arrayTag : getTag$2(object), othTag = othIsArr ? arrayTag : getTag$2(other);
32152
+ objTag = objTag == argsTag ? objectTag : objTag;
32153
+ othTag = othTag == argsTag ? objectTag : othTag;
32154
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
32155
+ if (isSameTag && isBuffer$1(object)) {
32156
+ if (!isBuffer$1(other)) {
32157
+ return false;
32158
+ }
32159
+ objIsArr = true;
32160
+ objIsObj = false;
32161
+ }
32162
+ if (isSameTag && !objIsObj) {
32163
+ stack || (stack = new Stack());
32164
+ return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
32165
+ }
32166
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
32167
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
32168
+ if (objIsWrapped || othIsWrapped) {
32169
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
32170
+ stack || (stack = new Stack());
32171
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
32172
+ }
32173
+ }
32174
+ if (!isSameTag) {
32175
+ return false;
32176
+ }
32177
+ stack || (stack = new Stack());
32178
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
32179
+ }
32180
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
32181
+ if (value === other) {
32182
+ return true;
32183
+ }
32184
+ if (value == null || other == null || !isObjectLike$1(value) && !isObjectLike$1(other)) {
32185
+ return value !== value && other !== other;
32186
+ }
32187
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
32188
+ }
32189
+ function isEqual(value, other) {
32190
+ return baseIsEqual(value, other);
32191
+ }
32192
+ const useStyles = makeStyles(() => ({
32193
+ selectedPair: {
32194
+ fontWeight: "bold"
32195
+ },
32196
+ pairUl: {
32197
+ paddingLeft: "15px",
32198
+ marginTop: 0,
32199
+ fontSize: "12px",
32200
+ "& button": {
32201
+ fontSize: "12px"
32202
+ }
32203
+ }
32204
+ }));
32205
+ function SampleSetPairManagerSubscriber(props) {
32206
+ const {
32207
+ coordinationScopes,
32208
+ removeGridComponent,
32209
+ theme,
32210
+ title = "Sample Sets",
32211
+ closeButtonVisible,
32212
+ helpText = ViewHelpMapping.SAMPLE_SET_PAIR_MANAGER
32213
+ } = props;
32214
+ const classes = useStyles();
32215
+ const loaders = useLoaders();
32216
+ const [{
32217
+ dataset,
32218
+ obsType,
32219
+ sampleType,
32220
+ sampleSetSelection
32221
+ }, {
32222
+ setSampleSetSelection
32223
+ }] = useCoordination(
32224
+ COMPONENT_COORDINATION_TYPES[ViewType.SAMPLE_SET_PAIR_MANAGER],
32225
+ coordinationScopes
32226
+ );
32227
+ const sampleSetsLoader = useMatchingLoader(
32228
+ loaders,
32229
+ dataset,
32230
+ DataType.SAMPLE_SETS,
32231
+ { sampleType }
32232
+ );
32233
+ const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
32234
+ const [{ comparisonMetadata }, cmpMetadataStatus] = useComparisonMetadata(
32235
+ loaders,
32236
+ dataset,
32237
+ false,
32238
+ {},
32239
+ {},
32240
+ { obsType, sampleType }
32241
+ );
32242
+ const isReady = useReady([
32243
+ cmpMetadataStatus
32244
+ ]);
32245
+ const stratificationOptions = useMemo(() => {
32246
+ if (comparisonMetadata == null ? void 0 : comparisonMetadata.sample_group_pairs) {
32247
+ return comparisonMetadata.sample_group_pairs.map((sampleGroupPair) => {
32248
+ const [sampleGroupCol, sampleGroupValues] = sampleGroupPair;
32249
+ const [sampleGroupCtrl, sampleGroupCase] = sampleGroupValues;
32250
+ const groupName = sampleSetsColumnNameMappingReversed == null ? void 0 : sampleSetsColumnNameMappingReversed[sampleGroupCol];
32251
+ return {
32252
+ stratificationId: `${sampleGroupCol}_${sampleGroupCtrl}-vs-${sampleGroupCase}`,
32253
+ name: `${groupName}: ${sampleGroupCtrl} vs. ${sampleGroupCase}`,
32254
+ stratificationType: "sampleSet",
32255
+ sampleSets: [
32256
+ // With sampleSets coming from the comparison_metadata,
32257
+ // need to use loader options from obsSets and sampleSets to get mapping
32258
+ // from column name to group name.
32259
+ [groupName, sampleGroupCtrl],
32260
+ [groupName, sampleGroupCase]
32261
+ ]
32262
+ };
32263
+ });
32264
+ }
32265
+ return null;
32266
+ }, [comparisonMetadata, sampleSetsColumnNameMappingReversed]);
32267
+ const onSelectPair = useCallback((sampleSetPair) => {
32268
+ setSampleSetSelection(sampleSetPair);
32269
+ }, [sampleSetSelection, setSampleSetSelection]);
32270
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
32271
+ TitleInfo,
32272
+ {
32273
+ title,
32274
+ closeButtonVisible,
32275
+ removeGridComponent,
32276
+ isScroll: true,
32277
+ theme,
32278
+ isReady,
32279
+ helpText,
32280
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: classes.pairUl, children: stratificationOptions == null ? void 0 : stratificationOptions.map((pairObj) => {
32281
+ const isSelected = Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2 && (isEqual(pairObj.sampleSets, sampleSetSelection) || isEqual(pairObj.sampleSets, [sampleSetSelection == null ? void 0 : sampleSetSelection[1], sampleSetSelection == null ? void 0 : sampleSetSelection[0]]));
32282
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
32283
+ "li",
32284
+ {
32285
+ className: clsx({ [classes.selectedPair]: isSelected }),
32286
+ children: [
32287
+ pairObj.name,
32288
+ " ",
32289
+ !isSelected ? /* @__PURE__ */ jsxRuntimeExports.jsx(
32290
+ "button",
32291
+ {
32292
+ type: "button",
32293
+ onClick: () => onSelectPair(pairObj.sampleSets),
32294
+ children: "Select"
32295
+ }
32296
+ ) : null
32297
+ ]
32298
+ },
32299
+ pairObj.stratificationId
32300
+ );
32301
+ }) })
32302
+ }
32303
+ );
32304
+ }
31376
32305
  var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13;
31377
32306
  function objectConverter(columns2) {
31378
32307
  return new Function("d", "return {" + columns2.map(function(name, i) {
@@ -32441,12 +33370,17 @@ function loadCellTypeNodes() {
32441
33370
  });
32442
33371
  }
32443
33372
  function loadPathwayNodes() {
32444
- return fetch(`${KG_BASE_URL}/Reactome_2022.nodes.csv`).then((res) => res.text()).then((res) => {
33373
+ const reactomeNodes = fetch(`${KG_BASE_URL}/Reactome_2022.nodes.csv`);
33374
+ return reactomeNodes.then((res) => res.text()).then((res) => {
32445
33375
  const result = csvParse(res);
32446
33376
  return result.map((d) => ({
32447
33377
  kgId: d.id,
32448
33378
  label: d.pathway,
32449
- term: `reactome:${d.acc}`,
33379
+ // For reactome
33380
+ term: `REACTOME:${d.acc}`,
33381
+ // For reactome
33382
+ // label: d.ontology_label, // For GO_BP
33383
+ // term: d.acc, // For GO_BP
32450
33384
  nodeType: "pathway"
32451
33385
  }));
32452
33386
  });
@@ -32503,7 +33437,8 @@ async function autocompleteFeature({ queryClient }, partial, targetModality) {
32503
33437
  return results.map((result) => result.item);
32504
33438
  }
32505
33439
  async function loadPathwayToGeneEdges() {
32506
- return fetch(`${KG_BASE_URL}/Reactome_2022.Reactome.Gene.edges.csv`).then((res) => res.text()).then((res) => {
33440
+ const reactomeEdges = fetch(`${KG_BASE_URL}/Reactome_2022.Reactome.Gene.edges.csv`);
33441
+ return reactomeEdges.then((res) => res.text()).then((res) => {
32507
33442
  const result = csvParse(res);
32508
33443
  return result.map((d) => ({
32509
33444
  source: d.source,
@@ -32512,7 +33447,11 @@ async function loadPathwayToGeneEdges() {
32512
33447
  }));
32513
33448
  });
32514
33449
  }
32515
- async function transformFeature({ queryClient }, node, targetModality) {
33450
+ async function transformFeature({ queryClient }, nodeOrig, targetModality) {
33451
+ var _a2;
33452
+ const node = {
33453
+ ...nodeOrig
33454
+ };
32516
33455
  if (targetModality === node.nodeType) {
32517
33456
  return [node];
32518
33457
  }
@@ -32528,6 +33467,19 @@ async function transformFeature({ queryClient }, node, targetModality) {
32528
33467
  staleTime: Infinity,
32529
33468
  queryFn: loadPathwayToGeneEdges
32530
33469
  });
33470
+ if (!node.kgId) {
33471
+ const pathwayNodes = await queryClient.fetchQuery({
33472
+ queryKey: ["pathwayNodes"],
33473
+ staleTime: Infinity,
33474
+ queryFn: loadPathwayNodes
33475
+ });
33476
+ const foundId = (_a2 = pathwayNodes.find((n2) => n2.term === node.term)) == null ? void 0 : _a2.kgId;
33477
+ if (foundId) {
33478
+ node.kgId = foundId;
33479
+ } else {
33480
+ console.warn("Could not find matching pathway node based on term.");
33481
+ }
33482
+ }
32531
33483
  const matchingEdges = pathwayGeneEdges.filter((d) => d.source === node.kgId);
32532
33484
  const matchingGeneIds = matchingEdges.map((d) => d.target);
32533
33485
  const matchingGenes = geneNodes.filter((d) => matchingGeneIds.includes(d.kgId));
@@ -32572,6 +33524,7 @@ async function getTermMapping({ queryClient }, keyCuriePrefix, valCuriePrefix) {
32572
33524
  export {
32573
33525
  BiomarkerSelectSubscriber,
32574
33526
  ComparativeHeadingSubscriber,
33527
+ SampleSetPairManagerSubscriber,
32575
33528
  autocompleteFeature,
32576
33529
  getAlternativeTerms,
32577
33530
  getTermMapping,