@vitessce/ome-tiff 4.1.3 → 4.2.1
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-BVhEeabM.js → deflate-CUv0cX0x.js} +1 -1
- package/dist/{index-DBW8RggG.js → index-CQ0ULzhP.js} +865 -244
- package/dist/index.js +1 -1
- package/dist/{jpeg-DxGUpqoS.js → jpeg-BYVxEYfP.js} +1 -1
- package/dist/{lerc-DTMMN_FZ.js → lerc-CwhwXnAs.js} +1 -1
- package/dist/{lzw-D2KxvvwD.js → lzw-Ct-TYyMz.js} +1 -1
- package/dist/{packbits-jt7-2VyS.js → packbits-IsjL89d4.js} +1 -1
- package/dist/{raw-CkRBIDUZ.js → raw-8fYhxxrk.js} +1 -1
- package/dist/{webimage-rJNncJvM.js → webimage-BZn38dU8.js} +1 -1
- package/package.json +11 -11
|
@@ -901,16 +901,16 @@ class Stats {
|
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
getTable() {
|
|
904
|
-
const
|
|
904
|
+
const table2 = {};
|
|
905
905
|
this.forEach((stat) => {
|
|
906
|
-
|
|
906
|
+
table2[stat.name] = {
|
|
907
907
|
time: stat.time || 0,
|
|
908
908
|
count: stat.count || 0,
|
|
909
909
|
average: stat.getAverageTime() || 0,
|
|
910
910
|
hz: stat.getHz() || 0
|
|
911
911
|
};
|
|
912
912
|
});
|
|
913
|
-
return
|
|
913
|
+
return table2;
|
|
914
914
|
}
|
|
915
915
|
_initializeStats() {
|
|
916
916
|
let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
@@ -1568,10 +1568,10 @@ class Log {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
1570
1570
|
}
|
|
1571
|
-
table(logLevel,
|
|
1572
|
-
if (
|
|
1573
|
-
return this._getLogFunction(logLevel,
|
|
1574
|
-
tag: getTableHeader(
|
|
1571
|
+
table(logLevel, table2, columns) {
|
|
1572
|
+
if (table2) {
|
|
1573
|
+
return this._getLogFunction(logLevel, table2, console.table || noop$4, columns && [columns], {
|
|
1574
|
+
tag: getTableHeader(table2)
|
|
1575
1575
|
});
|
|
1576
1576
|
}
|
|
1577
1577
|
return noop$4;
|
|
@@ -1771,9 +1771,9 @@ function logImageInBrowser(_ref3) {
|
|
|
1771
1771
|
}
|
|
1772
1772
|
return noop$4;
|
|
1773
1773
|
}
|
|
1774
|
-
function getTableHeader(
|
|
1775
|
-
for (const key in
|
|
1776
|
-
for (const title in
|
|
1774
|
+
function getTableHeader(table2) {
|
|
1775
|
+
for (const key in table2) {
|
|
1776
|
+
for (const title in table2[key]) {
|
|
1777
1777
|
return title || "untitled";
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
@@ -9217,13 +9217,13 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9217
9217
|
const SHADER_MODULE_UNIFORM_REGEXP = ".*_.*";
|
|
9218
9218
|
const PROJECT_MODULE_UNIFORM_REGEXP = ".*Matrix";
|
|
9219
9219
|
const uniformLocations = program._uniformSetters;
|
|
9220
|
-
const
|
|
9220
|
+
const table2 = {};
|
|
9221
9221
|
const uniformNames = Object.keys(uniformLocations).sort();
|
|
9222
9222
|
let count2 = 0;
|
|
9223
9223
|
for (const uniformName of uniformNames) {
|
|
9224
9224
|
if (!uniformName.match(SHADER_MODULE_UNIFORM_REGEXP) && !uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
|
|
9225
9225
|
if (addUniformToTable({
|
|
9226
|
-
table,
|
|
9226
|
+
table: table2,
|
|
9227
9227
|
header,
|
|
9228
9228
|
uniforms,
|
|
9229
9229
|
uniformName,
|
|
@@ -9236,7 +9236,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9236
9236
|
for (const uniformName of uniformNames) {
|
|
9237
9237
|
if (uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
|
|
9238
9238
|
if (addUniformToTable({
|
|
9239
|
-
table,
|
|
9239
|
+
table: table2,
|
|
9240
9240
|
header,
|
|
9241
9241
|
uniforms,
|
|
9242
9242
|
uniformName,
|
|
@@ -9247,9 +9247,9 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9247
9247
|
}
|
|
9248
9248
|
}
|
|
9249
9249
|
for (const uniformName of uniformNames) {
|
|
9250
|
-
if (!
|
|
9250
|
+
if (!table2[uniformName]) {
|
|
9251
9251
|
if (addUniformToTable({
|
|
9252
|
-
table,
|
|
9252
|
+
table: table2,
|
|
9253
9253
|
header,
|
|
9254
9254
|
uniforms,
|
|
9255
9255
|
uniformName,
|
|
@@ -9264,7 +9264,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9264
9264
|
if (!undefinedOnly) {
|
|
9265
9265
|
for (const uniformName in uniforms) {
|
|
9266
9266
|
const uniform = uniforms[uniformName];
|
|
9267
|
-
if (!
|
|
9267
|
+
if (!table2[uniformName]) {
|
|
9268
9268
|
unusedCount++;
|
|
9269
9269
|
unusedTable[uniformName] = {
|
|
9270
9270
|
Type: "NOT USED: ".concat(uniform),
|
|
@@ -9274,7 +9274,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9274
9274
|
}
|
|
9275
9275
|
}
|
|
9276
9276
|
return {
|
|
9277
|
-
table,
|
|
9277
|
+
table: table2,
|
|
9278
9278
|
count: count2,
|
|
9279
9279
|
unusedTable,
|
|
9280
9280
|
unusedCount
|
|
@@ -9282,7 +9282,7 @@ function getDebugTableForUniforms(_ref) {
|
|
|
9282
9282
|
}
|
|
9283
9283
|
function addUniformToTable(_ref2) {
|
|
9284
9284
|
let {
|
|
9285
|
-
table,
|
|
9285
|
+
table: table2,
|
|
9286
9286
|
header,
|
|
9287
9287
|
uniforms,
|
|
9288
9288
|
uniformName,
|
|
@@ -9291,7 +9291,7 @@ function addUniformToTable(_ref2) {
|
|
|
9291
9291
|
const value = uniforms[uniformName];
|
|
9292
9292
|
const isDefined = isUniformDefined(value);
|
|
9293
9293
|
if (!undefinedOnly || !isDefined) {
|
|
9294
|
-
|
|
9294
|
+
table2[uniformName] = {
|
|
9295
9295
|
[header]: isDefined ? formatValue$1(value) : "N/A",
|
|
9296
9296
|
"Uniform Type": isDefined ? value : "NOT PROVIDED"
|
|
9297
9297
|
};
|
|
@@ -9310,9 +9310,9 @@ function getDebugTableForVertexArray(_ref) {
|
|
|
9310
9310
|
if (!vertexArray.configuration) {
|
|
9311
9311
|
return {};
|
|
9312
9312
|
}
|
|
9313
|
-
const
|
|
9313
|
+
const table2 = {};
|
|
9314
9314
|
if (vertexArray.elements) {
|
|
9315
|
-
|
|
9315
|
+
table2.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);
|
|
9316
9316
|
}
|
|
9317
9317
|
const attributes = vertexArray.values;
|
|
9318
9318
|
for (const attributeLocation in attributes) {
|
|
@@ -9323,10 +9323,10 @@ function getDebugTableForVertexArray(_ref) {
|
|
|
9323
9323
|
if (accessor) {
|
|
9324
9324
|
rowHeader = "".concat(attributeLocation, ": ").concat(getGLSLDeclaration$1(info.name, accessor));
|
|
9325
9325
|
}
|
|
9326
|
-
|
|
9326
|
+
table2[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header);
|
|
9327
9327
|
}
|
|
9328
9328
|
}
|
|
9329
|
-
return
|
|
9329
|
+
return table2;
|
|
9330
9330
|
}
|
|
9331
9331
|
function getDebugTableRow(vertexArray, attribute, accessor, header) {
|
|
9332
9332
|
const {
|
|
@@ -9398,12 +9398,12 @@ function getGLSLDeclaration$1(name2, accessor) {
|
|
|
9398
9398
|
return typeAndName ? "".concat(name2, " (").concat(typeAndName.name, ")") : name2;
|
|
9399
9399
|
}
|
|
9400
9400
|
function getDebugTableForProgramConfiguration(config3) {
|
|
9401
|
-
const
|
|
9401
|
+
const table2 = {};
|
|
9402
9402
|
const header = "Accessors for ".concat(config3.id);
|
|
9403
9403
|
for (const attributeInfo of config3.attributeInfos) {
|
|
9404
9404
|
if (attributeInfo) {
|
|
9405
9405
|
const glslDeclaration = getGLSLDeclaration(attributeInfo);
|
|
9406
|
-
|
|
9406
|
+
table2["in ".concat(glslDeclaration)] = {
|
|
9407
9407
|
[header]: JSON.stringify(attributeInfo.accessor)
|
|
9408
9408
|
};
|
|
9409
9409
|
}
|
|
@@ -9411,12 +9411,12 @@ function getDebugTableForProgramConfiguration(config3) {
|
|
|
9411
9411
|
for (const varyingInfo of config3.varyingInfos) {
|
|
9412
9412
|
if (varyingInfo) {
|
|
9413
9413
|
const glslDeclaration = getGLSLDeclaration(varyingInfo);
|
|
9414
|
-
|
|
9414
|
+
table2["out ".concat(glslDeclaration)] = {
|
|
9415
9415
|
[header]: JSON.stringify(varyingInfo.accessor)
|
|
9416
9416
|
};
|
|
9417
9417
|
}
|
|
9418
9418
|
}
|
|
9419
|
-
return
|
|
9419
|
+
return table2;
|
|
9420
9420
|
}
|
|
9421
9421
|
function getGLSLDeclaration(attributeInfo) {
|
|
9422
9422
|
const {
|
|
@@ -81206,223 +81206,373 @@ function requireLayerMouseEvent() {
|
|
|
81206
81206
|
return layerMouseEvent;
|
|
81207
81207
|
}
|
|
81208
81208
|
var nebulaLayer = {};
|
|
81209
|
-
var events;
|
|
81209
|
+
var events = { exports: {} };
|
|
81210
81210
|
var hasRequiredEvents;
|
|
81211
81211
|
function requireEvents() {
|
|
81212
|
-
if (hasRequiredEvents) return events;
|
|
81212
|
+
if (hasRequiredEvents) return events.exports;
|
|
81213
81213
|
hasRequiredEvents = 1;
|
|
81214
|
+
var R = typeof Reflect === "object" ? Reflect : null;
|
|
81215
|
+
var ReflectApply2 = R && typeof R.apply === "function" ? R.apply : function ReflectApply3(target, receiver, args) {
|
|
81216
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
81217
|
+
};
|
|
81218
|
+
var ReflectOwnKeys2;
|
|
81219
|
+
if (R && typeof R.ownKeys === "function") {
|
|
81220
|
+
ReflectOwnKeys2 = R.ownKeys;
|
|
81221
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
81222
|
+
ReflectOwnKeys2 = function ReflectOwnKeys3(target) {
|
|
81223
|
+
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
81224
|
+
};
|
|
81225
|
+
} else {
|
|
81226
|
+
ReflectOwnKeys2 = function ReflectOwnKeys3(target) {
|
|
81227
|
+
return Object.getOwnPropertyNames(target);
|
|
81228
|
+
};
|
|
81229
|
+
}
|
|
81230
|
+
function ProcessEmitWarning(warning) {
|
|
81231
|
+
if (console && console.warn) console.warn(warning);
|
|
81232
|
+
}
|
|
81233
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
81234
|
+
return value !== value;
|
|
81235
|
+
};
|
|
81214
81236
|
function EventEmitter() {
|
|
81215
|
-
|
|
81216
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
81237
|
+
EventEmitter.init.call(this);
|
|
81217
81238
|
}
|
|
81218
|
-
events = EventEmitter;
|
|
81239
|
+
events.exports = EventEmitter;
|
|
81240
|
+
events.exports.once = once;
|
|
81219
81241
|
EventEmitter.EventEmitter = EventEmitter;
|
|
81220
81242
|
EventEmitter.prototype._events = void 0;
|
|
81243
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
81221
81244
|
EventEmitter.prototype._maxListeners = void 0;
|
|
81222
|
-
|
|
81223
|
-
|
|
81224
|
-
if (
|
|
81225
|
-
throw TypeError("
|
|
81245
|
+
var defaultMaxListeners = 10;
|
|
81246
|
+
function checkListener(listener) {
|
|
81247
|
+
if (typeof listener !== "function") {
|
|
81248
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
81249
|
+
}
|
|
81250
|
+
}
|
|
81251
|
+
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
81252
|
+
enumerable: true,
|
|
81253
|
+
get: function() {
|
|
81254
|
+
return defaultMaxListeners;
|
|
81255
|
+
},
|
|
81256
|
+
set: function(arg2) {
|
|
81257
|
+
if (typeof arg2 !== "number" || arg2 < 0 || NumberIsNaN(arg2)) {
|
|
81258
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg2 + ".");
|
|
81259
|
+
}
|
|
81260
|
+
defaultMaxListeners = arg2;
|
|
81261
|
+
}
|
|
81262
|
+
});
|
|
81263
|
+
EventEmitter.init = function() {
|
|
81264
|
+
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
81265
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
81266
|
+
this._eventsCount = 0;
|
|
81267
|
+
}
|
|
81268
|
+
this._maxListeners = this._maxListeners || void 0;
|
|
81269
|
+
};
|
|
81270
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n3) {
|
|
81271
|
+
if (typeof n3 !== "number" || n3 < 0 || NumberIsNaN(n3)) {
|
|
81272
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n3 + ".");
|
|
81273
|
+
}
|
|
81226
81274
|
this._maxListeners = n3;
|
|
81227
81275
|
return this;
|
|
81228
81276
|
};
|
|
81229
|
-
|
|
81230
|
-
|
|
81231
|
-
|
|
81232
|
-
|
|
81233
|
-
|
|
81234
|
-
|
|
81235
|
-
|
|
81236
|
-
|
|
81237
|
-
|
|
81238
|
-
|
|
81239
|
-
|
|
81240
|
-
|
|
81241
|
-
|
|
81242
|
-
|
|
81243
|
-
|
|
81244
|
-
|
|
81245
|
-
handler = this._events[type];
|
|
81246
|
-
if (isUndefined2(handler))
|
|
81277
|
+
function _getMaxListeners(that) {
|
|
81278
|
+
if (that._maxListeners === void 0)
|
|
81279
|
+
return EventEmitter.defaultMaxListeners;
|
|
81280
|
+
return that._maxListeners;
|
|
81281
|
+
}
|
|
81282
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
81283
|
+
return _getMaxListeners(this);
|
|
81284
|
+
};
|
|
81285
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
81286
|
+
var args = [];
|
|
81287
|
+
for (var i2 = 1; i2 < arguments.length; i2++) args.push(arguments[i2]);
|
|
81288
|
+
var doError = type === "error";
|
|
81289
|
+
var events2 = this._events;
|
|
81290
|
+
if (events2 !== void 0)
|
|
81291
|
+
doError = doError && events2.error === void 0;
|
|
81292
|
+
else if (!doError)
|
|
81247
81293
|
return false;
|
|
81248
|
-
if (
|
|
81249
|
-
|
|
81250
|
-
|
|
81251
|
-
|
|
81252
|
-
|
|
81253
|
-
|
|
81254
|
-
|
|
81255
|
-
|
|
81256
|
-
|
|
81257
|
-
|
|
81258
|
-
|
|
81259
|
-
|
|
81260
|
-
|
|
81261
|
-
|
|
81262
|
-
|
|
81263
|
-
|
|
81264
|
-
|
|
81265
|
-
|
|
81266
|
-
|
|
81267
|
-
|
|
81268
|
-
|
|
81269
|
-
for (i2 = 0; i2 < len2; i2++)
|
|
81270
|
-
listeners[i2].apply(this, args);
|
|
81294
|
+
if (doError) {
|
|
81295
|
+
var er;
|
|
81296
|
+
if (args.length > 0)
|
|
81297
|
+
er = args[0];
|
|
81298
|
+
if (er instanceof Error) {
|
|
81299
|
+
throw er;
|
|
81300
|
+
}
|
|
81301
|
+
var err2 = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
81302
|
+
err2.context = er;
|
|
81303
|
+
throw err2;
|
|
81304
|
+
}
|
|
81305
|
+
var handler = events2[type];
|
|
81306
|
+
if (handler === void 0)
|
|
81307
|
+
return false;
|
|
81308
|
+
if (typeof handler === "function") {
|
|
81309
|
+
ReflectApply2(handler, this, args);
|
|
81310
|
+
} else {
|
|
81311
|
+
var len2 = handler.length;
|
|
81312
|
+
var listeners = arrayClone(handler, len2);
|
|
81313
|
+
for (var i2 = 0; i2 < len2; ++i2)
|
|
81314
|
+
ReflectApply2(listeners[i2], this, args);
|
|
81271
81315
|
}
|
|
81272
81316
|
return true;
|
|
81273
81317
|
};
|
|
81274
|
-
|
|
81318
|
+
function _addListener(target, type, listener, prepend) {
|
|
81275
81319
|
var m;
|
|
81276
|
-
|
|
81277
|
-
|
|
81278
|
-
|
|
81279
|
-
|
|
81280
|
-
if (
|
|
81281
|
-
|
|
81282
|
-
|
|
81283
|
-
|
|
81284
|
-
|
|
81285
|
-
|
|
81286
|
-
|
|
81287
|
-
|
|
81288
|
-
|
|
81289
|
-
|
|
81290
|
-
|
|
81291
|
-
|
|
81292
|
-
|
|
81293
|
-
|
|
81294
|
-
|
|
81320
|
+
var events2;
|
|
81321
|
+
var existing;
|
|
81322
|
+
checkListener(listener);
|
|
81323
|
+
events2 = target._events;
|
|
81324
|
+
if (events2 === void 0) {
|
|
81325
|
+
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
81326
|
+
target._eventsCount = 0;
|
|
81327
|
+
} else {
|
|
81328
|
+
if (events2.newListener !== void 0) {
|
|
81329
|
+
target.emit(
|
|
81330
|
+
"newListener",
|
|
81331
|
+
type,
|
|
81332
|
+
listener.listener ? listener.listener : listener
|
|
81333
|
+
);
|
|
81334
|
+
events2 = target._events;
|
|
81335
|
+
}
|
|
81336
|
+
existing = events2[type];
|
|
81337
|
+
}
|
|
81338
|
+
if (existing === void 0) {
|
|
81339
|
+
existing = events2[type] = listener;
|
|
81340
|
+
++target._eventsCount;
|
|
81341
|
+
} else {
|
|
81342
|
+
if (typeof existing === "function") {
|
|
81343
|
+
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
81344
|
+
} else if (prepend) {
|
|
81345
|
+
existing.unshift(listener);
|
|
81295
81346
|
} else {
|
|
81296
|
-
|
|
81347
|
+
existing.push(listener);
|
|
81297
81348
|
}
|
|
81298
|
-
|
|
81299
|
-
|
|
81300
|
-
|
|
81301
|
-
|
|
81302
|
-
|
|
81303
|
-
|
|
81304
|
-
|
|
81305
|
-
|
|
81306
|
-
|
|
81349
|
+
m = _getMaxListeners(target);
|
|
81350
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
|
81351
|
+
existing.warned = true;
|
|
81352
|
+
var w2 = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
81353
|
+
w2.name = "MaxListenersExceededWarning";
|
|
81354
|
+
w2.emitter = target;
|
|
81355
|
+
w2.type = type;
|
|
81356
|
+
w2.count = existing.length;
|
|
81357
|
+
ProcessEmitWarning(w2);
|
|
81307
81358
|
}
|
|
81308
81359
|
}
|
|
81309
|
-
return
|
|
81360
|
+
return target;
|
|
81361
|
+
}
|
|
81362
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
81363
|
+
return _addListener(this, type, listener, false);
|
|
81310
81364
|
};
|
|
81311
81365
|
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
81312
|
-
EventEmitter.prototype.
|
|
81313
|
-
|
|
81314
|
-
|
|
81315
|
-
|
|
81316
|
-
|
|
81317
|
-
this.removeListener(type,
|
|
81318
|
-
|
|
81319
|
-
|
|
81320
|
-
listener.
|
|
81321
|
-
|
|
81322
|
-
}
|
|
81323
|
-
|
|
81324
|
-
|
|
81366
|
+
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
|
81367
|
+
return _addListener(this, type, listener, true);
|
|
81368
|
+
};
|
|
81369
|
+
function onceWrapper() {
|
|
81370
|
+
if (!this.fired) {
|
|
81371
|
+
this.target.removeListener(this.type, this.wrapFn);
|
|
81372
|
+
this.fired = true;
|
|
81373
|
+
if (arguments.length === 0)
|
|
81374
|
+
return this.listener.call(this.target);
|
|
81375
|
+
return this.listener.apply(this.target, arguments);
|
|
81376
|
+
}
|
|
81377
|
+
}
|
|
81378
|
+
function _onceWrap(target, type, listener) {
|
|
81379
|
+
var state = { fired: false, wrapFn: void 0, target, type, listener };
|
|
81380
|
+
var wrapped = onceWrapper.bind(state);
|
|
81381
|
+
wrapped.listener = listener;
|
|
81382
|
+
state.wrapFn = wrapped;
|
|
81383
|
+
return wrapped;
|
|
81384
|
+
}
|
|
81385
|
+
EventEmitter.prototype.once = function once2(type, listener) {
|
|
81386
|
+
checkListener(listener);
|
|
81387
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
81325
81388
|
return this;
|
|
81326
81389
|
};
|
|
81327
|
-
EventEmitter.prototype.
|
|
81328
|
-
|
|
81329
|
-
|
|
81330
|
-
|
|
81331
|
-
|
|
81390
|
+
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
|
81391
|
+
checkListener(listener);
|
|
81392
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
81393
|
+
return this;
|
|
81394
|
+
};
|
|
81395
|
+
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
81396
|
+
var list, events2, position2, i2, originalListener;
|
|
81397
|
+
checkListener(listener);
|
|
81398
|
+
events2 = this._events;
|
|
81399
|
+
if (events2 === void 0)
|
|
81400
|
+
return this;
|
|
81401
|
+
list = events2[type];
|
|
81402
|
+
if (list === void 0)
|
|
81332
81403
|
return this;
|
|
81333
|
-
list
|
|
81334
|
-
|
|
81335
|
-
|
|
81336
|
-
|
|
81337
|
-
|
|
81338
|
-
|
|
81339
|
-
|
|
81340
|
-
|
|
81341
|
-
|
|
81342
|
-
|
|
81404
|
+
if (list === listener || list.listener === listener) {
|
|
81405
|
+
if (--this._eventsCount === 0)
|
|
81406
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
81407
|
+
else {
|
|
81408
|
+
delete events2[type];
|
|
81409
|
+
if (events2.removeListener)
|
|
81410
|
+
this.emit("removeListener", type, list.listener || listener);
|
|
81411
|
+
}
|
|
81412
|
+
} else if (typeof list !== "function") {
|
|
81413
|
+
position2 = -1;
|
|
81414
|
+
for (i2 = list.length - 1; i2 >= 0; i2--) {
|
|
81415
|
+
if (list[i2] === listener || list[i2].listener === listener) {
|
|
81416
|
+
originalListener = list[i2].listener;
|
|
81343
81417
|
position2 = i2;
|
|
81344
81418
|
break;
|
|
81345
81419
|
}
|
|
81346
81420
|
}
|
|
81347
81421
|
if (position2 < 0)
|
|
81348
81422
|
return this;
|
|
81349
|
-
if (
|
|
81350
|
-
list.
|
|
81351
|
-
|
|
81352
|
-
|
|
81353
|
-
list.splice(position2, 1);
|
|
81423
|
+
if (position2 === 0)
|
|
81424
|
+
list.shift();
|
|
81425
|
+
else {
|
|
81426
|
+
spliceOne(list, position2);
|
|
81354
81427
|
}
|
|
81355
|
-
if (
|
|
81356
|
-
|
|
81428
|
+
if (list.length === 1)
|
|
81429
|
+
events2[type] = list[0];
|
|
81430
|
+
if (events2.removeListener !== void 0)
|
|
81431
|
+
this.emit("removeListener", type, originalListener || listener);
|
|
81357
81432
|
}
|
|
81358
81433
|
return this;
|
|
81359
81434
|
};
|
|
81360
|
-
EventEmitter.prototype.
|
|
81361
|
-
|
|
81362
|
-
|
|
81435
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
81436
|
+
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
|
81437
|
+
var listeners, events2, i2;
|
|
81438
|
+
events2 = this._events;
|
|
81439
|
+
if (events2 === void 0)
|
|
81363
81440
|
return this;
|
|
81364
|
-
if (
|
|
81365
|
-
if (arguments.length === 0)
|
|
81366
|
-
this._events =
|
|
81367
|
-
|
|
81368
|
-
|
|
81441
|
+
if (events2.removeListener === void 0) {
|
|
81442
|
+
if (arguments.length === 0) {
|
|
81443
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
81444
|
+
this._eventsCount = 0;
|
|
81445
|
+
} else if (events2[type] !== void 0) {
|
|
81446
|
+
if (--this._eventsCount === 0)
|
|
81447
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
81448
|
+
else
|
|
81449
|
+
delete events2[type];
|
|
81450
|
+
}
|
|
81369
81451
|
return this;
|
|
81370
81452
|
}
|
|
81371
81453
|
if (arguments.length === 0) {
|
|
81372
|
-
|
|
81454
|
+
var keys2 = Object.keys(events2);
|
|
81455
|
+
var key;
|
|
81456
|
+
for (i2 = 0; i2 < keys2.length; ++i2) {
|
|
81457
|
+
key = keys2[i2];
|
|
81373
81458
|
if (key === "removeListener") continue;
|
|
81374
81459
|
this.removeAllListeners(key);
|
|
81375
81460
|
}
|
|
81376
81461
|
this.removeAllListeners("removeListener");
|
|
81377
|
-
this._events =
|
|
81462
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
81463
|
+
this._eventsCount = 0;
|
|
81378
81464
|
return this;
|
|
81379
81465
|
}
|
|
81380
|
-
listeners =
|
|
81381
|
-
if (
|
|
81466
|
+
listeners = events2[type];
|
|
81467
|
+
if (typeof listeners === "function") {
|
|
81382
81468
|
this.removeListener(type, listeners);
|
|
81383
|
-
} else if (listeners) {
|
|
81384
|
-
|
|
81385
|
-
this.removeListener(type, listeners[
|
|
81469
|
+
} else if (listeners !== void 0) {
|
|
81470
|
+
for (i2 = listeners.length - 1; i2 >= 0; i2--) {
|
|
81471
|
+
this.removeListener(type, listeners[i2]);
|
|
81472
|
+
}
|
|
81386
81473
|
}
|
|
81387
|
-
delete this._events[type];
|
|
81388
81474
|
return this;
|
|
81389
81475
|
};
|
|
81390
|
-
|
|
81391
|
-
var
|
|
81392
|
-
if (
|
|
81393
|
-
|
|
81394
|
-
|
|
81395
|
-
|
|
81396
|
-
|
|
81397
|
-
|
|
81398
|
-
|
|
81476
|
+
function _listeners(target, type, unwrap) {
|
|
81477
|
+
var events2 = target._events;
|
|
81478
|
+
if (events2 === void 0)
|
|
81479
|
+
return [];
|
|
81480
|
+
var evlistener = events2[type];
|
|
81481
|
+
if (evlistener === void 0)
|
|
81482
|
+
return [];
|
|
81483
|
+
if (typeof evlistener === "function")
|
|
81484
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
81485
|
+
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
81486
|
+
}
|
|
81487
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
81488
|
+
return _listeners(this, type, true);
|
|
81489
|
+
};
|
|
81490
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
81491
|
+
return _listeners(this, type, false);
|
|
81492
|
+
};
|
|
81493
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
81494
|
+
if (typeof emitter.listenerCount === "function") {
|
|
81495
|
+
return emitter.listenerCount(type);
|
|
81496
|
+
} else {
|
|
81497
|
+
return listenerCount.call(emitter, type);
|
|
81498
|
+
}
|
|
81399
81499
|
};
|
|
81400
|
-
EventEmitter.prototype.listenerCount =
|
|
81401
|
-
|
|
81402
|
-
|
|
81403
|
-
|
|
81500
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
81501
|
+
function listenerCount(type) {
|
|
81502
|
+
var events2 = this._events;
|
|
81503
|
+
if (events2 !== void 0) {
|
|
81504
|
+
var evlistener = events2[type];
|
|
81505
|
+
if (typeof evlistener === "function") {
|
|
81404
81506
|
return 1;
|
|
81405
|
-
else if (evlistener)
|
|
81507
|
+
} else if (evlistener !== void 0) {
|
|
81406
81508
|
return evlistener.length;
|
|
81509
|
+
}
|
|
81407
81510
|
}
|
|
81408
81511
|
return 0;
|
|
81512
|
+
}
|
|
81513
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
81514
|
+
return this._eventsCount > 0 ? ReflectOwnKeys2(this._events) : [];
|
|
81409
81515
|
};
|
|
81410
|
-
|
|
81411
|
-
|
|
81412
|
-
|
|
81413
|
-
|
|
81414
|
-
return
|
|
81516
|
+
function arrayClone(arr, n3) {
|
|
81517
|
+
var copy2 = new Array(n3);
|
|
81518
|
+
for (var i2 = 0; i2 < n3; ++i2)
|
|
81519
|
+
copy2[i2] = arr[i2];
|
|
81520
|
+
return copy2;
|
|
81415
81521
|
}
|
|
81416
|
-
function
|
|
81417
|
-
|
|
81522
|
+
function spliceOne(list, index2) {
|
|
81523
|
+
for (; index2 + 1 < list.length; index2++)
|
|
81524
|
+
list[index2] = list[index2 + 1];
|
|
81525
|
+
list.pop();
|
|
81418
81526
|
}
|
|
81419
|
-
function
|
|
81420
|
-
|
|
81527
|
+
function unwrapListeners(arr) {
|
|
81528
|
+
var ret = new Array(arr.length);
|
|
81529
|
+
for (var i2 = 0; i2 < ret.length; ++i2) {
|
|
81530
|
+
ret[i2] = arr[i2].listener || arr[i2];
|
|
81531
|
+
}
|
|
81532
|
+
return ret;
|
|
81421
81533
|
}
|
|
81422
|
-
function
|
|
81423
|
-
return
|
|
81534
|
+
function once(emitter, name2) {
|
|
81535
|
+
return new Promise(function(resolve, reject) {
|
|
81536
|
+
function errorListener(err2) {
|
|
81537
|
+
emitter.removeListener(name2, resolver);
|
|
81538
|
+
reject(err2);
|
|
81539
|
+
}
|
|
81540
|
+
function resolver() {
|
|
81541
|
+
if (typeof emitter.removeListener === "function") {
|
|
81542
|
+
emitter.removeListener("error", errorListener);
|
|
81543
|
+
}
|
|
81544
|
+
resolve([].slice.call(arguments));
|
|
81545
|
+
}
|
|
81546
|
+
eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
|
|
81547
|
+
if (name2 !== "error") {
|
|
81548
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
81549
|
+
}
|
|
81550
|
+
});
|
|
81551
|
+
}
|
|
81552
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
81553
|
+
if (typeof emitter.on === "function") {
|
|
81554
|
+
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
81555
|
+
}
|
|
81556
|
+
}
|
|
81557
|
+
function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
|
|
81558
|
+
if (typeof emitter.on === "function") {
|
|
81559
|
+
if (flags.once) {
|
|
81560
|
+
emitter.once(name2, listener);
|
|
81561
|
+
} else {
|
|
81562
|
+
emitter.on(name2, listener);
|
|
81563
|
+
}
|
|
81564
|
+
} else if (typeof emitter.addEventListener === "function") {
|
|
81565
|
+
emitter.addEventListener(name2, function wrapListener(arg2) {
|
|
81566
|
+
if (flags.once) {
|
|
81567
|
+
emitter.removeEventListener(name2, wrapListener);
|
|
81568
|
+
}
|
|
81569
|
+
listener(arg2);
|
|
81570
|
+
});
|
|
81571
|
+
} else {
|
|
81572
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
81573
|
+
}
|
|
81424
81574
|
}
|
|
81425
|
-
return events;
|
|
81575
|
+
return events.exports;
|
|
81426
81576
|
}
|
|
81427
81577
|
var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
|
|
81428
81578
|
var rnds8 = new Uint8Array(16);
|
|
@@ -81975,7 +82125,7 @@ function requireBignumber() {
|
|
|
81975
82125
|
suffix: ""
|
|
81976
82126
|
}, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
|
|
81977
82127
|
function BigNumber3(v, b) {
|
|
81978
|
-
var
|
|
82128
|
+
var alphabet2, c, caseChanged, e2, i2, isNum, len2, str, x = this;
|
|
81979
82129
|
if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
|
|
81980
82130
|
if (b == null) {
|
|
81981
82131
|
if (v && v._isBigNumber === true) {
|
|
@@ -82031,10 +82181,10 @@ function requireBignumber() {
|
|
|
82031
82181
|
} else {
|
|
82032
82182
|
x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
|
|
82033
82183
|
}
|
|
82034
|
-
|
|
82184
|
+
alphabet2 = ALPHABET.slice(0, b);
|
|
82035
82185
|
e2 = i2 = 0;
|
|
82036
82186
|
for (len2 = str.length; i2 < len2; i2++) {
|
|
82037
|
-
if (
|
|
82187
|
+
if (alphabet2.indexOf(c = str.charAt(i2)) < 0) {
|
|
82038
82188
|
if (c == ".") {
|
|
82039
82189
|
if (i2 > e2) {
|
|
82040
82190
|
e2 = len2;
|
|
@@ -82305,11 +82455,11 @@ function requireBignumber() {
|
|
|
82305
82455
|
};
|
|
82306
82456
|
convertBase2 = /* @__PURE__ */ function() {
|
|
82307
82457
|
var decimal = "0123456789";
|
|
82308
|
-
function toBaseOut(str, baseIn, baseOut,
|
|
82458
|
+
function toBaseOut(str, baseIn, baseOut, alphabet2) {
|
|
82309
82459
|
var j, arr = [0], arrL, i2 = 0, len2 = str.length;
|
|
82310
82460
|
for (; i2 < len2; ) {
|
|
82311
82461
|
for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
|
|
82312
|
-
arr[0] +=
|
|
82462
|
+
arr[0] += alphabet2.indexOf(str.charAt(i2++));
|
|
82313
82463
|
for (j = 0; j < arr.length; j++) {
|
|
82314
82464
|
if (arr[j] > baseOut - 1) {
|
|
82315
82465
|
if (arr[j + 1] == null) arr[j + 1] = 0;
|
|
@@ -82321,7 +82471,7 @@ function requireBignumber() {
|
|
|
82321
82471
|
return arr.reverse();
|
|
82322
82472
|
}
|
|
82323
82473
|
return function(str, baseIn, baseOut, sign2, callerIsToString) {
|
|
82324
|
-
var
|
|
82474
|
+
var alphabet2, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
|
|
82325
82475
|
if (i2 >= 0) {
|
|
82326
82476
|
k = POW_PRECISION;
|
|
82327
82477
|
POW_PRECISION = 0;
|
|
@@ -82337,10 +82487,10 @@ function requireBignumber() {
|
|
|
82337
82487
|
);
|
|
82338
82488
|
y.e = y.c.length;
|
|
82339
82489
|
}
|
|
82340
|
-
xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (
|
|
82490
|
+
xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet2 = ALPHABET, decimal) : (alphabet2 = decimal, ALPHABET));
|
|
82341
82491
|
e2 = k = xc.length;
|
|
82342
82492
|
for (; xc[--k] == 0; xc.pop()) ;
|
|
82343
|
-
if (!xc[0]) return
|
|
82493
|
+
if (!xc[0]) return alphabet2.charAt(0);
|
|
82344
82494
|
if (i2 < 0) {
|
|
82345
82495
|
--e2;
|
|
82346
82496
|
} else {
|
|
@@ -82358,7 +82508,7 @@ function requireBignumber() {
|
|
|
82358
82508
|
r2 = r2 || d < 0 || xc[d + 1] != null;
|
|
82359
82509
|
r2 = rm < 4 ? (i2 != null || r2) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i2 > k || i2 == k && (rm == 4 || r2 || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
|
|
82360
82510
|
if (d < 1 || !xc[0]) {
|
|
82361
|
-
str = r2 ? toFixedPoint2(
|
|
82511
|
+
str = r2 ? toFixedPoint2(alphabet2.charAt(1), -dp, alphabet2.charAt(0)) : alphabet2.charAt(0);
|
|
82362
82512
|
} else {
|
|
82363
82513
|
xc.length = d;
|
|
82364
82514
|
if (r2) {
|
|
@@ -82371,8 +82521,8 @@ function requireBignumber() {
|
|
|
82371
82521
|
}
|
|
82372
82522
|
}
|
|
82373
82523
|
for (k = xc.length; !xc[--k]; ) ;
|
|
82374
|
-
for (i2 = 0, str = ""; i2 <= k; str +=
|
|
82375
|
-
str = toFixedPoint2(str, e2,
|
|
82524
|
+
for (i2 = 0, str = ""; i2 <= k; str += alphabet2.charAt(xc[i2++])) ;
|
|
82525
|
+
str = toFixedPoint2(str, e2, alphabet2.charAt(0));
|
|
82376
82526
|
}
|
|
82377
82527
|
return str;
|
|
82378
82528
|
};
|
|
@@ -103101,22 +103251,22 @@ async function getDecoder(fileDirectory) {
|
|
|
103101
103251
|
const Decoder = await importFn();
|
|
103102
103252
|
return new Decoder(fileDirectory);
|
|
103103
103253
|
}
|
|
103104
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
103105
|
-
addDecoder(5, () => import("./lzw-
|
|
103254
|
+
addDecoder([void 0, 1], () => import("./raw-8fYhxxrk.js").then((m) => m.default));
|
|
103255
|
+
addDecoder(5, () => import("./lzw-Ct-TYyMz.js").then((m) => m.default));
|
|
103106
103256
|
addDecoder(6, () => {
|
|
103107
103257
|
throw new Error("old style JPEG compression is not supported.");
|
|
103108
103258
|
});
|
|
103109
|
-
addDecoder(7, () => import("./jpeg-
|
|
103110
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
103111
|
-
addDecoder(32773, () => import("./packbits-
|
|
103259
|
+
addDecoder(7, () => import("./jpeg-BYVxEYfP.js").then((m) => m.default));
|
|
103260
|
+
addDecoder([8, 32946], () => import("./deflate-CUv0cX0x.js").then((m) => m.default));
|
|
103261
|
+
addDecoder(32773, () => import("./packbits-IsjL89d4.js").then((m) => m.default));
|
|
103112
103262
|
addDecoder(
|
|
103113
103263
|
34887,
|
|
103114
|
-
() => import("./lerc-
|
|
103264
|
+
() => import("./lerc-CwhwXnAs.js").then(async (m) => {
|
|
103115
103265
|
await m.zstd.init();
|
|
103116
103266
|
return m;
|
|
103117
103267
|
}).then((m) => m.default)
|
|
103118
103268
|
);
|
|
103119
|
-
addDecoder(50001, () => import("./webimage-
|
|
103269
|
+
addDecoder(50001, () => import("./webimage-BZn38dU8.js").then((m) => m.default));
|
|
103120
103270
|
function copyNewSize(array, width2, height2, samplesPerPixel = 1) {
|
|
103121
103271
|
return new (Object.getPrototypeOf(array)).constructor(width2 * height2 * samplesPerPixel);
|
|
103122
103272
|
}
|
|
@@ -104050,7 +104200,7 @@ class GeoTIFFImage {
|
|
|
104050
104200
|
}
|
|
104051
104201
|
}
|
|
104052
104202
|
}
|
|
104053
|
-
class DataView64 {
|
|
104203
|
+
let DataView64$1 = class DataView64 {
|
|
104054
104204
|
constructor(arrayBuffer2) {
|
|
104055
104205
|
this._dataView = new DataView(arrayBuffer2);
|
|
104056
104206
|
}
|
|
@@ -104129,7 +104279,7 @@ class DataView64 {
|
|
|
104129
104279
|
getFloat64(offset2, littleEndian) {
|
|
104130
104280
|
return this._dataView.getFloat64(offset2, littleEndian);
|
|
104131
104281
|
}
|
|
104132
|
-
}
|
|
104282
|
+
};
|
|
104133
104283
|
class DataSlice {
|
|
104134
104284
|
constructor(arrayBuffer2, sliceOffset, littleEndian, bigTiff) {
|
|
104135
104285
|
this._dataView = new DataView(arrayBuffer2);
|
|
@@ -105814,7 +105964,7 @@ class GeoTIFF extends GeoTIFFBase {
|
|
|
105814
105964
|
*/
|
|
105815
105965
|
static async fromSource(source, options, signal) {
|
|
105816
105966
|
const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];
|
|
105817
|
-
const dataView = new DataView64(headerData);
|
|
105967
|
+
const dataView = new DataView64$1(headerData);
|
|
105818
105968
|
const BOM = dataView.getUint16(0, 0);
|
|
105819
105969
|
let littleEndian;
|
|
105820
105970
|
if (BOM === 18761) {
|
|
@@ -110386,15 +110536,15 @@ const adler32 = (adler, buf, len2, pos) => {
|
|
|
110386
110536
|
};
|
|
110387
110537
|
var adler32_1 = adler32;
|
|
110388
110538
|
const makeTable = () => {
|
|
110389
|
-
let c,
|
|
110539
|
+
let c, table2 = [];
|
|
110390
110540
|
for (var n3 = 0; n3 < 256; n3++) {
|
|
110391
110541
|
c = n3;
|
|
110392
110542
|
for (var k = 0; k < 8; k++) {
|
|
110393
110543
|
c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
110394
110544
|
}
|
|
110395
|
-
|
|
110545
|
+
table2[n3] = c;
|
|
110396
110546
|
}
|
|
110397
|
-
return
|
|
110547
|
+
return table2;
|
|
110398
110548
|
};
|
|
110399
110549
|
const crcTable = new Uint32Array(makeTable());
|
|
110400
110550
|
const crc32 = (crc, buf, len2, pos) => {
|
|
@@ -112202,7 +112352,7 @@ const dext = new Uint8Array([
|
|
|
112202
112352
|
64,
|
|
112203
112353
|
64
|
|
112204
112354
|
]);
|
|
112205
|
-
const inflate_table = (type, lens2, lens_index, codes,
|
|
112355
|
+
const inflate_table = (type, lens2, lens_index, codes, table2, table_index, work, opts) => {
|
|
112206
112356
|
const bits = opts.bits;
|
|
112207
112357
|
let len2 = 0;
|
|
112208
112358
|
let sym = 0;
|
|
@@ -112242,8 +112392,8 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
112242
112392
|
root2 = max2;
|
|
112243
112393
|
}
|
|
112244
112394
|
if (max2 === 0) {
|
|
112245
|
-
|
|
112246
|
-
|
|
112395
|
+
table2[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
112396
|
+
table2[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
112247
112397
|
opts.bits = 1;
|
|
112248
112398
|
return 0;
|
|
112249
112399
|
}
|
|
@@ -112318,7 +112468,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
112318
112468
|
min2 = fill;
|
|
112319
112469
|
do {
|
|
112320
112470
|
fill -= incr;
|
|
112321
|
-
|
|
112471
|
+
table2[next4 + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
|
|
112322
112472
|
} while (fill !== 0);
|
|
112323
112473
|
incr = 1 << len2 - 1;
|
|
112324
112474
|
while (huff & incr) {
|
|
@@ -112357,11 +112507,11 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
112357
112507
|
return 1;
|
|
112358
112508
|
}
|
|
112359
112509
|
low = huff & mask;
|
|
112360
|
-
|
|
112510
|
+
table2[low] = root2 << 24 | curr << 16 | next4 - table_index | 0;
|
|
112361
112511
|
}
|
|
112362
112512
|
}
|
|
112363
112513
|
if (huff !== 0) {
|
|
112364
|
-
|
|
112514
|
+
table2[next4 + huff] = len2 - drop << 24 | 64 << 16 | 0;
|
|
112365
112515
|
}
|
|
112366
112516
|
opts.bits = root2;
|
|
112367
112517
|
return 0;
|
|
@@ -114748,13 +114898,13 @@ var blosc_codec = function() {
|
|
|
114748
114898
|
}();
|
|
114749
114899
|
var __isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
114750
114900
|
var __toBinary = __isNode ? (base64) => new Uint8Array(Buffer.from(base64, "base64")) : /* @__PURE__ */ (() => {
|
|
114751
|
-
var
|
|
114752
|
-
for (var i2 = 0; i2 < 64; i2++)
|
|
114901
|
+
var table2 = new Uint8Array(128);
|
|
114902
|
+
for (var i2 = 0; i2 < 64; i2++) table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
114753
114903
|
return (base64) => {
|
|
114754
114904
|
var n3 = base64.length, bytes = new Uint8Array((n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0);
|
|
114755
114905
|
for (var i3 = 0, j = 0; i3 < n3; ) {
|
|
114756
|
-
var c0 =
|
|
114757
|
-
var c2 =
|
|
114906
|
+
var c0 = table2[base64.charCodeAt(i3++)], c1 = table2[base64.charCodeAt(i3++)];
|
|
114907
|
+
var c2 = table2[base64.charCodeAt(i3++)], c3 = table2[base64.charCodeAt(i3++)];
|
|
114758
114908
|
bytes[j++] = c0 << 2 | c1 >> 4;
|
|
114759
114909
|
bytes[j++] = c1 << 4 | c2 >> 2;
|
|
114760
114910
|
bytes[j++] = c2 << 6 | c3;
|
|
@@ -121461,7 +121611,7 @@ function clone$3(configObject) {
|
|
|
121461
121611
|
suffix: ""
|
|
121462
121612
|
}, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
|
|
121463
121613
|
function BigNumber2(v, b) {
|
|
121464
|
-
var
|
|
121614
|
+
var alphabet2, c, caseChanged, e2, i2, isNum, len2, str, x = this;
|
|
121465
121615
|
if (!(x instanceof BigNumber2)) return new BigNumber2(v, b);
|
|
121466
121616
|
if (b == null) {
|
|
121467
121617
|
if (v && v._isBigNumber === true) {
|
|
@@ -121517,10 +121667,10 @@ function clone$3(configObject) {
|
|
|
121517
121667
|
} else {
|
|
121518
121668
|
x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
|
|
121519
121669
|
}
|
|
121520
|
-
|
|
121670
|
+
alphabet2 = ALPHABET.slice(0, b);
|
|
121521
121671
|
e2 = i2 = 0;
|
|
121522
121672
|
for (len2 = str.length; i2 < len2; i2++) {
|
|
121523
|
-
if (
|
|
121673
|
+
if (alphabet2.indexOf(c = str.charAt(i2)) < 0) {
|
|
121524
121674
|
if (c == ".") {
|
|
121525
121675
|
if (i2 > e2) {
|
|
121526
121676
|
e2 = len2;
|
|
@@ -121791,11 +121941,11 @@ function clone$3(configObject) {
|
|
|
121791
121941
|
};
|
|
121792
121942
|
convertBase2 = /* @__PURE__ */ function() {
|
|
121793
121943
|
var decimal = "0123456789";
|
|
121794
|
-
function toBaseOut(str, baseIn, baseOut,
|
|
121944
|
+
function toBaseOut(str, baseIn, baseOut, alphabet2) {
|
|
121795
121945
|
var j, arr = [0], arrL, i2 = 0, len2 = str.length;
|
|
121796
121946
|
for (; i2 < len2; ) {
|
|
121797
121947
|
for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
|
|
121798
|
-
arr[0] +=
|
|
121948
|
+
arr[0] += alphabet2.indexOf(str.charAt(i2++));
|
|
121799
121949
|
for (j = 0; j < arr.length; j++) {
|
|
121800
121950
|
if (arr[j] > baseOut - 1) {
|
|
121801
121951
|
if (arr[j + 1] == null) arr[j + 1] = 0;
|
|
@@ -121807,7 +121957,7 @@ function clone$3(configObject) {
|
|
|
121807
121957
|
return arr.reverse();
|
|
121808
121958
|
}
|
|
121809
121959
|
return function(str, baseIn, baseOut, sign2, callerIsToString) {
|
|
121810
|
-
var
|
|
121960
|
+
var alphabet2, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
|
|
121811
121961
|
if (i2 >= 0) {
|
|
121812
121962
|
k = POW_PRECISION;
|
|
121813
121963
|
POW_PRECISION = 0;
|
|
@@ -121823,10 +121973,10 @@ function clone$3(configObject) {
|
|
|
121823
121973
|
);
|
|
121824
121974
|
y.e = y.c.length;
|
|
121825
121975
|
}
|
|
121826
|
-
xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (
|
|
121976
|
+
xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet2 = ALPHABET, decimal) : (alphabet2 = decimal, ALPHABET));
|
|
121827
121977
|
e2 = k = xc.length;
|
|
121828
121978
|
for (; xc[--k] == 0; xc.pop()) ;
|
|
121829
|
-
if (!xc[0]) return
|
|
121979
|
+
if (!xc[0]) return alphabet2.charAt(0);
|
|
121830
121980
|
if (i2 < 0) {
|
|
121831
121981
|
--e2;
|
|
121832
121982
|
} else {
|
|
@@ -121844,7 +121994,7 @@ function clone$3(configObject) {
|
|
|
121844
121994
|
r2 = r2 || d < 0 || xc[d + 1] != null;
|
|
121845
121995
|
r2 = rm < 4 ? (i2 != null || r2) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i2 > k || i2 == k && (rm == 4 || r2 || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
|
|
121846
121996
|
if (d < 1 || !xc[0]) {
|
|
121847
|
-
str = r2 ? toFixedPoint(
|
|
121997
|
+
str = r2 ? toFixedPoint(alphabet2.charAt(1), -dp, alphabet2.charAt(0)) : alphabet2.charAt(0);
|
|
121848
121998
|
} else {
|
|
121849
121999
|
xc.length = d;
|
|
121850
122000
|
if (r2) {
|
|
@@ -121857,8 +122007,8 @@ function clone$3(configObject) {
|
|
|
121857
122007
|
}
|
|
121858
122008
|
}
|
|
121859
122009
|
for (k = xc.length; !xc[--k]; ) ;
|
|
121860
|
-
for (i2 = 0, str = ""; i2 <= k; str +=
|
|
121861
|
-
str = toFixedPoint(str, e2,
|
|
122010
|
+
for (i2 = 0, str = ""; i2 <= k; str += alphabet2.charAt(xc[i2++])) ;
|
|
122011
|
+
str = toFixedPoint(str, e2, alphabet2.charAt(0));
|
|
121862
122012
|
}
|
|
121863
122013
|
return str;
|
|
121864
122014
|
};
|
|
@@ -131692,13 +131842,13 @@ const parseAddition = (str) => {
|
|
|
131692
131842
|
if (!Number.isNaN(+str)) {
|
|
131693
131843
|
return +str;
|
|
131694
131844
|
}
|
|
131695
|
-
const
|
|
131696
|
-
if (!
|
|
131845
|
+
const numbers2 = str.match(/\d*\.?\d+/g);
|
|
131846
|
+
if (!numbers2) {
|
|
131697
131847
|
return 0;
|
|
131698
131848
|
}
|
|
131699
131849
|
let sum2 = 0;
|
|
131700
|
-
for (let i2 = 0; i2 <
|
|
131701
|
-
sum2 += +
|
|
131850
|
+
for (let i2 = 0; i2 < numbers2.length; i2 += 1) {
|
|
131851
|
+
sum2 += +numbers2[i2];
|
|
131702
131852
|
}
|
|
131703
131853
|
return sum2;
|
|
131704
131854
|
};
|
|
@@ -150952,6 +151102,13 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
|
|
|
150952
151102
|
}
|
|
150953
151103
|
return result;
|
|
150954
151104
|
}
|
|
151105
|
+
function getDatasetScale(dataset) {
|
|
151106
|
+
const scales = normalizeCoordinateTransformations(dataset?.coordinateTransformations, null).filter((transform2) => transform2?.type === "scale" && Array.isArray(transform2.scale)).map((transform2) => transform2.scale);
|
|
151107
|
+
if (scales.length === 0) {
|
|
151108
|
+
return void 0;
|
|
151109
|
+
}
|
|
151110
|
+
return scales.reduce((product2, scale2) => product2.map((factor, axis) => factor * scale2[axis]));
|
|
151111
|
+
}
|
|
150955
151112
|
function coordinateTransformationsToMatrixForSpatialData(ngffMetadata, targetCoordinateSystem) {
|
|
150956
151113
|
const { datasets, coordinateTransformations, axes } = ngffMetadata;
|
|
150957
151114
|
const normAxes = normalizeAxes(axes);
|
|
@@ -150973,6 +151130,354 @@ function coordinateTransformationsToMatrixForSpatialData(ngffMetadata, targetCoo
|
|
|
150973
151130
|
const normalizedTransformations = normalizeCoordinateTransformations(filteredTransformations, datasets);
|
|
150974
151131
|
return coordinateTransformationsToMatrix(normalizedTransformations, normAxes);
|
|
150975
151132
|
}
|
|
151133
|
+
const alphabet = "abcdefghijklmnopqrstuvwxyz";
|
|
151134
|
+
const numbers = "01234569789";
|
|
151135
|
+
const expr = "()*/+-";
|
|
151136
|
+
const space = " ";
|
|
151137
|
+
new Set(
|
|
151138
|
+
alphabet + alphabet.toUpperCase() + numbers + expr + space
|
|
151139
|
+
);
|
|
151140
|
+
(() => {
|
|
151141
|
+
var table2 = new Uint8Array(128);
|
|
151142
|
+
for (var i2 = 0; i2 < 64; i2++) {
|
|
151143
|
+
table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
151144
|
+
}
|
|
151145
|
+
return (base64) => {
|
|
151146
|
+
var n3 = base64.length;
|
|
151147
|
+
var bytes = new Uint8Array(
|
|
151148
|
+
// @ts-expect-error
|
|
151149
|
+
(n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0
|
|
151150
|
+
);
|
|
151151
|
+
for (var i22 = 0, j = 0; i22 < n3; ) {
|
|
151152
|
+
var c0 = table2[base64.charCodeAt(i22++)], c1 = table2[base64.charCodeAt(i22++)];
|
|
151153
|
+
var c2 = table2[base64.charCodeAt(i22++)], c3 = table2[base64.charCodeAt(i22++)];
|
|
151154
|
+
bytes[j++] = c0 << 2 | c1 >> 4;
|
|
151155
|
+
bytes[j++] = c1 << 4 | c2 >> 2;
|
|
151156
|
+
bytes[j++] = c2 << 6 | c3;
|
|
151157
|
+
}
|
|
151158
|
+
return bytes;
|
|
151159
|
+
};
|
|
151160
|
+
})();
|
|
151161
|
+
new TextEncoder();
|
|
151162
|
+
function _structure_size(structure) {
|
|
151163
|
+
const fmt = "<" + Array.from(structure.values()).join("");
|
|
151164
|
+
return struct.calcsize(fmt);
|
|
151165
|
+
}
|
|
151166
|
+
function isBigEndian() {
|
|
151167
|
+
const array = new Uint8Array(4);
|
|
151168
|
+
const view = new Uint32Array(array.buffer);
|
|
151169
|
+
return !((view[0] = 1) & array[0]);
|
|
151170
|
+
}
|
|
151171
|
+
function decodeFloat16(low, high) {
|
|
151172
|
+
const sign2 = (high & 128) >> 7;
|
|
151173
|
+
const exponent = (high & 124) >> 2;
|
|
151174
|
+
const fraction2 = ((high & 3) << 8) + low;
|
|
151175
|
+
let magnitude;
|
|
151176
|
+
if (exponent === 31) {
|
|
151177
|
+
magnitude = fraction2 === 0 ? Infinity : NaN;
|
|
151178
|
+
} else if (exponent === 0) {
|
|
151179
|
+
magnitude = 2 ** -14 * (fraction2 / 1024);
|
|
151180
|
+
} else {
|
|
151181
|
+
magnitude = 2 ** (exponent - 15) * (1 + fraction2 / 1024);
|
|
151182
|
+
}
|
|
151183
|
+
return sign2 ? -magnitude : magnitude;
|
|
151184
|
+
}
|
|
151185
|
+
class DataView642 extends DataView {
|
|
151186
|
+
getFloat16(byteOffset, littleEndian) {
|
|
151187
|
+
const bytes = [this.getUint8(byteOffset), this.getUint8(byteOffset + 1)];
|
|
151188
|
+
if (!littleEndian)
|
|
151189
|
+
bytes.reverse();
|
|
151190
|
+
return decodeFloat16(bytes[0], bytes[1]);
|
|
151191
|
+
}
|
|
151192
|
+
getUint64(byteOffset, littleEndian) {
|
|
151193
|
+
const left = BigInt(this.getUint32(byteOffset, littleEndian));
|
|
151194
|
+
const right = BigInt(this.getUint32(byteOffset + 4, littleEndian));
|
|
151195
|
+
const combined = littleEndian ? left + (right << 32n) : (left << 32n) + right;
|
|
151196
|
+
return Number(combined);
|
|
151197
|
+
}
|
|
151198
|
+
getInt64(byteOffset, littleEndian) {
|
|
151199
|
+
let low, high;
|
|
151200
|
+
if (littleEndian) {
|
|
151201
|
+
low = this.getUint32(byteOffset, true);
|
|
151202
|
+
high = this.getInt32(byteOffset + 4, true);
|
|
151203
|
+
} else {
|
|
151204
|
+
high = this.getInt32(byteOffset, false);
|
|
151205
|
+
low = this.getUint32(byteOffset + 4, false);
|
|
151206
|
+
}
|
|
151207
|
+
const combined = BigInt(low) + (BigInt(high) << 32n);
|
|
151208
|
+
return Number(combined);
|
|
151209
|
+
}
|
|
151210
|
+
getString(byteOffset, _littleEndian, length2) {
|
|
151211
|
+
const str_buffer = this.buffer.slice(byteOffset, byteOffset + length2);
|
|
151212
|
+
return new TextDecoder().decode(str_buffer);
|
|
151213
|
+
}
|
|
151214
|
+
getVLENStruct(byteOffset, littleEndian, _length) {
|
|
151215
|
+
const item_size = this.getUint32(byteOffset, littleEndian);
|
|
151216
|
+
const collection_address = this.getUint64(byteOffset + 4, littleEndian);
|
|
151217
|
+
const object_index = this.getUint32(byteOffset + 12, littleEndian);
|
|
151218
|
+
return [item_size, collection_address, object_index];
|
|
151219
|
+
}
|
|
151220
|
+
}
|
|
151221
|
+
class Struct {
|
|
151222
|
+
big_endian;
|
|
151223
|
+
getters;
|
|
151224
|
+
byte_lengths;
|
|
151225
|
+
fmt_size_regex;
|
|
151226
|
+
constructor() {
|
|
151227
|
+
this.big_endian = isBigEndian();
|
|
151228
|
+
this.getters = {
|
|
151229
|
+
s: "getUint8",
|
|
151230
|
+
b: "getInt8",
|
|
151231
|
+
B: "getUint8",
|
|
151232
|
+
h: "getInt16",
|
|
151233
|
+
H: "getUint16",
|
|
151234
|
+
i: "getInt32",
|
|
151235
|
+
I: "getUint32",
|
|
151236
|
+
l: "getInt32",
|
|
151237
|
+
L: "getUint32",
|
|
151238
|
+
q: "getInt64",
|
|
151239
|
+
Q: "getUint64",
|
|
151240
|
+
e: "getFloat16",
|
|
151241
|
+
f: "getFloat32",
|
|
151242
|
+
d: "getFloat64"
|
|
151243
|
+
};
|
|
151244
|
+
this.byte_lengths = {
|
|
151245
|
+
s: 1,
|
|
151246
|
+
b: 1,
|
|
151247
|
+
B: 1,
|
|
151248
|
+
h: 2,
|
|
151249
|
+
H: 2,
|
|
151250
|
+
i: 4,
|
|
151251
|
+
I: 4,
|
|
151252
|
+
l: 4,
|
|
151253
|
+
L: 4,
|
|
151254
|
+
q: 8,
|
|
151255
|
+
Q: 8,
|
|
151256
|
+
e: 2,
|
|
151257
|
+
f: 4,
|
|
151258
|
+
d: 8
|
|
151259
|
+
};
|
|
151260
|
+
const all_formats = Object.keys(this.byte_lengths).join("");
|
|
151261
|
+
this.fmt_size_regex = "(\\d*)([" + all_formats + "])";
|
|
151262
|
+
}
|
|
151263
|
+
calcsize(fmt) {
|
|
151264
|
+
let size2 = 0;
|
|
151265
|
+
const regex = new RegExp(this.fmt_size_regex, "g");
|
|
151266
|
+
let match2;
|
|
151267
|
+
while ((match2 = regex.exec(fmt)) !== null) {
|
|
151268
|
+
const n3 = parseInt(match2[1] || "1", 10);
|
|
151269
|
+
const f2 = match2[2];
|
|
151270
|
+
size2 += n3 * this.byte_lengths[f2];
|
|
151271
|
+
}
|
|
151272
|
+
return size2;
|
|
151273
|
+
}
|
|
151274
|
+
_is_big_endian(fmt) {
|
|
151275
|
+
if (/^</.test(fmt))
|
|
151276
|
+
return false;
|
|
151277
|
+
if (/^(!|>)/.test(fmt))
|
|
151278
|
+
return true;
|
|
151279
|
+
return this.big_endian;
|
|
151280
|
+
}
|
|
151281
|
+
unpack_from(fmt, buffer2, offset2) {
|
|
151282
|
+
offset2 = Number(offset2 || 0);
|
|
151283
|
+
const view = new DataView642(buffer2, 0);
|
|
151284
|
+
const output = [];
|
|
151285
|
+
const big_endian = this._is_big_endian(fmt);
|
|
151286
|
+
const regex = new RegExp(this.fmt_size_regex, "g");
|
|
151287
|
+
let match2;
|
|
151288
|
+
while ((match2 = regex.exec(fmt)) !== null) {
|
|
151289
|
+
const n3 = parseInt(match2[1] || "1", 10);
|
|
151290
|
+
const f2 = match2[2];
|
|
151291
|
+
const getter = this.getters[f2];
|
|
151292
|
+
const size2 = this.byte_lengths[f2];
|
|
151293
|
+
if (f2 === "s") {
|
|
151294
|
+
output.push(new TextDecoder().decode(buffer2.slice(offset2, offset2 + n3)));
|
|
151295
|
+
offset2 += n3;
|
|
151296
|
+
} else {
|
|
151297
|
+
for (let i2 = 0; i2 < n3; i2++) {
|
|
151298
|
+
output.push(view[getter](offset2, !big_endian));
|
|
151299
|
+
offset2 += size2;
|
|
151300
|
+
}
|
|
151301
|
+
}
|
|
151302
|
+
}
|
|
151303
|
+
return output;
|
|
151304
|
+
}
|
|
151305
|
+
}
|
|
151306
|
+
const struct = new Struct();
|
|
151307
|
+
const DATATYPE_MSG = /* @__PURE__ */ new Map([
|
|
151308
|
+
["class_and_version", "B"],
|
|
151309
|
+
["class_bit_field_0", "B"],
|
|
151310
|
+
["class_bit_field_1", "B"],
|
|
151311
|
+
["class_bit_field_2", "B"],
|
|
151312
|
+
["size", "I"]
|
|
151313
|
+
]);
|
|
151314
|
+
_structure_size(DATATYPE_MSG);
|
|
151315
|
+
const B_LINK_NODE_V1 = /* @__PURE__ */ new Map([
|
|
151316
|
+
["signature", "4s"],
|
|
151317
|
+
["node_type", "B"],
|
|
151318
|
+
["node_level", "B"],
|
|
151319
|
+
["entries_used", "H"],
|
|
151320
|
+
["left_sibling", "Q"],
|
|
151321
|
+
["right_sibling", "Q"]
|
|
151322
|
+
]);
|
|
151323
|
+
_structure_size(B_LINK_NODE_V1);
|
|
151324
|
+
const B_LINK_NODE_V2 = /* @__PURE__ */ new Map([
|
|
151325
|
+
["signature", "4s"],
|
|
151326
|
+
["version", "B"],
|
|
151327
|
+
["node_type", "B"]
|
|
151328
|
+
]);
|
|
151329
|
+
_structure_size(B_LINK_NODE_V2);
|
|
151330
|
+
struct.unpack_from("8s", new Uint8Array([137, 72, 68, 70, 13, 10, 26, 10]).buffer)[0];
|
|
151331
|
+
struct.unpack_from("<Q", new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]).buffer)[0];
|
|
151332
|
+
const SUPERBLOCK_V0 = /* @__PURE__ */ new Map([
|
|
151333
|
+
["format_signature", "8s"],
|
|
151334
|
+
["superblock_version", "B"],
|
|
151335
|
+
["free_storage_version", "B"],
|
|
151336
|
+
["root_group_version", "B"],
|
|
151337
|
+
["reserved_0", "B"],
|
|
151338
|
+
["shared_header_version", "B"],
|
|
151339
|
+
["offset_size", "B"],
|
|
151340
|
+
["length_size", "B"],
|
|
151341
|
+
["reserved_1", "B"],
|
|
151342
|
+
["group_leaf_node_k", "H"],
|
|
151343
|
+
["group_internal_node_k", "H"],
|
|
151344
|
+
["file_consistency_flags", "L"],
|
|
151345
|
+
["base_address_lower", "Q"],
|
|
151346
|
+
["free_space_address", "Q"],
|
|
151347
|
+
["end_of_file_address", "Q"],
|
|
151348
|
+
["driver_information_address", "Q"]
|
|
151349
|
+
]);
|
|
151350
|
+
_structure_size(SUPERBLOCK_V0);
|
|
151351
|
+
const SUPERBLOCK_V2_V3 = /* @__PURE__ */ new Map([
|
|
151352
|
+
["format_signature", "8s"],
|
|
151353
|
+
["superblock_version", "B"],
|
|
151354
|
+
["offset_size", "B"],
|
|
151355
|
+
["length_size", "B"],
|
|
151356
|
+
["file_consistency_flags", "B"],
|
|
151357
|
+
["base_address", "Q"],
|
|
151358
|
+
["superblock_extension_address", "Q"],
|
|
151359
|
+
["end_of_file_address", "Q"],
|
|
151360
|
+
["root_group_address", "Q"],
|
|
151361
|
+
["superblock_checksum", "I"]
|
|
151362
|
+
]);
|
|
151363
|
+
_structure_size(SUPERBLOCK_V2_V3);
|
|
151364
|
+
const SYMBOL_TABLE_ENTRY = /* @__PURE__ */ new Map([
|
|
151365
|
+
["link_name_offset", "Q"],
|
|
151366
|
+
["object_header_address", "Q"],
|
|
151367
|
+
["cache_type", "I"],
|
|
151368
|
+
["reserved", "I"],
|
|
151369
|
+
["scratch", "16s"]
|
|
151370
|
+
]);
|
|
151371
|
+
_structure_size(SYMBOL_TABLE_ENTRY);
|
|
151372
|
+
const SYMBOL_TABLE_NODE = /* @__PURE__ */ new Map([
|
|
151373
|
+
["signature", "4s"],
|
|
151374
|
+
["version", "B"],
|
|
151375
|
+
["reserved_0", "B"],
|
|
151376
|
+
["symbols", "H"]
|
|
151377
|
+
]);
|
|
151378
|
+
_structure_size(SYMBOL_TABLE_NODE);
|
|
151379
|
+
const GLOBAL_HEAP_HEADER = /* @__PURE__ */ new Map([
|
|
151380
|
+
["signature", "4s"],
|
|
151381
|
+
["version", "B"],
|
|
151382
|
+
["reserved", "3s"],
|
|
151383
|
+
["collection_size", "Q"]
|
|
151384
|
+
]);
|
|
151385
|
+
_structure_size(GLOBAL_HEAP_HEADER);
|
|
151386
|
+
const GLOBAL_HEAP_OBJECT = /* @__PURE__ */ new Map([
|
|
151387
|
+
["object_index", "H"],
|
|
151388
|
+
["reference_count", "H"],
|
|
151389
|
+
["reserved", "I"],
|
|
151390
|
+
["object_size", "Q"]
|
|
151391
|
+
]);
|
|
151392
|
+
_structure_size(GLOBAL_HEAP_OBJECT);
|
|
151393
|
+
const OBJECT_HEADER_V1 = /* @__PURE__ */ new Map([
|
|
151394
|
+
["version", "B"],
|
|
151395
|
+
["reserved", "B"],
|
|
151396
|
+
["total_header_messages", "H"],
|
|
151397
|
+
["object_reference_count", "I"],
|
|
151398
|
+
["object_header_size", "I"],
|
|
151399
|
+
["padding", "I"]
|
|
151400
|
+
]);
|
|
151401
|
+
_structure_size(OBJECT_HEADER_V1);
|
|
151402
|
+
const OBJECT_HEADER_V2 = /* @__PURE__ */ new Map([
|
|
151403
|
+
["signature", "4s"],
|
|
151404
|
+
["version", "B"],
|
|
151405
|
+
["flags", "B"]
|
|
151406
|
+
]);
|
|
151407
|
+
_structure_size(OBJECT_HEADER_V2);
|
|
151408
|
+
const HEADER_MSG_INFO_V1 = /* @__PURE__ */ new Map([
|
|
151409
|
+
["type", "H"],
|
|
151410
|
+
["size", "H"],
|
|
151411
|
+
["flags", "B"],
|
|
151412
|
+
["reserved", "3s"]
|
|
151413
|
+
]);
|
|
151414
|
+
_structure_size(HEADER_MSG_INFO_V1);
|
|
151415
|
+
const HEADER_MSG_INFO_V2 = /* @__PURE__ */ new Map([
|
|
151416
|
+
["type", "B"],
|
|
151417
|
+
["size", "H"],
|
|
151418
|
+
["flags", "B"]
|
|
151419
|
+
]);
|
|
151420
|
+
_structure_size(HEADER_MSG_INFO_V2);
|
|
151421
|
+
const ATTR_MSG_HEADER_V1 = /* @__PURE__ */ new Map([
|
|
151422
|
+
["version", "B"],
|
|
151423
|
+
["reserved", "B"],
|
|
151424
|
+
["name_size", "H"],
|
|
151425
|
+
["datatype_size", "H"],
|
|
151426
|
+
["dataspace_size", "H"]
|
|
151427
|
+
]);
|
|
151428
|
+
_structure_size(ATTR_MSG_HEADER_V1);
|
|
151429
|
+
const ATTR_MSG_HEADER_V3 = /* @__PURE__ */ new Map([
|
|
151430
|
+
["version", "B"],
|
|
151431
|
+
["flags", "B"],
|
|
151432
|
+
["name_size", "H"],
|
|
151433
|
+
["datatype_size", "H"],
|
|
151434
|
+
["dataspace_size", "H"],
|
|
151435
|
+
["character_set_encoding", "B"]
|
|
151436
|
+
]);
|
|
151437
|
+
_structure_size(ATTR_MSG_HEADER_V3);
|
|
151438
|
+
const DATASPACE_MSG_HEADER_V1 = /* @__PURE__ */ new Map([
|
|
151439
|
+
["version", "B"],
|
|
151440
|
+
["dimensionality", "B"],
|
|
151441
|
+
["flags", "B"],
|
|
151442
|
+
["reserved_0", "B"],
|
|
151443
|
+
["reserved_1", "I"]
|
|
151444
|
+
]);
|
|
151445
|
+
_structure_size(DATASPACE_MSG_HEADER_V1);
|
|
151446
|
+
const DATASPACE_MSG_HEADER_V2 = /* @__PURE__ */ new Map([
|
|
151447
|
+
["version", "B"],
|
|
151448
|
+
["dimensionality", "B"],
|
|
151449
|
+
["flags", "B"],
|
|
151450
|
+
["type", "B"]
|
|
151451
|
+
]);
|
|
151452
|
+
_structure_size(DATASPACE_MSG_HEADER_V2);
|
|
151453
|
+
const FILLVAL_MSG_V1V2 = /* @__PURE__ */ new Map([
|
|
151454
|
+
["version", "B"],
|
|
151455
|
+
["space_allocation_time", "B"],
|
|
151456
|
+
["fillvalue_write_time", "B"],
|
|
151457
|
+
["fillvalue_defined", "B"]
|
|
151458
|
+
]);
|
|
151459
|
+
_structure_size(FILLVAL_MSG_V1V2);
|
|
151460
|
+
const FILLVAL_MSG_V3 = /* @__PURE__ */ new Map([
|
|
151461
|
+
["version", "B"],
|
|
151462
|
+
["flags", "B"]
|
|
151463
|
+
]);
|
|
151464
|
+
_structure_size(FILLVAL_MSG_V3);
|
|
151465
|
+
const FILTER_PIPELINE_DESCR_V1 = /* @__PURE__ */ new Map([
|
|
151466
|
+
["filter_id", "H"],
|
|
151467
|
+
["name_length", "H"],
|
|
151468
|
+
["flags", "H"],
|
|
151469
|
+
["client_data_values", "H"]
|
|
151470
|
+
]);
|
|
151471
|
+
_structure_size(FILTER_PIPELINE_DESCR_V1);
|
|
151472
|
+
const GLOBAL_HEAP_ID = /* @__PURE__ */ new Map([
|
|
151473
|
+
["collection_address", "Q"],
|
|
151474
|
+
["object_index", "I"]
|
|
151475
|
+
]);
|
|
151476
|
+
_structure_size(GLOBAL_HEAP_ID);
|
|
151477
|
+
let table = new Uint8Array(128);
|
|
151478
|
+
for (let i2 = 0; i2 < 64; i2++) {
|
|
151479
|
+
table[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
|
|
151480
|
+
}
|
|
150976
151481
|
function getDomains() {
|
|
150977
151482
|
const domains = {};
|
|
150978
151483
|
const needMin = ["Int8", "Int16", "Int32"];
|
|
@@ -150984,6 +151489,36 @@ function getDomains() {
|
|
|
150984
151489
|
return domains;
|
|
150985
151490
|
}
|
|
150986
151491
|
getDomains();
|
|
151492
|
+
function getFirstPlaneSelection(labels) {
|
|
151493
|
+
return Object.fromEntries(labels.filter((axis) => axis !== "y" && axis !== "x").map((axis) => [axis, 0]));
|
|
151494
|
+
}
|
|
151495
|
+
async function readTiffTileShape(pixelSource) {
|
|
151496
|
+
const image = await pixelSource._indexer(getFirstPlaneSelection(pixelSource.labels));
|
|
151497
|
+
return [image.getTileHeight(), image.getTileWidth()];
|
|
151498
|
+
}
|
|
151499
|
+
async function readTiffSampleRange(pixelSource) {
|
|
151500
|
+
try {
|
|
151501
|
+
const image = await pixelSource._indexer(getFirstPlaneSelection(pixelSource.labels));
|
|
151502
|
+
const directory = image?.fileDirectory ?? {};
|
|
151503
|
+
const fromTag = (value, reduce) => value === void 0 || typeof value === "number" ? value : reduce(...Array.from(value));
|
|
151504
|
+
let min2 = fromTag(directory.SMinSampleValue, Math.min);
|
|
151505
|
+
let max2 = fromTag(directory.SMaxSampleValue, Math.max);
|
|
151506
|
+
const description = directory.ImageDescription;
|
|
151507
|
+
if (!(Number.isFinite(min2) && Number.isFinite(max2)) && typeof description === "string") {
|
|
151508
|
+
const fromXml = (key) => Number(description.match(new RegExp(`<Key>${key}</Key>\\s*<Value>([^<]*)</Value>`))?.[1]);
|
|
151509
|
+
min2 = fromXml("SMinSampleValue");
|
|
151510
|
+
max2 = fromXml("SMaxSampleValue");
|
|
151511
|
+
}
|
|
151512
|
+
return Number.isFinite(min2) && Number.isFinite(max2) && max2 > min2 ? [min2, max2] : null;
|
|
151513
|
+
} catch (error2) {
|
|
151514
|
+
return null;
|
|
151515
|
+
}
|
|
151516
|
+
}
|
|
151517
|
+
function getOmeroWindow(window2) {
|
|
151518
|
+
const start = window2?.start ?? window2?.min;
|
|
151519
|
+
const end = window2?.end ?? window2?.max;
|
|
151520
|
+
return Number.isFinite(start) && Number.isFinite(end) && end > start ? [start, end] : void 0;
|
|
151521
|
+
}
|
|
150987
151522
|
class ImageWrapper {
|
|
150988
151523
|
vivLoader;
|
|
150989
151524
|
options;
|
|
@@ -151170,7 +151705,7 @@ class ImageWrapper {
|
|
|
151170
151705
|
return channels2.map((channel, i2) => ({
|
|
151171
151706
|
name: channel.label || `Channel ${i2}`,
|
|
151172
151707
|
defaultColor: channel.color ? hexToRgb(channel.color) : void 0,
|
|
151173
|
-
defaultWindow: channel.window
|
|
151708
|
+
defaultWindow: getOmeroWindow(channel.window),
|
|
151174
151709
|
autoDefaultColor: VIEWER_PALETTE[i2 % VIEWER_PALETTE.length]
|
|
151175
151710
|
}));
|
|
151176
151711
|
}
|
|
@@ -151325,9 +151860,17 @@ class ImageWrapper {
|
|
|
151325
151860
|
];
|
|
151326
151861
|
return [xSlice, ySlice, zSlice];
|
|
151327
151862
|
}
|
|
151863
|
+
/**
|
|
151864
|
+
* Whether the last dimension holds interleaved RGB(A) samples.
|
|
151865
|
+
* viv labels it '_c' (OME-TIFF). When the last label is 'x',
|
|
151866
|
+
* the image is not interleaved, even if it is 3 or 4 pixels wide.
|
|
151867
|
+
*/
|
|
151328
151868
|
isInterleaved() {
|
|
151329
151869
|
const loader = this.vivLoader;
|
|
151330
|
-
const { shape: shape2 } = Array.isArray(loader.data) ? loader.data[0] : loader.data;
|
|
151870
|
+
const { shape: shape2, labels } = Array.isArray(loader.data) ? loader.data[0] : loader.data;
|
|
151871
|
+
if (labels?.length === shape2.length && labels.at(-1) === "x") {
|
|
151872
|
+
return false;
|
|
151873
|
+
}
|
|
151331
151874
|
return isInterleaved(shape2);
|
|
151332
151875
|
}
|
|
151333
151876
|
getPhotometricInterpretation() {
|
|
@@ -151353,26 +151896,104 @@ class ImageWrapper {
|
|
|
151353
151896
|
return "BlackIsZero";
|
|
151354
151897
|
}
|
|
151355
151898
|
/**
|
|
151356
|
-
*
|
|
151357
|
-
* OME-TIFF: physicalSizeToMatrix divides by 1
|
|
151358
|
-
* (only when physical sizes exist;
|
|
151359
|
-
*
|
|
151899
|
+
* The unit of the 3D scene, i.e. of getModelMatrix() and getVoxelSpacing().
|
|
151900
|
+
* OME-TIFF: physicalSizeToMatrix divides by 1 µm, so the scene is in µm,
|
|
151901
|
+
* whatever PhysicalSizeXUnit is (only when physical sizes exist;
|
|
151902
|
+
* otherwise pixels, unit unknown → null).
|
|
151903
|
+
* OME-Zarr: the model matrix is in the units of the NGFF axes, as spelled
|
|
151904
|
+
* there (e.g. 'micrometer').
|
|
151360
151905
|
*/
|
|
151361
|
-
|
|
151906
|
+
getSpatialUnit() {
|
|
151362
151907
|
const { metadata } = this.vivLoader;
|
|
151363
151908
|
if (!metadata)
|
|
151364
151909
|
return null;
|
|
151365
151910
|
if ("Pixels" in metadata) {
|
|
151366
|
-
return this.hasPhysicalSize() ?
|
|
151911
|
+
return this.hasPhysicalSize() ? "µm" : null;
|
|
151367
151912
|
}
|
|
151368
151913
|
if ("multiscales" in metadata) {
|
|
151369
151914
|
const axes = metadata.multiscales?.[0]?.axes ?? [];
|
|
151370
151915
|
const xAxis = axes.find((a2) => (typeof a2 === "string" ? a2 : a2?.name) === "x");
|
|
151371
|
-
|
|
151372
|
-
return unit2 ? UNIT_TO_METERS[unit2.normalize("NFKC")] ?? null : null;
|
|
151916
|
+
return (typeof xAxis === "object" ? xAxis?.unit : null) || null;
|
|
151373
151917
|
}
|
|
151374
151918
|
return null;
|
|
151375
151919
|
}
|
|
151920
|
+
/**
|
|
151921
|
+
* Meters per 3D scene unit, i.e. the unit of getModelMatrix().
|
|
151922
|
+
* Null when the unit is unknown.
|
|
151923
|
+
*/
|
|
151924
|
+
getSceneMetersPerUnit() {
|
|
151925
|
+
const unit2 = this.getSpatialUnit();
|
|
151926
|
+
return unit2 ? UNIT_TO_METERS[unit2.normalize("NFKC")] ?? null : null;
|
|
151927
|
+
}
|
|
151928
|
+
/**
|
|
151929
|
+
* Level-0 voxel size, ZYX, in units of getSpatialUnit(): the scale of each
|
|
151930
|
+
* axis of getModelMatrix() (including transforms from the file options),
|
|
151931
|
+
* times the scale of the non-standard root-level coordinateTransformations
|
|
151932
|
+
* that some converted OME-Zarr datasets (e.g. kingsnake, f8ii, melanoma) use
|
|
151933
|
+
* for their physical spacing. getModelMatrix() itself ignores the latter.
|
|
151934
|
+
*/
|
|
151935
|
+
getVoxelSpacing() {
|
|
151936
|
+
const modelMatrix2 = this.getModelMatrix();
|
|
151937
|
+
const spacing = [8, 4, 0].map((i2) => Math.hypot(modelMatrix2[i2], modelMatrix2[i2 + 1], modelMatrix2[i2 + 2]) || 1);
|
|
151938
|
+
const { metadata } = this.vivLoader;
|
|
151939
|
+
const rootScale = metadata?.coordinateTransformations?.find((t) => t?.type === "scale")?.scale;
|
|
151940
|
+
if (Array.isArray(rootScale) && rootScale.length >= 3) {
|
|
151941
|
+
rootScale.slice(-3).forEach((value, axis) => {
|
|
151942
|
+
if (Number.isFinite(value) && value > 0)
|
|
151943
|
+
spacing[axis] *= value;
|
|
151944
|
+
});
|
|
151945
|
+
}
|
|
151946
|
+
return spacing;
|
|
151947
|
+
}
|
|
151948
|
+
/**
|
|
151949
|
+
* Every resolution level as stored, finest first, with its chunk shape
|
|
151950
|
+
* and, for OME-Zarr, the scale of its multiscales dataset.
|
|
151951
|
+
* For OME-TIFF, the chunk is each level's own TIFF tile, read from its TIFF
|
|
151952
|
+
* directory (viv's tileSize is level 0's for every level).
|
|
151953
|
+
*/
|
|
151954
|
+
async getResolutionLevels() {
|
|
151955
|
+
const { data, metadata } = this.vivLoader;
|
|
151956
|
+
const pixelSources = Array.isArray(data) ? data : [data];
|
|
151957
|
+
if ("Pixels" in metadata) {
|
|
151958
|
+
return Promise.all(pixelSources.map(async (pixelSource) => {
|
|
151959
|
+
const { shape: shape2, labels, dtype } = pixelSource;
|
|
151960
|
+
const [tileHeight, tileWidth] = await readTiffTileShape(pixelSource);
|
|
151961
|
+
const tileShape = { y: tileHeight, x: tileWidth };
|
|
151962
|
+
return {
|
|
151963
|
+
shape: shape2,
|
|
151964
|
+
labels,
|
|
151965
|
+
dtype,
|
|
151966
|
+
chunks: labels.map((axis) => tileShape[axis] ?? 1),
|
|
151967
|
+
data: pixelSource
|
|
151968
|
+
};
|
|
151969
|
+
}));
|
|
151970
|
+
}
|
|
151971
|
+
const datasets = metadata.multiscales?.[0]?.datasets ?? [];
|
|
151972
|
+
return pixelSources.map((pixelSource, i2) => ({
|
|
151973
|
+
shape: pixelSource.shape,
|
|
151974
|
+
labels: pixelSource.labels,
|
|
151975
|
+
dtype: pixelSource.dtype,
|
|
151976
|
+
chunks: pixelSource._data.chunks,
|
|
151977
|
+
scale: getDatasetScale(datasets[i2]),
|
|
151978
|
+
data: pixelSource._data
|
|
151979
|
+
}));
|
|
151980
|
+
}
|
|
151981
|
+
/**
|
|
151982
|
+
* Value range of each channel from the image metadata, in the order of
|
|
151983
|
+
* getChannelObjects(): its defaultWindow, or for OME-TIFF the sample range
|
|
151984
|
+
* the writer recorded in the TIFF (see readTiffSampleRange), which needs a
|
|
151985
|
+
* read of the first TIFF directory. Undefined for channels without either.
|
|
151986
|
+
*/
|
|
151987
|
+
async getChannelWindows() {
|
|
151988
|
+
const windows = this.getChannelObjects().map((channel) => channel.defaultWindow);
|
|
151989
|
+
const { data, metadata } = this.vivLoader;
|
|
151990
|
+
if (!("Pixels" in metadata)) {
|
|
151991
|
+
return windows;
|
|
151992
|
+
}
|
|
151993
|
+
const pixelSource = Array.isArray(data) ? data[0] : data;
|
|
151994
|
+
const sampleRange = await readTiffSampleRange(pixelSource);
|
|
151995
|
+
return sampleRange ? windows.map((window2) => window2 ?? sampleRange) : windows;
|
|
151996
|
+
}
|
|
151376
151997
|
}
|
|
151377
151998
|
class LoaderResult {
|
|
151378
151999
|
/**
|