@vitessce/dev 3.8.8 → 3.8.10

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.
@@ -1338,7 +1338,7 @@ const COMPONENT_COORDINATION_TYPES = {
1338
1338
  CoordinationType$2.HIERARCHY_LEVELS
1339
1339
  ]
1340
1340
  };
1341
- const version$6 = "3.8.8";
1341
+ const version$6 = "3.8.10";
1342
1342
  const META_VERSION = {
1343
1343
  version: version$6
1344
1344
  };
@@ -2462,6 +2462,59 @@ class Pool {
2462
2462
  }
2463
2463
  }
2464
2464
  }
2465
+ function aggregateFeatureArrays(arrays, strategy) {
2466
+ if (!arrays || arrays.length === 0)
2467
+ return null;
2468
+ let targetArray;
2469
+ if (strategy === "first" || typeof strategy === "number" && strategy === 0) {
2470
+ targetArray = arrays[0];
2471
+ } else if (strategy === "last") {
2472
+ targetArray = arrays[arrays.length - 1];
2473
+ } else if (typeof strategy === "number") {
2474
+ if (strategy >= 0 && strategy < arrays.length) {
2475
+ targetArray = arrays[strategy];
2476
+ } else {
2477
+ throw new Error(`Array index out of bounds: ${strategy}`);
2478
+ }
2479
+ }
2480
+ if (targetArray) {
2481
+ return targetArray;
2482
+ }
2483
+ const numArrays = arrays.length;
2484
+ const firstArrayLength = arrays[0].length;
2485
+ if (arrays.some((arr) => arr.length !== firstArrayLength)) {
2486
+ throw new Error("All arrays must have the same length for aggregation.");
2487
+ }
2488
+ if (strategy === "sum" || strategy === "mean") {
2489
+ const resultArray = new Float64Array(firstArrayLength);
2490
+ for (let i2 = 0; i2 < numArrays; i2++) {
2491
+ const arr = arrays[i2];
2492
+ for (let j = 0; j < firstArrayLength; j++) {
2493
+ resultArray[j] += arr[j];
2494
+ }
2495
+ }
2496
+ if (strategy === "mean") {
2497
+ for (let i2 = 0; i2 < firstArrayLength; i2++) {
2498
+ resultArray[i2] /= numArrays;
2499
+ }
2500
+ }
2501
+ return resultArray;
2502
+ }
2503
+ if (strategy === "difference") {
2504
+ if (numArrays !== 2) {
2505
+ console.warn("Difference strategy requires exactly 2 arrays.");
2506
+ return arrays[0];
2507
+ }
2508
+ const arr0 = arrays[0];
2509
+ const arr1 = arrays[1];
2510
+ const resultArray = new Float64Array(firstArrayLength);
2511
+ for (let i2 = 0; i2 < firstArrayLength; i2++) {
2512
+ resultArray[i2] = arr0[i2] - arr1[i2];
2513
+ }
2514
+ return resultArray;
2515
+ }
2516
+ throw new Error(`Unknown aggregation strategy: ${strategy}`);
2517
+ }
2465
2518
  class VitessceConfigDatasetFile {
2466
2519
  /**
2467
2520
  * Construct a new file definition instance.
@@ -4907,7 +4960,7 @@ let Array$2 = (_k = class extends (_j2 = Location$1, _i = CONTEXT_MARKER$1, _j2)
4907
4960
  return is_dtype$1(this.dtype, query);
4908
4961
  }
4909
4962
  }, _metadata2 = new WeakMap(), _k);
4910
- function* range$f(start2, stop3, step = 1) {
4963
+ function* range$e(start2, stop3, step = 1) {
4911
4964
  if (stop3 === void 0) {
4912
4965
  stop3 = start2;
4913
4966
  start2 = 0;
@@ -5062,7 +5115,7 @@ let SliceDimIndexer$1 = class SliceDimIndexer {
5062
5115
  *[Symbol.iterator]() {
5063
5116
  const dim_chunk_ix_from = Math.floor(this.start / this.dim_chunk_len);
5064
5117
  const dim_chunk_ix_to = Math.ceil(this.stop / this.dim_chunk_len);
5065
- for (const dim_chunk_ix of range$f(dim_chunk_ix_from, dim_chunk_ix_to)) {
5118
+ for (const dim_chunk_ix of range$e(dim_chunk_ix_from, dim_chunk_ix_to)) {
5066
5119
  const dim_offset = dim_chunk_ix * this.dim_chunk_len;
5067
5120
  const dim_limit = Math.min(this.dim_len, (dim_chunk_ix + 1) * this.dim_chunk_len);
5068
5121
  const dim_chunk_len = dim_limit - dim_offset;
@@ -6434,7 +6487,7 @@ function parseV1(spec, renderString) {
6434
6487
  function* iterDims(dimensions) {
6435
6488
  const keys2 = Object.keys(dimensions);
6436
6489
  const iterables = Object.values(dimensions).map(
6437
- (i2) => Array.isArray(i2) ? i2 : [...range$e(i2)]
6490
+ (i2) => Array.isArray(i2) ? i2 : [...range$d(i2)]
6438
6491
  );
6439
6492
  for (const values3 of product$2(...iterables)) {
6440
6493
  yield Object.fromEntries(keys2.map((key2, i2) => [key2, values3[i2]]));
@@ -6463,7 +6516,7 @@ function* product$2(...iterables) {
6463
6516
  results[i2] = iterators[i2].next();
6464
6517
  }
6465
6518
  }
6466
- function* range$e({ stop: stop3, start: start2 = 0, step = 1 }) {
6519
+ function* range$d({ stop: stop3, start: start2 = 0, step = 1 }) {
6467
6520
  for (let i2 = start2; i2 < stop3; i2 += step) {
6468
6521
  yield i2;
6469
6522
  }
@@ -6726,13 +6779,7 @@ class SpatialDataAutoConfig extends AbstractAutoConfig2 {
6726
6779
  };
6727
6780
  }
6728
6781
  if (relPath.match(/^(shapes)\/([^/]*)$/)) {
6729
- options.obsSpots = {
6730
- path: relPath,
6731
- coordinateSystem: firstCoordinateSystem
6732
- };
6733
- }
6734
- if (relPath.match(/^(points)\/([^/]*)$/)) {
6735
- options.obsPoints = {
6782
+ options.obsSegmentations = {
6736
6783
  path: relPath,
6737
6784
  coordinateSystem: firstCoordinateSystem
6738
6785
  };
@@ -6746,21 +6793,6 @@ class SpatialDataAutoConfig extends AbstractAutoConfig2 {
6746
6793
  // region: null,
6747
6794
  };
6748
6795
  }
6749
- const hasObs = tableEls.find((el) => el.path === `${path2}/obs`);
6750
- if (hasObs) {
6751
- const columnOrder = hasObs.attrs?.["column-order"];
6752
- options.obsSets = {
6753
- // region: null,
6754
- tablePath: relPath,
6755
- obsSets: columnOrder.map((c2) => ({
6756
- // TODO: determine whether this column is string/categorical.
6757
- // TODO: determine whether this column contains too many
6758
- // categories to make sense to consider a cell set.
6759
- path: `${hasObs.path.substring(1)}/${c2}`,
6760
- name: c2
6761
- }))
6762
- };
6763
- }
6764
6796
  }
6765
6797
  });
6766
6798
  return options;
@@ -6915,8 +6947,16 @@ async function parsedUrlToZmetadata(parsedUrl) {
6915
6947
  store = await withConsolidated(initialStore, { metadataKey: "zmetadata" });
6916
6948
  }
6917
6949
  const contents = store.contents();
6950
+ const consolidatedRoot = await open$1(store, { kind: "group" });
6918
6951
  promises = contents.map(async (value2) => {
6919
- const item = await open$1(root$e(store).resolve(value2.path));
6952
+ let item;
6953
+ try {
6954
+ item = await open$1(consolidatedRoot.resolve(value2.path), { kind: value2.kind });
6955
+ } catch {
6956
+ item = {
6957
+ attrs: {}
6958
+ };
6959
+ }
6920
6960
  return {
6921
6961
  ...value2,
6922
6962
  attrs: item.attrs
@@ -6947,9 +6987,10 @@ async function parsedUrlToZmetadata(parsedUrl) {
6947
6987
  // Note: For spatialData, we assume the store is always consolidated.
6948
6988
  // TODO: throw error if spatialdata + not consolidated?
6949
6989
  ];
6990
+ const storeRoot = await open$1(store, { kind: "group" });
6950
6991
  promises = keysToTry.map(async (k) => {
6951
6992
  try {
6952
- const item = await open$1(root$e(store).resolve(k));
6993
+ const item = await open$1(storeRoot.resolve(k));
6953
6994
  return {
6954
6995
  path: k,
6955
6996
  kind: item.kind,
@@ -45042,7 +45083,7 @@ function escapeRegExp(value2) {
45042
45083
  return value2.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
45043
45084
  }
45044
45085
  const clamp$7 = (value2, min2, max2) => Math.max(min2, Math.min(max2, value2));
45045
- function range$d(from2, to) {
45086
+ function range$c(from2, to) {
45046
45087
  return Array.from({
45047
45088
  length: to - from2
45048
45089
  }).map((_, i2) => from2 + i2);
@@ -49440,7 +49481,7 @@ const useGridVirtualScroller = () => {
49440
49481
  const rowModels = params2.rows ?? currentPage.rows;
49441
49482
  const firstRowToRender = baseRenderContext.firstRowIndex;
49442
49483
  const lastRowToRender = Math.min(baseRenderContext.lastRowIndex, rowModels.length);
49443
- const rowIndexes = params2.rows ? range$d(0, params2.rows.length) : range$d(firstRowToRender, lastRowToRender);
49484
+ const rowIndexes = params2.rows ? range$c(0, params2.rows.length) : range$c(firstRowToRender, lastRowToRender);
49444
49485
  let virtualRowIndex = -1;
49445
49486
  if (!isPinnedSection && focusedVirtualCell) {
49446
49487
  if (focusedVirtualCell.rowIndex < firstRowToRender) {
@@ -75134,7 +75175,7 @@ function createRange(fromRight) {
75134
75175
  return baseRange(start2, end2, step);
75135
75176
  };
75136
75177
  }
75137
- var range$c = createRange();
75178
+ var range$b = createRange();
75138
75179
  function sum$8(array2) {
75139
75180
  return array2 && array2.length ? baseSum(array2, identity$i) : 0;
75140
75181
  }
@@ -80601,10 +80642,10 @@ function requireLrucache() {
80601
80642
  lrucache = LRUCache3;
80602
80643
  return lrucache;
80603
80644
  }
80604
- var range$b;
80645
+ var range$a;
80605
80646
  var hasRequiredRange$1;
80606
80647
  function requireRange$1() {
80607
- if (hasRequiredRange$1) return range$b;
80648
+ if (hasRequiredRange$1) return range$a;
80608
80649
  hasRequiredRange$1 = 1;
80609
80650
  const SPACE_CHARACTERS = /\s+/g;
80610
80651
  class Range2 {
@@ -80745,7 +80786,7 @@ function requireRange$1() {
80745
80786
  return false;
80746
80787
  }
80747
80788
  }
80748
- range$b = Range2;
80789
+ range$a = Range2;
80749
80790
  const LRU = requireLrucache();
80750
80791
  const cache2 = new LRU();
80751
80792
  const parseOptions2 = requireParseOptions();
@@ -80975,7 +81016,7 @@ function requireRange$1() {
80975
81016
  }
80976
81017
  return true;
80977
81018
  };
80978
- return range$b;
81019
+ return range$a;
80979
81020
  }
80980
81021
  var comparator$2;
80981
81022
  var hasRequiredComparator$1;
@@ -89891,7 +89932,7 @@ function resolveLayout(layout) {
89891
89932
  const id2 = "ID";
89892
89933
  const columnCount = 12;
89893
89934
  cols[id2] = columnCount;
89894
- layouts[id2] = makeGridLayout(range$c(columnCount + 1), positions);
89935
+ layouts[id2] = makeGridLayout(range$b(columnCount + 1), positions);
89895
89936
  breakpoints2[id2] = 1e3;
89896
89937
  }
89897
89938
  return {
@@ -90283,10 +90324,10 @@ function createLoaders(datasets, configDescription, fileTypes, coordinationTypes
90283
90324
  });
90284
90325
  return result;
90285
90326
  }
90286
- function ascending$9(a2, b2) {
90327
+ function ascending$8(a2, b2) {
90287
90328
  return a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
90288
90329
  }
90289
- function bisector$4(f2) {
90330
+ function bisector$3(f2) {
90290
90331
  let delta = f2;
90291
90332
  let compare2 = f2;
90292
90333
  if (f2.length === 1) {
@@ -90322,14 +90363,14 @@ function bisector$4(f2) {
90322
90363
  return { left: left2, center: center2, right: right2 };
90323
90364
  }
90324
90365
  function ascendingComparator$1(f2) {
90325
- return (d, x2) => ascending$9(f2(d), x2);
90366
+ return (d, x2) => ascending$8(f2(d), x2);
90326
90367
  }
90327
- function number$b(x2) {
90368
+ function number$a(x2) {
90328
90369
  return x2 === null ? NaN : +x2;
90329
90370
  }
90330
- const ascendingBisect$2 = bisector$4(ascending$9);
90331
- const bisectRight$3 = ascendingBisect$2.right;
90332
- bisector$4(number$b).center;
90371
+ const ascendingBisect$1 = bisector$3(ascending$8);
90372
+ const bisectRight$2 = ascendingBisect$1.right;
90373
+ bisector$3(number$a).center;
90333
90374
  function count$2(values3, valueof) {
90334
90375
  let count2 = 0;
90335
90376
  {
@@ -90548,7 +90589,7 @@ function bin$2() {
90548
90589
  for (i2 = 0; i2 < n3; ++i2) {
90549
90590
  x2 = values3[i2];
90550
90591
  if (x02 <= x2 && x2 <= x12) {
90551
- bins2[bisectRight$3(tz, x2, 0, m2)].push(data2[i2]);
90592
+ bins2[bisectRight$2(tz, x2, 0, m2)].push(data2[i2]);
90552
90593
  }
90553
90594
  }
90554
90595
  return bins2;
@@ -90586,7 +90627,7 @@ function min$4(values3, valueof) {
90586
90627
  }
90587
90628
  return min2;
90588
90629
  }
90589
- function quantileSorted$1(values3, p, valueof = number$b) {
90630
+ function quantileSorted$1(values3, p, valueof = number$a) {
90590
90631
  if (!(n3 = values3.length)) return;
90591
90632
  if ((p = +p) <= 0 || n3 < 2) return +valueof(values3[0], 0, values3);
90592
90633
  if (p >= 1) return +valueof(values3[n3 - 1], n3 - 1, values3);
@@ -90718,7 +90759,7 @@ function useClosestVitessceContainerSize(ref2, sidebarWidth) {
90718
90759
  function onWindowResize() {
90719
90760
  if (ref2.current) {
90720
90761
  const { clientHeight: componentHeight, clientWidth: componentWidth } = ref2.current.closest(`.${VITESSCE_CONTAINER}`);
90721
- setWidth(componentWidth - sidebarWidth);
90762
+ setWidth(componentWidth - 0);
90722
90763
  setHeight(componentHeight);
90723
90764
  }
90724
90765
  }
@@ -93041,7 +93082,7 @@ let powers = 0;
93041
93082
  const boolean = increment$1();
93042
93083
  const booleanish = increment$1();
93043
93084
  const overloadedBoolean = increment$1();
93044
- const number$a = increment$1();
93085
+ const number$9 = increment$1();
93045
93086
  const spaceSeparated = increment$1();
93046
93087
  const commaSeparated = increment$1();
93047
93088
  const commaOrSpaceSeparated = increment$1();
@@ -93054,7 +93095,7 @@ const types = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
93054
93095
  booleanish,
93055
93096
  commaOrSpaceSeparated,
93056
93097
  commaSeparated,
93057
- number: number$a,
93098
+ number: number$9,
93058
93099
  overloadedBoolean,
93059
93100
  spaceSeparated
93060
93101
  }, Symbol.toStringTag, { value: "Module" }));
@@ -93153,9 +93194,9 @@ const aria$1 = create$c({
93153
93194
  ariaAutoComplete: null,
93154
93195
  ariaBusy: booleanish,
93155
93196
  ariaChecked: booleanish,
93156
- ariaColCount: number$a,
93157
- ariaColIndex: number$a,
93158
- ariaColSpan: number$a,
93197
+ ariaColCount: number$9,
93198
+ ariaColIndex: number$9,
93199
+ ariaColSpan: number$9,
93159
93200
  ariaControls: spaceSeparated,
93160
93201
  ariaCurrent: null,
93161
93202
  ariaDescribedBy: spaceSeparated,
@@ -93172,7 +93213,7 @@ const aria$1 = create$c({
93172
93213
  ariaKeyShortcuts: null,
93173
93214
  ariaLabel: null,
93174
93215
  ariaLabelledBy: spaceSeparated,
93175
- ariaLevel: number$a,
93216
+ ariaLevel: number$9,
93176
93217
  ariaLive: null,
93177
93218
  ariaModal: booleanish,
93178
93219
  ariaMultiLine: booleanish,
@@ -93180,21 +93221,21 @@ const aria$1 = create$c({
93180
93221
  ariaOrientation: null,
93181
93222
  ariaOwns: spaceSeparated,
93182
93223
  ariaPlaceholder: null,
93183
- ariaPosInSet: number$a,
93224
+ ariaPosInSet: number$9,
93184
93225
  ariaPressed: booleanish,
93185
93226
  ariaReadOnly: booleanish,
93186
93227
  ariaRelevant: null,
93187
93228
  ariaRequired: booleanish,
93188
93229
  ariaRoleDescription: spaceSeparated,
93189
- ariaRowCount: number$a,
93190
- ariaRowIndex: number$a,
93191
- ariaRowSpan: number$a,
93230
+ ariaRowCount: number$9,
93231
+ ariaRowIndex: number$9,
93232
+ ariaRowSpan: number$9,
93192
93233
  ariaSelected: booleanish,
93193
- ariaSetSize: number$a,
93234
+ ariaSetSize: number$9,
93194
93235
  ariaSort: null,
93195
- ariaValueMax: number$a,
93196
- ariaValueMin: number$a,
93197
- ariaValueNow: number$a,
93236
+ ariaValueMax: number$9,
93237
+ ariaValueMin: number$9,
93238
+ ariaValueNow: number$9,
93198
93239
  ariaValueText: null,
93199
93240
  role: null
93200
93241
  }
@@ -93233,13 +93274,13 @@ const html$2 = create$c({
93233
93274
  checked: boolean,
93234
93275
  cite: null,
93235
93276
  className: spaceSeparated,
93236
- cols: number$a,
93277
+ cols: number$9,
93237
93278
  colSpan: null,
93238
93279
  content: null,
93239
93280
  contentEditable: booleanish,
93240
93281
  controls: boolean,
93241
93282
  controlsList: spaceSeparated,
93242
- coords: number$a | commaSeparated,
93283
+ coords: number$9 | commaSeparated,
93243
93284
  crossOrigin: null,
93244
93285
  data: null,
93245
93286
  dateTime: null,
@@ -93261,9 +93302,9 @@ const html$2 = create$c({
93261
93302
  formNoValidate: boolean,
93262
93303
  formTarget: null,
93263
93304
  headers: spaceSeparated,
93264
- height: number$a,
93305
+ height: number$9,
93265
93306
  hidden: boolean,
93266
- high: number$a,
93307
+ high: number$9,
93267
93308
  href: null,
93268
93309
  hrefLang: null,
93269
93310
  htmlFor: spaceSeparated,
@@ -93288,14 +93329,14 @@ const html$2 = create$c({
93288
93329
  list: null,
93289
93330
  loading: null,
93290
93331
  loop: boolean,
93291
- low: number$a,
93332
+ low: number$9,
93292
93333
  manifest: null,
93293
93334
  max: null,
93294
- maxLength: number$a,
93335
+ maxLength: number$9,
93295
93336
  media: null,
93296
93337
  method: null,
93297
93338
  min: null,
93298
- minLength: number$a,
93339
+ minLength: number$9,
93299
93340
  multiple: boolean,
93300
93341
  muted: boolean,
93301
93342
  name: null,
@@ -93391,7 +93432,7 @@ const html$2 = create$c({
93391
93432
  onWaiting: null,
93392
93433
  onWheel: null,
93393
93434
  open: boolean,
93394
- optimum: number$a,
93435
+ optimum: number$9,
93395
93436
  pattern: null,
93396
93437
  ping: spaceSeparated,
93397
93438
  placeholder: null,
@@ -93406,8 +93447,8 @@ const html$2 = create$c({
93406
93447
  rel: spaceSeparated,
93407
93448
  required: boolean,
93408
93449
  reversed: boolean,
93409
- rows: number$a,
93410
- rowSpan: number$a,
93450
+ rows: number$9,
93451
+ rowSpan: number$9,
93411
93452
  sandbox: spaceSeparated,
93412
93453
  scope: null,
93413
93454
  scoped: boolean,
@@ -93417,19 +93458,19 @@ const html$2 = create$c({
93417
93458
  shadowRootDelegatesFocus: boolean,
93418
93459
  shadowRootMode: null,
93419
93460
  shape: null,
93420
- size: number$a,
93461
+ size: number$9,
93421
93462
  sizes: null,
93422
93463
  slot: null,
93423
- span: number$a,
93464
+ span: number$9,
93424
93465
  spellCheck: booleanish,
93425
93466
  src: null,
93426
93467
  srcDoc: null,
93427
93468
  srcLang: null,
93428
93469
  srcSet: null,
93429
- start: number$a,
93470
+ start: number$9,
93430
93471
  step: null,
93431
93472
  style: null,
93432
- tabIndex: number$a,
93473
+ tabIndex: number$9,
93433
93474
  target: null,
93434
93475
  title: null,
93435
93476
  translate: null,
@@ -93437,7 +93478,7 @@ const html$2 = create$c({
93437
93478
  typeMustMatch: boolean,
93438
93479
  useMap: null,
93439
93480
  value: booleanish,
93440
- width: number$a,
93481
+ width: number$9,
93441
93482
  wrap: null,
93442
93483
  writingSuggestions: null,
93443
93484
  // Legacy.
@@ -93454,11 +93495,11 @@ const html$2 = create$c({
93454
93495
  // `<body>`. Use CSS `background-image` instead
93455
93496
  bgColor: null,
93456
93497
  // `<body>` and table elements. Use CSS `background-color` instead
93457
- border: number$a,
93498
+ border: number$9,
93458
93499
  // `<table>`. Use CSS `border-width` instead,
93459
93500
  borderColor: null,
93460
93501
  // `<table>`. Use CSS `border-color` instead,
93461
- bottomMargin: number$a,
93502
+ bottomMargin: number$9,
93462
93503
  // `<body>`
93463
93504
  cellPadding: null,
93464
93505
  // `<table>`
@@ -93492,9 +93533,9 @@ const html$2 = create$c({
93492
93533
  // `<table>`
93493
93534
  frameBorder: null,
93494
93535
  // `<iframe>`. Use CSS `border` instead
93495
- hSpace: number$a,
93536
+ hSpace: number$9,
93496
93537
  // `<img>` and `<object>`
93497
- leftMargin: number$a,
93538
+ leftMargin: number$9,
93498
93539
  // `<body>`
93499
93540
  link: null,
93500
93541
  // `<body>`. Use CSS `a:link {color: *}` instead
@@ -93502,9 +93543,9 @@ const html$2 = create$c({
93502
93543
  // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
93503
93544
  lowSrc: null,
93504
93545
  // `<img>`. Use a `<picture>`
93505
- marginHeight: number$a,
93546
+ marginHeight: number$9,
93506
93547
  // `<body>`
93507
- marginWidth: number$a,
93548
+ marginWidth: number$9,
93508
93549
  // `<body>`
93509
93550
  noResize: boolean,
93510
93551
  // `<frame>`
@@ -93522,7 +93563,7 @@ const html$2 = create$c({
93522
93563
  // `<isindex>`
93523
93564
  rev: null,
93524
93565
  // `<link>`
93525
- rightMargin: number$a,
93566
+ rightMargin: number$9,
93526
93567
  // `<body>`
93527
93568
  rules: null,
93528
93569
  // `<table>`
@@ -93536,7 +93577,7 @@ const html$2 = create$c({
93536
93577
  // `<table>`
93537
93578
  text: null,
93538
93579
  // `<body>`. Use CSS `color` instead
93539
- topMargin: number$a,
93580
+ topMargin: number$9,
93540
93581
  // `<body>`
93541
93582
  valueType: null,
93542
93583
  // `<param>`
@@ -93546,7 +93587,7 @@ const html$2 = create$c({
93546
93587
  // Several. Use CSS `vertical-align` instead
93547
93588
  vLink: null,
93548
93589
  // `<body>`. Use CSS `a:visited {color}` instead
93549
- vSpace: number$a,
93590
+ vSpace: number$9,
93550
93591
  // `<img>` and `<object>`
93551
93592
  // Non-standard Properties.
93552
93593
  allowTransparency: null,
@@ -93556,7 +93597,7 @@ const html$2 = create$c({
93556
93597
  disableRemotePlayback: boolean,
93557
93598
  prefix: null,
93558
93599
  property: null,
93559
- results: number$a,
93600
+ results: number$9,
93560
93601
  security: null,
93561
93602
  unselectable: null
93562
93603
  }
@@ -93741,27 +93782,27 @@ const svg$1 = create$c({
93741
93782
  transform: caseSensitiveTransform,
93742
93783
  properties: {
93743
93784
  about: commaOrSpaceSeparated,
93744
- accentHeight: number$a,
93785
+ accentHeight: number$9,
93745
93786
  accumulate: null,
93746
93787
  additive: null,
93747
93788
  alignmentBaseline: null,
93748
- alphabetic: number$a,
93749
- amplitude: number$a,
93789
+ alphabetic: number$9,
93790
+ amplitude: number$9,
93750
93791
  arabicForm: null,
93751
- ascent: number$a,
93792
+ ascent: number$9,
93752
93793
  attributeName: null,
93753
93794
  attributeType: null,
93754
- azimuth: number$a,
93795
+ azimuth: number$9,
93755
93796
  bandwidth: null,
93756
93797
  baselineShift: null,
93757
93798
  baseFrequency: null,
93758
93799
  baseProfile: null,
93759
93800
  bbox: null,
93760
93801
  begin: null,
93761
- bias: number$a,
93802
+ bias: number$9,
93762
93803
  by: null,
93763
93804
  calcMode: null,
93764
- capHeight: number$a,
93805
+ capHeight: number$9,
93765
93806
  className: spaceSeparated,
93766
93807
  clip: null,
93767
93808
  clipPath: null,
@@ -93782,26 +93823,26 @@ const svg$1 = create$c({
93782
93823
  d: null,
93783
93824
  dataType: null,
93784
93825
  defaultAction: null,
93785
- descent: number$a,
93786
- diffuseConstant: number$a,
93826
+ descent: number$9,
93827
+ diffuseConstant: number$9,
93787
93828
  direction: null,
93788
93829
  display: null,
93789
93830
  dur: null,
93790
- divisor: number$a,
93831
+ divisor: number$9,
93791
93832
  dominantBaseline: null,
93792
93833
  download: boolean,
93793
93834
  dx: null,
93794
93835
  dy: null,
93795
93836
  edgeMode: null,
93796
93837
  editable: null,
93797
- elevation: number$a,
93838
+ elevation: number$9,
93798
93839
  enableBackground: null,
93799
93840
  end: null,
93800
93841
  event: null,
93801
- exponent: number$a,
93842
+ exponent: number$9,
93802
93843
  externalResourcesRequired: null,
93803
93844
  fill: null,
93804
- fillOpacity: number$a,
93845
+ fillOpacity: number$9,
93805
93846
  fillRule: null,
93806
93847
  filter: null,
93807
93848
  filterRes: null,
@@ -93831,27 +93872,27 @@ const svg$1 = create$c({
93831
93872
  gradientTransform: null,
93832
93873
  gradientUnits: null,
93833
93874
  handler: null,
93834
- hanging: number$a,
93875
+ hanging: number$9,
93835
93876
  hatchContentUnits: null,
93836
93877
  hatchUnits: null,
93837
93878
  height: null,
93838
93879
  href: null,
93839
93880
  hrefLang: null,
93840
- horizAdvX: number$a,
93841
- horizOriginX: number$a,
93842
- horizOriginY: number$a,
93881
+ horizAdvX: number$9,
93882
+ horizOriginX: number$9,
93883
+ horizOriginY: number$9,
93843
93884
  id: null,
93844
- ideographic: number$a,
93885
+ ideographic: number$9,
93845
93886
  imageRendering: null,
93846
93887
  initialVisibility: null,
93847
93888
  in: null,
93848
93889
  in2: null,
93849
- intercept: number$a,
93850
- k: number$a,
93851
- k1: number$a,
93852
- k2: number$a,
93853
- k3: number$a,
93854
- k4: number$a,
93890
+ intercept: number$9,
93891
+ k: number$9,
93892
+ k1: number$9,
93893
+ k2: number$9,
93894
+ k3: number$9,
93895
+ k4: number$9,
93855
93896
  kernelMatrix: commaOrSpaceSeparated,
93856
93897
  kernelUnitLength: null,
93857
93898
  keyPoints: null,
@@ -93865,7 +93906,7 @@ const svg$1 = create$c({
93865
93906
  lengthAdjust: null,
93866
93907
  letterSpacing: null,
93867
93908
  lightingColor: null,
93868
- limitingConeAngle: number$a,
93909
+ limitingConeAngle: number$9,
93869
93910
  local: null,
93870
93911
  markerEnd: null,
93871
93912
  markerMid: null,
@@ -93881,7 +93922,7 @@ const svg$1 = create$c({
93881
93922
  media: null,
93882
93923
  mediaCharacterEncoding: null,
93883
93924
  mediaContentEncodings: null,
93884
- mediaSize: number$a,
93925
+ mediaSize: number$9,
93885
93926
  mediaTime: null,
93886
93927
  method: null,
93887
93928
  min: null,
@@ -93987,12 +94028,12 @@ const svg$1 = create$c({
93987
94028
  origin: null,
93988
94029
  overflow: null,
93989
94030
  overlay: null,
93990
- overlinePosition: number$a,
93991
- overlineThickness: number$a,
94031
+ overlinePosition: number$9,
94032
+ overlineThickness: number$9,
93992
94033
  paintOrder: null,
93993
94034
  panose1: null,
93994
94035
  path: null,
93995
- pathLength: number$a,
94036
+ pathLength: number$9,
93996
94037
  patternContentUnits: null,
93997
94038
  patternTransform: null,
93998
94039
  patternUnits: null,
@@ -94002,9 +94043,9 @@ const svg$1 = create$c({
94002
94043
  playbackOrder: null,
94003
94044
  pointerEvents: null,
94004
94045
  points: null,
94005
- pointsAtX: number$a,
94006
- pointsAtY: number$a,
94007
- pointsAtZ: number$a,
94046
+ pointsAtX: number$9,
94047
+ pointsAtY: number$9,
94048
+ pointsAtZ: number$9,
94008
94049
  preserveAlpha: null,
94009
94050
  preserveAspectRatio: null,
94010
94051
  primitiveUnits: null,
@@ -94036,8 +94077,8 @@ const svg$1 = create$c({
94036
94077
  side: null,
94037
94078
  slope: null,
94038
94079
  snapshotTime: null,
94039
- specularConstant: number$a,
94040
- specularExponent: number$a,
94080
+ specularConstant: number$9,
94081
+ specularExponent: number$9,
94041
94082
  spreadMethod: null,
94042
94083
  spacing: null,
94043
94084
  startOffset: null,
@@ -94047,30 +94088,30 @@ const svg$1 = create$c({
94047
94088
  stitchTiles: null,
94048
94089
  stopColor: null,
94049
94090
  stopOpacity: null,
94050
- strikethroughPosition: number$a,
94051
- strikethroughThickness: number$a,
94091
+ strikethroughPosition: number$9,
94092
+ strikethroughThickness: number$9,
94052
94093
  string: null,
94053
94094
  stroke: null,
94054
94095
  strokeDashArray: commaOrSpaceSeparated,
94055
94096
  strokeDashOffset: null,
94056
94097
  strokeLineCap: null,
94057
94098
  strokeLineJoin: null,
94058
- strokeMiterLimit: number$a,
94059
- strokeOpacity: number$a,
94099
+ strokeMiterLimit: number$9,
94100
+ strokeOpacity: number$9,
94060
94101
  strokeWidth: null,
94061
94102
  style: null,
94062
- surfaceScale: number$a,
94103
+ surfaceScale: number$9,
94063
94104
  syncBehavior: null,
94064
94105
  syncBehaviorDefault: null,
94065
94106
  syncMaster: null,
94066
94107
  syncTolerance: null,
94067
94108
  syncToleranceDefault: null,
94068
94109
  systemLanguage: commaOrSpaceSeparated,
94069
- tabIndex: number$a,
94110
+ tabIndex: number$9,
94070
94111
  tableValues: null,
94071
94112
  target: null,
94072
- targetX: number$a,
94073
- targetY: number$a,
94113
+ targetX: number$9,
94114
+ targetY: number$9,
94074
94115
  textAnchor: null,
94075
94116
  textDecoration: null,
94076
94117
  textRendering: null,
@@ -94085,22 +94126,22 @@ const svg$1 = create$c({
94085
94126
  transformOrigin: null,
94086
94127
  u1: null,
94087
94128
  u2: null,
94088
- underlinePosition: number$a,
94089
- underlineThickness: number$a,
94129
+ underlinePosition: number$9,
94130
+ underlineThickness: number$9,
94090
94131
  unicode: null,
94091
94132
  unicodeBidi: null,
94092
94133
  unicodeRange: null,
94093
- unitsPerEm: number$a,
94134
+ unitsPerEm: number$9,
94094
94135
  values: null,
94095
- vAlphabetic: number$a,
94096
- vMathematical: number$a,
94136
+ vAlphabetic: number$9,
94137
+ vMathematical: number$9,
94097
94138
  vectorEffect: null,
94098
- vHanging: number$a,
94099
- vIdeographic: number$a,
94139
+ vHanging: number$9,
94140
+ vIdeographic: number$9,
94100
94141
  version: null,
94101
- vertAdvY: number$a,
94102
- vertOriginX: number$a,
94103
- vertOriginY: number$a,
94142
+ vertAdvY: number$9,
94143
+ vertOriginX: number$9,
94144
+ vertOriginY: number$9,
94104
94145
  viewBox: null,
94105
94146
  viewTarget: null,
94106
94147
  visibility: null,
@@ -94112,7 +94153,7 @@ const svg$1 = create$c({
94112
94153
  x1: null,
94113
94154
  x2: null,
94114
94155
  xChannelSelector: null,
94115
- xHeight: number$a,
94156
+ xHeight: number$9,
94116
94157
  y: null,
94117
94158
  y1: null,
94118
94159
  y2: null,
@@ -105053,7 +105094,7 @@ function treeToExpectedCheckedLevel(currTree, checkedPaths) {
105053
105094
  currTree.tree.forEach((lzn) => {
105054
105095
  const levelZeroPath = [lzn.name];
105055
105096
  const height2 = nodeToHeight(lzn);
105056
- range$c(height2).forEach((i2) => {
105097
+ range$b(height2).forEach((i2) => {
105057
105098
  const levelIndex = i2 + 1;
105058
105099
  const levelNodePaths = nodeToLevelDescendantNamePaths(lzn, levelIndex, [], true);
105059
105100
  if (isEqual$3(levelNodePaths, checkedPaths)) {
@@ -105126,7 +105167,7 @@ function treeToMembershipMap(currTree) {
105126
105167
  if (currTree) {
105127
105168
  currTree.tree.forEach((lzn) => {
105128
105169
  const height2 = nodeToHeight(lzn);
105129
- range$c(height2).forEach((i2) => {
105170
+ range$b(height2).forEach((i2) => {
105130
105171
  const levelIndex = i2 + 1;
105131
105172
  const levelNodePaths = nodeToLevelDescendantNamePaths(lzn, levelIndex, [], true);
105132
105173
  levelNodePaths.forEach((setNamePath) => {
@@ -122765,7 +122806,7 @@ function LevelsButtons(props) {
122765
122806
  }
122766
122807
  }
122767
122808
  const { classes: classes2 } = useStyles$t();
122768
- return jsxRuntimeExports.jsx("div", { className: classes2.levelButtonsContainer, children: range$c(1, height2 + 1).map((i2) => {
122809
+ return jsxRuntimeExports.jsx("div", { className: classes2.levelButtonsContainer, children: range$b(1, height2 + 1).map((i2) => {
122769
122810
  const isChecked = isEqual$3(path2, checkedLevelPath) && i2 === checkedLevelIndex;
122770
122811
  return jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx(HelpTooltip, { title: getLevelTooltipText(i2), children: jsxRuntimeExports.jsx("input", { className: clsx(classes2.levelRadioButton, { [classes2.levelRadioButtonChecked]: isChecked && !hasColorEncoding }), type: "checkbox", value: i2, checked: isChecked && hasColorEncoding, onChange: onCheck }) }) }, i2);
122771
122812
  }) });
@@ -162539,7 +162580,7 @@ const defaultGetValue = (points2) => points2.length;
162539
162580
  const MAX_32_BIT_FLOAT = 3402823466e29;
162540
162581
  const defaultGetPoints = (bin2) => bin2.points;
162541
162582
  const defaultGetIndex = (bin2) => bin2.index;
162542
- const ascending$8 = (a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
162583
+ const ascending$7 = (a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
162543
162584
  const defaultProps$w = {
162544
162585
  getValue: defaultGetValue,
162545
162586
  getPoints: defaultGetPoints,
@@ -162623,7 +162664,7 @@ class BinSorter {
162623
162664
  }
162624
162665
  getValueRange(percentileRange) {
162625
162666
  if (!this.sortedBins) {
162626
- this.sortedBins = this.aggregatedBins.sort((a2, b2) => ascending$8(a2.value, b2.value));
162667
+ this.sortedBins = this.aggregatedBins.sort((a2, b2) => ascending$7(a2.value, b2.value));
162627
162668
  }
162628
162669
  if (!this.sortedBins.length) {
162629
162670
  return [];
@@ -162639,7 +162680,7 @@ class BinSorter {
162639
162680
  }
162640
162681
  getValueDomainByScale(scale2, [lower2 = 0, upper = 100] = []) {
162641
162682
  if (!this.sortedBins) {
162642
- this.sortedBins = this.aggregatedBins.sort((a2, b2) => ascending$8(a2.value, b2.value));
162683
+ this.sortedBins = this.aggregatedBins.sort((a2, b2) => ascending$7(a2.value, b2.value));
162643
162684
  }
162644
162685
  if (!this.sortedBins.length) {
162645
162686
  return [];
@@ -202414,7 +202455,7 @@ function cartesianNormalizeInPlace$1(d) {
202414
202455
  var l2 = sqrt$5(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
202415
202456
  d[0] /= l2, d[1] /= l2, d[2] /= l2;
202416
202457
  }
202417
- var lambda0$3, phi0$1, lambda1$1, phi1$1, lambda2$1, lambda00$4, phi00$4, p0$1, deltaSum$1 = adder(), ranges$1, range$a;
202458
+ var lambda0$3, phi0$1, lambda1$1, phi1$1, lambda2$1, lambda00$4, phi00$4, p0$1, deltaSum$1 = adder(), ranges$1, range$9;
202418
202459
  var boundsStream$3 = {
202419
202460
  point: boundsPoint$3,
202420
202461
  lineStart: boundsLineStart$1,
@@ -202434,11 +202475,11 @@ var boundsStream$3 = {
202434
202475
  if (areaRingSum$3 < 0) lambda0$3 = -(lambda1$1 = 180), phi0$1 = -(phi1$1 = 90);
202435
202476
  else if (deltaSum$1 > epsilon$8) phi1$1 = 90;
202436
202477
  else if (deltaSum$1 < -1e-6) phi0$1 = -90;
202437
- range$a[0] = lambda0$3, range$a[1] = lambda1$1;
202478
+ range$9[0] = lambda0$3, range$9[1] = lambda1$1;
202438
202479
  }
202439
202480
  };
202440
202481
  function boundsPoint$3(lambda, phi2) {
202441
- ranges$1.push(range$a = [lambda0$3 = lambda, lambda1$1 = lambda]);
202482
+ ranges$1.push(range$9 = [lambda0$3 = lambda, lambda1$1 = lambda]);
202442
202483
  if (phi2 < phi0$1) phi0$1 = phi2;
202443
202484
  if (phi2 > phi1$1) phi1$1 = phi2;
202444
202485
  }
@@ -202478,7 +202519,7 @@ function linePoint$1(lambda, phi2) {
202478
202519
  }
202479
202520
  }
202480
202521
  } else {
202481
- ranges$1.push(range$a = [lambda0$3 = lambda, lambda1$1 = lambda]);
202522
+ ranges$1.push(range$9 = [lambda0$3 = lambda, lambda1$1 = lambda]);
202482
202523
  }
202483
202524
  if (phi2 < phi0$1) phi0$1 = phi2;
202484
202525
  if (phi2 > phi1$1) phi1$1 = phi2;
@@ -202488,7 +202529,7 @@ function boundsLineStart$1() {
202488
202529
  boundsStream$3.point = linePoint$1;
202489
202530
  }
202490
202531
  function boundsLineEnd$1() {
202491
- range$a[0] = lambda0$3, range$a[1] = lambda1$1;
202532
+ range$9[0] = lambda0$3, range$9[1] = lambda1$1;
202492
202533
  boundsStream$3.point = boundsPoint$3;
202493
202534
  p0$1 = null;
202494
202535
  }
@@ -202509,7 +202550,7 @@ function boundsRingEnd$1() {
202509
202550
  boundsRingPoint$1(lambda00$4, phi00$4);
202510
202551
  areaStream$3.lineEnd();
202511
202552
  if (abs$5(deltaSum$1) > epsilon$8) lambda0$3 = -(lambda1$1 = 180);
202512
- range$a[0] = lambda0$3, range$a[1] = lambda1$1;
202553
+ range$9[0] = lambda0$3, range$9[1] = lambda1$1;
202513
202554
  p0$1 = null;
202514
202555
  }
202515
202556
  function angle$1(lambda02, lambda12) {
@@ -202542,7 +202583,7 @@ function bounds$2(feature2) {
202542
202583
  if ((delta = angle$1(a2[1], b2[0])) > deltaMax) deltaMax = delta, lambda0$3 = b2[0], lambda1$1 = a2[1];
202543
202584
  }
202544
202585
  }
202545
- ranges$1 = range$a = null;
202586
+ ranges$1 = range$9 = null;
202546
202587
  return lambda0$3 === Infinity || phi0$1 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0$3, phi0$1], [lambda1$1, phi1$1]];
202547
202588
  }
202548
202589
  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;
@@ -202888,10 +202929,10 @@ function link$1(array2) {
202888
202929
  a2.n = b2 = array2[0];
202889
202930
  b2.p = a2;
202890
202931
  }
202891
- function ascending$7(a2, b2) {
202932
+ function ascending$6(a2, b2) {
202892
202933
  return a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
202893
202934
  }
202894
- function bisector$3(compare2) {
202935
+ function bisector$2(compare2) {
202895
202936
  if (compare2.length === 1) compare2 = ascendingComparator(compare2);
202896
202937
  return {
202897
202938
  left: function(a2, x2, lo, hi) {
@@ -202918,11 +202959,11 @@ function bisector$3(compare2) {
202918
202959
  }
202919
202960
  function ascendingComparator(f2) {
202920
202961
  return function(d, x2) {
202921
- return ascending$7(f2(d), x2);
202962
+ return ascending$6(f2(d), x2);
202922
202963
  };
202923
202964
  }
202924
- bisector$3(ascending$7);
202925
- function range$9(start2, stop3, step) {
202965
+ bisector$2(ascending$6);
202966
+ function range$8(start2, stop3, step) {
202926
202967
  start2 = +start2, stop3 = +stop3, step = (n3 = arguments.length) < 2 ? (stop3 = start2, start2 = 0, 1) : n3 < 3 ? 1 : +step;
202927
202968
  var i2 = -1, n3 = Math.max(0, Math.ceil((stop3 - start2) / step)) | 0, range2 = new Array(n3);
202928
202969
  while (++i2 < n3) {
@@ -203204,7 +203245,7 @@ function contains$2(object2, point2) {
203204
203245
  return (object2 && containsObjectType.hasOwnProperty(object2.type) ? containsObjectType[object2.type] : containsGeometry)(object2, point2);
203205
203246
  }
203206
203247
  function graticuleX$1(y02, y12, dy) {
203207
- var y2 = range$9(y02, y12 - epsilon$8, dy).concat(y12);
203248
+ var y2 = range$8(y02, y12 - epsilon$8, dy).concat(y12);
203208
203249
  return function(x2) {
203209
203250
  return y2.map(function(y3) {
203210
203251
  return [x2, y3];
@@ -203212,7 +203253,7 @@ function graticuleX$1(y02, y12, dy) {
203212
203253
  };
203213
203254
  }
203214
203255
  function graticuleY$1(x02, x12, dx) {
203215
- var x2 = range$9(x02, x12 - epsilon$8, dx).concat(x12);
203256
+ var x2 = range$8(x02, x12 - epsilon$8, dx).concat(x12);
203216
203257
  return function(y2) {
203217
203258
  return x2.map(function(x3) {
203218
203259
  return [x3, y2];
@@ -203225,9 +203266,9 @@ function graticule$1() {
203225
203266
  return { type: "MultiLineString", coordinates: lines() };
203226
203267
  }
203227
203268
  function lines() {
203228
- return range$9(ceil$3(X02 / DX) * DX, X12, DX).map(X3).concat(range$9(ceil$3(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$9(ceil$3(x02 / dx) * dx, x12, dx).filter(function(x3) {
203269
+ return range$8(ceil$3(X02 / DX) * DX, X12, DX).map(X3).concat(range$8(ceil$3(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$8(ceil$3(x02 / dx) * dx, x12, dx).filter(function(x3) {
203229
203270
  return abs$5(x3 % DX) > epsilon$8;
203230
- }).map(x2)).concat(range$9(ceil$3(y02 / dy) * dy, y12, dy).filter(function(y3) {
203271
+ }).map(x2)).concat(range$8(ceil$3(y02 / dy) * dy, y12, dy).filter(function(y3) {
203231
203272
  return abs$5(y3 % DY) > epsilon$8;
203232
203273
  }).map(y2));
203233
203274
  }
@@ -228938,22 +228979,22 @@ async function getDecoder(fileDirectory) {
228938
228979
  const Decoder = await importFn();
228939
228980
  return new Decoder(fileDirectory);
228940
228981
  }
228941
- addDecoder([void 0, 1], () => import("./raw-B_i4ezsQ.js").then((m2) => m2.default));
228942
- addDecoder(5, () => import("./lzw-Cb9mzb7W.js").then((m2) => m2.default));
228982
+ addDecoder([void 0, 1], () => import("./raw-BFK8nawV.js").then((m2) => m2.default));
228983
+ addDecoder(5, () => import("./lzw-DMfiHSb8.js").then((m2) => m2.default));
228943
228984
  addDecoder(6, () => {
228944
228985
  throw new Error("old style JPEG compression is not supported.");
228945
228986
  });
228946
- addDecoder(7, () => import("./jpeg-DY9HYPjR.js").then((m2) => m2.default));
228947
- addDecoder([8, 32946], () => import("./deflate-D9J7cgqi.js").then((m2) => m2.default));
228948
- addDecoder(32773, () => import("./packbits-BblqXNO8.js").then((m2) => m2.default));
228987
+ addDecoder(7, () => import("./jpeg-BYACNTpB.js").then((m2) => m2.default));
228988
+ addDecoder([8, 32946], () => import("./deflate-Nz0blktd.js").then((m2) => m2.default));
228989
+ addDecoder(32773, () => import("./packbits-B0Er8O1M.js").then((m2) => m2.default));
228949
228990
  addDecoder(
228950
228991
  34887,
228951
- () => import("./lerc-DTMv-HxU.js").then(async (m2) => {
228992
+ () => import("./lerc-DJjWAaxL.js").then(async (m2) => {
228952
228993
  await m2.zstd.init();
228953
228994
  return m2;
228954
228995
  }).then((m2) => m2.default)
228955
228996
  );
228956
- addDecoder(50001, () => import("./webimage-kI_hc8kD.js").then((m2) => m2.default));
228997
+ addDecoder(50001, () => import("./webimage-DgB3AHvK.js").then((m2) => m2.default));
228957
228998
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
228958
228999
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
228959
229000
  }
@@ -231994,7 +232035,7 @@ const Z_FIXED = 4;
231994
232035
  const Z_BINARY = 0;
231995
232036
  const Z_TEXT = 1;
231996
232037
  const Z_UNKNOWN = 2;
231997
- function zero$6(buf) {
232038
+ function zero$5(buf) {
231998
232039
  let len2 = buf.length;
231999
232040
  while (--len2 >= 0) {
232000
232041
  buf[len2] = 0;
@@ -232033,17 +232074,17 @@ const extra_blbits = (
232033
232074
  const bl_order = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
232034
232075
  const DIST_CODE_LEN = 512;
232035
232076
  const static_ltree = new Array((L_CODES + 2) * 2);
232036
- zero$6(static_ltree);
232077
+ zero$5(static_ltree);
232037
232078
  const static_dtree = new Array(D_CODES * 2);
232038
- zero$6(static_dtree);
232079
+ zero$5(static_dtree);
232039
232080
  const _dist_code = new Array(DIST_CODE_LEN);
232040
- zero$6(_dist_code);
232081
+ zero$5(_dist_code);
232041
232082
  const _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);
232042
- zero$6(_length_code);
232083
+ zero$5(_length_code);
232043
232084
  const base_length = new Array(LENGTH_CODES);
232044
- zero$6(base_length);
232085
+ zero$5(base_length);
232045
232086
  const base_dist = new Array(D_CODES);
232046
- zero$6(base_dist);
232087
+ zero$5(base_dist);
232047
232088
  function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
232048
232089
  this.static_tree = static_tree;
232049
232090
  this.extra_bits = extra_bits;
@@ -239909,7 +239950,7 @@ const channels = {
239909
239950
  },
239910
239951
  fs: fs$2
239911
239952
  };
239912
- function range$8(len2) {
239953
+ function range$7(len2) {
239913
239954
  return [...Array(len2).keys()];
239914
239955
  }
239915
239956
  function padWithDefault$2(arr, defaultValue2, padWidth) {
@@ -241009,7 +241050,7 @@ const ScaleBarLayer = class extends CompositeLayer {
241009
241050
  sizeScale: 2 ** -zoom2,
241010
241051
  characterSet: [
241011
241052
  ...displayUnit.split(""),
241012
- ...range$8(10).map((i2) => String(i2)),
241053
+ ...range$7(10).map((i2) => String(i2)),
241013
241054
  ".",
241014
241055
  "e",
241015
241056
  "+"
@@ -242448,7 +242489,7 @@ class BitmaskLayer2 extends XRLayer {
242448
242489
  } = this.state;
242449
242490
  if (textures && model) {
242450
242491
  const scaleFactor = 1 / 2 ** (maxZoom - zoom2);
242451
- const colors2 = Object.fromEntries(range$c(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
242492
+ const colors2 = Object.fromEntries(range$b(MAX_CHANNELS).map((i2) => [`color${i2}`, getColor(channelColors[i2])]));
242452
242493
  model.setUniforms(Object.assign({}, uniforms, {
242453
242494
  ...colors2,
242454
242495
  // Bitmask image channel data textures
@@ -245641,7 +245682,7 @@ class ContourLayerWithText extends ContourLayer {
245641
245682
  let minCirclePointI;
245642
245683
  let minPolygonPoint;
245643
245684
  const numVertices = maxAreaPolygon.geometry.coordinates[0].length;
245644
- const polygonVertices = numVertices > MAX_NUM_VERTICES ? range$c(MAX_NUM_VERTICES).map((i2) => maxAreaPolygon.geometry.coordinates[0][Math.floor(i2 * numVertices / MAX_NUM_VERTICES)]) : [...maxAreaPolygon.geometry.coordinates[0]];
245685
+ const polygonVertices = numVertices > MAX_NUM_VERTICES ? range$b(MAX_NUM_VERTICES).map((i2) => maxAreaPolygon.geometry.coordinates[0][Math.floor(i2 * numVertices / MAX_NUM_VERTICES)]) : [...maxAreaPolygon.geometry.coordinates[0]];
245645
245686
  circlePolygon.geometry.coordinates[0].forEach((circleCoord, circlePointI) => {
245646
245687
  const circlePoint = point$9(circleCoord);
245647
245688
  polygonVertices.forEach((polyCoord) => {
@@ -246061,7 +246102,7 @@ function createQuadTree(obsEmbedding, getCellCoords) {
246061
246102
  if (!obsEmbedding) {
246062
246103
  return null;
246063
246104
  }
246064
- const tree2 = quadtree$1().x((i2) => getCellCoords(i2)[0]).y((i2) => getCellCoords(i2)[1]).addAll(range$c(obsEmbedding.shape[1]));
246105
+ const tree2 = quadtree$1().x((i2) => getCellCoords(i2)[0]).y((i2) => getCellCoords(i2)[1]).addAll(range$b(obsEmbedding.shape[1]));
246065
246106
  return tree2;
246066
246107
  }
246067
246108
  function constant$6(v) {
@@ -246169,8 +246210,14 @@ function forceCollideRects() {
246169
246210
  };
246170
246211
  return force2;
246171
246212
  }
246172
- function getPointSizeDevicePixels(devicePixelRatio2, zoom2, xRange, yRange, width2, height2) {
246173
- const pointSize = 5e-4;
246213
+ const BASE_POINT_SIZE = 5;
246214
+ const LARGE_DATASET_CELL_COUNT = 1e4;
246215
+ const SMALL_DATASET_CELL_COUNT = 100;
246216
+ function getInitialPointSize(numCells = LARGE_DATASET_CELL_COUNT) {
246217
+ return BASE_POINT_SIZE / clamp$6(numCells, SMALL_DATASET_CELL_COUNT, LARGE_DATASET_CELL_COUNT);
246218
+ }
246219
+ function getPointSizeDevicePixels(devicePixelRatio2, zoom2, xRange, yRange, width2, height2, numCells) {
246220
+ const pointSize = getInitialPointSize(numCells);
246174
246221
  const pointScreenSizeMax = 10;
246175
246222
  const pointScreenSizeMin = 1 / devicePixelRatio2;
246176
246223
  const scaleFactor = 2 ** zoom2;
@@ -247129,7 +247176,7 @@ function selection_order() {
247129
247176
  return this;
247130
247177
  }
247131
247178
  function selection_sort(compare2) {
247132
- if (!compare2) compare2 = ascending$6;
247179
+ if (!compare2) compare2 = ascending$5;
247133
247180
  function compareNode(a2, b2) {
247134
247181
  return a2 && b2 ? compare2(a2.__data__, b2.__data__) : !a2 - !b2;
247135
247182
  }
@@ -247143,7 +247190,7 @@ function selection_sort(compare2) {
247143
247190
  }
247144
247191
  return new Selection(sortgroups, this._parents).order();
247145
247192
  }
247146
- function ascending$6(a2, b2) {
247193
+ function ascending$5(a2, b2) {
247147
247194
  return a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
247148
247195
  }
247149
247196
  function selection_call() {
@@ -247552,20 +247599,20 @@ Selection.prototype = {
247552
247599
  function select$1(selector2) {
247553
247600
  return typeof selector2 === "string" ? new Selection([[document.querySelector(selector2)]], [document.documentElement]) : new Selection([[selector2]], root$1);
247554
247601
  }
247555
- function ascending$5(a2, b2) {
247602
+ function ascending$4(a2, b2) {
247556
247603
  return a2 == null || b2 == null ? NaN : a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
247557
247604
  }
247558
- function descending$2(a2, b2) {
247605
+ function descending$1(a2, b2) {
247559
247606
  return a2 == null || b2 == null ? NaN : b2 < a2 ? -1 : b2 > a2 ? 1 : b2 >= a2 ? 0 : NaN;
247560
247607
  }
247561
- function bisector$2(f2) {
247608
+ function bisector$1(f2) {
247562
247609
  let compare12, compare2, delta;
247563
247610
  if (f2.length !== 2) {
247564
- compare12 = ascending$5;
247565
- compare2 = (d, x2) => ascending$5(f2(d), x2);
247611
+ compare12 = ascending$4;
247612
+ compare2 = (d, x2) => ascending$4(f2(d), x2);
247566
247613
  delta = (d, x2) => f2(d) - x2;
247567
247614
  } else {
247568
- compare12 = f2 === ascending$5 || f2 === descending$2 ? f2 : zero$5;
247615
+ compare12 = f2 === ascending$4 || f2 === descending$1 ? f2 : zero$4;
247569
247616
  compare2 = f2;
247570
247617
  delta = f2;
247571
247618
  }
@@ -247597,10 +247644,10 @@ function bisector$2(f2) {
247597
247644
  }
247598
247645
  return { left: left2, center: center2, right: right2 };
247599
247646
  }
247600
- function zero$5() {
247647
+ function zero$4() {
247601
247648
  return 0;
247602
247649
  }
247603
- function number$9(x2) {
247650
+ function number$8(x2) {
247604
247651
  return x2 === null ? NaN : +x2;
247605
247652
  }
247606
247653
  function* numbers$3(values3, valueof) {
@@ -247619,10 +247666,10 @@ function* numbers$3(values3, valueof) {
247619
247666
  }
247620
247667
  }
247621
247668
  }
247622
- const ascendingBisect$1 = bisector$2(ascending$5);
247623
- const bisectRight$2 = ascendingBisect$1.right;
247624
- const bisectLeft$1 = ascendingBisect$1.left;
247625
- bisector$2(number$9).center;
247669
+ const ascendingBisect = bisector$1(ascending$4);
247670
+ const bisectRight$1 = ascendingBisect.right;
247671
+ const bisectLeft$1 = ascendingBisect.left;
247672
+ bisector$1(number$8).center;
247626
247673
  function variance(values3, valueof) {
247627
247674
  let count2 = 0;
247628
247675
  let delta;
@@ -247693,8 +247740,8 @@ class Adder {
247693
247740
  function permute(source2, keys2) {
247694
247741
  return Array.from(keys2, (key2) => source2[key2]);
247695
247742
  }
247696
- function compareDefined(compare2 = ascending$5) {
247697
- if (compare2 === ascending$5) return ascendingDefined;
247743
+ function compareDefined(compare2 = ascending$4) {
247744
+ if (compare2 === ascending$4) return ascendingDefined;
247698
247745
  if (typeof compare2 !== "function") throw new TypeError("compare is not a function");
247699
247746
  return (a2, b2) => {
247700
247747
  const x2 = compare2(a2, b2);
@@ -247705,40 +247752,51 @@ function compareDefined(compare2 = ascending$5) {
247705
247752
  function ascendingDefined(a2, b2) {
247706
247753
  return (a2 == null || !(a2 >= a2)) - (b2 == null || !(b2 >= b2)) || (a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
247707
247754
  }
247708
- var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
247755
+ const e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
247756
+ function tickSpec(start2, stop3, count2) {
247757
+ const step = (stop3 - start2) / Math.max(0, count2), power = Math.floor(Math.log10(step)), error2 = step / Math.pow(10, power), factor = error2 >= e10 ? 10 : error2 >= e5 ? 5 : error2 >= e2 ? 2 : 1;
247758
+ let i1, i2, inc;
247759
+ if (power < 0) {
247760
+ inc = Math.pow(10, -power) / factor;
247761
+ i1 = Math.round(start2 * inc);
247762
+ i2 = Math.round(stop3 * inc);
247763
+ if (i1 / inc < start2) ++i1;
247764
+ if (i2 / inc > stop3) --i2;
247765
+ inc = -inc;
247766
+ } else {
247767
+ inc = Math.pow(10, power) * factor;
247768
+ i1 = Math.round(start2 / inc);
247769
+ i2 = Math.round(stop3 / inc);
247770
+ if (i1 * inc < start2) ++i1;
247771
+ if (i2 * inc > stop3) --i2;
247772
+ }
247773
+ if (i2 < i1 && 0.5 <= count2 && count2 < 2) return tickSpec(start2, stop3, count2 * 2);
247774
+ return [i1, i2, inc];
247775
+ }
247709
247776
  function ticks(start2, stop3, count2) {
247710
- var reverse2, i2 = -1, n3, ticks2, step;
247711
247777
  stop3 = +stop3, start2 = +start2, count2 = +count2;
247712
- if (start2 === stop3 && count2 > 0) return [start2];
247713
- if (reverse2 = stop3 < start2) n3 = start2, start2 = stop3, stop3 = n3;
247714
- if ((step = tickIncrement(start2, stop3, count2)) === 0 || !isFinite(step)) return [];
247715
- if (step > 0) {
247716
- let r0 = Math.round(start2 / step), r1 = Math.round(stop3 / step);
247717
- if (r0 * step < start2) ++r0;
247718
- if (r1 * step > stop3) --r1;
247719
- ticks2 = new Array(n3 = r1 - r0 + 1);
247720
- while (++i2 < n3) ticks2[i2] = (r0 + i2) * step;
247778
+ if (!(count2 > 0)) return [];
247779
+ if (start2 === stop3) return [start2];
247780
+ const reverse2 = stop3 < start2, [i1, i2, inc] = reverse2 ? tickSpec(stop3, start2, count2) : tickSpec(start2, stop3, count2);
247781
+ if (!(i2 >= i1)) return [];
247782
+ const n3 = i2 - i1 + 1, ticks2 = new Array(n3);
247783
+ if (reverse2) {
247784
+ if (inc < 0) for (let i3 = 0; i3 < n3; ++i3) ticks2[i3] = (i2 - i3) / -inc;
247785
+ else for (let i3 = 0; i3 < n3; ++i3) ticks2[i3] = (i2 - i3) * inc;
247721
247786
  } else {
247722
- step = -step;
247723
- let r0 = Math.round(start2 * step), r1 = Math.round(stop3 * step);
247724
- if (r0 / step < start2) ++r0;
247725
- if (r1 / step > stop3) --r1;
247726
- ticks2 = new Array(n3 = r1 - r0 + 1);
247727
- while (++i2 < n3) ticks2[i2] = (r0 + i2) / step;
247787
+ if (inc < 0) for (let i3 = 0; i3 < n3; ++i3) ticks2[i3] = (i1 + i3) / -inc;
247788
+ else for (let i3 = 0; i3 < n3; ++i3) ticks2[i3] = (i1 + i3) * inc;
247728
247789
  }
247729
- if (reverse2) ticks2.reverse();
247730
247790
  return ticks2;
247731
247791
  }
247732
247792
  function tickIncrement(start2, stop3, count2) {
247733
- var step = (stop3 - start2) / Math.max(0, count2), power = Math.floor(Math.log(step) / Math.LN10), error2 = step / Math.pow(10, power);
247734
- 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);
247793
+ stop3 = +stop3, start2 = +start2, count2 = +count2;
247794
+ return tickSpec(start2, stop3, count2)[2];
247735
247795
  }
247736
247796
  function tickStep(start2, stop3, count2) {
247737
- var step0 = Math.abs(stop3 - start2) / Math.max(0, count2), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error2 = step0 / step1;
247738
- if (error2 >= e10) step1 *= 10;
247739
- else if (error2 >= e5) step1 *= 5;
247740
- else if (error2 >= e2) step1 *= 2;
247741
- return stop3 < start2 ? -step1 : step1;
247797
+ stop3 = +stop3, start2 = +start2, count2 = +count2;
247798
+ const reverse2 = stop3 < start2, inc = reverse2 ? tickIncrement(stop3, start2, count2) : tickIncrement(start2, stop3, count2);
247799
+ return (reverse2 ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
247742
247800
  }
247743
247801
  function max$3(values3, valueof) {
247744
247802
  let max2;
@@ -247776,7 +247834,11 @@ function min$3(values3, valueof) {
247776
247834
  }
247777
247835
  return min2;
247778
247836
  }
247779
- function quickselect(array2, k, left2 = 0, right2 = array2.length - 1, compare2) {
247837
+ function quickselect(array2, k, left2 = 0, right2 = Infinity, compare2) {
247838
+ k = Math.floor(k);
247839
+ left2 = Math.floor(Math.max(0, left2));
247840
+ right2 = Math.floor(Math.min(array2.length - 1, right2));
247841
+ if (!(left2 <= k && k <= right2)) return array2;
247780
247842
  compare2 = compare2 === void 0 ? ascendingDefined : compareDefined(compare2);
247781
247843
  while (right2 > left2) {
247782
247844
  if (right2 - left2 > 600) {
@@ -247813,15 +247875,15 @@ function swap$1(array2, i2, j) {
247813
247875
  }
247814
247876
  function quantile$1(values3, p, valueof) {
247815
247877
  values3 = Float64Array.from(numbers$3(values3, valueof));
247816
- if (!(n3 = values3.length)) return;
247817
- if ((p = +p) <= 0 || n3 < 2) return min$3(values3);
247878
+ if (!(n3 = values3.length) || isNaN(p = +p)) return;
247879
+ if (p <= 0 || n3 < 2) return min$3(values3);
247818
247880
  if (p >= 1) return max$3(values3);
247819
247881
  var n3, i2 = (n3 - 1) * p, i0 = Math.floor(i2), value0 = max$3(quickselect(values3, i0).subarray(0, i0 + 1)), value1 = min$3(values3.subarray(i0 + 1));
247820
247882
  return value0 + (value1 - value0) * (i2 - i0);
247821
247883
  }
247822
- function quantileSorted(values3, p, valueof = number$9) {
247823
- if (!(n3 = values3.length)) return;
247824
- if ((p = +p) <= 0 || n3 < 2) return +valueof(values3[0], 0, values3);
247884
+ function quantileSorted(values3, p, valueof = number$8) {
247885
+ if (!(n3 = values3.length) || isNaN(p = +p)) return;
247886
+ if (p <= 0 || n3 < 2) return +valueof(values3[0], 0, values3);
247825
247887
  if (p >= 1) return +valueof(values3[n3 - 1], n3 - 1, values3);
247826
247888
  var n3, i2 = (n3 - 1) * p, i0 = Math.floor(i2), value0 = +valueof(values3[i0], i0, values3), value1 = +valueof(values3[i0 + 1], i0 + 1, values3);
247827
247889
  return value0 + (value1 - value0) * (i2 - i0);
@@ -247856,7 +247918,7 @@ function* flatten$2(arrays) {
247856
247918
  function merge$3(arrays) {
247857
247919
  return Array.from(flatten$2(arrays));
247858
247920
  }
247859
- function range$7(start2, stop3, step) {
247921
+ function range$6(start2, stop3, step) {
247860
247922
  start2 = +start2, stop3 = +stop3, step = (n3 = arguments.length) < 2 ? (stop3 = start2, start2 = 0, 1) : n3 < 3 ? 1 : +step;
247861
247923
  var i2 = -1, n3 = Math.max(0, Math.ceil((stop3 - start2) / step)) | 0, range2 = new Array(n3);
247862
247924
  while (++i2 < n3) {
@@ -248527,7 +248589,7 @@ function object$1(a2, b2) {
248527
248589
  };
248528
248590
  }
248529
248591
  var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g");
248530
- function zero$4(b2) {
248592
+ function zero$3(b2) {
248531
248593
  return function() {
248532
248594
  return b2;
248533
248595
  };
@@ -248560,7 +248622,7 @@ function string(a2, b2) {
248560
248622
  if (s2[i2]) s2[i2] += bs;
248561
248623
  else s2[++i2] = bs;
248562
248624
  }
248563
- return s2.length < 2 ? q[0] ? one$2(q[0].x) : zero$4(b2) : (b2 = q.length, function(t4) {
248625
+ return s2.length < 2 ? q[0] ? one$2(q[0].x) : zero$3(b2) : (b2 = q.length, function(t4) {
248564
248626
  for (var i3 = 0, o2; i3 < b2; ++i3) s2[(o2 = q[i3]).i] = o2.x(t4);
248565
248627
  return s2.join("");
248566
248628
  });
@@ -248826,7 +248888,7 @@ function constants$1(x2) {
248826
248888
  return x2;
248827
248889
  };
248828
248890
  }
248829
- function number$8(x2) {
248891
+ function number$7(x2) {
248830
248892
  return +x2;
248831
248893
  }
248832
248894
  var unit$1 = [0, 1];
@@ -248864,7 +248926,7 @@ function polymap(domain2, range2, interpolate2) {
248864
248926
  r3[i2] = interpolate2(range2[i2], range2[i2 + 1]);
248865
248927
  }
248866
248928
  return function(x2) {
248867
- var i3 = bisectRight$2(domain2, x2, 1, j) - 1;
248929
+ var i3 = bisectRight$1(domain2, x2, 1, j) - 1;
248868
248930
  return r3[i3](d[i3](x2));
248869
248931
  };
248870
248932
  }
@@ -248887,7 +248949,7 @@ function transformer$3() {
248887
248949
  return clamp2(untransform((input || (input = piecewise2(range2, domain2.map(transform3), interpolateNumber)))(y2)));
248888
248950
  };
248889
248951
  scale2.domain = function(_) {
248890
- return arguments.length ? (domain2 = Array.from(_, number$8), rescale()) : domain2.slice();
248952
+ return arguments.length ? (domain2 = Array.from(_, number$7), rescale()) : domain2.slice();
248891
248953
  };
248892
248954
  scale2.range = function(_) {
248893
248955
  return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice();
@@ -249207,7 +249269,7 @@ function identity$6(domain2) {
249207
249269
  }
249208
249270
  scale2.invert = scale2;
249209
249271
  scale2.domain = scale2.range = function(_) {
249210
- return arguments.length ? (domain2 = Array.from(_, number$8), scale2) : domain2.slice();
249272
+ return arguments.length ? (domain2 = Array.from(_, number$7), scale2) : domain2.slice();
249211
249273
  };
249212
249274
  scale2.unknown = function(_) {
249213
249275
  return arguments.length ? (unknown = _, scale2) : unknown;
@@ -249215,7 +249277,7 @@ function identity$6(domain2) {
249215
249277
  scale2.copy = function() {
249216
249278
  return identity$6(domain2).unknown(unknown);
249217
249279
  };
249218
- domain2 = arguments.length ? Array.from(domain2, number$8) : [0, 1];
249280
+ domain2 = arguments.length ? Array.from(domain2, number$7) : [0, 1];
249219
249281
  return linearish(scale2);
249220
249282
  }
249221
249283
  function nice$1(domain2, interval2) {
@@ -249405,7 +249467,7 @@ function quantile() {
249405
249467
  return scale2;
249406
249468
  }
249407
249469
  function scale2(x2) {
249408
- return x2 == null || isNaN(x2 = +x2) ? unknown : range2[bisectRight$2(thresholds, x2)];
249470
+ return x2 == null || isNaN(x2 = +x2) ? unknown : range2[bisectRight$1(thresholds, x2)];
249409
249471
  }
249410
249472
  scale2.invertExtent = function(y2) {
249411
249473
  var i2 = range2.indexOf(y2);
@@ -249418,7 +249480,7 @@ function quantile() {
249418
249480
  if (!arguments.length) return domain2.slice();
249419
249481
  domain2 = [];
249420
249482
  for (let d of _) if (d != null && !isNaN(d = +d)) domain2.push(d);
249421
- domain2.sort(ascending$5);
249483
+ domain2.sort(ascending$4);
249422
249484
  return rescale();
249423
249485
  };
249424
249486
  scale2.range = function(_) {
@@ -249438,7 +249500,7 @@ function quantile() {
249438
249500
  function quantize$2() {
249439
249501
  var x02 = 0, x12 = 1, n3 = 1, domain2 = [0.5], range2 = [0, 1], unknown;
249440
249502
  function scale2(x2) {
249441
- return x2 != null && x2 <= x2 ? range2[bisectRight$2(domain2, x2, 0, n3)] : unknown;
249503
+ return x2 != null && x2 <= x2 ? range2[bisectRight$1(domain2, x2, 0, n3)] : unknown;
249442
249504
  }
249443
249505
  function rescale() {
249444
249506
  var i2 = -1;
@@ -249470,7 +249532,7 @@ function quantize$2() {
249470
249532
  function threshold() {
249471
249533
  var domain2 = [0.5], range2 = [0, 1], unknown, n3 = 1;
249472
249534
  function scale2(x2) {
249473
- return x2 != null && x2 <= x2 ? range2[bisectRight$2(domain2, x2, 0, n3)] : unknown;
249535
+ return x2 != null && x2 <= x2 ? range2[bisectRight$1(domain2, x2, 0, n3)] : unknown;
249474
249536
  }
249475
249537
  scale2.domain = function(_) {
249476
249538
  return arguments.length ? (domain2 = Array.from(_), n3 = Math.min(domain2.length, range2.length - 1), scale2) : domain2.slice();
@@ -249784,7 +249846,7 @@ function ticker(year2, month2, week2, day2, hour2, minute2) {
249784
249846
  }
249785
249847
  function tickInterval(start2, stop3, count2) {
249786
249848
  const target2 = Math.abs(stop3 - start2) / count2;
249787
- const i2 = bisector$2(([, , step2]) => step2).right(tickIntervals, target2);
249849
+ const i2 = bisector$1(([, , step2]) => step2).right(tickIntervals, target2);
249788
249850
  if (i2 === tickIntervals.length) return year2.every(tickStep(start2 / durationYear$1, stop3 / durationYear$1, count2));
249789
249851
  if (i2 === 0) return millisecond.every(Math.max(tickStep(start2, stop3, count2), 1));
249790
249852
  const [t4, step] = tickIntervals[target2 / tickIntervals[i2 - 1][2] < tickIntervals[i2][2] / target2 ? i2 - 1 : i2];
@@ -250356,7 +250418,7 @@ function defaultLocale$1(definition2) {
250356
250418
  function date(t4) {
250357
250419
  return new Date(t4);
250358
250420
  }
250359
- function number$7(t4) {
250421
+ function number$6(t4) {
250360
250422
  return t4 instanceof Date ? +t4 : +/* @__PURE__ */ new Date(+t4);
250361
250423
  }
