@loaders.gl/scene 5.0.0-beta.6 → 5.0.0-beta.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/dist.dev.js +989 -211
- package/dist/dist.min.js +18 -18
- package/dist/draco/lib/draco-parser.cjs +8 -5
- package/dist/draco/lib/draco-parser.cjs.map +2 -2
- package/dist/draco/lib/draco-parser.d.ts +2 -1
- package/dist/draco/lib/draco-parser.d.ts.map +1 -1
- package/dist/draco/lib/draco-parser.js +6 -3
- package/dist/draco/lib/draco-parser.js.map +1 -1
- package/dist/draco/lib/parse-draco.cjs +2 -1
- package/dist/draco/lib/parse-draco.cjs.map +2 -2
- package/dist/draco/lib/parse-draco.d.ts.map +1 -1
- package/dist/draco/lib/parse-draco.js +2 -1
- package/dist/draco/lib/parse-draco.js.map +1 -1
- package/dist/draco/lib/utils/version.cjs +1 -1
- package/dist/draco/lib/utils/version.js +1 -1
- package/dist/draco-worker-node.js +933 -152
- package/dist/draco-worker-node.js.map +4 -4
- package/dist/draco-worker.js +830 -56
- package/dist/draco-worker.js.map +4 -4
- package/dist/draco-writer-worker-node.cjs +773 -186
- package/dist/draco-writer-worker-node.cjs.map +4 -4
- package/dist/draco-writer-worker.js +630 -46
- package/dist/draco-writer-worker.js.map +4 -4
- package/dist/gltf/lib/parsers/parse-gltf.cjs +8 -7
- package/dist/gltf/lib/parsers/parse-gltf.cjs.map +3 -3
- package/dist/gltf/lib/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/lib/parsers/parse-gltf.js +3 -1
- package/dist/gltf/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/gltf/lib/utils/version.cjs +1 -1
- package/dist/gltf/lib/utils/version.js +1 -1
- package/dist/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.js +1 -1
- package/dist/obj/obj-loader-types.cjs +1 -1
- package/dist/obj/obj-loader-types.js +1 -1
- package/dist/obj/obj-writer.cjs +1 -1
- package/dist/obj/obj-writer.js +1 -1
- package/dist/obj-loader-types.cjs +1 -1
- package/dist/obj-worker.js +37 -1
- package/dist/obj-writer.cjs +1 -1
- package/dist/stl-loader-types.cjs +1 -1
- package/dist/stl-loader-types.js +1 -1
- package/dist/usd/usd-loader-types.cjs +1 -1
- package/dist/usd/usd-loader-types.js +1 -1
- package/dist/usd-loader-types.cjs +1 -1
- package/package.json +6 -6
- package/src/draco/lib/draco-parser.ts +6 -3
- package/src/draco/lib/parse-draco.ts +2 -1
- package/src/gltf/lib/parsers/parse-gltf.ts +2 -1
|
@@ -41,6 +41,691 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
mod
|
|
42
42
|
));
|
|
43
43
|
|
|
44
|
+
// ../../node_modules/probe.gl/dist/env/lib/globals.js
|
|
45
|
+
var window_, document_, process_, console_, navigator_;
|
|
46
|
+
var init_globals = __esm({
|
|
47
|
+
"../../node_modules/probe.gl/dist/env/lib/globals.js"() {
|
|
48
|
+
window_ = globalThis;
|
|
49
|
+
document_ = globalThis.document || {};
|
|
50
|
+
process_ = globalThis.process || {};
|
|
51
|
+
console_ = globalThis.console;
|
|
52
|
+
navigator_ = globalThis.navigator || {};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-electron.js
|
|
57
|
+
function isElectron(mockUserAgent) {
|
|
58
|
+
var _a5, _b2;
|
|
59
|
+
if (typeof window !== "undefined" && ((_a5 = window.process) == null ? void 0 : _a5.type) === "renderer") {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (typeof process !== "undefined" && Boolean((_b2 = process.versions) == null ? void 0 : _b2["electron"])) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
66
|
+
const userAgent = mockUserAgent || realUserAgent;
|
|
67
|
+
return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
|
|
68
|
+
}
|
|
69
|
+
var init_is_electron = __esm({
|
|
70
|
+
"../../node_modules/probe.gl/dist/env/lib/is-electron.js"() {
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-browser.js
|
|
75
|
+
function isBrowser() {
|
|
76
|
+
const isNode = (
|
|
77
|
+
// @ts-expect-error
|
|
78
|
+
typeof process === "object" && String(process) === "[object process]" && !(process == null ? void 0 : process.browser)
|
|
79
|
+
);
|
|
80
|
+
return !isNode || isElectron();
|
|
81
|
+
}
|
|
82
|
+
var init_is_browser = __esm({
|
|
83
|
+
"../../node_modules/probe.gl/dist/env/lib/is-browser.js"() {
|
|
84
|
+
init_is_electron();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// ../../node_modules/probe.gl/dist/env/lib/get-browser.js
|
|
89
|
+
var init_get_browser = __esm({
|
|
90
|
+
"../../node_modules/probe.gl/dist/env/lib/get-browser.js"() {
|
|
91
|
+
init_is_browser();
|
|
92
|
+
init_is_electron();
|
|
93
|
+
init_globals();
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// ../../node_modules/probe.gl/dist/env/utils/assert.js
|
|
98
|
+
var init_assert = __esm({
|
|
99
|
+
"../../node_modules/probe.gl/dist/env/utils/assert.js"() {
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// ../../node_modules/probe.gl/dist/env/index.js
|
|
104
|
+
var VERSION;
|
|
105
|
+
var init_env = __esm({
|
|
106
|
+
"../../node_modules/probe.gl/dist/env/index.js"() {
|
|
107
|
+
init_globals();
|
|
108
|
+
init_is_browser();
|
|
109
|
+
init_get_browser();
|
|
110
|
+
init_is_electron();
|
|
111
|
+
init_assert();
|
|
112
|
+
VERSION = true ? "5.0.0" : "untranspiled source";
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// ../../node_modules/probe.gl/dist/log/utils/assert.js
|
|
117
|
+
function assert2(condition, message) {
|
|
118
|
+
if (!condition) {
|
|
119
|
+
throw new Error(message || "Assertion failed");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
var init_assert2 = __esm({
|
|
123
|
+
"../../node_modules/probe.gl/dist/log/utils/assert.js"() {
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// ../../node_modules/probe.gl/dist/log/loggers/log-utils.js
|
|
128
|
+
function normalizeLogLevel(logLevel) {
|
|
129
|
+
if (!logLevel) {
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
let resolvedLevel;
|
|
133
|
+
switch (typeof logLevel) {
|
|
134
|
+
case "number":
|
|
135
|
+
resolvedLevel = logLevel;
|
|
136
|
+
break;
|
|
137
|
+
case "object":
|
|
138
|
+
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
return 0;
|
|
142
|
+
}
|
|
143
|
+
assert2(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
144
|
+
return resolvedLevel;
|
|
145
|
+
}
|
|
146
|
+
function normalizeArguments(opts) {
|
|
147
|
+
const { logLevel, message } = opts;
|
|
148
|
+
opts.logLevel = normalizeLogLevel(logLevel);
|
|
149
|
+
const args = opts.args ? Array.from(opts.args) : [];
|
|
150
|
+
while (args.length && args.shift() !== message) {
|
|
151
|
+
}
|
|
152
|
+
switch (typeof logLevel) {
|
|
153
|
+
case "string":
|
|
154
|
+
case "function":
|
|
155
|
+
if (message !== void 0) {
|
|
156
|
+
args.unshift(message);
|
|
157
|
+
}
|
|
158
|
+
opts.message = logLevel;
|
|
159
|
+
break;
|
|
160
|
+
case "object":
|
|
161
|
+
Object.assign(opts, logLevel);
|
|
162
|
+
break;
|
|
163
|
+
default:
|
|
164
|
+
}
|
|
165
|
+
if (typeof opts.message === "function") {
|
|
166
|
+
opts.message = opts.message();
|
|
167
|
+
}
|
|
168
|
+
const messageType = typeof opts.message;
|
|
169
|
+
assert2(messageType === "string" || messageType === "object");
|
|
170
|
+
return Object.assign(opts, { args }, opts.opts);
|
|
171
|
+
}
|
|
172
|
+
var init_log_utils = __esm({
|
|
173
|
+
"../../node_modules/probe.gl/dist/log/loggers/log-utils.js"() {
|
|
174
|
+
init_assert2();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// ../../node_modules/probe.gl/dist/log/loggers/base-log.js
|
|
179
|
+
var noop, BaseLog;
|
|
180
|
+
var init_base_log = __esm({
|
|
181
|
+
"../../node_modules/probe.gl/dist/log/loggers/base-log.js"() {
|
|
182
|
+
init_log_utils();
|
|
183
|
+
noop = () => {
|
|
184
|
+
};
|
|
185
|
+
BaseLog = class {
|
|
186
|
+
constructor({ level = 0 } = {}) {
|
|
187
|
+
this.userData = {};
|
|
188
|
+
this._onceCache = /* @__PURE__ */ new Set();
|
|
189
|
+
this._level = level;
|
|
190
|
+
}
|
|
191
|
+
set level(newLevel) {
|
|
192
|
+
this.setLevel(newLevel);
|
|
193
|
+
}
|
|
194
|
+
get level() {
|
|
195
|
+
return this.getLevel();
|
|
196
|
+
}
|
|
197
|
+
setLevel(level) {
|
|
198
|
+
this._level = level;
|
|
199
|
+
return this;
|
|
200
|
+
}
|
|
201
|
+
getLevel() {
|
|
202
|
+
return this._level;
|
|
203
|
+
}
|
|
204
|
+
// Unconditional logging
|
|
205
|
+
warn(message, ...args) {
|
|
206
|
+
return this._log("warn", 0, message, args, { once: true });
|
|
207
|
+
}
|
|
208
|
+
error(message, ...args) {
|
|
209
|
+
return this._log("error", 0, message, args);
|
|
210
|
+
}
|
|
211
|
+
// Conditional logging
|
|
212
|
+
log(logLevel, message, ...args) {
|
|
213
|
+
return this._log("log", logLevel, message, args);
|
|
214
|
+
}
|
|
215
|
+
info(logLevel, message, ...args) {
|
|
216
|
+
return this._log("info", logLevel, message, args);
|
|
217
|
+
}
|
|
218
|
+
once(logLevel, message, ...args) {
|
|
219
|
+
return this._log("once", logLevel, message, args, { once: true });
|
|
220
|
+
}
|
|
221
|
+
_log(type, logLevel, message, args, options = {}) {
|
|
222
|
+
const normalized = normalizeArguments({
|
|
223
|
+
logLevel,
|
|
224
|
+
message,
|
|
225
|
+
args: this._buildArgs(logLevel, message, args),
|
|
226
|
+
opts: options
|
|
227
|
+
});
|
|
228
|
+
return this._createLogFunction(type, normalized, options);
|
|
229
|
+
}
|
|
230
|
+
_buildArgs(logLevel, message, args) {
|
|
231
|
+
return [logLevel, message, ...args];
|
|
232
|
+
}
|
|
233
|
+
_createLogFunction(type, normalized, options) {
|
|
234
|
+
if (!this._shouldLog(normalized.logLevel)) {
|
|
235
|
+
return noop;
|
|
236
|
+
}
|
|
237
|
+
const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
|
|
238
|
+
if ((options.once || normalized.once) && tag !== void 0) {
|
|
239
|
+
if (this._onceCache.has(tag)) {
|
|
240
|
+
return noop;
|
|
241
|
+
}
|
|
242
|
+
this._onceCache.add(tag);
|
|
243
|
+
}
|
|
244
|
+
return this._emit(type, normalized);
|
|
245
|
+
}
|
|
246
|
+
_shouldLog(logLevel) {
|
|
247
|
+
return this.getLevel() >= normalizeLogLevel(logLevel);
|
|
248
|
+
}
|
|
249
|
+
_getOnceTag(tag) {
|
|
250
|
+
if (tag === void 0) {
|
|
251
|
+
return void 0;
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
return typeof tag === "string" ? tag : String(tag);
|
|
255
|
+
} catch {
|
|
256
|
+
return void 0;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// ../../node_modules/probe.gl/dist/log/utils/local-storage.js
|
|
264
|
+
function getStorage(type) {
|
|
265
|
+
try {
|
|
266
|
+
const storage = window[type];
|
|
267
|
+
const x = "__storage_test__";
|
|
268
|
+
storage.setItem(x, x);
|
|
269
|
+
storage.removeItem(x);
|
|
270
|
+
return storage;
|
|
271
|
+
} catch (e) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
var LocalStorage;
|
|
276
|
+
var init_local_storage = __esm({
|
|
277
|
+
"../../node_modules/probe.gl/dist/log/utils/local-storage.js"() {
|
|
278
|
+
LocalStorage = class {
|
|
279
|
+
constructor(id, defaultConfig, type = "sessionStorage") {
|
|
280
|
+
this.storage = getStorage(type);
|
|
281
|
+
this.id = id;
|
|
282
|
+
this.config = defaultConfig;
|
|
283
|
+
this._loadConfiguration();
|
|
284
|
+
}
|
|
285
|
+
getConfiguration() {
|
|
286
|
+
return this.config;
|
|
287
|
+
}
|
|
288
|
+
setConfiguration(configuration) {
|
|
289
|
+
Object.assign(this.config, configuration);
|
|
290
|
+
if (this.storage) {
|
|
291
|
+
const serialized = JSON.stringify(this.config);
|
|
292
|
+
this.storage.setItem(this.id, serialized);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
// Get config from persistent store, if available
|
|
296
|
+
_loadConfiguration() {
|
|
297
|
+
let configuration = {};
|
|
298
|
+
if (this.storage) {
|
|
299
|
+
const serializedConfiguration = this.storage.getItem(this.id);
|
|
300
|
+
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
301
|
+
}
|
|
302
|
+
Object.assign(this.config, configuration);
|
|
303
|
+
return this;
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
// ../../node_modules/probe.gl/dist/log/utils/formatters.js
|
|
310
|
+
function formatTime(ms) {
|
|
311
|
+
let formatted;
|
|
312
|
+
if (ms < 10) {
|
|
313
|
+
formatted = `${ms.toFixed(2)}ms`;
|
|
314
|
+
} else if (ms < 100) {
|
|
315
|
+
formatted = `${ms.toFixed(1)}ms`;
|
|
316
|
+
} else if (ms < 1e3) {
|
|
317
|
+
formatted = `${ms.toFixed(0)}ms`;
|
|
318
|
+
} else {
|
|
319
|
+
formatted = `${(ms / 1e3).toFixed(2)}s`;
|
|
320
|
+
}
|
|
321
|
+
return formatted;
|
|
322
|
+
}
|
|
323
|
+
function leftPad(string2, length = 8) {
|
|
324
|
+
const padLength = Math.max(length - string2.length, 0);
|
|
325
|
+
return `${" ".repeat(padLength)}${string2}`;
|
|
326
|
+
}
|
|
327
|
+
var init_formatters = __esm({
|
|
328
|
+
"../../node_modules/probe.gl/dist/log/utils/formatters.js"() {
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// ../../node_modules/probe.gl/dist/log/utils/color.js
|
|
333
|
+
function getColor(color2) {
|
|
334
|
+
if (typeof color2 !== "string") {
|
|
335
|
+
return color2;
|
|
336
|
+
}
|
|
337
|
+
color2 = color2.toUpperCase();
|
|
338
|
+
return COLOR[color2] || COLOR.WHITE;
|
|
339
|
+
}
|
|
340
|
+
function addColor(string2, color2, background) {
|
|
341
|
+
if (!isBrowser && typeof string2 === "string") {
|
|
342
|
+
if (color2) {
|
|
343
|
+
const colorCode = getColor(color2);
|
|
344
|
+
string2 = `\x1B[${colorCode}m${string2}\x1B[39m`;
|
|
345
|
+
}
|
|
346
|
+
if (background) {
|
|
347
|
+
const colorCode = getColor(background);
|
|
348
|
+
string2 = `\x1B[${colorCode + BACKGROUND_INCREMENT}m${string2}\x1B[49m`;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return string2;
|
|
352
|
+
}
|
|
353
|
+
var COLOR, BACKGROUND_INCREMENT;
|
|
354
|
+
var init_color = __esm({
|
|
355
|
+
"../../node_modules/probe.gl/dist/log/utils/color.js"() {
|
|
356
|
+
init_env();
|
|
357
|
+
(function(COLOR2) {
|
|
358
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
359
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
360
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
361
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
362
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
363
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
364
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
365
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
366
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
367
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
368
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
369
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
370
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
371
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
372
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
373
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
374
|
+
})(COLOR || (COLOR = {}));
|
|
375
|
+
BACKGROUND_INCREMENT = 10;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// ../../node_modules/probe.gl/dist/log/utils/autobind.js
|
|
380
|
+
function autobind(obj, predefined = ["constructor"]) {
|
|
381
|
+
const proto = Object.getPrototypeOf(obj);
|
|
382
|
+
const propNames = Object.getOwnPropertyNames(proto);
|
|
383
|
+
const object2 = obj;
|
|
384
|
+
for (const key of propNames) {
|
|
385
|
+
const value = object2[key];
|
|
386
|
+
if (typeof value === "function") {
|
|
387
|
+
if (!predefined.find((name) => key === name)) {
|
|
388
|
+
object2[key] = value.bind(obj);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
var init_autobind = __esm({
|
|
394
|
+
"../../node_modules/probe.gl/dist/log/utils/autobind.js"() {
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
// ../../node_modules/probe.gl/dist/log/probe.js
|
|
399
|
+
var Probe, probe;
|
|
400
|
+
var init_probe = __esm({
|
|
401
|
+
"../../node_modules/probe.gl/dist/log/probe.js"() {
|
|
402
|
+
init_env();
|
|
403
|
+
Probe = class {
|
|
404
|
+
getHighResolutionTimer() {
|
|
405
|
+
var _a5, _b2, _c2, _d2, _e2;
|
|
406
|
+
let timestamp;
|
|
407
|
+
if (isBrowser() && window_.performance) {
|
|
408
|
+
timestamp = (_c2 = (_b2 = (_a5 = window_) == null ? void 0 : _a5.performance) == null ? void 0 : _b2.now) == null ? void 0 : _c2.call(_b2);
|
|
409
|
+
} else if ("hrtime" in process_) {
|
|
410
|
+
const timeParts = (_e2 = (_d2 = process_) == null ? void 0 : _d2.hrtime) == null ? void 0 : _e2.call(_d2);
|
|
411
|
+
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
412
|
+
} else {
|
|
413
|
+
timestamp = Date.now();
|
|
414
|
+
}
|
|
415
|
+
return timestamp;
|
|
416
|
+
}
|
|
417
|
+
getMemoryUsageMB() {
|
|
418
|
+
var _a5, _b2;
|
|
419
|
+
const performance2 = (_a5 = window_) == null ? void 0 : _a5.performance;
|
|
420
|
+
const usedJSHeapSize = (_b2 = performance2 == null ? void 0 : performance2.memory) == null ? void 0 : _b2.usedJSHeapSize;
|
|
421
|
+
if (usedJSHeapSize === void 0 || usedJSHeapSize === null) {
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
return Math.trunc(usedJSHeapSize / 1024 / 1024);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
probe = new Probe();
|
|
428
|
+
globalThis.Probe = Probe;
|
|
429
|
+
globalThis.probe = probe;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
// ../../node_modules/probe.gl/dist/log/loggers/probe-log.js
|
|
434
|
+
function decorateMessage(id, message, opts) {
|
|
435
|
+
if (typeof message === "string") {
|
|
436
|
+
const time = opts.time ? leftPad(formatTime(opts.total)) : "";
|
|
437
|
+
message = opts.time ? `${id}: ${time} ${message}` : `${id}: ${message}`;
|
|
438
|
+
message = addColor(message, opts.color, opts.background);
|
|
439
|
+
}
|
|
440
|
+
return message;
|
|
441
|
+
}
|
|
442
|
+
function getTableHeader(table) {
|
|
443
|
+
for (const key in table) {
|
|
444
|
+
for (const title in table[key]) {
|
|
445
|
+
return title || "untitled";
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return "empty";
|
|
449
|
+
}
|
|
450
|
+
var originalConsole, DEFAULT_LOG_CONFIGURATION, ProbeLog;
|
|
451
|
+
var init_probe_log = __esm({
|
|
452
|
+
"../../node_modules/probe.gl/dist/log/loggers/probe-log.js"() {
|
|
453
|
+
init_env();
|
|
454
|
+
init_base_log();
|
|
455
|
+
init_local_storage();
|
|
456
|
+
init_formatters();
|
|
457
|
+
init_color();
|
|
458
|
+
init_autobind();
|
|
459
|
+
init_assert2();
|
|
460
|
+
init_probe();
|
|
461
|
+
init_log_utils();
|
|
462
|
+
init_log_utils();
|
|
463
|
+
originalConsole = {
|
|
464
|
+
debug: isBrowser() ? console.debug || console.log : console.log,
|
|
465
|
+
log: console.log,
|
|
466
|
+
info: console.info,
|
|
467
|
+
warn: console.warn,
|
|
468
|
+
error: console.error
|
|
469
|
+
};
|
|
470
|
+
DEFAULT_LOG_CONFIGURATION = {
|
|
471
|
+
enabled: true,
|
|
472
|
+
level: 0
|
|
473
|
+
};
|
|
474
|
+
ProbeLog = class extends BaseLog {
|
|
475
|
+
constructor({ id } = { id: "" }) {
|
|
476
|
+
super({ level: 0 });
|
|
477
|
+
this.VERSION = VERSION;
|
|
478
|
+
this._startTs = probe.getHighResolutionTimer();
|
|
479
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
480
|
+
this.userData = {};
|
|
481
|
+
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
482
|
+
this.id = id;
|
|
483
|
+
this.userData = {};
|
|
484
|
+
this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
|
|
485
|
+
this.timeStamp(`${this.id} started`);
|
|
486
|
+
autobind(this);
|
|
487
|
+
Object.seal(this);
|
|
488
|
+
}
|
|
489
|
+
isEnabled() {
|
|
490
|
+
return this._getConfiguration().enabled;
|
|
491
|
+
}
|
|
492
|
+
getLevel() {
|
|
493
|
+
return this._getConfiguration().level;
|
|
494
|
+
}
|
|
495
|
+
/** @return milliseconds, with fractions */
|
|
496
|
+
getTotal() {
|
|
497
|
+
return Number((probe.getHighResolutionTimer() - this._startTs).toPrecision(10));
|
|
498
|
+
}
|
|
499
|
+
/** @return milliseconds, with fractions */
|
|
500
|
+
getDelta() {
|
|
501
|
+
return Number((probe.getHighResolutionTimer() - this._deltaTs).toPrecision(10));
|
|
502
|
+
}
|
|
503
|
+
/** @deprecated use logLevel */
|
|
504
|
+
set priority(newPriority) {
|
|
505
|
+
this.level = newPriority;
|
|
506
|
+
}
|
|
507
|
+
/** @deprecated use logLevel */
|
|
508
|
+
get priority() {
|
|
509
|
+
return this.level;
|
|
510
|
+
}
|
|
511
|
+
/** @deprecated use logLevel */
|
|
512
|
+
getPriority() {
|
|
513
|
+
return this.level;
|
|
514
|
+
}
|
|
515
|
+
// Configure
|
|
516
|
+
enable(enabled = true) {
|
|
517
|
+
this._updateConfiguration({ enabled });
|
|
518
|
+
return this;
|
|
519
|
+
}
|
|
520
|
+
setLevel(level) {
|
|
521
|
+
this._updateConfiguration({ level });
|
|
522
|
+
return this;
|
|
523
|
+
}
|
|
524
|
+
/** return the current status of the setting */
|
|
525
|
+
get(setting) {
|
|
526
|
+
return this._getConfiguration()[setting];
|
|
527
|
+
}
|
|
528
|
+
// update the status of the setting
|
|
529
|
+
set(setting, value) {
|
|
530
|
+
this._updateConfiguration({ [setting]: value });
|
|
531
|
+
}
|
|
532
|
+
/** Logs the current settings as a table */
|
|
533
|
+
settings() {
|
|
534
|
+
if (console.table) {
|
|
535
|
+
console.table(this._storage.config);
|
|
536
|
+
} else {
|
|
537
|
+
console.log(this._storage.config);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
// Unconditional logging
|
|
541
|
+
assert(condition, message) {
|
|
542
|
+
if (!condition) {
|
|
543
|
+
throw new Error(message || "Assertion failed");
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
warn(message, ...args) {
|
|
547
|
+
return this._log("warn", 0, message, args, {
|
|
548
|
+
method: originalConsole.warn,
|
|
549
|
+
once: true
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
error(message, ...args) {
|
|
553
|
+
return this._log("error", 0, message, args, {
|
|
554
|
+
method: originalConsole.error
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
/** Print a deprecation warning */
|
|
558
|
+
deprecated(oldUsage, newUsage) {
|
|
559
|
+
return this.warn(`\`${oldUsage}\` is deprecated and will be removed in a later version. Use \`${newUsage}\` instead`);
|
|
560
|
+
}
|
|
561
|
+
/** Print a removal warning */
|
|
562
|
+
removed(oldUsage, newUsage) {
|
|
563
|
+
return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
|
|
564
|
+
}
|
|
565
|
+
probe(logLevel, message, ...args) {
|
|
566
|
+
const memoryUsageMB = probe.getMemoryUsageMB();
|
|
567
|
+
if (memoryUsageMB !== null) {
|
|
568
|
+
const memoryUsagePrefix = `${memoryUsageMB}MB `;
|
|
569
|
+
if (typeof message === "function") {
|
|
570
|
+
message = () => `${memoryUsagePrefix}${message()}`;
|
|
571
|
+
} else if (typeof message === "string") {
|
|
572
|
+
message = `${memoryUsagePrefix}${message}`;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
return this._log("log", logLevel, message, args, {
|
|
576
|
+
method: originalConsole.log,
|
|
577
|
+
time: true,
|
|
578
|
+
once: true
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
log(logLevel, message, ...args) {
|
|
582
|
+
return this._log("log", logLevel, message, args, {
|
|
583
|
+
method: originalConsole.debug
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
info(logLevel, message, ...args) {
|
|
587
|
+
return this._log("info", logLevel, message, args, { method: console.info });
|
|
588
|
+
}
|
|
589
|
+
once(logLevel, message, ...args) {
|
|
590
|
+
return this._log("once", logLevel, message, args, {
|
|
591
|
+
method: originalConsole.debug || originalConsole.info,
|
|
592
|
+
once: true
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
/** Logs an object as a table */
|
|
596
|
+
table(logLevel, table, columns) {
|
|
597
|
+
if (table) {
|
|
598
|
+
return this._log("table", logLevel, table, columns && [columns] || [], {
|
|
599
|
+
method: console.table || noop,
|
|
600
|
+
tag: getTableHeader(table)
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
return noop;
|
|
604
|
+
}
|
|
605
|
+
time(logLevel, message) {
|
|
606
|
+
return this._log("time", logLevel, message, [], {
|
|
607
|
+
method: console.time ? console.time : console.info
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
timeEnd(logLevel, message) {
|
|
611
|
+
return this._log("time", logLevel, message, [], {
|
|
612
|
+
method: console.timeEnd ? console.timeEnd : console.info
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
timeStamp(logLevel, message) {
|
|
616
|
+
return this._log("time", logLevel, message, [], {
|
|
617
|
+
method: console.timeStamp || noop
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
group(logLevel, message, opts = { collapsed: false }) {
|
|
621
|
+
const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
622
|
+
return this._log("group", logLevel, message, [], { method });
|
|
623
|
+
}
|
|
624
|
+
groupCollapsed(logLevel, message, opts = {}) {
|
|
625
|
+
return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
|
|
626
|
+
}
|
|
627
|
+
groupEnd(logLevel) {
|
|
628
|
+
return this._log("groupEnd", logLevel, "", [], {
|
|
629
|
+
method: console.groupEnd || noop
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
// EXPERIMENTAL
|
|
633
|
+
withGroup(logLevel, message, func) {
|
|
634
|
+
this.group(logLevel, message)();
|
|
635
|
+
try {
|
|
636
|
+
func();
|
|
637
|
+
} finally {
|
|
638
|
+
this.groupEnd(logLevel)();
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
trace() {
|
|
642
|
+
if (console.trace) {
|
|
643
|
+
console.trace();
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
_shouldLog(logLevel) {
|
|
647
|
+
return this.isEnabled() && super._shouldLog(logLevel);
|
|
648
|
+
}
|
|
649
|
+
_emit(_type, normalized) {
|
|
650
|
+
const method = normalized.method;
|
|
651
|
+
assert2(method);
|
|
652
|
+
normalized.total = this.getTotal();
|
|
653
|
+
normalized.delta = this.getDelta();
|
|
654
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
655
|
+
const message = decorateMessage(this.id, normalized.message, normalized);
|
|
656
|
+
return method.bind(console, message, ...normalized.args);
|
|
657
|
+
}
|
|
658
|
+
_getConfiguration() {
|
|
659
|
+
if (!this._storage.config[this.id]) {
|
|
660
|
+
this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
|
|
661
|
+
}
|
|
662
|
+
return this._storage.config[this.id];
|
|
663
|
+
}
|
|
664
|
+
_updateConfiguration(configuration) {
|
|
665
|
+
const currentConfiguration = this._storage.config[this.id] || {
|
|
666
|
+
...DEFAULT_LOG_CONFIGURATION
|
|
667
|
+
};
|
|
668
|
+
this._storage.setConfiguration({
|
|
669
|
+
[this.id]: { ...currentConfiguration, ...configuration }
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
ProbeLog.VERSION = VERSION;
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// ../../node_modules/probe.gl/dist/log/loggers/console-log.js
|
|
678
|
+
var init_console_log = __esm({
|
|
679
|
+
"../../node_modules/probe.gl/dist/log/loggers/console-log.js"() {
|
|
680
|
+
init_base_log();
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
// ../../node_modules/probe.gl/dist/log/loggers/memory-log.js
|
|
685
|
+
var init_memory_log = __esm({
|
|
686
|
+
"../../node_modules/probe.gl/dist/log/loggers/memory-log.js"() {
|
|
687
|
+
init_base_log();
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// ../../node_modules/probe.gl/dist/log/deprecated/hi-res-timestamp.js
|
|
692
|
+
var init_hi_res_timestamp = __esm({
|
|
693
|
+
"../../node_modules/probe.gl/dist/log/deprecated/hi-res-timestamp.js"() {
|
|
694
|
+
init_probe();
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
// ../../node_modules/probe.gl/dist/log/init.js
|
|
699
|
+
var init_init = __esm({
|
|
700
|
+
"../../node_modules/probe.gl/dist/log/init.js"() {
|
|
701
|
+
init_probe();
|
|
702
|
+
if (!globalThis.probe) {
|
|
703
|
+
globalThis.probe = probe;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
// ../../node_modules/probe.gl/dist/log/index.js
|
|
709
|
+
var log;
|
|
710
|
+
var init_log = __esm({
|
|
711
|
+
"../../node_modules/probe.gl/dist/log/index.js"() {
|
|
712
|
+
init_probe_log();
|
|
713
|
+
init_probe();
|
|
714
|
+
init_probe_log();
|
|
715
|
+
init_console_log();
|
|
716
|
+
init_base_log();
|
|
717
|
+
init_memory_log();
|
|
718
|
+
init_color();
|
|
719
|
+
init_color();
|
|
720
|
+
init_formatters();
|
|
721
|
+
init_autobind();
|
|
722
|
+
init_local_storage();
|
|
723
|
+
init_hi_res_timestamp();
|
|
724
|
+
init_init();
|
|
725
|
+
log = new ProbeLog({ id: "@probe.gl/log" });
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
|
|
44
729
|
// ../../node_modules/sharp/dist/is.mjs
|
|
45
730
|
var defined, object, plainObject, fn, bool, buffer, typedArray, arrayBuffer, string, number, integer, inRange2, inArray, invalidParameterError, nativeError, is_default;
|
|
46
731
|
var init_is = __esm({
|
|
@@ -421,33 +1106,33 @@ var require_detect_libc = __commonJS({
|
|
|
421
1106
|
}
|
|
422
1107
|
return null;
|
|
423
1108
|
};
|
|
424
|
-
var
|
|
425
|
-
let
|
|
1109
|
+
var version3 = async () => {
|
|
1110
|
+
let version4 = null;
|
|
426
1111
|
if (isLinux()) {
|
|
427
|
-
|
|
428
|
-
if (!
|
|
429
|
-
|
|
1112
|
+
version4 = await versionFromFilesystem();
|
|
1113
|
+
if (!version4) {
|
|
1114
|
+
version4 = versionFromReport();
|
|
430
1115
|
}
|
|
431
|
-
if (!
|
|
1116
|
+
if (!version4) {
|
|
432
1117
|
const out = await safeCommand();
|
|
433
|
-
|
|
1118
|
+
version4 = versionFromCommand(out);
|
|
434
1119
|
}
|
|
435
1120
|
}
|
|
436
|
-
return
|
|
1121
|
+
return version4;
|
|
437
1122
|
};
|
|
438
1123
|
var versionSync2 = () => {
|
|
439
|
-
let
|
|
1124
|
+
let version4 = null;
|
|
440
1125
|
if (isLinux()) {
|
|
441
|
-
|
|
442
|
-
if (!
|
|
443
|
-
|
|
1126
|
+
version4 = versionFromFilesystemSync();
|
|
1127
|
+
if (!version4) {
|
|
1128
|
+
version4 = versionFromReport();
|
|
444
1129
|
}
|
|
445
|
-
if (!
|
|
1130
|
+
if (!version4) {
|
|
446
1131
|
const out = safeCommandSync();
|
|
447
|
-
|
|
1132
|
+
version4 = versionFromCommand(out);
|
|
448
1133
|
}
|
|
449
1134
|
}
|
|
450
|
-
return
|
|
1135
|
+
return version4;
|
|
451
1136
|
};
|
|
452
1137
|
module2.exports = {
|
|
453
1138
|
GLIBC,
|
|
@@ -456,7 +1141,7 @@ var require_detect_libc = __commonJS({
|
|
|
456
1141
|
familySync: familySync2,
|
|
457
1142
|
isNonGlibcLinux,
|
|
458
1143
|
isNonGlibcLinuxSync,
|
|
459
|
-
version:
|
|
1144
|
+
version: version3,
|
|
460
1145
|
versionSync: versionSync2
|
|
461
1146
|
};
|
|
462
1147
|
}
|
|
@@ -658,31 +1343,31 @@ var require_semver = __commonJS({
|
|
|
658
1343
|
return true;
|
|
659
1344
|
};
|
|
660
1345
|
var SemVer = class _SemVer {
|
|
661
|
-
constructor(
|
|
1346
|
+
constructor(version3, options) {
|
|
662
1347
|
options = parseOptions(options);
|
|
663
|
-
if (
|
|
664
|
-
if (
|
|
665
|
-
return
|
|
1348
|
+
if (version3 instanceof _SemVer) {
|
|
1349
|
+
if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) {
|
|
1350
|
+
return version3;
|
|
666
1351
|
} else {
|
|
667
|
-
|
|
1352
|
+
version3 = version3.version;
|
|
668
1353
|
}
|
|
669
|
-
} else if (typeof
|
|
670
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
|
1354
|
+
} else if (typeof version3 !== "string") {
|
|
1355
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
|
|
671
1356
|
}
|
|
672
|
-
if (
|
|
1357
|
+
if (version3.length > MAX_LENGTH) {
|
|
673
1358
|
throw new TypeError(
|
|
674
1359
|
`version is longer than ${MAX_LENGTH} characters`
|
|
675
1360
|
);
|
|
676
1361
|
}
|
|
677
|
-
debug("SemVer",
|
|
1362
|
+
debug("SemVer", version3, options);
|
|
678
1363
|
this.options = options;
|
|
679
1364
|
this.loose = !!options.loose;
|
|
680
1365
|
this.includePrerelease = !!options.includePrerelease;
|
|
681
|
-
const m =
|
|
1366
|
+
const m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
682
1367
|
if (!m) {
|
|
683
|
-
throw new TypeError(`Invalid Version: ${
|
|
1368
|
+
throw new TypeError(`Invalid Version: ${version3}`);
|
|
684
1369
|
}
|
|
685
|
-
this.raw =
|
|
1370
|
+
this.raw = version3;
|
|
686
1371
|
this.major = +m[1];
|
|
687
1372
|
this.minor = +m[2];
|
|
688
1373
|
this.patch = +m[3];
|
|
@@ -933,12 +1618,12 @@ var require_parse = __commonJS({
|
|
|
933
1618
|
"../../node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
934
1619
|
"use strict";
|
|
935
1620
|
var SemVer = require_semver();
|
|
936
|
-
var parse2 = (
|
|
937
|
-
if (
|
|
938
|
-
return
|
|
1621
|
+
var parse2 = (version3, options, throwErrors = false) => {
|
|
1622
|
+
if (version3 instanceof SemVer) {
|
|
1623
|
+
return version3;
|
|
939
1624
|
}
|
|
940
1625
|
try {
|
|
941
|
-
return new SemVer(
|
|
1626
|
+
return new SemVer(version3, options);
|
|
942
1627
|
} catch (er) {
|
|
943
1628
|
if (!throwErrors) {
|
|
944
1629
|
return null;
|
|
@@ -955,8 +1640,8 @@ var require_valid = __commonJS({
|
|
|
955
1640
|
"../../node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
956
1641
|
"use strict";
|
|
957
1642
|
var parse2 = require_parse();
|
|
958
|
-
var valid = (
|
|
959
|
-
const v = parse2(
|
|
1643
|
+
var valid = (version3, options) => {
|
|
1644
|
+
const v = parse2(version3, options);
|
|
960
1645
|
return v ? v.version : null;
|
|
961
1646
|
};
|
|
962
1647
|
module2.exports = valid;
|
|
@@ -968,8 +1653,8 @@ var require_clean = __commonJS({
|
|
|
968
1653
|
"../../node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
969
1654
|
"use strict";
|
|
970
1655
|
var parse2 = require_parse();
|
|
971
|
-
var clean = (
|
|
972
|
-
const s = parse2(
|
|
1656
|
+
var clean = (version3, options) => {
|
|
1657
|
+
const s = parse2(version3.trim().replace(/^[=v]+/, ""), options);
|
|
973
1658
|
return s ? s.version : null;
|
|
974
1659
|
};
|
|
975
1660
|
module2.exports = clean;
|
|
@@ -981,7 +1666,7 @@ var require_inc = __commonJS({
|
|
|
981
1666
|
"../../node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
982
1667
|
"use strict";
|
|
983
1668
|
var SemVer = require_semver();
|
|
984
|
-
var inc = (
|
|
1669
|
+
var inc = (version3, release, options, identifier, identifierBase) => {
|
|
985
1670
|
if (typeof options === "string") {
|
|
986
1671
|
identifierBase = identifier;
|
|
987
1672
|
identifier = options;
|
|
@@ -989,7 +1674,7 @@ var require_inc = __commonJS({
|
|
|
989
1674
|
}
|
|
990
1675
|
try {
|
|
991
1676
|
return new SemVer(
|
|
992
|
-
|
|
1677
|
+
version3 instanceof SemVer ? version3.version : version3,
|
|
993
1678
|
options
|
|
994
1679
|
).inc(release, identifier, identifierBase).version;
|
|
995
1680
|
} catch (er) {
|
|
@@ -1005,9 +1690,9 @@ var require_diff = __commonJS({
|
|
|
1005
1690
|
"../../node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
1006
1691
|
"use strict";
|
|
1007
1692
|
var parse2 = require_parse();
|
|
1008
|
-
var diff = (version1,
|
|
1693
|
+
var diff = (version1, version22) => {
|
|
1009
1694
|
const v1 = parse2(version1, null, true);
|
|
1010
|
-
const v2 = parse2(
|
|
1695
|
+
const v2 = parse2(version22, null, true);
|
|
1011
1696
|
const comparison = v1.compare(v2);
|
|
1012
1697
|
if (comparison === 0) {
|
|
1013
1698
|
return null;
|
|
@@ -1079,8 +1764,8 @@ var require_prerelease = __commonJS({
|
|
|
1079
1764
|
"../../node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
1080
1765
|
"use strict";
|
|
1081
1766
|
var parse2 = require_parse();
|
|
1082
|
-
var prerelease = (
|
|
1083
|
-
const parsed = parse2(
|
|
1767
|
+
var prerelease = (version3, options) => {
|
|
1768
|
+
const parsed = parse2(version3, options);
|
|
1084
1769
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1085
1770
|
};
|
|
1086
1771
|
module2.exports = prerelease;
|
|
@@ -1268,24 +1953,24 @@ var require_coerce = __commonJS({
|
|
|
1268
1953
|
var SemVer = require_semver();
|
|
1269
1954
|
var parse2 = require_parse();
|
|
1270
1955
|
var { safeRe: re, t } = require_re();
|
|
1271
|
-
var coerce = (
|
|
1272
|
-
if (
|
|
1273
|
-
return
|
|
1956
|
+
var coerce = (version3, options) => {
|
|
1957
|
+
if (version3 instanceof SemVer) {
|
|
1958
|
+
return version3;
|
|
1274
1959
|
}
|
|
1275
|
-
if (typeof
|
|
1276
|
-
|
|
1960
|
+
if (typeof version3 === "number") {
|
|
1961
|
+
version3 = String(version3);
|
|
1277
1962
|
}
|
|
1278
|
-
if (typeof
|
|
1963
|
+
if (typeof version3 !== "string") {
|
|
1279
1964
|
return null;
|
|
1280
1965
|
}
|
|
1281
1966
|
options = options || {};
|
|
1282
1967
|
let match = null;
|
|
1283
1968
|
if (!options.rtl) {
|
|
1284
|
-
match =
|
|
1969
|
+
match = version3.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
1285
1970
|
} else {
|
|
1286
1971
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
1287
1972
|
let next;
|
|
1288
|
-
while ((next = coerceRtlRegex.exec(
|
|
1973
|
+
while ((next = coerceRtlRegex.exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
|
|
1289
1974
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
1290
1975
|
match = next;
|
|
1291
1976
|
}
|
|
@@ -1314,32 +1999,32 @@ var require_truncate = __commonJS({
|
|
|
1314
1999
|
var parse2 = require_parse();
|
|
1315
2000
|
var constants = require_constants();
|
|
1316
2001
|
var SemVer = require_semver();
|
|
1317
|
-
var truncate = (
|
|
2002
|
+
var truncate = (version3, truncation, options) => {
|
|
1318
2003
|
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
1319
2004
|
return null;
|
|
1320
2005
|
}
|
|
1321
|
-
const clonedVersion = cloneInputVersion(
|
|
2006
|
+
const clonedVersion = cloneInputVersion(version3, options);
|
|
1322
2007
|
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
1323
2008
|
};
|
|
1324
|
-
var cloneInputVersion = (
|
|
1325
|
-
const versionStringToParse =
|
|
2009
|
+
var cloneInputVersion = (version3, options) => {
|
|
2010
|
+
const versionStringToParse = version3 instanceof SemVer ? version3.version : version3;
|
|
1326
2011
|
return parse2(versionStringToParse, options);
|
|
1327
2012
|
};
|
|
1328
|
-
var doTruncation = (
|
|
2013
|
+
var doTruncation = (version3, truncation) => {
|
|
1329
2014
|
if (isPrerelease(truncation)) {
|
|
1330
|
-
return
|
|
2015
|
+
return version3.version;
|
|
1331
2016
|
}
|
|
1332
|
-
|
|
2017
|
+
version3.prerelease = [];
|
|
1333
2018
|
switch (truncation) {
|
|
1334
2019
|
case "major":
|
|
1335
|
-
|
|
1336
|
-
|
|
2020
|
+
version3.minor = 0;
|
|
2021
|
+
version3.patch = 0;
|
|
1337
2022
|
break;
|
|
1338
2023
|
case "minor":
|
|
1339
|
-
|
|
2024
|
+
version3.patch = 0;
|
|
1340
2025
|
break;
|
|
1341
2026
|
}
|
|
1342
|
-
return
|
|
2027
|
+
return version3.format();
|
|
1343
2028
|
};
|
|
1344
2029
|
var isPrerelease = (type) => {
|
|
1345
2030
|
return type.startsWith("pre");
|
|
@@ -1511,19 +2196,19 @@ var require_range = __commonJS({
|
|
|
1511
2196
|
});
|
|
1512
2197
|
}
|
|
1513
2198
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
1514
|
-
test(
|
|
1515
|
-
if (!
|
|
2199
|
+
test(version3) {
|
|
2200
|
+
if (!version3) {
|
|
1516
2201
|
return false;
|
|
1517
2202
|
}
|
|
1518
|
-
if (typeof
|
|
2203
|
+
if (typeof version3 === "string") {
|
|
1519
2204
|
try {
|
|
1520
|
-
|
|
2205
|
+
version3 = new SemVer(version3, this.options);
|
|
1521
2206
|
} catch (er) {
|
|
1522
2207
|
return false;
|
|
1523
2208
|
}
|
|
1524
2209
|
}
|
|
1525
2210
|
for (let i = 0; i < this.set.length; i++) {
|
|
1526
|
-
if (testSet(this.set[i],
|
|
2211
|
+
if (testSet(this.set[i], version3, this.options)) {
|
|
1527
2212
|
return true;
|
|
1528
2213
|
}
|
|
1529
2214
|
}
|
|
@@ -1745,13 +2430,13 @@ var require_range = __commonJS({
|
|
|
1745
2430
|
}
|
|
1746
2431
|
return `${from} ${to}`.trim();
|
|
1747
2432
|
};
|
|
1748
|
-
var testSet = (set,
|
|
2433
|
+
var testSet = (set, version3, options) => {
|
|
1749
2434
|
for (let i = 0; i < set.length; i++) {
|
|
1750
|
-
if (!set[i].test(
|
|
2435
|
+
if (!set[i].test(version3)) {
|
|
1751
2436
|
return false;
|
|
1752
2437
|
}
|
|
1753
2438
|
}
|
|
1754
|
-
if (
|
|
2439
|
+
if (version3.prerelease.length && !options.includePrerelease) {
|
|
1755
2440
|
for (let i = 0; i < set.length; i++) {
|
|
1756
2441
|
debug(set[i].semver);
|
|
1757
2442
|
if (set[i].semver === Comparator.ANY) {
|
|
@@ -1759,7 +2444,7 @@ var require_range = __commonJS({
|
|
|
1759
2444
|
}
|
|
1760
2445
|
if (set[i].semver.prerelease.length > 0) {
|
|
1761
2446
|
const allowed = set[i].semver;
|
|
1762
|
-
if (allowed.major ===
|
|
2447
|
+
if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
|
|
1763
2448
|
return true;
|
|
1764
2449
|
}
|
|
1765
2450
|
}
|
|
@@ -1820,19 +2505,19 @@ var require_comparator = __commonJS({
|
|
|
1820
2505
|
toString() {
|
|
1821
2506
|
return this.value;
|
|
1822
2507
|
}
|
|
1823
|
-
test(
|
|
1824
|
-
debug("Comparator.test",
|
|
1825
|
-
if (this.semver === ANY ||
|
|
2508
|
+
test(version3) {
|
|
2509
|
+
debug("Comparator.test", version3, this.options.loose);
|
|
2510
|
+
if (this.semver === ANY || version3 === ANY) {
|
|
1826
2511
|
return true;
|
|
1827
2512
|
}
|
|
1828
|
-
if (typeof
|
|
2513
|
+
if (typeof version3 === "string") {
|
|
1829
2514
|
try {
|
|
1830
|
-
|
|
2515
|
+
version3 = new SemVer(version3, this.options);
|
|
1831
2516
|
} catch (er) {
|
|
1832
2517
|
return false;
|
|
1833
2518
|
}
|
|
1834
2519
|
}
|
|
1835
|
-
return cmp(
|
|
2520
|
+
return cmp(version3, this.operator, this.semver, this.options);
|
|
1836
2521
|
}
|
|
1837
2522
|
intersects(comp, options) {
|
|
1838
2523
|
if (!(comp instanceof _Comparator)) {
|
|
@@ -1889,13 +2574,13 @@ var require_satisfies = __commonJS({
|
|
|
1889
2574
|
"../../node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
1890
2575
|
"use strict";
|
|
1891
2576
|
var Range = require_range();
|
|
1892
|
-
var satisfies = (
|
|
2577
|
+
var satisfies = (version3, range, options) => {
|
|
1893
2578
|
try {
|
|
1894
2579
|
range = new Range(range, options);
|
|
1895
2580
|
} catch (er) {
|
|
1896
2581
|
return false;
|
|
1897
2582
|
}
|
|
1898
|
-
return range.test(
|
|
2583
|
+
return range.test(version3);
|
|
1899
2584
|
};
|
|
1900
2585
|
module2.exports = satisfies;
|
|
1901
2586
|
}
|
|
@@ -2057,8 +2742,8 @@ var require_outside = __commonJS({
|
|
|
2057
2742
|
var lt = require_lt();
|
|
2058
2743
|
var lte = require_lte();
|
|
2059
2744
|
var gte = require_gte();
|
|
2060
|
-
var outside = (
|
|
2061
|
-
|
|
2745
|
+
var outside = (version3, range, hilo, options) => {
|
|
2746
|
+
version3 = new SemVer(version3, options);
|
|
2062
2747
|
range = new Range(range, options);
|
|
2063
2748
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
2064
2749
|
switch (hilo) {
|
|
@@ -2079,7 +2764,7 @@ var require_outside = __commonJS({
|
|
|
2079
2764
|
default:
|
|
2080
2765
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
2081
2766
|
}
|
|
2082
|
-
if (satisfies(
|
|
2767
|
+
if (satisfies(version3, range, options)) {
|
|
2083
2768
|
return false;
|
|
2084
2769
|
}
|
|
2085
2770
|
for (let i = 0; i < range.set.length; ++i) {
|
|
@@ -2101,9 +2786,9 @@ var require_outside = __commonJS({
|
|
|
2101
2786
|
if (high.operator === comp || high.operator === ecomp) {
|
|
2102
2787
|
return false;
|
|
2103
2788
|
}
|
|
2104
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
|
2789
|
+
if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
|
|
2105
2790
|
return false;
|
|
2106
|
-
} else if (low.operator === ecomp && ltfn(
|
|
2791
|
+
} else if (low.operator === ecomp && ltfn(version3, low.semver)) {
|
|
2107
2792
|
return false;
|
|
2108
2793
|
}
|
|
2109
2794
|
}
|
|
@@ -2118,7 +2803,7 @@ var require_gtr = __commonJS({
|
|
|
2118
2803
|
"../../node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
2119
2804
|
"use strict";
|
|
2120
2805
|
var outside = require_outside();
|
|
2121
|
-
var gtr = (
|
|
2806
|
+
var gtr = (version3, range, options) => outside(version3, range, ">", options);
|
|
2122
2807
|
module2.exports = gtr;
|
|
2123
2808
|
}
|
|
2124
2809
|
});
|
|
@@ -2128,7 +2813,7 @@ var require_ltr = __commonJS({
|
|
|
2128
2813
|
"../../node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
2129
2814
|
"use strict";
|
|
2130
2815
|
var outside = require_outside();
|
|
2131
|
-
var ltr = (
|
|
2816
|
+
var ltr = (version3, range, options) => outside(version3, range, "<", options);
|
|
2132
2817
|
module2.exports = ltr;
|
|
2133
2818
|
}
|
|
2134
2819
|
});
|
|
@@ -2158,12 +2843,12 @@ var require_simplify = __commonJS({
|
|
|
2158
2843
|
let first = null;
|
|
2159
2844
|
let prev = null;
|
|
2160
2845
|
const v = versions3.sort((a, b) => compare(a, b, options));
|
|
2161
|
-
for (const
|
|
2162
|
-
const included = satisfies(
|
|
2846
|
+
for (const version3 of v) {
|
|
2847
|
+
const included = satisfies(version3, range, options);
|
|
2163
2848
|
if (included) {
|
|
2164
|
-
prev =
|
|
2849
|
+
prev = version3;
|
|
2165
2850
|
if (!first) {
|
|
2166
|
-
first =
|
|
2851
|
+
first = version3;
|
|
2167
2852
|
}
|
|
2168
2853
|
} else {
|
|
2169
2854
|
if (prev) {
|
|
@@ -2691,7 +3376,7 @@ var init_package = __esm({
|
|
|
2691
3376
|
});
|
|
2692
3377
|
|
|
2693
3378
|
// ../../node_modules/sharp/dist/libvips.mjs
|
|
2694
|
-
var import_node_child_process, import_node_crypto, import_semver, import_detect_libc, minimumLibvipsVersionLabelled, minimumLibvipsVersion, prebuiltPlatforms, spawnSyncOptions,
|
|
3379
|
+
var import_node_child_process, import_node_crypto, import_semver, import_detect_libc, minimumLibvipsVersionLabelled, minimumLibvipsVersion, prebuiltPlatforms, spawnSyncOptions, log2, runtimeLibc, runtimePlatformArch, buildPlatformArch, buildSharpLibvipsIncludeDir, buildSharpLibvipsCPlusPlusDir, buildSharpLibvipsLibDir, isUnsupportedNodeRuntime, isEmscripten, isRosetta, sha512, yarnLocator, spawnRebuild, globalLibvipsVersion, getBrewPkgConfigPath, getPkgConfigPath, pkgConfigPath, skipSearch, useGlobalLibvips, libvips_default;
|
|
2695
3380
|
var init_libvips = __esm({
|
|
2696
3381
|
"../../node_modules/sharp/dist/libvips.mjs"() {
|
|
2697
3382
|
import_node_child_process = require("node:child_process");
|
|
@@ -2723,7 +3408,7 @@ var init_libvips = __esm({
|
|
|
2723
3408
|
encoding: "utf8",
|
|
2724
3409
|
shell: true
|
|
2725
3410
|
};
|
|
2726
|
-
|
|
3411
|
+
log2 = (item) => {
|
|
2727
3412
|
if (item instanceof Error) {
|
|
2728
3413
|
console.error(`sharp: Installation error: ${item.message}`);
|
|
2729
3414
|
} else {
|
|
@@ -2877,7 +3562,7 @@ var init_libvips = __esm({
|
|
|
2877
3562
|
buildSharpLibvipsLibDir,
|
|
2878
3563
|
isUnsupportedNodeRuntime,
|
|
2879
3564
|
runtimePlatformArch,
|
|
2880
|
-
log,
|
|
3565
|
+
log: log2,
|
|
2881
3566
|
yarnLocator,
|
|
2882
3567
|
spawnRebuild,
|
|
2883
3568
|
globalLibvipsVersion,
|
|
@@ -7580,6 +8265,57 @@ var init_dist = __esm({
|
|
|
7580
8265
|
}
|
|
7581
8266
|
});
|
|
7582
8267
|
|
|
8268
|
+
// ../core/src/loader-utils/lib/log-utils/log.ts
|
|
8269
|
+
function createLog() {
|
|
8270
|
+
const log4 = new ProbeLog({ id: "loaders.gl" });
|
|
8271
|
+
globalThis.loaders ||= {};
|
|
8272
|
+
globalThis.loaders.log = log4;
|
|
8273
|
+
globalThis.loaders.version = version2;
|
|
8274
|
+
globalThis.probe ||= {};
|
|
8275
|
+
globalThis.probe.loaders = log4;
|
|
8276
|
+
return log4;
|
|
8277
|
+
}
|
|
8278
|
+
function ignoreMessage() {
|
|
8279
|
+
}
|
|
8280
|
+
function getLoaderLog(options) {
|
|
8281
|
+
var _a5;
|
|
8282
|
+
const logger = ((_a5 = options == null ? void 0 : options.core) == null ? void 0 : _a5.log) !== void 0 ? options.core.log : options == null ? void 0 : options.log;
|
|
8283
|
+
return logger === null ? nullLog : logger || log3;
|
|
8284
|
+
}
|
|
8285
|
+
var VERSION2, version2, log3, NullLog, nullLog;
|
|
8286
|
+
var init_log2 = __esm({
|
|
8287
|
+
"../core/src/loader-utils/lib/log-utils/log.ts"() {
|
|
8288
|
+
"use strict";
|
|
8289
|
+
init_log();
|
|
8290
|
+
VERSION2 = true ? "5.0.0-beta.8" : "latest";
|
|
8291
|
+
version2 = VERSION2[0] >= "0" && VERSION2[0] <= "9" ? `v${VERSION2}` : "";
|
|
8292
|
+
log3 = createLog();
|
|
8293
|
+
NullLog = class {
|
|
8294
|
+
/** Discards debug messages. */
|
|
8295
|
+
log() {
|
|
8296
|
+
return ignoreMessage;
|
|
8297
|
+
}
|
|
8298
|
+
/** Discards informational messages. */
|
|
8299
|
+
info() {
|
|
8300
|
+
return ignoreMessage;
|
|
8301
|
+
}
|
|
8302
|
+
/** Discards messages marked to be emitted once. */
|
|
8303
|
+
once() {
|
|
8304
|
+
return ignoreMessage;
|
|
8305
|
+
}
|
|
8306
|
+
/** Discards warnings. */
|
|
8307
|
+
warn() {
|
|
8308
|
+
return ignoreMessage;
|
|
8309
|
+
}
|
|
8310
|
+
/** Discards errors. */
|
|
8311
|
+
error() {
|
|
8312
|
+
return ignoreMessage;
|
|
8313
|
+
}
|
|
8314
|
+
};
|
|
8315
|
+
nullLog = new NullLog();
|
|
8316
|
+
}
|
|
8317
|
+
});
|
|
8318
|
+
|
|
7583
8319
|
// ../core/src/loader-utils/lib/module-utils/initialize-wasm-module.ts
|
|
7584
8320
|
function initializeWasmModule(initialize, extractExports) {
|
|
7585
8321
|
return new Promise((resolve, reject) => {
|
|
@@ -7617,34 +8353,34 @@ var init_initialize_wasm_module = __esm({
|
|
|
7617
8353
|
|
|
7618
8354
|
// ../core/src/worker-utils/lib/env-utils/version.ts
|
|
7619
8355
|
function getVersion() {
|
|
7620
|
-
const
|
|
8356
|
+
const version3 = false ? NPM_TAG : "5.0.0-beta.8";
|
|
7621
8357
|
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
7622
|
-
globalThis._loadersgl_.version ||=
|
|
7623
|
-
return
|
|
8358
|
+
globalThis._loadersgl_.version ||= version3;
|
|
8359
|
+
return version3;
|
|
7624
8360
|
}
|
|
7625
|
-
var
|
|
8361
|
+
var VERSION3;
|
|
7626
8362
|
var init_version = __esm({
|
|
7627
8363
|
"../core/src/worker-utils/lib/env-utils/version.ts"() {
|
|
7628
8364
|
"use strict";
|
|
7629
|
-
|
|
8365
|
+
VERSION3 = getVersion();
|
|
7630
8366
|
}
|
|
7631
8367
|
});
|
|
7632
8368
|
|
|
7633
8369
|
// ../core/src/worker-utils/lib/env-utils/assert.ts
|
|
7634
|
-
function
|
|
8370
|
+
function assert3(condition, message) {
|
|
7635
8371
|
if (!condition) {
|
|
7636
8372
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
7637
8373
|
}
|
|
7638
8374
|
}
|
|
7639
|
-
var
|
|
8375
|
+
var init_assert3 = __esm({
|
|
7640
8376
|
"../core/src/worker-utils/lib/env-utils/assert.ts"() {
|
|
7641
8377
|
"use strict";
|
|
7642
8378
|
}
|
|
7643
8379
|
});
|
|
7644
8380
|
|
|
7645
8381
|
// ../core/src/worker-utils/lib/env-utils/globals.ts
|
|
7646
|
-
var globals, self_,
|
|
7647
|
-
var
|
|
8382
|
+
var globals, self_, window_2, global_2, document_2, isBrowser3, isWorker, isMobile2, matches, nodeVersion2;
|
|
8383
|
+
var init_globals2 = __esm({
|
|
7648
8384
|
"../core/src/worker-utils/lib/env-utils/globals.ts"() {
|
|
7649
8385
|
"use strict";
|
|
7650
8386
|
globals = {
|
|
@@ -7654,13 +8390,13 @@ var init_globals = __esm({
|
|
|
7654
8390
|
document: typeof document !== "undefined" && document
|
|
7655
8391
|
};
|
|
7656
8392
|
self_ = globals.self || globals.window || globals.global || {};
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
8393
|
+
window_2 = globals.window || globals.self || globals.global || {};
|
|
8394
|
+
global_2 = globals.global || globals.self || globals.window || {};
|
|
8395
|
+
document_2 = globals.document || {};
|
|
8396
|
+
isBrowser3 = // @ts-ignore process.browser
|
|
7661
8397
|
typeof process !== "object" || String(process) !== "[object process]" || process.browser;
|
|
7662
8398
|
isWorker = typeof importScripts === "function";
|
|
7663
|
-
|
|
8399
|
+
isMobile2 = typeof window !== "undefined" && typeof window.orientation !== "undefined";
|
|
7664
8400
|
matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
7665
8401
|
nodeVersion2 = matches && parseFloat(matches[1]) || 0;
|
|
7666
8402
|
}
|
|
@@ -8839,15 +9575,15 @@ function getLibraryUrl(library, moduleName, options = {}, libraryName = null) {
|
|
|
8839
9575
|
if (!options.useLocalLibraries && library.startsWith("http")) {
|
|
8840
9576
|
return library;
|
|
8841
9577
|
}
|
|
8842
|
-
if (!
|
|
9578
|
+
if (!isBrowser3) {
|
|
8843
9579
|
return `modules/${moduleName}/dist/libs/${libraryName}`;
|
|
8844
9580
|
}
|
|
8845
9581
|
if (options.CDN) {
|
|
8846
9582
|
if (typeof options.CDN !== "string") {
|
|
8847
9583
|
throw new Error("loadLibrary: options.CDN must be a string or null");
|
|
8848
9584
|
}
|
|
8849
|
-
|
|
8850
|
-
return `${options.CDN}/${moduleName}@${
|
|
9585
|
+
assert3(options.CDN.startsWith("http"));
|
|
9586
|
+
return `${options.CDN}/${moduleName}@${VERSION3}/dist/libs/${libraryName}`;
|
|
8851
9587
|
}
|
|
8852
9588
|
if (isWorker) {
|
|
8853
9589
|
return libraryName.endsWith(".mjs") ? `./libs/${libraryName}` : `../src/libs/${libraryName}`;
|
|
@@ -8858,7 +9594,7 @@ async function loadLibraryFromFile(libraryUrl, moduleLibraryUrl) {
|
|
|
8858
9594
|
if (libraryUrl.endsWith("wasm")) {
|
|
8859
9595
|
return await loadAsArrayBuffer(libraryUrl);
|
|
8860
9596
|
}
|
|
8861
|
-
if (!
|
|
9597
|
+
if (!isBrowser3) {
|
|
8862
9598
|
const { requireFromFile: requireFromFile2 } = globalThis.loaders || {};
|
|
8863
9599
|
try {
|
|
8864
9600
|
const result = await (requireFromFile2 == null ? void 0 : requireFromFile2(libraryUrl));
|
|
@@ -8873,7 +9609,7 @@ async function loadLibraryFromFile(libraryUrl, moduleLibraryUrl) {
|
|
|
8873
9609
|
} catch {
|
|
8874
9610
|
}
|
|
8875
9611
|
}
|
|
8876
|
-
|
|
9612
|
+
log3.error(String(error))();
|
|
8877
9613
|
return null;
|
|
8878
9614
|
}
|
|
8879
9615
|
}
|
|
@@ -8910,7 +9646,7 @@ function loadLibraryFromString(scriptSource, id) {
|
|
|
8910
9646
|
}
|
|
8911
9647
|
async function loadAsArrayBuffer(url) {
|
|
8912
9648
|
const { readFileAsArrayBuffer: readFileAsArrayBuffer2 } = globalThis.loaders || {};
|
|
8913
|
-
if (
|
|
9649
|
+
if (isBrowser3 || !readFileAsArrayBuffer2 || url.startsWith("http")) {
|
|
8914
9650
|
const response = await fetch(url);
|
|
8915
9651
|
return await response.arrayBuffer();
|
|
8916
9652
|
}
|
|
@@ -8925,7 +9661,7 @@ async function loadAsArrayBuffer(url) {
|
|
|
8925
9661
|
}
|
|
8926
9662
|
async function loadAsText(url) {
|
|
8927
9663
|
const { readFileAsText: readFileAsText2 } = globalThis.loaders || {};
|
|
8928
|
-
if (
|
|
9664
|
+
if (isBrowser3 || !readFileAsText2 || url.startsWith("http")) {
|
|
8929
9665
|
const response = await fetch(url);
|
|
8930
9666
|
return await response.text();
|
|
8931
9667
|
}
|
|
@@ -8942,8 +9678,9 @@ var loadLibraryPromises;
|
|
|
8942
9678
|
var init_library_utils = __esm({
|
|
8943
9679
|
"../core/src/worker-utils/lib/library-utils/library-utils.ts"() {
|
|
8944
9680
|
"use strict";
|
|
8945
|
-
|
|
8946
|
-
|
|
9681
|
+
init_log2();
|
|
9682
|
+
init_globals2();
|
|
9683
|
+
init_assert3();
|
|
8947
9684
|
init_version();
|
|
8948
9685
|
loadLibraryPromises = {};
|
|
8949
9686
|
}
|
|
@@ -8953,7 +9690,7 @@ var init_library_utils = __esm({
|
|
|
8953
9690
|
var init_worker_utils2 = __esm({
|
|
8954
9691
|
"../core/src/worker-utils/index.ts"() {
|
|
8955
9692
|
"use strict";
|
|
8956
|
-
|
|
9693
|
+
init_globals2();
|
|
8957
9694
|
init_create_worker2();
|
|
8958
9695
|
init_library_utils();
|
|
8959
9696
|
}
|
|
@@ -9233,6 +9970,7 @@ var init_dist3 = __esm({
|
|
|
9233
9970
|
var init_loader_utils = __esm({
|
|
9234
9971
|
"../core/src/loader-utils/index.ts"() {
|
|
9235
9972
|
"use strict";
|
|
9973
|
+
init_log2();
|
|
9236
9974
|
init_initialize_wasm_module();
|
|
9237
9975
|
init_create_loader_worker();
|
|
9238
9976
|
}
|
|
@@ -17155,8 +17893,8 @@ var init_footer = __esm({
|
|
|
17155
17893
|
static startFooter(builder) {
|
|
17156
17894
|
builder.startObject(5);
|
|
17157
17895
|
}
|
|
17158
|
-
static addVersion(builder,
|
|
17159
|
-
builder.addFieldInt16(0,
|
|
17896
|
+
static addVersion(builder, version3) {
|
|
17897
|
+
builder.addFieldInt16(0, version3, MetadataVersion.V1);
|
|
17160
17898
|
}
|
|
17161
17899
|
static addSchema(builder, schemaOffset) {
|
|
17162
17900
|
builder.addFieldOffset(1, schemaOffset, 0);
|
|
@@ -17402,9 +18140,9 @@ var init_file = __esm({
|
|
|
17402
18140
|
get numDictionaries() {
|
|
17403
18141
|
return this._dictionaryBatches.length;
|
|
17404
18142
|
}
|
|
17405
|
-
constructor(schema,
|
|
18143
|
+
constructor(schema, version3 = MetadataVersion.V5, recordBatches, dictionaryBatches) {
|
|
17406
18144
|
this.schema = schema;
|
|
17407
|
-
this.version =
|
|
18145
|
+
this.version = version3;
|
|
17408
18146
|
recordBatches && (this._recordBatches = recordBatches);
|
|
17409
18147
|
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
17410
18148
|
}
|
|
@@ -17532,8 +18270,8 @@ var init_message = __esm({
|
|
|
17532
18270
|
static startMessage(builder) {
|
|
17533
18271
|
builder.startObject(5);
|
|
17534
18272
|
}
|
|
17535
|
-
static addVersion(builder,
|
|
17536
|
-
builder.addFieldInt16(0,
|
|
18273
|
+
static addVersion(builder, version3) {
|
|
18274
|
+
builder.addFieldInt16(0, version3, MetadataVersion.V1);
|
|
17537
18275
|
}
|
|
17538
18276
|
static addHeaderType(builder, headerType) {
|
|
17539
18277
|
builder.addFieldInt8(1, headerType, MessageHeader.NONE);
|
|
@@ -17567,9 +18305,9 @@ var init_message = __esm({
|
|
|
17567
18305
|
static finishSizePrefixedMessageBuffer(builder, offset) {
|
|
17568
18306
|
builder.finish(offset, void 0, true);
|
|
17569
18307
|
}
|
|
17570
|
-
static createMessage(builder,
|
|
18308
|
+
static createMessage(builder, version3, headerType, headerOffset, bodyLength, customMetadataOffset) {
|
|
17571
18309
|
_Message.startMessage(builder);
|
|
17572
|
-
_Message.addVersion(builder,
|
|
18310
|
+
_Message.addVersion(builder, version3);
|
|
17573
18311
|
_Message.addHeaderType(builder, headerType);
|
|
17574
18312
|
_Message.addHeader(builder, headerOffset);
|
|
17575
18313
|
_Message.addBodyLength(builder, bodyLength);
|
|
@@ -17941,16 +18679,16 @@ function decodeMessageHeader(message, type) {
|
|
|
17941
18679
|
throw new Error(`Unrecognized Message type: { name: ${MessageHeader[type]}, type: ${type} }`);
|
|
17942
18680
|
});
|
|
17943
18681
|
}
|
|
17944
|
-
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(),
|
|
18682
|
+
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(), version3 = MetadataVersion.V5) {
|
|
17945
18683
|
const fields = decodeSchemaFields(_schema, dictionaries);
|
|
17946
|
-
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries,
|
|
18684
|
+
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries, version3);
|
|
17947
18685
|
}
|
|
17948
|
-
function decodeRecordBatch(batch,
|
|
17949
|
-
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch,
|
|
18686
|
+
function decodeRecordBatch(batch, version3 = MetadataVersion.V5) {
|
|
18687
|
+
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version3), decodeBodyCompression(batch.compression()), decodeVariadicBufferCounts(batch));
|
|
17950
18688
|
return recordBatch;
|
|
17951
18689
|
}
|
|
17952
|
-
function decodeDictionaryBatch(batch,
|
|
17953
|
-
return new DictionaryBatch2(RecordBatch2.decode(batch.data(),
|
|
18690
|
+
function decodeDictionaryBatch(batch, version3 = MetadataVersion.V5) {
|
|
18691
|
+
return new DictionaryBatch2(RecordBatch2.decode(batch.data(), version3), batch.id(), batch.isDelta());
|
|
17954
18692
|
}
|
|
17955
18693
|
function decodeBufferRegion(b) {
|
|
17956
18694
|
return new BufferRegion(b.offset(), b.length());
|
|
@@ -17967,11 +18705,11 @@ function decodeFieldNodes(batch) {
|
|
|
17967
18705
|
}
|
|
17968
18706
|
return nodes;
|
|
17969
18707
|
}
|
|
17970
|
-
function decodeBuffers(batch,
|
|
18708
|
+
function decodeBuffers(batch, version3) {
|
|
17971
18709
|
const bufferRegions = [];
|
|
17972
18710
|
for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n; ) {
|
|
17973
18711
|
if (b = batch.buffers(i)) {
|
|
17974
|
-
if (
|
|
18712
|
+
if (version3 < MetadataVersion.V4) {
|
|
17975
18713
|
b.bb_pos += 8 * (i + 1);
|
|
17976
18714
|
}
|
|
17977
18715
|
bufferRegions[++j] = BufferRegion.decode(b);
|
|
@@ -18296,10 +19034,10 @@ var init_message2 = __esm({
|
|
|
18296
19034
|
buf = new ByteBuffer4(toUint8Array2(buf));
|
|
18297
19035
|
const _message = Message.getRootAsMessage(buf);
|
|
18298
19036
|
const bodyLength = _message.bodyLength();
|
|
18299
|
-
const
|
|
19037
|
+
const version3 = _message.version();
|
|
18300
19038
|
const headerType = _message.headerType();
|
|
18301
19039
|
const metadata2 = decodeMessageCustomMetadata(_message);
|
|
18302
|
-
const message = new _Message(bodyLength,
|
|
19040
|
+
const message = new _Message(bodyLength, version3, headerType, void 0, metadata2);
|
|
18303
19041
|
message._createHeader = decodeMessageHeader(_message, headerType);
|
|
18304
19042
|
return message;
|
|
18305
19043
|
}
|
|
@@ -18376,8 +19114,8 @@ var init_message2 = __esm({
|
|
|
18376
19114
|
isDictionaryBatch() {
|
|
18377
19115
|
return this.headerType === MessageHeader.DictionaryBatch;
|
|
18378
19116
|
}
|
|
18379
|
-
constructor(bodyLength,
|
|
18380
|
-
this._version =
|
|
19117
|
+
constructor(bodyLength, version3, headerType, header, metadata2) {
|
|
19118
|
+
this._version = version3;
|
|
18381
19119
|
this._headerType = headerType;
|
|
18382
19120
|
this.body = new Uint8Array(0);
|
|
18383
19121
|
this._compression = header === null || header === void 0 ? void 0 : header.compression;
|
|
@@ -25506,6 +26244,7 @@ var DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP, DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP, UINT16
|
|
|
25506
26244
|
var init_draco_parser = __esm({
|
|
25507
26245
|
"src/draco/lib/draco-parser.ts"() {
|
|
25508
26246
|
"use strict";
|
|
26247
|
+
init_loader_utils();
|
|
25509
26248
|
init_schema_utils();
|
|
25510
26249
|
init_get_draco_schema();
|
|
25511
26250
|
DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP = {
|
|
@@ -25530,15 +26269,17 @@ var init_draco_parser = __esm({
|
|
|
25530
26269
|
UINT16_INDEX_ITEM_SIZE = 2;
|
|
25531
26270
|
UINT32_INDEX_ITEM_SIZE = 4;
|
|
25532
26271
|
DracoParser = class {
|
|
25533
|
-
draco;
|
|
25534
|
-
decoder;
|
|
25535
|
-
metadataQuerier;
|
|
25536
26272
|
// draco - the draco decoder, either import `draco3d` or load dynamically
|
|
25537
|
-
constructor(draco) {
|
|
26273
|
+
constructor(draco, logger = getLoaderLog()) {
|
|
26274
|
+
this.logger = logger;
|
|
25538
26275
|
this.draco = draco;
|
|
25539
26276
|
this.decoder = new this.draco.Decoder();
|
|
25540
26277
|
this.metadataQuerier = new this.draco.MetadataQuerier();
|
|
25541
26278
|
}
|
|
26279
|
+
logger;
|
|
26280
|
+
draco;
|
|
26281
|
+
decoder;
|
|
26282
|
+
metadataQuerier;
|
|
25542
26283
|
/**
|
|
25543
26284
|
* Destroy draco resources
|
|
25544
26285
|
*/
|
|
@@ -25801,7 +26542,7 @@ var init_draco_parser = __esm({
|
|
|
25801
26542
|
_getAttributeValues(dracoGeometry, attribute) {
|
|
25802
26543
|
const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
|
|
25803
26544
|
if (!TypedArrayCtor) {
|
|
25804
|
-
|
|
26545
|
+
this.logger.warn(`DRACO: Unsupported attribute type ${attribute.data_type}`)();
|
|
25805
26546
|
return null;
|
|
25806
26547
|
}
|
|
25807
26548
|
const numComponents = attribute.num_components;
|
|
@@ -25996,7 +26737,7 @@ async function parseDraco(arrayBuffer2, options, loadDecoderModule, context) {
|
|
|
25996
26737
|
reportProgress == null ? void 0 : reportProgress({ phase: "decode", completed: 0, total: 1, unit: "tasks" });
|
|
25997
26738
|
const { draco } = await loadDecoderModule();
|
|
25998
26739
|
(_a5 = (options == null ? void 0 : options.signal) || (context == null ? void 0 : context.signal)) == null ? void 0 : _a5.throwIfAborted();
|
|
25999
|
-
const dracoParser = new DracoParser(draco);
|
|
26740
|
+
const dracoParser = new DracoParser(draco, getLoaderLog(options));
|
|
26000
26741
|
try {
|
|
26001
26742
|
const mesh = dracoParser.parseSync(arrayBuffer2, options == null ? void 0 : options.draco);
|
|
26002
26743
|
reportProgress == null ? void 0 : reportProgress({ phase: "decode", completed: 1, total: 1, unit: "tasks" });
|
|
@@ -26011,6 +26752,7 @@ async function parseDraco(arrayBuffer2, options, loadDecoderModule, context) {
|
|
|
26011
26752
|
var init_parse_draco = __esm({
|
|
26012
26753
|
"src/draco/lib/parse-draco.ts"() {
|
|
26013
26754
|
"use strict";
|
|
26755
|
+
init_loader_utils();
|
|
26014
26756
|
init_schema_utils();
|
|
26015
26757
|
init_draco_parser();
|
|
26016
26758
|
}
|
|
@@ -26019,7 +26761,7 @@ var init_parse_draco = __esm({
|
|
|
26019
26761
|
// src/draco/lib/draco-library-loader.ts
|
|
26020
26762
|
async function loadLibrary2(libraryUrl, moduleName = null, options = {}, libraryName = null, moduleLibraryName = null) {
|
|
26021
26763
|
var _a5;
|
|
26022
|
-
if (
|
|
26764
|
+
if (isBrowser3 && options.useLocalLibraries && !options.CDN && libraryName && ((_a5 = options.modules) == null ? void 0 : _a5[libraryName]) === void 0) {
|
|
26023
26765
|
const directory = isWorker ? "./libs" : `modules/${moduleName}/dist/libs`;
|
|
26024
26766
|
options = {
|
|
26025
26767
|
...options,
|
|
@@ -26148,7 +26890,7 @@ async function loadDracoDecoderInternal(options, type, profile) {
|
|
|
26148
26890
|
"draco_decoder.mjs"
|
|
26149
26891
|
);
|
|
26150
26892
|
} catch (error) {
|
|
26151
|
-
if (
|
|
26893
|
+
if (isBrowser3 || options.useLocalLibraries) {
|
|
26152
26894
|
throw error;
|
|
26153
26895
|
}
|
|
26154
26896
|
decoderLibrary2 = await loadLibrary2(
|
|
@@ -26167,7 +26909,7 @@ async function loadDracoDecoderInternal(options, type, profile) {
|
|
|
26167
26909
|
try {
|
|
26168
26910
|
[decoderLibrary, wasmBinary] = await loadDecoderWasmAssets(options, profile);
|
|
26169
26911
|
} catch (error) {
|
|
26170
|
-
if (
|
|
26912
|
+
if (isBrowser3 || options.useLocalLibraries) {
|
|
26171
26913
|
throw error;
|
|
26172
26914
|
}
|
|
26173
26915
|
[decoderLibrary, wasmBinary] = await loadDecoderWasmAssets(
|
|
@@ -26260,6 +27002,18 @@ var init_draco_module_loader = __esm({
|
|
|
26260
27002
|
}
|
|
26261
27003
|
});
|
|
26262
27004
|
|
|
27005
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-helpers.js
|
|
27006
|
+
var init_indexed_arrow_helpers = __esm({
|
|
27007
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-helpers.js"() {
|
|
27008
|
+
}
|
|
27009
|
+
});
|
|
27010
|
+
|
|
27011
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-schema-utils.js
|
|
27012
|
+
var init_arrow_schema_utils = __esm({
|
|
27013
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-schema-utils.js"() {
|
|
27014
|
+
}
|
|
27015
|
+
});
|
|
27016
|
+
|
|
26263
27017
|
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js
|
|
26264
27018
|
function getArrowVariadicBuffers(data) {
|
|
26265
27019
|
return data.variadicBuffers ?? [];
|
|
@@ -26363,27 +27117,43 @@ var init_split_arrow_buffers = __esm({
|
|
|
26363
27117
|
}
|
|
26364
27118
|
});
|
|
26365
27119
|
|
|
27120
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/take-arrow-rows.js
|
|
27121
|
+
var init_take_arrow_rows = __esm({
|
|
27122
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/take-arrow-rows.js"() {
|
|
27123
|
+
init_arrow_data();
|
|
27124
|
+
init_split_arrow_buffers();
|
|
27125
|
+
}
|
|
27126
|
+
});
|
|
27127
|
+
|
|
26366
27128
|
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js
|
|
26367
27129
|
var init_indexed_arrow_vector = __esm({
|
|
26368
27130
|
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js"() {
|
|
27131
|
+
init_indexed_arrow_helpers();
|
|
26369
27132
|
}
|
|
26370
27133
|
});
|
|
26371
27134
|
|
|
26372
27135
|
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js
|
|
26373
27136
|
var init_indexed_arrow_table = __esm({
|
|
26374
27137
|
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js"() {
|
|
27138
|
+
init_indexed_arrow_helpers();
|
|
27139
|
+
init_arrow_schema_utils();
|
|
27140
|
+
init_take_arrow_rows();
|
|
27141
|
+
init_indexed_arrow_vector();
|
|
26375
27142
|
}
|
|
26376
27143
|
});
|
|
26377
27144
|
|
|
26378
27145
|
// ../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js
|
|
26379
27146
|
var init_mapped_arrow_table = __esm({
|
|
26380
27147
|
"../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js"() {
|
|
27148
|
+
init_indexed_arrow_helpers();
|
|
27149
|
+
init_indexed_arrow_table();
|
|
26381
27150
|
}
|
|
26382
27151
|
});
|
|
26383
27152
|
|
|
26384
27153
|
// ../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js
|
|
26385
27154
|
var init_rename_arrow_columns = __esm({
|
|
26386
27155
|
"../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js"() {
|
|
27156
|
+
init_arrow_schema_utils();
|
|
26387
27157
|
}
|
|
26388
27158
|
});
|
|
26389
27159
|
|
|
@@ -26438,15 +27208,23 @@ var init_arrow_table_transport = __esm({
|
|
|
26438
27208
|
}
|
|
26439
27209
|
});
|
|
26440
27210
|
|
|
27211
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-column-utils.js
|
|
27212
|
+
var init_arrow_column_utils = __esm({
|
|
27213
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-column-utils.js"() {
|
|
27214
|
+
}
|
|
27215
|
+
});
|
|
27216
|
+
|
|
26441
27217
|
// ../../node_modules/@math.gl/arrow/dist/arrow/index.js
|
|
26442
27218
|
var init_arrow = __esm({
|
|
26443
27219
|
"../../node_modules/@math.gl/arrow/dist/arrow/index.js"() {
|
|
26444
27220
|
init_indexed_arrow_table();
|
|
26445
27221
|
init_indexed_arrow_vector();
|
|
26446
27222
|
init_mapped_arrow_table();
|
|
27223
|
+
init_arrow_schema_utils();
|
|
26447
27224
|
init_rename_arrow_columns();
|
|
26448
27225
|
init_split_arrow_buffers();
|
|
26449
27226
|
init_arrow_table_transport();
|
|
27227
|
+
init_arrow_column_utils();
|
|
26450
27228
|
}
|
|
26451
27229
|
});
|
|
26452
27230
|
|
|
@@ -26496,11 +27274,11 @@ var init_arrow_worker_transport = __esm({
|
|
|
26496
27274
|
});
|
|
26497
27275
|
|
|
26498
27276
|
// src/draco/lib/utils/version.ts
|
|
26499
|
-
var
|
|
27277
|
+
var VERSION4;
|
|
26500
27278
|
var init_version2 = __esm({
|
|
26501
27279
|
"src/draco/lib/utils/version.ts"() {
|
|
26502
27280
|
"use strict";
|
|
26503
|
-
|
|
27281
|
+
VERSION4 = true ? "5.0.0-beta.8" : "latest";
|
|
26504
27282
|
}
|
|
26505
27283
|
});
|
|
26506
27284
|
|
|
@@ -26695,7 +27473,7 @@ var init_draco_loader_types = __esm({
|
|
|
26695
27473
|
batchType: null,
|
|
26696
27474
|
...DracoFormat,
|
|
26697
27475
|
// shapes: ['mesh'],
|
|
26698
|
-
version:
|
|
27476
|
+
version: VERSION4,
|
|
26699
27477
|
worker: true,
|
|
26700
27478
|
/** Node test workers live with the Draco implementation. */
|
|
26701
27479
|
workerSourceNode: "draco/workers/draco-worker-node.ts",
|
|
@@ -26709,8 +27487,11 @@ var init_draco_loader_types = __esm({
|
|
|
26709
27487
|
}
|
|
26710
27488
|
});
|
|
26711
27489
|
|
|
27490
|
+
// ../core/src/polyfills/index.ts
|
|
27491
|
+
init_log();
|
|
27492
|
+
|
|
26712
27493
|
// ../core/src/polyfills/utils/is-browser.ts
|
|
26713
|
-
var
|
|
27494
|
+
var isBrowser2 = (
|
|
26714
27495
|
// @ts-ignore process.browser
|
|
26715
27496
|
typeof process !== "object" || String(process) !== "[object process]" || process.browser
|
|
26716
27497
|
);
|
|
@@ -28829,10 +29610,10 @@ var nodeVersion = parseInt(import_node_process.versions.node.split(".")[0]);
|
|
|
28829
29610
|
var Blob = globalThis.Blob;
|
|
28830
29611
|
var File = globalThis.File;
|
|
28831
29612
|
installFilePolyfills();
|
|
28832
|
-
if (
|
|
28833
|
-
|
|
29613
|
+
if (isBrowser2) {
|
|
29614
|
+
log.error(
|
|
28834
29615
|
"loaders.gl: The @loaders.gl/core/polyfills should only be used in Node.js environments"
|
|
28835
|
-
);
|
|
29616
|
+
)();
|
|
28836
29617
|
}
|
|
28837
29618
|
globalThis.loaders = globalThis.loaders || {};
|
|
28838
29619
|
globalThis.loaders.makeNodeStream = makeNodeStream;
|