@vitessce/all 3.3.6 → 3.3.7

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.
@@ -26,10 +26,10 @@ var __privateMethod = (obj, member, method2) => {
26
26
  __accessCheck(obj, member, "access private method");
27
27
  return method2;
28
28
  };
29
- var _bytes, _encoder, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn;
29
+ var _bytes, _encoder, _data, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _encoder_config, _decoder_config, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn, _overrides2;
30
30
  import * as React from "react";
31
31
  import React__default, { Children, isValidElement, cloneElement, useMemo, forwardRef, useRef, useImperativeHandle, useEffect, useLayoutEffect as useLayoutEffect$1, useState, PureComponent, Component as Component$1, useCallback, createElement, useContext, useReducer, Suspense } from "react";
32
- import { useLoaders, useCoordination, useDescription, useImageData, useReady, TitleInfo, useVitessceContainer, useSetWarning, useObsSetsData, useUrls, usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useComponentHover, useComponentViewInfo, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, useDeckCanvasSize, useMultiObsLabels, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useGetObsInfo, useUint8FeatureSelection, useExpressionValueGetter, useAuxiliaryCoordination, useHasLoader, useObsLocationsData, useObsLabelsData, useObsSegmentationsData, useNeighborhoodsData, useMergeCoordination, useCoordinationScopes, useCoordinationScopesBy, useMultiCoordinationScopesSecondaryNonNull, useMultiCoordinationScopesNonNull, useComplexCoordination, useComplexCoordinationSecondary, useMultiObsPoints, usePointMultiObsLabels, useMultiObsSpots, useSpotMultiObsSets, useSpotMultiFeatureSelection, useSpotMultiObsFeatureMatrixIndices, useSegmentationMultiObsLocations, useMultiObsSegmentations, useSegmentationMultiObsSets, useSegmentationMultiFeatureSelection, useSegmentationMultiObsFeatureMatrixIndices, useMultiImages, useObsFeatureMatrixData, useUint8ObsFeatureMatrix, useGetObsMembership, PopperMenu, useComponentLayout, useClosestVitessceContainerSize, useWindowDimensions, useRemoveImageChannelInMetaCoordinationScopes, useAddImageChannelInMetaCoordinationScopes, useWarning, useGridItemSize, useGenomicProfilesData, DataSourceFetchError, AbstractLoaderError, AbstractTwoStepLoader, LoaderResult, LoaderValidationError, logConfig, VitS } from "@vitessce/vit-s";
32
+ import { useLoaders, useCoordination, useDescription, useImageData, useReady, TitleInfo, useVitessceContainer, useSetWarning, useObsSetsData, useUrls, usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useComponentHover, useComponentViewInfo, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, useDeckCanvasSize, useMultiObsLabels, useObsEmbeddingData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useGetObsInfo, useUint8FeatureSelection, useExpressionValueGetter, useAuxiliaryCoordination, useHasLoader, useObsLocationsData, useObsLabelsData, useObsSegmentationsData, useNeighborhoodsData, useMergeCoordination, useCoordinationScopes, useCoordinationScopesBy, useMultiCoordinationScopesSecondaryNonNull, useMultiCoordinationScopesNonNull, useComplexCoordination, useComplexCoordinationSecondary, useMultiObsPoints, usePointMultiObsLabels, useMultiObsSpots, useSpotMultiObsSets, useSpotMultiFeatureLabels, useSpotMultiFeatureSelection, useSpotMultiObsFeatureMatrixIndices, useSegmentationMultiObsLocations, useMultiObsSegmentations, useSegmentationMultiObsSets, useSegmentationMultiFeatureSelection, useSegmentationMultiObsFeatureMatrixIndices, useMultiImages, useObsFeatureMatrixData, useUint8ObsFeatureMatrix, useGetObsMembership, PopperMenu, useComponentLayout, useClosestVitessceContainerSize, useWindowDimensions, useRemoveImageChannelInMetaCoordinationScopes, useAddImageChannelInMetaCoordinationScopes, useWarning, useGridItemSize, useGenomicProfilesData, useSampleSetsData, useSampleEdgesData, DataSourceFetchError, AbstractLoaderError, AbstractTwoStepLoader, LoaderResult, LoaderValidationError, logConfig, VitS } from "@vitessce/vit-s";
33
33
  import * as ReactDOM from "react-dom";
34
34
  import ReactDOM__default from "react-dom";
