@vitessce/scatterplot-gating 3.3.2 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{deflate-77b61410.js → deflate-a0ad3b95.js} +1 -1
- package/dist/{index-db49eef4.js → index-ad0b1f6c.js} +233 -151
- package/dist/index.js +1 -1
- package/dist/{jpeg-8eab1ac6.js → jpeg-19ae8d45.js} +1 -1
- package/dist/{lerc-5d8884d4.js → lerc-bff6809d.js} +1 -1
- package/dist/{lzw-ba7d74c9.js → lzw-52e5b3a7.js} +1 -1
- package/dist/{packbits-ad44bc57.js → packbits-a7ae738c.js} +1 -1
- package/dist/{raw-e380bba5.js → raw-c8fd6778.js} +1 -1
- package/dist/{webimage-d4200105.js → webimage-58661116.js} +1 -1
- package/dist-tsc/GatingSubscriber.d.ts.map +1 -1
- package/dist-tsc/GatingSubscriber.js +2 -2
- package/package.json +6 -6
- package/src/GatingSubscriber.js +3 -2
|
@@ -942,18 +942,18 @@ var reactJsxRuntime_development = {};
|
|
|
942
942
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
943
943
|
function extent$1(values2, valueof) {
|
|
944
944
|
let min;
|
|
945
|
-
let
|
|
945
|
+
let max2;
|
|
946
946
|
if (valueof === void 0) {
|
|
947
947
|
for (const value of values2) {
|
|
948
948
|
if (value != null) {
|
|
949
949
|
if (min === void 0) {
|
|
950
950
|
if (value >= value)
|
|
951
|
-
min =
|
|
951
|
+
min = max2 = value;
|
|
952
952
|
} else {
|
|
953
953
|
if (min > value)
|
|
954
954
|
min = value;
|
|
955
|
-
if (
|
|
956
|
-
|
|
955
|
+
if (max2 < value)
|
|
956
|
+
max2 = value;
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
}
|
|
@@ -963,17 +963,35 @@ function extent$1(values2, valueof) {
|
|
|
963
963
|
if ((value = valueof(value, ++index2, values2)) != null) {
|
|
964
964
|
if (min === void 0) {
|
|
965
965
|
if (value >= value)
|
|
966
|
-
min =
|
|
966
|
+
min = max2 = value;
|
|
967
967
|
} else {
|
|
968
968
|
if (min > value)
|
|
969
969
|
min = value;
|
|
970
|
-
if (
|
|
971
|
-
|
|
970
|
+
if (max2 < value)
|
|
971
|
+
max2 = value;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
return [min,
|
|
976
|
+
return [min, max2];
|
|
977
|
+
}
|
|
978
|
+
function max(values2, valueof) {
|
|
979
|
+
let max2;
|
|
980
|
+
if (valueof === void 0) {
|
|
981
|
+
for (const value of values2) {
|
|
982
|
+
if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
983
|
+
max2 = value;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
} else {
|
|
987
|
+
let index2 = -1;
|
|
988
|
+
for (let value of values2) {
|
|
989
|
+
if ((value = valueof(value, ++index2, values2)) != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
990
|
+
max2 = value;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
return max2;
|
|
977
995
|
}
|
|
978
996
|
var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
|
|
979
997
|
const freeGlobal$2 = freeGlobal$1;
|
|
@@ -5528,14 +5546,14 @@ class ZodString extends ZodType {
|
|
|
5528
5546
|
return min;
|
|
5529
5547
|
}
|
|
5530
5548
|
get maxLength() {
|
|
5531
|
-
let
|
|
5549
|
+
let max2 = null;
|
|
5532
5550
|
for (const ch of this._def.checks) {
|
|
5533
5551
|
if (ch.kind === "max") {
|
|
5534
|
-
if (
|
|
5535
|
-
|
|
5552
|
+
if (max2 === null || ch.value < max2)
|
|
5553
|
+
max2 = ch.value;
|
|
5536
5554
|
}
|
|
5537
5555
|
}
|
|
5538
|
-
return
|
|
5556
|
+
return max2;
|
|
5539
5557
|
}
|
|
5540
5558
|
}
|
|
5541
5559
|
ZodString.create = (params) => {
|
|
@@ -5750,20 +5768,20 @@ class ZodNumber extends ZodType {
|
|
|
5750
5768
|
return min;
|
|
5751
5769
|
}
|
|
5752
5770
|
get maxValue() {
|
|
5753
|
-
let
|
|
5771
|
+
let max2 = null;
|
|
5754
5772
|
for (const ch of this._def.checks) {
|
|
5755
5773
|
if (ch.kind === "max") {
|
|
5756
|
-
if (
|
|
5757
|
-
|
|
5774
|
+
if (max2 === null || ch.value < max2)
|
|
5775
|
+
max2 = ch.value;
|
|
5758
5776
|
}
|
|
5759
5777
|
}
|
|
5760
|
-
return
|
|
5778
|
+
return max2;
|
|
5761
5779
|
}
|
|
5762
5780
|
get isInt() {
|
|
5763
5781
|
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$4.isInteger(ch.value));
|
|
5764
5782
|
}
|
|
5765
5783
|
get isFinite() {
|
|
5766
|
-
let
|
|
5784
|
+
let max2 = null, min = null;
|
|
5767
5785
|
for (const ch of this._def.checks) {
|
|
5768
5786
|
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
5769
5787
|
return true;
|
|
@@ -5771,11 +5789,11 @@ class ZodNumber extends ZodType {
|
|
|
5771
5789
|
if (min === null || ch.value > min)
|
|
5772
5790
|
min = ch.value;
|
|
5773
5791
|
} else if (ch.kind === "max") {
|
|
5774
|
-
if (
|
|
5775
|
-
|
|
5792
|
+
if (max2 === null || ch.value < max2)
|
|
5793
|
+
max2 = ch.value;
|
|
5776
5794
|
}
|
|
5777
5795
|
}
|
|
5778
|
-
return Number.isFinite(min) && Number.isFinite(
|
|
5796
|
+
return Number.isFinite(min) && Number.isFinite(max2);
|
|
5779
5797
|
}
|
|
5780
5798
|
}
|
|
5781
5799
|
ZodNumber.create = (params) => {
|
|
@@ -5933,14 +5951,14 @@ class ZodBigInt extends ZodType {
|
|
|
5933
5951
|
return min;
|
|
5934
5952
|
}
|
|
5935
5953
|
get maxValue() {
|
|
5936
|
-
let
|
|
5954
|
+
let max2 = null;
|
|
5937
5955
|
for (const ch of this._def.checks) {
|
|
5938
5956
|
if (ch.kind === "max") {
|
|
5939
|
-
if (
|
|
5940
|
-
|
|
5957
|
+
if (max2 === null || ch.value < max2)
|
|
5958
|
+
max2 = ch.value;
|
|
5941
5959
|
}
|
|
5942
5960
|
}
|
|
5943
|
-
return
|
|
5961
|
+
return max2;
|
|
5944
5962
|
}
|
|
5945
5963
|
}
|
|
5946
5964
|
ZodBigInt.create = (params) => {
|
|
@@ -6068,14 +6086,14 @@ class ZodDate extends ZodType {
|
|
|
6068
6086
|
return min != null ? new Date(min) : null;
|
|
6069
6087
|
}
|
|
6070
6088
|
get maxDate() {
|
|
6071
|
-
let
|
|
6089
|
+
let max2 = null;
|
|
6072
6090
|
for (const ch of this._def.checks) {
|
|
6073
6091
|
if (ch.kind === "max") {
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6092
|
+
if (max2 === null || ch.value < max2)
|
|
6093
|
+
max2 = ch.value;
|
|
6076
6094
|
}
|
|
6077
6095
|
}
|
|
6078
|
-
return
|
|
6096
|
+
return max2 != null ? new Date(max2) : null;
|
|
6079
6097
|
}
|
|
6080
6098
|
}
|
|
6081
6099
|
ZodDate.create = (params) => {
|
|
@@ -10434,7 +10452,7 @@ var toComparators_1 = toComparators$1;
|
|
|
10434
10452
|
const SemVer$4 = semver;
|
|
10435
10453
|
const Range$7 = requireRange();
|
|
10436
10454
|
const maxSatisfying$1 = (versions, range2, options) => {
|
|
10437
|
-
let
|
|
10455
|
+
let max2 = null;
|
|
10438
10456
|
let maxSV = null;
|
|
10439
10457
|
let rangeObj = null;
|
|
10440
10458
|
try {
|
|
@@ -10444,13 +10462,13 @@ const maxSatisfying$1 = (versions, range2, options) => {
|
|
|
10444
10462
|
}
|
|
10445
10463
|
versions.forEach((v) => {
|
|
10446
10464
|
if (rangeObj.test(v)) {
|
|
10447
|
-
if (!
|
|
10448
|
-
|
|
10449
|
-
maxSV = new SemVer$4(
|
|
10465
|
+
if (!max2 || maxSV.compare(v) === -1) {
|
|
10466
|
+
max2 = v;
|
|
10467
|
+
maxSV = new SemVer$4(max2, options);
|
|
10450
10468
|
}
|
|
10451
10469
|
}
|
|
10452
10470
|
});
|
|
10453
|
-
return
|
|
10471
|
+
return max2;
|
|
10454
10472
|
};
|
|
10455
10473
|
var maxSatisfying_1 = maxSatisfying$1;
|
|
10456
10474
|
const SemVer$3 = semver;
|
|
@@ -10635,17 +10653,17 @@ var simplify = (versions, range2, options) => {
|
|
|
10635
10653
|
set3.push([first, null]);
|
|
10636
10654
|
}
|
|
10637
10655
|
const ranges2 = [];
|
|
10638
|
-
for (const [min,
|
|
10639
|
-
if (min ===
|
|
10656
|
+
for (const [min, max2] of set3) {
|
|
10657
|
+
if (min === max2) {
|
|
10640
10658
|
ranges2.push(min);
|
|
10641
|
-
} else if (!
|
|
10659
|
+
} else if (!max2 && min === v[0]) {
|
|
10642
10660
|
ranges2.push("*");
|
|
10643
|
-
} else if (!
|
|
10661
|
+
} else if (!max2) {
|
|
10644
10662
|
ranges2.push(`>=${min}`);
|
|
10645
10663
|
} else if (min === v[0]) {
|
|
10646
|
-
ranges2.push(`<=${
|
|
10664
|
+
ranges2.push(`<=${max2}`);
|
|
10647
10665
|
} else {
|
|
10648
|
-
ranges2.push(`${min} - ${
|
|
10666
|
+
ranges2.push(`${min} - ${max2}`);
|
|
10649
10667
|
}
|
|
10650
10668
|
}
|
|
10651
10669
|
const simplified = ranges2.join(" || ");
|
|
@@ -10939,7 +10957,9 @@ const FileType$1 = {
|
|
|
10939
10957
|
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
|
10940
10958
|
OBS_SETS_CSV: "obsSets.csv",
|
|
10941
10959
|
OBS_SETS_JSON: "obsSets.json",
|
|
10960
|
+
// OME-Zarr
|
|
10942
10961
|
IMAGE_OME_ZARR: "image.ome-zarr",
|
|
10962
|
+
OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
|
|
10943
10963
|
// AnnData
|
|
10944
10964
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
|
10945
10965
|
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
|
@@ -11423,7 +11443,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11423
11443
|
CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
|
|
11424
11444
|
CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
|
|
11425
11445
|
CoordinationType$1.IMAGE_CHANNEL,
|
|
11446
|
+
CoordinationType$1.IMAGE_LAYER,
|
|
11426
11447
|
CoordinationType$1.SEGMENTATION_CHANNEL,
|
|
11448
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
|
11427
11449
|
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
|
11428
11450
|
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
|
11429
11451
|
CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
|
|
@@ -11441,6 +11463,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11441
11463
|
CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
|
|
11442
11464
|
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
|
11443
11465
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
11466
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
11467
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
11468
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
11444
11469
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
11445
11470
|
CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
|
|
11446
11471
|
CoordinationType$1.LEGEND_VISIBLE,
|
|
@@ -11757,30 +11782,39 @@ const omeCoordinateTransformations = z.array(z.union([
|
|
|
11757
11782
|
scale: z.array(z.number())
|
|
11758
11783
|
})
|
|
11759
11784
|
]));
|
|
11760
|
-
z.object({
|
|
11785
|
+
const imageOmeTiffSchema = z.object({
|
|
11761
11786
|
offsetsUrl: z.string().optional(),
|
|
11762
11787
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11763
11788
|
});
|
|
11789
|
+
imageOmeTiffSchema.extend({
|
|
11790
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11791
|
+
});
|
|
11764
11792
|
const imageOmeZarrSchema = z.object({
|
|
11765
11793
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11766
11794
|
});
|
|
11767
11795
|
imageOmeZarrSchema.extend({
|
|
11796
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11797
|
+
});
|
|
11798
|
+
const imageSpatialdataSchema = imageOmeZarrSchema.extend({
|
|
11768
11799
|
path: z.string()
|
|
11769
11800
|
});
|
|
11770
|
-
z.object({
|
|
11801
|
+
const obsSegmentationsSpatialdataSchema = z.object({
|
|
11802
|
+
// TODO: should this also extend the imageOmeZarrSchema?
|
|
11803
|
+
// TODO: should this be renamed labelsSpatialdataSchema?
|
|
11804
|
+
// TODO: support obsTypesFromChannelNames?
|
|
11771
11805
|
path: z.string()
|
|
11772
11806
|
});
|
|
11773
11807
|
z.object({
|
|
11774
11808
|
path: z.string()
|
|
11775
11809
|
});
|
|
11776
|
-
z.object({
|
|
11810
|
+
const obsSpotsSpatialdataSchema = z.object({
|
|
11777
11811
|
path: z.string(),
|
|
11778
11812
|
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
11779
11813
|
});
|
|
11780
|
-
annDataObsFeatureMatrix.extend({
|
|
11814
|
+
const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
11781
11815
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
11782
11816
|
});
|
|
11783
|
-
z.object({
|
|
11817
|
+
const obsSetsSpatialdataSchema = z.object({
|
|
11784
11818
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
11785
11819
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
11786
11820
|
obsSets: annDataObsSets
|
|
@@ -11843,6 +11877,19 @@ z.object({
|
|
|
11843
11877
|
z.array(annDataConvenienceObsEmbeddingItem)
|
|
11844
11878
|
])
|
|
11845
11879
|
}).partial();
|
|
11880
|
+
z.object({
|
|
11881
|
+
// TODO: should `image` be a special schema
|
|
11882
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11883
|
+
image: imageSpatialdataSchema,
|
|
11884
|
+
// TODO: should this be a special schema
|
|
11885
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11886
|
+
labels: obsSegmentationsSpatialdataSchema,
|
|
11887
|
+
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
11888
|
+
obsSpots: obsSpotsSpatialdataSchema,
|
|
11889
|
+
// TODO: obsPoints
|
|
11890
|
+
// TODO: obsLocations
|
|
11891
|
+
obsSets: obsSetsSpatialdataSchema
|
|
11892
|
+
}).partial();
|
|
11846
11893
|
z.object({
|
|
11847
11894
|
obsLabelsTypes: z.array(z.string()).optional(),
|
|
11848
11895
|
embeddingTypes: z.array(z.string()).optional()
|
|
@@ -12216,14 +12263,14 @@ var tinycolor = { exports: {} };
|
|
|
12216
12263
|
r2 = bound01(r2, 255);
|
|
12217
12264
|
g2 = bound01(g2, 255);
|
|
12218
12265
|
b = bound01(b, 255);
|
|
12219
|
-
var
|
|
12220
|
-
var h, s2, l2 = (
|
|
12221
|
-
if (
|
|
12266
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12267
|
+
var h, s2, l2 = (max2 + min) / 2;
|
|
12268
|
+
if (max2 == min) {
|
|
12222
12269
|
h = s2 = 0;
|
|
12223
12270
|
} else {
|
|
12224
|
-
var d =
|
|
12225
|
-
s2 = l2 > 0.5 ? d / (2 -
|
|
12226
|
-
switch (
|
|
12271
|
+
var d = max2 - min;
|
|
12272
|
+
s2 = l2 > 0.5 ? d / (2 - max2 - min) : d / (max2 + min);
|
|
12273
|
+
switch (max2) {
|
|
12227
12274
|
case r2:
|
|
12228
12275
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12229
12276
|
break;
|
|
@@ -12271,14 +12318,14 @@ var tinycolor = { exports: {} };
|
|
|
12271
12318
|
r2 = bound01(r2, 255);
|
|
12272
12319
|
g2 = bound01(g2, 255);
|
|
12273
12320
|
b = bound01(b, 255);
|
|
12274
|
-
var
|
|
12275
|
-
var h, s2, v =
|
|
12276
|
-
var d =
|
|
12277
|
-
s2 =
|
|
12278
|
-
if (
|
|
12321
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12322
|
+
var h, s2, v = max2;
|
|
12323
|
+
var d = max2 - min;
|
|
12324
|
+
s2 = max2 === 0 ? 0 : d / max2;
|
|
12325
|
+
if (max2 == min) {
|
|
12279
12326
|
h = 0;
|
|
12280
12327
|
} else {
|
|
12281
|
-
switch (
|
|
12328
|
+
switch (max2) {
|
|
12282
12329
|
case r2:
|
|
12283
12330
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12284
12331
|
break;
|
|
@@ -12675,19 +12722,19 @@ var tinycolor = { exports: {} };
|
|
|
12675
12722
|
}
|
|
12676
12723
|
return a2;
|
|
12677
12724
|
}
|
|
12678
|
-
function bound01(n2,
|
|
12725
|
+
function bound01(n2, max2) {
|
|
12679
12726
|
if (isOnePointZero(n2)) {
|
|
12680
12727
|
n2 = "100%";
|
|
12681
12728
|
}
|
|
12682
12729
|
var processPercent = isPercentage(n2);
|
|
12683
|
-
n2 = mathMin(
|
|
12730
|
+
n2 = mathMin(max2, mathMax(0, parseFloat(n2)));
|
|
12684
12731
|
if (processPercent) {
|
|
12685
|
-
n2 = parseInt(n2 *
|
|
12732
|
+
n2 = parseInt(n2 * max2, 10) / 100;
|
|
12686
12733
|
}
|
|
12687
|
-
if (Math2.abs(n2 -
|
|
12734
|
+
if (Math2.abs(n2 - max2) < 1e-6) {
|
|
12688
12735
|
return 1;
|
|
12689
12736
|
}
|
|
12690
|
-
return n2 %
|
|
12737
|
+
return n2 % max2 / parseFloat(max2);
|
|
12691
12738
|
}
|
|
12692
12739
|
function clamp01(val) {
|
|
12693
12740
|
return mathMin(1, mathMax(0, val));
|
|
@@ -13903,10 +13950,10 @@ var json2csv_umd = { exports: {} };
|
|
|
13903
13950
|
};
|
|
13904
13951
|
Buffer3.prototype.inspect = function inspect2() {
|
|
13905
13952
|
var str = "";
|
|
13906
|
-
var
|
|
13953
|
+
var max2 = INSPECT_MAX_BYTES;
|
|
13907
13954
|
if (this.length > 0) {
|
|
13908
|
-
str = this.toString("hex", 0,
|
|
13909
|
-
if (this.length >
|
|
13955
|
+
str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
|
|
13956
|
+
if (this.length > max2)
|
|
13910
13957
|
str += " ... ";
|
|
13911
13958
|
}
|
|
13912
13959
|
return "<Buffer " + str + ">";
|
|
@@ -14472,10 +14519,10 @@ var json2csv_umd = { exports: {} };
|
|
|
14472
14519
|
checkOffset(offset5, 8, this.length);
|
|
14473
14520
|
return read(this, offset5, false, 52, 8);
|
|
14474
14521
|
};
|
|
14475
|
-
function checkInt(buf, value, offset5, ext,
|
|
14522
|
+
function checkInt(buf, value, offset5, ext, max2, min) {
|
|
14476
14523
|
if (!internalIsBuffer(buf))
|
|
14477
14524
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
14478
|
-
if (value >
|
|
14525
|
+
if (value > max2 || value < min)
|
|
14479
14526
|
throw new RangeError('"value" argument is out of bounds');
|
|
14480
14527
|
if (offset5 + ext > buf.length)
|
|
14481
14528
|
throw new RangeError("Index out of range");
|
|
@@ -14700,7 +14747,7 @@ var json2csv_umd = { exports: {} };
|
|
|
14700
14747
|
}
|
|
14701
14748
|
return offset5 + 4;
|
|
14702
14749
|
};
|
|
14703
|
-
function checkIEEE754(buf, value, offset5, ext,
|
|
14750
|
+
function checkIEEE754(buf, value, offset5, ext, max2, min) {
|
|
14704
14751
|
if (offset5 + ext > buf.length)
|
|
14705
14752
|
throw new RangeError("Index out of range");
|
|
14706
14753
|
if (offset5 < 0)
|
|
@@ -18547,7 +18594,13 @@ interpolateSequentialMulti(schemePlasma);
|
|
|
18547
18594
|
function getCellColors(params) {
|
|
18548
18595
|
const { cellSets, cellSetSelection, cellSetColor, obsIndex, theme } = params;
|
|
18549
18596
|
if (cellSetSelection && cellSets) {
|
|
18550
|
-
return treeToCellColorsBySetNames(
|
|
18597
|
+
return treeToCellColorsBySetNames(
|
|
18598
|
+
cellSets,
|
|
18599
|
+
cellSetSelection,
|
|
18600
|
+
cellSetColor,
|
|
18601
|
+
theme
|
|
18602
|
+
/* as string */
|
|
18603
|
+
);
|
|
18551
18604
|
}
|
|
18552
18605
|
if (obsIndex && theme) {
|
|
18553
18606
|
return new Map(obsIndex.map((o2) => [o2, getDefaultColor(theme)]));
|
|
@@ -29931,8 +29984,8 @@ function acos$1(radians2, result) {
|
|
|
29931
29984
|
function atan$1(radians2, result) {
|
|
29932
29985
|
return map(radians2, (angle2) => Math.atan(angle2), result);
|
|
29933
29986
|
}
|
|
29934
|
-
function clamp$3(value, min,
|
|
29935
|
-
return map(value, (value2) => Math.max(min, Math.min(
|
|
29987
|
+
function clamp$3(value, min, max2) {
|
|
29988
|
+
return map(value, (value2) => Math.max(min, Math.min(max2, value2)));
|
|
29936
29989
|
}
|
|
29937
29990
|
function lerp$5(a2, b, t2) {
|
|
29938
29991
|
if (isArray$1(a2)) {
|
|
@@ -30219,9 +30272,9 @@ class MathArray extends _extendableBuiltin(Array) {
|
|
|
30219
30272
|
divideScalar(a2) {
|
|
30220
30273
|
return this.multiplyByScalar(1 / a2);
|
|
30221
30274
|
}
|
|
30222
|
-
clampScalar(min,
|
|
30275
|
+
clampScalar(min, max2) {
|
|
30223
30276
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
30224
|
-
this[i2] = Math.min(Math.max(this[i2], min),
|
|
30277
|
+
this[i2] = Math.min(Math.max(this[i2], min), max2);
|
|
30225
30278
|
}
|
|
30226
30279
|
return this.check();
|
|
30227
30280
|
}
|
|
@@ -36354,8 +36407,8 @@ function mod$1(value, divisor) {
|
|
|
36354
36407
|
function lerp(start, end, step) {
|
|
36355
36408
|
return step * end + (1 - step) * start;
|
|
36356
36409
|
}
|
|
36357
|
-
function clamp$2(x2, min,
|
|
36358
|
-
return x2 < min ? min : x2 >
|
|
36410
|
+
function clamp$2(x2, min, max2) {
|
|
36411
|
+
return x2 < min ? min : x2 > max2 ? max2 : x2;
|
|
36359
36412
|
}
|
|
36360
36413
|
function ieLog2(x2) {
|
|
36361
36414
|
return Math.log(x2) * Math.LOG2E;
|
|
@@ -46076,17 +46129,17 @@ class DataColumn {
|
|
|
46076
46129
|
const len2 = numInstances * size;
|
|
46077
46130
|
if (value && len2 && value.length >= len2) {
|
|
46078
46131
|
const min = new Array(size).fill(Infinity);
|
|
46079
|
-
const
|
|
46132
|
+
const max2 = new Array(size).fill(-Infinity);
|
|
46080
46133
|
for (let i2 = 0; i2 < len2; ) {
|
|
46081
46134
|
for (let j = 0; j < size; j++) {
|
|
46082
46135
|
const v = value[i2++];
|
|
46083
46136
|
if (v < min[j])
|
|
46084
46137
|
min[j] = v;
|
|
46085
|
-
if (v >
|
|
46086
|
-
|
|
46138
|
+
if (v > max2[j])
|
|
46139
|
+
max2[j] = v;
|
|
46087
46140
|
}
|
|
46088
46141
|
}
|
|
46089
|
-
result = [min,
|
|
46142
|
+
result = [min, max2];
|
|
46090
46143
|
}
|
|
46091
46144
|
}
|
|
46092
46145
|
this.state.bounds = result;
|
|
@@ -72167,10 +72220,10 @@ class GroupNode extends ScenegraphNode {
|
|
|
72167
72220
|
if (!bounds2) {
|
|
72168
72221
|
return;
|
|
72169
72222
|
}
|
|
72170
|
-
const [min,
|
|
72171
|
-
const center2 = new Vector3(min).add(
|
|
72223
|
+
const [min, max2] = bounds2;
|
|
72224
|
+
const center2 = new Vector3(min).add(max2).divide([2, 2, 2]);
|
|
72172
72225
|
worldMatrix.transformAsPoint(center2, center2);
|
|
72173
|
-
const halfSize = new Vector3(
|
|
72226
|
+
const halfSize = new Vector3(max2).subtract(min).divide([2, 2, 2]);
|
|
72174
72227
|
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
72175
72228
|
for (let v = 0; v < 8; v++) {
|
|
72176
72229
|
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
@@ -81119,7 +81172,7 @@ class Tile {
|
|
|
81119
81172
|
const { errors } = this;
|
|
81120
81173
|
let numVertices = 0;
|
|
81121
81174
|
let numTriangles = 0;
|
|
81122
|
-
const
|
|
81175
|
+
const max2 = size - 1;
|
|
81123
81176
|
indices.fill(0);
|
|
81124
81177
|
function countElements(ax, ay, bx, by, cx, cy) {
|
|
81125
81178
|
const mx = ax + bx >> 1;
|
|
@@ -81134,8 +81187,8 @@ class Tile {
|
|
|
81134
81187
|
numTriangles++;
|
|
81135
81188
|
}
|
|
81136
81189
|
}
|
|
81137
|
-
countElements(0, 0,
|
|
81138
|
-
countElements(
|
|
81190
|
+
countElements(0, 0, max2, max2, max2, 0);
|
|
81191
|
+
countElements(max2, max2, 0, 0, 0, max2);
|
|
81139
81192
|
const vertices = new Uint16Array(numVertices * 2);
|
|
81140
81193
|
const triangles = new Uint32Array(numTriangles * 3);
|
|
81141
81194
|
let triIndex = 0;
|
|
@@ -81160,8 +81213,8 @@ class Tile {
|
|
|
81160
81213
|
triangles[triIndex++] = c2;
|
|
81161
81214
|
}
|
|
81162
81215
|
}
|
|
81163
|
-
processTriangle(0, 0,
|
|
81164
|
-
processTriangle(
|
|
81216
|
+
processTriangle(0, 0, max2, max2, max2, 0);
|
|
81217
|
+
processTriangle(max2, max2, 0, 0, 0, max2);
|
|
81165
81218
|
return { vertices, triangles };
|
|
81166
81219
|
}
|
|
81167
81220
|
}
|
|
@@ -121175,16 +121228,16 @@ function addDecoder(cases, importFn) {
|
|
|
121175
121228
|
}
|
|
121176
121229
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121177
121230
|
}
|
|
121178
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121179
|
-
addDecoder(5, () => import("./lzw-
|
|
121231
|
+
addDecoder([void 0, 1], () => import("./raw-c8fd6778.js").then((m2) => m2.default));
|
|
121232
|
+
addDecoder(5, () => import("./lzw-52e5b3a7.js").then((m2) => m2.default));
|
|
121180
121233
|
addDecoder(6, () => {
|
|
121181
121234
|
throw new Error("old style JPEG compression is not supported.");
|
|
121182
121235
|
});
|
|
121183
|
-
addDecoder(7, () => import("./jpeg-
|
|
121184
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121185
|
-
addDecoder(32773, () => import("./packbits-
|
|
121186
|
-
addDecoder(34887, () => import("./lerc-
|
|
121187
|
-
addDecoder(50001, () => import("./webimage-
|
|
121236
|
+
addDecoder(7, () => import("./jpeg-19ae8d45.js").then((m2) => m2.default));
|
|
121237
|
+
addDecoder([8, 32946], () => import("./deflate-a0ad3b95.js").then((m2) => m2.default));
|
|
121238
|
+
addDecoder(32773, () => import("./packbits-a7ae738c.js").then((m2) => m2.default));
|
|
121239
|
+
addDecoder(34887, () => import("./lerc-bff6809d.js").then((m2) => m2.default));
|
|
121240
|
+
addDecoder(50001, () => import("./webimage-58661116.js").then((m2) => m2.default));
|
|
121188
121241
|
function decodeRowAcc(row, stride) {
|
|
121189
121242
|
let length2 = row.length - stride;
|
|
121190
121243
|
let offset5 = 0;
|
|
@@ -124733,9 +124786,9 @@ const buf2binstring = (buf, len2) => {
|
|
|
124733
124786
|
}
|
|
124734
124787
|
return result;
|
|
124735
124788
|
};
|
|
124736
|
-
var buf2string = (buf,
|
|
124789
|
+
var buf2string = (buf, max2) => {
|
|
124737
124790
|
let i2, out;
|
|
124738
|
-
const len2 =
|
|
124791
|
+
const len2 = max2 || buf.length;
|
|
124739
124792
|
const utf16buf = new Array(len2 * 2);
|
|
124740
124793
|
for (out = 0, i2 = 0; i2 < len2; ) {
|
|
124741
124794
|
let c2 = buf[i2++];
|
|
@@ -124768,22 +124821,22 @@ var buf2string = (buf, max) => {
|
|
|
124768
124821
|
}
|
|
124769
124822
|
return buf2binstring(utf16buf, out);
|
|
124770
124823
|
};
|
|
124771
|
-
var utf8border = (buf,
|
|
124772
|
-
|
|
124773
|
-
if (
|
|
124774
|
-
|
|
124824
|
+
var utf8border = (buf, max2) => {
|
|
124825
|
+
max2 = max2 || buf.length;
|
|
124826
|
+
if (max2 > buf.length) {
|
|
124827
|
+
max2 = buf.length;
|
|
124775
124828
|
}
|
|
124776
|
-
let pos =
|
|
124829
|
+
let pos = max2 - 1;
|
|
124777
124830
|
while (pos >= 0 && (buf[pos] & 192) === 128) {
|
|
124778
124831
|
pos--;
|
|
124779
124832
|
}
|
|
124780
124833
|
if (pos < 0) {
|
|
124781
|
-
return
|
|
124834
|
+
return max2;
|
|
124782
124835
|
}
|
|
124783
124836
|
if (pos === 0) {
|
|
124784
|
-
return
|
|
124837
|
+
return max2;
|
|
124785
124838
|
}
|
|
124786
|
-
return pos + _utf8len[buf[pos]] >
|
|
124839
|
+
return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
|
|
124787
124840
|
};
|
|
124788
124841
|
var strings = {
|
|
124789
124842
|
string2buf,
|
|
@@ -125333,7 +125386,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125333
125386
|
const bits = opts2.bits;
|
|
125334
125387
|
let len2 = 0;
|
|
125335
125388
|
let sym = 0;
|
|
125336
|
-
let min = 0,
|
|
125389
|
+
let min = 0, max2 = 0;
|
|
125337
125390
|
let root2 = 0;
|
|
125338
125391
|
let curr = 0;
|
|
125339
125392
|
let drop = 0;
|
|
@@ -125360,21 +125413,21 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125360
125413
|
count2[lens2[lens_index + sym]]++;
|
|
125361
125414
|
}
|
|
125362
125415
|
root2 = bits;
|
|
125363
|
-
for (
|
|
125364
|
-
if (count2[
|
|
125416
|
+
for (max2 = MAXBITS; max2 >= 1; max2--) {
|
|
125417
|
+
if (count2[max2] !== 0) {
|
|
125365
125418
|
break;
|
|
125366
125419
|
}
|
|
125367
125420
|
}
|
|
125368
|
-
if (root2 >
|
|
125369
|
-
root2 =
|
|
125421
|
+
if (root2 > max2) {
|
|
125422
|
+
root2 = max2;
|
|
125370
125423
|
}
|
|
125371
|
-
if (
|
|
125424
|
+
if (max2 === 0) {
|
|
125372
125425
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
125373
125426
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
125374
125427
|
opts2.bits = 1;
|
|
125375
125428
|
return 0;
|
|
125376
125429
|
}
|
|
125377
|
-
for (min = 1; min <
|
|
125430
|
+
for (min = 1; min < max2; min++) {
|
|
125378
125431
|
if (count2[min] !== 0) {
|
|
125379
125432
|
break;
|
|
125380
125433
|
}
|
|
@@ -125390,7 +125443,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125390
125443
|
return -1;
|
|
125391
125444
|
}
|
|
125392
125445
|
}
|
|
125393
|
-
if (left > 0 && (type === CODES ||
|
|
125446
|
+
if (left > 0 && (type === CODES || max2 !== 1)) {
|
|
125394
125447
|
return -1;
|
|
125395
125448
|
}
|
|
125396
125449
|
offs[1] = 0;
|
|
@@ -125459,7 +125512,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125459
125512
|
}
|
|
125460
125513
|
sym++;
|
|
125461
125514
|
if (--count2[len2] === 0) {
|
|
125462
|
-
if (len2 ===
|
|
125515
|
+
if (len2 === max2) {
|
|
125463
125516
|
break;
|
|
125464
125517
|
}
|
|
125465
125518
|
len2 = lens2[lens_index + work[sym]];
|
|
@@ -125471,7 +125524,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
125471
125524
|
next += min;
|
|
125472
125525
|
curr = len2 - drop;
|
|
125473
125526
|
left = 1 << curr;
|
|
125474
|
-
while (curr + drop <
|
|
125527
|
+
while (curr + drop < max2) {
|
|
125475
125528
|
left -= count2[curr + drop];
|
|
125476
125529
|
if (left <= 0) {
|
|
125477
125530
|
break;
|
|
@@ -132205,21 +132258,21 @@ void main() {
|
|
|
132205
132258
|
}
|
|
132206
132259
|
`;
|
|
132207
132260
|
function normalize(arr) {
|
|
132208
|
-
const [min,
|
|
132209
|
-
const ratio = 255 / (
|
|
132261
|
+
const [min, max2] = extent$1(arr);
|
|
132262
|
+
const ratio = 255 / (max2 - min);
|
|
132210
132263
|
const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min) * ratio)));
|
|
132211
132264
|
return data;
|
|
132212
132265
|
}
|
|
132213
|
-
function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, texSize) {
|
|
132266
|
+
function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, texSize) {
|
|
132214
132267
|
let totalValuesLength = 0;
|
|
132215
132268
|
let totalColorsLength = 0;
|
|
132216
132269
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
132217
|
-
var _a2, _b, _c, _d
|
|
132270
|
+
var _a2, _b, _c, _d;
|
|
132218
132271
|
if (isSetColorMode) {
|
|
132219
|
-
|
|
132220
|
-
|
|
132272
|
+
totalColorsLength += (((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.setColors) == null ? void 0 : _b.length) || 0) * 3;
|
|
132273
|
+
totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
|
|
132221
132274
|
} else {
|
|
132222
|
-
totalValuesLength += ((
|
|
132275
|
+
totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
|
|
132223
132276
|
}
|
|
132224
132277
|
});
|
|
132225
132278
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
|
@@ -132237,12 +132290,20 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
132237
132290
|
let indexOffset = 0;
|
|
132238
132291
|
let colorOffset = 0;
|
|
132239
132292
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
132293
|
+
const matrixObsIndex = multiMatrixObsIndex[channelIndex];
|
|
132294
|
+
const bitmaskValueIsIndex = matrixObsIndex === null;
|
|
132240
132295
|
if (isSetColorMode) {
|
|
132241
132296
|
const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
|
|
132242
132297
|
if (setColorIndices && setColors && obsIndex) {
|
|
132243
132298
|
for (let i2 = 0; i2 < obsIndex.length; i2++) {
|
|
132244
|
-
|
|
132245
|
-
|
|
132299
|
+
let obsId = String(i2 + 1);
|
|
132300
|
+
let obsI = i2;
|
|
132301
|
+
if (!bitmaskValueIsIndex) {
|
|
132302
|
+
obsId = obsIndex[i2];
|
|
132303
|
+
obsI = parseInt(obsId) - 1;
|
|
132304
|
+
}
|
|
132305
|
+
const colorIndex = setColorIndices.get(obsId);
|
|
132306
|
+
totalData[indexOffset + obsI] = colorIndex === void 0 ? 0 : colorIndex + 1;
|
|
132246
132307
|
}
|
|
132247
132308
|
for (let i2 = 0; i2 < setColors.length; i2++) {
|
|
132248
132309
|
const { color: [r2, g2, b] } = setColors[i2];
|
|
@@ -132257,7 +132318,16 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
132257
132318
|
colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
|
|
132258
132319
|
} else {
|
|
132259
132320
|
const featureArr = multiFeatureValues[channelIndex];
|
|
132260
|
-
|
|
132321
|
+
const normalizedFeatureArr = normalize(featureArr);
|
|
132322
|
+
if (!bitmaskValueIsIndex && matrixObsIndex) {
|
|
132323
|
+
for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
|
|
132324
|
+
const obsId = matrixObsIndex[i2];
|
|
132325
|
+
const obsI = parseInt(obsId) - 1;
|
|
132326
|
+
totalData[indexOffset + obsI] = normalizedFeatureArr[i2];
|
|
132327
|
+
}
|
|
132328
|
+
} else {
|
|
132329
|
+
totalData.set(normalizedFeatureArr, indexOffset);
|
|
132330
|
+
}
|
|
132261
132331
|
indicesOffsets.push(indexOffset);
|
|
132262
132332
|
indexOffset += featureArr.length;
|
|
132263
132333
|
colorsOffsets.push(colorOffset);
|
|
@@ -132284,6 +132354,17 @@ function padWithDefault(arr, defaultValue2, padWidth) {
|
|
|
132284
132354
|
function getColor(arr) {
|
|
132285
132355
|
return arr ? arr.map((v) => v / 255) : [0, 0, 0];
|
|
132286
132356
|
}
|
|
132357
|
+
function isEqualShallow(prevArr, nextArr) {
|
|
132358
|
+
if (prevArr === nextArr) {
|
|
132359
|
+
return true;
|
|
132360
|
+
}
|
|
132361
|
+
if (Array.isArray(prevArr) && Array.isArray(nextArr)) {
|
|
132362
|
+
if (prevArr.length === nextArr.length) {
|
|
132363
|
+
return !prevArr.some((v, i2) => v !== nextArr[i2] && (!Array.isArray(v) && !Array.isArray(nextArr[i2]) || (v.length > 0 || nextArr[i2].length > 0)));
|
|
132364
|
+
}
|
|
132365
|
+
}
|
|
132366
|
+
return prevArr === nextArr;
|
|
132367
|
+
}
|
|
132287
132368
|
const defaultProps$1 = {
|
|
132288
132369
|
channelStrokeWidths: { type: "array", value: null, compare: true },
|
|
132289
132370
|
channelsFilled: { type: "array", value: null, compare: true },
|
|
@@ -132293,6 +132374,7 @@ const defaultProps$1 = {
|
|
|
132293
132374
|
colormap: { type: "string", value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
132294
132375
|
expressionData: { type: "object", value: null, compare: true },
|
|
132295
132376
|
multiFeatureValues: { type: "array", value: null, compare: true },
|
|
132377
|
+
multiMatrixObsIndex: { type: "array", value: null, compare: true },
|
|
132296
132378
|
setColorValues: { type: "array", value: null, compare: true },
|
|
132297
132379
|
channelFeatureValueColormaps: { type: "array", value: null, compare: true },
|
|
132298
132380
|
channelFeatureValueColormapRanges: { type: "array", value: null, compare: true },
|
|
@@ -132339,9 +132421,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
132339
132421
|
}
|
|
132340
132422
|
updateState({ props: props2, oldProps, changeFlags }) {
|
|
132341
132423
|
super.updateState({ props: props2, oldProps, changeFlags });
|
|
132342
|
-
if (props2.multiFeatureValues
|
|
132343
|
-
const { multiFeatureValues, setColorValues, channelIsSetColorMode } = this.props;
|
|
132344
|
-
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode);
|
|
132424
|
+
if (!isEqualShallow(props2.multiFeatureValues, oldProps.multiFeatureValues) || !isEqualShallow(props2.multiMatrixObsIndex, oldProps.multiMatrixObsIndex) || !isEqualShallow(props2.setColorValues, oldProps.setColorValues) || !isEqualShallow(props2.channelIsSetColorMode, oldProps.channelIsSetColorMode)) {
|
|
132425
|
+
const { multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode } = this.props;
|
|
132426
|
+
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode);
|
|
132345
132427
|
this.setState({
|
|
132346
132428
|
valueTex,
|
|
132347
132429
|
colorTex,
|
|
@@ -132493,9 +132575,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
132493
132575
|
type: GL$1.FLOAT
|
|
132494
132576
|
});
|
|
132495
132577
|
}
|
|
132496
|
-
multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode) {
|
|
132578
|
+
multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode) {
|
|
132497
132579
|
const isWebGL2On = isWebGL2$1(this.context.gl);
|
|
132498
|
-
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
132580
|
+
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
132499
132581
|
return [
|
|
132500
132582
|
// Color indices texture
|
|
132501
132583
|
new Texture2D(this.context.gl, {
|
|
@@ -133770,13 +133852,13 @@ var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
|
133770
133852
|
const refType$1 = refType;
|
|
133771
133853
|
function clamp$1(value) {
|
|
133772
133854
|
var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
133773
|
-
var
|
|
133855
|
+
var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
133774
133856
|
{
|
|
133775
|
-
if (value < min || value >
|
|
133776
|
-
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(
|
|
133857
|
+
if (value < min || value > max2) {
|
|
133858
|
+
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max2, "]."));
|
|
133777
133859
|
}
|
|
133778
133860
|
}
|
|
133779
|
-
return Math.min(Math.max(min, value),
|
|
133861
|
+
return Math.min(Math.max(min, value), max2);
|
|
133780
133862
|
}
|
|
133781
133863
|
function hexToRgb(color) {
|
|
133782
133864
|
color = color.substr(1);
|
|
@@ -146750,8 +146832,8 @@ const ValueLabel$1 = withStyles2(styles$5, {
|
|
|
146750
146832
|
function asc(a2, b) {
|
|
146751
146833
|
return a2 - b;
|
|
146752
146834
|
}
|
|
146753
|
-
function clamp(value, min,
|
|
146754
|
-
return Math.min(Math.max(min, value),
|
|
146835
|
+
function clamp(value, min, max2) {
|
|
146836
|
+
return Math.min(Math.max(min, value), max2);
|
|
146755
146837
|
}
|
|
146756
146838
|
function findClosest(values2, currentValue) {
|
|
146757
146839
|
var _values$reduce = values2.reduce(function(acc, value, index2) {
|
|
@@ -146784,11 +146866,11 @@ function trackFinger(event, touchId) {
|
|
|
146784
146866
|
y: event.clientY
|
|
146785
146867
|
};
|
|
146786
146868
|
}
|
|
146787
|
-
function valueToPercent(value, min,
|
|
146788
|
-
return (value - min) * 100 / (
|
|
146869
|
+
function valueToPercent(value, min, max2) {
|
|
146870
|
+
return (value - min) * 100 / (max2 - min);
|
|
146789
146871
|
}
|
|
146790
|
-
function percentToValue(percent2, min,
|
|
146791
|
-
return (
|
|
146872
|
+
function percentToValue(percent2, min, max2) {
|
|
146873
|
+
return (max2 - min) * percent2 + min;
|
|
146792
146874
|
}
|
|
146793
146875
|
function getDecimalPrecision(num) {
|
|
146794
146876
|
if (Math.abs(num) < 1) {
|
|
@@ -147076,7 +147158,7 @@ var styles$4 = function styles17(theme) {
|
|
|
147076
147158
|
};
|
|
147077
147159
|
};
|
|
147078
147160
|
var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
147079
|
-
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max,
|
|
147161
|
+
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max, max2 = _props$max === void 0 ? 100 : _props$max, _props$min = props2.min, min = _props$min === void 0 ? 0 : _props$min, name2 = props2.name, onChange = props2.onChange, onChangeCommitted = props2.onChangeCommitted, onMouseDown = props2.onMouseDown, _props$orientation = props2.orientation, orientation = _props$orientation === void 0 ? "horizontal" : _props$orientation, _props$scale = props2.scale, scale2 = _props$scale === void 0 ? Identity : _props$scale, _props$step = props2.step, step = _props$step === void 0 ? 1 : _props$step, _props$ThumbComponent = props2.ThumbComponent, ThumbComponent = _props$ThumbComponent === void 0 ? "span" : _props$ThumbComponent, _props$track = props2.track, track = _props$track === void 0 ? "normal" : _props$track, valueProp = props2.value, _props$ValueLabelComp = props2.ValueLabelComponent, ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel$1 : _props$ValueLabelComp, _props$valueLabelDisp = props2.valueLabelDisplay, valueLabelDisplay = _props$valueLabelDisp === void 0 ? "off" : _props$valueLabelDisp, _props$valueLabelForm = props2.valueLabelFormat, valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, other = _objectWithoutProperties(props2, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
|
|
147080
147162
|
var theme = useTheme();
|
|
147081
147163
|
var touchId = React.useRef();
|
|
147082
147164
|
var _React$useState = React.useState(-1), active = _React$useState[0], setActive = _React$useState[1];
|
|
@@ -147089,9 +147171,9 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147089
147171
|
var range2 = Array.isArray(valueDerived);
|
|
147090
147172
|
var values2 = range2 ? valueDerived.slice().sort(asc) : [valueDerived];
|
|
147091
147173
|
values2 = values2.map(function(value) {
|
|
147092
|
-
return clamp(value, min,
|
|
147174
|
+
return clamp(value, min, max2);
|
|
147093
147175
|
});
|
|
147094
|
-
var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((
|
|
147176
|
+
var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((max2 - min) / step) + 1)).map(function(_, index2) {
|
|
147095
147177
|
return {
|
|
147096
147178
|
value: min + step * index2
|
|
147097
147179
|
};
|
|
@@ -147126,7 +147208,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147126
147208
|
var handleKeyDown2 = useEventCallback(function(event) {
|
|
147127
147209
|
var index2 = Number(event.currentTarget.getAttribute("data-index"));
|
|
147128
147210
|
var value = values2[index2];
|
|
147129
|
-
var tenPercents = (
|
|
147211
|
+
var tenPercents = (max2 - min) / 10;
|
|
147130
147212
|
var marksValues = marks.map(function(mark) {
|
|
147131
147213
|
return mark.value;
|
|
147132
147214
|
});
|
|
@@ -147139,7 +147221,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147139
147221
|
newValue = min;
|
|
147140
147222
|
break;
|
|
147141
147223
|
case "End":
|
|
147142
|
-
newValue =
|
|
147224
|
+
newValue = max2;
|
|
147143
147225
|
break;
|
|
147144
147226
|
case "PageUp":
|
|
147145
147227
|
if (step) {
|
|
@@ -147174,7 +147256,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147174
147256
|
if (step) {
|
|
147175
147257
|
newValue = roundValueToStep(newValue, step, min);
|
|
147176
147258
|
}
|
|
147177
|
-
newValue = clamp(newValue, min,
|
|
147259
|
+
newValue = clamp(newValue, min, max2);
|
|
147178
147260
|
if (range2) {
|
|
147179
147261
|
var previousValue = newValue;
|
|
147180
147262
|
newValue = setValueIndex({
|
|
@@ -147216,7 +147298,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147216
147298
|
percent2 = 1 - percent2;
|
|
147217
147299
|
}
|
|
147218
147300
|
var newValue;
|
|
147219
|
-
newValue = percentToValue(percent2, min,
|
|
147301
|
+
newValue = percentToValue(percent2, min, max2);
|
|
147220
147302
|
if (step) {
|
|
147221
147303
|
newValue = roundValueToStep(newValue, step, min);
|
|
147222
147304
|
} else {
|
|
@@ -147226,7 +147308,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147226
147308
|
var closestIndex = findClosest(marksValues, newValue);
|
|
147227
147309
|
newValue = marksValues[closestIndex];
|
|
147228
147310
|
}
|
|
147229
|
-
newValue = clamp(newValue, min,
|
|
147311
|
+
newValue = clamp(newValue, min, max2);
|
|
147230
147312
|
var activeIndex = 0;
|
|
147231
147313
|
if (range2) {
|
|
147232
147314
|
if (!move) {
|
|
@@ -147355,8 +147437,8 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147355
147437
|
doc.addEventListener("mousemove", handleTouchMove);
|
|
147356
147438
|
doc.addEventListener("mouseup", handleTouchEnd);
|
|
147357
147439
|
});
|
|
147358
|
-
var trackOffset = valueToPercent(range2 ? values2[0] : min, min,
|
|
147359
|
-
var trackLeap = valueToPercent(values2[values2.length - 1], min,
|
|
147440
|
+
var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max2);
|
|
147441
|
+
var trackLeap = valueToPercent(values2[values2.length - 1], min, max2) - trackOffset;
|
|
147360
147442
|
var trackStyle = _extends$1({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));
|
|
147361
147443
|
return /* @__PURE__ */ React.createElement(Component2, _extends$1({
|
|
147362
147444
|
ref: handleRef,
|
|
@@ -147374,7 +147456,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147374
147456
|
name: name2,
|
|
147375
147457
|
type: "hidden"
|
|
147376
147458
|
}), marks.map(function(mark, index2) {
|
|
147377
|
-
var percent2 = valueToPercent(mark.value, min,
|
|
147459
|
+
var percent2 = valueToPercent(mark.value, min, max2);
|
|
147378
147460
|
var style = axisProps[axis].offset(percent2);
|
|
147379
147461
|
var markActive;
|
|
147380
147462
|
if (track === false) {
|
|
@@ -147395,7 +147477,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147395
147477
|
className: clsx(classes.markLabel, markActive && classes.markLabelActive)
|
|
147396
147478
|
}, mark.label) : null);
|
|
147397
147479
|
}), values2.map(function(value, index2) {
|
|
147398
|
-
var percent2 = valueToPercent(value, min,
|
|
147480
|
+
var percent2 = valueToPercent(value, min, max2);
|
|
147399
147481
|
var style = axisProps[axis].offset(percent2);
|
|
147400
147482
|
return /* @__PURE__ */ React.createElement(ValueLabelComponent, {
|
|
147401
147483
|
key: index2,
|
|
@@ -147415,7 +147497,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
147415
147497
|
"aria-label": getAriaLabel ? getAriaLabel(index2) : ariaLabel,
|
|
147416
147498
|
"aria-labelledby": ariaLabelledby,
|
|
147417
147499
|
"aria-orientation": orientation,
|
|
147418
|
-
"aria-valuemax": scale2(
|
|
147500
|
+
"aria-valuemax": scale2(max2),
|
|
147419
147501
|
"aria-valuemin": scale2(min),
|
|
147420
147502
|
"aria-valuenow": scale2(value),
|
|
147421
147503
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale2(value), index2) : ariaValuetext,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-ad0b1f6c.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GatingSubscriber.d.ts","sourceRoot":"","sources":["../src/GatingSubscriber.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;KAYK;AACL;IAV2B,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAES,cAAc,EAA7B,OAAO;IACS,mBAAmB;IAErB,kBAAkB,EAAhC,MAAM;gBAgalB"}
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useState, useEffect, useCallback, useMemo, } from 'react';
|
|
3
3
|
import { extent } from 'd3-array';
|
|
4
4
|
import { isEqual } from 'lodash-es';
|
|
5
|
-
import { pluralize as plur, capitalize, commaNumber,
|
|
5
|
+
import { pluralize as plur, capitalize, commaNumber, getValueTransformFunction, VALUE_TRANSFORM_OPTIONS, } from '@vitessce/utils';
|
|
6
6
|
import { TitleInfo, useDeckCanvasSize, useReady, useUrls, useUint8FeatureSelection, useExpressionValueGetter, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, } from '@vitessce/vit-s';
|
|
7
|
-
import { getCellSetPolygons, mergeObsSets, setObsSelection } from '@vitessce/sets-utils';
|
|
7
|
+
import { getCellSetPolygons, mergeObsSets, setObsSelection, getCellColors, } from '@vitessce/sets-utils';
|
|
8
8
|
import { Scatterplot, ScatterplotTooltipSubscriber, ScatterplotOptions, getPointSizeDevicePixels, getPointOpacity, EmptyMessage, } from '@vitessce/scatterplot';
|
|
9
9
|
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
10
10
|
import GatingScatterplotOptions from './GatingScatterplotOptions.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/sets-utils": "3.3.
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/constants-internal": "3.3.4",
|
|
24
|
+
"@vitessce/scatterplot": "3.3.4",
|
|
25
|
+
"@vitessce/sets-utils": "3.3.4",
|
|
26
|
+
"@vitessce/utils": "3.3.4",
|
|
27
|
+
"@vitessce/vit-s": "3.3.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|
package/src/GatingSubscriber.js
CHANGED
|
@@ -6,7 +6,6 @@ import { isEqual } from 'lodash-es';
|
|
|
6
6
|
import {
|
|
7
7
|
pluralize as plur,
|
|
8
8
|
capitalize, commaNumber,
|
|
9
|
-
getCellColors,
|
|
10
9
|
getValueTransformFunction, VALUE_TRANSFORM_OPTIONS,
|
|
11
10
|
} from '@vitessce/utils';
|
|
12
11
|
import {
|
|
@@ -22,7 +21,9 @@ import {
|
|
|
22
21
|
useSetComponentHover,
|
|
23
22
|
useSetComponentViewInfo,
|
|
24
23
|
} from '@vitessce/vit-s';
|
|
25
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
getCellSetPolygons, mergeObsSets, setObsSelection, getCellColors,
|
|
26
|
+
} from '@vitessce/sets-utils';
|
|
26
27
|
import {
|
|
27
28
|
Scatterplot, ScatterplotTooltipSubscriber, ScatterplotOptions,
|
|
28
29
|
getPointSizeDevicePixels,
|