250362
250424
  function calendar(ticks2, tickInterval, year2, month2, week2, day2, hour2, minute2, second2, format2) {
@@ -250369,7 +250431,7 @@ function calendar(ticks2, tickInterval, year2, month2, week2, day2, hour2, minut
250369
250431
  return new Date(invert2(y2));
250370
250432
  };
250371
250433
  scale2.domain = function(_) {
250372
- return arguments.length ? domain2(Array.from(_, number$7)) : domain2().map(date);
250434
+ return arguments.length ? domain2(Array.from(_, number$6)) : domain2().map(date);
250373
250435
  };
250374
250436
  scale2.ticks = function(interval2) {
250375
250437
  var d = domain2();
@@ -250529,7 +250591,7 @@ function translateX(x2) {
250529
250591
  function translateY(y2) {
250530
250592
  return "translate(0," + y2 + ")";
250531
250593
  }
250532
- function number$6(scale2) {
250594
+ function number$5(scale2) {
250533
250595
  return (d) => +scale2(d);
250534
250596
  }
250535
250597
  function center(scale2, offset2) {
@@ -250543,7 +250605,7 @@ function entering() {
250543
250605
  function axis(orient2, scale2) {
250544
250606
  var tickArguments = [], tickValues2 = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset2 = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient2 === top || orient2 === left ? -1 : 1, x2 = orient2 === left || orient2 === right ? "x" : "y", transform3 = orient2 === top || orient2 === bottom ? translateX : translateY;
250545
250607
  function axis2(context2) {
250546
- var values3 = tickValues2 == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues2, format2 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity$5 : tickFormat2, spacing2 = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset2, range1 = +range2[range2.length - 1] + offset2, position2 = (scale2.bandwidth ? center : number$6)(scale2.copy(), offset2), selection = context2.selection ? context2.selection() : context2, path2 = selection.selectAll(".domain").data([null]), tick2 = selection.selectAll(".tick").data(values3, scale2).order(), tickExit = tick2.exit(), tickEnter = tick2.enter().append("g").attr("class", "tick"), line2 = tick2.select("line"), text2 = tick2.select("text");
250608
+ var values3 = tickValues2 == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues2, format2 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity$5 : tickFormat2, spacing2 = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset2, range1 = +range2[range2.length - 1] + offset2, position2 = (scale2.bandwidth ? center : number$5)(scale2.copy(), offset2), selection = context2.selection ? context2.selection() : context2, path2 = selection.selectAll(".domain").data([null]), tick2 = selection.selectAll(".tick").data(values3, scale2).order(), tickExit = tick2.exit(), tickEnter = tick2.enter().append("g").attr("class", "tick"), line2 = tick2.select("line"), text2 = tick2.select("text");
250547
250609
  path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
250548
250610
  tick2 = tick2.merge(tickEnter);
250549
250611
  line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x2 + "2", k * tickSizeInner));
@@ -250676,6 +250738,9 @@ function ramp(color2, n3 = 256) {
250676
250738
  canvas.width = n3;
250677
250739
  canvas.height = 1;
250678
250740
  const context2 = canvas.getContext("2d");
250741
+ if (!context2) {
250742
+ throw new Error("Could not get 2d context from canvas");
250743
+ }
250679
250744
  for (let i2 = 0; i2 < n3; ++i2) {
250680
250745
  context2.fillStyle = color2(i2 / (n3 - 1));
250681
250746
  context2.fillRect(i2, 0, 1, 1);
@@ -250694,6 +250759,8 @@ function getXlinkHref(cmap) {
250694
250759
  }
250695
250760
  const useStyles$p = makeStyles()(() => ({
250696
250761
  legend: {
250762
+ position: "relative",
250763
+ // Needed for absolute positioning of slider overlay
250697
250764
  top: "2px",
250698
250765
  right: "2px",
250699
250766
  fontSize: "10px !important",
@@ -250725,6 +250792,74 @@ const useStyles$p = makeStyles()(() => ({
250725
250792
  },
250726
250793
  legendInvisible: {
250727
250794
  display: "none"
250795
+ },
250796
+ sliderContainer: {
250797
+ position: "absolute",
250798
+ // Position at the colormap location: top offset = titleHeight
250799
+ top: "10px",
250800
+ // titleHeight
250801
+ left: "2px",
250802
+ // Account for parent padding
250803
+ width: "calc(100% - 4px)",
250804
+ // Account for left and right padding
250805
+ height: "8px",
250806
+ // rectHeight
250807
+ "&:hover $sliderThumb": {
250808
+ opacity: 1
250809
+ }
250810
+ },
250811
+ sliderRoot: {
250812
+ position: "absolute",
250813
+ top: 0,
250814
+ left: 0,
250815
+ width: "100%",
250816
+ height: "8px",
250817
+ // rectHeight
250818
+ padding: 0,
250819
+ "& .MuiSlider-rail": {
250820
+ display: "none"
250821
+ },
250822
+ "& .MuiSlider-track": {
250823
+ display: "none"
250824
+ },
250825
+ "& .MuiSlider-valueLabel": {
250826
+ fontSize: "9px",
250827
+ padding: "2px 4px",
250828
+ backgroundColor: "rgb(0, 0, 0)",
250829
+ borderRadius: "2px"
250830
+ }
250831
+ },
250832
+ sliderThumb: {
250833
+ width: "4px",
250834
+ height: "12px",
250835
+ borderRadius: "2px",
250836
+ backgroundColor: "white",
250837
+ border: "1px solid black",
250838
+ opacity: 0,
250839
+ transition: "opacity 0.15s ease-in-out",
250840
+ "&:hover, &.Mui-focusVisible": {
250841
+ boxShadow: "0 0 0 4px rgba(0, 0, 0, 0.16)",
250842
+ opacity: 1
250843
+ },
250844
+ "&.Mui-active": {
250845
+ boxShadow: "0 0 0 6px rgba(0, 0, 0, 0.16)",
250846
+ opacity: 1
250847
+ }
250848
+ },
250849
+ colormapImage: {
250850
+ position: "absolute",
250851
+ top: "2px",
250852
+ height: "6px",
250853
+ // rectHeight
250854
+ pointerEvents: "none"
250855
+ },
250856
+ grayTrack: {
250857
+ position: "absolute",
250858
+ top: "2px",
250859
+ height: "6px",
250860
+ // rectHeight
250861
+ backgroundColor: "rgba(128, 128, 128, 0.5)",
250862
+ pointerEvents: "none"
250728
250863
  }
250729
250864
  }));
250730
250865
  const titleHeight = 10;
@@ -250734,21 +250869,23 @@ const rectMarginX = 2;
250734
250869
  function combineExtents(extents, featureAggregationStrategy) {
250735
250870
  if (Array.isArray(extents)) {
250736
250871
  if (Array.isArray(extents?.[0])) {
250872
+ const extentsArray = extents;
250737
250873
  if (featureAggregationStrategy === "first") {
250738
- return extents[0];
250874
+ return extentsArray[0];
250739
250875
  }
250740
250876
  if (featureAggregationStrategy === "last") {
250741
- return extents.at(-1);
250877
+ return extentsArray.at(-1) || null;
250742
250878
  }
250743
250879
  if (typeof featureAggregationStrategy === "number") {
250744
250880
  const i2 = featureAggregationStrategy;
250745
- return extents[i2];
250881
+ return extentsArray[i2];
250746
250882
  }
250747
250883
  if (featureAggregationStrategy === "sum") {
250748
- return extents.reduce((a2, h2) => [a2[0] + h2[0], a2[1] + h2[1]]);
250884
+ return extentsArray.reduce((a2, h2) => [a2[0] + h2[0], a2[1] + h2[1]]);
250749
250885
  }
250750
250886
  if (featureAggregationStrategy === "mean") {
250751
- return extents.reduce((a2, h2) => [a2[0] + h2[0], a2[1] + h2[1]]).map((v) => v / extents.length);
250887
+ const sum2 = extentsArray.reduce((a2, h2) => [a2[0] + h2[0], a2[1] + h2[1]]);
250888
+ return [sum2[0] / extentsArray.length, sum2[1] / extentsArray.length];
250752
250889
  }
250753
250890
  } else {
250754
250891
  return extents;
@@ -250762,7 +250899,7 @@ function combineMissings(missings, featureAggregationStrategy) {
250762
250899
  return missings[0];
250763
250900
  }
250764
250901
  if (featureAggregationStrategy === "last") {
250765
- return missings.at(-1);
250902
+ return missings.at(-1) || null;
250766
250903
  }
250767
250904
  if (typeof featureAggregationStrategy === "number") {
250768
250905
  const i2 = featureAggregationStrategy;
@@ -250778,52 +250915,127 @@ function combineMissings(missings, featureAggregationStrategy) {
250778
250915
  return null;
250779
250916
  }
250780
250917
  function Legend(props) {
250781
- const { visible: visibleProp, positionRelative = false, highContrast = false, obsType, featureValueType, considerSelections = true, obsColorEncoding, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, spatialChannelColor, spatialLayerColor, obsSetSelection, obsSetColor, featureAggregationStrategy, extent: extent2, missing, width: width2 = 100, height: height2 = 36, maxHeight: maxHeight2 = null, theme, showObsLabel = false, pointsVisible = true, contoursVisible = false, contoursFilled, contourPercentiles, contourThresholds } = props;
250782
- const svgRef = useRef();
250918
+ const {
250919
+ visible: visibleProp,
250920
+ positionRelative = false,
250921
+ highContrast = false,
250922
+ obsType,
250923
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
250924
+ featureType: _featureType = void 0,
250925
+ // Unused but accepted for API compatibility
250926
+ featureValueType,
250927
+ considerSelections = true,
250928
+ obsColorEncoding,
250929
+ featureSelection,
250930
+ featureLabelsMap,
250931
+ featureValueColormap,
250932
+ featureValueColormapRange,
250933
+ setFeatureValueColormapRange,
250934
+ spatialChannelColor,
250935
+ spatialLayerColor,
250936
+ obsSetSelection,
250937
+ obsSetColor,
250938
+ featureAggregationStrategy,
250939
+ extent: extent2,
250940
+ missing,
250941
+ width: width2 = 100,
250942
+ height: height2 = 36,
250943
+ maxHeight: maxHeight2 = null,
250944
+ theme,
250945
+ showObsLabel = false,
250946
+ pointsVisible = true,
250947
+ contoursVisible = false,
250948
+ contoursFilled,
250949
+ contourPercentiles,
250950
+ contourThresholds
250951
+ } = props;
250952
+ const svgRef = useRef(null);
250783
250953
  const { classes: classes2 } = useStyles$p();
250954
+ const [localRange, setLocalRange] = useState(featureValueColormapRange);
250955
+ useEffect(() => {
250956
+ setLocalRange(featureValueColormapRange);
250957
+ }, [featureValueColormapRange]);
250958
+ const debouncedSetRange = useMemo$1(() => setFeatureValueColormapRange ? debounce$2((value2) => {
250959
+ setFeatureValueColormapRange(value2);
250960
+ }, 5, { leading: false, trailing: true }) : null, [setFeatureValueColormapRange]);
250961
+ useEffect(() => () => {
250962
+ if (debouncedSetRange) {
250963
+ debouncedSetRange.cancel();
250964
+ }
250965
+ }, [debouncedSetRange]);
250966
+ const handleSliderChange = useCallback((_event, newValue) => {
250967
+ const rangeValue = newValue;
250968
+ setLocalRange(rangeValue);
250969
+ if (debouncedSetRange) {
250970
+ debouncedSetRange(rangeValue);
250971
+ }
250972
+ }, [debouncedSetRange]);
250784
250973
  const isDarkTheme = theme === "dark";
250785
250974
  const isStaticColor = obsColorEncoding === "spatialChannelColor" || obsColorEncoding === "spatialLayerColor";
250786
250975
  const isSetColor = obsColorEncoding === "cellSetSelection";
250787
- const layerColor = Array.isArray(spatialLayerColor) && spatialLayerColor.length === 3 ? spatialLayerColor : getDefaultColor(theme);
250788
- const channelColor = Array.isArray(spatialChannelColor) && spatialChannelColor.length === 3 ? spatialChannelColor : getDefaultColor(theme);
250976
+ const layerColor = Array.isArray(spatialLayerColor) && spatialLayerColor.length === 3 ? spatialLayerColor : getDefaultColor(theme ?? "light");
250977
+ const channelColor = Array.isArray(spatialChannelColor) && spatialChannelColor.length === 3 ? spatialChannelColor : getDefaultColor(theme ?? "light");
250789
250978
  const staticColor = obsColorEncoding === "spatialChannelColor" ? channelColor : layerColor;
250790
- const visible = visibleProp && (!considerSelections || obsColorEncoding === "geneSelection" && featureSelection && Array.isArray(featureSelection) && featureSelection.length >= 1 || isSetColor && obsSetSelection?.length > 0 && obsSetColor?.length > 0 || isStaticColor);
250979
+ const visible = visibleProp && (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && featureSelection && Array.isArray(featureSelection) && featureSelection.length >= 1 || isSetColor && (obsSetSelection?.length ?? 0) > 0 && (obsSetColor?.length ?? 0) > 0 || isStaticColor);
250791
250980
  const levelZeroNames = useMemo$1(() => Array.from(new Set(obsSetSelection?.map((setPath) => setPath[0]) || [])), [obsSetSelection]);
250792
- const dynamicHeight = isSetColor && obsSetSelection ? levelZeroNames.length * titleHeight + obsSetSelection?.length * (rectHeight + rectMarginY) : height2 + (!pointsVisible && contoursVisible ? 25 : 0);
250981
+ const dynamicHeight = isSetColor && obsSetSelection ? levelZeroNames.length * titleHeight + (obsSetSelection?.length ?? 0) * (rectHeight + rectMarginY) : height2 + (!pointsVisible && contoursVisible ? 25 : 0);
250793
250982
  const availHeight = maxHeight2 !== null ? Math.max(0, maxHeight2 - 4) : Infinity;
250794
250983
  const needsScroll = Number.isFinite(availHeight) && dynamicHeight > availHeight + 1;
250795
250984
  useEffect(() => {
250796
250985
  const domElement = svgRef.current;
250986
+ if (!domElement)
250987
+ return;
250797
250988
  const foregroundColor = highContrast ? "black" : isDarkTheme ? "white" : "black";
250798
250989
  const svg2 = select$1(domElement);
250799
250990
  svg2.selectAll("g").remove();
250800
250991
  svg2.attr("width", width2).attr("height", dynamicHeight);
250801
250992
  const g2 = svg2.append("g").attr("width", width2).attr("height", dynamicHeight);
250802
- if (!considerSelections || obsColorEncoding === "geneSelection") {
250803
- const [xMin, xMax] = combineExtents(extent2, featureAggregationStrategy) || [0, 1];
250993
+ const showInteractiveSlider2 = setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
250994
+ if (!considerSelections || ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "")) {
250995
+ const combinedExtent = combineExtents(extent2 ?? null, featureAggregationStrategy ?? null) || [0, 1];
250996
+ const [xMin, xMax] = combinedExtent;
250804
250997
  if (featureValueColormap && pointsVisible) {
250805
- const xlinkHref = getXlinkHref(featureValueColormap);
250806
- g2.append("image").attr("x", 0).attr("y", titleHeight).attr("width", width2).attr("height", rectHeight).attr("preserveAspectRatio", "none").attr("href", xlinkHref);
250807
- const [rMin, rMax] = featureValueColormapRange;
250998
+ const xlinkHref2 = getXlinkHref(featureValueColormap);
250999
+ const currentRange = showInteractiveSlider2 ? localRange : featureValueColormapRange;
251000
+ const [rMin, rMax] = currentRange || [0, 1];
251001
+ if (showInteractiveSlider2) ;
251002
+ else if (setFeatureValueColormapRange) {
251003
+ g2.append("image").attr("x", rMin * width2).attr("y", titleHeight).attr("width", (rMax - rMin) * width2).attr("height", rectHeight).attr("preserveAspectRatio", "none").attr("href", xlinkHref2);
251004
+ } else {
251005
+ g2.append("image").attr("x", 0).attr("y", titleHeight).attr("width", width2).attr("height", rectHeight).attr("preserveAspectRatio", "none").attr("href", xlinkHref2);
251006
+ }
250808
251007
  const scaledDataExtent = [
250809
251008
  xMin + (xMax - xMin) * rMin,
250810
251009
  xMax - (xMax - xMin) * (1 - rMax)
250811
251010
  ];
250812
- const x2 = linear$1().domain(scaledDataExtent).range([0.5, width2 - 0.5]);
250813
- const axisTicks2 = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight})`).style("font-size", "10px").call(axisBottom(x2).tickValues(scaledDataExtent));
250814
- axisTicks2.selectAll("line,path").style("stroke", foregroundColor);
250815
- axisTicks2.selectAll("text").style("fill", foregroundColor);
250816
- axisTicks2.selectAll("text").attr("text-anchor", (d, i2) => i2 === 0 ? "start" : "end");
250817
- } else if (contoursVisible) {
251011
+ let x2;
251012
+ if (setFeatureValueColormapRange || showInteractiveSlider2) {
251013
+ x2 = linear$1().domain(scaledDataExtent).range([rMin * width2, rMax * width2]);
251014
+ } else {
251015
+ x2 = linear$1().domain(scaledDataExtent).range([0, width2]);
251016
+ }
251017
+ if (showInteractiveSlider2) {
251018
+ const xGlobal = linear$1().domain([xMin, xMax]).range([0, width2 - 4]);
251019
+ const axisTicks2 = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight})`).style("font-size", "10px").call(axisBottom(xGlobal).tickValues([xMin, xMax]));
251020
+ axisTicks2.selectAll("line,path").style("stroke", foregroundColor);
251021
+ axisTicks2.selectAll("text").style("fill", foregroundColor);
251022
+ axisTicks2.selectAll("text").attr("text-anchor", (_d3, i2) => i2 === 0 ? "start" : "end");
251023
+ } else {
251024
+ const axisTicks2 = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight})`).style("font-size", "10px").call(axisBottom(x2).tickValues(scaledDataExtent));
251025
+ axisTicks2.selectAll("line,path").style("stroke", foregroundColor);
251026
+ axisTicks2.selectAll("text").style("fill", foregroundColor);
251027
+ axisTicks2.selectAll("text").attr("text-anchor", (_d3, i2) => i2 === 0 ? "start" : "end");
251028
+ }
251029
+ } else if (contoursVisible && contourPercentiles) {
250818
251030
  const tSize = 12;
250819
251031
  const xPercentile = linear$1().domain([0, 1]).range([tSize / 2, width2 - tSize / 2 - 2]);
250820
- const axisTicks2 = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight + 15})`).style("font-size", "9px").call(axisBottom(xPercentile).tickValues(contourPercentiles).tickFormat(format$8(".0%")).tickSizeOuter(0));
251032
+ const axisTicks2 = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight + 15})`).style("font-size", "9px").call(axisBottom(xPercentile).tickValues(contourPercentiles).tickFormat((d) => format$8(".0%")(d)).tickSizeOuter(0));
250821
251033
  axisTicks2.selectAll("line,path").style("stroke", foregroundColor);
250822
251034
  axisTicks2.selectAll("text").style("fill", foregroundColor);
250823
251035
  const NEIGHBOR_THRESHOLD = 18;
250824
- const contourPercentages = contourPercentiles.map((x2) => x2 * 100);
251036
+ const contourPercentages = contourPercentiles.map((p) => p * 100);
250825
251037
  if (contourPercentages?.[1] - contourPercentages?.[0] <= NEIGHBOR_THRESHOLD || contourPercentages?.[2] - contourPercentages?.[1] <= NEIGHBOR_THRESHOLD) {
250826
- axisTicks2.selectAll("text").attr("transform", (d, i2) => `translate(0,${i2 === 0 || i2 === contourPercentiles.length - 1 ? 0 : 10})`);
251038
+ axisTicks2.selectAll("text").attr("transform", (_d3, i2) => `translate(0,${i2 === 0 || i2 === contourPercentiles.length - 1 ? 0 : 10})`);
250827
251039
  }
250828
251040
  const triangleGroupG = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight + 4})`);
250829
251041
  contourPercentiles.forEach((p, i2) => {
@@ -250833,7 +251045,7 @@ function Legend(props) {
250833
251045
  const thresholdGroupG = g2.append("g").attr("transform", `translate(0,${titleHeight + rectHeight})`);
250834
251046
  const thresholdFormatter = format$8(".0f");
250835
251047
  contourPercentiles.forEach((p, i2) => {
250836
- const contourThreshold = xMin + (xMax - xMin) * (contourThresholds?.[i2] / 255);
251048
+ const contourThreshold = xMin + (xMax - xMin) * ((contourThresholds?.[i2] ?? 0) / 255);
250837
251049
  const thresholdG = thresholdGroupG.append("g").attr("transform", `translate(${xPercentile(p)},0)`).style("font-size", "7px");
250838
251050
  thresholdG.append("text").text(thresholdFormatter(contourThreshold)).style("fill", foregroundColor).attr("text-anchor", "middle");
250839
251051
  });
@@ -250856,9 +251068,9 @@ function Legend(props) {
250856
251068
  g2.append("text").attr("text-anchor", "start").attr("dominant-baseline", "hanging").attr("x", 0).attr("y", y2).text(levelZeroName).style("font-size", "9px").style("fill", foregroundColor);
250857
251069
  y2 += titleHeight;
250858
251070
  setPaths.forEach((setPath) => {
250859
- const setColor2 = obsSetColor?.find((d) => isEqual$3(d.path, setPath))?.color || getDefaultColor(theme);
251071
+ const setColor2 = obsSetColor?.find((d) => isEqual$3(d.path, setPath))?.color || getDefaultColor(theme ?? "light");
250860
251072
  g2.append("rect").attr("x", 0).attr("y", y2).attr("width", rectHeight).attr("height", rectHeight).attr("fill", `rgb(${setColor2[0]},${setColor2[1]},${setColor2[2]})`);
250861
- g2.append("text").attr("text-anchor", "start").attr("dominant-baseline", "hanging").attr("x", rectHeight + rectMarginX).attr("y", y2).text(setPath.at(-1)).style("font-size", "9px").style("fill", foregroundColor);
251073
+ g2.append("text").attr("text-anchor", "start").attr("dominant-baseline", "hanging").attr("x", rectHeight + rectMarginX).attr("y", y2).text(setPath.at(-1) ?? "").style("font-size", "9px").style("fill", foregroundColor);
250862
251074
  y2 += rectHeight + rectMarginY;
250863
251075
  });
250864
251076
  });
@@ -250879,17 +251091,17 @@ function Legend(props) {
250879
251091
  } else {
250880
251092
  featureSelectionLabelRawStr = featureSelectionLabelRaw?.[0];
250881
251093
  }
250882
- const combinedMissing = combineMissings(missing, featureAggregationStrategy);
251094
+ const combinedMissing = combineMissings(missing ?? null, featureAggregationStrategy ?? null);
250883
251095
  const featureSelectionLabel = combinedMissing ? `${featureSelectionLabelRawStr} (${Math.round(combinedMissing * 100)}% NaN)` : featureSelectionLabelRawStr;
250884
- const obsLabel = capitalize$3(obsType);
250885
- const featureLabel = considerSelections ? featureSelectionLabel || capitalize$3(featureValueType) : capitalize$3(featureValueType);
251096
+ const obsLabel = capitalize$3(obsType ?? null);
251097
+ const featureLabel = considerSelections ? featureSelectionLabel || capitalize$3(featureValueType ?? null) : capitalize$3(featureValueType ?? null);
250886
251098
  const mainLabel = showObsLabel ? obsLabel : featureLabel;
250887
251099
  const subLabel = showObsLabel ? featureLabel : null;
250888
251100
  const hasSubLabel = subLabel !== null;
250889
251101
  if (!isSetColor) {
250890
- g2.append("text").attr("text-anchor", hasSubLabel ? "start" : "end").attr("dominant-baseline", "hanging").attr("x", hasSubLabel ? 0 : width2).attr("y", 0).text(mainLabel).style("font-size", "10px").style("fill", foregroundColor);
251102
+ g2.append("text").attr("text-anchor", hasSubLabel ? "start" : "end").attr("dominant-baseline", "hanging").attr("x", hasSubLabel ? 0 : width2 - 4).attr("y", 0).text(mainLabel ?? "").style("font-size", "10px").style("fill", foregroundColor);
250891
251103
  if (hasSubLabel) {
250892
- g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width2).attr("y", titleHeight).text(subLabel).style("font-size", "9px").style("fill", foregroundColor);
251104
+ g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width2).attr("y", titleHeight + rectHeight).text(subLabel ?? "").style("font-size", "9px").style("fill", foregroundColor);
250893
251105
  }
250894
251106
  }
250895
251107
  }, [
@@ -250897,6 +251109,7 @@ function Legend(props) {
250897
251109
  height2,
250898
251110
  featureValueColormap,
250899
251111
  featureValueColormapRange,
251112
+ localRange,
250900
251113
  considerSelections,
250901
251114
  obsType,
250902
251115
  obsColorEncoding,
@@ -250915,20 +251128,63 @@ function Legend(props) {
250915
251128
  contoursFilled,
250916
251129
  contoursVisible,
250917
251130
  pointsVisible,
250918
- featureAggregationStrategy
251131
+ featureAggregationStrategy,
251132
+ setFeatureValueColormapRange,
251133
+ dynamicHeight,
251134
+ highContrast,
251135
+ isStaticColor,
251136
+ missing,
251137
+ showObsLabel,
251138
+ staticColor
250919
251139
  ]);
250920
- return jsxRuntimeExports.jsx("div", { className: clsx(classes2.legend, {
251140
+ const showInteractiveSlider = setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
251141
+ const globalExtent = useMemo$1(() => {
251142
+ const combined = combineExtents(extent2 ?? null, featureAggregationStrategy ?? null);
251143
+ return combined || [0, 1];
251144
+ }, [extent2, featureAggregationStrategy]);
251145
+ const formatSliderValue = useCallback((value2) => {
251146
+ const [xMin, xMax] = globalExtent;
251147
+ const dataValue = xMin + (xMax - xMin) * value2;
251148
+ const range2 = xMax - xMin;
251149
+ if (range2 < 0.01) {
251150
+ return dataValue.toExponential(2);
251151
+ }
251152
+ if (range2 < 1) {
251153
+ return dataValue.toFixed(3);
251154
+ }
251155
+ if (range2 < 100) {
251156
+ return dataValue.toFixed(1);
251157
+ }
251158
+ return Math.round(dataValue).toString();
251159
+ }, [globalExtent]);
251160
+ const xlinkHref = featureValueColormap ? getXlinkHref(featureValueColormap) : null;
251161
+ const currentLocalRange = localRange || [0, 1];
251162
+ return jsxRuntimeExports.jsxs("div", { className: clsx(classes2.legend, {
250921
251163
  [classes2.legendRelative]: positionRelative,
250922
251164
  [classes2.legendAbsolute]: !positionRelative,
250923
251165
  [classes2.legendHighContrast]: highContrast,
250924
251166
  [classes2.legendLowContrast]: !highContrast,
250925
251167
  [classes2.legendInvisible]: !visible
250926
251168
  }), style: {
250927
- ...needsScroll ? { maxHeight: `${Math.floor(availHeight)}px`, overflowY: "auto" } : { maxHeight: void 0, overflowY: "visible" }
250928
- }, children: jsxRuntimeExports.jsx("svg", { ref: svgRef, style: {
251169
+ ...needsScroll ? { maxHeight: `${Math.floor(availHeight)}px`, overflowY: "auto" } : { maxHeight: void 0, overflowY: "visible" },
251170
+ width: `${width2}px`
251171
+ }, children: [jsxRuntimeExports.jsx("svg", { ref: svgRef, style: {
250929
251172
  width: `${width2}px`,
250930
251173
  height: `${dynamicHeight}px`
250931
- } }) });
251174
+ } }), showInteractiveSlider && xlinkHref && jsxRuntimeExports.jsxs("div", { className: classes2.sliderContainer, children: [currentLocalRange[0] > 0 && jsxRuntimeExports.jsx("div", { className: classes2.grayTrack, style: {
251175
+ left: 0,
251176
+ width: `${currentLocalRange[0] * 100}%`
251177
+ } }), currentLocalRange[1] < 1 && jsxRuntimeExports.jsx("div", { className: classes2.grayTrack, style: {
251178
+ left: `${currentLocalRange[1] * 100}%`,
251179
+ width: `${(1 - currentLocalRange[1]) * 100}%`
251180
+ } }), jsxRuntimeExports.jsx("img", { src: xlinkHref, alt: "Colormap gradient", className: classes2.colormapImage, style: {
251181
+ left: `${currentLocalRange[0] * 100}%`,
251182
+ width: `${(currentLocalRange[1] - currentLocalRange[0]) * 100}%`
251183
+ } }), jsxRuntimeExports.jsx(Slider, { className: classes2.sliderRoot, value: currentLocalRange, onChange: handleSliderChange, min: 0, max: 1, step: 0.01, disableSwap: true, valueLabelDisplay: "auto", valueLabelFormat: formatSliderValue, "aria-label": "Colormap range", getAriaLabel: (index2) => index2 === 0 ? "Colormap minimum" : "Colormap maximum", getAriaValueText: (value2) => formatSliderValue(value2), slotProps: {
251184
+ thumb: {
251185
+ className: classes2.sliderThumb
251186
+ }
251187
+ } })] })] });
250932
251188
  }
250933
251189
  const useStyles$o = makeStyles()(() => ({
250934
251190
  multiLegend: {
@@ -250961,8 +251217,12 @@ function MultiLegend(props) {
250961
251217
  const reversedSpotLayerScopes = useMemo$1(() => [...spotLayerScopes || []].reverse(), [spotLayerScopes]);
250962
251218
  const reversedPointLayerScopes = useMemo$1(() => [...pointLayerScopes || []].reverse(), [pointLayerScopes]);
250963
251219
  return jsxRuntimeExports.jsxs("div", { className: classes2.multiLegend, children: [pointLayerScopes ? reversedPointLayerScopes.flatMap((layerScope) => {
250964
- const layerCoordination = pointLayerCoordination[0][layerScope];
250965
- const { spatialLayerVisible, obsColorEncoding, obsType, featureType, featureValueType, spatialLayerColor, legendVisible } = layerCoordination;
251220
+ const layerCoordination = pointLayerCoordination?.[0]?.[layerScope];
251221
+ const layerSetters = pointLayerCoordination?.[1]?.[layerScope];
251222
+ if (!layerCoordination)
251223
+ return null;
251224
+ const { spatialLayerVisible, obsColorEncoding, obsType, featureType, featureValueType, featureSelection, featureValueColormap, featureValueColormapRange, spatialLayerColor, legendVisible } = layerCoordination;
251225
+ const { setFeatureValueColormapRange } = layerSetters || {};
250966
251226
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
250967
251227
  const height2 = isStaticColor ? 20 : 36;
250968
251228
  return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, {
@@ -250977,30 +251237,39 @@ function MultiLegend(props) {
250977
251237
  featureValueType,
250978
251238
  obsColorEncoding,
250979
251239
  spatialLayerColor,
250980
- featureSelection: null,
251240
+ featureSelection,
250981
251241
  // featureLabelsMap={featureLabelsMap} // TODO
250982
- featureValueColormap: "viridis",
250983
- featureValueColormapRange: [0, 1],
251242
+ featureValueColormap: featureValueColormap || "viridis",
251243
+ featureValueColormapRange: featureValueColormapRange || [0, 1],
251244
+ setFeatureValueColormapRange,
250984
251245
  extent: null,
250985
251246
  height: height2
250986
251247
  }, layerScope) : null;
250987
251248
  }) : null, spotLayerScopes ? reversedSpotLayerScopes.flatMap((layerScope) => {
250988
- const layerCoordination = spotLayerCoordination[0][layerScope];
251249
+ const layerCoordination = spotLayerCoordination?.[0][layerScope];
251250
+ const layerSetters = spotLayerCoordination?.[1]?.[layerScope];
251251
+ if (!layerCoordination)
251252
+ return null;
250989
251253
  const { spatialLayerVisible, obsColorEncoding, featureValueColormap, featureValueColormapRange, obsType, featureType, featureValueType, featureSelection, featureAggregationStrategy, spatialLayerColor, legendVisible, obsSetSelection, obsSetColor } = layerCoordination;
251254
+ const { setFeatureValueColormapRange } = layerSetters || {};
250990
251255
  const expressionExtents = spotMultiExpressionExtents?.[layerScope];
250991
251256
  const firstExpressionExtent = expressionExtents?.[0];
250992
251257
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
250993
251258
  const height2 = isStaticColor ? 20 : 36;
250994
251259
  const featureLabelsMap = spotMultiFeatureLabels?.[layerScope]?.featureLabelsMap;
250995
- return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, { maxHeight: maxHeight2, positionRelative: true, highContrast: true, showObsLabel: true, visible: spatialLayerVisible, theme, obsType, featureType, featureValueType, obsColorEncoding, spatialLayerColor, featureSelection, featureAggregationStrategy, featureLabelsMap, featureValueColormap, featureValueColormapRange, extent: firstExpressionExtent, height: height2, obsSetSelection, obsSetColor }, layerScope) : null;
251260
+ return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, { maxHeight: maxHeight2, positionRelative: true, highContrast: true, showObsLabel: true, visible: spatialLayerVisible, theme, obsType, featureType, featureValueType, obsColorEncoding, spatialLayerColor, featureSelection, featureAggregationStrategy, featureLabelsMap, featureValueColormap, featureValueColormapRange, setFeatureValueColormapRange, extent: firstExpressionExtent, height: height2, obsSetSelection, obsSetColor }, layerScope) : null;
250996
251261
  }) : null, segmentationLayerScopes ? reversedSegmentationLayerScopes.flatMap((layerScope) => {
250997
- const layerCoordination = segmentationLayerCoordination[0][layerScope];
250998
- const channelScopes = segmentationChannelScopesByLayer[layerScope];
250999
- const channelCoordination = segmentationChannelCoordination[0][layerScope];
251262
+ const layerCoordination = segmentationLayerCoordination?.[0][layerScope];
251263
+ const channelScopes = segmentationChannelScopesByLayer?.[layerScope];
251264
+ const channelCoordination = segmentationChannelCoordination?.[0][layerScope];
251265
+ const channelSetters = segmentationChannelCoordination?.[1]?.[layerScope];
251266
+ if (!layerCoordination)
251267
+ return null;
251000
251268
  const { spatialLayerVisible } = layerCoordination;
251001
251269
  const reversedChannelScopes = [...channelScopes || []].reverse();
251002
251270
  return channelCoordination && channelScopes ? reversedChannelScopes.map((cScope) => {
251003
251271
  const { spatialChannelVisible, spatialChannelColor, obsColorEncoding, featureValueColormap, featureValueColormapRange, obsType, featureType, featureValueType, featureSelection, featureAggregationStrategy, legendVisible, obsSetSelection, obsSetColor } = channelCoordination[cScope];
251272
+ const { setFeatureValueColormapRange } = channelSetters?.[cScope] || {};
251004
251273
  const expressionExtents = segmentationMultiExpressionExtents?.[layerScope]?.[cScope];
251005
251274
  const firstExpressionExtent = expressionExtents?.[0];
251006
251275
  const isStaticColor = obsColorEncoding === "spatialChannelColor";
@@ -251021,6 +251290,7 @@ function MultiLegend(props) {
251021
251290
  // featureLabelsMap={featureLabelsMap} // TODO
251022
251291
  featureValueColormap,
251023
251292
  featureValueColormapRange,
251293
+ setFeatureValueColormapRange,
251024
251294
  extent: firstExpressionExtent,
251025
251295
  height: height2,
251026
251296
  spatialChannelColor,
@@ -251070,7 +251340,7 @@ function ChannelNamesLegend(props) {
251070
251340
  const imageWrapperInstance = images?.[layerScope]?.image?.instance;
251071
251341
  const channelNames = imageWrapperInstance?.getChannelNames();
251072
251342
  const channelIndex = imageWrapperInstance?.getChannelIndex(spatialTargetC);
251073
- const channelName = channelNames?.[channelIndex];
251343
+ const channelName = channelIndex !== void 0 ? channelNames?.[channelIndex] : void 0;
251074
251344
  return spatialLayerVisible && spatialChannelVisible && spatialChannelLabelsVisible ? jsxRuntimeExports.jsx(Typography, { variant: "h6", className: classes2.channelNameText, style: {
251075
251345
  color: rgbColor,
251076
251346
  fontSize: `${spatialChannelLabelSize}px`
@@ -251229,7 +251499,7 @@ function EmbeddingScatterplotSubscriber(props) {
251229
251499
  }, [obsEmbedding]);
251230
251500
  useEffect(() => {
251231
251501
  if (xRange && yRange && width2 && height2) {
251232
- const pointSizeDevicePixels = getPointSizeDevicePixels(window.devicePixelRatio, zoom2, xRange, yRange, width2, height2);
251502
+ const pointSizeDevicePixels = getPointSizeDevicePixels(window.devicePixelRatio, zoom2, xRange, yRange, width2, height2, numCells);
251233
251503
  setDynamicCellRadius(pointSizeDevicePixels);
251234
251504
  const nextCellOpacityScale = getPointOpacity(zoom2, xRange, yRange, width2, height2, numCells, averageFillDensity);
251235
251505
  setDynamicCellOpacity(nextCellOpacityScale);
@@ -251268,7 +251538,14 @@ function EmbeddingScatterplotSubscriber(props) {
251268
251538
  const getCellIsSelected = useCallback((object2, { index: index2 }) => (cellSelectionSet || /* @__PURE__ */ new Set([])).has(obsEmbeddingIndex[index2]) ? 1 : 0, [cellSelectionSet, obsEmbeddingIndex]);
251269
251539
  const cellRadius = cellRadiusMode === "manual" ? cellRadiusFixed : dynamicCellRadius;
251270
251540
  const cellOpacity = cellOpacityMode === "manual" ? cellOpacityFixed : dynamicCellOpacity;
251271
- const { normData: uint8ExpressionData, extents: expressionExtents, missing: expressionMissing } = useUint8FeatureSelection(expressionData);
251541
+ const aggregatedExpressionData = useMemo$1(() => {
251542
+ if (featureAggregationStrategyToUse != null && expressionData && expressionData.length > 1) {
251543
+ const aggregated = aggregateFeatureArrays(expressionData, featureAggregationStrategyToUse);
251544
+ return [aggregated];
251545
+ }
251546
+ return expressionData;
251547
+ }, [expressionData, featureAggregationStrategyToUse]);
251548
+ const { normData: uint8ExpressionData, extents: expressionExtents, missing: expressionMissing } = useUint8FeatureSelection(aggregatedExpressionData);
251272
251549
  const getExpressionValue = useExpressionValueGetter({
251273
251550
  instanceObsIndex: obsEmbeddingIndex,
251274
251551
  matrixObsIndex,
@@ -251430,6 +251707,7 @@ function EmbeddingScatterplotSubscriber(props) {
251430
251707
  featureLabelsMap,
251431
251708
  featureValueColormap: geneExpressionColormap,
251432
251709
  featureValueColormapRange: geneExpressionColormapRange,
251710
+ setFeatureValueColormapRange: setGeneExpressionColormapRange,
251433
251711
  obsSetSelection: cellSetSelection,
251434
251712
  extent: expressionExtents,
251435
251713
  missing: expressionMissing,
@@ -251657,7 +251935,7 @@ function GatingSubscriber(props) {
251657
251935
  }, [obsXY]);
251658
251936
  useEffect(() => {
251659
251937
  if (xRange && yRange) {
251660
- const pointSizeDevicePixels = getPointSizeDevicePixels(window.devicePixelRatio, zoom2, xRange, yRange, width2, height2);
251938
+ const pointSizeDevicePixels = getPointSizeDevicePixels(window.devicePixelRatio, zoom2, xRange, yRange, width2, height2, numCells);
251661
251939
  setDynamicCellRadius(pointSizeDevicePixels);
251662
251940
  const nextCellOpacityScale = getPointOpacity(zoom2, xRange, yRange, width2, height2, numCells, averageFillDensity);
251663
251941
  setDynamicCellOpacity(nextCellOpacityScale);
@@ -266323,7 +266601,7 @@ var equalScalar = /* @__PURE__ */ createEqualScalar({
266323
266601
  config: config$1,
266324
266602
  typed
266325
266603
  });
266326
- var number$5 = /* @__PURE__ */ createNumber({
266604
+ var number$4 = /* @__PURE__ */ createNumber({
266327
266605
  typed
266328
266606
  });
266329
266607
  var multiplyScalar = /* @__PURE__ */ createMultiplyScalar({
@@ -266440,7 +266718,7 @@ var pow$4 = /* @__PURE__ */ createPow({
266440
266718
  identity: identity$4,
266441
266719
  matrix,
266442
266720
  multiply,
266443
- number: number$5,
266721
+ number: number$4,
266444
266722
  typed
266445
266723
  });
266446
266724
  var bignumber = /* @__PURE__ */ createBignumber({
@@ -266450,7 +266728,7 @@ var bignumber = /* @__PURE__ */ createBignumber({
266450
266728
  var numeric$1 = /* @__PURE__ */ createNumeric({
266451
266729
  bignumber,
266452
266730
  fraction,
266453
- number: number$5
266731
+ number: number$4
266454
266732
  });
266455
266733
  var subtract = /* @__PURE__ */ createSubtract({
266456
266734
  DenseMatrix,
@@ -266544,7 +266822,7 @@ var Unit = /* @__PURE__ */ createUnitClass({
266544
266822
  format: format$4,
266545
266823
  isNumeric: isNumeric$1,
266546
266824
  multiplyScalar,
266547
- number: number$5,
266825
+ number: number$4,
266548
266826
  pow: pow$4,
266549
266827
  round,
266550
266828
  subtract
@@ -268374,6 +268652,7 @@ function SpatialSubscriber$1(props) {
268374
268652
  featureLabelsMap,
268375
268653
  featureValueColormap: geneExpressionColormap,
268376
268654
  featureValueColormapRange: geneExpressionColormapRange,
268655
+ setFeatureValueColormapRange: setGeneExpressionColormapRange,
268377
268656
  extent: expressionExtents?.[0]
268378
268657
  })] });
268379
268658
  }
@@ -269752,12 +270031,12 @@ class ErrorBoundary2 extends React__default.Component {
269752
270031
  }
269753
270032
  }
269754
270033
  const LazySpatialThree = React__default.lazy(async () => {
269755
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-DGhVps82.js");
270034
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-x9jj_7-2.js");
269756
270035
  return { default: SpatialWrapper2 };
269757
270036
  });
269758
270037
  const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
269759
270038
  const LazySpatialAccelerated = React__default.lazy(async () => {
269760
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-D8RTEOfi.js");
270039
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-DMKFK_xq.js");
269761
270040
  return { default: SpatialWrapper2 };
269762
270041
  });
269763
270042
  const SpatialAcceleratedAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialAccelerated, { ...props }) }) }) }));
@@ -270635,7 +270914,7 @@ const Heatmap$1 = forwardRef$1((props, deckRef) => {
270635
270914
  }
270636
270915
  const curr = backlog[backlog.length - 1];
270637
270916
  if (dataRef.current && dataRef.current.buffer.byteLength && expressionRowLookUp.size > 0 && !shouldUsePaddedImplementation(dataRef.current.length)) {
270638
- const promises = range$c(yTiles).map((i2) => range$c(xTiles).map(async (j) => workerPool.process({
270917
+ const promises = range$b(yTiles).map((i2) => range$b(xTiles).map(async (j) => workerPool.process({
270639
270918
  curr,
270640
270919
  tileI: i2,
270641
270920
  tileJ: j,
@@ -270744,7 +271023,7 @@ const Heatmap$1 = forwardRef$1((props, deckRef) => {
270744
271023
  });
270745
271024
  };
270746
271025
  const cellOrdering = transpose2 ? axisTopLabels : axisLeftLabels;
270747
- const layers3 = range$c(yTiles * xTiles).map((index2) => getLayer2(Math.floor(index2 / xTiles), index2 % xTiles));
271026
+ const layers3 = range$b(yTiles * xTiles).map((index2) => getLayer2(Math.floor(index2 / xTiles), index2 % xTiles));
270748
271027
  return layers3;
270749
271028
  }
270750
271029
  function getLayer(i2, j, tile) {
@@ -270896,10 +271175,10 @@ const Heatmap$1 = forwardRef$1((props, deckRef) => {
270896
271175
  const cellOrdering = transpose2 ? axisTopLabels : axisLeftLabels;
270897
271176
  const colorBarTileWidthPx = transpose2 ? TILE_SIZE : 1;
270898
271177
  const colorBarTileHeightPx = transpose2 ? 1 : TILE_SIZE;
270899
- const result = range$c(numCellColorTracks).map((track) => {
270900
- const trackResult = range$c(transpose2 ? xTiles : yTiles).map((i2) => {
271178
+ const result = range$b(numCellColorTracks).map((track) => {
271179
+ const trackResult = range$b(transpose2 ? xTiles : yTiles).map((i2) => {
270901
271180
  const tileData = new Uint8ClampedArray(TILE_SIZE * 1 * 4);
270902
- range$c(TILE_SIZE).forEach((tileY) => {
271181
+ range$b(TILE_SIZE).forEach((tileY) => {
270903
271182
  rowI = i2 * TILE_SIZE + tileY;
270904
271183
  if (rowI < cellOrdering.length) {
270905
271184
  cellId = cellOrdering[rowI];
@@ -271029,7 +271308,7 @@ const Heatmap$1 = forwardRef$1((props, deckRef) => {
271029
271308
  }
271030
271309
  }
271031
271310
  const cellColorsViews = useMemo$1(() => {
271032
- const result = range$c(numCellColorTracks).map((track) => {
271311
+ const result = range$b(numCellColorTracks).map((track) => {
271033
271312
  let view;
271034
271313
  if (transpose2) {
271035
271314
  view = new OrthographicView({
@@ -271255,7 +271534,7 @@ function HeatmapSubscriber(props) {
271255
271534
  setTargetY(target2[1]);
271256
271535
  }, colormapRange: geneExpressionColormapRange, setColormapRange: setGeneExpressionColormapRange, height: height2, width: width2, theme, uuid: uuid2, uint8ObsFeatureMatrix: uint8ObsFeatureMatrix?.data, cellColors, colormap: geneExpressionColormap, setIsRendering, setCellHighlight, setGeneHighlight, featureLabelsMap, obsIndex, featureIndex, setTrackHighlight, setComponentHover: () => {
271257
271536
  setComponentHover(uuid2);
271258
- }, updateViewInfo: setComponentViewInfo, observationsTitle, variablesTitle, variablesDashes: false, observationsDashes: false, cellColorLabels, useDevicePixels: true, onHeatmapClick, setColorEncoding: setHoveredColorEncoding }), tooltipsVisible && jsxRuntimeExports.jsx(HeatmapTooltipSubscriber, { parentUuid: uuid2, width: width2, height: height2, transpose: transpose2, getObsInfo: getObsInfo2, getFeatureInfo, obsHighlight: cellHighlight, featureHighlight: geneHighlight, featureType, featureLabelsMap }), jsxRuntimeExports.jsx(Legend, { visible: true, theme, featureType, featureValueType, obsColorEncoding: "geneExpression", considerSelections: false, featureSelection: geneSelection, obsSetSelection: cellSetSelection, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, extent: obsFeatureMatrixExtent })] });
271537
+ }, updateViewInfo: setComponentViewInfo, observationsTitle, variablesTitle, variablesDashes: false, observationsDashes: false, cellColorLabels, useDevicePixels: true, onHeatmapClick, setColorEncoding: setHoveredColorEncoding }), tooltipsVisible && jsxRuntimeExports.jsx(HeatmapTooltipSubscriber, { parentUuid: uuid2, width: width2, height: height2, transpose: transpose2, getObsInfo: getObsInfo2, getFeatureInfo, obsHighlight: cellHighlight, featureHighlight: geneHighlight, featureType, featureLabelsMap }), jsxRuntimeExports.jsx(Legend, { visible: true, theme, featureType, featureValueType, obsColorEncoding: "geneExpression", considerSelections: false, featureSelection: geneSelection, obsSetSelection: cellSetSelection, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, setFeatureValueColormapRange: setGeneExpressionColormapRange, extent: obsFeatureMatrixExtent })] });
271259
271538
  }
271260
271539
  function _classCallCheck(a2, n3) {
271261
271540
  if (!(a2 instanceof n3)) throw new TypeError("Cannot call a class as a function");
@@ -277918,22 +278197,18 @@ function FeatureList(props) {
277918
278197
  const { width: width2, height: height2, hasColorEncoding, geneList = [], featureLabelsMap, geneSelection = [], geneFilter = null, setGeneSelection, enableMultiSelect, showFeatureTable, featureListSort, featureListSortKey, hasFeatureLabels, primaryColumnName } = props;
277919
278198
  const { classes: classes2 } = useStyles$l();
277920
278199
  const [searchTerm, setSearchTerm] = useState("");
277921
- const [searchResults, setSearchResults] = useState(geneList);
277922
278200
  const selectableTableSortKey = featureListSortKey === "featureIndex" ? "key" : "name";
277923
- useEffect(() => {
277924
- const results = geneList.filter((gene) => gene.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(gene)?.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(cleanFeatureId(gene))?.toLowerCase().includes(searchTerm.toLowerCase()));
277925
- setSearchResults(results);
277926
- }, [searchTerm, geneList, featureLabelsMap]);
278201
+ const searchResults = useMemo$1(() => geneList.filter((gene) => gene.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(gene)?.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(cleanFeatureId(gene))?.toLowerCase().includes(searchTerm.toLowerCase())), [geneList, searchTerm, featureLabelsMap]);
277927
278202
  function onChange(selection) {
277928
278203
  if (setGeneSelection && selection) {
277929
- if (Array.isArray(selection)) {
277930
- if (selection.length > 0 && every$1(selection, (s2) => s2.key)) {
277931
- setGeneSelection(selection.map((s2) => s2.key));
277932
- } else {
277933
- setGeneSelection(null);
277934
- }
277935
- } else if (selection.key) {
277936
- setGeneSelection([selection.key]);
278204
+ const selectedHiddenKeys = (geneSelection || []).filter((key2) => !searchResults.includes(key2));
278205
+ const selectionArray = Array.isArray(selection) ? selection : [selection];
278206
+ const selectedVisibleKeys = selectionArray.map((s2) => s2.key).filter((key2) => searchResults.includes(key2));
278207
+ const newSelection = [...selectedHiddenKeys, ...selectedVisibleKeys].filter(Boolean);
278208
+ if (newSelection.length > 0) {
278209
+ setGeneSelection(newSelection);
278210
+ } else {
278211
+ setGeneSelection(null);
277937
278212
  }
277938
278213
  }
277939
278214
  }
@@ -278451,7 +278726,7 @@ function LayerOptions({ colormap, opacity: opacity2, handleColormapChange, handl
278451
278726
  const domainSelectorId = $bdb11010cef70236$export$f680877a34711e37();
278452
278727
  const opacitySliderId = $bdb11010cef70236$export$f680877a34711e37();
278453
278728
  const zeroTransparentId = $bdb11010cef70236$export$f680877a34711e37();
278454
- return jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", sx: { width: "100%" }, children: [hasZStack && !disable3d && hasViewableResolutions && jsxRuntimeExports.jsx(VolumeDropdown, { loader: loader2, handleSliderChange, handleDomainChange, channels: channels2, handleMultiPropertyChange, resolution, disable3d, setRasterLayerCallback, setAreAllChannelsLoading, setViewState, spatialHeight, spatialWidth, use3d, modelMatrix: modelMatrix2 }), hasDimensionsAndChannels && !use3d && globalControlLabels.map((field2) => shape2[labels2.indexOf(field2)] > 1 && jsxRuntimeExports.jsx(LayerOption, { name: field2, inputId: `${field2}-${globalSelectionSliderId}`, children: jsxRuntimeExports.jsx(GlobalSelectionSlider, { field: field2, inputId: `${field2}-${globalSelectionSliderId}`, value: globalLabelValues[field2], handleChange: handleGlobalChannelsSelectionChange, possibleValues: range$c(shape2[labels2.indexOf(field2)]) }) }, field2)), !disableChannelsIfRgbDetected ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [shouldShowColormap && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Colormap", inputId: colormapSelectId, children: jsxRuntimeExports.jsx(ColormapSelect, { value: colormap || "", inputId: colormapSelectId, handleChange: handleColormapChange }) }) }), shouldShowDomain && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Domain", inputId: domainSelectorId, children: jsxRuntimeExports.jsx(SliderDomainSelector, { value: domainType || DEFAULT_RASTER_DOMAIN_TYPE, inputId: domainSelectorId, handleChange: (value2) => {
278729
+ return jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", sx: { width: "100%" }, children: [hasZStack && !disable3d && hasViewableResolutions && jsxRuntimeExports.jsx(VolumeDropdown, { loader: loader2, handleSliderChange, handleDomainChange, channels: channels2, handleMultiPropertyChange, resolution, disable3d, setRasterLayerCallback, setAreAllChannelsLoading, setViewState, spatialHeight, spatialWidth, use3d, modelMatrix: modelMatrix2 }), hasDimensionsAndChannels && !use3d && globalControlLabels.map((field2) => shape2[labels2.indexOf(field2)] > 1 && jsxRuntimeExports.jsx(LayerOption, { name: field2, inputId: `${field2}-${globalSelectionSliderId}`, children: jsxRuntimeExports.jsx(GlobalSelectionSlider, { field: field2, inputId: `${field2}-${globalSelectionSliderId}`, value: globalLabelValues[field2], handleChange: handleGlobalChannelsSelectionChange, possibleValues: range$b(shape2[labels2.indexOf(field2)]) }) }, field2)), !disableChannelsIfRgbDetected ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [shouldShowColormap && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Colormap", inputId: colormapSelectId, children: jsxRuntimeExports.jsx(ColormapSelect, { value: colormap || "", inputId: colormapSelectId, handleChange: handleColormapChange }) }) }), shouldShowDomain && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Domain", inputId: domainSelectorId, children: jsxRuntimeExports.jsx(SliderDomainSelector, { value: domainType || DEFAULT_RASTER_DOMAIN_TYPE, inputId: domainSelectorId, handleChange: (value2) => {
278455
278730
  handleDomainChange(value2);
278456
278731
  } }) }) })] }) : null, !use3d && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Opacity", inputId: opacitySliderId, children: jsxRuntimeExports.jsx(OpacitySlider, { value: opacity2, handleChange: handleOpacityChange, inputId: opacitySliderId }) }) }), shouldShowTransparentColor && !use3d && jsxRuntimeExports.jsx(Grid$1, { children: jsxRuntimeExports.jsx(LayerOption, { name: "Zero Transparent", inputId: zeroTransparentId, children: jsxRuntimeExports.jsx(TransparentColorCheckbox, { value: transparentColor, handleChange: handleTransparentColorChange, inputId: zeroTransparentId }) }) })] });
278457
278732
  }
@@ -281050,7 +281325,7 @@ async function open(location, options = {}) {
281050
281325
  }
281051
281326
  open.v2 = open_v2;
281052
281327
  open.v3 = open_v3;
281053
- function* range$6(start2, stop3, step = 1) {
281328
+ function* range$5(start2, stop3, step = 1) {
281054
281329
  if (stop3 === void 0) {
281055
281330
  stop3 = start2;
281056
281331
  start2 = 0;
@@ -281205,7 +281480,7 @@ class SliceDimIndexer2 {
281205
281480
  *[Symbol.iterator]() {
281206
281481
  const dim_chunk_ix_from = Math.floor(this.start / this.dim_chunk_len);
281207
281482
  const dim_chunk_ix_to = Math.ceil(this.stop / this.dim_chunk_len);
281208
- for (const dim_chunk_ix of range$6(dim_chunk_ix_from, dim_chunk_ix_to)) {
281483
+ for (const dim_chunk_ix of range$5(dim_chunk_ix_from, dim_chunk_ix_to)) {
281209
281484
  const dim_offset = dim_chunk_ix * this.dim_chunk_len;
281210
281485
  const dim_limit = Math.min(this.dim_len, (dim_chunk_ix + 1) * this.dim_chunk_len);
281211
281486
  const dim_chunk_len = dim_limit - dim_offset;
@@ -281663,7 +281938,7 @@ function HiglassGlobalStyles(props) {
281663
281938
  }
281664
281939
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
281665
281940
  const LazyHiGlassComponent = React__default.lazy(async () => {
281666
- const { HiGlassComponent } = await import("./higlass-C5JPMXw_.js");
281941
+ const { HiGlassComponent } = await import("./higlass-BSYe98wz.js");
281667
281942
  return { default: HiGlassComponent };
281668
281943
  });
281669
281944
  const HG_SIZE = 800;
@@ -284610,7 +284885,7 @@ function NeuroglancerGlobalStyles(props) {
284610
284885
  const { classes: classes2 } = props;
284611
284886
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
284612
284887
  }
284613
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-BfY6eP2z.js"));
284888
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-DSXzAFHD.js"));
284614
284889
  function createWorker() {
284615
284890
  return new WorkerFactory();
284616
284891
  }
@@ -314879,68 +315154,6 @@ function toSet$1(_) {
314879
315154
  for (let i2 = 0; i2 < n3; ++i2) s2[_[i2]] = true;
314880
315155
  return s2;
314881
315156
  }
314882
- function ascending$4(a2, b2) {
314883
- return a2 == null || b2 == null ? NaN : a2 < b2 ? -1 : a2 > b2 ? 1 : a2 >= b2 ? 0 : NaN;
314884
- }
314885
- function descending$1(a2, b2) {
314886
- return a2 == null || b2 == null ? NaN : b2 < a2 ? -1 : b2 > a2 ? 1 : b2 >= a2 ? 0 : NaN;
314887
- }
314888
- function bisector$1(f2) {
314889
- let compare12, compare2, delta;
314890
- if (f2.length !== 2) {
314891
- compare12 = ascending$4;
314892
- compare2 = (d, x2) => ascending$4(f2(d), x2);
314893
- delta = (d, x2) => f2(d) - x2;
314894
- } else {
314895
- compare12 = f2 === ascending$4 || f2 === descending$1 ? f2 : zero$3;
314896
- compare2 = f2;
314897
- delta = f2;
314898
- }
314899
- function left2(a2, x2, lo = 0, hi = a2.length) {
314900
- if (lo < hi) {
314901
- if (compare12(x2, x2) !== 0) return hi;
314902
- do {
314903
- const mid = lo + hi >>> 1;
314904
- if (compare2(a2[mid], x2) < 0) lo = mid + 1;
314905
- else hi = mid;
314906
- } while (lo < hi);
314907
- }
314908
- return lo;
314909
- }
314910
- function right2(a2, x2, lo = 0, hi = a2.length) {
314911
- if (lo < hi) {
314912
- if (compare12(x2, x2) !== 0) return hi;
314913
- do {
314914
- const mid = lo + hi >>> 1;
314915
- if (compare2(a2[mid], x2) <= 0) lo = mid + 1;
314916
- else hi = mid;
314917
- } while (lo < hi);
314918
- }
314919
- return lo;
314920
- }
314921
- function center2(a2, x2, lo = 0, hi = a2.length) {
314922
- const i2 = left2(a2, x2, lo, hi - 1);
314923
- return i2 > lo && delta(a2[i2 - 1], x2) > -delta(a2[i2], x2) ? i2 - 1 : i2;
314924
- }
314925
- return { left: left2, center: center2, right: right2 };
314926
- }
314927
- function zero$3() {
314928
- return 0;
314929
- }
314930
- function number$4(x2) {
314931
- return x2 === null ? NaN : +x2;
314932
- }
314933
- const ascendingBisect = bisector$1(ascending$4);
314934
- const bisectRight$1 = ascendingBisect.right;
314935
- bisector$1(number$4).center;
314936
- function range$5(start2, stop3, step) {
314937
- start2 = +start2, stop3 = +stop3, step = (n3 = arguments.length) < 2 ? (stop3 = start2, start2 = 0, 1) : n3 < 3 ? 1 : +step;
314938
- var i2 = -1, n3 = Math.max(0, Math.ceil((stop3 - start2) / step)) | 0, range2 = new Array(n3);
314939
- while (++i2 < n3) {
314940
- range2[i2] = start2 + i2 * step;
314941
- }
314942
- return range2;
314943
- }
314944
315157
  function colors$2(specifier) {
314945
315158
  var n3 = specifier.length / 6 | 0, colors2 = new Array(n3), i2 = 0;
314946
315159
  while (i2 < n3) colors2[i2] = "#" + specifier.slice(i2 * 6, ++i2 * 6);
@@ -315130,7 +315343,7 @@ function band$1() {
315130
315343
  start2 = Math.round(start2);
315131
315344
  bandwidth2 = Math.round(bandwidth2);
315132
315345
  }
315133
- const values3 = range$5(n3).map((i2) => start2 + step * i2);
315346
+ const values3 = range$6(n3).map((i2) => start2 + step * i2);
315134
315347
  return ordinalRange(reverse2 ? values3.reverse() : values3);
315135
315348
  }
315136
315349
  scale2.domain = function(_) {
@@ -316894,7 +317107,7 @@ const useStyles$3 = makeStyles()(() => ({
316894
317107
  }
316895
317108
  }));
316896
317109
  function summarize(iterable, keepZeros) {
316897
- const values3 = iterable.filter((d) => keepZeros).sort(ascending$9);
317110
+ const values3 = iterable.filter((d) => keepZeros).sort(ascending$8);
316898
317111
  const minVal = values3[0];
316899
317112
  const maxVal = values3[values3.length - 1];
316900
317113
  const q1 = quantileSorted$1(values3, 0.25);
@@ -318505,7 +318718,7 @@ const Milli = [YEAR, MONTH, DATE, HOURS, MINUTES, SECONDS, MILLISECONDS], Second
318505
318718
  const intervals = [[Seconds, 1, durationSecond], [Seconds, 5, 5 * durationSecond], [Seconds, 15, 15 * durationSecond], [Seconds, 30, 30 * durationSecond], [Minutes, 1, durationMinute], [Minutes, 5, 5 * durationMinute], [Minutes, 15, 15 * durationMinute], [Minutes, 30, 30 * durationMinute], [Hours, 1, durationHour], [Hours, 3, 3 * durationHour], [Hours, 6, 6 * durationHour], [Hours, 12, 12 * durationHour], [Day, 1, durationDay], [Week, 1, durationWeek], [Month, 1, durationMonth], [Month, 3, 3 * durationMonth], [Year, 1, durationYear]];
318506
318719
  function bin$1(opt) {
318507
318720
  const ext = opt.extent, max2 = opt.maxbins || 40, target2 = Math.abs(span(ext)) / max2;
318508
- let i2 = bisector$2((i3) => i3[2]).right(intervals, target2), units, step;
318721
+ let i2 = bisector$1((i3) => i3[2]).right(intervals, target2), units, step;
318509
318722
  if (i2 === intervals.length) {
318510
318723
  units = Year, step = tickStep(ext[0] / durationYear, ext[1] / durationYear, max2);
318511
318724
  } else if (i2) {
@@ -320443,7 +320656,7 @@ function* numbers$1(values3, valueof) {
320443
320656
  }
320444
320657
  function quantiles(array2, p, f2) {
320445
320658
  const values3 = Float64Array.from(numbers$1(array2, f2));
320446
- values3.sort(ascending$5);
320659
+ values3.sort(ascending$4);
320447
320660
  return p.map((_) => quantileSorted(values3, _));
320448
320661
  }
320449
320662
  function quartiles(array2, f2) {
@@ -320502,7 +320715,7 @@ function bootstrapCI(array2, samples, alpha2, f2) {
320502
320715
  }
320503
320716
  mu[j] = a2 / n3;
320504
320717
  }
320505
- mu.sort(ascending$5);
320718
+ mu.sort(ascending$4);
320506
320719
  return [quantile$1(mu, alpha2 / 2), quantile$1(mu, 1 - alpha2 / 2)];
320507
320720
  }
320508
320721
  function dotbin(array2, step, smooth, f2) {
@@ -323475,7 +323688,7 @@ inherits(Quantile$1, Transform2, {
323475
323688
  out.source = this.value;
323476
323689
  return out;
323477
323690
  }
323478
- const source2 = pulse2.materialize(pulse2.SOURCE).source, groups = partition$1$1(source2, _.groupby, _.field), names = (_.groupby || []).map(accessorName), values3 = [], step = _.step || 0.01, p = _.probs || range$7(step / 2, 1 - EPSILON$2, step), n3 = p.length;
323691
+ const source2 = pulse2.materialize(pulse2.SOURCE).source, groups = partition$1$1(source2, _.groupby, _.field), names = (_.groupby || []).map(accessorName), values3 = [], step = _.step || 0.01, p = _.probs || range$6(step / 2, 1 - EPSILON$2, step), n3 = p.length;
323479
323692
  groups.forEach((g2) => {
323480
323693
  const q = quantiles(g2, p);
323481
323694
  for (let i2 = 0; i2 < n3; ++i2) {
@@ -323634,7 +323847,7 @@ inherits(Sequence, Transform2, {
323634
323847
  if (this.value && !_.modified()) return;
323635
323848
  const out = pulse2.materialize().fork(pulse2.MOD), as = _.as || "data";
323636
323849
  out.rem = this.value ? pulse2.rem.concat(this.value) : pulse2.rem;
323637
- this.value = range$7(_.start, _.stop, _.step || 1).map((v) => {
323850
+ this.value = range$6(_.start, _.stop, _.step || 1).map((v) => {
323638
323851
  const t4 = {};
323639
323852
  t4[as] = v;
323640
323853
  return ingest$1(t4);
@@ -324094,7 +324307,7 @@ inherits(Window, Transform2, {
324094
324307
  }
324095
324308
  });
324096
324309
  function processPartition(list2, state, cmp2, _) {
324097
- const sort2 = _.sort, range2 = sort2 && !_.ignorePeers, frame2 = _.frame || [null, 0], data2 = list2.data(cmp2), n3 = data2.length, b2 = range2 ? bisector$2(sort2) : null, w2 = {
324310
+ const sort2 = _.sort, range2 = sort2 && !_.ignorePeers, frame2 = _.frame || [null, 0], data2 = list2.data(cmp2), n3 = data2.length, b2 = range2 ? bisector$1(sort2) : null, w2 = {
324098
324311
  i0: 0,
324099
324312
  i1: 0,
324100
324313
  p0: 0,
@@ -324252,7 +324465,7 @@ function band() {
324252
324465
  start2 = Math.round(start2);
324253
324466
  bandwidth2 = Math.round(bandwidth2);
324254
324467
  }
324255
- const values3 = range$7(n3).map((i2) => start2 + step * i2);
324468
+ const values3 = range$6(n3).map((i2) => start2 + step * i2);
324256
324469
  return ordinalRange(reverse2 ? values3.reverse() : values3);
324257
324470
  }
324258
324471
  scale2.domain = function(_) {
@@ -324334,8 +324547,8 @@ function band() {
324334
324547
  hi = t4;
324335
324548
  }
324336
324549
  if (hi < values3[0] || lo > range$12[1 - reverse2]) return;
324337
- a2 = Math.max(0, bisectRight$2(values3, lo) - 1);
324338
- b2 = lo === hi ? a2 : bisectRight$2(values3, hi) - 1;
324550
+ a2 = Math.max(0, bisectRight$1(values3, lo) - 1);
324551
+ b2 = lo === hi ? a2 : bisectRight$1(values3, hi) - 1;
324339
324552
  if (lo - values3[a2] > bandwidth2 + 1e-10) ++a2;
324340
324553
  if (reverse2) {
324341
324554
  t4 = a2;
@@ -324373,7 +324586,7 @@ const slice$2 = Array.prototype.slice;
324373
324586
  function scaleBinOrdinal() {
324374
324587
  let domain2 = [], range2 = [];
324375
324588
  function scale2(x2) {
324376
- return x2 == null || x2 !== x2 ? void 0 : range2[(bisectRight$2(domain2, x2) - 1) % range2.length];
324589
+ return x2 == null || x2 !== x2 ? void 0 : range2[(bisectRight$1(domain2, x2) - 1) % range2.length];
324377
324590
  }
324378
324591
  scale2.domain = function(_) {
324379
324592
  if (arguments.length) {
@@ -330096,7 +330309,7 @@ Pie.Definition = {
330096
330309
  };
330097
330310
  inherits(Pie, Transform2, {
330098
330311
  transform(_, pulse2) {
330099
- var as = _.as || ["startAngle", "endAngle"], startAngle = as[0], endAngle = as[1], field2 = _.field || one$1, start2 = _.startAngle || 0, stop3 = _.endAngle != null ? _.endAngle : 2 * Math.PI, data2 = pulse2.source, values3 = data2.map(field2), n3 = values3.length, a2 = start2, k = (stop3 - start2) / sum$2(values3), index2 = range$7(n3), i2, t4, v;
330312
+ var as = _.as || ["startAngle", "endAngle"], startAngle = as[0], endAngle = as[1], field2 = _.field || one$1, start2 = _.startAngle || 0, stop3 = _.endAngle != null ? _.endAngle : 2 * Math.PI, data2 = pulse2.source, values3 = data2.map(field2), n3 = values3.length, a2 = start2, k = (stop3 - start2) / sum$2(values3), index2 = range$6(n3), i2, t4, v;
330100
330313
  if (_.sort) {
330101
330314
  index2.sort((a3, b2) => values3[a3] - values3[b2]);
330102
330315
  }
@@ -330214,7 +330427,7 @@ function configureBins(scale2, _, count2) {
330214
330427
  if (!step) error("Scale bins parameter missing step property.");
330215
330428
  if (start2 < lo) start2 = step * Math.ceil(lo / step);
330216
330429
  if (stop3 > hi) stop3 = step * Math.floor(hi / step);
330217
- bins2 = range$7(start2, stop3 + step / 2, step);
330430
+ bins2 = range$6(start2, stop3 + step / 2, step);
330218
330431
  }
330219
330432
  if (bins2) {
330220
330433
  scale2.bins = bins2;
@@ -331435,7 +331648,7 @@ function clipRectangle(x02, y02, x12, y12) {
331435
331648
  };
331436
331649
  }
331437
331650
  function graticuleX(y02, y12, dy) {
331438
- var y2 = range$7(y02, y12 - epsilon$3, dy).concat(y12);
331651
+ var y2 = range$6(y02, y12 - epsilon$3, dy).concat(y12);
331439
331652
  return function(x2) {
331440
331653
  return y2.map(function(y3) {
331441
331654
  return [x2, y3];
@@ -331443,7 +331656,7 @@ function graticuleX(y02, y12, dy) {
331443
331656
  };
331444
331657
  }
331445
331658
  function graticuleY(x02, x12, dx) {
331446
- var x2 = range$7(x02, x12 - epsilon$3, dx).concat(x12);
331659
+ var x2 = range$6(x02, x12 - epsilon$3, dx).concat(x12);
331447
331660
  return function(y2) {
331448
331661
  return x2.map(function(x3) {
331449
331662
  return [x3, y2];
@@ -331456,9 +331669,9 @@ function graticule() {
331456
331669
  return { type: "MultiLineString", coordinates: lines() };
331457
331670
  }
331458
331671
  function lines() {
331459
- return range$7(ceil(X02 / DX) * DX, X12, DX).map(X3).concat(range$7(ceil(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$7(ceil(x02 / dx) * dx, x12, dx).filter(function(x3) {
331672
+ return range$6(ceil(X02 / DX) * DX, X12, DX).map(X3).concat(range$6(ceil(Y02 / DY) * DY, Y12, DY).map(Y3)).concat(range$6(ceil(x02 / dx) * dx, x12, dx).filter(function(x3) {
331460
331673
  return abs$1(x3 % DX) > epsilon$3;
331461
- }).map(x2)).concat(range$7(ceil(y02 / dy) * dy, y12, dy).filter(function(y3) {
331674
+ }).map(x2)).concat(range$6(ceil(y02 / dy) * dy, y12, dy).filter(function(y3) {
331462
331675
  return abs$1(y3 % DY) > epsilon$3;
331463
331676
  }).map(y2));
331464
331677
  }
@@ -332733,7 +332946,7 @@ function within(p, q, r3) {
332733
332946
  function quantize$1(k, nice2, zero2) {
332734
332947
  return function(values3) {
332735
332948
  var ex = extent(values3), start2 = zero2 ? Math.min(ex[0], 0) : ex[0], stop3 = ex[1], span2 = stop3 - start2, step = nice2 ? tickStep(start2, stop3, k) : span2 / (k + 1);
332736
- return range$7(start2 + step, stop3, step);
332949
+ return range$6(start2 + step, stop3, step);
332737
332950
  };
332738
332951
  }
332739
332952
  function Isocontour(params2) {
@@ -338673,7 +338886,7 @@ function SortedIndex() {
338673
338886
  array2 = value2;
338674
338887
  n3 = size2;
338675
338888
  }
338676
- return [bisectLeft$1(array2, range2[0], 0, n3), bisectRight$2(array2, range2[1], 0, n3)];
338889
+ return [bisectLeft$1(array2, range2[0], 0, n3), bisectRight$1(array2, range2[1], 0, n3)];
338677
338890
  }
338678
338891
  return {
338679
338892
  insert: insert2,
@@ -341038,7 +341251,7 @@ const functionContext = {
341038
341251
  hsl: hsl$2,
341039
341252
  luminance,
341040
341253
  contrast,
341041
- sequence: range$7,
341254
+ sequence: range$6,
341042
341255
  format: format$1,
341043
341256
  utcFormat,
341044
341257
  utcParse,
@@ -368322,7 +368535,7 @@ function FeatureBarPlot(props) {
368322
368535
  const xTitle = `${capitalize$3(obsType)}`;
368323
368536
  const autoMarginBottom = marginBottom || 30 + Math.sqrt(maxCharactersForLabel / 2) * 30;
368324
368537
  const foregroundColor = theme === "dark" ? "lightgray" : "black";
368325
- data2.sort((a2, b2) => ascending$9(a2[FEATURE_KEY], b2[FEATURE_KEY]));
368538
+ data2.sort((a2, b2) => ascending$8(a2[FEATURE_KEY], b2[FEATURE_KEY]));
368326
368539
  const svg2 = select$1(domElement);
368327
368540
  svg2.selectAll("g").remove();
368328
368541
  svg2.attr("width", width2).attr("height", height2);
@@ -369953,7 +370166,7 @@ class ClustersJsonAsObsFeatureMatrixLoader extends JsonLoader {
369953
370166
  const normalize2 = (d) => Math.floor((d - min2) / (max2 - min2) * 255);
369954
370167
  return col.map(normalize2);
369955
370168
  });
369956
- const tNormalizedMatrix = range$c(shape2[0]).map((i2) => range$c(shape2[1]).map((j) => normalizedMatrix[j][i2]));
370169
+ const tNormalizedMatrix = range$b(shape2[0]).map((i2) => range$b(shape2[1]).map((j) => normalizedMatrix[j][i2]));
369957
370170
  const normalizedFlatMatrix = tNormalizedMatrix.flat();
369958
370171
  const obsFeatureMatrix = { data: Uint8Array.from(normalizedFlatMatrix) };
369959
370172
  this.cachedResult = { obsIndex, featureIndex, obsFeatureMatrix };
@@ -370004,12 +370217,12 @@ class MoleculesJsonAsObsLabelsLoader extends JsonLoader {
370004
370217
  if (this.cachedResult) {
370005
370218
  return this.cachedResult;
370006
370219
  }
370007
- const obsIndex = range$c(sum$8(Object.values(data2).map((v) => v.length))).map((i2) => String(i2));
370220
+ const obsIndex = range$b(sum$8(Object.values(data2).map((v) => v.length))).map((i2) => String(i2));
370008
370221
  let obsLabels = [];
370009
370222
  Object.entries(data2).forEach(([gene, locations]) => {
370010
370223
  obsLabels = [
370011
370224
  ...obsLabels,
370012
- ...range$c(locations.length).map(() => gene)
370225
+ ...range$b(locations.length).map(() => gene)
370013
370226
  ];
370014
370227
  });
370015
370228
  this.cachedResult = { obsIndex, obsLabels };
@@ -370032,7 +370245,7 @@ class MoleculesJsonAsObsLocationsLoader extends JsonLoader {
370032
370245
  return this.cachedResult;
370033
370246
  }
370034
370247
  const moleculesValues = Object.values(data2);
370035
- const obsIndex = range$c(sum$8(moleculesValues.map((v) => v.length))).map((i2) => String(i2));
370248
+ const obsIndex = range$b(sum$8(moleculesValues.map((v) => v.length))).map((i2) => String(i2));
370036
370249
  const obsLocationsX = new Float32Array(obsIndex.length);
370037
370250
  const obsLocationsY = new Float32Array(obsIndex.length);
370038
370251
  let startAt = 0;