35
35
  function _mergeNamespaces(n3, m2) {
@@ -9849,11 +9849,14 @@ const DataType$2 = {
9849
9849
  GENOMIC_PROFILES: "genomic-profiles",
9850
9850
  OBS_SPOTS: "obsSpots",
9851
9851
  OBS_POINTS: "obsPoints",
9852
- OBS_LOCATIONS: "obsLocations"
9852
+ OBS_LOCATIONS: "obsLocations",
9853
+ SAMPLE_SETS: "sampleSets",
9854
+ SAMPLE_EDGES: "sampleEdges"
9853
9855
  };
9854
9856
  const FileType$1 = {
9855
9857
  // Joint file types
9856
9858
  ANNDATA_ZARR: "anndata.zarr",
9859
+ ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
9857
9860
  SPATIALDATA_ZARR: "spatialdata.zarr",
9858
9861
  // Atomic file types
9859
9862
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -9866,6 +9869,7 @@ const FileType$1 = {
9866
9869
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
9867
9870
  OBS_SETS_CSV: "obsSets.csv",
9868
9871
  OBS_SETS_JSON: "obsSets.json",
9872
+ SAMPLE_SETS_CSV: "sampleSets.csv",
9869
9873
  // OME-Zarr
9870
9874
  IMAGE_OME_ZARR: "image.ome-zarr",
9871
9875
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
@@ -9880,6 +9884,19 @@ const FileType$1 = {
9880
9884
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
9881
9885
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
9882
9886
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
9887
+ SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
9888
+ // AnnData - zipped
9889
+ OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
9890
+ OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
9891
+ OBS_SETS_ANNDATA_ZARR_ZIP: "obsSets.anndata.zarr.zip",
9892
+ OBS_EMBEDDING_ANNDATA_ZARR_ZIP: "obsEmbedding.anndata.zarr.zip",
9893
+ OBS_SPOTS_ANNDATA_ZARR_ZIP: "obsSpots.anndata.zarr.zip",
9894
+ OBS_POINTS_ANNDATA_ZARR_ZIP: "obsPoints.anndata.zarr.zip",
9895
+ OBS_LOCATIONS_ANNDATA_ZARR_ZIP: "obsLocations.anndata.zarr.zip",
9896
+ OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP: "obsSegmentations.anndata.zarr.zip",
9897
+ OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
9898
+ FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
9899
+ SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
9883
9900
  // SpatialData
9884
9901
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
9885
9902
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -9887,6 +9904,7 @@ const FileType$1 = {
9887
9904
  OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
9888
9905
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
9889
9906
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
9907
+ FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
9890
9908
  // TODO:
9891
9909
  // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
9892
9910
  // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
@@ -10043,13 +10061,51 @@ const CoordinationType$1 = {
10043
10061
  LEGEND_VISIBLE: "legendVisible",
10044
10062
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
10045
10063
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
10046
- SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize"
10064
+ SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
10065
+ // Multi-sample / comparative
10066
+ SAMPLE_TYPE: "sampleType",
10067
+ SAMPLE_SET_SELECTION: "sampleSetSelection"
10047
10068
  };
10048
10069
  const STATUS$1 = {
10049
10070
  LOADING: "loading",
10050
10071
  SUCCESS: "success",
10051
10072
  ERROR: "error"
10052
10073
  };
10074
+ const ALT_ZARR_STORE_TYPES = {
10075
+ [FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR]: {
10076
+ zip: FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP
10077
+ },
10078
+ [FileType$1.OBS_FEATURE_COLUMNS_ANNDATA_ZARR]: {
10079
+ zip: FileType$1.OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP
10080
+ },
10081
+ [FileType$1.OBS_SETS_ANNDATA_ZARR]: {
10082
+ zip: FileType$1.OBS_SETS_ANNDATA_ZARR_ZIP
10083
+ },
10084
+ [FileType$1.OBS_EMBEDDING_ANNDATA_ZARR]: {
10085
+ zip: FileType$1.OBS_EMBEDDING_ANNDATA_ZARR_ZIP
10086
+ },
10087
+ [FileType$1.OBS_SPOTS_ANNDATA_ZARR]: {
10088
+ zip: FileType$1.OBS_SPOTS_ANNDATA_ZARR_ZIP
10089
+ },
10090
+ [FileType$1.OBS_POINTS_ANNDATA_ZARR]: {
10091
+ zip: FileType$1.OBS_POINTS_ANNDATA_ZARR_ZIP
10092
+ },
10093
+ [FileType$1.OBS_LOCATIONS_ANNDATA_ZARR]: {
10094
+ zip: FileType$1.OBS_LOCATIONS_ANNDATA_ZARR_ZIP
10095
+ },
10096
+ [FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR]: {
10097
+ zip: FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP
10098
+ },
10099
+ [FileType$1.OBS_LABELS_ANNDATA_ZARR]: {
10100
+ zip: FileType$1.OBS_LABELS_ANNDATA_ZARR_ZIP
10101
+ },
10102
+ [FileType$1.FEATURE_LABELS_ANNDATA_ZARR]: {
10103
+ zip: FileType$1.FEATURE_LABELS_ANNDATA_ZARR_ZIP
10104
+ },
10105
+ [FileType$1.SAMPLE_EDGES_ANNDATA_ZARR]: {
10106
+ zip: FileType$1.SAMPLE_EDGES_ANNDATA_ZARR_ZIP
10107
+ }
10108
+ };
10053
10109
  const COMPONENT_COORDINATION_TYPES = {
10054
10110
  [ViewType$1.SCATTERPLOT]: [
10055
10111
  CoordinationType$1.DATASET,
@@ -10296,7 +10352,9 @@ const COMPONENT_COORDINATION_TYPES = {
10296
10352
  CoordinationType$1.OBS_SET_SELECTION,
10297
10353
  CoordinationType$1.OBS_SET_HIGHLIGHT,
10298
10354
  CoordinationType$1.OBS_SET_COLOR,
10299
- CoordinationType$1.ADDITIONAL_OBS_SETS
10355
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
10356
+ CoordinationType$1.SAMPLE_TYPE,
10357
+ CoordinationType$1.SAMPLE_SET_SELECTION
10300
10358
  ],
10301
10359
  [ViewType$1.FEATURE_VALUE_HISTOGRAM]: [
10302
10360
  CoordinationType$1.DATASET,
@@ -10708,6 +10766,7 @@ const annDataConvenienceObsEmbeddingItem = z.object({
10708
10766
  });
10709
10767
  const annDataObsLabels = annDataObs;
10710
10768
  const annDataFeatureLabels = annDataObs;
10769
+ const annDataSampleEdges = annDataObs;
10711
10770
  const annDataObsFeatureMatrix = z.object({
10712
10771
  path: z.string(),
10713
10772
  featureFilterPath: z.string().optional().describe("If the feature index should be filtered, put a boolean column here (analogous to the previous geneFilter option). e.g., var/in_obsm_X_small_matrix"),
@@ -10789,6 +10848,7 @@ const obsFeatureMatrixAnndataSchema = annDataObsFeatureMatrix;
10789
10848
  const obsLabelsAnndataSchema = annDataObsLabels;
10790
10849
  const featureLabelsAnndataSchema = annDataFeatureLabels;
10791
10850
  const obsFeatureColumnsAnndataSchema = annDataObsFeatureColumns;
10851
+ const sampleEdgesAnndataSchema = annDataSampleEdges;
10792
10852
  const obsEmbeddingCsvSchema = z.object({
10793
10853
  obsIndex: z.string(),
10794
10854
  obsEmbedding: z.array(z.string()).length(2)
@@ -10827,6 +10887,17 @@ const obsSetsCsvSchema = z.object({
10827
10887
  scoreColumn: z.string().optional()
10828
10888
  }))
10829
10889
  });
10890
+ const sampleSetsCsvSchema = z.object({
10891
+ sampleIndex: z.string(),
10892
+ sampleSets: z.array(z.object({
10893
+ name: z.string(),
10894
+ column: z.union([
10895
+ z.string(),
10896
+ z.array(z.string())
10897
+ ]),
10898
+ scoreColumn: z.string().optional()
10899
+ }))
10900
+ });
10830
10901
  const anndataZarrSchema = z.object({
10831
10902
  obsLabels: z.union([
10832
10903
  annDataObsLabels,
@@ -16594,7 +16665,7 @@ function useIsFocusVisible() {
16594
16665
  function _toArray(arr) {
16595
16666
  return _arrayWithHoles$7(arr) || _iterableToArray$j(arr) || _unsupportedIterableToArray$m(arr) || _nonIterableRest$7();
16596
16667
  }
16597
- const config$3 = {
16668
+ const config$4 = {
16598
16669
  disabled: false
16599
16670
  };
16600
16671
  var timeoutsShape = _pt.oneOfType([_pt.number, _pt.shape({
@@ -16728,7 +16799,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
16728
16799
  var _ref22 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref22[0], maybeAppearing = _ref22[1];
16729
16800
  var timeouts = this.getTimeouts();
16730
16801
  var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
16731
- if (!mounting && !enter || config$3.disabled) {
16802
+ if (!mounting && !enter || config$4.disabled) {
16732
16803
  this.safeSetState({
16733
16804
  status: ENTERED
16734
16805
  }, function() {
@@ -16755,7 +16826,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
16755
16826
  var exit = this.props.exit;
16756
16827
  var timeouts = this.getTimeouts();
16757
16828
  var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this);
16758
- if (!exit || config$3.disabled) {
16829
+ if (!exit || config$4.disabled) {
16759
16830
  this.safeSetState({
16760
16831
  status: EXITED
16761
16832
  }, function() {
@@ -54740,7 +54811,7 @@ const isPureObject = (x2) => isObject$4(x2) && x2.constructor === {}.constructor
54740
54811
  const isIterable$1 = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
54741
54812
  const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
54742
54813
  const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
54743
- const isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
54814
+ const isBlob$1 = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
54744
54815
  const isBuffer$2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
54745
54816
  const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$4(x2) && isFunction$4(x2.tee) && isFunction$4(x2.cancel) && isFunction$4(x2.getReader);
54746
54817
  const isReadableNodeStream = (x2) => isObject$4(x2) && isFunction$4(x2.read) && isFunction$4(x2.pipe) && isBoolean$4(x2.readable);
@@ -54771,7 +54842,7 @@ function getResourceUrlAndType(resource) {
54771
54842
  type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)
54772
54843
  };
54773
54844
  }
54774
- if (isBlob(resource)) {
54845
+ if (isBlob$1(resource)) {
54775
54846
  return {
54776
54847
  url: stripQueryString(resource.name || ""),
54777
54848
  type: resource.type || ""
@@ -54792,7 +54863,7 @@ function getResourceContentLength(resource) {
54792
54863
  if (isResponse(resource)) {
54793
54864
  return resource.headers["content-length"] || -1;
54794
54865
  }
54795
- if (isBlob(resource)) {
54866
+ if (isBlob$1(resource)) {
54796
54867
  return resource.size;
54797
54868
  }
54798
54869
  if (typeof resource === "string") {
@@ -55695,7 +55766,7 @@ async function selectLoader(data2, loaders = [], options, context2) {
55695
55766
  if (loader2) {
55696
55767
  return loader2;
55697
55768
  }
55698
- if (isBlob(data2)) {
55769
+ if (isBlob$1(data2)) {
55699
55770
  data2 = await data2.slice(0, 10).arrayBuffer();
55700
55771
  loader2 = selectLoaderSync(data2, loaders, options, context2);
55701
55772
  }
@@ -55949,7 +56020,7 @@ function makeIterator(data2, options) {
55949
56020
  if (data2 instanceof ArrayBuffer) {
55950
56021
  return makeArrayBufferIterator(data2, options);
55951
56022
  }
55952
- if (isBlob(data2)) {
56023
+ if (isBlob$1(data2)) {
55953
56024
  return makeBlobIterator(data2, options);
55954
56025
  }
55955
56026
  if (isReadableStream(data2)) {
@@ -55996,7 +56067,7 @@ async function getArrayBufferOrStringFromData(data2, loader2, options) {
55996
56067
  if (typeof data2 === "string" || isArrayBuffer) {
55997
56068
  return getArrayBufferOrStringFromDataSync(data2, loader2);
55998
56069
  }
55999
- if (isBlob(data2)) {
56070
+ if (isBlob$1(data2)) {
56000
56071
  data2 = await makeResponse(data2);
56001
56072
  }
56002
56073
  if (isResponse(data2)) {
@@ -56115,7 +56186,7 @@ async function load$2(url, loaders, options, context2) {
56115
56186
  if (typeof url === "string") {
56116
56187
  data2 = await fetch2(url);
56117
56188
  }
56118
- if (isBlob(url)) {
56189
+ if (isBlob$1(url)) {
56119
56190
  data2 = await fetch2(url);
56120
56191
  }
56121
56192
  return await parse$b(data2, loaders, options);
@@ -64340,7 +64411,7 @@ function assert$7(condition, message) {
64340
64411
  }
64341
64412
  const RADIANS_TO_DEGREES$2 = 1 / Math.PI * 180;
64342
64413
  const DEGREES_TO_RADIANS$7 = 1 / 180 * Math.PI;
64343
- const config$2 = {
64414
+ const config$3 = {
64344
64415
  EPSILON: 1e-12,
64345
64416
  debug: false,
64346
64417
  precision: 4,
@@ -64350,13 +64421,13 @@ const config$2 = {
64350
64421
  };
64351
64422
  function configure(options) {
64352
64423
  for (const key2 in options) {
64353
- assert$7(key2 in config$2);
64354
- config$2[key2] = options[key2];
64424
+ assert$7(key2 in config$3);
64425
+ config$3[key2] = options[key2];
64355
64426
  }
64356
- return config$2;
64427
+ return config$3;
64357
64428
  }
64358
64429
  function formatValue$4(value2, {
64359
- precision = config$2.precision
64430
+ precision = config$3.precision
64360
64431
  } = {}) {
64361
64432
  value2 = round$3(value2);
64362
64433
  return "".concat(parseFloat(value2.toPrecision(precision)));
@@ -64407,9 +64478,9 @@ function lerp$7(a2, b2, t4) {
64407
64478
  return t4 * b2 + (1 - t4) * a2;
64408
64479
  }
64409
64480
  function equals$3(a2, b2, epsilon3) {
64410
- const oldEpsilon = config$2.EPSILON;
64481
+ const oldEpsilon = config$3.EPSILON;
64411
64482
  if (epsilon3) {
64412
- config$2.EPSILON = epsilon3;
64483
+ config$3.EPSILON = epsilon3;
64413
64484
  }
64414
64485
  try {
64415
64486
  if (a2 === b2) {
@@ -64433,11 +64504,11 @@ function equals$3(a2, b2, epsilon3) {
64433
64504
  return b2.equals(a2);
64434
64505
  }
64435
64506
  if (typeof a2 === "number" && typeof b2 === "number") {
64436
- return Math.abs(a2 - b2) <= config$2.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
64507
+ return Math.abs(a2 - b2) <= config$3.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
64437
64508
  }
64438
64509
  return false;
64439
64510
  } finally {
64440
- config$2.EPSILON = oldEpsilon;
64511
+ config$3.EPSILON = oldEpsilon;
64441
64512
  }
64442
64513
  }
64443
64514
  function exactEquals(a2, b2) {
@@ -64466,18 +64537,18 @@ function exactEquals(a2, b2) {
64466
64537
  return false;
64467
64538
  }
64468
64539
  function withEpsilon(epsilon3, func) {
64469
- const oldPrecision = config$2.EPSILON;
64470
- config$2.EPSILON = epsilon3;
64540
+ const oldPrecision = config$3.EPSILON;
64541
+ config$3.EPSILON = epsilon3;
64471
64542
  let value2;
64472
64543
  try {
64473
64544
  value2 = func();
64474
64545
  } finally {
64475
- config$2.EPSILON = oldPrecision;
64546
+ config$3.EPSILON = oldPrecision;
64476
64547
  }
64477
64548
  return value2;
64478
64549
  }
64479
64550
  function round$3(value2) {
64480
- return Math.round(value2 / config$2.EPSILON) * config$2.EPSILON;
64551
+ return Math.round(value2 / config$3.EPSILON) * config$3.EPSILON;
64481
64552
  }
64482
64553
  function duplicateArray(array2) {
64483
64554
  return array2.clone ? array2.clone() : new Array(array2.length);
@@ -64546,7 +64617,7 @@ class MathArray extends _extendableBuiltin(Array) {
64546
64617
  return new Float32Array(this);
64547
64618
  }
64548
64619
  toString() {
64549
- return this.formatString(config$2);
64620
+ return this.formatString(config$3);
64550
64621
  }
64551
64622
  formatString(opts2) {
64552
64623
  let string2 = "";
@@ -64646,7 +64717,7 @@ class MathArray extends _extendableBuiltin(Array) {
64646
64717
  return this.check();
64647
64718
  }
64648
64719
  check() {
64649
- if (config$2.debug && !this.validate()) {
64720
+ if (config$3.debug && !this.validate()) {
64650
64721
  throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
64651
64722
  }
64652
64723
  return this;
@@ -64713,7 +64784,7 @@ function checkNumber(value2) {
64713
64784
  return value2;
64714
64785
  }
64715
64786
  function checkVector(v, length2, callerName = "") {
64716
- if (config$2.debug && !validateVector(v, length2)) {
64787
+ if (config$3.debug && !validateVector(v, length2)) {
64717
64788
  throw new Error("math.gl: ".concat(callerName, " some fields set to invalid numbers'"));
64718
64789
  }
64719
64790
  return v;
@@ -64971,7 +65042,7 @@ class Vector2 extends Vector {
64971
65042
  if (isArray$3(x2) && arguments.length === 1) {
64972
65043
  this.copy(x2);
64973
65044
  } else {
64974
- if (config$2.debug) {
65045
+ if (config$3.debug) {
64975
65046
  checkNumber(x2);
64976
65047
  checkNumber(y2);
64977
65048
  }
@@ -64990,7 +65061,7 @@ class Vector2 extends Vector {
64990
65061
  return this.check();
64991
65062
  }
64992
65063
  fromObject(object2) {
64993
- if (config$2.debug) {
65064
+ if (config$3.debug) {
64994
65065
  checkNumber(object2.x);
64995
65066
  checkNumber(object2.y);
64996
65067
  }
@@ -65243,7 +65314,7 @@ class Vector3 extends Vector {
65243
65314
  if (arguments.length === 1 && isArray$3(x2)) {
65244
65315
  this.copy(x2);
65245
65316
  } else {
65246
- if (config$2.debug) {
65317
+ if (config$3.debug) {
65247
65318
  checkNumber(x2);
65248
65319
  checkNumber(y2);
65249
65320
  checkNumber(z2);
@@ -65266,7 +65337,7 @@ class Vector3 extends Vector {
65266
65337
  return this.check();
65267
65338
  }
65268
65339
  fromObject(object2) {
65269
- if (config$2.debug) {
65340
+ if (config$3.debug) {
65270
65341
  checkNumber(object2.x);
65271
65342
  checkNumber(object2.y);
65272
65343
  checkNumber(object2.z);
@@ -65357,7 +65428,7 @@ class Vector4 extends Vector {
65357
65428
  if (isArray$3(x2) && arguments.length === 1) {
65358
65429
  this.copy(x2);
65359
65430
  } else {
65360
- if (config$2.debug) {
65431
+ if (config$3.debug) {
65361
65432
  checkNumber(x2);
65362
65433
  checkNumber(y2);
65363
65434
  checkNumber(z2);
@@ -65384,7 +65455,7 @@ class Vector4 extends Vector {
65384
65455
  return this.check();
65385
65456
  }
65386
65457
  fromObject(object2) {
65387
- if (config$2.debug) {
65458
+ if (config$3.debug) {
65388
65459
  checkNumber(object2.x);
65389
65460
  checkNumber(object2.y);
65390
65461
  checkNumber(object2.z);
@@ -65442,7 +65513,7 @@ class Vector4 extends Vector {
65442
65513
  let Matrix$1 = class Matrix extends MathArray {
65443
65514
  toString() {
65444
65515
  let string2 = "[";
65445
- if (config$2.printRowMajor) {
65516
+ if (config$3.printRowMajor) {
65446
65517
  string2 += "row-major:";
65447
65518
  for (let row = 0; row < this.RANK; ++row) {
65448
65519
  for (let col = 0; col < this.RANK; ++col) {
@@ -67305,7 +67376,7 @@ class SphericalCoordinates {
67305
67376
  this.check();
67306
67377
  }
67307
67378
  toString() {
67308
- return this.formatString(config$2);
67379
+ return this.formatString(config$3);
67309
67380
  }
67310
67381
  formatString({
67311
67382
  printTypes = false
@@ -110880,7 +110951,7 @@ function fromCartographic(cartographic, result = [], map2 = identity$f) {
110880
110951
  return result;
110881
110952
  }
110882
110953
  function fromCartographicToRadians(cartographic, vector = []) {
110883
- return fromCartographic(cartographic, vector, config$2._cartographicRadians ? identity$f : toRadians);
110954
+ return fromCartographic(cartographic, vector, config$3._cartographicRadians ? identity$f : toRadians);
110884
110955
  }
110885
110956
  function toCartographic(vector, cartographic, map2 = identity$f) {
110886
110957
  if ("longitude" in cartographic) {
@@ -110899,7 +110970,7 @@ function toCartographic(vector, cartographic, map2 = identity$f) {
110899
110970
  return cartographic;
110900
110971
  }
110901
110972
  function toCartographicFromRadians(vector, cartographic) {
110902
- return toCartographic(vector, cartographic, config$2._cartographicRadians ? identity$f : toDegrees);
110973
+ return toCartographic(vector, cartographic, config$3._cartographicRadians ? identity$f : toDegrees);
110903
110974
  }
110904
110975
  const scratchVector$4 = new Vector3();
110905
110976
  const scaleToGeodeticSurfaceIntersection = new Vector3();
@@ -123454,14 +123525,14 @@ var jsts_min = { exports: {} };
123454
123525
  return 1e-15;
123455
123526
  }, Object.defineProperties(q, B2);
123456
123527
  var V = function() {
123457
- }, U = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
123458
- U.X.get = function() {
123528
+ }, U2 = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
123529
+ U2.X.get = function() {
123459
123530
  return 0;
123460
- }, U.Y.get = function() {
123531
+ }, U2.Y.get = function() {
123461
123532
  return 1;
123462
- }, U.Z.get = function() {
123533
+ }, U2.Z.get = function() {
123463
123534
  return 2;
123464
- }, U.M.get = function() {
123535
+ }, U2.M.get = function() {
123465
123536
  return 3;
123466
123537
  }, V.prototype.setOrdinate = function(t5, e4, n4) {
123467
123538
  }, V.prototype.size = function() {
@@ -123479,7 +123550,7 @@ var jsts_min = { exports: {} };
123479
123550
  return [x2];
123480
123551
  }, V.prototype.getClass = function() {
123481
123552
  return V;
123482
- }, Object.defineProperties(V, U);
123553
+ }, Object.defineProperties(V, U2);
123483
123554
  var z2 = function() {
123484
123555
  }, X3 = function(t5) {
123485
123556
  function e4() {
@@ -151889,7 +151960,7 @@ const esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
151889
151960
  atan: atan$3,
151890
151961
  clamp: clamp$3,
151891
151962
  clone: clone$9,
151892
- config: config$2,
151963
+ config: config$3,
151893
151964
  configure,
151894
151965
  cos: cos$5,
151895
151966
  degrees: degrees$5,
@@ -156326,16 +156397,16 @@ async function getDecoder(fileDirectory) {
156326
156397
  const Decoder = await importFn();
156327
156398
  return new Decoder(fileDirectory);
156328
156399
  }
156329
- addDecoder([void 0, 1], () => import("./raw-3e7d0813.js").then((m2) => m2.default));
156330
- addDecoder(5, () => import("./lzw-754fdaeb.js").then((m2) => m2.default));
156400
+ addDecoder([void 0, 1], () => import("./raw-6a5ee9b6.js").then((m2) => m2.default));
156401
+ addDecoder(5, () => import("./lzw-e6575211.js").then((m2) => m2.default));
156331
156402
  addDecoder(6, () => {
156332
156403
  throw new Error("old style JPEG compression is not supported.");
156333
156404
  });
156334
- addDecoder(7, () => import("./jpeg-02d5fbb9.js").then((m2) => m2.default));
156335
- addDecoder([8, 32946], () => import("./deflate-9e23a7db.js").then((m2) => m2.default));
156336
- addDecoder(32773, () => import("./packbits-d34edbf8.js").then((m2) => m2.default));
156337
- addDecoder(34887, () => import("./lerc-4ac97b0f.js").then((m2) => m2.default));
156338
- addDecoder(50001, () => import("./webimage-2385de92.js").then((m2) => m2.default));
156405
+ addDecoder(7, () => import("./jpeg-913b4a29.js").then((m2) => m2.default));
156406
+ addDecoder([8, 32946], () => import("./deflate-aae0b27f.js").then((m2) => m2.default));
156407
+ addDecoder(32773, () => import("./packbits-d3d3e4e9.js").then((m2) => m2.default));
156408
+ addDecoder(34887, () => import("./lerc-c5d4fc8f.js").then((m2) => m2.default));
156409
+ addDecoder(50001, () => import("./webimage-6e4a32e0.js").then((m2) => m2.default));
156339
156410
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
156340
156411
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
156341
156412
  }
@@ -161340,14 +161411,14 @@ const makeTable = () => {
161340
161411
  return table;
161341
161412
  };
161342
161413
  const crcTable = new Uint32Array(makeTable());
161343
- const crc32 = (crc, buf, len2, pos) => {
161414
+ const crc32 = (crc2, buf, len2, pos) => {
161344
161415
  const t4 = crcTable;
161345
161416
  const end = pos + len2;
161346
- crc ^= -1;
161417
+ crc2 ^= -1;
161347
161418
  for (let i2 = pos; i2 < end; i2++) {
161348
- crc = crc >>> 8 ^ t4[(crc ^ buf[i2]) & 255];
161419
+ crc2 = crc2 >>> 8 ^ t4[(crc2 ^ buf[i2]) & 255];
161349
161420
  }
161350
- return crc ^ -1;
161421
+ return crc2 ^ -1;
161351
161422
  };
161352
161423
  var crc32_1 = crc32;
161353
161424
  var messages = {
@@ -163549,7 +163620,7 @@ const updatewindow = (strm, src2, end, copy2) => {
163549
163620
  }
163550
163621
  return 0;
163551
163622
  };
163552
- const inflate = (strm, flush2) => {
163623
+ const inflate$1 = (strm, flush2) => {
163553
163624
  let state;
163554
163625
  let input, output2;
163555
163626
  let next3;
@@ -164506,7 +164577,7 @@ var inflateReset2_1 = inflateReset2;
164506
164577
  var inflateResetKeep_1 = inflateResetKeep;
164507
164578
  var inflateInit_1 = inflateInit;
164508
164579
  var inflateInit2_1 = inflateInit2;
164509
- var inflate_2 = inflate;
164580
+ var inflate_2 = inflate$1;
164510
164581
  var inflateEnd_1 = inflateEnd;
164511
164582
  var inflateGetHeader_1 = inflateGetHeader;
164512
164583
  var inflateSetDictionary_1 = inflateSetDictionary;
@@ -164688,22 +164759,22 @@ Inflate.prototype.onEnd = function(status) {
164688
164759
  this.err = status;
164689
164760
  this.msg = this.strm.msg;
164690
164761
  };
164691
- function inflate$1(input, options) {
164762
+ function inflate$1$1(input, options) {
164692
164763
  const inflator = new Inflate(options);
164693
164764
  inflator.push(input);
164694
164765
  if (inflator.err)
164695
164766
  throw inflator.msg || messages[inflator.err];
164696
164767
  return inflator.result;
164697
164768
  }
164698
- function inflateRaw(input, options) {
164769
+ function inflateRaw$1(input, options) {
164699
164770
  options = options || {};
164700
164771
  options.raw = true;
164701
- return inflate$1(input, options);
164772
+ return inflate$1$1(input, options);
164702
164773
  }
164703
164774
  var Inflate_1 = Inflate;
164704
- var inflate_2$1 = inflate$1;
164705
- var inflateRaw_1 = inflateRaw;
164706
- var ungzip = inflate$1;
164775
+ var inflate_2$1 = inflate$1$1;
164776
+ var inflateRaw_1 = inflateRaw$1;
164777
+ var ungzip = inflate$1$1;
164707
164778
  var constants$2$1 = constants$3;
164708
164779
  var inflate_1$1 = {
164709
164780
  Inflate: Inflate_1,
@@ -164713,14 +164784,14 @@ var inflate_1$1 = {
164713
164784
  constants: constants$2$1
164714
164785
  };
164715
164786
  const { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;
164716
- const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;
164787
+ const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1$1, ungzip: ungzip$1 } = inflate_1$1;
164717
164788
  var Deflate_1$1 = Deflate$1;
164718
164789
  var deflate_1$2 = deflate$2;
164719
164790
  var deflateRaw_1$1 = deflateRaw$1;
164720
164791
  var gzip_1$1 = gzip$1;
164721
164792
  var Inflate_1$1 = Inflate$1;
164722
164793
  var inflate_1$2 = inflate$2;
164723
- var inflateRaw_1$1 = inflateRaw$1;
164794
+ var inflateRaw_1$1 = inflateRaw$1$1;
164724
164795
  var ungzip_1 = ungzip$1;
164725
164796
  var constants_1 = constants$3;
164726
164797
  var pako = {
@@ -165106,7 +165177,7 @@ var blosc_codec = function() {
165106
165177
  if (h2.length !== d.length)
165107
165178
  throw new La("Mismatched type converter count");
165108
165179
  for (var l2 = 0; l2 < d.length; ++l2)
165109
- U(d[l2], h2[l2]);
165180
+ U2(d[l2], h2[l2]);
165110
165181
  }
165111
165182
  var d = [];
165112
165183
  d.forEach(function(h2) {
@@ -165122,7 +165193,7 @@ var blosc_codec = function() {
165122
165193
  });
165123
165194
  0 === g2.length && c2(e3);
165124
165195
  }
165125
- function U(a2, b2, c2) {
165196
+ function U2(a2, b2, c2) {
165126
165197
  c2 = c2 || {};
165127
165198
  if (!("argPackAdvance" in b2))
165128
165199
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
@@ -165317,7 +165388,7 @@ var blosc_codec = function() {
165317
165388
  }, z: function(a2, b2, c2, d, e3) {
165318
165389
  var g2 = Fa(c2);
165319
165390
  b2 = P2(b2);
165320
- U(a2, { name: b2, fromWireType: function(k) {
165391
+ U2(a2, { name: b2, fromWireType: function(k) {
165321
165392
  return !!k;
165322
165393
  }, toWireType: function(k, h2) {
165323
165394
  return h2 ? d : e3;
@@ -165334,7 +165405,7 @@ var blosc_codec = function() {
165334
165405
  }, M: null });
165335
165406
  }, y: function(a2, b2) {
165336
165407
  b2 = P2(b2);
165337
- U(a2, { name: b2, fromWireType: function(c2) {
165408
+ U2(a2, { name: b2, fromWireType: function(c2) {
165338
165409
  var d = V[c2].value;
165339
165410
  Qa(c2);
165340
165411
  return d;
@@ -165344,7 +165415,7 @@ var blosc_codec = function() {
165344
165415
  }, h: function(a2, b2, c2) {
165345
165416
  c2 = Fa(c2);
165346
165417
  b2 = P2(b2);
165347
- U(a2, { name: b2, fromWireType: function(d) {
165418
+ U2(a2, { name: b2, fromWireType: function(d) {
165348
165419
  return d;
165349
165420
  }, toWireType: function(d, e3) {
165350
165421
  if ("number" !== typeof e3 && "boolean" !== typeof e3)
@@ -165412,7 +165483,7 @@ var blosc_codec = function() {
165412
165483
  };
165413
165484
  }
165414
165485
  var l2 = -1 != b2.indexOf("unsigned");
165415
- U(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
165486
+ U2(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
165416
165487
  if ("number" !== typeof p && "boolean" !== typeof p)
165417
165488
  throw new TypeError('Cannot convert "' + Ta(p) + '" to ' + this.name);
165418
165489
  if (p < d || p > e3)
@@ -165431,11 +165502,11 @@ var blosc_codec = function() {
165431
165502
  }
165432
165503
  var e3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b2];
165433
165504
  c2 = P2(c2);
165434
- U(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
165505
+ U2(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
165435
165506
  }, i: function(a2, b2) {
165436
165507
  b2 = P2(b2);
165437
165508
  var c2 = "std::string" === b2;
165438
- U(a2, { name: b2, fromWireType: function(d) {
165509
+ U2(a2, { name: b2, fromWireType: function(d) {
165439
165510
  var e3 = G2[d >> 2];
165440
165511
  if (c2)
165441
165512
  for (var g2 = d + 4, k = 0; k <= e3; ++k) {
@@ -165502,7 +165573,7 @@ var blosc_codec = function() {
165502
165573
  4 === b2 && (d = na, e3 = oa, g2 = pa2, k = function() {
165503
165574
  return G2;
165504
165575
  }, h2 = 2);
165505
- U(a2, { name: c2, fromWireType: function(l2) {
165576
+ U2(a2, { name: c2, fromWireType: function(l2) {
165506
165577
  for (var n3 = G2[l2 >> 2], p = k(), q, x2 = l2 + 4, B2 = 0; B2 <= n3; ++B2) {
165507
165578
  var m2 = l2 + 4 + B2 * b2;
165508
165579
  if (B2 == n3 || 0 == p[m2 >> h2])
@@ -165522,7 +165593,7 @@ var blosc_codec = function() {
165522
165593
  } });
165523
165594
  }, A: function(a2, b2) {
165524
165595
  b2 = P2(b2);
165525
- U(a2, {
165596
+ U2(a2, {
165526
165597
  aa: true,
165527
165598
  name: b2,
165528
165599
  argPackAdvance: 0,
@@ -171821,10 +171892,10 @@ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined
171821
171892
  let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
171822
171893
  function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
171823
171894
  let [value2, setValue] = useState(defaultId2);
171824
- let nextId = useRef(null);
171895
+ let nextId2 = useRef(null);
171825
171896
  let res = $b5e257d569688ac6$export$619500959fc48b26(value2);
171826
171897
  let updateValue = useCallback((val) => {
171827
- nextId.current = val;
171898
+ nextId2.current = val;
171828
171899
  }, []);
171829
171900
  $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
171830
171901
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
@@ -171836,9 +171907,9 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
171836
171907
  res
171837
171908
  ]);
171838
171909
  useEffect(() => {
171839
- let newId = nextId.current;
171910
+ let newId = nextId2.current;
171840
171911
  if (newId) {
171841
- nextId.current = null;
171912
+ nextId2.current = null;
171842
171913
  setValue(newId);
171843
171914
  }
171844
171915
  });
@@ -175785,6 +175856,7 @@ function MultiLegend(props2) {
175785
175856
  spotLayerScopes,
175786
175857
  spotLayerCoordination,
175787
175858
  spotMultiExpressionExtents,
175859
+ spotMultiFeatureLabels,
175788
175860
  // Points
175789
175861
  pointLayerScopes,
175790
175862
  pointLayerCoordination
@@ -175817,32 +175889,15 @@ function MultiLegend(props2) {
175817
175889
  height: height2
175818
175890
  }, layerScope) : null;
175819
175891
  }) : null, spotLayerScopes ? reversedSpotLayerScopes.flatMap((layerScope) => {
175892
+ var _a3;
175820
175893
  const layerCoordination = spotLayerCoordination[0][layerScope];
175821
175894
  const { spatialLayerVisible, obsColorEncoding, featureValueColormap, featureValueColormapRange, obsType, featureType, featureValueType, featureSelection, spatialLayerColor, legendVisible, obsSetSelection, obsSetColor } = layerCoordination;
175822
175895
  const expressionExtents = spotMultiExpressionExtents == null ? void 0 : spotMultiExpressionExtents[layerScope];
175823
175896
  const firstExpressionExtent = expressionExtents == null ? void 0 : expressionExtents[0];
175824
175897
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
175825
175898
  const height2 = isStaticColor ? 20 : 36;
175826
- return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, {
175827
- positionRelative: true,
175828
- highContrast: true,
175829
- showObsLabel: true,
175830
- visible: spatialLayerVisible,
175831
- theme,
175832
- obsType,
175833
- featureType,
175834
- featureValueType,
175835
- obsColorEncoding,
175836
- spatialLayerColor,
175837
- featureSelection,
175838
- // featureLabelsMap={featureLabelsMap} // TODO
175839
- featureValueColormap,
175840
- featureValueColormapRange,
175841
- extent: firstExpressionExtent,
175842
- height: height2,
175843
- obsSetSelection,
175844
- obsSetColor
175845
- }, layerScope) : null;
175899
+ const featureLabelsMap = (_a3 = spotMultiFeatureLabels == null ? void 0 : spotMultiFeatureLabels[layerScope]) == null ? void 0 : _a3.featureLabelsMap;
175900
+ return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, { positionRelative: true, highContrast: true, showObsLabel: true, visible: spatialLayerVisible, theme, obsType, featureType, featureValueType, obsColorEncoding, spatialLayerColor, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, extent: firstExpressionExtent, height: height2, obsSetSelection, obsSetColor }, layerScope) : null;
175846
175901
  }) : null, segmentationLayerScopes ? reversedSegmentationLayerScopes.flatMap((layerScope) => {
175847
175902
  const layerCoordination = segmentationLayerCoordination[0][layerScope];
175848
175903
  const channelScopes = segmentationChannelScopesByLayer[layerScope];
@@ -176469,7 +176524,7 @@ function isFunctionNode(x2) {
176469
176524
  function isIndexNode(x2) {
176470
176525
  return x2 && x2.isIndexNode === true && x2.constructor.prototype.isNode === true || false;
176471
176526
  }
176472
- function isNode(x2) {
176527
+ function isNode$1(x2) {
176473
176528
  return x2 && x2.isNode === true && x2.constructor.prototype.isNode === true || false;
176474
176529
  }
176475
176530
  function isObjectNode(x2) {
@@ -176517,7 +176572,7 @@ function typeOf(x2) {
176517
176572
  return "Range";
176518
176573
  if (isResultSet(x2))
176519
176574
  return "ResultSet";
176520
- if (isNode(x2))
176575
+ if (isNode$1(x2))
176521
176576
  return x2.type;
176522
176577
  if (isChain(x2))
176523
176578
  return "Chain";
@@ -176619,13 +176674,13 @@ function pickShallow(object2, properties) {
176619
176674
  }
176620
176675
  var MATRIX_OPTIONS = ["Matrix", "Array"];
176621
176676
  var NUMBER_OPTIONS = ["number", "BigNumber", "Fraction"];
176622
- var config$1 = function config(options) {
176677
+ var config$2 = function config(options) {
176623
176678
  if (options) {
176624
176679
  throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n import { create, all } from 'mathjs';\n const mathjs = create(all);\n mathjs.config({ number: 'BigNumber' });\n");
176625
176680
  }
176626
176681
  return Object.freeze(DEFAULT_CONFIG);
176627
176682
  };
176628
- _extends$6(config$1, DEFAULT_CONFIG, {
176683
+ _extends$6(config$2, DEFAULT_CONFIG, {
176629
176684
  MATRIX_OPTIONS,
176630
176685
  NUMBER_OPTIONS
176631
176686
  });
@@ -178391,7 +178446,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$R, function crea
178391
178446
  },
178392
178447
  {
178393
178448
  name: "Node",
178394
- test: isNode
178449
+ test: isNode$1
178395
178450
  },
178396
178451
  {
178397
178452
  name: "ObjectNode",
@@ -180568,7 +180623,7 @@ function ceil$2(x2) {
180568
180623
  function clamp$1(x2, min2, max2) {
180569
180624
  return new this(x2).clamp(min2, max2);
180570
180625
  }
180571
- function config2(obj) {
180626
+ function config$1(obj) {
180572
180627
  if (!obj || typeof obj !== "object")
180573
180628
  throw Error(decimalError + "Object expected");
180574
180629
  var i2, p, v, useDefaults = obj.defaults === true, ps = [
@@ -180720,7 +180775,7 @@ function clone$1(obj) {
180720
180775
  Decimal2.ROUND_HALF_CEIL = 7;
180721
180776
  Decimal2.ROUND_HALF_FLOOR = 8;
180722
180777
  Decimal2.EUCLID = 9;
180723
- Decimal2.config = Decimal2.set = config2;
180778
+ Decimal2.config = Decimal2.set = config$1;
180724
180779
  Decimal2.clone = clone$1;
180725
180780
  Decimal2.isDecimal = isDecimalInstance;
180726
180781
  Decimal2.abs = abs$4;
@@ -191121,7 +191176,7 @@ var createDivide = /* @__PURE__ */ factory(name$2, dependencies$1, (_ref3) => {
191121
191176
  });
191122
191177
  var Complex = /* @__PURE__ */ createComplexClass({});
191123
191178
  var BigNumber = /* @__PURE__ */ createBigNumberClass({
191124
- config: config$1
191179
+ config: config$2
191125
191180
  });
191126
191181
  var Matrix2 = /* @__PURE__ */ createMatrixClass({});
191127
191182
  var Fraction = /* @__PURE__ */ createFractionClass({});
@@ -191138,7 +191193,7 @@ var isNumeric$1 = /* @__PURE__ */ createIsNumeric({
191138
191193
  typed
191139
191194
  });
191140
191195
  var equalScalar = /* @__PURE__ */ createEqualScalar({
191141
- config: config$1,
191196
+ config: config$2,
191142
191197
  typed
191143
191198
  });
191144
191199
  var number$9 = /* @__PURE__ */ createNumber({
@@ -191181,18 +191236,18 @@ var identity$8 = /* @__PURE__ */ createIdentity({
191181
191236
  BigNumber,
191182
191237
  DenseMatrix,
191183
191238
  SparseMatrix,
191184
- config: config$1,
191239
+ config: config$2,
191185
191240
  matrix,
191186
191241
  typed
191187
191242
  });
191188
191243
  var size$1 = /* @__PURE__ */ createSize({
191189
191244
  matrix,
191190
- config: config$1,
191245
+ config: config$2,
191191
191246
  typed
191192
191247
  });
191193
191248
  var zeros = /* @__PURE__ */ createZeros({
191194
191249
  BigNumber,
191195
- config: config$1,
191250
+ config: config$2,
191196
191251
  matrix,
191197
191252
  typed
191198
191253
  });
@@ -191208,20 +191263,20 @@ var compare$a = /* @__PURE__ */ createCompare({
191208
191263
  BigNumber,
191209
191264
  DenseMatrix,
191210
191265
  Fraction,
191211
- config: config$1,
191266
+ config: config$2,
191212
191267
  equalScalar,
191213
191268
  matrix,
191214
191269
  typed
191215
191270
  });
191216
191271
  var smaller = /* @__PURE__ */ createSmaller({
191217
191272
  DenseMatrix,
191218
- config: config$1,
191273
+ config: config$2,
191219
191274
  matrix,
191220
191275
  typed
191221
191276
  });
191222
191277
  var larger = /* @__PURE__ */ createLarger({
191223
191278
  DenseMatrix,
191224
- config: config$1,
191279
+ config: config$2,
191225
191280
  matrix,
191226
191281
  typed
191227
191282
  });
@@ -191237,7 +191292,7 @@ var dot = /* @__PURE__ */ createDot({
191237
191292
  typed
191238
191293
  });
191239
191294
  var floor$1 = /* @__PURE__ */ createFloor({
191240
- config: config$1,
191295
+ config: config$2,
191241
191296
  equalScalar,
191242
191297
  matrix,
191243
191298
  round: round$1,
@@ -191253,7 +191308,7 @@ var multiply = /* @__PURE__ */ createMultiply({
191253
191308
  });
191254
191309
  var pow$5 = /* @__PURE__ */ createPow({
191255
191310
  Complex,
191256
- config: config$1,
191311
+ config: config$2,
191257
191312
  fraction,
191258
191313
  identity: identity$8,
191259
191314
  matrix,
@@ -191285,7 +191340,7 @@ var equal$1 = /* @__PURE__ */ createEqual({
191285
191340
  typed
191286
191341
  });
191287
191342
  var ceil$1 = /* @__PURE__ */ createCeil({
191288
- config: config$1,
191343
+ config: config$2,
191289
191344
  equalScalar,
191290
191345
  matrix,
191291
191346
  round: round$1,
@@ -191355,7 +191410,7 @@ var Unit = /* @__PURE__ */ createUnitClass({
191355
191410
  Fraction,
191356
191411
  abs: abs$3,
191357
191412
  addScalar,
191358
- config: config$1,
191413
+ config: config$2,
191359
191414
  divideScalar,
191360
191415
  equal: equal$1,
191361
191416
  fix,
@@ -191830,14 +191885,14 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
191830
191885
  return result;
191831
191886
  }
191832
191887
  class NodeNotFoundError extends Error {
191833
- constructor(msg) {
191834
- super(msg);
191888
+ constructor(context2, options = {}) {
191889
+ super(`Node not found: ${context2}`, options);
191835
191890
  this.name = "NodeNotFoundError";
191836
191891
  }
191837
191892
  }
191838
191893
  class KeyError extends Error {
191839
- constructor(msg) {
191840
- super(msg);
191894
+ constructor(path2) {
191895
+ super(`Missing key: ${path2}`);
191841
191896
  this.name = "KeyError";
191842
191897
  }
191843
191898
  }
@@ -191948,56 +192003,56 @@ class ByteStringArray {
191948
192003
  _encoder = new WeakMap();
191949
192004
  const _UnicodeStringArray = class {
191950
192005
  constructor(chars, x2, byteOffset, length2) {
191951
- __publicField(this, "_data");
192006
+ __privateAdd(this, _data, void 0);
191952
192007
  __publicField(this, "chars");
191953
192008
  __privateAdd(this, _encode_buffer, void 0);
191954
192009
  this.chars = chars;
191955
192010
  if (typeof x2 === "number") {
191956
- this._data = new Int32Array(x2 * chars);
192011
+ __privateSet(this, _data, new Int32Array(x2 * chars));
191957
192012
  } else if (x2 instanceof ArrayBuffer) {
191958
192013
  if (length2)
191959
192014
  length2 *= chars;
191960
- this._data = new Int32Array(x2, byteOffset, length2);
192015
+ __privateSet(this, _data, new Int32Array(x2, byteOffset, length2));
191961
192016
  } else {
191962
192017
  const values3 = x2;
191963
192018
  const d = new _UnicodeStringArray(chars, 1);
191964
- this._data = new Int32Array(function* () {
192019
+ __privateSet(this, _data, new Int32Array(function* () {
191965
192020
  for (let str of values3) {
191966
192021
  d.set(0, str);
191967
- yield* d._data;
192022
+ yield* __privateGet(d, _data);
191968
192023
  }
191969
- }());
192024
+ }()));
191970
192025
  }
191971
192026
  __privateSet(this, _encode_buffer, new Int32Array(chars));
191972
192027
  }
191973
192028
  get BYTES_PER_ELEMENT() {
191974
- return this._data.BYTES_PER_ELEMENT * this.chars;
192029
+ return __privateGet(this, _data).BYTES_PER_ELEMENT * this.chars;
191975
192030
  }
191976
192031
  get byteLength() {
191977
- return this._data.byteLength;
192032
+ return __privateGet(this, _data).byteLength;
191978
192033
  }
191979
192034
  get byteOffset() {
191980
- return this._data.byteOffset;
192035
+ return __privateGet(this, _data).byteOffset;
191981
192036
  }
191982
192037
  /** @type {ArrayBuffer} */
191983
192038
  get buffer() {
191984
- return this._data.buffer;
192039
+ return __privateGet(this, _data).buffer;
191985
192040
  }
191986
192041
  /** @type {number} */
191987
192042
  get length() {
191988
- return this._data.length / this.chars;
192043
+ return __privateGet(this, _data).length / this.chars;
191989
192044
  }
191990
192045
  get(idx) {
191991
192046
  const offset6 = this.chars * idx;
191992
192047
  let result = "";
191993
192048
  for (let i2 = 0; i2 < this.chars; i2++) {
191994
- result += String.fromCodePoint(this._data[offset6 + i2]);
192049
+ result += String.fromCodePoint(__privateGet(this, _data)[offset6 + i2]);
191995
192050
  }
191996
192051
  return result.replace(/\u0000/g, "");
191997
192052
  }
191998
192053
  set(idx, value2) {
191999
192054
  const offset6 = this.chars * idx;
192000
- const view = this._data.subarray(offset6, offset6 + this.chars);
192055
+ const view = __privateGet(this, _data).subarray(offset6, offset6 + this.chars);
192001
192056
  view.fill(0);
192002
192057
  for (let i2 = 0; i2 < this.chars; i2++) {
192003
192058
  view[i2] = value2.codePointAt(i2) ?? 0;
@@ -192005,9 +192060,9 @@ const _UnicodeStringArray = class {
192005
192060
  }
192006
192061
  fill(value2) {
192007
192062
  this.set(0, value2);
192008
- let encoded = this._data.subarray(0, this.chars);
192063
+ let encoded = __privateGet(this, _data).subarray(0, this.chars);
192009
192064
  for (let i2 = 1; i2 < this.length; i2++) {
192010
- this._data.set(encoded, i2 * this.chars);
192065
+ __privateGet(this, _data).set(encoded, i2 * this.chars);
192011
192066
  }
192012
192067
  }
192013
192068
  *[Symbol.iterator]() {
@@ -192017,6 +192072,7 @@ const _UnicodeStringArray = class {
192017
192072
  }
192018
192073
  };
192019
192074
  let UnicodeStringArray = _UnicodeStringArray;
192075
+ _data = new WeakMap();
192020
192076
  _encode_buffer = new WeakMap();
192021
192077
  function json_decode_object(bytes) {
192022
192078
  const str = new TextDecoder().decode(bytes);
@@ -192382,8 +192438,115 @@ const _VLenUTF8 = class {
192382
192438
  let VLenUTF8 = _VLenUTF8;
192383
192439
  _shape2 = new WeakMap();
192384
192440
  _strides2 = new WeakMap();
192441
+ function throw_on_nan_replacer(_key, value2) {
192442
+ if (value2 !== value2) {
192443
+ throw new Error("JsonCodec allow_nan is false but NaN was encountered during encoding.");
192444
+ }
192445
+ if (value2 === Infinity) {
192446
+ throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
192447
+ }
192448
+ if (value2 === -Infinity) {
192449
+ throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
192450
+ }
192451
+ return value2;
192452
+ }
192453
+ function sort_keys_replacer(_key, value2) {
192454
+ return value2 instanceof Object && !(value2 instanceof Array) ? Object.keys(value2).sort().reduce((sorted, key2) => {
192455
+ sorted[key2] = value2[key2];
192456
+ return sorted;
192457
+ }, {}) : value2;
192458
+ }
192459
+ const _JsonCodec = class {
192460
+ constructor(configuration) {
192461
+ __publicField(this, "configuration");
192462
+ __publicField(this, "kind", "array_to_bytes");
192463
+ __privateAdd(this, _encoder_config, void 0);
192464
+ __privateAdd(this, _decoder_config, void 0);
192465
+ this.configuration = configuration;
192466
+ const { encoding = "utf-8", skipkeys = false, ensure_ascii = true, check_circular = true, allow_nan = true, sort_keys = true, indent, strict = true } = configuration;
192467
+ let separators = configuration.separators;
192468
+ if (!separators) {
192469
+ if (!indent) {
192470
+ separators = [",", ":"];
192471
+ } else {
192472
+ separators = [", ", ": "];
192473
+ }
192474
+ }
192475
+ __privateSet(this, _encoder_config, {
192476
+ encoding,
192477
+ skipkeys,
192478
+ ensure_ascii,
192479
+ check_circular,
192480
+ allow_nan,
192481
+ indent,
192482
+ separators,
192483
+ sort_keys
192484
+ });
192485
+ __privateSet(this, _decoder_config, { strict });
192486
+ }
192487
+ static fromConfig(configuration) {
192488
+ return new _JsonCodec(configuration);
192489
+ }
192490
+ encode(buf) {
192491
+ const { indent, encoding, ensure_ascii, check_circular, allow_nan, sort_keys } = __privateGet(this, _encoder_config);
192492
+ if (encoding !== "utf-8") {
192493
+ throw new Error("JsonCodec does not yet support non-utf-8 encoding.");
192494
+ }
192495
+ const replacer_functions = [];
192496
+ if (!check_circular) {
192497
+ throw new Error("JsonCodec does not yet support skipping the check for circular references during encoding.");
192498
+ }
192499
+ if (!allow_nan) {
192500
+ replacer_functions.push(throw_on_nan_replacer);
192501
+ }
192502
+ if (sort_keys) {
192503
+ replacer_functions.push(sort_keys_replacer);
192504
+ }
192505
+ const items = Array.from(buf.data);
192506
+ items.push("|O");
192507
+ items.push(buf.shape);
192508
+ let replacer2 = void 0;
192509
+ if (replacer_functions.length) {
192510
+ replacer2 = function(key2, value2) {
192511
+ let new_value = value2;
192512
+ replacer_functions.forEach((sub_replacer) => {
192513
+ new_value = sub_replacer(key2, new_value);
192514
+ });
192515
+ return new_value;
192516
+ };
192517
+ }
192518
+ let json_str = JSON.stringify(items, replacer2, indent);
192519
+ if (ensure_ascii) {
192520
+ json_str = json_str.replace(/[\u007F-\uFFFF]/g, function(chr) {
192521
+ const full_str = "0000" + chr.charCodeAt(0).toString(16);
192522
+ const sub_str = full_str.substring(full_str.length - 4);
192523
+ return "\\u" + sub_str;
192524
+ });
192525
+ }
192526
+ return new TextEncoder().encode(json_str);
192527
+ }
192528
+ decode(bytes) {
192529
+ const { strict } = __privateGet(this, _decoder_config);
192530
+ if (!strict) {
192531
+ throw new Error("JsonCodec does not yet support non-strict decoding.");
192532
+ }
192533
+ const items = json_decode_object(bytes);
192534
+ const shape2 = items.pop();
192535
+ items.pop();
192536
+ if (!shape2) {
192537
+ throw new Error("0D not implemented for JsonCodec.");
192538
+ } else {
192539
+ const stride = get_strides(shape2, "C");
192540
+ const data2 = items;
192541
+ return { data: data2, shape: shape2, stride };
192542
+ }
192543
+ }
192544
+ };
192545
+ let JsonCodec = _JsonCodec;
192546
+ _encoder_config = new WeakMap();
192547
+ _decoder_config = new WeakMap();
192385
192548
  function create_default_registry() {
192386
- return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-0acfcf7e.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-dd5ab7c8.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-abb4416a.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-cd823c38.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-4072ca78.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8);
192549
+ return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-537fd004.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-bbd18009.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-ec5a40b8.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec);
192387
192550
  }
192388
192551
  const registry = create_default_registry();
192389
192552
  function create_codec_pipeline(chunk_metadata) {
@@ -192628,6 +192791,7 @@ let Array$1 = (_c = class extends Location {
192628
192791
  return is_dtype(this.dtype, query);
192629
192792
  }
192630
192793
  }, _b = CONTEXT_MARKER, _metadata2 = new WeakMap(), _c);
192794
+ let VERSION_COUNTER = create_version_counter();
192631
192795
  function create_version_counter() {
192632
192796
  let version_counts = /* @__PURE__ */ new WeakMap();
192633
192797
  function get_counts(store2) {
@@ -192645,7 +192809,6 @@ function create_version_counter() {
192645
192809
  }
192646
192810
  };
192647
192811
  }
192648
- let VERSION_COUNTER = create_version_counter();
192649
192812
  async function load_attrs(location) {
192650
192813
  let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
192651
192814
  if (!meta_bytes)
@@ -192671,7 +192834,9 @@ async function open_array_v2(location, attrs) {
192671
192834
  let { path: path2 } = location.resolve(".zarray");
192672
192835
  let meta2 = await location.store.get(path2);
192673
192836
  if (!meta2) {
192674
- throw new NodeNotFoundError(path2);
192837
+ throw new NodeNotFoundError("v2 array", {
192838
+ cause: new KeyError(path2)
192839
+ });
192675
192840
  }
192676
192841
  VERSION_COUNTER.increment(location.store, "v2");
192677
192842
  return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta2), attrs));
@@ -192680,7 +192845,9 @@ async function open_group_v2(location, attrs) {
192680
192845
  let { path: path2 } = location.resolve(".zgroup");
192681
192846
  let meta2 = await location.store.get(path2);
192682
192847
  if (!meta2) {
192683
- throw new NodeNotFoundError(path2);
192848
+ throw new NodeNotFoundError("v2 group", {
192849
+ cause: new KeyError(path2)
192850
+ });
192684
192851
  }
192685
192852
  VERSION_COUNTER.increment(location.store, "v2");
192686
192853
  return new Group$1(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta2), attrs));
@@ -192689,7 +192856,9 @@ async function _open_v3(location) {
192689
192856
  let { store: store2, path: path2 } = location.resolve("zarr.json");
192690
192857
  let meta2 = await location.store.get(path2);
192691
192858
  if (!meta2) {
192692
- throw new NodeNotFoundError(path2);
192859
+ throw new NodeNotFoundError("v3 array or group", {
192860
+ cause: new KeyError(path2)
192861
+ });
192693
192862
  }
192694
192863
  let meta_doc = json_decode_object(meta2);
192695
192864
  if (meta_doc.node_type === "array" && (meta_doc.data_type === "uint64" || meta_doc.data_type === "int64") && meta_doc.fill_value != void 0) {
@@ -192711,8 +192880,8 @@ async function open_v3(location, options = {}) {
192711
192880
  throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
192712
192881
  }
192713
192882
  async function open(location, options = {}) {
192714
- const store2 = "store" in location ? location.store : location;
192715
- const version_max = VERSION_COUNTER.version_max(store2);
192883
+ let store2 = "store" in location ? location.store : location;
192884
+ let version_max = VERSION_COUNTER.version_max(store2);
192716
192885
  let open_primary = version_max === "v2" ? open.v2 : open.v3;
192717
192886
  let open_secondary = version_max === "v2" ? open.v3 : open.v2;
192718
192887
  return open_primary(location, options).catch((err2) => {
@@ -192756,7 +192925,7 @@ function* product(...iterables) {
192756
192925
  results[i2] = iterators[i2].next();
192757
192926
  }
192758
192927
  }
192759
- function slice_indices(start, stop3, step2, length2) {
192928
+ function slice_indices({ start, stop: stop3, step: step2 }, length2) {
192760
192929
  if (step2 === 0) {
192761
192930
  throw new Error("slice step cannot be zero");
192762
192931
  }
@@ -192797,10 +192966,7 @@ function slice$4(start, stop3, step2 = null) {
192797
192966
  return {
192798
192967
  start,
192799
192968
  stop: stop3,
192800
- step: step2,
192801
- indices(length2) {
192802
- return slice_indices(this.start, this.stop, this.step, length2);
192803
- }
192969
+ step: step2
192804
192970
  };
192805
192971
  }
192806
192972
  function create_queue() {
@@ -192868,7 +193034,7 @@ class SliceDimIndexer {
192868
193034
  __publicField(this, "dim_chunk_len");
192869
193035
  __publicField(this, "nitems");
192870
193036
  __publicField(this, "nchunks");
192871
- const [start, stop3, step2] = dim_sel.indices(dim_len);
193037
+ const [start, stop3, step2] = slice_indices(dim_sel, dim_len);
192872
193038
  this.start = start;
192873
193039
  this.stop = stop3;
192874
193040
  this.step = step2;
@@ -192954,25 +193120,20 @@ function unwrap(arr, idx) {
192954
193120
  }
192955
193121
  async function get$7(arr, selection, opts2, setter2) {
192956
193122
  var _a3;
192957
- const context2 = get_context(arr);
192958
- const indexer = new BasicIndexer({
193123
+ let context2 = get_context(arr);
193124
+ let indexer = new BasicIndexer({
192959
193125
  selection,
192960
193126
  shape: arr.shape,
192961
193127
  chunk_shape: arr.chunks
192962
193128
  });
192963
- const out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
192964
- const queue = ((_a3 = opts2.create_queue) == null ? void 0 : _a3.call(opts2)) ?? create_queue();
193129
+ let out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
193130
+ let queue = ((_a3 = opts2.create_queue) == null ? void 0 : _a3.call(opts2)) ?? create_queue();
192965
193131
  for (const { chunk_coords, mapping } of indexer) {
192966
- queue.add(() => arr.getChunk(chunk_coords, opts2.opts).then(({ data: data2, shape: shape2, stride }) => {
192967
- const chunk = setter2.prepare(data2, shape2, stride);
193132
+ queue.add(async () => {
193133
+ let { data: data2, shape: shape2, stride } = await arr.getChunk(chunk_coords, opts2.opts);
193134
+ let chunk = setter2.prepare(data2, shape2, stride);
192968
193135
  setter2.set_from_chunk(out, chunk, mapping);
192969
- }).catch((err2) => {
192970
- if (!(err2 instanceof KeyError))
192971
- throw err2;
192972
- if (context2.fill_value) {
192973
- setter2.set_scalar(out, mapping.map((m2) => m2.to).filter((s2) => s2 !== null), context2.fill_value);
192974
- }
192975
- }));
193136
+ });
192976
193137
  }
192977
193138
  await queue.onIdle();
192978
193139
  return indexer.shape.length === 0 ? unwrap(out.data, 0) : out;
@@ -193125,6 +193286,9 @@ function set_from_chunk_binary(dest, src2, bytes_per_element2, projections2) {
193125
193286
  }, bytes_per_element2, projs);
193126
193287
  }
193127
193288
  }
193289
+ function strip_prefix(path2) {
193290
+ return path2.slice(1);
193291
+ }
193128
193292
  function fetch_range(url, offset6, length2, opts2 = {}) {
193129
193293
  if (offset6 !== void 0 && length2 !== void 0) {
193130
193294
  opts2 = {
@@ -193137,6 +193301,16 @@ function fetch_range(url, offset6, length2, opts2 = {}) {
193137
193301
  }
193138
193302
  return fetch(url, opts2);
193139
193303
  }
193304
+ function merge_init(storeOverrides, requestOverrides) {
193305
+ return {
193306
+ ...storeOverrides,
193307
+ ...requestOverrides,
193308
+ headers: {
193309
+ ...storeOverrides.headers,
193310
+ ...requestOverrides.headers
193311
+ }
193312
+ };
193313
+ }
193140
193314
  function resolve$1(root2, path2) {
193141
193315
  const base2 = typeof root2 === "string" ? new URL(root2) : root2;
193142
193316
  if (!base2.pathname.endsWith("/")) {
@@ -193201,14 +193375,7 @@ _overrides = new WeakMap();
193201
193375
  _use_suffix_request = new WeakMap();
193202
193376
  _merge_init = new WeakSet();
193203
193377
  merge_init_fn = function(overrides) {
193204
- return {
193205
- ...__privateGet(this, _overrides),
193206
- ...overrides,
193207
- headers: {
193208
- ...__privateGet(this, _overrides).headers,
193209
- ...overrides.headers
193210
- }
193211
- };
193378
+ return merge_init(__privateGet(this, _overrides), overrides);
193212
193379
  };
193213
193380
  const FetchStore$1 = FetchStore;
193214
193381
  function getV2DataType(dtype) {
@@ -193250,8 +193417,896 @@ function createZarrArrayAdapter(arr) {
193250
193417
  }
193251
193418
  });
193252
193419
  }
193253
- function zarrOpenRoot(url, requestInit2) {
193254
- const store2 = new FetchStore$1(url, { overrides: requestInit2 });
193420
+ function readBlobAsArrayBuffer(blob) {
193421
+ if (blob.arrayBuffer) {
193422
+ return blob.arrayBuffer();
193423
+ }
193424
+ return new Promise((resolve2, reject) => {
193425
+ const reader = new FileReader();
193426
+ reader.addEventListener("loadend", () => {
193427
+ resolve2(reader.result);
193428
+ });
193429
+ reader.addEventListener("error", reject);
193430
+ reader.readAsArrayBuffer(blob);
193431
+ });
193432
+ }
193433
+ async function readBlobAsUint8Array(blob) {
193434
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
193435
+ return new Uint8Array(arrayBuffer2);
193436
+ }
193437
+ function isBlob(v) {
193438
+ return typeof Blob !== "undefined" && v instanceof Blob;
193439
+ }
193440
+ function isSharedArrayBuffer(b2) {
193441
+ return typeof SharedArrayBuffer !== "undefined" && b2 instanceof SharedArrayBuffer;
193442
+ }
193443
+ const isNode = typeof process !== "undefined" && process.versions && typeof process.versions.node !== "undefined" && typeof process.versions.electron === "undefined";
193444
+ function isTypedArraySameAsArrayBuffer(typedArray) {
193445
+ return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;
193446
+ }
193447
+ class ArrayBufferReader {
193448
+ constructor(arrayBufferOrView) {
193449
+ this.typedArray = arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView) ? new Uint8Array(arrayBufferOrView) : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);
193450
+ }
193451
+ async getLength() {
193452
+ return this.typedArray.byteLength;
193453
+ }
193454
+ async read(offset6, length2) {
193455
+ return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset6, length2);
193456
+ }
193457
+ }
193458
+ let BlobReader$1 = class BlobReader {
193459
+ constructor(blob) {
193460
+ this.blob = blob;
193461
+ }
193462
+ async getLength() {
193463
+ return this.blob.size;
193464
+ }
193465
+ async read(offset6, length2) {
193466
+ const blob = this.blob.slice(offset6, offset6 + length2);
193467
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
193468
+ return new Uint8Array(arrayBuffer2);
193469
+ }
193470
+ async sliceAsBlob(offset6, length2, type2 = "") {
193471
+ return this.blob.slice(offset6, offset6 + length2, type2);
193472
+ }
193473
+ };
193474
+ function inflate(data2, buf) {
193475
+ var u8 = Uint8Array;
193476
+ if (data2[0] == 3 && data2[1] == 0)
193477
+ return buf ? buf : new u8(0);
193478
+ var bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;
193479
+ var noBuf = buf == null;
193480
+ if (noBuf)
193481
+ buf = new u8(data2.length >>> 2 << 3);
193482
+ var BFINAL = 0, BTYPE = 0, HLIT = 0, HDIST = 0, HCLEN = 0, ML = 0, MD = 0;
193483
+ var off = 0, pos = 0;
193484
+ var lmap, dmap;
193485
+ while (BFINAL == 0) {
193486
+ BFINAL = bitsF(data2, pos, 1);
193487
+ BTYPE = bitsF(data2, pos + 1, 2);
193488
+ pos += 3;
193489
+ if (BTYPE == 0) {
193490
+ if ((pos & 7) != 0)
193491
+ pos += 8 - (pos & 7);
193492
+ var p8 = (pos >>> 3) + 4, len2 = data2[p8 - 4] | data2[p8 - 3] << 8;
193493
+ if (noBuf)
193494
+ buf = _check(buf, off + len2);
193495
+ buf.set(new u8(data2.buffer, data2.byteOffset + p8, len2), off);
193496
+ pos = p8 + len2 << 3;
193497
+ off += len2;
193498
+ continue;
193499
+ }
193500
+ if (noBuf)
193501
+ buf = _check(buf, off + (1 << 17));
193502
+ if (BTYPE == 1) {
193503
+ lmap = U.flmap;
193504
+ dmap = U.fdmap;
193505
+ ML = (1 << 9) - 1;
193506
+ MD = (1 << 5) - 1;
193507
+ }
193508
+ if (BTYPE == 2) {
193509
+ HLIT = bitsE(data2, pos, 5) + 257;
193510
+ HDIST = bitsE(data2, pos + 5, 5) + 1;
193511
+ HCLEN = bitsE(data2, pos + 10, 4) + 4;
193512
+ pos += 14;
193513
+ for (var i2 = 0; i2 < 38; i2 += 2) {
193514
+ U.itree[i2] = 0;
193515
+ U.itree[i2 + 1] = 0;
193516
+ }
193517
+ var tl2 = 1;
193518
+ for (var i2 = 0; i2 < HCLEN; i2++) {
193519
+ var l2 = bitsE(data2, pos + i2 * 3, 3);
193520
+ U.itree[(U.ordr[i2] << 1) + 1] = l2;
193521
+ if (l2 > tl2)
193522
+ tl2 = l2;
193523
+ }
193524
+ pos += 3 * HCLEN;
193525
+ makeCodes(U.itree, tl2);
193526
+ codes2map(U.itree, tl2, U.imap);
193527
+ lmap = U.lmap;
193528
+ dmap = U.dmap;
193529
+ pos = decodeTiny(U.imap, (1 << tl2) - 1, HLIT + HDIST, data2, pos, U.ttree);
193530
+ var mx0 = _copyOut(U.ttree, 0, HLIT, U.ltree);
193531
+ ML = (1 << mx0) - 1;
193532
+ var mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree);
193533
+ MD = (1 << mx1) - 1;
193534
+ makeCodes(U.ltree, mx0);
193535
+ codes2map(U.ltree, mx0, lmap);
193536
+ makeCodes(U.dtree, mx1);
193537
+ codes2map(U.dtree, mx1, dmap);
193538
+ }
193539
+ while (true) {
193540
+ var code = lmap[get17(data2, pos) & ML];
193541
+ pos += code & 15;
193542
+ var lit = code >>> 4;
193543
+ if (lit >>> 8 == 0) {
193544
+ buf[off++] = lit;
193545
+ } else if (lit == 256) {
193546
+ break;
193547
+ } else {
193548
+ var end = off + lit - 254;
193549
+ if (lit > 264) {
193550
+ var ebs = U.ldef[lit - 257];
193551
+ end = off + (ebs >>> 3) + bitsE(data2, pos, ebs & 7);
193552
+ pos += ebs & 7;
193553
+ }
193554
+ var dcode = dmap[get17(data2, pos) & MD];
193555
+ pos += dcode & 15;
193556
+ var dlit = dcode >>> 4;
193557
+ var dbs = U.ddef[dlit], dst = (dbs >>> 4) + bitsF(data2, pos, dbs & 15);
193558
+ pos += dbs & 15;
193559
+ if (noBuf)
193560
+ buf = _check(buf, off + (1 << 17));
193561
+ while (off < end) {
193562
+ buf[off] = buf[off++ - dst];
193563
+ buf[off] = buf[off++ - dst];
193564
+ buf[off] = buf[off++ - dst];
193565
+ buf[off] = buf[off++ - dst];
193566
+ }
193567
+ off = end;
193568
+ }
193569
+ }
193570
+ }
193571
+ return buf.length == off ? buf : buf.slice(0, off);
193572
+ }
193573
+ function _check(buf, len2) {
193574
+ var bl2 = buf.length;
193575
+ if (len2 <= bl2)
193576
+ return buf;
193577
+ var nbuf = new Uint8Array(Math.max(bl2 << 1, len2));
193578
+ nbuf.set(buf, 0);
193579
+ return nbuf;
193580
+ }
193581
+ function _decodeTiny(lmap, LL, len2, data2, pos, tree2) {
193582
+ var bitsE = _bitsE, get17 = _get17;
193583
+ var i2 = 0;
193584
+ while (i2 < len2) {
193585
+ var code = lmap[get17(data2, pos) & LL];
193586
+ pos += code & 15;
193587
+ var lit = code >>> 4;
193588
+ if (lit <= 15) {
193589
+ tree2[i2] = lit;
193590
+ i2++;
193591
+ } else {
193592
+ var ll = 0, n3 = 0;
193593
+ if (lit == 16) {
193594
+ n3 = 3 + bitsE(data2, pos, 2);
193595
+ pos += 2;
193596
+ ll = tree2[i2 - 1];
193597
+ } else if (lit == 17) {
193598
+ n3 = 3 + bitsE(data2, pos, 3);
193599
+ pos += 3;
193600
+ } else if (lit == 18) {
193601
+ n3 = 11 + bitsE(data2, pos, 7);
193602
+ pos += 7;
193603
+ }
193604
+ var ni = i2 + n3;
193605
+ while (i2 < ni) {
193606
+ tree2[i2] = ll;
193607
+ i2++;
193608
+ }
193609
+ }
193610
+ }
193611
+ return pos;
193612
+ }
193613
+ function _copyOut(src2, off, len2, tree2) {
193614
+ var mx = 0, i2 = 0, tl2 = tree2.length >>> 1;
193615
+ while (i2 < len2) {
193616
+ var v = src2[i2 + off];
193617
+ tree2[i2 << 1] = 0;
193618
+ tree2[(i2 << 1) + 1] = v;
193619
+ if (v > mx)
193620
+ mx = v;
193621
+ i2++;
193622
+ }
193623
+ while (i2 < tl2) {
193624
+ tree2[i2 << 1] = 0;
193625
+ tree2[(i2 << 1) + 1] = 0;
193626
+ i2++;
193627
+ }
193628
+ return mx;
193629
+ }
193630
+ function makeCodes(tree2, MAX_BITS2) {
193631
+ var max_code = tree2.length;
193632
+ var code, bits, n3, i2, len2;
193633
+ var bl_count = U.bl_count;
193634
+ for (var i2 = 0; i2 <= MAX_BITS2; i2++)
193635
+ bl_count[i2] = 0;
193636
+ for (i2 = 1; i2 < max_code; i2 += 2)
193637
+ bl_count[tree2[i2]]++;
193638
+ var next_code = U.next_code;
193639
+ code = 0;
193640
+ bl_count[0] = 0;
193641
+ for (bits = 1; bits <= MAX_BITS2; bits++) {
193642
+ code = code + bl_count[bits - 1] << 1;
193643
+ next_code[bits] = code;
193644
+ }
193645
+ for (n3 = 0; n3 < max_code; n3 += 2) {
193646
+ len2 = tree2[n3 + 1];
193647
+ if (len2 != 0) {
193648
+ tree2[n3] = next_code[len2];
193649
+ next_code[len2]++;
193650
+ }
193651
+ }
193652
+ }
193653
+ function codes2map(tree2, MAX_BITS2, map2) {
193654
+ var max_code = tree2.length;
193655
+ var r15 = U.rev15;
193656
+ for (var i2 = 0; i2 < max_code; i2 += 2)
193657
+ if (tree2[i2 + 1] != 0) {
193658
+ var lit = i2 >> 1;
193659
+ var cl = tree2[i2 + 1], val = lit << 4 | cl;
193660
+ var rest = MAX_BITS2 - cl, i0 = tree2[i2] << rest, i1 = i0 + (1 << rest);
193661
+ while (i0 != i1) {
193662
+ var p02 = r15[i0] >>> 15 - MAX_BITS2;
193663
+ map2[p02] = val;
193664
+ i0++;
193665
+ }
193666
+ }
193667
+ }
193668
+ function revCodes(tree2, MAX_BITS2) {
193669
+ var r15 = U.rev15, imb = 15 - MAX_BITS2;
193670
+ for (var i2 = 0; i2 < tree2.length; i2 += 2) {
193671
+ var i0 = tree2[i2] << MAX_BITS2 - tree2[i2 + 1];
193672
+ tree2[i2] = r15[i0] >>> imb;
193673
+ }
193674
+ }
193675
+ function _bitsE(dt, pos, length2) {
193676
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8) >>> (pos & 7) & (1 << length2) - 1;
193677
+ }
193678
+ function _bitsF(dt, pos, length2) {
193679
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7) & (1 << length2) - 1;
193680
+ }
193681
+ function _get17(dt, pos) {
193682
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7);
193683
+ }
193684
+ const U = function() {
193685
+ var u16 = Uint16Array, u32 = Uint32Array;
193686
+ return {
193687
+ next_code: new u16(16),
193688
+ bl_count: new u16(16),
193689
+ ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
193690
+ of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999],
193691
+ exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],
193692
+ ldef: new u16(32),
193693
+ df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535],
193694
+ dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],
193695
+ ddef: new u32(32),
193696
+ flmap: new u16(512),
193697
+ fltree: [],
193698
+ fdmap: new u16(32),
193699
+ fdtree: [],
193700
+ lmap: new u16(32768),
193701
+ ltree: [],
193702
+ ttree: [],
193703
+ dmap: new u16(32768),
193704
+ dtree: [],
193705
+ imap: new u16(512),
193706
+ itree: [],
193707
+ //rev9 : new u16( 512)
193708
+ rev15: new u16(1 << 15),
193709
+ lhst: new u32(286),
193710
+ dhst: new u32(30),
193711
+ ihst: new u32(19),
193712
+ lits: new u32(15e3),
193713
+ strt: new u16(1 << 16),
193714
+ prev: new u16(1 << 15)
193715
+ };
193716
+ }();
193717
+ (function() {
193718
+ var len2 = 1 << 15;
193719
+ for (var i2 = 0; i2 < len2; i2++) {
193720
+ var x2 = i2;
193721
+ x2 = (x2 & 2863311530) >>> 1 | (x2 & 1431655765) << 1;
193722
+ x2 = (x2 & 3435973836) >>> 2 | (x2 & 858993459) << 2;
193723
+ x2 = (x2 & 4042322160) >>> 4 | (x2 & 252645135) << 4;
193724
+ x2 = (x2 & 4278255360) >>> 8 | (x2 & 16711935) << 8;
193725
+ U.rev15[i2] = (x2 >>> 16 | x2 << 16) >>> 17;
193726
+ }
193727
+ function pushV(tgt, n3, sv) {
193728
+ while (n3-- != 0)
193729
+ tgt.push(0, sv);
193730
+ }
193731
+ for (var i2 = 0; i2 < 32; i2++) {
193732
+ U.ldef[i2] = U.of0[i2] << 3 | U.exb[i2];
193733
+ U.ddef[i2] = U.df0[i2] << 4 | U.dxb[i2];
193734
+ }
193735
+ pushV(U.fltree, 144, 8);
193736
+ pushV(U.fltree, 255 - 143, 9);
193737
+ pushV(U.fltree, 279 - 255, 7);
193738
+ pushV(U.fltree, 287 - 279, 8);
193739
+ makeCodes(U.fltree, 9);
193740
+ codes2map(U.fltree, 9, U.flmap);
193741
+ revCodes(U.fltree, 9);
193742
+ pushV(U.fdtree, 32, 5);
193743
+ makeCodes(U.fdtree, 5);
193744
+ codes2map(U.fdtree, 5, U.fdmap);
193745
+ revCodes(U.fdtree, 5);
193746
+ pushV(U.itree, 19, 0);
193747
+ pushV(U.ltree, 286, 0);
193748
+ pushV(U.dtree, 30, 0);
193749
+ pushV(U.ttree, 320, 0);
193750
+ })();
193751
+ const crc = {
193752
+ table: function() {
193753
+ var tab = new Uint32Array(256);
193754
+ for (var n3 = 0; n3 < 256; n3++) {
193755
+ var c2 = n3;
193756
+ for (var k = 0; k < 8; k++) {
193757
+ if (c2 & 1)
193758
+ c2 = 3988292384 ^ c2 >>> 1;
193759
+ else
193760
+ c2 = c2 >>> 1;
193761
+ }
193762
+ tab[n3] = c2;
193763
+ }
193764
+ return tab;
193765
+ }(),
193766
+ update: function(c2, buf, off, len2) {
193767
+ for (var i2 = 0; i2 < len2; i2++)
193768
+ c2 = crc.table[(c2 ^ buf[off + i2]) & 255] ^ c2 >>> 8;
193769
+ return c2;
193770
+ },
193771
+ crc: function(b2, o2, l2) {
193772
+ return crc.update(4294967295, b2, o2, l2) ^ 4294967295;
193773
+ }
193774
+ };
193775
+ function inflateRaw(file, buf) {
193776
+ return inflate(file, buf);
193777
+ }
193778
+ const config2 = {
193779
+ numWorkers: 1,
193780
+ workerURL: "",
193781
+ useWorkers: false
193782
+ };
193783
+ let nextId = 0;
193784
+ const waitingForWorkerQueue = [];
193785
+ function startWorker(url) {
193786
+ return new Promise((resolve2, reject) => {
193787
+ const worker = new Worker(url);
193788
+ worker.onmessage = (e3) => {
193789
+ if (e3.data === "start") {
193790
+ worker.onerror = void 0;
193791
+ worker.onmessage = void 0;
193792
+ resolve2(worker);
193793
+ } else {
193794
+ reject(new Error(`unexpected message: ${e3.data}`));
193795
+ }
193796
+ };
193797
+ worker.onerror = reject;
193798
+ });
193799
+ }
193800
+ function dynamicRequire(mod2, request2) {
193801
+ return mod2.require ? mod2.require(request2) : {};
193802
+ }
193803
+ (function() {
193804
+ if (isNode) {
193805
+ const { Worker: Worker3 } = dynamicRequire(module, "worker_threads");
193806
+ return {
193807
+ async createWorker(url) {
193808
+ return new Worker3(url);
193809
+ },
193810
+ addEventListener(worker, fn) {
193811
+ worker.on("message", (data2) => {
193812
+ fn({ target: worker, data: data2 });
193813
+ });
193814
+ },
193815
+ async terminate(worker) {
193816
+ await worker.terminate();
193817
+ }
193818
+ };
193819
+ } else {
193820
+ return {
193821
+ async createWorker(url) {
193822
+ try {
193823
+ const worker = await startWorker(url);
193824
+ return worker;
193825
+ } catch (e3) {
193826
+ console.warn("could not load worker:", url);
193827
+ }
193828
+ let text2;
193829
+ try {
193830
+ const req = await fetch(url, { mode: "cors" });
193831
+ if (!req.ok) {
193832
+ throw new Error(`could not load: ${url}`);
193833
+ }
193834
+ text2 = await req.text();
193835
+ url = URL.createObjectURL(new Blob([text2], { type: "application/javascript" }));
193836
+ const worker = await startWorker(url);
193837
+ config2.workerURL = url;
193838
+ return worker;
193839
+ } catch (e3) {
193840
+ console.warn("could not load worker via fetch:", url);
193841
+ }
193842
+ if (text2 !== void 0) {
193843
+ try {
193844
+ url = `data:application/javascript;base64,${btoa(text2)}`;
193845
+ const worker = await startWorker(url);
193846
+ config2.workerURL = url;
193847
+ return worker;
193848
+ } catch (e3) {
193849
+ console.warn("could not load worker via dataURI");
193850
+ }
193851
+ }
193852
+ console.warn("workers will not be used");
193853
+ throw new Error("can not start workers");
193854
+ },
193855
+ addEventListener(worker, fn) {
193856
+ worker.addEventListener("message", fn);
193857
+ },
193858
+ async terminate(worker) {
193859
+ worker.terminate();
193860
+ }
193861
+ };
193862
+ }
193863
+ })();
193864
+ function inflateRawLocal(src2, uncompressedSize, type2, resolve2) {
193865
+ const dst = new Uint8Array(uncompressedSize);
193866
+ inflateRaw(src2, dst);
193867
+ resolve2(type2 ? new Blob([dst], { type: type2 }) : dst.buffer);
193868
+ }
193869
+ async function processWaitingForWorkerQueue() {
193870
+ if (waitingForWorkerQueue.length === 0) {
193871
+ return;
193872
+ }
193873
+ while (waitingForWorkerQueue.length) {
193874
+ const { src: src2, uncompressedSize, type: type2, resolve: resolve2 } = waitingForWorkerQueue.shift();
193875
+ let data2 = src2;
193876
+ if (isBlob(src2)) {
193877
+ data2 = await readBlobAsUint8Array(src2);
193878
+ }
193879
+ inflateRawLocal(data2, uncompressedSize, type2, resolve2);
193880
+ }
193881
+ }
193882
+ function inflateRawAsync(src2, uncompressedSize, type2) {
193883
+ return new Promise((resolve2, reject) => {
193884
+ waitingForWorkerQueue.push({ src: src2, uncompressedSize, type: type2, resolve: resolve2, reject, id: nextId++ });
193885
+ processWaitingForWorkerQueue();
193886
+ });
193887
+ }
193888
+ function dosDateTimeToDate(date2, time2) {
193889
+ const day2 = date2 & 31;
193890
+ const month2 = (date2 >> 5 & 15) - 1;
193891
+ const year2 = (date2 >> 9 & 127) + 1980;
193892
+ const millisecond2 = 0;
193893
+ const second2 = (time2 & 31) * 2;
193894
+ const minute2 = time2 >> 5 & 63;
193895
+ const hour2 = time2 >> 11 & 31;
193896
+ return new Date(year2, month2, day2, hour2, minute2, second2, millisecond2);
193897
+ }
193898
+ class ZipEntry {
193899
+ constructor(reader, rawEntry) {
193900
+ this._reader = reader;
193901
+ this._rawEntry = rawEntry;
193902
+ this.name = rawEntry.name;
193903
+ this.nameBytes = rawEntry.nameBytes;
193904
+ this.size = rawEntry.uncompressedSize;
193905
+ this.compressedSize = rawEntry.compressedSize;
193906
+ this.comment = rawEntry.comment;
193907
+ this.commentBytes = rawEntry.commentBytes;
193908
+ this.compressionMethod = rawEntry.compressionMethod;
193909
+ this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);
193910
+ this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith("/");
193911
+ this.encrypted = !!(rawEntry.generalPurposeBitFlag & 1);
193912
+ this.externalFileAttributes = rawEntry.externalFileAttributes;
193913
+ this.versionMadeBy = rawEntry.versionMadeBy;
193914
+ }
193915
+ // returns a promise that returns a Blob for this entry
193916
+ async blob(type2 = "application/octet-stream") {
193917
+ return await readEntryDataAsBlob(this._reader, this._rawEntry, type2);
193918
+ }
193919
+ // returns a promise that returns an ArrayBuffer for this entry
193920
+ async arrayBuffer() {
193921
+ return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);
193922
+ }
193923
+ // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself
193924
+ async text() {
193925
+ const buffer2 = await this.arrayBuffer();
193926
+ return decodeBuffer(new Uint8Array(buffer2));
193927
+ }
193928
+ // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself
193929
+ async json() {
193930
+ const text2 = await this.text();
193931
+ return JSON.parse(text2);
193932
+ }
193933
+ }
193934
+ const EOCDR_WITHOUT_COMMENT_SIZE = 22;
193935
+ const MAX_COMMENT_SIZE = 65535;
193936
+ const EOCDR_SIGNATURE = 101010256;
193937
+ const ZIP64_EOCDR_SIGNATURE = 101075792;
193938
+ async function readAs(reader, offset6, length2) {
193939
+ return await reader.read(offset6, length2);
193940
+ }
193941
+ async function readAsBlobOrTypedArray(reader, offset6, length2, type2) {
193942
+ if (reader.sliceAsBlob) {
193943
+ return await reader.sliceAsBlob(offset6, length2, type2);
193944
+ }
193945
+ return await reader.read(offset6, length2);
193946
+ }
193947
+ const crc$1 = {
193948
+ unsigned() {
193949
+ return 0;
193950
+ }
193951
+ };
193952
+ function getUint16LE(uint8View, offset6) {
193953
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256;
193954
+ }
193955
+ function getUint32LE(uint8View, offset6) {
193956
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256 + uint8View[offset6 + 2] * 65536 + uint8View[offset6 + 3] * 16777216;
193957
+ }
193958
+ function getUint64LE(uint8View, offset6) {
193959
+ return getUint32LE(uint8View, offset6) + getUint32LE(uint8View, offset6 + 4) * 4294967296;
193960
+ }
193961
+ const utf8Decoder = new TextDecoder();
193962
+ function decodeBuffer(uint8View, isUTF8) {
193963
+ if (isSharedArrayBuffer(uint8View.buffer)) {
193964
+ uint8View = new Uint8Array(uint8View);
193965
+ }
193966
+ return utf8Decoder.decode(uint8View);
193967
+ }
193968
+ async function findEndOfCentralDirector(reader, totalLength) {
193969
+ const size2 = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);
193970
+ const readStart = totalLength - size2;
193971
+ const data2 = await readAs(reader, readStart, size2);
193972
+ for (let i2 = size2 - EOCDR_WITHOUT_COMMENT_SIZE; i2 >= 0; --i2) {
193973
+ if (getUint32LE(data2, i2) !== EOCDR_SIGNATURE) {
193974
+ continue;
193975
+ }
193976
+ const eocdr = new Uint8Array(data2.buffer, data2.byteOffset + i2, data2.byteLength - i2);
193977
+ const diskNumber = getUint16LE(eocdr, 4);
193978
+ if (diskNumber !== 0) {
193979
+ throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);
193980
+ }
193981
+ const entryCount = getUint16LE(eocdr, 10);
193982
+ const centralDirectorySize = getUint32LE(eocdr, 12);
193983
+ const centralDirectoryOffset = getUint32LE(eocdr, 16);
193984
+ const commentLength = getUint16LE(eocdr, 20);
193985
+ const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;
193986
+ if (commentLength !== expectedCommentLength) {
193987
+ throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);
193988
+ }
193989
+ const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);
193990
+ const comment = decodeBuffer(commentBytes);
193991
+ if (entryCount === 65535 || centralDirectoryOffset === 4294967295) {
193992
+ return await readZip64CentralDirectory(reader, readStart + i2, comment, commentBytes);
193993
+ } else {
193994
+ return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
193995
+ }
193996
+ }
193997
+ throw new Error("could not find end of central directory. maybe not zip file");
193998
+ }
193999
+ const END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 117853008;
194000
+ async function readZip64CentralDirectory(reader, offset6, comment, commentBytes) {
194001
+ const zip64EocdlOffset = offset6 - 20;
194002
+ const eocdl = await readAs(reader, zip64EocdlOffset, 20);
194003
+ if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {
194004
+ throw new Error("invalid zip64 end of central directory locator signature");
194005
+ }
194006
+ const zip64EocdrOffset = getUint64LE(eocdl, 8);
194007
+ const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);
194008
+ if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {
194009
+ throw new Error("invalid zip64 end of central directory record signature");
194010
+ }
194011
+ const entryCount = getUint64LE(zip64Eocdr, 32);
194012
+ const centralDirectorySize = getUint64LE(zip64Eocdr, 40);
194013
+ const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);
194014
+ return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
194015
+ }
194016
+ const CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 33639248;
194017
+ async function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {
194018
+ let readEntryCursor = 0;
194019
+ const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);
194020
+ const rawEntries = [];
194021
+ for (let e3 = 0; e3 < rawEntryCount; ++e3) {
194022
+ const buffer2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);
194023
+ const signature = getUint32LE(buffer2, 0);
194024
+ if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {
194025
+ throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);
194026
+ }
194027
+ const rawEntry = {
194028
+ // 4 - Version made by
194029
+ versionMadeBy: getUint16LE(buffer2, 4),
194030
+ // 6 - Version needed to extract (minimum)
194031
+ versionNeededToExtract: getUint16LE(buffer2, 6),
194032
+ // 8 - General purpose bit flag
194033
+ generalPurposeBitFlag: getUint16LE(buffer2, 8),
194034
+ // 10 - Compression method
194035
+ compressionMethod: getUint16LE(buffer2, 10),
194036
+ // 12 - File last modification time
194037
+ lastModFileTime: getUint16LE(buffer2, 12),
194038
+ // 14 - File last modification date
194039
+ lastModFileDate: getUint16LE(buffer2, 14),
194040
+ // 16 - CRC-32
194041
+ crc32: getUint32LE(buffer2, 16),
194042
+ // 20 - Compressed size
194043
+ compressedSize: getUint32LE(buffer2, 20),
194044
+ // 24 - Uncompressed size
194045
+ uncompressedSize: getUint32LE(buffer2, 24),
194046
+ // 28 - File name length (n)
194047
+ fileNameLength: getUint16LE(buffer2, 28),
194048
+ // 30 - Extra field length (m)
194049
+ extraFieldLength: getUint16LE(buffer2, 30),
194050
+ // 32 - File comment length (k)
194051
+ fileCommentLength: getUint16LE(buffer2, 32),
194052
+ // 34 - Disk number where file starts
194053
+ // 36 - Internal file attributes
194054
+ internalFileAttributes: getUint16LE(buffer2, 36),
194055
+ // 38 - External file attributes
194056
+ externalFileAttributes: getUint32LE(buffer2, 38),
194057
+ // 42 - Relative offset of local file header
194058
+ relativeOffsetOfLocalHeader: getUint32LE(buffer2, 42)
194059
+ };
194060
+ if (rawEntry.generalPurposeBitFlag & 64) {
194061
+ throw new Error("strong encryption is not supported");
194062
+ }
194063
+ readEntryCursor += 46;
194064
+ const data2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);
194065
+ rawEntry.nameBytes = data2.slice(0, rawEntry.fileNameLength);
194066
+ rawEntry.name = decodeBuffer(rawEntry.nameBytes);
194067
+ const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;
194068
+ const extraFieldBuffer = data2.slice(rawEntry.fileNameLength, fileCommentStart);
194069
+ rawEntry.extraFields = [];
194070
+ let i2 = 0;
194071
+ while (i2 < extraFieldBuffer.length - 3) {
194072
+ const headerId = getUint16LE(extraFieldBuffer, i2 + 0);
194073
+ const dataSize = getUint16LE(extraFieldBuffer, i2 + 2);
194074
+ const dataStart = i2 + 4;
194075
+ const dataEnd = dataStart + dataSize;
194076
+ if (dataEnd > extraFieldBuffer.length) {
194077
+ throw new Error("extra field length exceeds extra field buffer size");
194078
+ }
194079
+ rawEntry.extraFields.push({
194080
+ id: headerId,
194081
+ data: extraFieldBuffer.slice(dataStart, dataEnd)
194082
+ });
194083
+ i2 = dataEnd;
194084
+ }
194085
+ rawEntry.commentBytes = data2.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);
194086
+ rawEntry.comment = decodeBuffer(rawEntry.commentBytes);
194087
+ readEntryCursor += data2.length;
194088
+ if (rawEntry.uncompressedSize === 4294967295 || rawEntry.compressedSize === 4294967295 || rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
194089
+ const zip64ExtraField = rawEntry.extraFields.find((e4) => e4.id === 1);
194090
+ if (!zip64ExtraField) {
194091
+ throw new Error("expected zip64 extended information extra field");
194092
+ }
194093
+ const zip64EiefBuffer = zip64ExtraField.data;
194094
+ let index2 = 0;
194095
+ if (rawEntry.uncompressedSize === 4294967295) {
194096
+ if (index2 + 8 > zip64EiefBuffer.length) {
194097
+ throw new Error("zip64 extended information extra field does not include uncompressed size");
194098
+ }
194099
+ rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index2);
194100
+ index2 += 8;
194101
+ }
194102
+ if (rawEntry.compressedSize === 4294967295) {
194103
+ if (index2 + 8 > zip64EiefBuffer.length) {
194104
+ throw new Error("zip64 extended information extra field does not include compressed size");
194105
+ }
194106
+ rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index2);
194107
+ index2 += 8;
194108
+ }
194109
+ if (rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
194110
+ if (index2 + 8 > zip64EiefBuffer.length) {
194111
+ throw new Error("zip64 extended information extra field does not include relative header offset");
194112
+ }
194113
+ rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index2);
194114
+ index2 += 8;
194115
+ }
194116
+ }
194117
+ const nameField = rawEntry.extraFields.find((e4) => e4.id === 28789 && e4.data.length >= 6 && // too short to be meaningful
194118
+ e4.data[0] === 1 && // Version 1 byte version of this extra field, currently 1
194119
+ getUint32LE(e4.data, 1), crc$1.unsigned(rawEntry.nameBytes));
194120
+ if (nameField) {
194121
+ rawEntry.fileName = decodeBuffer(nameField.data.slice(5));
194122
+ }
194123
+ if (rawEntry.compressionMethod === 0) {
194124
+ let expectedCompressedSize = rawEntry.uncompressedSize;
194125
+ if ((rawEntry.generalPurposeBitFlag & 1) !== 0) {
194126
+ expectedCompressedSize += 12;
194127
+ }
194128
+ if (rawEntry.compressedSize !== expectedCompressedSize) {
194129
+ throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);
194130
+ }
194131
+ }
194132
+ rawEntries.push(rawEntry);
194133
+ }
194134
+ const zip2 = {
194135
+ comment,
194136
+ commentBytes
194137
+ };
194138
+ return {
194139
+ zip: zip2,
194140
+ entries: rawEntries.map((e3) => new ZipEntry(reader, e3))
194141
+ };
194142
+ }
194143
+ async function readEntryDataHeader(reader, rawEntry) {
194144
+ if (rawEntry.generalPurposeBitFlag & 1) {
194145
+ throw new Error("encrypted entries not supported");
194146
+ }
194147
+ const buffer2 = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);
194148
+ const totalLength = await reader.getLength();
194149
+ const signature = getUint32LE(buffer2, 0);
194150
+ if (signature !== 67324752) {
194151
+ throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);
194152
+ }
194153
+ const fileNameLength = getUint16LE(buffer2, 26);
194154
+ const extraFieldLength = getUint16LE(buffer2, 28);
194155
+ const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer2.length + fileNameLength + extraFieldLength;
194156
+ let decompress;
194157
+ if (rawEntry.compressionMethod === 0) {
194158
+ decompress = false;
194159
+ } else if (rawEntry.compressionMethod === 8) {
194160
+ decompress = true;
194161
+ } else {
194162
+ throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);
194163
+ }
194164
+ const fileDataStart = localFileHeaderEnd;
194165
+ const fileDataEnd = fileDataStart + rawEntry.compressedSize;
194166
+ if (rawEntry.compressedSize !== 0) {
194167
+ if (fileDataEnd > totalLength) {
194168
+ throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);
194169
+ }
194170
+ }
194171
+ return {
194172
+ decompress,
194173
+ fileDataStart
194174
+ };
194175
+ }
194176
+ async function readEntryDataAsArrayBuffer(reader, rawEntry) {
194177
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
194178
+ if (!decompress) {
194179
+ const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);
194180
+ return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;
194181
+ }
194182
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
194183
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);
194184
+ return result;
194185
+ }
194186
+ async function readEntryDataAsBlob(reader, rawEntry, type2) {
194187
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
194188
+ if (!decompress) {
194189
+ const typedArrayOrBlob2 = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type2);
194190
+ if (isBlob(typedArrayOrBlob2)) {
194191
+ return typedArrayOrBlob2;
194192
+ }
194193
+ return new Blob([isSharedArrayBuffer(typedArrayOrBlob2.buffer) ? new Uint8Array(typedArrayOrBlob2) : typedArrayOrBlob2], { type: type2 });
194194
+ }
194195
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
194196
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type2);
194197
+ return result;
194198
+ }
194199
+ async function unzipRaw(source2) {
194200
+ let reader;
194201
+ if (typeof Blob !== "undefined" && source2 instanceof Blob) {
194202
+ reader = new BlobReader$1(source2);
194203
+ } else if (source2 instanceof ArrayBuffer || source2 && source2.buffer && source2.buffer instanceof ArrayBuffer) {
194204
+ reader = new ArrayBufferReader(source2);
194205
+ } else if (isSharedArrayBuffer(source2) || isSharedArrayBuffer(source2.buffer)) {
194206
+ reader = new ArrayBufferReader(source2);
194207
+ } else if (typeof source2 === "string") {
194208
+ const req = await fetch(source2);
194209
+ if (!req.ok) {
194210
+ throw new Error(`failed http request ${source2}, status: ${req.status}: ${req.statusText}`);
194211
+ }
194212
+ const blob = await req.blob();
194213
+ reader = new BlobReader$1(blob);
194214
+ } else if (typeof source2.getLength === "function" && typeof source2.read === "function") {
194215
+ reader = source2;
194216
+ } else {
194217
+ throw new Error("unsupported source type");
194218
+ }
194219
+ const totalLength = await reader.getLength();
194220
+ if (totalLength > Number.MAX_SAFE_INTEGER) {
194221
+ throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);
194222
+ }
194223
+ return await findEndOfCentralDirector(reader, totalLength);
194224
+ }
194225
+ async function unzip(source2) {
194226
+ const { zip: zip2, entries: entries2 } = await unzipRaw(source2);
194227
+ return {
194228
+ zip: zip2,
194229
+ entries: Object.fromEntries(entries2.map((v) => [v.name, v]))
194230
+ };
194231
+ }
194232
+ class BlobReader2 {
194233
+ constructor(blob) {
194234
+ __publicField(this, "blob");
194235
+ this.blob = blob;
194236
+ }
194237
+ async getLength() {
194238
+ return this.blob.size;
194239
+ }
194240
+ async read(offset6, length2) {
194241
+ const blob = this.blob.slice(offset6, offset6 + length2);
194242
+ return new Uint8Array(await blob.arrayBuffer());
194243
+ }
194244
+ }
194245
+ class HTTPRangeReader {
194246
+ constructor(url, opts2 = {}) {
194247
+ __publicField(this, "url");
194248
+ __publicField(this, "length");
194249
+ __privateAdd(this, _overrides2, void 0);
194250
+ this.url = url;
194251
+ __privateSet(this, _overrides2, opts2.overrides ?? {});
194252
+ }
194253
+ async getLength() {
194254
+ if (this.length === void 0) {
194255
+ const req = await fetch(this.url, {
194256
+ ...__privateGet(this, _overrides2),
194257
+ method: "HEAD"
194258
+ });
194259
+ if (!req.ok) {
194260
+ throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
194261
+ }
194262
+ this.length = parseInt(req.headers.get("content-length"));
194263
+ if (Number.isNaN(this.length)) {
194264
+ throw Error("could not get length");
194265
+ }
194266
+ }
194267
+ return this.length;
194268
+ }
194269
+ async read(offset6, size2) {
194270
+ if (size2 === 0) {
194271
+ return new Uint8Array(0);
194272
+ }
194273
+ const req = await fetch_range(this.url, offset6, size2, __privateGet(this, _overrides2));
194274
+ if (!req.ok) {
194275
+ throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset6} size: ${size2}: ${req.statusText}`);
194276
+ }
194277
+ return new Uint8Array(await req.arrayBuffer());
194278
+ }
194279
+ }
194280
+ _overrides2 = new WeakMap();
194281
+ class ZipFileStore {
194282
+ constructor(reader) {
194283
+ __publicField(this, "info");
194284
+ this.info = unzip(reader);
194285
+ }
194286
+ async get(key2) {
194287
+ let entry2 = (await this.info).entries[strip_prefix(key2)];
194288
+ if (!entry2)
194289
+ return;
194290
+ return new Uint8Array(await entry2.arrayBuffer());
194291
+ }
194292
+ async has(key2) {
194293
+ return strip_prefix(key2) in (await this.info).entries;
194294
+ }
194295
+ static fromUrl(href2, opts2 = {}) {
194296
+ return new ZipFileStore(new HTTPRangeReader(href2, opts2));
194297
+ }
194298
+ static fromBlob(blob) {
194299
+ return new ZipFileStore(new BlobReader2(blob));
194300
+ }
194301
+ }
194302
+ const ZipFileStore$1 = ZipFileStore;
194303
+ function zarrOpenRoot(url, fileType, requestInit2) {
194304
+ let store2;
194305
+ if (fileType && fileType.endsWith(".zip")) {
194306
+ store2 = ZipFileStore$1.fromUrl(url, { overrides: requestInit2 });
194307
+ } else {
194308
+ store2 = new FetchStore$1(url, { overrides: requestInit2 });
194309
+ }
193255
194310
  return root(store2);
193256
194311
  }
193257
194312
  function prevPowerOf2(x2) {
@@ -195926,6 +196981,7 @@ function SpatialSubscriber(props2) {
195926
196981
  const [pointMultiObsLabelsData, pointMultiObsLabelsDataStatus] = usePointMultiObsLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
195927
196982
  const [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls] = useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, uuid);
195928
196983
  const [obsSpotsSetsData, obsSpotsSetsDataStatus] = useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders, dataset);
196984
+ const [obsSpotsFeatureLabelsData, obsSpotsFeatureLabelsDataStatus] = useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
195929
196985
  const [spotMultiExpressionData, spotMultiLoadedFeatureSelection, spotMultiExpressionExtents, spotMultiExpressionNormData, spotMultiFeatureSelectionStatus] = useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy, loaders, dataset);
195930
196986
  const [spotMultiIndicesData, spotMultiIndicesDataStatus] = useSpotMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset);
195931
196987
  const [obsSegmentationsLocationsData, obsSegmentationsLocationsDataStatus] = useSegmentationMultiObsLocations(coordinationScopes, coordinationScopesBy, loaders, dataset);
@@ -196260,6 +197316,7 @@ function SpatialSubscriber(props2) {
196260
197316
  spotLayerScopes,
196261
197317
  spotLayerCoordination,
196262
197318
  spotMultiExpressionExtents,
197319
+ spotMultiFeatureLabels: obsSpotsFeatureLabelsData,
196263
197320
  // Points
196264
197321
  pointLayerScopes,
196265
197322
  pointLayerCoordination
@@ -204689,7 +205746,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
204689
205746
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
204690
205747
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
204691
205748
  const LazyHiGlassComponent = React__default.lazy(async () => {
204692
- const { HiGlassComponent } = await import("./hglib-9f6a7eaf.js").then((n3) => n3.h);
205749
+ const { HiGlassComponent } = await import("./hglib-bd5b112f.js").then((n3) => n3.h);
204693
205750
  return { default: HiGlassComponent };
204694
205751
  });
204695
205752
  const HG_SIZE = 800;
@@ -209798,23 +210855,29 @@ function CellSetExpressionPlotSubscriber(props2) {
209798
210855
  const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, jitter: jitter2 = false, yMin = null, yUnits = null } = props2;
209799
210856
  const classes = useStyles$1();
209800
210857
  const loaders = useLoaders();
209801
- const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
210858
+ const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, sampleType }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
209802
210859
  const [width2, height2, containerRef] = useGridItemSize();
209803
210860
  const transformOptions = VALUE_TRANSFORM_OPTIONS;
209804
210861
  const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
209805
210862
  const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
209806
210863
  const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
209807
210864
  const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
210865
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
210866
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
209808
210867
  const isReady = useReady([
209809
210868
  featureSelectionStatus,
209810
210869
  matrixIndicesStatus,
209811
210870
  obsSetsStatus,
209812
- featureLabelsStatus
210871
+ featureLabelsStatus,
210872
+ sampleSetsStatus,
210873
+ sampleEdgesStatus
209813
210874
  ]);
209814
210875
  const urls2 = useUrls([
209815
210876
  featureLabelsUrls,
209816
210877
  matrixIndicesUrls,
209817
- obsSetsUrls
210878
+ obsSetsUrls,
210879
+ sampleSetsUrls,
210880
+ sampleEdgesUrls
209818
210881
  ]);
209819
210882
  const [expressionArr, setArr] = useExpressionByCellSet(expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, theme);
209820
210883
  const firstGeneSelected = geneSelection && geneSelection.length >= 1 ? (featureLabelsMap == null ? void 0 : featureLabelsMap.get(geneSelection[0])) || geneSelection[0] : null;
@@ -262950,6 +264013,40 @@ class ObsSetsCsvLoader extends CsvLoader {
262950
264013
  }, url, coordinationValues));
262951
264014
  }
262952
264015
  }
264016
+ class SampleSetsCsvLoader extends CsvLoader {
264017
+ loadFromCache(data2) {
264018
+ if (this.cachedResult) {
264019
+ return this.cachedResult;
264020
+ }
264021
+ const { sampleIndex: indexCol, sampleSets: setsArr } = this.options;
264022
+ const obsIndex = data2.map((d) => String(d[indexCol]));
264023
+ const setsCols = setsArr.map(({ column }) => column);
264024
+ const cellSetIds = setsCols.map((setCol) => Array.isArray(setCol) ? setCol.map((subCol) => data2.map((d) => d[subCol])) : data2.map((d) => d[setCol]));
264025
+ const scoresCols = setsArr.map((option) => option.scorePath || void 0);
264026
+ const cellSetScores = scoresCols.map((scoreCol) => scoreCol ? data2.map((d) => d[scoreCol]) : void 0);
264027
+ const obsIndices = cellSetIds.map(() => obsIndex);
264028
+ const cellSetsTree = dataToCellSetsTree([
264029
+ obsIndices,
264030
+ cellSetIds,
264031
+ cellSetScores
264032
+ ], setsArr);
264033
+ const obsSetsMembership = treeToMembershipMap(cellSetsTree);
264034
+ return [obsIndex, cellSetsTree, obsSetsMembership];
264035
+ }
264036
+ async load() {
264037
+ const payload = await this.getSourceData().catch((reason) => Promise.resolve(reason));
264038
+ if (payload instanceof AbstractLoaderError) {
264039
+ return Promise.reject(payload);
264040
+ }
264041
+ const { data: data2, url } = payload;
264042
+ const [obsIndex, cellSetsTree, obsSetsMembership] = this.loadFromCache(data2);
264043
+ return Promise.resolve(new LoaderResult({
264044
+ sampleIndex: obsIndex,
264045
+ sampleSets: cellSetsTree,
264046
+ sampleSetsMembership: obsSetsMembership
264047
+ }, url));
264048
+ }
264049
+ }
262953
264050
  class JsonSource {
262954
264051
  constructor({ url, requestInit: requestInit2 }) {
262955
264052
  this.url = url;
@@ -263405,7 +264502,7 @@ async function initLoader(imageData) {
263405
264502
  const { dimensions, isPyramid, transform: transform3 } = metadata2 || {};
263406
264503
  const labels2 = dimensions.map((d) => d.field);
263407
264504
  let source2;
263408
- const root2 = await zarrOpenRoot(url, requestInit2);
264505
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
263409
264506
  if (isPyramid) {
263410
264507
  const metadataUrl = `${url}${url.slice(-1) === "/" ? "" : "/"}.zmetadata`;
263411
264508
  const response = await fetch(metadataUrl);
@@ -263443,7 +264540,7 @@ async function initLoader(imageData) {
263443
264540
  }
263444
264541
  case "ome-zarr": {
263445
264542
  const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata2 || {};
263446
- const root2 = await zarrOpenRoot(url, requestInit2);
264543
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
263447
264544
  const loader2 = await loadOmeZarr(root2);
263448
264545
  const { metadata: loaderMetadata } = loader2;
263449
264546
  const { omero, multiscales } = loaderMetadata;
@@ -263573,11 +264670,11 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
263573
264670
  }
263574
264671
  }
263575
264672
  class ZarrDataSource {
263576
- constructor({ url, requestInit: requestInit2, store: store2 }) {
264673
+ constructor({ url, requestInit: requestInit2, store: store2, fileType }) {
263577
264674
  if (store2) {
263578
264675
  this.storeRoot = root(store2);
263579
264676
  } else {
263580
- this.storeRoot = zarrOpenRoot(url, requestInit2);
264677
+ this.storeRoot = zarrOpenRoot(url, fileType, requestInit2);
263581
264678
  }
263582
264679
  }
263583
264680
  getStoreRoot(path2) {
@@ -264748,6 +265845,35 @@ class ObsFeatureColumnsAnndataLoader extends AbstractTwoStepLoader {
264748
265845
  ]).then(([{ obsIndex, obsFeatureMatrix, featureIndex }]) => Promise.resolve(new LoaderResult({ obsIndex, obsFeatureMatrix, featureIndex }, null)));
264749
265846
  }
264750
265847
  }
265848
+ class SampleEdgesAnndataLoader extends AbstractTwoStepLoader {
265849
+ /**
265850
+ * Class method for loading observation string labels.
265851
+ * @returns {Promise} A promise for the array.
265852
+ */
265853
+ loadLabels() {
265854
+ const { path: path2 } = this.options;
265855
+ if (this.labels) {
265856
+ return this.labels;
265857
+ }
265858
+ if (!this.labels) {
265859
+ this.labels = this.dataSource._loadColumn(path2);
265860
+ return this.labels;
265861
+ }
265862
+ this.labels = Promise.resolve(null);
265863
+ return this.labels;
265864
+ }
265865
+ async load() {
265866
+ const { path: path2 } = this.options;
265867
+ const superResult = await super.load().catch((reason) => Promise.resolve(reason));
265868
+ if (superResult instanceof AbstractLoaderError) {
265869
+ return Promise.reject(superResult);
265870
+ }
265871
+ return Promise.all([
265872
+ this.dataSource.loadObsIndex(path2),
265873
+ this.loadLabels()
265874
+ ]).then(([obsIndex, sampleIds]) => Promise.resolve(new LoaderResult({ obsIndex, sampleIds }, null)));
265875
+ }
265876
+ }
264751
265877
  class ImageWrapper {
264752
265878
  constructor(vivLoader, options) {
264753
265879
  __publicField(this, "vivLoader");
@@ -265201,7 +266327,7 @@ class SpatialDataLabelsLoader extends SpatialDataImageLoader {
265201
266327
  };
265202
266328
  const imageWrapper = result.data.obsSegmentations.instance;
265203
266329
  const channelObjects = imageWrapper.getChannelObjects();
265204
- const channelCoordination = channelObjects.slice(0, 5).map((channelObj, i2) => ({
266330
+ const channelCoordination = channelObjects.slice(0, 7).map((channelObj, i2) => ({
265205
266331
  spatialTargetC: i2,
265206
266332
  // obsType: channelObj.name,
265207
266333
  spatialChannelColor: (channelObj.defaultColor || channelObj.autoDefaultColor).slice(0, 3),
@@ -265506,8 +266632,18 @@ const expectedCoordinationTypes = [
265506
266632
  "obsLabelsType",
265507
266633
  "embeddingType"
265508
266634
  ];
266635
+ function createGetFileType(jointFileType) {
266636
+ return (fileType) => {
266637
+ var _a3;
266638
+ if (jointFileType.endsWith(".zip") && ((_a3 = ALT_ZARR_STORE_TYPES[fileType]) == null ? void 0 : _a3.zip)) {
266639
+ return ALT_ZARR_STORE_TYPES[fileType].zip;
266640
+ }
266641
+ return fileType;
266642
+ };
266643
+ }
265509
266644
  function expandAnndataZarr(fileDef) {
265510
266645
  var _a3, _b2, _c2;
266646
+ const getFileType = createGetFileType(fileDef.fileType);
265511
266647
  const baseFileDef = {
265512
266648
  url: fileDef.url,
265513
266649
  requestInit: fileDef.requestInit,
@@ -265529,7 +266665,7 @@ function expandAnndataZarr(fileDef) {
265529
266665
  // obsFeatureMatrix
265530
266666
  ...options.obsFeatureMatrix ? [{
265531
266667
  ...baseFileDef,
265532
- fileType: FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
266668
+ fileType: getFileType(FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR),
265533
266669
  options: options.obsFeatureMatrix,
265534
266670
  coordinationValues: {
265535
266671
  ...extraCoordinationValues,
@@ -265541,7 +266677,7 @@ function expandAnndataZarr(fileDef) {
265541
266677
  // obsSets
265542
266678
  ...options.obsSets ? [{
265543
266679
  ...baseFileDef,
265544
- fileType: FileType$1.OBS_SETS_ANNDATA_ZARR,
266680
+ fileType: getFileType(FileType$1.OBS_SETS_ANNDATA_ZARR),
265545
266681
  options: options.obsSets,
265546
266682
  coordinationValues: {
265547
266683
  ...extraCoordinationValues,
@@ -265551,7 +266687,7 @@ function expandAnndataZarr(fileDef) {
265551
266687
  // obsSpots
265552
266688
  ...options.obsSpots ? [{
265553
266689
  ...baseFileDef,
265554
- fileType: FileType$1.OBS_SPOTS_ANNDATA_ZARR,
266690
+ fileType: getFileType(FileType$1.OBS_SPOTS_ANNDATA_ZARR),
265555
266691
  options: options.obsSpots,
265556
266692
  coordinationValues: {
265557
266693
  ...extraCoordinationValues,
@@ -265561,7 +266697,7 @@ function expandAnndataZarr(fileDef) {
265561
266697
  // obsPoints
265562
266698
  ...options.obsPoints ? [{
265563
266699
  ...baseFileDef,
265564
- fileType: FileType$1.OBS_POINTS_ANNDATA_ZARR,
266700
+ fileType: getFileType(FileType$1.OBS_POINTS_ANNDATA_ZARR),
265565
266701
  options: options.obsPoints,
265566
266702
  coordinationValues: {
265567
266703
  ...extraCoordinationValues,
@@ -265571,7 +266707,7 @@ function expandAnndataZarr(fileDef) {
265571
266707
  // obsLocations
265572
266708
  ...options.obsLocations ? [{
265573
266709
  ...baseFileDef,
265574
- fileType: FileType$1.OBS_LOCATIONS_ANNDATA_ZARR,
266710
+ fileType: getFileType(FileType$1.OBS_LOCATIONS_ANNDATA_ZARR),
265575
266711
  options: options.obsLocations,
265576
266712
  coordinationValues: {
265577
266713
  ...extraCoordinationValues,
@@ -265581,7 +266717,7 @@ function expandAnndataZarr(fileDef) {
265581
266717
  // obsSegmentations
265582
266718
  ...options.obsSegmentations ? [{
265583
266719
  ...baseFileDef,
265584
- fileType: FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR,
266720
+ fileType: getFileType(FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR),
265585
266721
  options: options.obsSegmentations,
265586
266722
  coordinationValues: {
265587
266723
  ...extraCoordinationValues,
@@ -265593,7 +266729,7 @@ function expandAnndataZarr(fileDef) {
265593
266729
  ...options.obsEmbedding ? Array.isArray(options.obsEmbedding) ? options.obsEmbedding.map((oe) => ({
265594
266730
  // obsEmbedding was an array, process each element.
265595
266731
  ...baseFileDef,
265596
- fileType: FileType$1.OBS_EMBEDDING_ANNDATA_ZARR,
266732
+ fileType: getFileType(FileType$1.OBS_EMBEDDING_ANNDATA_ZARR),
265597
266733
  options: {
265598
266734
  path: oe.path,
265599
266735
  dims: oe.dims
@@ -265607,7 +266743,7 @@ function expandAnndataZarr(fileDef) {
265607
266743
  })) : [{
265608
266744
  // obsEmbedding was an object.
265609
266745
  ...baseFileDef,
265610
- fileType: FileType$1.OBS_EMBEDDING_ANNDATA_ZARR,
266746
+ fileType: getFileType(FileType$1.OBS_EMBEDDING_ANNDATA_ZARR),
265611
266747
  options: options.obsEmbedding,
265612
266748
  coordinationValues: {
265613
266749
  ...extraCoordinationValues,
@@ -265620,7 +266756,7 @@ function expandAnndataZarr(fileDef) {
265620
266756
  ...options.obsLabels ? Array.isArray(options.obsLabels) ? options.obsLabels.map((ol) => ({
265621
266757
  // obsLabels was an array, process each element.
265622
266758
  ...baseFileDef,
265623
- fileType: FileType$1.OBS_LABELS_ANNDATA_ZARR,
266759
+ fileType: getFileType(FileType$1.OBS_LABELS_ANNDATA_ZARR),
265624
266760
  options: {
265625
266761
  path: ol.path
265626
266762
  },
@@ -265633,7 +266769,7 @@ function expandAnndataZarr(fileDef) {
265633
266769
  })) : [{
265634
266770
  // obsLabels was an object.
265635
266771
  ...baseFileDef,
265636
- fileType: FileType$1.OBS_LABELS_ANNDATA_ZARR,
266772
+ fileType: getFileType(FileType$1.OBS_LABELS_ANNDATA_ZARR),
265637
266773
  options: options.obsLabels,
265638
266774
  coordinationValues: {
265639
266775
  ...extraCoordinationValues,
@@ -265646,7 +266782,7 @@ function expandAnndataZarr(fileDef) {
265646
266782
  ...options.featureLabels ? Array.isArray(options.featureLabels) ? options.featureLabels.map((fl) => ({
265647
266783
  // featureLabels was an array, process each element.
265648
266784
  ...baseFileDef,
265649
- fileType: FileType$1.FEATURE_LABELS_ANNDATA_ZARR,
266785
+ fileType: getFileType(FileType$1.FEATURE_LABELS_ANNDATA_ZARR),
265650
266786
  options: {
265651
266787
  path: fl.path
265652
266788
  },
@@ -265659,7 +266795,7 @@ function expandAnndataZarr(fileDef) {
265659
266795
  })) : [{
265660
266796
  // featureLabels was an object.
265661
266797
  ...baseFileDef,
265662
- fileType: FileType$1.FEATURE_LABELS_ANNDATA_ZARR,
266798
+ fileType: getFileType(FileType$1.FEATURE_LABELS_ANNDATA_ZARR),
265663
266799
  options: options.featureLabels,
265664
266800
  coordinationValues: {
265665
266801
  ...extraCoordinationValues,
@@ -266025,6 +267161,13 @@ function makeViewType(name2, component) {
266025
267161
  function makeFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
266026
267162
  return new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema);
266027
267163
  }
267164
+ function makeZarrFileTypes(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
267165
+ const altFileTypes = Object.values(ALT_ZARR_STORE_TYPES[name2]);
267166
+ return [
267167
+ new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema),
267168
+ ...altFileTypes.map((n3) => new PluginFileType(n3, dataType, dataLoaderClass, dataSourceClass, optionsSchema))
267169
+ ];
267170
+ }
266028
267171
  const baseViewTypes = [
266029
267172
  makeViewType(ViewType$1.DESCRIPTION, DescriptionSubscriber),
266030
267173
  makeViewType(ViewType$1.OBS_SETS, ObsSetsManagerSubscriber),
@@ -266053,20 +267196,22 @@ const baseFileTypes = [
266053
267196
  makeFileType(FileType$1.OBS_LABELS_CSV, DataType$2.OBS_LABELS, ObsLabelsCsvLoader, CsvSource, obsLabelsCsvSchema),
266054
267197
  makeFileType(FileType$1.OBS_FEATURE_MATRIX_CSV, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureMatrixCsvLoader, CsvSource, z.null()),
266055
267198
  makeFileType(FileType$1.FEATURE_LABELS_CSV, DataType$2.FEATURE_LABELS, FeatureLabelsCsvLoader, CsvSource, featureLabelsCsvSchema),
267199
+ makeFileType(FileType$1.SAMPLE_SETS_CSV, DataType$2.SAMPLE_SETS, SampleSetsCsvLoader, CsvSource, sampleSetsCsvSchema),
266056
267200
  // All JSON file types
266057
267201
  makeFileType(FileType$1.OBS_SEGMENTATIONS_JSON, DataType$2.OBS_SEGMENTATIONS, ObsSegmentationsJsonLoader, JsonSource, z.null()),
266058
267202
  makeFileType(FileType$1.OBS_SETS_JSON, DataType$2.OBS_SETS, ObsSetsJsonLoader, JsonSource, z.null()),
266059
267203
  // All AnnData file types
266060
- makeFileType(FileType$1.OBS_SETS_ANNDATA_ZARR, DataType$2.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
266061
- makeFileType(FileType$1.OBS_EMBEDDING_ANNDATA_ZARR, DataType$2.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
266062
- makeFileType(FileType$1.OBS_SPOTS_ANNDATA_ZARR, DataType$2.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
266063
- makeFileType(FileType$1.OBS_POINTS_ANNDATA_ZARR, DataType$2.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
266064
- makeFileType(FileType$1.OBS_LOCATIONS_ANNDATA_ZARR, DataType$2.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
266065
- makeFileType(FileType$1.OBS_LABELS_ANNDATA_ZARR, DataType$2.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
266066
- makeFileType(FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
266067
- makeFileType(FileType$1.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
266068
- makeFileType(FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$2.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
266069
- makeFileType(FileType$1.FEATURE_LABELS_ANNDATA_ZARR, DataType$2.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
267204
+ ...makeZarrFileTypes(FileType$1.OBS_SETS_ANNDATA_ZARR, DataType$2.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
267205
+ ...makeZarrFileTypes(FileType$1.OBS_EMBEDDING_ANNDATA_ZARR, DataType$2.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
267206
+ ...makeZarrFileTypes(FileType$1.OBS_SPOTS_ANNDATA_ZARR, DataType$2.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
267207
+ ...makeZarrFileTypes(FileType$1.OBS_POINTS_ANNDATA_ZARR, DataType$2.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
267208
+ ...makeZarrFileTypes(FileType$1.OBS_LOCATIONS_ANNDATA_ZARR, DataType$2.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
267209
+ ...makeZarrFileTypes(FileType$1.OBS_LABELS_ANNDATA_ZARR, DataType$2.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
267210
+ ...makeZarrFileTypes(FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
267211
+ ...makeZarrFileTypes(FileType$1.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
267212
+ ...makeZarrFileTypes(FileType$1.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$2.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
267213
+ ...makeZarrFileTypes(FileType$1.FEATURE_LABELS_ANNDATA_ZARR, DataType$2.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
267214
+ ...makeZarrFileTypes(FileType$1.SAMPLE_EDGES_ANNDATA_ZARR, DataType$2.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
266070
267215
  // All MuData file types
266071
267216
  makeFileType(FileType$1.OBS_SETS_MUDATA_ZARR, DataType$2.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
266072
267217
  makeFileType(FileType$1.OBS_EMBEDDING_MUDATA_ZARR, DataType$2.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
@@ -266092,6 +267237,7 @@ const baseFileTypes = [
266092
267237
  makeFileType(FileType$1.OBS_SPOTS_SPATIALDATA_ZARR, DataType$2.OBS_SPOTS, SpatialDataObsSpotsLoader, SpatialDataShapesSource, obsSpotsSpatialdataSchema),
266093
267238
  makeFileType(FileType$1.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR, DataType$2.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, SpatialDataTableSource, obsFeatureMatrixSpatialdataSchema),
266094
267239
  makeFileType(FileType$1.OBS_SETS_SPATIALDATA_ZARR, DataType$2.OBS_SETS, SpatialDataObsSetsLoader, SpatialDataTableSource, obsSetsSpatialdataSchema),
267240
+ makeFileType(FileType$1.FEATURE_LABELS_SPATIALDATA_ZARR, DataType$2.FEATURE_LABELS, FeatureLabelsAnndataLoader, SpatialDataTableSource, featureLabelsAnndataSchema),
266095
267241
  // All legacy file types
266096
267242
  makeFileType(FileType$1.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR, DataType$2.OBS_FEATURE_MATRIX, MatrixZarrAsObsFeatureMatrixLoader, ZarrDataSource, z.null()),
266097
267243
  makeFileType(FileType$1.IMAGE_RASTER_JSON, DataType$2.IMAGE, RasterJsonAsImageLoader, JsonSource, rasterJsonSchema),
@@ -266110,6 +267256,7 @@ const baseFileTypes = [
266110
267256
  ];
266111
267257
  const baseJointFileTypes = [
266112
267258
  new PluginJointFileType(FileType$1.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
267259
+ new PluginJointFileType(FileType$1.ANNDATA_ZARR_ZIP, expandAnndataZarr, anndataZarrSchema),
266113
267260
  new PluginJointFileType(FileType$1.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
266114
267261
  // For legacy file types:
266115
267262
  new PluginJointFileType(FileType$1.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
@@ -266304,7 +267451,9 @@ const baseCoordinationTypes = [
266304
267451
  new PluginCoordinationType(CoordinationType$1.LEGEND_VISIBLE, true, z.boolean()),
266305
267452
  new PluginCoordinationType(CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE, true, z.boolean()),
266306
267453
  new PluginCoordinationType(CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION, "vertical", z.enum(["vertical", "horizontal"])),
266307
- new PluginCoordinationType(CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number())
267454
+ new PluginCoordinationType(CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
267455
+ new PluginCoordinationType(CoordinationType$1.SAMPLE_TYPE, null, z.string().nullable()),
267456
+ new PluginCoordinationType(CoordinationType$1.SAMPLE_SET_SELECTION, null, z.array(z.string()).nullable())
266308
267457
  ];
266309
267458
  function Vitessce(props2) {
266310
267459
  const {