@vitessce/spatial-utils 3.5.7 → 3.5.8
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-fb583d27.js → deflate-a18aa092.js} +1 -1
- package/dist/{index-6813c045.js → index-677eeed0.js} +666 -798
- package/dist/index.js +1 -1
- package/dist/{jpeg-1cb04461.js → jpeg-8fc6d0e2.js} +1 -1
- package/dist/{lerc-36bff55b.js → lerc-bbd3647a.js} +1 -1
- package/dist/{lzw-5a827465.js → lzw-3c031ccf.js} +1 -1
- package/dist/{packbits-9a095897.js → packbits-184fd0f9.js} +1 -1
- package/dist/{raw-f26a9f8d.js → raw-ee86fdce.js} +1 -1
- package/dist/{webimage-54f03dd3.js → webimage-b6c0ac98.js} +1 -1
- package/dist/zstd-561fda0e.js +778 -0
- package/package.json +7 -7
- package/dist/zstd-ec5a40b8.js +0 -808
|
@@ -22,7 +22,7 @@ var __privateSet = (obj, member, value, setter2) => {
|
|
|
22
22
|
setter2 ? setter2.call(obj, value) : member.set(obj, value);
|
|
23
23
|
return value;
|
|
24
24
|
};
|
|
25
|
-
var _bytes, _encoder, _data,
|
|
25
|
+
var _bytes, _encoder, _data, _stride, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _order, _inverseOrder, _shape2, _strides, _metadata, _metadata2, _a2, _b;
|
|
26
26
|
import "react";
|
|
27
27
|
function _mergeNamespaces(n3, m) {
|
|
28
28
|
for (var i2 = 0; i2 < m.length; i2++) {
|
|
@@ -137,7 +137,7 @@ var reTrimStart = /^\s+/;
|
|
|
137
137
|
function baseTrim(string) {
|
|
138
138
|
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
139
139
|
}
|
|
140
|
-
function isObject$
|
|
140
|
+
function isObject$6(value) {
|
|
141
141
|
var type2 = typeof value;
|
|
142
142
|
return value != null && (type2 == "object" || type2 == "function");
|
|
143
143
|
}
|
|
@@ -153,9 +153,9 @@ function toNumber$1(value) {
|
|
|
153
153
|
if (isSymbol$1(value)) {
|
|
154
154
|
return NAN$1;
|
|
155
155
|
}
|
|
156
|
-
if (isObject$
|
|
156
|
+
if (isObject$6(value)) {
|
|
157
157
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
158
|
-
value = isObject$
|
|
158
|
+
value = isObject$6(other) ? other + "" : other;
|
|
159
159
|
}
|
|
160
160
|
if (typeof value != "string") {
|
|
161
161
|
return value === 0 ? value : +value;
|
|
@@ -177,8 +177,8 @@ function toFinite(value) {
|
|
|
177
177
|
return value === value ? value : 0;
|
|
178
178
|
}
|
|
179
179
|
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
180
|
-
function isFunction$
|
|
181
|
-
if (!isObject$
|
|
180
|
+
function isFunction$4(value) {
|
|
181
|
+
if (!isObject$6(value)) {
|
|
182
182
|
return false;
|
|
183
183
|
}
|
|
184
184
|
var tag2 = baseGetTag(value);
|
|
@@ -217,10 +217,10 @@ var reIsNative = RegExp(
|
|
|
217
217
|
"^" + funcToString.call(hasOwnProperty$a).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
218
218
|
);
|
|
219
219
|
function baseIsNative(value) {
|
|
220
|
-
if (!isObject$
|
|
220
|
+
if (!isObject$6(value) || isMasked(value)) {
|
|
221
221
|
return false;
|
|
222
222
|
}
|
|
223
|
-
var pattern = isFunction$
|
|
223
|
+
var pattern = isFunction$4(value) ? reIsNative : reIsHostCtor;
|
|
224
224
|
return pattern.test(toSource(value));
|
|
225
225
|
}
|
|
226
226
|
function getValue$1(object2, key) {
|
|
@@ -247,10 +247,10 @@ function isLength(value) {
|
|
|
247
247
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
248
248
|
}
|
|
249
249
|
function isArrayLike(value) {
|
|
250
|
-
return value != null && isLength(value.length) && !isFunction$
|
|
250
|
+
return value != null && isLength(value.length) && !isFunction$4(value);
|
|
251
251
|
}
|
|
252
252
|
function isIterateeCall(value, index2, object2) {
|
|
253
|
-
if (!isObject$
|
|
253
|
+
if (!isObject$6(object2)) {
|
|
254
254
|
return false;
|
|
255
255
|
}
|
|
256
256
|
var type2 = typeof index2;
|
|
@@ -888,7 +888,7 @@ function createRange(fromRight) {
|
|
|
888
888
|
}
|
|
889
889
|
var range$5 = createRange();
|
|
890
890
|
const range$6 = range$5;
|
|
891
|
-
function assert$
|
|
891
|
+
function assert$d(condition, message) {
|
|
892
892
|
if (!condition) {
|
|
893
893
|
throw new Error("math.gl assertion ".concat(message));
|
|
894
894
|
}
|
|
@@ -905,7 +905,7 @@ const config$2 = {
|
|
|
905
905
|
};
|
|
906
906
|
function configure(options) {
|
|
907
907
|
for (const key in options) {
|
|
908
|
-
assert$
|
|
908
|
+
assert$d(key in config$2);
|
|
909
909
|
config$2[key] = options[key];
|
|
910
910
|
}
|
|
911
911
|
return config$2;
|
|
@@ -1355,11 +1355,11 @@ class Vector extends MathArray {
|
|
|
1355
1355
|
return this.distanceSquared(vector);
|
|
1356
1356
|
}
|
|
1357
1357
|
getComponent(i2) {
|
|
1358
|
-
assert$
|
|
1358
|
+
assert$d(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
1359
1359
|
return checkNumber(this[i2]);
|
|
1360
1360
|
}
|
|
1361
1361
|
setComponent(i2, value) {
|
|
1362
|
-
assert$
|
|
1362
|
+
assert$d(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
1363
1363
|
this[i2] = value;
|
|
1364
1364
|
return this.check();
|
|
1365
1365
|
}
|
|
@@ -4544,7 +4544,7 @@ const esm$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
4544
4544
|
_SphericalCoordinates: SphericalCoordinates,
|
|
4545
4545
|
acos: acos$2,
|
|
4546
4546
|
asin: asin$2,
|
|
4547
|
-
assert: assert$
|
|
4547
|
+
assert: assert$d,
|
|
4548
4548
|
atan: atan$2,
|
|
4549
4549
|
clamp: clamp$2,
|
|
4550
4550
|
clone: clone$8,
|
|
@@ -4597,7 +4597,7 @@ var DEFAULT_CONFIG = {
|
|
|
4597
4597
|
// null = randomly seed
|
|
4598
4598
|
randomSeed: null
|
|
4599
4599
|
};
|
|
4600
|
-
function isNumber$
|
|
4600
|
+
function isNumber$2(x2) {
|
|
4601
4601
|
return typeof x2 === "number";
|
|
4602
4602
|
}
|
|
4603
4603
|
function isBigNumber(x2) {
|
|
@@ -4652,7 +4652,7 @@ function isResultSet(x2) {
|
|
|
4652
4652
|
function isHelp(x2) {
|
|
4653
4653
|
return x2 && x2.constructor.prototype.isHelp === true || false;
|
|
4654
4654
|
}
|
|
4655
|
-
function isFunction$
|
|
4655
|
+
function isFunction$3(x2) {
|
|
4656
4656
|
return typeof x2 === "function";
|
|
4657
4657
|
}
|
|
4658
4658
|
function isDate$1(x2) {
|
|
@@ -4661,13 +4661,13 @@ function isDate$1(x2) {
|
|
|
4661
4661
|
function isRegExp(x2) {
|
|
4662
4662
|
return x2 instanceof RegExp;
|
|
4663
4663
|
}
|
|
4664
|
-
function isObject$
|
|
4664
|
+
function isObject$5(x2) {
|
|
4665
4665
|
return !!(x2 && typeof x2 === "object" && x2.constructor === Object && !isComplex(x2) && !isFraction(x2));
|
|
4666
4666
|
}
|
|
4667
4667
|
function isNull(x2) {
|
|
4668
4668
|
return x2 === null;
|
|
4669
4669
|
}
|
|
4670
|
-
function isUndefined(x2) {
|
|
4670
|
+
function isUndefined$1(x2) {
|
|
4671
4671
|
return x2 === void 0;
|
|
4672
4672
|
}
|
|
4673
4673
|
function isAccessorNode(x2) {
|
|
@@ -5751,9 +5751,9 @@ function format$3(value, options) {
|
|
|
5751
5751
|
if (options.notation) {
|
|
5752
5752
|
notation = options.notation;
|
|
5753
5753
|
}
|
|
5754
|
-
if (isNumber$
|
|
5754
|
+
if (isNumber$2(options)) {
|
|
5755
5755
|
precision = options;
|
|
5756
|
-
} else if (isNumber$
|
|
5756
|
+
} else if (isNumber$2(options.precision)) {
|
|
5757
5757
|
precision = options.precision;
|
|
5758
5758
|
}
|
|
5759
5759
|
if (options.wordSize) {
|
|
@@ -5821,7 +5821,7 @@ function toEngineering$1(value, precision) {
|
|
|
5821
5821
|
var e2 = rounded.exponent;
|
|
5822
5822
|
var c = rounded.coefficients;
|
|
5823
5823
|
var newExp = e2 % 3 === 0 ? e2 : e2 < 0 ? e2 - 3 - e2 % 3 : e2 - e2 % 3;
|
|
5824
|
-
if (isNumber$
|
|
5824
|
+
if (isNumber$2(precision)) {
|
|
5825
5825
|
while (precision > c.length || e2 - newExp + 1 > c.length) {
|
|
5826
5826
|
c.push(0);
|
|
5827
5827
|
}
|
|
@@ -5838,7 +5838,7 @@ function toEngineering$1(value, precision) {
|
|
|
5838
5838
|
expDiff--;
|
|
5839
5839
|
}
|
|
5840
5840
|
var decimals = c.slice(decimalIdx).join("");
|
|
5841
|
-
var decimalVal = isNumber$
|
|
5841
|
+
var decimalVal = isNumber$2(precision) && decimals.length || decimals.match(/[1-9]/) ? "." + decimals : "";
|
|
5842
5842
|
var str = c.slice(0, decimalIdx).join("") + decimalVal + "e" + (e2 >= 0 ? "+" : "") + newExp.toString();
|
|
5843
5843
|
return rounded.sign + str;
|
|
5844
5844
|
}
|
|
@@ -6221,7 +6221,7 @@ function validate$1(array, size2) {
|
|
|
6221
6221
|
}
|
|
6222
6222
|
}
|
|
6223
6223
|
function validateIndex(index2, length2) {
|
|
6224
|
-
if (!isNumber$
|
|
6224
|
+
if (!isNumber$2(index2) || !isInteger(index2)) {
|
|
6225
6225
|
throw new TypeError("Index must be an integer (value: " + index2 + ")");
|
|
6226
6226
|
}
|
|
6227
6227
|
if (index2 < 0 || typeof length2 === "number" && index2 >= length2) {
|
|
@@ -6236,7 +6236,7 @@ function resize(array, size2, defaultValue2) {
|
|
|
6236
6236
|
throw new Error("Resizing to scalar is not supported");
|
|
6237
6237
|
}
|
|
6238
6238
|
size2.forEach(function(value) {
|
|
6239
|
-
if (!isNumber$
|
|
6239
|
+
if (!isNumber$2(value) || !isInteger(value) || value < 0) {
|
|
6240
6240
|
throw new TypeError("Invalid size, must contain positive integers (size: " + format$1(size2) + ")");
|
|
6241
6241
|
}
|
|
6242
6242
|
});
|
|
@@ -6532,7 +6532,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
6532
6532
|
typed2.types = [
|
|
6533
6533
|
{
|
|
6534
6534
|
name: "number",
|
|
6535
|
-
test: isNumber$
|
|
6535
|
+
test: isNumber$2
|
|
6536
6536
|
},
|
|
6537
6537
|
{
|
|
6538
6538
|
name: "Complex",
|
|
@@ -6596,7 +6596,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
6596
6596
|
},
|
|
6597
6597
|
{
|
|
6598
6598
|
name: "function",
|
|
6599
|
-
test: isFunction$
|
|
6599
|
+
test: isFunction$3
|
|
6600
6600
|
},
|
|
6601
6601
|
{
|
|
6602
6602
|
name: "Date",
|
|
@@ -6612,7 +6612,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
6612
6612
|
},
|
|
6613
6613
|
{
|
|
6614
6614
|
name: "undefined",
|
|
6615
|
-
test: isUndefined
|
|
6615
|
+
test: isUndefined$1
|
|
6616
6616
|
},
|
|
6617
6617
|
{
|
|
6618
6618
|
name: "AccessorNode",
|
|
@@ -6680,7 +6680,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
|
|
|
6680
6680
|
},
|
|
6681
6681
|
{
|
|
6682
6682
|
name: "Object",
|
|
6683
|
-
test: isObject$
|
|
6683
|
+
test: isObject$5
|
|
6684
6684
|
}
|
|
6685
6685
|
// order 'Object' last, it matches on other classes too
|
|
6686
6686
|
];
|
|
@@ -10252,7 +10252,7 @@ var createComplexClass = /* @__PURE__ */ factory(name$V, dependencies$O, () => {
|
|
|
10252
10252
|
var re = this.re;
|
|
10253
10253
|
var strRe = format$3(this.re, options);
|
|
10254
10254
|
var strIm = format$3(this.im, options);
|
|
10255
|
-
var precision = isNumber$
|
|
10255
|
+
var precision = isNumber$2(options) ? options : options ? options.precision : null;
|
|
10256
10256
|
if (precision !== null) {
|
|
10257
10257
|
var epsilon3 = Math.pow(10, -precision);
|
|
10258
10258
|
if (Math.abs(re / im) < epsilon3) {
|
|
@@ -10302,11 +10302,11 @@ var createComplexClass = /* @__PURE__ */ factory(name$V, dependencies$O, () => {
|
|
|
10302
10302
|
case 2: {
|
|
10303
10303
|
var r2 = arguments[0];
|
|
10304
10304
|
var phi = arguments[1];
|
|
10305
|
-
if (isNumber$
|
|
10305
|
+
if (isNumber$2(r2)) {
|
|
10306
10306
|
if (isUnit(phi) && phi.hasBase("ANGLE")) {
|
|
10307
10307
|
phi = phi.toNumber("rad");
|
|
10308
10308
|
}
|
|
10309
|
-
if (isNumber$
|
|
10309
|
+
if (isNumber$2(phi)) {
|
|
10310
10310
|
return new Complex$1({
|
|
10311
10311
|
r: r2,
|
|
10312
10312
|
phi
|
|
@@ -11439,7 +11439,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
11439
11439
|
if (isBigNumber(k)) {
|
|
11440
11440
|
k = k.toNumber();
|
|
11441
11441
|
}
|
|
11442
|
-
if (!isNumber$
|
|
11442
|
+
if (!isNumber$2(k) || !isInteger(k)) {
|
|
11443
11443
|
throw new TypeError("The parameter k must be an integer number");
|
|
11444
11444
|
}
|
|
11445
11445
|
} else {
|
|
@@ -11471,7 +11471,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
11471
11471
|
if (isBigNumber(s2)) {
|
|
11472
11472
|
s2 = s2.toNumber();
|
|
11473
11473
|
}
|
|
11474
|
-
if (!isNumber$
|
|
11474
|
+
if (!isNumber$2(s2) || !isInteger(s2) || s2 < 1) {
|
|
11475
11475
|
throw new Error("Size values must be positive integers");
|
|
11476
11476
|
}
|
|
11477
11477
|
return s2;
|
|
@@ -11480,7 +11480,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
11480
11480
|
if (isBigNumber(k)) {
|
|
11481
11481
|
k = k.toNumber();
|
|
11482
11482
|
}
|
|
11483
|
-
if (!isNumber$
|
|
11483
|
+
if (!isNumber$2(k) || !isInteger(k)) {
|
|
11484
11484
|
throw new TypeError("The parameter k must be an integer number");
|
|
11485
11485
|
}
|
|
11486
11486
|
} else {
|
|
@@ -11531,7 +11531,7 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
|
|
|
11531
11531
|
return new DenseMatrix2(json);
|
|
11532
11532
|
};
|
|
11533
11533
|
DenseMatrix2.prototype.swapRows = function(i2, j) {
|
|
11534
|
-
if (!isNumber$
|
|
11534
|
+
if (!isNumber$2(i2) || !isInteger(i2) || !isNumber$2(j) || !isInteger(j)) {
|
|
11535
11535
|
throw new Error("Row index must be positive integers");
|
|
11536
11536
|
}
|
|
11537
11537
|
if (this._size.length !== 2) {
|
|
@@ -12017,7 +12017,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12017
12017
|
throw new Error("Only two dimensions matrix are supported");
|
|
12018
12018
|
}
|
|
12019
12019
|
sizeArray.forEach(function(value) {
|
|
12020
|
-
if (!isNumber$
|
|
12020
|
+
if (!isNumber$2(value) || !isInteger(value) || value < 0) {
|
|
12021
12021
|
throw new TypeError("Invalid size, must contain positive integers (size: " + format$1(sizeArray) + ")");
|
|
12022
12022
|
}
|
|
12023
12023
|
});
|
|
@@ -12098,7 +12098,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12098
12098
|
throw new Error("Sparse matrices can only be reshaped in two dimensions");
|
|
12099
12099
|
}
|
|
12100
12100
|
sizes.forEach(function(value) {
|
|
12101
|
-
if (!isNumber$
|
|
12101
|
+
if (!isNumber$2(value) || !isInteger(value) || value <= -2 || value === 0) {
|
|
12102
12102
|
throw new TypeError("Invalid size, must contain positive integers or -1 (size: " + format$1(sizes) + ")");
|
|
12103
12103
|
}
|
|
12104
12104
|
});
|
|
@@ -12321,7 +12321,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12321
12321
|
if (isBigNumber(k)) {
|
|
12322
12322
|
k = k.toNumber();
|
|
12323
12323
|
}
|
|
12324
|
-
if (!isNumber$
|
|
12324
|
+
if (!isNumber$2(k) || !isInteger(k)) {
|
|
12325
12325
|
throw new TypeError("The parameter k must be an integer number");
|
|
12326
12326
|
}
|
|
12327
12327
|
} else {
|
|
@@ -12370,7 +12370,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12370
12370
|
if (isBigNumber(s2)) {
|
|
12371
12371
|
s2 = s2.toNumber();
|
|
12372
12372
|
}
|
|
12373
|
-
if (!isNumber$
|
|
12373
|
+
if (!isNumber$2(s2) || !isInteger(s2) || s2 < 1) {
|
|
12374
12374
|
throw new Error("Size values must be positive integers");
|
|
12375
12375
|
}
|
|
12376
12376
|
return s2;
|
|
@@ -12379,7 +12379,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12379
12379
|
if (isBigNumber(k)) {
|
|
12380
12380
|
k = k.toNumber();
|
|
12381
12381
|
}
|
|
12382
|
-
if (!isNumber$
|
|
12382
|
+
if (!isNumber$2(k) || !isInteger(k)) {
|
|
12383
12383
|
throw new TypeError("The parameter k must be an integer number");
|
|
12384
12384
|
}
|
|
12385
12385
|
} else {
|
|
@@ -12440,7 +12440,7 @@ var createSparseMatrixClass = /* @__PURE__ */ factory(name$P, dependencies$I, (_
|
|
|
12440
12440
|
});
|
|
12441
12441
|
};
|
|
12442
12442
|
SparseMatrix2.prototype.swapRows = function(i2, j) {
|
|
12443
|
-
if (!isNumber$
|
|
12443
|
+
if (!isNumber$2(i2) || !isInteger(i2) || !isNumber$2(j) || !isInteger(j)) {
|
|
12444
12444
|
throw new Error("Row index must be positive integers");
|
|
12445
12445
|
}
|
|
12446
12446
|
if (this._size.length !== 2) {
|
|
@@ -20257,7 +20257,7 @@ const VIEWER_PALETTE = [
|
|
|
20257
20257
|
[255, 128, 0],
|
|
20258
20258
|
[255, 0, 0]
|
|
20259
20259
|
];
|
|
20260
|
-
function assert$
|
|
20260
|
+
function assert$c(condition, message) {
|
|
20261
20261
|
if (!condition) {
|
|
20262
20262
|
throw new Error(message || "loader assertion failed.");
|
|
20263
20263
|
}
|
|
@@ -20266,7 +20266,7 @@ const isBrowser$3 = Boolean(typeof process !== "object" || String(process) !== "
|
|
|
20266
20266
|
const matches$1 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
20267
20267
|
matches$1 && parseFloat(matches$1[1]) || 0;
|
|
20268
20268
|
const VERSION$b = "3.2.10";
|
|
20269
|
-
function assert$
|
|
20269
|
+
function assert$b(condition, message) {
|
|
20270
20270
|
if (!condition) {
|
|
20271
20271
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
20272
20272
|
}
|
|
@@ -20308,12 +20308,12 @@ class WorkerJob {
|
|
|
20308
20308
|
});
|
|
20309
20309
|
}
|
|
20310
20310
|
done(value) {
|
|
20311
|
-
assert$
|
|
20311
|
+
assert$b(this.isRunning);
|
|
20312
20312
|
this.isRunning = false;
|
|
20313
20313
|
this._resolve(value);
|
|
20314
20314
|
}
|
|
20315
20315
|
error(error2) {
|
|
20316
|
-
assert$
|
|
20316
|
+
assert$b(this.isRunning);
|
|
20317
20317
|
this.isRunning = false;
|
|
20318
20318
|
this._reject(error2);
|
|
20319
20319
|
}
|
|
@@ -20322,7 +20322,7 @@ let Worker$1 = class Worker2 {
|
|
|
20322
20322
|
};
|
|
20323
20323
|
const workerURLCache = /* @__PURE__ */ new Map();
|
|
20324
20324
|
function getLoadableWorkerURL(props) {
|
|
20325
|
-
assert$
|
|
20325
|
+
assert$b(props.source && !props.url || !props.source && props.url);
|
|
20326
20326
|
let workerURL = workerURLCache.get(props.source || props.url);
|
|
20327
20327
|
if (!workerURL) {
|
|
20328
20328
|
if (props.url) {
|
|
@@ -20334,7 +20334,7 @@ function getLoadableWorkerURL(props) {
|
|
|
20334
20334
|
workerURLCache.set(props.source, workerURL);
|
|
20335
20335
|
}
|
|
20336
20336
|
}
|
|
20337
|
-
assert$
|
|
20337
|
+
assert$b(workerURL);
|
|
20338
20338
|
return workerURL;
|
|
20339
20339
|
}
|
|
20340
20340
|
function getLoadableWorkerURLFromURL(url) {
|
|
@@ -20408,7 +20408,7 @@ class WorkerThread {
|
|
|
20408
20408
|
source,
|
|
20409
20409
|
url
|
|
20410
20410
|
} = props;
|
|
20411
|
-
assert$
|
|
20411
|
+
assert$b(source || url);
|
|
20412
20412
|
this.name = name2;
|
|
20413
20413
|
this.source = source;
|
|
20414
20414
|
this.url = url;
|
|
@@ -20693,11 +20693,11 @@ function getWorkerURL(worker, options = {}) {
|
|
|
20693
20693
|
const versionTag = version2 ? "@".concat(version2) : "";
|
|
20694
20694
|
url = "https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag, "/dist/").concat(workerFile);
|
|
20695
20695
|
}
|
|
20696
|
-
assert$
|
|
20696
|
+
assert$b(url);
|
|
20697
20697
|
return url;
|
|
20698
20698
|
}
|
|
20699
20699
|
function validateWorkerVersion(worker, coreVersion = VERSION$b) {
|
|
20700
|
-
assert$
|
|
20700
|
+
assert$b(worker, "no worker provided");
|
|
20701
20701
|
const workerVersion = worker.version;
|
|
20702
20702
|
if (!coreVersion || !workerVersion) {
|
|
20703
20703
|
return false;
|
|
@@ -20725,7 +20725,7 @@ function getLibraryUrl(library, moduleName, options) {
|
|
|
20725
20725
|
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
|
|
20726
20726
|
}
|
|
20727
20727
|
if (options.CDN) {
|
|
20728
|
-
assert$
|
|
20728
|
+
assert$b(options.CDN.startsWith("http"));
|
|
20729
20729
|
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION$a, "/dist/libs/").concat(library);
|
|
20730
20730
|
}
|
|
20731
20731
|
if (isWorker) {
|
|
@@ -20938,8 +20938,8 @@ function sliceArrayBuffer(arrayBuffer2, byteOffset, byteLength) {
|
|
|
20938
20938
|
return arrayCopy.buffer;
|
|
20939
20939
|
}
|
|
20940
20940
|
function padToNBytes(byteLength, padding) {
|
|
20941
|
-
assert$
|
|
20942
|
-
assert$
|
|
20941
|
+
assert$c(byteLength >= 0);
|
|
20942
|
+
assert$c(padding > 0);
|
|
20943
20943
|
return byteLength + (padding - 1) & ~(padding - 1);
|
|
20944
20944
|
}
|
|
20945
20945
|
function copyToArray(source, target, targetOffset) {
|
|
@@ -21286,16 +21286,16 @@ function dirname(url) {
|
|
|
21286
21286
|
return slashIndex >= 0 ? url.substr(0, slashIndex) : "";
|
|
21287
21287
|
}
|
|
21288
21288
|
const isBoolean = (x2) => typeof x2 === "boolean";
|
|
21289
|
-
const isFunction$
|
|
21290
|
-
const isObject$
|
|
21291
|
-
const isPureObject = (x2) => isObject$
|
|
21289
|
+
const isFunction$2 = (x2) => typeof x2 === "function";
|
|
21290
|
+
const isObject$4 = (x2) => x2 !== null && typeof x2 === "object";
|
|
21291
|
+
const isPureObject = (x2) => isObject$4(x2) && x2.constructor === {}.constructor;
|
|
21292
21292
|
const isIterable = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
|
|
21293
21293
|
const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
|
|
21294
21294
|
const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
|
|
21295
21295
|
const isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
|
|
21296
21296
|
const isBuffer$1 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
|
|
21297
|
-
const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$
|
|
21298
|
-
const isReadableNodeStream = (x2) => isObject$
|
|
21297
|
+
const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$4(x2) && isFunction$2(x2.tee) && isFunction$2(x2.cancel) && isFunction$2(x2.getReader);
|
|
21298
|
+
const isReadableNodeStream = (x2) => isObject$4(x2) && isFunction$2(x2.read) && isFunction$2(x2.pipe) && isBoolean(x2.readable);
|
|
21299
21299
|
const isReadableStream = (x2) => isReadableDOMStream(x2) || isReadableNodeStream(x2);
|
|
21300
21300
|
const DATA_URL_PATTERN = /^data:([-\w.]+\/[-\w.+]+)(;|,)/;
|
|
21301
21301
|
const MIME_TYPE_PATTERN = /^([-\w.]+\/[-\w.+]+)/;
|
|
@@ -21637,7 +21637,7 @@ function autobind(obj) {
|
|
|
21637
21637
|
}
|
|
21638
21638
|
}
|
|
21639
21639
|
}
|
|
21640
|
-
function assert$
|
|
21640
|
+
function assert$a(condition, message) {
|
|
21641
21641
|
if (!condition) {
|
|
21642
21642
|
throw new Error(message || "Assertion failed");
|
|
21643
21643
|
}
|
|
@@ -21750,7 +21750,7 @@ class Log {
|
|
|
21750
21750
|
}
|
|
21751
21751
|
}
|
|
21752
21752
|
assert(condition, message) {
|
|
21753
|
-
assert$
|
|
21753
|
+
assert$a(condition, message);
|
|
21754
21754
|
}
|
|
21755
21755
|
warn(message) {
|
|
21756
21756
|
return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);
|
|
@@ -21869,7 +21869,7 @@ class Log {
|
|
|
21869
21869
|
opts
|
|
21870
21870
|
});
|
|
21871
21871
|
method = method || opts.method;
|
|
21872
|
-
assert$
|
|
21872
|
+
assert$a(method);
|
|
21873
21873
|
opts.total = this.getTotal();
|
|
21874
21874
|
opts.delta = this.getDelta();
|
|
21875
21875
|
this._deltaTs = getHiResTimestamp();
|
|
@@ -21903,7 +21903,7 @@ function normalizeLogLevel(logLevel) {
|
|
|
21903
21903
|
default:
|
|
21904
21904
|
return 0;
|
|
21905
21905
|
}
|
|
21906
|
-
assert$
|
|
21906
|
+
assert$a(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
21907
21907
|
return resolvedLevel;
|
|
21908
21908
|
}
|
|
21909
21909
|
function normalizeArguments(opts) {
|
|
@@ -21931,7 +21931,7 @@ function normalizeArguments(opts) {
|
|
|
21931
21931
|
opts.message = opts.message();
|
|
21932
21932
|
}
|
|
21933
21933
|
const messageType = typeof opts.message;
|
|
21934
|
-
assert$
|
|
21934
|
+
assert$a(messageType === "string" || messageType === "object");
|
|
21935
21935
|
return Object.assign(opts, {
|
|
21936
21936
|
args
|
|
21937
21937
|
}, opts.opts);
|
|
@@ -22095,7 +22095,7 @@ function getFetchFunction(options, context) {
|
|
|
22095
22095
|
if (typeof fetchOptions.fetch === "function") {
|
|
22096
22096
|
return fetchOptions.fetch;
|
|
22097
22097
|
}
|
|
22098
|
-
if (isObject$
|
|
22098
|
+
if (isObject$4(fetchOptions.fetch)) {
|
|
22099
22099
|
return (url) => fetchFile(url, fetchOptions);
|
|
22100
22100
|
}
|
|
22101
22101
|
if (context !== null && context !== void 0 && context.fetch) {
|
|
@@ -22116,7 +22116,7 @@ function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, l
|
|
|
22116
22116
|
const loaderName = id || "Top level";
|
|
22117
22117
|
const prefix = id ? "".concat(id, ".") : "";
|
|
22118
22118
|
for (const key in options) {
|
|
22119
|
-
const isSubOptions = !id && isObject$
|
|
22119
|
+
const isSubOptions = !id && isObject$4(options[key]);
|
|
22120
22120
|
const isBaseUriOption = key === "baseUri" && !id;
|
|
22121
22121
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
22122
22122
|
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
@@ -22192,8 +22192,8 @@ function isLoaderObject(loader) {
|
|
|
22192
22192
|
}
|
|
22193
22193
|
function normalizeLoader(loader) {
|
|
22194
22194
|
var _loader2, _loader3;
|
|
22195
|
-
assert$
|
|
22196
|
-
assert$
|
|
22195
|
+
assert$c(loader, "null loader");
|
|
22196
|
+
assert$c(isLoaderObject(loader), "invalid loader");
|
|
22197
22197
|
let options;
|
|
22198
22198
|
if (Array.isArray(loader)) {
|
|
22199
22199
|
options = loader[1];
|
|
@@ -22592,7 +22592,7 @@ function getLoadersFromContext(loaders, context) {
|
|
|
22592
22592
|
return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;
|
|
22593
22593
|
}
|
|
22594
22594
|
async function parse$3(data, loaders, options, context) {
|
|
22595
|
-
assert$
|
|
22595
|
+
assert$b(!context || typeof context === "object");
|
|
22596
22596
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
22597
22597
|
context = void 0;
|
|
22598
22598
|
options = loaders;
|
|
@@ -22654,7 +22654,7 @@ async function parseWithLoader(loader, data, options, context) {
|
|
|
22654
22654
|
if (loader.parse) {
|
|
22655
22655
|
return await loader.parse(data, options, context, loader);
|
|
22656
22656
|
}
|
|
22657
|
-
assert$
|
|
22657
|
+
assert$b(!loader.parseSync);
|
|
22658
22658
|
throw new Error("".concat(loader.id, " loader - no parser found and worker is disabled"));
|
|
22659
22659
|
}
|
|
22660
22660
|
async function load(url, loaders, options, context) {
|
|
@@ -22930,7 +22930,7 @@ async function parseToNodeImage(arrayBuffer2, options) {
|
|
|
22930
22930
|
mimeType
|
|
22931
22931
|
} = getBinaryImageMetadata(arrayBuffer2) || {};
|
|
22932
22932
|
const _parseImageNode2 = globalThis._parseImageNode;
|
|
22933
|
-
assert$
|
|
22933
|
+
assert$c(_parseImageNode2);
|
|
22934
22934
|
return await _parseImageNode2(arrayBuffer2, mimeType);
|
|
22935
22935
|
}
|
|
22936
22936
|
async function parseImage(arrayBuffer2, options, context) {
|
|
@@ -22953,7 +22953,7 @@ async function parseImage(arrayBuffer2, options, context) {
|
|
|
22953
22953
|
image = await parseToNodeImage(arrayBuffer2);
|
|
22954
22954
|
break;
|
|
22955
22955
|
default:
|
|
22956
|
-
assert$
|
|
22956
|
+
assert$c(false);
|
|
22957
22957
|
}
|
|
22958
22958
|
if (imageType === "data") {
|
|
22959
22959
|
image = getImageData(image);
|
|
@@ -23176,7 +23176,7 @@ const deckGlobal = globalThis.deck;
|
|
|
23176
23176
|
const log$2 = new Log({
|
|
23177
23177
|
id: "luma.gl"
|
|
23178
23178
|
});
|
|
23179
|
-
function assert$
|
|
23179
|
+
function assert$9(condition, message) {
|
|
23180
23180
|
if (!condition) {
|
|
23181
23181
|
throw new Error(message || "luma.gl: assertion failed.");
|
|
23182
23182
|
}
|
|
@@ -23202,11 +23202,11 @@ function getWebGL2Context(gl) {
|
|
|
23202
23202
|
return isWebGL2$1(gl) ? gl : null;
|
|
23203
23203
|
}
|
|
23204
23204
|
function assertWebGLContext(gl) {
|
|
23205
|
-
assert$
|
|
23205
|
+
assert$9(isWebGL(gl), ERR_CONTEXT);
|
|
23206
23206
|
return gl;
|
|
23207
23207
|
}
|
|
23208
23208
|
function assertWebGL2Context(gl) {
|
|
23209
|
-
assert$
|
|
23209
|
+
assert$9(isWebGL2$1(gl), ERR_WEBGL2);
|
|
23210
23210
|
return gl;
|
|
23211
23211
|
}
|
|
23212
23212
|
const glErrorShadow = {};
|
|
@@ -23572,7 +23572,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
23572
23572
|
suffix: "OES"
|
|
23573
23573
|
},
|
|
23574
23574
|
createVertexArray: () => {
|
|
23575
|
-
assert$
|
|
23575
|
+
assert$9(false, ERR_VAO_NOT_SUPPORTED);
|
|
23576
23576
|
},
|
|
23577
23577
|
deleteVertexArray: () => {
|
|
23578
23578
|
},
|
|
@@ -23585,7 +23585,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
23585
23585
|
suffix: "ANGLE"
|
|
23586
23586
|
},
|
|
23587
23587
|
vertexAttribDivisor(location, divisor) {
|
|
23588
|
-
assert$
|
|
23588
|
+
assert$9(divisor === 0, "WebGL instanced rendering not supported");
|
|
23589
23589
|
},
|
|
23590
23590
|
drawElementsInstanced: () => {
|
|
23591
23591
|
},
|
|
@@ -23597,7 +23597,7 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
23597
23597
|
suffix: "WEBGL"
|
|
23598
23598
|
},
|
|
23599
23599
|
drawBuffers: () => {
|
|
23600
|
-
assert$
|
|
23600
|
+
assert$9(false);
|
|
23601
23601
|
}
|
|
23602
23602
|
},
|
|
23603
23603
|
[EXT_disjoint_timer_query]: {
|
|
@@ -23605,13 +23605,13 @@ const WEBGL2_CONTEXT_POLYFILLS = {
|
|
|
23605
23605
|
suffix: "EXT"
|
|
23606
23606
|
},
|
|
23607
23607
|
createQuery: () => {
|
|
23608
|
-
assert$
|
|
23608
|
+
assert$9(false);
|
|
23609
23609
|
},
|
|
23610
23610
|
deleteQuery: () => {
|
|
23611
|
-
assert$
|
|
23611
|
+
assert$9(false);
|
|
23612
23612
|
},
|
|
23613
23613
|
beginQuery: () => {
|
|
23614
|
-
assert$
|
|
23614
|
+
assert$9(false);
|
|
23615
23615
|
},
|
|
23616
23616
|
endQuery: () => {
|
|
23617
23617
|
},
|
|
@@ -23744,7 +23744,7 @@ function polyfillExtension(gl, _ref2) {
|
|
|
23744
23744
|
target2
|
|
23745
23745
|
} = _ref2;
|
|
23746
23746
|
const defaults = WEBGL2_CONTEXT_POLYFILLS[extension];
|
|
23747
|
-
assert$
|
|
23747
|
+
assert$9(defaults);
|
|
23748
23748
|
const {
|
|
23749
23749
|
meta: meta2 = {}
|
|
23750
23750
|
} = defaults;
|
|
@@ -24213,7 +24213,7 @@ class GLState {
|
|
|
24213
24213
|
this.stateStack.push({});
|
|
24214
24214
|
}
|
|
24215
24215
|
pop() {
|
|
24216
|
-
assert$
|
|
24216
|
+
assert$9(this.stateStack.length > 0);
|
|
24217
24217
|
const oldValues = this.stateStack[this.stateStack.length - 1];
|
|
24218
24218
|
setParameters(this.gl, oldValues);
|
|
24219
24219
|
this.stateStack.pop();
|
|
@@ -24223,7 +24223,7 @@ class GLState {
|
|
|
24223
24223
|
let oldValue;
|
|
24224
24224
|
const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];
|
|
24225
24225
|
for (const key in values) {
|
|
24226
|
-
assert$
|
|
24226
|
+
assert$9(key !== void 0);
|
|
24227
24227
|
const value = values[key];
|
|
24228
24228
|
const cached = this.cache[key];
|
|
24229
24229
|
if (!deepArrayEqual(value, cached)) {
|
|
@@ -24247,7 +24247,7 @@ function trackContextState(gl) {
|
|
|
24247
24247
|
enable: enable2 = true,
|
|
24248
24248
|
copyState
|
|
24249
24249
|
} = options;
|
|
24250
|
-
assert$
|
|
24250
|
+
assert$9(copyState !== void 0);
|
|
24251
24251
|
if (!gl.state) {
|
|
24252
24252
|
const {
|
|
24253
24253
|
polyfillContext: polyfillContext2
|
|
@@ -24278,11 +24278,11 @@ function pushContextState(gl) {
|
|
|
24278
24278
|
gl.state.push();
|
|
24279
24279
|
}
|
|
24280
24280
|
function popContextState(gl) {
|
|
24281
|
-
assert$
|
|
24281
|
+
assert$9(gl.state);
|
|
24282
24282
|
gl.state.pop();
|
|
24283
24283
|
}
|
|
24284
24284
|
function setParameters(gl, values) {
|
|
24285
|
-
assert$
|
|
24285
|
+
assert$9(isWebGL(gl), "setParameters requires a WebGL context");
|
|
24286
24286
|
if (isObjectEmpty$1(values)) {
|
|
24287
24287
|
return;
|
|
24288
24288
|
}
|
|
@@ -24413,7 +24413,7 @@ const CONTEXT_DEFAULTS = {
|
|
|
24413
24413
|
};
|
|
24414
24414
|
function createGLContext() {
|
|
24415
24415
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
24416
|
-
assert$
|
|
24416
|
+
assert$9(isBrowser, "createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils");
|
|
24417
24417
|
options = Object.assign({}, CONTEXT_DEFAULTS, options);
|
|
24418
24418
|
const {
|
|
24419
24419
|
width,
|
|
@@ -24648,7 +24648,7 @@ function requestAnimationFrame$1(callback) {
|
|
|
24648
24648
|
function cancelAnimationFrame(timerId) {
|
|
24649
24649
|
return typeof window !== "undefined" && window.cancelAnimationFrame ? window.cancelAnimationFrame(timerId) : clearTimeout(timerId);
|
|
24650
24650
|
}
|
|
24651
|
-
function assert$
|
|
24651
|
+
function assert$8(condition, message) {
|
|
24652
24652
|
if (!condition) {
|
|
24653
24653
|
throw new Error(message || "luma.gl: assertion failed.");
|
|
24654
24654
|
}
|
|
@@ -24663,7 +24663,7 @@ function getKeyValue(gl, name2) {
|
|
|
24663
24663
|
}
|
|
24664
24664
|
name2 = name2.replace(/^.*\./, "");
|
|
24665
24665
|
const value = gl[name2];
|
|
24666
|
-
assert$
|
|
24666
|
+
assert$8(value !== void 0, "Accessing undefined constant GL.".concat(name2));
|
|
24667
24667
|
return value;
|
|
24668
24668
|
}
|
|
24669
24669
|
function getKey(gl, value) {
|
|
@@ -24683,7 +24683,7 @@ function uid() {
|
|
|
24683
24683
|
return "".concat(id, "-").concat(count2);
|
|
24684
24684
|
}
|
|
24685
24685
|
function isPowerOfTwo(n3) {
|
|
24686
|
-
assert$
|
|
24686
|
+
assert$8(typeof n3 === "number", "Input must be a number");
|
|
24687
24687
|
return n3 && (n3 & n3 - 1) === 0;
|
|
24688
24688
|
}
|
|
24689
24689
|
function isObjectEmpty(obj) {
|
|
@@ -24775,7 +24775,7 @@ let Resource$1 = class Resource {
|
|
|
24775
24775
|
getParameter(pname) {
|
|
24776
24776
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
24777
24777
|
pname = getKeyValue(this.gl, pname);
|
|
24778
|
-
assert$
|
|
24778
|
+
assert$8(pname);
|
|
24779
24779
|
const parameters = this.constructor.PARAMETERS || {};
|
|
24780
24780
|
const parameter = parameters[pname];
|
|
24781
24781
|
if (parameter) {
|
|
@@ -24815,7 +24815,7 @@ let Resource$1 = class Resource {
|
|
|
24815
24815
|
}
|
|
24816
24816
|
setParameter(pname, value) {
|
|
24817
24817
|
pname = getKeyValue(this.gl, pname);
|
|
24818
|
-
assert$
|
|
24818
|
+
assert$8(pname);
|
|
24819
24819
|
const parameters = this.constructor.PARAMETERS || {};
|
|
24820
24820
|
const parameter = parameters[pname];
|
|
24821
24821
|
if (parameter) {
|
|
@@ -25045,7 +25045,7 @@ class Accessor {
|
|
|
25045
25045
|
return ArrayType.BYTES_PER_ELEMENT;
|
|
25046
25046
|
}
|
|
25047
25047
|
static getBytesPerVertex(accessor) {
|
|
25048
|
-
assert$
|
|
25048
|
+
assert$8(accessor.size);
|
|
25049
25049
|
const ArrayType = getTypedArrayFromGLType(accessor.type || 5126);
|
|
25050
25050
|
return ArrayType.BYTES_PER_ELEMENT * accessor.size;
|
|
25051
25051
|
}
|
|
@@ -25218,7 +25218,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25218
25218
|
srcOffset = 0
|
|
25219
25219
|
} = props;
|
|
25220
25220
|
const byteLength = props.byteLength || props.length;
|
|
25221
|
-
assert$
|
|
25221
|
+
assert$8(data);
|
|
25222
25222
|
const target = this.gl.webgl2 ? 36663 : this.target;
|
|
25223
25223
|
this.gl.bindBuffer(target, this.handle);
|
|
25224
25224
|
if (srcOffset !== 0 || byteLength !== void 0) {
|
|
@@ -25275,7 +25275,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25275
25275
|
}
|
|
25276
25276
|
const copyElementCount = Math.min(sourceAvailableElementCount, dstAvailableElementCount);
|
|
25277
25277
|
length2 = length2 || copyElementCount;
|
|
25278
|
-
assert$
|
|
25278
|
+
assert$8(length2 <= copyElementCount);
|
|
25279
25279
|
dstData = dstData || new ArrayType(dstElementCount);
|
|
25280
25280
|
this.gl.bindBuffer(36662, this.handle);
|
|
25281
25281
|
this.gl.getBufferSubData(36662, srcByteOffset, dstData, dstOffset, length2);
|
|
@@ -25293,7 +25293,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25293
25293
|
if (size2 !== void 0) {
|
|
25294
25294
|
this.gl.bindBufferRange(target, index2, this.handle, offset, size2);
|
|
25295
25295
|
} else {
|
|
25296
|
-
assert$
|
|
25296
|
+
assert$8(offset === 0);
|
|
25297
25297
|
this.gl.bindBufferBase(target, index2, this.handle);
|
|
25298
25298
|
}
|
|
25299
25299
|
} else {
|
|
@@ -25335,7 +25335,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25335
25335
|
_setData(data) {
|
|
25336
25336
|
let offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
25337
25337
|
let byteLength = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : data.byteLength + offset;
|
|
25338
|
-
assert$
|
|
25338
|
+
assert$8(ArrayBuffer.isView(data));
|
|
25339
25339
|
this._trackDeallocatedMemory();
|
|
25340
25340
|
const target = this._getTarget();
|
|
25341
25341
|
this.gl.bindBuffer(target, this.handle);
|
|
@@ -25346,7 +25346,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25346
25346
|
this.bytesUsed = byteLength;
|
|
25347
25347
|
this._trackAllocatedMemory(byteLength);
|
|
25348
25348
|
const type2 = getGLTypeFromTypedArray(data);
|
|
25349
|
-
assert$
|
|
25349
|
+
assert$8(type2);
|
|
25350
25350
|
this.setAccessor(new Accessor(this.accessor, {
|
|
25351
25351
|
type: type2
|
|
25352
25352
|
}));
|
|
@@ -25354,7 +25354,7 @@ let Buffer$1 = class Buffer2 extends Resource$1 {
|
|
|
25354
25354
|
}
|
|
25355
25355
|
_setByteLength(byteLength) {
|
|
25356
25356
|
let usage = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.usage;
|
|
25357
|
-
assert$
|
|
25357
|
+
assert$8(byteLength >= 0);
|
|
25358
25358
|
this._trackDeallocatedMemory();
|
|
25359
25359
|
let data = byteLength;
|
|
25360
25360
|
if (byteLength === 0) {
|
|
@@ -25786,7 +25786,7 @@ class Texture extends Resource$1 {
|
|
|
25786
25786
|
}
|
|
25787
25787
|
break;
|
|
25788
25788
|
default:
|
|
25789
|
-
assert$
|
|
25789
|
+
assert$8(false, "Unknown image data type");
|
|
25790
25790
|
}
|
|
25791
25791
|
});
|
|
25792
25792
|
if (dataType === "compressed") {
|
|
@@ -25834,7 +25834,7 @@ class Texture extends Resource$1 {
|
|
|
25834
25834
|
width,
|
|
25835
25835
|
height
|
|
25836
25836
|
}));
|
|
25837
|
-
assert$
|
|
25837
|
+
assert$8(this.depth === 0, "texSubImage not supported for 3D textures");
|
|
25838
25838
|
if (!data) {
|
|
25839
25839
|
data = pixels;
|
|
25840
25840
|
}
|
|
@@ -26008,9 +26008,9 @@ class Texture extends Resource$1 {
|
|
|
26008
26008
|
height
|
|
26009
26009
|
};
|
|
26010
26010
|
}
|
|
26011
|
-
assert$
|
|
26012
|
-
assert$
|
|
26013
|
-
assert$
|
|
26011
|
+
assert$8(size2, "Could not deduced texture size");
|
|
26012
|
+
assert$8(width === void 0 || size2.width === width, "Deduced texture width does not match supplied width");
|
|
26013
|
+
assert$8(height === void 0 || size2.height === height, "Deduced texture height does not match supplied height");
|
|
26014
26014
|
return size2;
|
|
26015
26015
|
}
|
|
26016
26016
|
_createHandle() {
|
|
@@ -26043,7 +26043,7 @@ class Texture extends Resource$1 {
|
|
|
26043
26043
|
break;
|
|
26044
26044
|
case 4096:
|
|
26045
26045
|
case 4097:
|
|
26046
|
-
assert$
|
|
26046
|
+
assert$8(false);
|
|
26047
26047
|
break;
|
|
26048
26048
|
default:
|
|
26049
26049
|
this.gl.texParameteri(this.target, pname, param);
|
|
@@ -26093,7 +26093,7 @@ class Texture extends Resource$1 {
|
|
|
26093
26093
|
}
|
|
26094
26094
|
let pathPrefix = "";
|
|
26095
26095
|
function loadImage$1(url, opts) {
|
|
26096
|
-
assert$
|
|
26096
|
+
assert$8(typeof url === "string");
|
|
26097
26097
|
url = pathPrefix + url;
|
|
26098
26098
|
return new Promise((resolve, reject) => {
|
|
26099
26099
|
try {
|
|
@@ -26503,7 +26503,7 @@ class Renderbuffer extends Resource$1 {
|
|
|
26503
26503
|
height = 1,
|
|
26504
26504
|
samples = 0
|
|
26505
26505
|
} = _ref2;
|
|
26506
|
-
assert$
|
|
26506
|
+
assert$8(format2, "Needs format");
|
|
26507
26507
|
this._trackDeallocatedMemory();
|
|
26508
26508
|
this.gl.bindRenderbuffer(36161, this.handle);
|
|
26509
26509
|
if (samples !== 0 && isWebGL2$1(this.gl)) {
|
|
@@ -26593,7 +26593,7 @@ function clear(gl) {
|
|
|
26593
26593
|
parameters.clearStencil = depth;
|
|
26594
26594
|
}
|
|
26595
26595
|
}
|
|
26596
|
-
assert$
|
|
26596
|
+
assert$8(clearFlags !== 0, ERR_ARGUMENTS);
|
|
26597
26597
|
withParameters(gl, parameters, () => {
|
|
26598
26598
|
gl.clear(clearFlags);
|
|
26599
26599
|
});
|
|
@@ -26634,7 +26634,7 @@ function clearBuffer(gl) {
|
|
|
26634
26634
|
gl.clearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
|
|
26635
26635
|
break;
|
|
26636
26636
|
default:
|
|
26637
|
-
assert$
|
|
26637
|
+
assert$8(false, ERR_ARGUMENTS);
|
|
26638
26638
|
}
|
|
26639
26639
|
});
|
|
26640
26640
|
}
|
|
@@ -26654,7 +26654,7 @@ function glFormatToComponents(format2) {
|
|
|
26654
26654
|
case 34836:
|
|
26655
26655
|
return 4;
|
|
26656
26656
|
default:
|
|
26657
|
-
assert$
|
|
26657
|
+
assert$8(false);
|
|
26658
26658
|
return 0;
|
|
26659
26659
|
}
|
|
26660
26660
|
}
|
|
@@ -26669,7 +26669,7 @@ function glTypeToBytes(type2) {
|
|
|
26669
26669
|
case 5126:
|
|
26670
26670
|
return 4;
|
|
26671
26671
|
default:
|
|
26672
|
-
assert$
|
|
26672
|
+
assert$8(false);
|
|
26673
26673
|
return 0;
|
|
26674
26674
|
}
|
|
26675
26675
|
}
|
|
@@ -26691,7 +26691,7 @@ function readPixelsToArray(source) {
|
|
|
26691
26691
|
framebuffer,
|
|
26692
26692
|
deleteFramebuffer
|
|
26693
26693
|
} = getFramebuffer$1(source);
|
|
26694
|
-
assert$
|
|
26694
|
+
assert$8(framebuffer);
|
|
26695
26695
|
const {
|
|
26696
26696
|
gl,
|
|
26697
26697
|
handle,
|
|
@@ -26702,7 +26702,7 @@ function readPixelsToArray(source) {
|
|
|
26702
26702
|
if (sourceAttachment === 36064 && handle === null) {
|
|
26703
26703
|
sourceAttachment = 1028;
|
|
26704
26704
|
}
|
|
26705
|
-
assert$
|
|
26705
|
+
assert$8(attachments[sourceAttachment]);
|
|
26706
26706
|
sourceType = sourceType || attachments[sourceAttachment].type;
|
|
26707
26707
|
target = getPixelArray(target, sourceType, sourceFormat, sourceWidth, sourceHeight);
|
|
26708
26708
|
sourceType = sourceType || getGLTypeFromTypedArray(target);
|
|
@@ -26729,7 +26729,7 @@ function readPixelsToBuffer(source, _ref) {
|
|
|
26729
26729
|
framebuffer,
|
|
26730
26730
|
deleteFramebuffer
|
|
26731
26731
|
} = getFramebuffer$1(source);
|
|
26732
|
-
assert$
|
|
26732
|
+
assert$8(framebuffer);
|
|
26733
26733
|
sourceWidth = sourceWidth || framebuffer.width;
|
|
26734
26734
|
sourceHeight = sourceHeight || framebuffer.height;
|
|
26735
26735
|
const gl2 = assertWebGL2Context(framebuffer.gl);
|
|
@@ -26818,7 +26818,7 @@ function copyToTexture(source, target) {
|
|
|
26818
26818
|
framebuffer,
|
|
26819
26819
|
deleteFramebuffer
|
|
26820
26820
|
} = getFramebuffer$1(source);
|
|
26821
|
-
assert$
|
|
26821
|
+
assert$8(framebuffer);
|
|
26822
26822
|
const {
|
|
26823
26823
|
gl,
|
|
26824
26824
|
handle
|
|
@@ -26828,7 +26828,7 @@ function copyToTexture(source, target) {
|
|
|
26828
26828
|
targetY = targetY || 0;
|
|
26829
26829
|
targetZ = targetZ || 0;
|
|
26830
26830
|
const prevHandle = gl.bindFramebuffer(36160, handle);
|
|
26831
|
-
assert$
|
|
26831
|
+
assert$8(target);
|
|
26832
26832
|
let texture = null;
|
|
26833
26833
|
if (target instanceof Texture) {
|
|
26834
26834
|
texture = target;
|
|
@@ -26983,7 +26983,7 @@ function isFeatureSupported(gl, cap) {
|
|
|
26983
26983
|
}
|
|
26984
26984
|
function queryFeature(gl, cap) {
|
|
26985
26985
|
const feature2 = WEBGL_FEATURES$1[cap];
|
|
26986
|
-
assert$
|
|
26986
|
+
assert$8(feature2, cap);
|
|
26987
26987
|
let isSupported;
|
|
26988
26988
|
const featureDefinition = isWebGL2$1(gl) ? feature2[1] || feature2[0] : feature2[0];
|
|
26989
26989
|
if (typeof featureDefinition === "function") {
|
|
@@ -26998,7 +26998,7 @@ function queryFeature(gl, cap) {
|
|
|
26998
26998
|
} else if (typeof featureDefinition === "boolean") {
|
|
26999
26999
|
isSupported = featureDefinition;
|
|
27000
27000
|
} else {
|
|
27001
|
-
assert$
|
|
27001
|
+
assert$8(false);
|
|
27002
27002
|
}
|
|
27003
27003
|
return isSupported;
|
|
27004
27004
|
}
|
|
@@ -27075,7 +27075,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27075
27075
|
readBuffer = void 0,
|
|
27076
27076
|
drawBuffers = void 0
|
|
27077
27077
|
} = _ref;
|
|
27078
|
-
assert$
|
|
27078
|
+
assert$8(width >= 0 && height >= 0, "Width and height need to be integers");
|
|
27079
27079
|
this.width = width;
|
|
27080
27080
|
this.height = height;
|
|
27081
27081
|
if (attachments) {
|
|
@@ -27139,7 +27139,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27139
27139
|
height
|
|
27140
27140
|
} = options;
|
|
27141
27141
|
if (this.handle === null) {
|
|
27142
|
-
assert$
|
|
27142
|
+
assert$8(width === void 0 && height === void 0);
|
|
27143
27143
|
this.width = this.gl.drawingBufferWidth;
|
|
27144
27144
|
this.height = this.gl.drawingBufferHeight;
|
|
27145
27145
|
return this;
|
|
@@ -27177,7 +27177,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27177
27177
|
Object.assign(newAttachments, attachments);
|
|
27178
27178
|
const prevHandle = this.gl.bindFramebuffer(36160, this.handle);
|
|
27179
27179
|
for (const key in newAttachments) {
|
|
27180
|
-
assert$
|
|
27180
|
+
assert$8(key !== void 0, "Misspelled framebuffer binding point?");
|
|
27181
27181
|
const attachment = Number(key);
|
|
27182
27182
|
const descriptor = newAttachments[attachment];
|
|
27183
27183
|
let object2 = descriptor;
|
|
@@ -27413,7 +27413,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27413
27413
|
});
|
|
27414
27414
|
this.ownResources.push(defaultAttachments[36096]);
|
|
27415
27415
|
} else if (stencil) {
|
|
27416
|
-
assert$
|
|
27416
|
+
assert$8(false);
|
|
27417
27417
|
}
|
|
27418
27418
|
return defaultAttachments;
|
|
27419
27419
|
}
|
|
@@ -27465,7 +27465,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27465
27465
|
gl.framebufferTexture2D(36160, attachment, 3553, texture.handle, level);
|
|
27466
27466
|
break;
|
|
27467
27467
|
default:
|
|
27468
|
-
assert$
|
|
27468
|
+
assert$8(false, "Illegal texture type");
|
|
27469
27469
|
}
|
|
27470
27470
|
gl.bindTexture(texture.target, null);
|
|
27471
27471
|
this.attachments[attachment] = texture;
|
|
@@ -27475,7 +27475,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27475
27475
|
if (gl2) {
|
|
27476
27476
|
gl2.readBuffer(readBuffer);
|
|
27477
27477
|
} else {
|
|
27478
|
-
assert$
|
|
27478
|
+
assert$8(readBuffer === 36064 || readBuffer === 1029, ERR_MULTIPLE_RENDERTARGETS);
|
|
27479
27479
|
}
|
|
27480
27480
|
this.readBuffer = readBuffer;
|
|
27481
27481
|
}
|
|
@@ -27491,7 +27491,7 @@ class Framebuffer extends Resource$1 {
|
|
|
27491
27491
|
if (ext) {
|
|
27492
27492
|
ext.drawBuffersWEBGL(drawBuffers);
|
|
27493
27493
|
} else {
|
|
27494
|
-
assert$
|
|
27494
|
+
assert$8(drawBuffers.length === 1 && (drawBuffers[0] === 36064 || drawBuffers[0] === 1029), ERR_MULTIPLE_RENDERTARGETS);
|
|
27495
27495
|
}
|
|
27496
27496
|
}
|
|
27497
27497
|
this.drawBuffers = drawBuffers;
|
|
@@ -27536,7 +27536,7 @@ function _getFrameBufferStatus(status) {
|
|
|
27536
27536
|
const FRAMEBUFFER_ATTACHMENT_PARAMETERS = [36049, 36048, 33296, 33298, 33299, 33300, 33301, 33302, 33303];
|
|
27537
27537
|
Framebuffer.ATTACHMENT_PARAMETERS = FRAMEBUFFER_ATTACHMENT_PARAMETERS;
|
|
27538
27538
|
function cloneTextureFrom(refTexture, overrides) {
|
|
27539
|
-
assert$
|
|
27539
|
+
assert$8(refTexture instanceof Texture2D || refTexture instanceof TextureCube || refTexture instanceof Texture3D);
|
|
27540
27540
|
const TextureType = refTexture.constructor;
|
|
27541
27541
|
const {
|
|
27542
27542
|
gl,
|
|
@@ -27685,13 +27685,13 @@ class Shader extends Resource$1 {
|
|
|
27685
27685
|
case 35632:
|
|
27686
27686
|
return "fragment-shader";
|
|
27687
27687
|
default:
|
|
27688
|
-
assert$
|
|
27688
|
+
assert$8(false);
|
|
27689
27689
|
return "unknown";
|
|
27690
27690
|
}
|
|
27691
27691
|
}
|
|
27692
27692
|
constructor(gl, props) {
|
|
27693
27693
|
assertWebGLContext(gl);
|
|
27694
|
-
assert$
|
|
27694
|
+
assert$8(typeof props.source === "string", ERR_SOURCE);
|
|
27695
27695
|
const id = getShaderName$1(props.source, null) || props.id || uid("unnamed ".concat(Shader.getTypeName(props.shaderType)));
|
|
27696
27696
|
super(gl, {
|
|
27697
27697
|
id
|
|
@@ -27979,7 +27979,7 @@ function getArraySetter(functionName, toArray, size2, uniformSetter) {
|
|
|
27979
27979
|
cacheLength = length2;
|
|
27980
27980
|
update = true;
|
|
27981
27981
|
} else {
|
|
27982
|
-
assert$
|
|
27982
|
+
assert$8(cacheLength === length2, "Uniform length cannot change.");
|
|
27983
27983
|
for (let i2 = 0; i2 < length2; ++i2) {
|
|
27984
27984
|
if (arrayValue[i2] !== cache2[i2]) {
|
|
27985
27985
|
update = true;
|
|
@@ -28080,7 +28080,7 @@ function getPrimitiveDrawMode(drawMode) {
|
|
|
28080
28080
|
case GL_TRIANGLE_FAN:
|
|
28081
28081
|
return GL_TRIANGLES;
|
|
28082
28082
|
default:
|
|
28083
|
-
assert$
|
|
28083
|
+
assert$8(false);
|
|
28084
28084
|
return 0;
|
|
28085
28085
|
}
|
|
28086
28086
|
}
|
|
@@ -28269,8 +28269,8 @@ class Program extends Resource$1 {
|
|
|
28269
28269
|
id: "".concat(props.id, "-fs"),
|
|
28270
28270
|
source: fs2
|
|
28271
28271
|
}) : fs2;
|
|
28272
|
-
assert$
|
|
28273
|
-
assert$
|
|
28272
|
+
assert$8(this.vs instanceof VertexShader);
|
|
28273
|
+
assert$8(this.fs instanceof FragmentShader);
|
|
28274
28274
|
this.uniforms = {};
|
|
28275
28275
|
this._textureUniforms = {};
|
|
28276
28276
|
if (varyings && varyings.length > 0) {
|
|
@@ -28324,7 +28324,7 @@ class Program extends Resource$1 {
|
|
|
28324
28324
|
const message = "mode=".concat(getKey(this.gl, drawMode), " verts=").concat(vertexCount, " ") + "instances=".concat(instanceCount, " indexType=").concat(getKey(this.gl, indexType), " ") + "isInstanced=".concat(isInstanced, " isIndexed=").concat(isIndexed, " ") + "Framebuffer=".concat(fb);
|
|
28325
28325
|
log$2.log(logPriority, message)();
|
|
28326
28326
|
}
|
|
28327
|
-
assert$
|
|
28327
|
+
assert$8(vertexArray);
|
|
28328
28328
|
this.gl.useProgram(this.handle);
|
|
28329
28329
|
if (!this._areTexturesRenderable() || vertexCount === 0 || isInstanced && instanceCount === 0) {
|
|
28330
28330
|
return false;
|
|
@@ -28537,7 +28537,7 @@ class Query extends Resource$1 {
|
|
|
28537
28537
|
supported = supported && hasTimerQuery;
|
|
28538
28538
|
break;
|
|
28539
28539
|
default:
|
|
28540
|
-
assert$
|
|
28540
|
+
assert$8(false);
|
|
28541
28541
|
}
|
|
28542
28542
|
}
|
|
28543
28543
|
return supported;
|
|
@@ -28854,7 +28854,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
28854
28854
|
VertexArrayObject._setConstantUintArray(gl, location, array);
|
|
28855
28855
|
break;
|
|
28856
28856
|
default:
|
|
28857
|
-
assert$
|
|
28857
|
+
assert$8(false);
|
|
28858
28858
|
}
|
|
28859
28859
|
}
|
|
28860
28860
|
constructor(gl) {
|
|
@@ -28889,7 +28889,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
28889
28889
|
}
|
|
28890
28890
|
setElementBuffer() {
|
|
28891
28891
|
let elementBuffer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
28892
|
-
assert$
|
|
28892
|
+
assert$8(!elementBuffer || elementBuffer.target === 34963, ERR_ELEMENTS);
|
|
28893
28893
|
this.bind(() => {
|
|
28894
28894
|
this.gl.bindBuffer(34963, elementBuffer ? elementBuffer.handle : null);
|
|
28895
28895
|
});
|
|
@@ -28916,7 +28916,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
28916
28916
|
this.bind(() => {
|
|
28917
28917
|
gl.bindBuffer(34962, buffer2.handle);
|
|
28918
28918
|
if (integer) {
|
|
28919
|
-
assert$
|
|
28919
|
+
assert$8(isWebGL2$1(gl));
|
|
28920
28920
|
gl2.vertexAttribIPointer(location, size2, type2, stride, offset);
|
|
28921
28921
|
} else {
|
|
28922
28922
|
gl.vertexAttribPointer(location, size2, type2, normalized, stride, offset);
|
|
@@ -28990,11 +28990,11 @@ class VertexArrayObject extends Resource$1 {
|
|
|
28990
28990
|
gl.vertexAttrib4fv(location, array);
|
|
28991
28991
|
break;
|
|
28992
28992
|
default:
|
|
28993
|
-
assert$
|
|
28993
|
+
assert$8(false);
|
|
28994
28994
|
}
|
|
28995
28995
|
}
|
|
28996
28996
|
static _setConstantIntArray(gl, location, array) {
|
|
28997
|
-
assert$
|
|
28997
|
+
assert$8(isWebGL2$1(gl));
|
|
28998
28998
|
switch (array.length) {
|
|
28999
28999
|
case 1:
|
|
29000
29000
|
gl.vertexAttribI1iv(location, array);
|
|
@@ -29009,11 +29009,11 @@ class VertexArrayObject extends Resource$1 {
|
|
|
29009
29009
|
gl.vertexAttribI4iv(location, array);
|
|
29010
29010
|
break;
|
|
29011
29011
|
default:
|
|
29012
|
-
assert$
|
|
29012
|
+
assert$8(false);
|
|
29013
29013
|
}
|
|
29014
29014
|
}
|
|
29015
29015
|
static _setConstantUintArray(gl, location, array) {
|
|
29016
|
-
assert$
|
|
29016
|
+
assert$8(isWebGL2$1(gl));
|
|
29017
29017
|
switch (array.length) {
|
|
29018
29018
|
case 1:
|
|
29019
29019
|
gl.vertexAttribI1uiv(location, array);
|
|
@@ -29028,7 +29028,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
29028
29028
|
gl.vertexAttribI4uiv(location, array);
|
|
29029
29029
|
break;
|
|
29030
29030
|
default:
|
|
29031
|
-
assert$
|
|
29031
|
+
assert$8(false);
|
|
29032
29032
|
}
|
|
29033
29033
|
}
|
|
29034
29034
|
_createHandle() {
|
|
@@ -29046,7 +29046,7 @@ class VertexArrayObject extends Resource$1 {
|
|
|
29046
29046
|
let {
|
|
29047
29047
|
location
|
|
29048
29048
|
} = _ref;
|
|
29049
|
-
assert$
|
|
29049
|
+
assert$8(Number.isFinite(location));
|
|
29050
29050
|
return this.bind(() => {
|
|
29051
29051
|
switch (pname) {
|
|
29052
29052
|
case 34373:
|
|
@@ -29250,7 +29250,7 @@ class VertexArray {
|
|
|
29250
29250
|
size: size2,
|
|
29251
29251
|
type: type2
|
|
29252
29252
|
} = accessor;
|
|
29253
|
-
assert$
|
|
29253
|
+
assert$8(Number.isFinite(size2) && Number.isFinite(type2));
|
|
29254
29254
|
return {
|
|
29255
29255
|
location,
|
|
29256
29256
|
accessor
|
|
@@ -29426,7 +29426,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
29426
29426
|
uniforms,
|
|
29427
29427
|
undefinedOnly = false
|
|
29428
29428
|
} = _ref;
|
|
29429
|
-
assert$
|
|
29429
|
+
assert$8(program);
|
|
29430
29430
|
const SHADER_MODULE_UNIFORM_REGEXP = ".*_.*";
|
|
29431
29431
|
const PROJECT_MODULE_UNIFORM_REGEXP = ".*Matrix";
|
|
29432
29432
|
const uniformLocations = program._uniformSetters;
|
|
@@ -29713,7 +29713,7 @@ class AnimationLoop {
|
|
|
29713
29713
|
this._setDisplay(null);
|
|
29714
29714
|
}
|
|
29715
29715
|
setNeedsRedraw(reason) {
|
|
29716
|
-
assert$
|
|
29716
|
+
assert$8(typeof reason === "string");
|
|
29717
29717
|
this.needsRedraw = this.needsRedraw || reason;
|
|
29718
29718
|
return this;
|
|
29719
29719
|
}
|
|
@@ -30062,7 +30062,7 @@ class AnimationLoop {
|
|
|
30062
30062
|
}
|
|
30063
30063
|
const VERTEX_SHADER$1 = "vs";
|
|
30064
30064
|
const FRAGMENT_SHADER$1 = "fs";
|
|
30065
|
-
function assert$
|
|
30065
|
+
function assert$7(condition, message) {
|
|
30066
30066
|
if (!condition) {
|
|
30067
30067
|
throw new Error(message || "shadertools: assertion failed.");
|
|
30068
30068
|
}
|
|
@@ -30139,7 +30139,7 @@ class ShaderModule {
|
|
|
30139
30139
|
vertexShader: vertexShader2,
|
|
30140
30140
|
fragmentShader: fragmentShader2
|
|
30141
30141
|
} = _ref;
|
|
30142
|
-
assert$
|
|
30142
|
+
assert$7(typeof name2 === "string");
|
|
30143
30143
|
this.name = name2;
|
|
30144
30144
|
this.vs = vs2 || vertexShader2;
|
|
30145
30145
|
this.fs = fs2 || fragmentShader2;
|
|
@@ -30162,7 +30162,7 @@ class ShaderModule {
|
|
|
30162
30162
|
moduleSource = this.fs || "";
|
|
30163
30163
|
break;
|
|
30164
30164
|
default:
|
|
30165
|
-
assert$
|
|
30165
|
+
assert$7(false);
|
|
30166
30166
|
}
|
|
30167
30167
|
return "#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi, "_"), "\n").concat(moduleSource, "// END MODULE_").concat(this.name, "\n\n");
|
|
30168
30168
|
}
|
|
@@ -30209,7 +30209,7 @@ class ShaderModule {
|
|
|
30209
30209
|
const propDef = propTypes[key];
|
|
30210
30210
|
if (key in opts && !propDef.private) {
|
|
30211
30211
|
if (propDef.validate) {
|
|
30212
|
-
assert$
|
|
30212
|
+
assert$7(propDef.validate(opts[key], propDef), "".concat(this.name, ": invalid ").concat(key));
|
|
30213
30213
|
}
|
|
30214
30214
|
uniforms[key] = opts[key];
|
|
30215
30215
|
} else {
|
|
@@ -30293,8 +30293,8 @@ function instantiateModules(modules, seen) {
|
|
|
30293
30293
|
if (module2 instanceof ShaderModule) {
|
|
30294
30294
|
return module2;
|
|
30295
30295
|
}
|
|
30296
|
-
assert$
|
|
30297
|
-
assert$
|
|
30296
|
+
assert$7(typeof module2 !== "string", "Shader module use by name is deprecated. Import shader module '".concat(module2, "' and use it directly."));
|
|
30297
|
+
assert$7(module2.name, "shader module has no name");
|
|
30298
30298
|
module2 = new ShaderModule(module2);
|
|
30299
30299
|
module2.dependencies = instantiateModules(module2.dependencies);
|
|
30300
30300
|
return module2;
|
|
@@ -30358,7 +30358,7 @@ const compiledGlslExtensions = {};
|
|
|
30358
30358
|
function canCompileGLGSExtension(gl, cap) {
|
|
30359
30359
|
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
30360
30360
|
const feature2 = WEBGL_FEATURES[cap];
|
|
30361
|
-
assert$
|
|
30361
|
+
assert$7(feature2, cap);
|
|
30362
30362
|
if (!isOldIE(opts)) {
|
|
30363
30363
|
return true;
|
|
30364
30364
|
}
|
|
@@ -30378,10 +30378,10 @@ function canCompileGLGSExtension(gl, cap) {
|
|
|
30378
30378
|
}
|
|
30379
30379
|
function getFeature(gl, cap) {
|
|
30380
30380
|
const feature2 = WEBGL_FEATURES[cap];
|
|
30381
|
-
assert$
|
|
30381
|
+
assert$7(feature2, cap);
|
|
30382
30382
|
const extensionName = isWebGL2(gl) ? feature2[1] || feature2[0] : feature2[0];
|
|
30383
30383
|
const value = typeof extensionName === "string" ? Boolean(gl.getExtension(extensionName)) : extensionName;
|
|
30384
|
-
assert$
|
|
30384
|
+
assert$7(value === false || value === true);
|
|
30385
30385
|
return value;
|
|
30386
30386
|
}
|
|
30387
30387
|
function hasFeatures(gl, features) {
|
|
@@ -30483,7 +30483,7 @@ function injectShader(source, type2, inject2) {
|
|
|
30483
30483
|
}
|
|
30484
30484
|
function combineInjects(injects) {
|
|
30485
30485
|
const result = {};
|
|
30486
|
-
assert$
|
|
30486
|
+
assert$7(Array.isArray(injects) && injects.length > 1);
|
|
30487
30487
|
injects.forEach((inject2) => {
|
|
30488
30488
|
for (const key in inject2) {
|
|
30489
30489
|
result[key] = result[key] ? "".concat(result[key], "\n").concat(inject2[key]) : inject2[key];
|
|
@@ -30580,7 +30580,7 @@ function assembleShader(gl, _ref) {
|
|
|
30580
30580
|
prologue = true,
|
|
30581
30581
|
log: log3
|
|
30582
30582
|
} = _ref;
|
|
30583
|
-
assert$
|
|
30583
|
+
assert$7(typeof source === "string", "shader source must be a string");
|
|
30584
30584
|
const isVertex = type2 === VERTEX_SHADER$1;
|
|
30585
30585
|
const sourceLines = source.split("\n");
|
|
30586
30586
|
let glslVersion = 100;
|
|
@@ -30797,7 +30797,7 @@ function typeToChannelSuffix(type2) {
|
|
|
30797
30797
|
case "vec4":
|
|
30798
30798
|
return "xyzw";
|
|
30799
30799
|
default:
|
|
30800
|
-
assert$
|
|
30800
|
+
assert$7(false);
|
|
30801
30801
|
return null;
|
|
30802
30802
|
}
|
|
30803
30803
|
}
|
|
@@ -30812,7 +30812,7 @@ function typeToChannelCount(type2) {
|
|
|
30812
30812
|
case "vec4":
|
|
30813
30813
|
return 4;
|
|
30814
30814
|
default:
|
|
30815
|
-
assert$
|
|
30815
|
+
assert$7(false);
|
|
30816
30816
|
return null;
|
|
30817
30817
|
}
|
|
30818
30818
|
}
|
|
@@ -30827,7 +30827,7 @@ function convertToVec4(variable, type2) {
|
|
|
30827
30827
|
case "vec4":
|
|
30828
30828
|
return variable;
|
|
30829
30829
|
default:
|
|
30830
|
-
assert$
|
|
30830
|
+
assert$7(false);
|
|
30831
30831
|
return null;
|
|
30832
30832
|
}
|
|
30833
30833
|
}
|
|
@@ -31302,7 +31302,7 @@ function getBuffersFromGeometry(gl, geometry2, options) {
|
|
|
31302
31302
|
}
|
|
31303
31303
|
if (indices) {
|
|
31304
31304
|
const data = indices.value || indices;
|
|
31305
|
-
assert$
|
|
31305
|
+
assert$8(data instanceof Uint16Array || data instanceof Uint32Array, 'attribute array for "indices" must be of integer type');
|
|
31306
31306
|
const accessor = {
|
|
31307
31307
|
size: 1,
|
|
31308
31308
|
isIndexed: indices.isIndexed === void 0 ? true : indices.isIndexed
|
|
@@ -31344,7 +31344,7 @@ function inferAttributeAccessor(attributeName, attribute) {
|
|
|
31344
31344
|
attribute.size = attribute.size || 2;
|
|
31345
31345
|
break;
|
|
31346
31346
|
}
|
|
31347
|
-
assert$
|
|
31347
|
+
assert$8(Number.isFinite(attribute.size), "attribute ".concat(attributeName, " needs size"));
|
|
31348
31348
|
}
|
|
31349
31349
|
const LOG_DRAW_PRIORITY = 2;
|
|
31350
31350
|
const LOG_DRAW_TIMEOUT = 1e4;
|
|
@@ -31358,7 +31358,7 @@ class Model {
|
|
|
31358
31358
|
const {
|
|
31359
31359
|
id = uid("model")
|
|
31360
31360
|
} = props;
|
|
31361
|
-
assert$
|
|
31361
|
+
assert$8(isWebGL(gl));
|
|
31362
31362
|
this.id = id;
|
|
31363
31363
|
this.gl = gl;
|
|
31364
31364
|
this.id = props.id || uid("Model");
|
|
@@ -31410,7 +31410,7 @@ class Model {
|
|
|
31410
31410
|
this.isInstanced = props.isInstanced || props.instanced || props.instanceCount > 0;
|
|
31411
31411
|
this._setModelProps(props);
|
|
31412
31412
|
this.geometry = {};
|
|
31413
|
-
assert$
|
|
31413
|
+
assert$8(this.drawMode !== void 0 && Number.isFinite(this.vertexCount), ERR_MODEL_PARAMS);
|
|
31414
31414
|
}
|
|
31415
31415
|
setProps(props) {
|
|
31416
31416
|
this._setModelProps(props);
|
|
@@ -31476,12 +31476,12 @@ class Model {
|
|
|
31476
31476
|
return this;
|
|
31477
31477
|
}
|
|
31478
31478
|
setVertexCount(vertexCount) {
|
|
31479
|
-
assert$
|
|
31479
|
+
assert$8(Number.isFinite(vertexCount));
|
|
31480
31480
|
this.vertexCount = vertexCount;
|
|
31481
31481
|
return this;
|
|
31482
31482
|
}
|
|
31483
31483
|
setInstanceCount(instanceCount) {
|
|
31484
|
-
assert$
|
|
31484
|
+
assert$8(Number.isFinite(instanceCount));
|
|
31485
31485
|
this.instanceCount = instanceCount;
|
|
31486
31486
|
return this;
|
|
31487
31487
|
}
|
|
@@ -31678,7 +31678,7 @@ class Model {
|
|
|
31678
31678
|
this._programManagerState = this.programManager.stateHash;
|
|
31679
31679
|
this._managedProgram = true;
|
|
31680
31680
|
}
|
|
31681
|
-
assert$
|
|
31681
|
+
assert$8(program instanceof Program, "Model needs a program");
|
|
31682
31682
|
this._programDirty = false;
|
|
31683
31683
|
if (program === this.program) {
|
|
31684
31684
|
return;
|
|
@@ -31706,7 +31706,7 @@ class Model {
|
|
|
31706
31706
|
}
|
|
31707
31707
|
_setAnimationProps(animationProps) {
|
|
31708
31708
|
if (this.animated) {
|
|
31709
|
-
assert$
|
|
31709
|
+
assert$8(animationProps, "Model.draw(): animated uniforms but no animationProps");
|
|
31710
31710
|
}
|
|
31711
31711
|
}
|
|
31712
31712
|
_setFeedbackBuffers() {
|
|
@@ -31864,7 +31864,7 @@ class BufferTransform {
|
|
|
31864
31864
|
this._setupBuffers(props);
|
|
31865
31865
|
this.varyings = props.varyings || Object.keys(this.bindings[this.currentIndex].feedbackBuffers);
|
|
31866
31866
|
if (this.varyings.length > 0) {
|
|
31867
|
-
assert$
|
|
31867
|
+
assert$8(isWebGL2$1(this.gl));
|
|
31868
31868
|
}
|
|
31869
31869
|
}
|
|
31870
31870
|
_getFeedbackBuffers(props) {
|
|
@@ -31964,7 +31964,7 @@ class BufferTransform {
|
|
|
31964
31964
|
const dstName = this.feedbackMap[srcName];
|
|
31965
31965
|
sourceBuffers[srcName] = opts.feedbackBuffers[dstName];
|
|
31966
31966
|
feedbackBuffers[dstName] = opts.sourceBuffers[srcName];
|
|
31967
|
-
assert$
|
|
31967
|
+
assert$8(feedbackBuffers[dstName] instanceof Buffer$1);
|
|
31968
31968
|
}
|
|
31969
31969
|
return {
|
|
31970
31970
|
sourceBuffers,
|
|
@@ -32021,7 +32021,7 @@ function updateForTextures(_ref) {
|
|
|
32021
32021
|
}
|
|
32022
32022
|
});
|
|
32023
32023
|
if (targetTextureVarying) {
|
|
32024
|
-
assert$
|
|
32024
|
+
assert$8(targetTexture);
|
|
32025
32025
|
const sizeName = "".concat(SIZE_UNIFORM_PREFIX).concat(targetTextureVarying);
|
|
32026
32026
|
const uniformDeclaration = "uniform vec2 ".concat(sizeName, ";\n");
|
|
32027
32027
|
const posInstructions = " vec2 ".concat(VS_POS_VARIABLE, " = transform_getPos(").concat(sizeName, ");\n gl_Position = vec4(").concat(VS_POS_VARIABLE, ", 0, 1.);\n");
|
|
@@ -32492,7 +32492,7 @@ class Transform {
|
|
|
32492
32492
|
for (const resourceTransform of resourceTransforms) {
|
|
32493
32493
|
swapped = swapped || resourceTransform.swap();
|
|
32494
32494
|
}
|
|
32495
|
-
assert$
|
|
32495
|
+
assert$8(swapped, "Nothing to swap");
|
|
32496
32496
|
}
|
|
32497
32497
|
getBuffer() {
|
|
32498
32498
|
let varyingName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
@@ -32556,7 +32556,7 @@ class Transform {
|
|
|
32556
32556
|
if (canCreateTextureTransform(props)) {
|
|
32557
32557
|
this.textureTransform = new TextureTransform(gl, props);
|
|
32558
32558
|
}
|
|
32559
|
-
assert$
|
|
32559
|
+
assert$8(this.bufferTransform || this.textureTransform, "must provide source/feedback buffers or source/target textures");
|
|
32560
32560
|
}
|
|
32561
32561
|
_updateDrawOptions(opts) {
|
|
32562
32562
|
let updatedOpts = Object.assign({}, opts);
|
|
@@ -32635,12 +32635,12 @@ class Geometry {
|
|
|
32635
32635
|
attribute = ArrayBuffer.isView(attribute) ? {
|
|
32636
32636
|
value: attribute
|
|
32637
32637
|
} : attribute;
|
|
32638
|
-
assert$
|
|
32638
|
+
assert$8(ArrayBuffer.isView(attribute.value), "".concat(this._print(attributeName), ": must be typed array or object with value as typed array"));
|
|
32639
32639
|
if ((attributeName === "POSITION" || attributeName === "positions") && !attribute.size) {
|
|
32640
32640
|
attribute.size = 3;
|
|
32641
32641
|
}
|
|
32642
32642
|
if (attributeName === "indices") {
|
|
32643
|
-
assert$
|
|
32643
|
+
assert$8(!this.indices);
|
|
32644
32644
|
this.indices = attribute;
|
|
32645
32645
|
} else {
|
|
32646
32646
|
this.attributes[attributeName] = attribute;
|
|
@@ -32668,7 +32668,7 @@ class Geometry {
|
|
|
32668
32668
|
vertexCount = Math.min(vertexCount, value.length / size2);
|
|
32669
32669
|
}
|
|
32670
32670
|
}
|
|
32671
|
-
assert$
|
|
32671
|
+
assert$8(Number.isFinite(vertexCount));
|
|
32672
32672
|
return vertexCount;
|
|
32673
32673
|
}
|
|
32674
32674
|
}
|
|
@@ -33451,7 +33451,7 @@ const esm$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
33451
33451
|
TransformFeedback,
|
|
33452
33452
|
TruncatedConeGeometry,
|
|
33453
33453
|
VertexShader,
|
|
33454
|
-
assert: assert$
|
|
33454
|
+
assert: assert$8,
|
|
33455
33455
|
clear,
|
|
33456
33456
|
cloneTextureFrom,
|
|
33457
33457
|
copyToTexture,
|
|
@@ -33778,7 +33778,7 @@ function ieLog2(x2) {
|
|
|
33778
33778
|
return Math.log(x2) * Math.LOG2E;
|
|
33779
33779
|
}
|
|
33780
33780
|
const log2 = Math.log2 || ieLog2;
|
|
33781
|
-
function assert$
|
|
33781
|
+
function assert$6(condition, message) {
|
|
33782
33782
|
if (!condition) {
|
|
33783
33783
|
throw new Error(message || "@math.gl/web-mercator: assertion failed.");
|
|
33784
33784
|
}
|
|
@@ -33799,8 +33799,8 @@ function scaleToZoom(scale2) {
|
|
|
33799
33799
|
}
|
|
33800
33800
|
function lngLatToWorld(lngLat) {
|
|
33801
33801
|
const [lng, lat] = lngLat;
|
|
33802
|
-
assert$
|
|
33803
|
-
assert$
|
|
33802
|
+
assert$6(Number.isFinite(lng));
|
|
33803
|
+
assert$6(Number.isFinite(lat) && lat >= -90 && lat <= 90, "invalid latitude");
|
|
33804
33804
|
const lambda22 = lng * DEGREES_TO_RADIANS$6;
|
|
33805
33805
|
const phi2 = lat * DEGREES_TO_RADIANS$6;
|
|
33806
33806
|
const x2 = TILE_SIZE$6 * (lambda22 + PI) / (2 * PI);
|
|
@@ -33817,7 +33817,7 @@ function getMeterZoom(options) {
|
|
|
33817
33817
|
const {
|
|
33818
33818
|
latitude
|
|
33819
33819
|
} = options;
|
|
33820
|
-
assert$
|
|
33820
|
+
assert$6(Number.isFinite(latitude));
|
|
33821
33821
|
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS$6);
|
|
33822
33822
|
return scaleToZoom(EARTH_CIRCUMFERENCE$1 * latCosine) - 9;
|
|
33823
33823
|
}
|
|
@@ -33831,7 +33831,7 @@ function getDistanceScales$1(options) {
|
|
|
33831
33831
|
longitude,
|
|
33832
33832
|
highPrecision = false
|
|
33833
33833
|
} = options;
|
|
33834
|
-
assert$
|
|
33834
|
+
assert$6(Number.isFinite(latitude) && Number.isFinite(longitude));
|
|
33835
33835
|
const worldSize = TILE_SIZE$6;
|
|
33836
33836
|
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS$6);
|
|
33837
33837
|
const unitsPerDegreeX = worldSize / 360;
|
|
@@ -33947,12 +33947,12 @@ function fovyToAltitude(fovy) {
|
|
|
33947
33947
|
}
|
|
33948
33948
|
function worldToPixels(xyz, pixelProjectionMatrix) {
|
|
33949
33949
|
const [x2, y2, z = 0] = xyz;
|
|
33950
|
-
assert$
|
|
33950
|
+
assert$6(Number.isFinite(x2) && Number.isFinite(y2) && Number.isFinite(z));
|
|
33951
33951
|
return transformVector$1(pixelProjectionMatrix, [x2, y2, z, 1]);
|
|
33952
33952
|
}
|
|
33953
33953
|
function pixelsToWorld(xyz, pixelUnprojectionMatrix, targetZ = 0) {
|
|
33954
33954
|
const [x2, y2, z] = xyz;
|
|
33955
|
-
assert$
|
|
33955
|
+
assert$6(Number.isFinite(x2) && Number.isFinite(y2), "invalid pixel coordinate");
|
|
33956
33956
|
if (Number.isFinite(z)) {
|
|
33957
33957
|
const coord = transformVector$1(pixelUnprojectionMatrix, [x2, y2, z, 1]);
|
|
33958
33958
|
return coord;
|
|
@@ -33979,7 +33979,7 @@ function fitBounds(options) {
|
|
|
33979
33979
|
const se = lngLatToWorld([east, clamp(south, -MAX_LATITUDE, MAX_LATITUDE)]);
|
|
33980
33980
|
const size2 = [Math.max(Math.abs(se[0] - nw[0]), minExtent), Math.max(Math.abs(se[1] - nw[1]), minExtent)];
|
|
33981
33981
|
const targetSize = [width - padding.left - padding.right - Math.abs(offset[0]) * 2, height - padding.top - padding.bottom - Math.abs(offset[1]) * 2];
|
|
33982
|
-
assert$
|
|
33982
|
+
assert$6(targetSize[0] > 0 && targetSize[1] > 0);
|
|
33983
33983
|
const scaleX2 = targetSize[0] / size2[0];
|
|
33984
33984
|
const scaleY2 = targetSize[1] / size2[1];
|
|
33985
33985
|
const offsetX = (padding.right - padding.left) / 2 / scaleX2;
|
|
@@ -33987,7 +33987,7 @@ function fitBounds(options) {
|
|
|
33987
33987
|
const center2 = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];
|
|
33988
33988
|
const centerLngLat = worldToLngLat(center2);
|
|
33989
33989
|
const zoom = Math.min(maxZoom, log2(Math.abs(Math.min(scaleX2, scaleY2))));
|
|
33990
|
-
assert$
|
|
33990
|
+
assert$6(Number.isFinite(zoom));
|
|
33991
33991
|
return {
|
|
33992
33992
|
longitude: centerLngLat[0],
|
|
33993
33993
|
latitude: centerLngLat[1],
|
|
@@ -34003,7 +34003,7 @@ function getPaddingObject(padding = 0) {
|
|
|
34003
34003
|
right: padding
|
|
34004
34004
|
};
|
|
34005
34005
|
}
|
|
34006
|
-
assert$
|
|
34006
|
+
assert$6(Number.isFinite(padding.top) && Number.isFinite(padding.bottom) && Number.isFinite(padding.left) && Number.isFinite(padding.right));
|
|
34007
34007
|
return padding;
|
|
34008
34008
|
}
|
|
34009
34009
|
const DEGREES_TO_RADIANS$5 = Math.PI / 180;
|
|
@@ -36836,7 +36836,7 @@ function parsePosition(value) {
|
|
|
36836
36836
|
function getPosition$1(position, extent2) {
|
|
36837
36837
|
return position.relative ? Math.round(position.position * extent2) : position.position;
|
|
36838
36838
|
}
|
|
36839
|
-
function assert$
|
|
36839
|
+
function assert$5(condition, message) {
|
|
36840
36840
|
if (!condition) {
|
|
36841
36841
|
throw new Error(message || "deck.gl: assertion failed.");
|
|
36842
36842
|
}
|
|
@@ -36860,7 +36860,7 @@ class View {
|
|
|
36860
36860
|
padding = null,
|
|
36861
36861
|
viewportInstance
|
|
36862
36862
|
} = props || {};
|
|
36863
|
-
assert$
|
|
36863
|
+
assert$5(!viewportInstance || viewportInstance instanceof Viewport);
|
|
36864
36864
|
this.viewportInstance = viewportInstance;
|
|
36865
36865
|
this.id = id || this.constructor.displayName || "view";
|
|
36866
36866
|
this.props = {
|
|
@@ -37234,7 +37234,7 @@ class TransitionInterpolator {
|
|
|
37234
37234
|
}
|
|
37235
37235
|
this._requiredProps.forEach((propName) => {
|
|
37236
37236
|
const value = props[propName];
|
|
37237
|
-
assert$
|
|
37237
|
+
assert$5(Number.isFinite(value) || Array.isArray(value), "".concat(propName, " is required for transition"));
|
|
37238
37238
|
});
|
|
37239
37239
|
}
|
|
37240
37240
|
}
|
|
@@ -37483,9 +37483,9 @@ class Controller {
|
|
|
37483
37483
|
updateTransition() {
|
|
37484
37484
|
this.transitionManager.updateTransition();
|
|
37485
37485
|
}
|
|
37486
|
-
toggleEvents(
|
|
37486
|
+
toggleEvents(eventNames, enabled) {
|
|
37487
37487
|
if (this.eventManager) {
|
|
37488
|
-
|
|
37488
|
+
eventNames.forEach((eventName) => {
|
|
37489
37489
|
if (this._events[eventName] !== enabled) {
|
|
37490
37490
|
this._events[eventName] = enabled;
|
|
37491
37491
|
if (enabled) {
|
|
@@ -37979,9 +37979,9 @@ class MapState extends ViewState {
|
|
|
37979
37979
|
startZoom,
|
|
37980
37980
|
normalize: normalize2 = true
|
|
37981
37981
|
} = options;
|
|
37982
|
-
assert$
|
|
37983
|
-
assert$
|
|
37984
|
-
assert$
|
|
37982
|
+
assert$5(Number.isFinite(longitude));
|
|
37983
|
+
assert$5(Number.isFinite(latitude));
|
|
37984
|
+
assert$5(Number.isFinite(zoom));
|
|
37985
37985
|
super({
|
|
37986
37986
|
width,
|
|
37987
37987
|
height,
|
|
@@ -40936,18 +40936,18 @@ var hammer$1 = { exports: {} };
|
|
|
40936
40936
|
emit: function(input) {
|
|
40937
40937
|
var self2 = this;
|
|
40938
40938
|
var state = this.state;
|
|
40939
|
-
function
|
|
40939
|
+
function emit(event) {
|
|
40940
40940
|
self2.manager.emit(event, input);
|
|
40941
40941
|
}
|
|
40942
40942
|
if (state < STATE_ENDED) {
|
|
40943
|
-
|
|
40943
|
+
emit(self2.options.event + stateStr(state));
|
|
40944
40944
|
}
|
|
40945
|
-
|
|
40945
|
+
emit(self2.options.event);
|
|
40946
40946
|
if (input.additionalEvent) {
|
|
40947
|
-
|
|
40947
|
+
emit(input.additionalEvent);
|
|
40948
40948
|
}
|
|
40949
40949
|
if (state >= STATE_ENDED) {
|
|
40950
|
-
|
|
40950
|
+
emit(self2.options.event + stateStr(state));
|
|
40951
40951
|
}
|
|
40952
40952
|
},
|
|
40953
40953
|
/**
|
|
@@ -42307,7 +42307,7 @@ class EventRegistrar {
|
|
|
42307
42307
|
isEmpty() {
|
|
42308
42308
|
return !this._active;
|
|
42309
42309
|
}
|
|
42310
|
-
add(type2, handler, options,
|
|
42310
|
+
add(type2, handler, options, once = false, passive = false) {
|
|
42311
42311
|
const { handlers, handlersByElement } = this;
|
|
42312
42312
|
let opts = DEFAULT_OPTIONS$2;
|
|
42313
42313
|
if (typeof options === "string" || options && options.addEventListener) {
|
|
@@ -42326,7 +42326,7 @@ class EventRegistrar {
|
|
|
42326
42326
|
srcElement: opts.srcElement,
|
|
42327
42327
|
priority: opts.priority
|
|
42328
42328
|
};
|
|
42329
|
-
if (
|
|
42329
|
+
if (once) {
|
|
42330
42330
|
entry.once = true;
|
|
42331
42331
|
}
|
|
42332
42332
|
if (passive) {
|
|
@@ -42374,7 +42374,7 @@ class EventRegistrar {
|
|
|
42374
42374
|
};
|
|
42375
42375
|
const entriesToRemove = [];
|
|
42376
42376
|
for (let i2 = 0; i2 < entries.length; i2++) {
|
|
42377
|
-
const { type: type2, handler, once
|
|
42377
|
+
const { type: type2, handler, once } = entries[i2];
|
|
42378
42378
|
handler({
|
|
42379
42379
|
...event,
|
|
42380
42380
|
// @ts-ignore
|
|
@@ -42382,7 +42382,7 @@ class EventRegistrar {
|
|
|
42382
42382
|
stopPropagation,
|
|
42383
42383
|
stopImmediatePropagation
|
|
42384
42384
|
});
|
|
42385
|
-
if (
|
|
42385
|
+
if (once) {
|
|
42386
42386
|
entriesToRemove.push(entries[i2]);
|
|
42387
42387
|
}
|
|
42388
42388
|
if (immediatePropagationStopped) {
|
|
@@ -42563,11 +42563,11 @@ class EventManager {
|
|
|
42563
42563
|
/**
|
|
42564
42564
|
* Process the event registration for a single event + handler.
|
|
42565
42565
|
*/
|
|
42566
|
-
_addEventHandler(event, handler, opts,
|
|
42566
|
+
_addEventHandler(event, handler, opts, once, passive) {
|
|
42567
42567
|
if (typeof event !== "string") {
|
|
42568
42568
|
opts = handler;
|
|
42569
42569
|
for (const eventName in event) {
|
|
42570
|
-
this._addEventHandler(eventName, event[eventName], opts,
|
|
42570
|
+
this._addEventHandler(eventName, event[eventName], opts, once, passive);
|
|
42571
42571
|
}
|
|
42572
42572
|
return;
|
|
42573
42573
|
}
|
|
@@ -42582,7 +42582,7 @@ class EventManager {
|
|
|
42582
42582
|
manager.on(eventAlias, eventRegistrar.handleEvent);
|
|
42583
42583
|
}
|
|
42584
42584
|
}
|
|
42585
|
-
eventRegistrar.add(event, handler, opts,
|
|
42585
|
+
eventRegistrar.add(event, handler, opts, once, passive);
|
|
42586
42586
|
if (!eventRegistrar.isEmpty()) {
|
|
42587
42587
|
this._toggleRecognizer(eventRegistrar.recognizerName, true);
|
|
42588
42588
|
}
|
|
@@ -42908,11 +42908,11 @@ class Deck {
|
|
|
42908
42908
|
return this.viewManager !== null;
|
|
42909
42909
|
}
|
|
42910
42910
|
getViews() {
|
|
42911
|
-
assert$
|
|
42911
|
+
assert$5(this.viewManager);
|
|
42912
42912
|
return this.viewManager.views;
|
|
42913
42913
|
}
|
|
42914
42914
|
getViewports(rect) {
|
|
42915
|
-
assert$
|
|
42915
|
+
assert$5(this.viewManager);
|
|
42916
42916
|
return this.viewManager.getViewports(rect);
|
|
42917
42917
|
}
|
|
42918
42918
|
pickObject(opts) {
|
|
@@ -42941,7 +42941,7 @@ class Deck {
|
|
|
42941
42941
|
}
|
|
42942
42942
|
}
|
|
42943
42943
|
_pick(method, statKey, opts) {
|
|
42944
|
-
assert$
|
|
42944
|
+
assert$5(this.deckPicker);
|
|
42945
42945
|
const {
|
|
42946
42946
|
stats
|
|
42947
42947
|
} = this;
|
|
@@ -42962,7 +42962,7 @@ class Deck {
|
|
|
42962
42962
|
let canvas = props.canvas;
|
|
42963
42963
|
if (typeof canvas === "string") {
|
|
42964
42964
|
canvas = document.getElementById(canvas);
|
|
42965
|
-
assert$
|
|
42965
|
+
assert$5(canvas);
|
|
42966
42966
|
}
|
|
42967
42967
|
if (!canvas) {
|
|
42968
42968
|
canvas = document.createElement("canvas");
|
|
@@ -44201,7 +44201,7 @@ class Attribute extends DataColumn {
|
|
|
44201
44201
|
};
|
|
44202
44202
|
}
|
|
44203
44203
|
const binaryValue = buffer2;
|
|
44204
|
-
assert$
|
|
44204
|
+
assert$5(ArrayBuffer.isView(binaryValue.value), "invalid ".concat(settings.accessor));
|
|
44205
44205
|
const needsNormalize = Boolean(binaryValue.size) && binaryValue.size !== this.size;
|
|
44206
44206
|
state.binaryAccessor = getAccessorFromBuffer(binaryValue.value, {
|
|
44207
44207
|
size: binaryValue.size || this.size,
|
|
@@ -44255,7 +44255,7 @@ class Attribute extends DataColumn {
|
|
|
44255
44255
|
transform: transform2
|
|
44256
44256
|
} = settings;
|
|
44257
44257
|
const accessorFunc = state.binaryAccessor || (typeof accessor === "function" ? accessor : props[accessor]);
|
|
44258
|
-
assert$
|
|
44258
|
+
assert$5(typeof accessorFunc === "function", 'accessor "'.concat(accessor, '" is not a function'));
|
|
44259
44259
|
let i2 = attribute.getVertexOffset(startRow);
|
|
44260
44260
|
const {
|
|
44261
44261
|
iterable,
|
|
@@ -45303,7 +45303,7 @@ function getPropTypes(props) {
|
|
|
45303
45303
|
const ERR_NOT_OBJECT = "count(): argument not an object";
|
|
45304
45304
|
const ERR_NOT_CONTAINER = "count(): argument not a container";
|
|
45305
45305
|
function count(container) {
|
|
45306
|
-
if (!isObject$
|
|
45306
|
+
if (!isObject$3(container)) {
|
|
45307
45307
|
throw new Error(ERR_NOT_OBJECT);
|
|
45308
45308
|
}
|
|
45309
45309
|
if (typeof container.count === "function") {
|
|
@@ -45323,7 +45323,7 @@ function count(container) {
|
|
|
45323
45323
|
function isPlainObject(value) {
|
|
45324
45324
|
return value !== null && typeof value === "object" && value.constructor === Object;
|
|
45325
45325
|
}
|
|
45326
|
-
function isObject$
|
|
45326
|
+
function isObject$3(value) {
|
|
45327
45327
|
return value !== null && typeof value === "object";
|
|
45328
45328
|
}
|
|
45329
45329
|
function mergeShaders(target, source) {
|
|
@@ -46207,7 +46207,7 @@ class Layer extends Component {
|
|
|
46207
46207
|
return "".concat(className, "({id: '").concat(this.props.id, "'})");
|
|
46208
46208
|
}
|
|
46209
46209
|
project(xyz) {
|
|
46210
|
-
assert$
|
|
46210
|
+
assert$5(this.internalState);
|
|
46211
46211
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
46212
46212
|
const worldPosition = getWorldPosition(xyz, {
|
|
46213
46213
|
viewport,
|
|
@@ -46219,12 +46219,12 @@ class Layer extends Component {
|
|
|
46219
46219
|
return xyz.length === 2 ? [x2, y2] : [x2, y2, z];
|
|
46220
46220
|
}
|
|
46221
46221
|
unproject(xy) {
|
|
46222
|
-
assert$
|
|
46222
|
+
assert$5(this.internalState);
|
|
46223
46223
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
46224
46224
|
return viewport.unproject(xy);
|
|
46225
46225
|
}
|
|
46226
46226
|
projectPosition(xyz, params) {
|
|
46227
|
-
assert$
|
|
46227
|
+
assert$5(this.internalState);
|
|
46228
46228
|
const viewport = this.internalState.viewport || this.context.viewport;
|
|
46229
46229
|
return projectPosition(xyz, {
|
|
46230
46230
|
viewport,
|
|
@@ -46309,7 +46309,7 @@ class Layer extends Component {
|
|
|
46309
46309
|
return target;
|
|
46310
46310
|
}
|
|
46311
46311
|
decodePickingColor(color) {
|
|
46312
|
-
assert$
|
|
46312
|
+
assert$5(color instanceof Uint8Array);
|
|
46313
46313
|
const [i1, i2, i3] = color;
|
|
46314
46314
|
const index2 = i1 + i2 * 256 + i3 * 65536 - 1;
|
|
46315
46315
|
return index2;
|
|
@@ -46605,8 +46605,8 @@ class Layer extends Component {
|
|
|
46605
46605
|
});
|
|
46606
46606
|
}
|
|
46607
46607
|
_initialize() {
|
|
46608
|
-
assert$
|
|
46609
|
-
assert$
|
|
46608
|
+
assert$5(!this.internalState);
|
|
46609
|
+
assert$5(Number.isFinite(this.props.coordinateSystem));
|
|
46610
46610
|
debug(TRACE_INITIALIZE, this);
|
|
46611
46611
|
const attributeManager = this._getAttributeManager();
|
|
46612
46612
|
if (attributeManager) {
|
|
@@ -47741,7 +47741,7 @@ class Tesselator {
|
|
|
47741
47741
|
this.buffers = buffers;
|
|
47742
47742
|
this.normalize = normalize2;
|
|
47743
47743
|
if (geometryBuffer) {
|
|
47744
|
-
assert$
|
|
47744
|
+
assert$5(data.startIndices);
|
|
47745
47745
|
this.getGeometry = this.getGeometryFromBuffer(geometryBuffer);
|
|
47746
47746
|
if (!normalize2) {
|
|
47747
47747
|
buffers.positions = geometryBuffer;
|
|
@@ -47922,7 +47922,7 @@ const esm$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
47922
47922
|
_flatten: flatten,
|
|
47923
47923
|
_memoize: memoize$1,
|
|
47924
47924
|
_mergeShaders: mergeShaders,
|
|
47925
|
-
assert: assert$
|
|
47925
|
+
assert: assert$5,
|
|
47926
47926
|
createIterable,
|
|
47927
47927
|
fp64LowPart,
|
|
47928
47928
|
gouraudLighting,
|
|
@@ -55845,7 +55845,7 @@ class Plane {
|
|
|
55845
55845
|
this.fromNormalDistance(normal, distance2);
|
|
55846
55846
|
}
|
|
55847
55847
|
fromNormalDistance(normal, distance2) {
|
|
55848
|
-
assert$
|
|
55848
|
+
assert$d(Number.isFinite(distance2));
|
|
55849
55849
|
this.normal.from(normal).normalize();
|
|
55850
55850
|
this.distance = distance2;
|
|
55851
55851
|
return this;
|
|
@@ -55859,7 +55859,7 @@ class Plane {
|
|
|
55859
55859
|
}
|
|
55860
55860
|
fromCoefficients(a2, b, c, d) {
|
|
55861
55861
|
this.normal.set(a2, b, c);
|
|
55862
|
-
assert$
|
|
55862
|
+
assert$d(equals$3(this.normal.len(), 1));
|
|
55863
55863
|
this.distance = d;
|
|
55864
55864
|
return this;
|
|
55865
55865
|
}
|
|
@@ -55933,7 +55933,7 @@ class CullingVolume {
|
|
|
55933
55933
|
return intersect2;
|
|
55934
55934
|
}
|
|
55935
55935
|
computeVisibilityWithPlaneMask(boundingVolume, parentPlaneMask) {
|
|
55936
|
-
assert$
|
|
55936
|
+
assert$d(Number.isFinite(parentPlaneMask), "parentPlaneMask is required.");
|
|
55937
55937
|
if (parentPlaneMask === CullingVolume.MASK_OUTSIDE || parentPlaneMask === CullingVolume.MASK_INSIDE) {
|
|
55938
55938
|
return parentPlaneMask;
|
|
55939
55939
|
}
|
|
@@ -69425,17 +69425,17 @@ class ScenegraphNode {
|
|
|
69425
69425
|
return null;
|
|
69426
69426
|
}
|
|
69427
69427
|
setPosition(position) {
|
|
69428
|
-
assert$
|
|
69428
|
+
assert$8(position.length === 3, "setPosition requires vector argument");
|
|
69429
69429
|
this.position = position;
|
|
69430
69430
|
return this;
|
|
69431
69431
|
}
|
|
69432
69432
|
setRotation(rotation2) {
|
|
69433
|
-
assert$
|
|
69433
|
+
assert$8(rotation2.length === 3, "setRotation requires vector argument");
|
|
69434
69434
|
this.rotation = rotation2;
|
|
69435
69435
|
return this;
|
|
69436
69436
|
}
|
|
69437
69437
|
setScale(scale2) {
|
|
69438
|
-
assert$
|
|
69438
|
+
assert$8(scale2.length === 3, "setScale requires vector argument");
|
|
69439
69439
|
this.scale = scale2;
|
|
69440
69440
|
return this;
|
|
69441
69441
|
}
|
|
@@ -69498,7 +69498,7 @@ class ScenegraphNode {
|
|
|
69498
69498
|
return this;
|
|
69499
69499
|
}
|
|
69500
69500
|
getCoordinateUniforms(viewMatrix2, modelMatrix2) {
|
|
69501
|
-
assert$
|
|
69501
|
+
assert$8(viewMatrix2);
|
|
69502
69502
|
modelMatrix2 = modelMatrix2 || this.matrix;
|
|
69503
69503
|
const worldMatrix = new Matrix4(viewMatrix2).multiplyRight(modelMatrix2);
|
|
69504
69504
|
const worldInverse = worldMatrix.invert();
|
|
@@ -69735,7 +69735,7 @@ function interpolate$1(time, _ref2, target, path) {
|
|
|
69735
69735
|
log$2.warn("Bad animation path ".concat(path))();
|
|
69736
69736
|
}
|
|
69737
69737
|
}
|
|
69738
|
-
assert$
|
|
69738
|
+
assert$8(target[path].length === output[previousIndex].length);
|
|
69739
69739
|
const previousTime = input[previousIndex];
|
|
69740
69740
|
const nextTime = input[nextIndex];
|
|
69741
69741
|
switch (interpolation) {
|
|
@@ -70668,7 +70668,7 @@ const BasisLoader = {
|
|
|
70668
70668
|
...BasisWorkerLoader,
|
|
70669
70669
|
parse: parseBasis
|
|
70670
70670
|
};
|
|
70671
|
-
function assert$
|
|
70671
|
+
function assert$4(condition, message) {
|
|
70672
70672
|
if (!condition) {
|
|
70673
70673
|
throw new Error(message || "assert failed: gltf");
|
|
70674
70674
|
}
|
|
@@ -70686,10 +70686,10 @@ function resolveUrl(url, options) {
|
|
|
70686
70686
|
}
|
|
70687
70687
|
function getTypedArrayForBufferView(json, buffers, bufferViewIndex) {
|
|
70688
70688
|
const bufferView = json.bufferViews[bufferViewIndex];
|
|
70689
|
-
assert$
|
|
70689
|
+
assert$4(bufferView);
|
|
70690
70690
|
const bufferIndex = bufferView.buffer;
|
|
70691
70691
|
const binChunk = buffers[bufferIndex];
|
|
70692
|
-
assert$
|
|
70692
|
+
assert$4(binChunk);
|
|
70693
70693
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
70694
70694
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
70695
70695
|
}
|
|
@@ -70738,7 +70738,7 @@ function getAccessorArrayTypeAndLength(accessor, bufferView) {
|
|
|
70738
70738
|
const bytesPerComponent = ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE[accessor.componentType];
|
|
70739
70739
|
const length2 = accessor.count * components;
|
|
70740
70740
|
const byteLength = accessor.count * components * bytesPerComponent;
|
|
70741
|
-
assert$
|
|
70741
|
+
assert$4(byteLength >= 0 && byteLength <= bufferView.byteLength);
|
|
70742
70742
|
return {
|
|
70743
70743
|
ArrayType,
|
|
70744
70744
|
length: length2,
|
|
@@ -70847,7 +70847,7 @@ class GLTFScenegraph {
|
|
|
70847
70847
|
bufferView = this.getBufferView(bufferView);
|
|
70848
70848
|
const bufferIndex = bufferView.buffer;
|
|
70849
70849
|
const binChunk = this.gltf.buffers[bufferIndex];
|
|
70850
|
-
assert$
|
|
70850
|
+
assert$4(binChunk);
|
|
70851
70851
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
70852
70852
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
70853
70853
|
}
|
|
@@ -70897,14 +70897,14 @@ class GLTFScenegraph {
|
|
|
70897
70897
|
return extension;
|
|
70898
70898
|
}
|
|
70899
70899
|
addExtension(extensionName, extensionData = {}) {
|
|
70900
|
-
assert$
|
|
70900
|
+
assert$4(extensionData);
|
|
70901
70901
|
this.json.extensions = this.json.extensions || {};
|
|
70902
70902
|
this.json.extensions[extensionName] = extensionData;
|
|
70903
70903
|
this.registerUsedExtension(extensionName);
|
|
70904
70904
|
return extensionData;
|
|
70905
70905
|
}
|
|
70906
70906
|
addRequiredExtension(extensionName, extensionData = {}) {
|
|
70907
|
-
assert$
|
|
70907
|
+
assert$4(extensionData);
|
|
70908
70908
|
this.addExtension(extensionName, extensionData);
|
|
70909
70909
|
this.registerRequiredExtension(extensionName);
|
|
70910
70910
|
return extensionData;
|
|
@@ -71012,7 +71012,7 @@ class GLTFScenegraph {
|
|
|
71012
71012
|
}
|
|
71013
71013
|
addBufferView(buffer2) {
|
|
71014
71014
|
const byteLength = buffer2.byteLength;
|
|
71015
|
-
assert$
|
|
71015
|
+
assert$4(Number.isFinite(byteLength));
|
|
71016
71016
|
this.sourceBuffers = this.sourceBuffers || [];
|
|
71017
71017
|
this.sourceBuffers.push(buffer2);
|
|
71018
71018
|
const glTFBufferView = {
|
|
@@ -71367,7 +71367,7 @@ function getMeshBoundingBox(attributes) {
|
|
|
71367
71367
|
}
|
|
71368
71368
|
return [[minX, minY, minZ], [maxX, maxY, maxZ]];
|
|
71369
71369
|
}
|
|
71370
|
-
function assert$
|
|
71370
|
+
function assert$3(condition, message) {
|
|
71371
71371
|
if (!condition) {
|
|
71372
71372
|
throw new Error(message || "loader assertion failed.");
|
|
71373
71373
|
}
|
|
@@ -71376,7 +71376,7 @@ class Schema {
|
|
|
71376
71376
|
constructor(fields, metadata) {
|
|
71377
71377
|
_defineProperty$e(this, "fields", void 0);
|
|
71378
71378
|
_defineProperty$e(this, "metadata", void 0);
|
|
71379
|
-
assert$
|
|
71379
|
+
assert$3(Array.isArray(fields));
|
|
71380
71380
|
checkNames(fields);
|
|
71381
71381
|
this.fields = fields;
|
|
71382
71382
|
this.metadata = metadata || /* @__PURE__ */ new Map();
|
|
@@ -72366,7 +72366,7 @@ async function encode$2(gltfData) {
|
|
|
72366
72366
|
} = gltfScenegraph;
|
|
72367
72367
|
if (json.lights) {
|
|
72368
72368
|
const extension = gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);
|
|
72369
|
-
assert$
|
|
72369
|
+
assert$4(!extension.lights);
|
|
72370
72370
|
extension.lights = json.lights;
|
|
72371
72371
|
delete json.lights;
|
|
72372
72372
|
}
|
|
@@ -72784,7 +72784,7 @@ class GLTFPostProcessor {
|
|
|
72784
72784
|
images = [],
|
|
72785
72785
|
baseUri = ""
|
|
72786
72786
|
} = gltf;
|
|
72787
|
-
assert$
|
|
72787
|
+
assert$4(json);
|
|
72788
72788
|
this.baseUri = baseUri;
|
|
72789
72789
|
this.json = json;
|
|
72790
72790
|
this.buffers = buffers;
|
|
@@ -73110,18 +73110,18 @@ function parseGLBSync(glb, arrayBuffer2, byteOffset = 0, options = {}) {
|
|
|
73110
73110
|
}
|
|
73111
73111
|
}
|
|
73112
73112
|
function parseGLBV1(glb, dataView, byteOffset) {
|
|
73113
|
-
assert$
|
|
73113
|
+
assert$c(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);
|
|
73114
73114
|
const contentLength = dataView.getUint32(byteOffset + 0, LE);
|
|
73115
73115
|
const contentFormat = dataView.getUint32(byteOffset + 4, LE);
|
|
73116
73116
|
byteOffset += GLB_CHUNK_HEADER_SIZE;
|
|
73117
|
-
assert$
|
|
73117
|
+
assert$c(contentFormat === GLB_V1_CONTENT_FORMAT_JSON);
|
|
73118
73118
|
parseJSONChunk(glb, dataView, byteOffset, contentLength);
|
|
73119
73119
|
byteOffset += contentLength;
|
|
73120
73120
|
byteOffset += parseBINChunk(glb, dataView, byteOffset, glb.header.byteLength);
|
|
73121
73121
|
return byteOffset;
|
|
73122
73122
|
}
|
|
73123
73123
|
function parseGLBV2(glb, dataView, byteOffset, options) {
|
|
73124
|
-
assert$
|
|
73124
|
+
assert$c(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);
|
|
73125
73125
|
parseGLBChunksSync(glb, dataView, byteOffset, options);
|
|
73126
73126
|
return byteOffset + glb.header.byteLength;
|
|
73127
73127
|
}
|
|
@@ -73201,11 +73201,11 @@ function parseGLTFContainerSync(gltf, data, byteOffset, options) {
|
|
|
73201
73201
|
} else if (data instanceof ArrayBuffer) {
|
|
73202
73202
|
const glb = {};
|
|
73203
73203
|
byteOffset = parseGLBSync(glb, data, byteOffset, options.glb);
|
|
73204
|
-
assert$
|
|
73204
|
+
assert$4(glb.type === "glTF", "Invalid GLB magic string ".concat(glb.type));
|
|
73205
73205
|
gltf._glb = glb;
|
|
73206
73206
|
gltf.json = glb.json;
|
|
73207
73207
|
} else {
|
|
73208
|
-
assert$
|
|
73208
|
+
assert$4(false, "GLTF: must be ArrayBuffer or string");
|
|
73209
73209
|
}
|
|
73210
73210
|
const buffers = gltf.json.buffers || [];
|
|
73211
73211
|
gltf.buffers = new Array(buffers.length).fill(null);
|
|
@@ -73231,7 +73231,7 @@ async function loadBuffers(gltf, options, context) {
|
|
|
73231
73231
|
const {
|
|
73232
73232
|
fetch: fetch2
|
|
73233
73233
|
} = context;
|
|
73234
|
-
assert$
|
|
73234
|
+
assert$4(fetch2);
|
|
73235
73235
|
const uri2 = resolveUrl(buffer2.uri, options);
|
|
73236
73236
|
const response = await (context === null || context === void 0 ? void 0 : (_context$fetch = context.fetch) === null || _context$fetch === void 0 ? void 0 : _context$fetch.call(context, uri2));
|
|
73237
73237
|
const arrayBuffer2 = await (response === null || response === void 0 ? void 0 : (_response$arrayBuffer = response.arrayBuffer) === null || _response$arrayBuffer === void 0 ? void 0 : _response$arrayBuffer.call(response));
|
|
@@ -73284,7 +73284,7 @@ async function loadImage(gltf, image, index2, options, context) {
|
|
|
73284
73284
|
const array = getTypedArrayForBufferView(gltf.json, gltf.buffers, image.bufferView);
|
|
73285
73285
|
arrayBuffer2 = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
|
|
73286
73286
|
}
|
|
73287
|
-
assert$
|
|
73287
|
+
assert$4(arrayBuffer2, "glTF image has no data");
|
|
73288
73288
|
let parsedImage = await parse2(arrayBuffer2, [ImageLoader, BasisLoader], {
|
|
73289
73289
|
mimeType: image.mimeType,
|
|
73290
73290
|
basis: options.basis || {
|
|
@@ -73971,7 +73971,7 @@ const scratchVector2 = new Vector3();
|
|
|
73971
73971
|
const scratchVector3 = new Vector3();
|
|
73972
73972
|
function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) {
|
|
73973
73973
|
const thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis];
|
|
73974
|
-
assert$
|
|
73974
|
+
assert$d(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));
|
|
73975
73975
|
let firstAxisVector;
|
|
73976
73976
|
let secondAxisVector;
|
|
73977
73977
|
let thirdAxisVector;
|
|
@@ -74047,9 +74047,9 @@ class Ellipsoid {
|
|
|
74047
74047
|
_defineProperty$e(this, "maximumRadius", void 0);
|
|
74048
74048
|
_defineProperty$e(this, "centerToleranceSquared", _MathUtils.EPSILON1);
|
|
74049
74049
|
_defineProperty$e(this, "squaredXOverSquaredZ", void 0);
|
|
74050
|
-
assert$
|
|
74051
|
-
assert$
|
|
74052
|
-
assert$
|
|
74050
|
+
assert$d(x2 >= 0);
|
|
74051
|
+
assert$d(y2 >= 0);
|
|
74052
|
+
assert$d(z >= 0);
|
|
74053
74053
|
this.radii = new Vector3(x2, y2, z);
|
|
74054
74054
|
this.radiiSquared = new Vector3(x2 * x2, y2 * y2, z * z);
|
|
74055
74055
|
this.radiiToTheFourth = new Vector3(x2 * x2 * x2 * x2, y2 * y2 * y2 * y2, z * z * z * z);
|
|
@@ -74133,8 +74133,8 @@ class Ellipsoid {
|
|
|
74133
74133
|
return scratchPosition$1.from(position).scale(this.radii).to(result);
|
|
74134
74134
|
}
|
|
74135
74135
|
getSurfaceNormalIntersectionWithZAxis(position, buffer2 = 0, result = [0, 0, 0]) {
|
|
74136
|
-
assert$
|
|
74137
|
-
assert$
|
|
74136
|
+
assert$d(equals$3(this.radii.x, this.radii.y, _MathUtils.EPSILON15));
|
|
74137
|
+
assert$d(this.radii.z > 0);
|
|
74138
74138
|
scratchPosition$1.from(position);
|
|
74139
74139
|
const z = scratchPosition$1.z * (1 - this.squaredXOverSquaredZ);
|
|
74140
74140
|
if (Math.abs(z) >= this.radii.z - buffer2) {
|
|
@@ -74274,8 +74274,8 @@ class TilesetCache {
|
|
|
74274
74274
|
}
|
|
74275
74275
|
}
|
|
74276
74276
|
function calculateTransformProps(tileHeader, tile) {
|
|
74277
|
-
assert$
|
|
74278
|
-
assert$
|
|
74277
|
+
assert$c(tileHeader);
|
|
74278
|
+
assert$c(tile);
|
|
74279
74279
|
const {
|
|
74280
74280
|
rtcCenter,
|
|
74281
74281
|
gltfUpAxis
|
|
@@ -74509,7 +74509,7 @@ const scratchScale = new Vector3();
|
|
|
74509
74509
|
const scratchNorthWest = new Vector3();
|
|
74510
74510
|
const scratchSouthEast = new Vector3();
|
|
74511
74511
|
function createBoundingVolume(boundingVolumeHeader, transform2, result) {
|
|
74512
|
-
assert$
|
|
74512
|
+
assert$c(boundingVolumeHeader, "3D Tile: boundingVolume must be defined");
|
|
74513
74513
|
if (boundingVolumeHeader.box) {
|
|
74514
74514
|
return createBox(boundingVolumeHeader.box, transform2, result);
|
|
74515
74515
|
}
|
|
@@ -74685,11 +74685,11 @@ class ManagedArray {
|
|
|
74685
74685
|
return this._array;
|
|
74686
74686
|
}
|
|
74687
74687
|
get(index2) {
|
|
74688
|
-
assert$
|
|
74688
|
+
assert$c(index2 < this._array.length);
|
|
74689
74689
|
return this._array[index2];
|
|
74690
74690
|
}
|
|
74691
74691
|
set(index2, element) {
|
|
74692
|
-
assert$
|
|
74692
|
+
assert$c(index2 >= 0);
|
|
74693
74693
|
if (index2 >= this.length) {
|
|
74694
74694
|
this.length = index2 + 1;
|
|
74695
74695
|
}
|
|
@@ -74723,13 +74723,13 @@ class ManagedArray {
|
|
|
74723
74723
|
return element;
|
|
74724
74724
|
}
|
|
74725
74725
|
reserve(length2) {
|
|
74726
|
-
assert$
|
|
74726
|
+
assert$c(length2 >= 0);
|
|
74727
74727
|
if (length2 > this._array.length) {
|
|
74728
74728
|
this._array.length = length2;
|
|
74729
74729
|
}
|
|
74730
74730
|
}
|
|
74731
74731
|
resize(length2) {
|
|
74732
|
-
assert$
|
|
74732
|
+
assert$c(length2 >= 0);
|
|
74733
74733
|
this.length = length2;
|
|
74734
74734
|
}
|
|
74735
74735
|
trim(length2) {
|
|
@@ -75677,7 +75677,7 @@ class Tileset3D {
|
|
|
75677
75677
|
_defineProperty$e(this, "_emptyTiles", void 0);
|
|
75678
75678
|
_defineProperty$e(this, "frameStateData", void 0);
|
|
75679
75679
|
_defineProperty$e(this, "maximumMemoryUsage", void 0);
|
|
75680
|
-
assert$
|
|
75680
|
+
assert$c(json);
|
|
75681
75681
|
this.options = {
|
|
75682
75682
|
...DEFAULT_PROPS,
|
|
75683
75683
|
...options
|
|
@@ -75968,7 +75968,7 @@ class Tileset3D {
|
|
|
75968
75968
|
}
|
|
75969
75969
|
calculateViewPropsTiles3D() {
|
|
75970
75970
|
const root2 = this.root;
|
|
75971
|
-
assert$
|
|
75971
|
+
assert$c(root2);
|
|
75972
75972
|
const {
|
|
75973
75973
|
center: center2
|
|
75974
75974
|
} = root2.boundingVolume;
|
|
@@ -76187,7 +76187,7 @@ const TILE3D_TYPE = {
|
|
|
76187
76187
|
GLTF: "glTF"
|
|
76188
76188
|
};
|
|
76189
76189
|
function getStringFromArrayBuffer(arrayBuffer2, byteOffset, byteLength) {
|
|
76190
|
-
assert$
|
|
76190
|
+
assert$c(arrayBuffer2 instanceof ArrayBuffer);
|
|
76191
76191
|
const textDecoder = new TextDecoder("utf8");
|
|
76192
76192
|
const typedArray = new Uint8Array(arrayBuffer2, byteOffset, byteLength);
|
|
76193
76193
|
const string = textDecoder.decode(typedArray);
|
|
@@ -76288,7 +76288,7 @@ class GLType {
|
|
|
76288
76288
|
return new ArrayType(buffer2, byteOffset, length2);
|
|
76289
76289
|
}
|
|
76290
76290
|
}
|
|
76291
|
-
function assert$
|
|
76291
|
+
function assert$2(condition, message) {
|
|
76292
76292
|
if (!condition) {
|
|
76293
76293
|
throw new Error("math.gl assertion failed. ".concat(message));
|
|
76294
76294
|
}
|
|
@@ -76313,7 +76313,7 @@ function signNotZero(value) {
|
|
|
76313
76313
|
return value < 0 ? -1 : 1;
|
|
76314
76314
|
}
|
|
76315
76315
|
function octDecodeInRange(x2, y2, rangeMax, result) {
|
|
76316
|
-
assert$
|
|
76316
|
+
assert$2(result);
|
|
76317
76317
|
if (x2 < 0 || x2 > rangeMax || y2 < 0 || y2 > rangeMax) {
|
|
76318
76318
|
throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(rangeMax));
|
|
76319
76319
|
}
|
|
@@ -76473,7 +76473,7 @@ function createTypedArrayFromAccessor(tile3DAccessor, buffer2, byteOffset, lengt
|
|
|
76473
76473
|
const {
|
|
76474
76474
|
componentType
|
|
76475
76475
|
} = tile3DAccessor;
|
|
76476
|
-
assert$
|
|
76476
|
+
assert$c(tile3DAccessor.componentType);
|
|
76477
76477
|
const type2 = typeof componentType === "string" ? GLType.fromName(componentType) : componentType;
|
|
76478
76478
|
const size2 = COMPONENTS_PER_ATTRIBUTE[tile3DAccessor.type];
|
|
76479
76479
|
const unpacker = UNPACKER[tile3DAccessor.type];
|
|
@@ -76676,7 +76676,7 @@ class Tile3DBatchTableParser {
|
|
|
76676
76676
|
_defineProperty$e(this, "_properties", void 0);
|
|
76677
76677
|
_defineProperty$e(this, "_binaryProperties", void 0);
|
|
76678
76678
|
_defineProperty$e(this, "_hierarchy", void 0);
|
|
76679
|
-
assert$
|
|
76679
|
+
assert$c(featureCount >= 0);
|
|
76680
76680
|
this.json = json || {};
|
|
76681
76681
|
this.binary = binary;
|
|
76682
76682
|
this.featureCount = featureCount;
|
|
@@ -76700,7 +76700,7 @@ class Tile3DBatchTableParser {
|
|
|
76700
76700
|
}
|
|
76701
76701
|
isClass(batchId, className) {
|
|
76702
76702
|
this._checkBatchId(batchId);
|
|
76703
|
-
assert$
|
|
76703
|
+
assert$c(typeof className === "string", className);
|
|
76704
76704
|
if (this._hierarchy) {
|
|
76705
76705
|
const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
|
|
76706
76706
|
const classId = hierarchy.classIds[instanceIndex];
|
|
@@ -76712,7 +76712,7 @@ class Tile3DBatchTableParser {
|
|
|
76712
76712
|
return false;
|
|
76713
76713
|
}
|
|
76714
76714
|
isExactClass(batchId, className) {
|
|
76715
|
-
assert$
|
|
76715
|
+
assert$c(typeof className === "string", className);
|
|
76716
76716
|
return this.getExactClassName(batchId) === className;
|
|
76717
76717
|
}
|
|
76718
76718
|
getExactClassName(batchId) {
|
|
@@ -76726,7 +76726,7 @@ class Tile3DBatchTableParser {
|
|
|
76726
76726
|
}
|
|
76727
76727
|
hasProperty(batchId, name2) {
|
|
76728
76728
|
this._checkBatchId(batchId);
|
|
76729
|
-
assert$
|
|
76729
|
+
assert$c(typeof name2 === "string", name2);
|
|
76730
76730
|
return defined(this._properties[name2]) || this._hasPropertyInHierarchy(batchId, name2);
|
|
76731
76731
|
}
|
|
76732
76732
|
getPropertyNames(batchId, results) {
|
|
@@ -76742,7 +76742,7 @@ class Tile3DBatchTableParser {
|
|
|
76742
76742
|
}
|
|
76743
76743
|
getProperty(batchId, name2) {
|
|
76744
76744
|
this._checkBatchId(batchId);
|
|
76745
|
-
assert$
|
|
76745
|
+
assert$c(typeof name2 === "string", name2);
|
|
76746
76746
|
if (this._binaryProperties) {
|
|
76747
76747
|
const binaryProperty = this._binaryProperties[name2];
|
|
76748
76748
|
if (defined(binaryProperty)) {
|
|
@@ -76764,7 +76764,7 @@ class Tile3DBatchTableParser {
|
|
|
76764
76764
|
setProperty(batchId, name2, value) {
|
|
76765
76765
|
const featureCount = this.featureCount;
|
|
76766
76766
|
this._checkBatchId(batchId);
|
|
76767
|
-
assert$
|
|
76767
|
+
assert$c(typeof name2 === "string", name2);
|
|
76768
76768
|
if (this._binaryProperties) {
|
|
76769
76769
|
const binaryProperty = this._binaryProperties[name2];
|
|
76770
76770
|
if (binaryProperty) {
|
|
@@ -76811,8 +76811,8 @@ class Tile3DBatchTableParser {
|
|
|
76811
76811
|
_initializeBinaryProperty(name2, property) {
|
|
76812
76812
|
if ("byteOffset" in property) {
|
|
76813
76813
|
const tile3DAccessor = property;
|
|
76814
|
-
assert$
|
|
76815
|
-
assert$
|
|
76814
|
+
assert$c(this.binary, "Property ".concat(name2, " requires a batch table binary."));
|
|
76815
|
+
assert$c(tile3DAccessor.type, "Property ".concat(name2, " requires a type."));
|
|
76816
76816
|
const accessor = createTypedArrayFromAccessor(tile3DAccessor, this.binary.buffer, this.binary.byteOffset | 0, this.featureCount);
|
|
76817
76817
|
return {
|
|
76818
76818
|
typedArray: accessor.values,
|
|
@@ -76869,7 +76869,7 @@ class Tile3DBatchTableParser {
|
|
|
76869
76869
|
const indexInClass = hierarchy.classIndexes[instanceIndex];
|
|
76870
76870
|
const propertyValues = instanceClass.instances[name2];
|
|
76871
76871
|
if (defined(propertyValues)) {
|
|
76872
|
-
assert$
|
|
76872
|
+
assert$c(instanceIndex === batchId, 'Inherited property "'.concat(name2, '" is read-only.'));
|
|
76873
76873
|
if (defined(propertyValues.typedArray)) {
|
|
76874
76874
|
this._setBinaryProperty(propertyValues, indexInClass, value);
|
|
76875
76875
|
} else {
|
|
@@ -82004,7 +82004,7 @@ function point(coordinates2, properties, options) {
|
|
|
82004
82004
|
if (coordinates2.length < 2) {
|
|
82005
82005
|
throw new Error("coordinates must be at least 2 numbers long");
|
|
82006
82006
|
}
|
|
82007
|
-
if (!isNumber(coordinates2[0]) || !isNumber(coordinates2[1])) {
|
|
82007
|
+
if (!isNumber$1(coordinates2[0]) || !isNumber$1(coordinates2[1])) {
|
|
82008
82008
|
throw new Error("coordinates must contain numbers");
|
|
82009
82009
|
}
|
|
82010
82010
|
var geom = {
|
|
@@ -82205,10 +82205,10 @@ function convertArea(area2, originalUnit, finalUnit) {
|
|
|
82205
82205
|
}
|
|
82206
82206
|
return area2 / startFactor * finalFactor;
|
|
82207
82207
|
}
|
|
82208
|
-
function isNumber(num) {
|
|
82208
|
+
function isNumber$1(num) {
|
|
82209
82209
|
return !isNaN(num) && num !== null && !Array.isArray(num);
|
|
82210
82210
|
}
|
|
82211
|
-
function isObject$
|
|
82211
|
+
function isObject$2(input) {
|
|
82212
82212
|
return !!input && input.constructor === Object;
|
|
82213
82213
|
}
|
|
82214
82214
|
function validateBBox(bbox2) {
|
|
@@ -82222,7 +82222,7 @@ function validateBBox(bbox2) {
|
|
|
82222
82222
|
throw new Error("bbox must be an Array of 4 or 6 numbers");
|
|
82223
82223
|
}
|
|
82224
82224
|
bbox2.forEach(function(num) {
|
|
82225
|
-
if (!isNumber(num)) {
|
|
82225
|
+
if (!isNumber$1(num)) {
|
|
82226
82226
|
throw new Error("bbox must only contain numbers");
|
|
82227
82227
|
}
|
|
82228
82228
|
});
|
|
@@ -82248,8 +82248,8 @@ const es$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
82248
82248
|
featureCollection: featureCollection$1,
|
|
82249
82249
|
geometry,
|
|
82250
82250
|
geometryCollection,
|
|
82251
|
-
isNumber,
|
|
82252
|
-
isObject: isObject$
|
|
82251
|
+
isNumber: isNumber$1,
|
|
82252
|
+
isObject: isObject$2,
|
|
82253
82253
|
lengthToDegrees,
|
|
82254
82254
|
lengthToRadians,
|
|
82255
82255
|
lineString,
|
|
@@ -82691,7 +82691,7 @@ function lineReduce$1(geojson, callback, initialValue) {
|
|
|
82691
82691
|
}
|
|
82692
82692
|
function findSegment$1(geojson, options) {
|
|
82693
82693
|
options = options || {};
|
|
82694
|
-
if (!isObject$
|
|
82694
|
+
if (!isObject$2(options))
|
|
82695
82695
|
throw new Error("options is invalid");
|
|
82696
82696
|
var featureIndex = options.featureIndex || 0;
|
|
82697
82697
|
var multiFeatureIndex = options.multiFeatureIndex || 0;
|
|
@@ -82783,7 +82783,7 @@ function findSegment$1(geojson, options) {
|
|
|
82783
82783
|
}
|
|
82784
82784
|
function findPoint$1(geojson, options) {
|
|
82785
82785
|
options = options || {};
|
|
82786
|
-
if (!isObject$
|
|
82786
|
+
if (!isObject$2(options))
|
|
82787
82787
|
throw new Error("options is invalid");
|
|
82788
82788
|
var featureIndex = options.featureIndex || 0;
|
|
82789
82789
|
var multiFeatureIndex = options.multiFeatureIndex || 0;
|
|
@@ -82927,7 +82927,7 @@ function getCoords$1(coords) {
|
|
|
82927
82927
|
throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array");
|
|
82928
82928
|
}
|
|
82929
82929
|
function containsNumber$1(coordinates2) {
|
|
82930
|
-
if (coordinates2.length > 1 && isNumber(coordinates2[0]) && isNumber(coordinates2[1])) {
|
|
82930
|
+
if (coordinates2.length > 1 && isNumber$1(coordinates2[0]) && isNumber$1(coordinates2[1])) {
|
|
82931
82931
|
return true;
|
|
82932
82932
|
}
|
|
82933
82933
|
if (Array.isArray(coordinates2[0]) && coordinates2[0].length) {
|
|
@@ -85983,7 +85983,7 @@ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symb
|
|
|
85983
85983
|
var toStr$1 = Object.prototype.toString;
|
|
85984
85984
|
var concat = Array.prototype.concat;
|
|
85985
85985
|
var defineDataProperty2 = defineDataProperty$1;
|
|
85986
|
-
var isFunction = function(fn) {
|
|
85986
|
+
var isFunction$1 = function(fn) {
|
|
85987
85987
|
return typeof fn === "function" && toStr$1.call(fn) === "[object Function]";
|
|
85988
85988
|
};
|
|
85989
85989
|
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
@@ -85993,7 +85993,7 @@ var defineProperty$1 = function(object2, name2, value, predicate) {
|
|
|
85993
85993
|
if (object2[name2] === value) {
|
|
85994
85994
|
return;
|
|
85995
85995
|
}
|
|
85996
|
-
} else if (!isFunction(predicate) || !predicate()) {
|
|
85996
|
+
} else if (!isFunction$1(predicate) || !predicate()) {
|
|
85997
85997
|
return;
|
|
85998
85998
|
}
|
|
85999
85999
|
}
|
|
@@ -86377,7 +86377,7 @@ function lineOverlap(line1, line2, options) {
|
|
|
86377
86377
|
options = {};
|
|
86378
86378
|
}
|
|
86379
86379
|
options = options || {};
|
|
86380
|
-
if (!isObject$
|
|
86380
|
+
if (!isObject$2(options))
|
|
86381
86381
|
throw new Error("options is invalid");
|
|
86382
86382
|
var tolerance = options.tolerance || 0;
|
|
86383
86383
|
var features = [];
|
|
@@ -86937,19 +86937,19 @@ var jsts_min = { exports: {} };
|
|
|
86937
86937
|
}, Object.defineProperties(w2, O);
|
|
86938
86938
|
var T = function(t2, e3) {
|
|
86939
86939
|
return t2.interfaces_ && t2.interfaces_().indexOf(e3) > -1;
|
|
86940
|
-
},
|
|
86940
|
+
}, R = function() {
|
|
86941
86941
|
}, P2 = { LOG_10: { configurable: true } };
|
|
86942
|
-
|
|
86942
|
+
R.prototype.interfaces_ = function() {
|
|
86943
86943
|
return [];
|
|
86944
|
-
},
|
|
86945
|
-
return
|
|
86946
|
-
},
|
|
86944
|
+
}, R.prototype.getClass = function() {
|
|
86945
|
+
return R;
|
|
86946
|
+
}, R.log10 = function(t2) {
|
|
86947
86947
|
var e3 = Math.log(t2);
|
|
86948
|
-
return v.isInfinite(e3) ? e3 : v.isNaN(e3) ? e3 : e3 /
|
|
86949
|
-
},
|
|
86948
|
+
return v.isInfinite(e3) ? e3 : v.isNaN(e3) ? e3 : e3 / R.LOG_10;
|
|
86949
|
+
}, R.min = function(t2, e3, n4, i3) {
|
|
86950
86950
|
var r3 = t2;
|
|
86951
86951
|
return e3 < r3 && (r3 = e3), n4 < r3 && (r3 = n4), i3 < r3 && (r3 = i3), r3;
|
|
86952
|
-
},
|
|
86952
|
+
}, R.clamp = function() {
|
|
86953
86953
|
if ("number" == typeof arguments[2] && "number" == typeof arguments[0] && "number" == typeof arguments[1]) {
|
|
86954
86954
|
var t2 = arguments[0], e3 = arguments[1], n4 = arguments[2];
|
|
86955
86955
|
return t2 < e3 ? e3 : t2 > n4 ? n4 : t2;
|
|
@@ -86958,9 +86958,9 @@ var jsts_min = { exports: {} };
|
|
|
86958
86958
|
var i3 = arguments[0], r3 = arguments[1], o3 = arguments[2];
|
|
86959
86959
|
return i3 < r3 ? r3 : i3 > o3 ? o3 : i3;
|
|
86960
86960
|
}
|
|
86961
|
-
},
|
|
86961
|
+
}, R.wrap = function(t2, e3) {
|
|
86962
86962
|
return t2 < 0 ? e3 - -t2 % e3 : t2 % e3;
|
|
86963
|
-
},
|
|
86963
|
+
}, R.max = function() {
|
|
86964
86964
|
if (3 === arguments.length) {
|
|
86965
86965
|
var t2 = arguments[0], e3 = arguments[1], n4 = arguments[2], i3 = t2;
|
|
86966
86966
|
return e3 > i3 && (i3 = e3), n4 > i3 && (i3 = n4), i3;
|
|
@@ -86969,11 +86969,11 @@ var jsts_min = { exports: {} };
|
|
|
86969
86969
|
var r3 = arguments[0], o3 = arguments[1], s3 = arguments[2], a3 = arguments[3], u2 = r3;
|
|
86970
86970
|
return o3 > u2 && (u2 = o3), s3 > u2 && (u2 = s3), a3 > u2 && (u2 = a3), u2;
|
|
86971
86971
|
}
|
|
86972
|
-
},
|
|
86972
|
+
}, R.average = function(t2, e3) {
|
|
86973
86973
|
return (t2 + e3) / 2;
|
|
86974
86974
|
}, P2.LOG_10.get = function() {
|
|
86975
86975
|
return Math.log(10);
|
|
86976
|
-
}, Object.defineProperties(
|
|
86976
|
+
}, Object.defineProperties(R, P2);
|
|
86977
86977
|
var D2 = function(t2) {
|
|
86978
86978
|
this.str = t2;
|
|
86979
86979
|
};
|
|
@@ -88128,7 +88128,7 @@ var jsts_min = { exports: {} };
|
|
|
88128
88128
|
}
|
|
88129
88129
|
} else
|
|
88130
88130
|
r3 = true;
|
|
88131
|
-
return r3 ?
|
|
88131
|
+
return r3 ? R.min(at.distancePointLine(t2, n4, i3), at.distancePointLine(e3, n4, i3), at.distancePointLine(n4, t2, e3), at.distancePointLine(i3, t2, e3)) : 0;
|
|
88132
88132
|
}, at.isPointInRing = function(t2, e3) {
|
|
88133
88133
|
return at.locatePointInRing(t2, e3) !== w2.EXTERIOR;
|
|
88134
88134
|
}, at.computeLength = function(t2) {
|
|
@@ -88718,8 +88718,8 @@ var jsts_min = { exports: {} };
|
|
|
88718
88718
|
(null === e3 || e3.compareTo(t2[n4]) > 0) && (e3 = t2[n4]);
|
|
88719
88719
|
return e3;
|
|
88720
88720
|
}, Lt.extract = function(t2, e3, n4) {
|
|
88721
|
-
e3 =
|
|
88722
|
-
var i3 = (n4 =
|
|
88721
|
+
e3 = R.clamp(e3, 0, t2.length);
|
|
88722
|
+
var i3 = (n4 = R.clamp(n4, -1, t2.length)) - e3 + 1;
|
|
88723
88723
|
n4 < 0 && (i3 = 0), e3 >= t2.length && (i3 = 0), n4 < e3 && (i3 = 0);
|
|
88724
88724
|
var r3 = new Array(i3).fill(null);
|
|
88725
88725
|
if (0 === i3)
|
|
@@ -94464,7 +94464,7 @@ var jsts_min = { exports: {} };
|
|
|
94464
94464
|
return f3.getResultGeometry(c2);
|
|
94465
94465
|
}
|
|
94466
94466
|
}, di.precisionScaleFactor = function(t2, e3, n4) {
|
|
94467
|
-
var i3 = t2.getEnvelopeInternal(), r3 =
|
|
94467
|
+
var i3 = t2.getEnvelopeInternal(), r3 = R.max(Math.abs(i3.getMaxX()), Math.abs(i3.getMaxY()), Math.abs(i3.getMinX()), Math.abs(i3.getMinY())) + 2 * (e3 > 0 ? e3 : 0), o3 = n4 - Math.trunc(Math.log(r3) / Math.log(10) + 1);
|
|
94468
94468
|
return Math.pow(10, o3);
|
|
94469
94469
|
}, yi.CAP_ROUND.get = function() {
|
|
94470
94470
|
return Cn.CAP_ROUND;
|
|
@@ -101855,372 +101855,216 @@ var layerMouseEvent = {};
|
|
|
101855
101855
|
exports2["default"] = LayerMouseEvent;
|
|
101856
101856
|
})(layerMouseEvent);
|
|
101857
101857
|
var nebulaLayer = {};
|
|
101858
|
-
var events = { exports: {} };
|
|
101859
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
101860
|
-
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
101861
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
101862
|
-
};
|
|
101863
|
-
var ReflectOwnKeys;
|
|
101864
|
-
if (R && typeof R.ownKeys === "function") {
|
|
101865
|
-
ReflectOwnKeys = R.ownKeys;
|
|
101866
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
101867
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
101868
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
101869
|
-
};
|
|
101870
|
-
} else {
|
|
101871
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
101872
|
-
return Object.getOwnPropertyNames(target);
|
|
101873
|
-
};
|
|
101874
|
-
}
|
|
101875
|
-
function ProcessEmitWarning(warning) {
|
|
101876
|
-
if (console && console.warn)
|
|
101877
|
-
console.warn(warning);
|
|
101878
|
-
}
|
|
101879
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
101880
|
-
return value !== value;
|
|
101881
|
-
};
|
|
101882
101858
|
function EventEmitter() {
|
|
101883
|
-
|
|
101859
|
+
this._events = this._events || {};
|
|
101860
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
101884
101861
|
}
|
|
101885
|
-
events
|
|
101886
|
-
events.exports.once = once2;
|
|
101862
|
+
var events = EventEmitter;
|
|
101887
101863
|
EventEmitter.EventEmitter = EventEmitter;
|
|
101888
101864
|
EventEmitter.prototype._events = void 0;
|
|
101889
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
101890
101865
|
EventEmitter.prototype._maxListeners = void 0;
|
|
101891
|
-
|
|
101892
|
-
function
|
|
101893
|
-
if (
|
|
101894
|
-
throw
|
|
101895
|
-
}
|
|
101896
|
-
}
|
|
101897
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
101898
|
-
enumerable: true,
|
|
101899
|
-
get: function() {
|
|
101900
|
-
return defaultMaxListeners;
|
|
101901
|
-
},
|
|
101902
|
-
set: function(arg) {
|
|
101903
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
101904
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
101905
|
-
}
|
|
101906
|
-
defaultMaxListeners = arg;
|
|
101907
|
-
}
|
|
101908
|
-
});
|
|
101909
|
-
EventEmitter.init = function() {
|
|
101910
|
-
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
101911
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
101912
|
-
this._eventsCount = 0;
|
|
101913
|
-
}
|
|
101914
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
101915
|
-
};
|
|
101916
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n3) {
|
|
101917
|
-
if (typeof n3 !== "number" || n3 < 0 || NumberIsNaN(n3)) {
|
|
101918
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n3 + ".");
|
|
101919
|
-
}
|
|
101866
|
+
EventEmitter.defaultMaxListeners = 10;
|
|
101867
|
+
EventEmitter.prototype.setMaxListeners = function(n3) {
|
|
101868
|
+
if (!isNumber(n3) || n3 < 0 || isNaN(n3))
|
|
101869
|
+
throw TypeError("n must be a positive number");
|
|
101920
101870
|
this._maxListeners = n3;
|
|
101921
101871
|
return this;
|
|
101922
101872
|
};
|
|
101923
|
-
function
|
|
101924
|
-
|
|
101925
|
-
|
|
101926
|
-
|
|
101927
|
-
|
|
101928
|
-
|
|
101929
|
-
|
|
101930
|
-
|
|
101931
|
-
|
|
101932
|
-
|
|
101933
|
-
|
|
101934
|
-
|
|
101935
|
-
|
|
101936
|
-
|
|
101937
|
-
|
|
101938
|
-
|
|
101939
|
-
|
|
101940
|
-
|
|
101941
|
-
if (doError) {
|
|
101942
|
-
var er;
|
|
101943
|
-
if (args.length > 0)
|
|
101944
|
-
er = args[0];
|
|
101945
|
-
if (er instanceof Error) {
|
|
101946
|
-
throw er;
|
|
101947
|
-
}
|
|
101948
|
-
var err2 = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
101949
|
-
err2.context = er;
|
|
101950
|
-
throw err2;
|
|
101951
|
-
}
|
|
101952
|
-
var handler = events2[type2];
|
|
101953
|
-
if (handler === void 0)
|
|
101873
|
+
EventEmitter.prototype.emit = function(type2) {
|
|
101874
|
+
var er, handler, len2, args, i2, listeners;
|
|
101875
|
+
if (!this._events)
|
|
101876
|
+
this._events = {};
|
|
101877
|
+
if (type2 === "error") {
|
|
101878
|
+
if (!this._events.error || isObject$1(this._events.error) && !this._events.error.length) {
|
|
101879
|
+
er = arguments[1];
|
|
101880
|
+
if (er instanceof Error) {
|
|
101881
|
+
throw er;
|
|
101882
|
+
} else {
|
|
101883
|
+
var err2 = new Error('Uncaught, unspecified "error" event. (' + er + ")");
|
|
101884
|
+
err2.context = er;
|
|
101885
|
+
throw err2;
|
|
101886
|
+
}
|
|
101887
|
+
}
|
|
101888
|
+
}
|
|
101889
|
+
handler = this._events[type2];
|
|
101890
|
+
if (isUndefined(handler))
|
|
101954
101891
|
return false;
|
|
101955
|
-
if (
|
|
101956
|
-
|
|
101957
|
-
|
|
101958
|
-
|
|
101959
|
-
|
|
101960
|
-
|
|
101961
|
-
|
|
101892
|
+
if (isFunction(handler)) {
|
|
101893
|
+
switch (arguments.length) {
|
|
101894
|
+
case 1:
|
|
101895
|
+
handler.call(this);
|
|
101896
|
+
break;
|
|
101897
|
+
case 2:
|
|
101898
|
+
handler.call(this, arguments[1]);
|
|
101899
|
+
break;
|
|
101900
|
+
case 3:
|
|
101901
|
+
handler.call(this, arguments[1], arguments[2]);
|
|
101902
|
+
break;
|
|
101903
|
+
default:
|
|
101904
|
+
args = Array.prototype.slice.call(arguments, 1);
|
|
101905
|
+
handler.apply(this, args);
|
|
101906
|
+
}
|
|
101907
|
+
} else if (isObject$1(handler)) {
|
|
101908
|
+
args = Array.prototype.slice.call(arguments, 1);
|
|
101909
|
+
listeners = handler.slice();
|
|
101910
|
+
len2 = listeners.length;
|
|
101911
|
+
for (i2 = 0; i2 < len2; i2++)
|
|
101912
|
+
listeners[i2].apply(this, args);
|
|
101962
101913
|
}
|
|
101963
101914
|
return true;
|
|
101964
101915
|
};
|
|
101965
|
-
function
|
|
101916
|
+
EventEmitter.prototype.addListener = function(type2, listener) {
|
|
101966
101917
|
var m;
|
|
101967
|
-
|
|
101968
|
-
|
|
101969
|
-
|
|
101970
|
-
|
|
101971
|
-
if (
|
|
101972
|
-
|
|
101973
|
-
|
|
101974
|
-
|
|
101975
|
-
|
|
101976
|
-
|
|
101977
|
-
|
|
101978
|
-
|
|
101979
|
-
|
|
101980
|
-
|
|
101981
|
-
|
|
101982
|
-
|
|
101983
|
-
|
|
101984
|
-
|
|
101985
|
-
|
|
101986
|
-
existing = events2[type2] = listener;
|
|
101987
|
-
++target._eventsCount;
|
|
101988
|
-
} else {
|
|
101989
|
-
if (typeof existing === "function") {
|
|
101990
|
-
existing = events2[type2] = prepend ? [listener, existing] : [existing, listener];
|
|
101991
|
-
} else if (prepend) {
|
|
101992
|
-
existing.unshift(listener);
|
|
101918
|
+
if (!isFunction(listener))
|
|
101919
|
+
throw TypeError("listener must be a function");
|
|
101920
|
+
if (!this._events)
|
|
101921
|
+
this._events = {};
|
|
101922
|
+
if (this._events.newListener)
|
|
101923
|
+
this.emit(
|
|
101924
|
+
"newListener",
|
|
101925
|
+
type2,
|
|
101926
|
+
isFunction(listener.listener) ? listener.listener : listener
|
|
101927
|
+
);
|
|
101928
|
+
if (!this._events[type2])
|
|
101929
|
+
this._events[type2] = listener;
|
|
101930
|
+
else if (isObject$1(this._events[type2]))
|
|
101931
|
+
this._events[type2].push(listener);
|
|
101932
|
+
else
|
|
101933
|
+
this._events[type2] = [this._events[type2], listener];
|
|
101934
|
+
if (isObject$1(this._events[type2]) && !this._events[type2].warned) {
|
|
101935
|
+
if (!isUndefined(this._maxListeners)) {
|
|
101936
|
+
m = this._maxListeners;
|
|
101993
101937
|
} else {
|
|
101994
|
-
|
|
101938
|
+
m = EventEmitter.defaultMaxListeners;
|
|
101995
101939
|
}
|
|
101996
|
-
m
|
|
101997
|
-
|
|
101998
|
-
|
|
101999
|
-
|
|
102000
|
-
|
|
102001
|
-
|
|
102002
|
-
|
|
102003
|
-
|
|
102004
|
-
|
|
101940
|
+
if (m && m > 0 && this._events[type2].length > m) {
|
|
101941
|
+
this._events[type2].warned = true;
|
|
101942
|
+
console.error(
|
|
101943
|
+
"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
|
|
101944
|
+
this._events[type2].length
|
|
101945
|
+
);
|
|
101946
|
+
if (typeof console.trace === "function") {
|
|
101947
|
+
console.trace();
|
|
101948
|
+
}
|
|
102005
101949
|
}
|
|
102006
101950
|
}
|
|
102007
|
-
return target;
|
|
102008
|
-
}
|
|
102009
|
-
EventEmitter.prototype.addListener = function addListener(type2, listener) {
|
|
102010
|
-
return _addListener(this, type2, listener, false);
|
|
102011
|
-
};
|
|
102012
|
-
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
102013
|
-
EventEmitter.prototype.prependListener = function prependListener(type2, listener) {
|
|
102014
|
-
return _addListener(this, type2, listener, true);
|
|
102015
|
-
};
|
|
102016
|
-
function onceWrapper() {
|
|
102017
|
-
if (!this.fired) {
|
|
102018
|
-
this.target.removeListener(this.type, this.wrapFn);
|
|
102019
|
-
this.fired = true;
|
|
102020
|
-
if (arguments.length === 0)
|
|
102021
|
-
return this.listener.call(this.target);
|
|
102022
|
-
return this.listener.apply(this.target, arguments);
|
|
102023
|
-
}
|
|
102024
|
-
}
|
|
102025
|
-
function _onceWrap(target, type2, listener) {
|
|
102026
|
-
var state = { fired: false, wrapFn: void 0, target, type: type2, listener };
|
|
102027
|
-
var wrapped = onceWrapper.bind(state);
|
|
102028
|
-
wrapped.listener = listener;
|
|
102029
|
-
state.wrapFn = wrapped;
|
|
102030
|
-
return wrapped;
|
|
102031
|
-
}
|
|
102032
|
-
EventEmitter.prototype.once = function once(type2, listener) {
|
|
102033
|
-
checkListener(listener);
|
|
102034
|
-
this.on(type2, _onceWrap(this, type2, listener));
|
|
102035
101951
|
return this;
|
|
102036
101952
|
};
|
|
102037
|
-
EventEmitter.prototype.
|
|
102038
|
-
|
|
102039
|
-
|
|
101953
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
101954
|
+
EventEmitter.prototype.once = function(type2, listener) {
|
|
101955
|
+
if (!isFunction(listener))
|
|
101956
|
+
throw TypeError("listener must be a function");
|
|
101957
|
+
var fired = false;
|
|
101958
|
+
function g2() {
|
|
101959
|
+
this.removeListener(type2, g2);
|
|
101960
|
+
if (!fired) {
|
|
101961
|
+
fired = true;
|
|
101962
|
+
listener.apply(this, arguments);
|
|
101963
|
+
}
|
|
101964
|
+
}
|
|
101965
|
+
g2.listener = listener;
|
|
101966
|
+
this.on(type2, g2);
|
|
102040
101967
|
return this;
|
|
102041
101968
|
};
|
|
102042
|
-
EventEmitter.prototype.removeListener = function
|
|
102043
|
-
var list,
|
|
102044
|
-
|
|
102045
|
-
|
|
102046
|
-
if (
|
|
102047
|
-
return this;
|
|
102048
|
-
list = events2[type2];
|
|
102049
|
-
if (list === void 0)
|
|
101969
|
+
EventEmitter.prototype.removeListener = function(type2, listener) {
|
|
101970
|
+
var list, position, length2, i2;
|
|
101971
|
+
if (!isFunction(listener))
|
|
101972
|
+
throw TypeError("listener must be a function");
|
|
101973
|
+
if (!this._events || !this._events[type2])
|
|
102050
101974
|
return this;
|
|
102051
|
-
|
|
102052
|
-
|
|
102053
|
-
|
|
102054
|
-
|
|
102055
|
-
|
|
102056
|
-
|
|
102057
|
-
|
|
102058
|
-
|
|
102059
|
-
|
|
102060
|
-
|
|
102061
|
-
for (i2 = list.length - 1; i2 >= 0; i2--) {
|
|
102062
|
-
if (list[i2] === listener || list[i2].listener === listener) {
|
|
102063
|
-
originalListener = list[i2].listener;
|
|
101975
|
+
list = this._events[type2];
|
|
101976
|
+
length2 = list.length;
|
|
101977
|
+
position = -1;
|
|
101978
|
+
if (list === listener || isFunction(list.listener) && list.listener === listener) {
|
|
101979
|
+
delete this._events[type2];
|
|
101980
|
+
if (this._events.removeListener)
|
|
101981
|
+
this.emit("removeListener", type2, listener);
|
|
101982
|
+
} else if (isObject$1(list)) {
|
|
101983
|
+
for (i2 = length2; i2-- > 0; ) {
|
|
101984
|
+
if (list[i2] === listener || list[i2].listener && list[i2].listener === listener) {
|
|
102064
101985
|
position = i2;
|
|
102065
101986
|
break;
|
|
102066
101987
|
}
|
|
102067
101988
|
}
|
|
102068
101989
|
if (position < 0)
|
|
102069
101990
|
return this;
|
|
102070
|
-
if (
|
|
102071
|
-
list.
|
|
102072
|
-
|
|
102073
|
-
|
|
101991
|
+
if (list.length === 1) {
|
|
101992
|
+
list.length = 0;
|
|
101993
|
+
delete this._events[type2];
|
|
101994
|
+
} else {
|
|
101995
|
+
list.splice(position, 1);
|
|
102074
101996
|
}
|
|
102075
|
-
if (
|
|
102076
|
-
|
|
102077
|
-
if (events2.removeListener !== void 0)
|
|
102078
|
-
this.emit("removeListener", type2, originalListener || listener);
|
|
101997
|
+
if (this._events.removeListener)
|
|
101998
|
+
this.emit("removeListener", type2, listener);
|
|
102079
101999
|
}
|
|
102080
102000
|
return this;
|
|
102081
102001
|
};
|
|
102082
|
-
EventEmitter.prototype.
|
|
102083
|
-
|
|
102084
|
-
|
|
102085
|
-
events2 = this._events;
|
|
102086
|
-
if (events2 === void 0)
|
|
102002
|
+
EventEmitter.prototype.removeAllListeners = function(type2) {
|
|
102003
|
+
var key, listeners;
|
|
102004
|
+
if (!this._events)
|
|
102087
102005
|
return this;
|
|
102088
|
-
if (
|
|
102089
|
-
if (arguments.length === 0)
|
|
102090
|
-
this._events =
|
|
102091
|
-
|
|
102092
|
-
|
|
102093
|
-
if (--this._eventsCount === 0)
|
|
102094
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
102095
|
-
else
|
|
102096
|
-
delete events2[type2];
|
|
102097
|
-
}
|
|
102006
|
+
if (!this._events.removeListener) {
|
|
102007
|
+
if (arguments.length === 0)
|
|
102008
|
+
this._events = {};
|
|
102009
|
+
else if (this._events[type2])
|
|
102010
|
+
delete this._events[type2];
|
|
102098
102011
|
return this;
|
|
102099
102012
|
}
|
|
102100
102013
|
if (arguments.length === 0) {
|
|
102101
|
-
|
|
102102
|
-
var key;
|
|
102103
|
-
for (i2 = 0; i2 < keys3.length; ++i2) {
|
|
102104
|
-
key = keys3[i2];
|
|
102014
|
+
for (key in this._events) {
|
|
102105
102015
|
if (key === "removeListener")
|
|
102106
102016
|
continue;
|
|
102107
102017
|
this.removeAllListeners(key);
|
|
102108
102018
|
}
|
|
102109
102019
|
this.removeAllListeners("removeListener");
|
|
102110
|
-
this._events =
|
|
102111
|
-
this._eventsCount = 0;
|
|
102020
|
+
this._events = {};
|
|
102112
102021
|
return this;
|
|
102113
102022
|
}
|
|
102114
|
-
|
|
102115
|
-
if (
|
|
102116
|
-
this.removeListener(type2,
|
|
102117
|
-
} else if (
|
|
102118
|
-
|
|
102119
|
-
this.removeListener(type2,
|
|
102120
|
-
}
|
|
102023
|
+
listeners = this._events[type2];
|
|
102024
|
+
if (isFunction(listeners)) {
|
|
102025
|
+
this.removeListener(type2, listeners);
|
|
102026
|
+
} else if (listeners) {
|
|
102027
|
+
while (listeners.length)
|
|
102028
|
+
this.removeListener(type2, listeners[listeners.length - 1]);
|
|
102121
102029
|
}
|
|
102030
|
+
delete this._events[type2];
|
|
102122
102031
|
return this;
|
|
102123
102032
|
};
|
|
102124
|
-
function
|
|
102125
|
-
var
|
|
102126
|
-
if (
|
|
102127
|
-
|
|
102128
|
-
|
|
102129
|
-
|
|
102130
|
-
|
|
102131
|
-
|
|
102132
|
-
|
|
102133
|
-
return unwrap2 ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
102134
|
-
}
|
|
102135
|
-
EventEmitter.prototype.listeners = function listeners(type2) {
|
|
102136
|
-
return _listeners(this, type2, true);
|
|
102137
|
-
};
|
|
102138
|
-
EventEmitter.prototype.rawListeners = function rawListeners(type2) {
|
|
102139
|
-
return _listeners(this, type2, false);
|
|
102140
|
-
};
|
|
102141
|
-
EventEmitter.listenerCount = function(emitter, type2) {
|
|
102142
|
-
if (typeof emitter.listenerCount === "function") {
|
|
102143
|
-
return emitter.listenerCount(type2);
|
|
102144
|
-
} else {
|
|
102145
|
-
return listenerCount.call(emitter, type2);
|
|
102146
|
-
}
|
|
102033
|
+
EventEmitter.prototype.listeners = function(type2) {
|
|
102034
|
+
var ret;
|
|
102035
|
+
if (!this._events || !this._events[type2])
|
|
102036
|
+
ret = [];
|
|
102037
|
+
else if (isFunction(this._events[type2]))
|
|
102038
|
+
ret = [this._events[type2]];
|
|
102039
|
+
else
|
|
102040
|
+
ret = this._events[type2].slice();
|
|
102041
|
+
return ret;
|
|
102147
102042
|
};
|
|
102148
|
-
EventEmitter.prototype.listenerCount =
|
|
102149
|
-
|
|
102150
|
-
|
|
102151
|
-
|
|
102152
|
-
var evlistener = events2[type2];
|
|
102153
|
-
if (typeof evlistener === "function") {
|
|
102043
|
+
EventEmitter.prototype.listenerCount = function(type2) {
|
|
102044
|
+
if (this._events) {
|
|
102045
|
+
var evlistener = this._events[type2];
|
|
102046
|
+
if (isFunction(evlistener))
|
|
102154
102047
|
return 1;
|
|
102155
|
-
|
|
102048
|
+
else if (evlistener)
|
|
102156
102049
|
return evlistener.length;
|
|
102157
|
-
}
|
|
102158
102050
|
}
|
|
102159
102051
|
return 0;
|
|
102160
|
-
}
|
|
102161
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
102162
|
-
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
102163
102052
|
};
|
|
102164
|
-
function
|
|
102165
|
-
|
|
102166
|
-
|
|
102167
|
-
|
|
102168
|
-
return
|
|
102169
|
-
}
|
|
102170
|
-
function spliceOne(list, index2) {
|
|
102171
|
-
for (; index2 + 1 < list.length; index2++)
|
|
102172
|
-
list[index2] = list[index2 + 1];
|
|
102173
|
-
list.pop();
|
|
102174
|
-
}
|
|
102175
|
-
function unwrapListeners(arr) {
|
|
102176
|
-
var ret = new Array(arr.length);
|
|
102177
|
-
for (var i2 = 0; i2 < ret.length; ++i2) {
|
|
102178
|
-
ret[i2] = arr[i2].listener || arr[i2];
|
|
102179
|
-
}
|
|
102180
|
-
return ret;
|
|
102053
|
+
EventEmitter.listenerCount = function(emitter, type2) {
|
|
102054
|
+
return emitter.listenerCount(type2);
|
|
102055
|
+
};
|
|
102056
|
+
function isFunction(arg) {
|
|
102057
|
+
return typeof arg === "function";
|
|
102181
102058
|
}
|
|
102182
|
-
function
|
|
102183
|
-
return
|
|
102184
|
-
function errorListener(err2) {
|
|
102185
|
-
emitter.removeListener(name2, resolver);
|
|
102186
|
-
reject(err2);
|
|
102187
|
-
}
|
|
102188
|
-
function resolver() {
|
|
102189
|
-
if (typeof emitter.removeListener === "function") {
|
|
102190
|
-
emitter.removeListener("error", errorListener);
|
|
102191
|
-
}
|
|
102192
|
-
resolve([].slice.call(arguments));
|
|
102193
|
-
}
|
|
102194
|
-
eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
|
|
102195
|
-
if (name2 !== "error") {
|
|
102196
|
-
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
102197
|
-
}
|
|
102198
|
-
});
|
|
102059
|
+
function isNumber(arg) {
|
|
102060
|
+
return typeof arg === "number";
|
|
102199
102061
|
}
|
|
102200
|
-
function
|
|
102201
|
-
|
|
102202
|
-
eventTargetAgnosticAddListener(emitter, "error", handler, flags3);
|
|
102203
|
-
}
|
|
102062
|
+
function isObject$1(arg) {
|
|
102063
|
+
return typeof arg === "object" && arg !== null;
|
|
102204
102064
|
}
|
|
102205
|
-
function
|
|
102206
|
-
|
|
102207
|
-
if (flags3.once) {
|
|
102208
|
-
emitter.once(name2, listener);
|
|
102209
|
-
} else {
|
|
102210
|
-
emitter.on(name2, listener);
|
|
102211
|
-
}
|
|
102212
|
-
} else if (typeof emitter.addEventListener === "function") {
|
|
102213
|
-
emitter.addEventListener(name2, function wrapListener(arg) {
|
|
102214
|
-
if (flags3.once) {
|
|
102215
|
-
emitter.removeEventListener(name2, wrapListener);
|
|
102216
|
-
}
|
|
102217
|
-
listener(arg);
|
|
102218
|
-
});
|
|
102219
|
-
} else {
|
|
102220
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
102221
|
-
}
|
|
102065
|
+
function isUndefined(arg) {
|
|
102066
|
+
return arg === void 0;
|
|
102222
102067
|
}
|
|
102223
|
-
var eventsExports = events.exports;
|
|
102224
102068
|
var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
|
|
102225
102069
|
var rnds8 = new Uint8Array(16);
|
|
102226
102070
|
function rng() {
|
|
@@ -102586,7 +102430,7 @@ const require$$1$3 = /* @__PURE__ */ getAugmentedNamespace(esmBrowser);
|
|
|
102586
102430
|
value: true
|
|
102587
102431
|
});
|
|
102588
102432
|
exports2["default"] = void 0;
|
|
102589
|
-
var _events = _interopRequireDefault2(
|
|
102433
|
+
var _events = _interopRequireDefault2(events);
|
|
102590
102434
|
var _uuid = _interopRequireDefault2(require$$1$3);
|
|
102591
102435
|
function _interopRequireDefault2(obj) {
|
|
102592
102436
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
@@ -103070,7 +102914,7 @@ function rhumbDistance$2(from, to, options) {
|
|
|
103070
102914
|
}
|
|
103071
102915
|
function calculateRhumbDistance(origin, destination2, radius) {
|
|
103072
102916
|
radius = radius === void 0 ? helpers_1$9.earthRadius : Number(radius);
|
|
103073
|
-
var
|
|
102917
|
+
var R = radius;
|
|
103074
102918
|
var phi12 = origin[1] * Math.PI / 180;
|
|
103075
102919
|
var phi2 = destination2[1] * Math.PI / 180;
|
|
103076
102920
|
var DeltaPhi = phi2 - phi12;
|
|
@@ -103081,7 +102925,7 @@ function calculateRhumbDistance(origin, destination2, radius) {
|
|
|
103081
102925
|
var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi12 / 2 + Math.PI / 4));
|
|
103082
102926
|
var q = Math.abs(DeltaPsi) > 1e-11 ? DeltaPhi / DeltaPsi : Math.cos(phi12);
|
|
103083
102927
|
var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda);
|
|
103084
|
-
var dist = delta *
|
|
102928
|
+
var dist = delta * R;
|
|
103085
102929
|
return dist;
|
|
103086
102930
|
}
|
|
103087
102931
|
js$e.default = rhumbDistance$2;
|
|
@@ -117590,7 +117434,7 @@ var document_1 = doccy;
|
|
|
117590
117434
|
value: true
|
|
117591
117435
|
});
|
|
117592
117436
|
exports2["default"] = void 0;
|
|
117593
|
-
var _events =
|
|
117437
|
+
var _events = events;
|
|
117594
117438
|
var _document = _interopRequireDefault2(document_1);
|
|
117595
117439
|
var _core = require$$2$2;
|
|
117596
117440
|
var _deckDrawer = _interopRequireDefault2(deckDrawer);
|
|
@@ -119511,16 +119355,16 @@ function addDecoder(cases, importFn) {
|
|
|
119511
119355
|
}
|
|
119512
119356
|
cases.forEach((c) => registry$2.set(c, importFn));
|
|
119513
119357
|
}
|
|
119514
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
119515
|
-
addDecoder(5, () => import("./lzw-
|
|
119358
|
+
addDecoder([void 0, 1], () => import("./raw-ee86fdce.js").then((m) => m.default));
|
|
119359
|
+
addDecoder(5, () => import("./lzw-3c031ccf.js").then((m) => m.default));
|
|
119516
119360
|
addDecoder(6, () => {
|
|
119517
119361
|
throw new Error("old style JPEG compression is not supported.");
|
|
119518
119362
|
});
|
|
119519
|
-
addDecoder(7, () => import("./jpeg-
|
|
119520
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
119521
|
-
addDecoder(32773, () => import("./packbits-
|
|
119522
|
-
addDecoder(34887, () => import("./lerc-
|
|
119523
|
-
addDecoder(50001, () => import("./webimage-
|
|
119363
|
+
addDecoder(7, () => import("./jpeg-8fc6d0e2.js").then((m) => m.default));
|
|
119364
|
+
addDecoder([8, 32946], () => import("./deflate-a18aa092.js").then((m) => m.default));
|
|
119365
|
+
addDecoder(32773, () => import("./packbits-184fd0f9.js").then((m) => m.default));
|
|
119366
|
+
addDecoder(34887, () => import("./lerc-bbd3647a.js").then((m) => m.default));
|
|
119367
|
+
addDecoder(50001, () => import("./webimage-b6c0ac98.js").then((m) => m.default));
|
|
119524
119368
|
function decodeRowAcc(row, stride) {
|
|
119525
119369
|
let length2 = row.length - stride;
|
|
119526
119370
|
let offset = 0;
|
|
@@ -123347,16 +123191,16 @@ createCommonjsModule(function(module2) {
|
|
|
123347
123191
|
if (!new Events().__proto__)
|
|
123348
123192
|
prefix = false;
|
|
123349
123193
|
}
|
|
123350
|
-
function EE(fn, context,
|
|
123194
|
+
function EE(fn, context, once) {
|
|
123351
123195
|
this.fn = fn;
|
|
123352
123196
|
this.context = context;
|
|
123353
|
-
this.once =
|
|
123197
|
+
this.once = once || false;
|
|
123354
123198
|
}
|
|
123355
|
-
function
|
|
123199
|
+
function addListener(emitter, event, fn, context, once) {
|
|
123356
123200
|
if (typeof fn !== "function") {
|
|
123357
123201
|
throw new TypeError("The listener must be a function");
|
|
123358
123202
|
}
|
|
123359
|
-
var listener = new EE(fn, context || emitter,
|
|
123203
|
+
var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
|
|
123360
123204
|
if (!emitter._events[evt])
|
|
123361
123205
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
123362
123206
|
else if (!emitter._events[evt].fn)
|
|
@@ -123375,7 +123219,7 @@ createCommonjsModule(function(module2) {
|
|
|
123375
123219
|
this._events = new Events();
|
|
123376
123220
|
this._eventsCount = 0;
|
|
123377
123221
|
}
|
|
123378
|
-
EventEmitter2.prototype.eventNames = function
|
|
123222
|
+
EventEmitter2.prototype.eventNames = function eventNames() {
|
|
123379
123223
|
var names = [], events2, name2;
|
|
123380
123224
|
if (this._eventsCount === 0)
|
|
123381
123225
|
return names;
|
|
@@ -123388,7 +123232,7 @@ createCommonjsModule(function(module2) {
|
|
|
123388
123232
|
}
|
|
123389
123233
|
return names;
|
|
123390
123234
|
};
|
|
123391
|
-
EventEmitter2.prototype.listeners = function
|
|
123235
|
+
EventEmitter2.prototype.listeners = function listeners(event) {
|
|
123392
123236
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
123393
123237
|
if (!handlers)
|
|
123394
123238
|
return [];
|
|
@@ -123399,76 +123243,76 @@ createCommonjsModule(function(module2) {
|
|
|
123399
123243
|
}
|
|
123400
123244
|
return ee;
|
|
123401
123245
|
};
|
|
123402
|
-
EventEmitter2.prototype.listenerCount = function
|
|
123403
|
-
var evt = prefix ? prefix + event : event,
|
|
123404
|
-
if (!
|
|
123246
|
+
EventEmitter2.prototype.listenerCount = function listenerCount(event) {
|
|
123247
|
+
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
123248
|
+
if (!listeners)
|
|
123405
123249
|
return 0;
|
|
123406
|
-
if (
|
|
123250
|
+
if (listeners.fn)
|
|
123407
123251
|
return 1;
|
|
123408
|
-
return
|
|
123252
|
+
return listeners.length;
|
|
123409
123253
|
};
|
|
123410
|
-
EventEmitter2.prototype.emit = function
|
|
123254
|
+
EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
123411
123255
|
var evt = prefix ? prefix + event : event;
|
|
123412
123256
|
if (!this._events[evt])
|
|
123413
123257
|
return false;
|
|
123414
|
-
var
|
|
123415
|
-
if (
|
|
123416
|
-
if (
|
|
123417
|
-
this.removeListener(event,
|
|
123258
|
+
var listeners = this._events[evt], len2 = arguments.length, args, i2;
|
|
123259
|
+
if (listeners.fn) {
|
|
123260
|
+
if (listeners.once)
|
|
123261
|
+
this.removeListener(event, listeners.fn, void 0, true);
|
|
123418
123262
|
switch (len2) {
|
|
123419
123263
|
case 1:
|
|
123420
|
-
return
|
|
123264
|
+
return listeners.fn.call(listeners.context), true;
|
|
123421
123265
|
case 2:
|
|
123422
|
-
return
|
|
123266
|
+
return listeners.fn.call(listeners.context, a1), true;
|
|
123423
123267
|
case 3:
|
|
123424
|
-
return
|
|
123268
|
+
return listeners.fn.call(listeners.context, a1, a2), true;
|
|
123425
123269
|
case 4:
|
|
123426
|
-
return
|
|
123270
|
+
return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
|
123427
123271
|
case 5:
|
|
123428
|
-
return
|
|
123272
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
|
123429
123273
|
case 6:
|
|
123430
|
-
return
|
|
123274
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
|
123431
123275
|
}
|
|
123432
123276
|
for (i2 = 1, args = new Array(len2 - 1); i2 < len2; i2++) {
|
|
123433
123277
|
args[i2 - 1] = arguments[i2];
|
|
123434
123278
|
}
|
|
123435
|
-
|
|
123279
|
+
listeners.fn.apply(listeners.context, args);
|
|
123436
123280
|
} else {
|
|
123437
|
-
var length2 =
|
|
123281
|
+
var length2 = listeners.length, j;
|
|
123438
123282
|
for (i2 = 0; i2 < length2; i2++) {
|
|
123439
|
-
if (
|
|
123440
|
-
this.removeListener(event,
|
|
123283
|
+
if (listeners[i2].once)
|
|
123284
|
+
this.removeListener(event, listeners[i2].fn, void 0, true);
|
|
123441
123285
|
switch (len2) {
|
|
123442
123286
|
case 1:
|
|
123443
|
-
|
|
123287
|
+
listeners[i2].fn.call(listeners[i2].context);
|
|
123444
123288
|
break;
|
|
123445
123289
|
case 2:
|
|
123446
|
-
|
|
123290
|
+
listeners[i2].fn.call(listeners[i2].context, a1);
|
|
123447
123291
|
break;
|
|
123448
123292
|
case 3:
|
|
123449
|
-
|
|
123293
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2);
|
|
123450
123294
|
break;
|
|
123451
123295
|
case 4:
|
|
123452
|
-
|
|
123296
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2, a3);
|
|
123453
123297
|
break;
|
|
123454
123298
|
default:
|
|
123455
123299
|
if (!args)
|
|
123456
123300
|
for (j = 1, args = new Array(len2 - 1); j < len2; j++) {
|
|
123457
123301
|
args[j - 1] = arguments[j];
|
|
123458
123302
|
}
|
|
123459
|
-
|
|
123303
|
+
listeners[i2].fn.apply(listeners[i2].context, args);
|
|
123460
123304
|
}
|
|
123461
123305
|
}
|
|
123462
123306
|
}
|
|
123463
123307
|
return true;
|
|
123464
123308
|
};
|
|
123465
123309
|
EventEmitter2.prototype.on = function on(event, fn, context) {
|
|
123466
|
-
return
|
|
123310
|
+
return addListener(this, event, fn, context, false);
|
|
123467
123311
|
};
|
|
123468
|
-
EventEmitter2.prototype.once = function
|
|
123469
|
-
return
|
|
123312
|
+
EventEmitter2.prototype.once = function once(event, fn, context) {
|
|
123313
|
+
return addListener(this, event, fn, context, true);
|
|
123470
123314
|
};
|
|
123471
|
-
EventEmitter2.prototype.removeListener = function
|
|
123315
|
+
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
123472
123316
|
var evt = prefix ? prefix + event : event;
|
|
123473
123317
|
if (!this._events[evt])
|
|
123474
123318
|
return this;
|
|
@@ -123476,15 +123320,15 @@ createCommonjsModule(function(module2) {
|
|
|
123476
123320
|
clearEvent(this, evt);
|
|
123477
123321
|
return this;
|
|
123478
123322
|
}
|
|
123479
|
-
var
|
|
123480
|
-
if (
|
|
123481
|
-
if (
|
|
123323
|
+
var listeners = this._events[evt];
|
|
123324
|
+
if (listeners.fn) {
|
|
123325
|
+
if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
|
|
123482
123326
|
clearEvent(this, evt);
|
|
123483
123327
|
}
|
|
123484
123328
|
} else {
|
|
123485
|
-
for (var i2 = 0, events2 = [], length2 =
|
|
123486
|
-
if (
|
|
123487
|
-
events2.push(
|
|
123329
|
+
for (var i2 = 0, events2 = [], length2 = listeners.length; i2 < length2; i2++) {
|
|
123330
|
+
if (listeners[i2].fn !== fn || once && !listeners[i2].once || context && listeners[i2].context !== context) {
|
|
123331
|
+
events2.push(listeners[i2]);
|
|
123488
123332
|
}
|
|
123489
123333
|
}
|
|
123490
123334
|
if (events2.length)
|
|
@@ -123494,7 +123338,7 @@ createCommonjsModule(function(module2) {
|
|
|
123494
123338
|
}
|
|
123495
123339
|
return this;
|
|
123496
123340
|
};
|
|
123497
|
-
EventEmitter2.prototype.removeAllListeners = function
|
|
123341
|
+
EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
123498
123342
|
var evt;
|
|
123499
123343
|
if (event) {
|
|
123500
123344
|
evt = prefix ? prefix + event : event;
|
|
@@ -127977,7 +127821,7 @@ var blosc_codec = function() {
|
|
|
127977
127821
|
b += Ga[z[a2++]];
|
|
127978
127822
|
return b;
|
|
127979
127823
|
}
|
|
127980
|
-
var Q2 = {},
|
|
127824
|
+
var Q2 = {}, R = {}, S = {};
|
|
127981
127825
|
function Ha(a2) {
|
|
127982
127826
|
if (void 0 === a2)
|
|
127983
127827
|
return "_unknown";
|
|
@@ -128022,8 +127866,8 @@ var blosc_codec = function() {
|
|
|
128022
127866
|
});
|
|
128023
127867
|
var e2 = Array(a2.length), g2 = [], k = 0;
|
|
128024
127868
|
a2.forEach(function(h, l2) {
|
|
128025
|
-
|
|
128026
|
-
e2[l2] =
|
|
127869
|
+
R.hasOwnProperty(h) ? e2[l2] = R[h] : (g2.push(h), Q2.hasOwnProperty(h) || (Q2[h] = []), Q2[h].push(function() {
|
|
127870
|
+
e2[l2] = R[h];
|
|
128027
127871
|
++k;
|
|
128028
127872
|
k === g2.length && c(e2);
|
|
128029
127873
|
}));
|
|
@@ -128036,12 +127880,12 @@ var blosc_codec = function() {
|
|
|
128036
127880
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
128037
127881
|
var d = b.name;
|
|
128038
127882
|
a2 || T('type "' + d + '" must have a positive integer typeid pointer');
|
|
128039
|
-
if (
|
|
127883
|
+
if (R.hasOwnProperty(a2)) {
|
|
128040
127884
|
if (c.U)
|
|
128041
127885
|
return;
|
|
128042
127886
|
T("Cannot register type '" + d + "' twice");
|
|
128043
127887
|
}
|
|
128044
|
-
|
|
127888
|
+
R[a2] = b;
|
|
128045
127889
|
delete S[a2];
|
|
128046
127890
|
Q2.hasOwnProperty(a2) && (b = Q2[a2], delete Q2[a2], b.forEach(function(e2) {
|
|
128047
127891
|
e2();
|
|
@@ -128154,7 +127998,7 @@ var blosc_codec = function() {
|
|
|
128154
127998
|
}
|
|
128155
127999
|
function eb(a2, b) {
|
|
128156
128000
|
function c(g2) {
|
|
128157
|
-
e2[g2] ||
|
|
128001
|
+
e2[g2] || R[g2] || (S[g2] ? S[g2].forEach(c) : (d.push(g2), e2[g2] = true));
|
|
128158
128002
|
}
|
|
128159
128003
|
var d = [], e2 = {};
|
|
128160
128004
|
b.forEach(c);
|
|
@@ -128442,7 +128286,7 @@ var blosc_codec = function() {
|
|
|
128442
128286
|
}, n: Qa, x: function(a2) {
|
|
128443
128287
|
4 < a2 && (V[a2].P += 1);
|
|
128444
128288
|
}, C: function(a2, b) {
|
|
128445
|
-
var c =
|
|
128289
|
+
var c = R[a2];
|
|
128446
128290
|
void 0 === c && T("_emval_take_value has unknown type " + cb(a2));
|
|
128447
128291
|
a2 = c.readValueFromPointer(b);
|
|
128448
128292
|
return Ra(a2);
|
|
@@ -134291,11 +134135,9 @@ class BoolArray {
|
|
|
134291
134135
|
get byteLength() {
|
|
134292
134136
|
return __privateGet(this, _bytes).byteLength;
|
|
134293
134137
|
}
|
|
134294
|
-
/** @type {ArrayBuffer} */
|
|
134295
134138
|
get buffer() {
|
|
134296
134139
|
return __privateGet(this, _bytes).buffer;
|
|
134297
134140
|
}
|
|
134298
|
-
/** @type {number} */
|
|
134299
134141
|
get length() {
|
|
134300
134142
|
return __privateGet(this, _bytes).length;
|
|
134301
134143
|
}
|
|
@@ -134346,11 +134188,9 @@ class ByteStringArray {
|
|
|
134346
134188
|
get byteLength() {
|
|
134347
134189
|
return this._data.byteLength;
|
|
134348
134190
|
}
|
|
134349
|
-
/** @type {ArrayBuffer} */
|
|
134350
134191
|
get buffer() {
|
|
134351
134192
|
return this._data.buffer;
|
|
134352
134193
|
}
|
|
134353
|
-
/** @type {number} */
|
|
134354
134194
|
get length() {
|
|
134355
134195
|
return this.byteLength / this.BYTES_PER_ELEMENT;
|
|
134356
134196
|
}
|
|
@@ -134407,11 +134247,9 @@ const _UnicodeStringArray = class {
|
|
|
134407
134247
|
get byteOffset() {
|
|
134408
134248
|
return __privateGet(this, _data).byteOffset;
|
|
134409
134249
|
}
|
|
134410
|
-
/** @type {ArrayBuffer} */
|
|
134411
134250
|
get buffer() {
|
|
134412
134251
|
return __privateGet(this, _data).buffer;
|
|
134413
134252
|
}
|
|
134414
|
-
/** @type {number} */
|
|
134415
134253
|
get length() {
|
|
134416
134254
|
return __privateGet(this, _data).length / this.chars;
|
|
134417
134255
|
}
|
|
@@ -134462,53 +134300,43 @@ function byteswap_inplace(view, bytes_per_element2) {
|
|
|
134462
134300
|
}
|
|
134463
134301
|
}
|
|
134464
134302
|
}
|
|
134465
|
-
const CONSTRUCTORS = {
|
|
134466
|
-
int8: Int8Array,
|
|
134467
|
-
int16: Int16Array,
|
|
134468
|
-
int32: Int32Array,
|
|
134469
|
-
int64: globalThis.BigInt64Array,
|
|
134470
|
-
uint8: Uint8Array,
|
|
134471
|
-
uint16: Uint16Array,
|
|
134472
|
-
uint32: Uint32Array,
|
|
134473
|
-
uint64: globalThis.BigUint64Array,
|
|
134474
|
-
float32: Float32Array,
|
|
134475
|
-
float64: Float64Array,
|
|
134476
|
-
bool: BoolArray
|
|
134477
|
-
};
|
|
134478
|
-
const V2_STRING_REGEX = /v2:([US])(\d+)/;
|
|
134479
134303
|
function get_ctr(data_type) {
|
|
134480
134304
|
if (data_type === "v2:object") {
|
|
134481
134305
|
return globalThis.Array;
|
|
134482
134306
|
}
|
|
134483
|
-
let match = data_type.match(
|
|
134307
|
+
let match = data_type.match(/v2:([US])(\d+)/);
|
|
134484
134308
|
if (match) {
|
|
134485
134309
|
let [, kind, chars] = match;
|
|
134486
134310
|
return (kind === "U" ? UnicodeStringArray : ByteStringArray).bind(null, Number(chars));
|
|
134487
134311
|
}
|
|
134488
|
-
let ctr =
|
|
134489
|
-
|
|
134490
|
-
|
|
134491
|
-
|
|
134312
|
+
let ctr = {
|
|
134313
|
+
int8: Int8Array,
|
|
134314
|
+
int16: Int16Array,
|
|
134315
|
+
int32: Int32Array,
|
|
134316
|
+
int64: globalThis.BigInt64Array,
|
|
134317
|
+
uint8: Uint8Array,
|
|
134318
|
+
uint16: Uint16Array,
|
|
134319
|
+
uint32: Uint32Array,
|
|
134320
|
+
uint64: globalThis.BigUint64Array,
|
|
134321
|
+
float16: globalThis.Float16Array,
|
|
134322
|
+
float32: Float32Array,
|
|
134323
|
+
float64: Float64Array,
|
|
134324
|
+
bool: BoolArray
|
|
134325
|
+
}[data_type];
|
|
134326
|
+
assert$1(ctr, `Unknown or unsupported data_type: ${data_type}`);
|
|
134492
134327
|
return ctr;
|
|
134493
134328
|
}
|
|
134494
134329
|
function get_strides(shape, order) {
|
|
134495
|
-
|
|
134496
|
-
|
|
134497
|
-
|
|
134498
|
-
const ndim = shape.length;
|
|
134499
|
-
const stride = globalThis.Array(ndim);
|
|
134500
|
-
for (let i2 = ndim - 1, step = 1; i2 >= 0; i2--) {
|
|
134501
|
-
stride[i2] = step;
|
|
134502
|
-
step *= shape[i2];
|
|
134330
|
+
const rank2 = shape.length;
|
|
134331
|
+
if (typeof order === "string") {
|
|
134332
|
+
order = order === "C" ? Array.from({ length: rank2 }, (_, i2) => i2) : Array.from({ length: rank2 }, (_, i2) => rank2 - 1 - i2);
|
|
134503
134333
|
}
|
|
134504
|
-
|
|
134505
|
-
|
|
134506
|
-
|
|
134507
|
-
|
|
134508
|
-
|
|
134509
|
-
|
|
134510
|
-
stride[i2] = step;
|
|
134511
|
-
step *= shape[i2];
|
|
134334
|
+
assert$1(rank2 === order.length, "Order length must match the number of dimensions.");
|
|
134335
|
+
let step = 1;
|
|
134336
|
+
let stride = new Array(rank2);
|
|
134337
|
+
for (let i2 = order.length - 1; i2 >= 0; i2--) {
|
|
134338
|
+
stride[order[i2]] = step;
|
|
134339
|
+
step *= shape[order[i2]];
|
|
134512
134340
|
}
|
|
134513
134341
|
return stride;
|
|
134514
134342
|
}
|
|
@@ -134523,20 +134351,12 @@ function create_chunk_key_encoder({ name: name2, configuration }) {
|
|
|
134523
134351
|
}
|
|
134524
134352
|
throw new Error(`Unknown chunk key encoding: ${name2}`);
|
|
134525
134353
|
}
|
|
134526
|
-
function get_array_order(codecs) {
|
|
134527
|
-
var _a3;
|
|
134528
|
-
const maybe_transpose_codec = codecs.find((c) => c.name === "transpose");
|
|
134529
|
-
return ((_a3 = maybe_transpose_codec == null ? void 0 : maybe_transpose_codec.configuration) == null ? void 0 : _a3.order) === "F" ? "F" : "C";
|
|
134530
|
-
}
|
|
134531
|
-
const endian_regex = /^([<|>])(.*)$/;
|
|
134532
134354
|
function coerce_dtype(dtype) {
|
|
134533
134355
|
if (dtype === "|O") {
|
|
134534
134356
|
return { data_type: "v2:object" };
|
|
134535
134357
|
}
|
|
134536
|
-
let match = dtype.match(
|
|
134537
|
-
|
|
134538
|
-
throw new Error(`Invalid dtype: ${dtype}`);
|
|
134539
|
-
}
|
|
134358
|
+
let match = dtype.match(/^([<|>])(.*)$/);
|
|
134359
|
+
assert$1(match, `Invalid dtype: ${dtype}`);
|
|
134540
134360
|
let [, endian, rest] = match;
|
|
134541
134361
|
let data_type = {
|
|
134542
134362
|
b1: "bool",
|
|
@@ -134548,12 +134368,11 @@ function coerce_dtype(dtype) {
|
|
|
134548
134368
|
u4: "uint32",
|
|
134549
134369
|
i8: "int64",
|
|
134550
134370
|
u8: "uint64",
|
|
134371
|
+
f2: "float16",
|
|
134551
134372
|
f4: "float32",
|
|
134552
134373
|
f8: "float64"
|
|
134553
134374
|
}[rest] ?? (rest.startsWith("S") || rest.startsWith("U") ? `v2:${rest}` : void 0);
|
|
134554
|
-
|
|
134555
|
-
throw new Error(`Unsupported or unknown dtype: ${dtype}`);
|
|
134556
|
-
}
|
|
134375
|
+
assert$1(data_type, `Unsupported or unknown dtype: ${dtype}`);
|
|
134557
134376
|
if (endian === "|") {
|
|
134558
134377
|
return { data_type };
|
|
134559
134378
|
}
|
|
@@ -134631,6 +134450,40 @@ function ensure_correct_scalar(metadata) {
|
|
|
134631
134450
|
}
|
|
134632
134451
|
return metadata.fill_value;
|
|
134633
134452
|
}
|
|
134453
|
+
function rethrow_unless(error2, ...errors) {
|
|
134454
|
+
if (!errors.some((ErrorClass) => error2 instanceof ErrorClass)) {
|
|
134455
|
+
throw error2;
|
|
134456
|
+
}
|
|
134457
|
+
}
|
|
134458
|
+
function assert$1(expression, msg = "") {
|
|
134459
|
+
if (!expression) {
|
|
134460
|
+
throw new Error(msg);
|
|
134461
|
+
}
|
|
134462
|
+
}
|
|
134463
|
+
class BitroundCodec {
|
|
134464
|
+
constructor(configuration, _meta2) {
|
|
134465
|
+
__publicField(this, "kind", "array_to_array");
|
|
134466
|
+
assert$1(configuration.keepbits >= 0, "keepbits must be zero or positive");
|
|
134467
|
+
}
|
|
134468
|
+
static fromConfig(configuration, meta2) {
|
|
134469
|
+
return new BitroundCodec(configuration, meta2);
|
|
134470
|
+
}
|
|
134471
|
+
/**
|
|
134472
|
+
* Encode a chunk of data with bit-rounding.
|
|
134473
|
+
* @param _arr - The chunk to encode
|
|
134474
|
+
*/
|
|
134475
|
+
encode(_arr) {
|
|
134476
|
+
throw new Error("`BitroundCodec.encode` is not implemented. Please open an issue at https://github.com/manzt/zarrita.js/issues.");
|
|
134477
|
+
}
|
|
134478
|
+
/**
|
|
134479
|
+
* Decode a chunk of data (no-op).
|
|
134480
|
+
* @param arr - The chunk to decode
|
|
134481
|
+
* @returns The decoded chunk
|
|
134482
|
+
*/
|
|
134483
|
+
decode(arr) {
|
|
134484
|
+
return arr;
|
|
134485
|
+
}
|
|
134486
|
+
}
|
|
134634
134487
|
const LITTLE_ENDIAN_OS = system_is_little_endian();
|
|
134635
134488
|
function system_is_little_endian() {
|
|
134636
134489
|
const a2 = new Uint32Array([305419896]);
|
|
@@ -134646,7 +134499,7 @@ function bytes_per_element(TypedArray2) {
|
|
|
134646
134499
|
const _BytesCodec = class {
|
|
134647
134500
|
constructor(configuration, meta2) {
|
|
134648
134501
|
__publicField(this, "kind", "array_to_bytes");
|
|
134649
|
-
__privateAdd(this,
|
|
134502
|
+
__privateAdd(this, _stride, void 0);
|
|
134650
134503
|
__privateAdd(this, _TypedArray, void 0);
|
|
134651
134504
|
__privateAdd(this, _BYTES_PER_ELEMENT, void 0);
|
|
134652
134505
|
__privateAdd(this, _shape, void 0);
|
|
@@ -134654,7 +134507,7 @@ const _BytesCodec = class {
|
|
|
134654
134507
|
__privateSet(this, _endian, configuration == null ? void 0 : configuration.endian);
|
|
134655
134508
|
__privateSet(this, _TypedArray, get_ctr(meta2.data_type));
|
|
134656
134509
|
__privateSet(this, _shape, meta2.shape);
|
|
134657
|
-
__privateSet(this,
|
|
134510
|
+
__privateSet(this, _stride, get_strides(meta2.shape, "C"));
|
|
134658
134511
|
const sample = new (__privateGet(this, _TypedArray))(0);
|
|
134659
134512
|
__privateSet(this, _BYTES_PER_ELEMENT, sample.BYTES_PER_ELEMENT);
|
|
134660
134513
|
}
|
|
@@ -134675,12 +134528,12 @@ const _BytesCodec = class {
|
|
|
134675
134528
|
return {
|
|
134676
134529
|
data: new (__privateGet(this, _TypedArray))(bytes.buffer, bytes.byteOffset, bytes.byteLength / __privateGet(this, _BYTES_PER_ELEMENT)),
|
|
134677
134530
|
shape: __privateGet(this, _shape),
|
|
134678
|
-
stride: __privateGet(this,
|
|
134531
|
+
stride: __privateGet(this, _stride)
|
|
134679
134532
|
};
|
|
134680
134533
|
}
|
|
134681
134534
|
};
|
|
134682
134535
|
let BytesCodec = _BytesCodec;
|
|
134683
|
-
|
|
134536
|
+
_stride = new WeakMap();
|
|
134684
134537
|
_TypedArray = new WeakMap();
|
|
134685
134538
|
_BYTES_PER_ELEMENT = new WeakMap();
|
|
134686
134539
|
_shape = new WeakMap();
|
|
@@ -134700,15 +134553,9 @@ class Crc32cCodec {
|
|
|
134700
134553
|
}
|
|
134701
134554
|
}
|
|
134702
134555
|
function throw_on_nan_replacer(_key, value) {
|
|
134703
|
-
|
|
134704
|
-
|
|
134705
|
-
|
|
134706
|
-
if (value === Number.POSITIVE_INFINITY) {
|
|
134707
|
-
throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
|
|
134708
|
-
}
|
|
134709
|
-
if (value === Number.NEGATIVE_INFINITY) {
|
|
134710
|
-
throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
|
|
134711
|
-
}
|
|
134556
|
+
assert$1(!Number.isNaN(value), "JsonCodec allow_nan is false but NaN was encountered during encoding.");
|
|
134557
|
+
assert$1(value !== Number.POSITIVE_INFINITY, "JsonCodec allow_nan is false but Infinity was encountered during encoding.");
|
|
134558
|
+
assert$1(value !== Number.NEGATIVE_INFINITY, "JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
|
|
134712
134559
|
return value;
|
|
134713
134560
|
}
|
|
134714
134561
|
function sort_keys_replacer(_key, value) {
|
|
@@ -134750,13 +134597,9 @@ const _JsonCodec = class {
|
|
|
134750
134597
|
}
|
|
134751
134598
|
encode(buf) {
|
|
134752
134599
|
const { indent, encoding, ensure_ascii, check_circular, allow_nan, sort_keys } = __privateGet(this, _encoder_config);
|
|
134753
|
-
|
|
134754
|
-
throw new Error("JsonCodec does not yet support non-utf-8 encoding.");
|
|
134755
|
-
}
|
|
134600
|
+
assert$1(encoding === "utf-8", "JsonCodec does not yet support non-utf-8 encoding.");
|
|
134756
134601
|
const replacer_functions = [];
|
|
134757
|
-
|
|
134758
|
-
throw new Error("JsonCodec does not yet support skipping the check for circular references during encoding.");
|
|
134759
|
-
}
|
|
134602
|
+
assert$1(check_circular, "JsonCodec does not yet support skipping the check for circular references during encoding.");
|
|
134760
134603
|
if (!allow_nan) {
|
|
134761
134604
|
replacer_functions.push(throw_on_nan_replacer);
|
|
134762
134605
|
}
|
|
@@ -134788,15 +134631,11 @@ const _JsonCodec = class {
|
|
|
134788
134631
|
}
|
|
134789
134632
|
decode(bytes) {
|
|
134790
134633
|
const { strict } = __privateGet(this, _decoder_config);
|
|
134791
|
-
|
|
134792
|
-
throw new Error("JsonCodec does not yet support non-strict decoding.");
|
|
134793
|
-
}
|
|
134634
|
+
assert$1(strict, "JsonCodec does not yet support non-strict decoding.");
|
|
134794
134635
|
const items = json_decode_object(bytes);
|
|
134795
134636
|
const shape = items.pop();
|
|
134796
134637
|
items.pop();
|
|
134797
|
-
|
|
134798
|
-
throw new Error("0D not implemented for JsonCodec.");
|
|
134799
|
-
}
|
|
134638
|
+
assert$1(shape, "0D not implemented for JsonCodec.");
|
|
134800
134639
|
const stride = get_strides(shape, "C");
|
|
134801
134640
|
const data = items;
|
|
134802
134641
|
return { data, shape, stride };
|
|
@@ -134863,39 +134702,72 @@ function convert_array_order(src, target) {
|
|
|
134863
134702
|
}
|
|
134864
134703
|
return out;
|
|
134865
134704
|
}
|
|
134866
|
-
function get_order(
|
|
134867
|
-
|
|
134868
|
-
|
|
134869
|
-
|
|
134870
|
-
return arr.stride.every((s2, i2) => s2 === row_major_strides[i2]) ? "C" : "F";
|
|
134705
|
+
function get_order(chunk) {
|
|
134706
|
+
let rank2 = chunk.shape.length;
|
|
134707
|
+
assert$1(rank2 === chunk.stride.length, "Shape and stride must have the same length.");
|
|
134708
|
+
return chunk.stride.map((s2, i2) => ({ stride: s2, index: i2 })).sort((a2, b) => b.stride - a2.stride).map((entry) => entry.index);
|
|
134871
134709
|
}
|
|
134872
|
-
|
|
134873
|
-
|
|
134874
|
-
|
|
134710
|
+
function matches_order(chunk, target) {
|
|
134711
|
+
let source = get_order(chunk);
|
|
134712
|
+
assert$1(source.length === target.length, "Orders must match");
|
|
134713
|
+
return source.every((dim, i2) => dim === target[i2]);
|
|
134714
|
+
}
|
|
134715
|
+
const _TransposeCodec = class {
|
|
134716
|
+
constructor(configuration, meta2) {
|
|
134875
134717
|
__publicField(this, "kind", "array_to_array");
|
|
134876
|
-
this
|
|
134718
|
+
__privateAdd(this, _order, void 0);
|
|
134719
|
+
__privateAdd(this, _inverseOrder, void 0);
|
|
134720
|
+
let value = configuration.order ?? "C";
|
|
134721
|
+
let rank2 = meta2.shape.length;
|
|
134722
|
+
let order = new Array(rank2);
|
|
134723
|
+
let inverseOrder = new Array(rank2);
|
|
134724
|
+
if (value === "C") {
|
|
134725
|
+
for (let i2 = 0; i2 < rank2; ++i2) {
|
|
134726
|
+
order[i2] = i2;
|
|
134727
|
+
inverseOrder[i2] = i2;
|
|
134728
|
+
}
|
|
134729
|
+
} else if (value === "F") {
|
|
134730
|
+
for (let i2 = 0; i2 < rank2; ++i2) {
|
|
134731
|
+
order[i2] = rank2 - i2 - 1;
|
|
134732
|
+
inverseOrder[i2] = rank2 - i2 - 1;
|
|
134733
|
+
}
|
|
134734
|
+
} else {
|
|
134735
|
+
order = value;
|
|
134736
|
+
order.forEach((x2, i2) => {
|
|
134737
|
+
assert$1(inverseOrder[x2] === void 0, `Invalid permutation: ${JSON.stringify(value)}`);
|
|
134738
|
+
inverseOrder[x2] = i2;
|
|
134739
|
+
});
|
|
134740
|
+
}
|
|
134741
|
+
__privateSet(this, _order, order);
|
|
134742
|
+
__privateSet(this, _inverseOrder, inverseOrder);
|
|
134877
134743
|
}
|
|
134878
|
-
static fromConfig(configuration) {
|
|
134879
|
-
return new
|
|
134744
|
+
static fromConfig(configuration, meta2) {
|
|
134745
|
+
return new _TransposeCodec(configuration, meta2);
|
|
134880
134746
|
}
|
|
134881
134747
|
encode(arr) {
|
|
134882
|
-
|
|
134883
|
-
if (get_order(arr) === ((_a3 = this.configuration) == null ? void 0 : _a3.order)) {
|
|
134748
|
+
if (matches_order(arr, __privateGet(this, _inverseOrder))) {
|
|
134884
134749
|
return arr;
|
|
134885
134750
|
}
|
|
134886
|
-
return convert_array_order(arr, (
|
|
134751
|
+
return convert_array_order(arr, __privateGet(this, _inverseOrder));
|
|
134887
134752
|
}
|
|
134888
134753
|
decode(arr) {
|
|
134889
|
-
return
|
|
134754
|
+
return {
|
|
134755
|
+
data: arr.data,
|
|
134756
|
+
shape: arr.shape,
|
|
134757
|
+
stride: get_strides(arr.shape, __privateGet(this, _order))
|
|
134758
|
+
};
|
|
134890
134759
|
}
|
|
134891
|
-
}
|
|
134760
|
+
};
|
|
134761
|
+
let TransposeCodec = _TransposeCodec;
|
|
134762
|
+
_order = new WeakMap();
|
|
134763
|
+
_inverseOrder = new WeakMap();
|
|
134892
134764
|
const _VLenUTF8 = class {
|
|
134893
134765
|
constructor(shape) {
|
|
134894
134766
|
__publicField(this, "kind", "array_to_bytes");
|
|
134895
134767
|
__privateAdd(this, _shape2, void 0);
|
|
134896
|
-
__privateAdd(this,
|
|
134768
|
+
__privateAdd(this, _strides, void 0);
|
|
134897
134769
|
__privateSet(this, _shape2, shape);
|
|
134898
|
-
__privateSet(this,
|
|
134770
|
+
__privateSet(this, _strides, get_strides(shape, "C"));
|
|
134899
134771
|
}
|
|
134900
134772
|
static fromConfig(_, meta2) {
|
|
134901
134773
|
return new _VLenUTF8(meta2.shape);
|
|
@@ -134914,14 +134786,14 @@ const _VLenUTF8 = class {
|
|
|
134914
134786
|
data[i2] = decoder.decode(bytes.buffer.slice(pos, pos + item_length));
|
|
134915
134787
|
pos += item_length;
|
|
134916
134788
|
}
|
|
134917
|
-
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this,
|
|
134789
|
+
return { data, shape: __privateGet(this, _shape2), stride: __privateGet(this, _strides) };
|
|
134918
134790
|
}
|
|
134919
134791
|
};
|
|
134920
134792
|
let VLenUTF8 = _VLenUTF8;
|
|
134921
134793
|
_shape2 = new WeakMap();
|
|
134922
|
-
|
|
134794
|
+
_strides = new WeakMap();
|
|
134923
134795
|
function create_default_registry() {
|
|
134924
|
-
return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-537fd004.js").then((m) => m.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m) => m.default)).set("lz4", () => import("./lz4-bbd18009.js").then((m) => m.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m) => m.default)).set("zstd", () => import("./zstd-
|
|
134796
|
+
return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-537fd004.js").then((m) => m.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m) => m.default)).set("lz4", () => import("./lz4-bbd18009.js").then((m) => m.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m) => m.default)).set("zstd", () => import("./zstd-561fda0e.js").then((m) => m.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec).set("bitround", () => BitroundCodec);
|
|
134925
134797
|
}
|
|
134926
134798
|
const registry = create_default_registry();
|
|
134927
134799
|
function create_codec_pipeline(chunk_metadata) {
|
|
@@ -134957,9 +134829,7 @@ async function load_codecs(chunk_meta) {
|
|
|
134957
134829
|
let promises = chunk_meta.codecs.map(async (meta2) => {
|
|
134958
134830
|
var _a3;
|
|
134959
134831
|
let Codec = await ((_a3 = registry.get(meta2.name)) == null ? void 0 : _a3());
|
|
134960
|
-
|
|
134961
|
-
throw new Error(`Unknown codec: ${meta2.name}`);
|
|
134962
|
-
}
|
|
134832
|
+
assert$1(Codec, `Unknown codec: ${meta2.name}`);
|
|
134963
134833
|
return { Codec, meta: meta2 };
|
|
134964
134834
|
});
|
|
134965
134835
|
let array_to_array = [];
|
|
@@ -134979,9 +134849,7 @@ async function load_codecs(chunk_meta) {
|
|
|
134979
134849
|
}
|
|
134980
134850
|
}
|
|
134981
134851
|
if (!array_to_bytes) {
|
|
134982
|
-
|
|
134983
|
-
throw new Error(`Cannot encode ${chunk_meta.data_type} to bytes without a codec`);
|
|
134984
|
-
}
|
|
134852
|
+
assert$1(is_typed_array_like_meta(chunk_meta), `Cannot encode ${chunk_meta.data_type} to bytes without a codec`);
|
|
134985
134853
|
array_to_bytes = BytesCodec.fromConfig({ endian: "little" }, chunk_meta);
|
|
134986
134854
|
}
|
|
134987
134855
|
return { array_to_array, array_to_bytes, bytes_to_bytes };
|
|
@@ -134991,9 +134859,7 @@ function is_typed_array_like_meta(meta2) {
|
|
|
134991
134859
|
}
|
|
134992
134860
|
const MAX_BIG_UINT = 18446744073709551615n;
|
|
134993
134861
|
function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sharding_config) {
|
|
134994
|
-
|
|
134995
|
-
throw new Error("Store does not support range requests");
|
|
134996
|
-
}
|
|
134862
|
+
assert$1(location.store.getRange, "Store does not support range requests");
|
|
134997
134863
|
let get_range = location.store.getRange.bind(location.store);
|
|
134998
134864
|
let index_shape = shard_shape.map((d, i2) => d / sharding_config.chunk_shape[i2]);
|
|
134999
134865
|
let index_codec = create_codec_pipeline({
|
|
@@ -135056,6 +134922,11 @@ class Group extends Location {
|
|
|
135056
134922
|
}
|
|
135057
134923
|
}
|
|
135058
134924
|
_metadata = new WeakMap();
|
|
134925
|
+
function get_array_order(codecs) {
|
|
134926
|
+
var _a3;
|
|
134927
|
+
const maybe_transpose_codec = codecs.find((c) => c.name === "transpose");
|
|
134928
|
+
return ((_a3 = maybe_transpose_codec == null ? void 0 : maybe_transpose_codec.configuration) == null ? void 0 : _a3.order) ?? "C";
|
|
134929
|
+
}
|
|
135059
134930
|
const CONTEXT_MARKER = Symbol("zarrita.context");
|
|
135060
134931
|
function get_context(obj) {
|
|
135061
134932
|
return obj[CONTEXT_MARKER];
|
|
@@ -135078,8 +134949,8 @@ function create_context(location, metadata) {
|
|
|
135078
134949
|
shape: configuration.chunk_shape,
|
|
135079
134950
|
codecs: configuration.codecs
|
|
135080
134951
|
}),
|
|
135081
|
-
get_strides(shape
|
|
135082
|
-
return get_strides(shape,
|
|
134952
|
+
get_strides(shape) {
|
|
134953
|
+
return get_strides(shape, native_order2);
|
|
135083
134954
|
},
|
|
135084
134955
|
get_chunk_bytes: create_sharded_chunk_getter(location, metadata.chunk_grid.configuration.chunk_shape, shared_context.encode_chunk_key, configuration)
|
|
135085
134956
|
};
|
|
@@ -135094,8 +134965,8 @@ function create_context(location, metadata) {
|
|
|
135094
134965
|
shape: metadata.chunk_grid.configuration.chunk_shape,
|
|
135095
134966
|
codecs: metadata.codecs
|
|
135096
134967
|
}),
|
|
135097
|
-
get_strides(shape
|
|
135098
|
-
return get_strides(shape,
|
|
134968
|
+
get_strides(shape) {
|
|
134969
|
+
return get_strides(shape, native_order);
|
|
135099
134970
|
},
|
|
135100
134971
|
async get_chunk_bytes(chunk_coords, options) {
|
|
135101
134972
|
let chunk_key = shared_context.encode_chunk_key(chunk_coords);
|
|
@@ -135198,9 +135069,8 @@ async function open_v2(location, options = {}) {
|
|
|
135198
135069
|
if (options.kind === "group")
|
|
135199
135070
|
return open_group_v2(loc, attrs);
|
|
135200
135071
|
return open_array_v2(loc, attrs).catch((err2) => {
|
|
135201
|
-
|
|
135202
|
-
|
|
135203
|
-
throw err2;
|
|
135072
|
+
rethrow_unless(err2, NodeNotFoundError);
|
|
135073
|
+
return open_group_v2(loc, attrs);
|
|
135204
135074
|
});
|
|
135205
135075
|
}
|
|
135206
135076
|
async function open_array_v2(location, attrs) {
|
|
@@ -135258,10 +135128,8 @@ async function open(location, options = {}) {
|
|
|
135258
135128
|
let open_primary = version_max === "v2" ? open.v2 : open.v3;
|
|
135259
135129
|
let open_secondary = version_max === "v2" ? open.v3 : open.v2;
|
|
135260
135130
|
return open_primary(location, options).catch((err2) => {
|
|
135261
|
-
|
|
135262
|
-
|
|
135263
|
-
}
|
|
135264
|
-
throw err2;
|
|
135131
|
+
rethrow_unless(err2, NodeNotFoundError);
|
|
135132
|
+
return open_secondary(location, options);
|
|
135265
135133
|
});
|
|
135266
135134
|
}
|
|
135267
135135
|
open.v2 = open_v2;
|
|
@@ -135499,7 +135367,7 @@ async function get$1(arr, selection, opts, setter2) {
|
|
|
135499
135367
|
shape: arr.shape,
|
|
135500
135368
|
chunk_shape: arr.chunks
|
|
135501
135369
|
});
|
|
135502
|
-
let out = setter2.prepare(new context.TypedArray(indexer.shape.reduce((a2, b) => a2 * b, 1)), indexer.shape, context.get_strides(indexer.shape
|
|
135370
|
+
let out = setter2.prepare(new context.TypedArray(indexer.shape.reduce((a2, b) => a2 * b, 1)), indexer.shape, context.get_strides(indexer.shape));
|
|
135503
135371
|
let queue = ((_a3 = opts.create_queue) == null ? void 0 : _a3.call(opts)) ?? create_queue();
|
|
135504
135372
|
for (const { chunk_coords, mapping } of indexer) {
|
|
135505
135373
|
queue.add(async () => {
|