@deck.gl/geo-layers 8.9.0 → 8.9.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/dist.dev.js +183 -1662
- package/dist.min.js +65 -66
- package/package.json +2 -2
package/dist/dist.dev.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if (typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
|
+
else if (typeof exports === 'object') exports['deck'] = factory();
|
|
6
|
+
else root['deck'] = factory();})(globalThis, function () {
|
|
1
7
|
"use strict";
|
|
2
|
-
var
|
|
8
|
+
var __exports__ = (() => {
|
|
3
9
|
var __create = Object.create;
|
|
4
10
|
var __defProp = Object.defineProperty;
|
|
5
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -43,14 +49,14 @@ var deck = (() => {
|
|
|
43
49
|
// external-global-plugin:@deck.gl/layers
|
|
44
50
|
var require_layers = __commonJS({
|
|
45
51
|
"external-global-plugin:@deck.gl/layers"(exports4, module2) {
|
|
46
|
-
module2.exports =
|
|
52
|
+
module2.exports = typeof __require === "function" ? require_layers() : null;
|
|
47
53
|
}
|
|
48
54
|
});
|
|
49
55
|
|
|
50
56
|
// external-global-plugin:@deck.gl/core
|
|
51
57
|
var require_core = __commonJS({
|
|
52
58
|
"external-global-plugin:@deck.gl/core"(exports4, module2) {
|
|
53
|
-
module2.exports =
|
|
59
|
+
module2.exports = typeof __require === "function" ? require_core() : null;
|
|
54
60
|
}
|
|
55
61
|
});
|
|
56
62
|
|
|
@@ -488,17 +494,17 @@ var deck = (() => {
|
|
|
488
494
|
[key]: val
|
|
489
495
|
});
|
|
490
496
|
}
|
|
491
|
-
addChild(
|
|
492
|
-
if (
|
|
493
|
-
|
|
494
|
-
if (
|
|
497
|
+
addChild(node2) {
|
|
498
|
+
if (node2.tagname === "__proto__")
|
|
499
|
+
node2.tagname = "#__proto__";
|
|
500
|
+
if (node2[":@"] && Object.keys(node2[":@"]).length > 0) {
|
|
495
501
|
this.child.push({
|
|
496
|
-
[
|
|
497
|
-
[":@"]:
|
|
502
|
+
[node2.tagname]: node2.child,
|
|
503
|
+
[":@"]: node2[":@"]
|
|
498
504
|
});
|
|
499
505
|
} else {
|
|
500
506
|
this.child.push({
|
|
501
|
-
[
|
|
507
|
+
[node2.tagname]: node2.child
|
|
502
508
|
});
|
|
503
509
|
}
|
|
504
510
|
}
|
|
@@ -1176,8 +1182,8 @@ var deck = (() => {
|
|
|
1176
1182
|
var require_node2json = __commonJS({
|
|
1177
1183
|
"../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports4) {
|
|
1178
1184
|
"use strict";
|
|
1179
|
-
function prettify(
|
|
1180
|
-
return compress(
|
|
1185
|
+
function prettify(node2, options) {
|
|
1186
|
+
return compress(node2, options);
|
|
1181
1187
|
}
|
|
1182
1188
|
function compress(arr, options, jPath) {
|
|
1183
1189
|
let text;
|
|
@@ -1700,12 +1706,6 @@ var deck = (() => {
|
|
|
1700
1706
|
}
|
|
1701
1707
|
});
|
|
1702
1708
|
|
|
1703
|
-
// (disabled):../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/node/buffer
|
|
1704
|
-
var require_buffer = __commonJS({
|
|
1705
|
-
"(disabled):../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/node/buffer"() {
|
|
1706
|
-
}
|
|
1707
|
-
});
|
|
1708
|
-
|
|
1709
1709
|
// ../../node_modules/long/dist/long.js
|
|
1710
1710
|
var require_long = __commonJS({
|
|
1711
1711
|
"../../node_modules/long/dist/long.js"(exports4, module2) {
|
|
@@ -2228,28 +2228,35 @@ var deck = (() => {
|
|
|
2228
2228
|
// external-global-plugin:h3-js
|
|
2229
2229
|
var require_h3_js = __commonJS({
|
|
2230
2230
|
"external-global-plugin:h3-js"(exports4, module2) {
|
|
2231
|
-
module2.exports =
|
|
2231
|
+
module2.exports = typeof __require === "function" ? require_h3_js() : null;
|
|
2232
2232
|
}
|
|
2233
2233
|
});
|
|
2234
2234
|
|
|
2235
2235
|
// external-global-plugin:@luma.gl/core
|
|
2236
2236
|
var require_core2 = __commonJS({
|
|
2237
2237
|
"external-global-plugin:@luma.gl/core"(exports4, module2) {
|
|
2238
|
-
module2.exports =
|
|
2238
|
+
module2.exports = typeof __require === "function" ? require_core2() : null;
|
|
2239
2239
|
}
|
|
2240
2240
|
});
|
|
2241
2241
|
|
|
2242
2242
|
// external-global-plugin:@deck.gl/mesh-layers
|
|
2243
2243
|
var require_mesh_layers = __commonJS({
|
|
2244
2244
|
"external-global-plugin:@deck.gl/mesh-layers"(exports4, module2) {
|
|
2245
|
-
module2.exports =
|
|
2245
|
+
module2.exports = typeof __require === "function" ? require_mesh_layers() : null;
|
|
2246
|
+
}
|
|
2247
|
+
});
|
|
2248
|
+
|
|
2249
|
+
// external-global-plugin:@loaders.gl/core
|
|
2250
|
+
var require_core3 = __commonJS({
|
|
2251
|
+
"external-global-plugin:@loaders.gl/core"(exports4, module2) {
|
|
2252
|
+
module2.exports = typeof __require === "function" ? require_core3() : null;
|
|
2246
2253
|
}
|
|
2247
2254
|
});
|
|
2248
2255
|
|
|
2249
2256
|
// external-global-plugin:@deck.gl/extensions
|
|
2250
2257
|
var require_extensions = __commonJS({
|
|
2251
2258
|
"external-global-plugin:@deck.gl/extensions"(exports4, module2) {
|
|
2252
|
-
module2.exports =
|
|
2259
|
+
module2.exports = typeof __require === "function" ? require_extensions() : null;
|
|
2253
2260
|
}
|
|
2254
2261
|
});
|
|
2255
2262
|
|
|
@@ -3250,12 +3257,6 @@ var deck = (() => {
|
|
|
3250
3257
|
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
3251
3258
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
3252
3259
|
|
|
3253
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js
|
|
3254
|
-
var VERSION5 = true ? "3.3.1" : DEFAULT_VERSION;
|
|
3255
|
-
if (false) {
|
|
3256
|
-
console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
3260
|
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js
|
|
3260
3261
|
function assert3(condition, message) {
|
|
3261
3262
|
if (!condition) {
|
|
@@ -3280,455 +3281,9 @@ var deck = (() => {
|
|
|
3280
3281
|
var matches2 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
3281
3282
|
var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
|
|
3282
3283
|
|
|
3283
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js
|
|
3284
|
-
var WorkerJob = class {
|
|
3285
|
-
constructor(jobName, workerThread) {
|
|
3286
|
-
_defineProperty(this, "name", void 0);
|
|
3287
|
-
_defineProperty(this, "workerThread", void 0);
|
|
3288
|
-
_defineProperty(this, "isRunning", true);
|
|
3289
|
-
_defineProperty(this, "result", void 0);
|
|
3290
|
-
_defineProperty(this, "_resolve", () => {
|
|
3291
|
-
});
|
|
3292
|
-
_defineProperty(this, "_reject", () => {
|
|
3293
|
-
});
|
|
3294
|
-
this.name = jobName;
|
|
3295
|
-
this.workerThread = workerThread;
|
|
3296
|
-
this.result = new Promise((resolve, reject) => {
|
|
3297
|
-
this._resolve = resolve;
|
|
3298
|
-
this._reject = reject;
|
|
3299
|
-
});
|
|
3300
|
-
}
|
|
3301
|
-
postMessage(type, payload) {
|
|
3302
|
-
this.workerThread.postMessage({
|
|
3303
|
-
source: "loaders.gl",
|
|
3304
|
-
type,
|
|
3305
|
-
payload
|
|
3306
|
-
});
|
|
3307
|
-
}
|
|
3308
|
-
done(value) {
|
|
3309
|
-
assert3(this.isRunning);
|
|
3310
|
-
this.isRunning = false;
|
|
3311
|
-
this._resolve(value);
|
|
3312
|
-
}
|
|
3313
|
-
error(error2) {
|
|
3314
|
-
assert3(this.isRunning);
|
|
3315
|
-
this.isRunning = false;
|
|
3316
|
-
this._reject(error2);
|
|
3317
|
-
}
|
|
3318
|
-
};
|
|
3319
|
-
|
|
3320
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/worker_threads-browser.js
|
|
3321
|
-
var Worker2 = class {
|
|
3322
|
-
terminate() {
|
|
3323
|
-
}
|
|
3324
|
-
};
|
|
3325
|
-
|
|
3326
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-loadable-worker-url.js
|
|
3327
|
-
var workerURLCache = /* @__PURE__ */ new Map();
|
|
3328
|
-
function getLoadableWorkerURL(props) {
|
|
3329
|
-
assert3(props.source && !props.url || !props.source && props.url);
|
|
3330
|
-
let workerURL = workerURLCache.get(props.source || props.url);
|
|
3331
|
-
if (!workerURL) {
|
|
3332
|
-
if (props.url) {
|
|
3333
|
-
workerURL = getLoadableWorkerURLFromURL(props.url);
|
|
3334
|
-
workerURLCache.set(props.url, workerURL);
|
|
3335
|
-
}
|
|
3336
|
-
if (props.source) {
|
|
3337
|
-
workerURL = getLoadableWorkerURLFromSource(props.source);
|
|
3338
|
-
workerURLCache.set(props.source, workerURL);
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
assert3(workerURL);
|
|
3342
|
-
return workerURL;
|
|
3343
|
-
}
|
|
3344
|
-
function getLoadableWorkerURLFromURL(url) {
|
|
3345
|
-
if (!url.startsWith("http")) {
|
|
3346
|
-
return url;
|
|
3347
|
-
}
|
|
3348
|
-
const workerSource = buildScriptSource(url);
|
|
3349
|
-
return getLoadableWorkerURLFromSource(workerSource);
|
|
3350
|
-
}
|
|
3351
|
-
function getLoadableWorkerURLFromSource(workerSource) {
|
|
3352
|
-
const blob = new Blob([workerSource], {
|
|
3353
|
-
type: "application/javascript"
|
|
3354
|
-
});
|
|
3355
|
-
return URL.createObjectURL(blob);
|
|
3356
|
-
}
|
|
3357
|
-
function buildScriptSource(workerUrl) {
|
|
3358
|
-
return "try {\n importScripts('".concat(workerUrl, "');\n} catch (error) {\n console.error(error);\n throw error;\n}");
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js
|
|
3362
|
-
function getTransferList(object) {
|
|
3363
|
-
let recursive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
3364
|
-
let transfers = arguments.length > 2 ? arguments[2] : void 0;
|
|
3365
|
-
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
3366
|
-
if (!object) {
|
|
3367
|
-
} else if (isTransferable(object)) {
|
|
3368
|
-
transfersSet.add(object);
|
|
3369
|
-
} else if (isTransferable(object.buffer)) {
|
|
3370
|
-
transfersSet.add(object.buffer);
|
|
3371
|
-
} else if (ArrayBuffer.isView(object)) {
|
|
3372
|
-
} else if (recursive && typeof object === "object") {
|
|
3373
|
-
for (const key in object) {
|
|
3374
|
-
getTransferList(object[key], recursive, transfersSet);
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
return transfers === void 0 ? Array.from(transfersSet) : [];
|
|
3378
|
-
}
|
|
3379
|
-
function isTransferable(object) {
|
|
3380
|
-
if (!object) {
|
|
3381
|
-
return false;
|
|
3382
|
-
}
|
|
3383
|
-
if (object instanceof ArrayBuffer) {
|
|
3384
|
-
return true;
|
|
3385
|
-
}
|
|
3386
|
-
if (typeof MessagePort !== "undefined" && object instanceof MessagePort) {
|
|
3387
|
-
return true;
|
|
3388
|
-
}
|
|
3389
|
-
if (typeof ImageBitmap !== "undefined" && object instanceof ImageBitmap) {
|
|
3390
|
-
return true;
|
|
3391
|
-
}
|
|
3392
|
-
if (typeof OffscreenCanvas !== "undefined" && object instanceof OffscreenCanvas) {
|
|
3393
|
-
return true;
|
|
3394
|
-
}
|
|
3395
|
-
return false;
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js
|
|
3399
|
-
var NOOP = () => {
|
|
3400
|
-
};
|
|
3401
|
-
var WorkerThread = class {
|
|
3402
|
-
static isSupported() {
|
|
3403
|
-
return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !== "undefined" && !isBrowser2;
|
|
3404
|
-
}
|
|
3405
|
-
constructor(props) {
|
|
3406
|
-
_defineProperty(this, "name", void 0);
|
|
3407
|
-
_defineProperty(this, "source", void 0);
|
|
3408
|
-
_defineProperty(this, "url", void 0);
|
|
3409
|
-
_defineProperty(this, "terminated", false);
|
|
3410
|
-
_defineProperty(this, "worker", void 0);
|
|
3411
|
-
_defineProperty(this, "onMessage", void 0);
|
|
3412
|
-
_defineProperty(this, "onError", void 0);
|
|
3413
|
-
_defineProperty(this, "_loadableURL", "");
|
|
3414
|
-
const {
|
|
3415
|
-
name: name10,
|
|
3416
|
-
source,
|
|
3417
|
-
url
|
|
3418
|
-
} = props;
|
|
3419
|
-
assert3(source || url);
|
|
3420
|
-
this.name = name10;
|
|
3421
|
-
this.source = source;
|
|
3422
|
-
this.url = url;
|
|
3423
|
-
this.onMessage = NOOP;
|
|
3424
|
-
this.onError = (error2) => console.log(error2);
|
|
3425
|
-
this.worker = isBrowser2 ? this._createBrowserWorker() : this._createNodeWorker();
|
|
3426
|
-
}
|
|
3427
|
-
destroy() {
|
|
3428
|
-
this.onMessage = NOOP;
|
|
3429
|
-
this.onError = NOOP;
|
|
3430
|
-
this.worker.terminate();
|
|
3431
|
-
this.terminated = true;
|
|
3432
|
-
}
|
|
3433
|
-
get isRunning() {
|
|
3434
|
-
return Boolean(this.onMessage);
|
|
3435
|
-
}
|
|
3436
|
-
postMessage(data, transferList) {
|
|
3437
|
-
transferList = transferList || getTransferList(data);
|
|
3438
|
-
this.worker.postMessage(data, transferList);
|
|
3439
|
-
}
|
|
3440
|
-
_getErrorFromErrorEvent(event) {
|
|
3441
|
-
let message = "Failed to load ";
|
|
3442
|
-
message += "worker ".concat(this.name, " from ").concat(this.url, ". ");
|
|
3443
|
-
if (event.message) {
|
|
3444
|
-
message += "".concat(event.message, " in ");
|
|
3445
|
-
}
|
|
3446
|
-
if (event.lineno) {
|
|
3447
|
-
message += ":".concat(event.lineno, ":").concat(event.colno);
|
|
3448
|
-
}
|
|
3449
|
-
return new Error(message);
|
|
3450
|
-
}
|
|
3451
|
-
_createBrowserWorker() {
|
|
3452
|
-
this._loadableURL = getLoadableWorkerURL({
|
|
3453
|
-
source: this.source,
|
|
3454
|
-
url: this.url
|
|
3455
|
-
});
|
|
3456
|
-
const worker = new Worker(this._loadableURL, {
|
|
3457
|
-
name: this.name
|
|
3458
|
-
});
|
|
3459
|
-
worker.onmessage = (event) => {
|
|
3460
|
-
if (!event.data) {
|
|
3461
|
-
this.onError(new Error("No data received"));
|
|
3462
|
-
} else {
|
|
3463
|
-
this.onMessage(event.data);
|
|
3464
|
-
}
|
|
3465
|
-
};
|
|
3466
|
-
worker.onerror = (error2) => {
|
|
3467
|
-
this.onError(this._getErrorFromErrorEvent(error2));
|
|
3468
|
-
this.terminated = true;
|
|
3469
|
-
};
|
|
3470
|
-
worker.onmessageerror = (event) => console.error(event);
|
|
3471
|
-
return worker;
|
|
3472
|
-
}
|
|
3473
|
-
_createNodeWorker() {
|
|
3474
|
-
let worker;
|
|
3475
|
-
if (this.url) {
|
|
3476
|
-
const absolute = this.url.includes(":/") || this.url.startsWith("/");
|
|
3477
|
-
const url = absolute ? this.url : "./".concat(this.url);
|
|
3478
|
-
worker = new Worker2(url, {
|
|
3479
|
-
eval: false
|
|
3480
|
-
});
|
|
3481
|
-
} else if (this.source) {
|
|
3482
|
-
worker = new Worker2(this.source, {
|
|
3483
|
-
eval: true
|
|
3484
|
-
});
|
|
3485
|
-
} else {
|
|
3486
|
-
throw new Error("no worker");
|
|
3487
|
-
}
|
|
3488
|
-
worker.on("message", (data) => {
|
|
3489
|
-
this.onMessage(data);
|
|
3490
|
-
});
|
|
3491
|
-
worker.on("error", (error2) => {
|
|
3492
|
-
this.onError(error2);
|
|
3493
|
-
});
|
|
3494
|
-
worker.on("exit", (code) => {
|
|
3495
|
-
});
|
|
3496
|
-
return worker;
|
|
3497
|
-
}
|
|
3498
|
-
};
|
|
3499
|
-
|
|
3500
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js
|
|
3501
|
-
var WorkerPool = class {
|
|
3502
|
-
static isSupported() {
|
|
3503
|
-
return WorkerThread.isSupported();
|
|
3504
|
-
}
|
|
3505
|
-
constructor(props) {
|
|
3506
|
-
_defineProperty(this, "name", "unnamed");
|
|
3507
|
-
_defineProperty(this, "source", void 0);
|
|
3508
|
-
_defineProperty(this, "url", void 0);
|
|
3509
|
-
_defineProperty(this, "maxConcurrency", 1);
|
|
3510
|
-
_defineProperty(this, "maxMobileConcurrency", 1);
|
|
3511
|
-
_defineProperty(this, "onDebug", () => {
|
|
3512
|
-
});
|
|
3513
|
-
_defineProperty(this, "reuseWorkers", true);
|
|
3514
|
-
_defineProperty(this, "props", {});
|
|
3515
|
-
_defineProperty(this, "jobQueue", []);
|
|
3516
|
-
_defineProperty(this, "idleQueue", []);
|
|
3517
|
-
_defineProperty(this, "count", 0);
|
|
3518
|
-
_defineProperty(this, "isDestroyed", false);
|
|
3519
|
-
this.source = props.source;
|
|
3520
|
-
this.url = props.url;
|
|
3521
|
-
this.setProps(props);
|
|
3522
|
-
}
|
|
3523
|
-
destroy() {
|
|
3524
|
-
this.idleQueue.forEach((worker) => worker.destroy());
|
|
3525
|
-
this.isDestroyed = true;
|
|
3526
|
-
}
|
|
3527
|
-
setProps(props) {
|
|
3528
|
-
this.props = {
|
|
3529
|
-
...this.props,
|
|
3530
|
-
...props
|
|
3531
|
-
};
|
|
3532
|
-
if (props.name !== void 0) {
|
|
3533
|
-
this.name = props.name;
|
|
3534
|
-
}
|
|
3535
|
-
if (props.maxConcurrency !== void 0) {
|
|
3536
|
-
this.maxConcurrency = props.maxConcurrency;
|
|
3537
|
-
}
|
|
3538
|
-
if (props.maxMobileConcurrency !== void 0) {
|
|
3539
|
-
this.maxMobileConcurrency = props.maxMobileConcurrency;
|
|
3540
|
-
}
|
|
3541
|
-
if (props.reuseWorkers !== void 0) {
|
|
3542
|
-
this.reuseWorkers = props.reuseWorkers;
|
|
3543
|
-
}
|
|
3544
|
-
if (props.onDebug !== void 0) {
|
|
3545
|
-
this.onDebug = props.onDebug;
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
async startJob(name10) {
|
|
3549
|
-
let onMessage2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (job, type, data) => job.done(data);
|
|
3550
|
-
let onError = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (job, error2) => job.error(error2);
|
|
3551
|
-
const startPromise = new Promise((onStart) => {
|
|
3552
|
-
this.jobQueue.push({
|
|
3553
|
-
name: name10,
|
|
3554
|
-
onMessage: onMessage2,
|
|
3555
|
-
onError,
|
|
3556
|
-
onStart
|
|
3557
|
-
});
|
|
3558
|
-
return this;
|
|
3559
|
-
});
|
|
3560
|
-
this._startQueuedJob();
|
|
3561
|
-
return await startPromise;
|
|
3562
|
-
}
|
|
3563
|
-
async _startQueuedJob() {
|
|
3564
|
-
if (!this.jobQueue.length) {
|
|
3565
|
-
return;
|
|
3566
|
-
}
|
|
3567
|
-
const workerThread = this._getAvailableWorker();
|
|
3568
|
-
if (!workerThread) {
|
|
3569
|
-
return;
|
|
3570
|
-
}
|
|
3571
|
-
const queuedJob = this.jobQueue.shift();
|
|
3572
|
-
if (queuedJob) {
|
|
3573
|
-
this.onDebug({
|
|
3574
|
-
message: "Starting job",
|
|
3575
|
-
name: queuedJob.name,
|
|
3576
|
-
workerThread,
|
|
3577
|
-
backlog: this.jobQueue.length
|
|
3578
|
-
});
|
|
3579
|
-
const job = new WorkerJob(queuedJob.name, workerThread);
|
|
3580
|
-
workerThread.onMessage = (data) => queuedJob.onMessage(job, data.type, data.payload);
|
|
3581
|
-
workerThread.onError = (error2) => queuedJob.onError(job, error2);
|
|
3582
|
-
queuedJob.onStart(job);
|
|
3583
|
-
try {
|
|
3584
|
-
await job.result;
|
|
3585
|
-
} finally {
|
|
3586
|
-
this.returnWorkerToQueue(workerThread);
|
|
3587
|
-
}
|
|
3588
|
-
}
|
|
3589
|
-
}
|
|
3590
|
-
returnWorkerToQueue(worker) {
|
|
3591
|
-
const shouldDestroyWorker = this.isDestroyed || !this.reuseWorkers || this.count > this._getMaxConcurrency();
|
|
3592
|
-
if (shouldDestroyWorker) {
|
|
3593
|
-
worker.destroy();
|
|
3594
|
-
this.count--;
|
|
3595
|
-
} else {
|
|
3596
|
-
this.idleQueue.push(worker);
|
|
3597
|
-
}
|
|
3598
|
-
if (!this.isDestroyed) {
|
|
3599
|
-
this._startQueuedJob();
|
|
3600
|
-
}
|
|
3601
|
-
}
|
|
3602
|
-
_getAvailableWorker() {
|
|
3603
|
-
if (this.idleQueue.length > 0) {
|
|
3604
|
-
return this.idleQueue.shift() || null;
|
|
3605
|
-
}
|
|
3606
|
-
if (this.count < this._getMaxConcurrency()) {
|
|
3607
|
-
this.count++;
|
|
3608
|
-
const name10 = "".concat(this.name.toLowerCase(), " (#").concat(this.count, " of ").concat(this.maxConcurrency, ")");
|
|
3609
|
-
return new WorkerThread({
|
|
3610
|
-
name: name10,
|
|
3611
|
-
source: this.source,
|
|
3612
|
-
url: this.url
|
|
3613
|
-
});
|
|
3614
|
-
}
|
|
3615
|
-
return null;
|
|
3616
|
-
}
|
|
3617
|
-
_getMaxConcurrency() {
|
|
3618
|
-
return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
3619
|
-
}
|
|
3620
|
-
};
|
|
3621
|
-
|
|
3622
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js
|
|
3623
|
-
var DEFAULT_PROPS = {
|
|
3624
|
-
maxConcurrency: 3,
|
|
3625
|
-
maxMobileConcurrency: 1,
|
|
3626
|
-
reuseWorkers: true,
|
|
3627
|
-
onDebug: () => {
|
|
3628
|
-
}
|
|
3629
|
-
};
|
|
3630
|
-
var WorkerFarm = class {
|
|
3631
|
-
static isSupported() {
|
|
3632
|
-
return WorkerThread.isSupported();
|
|
3633
|
-
}
|
|
3634
|
-
static getWorkerFarm() {
|
|
3635
|
-
let props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3636
|
-
WorkerFarm._workerFarm = WorkerFarm._workerFarm || new WorkerFarm({});
|
|
3637
|
-
WorkerFarm._workerFarm.setProps(props);
|
|
3638
|
-
return WorkerFarm._workerFarm;
|
|
3639
|
-
}
|
|
3640
|
-
constructor(props) {
|
|
3641
|
-
_defineProperty(this, "props", void 0);
|
|
3642
|
-
_defineProperty(this, "workerPools", /* @__PURE__ */ new Map());
|
|
3643
|
-
this.props = {
|
|
3644
|
-
...DEFAULT_PROPS
|
|
3645
|
-
};
|
|
3646
|
-
this.setProps(props);
|
|
3647
|
-
this.workerPools = /* @__PURE__ */ new Map();
|
|
3648
|
-
}
|
|
3649
|
-
destroy() {
|
|
3650
|
-
for (const workerPool of this.workerPools.values()) {
|
|
3651
|
-
workerPool.destroy();
|
|
3652
|
-
}
|
|
3653
|
-
this.workerPools = /* @__PURE__ */ new Map();
|
|
3654
|
-
}
|
|
3655
|
-
setProps(props) {
|
|
3656
|
-
this.props = {
|
|
3657
|
-
...this.props,
|
|
3658
|
-
...props
|
|
3659
|
-
};
|
|
3660
|
-
for (const workerPool of this.workerPools.values()) {
|
|
3661
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
3662
|
-
}
|
|
3663
|
-
}
|
|
3664
|
-
getWorkerPool(options) {
|
|
3665
|
-
const {
|
|
3666
|
-
name: name10,
|
|
3667
|
-
source,
|
|
3668
|
-
url
|
|
3669
|
-
} = options;
|
|
3670
|
-
let workerPool = this.workerPools.get(name10);
|
|
3671
|
-
if (!workerPool) {
|
|
3672
|
-
workerPool = new WorkerPool({
|
|
3673
|
-
name: name10,
|
|
3674
|
-
source,
|
|
3675
|
-
url
|
|
3676
|
-
});
|
|
3677
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
3678
|
-
this.workerPools.set(name10, workerPool);
|
|
3679
|
-
}
|
|
3680
|
-
return workerPool;
|
|
3681
|
-
}
|
|
3682
|
-
_getWorkerPoolProps() {
|
|
3683
|
-
return {
|
|
3684
|
-
maxConcurrency: this.props.maxConcurrency,
|
|
3685
|
-
maxMobileConcurrency: this.props.maxMobileConcurrency,
|
|
3686
|
-
reuseWorkers: this.props.reuseWorkers,
|
|
3687
|
-
onDebug: this.props.onDebug
|
|
3688
|
-
};
|
|
3689
|
-
}
|
|
3690
|
-
};
|
|
3691
|
-
_defineProperty(WorkerFarm, "_workerFarm", void 0);
|
|
3692
|
-
|
|
3693
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js
|
|
3694
|
-
var NPM_TAG = "latest";
|
|
3695
|
-
function getWorkerURL(worker) {
|
|
3696
|
-
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3697
|
-
const workerOptions = options[worker.id] || {};
|
|
3698
|
-
const workerFile = "".concat(worker.id, "-worker.js");
|
|
3699
|
-
let url = workerOptions.workerUrl;
|
|
3700
|
-
if (!url && worker.id === "compression") {
|
|
3701
|
-
url = options.workerUrl;
|
|
3702
|
-
}
|
|
3703
|
-
if (options._workerType === "test") {
|
|
3704
|
-
url = "modules/".concat(worker.module, "/dist/").concat(workerFile);
|
|
3705
|
-
}
|
|
3706
|
-
if (!url) {
|
|
3707
|
-
let version = worker.version;
|
|
3708
|
-
if (version === "latest") {
|
|
3709
|
-
version = NPM_TAG;
|
|
3710
|
-
}
|
|
3711
|
-
const versionTag = version ? "@".concat(version) : "";
|
|
3712
|
-
url = "https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag, "/dist/").concat(workerFile);
|
|
3713
|
-
}
|
|
3714
|
-
assert3(url);
|
|
3715
|
-
return url;
|
|
3716
|
-
}
|
|
3717
|
-
|
|
3718
|
-
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/validate-worker-version.js
|
|
3719
|
-
function validateWorkerVersion(worker) {
|
|
3720
|
-
let coreVersion = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : VERSION5;
|
|
3721
|
-
assert3(worker, "no worker provided");
|
|
3722
|
-
const workerVersion = worker.version;
|
|
3723
|
-
if (!coreVersion || !workerVersion) {
|
|
3724
|
-
return false;
|
|
3725
|
-
}
|
|
3726
|
-
return true;
|
|
3727
|
-
}
|
|
3728
|
-
|
|
3729
3284
|
// ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js
|
|
3730
3285
|
var node = __toESM(require_require_utils());
|
|
3731
|
-
var
|
|
3286
|
+
var VERSION5 = true ? "3.3.1" : LATEST;
|
|
3732
3287
|
var loadLibraryPromises = {};
|
|
3733
3288
|
async function loadLibrary(libraryUrl) {
|
|
3734
3289
|
let moduleName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
@@ -3752,7 +3307,7 @@ var deck = (() => {
|
|
|
3752
3307
|
}
|
|
3753
3308
|
if (options.CDN) {
|
|
3754
3309
|
assert3(options.CDN.startsWith("http"));
|
|
3755
|
-
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(
|
|
3310
|
+
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION5, "/dist/libs/").concat(library);
|
|
3756
3311
|
}
|
|
3757
3312
|
if (isWorker) {
|
|
3758
3313
|
return "../src/libs/".concat(library);
|
|
@@ -3797,71 +3352,6 @@ var deck = (() => {
|
|
|
3797
3352
|
return null;
|
|
3798
3353
|
}
|
|
3799
3354
|
|
|
3800
|
-
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/worker-loader-utils/parse-with-worker.js
|
|
3801
|
-
function canParseWithWorker(loader, options) {
|
|
3802
|
-
if (!WorkerFarm.isSupported()) {
|
|
3803
|
-
return false;
|
|
3804
|
-
}
|
|
3805
|
-
if (!isBrowser2 && !(options !== null && options !== void 0 && options._nodeWorkers)) {
|
|
3806
|
-
return false;
|
|
3807
|
-
}
|
|
3808
|
-
return loader.worker && (options === null || options === void 0 ? void 0 : options.worker);
|
|
3809
|
-
}
|
|
3810
|
-
async function parseWithWorker(loader, data, options, context, parseOnMainThread) {
|
|
3811
|
-
const name10 = loader.id;
|
|
3812
|
-
const url = getWorkerURL(loader, options);
|
|
3813
|
-
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
3814
|
-
const workerPool = workerFarm.getWorkerPool({
|
|
3815
|
-
name: name10,
|
|
3816
|
-
url
|
|
3817
|
-
});
|
|
3818
|
-
options = JSON.parse(JSON.stringify(options));
|
|
3819
|
-
context = JSON.parse(JSON.stringify(context || {}));
|
|
3820
|
-
const job = await workerPool.startJob(
|
|
3821
|
-
"process-on-worker",
|
|
3822
|
-
onMessage.bind(null, parseOnMainThread)
|
|
3823
|
-
);
|
|
3824
|
-
job.postMessage("process", {
|
|
3825
|
-
input: data,
|
|
3826
|
-
options,
|
|
3827
|
-
context
|
|
3828
|
-
});
|
|
3829
|
-
const result = await job.result;
|
|
3830
|
-
return await result.result;
|
|
3831
|
-
}
|
|
3832
|
-
async function onMessage(parseOnMainThread, job, type, payload) {
|
|
3833
|
-
switch (type) {
|
|
3834
|
-
case "done":
|
|
3835
|
-
job.done(payload);
|
|
3836
|
-
break;
|
|
3837
|
-
case "error":
|
|
3838
|
-
job.error(new Error(payload.error));
|
|
3839
|
-
break;
|
|
3840
|
-
case "process":
|
|
3841
|
-
const {
|
|
3842
|
-
id,
|
|
3843
|
-
input,
|
|
3844
|
-
options
|
|
3845
|
-
} = payload;
|
|
3846
|
-
try {
|
|
3847
|
-
const result = await parseOnMainThread(input, options);
|
|
3848
|
-
job.postMessage("done", {
|
|
3849
|
-
id,
|
|
3850
|
-
result
|
|
3851
|
-
});
|
|
3852
|
-
} catch (error2) {
|
|
3853
|
-
const message = error2 instanceof Error ? error2.message : "unknown error";
|
|
3854
|
-
job.postMessage("error", {
|
|
3855
|
-
id,
|
|
3856
|
-
error: message
|
|
3857
|
-
});
|
|
3858
|
-
}
|
|
3859
|
-
break;
|
|
3860
|
-
default:
|
|
3861
|
-
console.warn("parse-with-worker unknown message ".concat(type));
|
|
3862
|
-
}
|
|
3863
|
-
}
|
|
3864
|
-
|
|
3865
3355
|
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/get-first-characters.js
|
|
3866
3356
|
function getFirstCharacters(data) {
|
|
3867
3357
|
let length5 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5;
|
|
@@ -3897,34 +3387,6 @@ var deck = (() => {
|
|
|
3897
3387
|
}
|
|
3898
3388
|
|
|
3899
3389
|
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/array-buffer-utils.js
|
|
3900
|
-
function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
|
|
3901
|
-
byteLength = byteLength || arrayBuffer1.byteLength;
|
|
3902
|
-
if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
|
|
3903
|
-
return false;
|
|
3904
|
-
}
|
|
3905
|
-
const array1 = new Uint8Array(arrayBuffer1);
|
|
3906
|
-
const array2 = new Uint8Array(arrayBuffer2);
|
|
3907
|
-
for (let i3 = 0; i3 < array1.length; ++i3) {
|
|
3908
|
-
if (array1[i3] !== array2[i3]) {
|
|
3909
|
-
return false;
|
|
3910
|
-
}
|
|
3911
|
-
}
|
|
3912
|
-
return true;
|
|
3913
|
-
}
|
|
3914
|
-
function concatenateArrayBuffers() {
|
|
3915
|
-
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3916
|
-
sources[_key] = arguments[_key];
|
|
3917
|
-
}
|
|
3918
|
-
const sourceArrays = sources.map((source2) => source2 instanceof ArrayBuffer ? new Uint8Array(source2) : source2);
|
|
3919
|
-
const byteLength = sourceArrays.reduce((length5, typedArray) => length5 + typedArray.byteLength, 0);
|
|
3920
|
-
const result = new Uint8Array(byteLength);
|
|
3921
|
-
let offset = 0;
|
|
3922
|
-
for (const sourceArray of sourceArrays) {
|
|
3923
|
-
result.set(sourceArray, offset);
|
|
3924
|
-
offset += sourceArray.byteLength;
|
|
3925
|
-
}
|
|
3926
|
-
return result.buffer;
|
|
3927
|
-
}
|
|
3928
3390
|
function concatenateTypedArrays() {
|
|
3929
3391
|
for (var _len2 = arguments.length, typedArrays = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
3930
3392
|
typedArrays[_key2] = arguments[_key2];
|
|
@@ -3968,15 +3430,6 @@ var deck = (() => {
|
|
|
3968
3430
|
return targetOffset + padToNBytes(sourceArray.byteLength, 4);
|
|
3969
3431
|
}
|
|
3970
3432
|
|
|
3971
|
-
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/iterators/async-iteration.js
|
|
3972
|
-
async function concatenateArrayBuffersAsync(asyncIterator) {
|
|
3973
|
-
const arrayBuffers = [];
|
|
3974
|
-
for await (const chunk of asyncIterator) {
|
|
3975
|
-
arrayBuffers.push(chunk);
|
|
3976
|
-
}
|
|
3977
|
-
return concatenateArrayBuffers(...arrayBuffers);
|
|
3978
|
-
}
|
|
3979
|
-
|
|
3980
3433
|
// ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
3981
3434
|
function getHiResTimestamp() {
|
|
3982
3435
|
let timestamp;
|
|
@@ -4175,7 +3628,7 @@ var deck = (() => {
|
|
|
4175
3628
|
var STAT_CANCELLED_REQUESTS = "Cancelled Requests";
|
|
4176
3629
|
var STAT_QUEUED_REQUESTS_EVER = "Queued Requests Ever";
|
|
4177
3630
|
var STAT_ACTIVE_REQUESTS_EVER = "Active Requests Ever";
|
|
4178
|
-
var
|
|
3631
|
+
var DEFAULT_PROPS = {
|
|
4179
3632
|
id: "request-scheduler",
|
|
4180
3633
|
throttleRequests: true,
|
|
4181
3634
|
maxRequests: 6
|
|
@@ -4190,7 +3643,7 @@ var deck = (() => {
|
|
|
4190
3643
|
_defineProperty(this, "requestMap", /* @__PURE__ */ new Map());
|
|
4191
3644
|
_defineProperty(this, "deferredUpdate", null);
|
|
4192
3645
|
this.props = {
|
|
4193
|
-
...
|
|
3646
|
+
...DEFAULT_PROPS,
|
|
4194
3647
|
...props
|
|
4195
3648
|
};
|
|
4196
3649
|
this.stats = new Stats({
|
|
@@ -4289,51 +3742,6 @@ var deck = (() => {
|
|
|
4289
3742
|
}
|
|
4290
3743
|
};
|
|
4291
3744
|
|
|
4292
|
-
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/path-utils/file-aliases.js
|
|
4293
|
-
var pathPrefix = "";
|
|
4294
|
-
var fileAliases = {};
|
|
4295
|
-
function resolvePath(filename2) {
|
|
4296
|
-
for (const alias in fileAliases) {
|
|
4297
|
-
if (filename2.startsWith(alias)) {
|
|
4298
|
-
const replacement = fileAliases[alias];
|
|
4299
|
-
filename2 = filename2.replace(alias, replacement);
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
if (!filename2.startsWith("http://") && !filename2.startsWith("https://")) {
|
|
4303
|
-
filename2 = "".concat(pathPrefix).concat(filename2);
|
|
4304
|
-
}
|
|
4305
|
-
return filename2;
|
|
4306
|
-
}
|
|
4307
|
-
|
|
4308
|
-
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/memory-conversion-utils.js
|
|
4309
|
-
var node2 = __toESM(require_buffer());
|
|
4310
|
-
function isBuffer(value) {
|
|
4311
|
-
return value && typeof value === "object" && value.isBuffer;
|
|
4312
|
-
}
|
|
4313
|
-
function toArrayBuffer2(data) {
|
|
4314
|
-
if (isBuffer(data)) {
|
|
4315
|
-
return node2.toArrayBuffer(data);
|
|
4316
|
-
}
|
|
4317
|
-
if (data instanceof ArrayBuffer) {
|
|
4318
|
-
return data;
|
|
4319
|
-
}
|
|
4320
|
-
if (ArrayBuffer.isView(data)) {
|
|
4321
|
-
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
|
|
4322
|
-
return data.buffer;
|
|
4323
|
-
}
|
|
4324
|
-
return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
4325
|
-
}
|
|
4326
|
-
if (typeof data === "string") {
|
|
4327
|
-
const text = data;
|
|
4328
|
-
const uint8Array = new TextEncoder().encode(text);
|
|
4329
|
-
return uint8Array.buffer;
|
|
4330
|
-
}
|
|
4331
|
-
if (data && typeof data === "object" && data._toArrayBuffer) {
|
|
4332
|
-
return data._toArrayBuffer();
|
|
4333
|
-
}
|
|
4334
|
-
throw new Error("toArrayBuffer");
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
3745
|
// ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/path-utils/path.js
|
|
4338
3746
|
var path_exports = {};
|
|
4339
3747
|
__export(path_exports, {
|
|
@@ -10982,7 +10390,7 @@ var deck = (() => {
|
|
|
10982
10390
|
out[3] = a2[3];
|
|
10983
10391
|
return out;
|
|
10984
10392
|
}
|
|
10985
|
-
var
|
|
10393
|
+
var forEach = function() {
|
|
10986
10394
|
var vec = create();
|
|
10987
10395
|
return function(a2, stride, offset, count, fn, arg) {
|
|
10988
10396
|
var i3, l2;
|
|
@@ -11601,7 +11009,7 @@ var deck = (() => {
|
|
|
11601
11009
|
out[1] = m[1] * x2 + m[5] * y2 + m[13];
|
|
11602
11010
|
return out;
|
|
11603
11011
|
}
|
|
11604
|
-
var
|
|
11012
|
+
var forEach2 = function() {
|
|
11605
11013
|
var vec = create2();
|
|
11606
11014
|
return function(a2, stride, offset, count, fn, arg) {
|
|
11607
11015
|
var i3, l2;
|
|
@@ -11751,7 +11159,7 @@ var deck = (() => {
|
|
|
11751
11159
|
return Math.acos(Math.min(Math.max(cosine, -1), 1));
|
|
11752
11160
|
}
|
|
11753
11161
|
var len = length2;
|
|
11754
|
-
var
|
|
11162
|
+
var forEach3 = function() {
|
|
11755
11163
|
var vec = create3();
|
|
11756
11164
|
return function(a2, stride, offset, count, fn, arg) {
|
|
11757
11165
|
var i3, l2;
|
|
@@ -14705,8 +14113,8 @@ var deck = (() => {
|
|
|
14705
14113
|
result.push(this);
|
|
14706
14114
|
}
|
|
14707
14115
|
if (this._children) {
|
|
14708
|
-
for (const
|
|
14709
|
-
|
|
14116
|
+
for (const node2 of this._children) {
|
|
14117
|
+
node2.getSelected(result);
|
|
14710
14118
|
}
|
|
14711
14119
|
}
|
|
14712
14120
|
return result;
|
|
@@ -16770,7 +16178,7 @@ varying float vTime;
|
|
|
16770
16178
|
var process_ = globals3.process || {};
|
|
16771
16179
|
|
|
16772
16180
|
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
16773
|
-
var
|
|
16181
|
+
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
16774
16182
|
var isBrowser4 = isBrowser3();
|
|
16775
16183
|
|
|
16776
16184
|
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
@@ -16955,7 +16363,7 @@ varying float vTime;
|
|
|
16955
16363
|
id: ""
|
|
16956
16364
|
};
|
|
16957
16365
|
_defineProperty(this, "id", void 0);
|
|
16958
|
-
_defineProperty(this, "VERSION",
|
|
16366
|
+
_defineProperty(this, "VERSION", VERSION6);
|
|
16959
16367
|
_defineProperty(this, "_startTs", getHiResTimestamp2());
|
|
16960
16368
|
_defineProperty(this, "_deltaTs", getHiResTimestamp2());
|
|
16961
16369
|
_defineProperty(this, "_storage", void 0);
|
|
@@ -17161,7 +16569,7 @@ varying float vTime;
|
|
|
17161
16569
|
return noop;
|
|
17162
16570
|
}
|
|
17163
16571
|
};
|
|
17164
|
-
_defineProperty(Log, "VERSION",
|
|
16572
|
+
_defineProperty(Log, "VERSION", VERSION6);
|
|
17165
16573
|
function normalizeLogLevel(logLevel) {
|
|
17166
16574
|
if (!logLevel) {
|
|
17167
16575
|
return 0;
|
|
@@ -18327,7 +17735,7 @@ varying float vTime;
|
|
|
18327
17735
|
constructor(gl) {
|
|
18328
17736
|
let {
|
|
18329
17737
|
copyState = false,
|
|
18330
|
-
log:
|
|
17738
|
+
log: log7 = () => {
|
|
18331
17739
|
}
|
|
18332
17740
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
18333
17741
|
this.gl = gl;
|
|
@@ -18335,7 +17743,7 @@ varying float vTime;
|
|
|
18335
17743
|
this.stateStack = [];
|
|
18336
17744
|
this.enable = true;
|
|
18337
17745
|
this.cache = copyState ? getParameters(gl) : Object.assign({}, GL_PARAMETER_DEFAULTS);
|
|
18338
|
-
this.log =
|
|
17746
|
+
this.log = log7;
|
|
18339
17747
|
this._updateCache = this._updateCache.bind(this);
|
|
18340
17748
|
Object.seal(this);
|
|
18341
17749
|
}
|
|
@@ -18481,7 +17889,7 @@ varying float vTime;
|
|
|
18481
17889
|
var isBrowser5 = isBrowser3();
|
|
18482
17890
|
|
|
18483
17891
|
// ../../node_modules/@luma.gl/webgl/dist/esm/init.js
|
|
18484
|
-
var
|
|
17892
|
+
var VERSION7 = true ? "8.5.16" : "untranspiled source";
|
|
18485
17893
|
var STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
18486
17894
|
var StatsManager = class {
|
|
18487
17895
|
constructor() {
|
|
@@ -18497,16 +17905,16 @@ varying float vTime;
|
|
|
18497
17905
|
}
|
|
18498
17906
|
};
|
|
18499
17907
|
var lumaStats = new StatsManager();
|
|
18500
|
-
if (globalThis.luma && globalThis.luma.VERSION !==
|
|
18501
|
-
throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION, " vs ").concat(
|
|
17908
|
+
if (globalThis.luma && globalThis.luma.VERSION !== VERSION7) {
|
|
17909
|
+
throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION, " vs ").concat(VERSION7));
|
|
18502
17910
|
}
|
|
18503
17911
|
if (!globalThis.luma) {
|
|
18504
17912
|
if (isBrowser3()) {
|
|
18505
|
-
log.log(1, "luma.gl ".concat(
|
|
17913
|
+
log.log(1, "luma.gl ".concat(VERSION7, " - ").concat(STARTUP_MESSAGE))();
|
|
18506
17914
|
}
|
|
18507
17915
|
globalThis.luma = globalThis.luma || {
|
|
18508
|
-
VERSION:
|
|
18509
|
-
version:
|
|
17916
|
+
VERSION: VERSION7,
|
|
17917
|
+
version: VERSION7,
|
|
18510
17918
|
log,
|
|
18511
17919
|
stats: lumaStats,
|
|
18512
17920
|
globals: {
|
|
@@ -19980,10 +19388,10 @@ varying float vTime;
|
|
|
19980
19388
|
};
|
|
19981
19389
|
|
|
19982
19390
|
// ../../node_modules/@luma.gl/webgl/dist/esm/utils/load-file.js
|
|
19983
|
-
var
|
|
19391
|
+
var pathPrefix = "";
|
|
19984
19392
|
function loadImage(url, opts) {
|
|
19985
19393
|
assert8(typeof url === "string");
|
|
19986
|
-
url =
|
|
19394
|
+
url = pathPrefix + url;
|
|
19987
19395
|
return new Promise((resolve, reject) => {
|
|
19988
19396
|
try {
|
|
19989
19397
|
const image = new Image();
|
|
@@ -21614,907 +21022,8 @@ void main(void) {
|
|
|
21614
21022
|
__publicField(MeshLayer, "layerName", "MeshLayer");
|
|
21615
21023
|
__publicField(MeshLayer, "defaultProps", defaultProps10);
|
|
21616
21024
|
|
|
21617
|
-
//
|
|
21618
|
-
var
|
|
21619
|
-
var isFunction = (x2) => typeof x2 === "function";
|
|
21620
|
-
var isObject = (x2) => x2 !== null && typeof x2 === "object";
|
|
21621
|
-
var isPureObject = (x2) => isObject(x2) && x2.constructor === {}.constructor;
|
|
21622
|
-
var isIterable = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
|
|
21623
|
-
var isAsyncIterable = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
|
|
21624
|
-
var isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
|
|
21625
|
-
var isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
|
|
21626
|
-
var isBuffer2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
|
|
21627
|
-
var isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject(x2) && isFunction(x2.tee) && isFunction(x2.cancel) && isFunction(x2.getReader);
|
|
21628
|
-
var isReadableNodeStream = (x2) => isObject(x2) && isFunction(x2.read) && isFunction(x2.pipe) && isBoolean(x2.readable);
|
|
21629
|
-
var isReadableStream = (x2) => isReadableDOMStream(x2) || isReadableNodeStream(x2);
|
|
21630
|
-
|
|
21631
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/mime-type-utils.js
|
|
21632
|
-
var DATA_URL_PATTERN = /^data:([-\w.]+\/[-\w.+]+)(;|,)/;
|
|
21633
|
-
var MIME_TYPE_PATTERN = /^([-\w.]+\/[-\w.+]+)/;
|
|
21634
|
-
function parseMIMEType(mimeString) {
|
|
21635
|
-
const matches3 = MIME_TYPE_PATTERN.exec(mimeString);
|
|
21636
|
-
if (matches3) {
|
|
21637
|
-
return matches3[1];
|
|
21638
|
-
}
|
|
21639
|
-
return mimeString;
|
|
21640
|
-
}
|
|
21641
|
-
function parseMIMETypeFromURL(url) {
|
|
21642
|
-
const matches3 = DATA_URL_PATTERN.exec(url);
|
|
21643
|
-
if (matches3) {
|
|
21644
|
-
return matches3[1];
|
|
21645
|
-
}
|
|
21646
|
-
return "";
|
|
21647
|
-
}
|
|
21648
|
-
|
|
21649
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/resource-utils.js
|
|
21650
|
-
var QUERY_STRING_PATTERN = /\?.*/;
|
|
21651
|
-
function getResourceUrlAndType(resource) {
|
|
21652
|
-
if (isResponse(resource)) {
|
|
21653
|
-
const url = stripQueryString(resource.url || "");
|
|
21654
|
-
const contentTypeHeader = resource.headers.get("content-type") || "";
|
|
21655
|
-
return {
|
|
21656
|
-
url,
|
|
21657
|
-
type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)
|
|
21658
|
-
};
|
|
21659
|
-
}
|
|
21660
|
-
if (isBlob(resource)) {
|
|
21661
|
-
return {
|
|
21662
|
-
url: stripQueryString(resource.name || ""),
|
|
21663
|
-
type: resource.type || ""
|
|
21664
|
-
};
|
|
21665
|
-
}
|
|
21666
|
-
if (typeof resource === "string") {
|
|
21667
|
-
return {
|
|
21668
|
-
url: stripQueryString(resource),
|
|
21669
|
-
type: parseMIMETypeFromURL(resource)
|
|
21670
|
-
};
|
|
21671
|
-
}
|
|
21672
|
-
return {
|
|
21673
|
-
url: "",
|
|
21674
|
-
type: ""
|
|
21675
|
-
};
|
|
21676
|
-
}
|
|
21677
|
-
function getResourceContentLength(resource) {
|
|
21678
|
-
if (isResponse(resource)) {
|
|
21679
|
-
return resource.headers["content-length"] || -1;
|
|
21680
|
-
}
|
|
21681
|
-
if (isBlob(resource)) {
|
|
21682
|
-
return resource.size;
|
|
21683
|
-
}
|
|
21684
|
-
if (typeof resource === "string") {
|
|
21685
|
-
return resource.length;
|
|
21686
|
-
}
|
|
21687
|
-
if (resource instanceof ArrayBuffer) {
|
|
21688
|
-
return resource.byteLength;
|
|
21689
|
-
}
|
|
21690
|
-
if (ArrayBuffer.isView(resource)) {
|
|
21691
|
-
return resource.byteLength;
|
|
21692
|
-
}
|
|
21693
|
-
return -1;
|
|
21694
|
-
}
|
|
21695
|
-
function stripQueryString(url) {
|
|
21696
|
-
return url.replace(QUERY_STRING_PATTERN, "");
|
|
21697
|
-
}
|
|
21698
|
-
|
|
21699
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/response-utils.js
|
|
21700
|
-
async function makeResponse(resource) {
|
|
21701
|
-
if (isResponse(resource)) {
|
|
21702
|
-
return resource;
|
|
21703
|
-
}
|
|
21704
|
-
const headers = {};
|
|
21705
|
-
const contentLength = getResourceContentLength(resource);
|
|
21706
|
-
if (contentLength >= 0) {
|
|
21707
|
-
headers["content-length"] = String(contentLength);
|
|
21708
|
-
}
|
|
21709
|
-
const {
|
|
21710
|
-
url,
|
|
21711
|
-
type
|
|
21712
|
-
} = getResourceUrlAndType(resource);
|
|
21713
|
-
if (type) {
|
|
21714
|
-
headers["content-type"] = type;
|
|
21715
|
-
}
|
|
21716
|
-
const initialDataUrl = await getInitialDataUrl(resource);
|
|
21717
|
-
if (initialDataUrl) {
|
|
21718
|
-
headers["x-first-bytes"] = initialDataUrl;
|
|
21719
|
-
}
|
|
21720
|
-
if (typeof resource === "string") {
|
|
21721
|
-
resource = new TextEncoder().encode(resource);
|
|
21722
|
-
}
|
|
21723
|
-
const response = new Response(resource, {
|
|
21724
|
-
headers
|
|
21725
|
-
});
|
|
21726
|
-
Object.defineProperty(response, "url", {
|
|
21727
|
-
value: url
|
|
21728
|
-
});
|
|
21729
|
-
return response;
|
|
21730
|
-
}
|
|
21731
|
-
async function checkResponse(response) {
|
|
21732
|
-
if (!response.ok) {
|
|
21733
|
-
const message = await getResponseError(response);
|
|
21734
|
-
throw new Error(message);
|
|
21735
|
-
}
|
|
21736
|
-
}
|
|
21737
|
-
async function getResponseError(response) {
|
|
21738
|
-
let message = "Failed to fetch resource ".concat(response.url, " (").concat(response.status, "): ");
|
|
21739
|
-
try {
|
|
21740
|
-
const contentType = response.headers.get("Content-Type");
|
|
21741
|
-
let text = response.statusText;
|
|
21742
|
-
if (contentType.includes("application/json")) {
|
|
21743
|
-
text += " ".concat(await response.text());
|
|
21744
|
-
}
|
|
21745
|
-
message += text;
|
|
21746
|
-
message = message.length > 60 ? "".concat(message.slice(0, 60), "...") : message;
|
|
21747
|
-
} catch (error2) {
|
|
21748
|
-
}
|
|
21749
|
-
return message;
|
|
21750
|
-
}
|
|
21751
|
-
async function getInitialDataUrl(resource) {
|
|
21752
|
-
const INITIAL_DATA_LENGTH = 5;
|
|
21753
|
-
if (typeof resource === "string") {
|
|
21754
|
-
return "data:,".concat(resource.slice(0, INITIAL_DATA_LENGTH));
|
|
21755
|
-
}
|
|
21756
|
-
if (resource instanceof Blob) {
|
|
21757
|
-
const blobSlice = resource.slice(0, 5);
|
|
21758
|
-
return await new Promise((resolve) => {
|
|
21759
|
-
const reader = new FileReader();
|
|
21760
|
-
reader.onload = (event) => {
|
|
21761
|
-
var _event$target;
|
|
21762
|
-
return resolve(event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.result);
|
|
21763
|
-
};
|
|
21764
|
-
reader.readAsDataURL(blobSlice);
|
|
21765
|
-
});
|
|
21766
|
-
}
|
|
21767
|
-
if (resource instanceof ArrayBuffer) {
|
|
21768
|
-
const slice = resource.slice(0, INITIAL_DATA_LENGTH);
|
|
21769
|
-
const base64 = arrayBufferToBase64(slice);
|
|
21770
|
-
return "data:base64,".concat(base64);
|
|
21771
|
-
}
|
|
21772
|
-
return null;
|
|
21773
|
-
}
|
|
21774
|
-
function arrayBufferToBase64(buffer) {
|
|
21775
|
-
let binary = "";
|
|
21776
|
-
const bytes = new Uint8Array(buffer);
|
|
21777
|
-
for (let i3 = 0; i3 < bytes.byteLength; i3++) {
|
|
21778
|
-
binary += String.fromCharCode(bytes[i3]);
|
|
21779
|
-
}
|
|
21780
|
-
return btoa(binary);
|
|
21781
|
-
}
|
|
21782
|
-
|
|
21783
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/fetch/fetch-file.js
|
|
21784
|
-
async function fetchFile(url, options) {
|
|
21785
|
-
if (typeof url === "string") {
|
|
21786
|
-
url = resolvePath(url);
|
|
21787
|
-
let fetchOptions = options;
|
|
21788
|
-
if (options !== null && options !== void 0 && options.fetch && typeof (options === null || options === void 0 ? void 0 : options.fetch) !== "function") {
|
|
21789
|
-
fetchOptions = options.fetch;
|
|
21790
|
-
}
|
|
21791
|
-
return await fetch(url, fetchOptions);
|
|
21792
|
-
}
|
|
21793
|
-
return await makeResponse(url);
|
|
21794
|
-
}
|
|
21795
|
-
|
|
21796
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/loggers.js
|
|
21797
|
-
var probeLog = new Log({
|
|
21798
|
-
id: "loaders.gl"
|
|
21799
|
-
});
|
|
21800
|
-
var NullLog = class {
|
|
21801
|
-
log() {
|
|
21802
|
-
return () => {
|
|
21803
|
-
};
|
|
21804
|
-
}
|
|
21805
|
-
info() {
|
|
21806
|
-
return () => {
|
|
21807
|
-
};
|
|
21808
|
-
}
|
|
21809
|
-
warn() {
|
|
21810
|
-
return () => {
|
|
21811
|
-
};
|
|
21812
|
-
}
|
|
21813
|
-
error() {
|
|
21814
|
-
return () => {
|
|
21815
|
-
};
|
|
21816
|
-
}
|
|
21817
|
-
};
|
|
21818
|
-
var ConsoleLog = class {
|
|
21819
|
-
constructor() {
|
|
21820
|
-
_defineProperty(this, "console", void 0);
|
|
21821
|
-
this.console = console;
|
|
21822
|
-
}
|
|
21823
|
-
log() {
|
|
21824
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21825
|
-
args[_key] = arguments[_key];
|
|
21826
|
-
}
|
|
21827
|
-
return this.console.log.bind(this.console, ...args);
|
|
21828
|
-
}
|
|
21829
|
-
info() {
|
|
21830
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
21831
|
-
args[_key2] = arguments[_key2];
|
|
21832
|
-
}
|
|
21833
|
-
return this.console.info.bind(this.console, ...args);
|
|
21834
|
-
}
|
|
21835
|
-
warn() {
|
|
21836
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
21837
|
-
args[_key3] = arguments[_key3];
|
|
21838
|
-
}
|
|
21839
|
-
return this.console.warn.bind(this.console, ...args);
|
|
21840
|
-
}
|
|
21841
|
-
error() {
|
|
21842
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
21843
|
-
args[_key4] = arguments[_key4];
|
|
21844
|
-
}
|
|
21845
|
-
return this.console.error.bind(this.console, ...args);
|
|
21846
|
-
}
|
|
21847
|
-
};
|
|
21848
|
-
|
|
21849
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/option-defaults.js
|
|
21850
|
-
var DEFAULT_LOADER_OPTIONS = {
|
|
21851
|
-
fetch: null,
|
|
21852
|
-
mimeType: void 0,
|
|
21853
|
-
nothrow: false,
|
|
21854
|
-
log: new ConsoleLog(),
|
|
21855
|
-
CDN: "https://unpkg.com/@loaders.gl",
|
|
21856
|
-
worker: true,
|
|
21857
|
-
maxConcurrency: 3,
|
|
21858
|
-
maxMobileConcurrency: 1,
|
|
21859
|
-
reuseWorkers: isBrowser,
|
|
21860
|
-
_nodeWorkers: false,
|
|
21861
|
-
_workerType: "",
|
|
21862
|
-
limit: 0,
|
|
21863
|
-
_limitMB: 0,
|
|
21864
|
-
batchSize: "auto",
|
|
21865
|
-
batchDebounceMs: 0,
|
|
21866
|
-
metadata: false,
|
|
21867
|
-
transforms: []
|
|
21868
|
-
};
|
|
21869
|
-
var REMOVED_LOADER_OPTIONS = {
|
|
21870
|
-
throws: "nothrow",
|
|
21871
|
-
dataType: "(no longer used)",
|
|
21872
|
-
uri: "baseUri",
|
|
21873
|
-
method: "fetch.method",
|
|
21874
|
-
headers: "fetch.headers",
|
|
21875
|
-
body: "fetch.body",
|
|
21876
|
-
mode: "fetch.mode",
|
|
21877
|
-
credentials: "fetch.credentials",
|
|
21878
|
-
cache: "fetch.cache",
|
|
21879
|
-
redirect: "fetch.redirect",
|
|
21880
|
-
referrer: "fetch.referrer",
|
|
21881
|
-
referrerPolicy: "fetch.referrerPolicy",
|
|
21882
|
-
integrity: "fetch.integrity",
|
|
21883
|
-
keepalive: "fetch.keepalive",
|
|
21884
|
-
signal: "fetch.signal"
|
|
21885
|
-
};
|
|
21886
|
-
|
|
21887
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/option-utils.js
|
|
21888
|
-
function getGlobalLoaderState() {
|
|
21889
|
-
globalThis.loaders = globalThis.loaders || {};
|
|
21890
|
-
const {
|
|
21891
|
-
loaders
|
|
21892
|
-
} = globalThis;
|
|
21893
|
-
loaders._state = loaders._state || {};
|
|
21894
|
-
return loaders._state;
|
|
21895
|
-
}
|
|
21896
|
-
var getGlobalLoaderOptions = () => {
|
|
21897
|
-
const state = getGlobalLoaderState();
|
|
21898
|
-
state.globalOptions = state.globalOptions || {
|
|
21899
|
-
...DEFAULT_LOADER_OPTIONS
|
|
21900
|
-
};
|
|
21901
|
-
return state.globalOptions;
|
|
21902
|
-
};
|
|
21903
|
-
function normalizeOptions(options, loader, loaders, url) {
|
|
21904
|
-
loaders = loaders || [];
|
|
21905
|
-
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
21906
|
-
validateOptions(options, loaders);
|
|
21907
|
-
return normalizeOptionsInternal(loader, options, url);
|
|
21908
|
-
}
|
|
21909
|
-
function getFetchFunction2(options, context) {
|
|
21910
|
-
const globalOptions = getGlobalLoaderOptions();
|
|
21911
|
-
const fetchOptions = options || globalOptions;
|
|
21912
|
-
if (typeof fetchOptions.fetch === "function") {
|
|
21913
|
-
return fetchOptions.fetch;
|
|
21914
|
-
}
|
|
21915
|
-
if (isObject(fetchOptions.fetch)) {
|
|
21916
|
-
return (url) => fetchFile(url, fetchOptions);
|
|
21917
|
-
}
|
|
21918
|
-
if (context !== null && context !== void 0 && context.fetch) {
|
|
21919
|
-
return context === null || context === void 0 ? void 0 : context.fetch;
|
|
21920
|
-
}
|
|
21921
|
-
return fetchFile;
|
|
21922
|
-
}
|
|
21923
|
-
function validateOptions(options, loaders) {
|
|
21924
|
-
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
21925
|
-
for (const loader of loaders) {
|
|
21926
|
-
const idOptions = options && options[loader.id] || {};
|
|
21927
|
-
const loaderOptions = loader.options && loader.options[loader.id] || {};
|
|
21928
|
-
const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
|
|
21929
|
-
validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
|
|
21930
|
-
}
|
|
21931
|
-
}
|
|
21932
|
-
function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
|
|
21933
|
-
const loaderName = id || "Top level";
|
|
21934
|
-
const prefix = id ? "".concat(id, ".") : "";
|
|
21935
|
-
for (const key in options) {
|
|
21936
|
-
const isSubOptions = !id && isObject(options[key]);
|
|
21937
|
-
const isBaseUriOption = key === "baseUri" && !id;
|
|
21938
|
-
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
21939
|
-
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
21940
|
-
if (key in deprecatedOptions) {
|
|
21941
|
-
probeLog.warn("".concat(loaderName, " loader option '").concat(prefix).concat(key, "' no longer supported, use '").concat(deprecatedOptions[key], "'"))();
|
|
21942
|
-
} else if (!isSubOptions) {
|
|
21943
|
-
const suggestion = findSimilarOption(key, loaders);
|
|
21944
|
-
probeLog.warn("".concat(loaderName, " loader option '").concat(prefix).concat(key, "' not recognized. ").concat(suggestion))();
|
|
21945
|
-
}
|
|
21946
|
-
}
|
|
21947
|
-
}
|
|
21948
|
-
}
|
|
21949
|
-
function findSimilarOption(optionKey, loaders) {
|
|
21950
|
-
const lowerCaseOptionKey = optionKey.toLowerCase();
|
|
21951
|
-
let bestSuggestion = "";
|
|
21952
|
-
for (const loader of loaders) {
|
|
21953
|
-
for (const key in loader.options) {
|
|
21954
|
-
if (optionKey === key) {
|
|
21955
|
-
return "Did you mean '".concat(loader.id, ".").concat(key, "'?");
|
|
21956
|
-
}
|
|
21957
|
-
const lowerCaseKey = key.toLowerCase();
|
|
21958
|
-
const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
|
|
21959
|
-
if (isPartialMatch) {
|
|
21960
|
-
bestSuggestion = bestSuggestion || "Did you mean '".concat(loader.id, ".").concat(key, "'?");
|
|
21961
|
-
}
|
|
21962
|
-
}
|
|
21963
|
-
}
|
|
21964
|
-
return bestSuggestion;
|
|
21965
|
-
}
|
|
21966
|
-
function normalizeOptionsInternal(loader, options, url) {
|
|
21967
|
-
const loaderDefaultOptions = loader.options || {};
|
|
21968
|
-
const mergedOptions = {
|
|
21969
|
-
...loaderDefaultOptions
|
|
21970
|
-
};
|
|
21971
|
-
addUrlOptions(mergedOptions, url);
|
|
21972
|
-
if (mergedOptions.log === null) {
|
|
21973
|
-
mergedOptions.log = new NullLog();
|
|
21974
|
-
}
|
|
21975
|
-
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
21976
|
-
mergeNestedFields(mergedOptions, options);
|
|
21977
|
-
return mergedOptions;
|
|
21978
|
-
}
|
|
21979
|
-
function mergeNestedFields(mergedOptions, options) {
|
|
21980
|
-
for (const key in options) {
|
|
21981
|
-
if (key in options) {
|
|
21982
|
-
const value = options[key];
|
|
21983
|
-
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
|
|
21984
|
-
mergedOptions[key] = {
|
|
21985
|
-
...mergedOptions[key],
|
|
21986
|
-
...options[key]
|
|
21987
|
-
};
|
|
21988
|
-
} else {
|
|
21989
|
-
mergedOptions[key] = options[key];
|
|
21990
|
-
}
|
|
21991
|
-
}
|
|
21992
|
-
}
|
|
21993
|
-
}
|
|
21994
|
-
function addUrlOptions(options, url) {
|
|
21995
|
-
if (url && !("baseUri" in options)) {
|
|
21996
|
-
options.baseUri = url;
|
|
21997
|
-
}
|
|
21998
|
-
}
|
|
21999
|
-
|
|
22000
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/normalize-loader.js
|
|
22001
|
-
function isLoaderObject(loader) {
|
|
22002
|
-
var _loader;
|
|
22003
|
-
if (!loader) {
|
|
22004
|
-
return false;
|
|
22005
|
-
}
|
|
22006
|
-
if (Array.isArray(loader)) {
|
|
22007
|
-
loader = loader[0];
|
|
22008
|
-
}
|
|
22009
|
-
const hasExtensions = Array.isArray((_loader = loader) === null || _loader === void 0 ? void 0 : _loader.extensions);
|
|
22010
|
-
return hasExtensions;
|
|
22011
|
-
}
|
|
22012
|
-
function normalizeLoader(loader) {
|
|
22013
|
-
var _loader2, _loader3;
|
|
22014
|
-
assert2(loader, "null loader");
|
|
22015
|
-
assert2(isLoaderObject(loader), "invalid loader");
|
|
22016
|
-
let options;
|
|
22017
|
-
if (Array.isArray(loader)) {
|
|
22018
|
-
options = loader[1];
|
|
22019
|
-
loader = loader[0];
|
|
22020
|
-
loader = {
|
|
22021
|
-
...loader,
|
|
22022
|
-
options: {
|
|
22023
|
-
...loader.options,
|
|
22024
|
-
...options
|
|
22025
|
-
}
|
|
22026
|
-
};
|
|
22027
|
-
}
|
|
22028
|
-
if ((_loader2 = loader) !== null && _loader2 !== void 0 && _loader2.parseTextSync || (_loader3 = loader) !== null && _loader3 !== void 0 && _loader3.parseText) {
|
|
22029
|
-
loader.text = true;
|
|
22030
|
-
}
|
|
22031
|
-
if (!loader.text) {
|
|
22032
|
-
loader.binary = true;
|
|
22033
|
-
}
|
|
22034
|
-
return loader;
|
|
22035
|
-
}
|
|
22036
|
-
|
|
22037
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/api/register-loaders.js
|
|
22038
|
-
var getGlobalLoaderRegistry = () => {
|
|
22039
|
-
const state = getGlobalLoaderState();
|
|
22040
|
-
state.loaderRegistry = state.loaderRegistry || [];
|
|
22041
|
-
return state.loaderRegistry;
|
|
22042
|
-
};
|
|
22043
|
-
function getRegisteredLoaders() {
|
|
22044
|
-
return getGlobalLoaderRegistry();
|
|
22045
|
-
}
|
|
22046
|
-
|
|
22047
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/log.js
|
|
22048
|
-
var log4 = new Log({
|
|
22049
|
-
id: "loaders.gl"
|
|
22050
|
-
});
|
|
22051
|
-
|
|
22052
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/api/select-loader.js
|
|
22053
|
-
var EXT_PATTERN = /\.([^.]+)$/;
|
|
22054
|
-
async function selectLoader(data) {
|
|
22055
|
-
let loaders = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
22056
|
-
let options = arguments.length > 2 ? arguments[2] : void 0;
|
|
22057
|
-
let context = arguments.length > 3 ? arguments[3] : void 0;
|
|
22058
|
-
if (!validHTTPResponse(data)) {
|
|
22059
|
-
return null;
|
|
22060
|
-
}
|
|
22061
|
-
let loader = selectLoaderSync(data, loaders, {
|
|
22062
|
-
...options,
|
|
22063
|
-
nothrow: true
|
|
22064
|
-
}, context);
|
|
22065
|
-
if (loader) {
|
|
22066
|
-
return loader;
|
|
22067
|
-
}
|
|
22068
|
-
if (isBlob(data)) {
|
|
22069
|
-
data = await data.slice(0, 10).arrayBuffer();
|
|
22070
|
-
loader = selectLoaderSync(data, loaders, options, context);
|
|
22071
|
-
}
|
|
22072
|
-
if (!loader && !(options !== null && options !== void 0 && options.nothrow)) {
|
|
22073
|
-
throw new Error(getNoValidLoaderMessage(data));
|
|
22074
|
-
}
|
|
22075
|
-
return loader;
|
|
22076
|
-
}
|
|
22077
|
-
function selectLoaderSync(data) {
|
|
22078
|
-
let loaders = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
22079
|
-
let options = arguments.length > 2 ? arguments[2] : void 0;
|
|
22080
|
-
let context = arguments.length > 3 ? arguments[3] : void 0;
|
|
22081
|
-
if (!validHTTPResponse(data)) {
|
|
22082
|
-
return null;
|
|
22083
|
-
}
|
|
22084
|
-
if (loaders && !Array.isArray(loaders)) {
|
|
22085
|
-
return normalizeLoader(loaders);
|
|
22086
|
-
}
|
|
22087
|
-
let candidateLoaders = [];
|
|
22088
|
-
if (loaders) {
|
|
22089
|
-
candidateLoaders = candidateLoaders.concat(loaders);
|
|
22090
|
-
}
|
|
22091
|
-
if (!(options !== null && options !== void 0 && options.ignoreRegisteredLoaders)) {
|
|
22092
|
-
candidateLoaders.push(...getRegisteredLoaders());
|
|
22093
|
-
}
|
|
22094
|
-
normalizeLoaders(candidateLoaders);
|
|
22095
|
-
const loader = selectLoaderInternal(data, candidateLoaders, options, context);
|
|
22096
|
-
if (!loader && !(options !== null && options !== void 0 && options.nothrow)) {
|
|
22097
|
-
throw new Error(getNoValidLoaderMessage(data));
|
|
22098
|
-
}
|
|
22099
|
-
return loader;
|
|
22100
|
-
}
|
|
22101
|
-
function selectLoaderInternal(data, loaders, options, context) {
|
|
22102
|
-
const {
|
|
22103
|
-
url,
|
|
22104
|
-
type
|
|
22105
|
-
} = getResourceUrlAndType(data);
|
|
22106
|
-
const testUrl = url || (context === null || context === void 0 ? void 0 : context.url);
|
|
22107
|
-
let loader = null;
|
|
22108
|
-
let reason = "";
|
|
22109
|
-
if (options !== null && options !== void 0 && options.mimeType) {
|
|
22110
|
-
loader = findLoaderByMIMEType(loaders, options === null || options === void 0 ? void 0 : options.mimeType);
|
|
22111
|
-
reason = "match forced by supplied MIME type ".concat(options === null || options === void 0 ? void 0 : options.mimeType);
|
|
22112
|
-
}
|
|
22113
|
-
loader = loader || findLoaderByUrl(loaders, testUrl);
|
|
22114
|
-
reason = reason || (loader ? "matched url ".concat(testUrl) : "");
|
|
22115
|
-
loader = loader || findLoaderByMIMEType(loaders, type);
|
|
22116
|
-
reason = reason || (loader ? "matched MIME type ".concat(type) : "");
|
|
22117
|
-
loader = loader || findLoaderByInitialBytes(loaders, data);
|
|
22118
|
-
reason = reason || (loader ? "matched initial data ".concat(getFirstCharacters2(data)) : "");
|
|
22119
|
-
loader = loader || findLoaderByMIMEType(loaders, options === null || options === void 0 ? void 0 : options.fallbackMimeType);
|
|
22120
|
-
reason = reason || (loader ? "matched fallback MIME type ".concat(type) : "");
|
|
22121
|
-
if (reason) {
|
|
22122
|
-
var _loader;
|
|
22123
|
-
log4.log(1, "selectLoader selected ".concat((_loader = loader) === null || _loader === void 0 ? void 0 : _loader.name, ": ").concat(reason, "."));
|
|
22124
|
-
}
|
|
22125
|
-
return loader;
|
|
22126
|
-
}
|
|
22127
|
-
function validHTTPResponse(data) {
|
|
22128
|
-
if (data instanceof Response) {
|
|
22129
|
-
if (data.status === 204) {
|
|
22130
|
-
return false;
|
|
22131
|
-
}
|
|
22132
|
-
}
|
|
22133
|
-
return true;
|
|
22134
|
-
}
|
|
22135
|
-
function getNoValidLoaderMessage(data) {
|
|
22136
|
-
const {
|
|
22137
|
-
url,
|
|
22138
|
-
type
|
|
22139
|
-
} = getResourceUrlAndType(data);
|
|
22140
|
-
let message = "No valid loader found (";
|
|
22141
|
-
message += url ? "".concat(path_exports.filename(url), ", ") : "no url provided, ";
|
|
22142
|
-
message += "MIME type: ".concat(type ? '"'.concat(type, '"') : "not provided", ", ");
|
|
22143
|
-
const firstCharacters = data ? getFirstCharacters2(data) : "";
|
|
22144
|
-
message += firstCharacters ? ' first bytes: "'.concat(firstCharacters, '"') : "first bytes: not available";
|
|
22145
|
-
message += ")";
|
|
22146
|
-
return message;
|
|
22147
|
-
}
|
|
22148
|
-
function normalizeLoaders(loaders) {
|
|
22149
|
-
for (const loader of loaders) {
|
|
22150
|
-
normalizeLoader(loader);
|
|
22151
|
-
}
|
|
22152
|
-
}
|
|
22153
|
-
function findLoaderByUrl(loaders, url) {
|
|
22154
|
-
const match2 = url && EXT_PATTERN.exec(url);
|
|
22155
|
-
const extension = match2 && match2[1];
|
|
22156
|
-
return extension ? findLoaderByExtension(loaders, extension) : null;
|
|
22157
|
-
}
|
|
22158
|
-
function findLoaderByExtension(loaders, extension) {
|
|
22159
|
-
extension = extension.toLowerCase();
|
|
22160
|
-
for (const loader of loaders) {
|
|
22161
|
-
for (const loaderExtension of loader.extensions) {
|
|
22162
|
-
if (loaderExtension.toLowerCase() === extension) {
|
|
22163
|
-
return loader;
|
|
22164
|
-
}
|
|
22165
|
-
}
|
|
22166
|
-
}
|
|
22167
|
-
return null;
|
|
22168
|
-
}
|
|
22169
|
-
function findLoaderByMIMEType(loaders, mimeType) {
|
|
22170
|
-
for (const loader of loaders) {
|
|
22171
|
-
if (loader.mimeTypes && loader.mimeTypes.includes(mimeType)) {
|
|
22172
|
-
return loader;
|
|
22173
|
-
}
|
|
22174
|
-
if (mimeType === "application/x.".concat(loader.id)) {
|
|
22175
|
-
return loader;
|
|
22176
|
-
}
|
|
22177
|
-
}
|
|
22178
|
-
return null;
|
|
22179
|
-
}
|
|
22180
|
-
function findLoaderByInitialBytes(loaders, data) {
|
|
22181
|
-
if (!data) {
|
|
22182
|
-
return null;
|
|
22183
|
-
}
|
|
22184
|
-
for (const loader of loaders) {
|
|
22185
|
-
if (typeof data === "string") {
|
|
22186
|
-
if (testDataAgainstText(data, loader)) {
|
|
22187
|
-
return loader;
|
|
22188
|
-
}
|
|
22189
|
-
} else if (ArrayBuffer.isView(data)) {
|
|
22190
|
-
if (testDataAgainstBinary(data.buffer, data.byteOffset, loader)) {
|
|
22191
|
-
return loader;
|
|
22192
|
-
}
|
|
22193
|
-
} else if (data instanceof ArrayBuffer) {
|
|
22194
|
-
const byteOffset = 0;
|
|
22195
|
-
if (testDataAgainstBinary(data, byteOffset, loader)) {
|
|
22196
|
-
return loader;
|
|
22197
|
-
}
|
|
22198
|
-
}
|
|
22199
|
-
}
|
|
22200
|
-
return null;
|
|
22201
|
-
}
|
|
22202
|
-
function testDataAgainstText(data, loader) {
|
|
22203
|
-
if (loader.testText) {
|
|
22204
|
-
return loader.testText(data);
|
|
22205
|
-
}
|
|
22206
|
-
const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];
|
|
22207
|
-
return tests.some((test) => data.startsWith(test));
|
|
22208
|
-
}
|
|
22209
|
-
function testDataAgainstBinary(data, byteOffset, loader) {
|
|
22210
|
-
const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];
|
|
22211
|
-
return tests.some((test) => testBinary(data, byteOffset, loader, test));
|
|
22212
|
-
}
|
|
22213
|
-
function testBinary(data, byteOffset, loader, test) {
|
|
22214
|
-
if (test instanceof ArrayBuffer) {
|
|
22215
|
-
return compareArrayBuffers(test, data, test.byteLength);
|
|
22216
|
-
}
|
|
22217
|
-
switch (typeof test) {
|
|
22218
|
-
case "function":
|
|
22219
|
-
return test(data, loader);
|
|
22220
|
-
case "string":
|
|
22221
|
-
const magic = getMagicString2(data, byteOffset, test.length);
|
|
22222
|
-
return test === magic;
|
|
22223
|
-
default:
|
|
22224
|
-
return false;
|
|
22225
|
-
}
|
|
22226
|
-
}
|
|
22227
|
-
function getFirstCharacters2(data) {
|
|
22228
|
-
let length5 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5;
|
|
22229
|
-
if (typeof data === "string") {
|
|
22230
|
-
return data.slice(0, length5);
|
|
22231
|
-
} else if (ArrayBuffer.isView(data)) {
|
|
22232
|
-
return getMagicString2(data.buffer, data.byteOffset, length5);
|
|
22233
|
-
} else if (data instanceof ArrayBuffer) {
|
|
22234
|
-
const byteOffset = 0;
|
|
22235
|
-
return getMagicString2(data, byteOffset, length5);
|
|
22236
|
-
}
|
|
22237
|
-
return "";
|
|
22238
|
-
}
|
|
22239
|
-
function getMagicString2(arrayBuffer, byteOffset, length5) {
|
|
22240
|
-
if (arrayBuffer.byteLength < byteOffset + length5) {
|
|
22241
|
-
return "";
|
|
22242
|
-
}
|
|
22243
|
-
const dataView = new DataView(arrayBuffer);
|
|
22244
|
-
let magic = "";
|
|
22245
|
-
for (let i3 = 0; i3 < length5; i3++) {
|
|
22246
|
-
magic += String.fromCharCode(dataView.getUint8(byteOffset + i3));
|
|
22247
|
-
}
|
|
22248
|
-
return magic;
|
|
22249
|
-
}
|
|
22250
|
-
|
|
22251
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-string-iterator.js
|
|
22252
|
-
var DEFAULT_CHUNK_SIZE = 256 * 1024;
|
|
22253
|
-
function* makeStringIterator(string, options) {
|
|
22254
|
-
const chunkSize = (options === null || options === void 0 ? void 0 : options.chunkSize) || DEFAULT_CHUNK_SIZE;
|
|
22255
|
-
let offset = 0;
|
|
22256
|
-
const textEncoder = new TextEncoder();
|
|
22257
|
-
while (offset < string.length) {
|
|
22258
|
-
const chunkLength = Math.min(string.length - offset, chunkSize);
|
|
22259
|
-
const chunk = string.slice(offset, offset + chunkLength);
|
|
22260
|
-
offset += chunkLength;
|
|
22261
|
-
yield textEncoder.encode(chunk);
|
|
22262
|
-
}
|
|
22263
|
-
}
|
|
22264
|
-
|
|
22265
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-array-buffer-iterator.js
|
|
22266
|
-
var DEFAULT_CHUNK_SIZE2 = 256 * 1024;
|
|
22267
|
-
function* makeArrayBufferIterator(arrayBuffer) {
|
|
22268
|
-
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
22269
|
-
const {
|
|
22270
|
-
chunkSize = DEFAULT_CHUNK_SIZE2
|
|
22271
|
-
} = options;
|
|
22272
|
-
let byteOffset = 0;
|
|
22273
|
-
while (byteOffset < arrayBuffer.byteLength) {
|
|
22274
|
-
const chunkByteLength = Math.min(arrayBuffer.byteLength - byteOffset, chunkSize);
|
|
22275
|
-
const chunk = new ArrayBuffer(chunkByteLength);
|
|
22276
|
-
const sourceArray = new Uint8Array(arrayBuffer, byteOffset, chunkByteLength);
|
|
22277
|
-
const chunkArray = new Uint8Array(chunk);
|
|
22278
|
-
chunkArray.set(sourceArray);
|
|
22279
|
-
byteOffset += chunkByteLength;
|
|
22280
|
-
yield chunk;
|
|
22281
|
-
}
|
|
22282
|
-
}
|
|
22283
|
-
|
|
22284
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-blob-iterator.js
|
|
22285
|
-
var DEFAULT_CHUNK_SIZE3 = 1024 * 1024;
|
|
22286
|
-
async function* makeBlobIterator(blob, options) {
|
|
22287
|
-
const chunkSize = (options === null || options === void 0 ? void 0 : options.chunkSize) || DEFAULT_CHUNK_SIZE3;
|
|
22288
|
-
let offset = 0;
|
|
22289
|
-
while (offset < blob.size) {
|
|
22290
|
-
const end = offset + chunkSize;
|
|
22291
|
-
const chunk = await blob.slice(offset, end).arrayBuffer();
|
|
22292
|
-
offset = end;
|
|
22293
|
-
yield chunk;
|
|
22294
|
-
}
|
|
22295
|
-
}
|
|
22296
|
-
|
|
22297
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-stream-iterator.js
|
|
22298
|
-
function makeStreamIterator(stream, options) {
|
|
22299
|
-
return isBrowser ? makeBrowserStreamIterator(stream, options) : makeNodeStreamIterator(stream, options);
|
|
22300
|
-
}
|
|
22301
|
-
async function* makeBrowserStreamIterator(stream, options) {
|
|
22302
|
-
const reader = stream.getReader();
|
|
22303
|
-
let nextBatchPromise;
|
|
22304
|
-
try {
|
|
22305
|
-
while (true) {
|
|
22306
|
-
const currentBatchPromise = nextBatchPromise || reader.read();
|
|
22307
|
-
if (options !== null && options !== void 0 && options._streamReadAhead) {
|
|
22308
|
-
nextBatchPromise = reader.read();
|
|
22309
|
-
}
|
|
22310
|
-
const {
|
|
22311
|
-
done,
|
|
22312
|
-
value
|
|
22313
|
-
} = await currentBatchPromise;
|
|
22314
|
-
if (done) {
|
|
22315
|
-
return;
|
|
22316
|
-
}
|
|
22317
|
-
yield toArrayBuffer2(value);
|
|
22318
|
-
}
|
|
22319
|
-
} catch (error2) {
|
|
22320
|
-
reader.releaseLock();
|
|
22321
|
-
}
|
|
22322
|
-
}
|
|
22323
|
-
async function* makeNodeStreamIterator(stream, options) {
|
|
22324
|
-
for await (const chunk of stream) {
|
|
22325
|
-
yield toArrayBuffer2(chunk);
|
|
22326
|
-
}
|
|
22327
|
-
}
|
|
22328
|
-
|
|
22329
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-iterator.js
|
|
22330
|
-
function makeIterator(data, options) {
|
|
22331
|
-
if (typeof data === "string") {
|
|
22332
|
-
return makeStringIterator(data, options);
|
|
22333
|
-
}
|
|
22334
|
-
if (data instanceof ArrayBuffer) {
|
|
22335
|
-
return makeArrayBufferIterator(data, options);
|
|
22336
|
-
}
|
|
22337
|
-
if (isBlob(data)) {
|
|
22338
|
-
return makeBlobIterator(data, options);
|
|
22339
|
-
}
|
|
22340
|
-
if (isReadableStream(data)) {
|
|
22341
|
-
return makeStreamIterator(data, options);
|
|
22342
|
-
}
|
|
22343
|
-
if (isResponse(data)) {
|
|
22344
|
-
const response = data;
|
|
22345
|
-
return makeStreamIterator(response.body, options);
|
|
22346
|
-
}
|
|
22347
|
-
throw new Error("makeIterator");
|
|
22348
|
-
}
|
|
22349
|
-
|
|
22350
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/get-data.js
|
|
22351
|
-
var ERR_DATA = "Cannot convert supplied data type";
|
|
22352
|
-
function getArrayBufferOrStringFromDataSync(data, loader, options) {
|
|
22353
|
-
if (loader.text && typeof data === "string") {
|
|
22354
|
-
return data;
|
|
22355
|
-
}
|
|
22356
|
-
if (isBuffer2(data)) {
|
|
22357
|
-
data = data.buffer;
|
|
22358
|
-
}
|
|
22359
|
-
if (data instanceof ArrayBuffer) {
|
|
22360
|
-
const arrayBuffer = data;
|
|
22361
|
-
if (loader.text && !loader.binary) {
|
|
22362
|
-
const textDecoder = new TextDecoder("utf8");
|
|
22363
|
-
return textDecoder.decode(arrayBuffer);
|
|
22364
|
-
}
|
|
22365
|
-
return arrayBuffer;
|
|
22366
|
-
}
|
|
22367
|
-
if (ArrayBuffer.isView(data)) {
|
|
22368
|
-
if (loader.text && !loader.binary) {
|
|
22369
|
-
const textDecoder = new TextDecoder("utf8");
|
|
22370
|
-
return textDecoder.decode(data);
|
|
22371
|
-
}
|
|
22372
|
-
let arrayBuffer = data.buffer;
|
|
22373
|
-
const byteLength = data.byteLength || data.length;
|
|
22374
|
-
if (data.byteOffset !== 0 || byteLength !== arrayBuffer.byteLength) {
|
|
22375
|
-
arrayBuffer = arrayBuffer.slice(data.byteOffset, data.byteOffset + byteLength);
|
|
22376
|
-
}
|
|
22377
|
-
return arrayBuffer;
|
|
22378
|
-
}
|
|
22379
|
-
throw new Error(ERR_DATA);
|
|
22380
|
-
}
|
|
22381
|
-
async function getArrayBufferOrStringFromData(data, loader, options) {
|
|
22382
|
-
const isArrayBuffer = data instanceof ArrayBuffer || ArrayBuffer.isView(data);
|
|
22383
|
-
if (typeof data === "string" || isArrayBuffer) {
|
|
22384
|
-
return getArrayBufferOrStringFromDataSync(data, loader, options);
|
|
22385
|
-
}
|
|
22386
|
-
if (isBlob(data)) {
|
|
22387
|
-
data = await makeResponse(data);
|
|
22388
|
-
}
|
|
22389
|
-
if (isResponse(data)) {
|
|
22390
|
-
const response = data;
|
|
22391
|
-
await checkResponse(response);
|
|
22392
|
-
return loader.binary ? await response.arrayBuffer() : await response.text();
|
|
22393
|
-
}
|
|
22394
|
-
if (isReadableStream(data)) {
|
|
22395
|
-
data = makeIterator(data, options);
|
|
22396
|
-
}
|
|
22397
|
-
if (isIterable(data) || isAsyncIterable(data)) {
|
|
22398
|
-
return concatenateArrayBuffersAsync(data);
|
|
22399
|
-
}
|
|
22400
|
-
throw new Error(ERR_DATA);
|
|
22401
|
-
}
|
|
22402
|
-
|
|
22403
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/loader-context.js
|
|
22404
|
-
function getLoaderContext(context, options) {
|
|
22405
|
-
let previousContext = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
|
|
22406
|
-
if (previousContext) {
|
|
22407
|
-
return previousContext;
|
|
22408
|
-
}
|
|
22409
|
-
const resolvedContext = {
|
|
22410
|
-
fetch: getFetchFunction2(options, context),
|
|
22411
|
-
...context
|
|
22412
|
-
};
|
|
22413
|
-
if (!Array.isArray(resolvedContext.loaders)) {
|
|
22414
|
-
resolvedContext.loaders = null;
|
|
22415
|
-
}
|
|
22416
|
-
return resolvedContext;
|
|
22417
|
-
}
|
|
22418
|
-
function getLoadersFromContext(loaders, context) {
|
|
22419
|
-
if (!context && loaders && !Array.isArray(loaders)) {
|
|
22420
|
-
return loaders;
|
|
22421
|
-
}
|
|
22422
|
-
let candidateLoaders;
|
|
22423
|
-
if (loaders) {
|
|
22424
|
-
candidateLoaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
22425
|
-
}
|
|
22426
|
-
if (context && context.loaders) {
|
|
22427
|
-
const contextLoaders = Array.isArray(context.loaders) ? context.loaders : [context.loaders];
|
|
22428
|
-
candidateLoaders = candidateLoaders ? [...candidateLoaders, ...contextLoaders] : contextLoaders;
|
|
22429
|
-
}
|
|
22430
|
-
return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;
|
|
22431
|
-
}
|
|
22432
|
-
|
|
22433
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/api/parse.js
|
|
22434
|
-
async function parse2(data, loaders, options, context) {
|
|
22435
|
-
assert3(!context || typeof context === "object");
|
|
22436
|
-
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
22437
|
-
context = void 0;
|
|
22438
|
-
options = loaders;
|
|
22439
|
-
loaders = void 0;
|
|
22440
|
-
}
|
|
22441
|
-
data = await data;
|
|
22442
|
-
options = options || {};
|
|
22443
|
-
const {
|
|
22444
|
-
url
|
|
22445
|
-
} = getResourceUrlAndType(data);
|
|
22446
|
-
const typedLoaders = loaders;
|
|
22447
|
-
const candidateLoaders = getLoadersFromContext(typedLoaders, context);
|
|
22448
|
-
const loader = await selectLoader(data, candidateLoaders, options);
|
|
22449
|
-
if (!loader) {
|
|
22450
|
-
return null;
|
|
22451
|
-
}
|
|
22452
|
-
options = normalizeOptions(options, loader, candidateLoaders, url);
|
|
22453
|
-
context = getLoaderContext({
|
|
22454
|
-
url,
|
|
22455
|
-
parse: parse2,
|
|
22456
|
-
loaders: candidateLoaders
|
|
22457
|
-
}, options, context);
|
|
22458
|
-
return await parseWithLoader(loader, data, options, context);
|
|
22459
|
-
}
|
|
22460
|
-
async function parseWithLoader(loader, data, options, context) {
|
|
22461
|
-
validateWorkerVersion(loader);
|
|
22462
|
-
if (isResponse(data)) {
|
|
22463
|
-
const response = data;
|
|
22464
|
-
const {
|
|
22465
|
-
ok,
|
|
22466
|
-
redirected,
|
|
22467
|
-
status,
|
|
22468
|
-
statusText,
|
|
22469
|
-
type,
|
|
22470
|
-
url
|
|
22471
|
-
} = response;
|
|
22472
|
-
const headers = Object.fromEntries(response.headers.entries());
|
|
22473
|
-
context.response = {
|
|
22474
|
-
headers,
|
|
22475
|
-
ok,
|
|
22476
|
-
redirected,
|
|
22477
|
-
status,
|
|
22478
|
-
statusText,
|
|
22479
|
-
type,
|
|
22480
|
-
url
|
|
22481
|
-
};
|
|
22482
|
-
}
|
|
22483
|
-
data = await getArrayBufferOrStringFromData(data, loader, options);
|
|
22484
|
-
if (loader.parseTextSync && typeof data === "string") {
|
|
22485
|
-
options.dataType = "text";
|
|
22486
|
-
return loader.parseTextSync(data, options, context, loader);
|
|
22487
|
-
}
|
|
22488
|
-
if (canParseWithWorker(loader, options)) {
|
|
22489
|
-
return await parseWithWorker(loader, data, options, context, parse2);
|
|
22490
|
-
}
|
|
22491
|
-
if (loader.parseText && typeof data === "string") {
|
|
22492
|
-
return await loader.parseText(data, options, context, loader);
|
|
22493
|
-
}
|
|
22494
|
-
if (loader.parse) {
|
|
22495
|
-
return await loader.parse(data, options, context, loader);
|
|
22496
|
-
}
|
|
22497
|
-
assert3(!loader.parseSync);
|
|
22498
|
-
throw new Error("".concat(loader.id, " loader - no parser found and worker is disabled"));
|
|
22499
|
-
}
|
|
22500
|
-
|
|
22501
|
-
// ../../node_modules/@loaders.gl/core/dist/esm/lib/api/load.js
|
|
22502
|
-
async function load(url, loaders, options, context) {
|
|
22503
|
-
if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
22504
|
-
context = void 0;
|
|
22505
|
-
options = loaders;
|
|
22506
|
-
loaders = void 0;
|
|
22507
|
-
}
|
|
22508
|
-
const fetch2 = getFetchFunction2(options);
|
|
22509
|
-
let data = url;
|
|
22510
|
-
if (typeof url === "string") {
|
|
22511
|
-
data = await fetch2(url);
|
|
22512
|
-
}
|
|
22513
|
-
if (isBlob(url)) {
|
|
22514
|
-
data = await fetch2(url);
|
|
22515
|
-
}
|
|
22516
|
-
return await parse2(data, loaders, options);
|
|
22517
|
-
}
|
|
21025
|
+
// src/tile-3d-layer/tile-3d-layer.ts
|
|
21026
|
+
var import_core44 = __toESM(require_core3());
|
|
22518
21027
|
|
|
22519
21028
|
// ../../node_modules/@math.gl/geospatial/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
22520
21029
|
function _defineProperty5(obj, key, value) {
|
|
@@ -22909,55 +21418,55 @@ void main(void) {
|
|
|
22909
21418
|
return this._length;
|
|
22910
21419
|
}
|
|
22911
21420
|
add(item) {
|
|
22912
|
-
const
|
|
21421
|
+
const node2 = new DoublyLinkedListNode(item, this.tail, null);
|
|
22913
21422
|
if (this.tail) {
|
|
22914
|
-
this.tail.next =
|
|
22915
|
-
this.tail =
|
|
21423
|
+
this.tail.next = node2;
|
|
21424
|
+
this.tail = node2;
|
|
22916
21425
|
} else {
|
|
22917
|
-
this.head =
|
|
22918
|
-
this.tail =
|
|
21426
|
+
this.head = node2;
|
|
21427
|
+
this.tail = node2;
|
|
22919
21428
|
}
|
|
22920
21429
|
++this._length;
|
|
22921
|
-
return
|
|
21430
|
+
return node2;
|
|
22922
21431
|
}
|
|
22923
|
-
remove(
|
|
22924
|
-
if (!
|
|
21432
|
+
remove(node2) {
|
|
21433
|
+
if (!node2) {
|
|
22925
21434
|
return;
|
|
22926
21435
|
}
|
|
22927
|
-
if (
|
|
22928
|
-
|
|
22929
|
-
|
|
22930
|
-
} else if (
|
|
22931
|
-
|
|
22932
|
-
this.tail =
|
|
22933
|
-
} else if (
|
|
22934
|
-
|
|
22935
|
-
this.head =
|
|
21436
|
+
if (node2.previous && node2.next) {
|
|
21437
|
+
node2.previous.next = node2.next;
|
|
21438
|
+
node2.next.previous = node2.previous;
|
|
21439
|
+
} else if (node2.previous) {
|
|
21440
|
+
node2.previous.next = null;
|
|
21441
|
+
this.tail = node2.previous;
|
|
21442
|
+
} else if (node2.next) {
|
|
21443
|
+
node2.next.previous = null;
|
|
21444
|
+
this.head = node2.next;
|
|
22936
21445
|
} else {
|
|
22937
21446
|
this.head = null;
|
|
22938
21447
|
this.tail = null;
|
|
22939
21448
|
}
|
|
22940
|
-
|
|
22941
|
-
|
|
21449
|
+
node2.next = null;
|
|
21450
|
+
node2.previous = null;
|
|
22942
21451
|
--this._length;
|
|
22943
21452
|
}
|
|
22944
|
-
splice(
|
|
22945
|
-
if (
|
|
21453
|
+
splice(node2, nextNode) {
|
|
21454
|
+
if (node2 === nextNode) {
|
|
22946
21455
|
return;
|
|
22947
21456
|
}
|
|
22948
21457
|
this.remove(nextNode);
|
|
22949
|
-
this._insert(
|
|
21458
|
+
this._insert(node2, nextNode);
|
|
22950
21459
|
}
|
|
22951
|
-
_insert(
|
|
22952
|
-
const oldNodeNext =
|
|
22953
|
-
|
|
22954
|
-
if (this.tail ===
|
|
21460
|
+
_insert(node2, nextNode) {
|
|
21461
|
+
const oldNodeNext = node2.next;
|
|
21462
|
+
node2.next = nextNode;
|
|
21463
|
+
if (this.tail === node2) {
|
|
22955
21464
|
this.tail = nextNode;
|
|
22956
21465
|
} else {
|
|
22957
21466
|
oldNodeNext.previous = nextNode;
|
|
22958
21467
|
}
|
|
22959
21468
|
nextNode.next = oldNodeNext;
|
|
22960
|
-
nextNode.previous =
|
|
21469
|
+
nextNode.previous = node2;
|
|
22961
21470
|
++this._length;
|
|
22962
21471
|
}
|
|
22963
21472
|
};
|
|
@@ -22979,9 +21488,9 @@ void main(void) {
|
|
|
22979
21488
|
this._list.splice(this._list.tail, this._sentinel);
|
|
22980
21489
|
}
|
|
22981
21490
|
touch(tile) {
|
|
22982
|
-
const
|
|
22983
|
-
if (defined(
|
|
22984
|
-
this._list.splice(this._sentinel,
|
|
21491
|
+
const node2 = tile._cacheNode;
|
|
21492
|
+
if (defined(node2)) {
|
|
21493
|
+
this._list.splice(this._sentinel, node2);
|
|
22985
21494
|
}
|
|
22986
21495
|
}
|
|
22987
21496
|
add(tileset, tile, addCallback) {
|
|
@@ -22993,11 +21502,11 @@ void main(void) {
|
|
|
22993
21502
|
}
|
|
22994
21503
|
}
|
|
22995
21504
|
unloadTile(tileset, tile, unloadCallback) {
|
|
22996
|
-
const
|
|
22997
|
-
if (!defined(
|
|
21505
|
+
const node2 = tile._cacheNode;
|
|
21506
|
+
if (!defined(node2)) {
|
|
22998
21507
|
return;
|
|
22999
21508
|
}
|
|
23000
|
-
this._list.remove(
|
|
21509
|
+
this._list.remove(node2);
|
|
23001
21510
|
tile._cacheNode = void 0;
|
|
23002
21511
|
if (unloadCallback) {
|
|
23003
21512
|
unloadCallback(tileset, tile);
|
|
@@ -23009,10 +21518,10 @@ void main(void) {
|
|
|
23009
21518
|
const list = this._list;
|
|
23010
21519
|
const maximumMemoryUsageInBytes = tileset.maximumMemoryUsage * 1024 * 1024;
|
|
23011
21520
|
const sentinel = this._sentinel;
|
|
23012
|
-
let
|
|
23013
|
-
while (
|
|
23014
|
-
const tile =
|
|
23015
|
-
|
|
21521
|
+
let node2 = list.head;
|
|
21522
|
+
while (node2 !== sentinel && (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)) {
|
|
21523
|
+
const tile = node2.item;
|
|
21524
|
+
node2 = node2.next;
|
|
23016
21525
|
this.unloadTile(tileset, tile, unloadCallback);
|
|
23017
21526
|
}
|
|
23018
21527
|
}
|
|
@@ -23236,6 +21745,9 @@ void main(void) {
|
|
|
23236
21745
|
return size;
|
|
23237
21746
|
}
|
|
23238
21747
|
|
|
21748
|
+
// ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tile-3d.js
|
|
21749
|
+
var import_core31 = __toESM(require_core3());
|
|
21750
|
+
|
|
23239
21751
|
// ../../node_modules/@loaders.gl/tiles/dist/esm/constants.js
|
|
23240
21752
|
var TILE_CONTENT_STATE = {
|
|
23241
21753
|
UNLOADED: 0,
|
|
@@ -23526,7 +22038,7 @@ void main(void) {
|
|
|
23526
22038
|
};
|
|
23527
22039
|
|
|
23528
22040
|
// ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tileset-traverser.js
|
|
23529
|
-
var
|
|
22041
|
+
var DEFAULT_PROPS2 = {
|
|
23530
22042
|
loadSiblings: false,
|
|
23531
22043
|
skipLevelOfDetail: false,
|
|
23532
22044
|
maximumScreenSpaceError: 2,
|
|
@@ -23552,7 +22064,7 @@ void main(void) {
|
|
|
23552
22064
|
_defineProperty(this, "_emptyTraversalStack", void 0);
|
|
23553
22065
|
_defineProperty(this, "_frameNumber", void 0);
|
|
23554
22066
|
this.options = {
|
|
23555
|
-
...
|
|
22067
|
+
...DEFAULT_PROPS2,
|
|
23556
22068
|
...options
|
|
23557
22069
|
};
|
|
23558
22070
|
this._traversalStack = new ManagedArray();
|
|
@@ -23981,7 +22493,7 @@ void main(void) {
|
|
|
23981
22493
|
...this._getLoaderSpecificOptions(loader.id)
|
|
23982
22494
|
}
|
|
23983
22495
|
};
|
|
23984
|
-
this.content = await load(contentUrl, loader, options);
|
|
22496
|
+
this.content = await (0, import_core31.load)(contentUrl, loader, options);
|
|
23985
22497
|
if (this.tileset.options.contentLoader) {
|
|
23986
22498
|
await this.tileset.options.contentLoader(this);
|
|
23987
22499
|
}
|
|
@@ -24238,6 +22750,9 @@ void main(void) {
|
|
|
24238
22750
|
}
|
|
24239
22751
|
};
|
|
24240
22752
|
|
|
22753
|
+
// ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/format-i3s/i3s-tileset-traverser.js
|
|
22754
|
+
var import_core32 = __toESM(require_core3());
|
|
22755
|
+
|
|
24241
22756
|
// ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/format-i3s/i3s-pending-tiles-register.js
|
|
24242
22757
|
var I3SPendingTilesRegister = class {
|
|
24243
22758
|
constructor() {
|
|
@@ -24392,7 +22907,7 @@ void main(void) {
|
|
|
24392
22907
|
isTileHeader: true
|
|
24393
22908
|
}
|
|
24394
22909
|
};
|
|
24395
|
-
return await load(nodeUrl, loader, options);
|
|
22910
|
+
return await (0, import_core32.load)(nodeUrl, loader, options);
|
|
24396
22911
|
}
|
|
24397
22912
|
_onTileLoad(header, tile, extendedId) {
|
|
24398
22913
|
const childTile = new Tile3D(tile.tileset, header, tile, extendedId);
|
|
@@ -24406,7 +22921,7 @@ void main(void) {
|
|
|
24406
22921
|
};
|
|
24407
22922
|
|
|
24408
22923
|
// ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tileset-3d.js
|
|
24409
|
-
var
|
|
22924
|
+
var DEFAULT_PROPS3 = {
|
|
24410
22925
|
description: "",
|
|
24411
22926
|
ellipsoid: Ellipsoid.WGS84,
|
|
24412
22927
|
modelMatrix: new Matrix4(),
|
|
@@ -24501,7 +23016,7 @@ void main(void) {
|
|
|
24501
23016
|
_defineProperty(this, "maximumMemoryUsage", void 0);
|
|
24502
23017
|
assert2(json);
|
|
24503
23018
|
this.options = {
|
|
24504
|
-
...
|
|
23019
|
+
...DEFAULT_PROPS3,
|
|
24505
23020
|
...options
|
|
24506
23021
|
};
|
|
24507
23022
|
this.tileset = json;
|
|
@@ -25033,7 +23548,7 @@ void main(void) {
|
|
|
25033
23548
|
}
|
|
25034
23549
|
|
|
25035
23550
|
// ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/utils/version.js
|
|
25036
|
-
var
|
|
23551
|
+
var VERSION8 = true ? "3.3.1" : "latest";
|
|
25037
23552
|
|
|
25038
23553
|
// ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/constants.js
|
|
25039
23554
|
var TILE3D_TYPE = {
|
|
@@ -25055,14 +23570,14 @@ void main(void) {
|
|
|
25055
23570
|
const string = textDecoder.decode(typedArray);
|
|
25056
23571
|
return string;
|
|
25057
23572
|
}
|
|
25058
|
-
function
|
|
23573
|
+
function getMagicString2(arrayBuffer) {
|
|
25059
23574
|
let byteOffset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
25060
23575
|
const dataView = new DataView(arrayBuffer);
|
|
25061
23576
|
return "".concat(String.fromCharCode(dataView.getUint8(byteOffset + 0))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 1))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 2))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 3)));
|
|
25062
23577
|
}
|
|
25063
23578
|
|
|
25064
23579
|
// ../../node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js
|
|
25065
|
-
var
|
|
23580
|
+
var VERSION9 = true ? "3.3.1" : "latest";
|
|
25066
23581
|
|
|
25067
23582
|
// ../../node_modules/@loaders.gl/draco/dist/esm/draco-loader.js
|
|
25068
23583
|
var DEFAULT_DRACO_OPTIONS = {
|
|
@@ -25078,7 +23593,7 @@ void main(void) {
|
|
|
25078
23593
|
id: isBrowser2 ? "draco" : "draco-nodejs",
|
|
25079
23594
|
module: "draco",
|
|
25080
23595
|
shapes: ["mesh"],
|
|
25081
|
-
version:
|
|
23596
|
+
version: VERSION9,
|
|
25082
23597
|
worker: true,
|
|
25083
23598
|
extensions: ["drc"],
|
|
25084
23599
|
mimeTypes: ["application/octet-stream"],
|
|
@@ -26093,9 +24608,9 @@ void main(void) {
|
|
|
26093
24608
|
// ../../node_modules/@loaders.gl/draco/dist/esm/index.js
|
|
26094
24609
|
var DracoLoader2 = {
|
|
26095
24610
|
...DracoLoader,
|
|
26096
|
-
parse:
|
|
24611
|
+
parse: parse2
|
|
26097
24612
|
};
|
|
26098
|
-
async function
|
|
24613
|
+
async function parse2(arrayBuffer, options) {
|
|
26099
24614
|
const {
|
|
26100
24615
|
draco
|
|
26101
24616
|
} = await loadDracoDecoderModule(options);
|
|
@@ -27181,7 +25696,7 @@ void main(void) {
|
|
|
27181
25696
|
}
|
|
27182
25697
|
async function loadDraco(tile, dracoData, options, context) {
|
|
27183
25698
|
const {
|
|
27184
|
-
parse:
|
|
25699
|
+
parse: parse5
|
|
27185
25700
|
} = context;
|
|
27186
25701
|
const dracoOptions = {
|
|
27187
25702
|
...options,
|
|
@@ -27191,7 +25706,7 @@ void main(void) {
|
|
|
27191
25706
|
}
|
|
27192
25707
|
};
|
|
27193
25708
|
delete dracoOptions["3d-tiles"];
|
|
27194
|
-
const data = await
|
|
25709
|
+
const data = await parse5(dracoData.buffer, DracoLoader2, dracoOptions);
|
|
27195
25710
|
const decodedPositions = data.attributes.POSITION && data.attributes.POSITION.value;
|
|
27196
25711
|
const decodedColors = data.attributes.COLOR_0 && data.attributes.COLOR_0.value;
|
|
27197
25712
|
const decodedNormals = data.attributes.NORMAL && data.attributes.NORMAL.value;
|
|
@@ -27228,15 +25743,15 @@ void main(void) {
|
|
|
27228
25743
|
}
|
|
27229
25744
|
|
|
27230
25745
|
// ../../node_modules/@loaders.gl/gltf/dist/esm/lib/utils/version.js
|
|
27231
|
-
var
|
|
25746
|
+
var VERSION10 = true ? "3.3.1" : "latest";
|
|
27232
25747
|
|
|
27233
25748
|
// ../../node_modules/@loaders.gl/textures/dist/esm/lib/utils/version.js
|
|
27234
|
-
var
|
|
25749
|
+
var VERSION11 = true ? "3.3.1" : "beta";
|
|
27235
25750
|
|
|
27236
25751
|
// ../../node_modules/@loaders.gl/textures/dist/esm/lib/parsers/basis-module-loader.js
|
|
27237
|
-
var
|
|
27238
|
-
var BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(
|
|
27239
|
-
var BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(
|
|
25752
|
+
var VERSION12 = true ? "3.3.1" : "beta";
|
|
25753
|
+
var BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION12, "/dist/libs/basis_encoder.wasm");
|
|
25754
|
+
var BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION12, "/dist/libs/basis_encoder.js");
|
|
27240
25755
|
var loadBasisTranscoderPromise;
|
|
27241
25756
|
async function loadBasisTrascoderModule(options) {
|
|
27242
25757
|
const modules = options.modules || {};
|
|
@@ -27691,7 +26206,7 @@ void main(void) {
|
|
|
27691
26206
|
name: "Basis",
|
|
27692
26207
|
id: isBrowser2 ? "basis" : "basis-nodejs",
|
|
27693
26208
|
module: "textures",
|
|
27694
|
-
version:
|
|
26209
|
+
version: VERSION11,
|
|
27695
26210
|
worker: true,
|
|
27696
26211
|
extensions: ["basis", "ktx2"],
|
|
27697
26212
|
mimeTypes: ["application/octet-stream", "image/ktx2"],
|
|
@@ -28020,11 +26535,11 @@ void main(void) {
|
|
|
28020
26535
|
});
|
|
28021
26536
|
return this.json.scenes.length - 1;
|
|
28022
26537
|
}
|
|
28023
|
-
addNode(
|
|
26538
|
+
addNode(node2) {
|
|
28024
26539
|
const {
|
|
28025
26540
|
meshIndex,
|
|
28026
26541
|
matrix
|
|
28027
|
-
} =
|
|
26542
|
+
} = node2;
|
|
28028
26543
|
this.json.nodes = this.json.nodes || [];
|
|
28029
26544
|
const nodeData = {
|
|
28030
26545
|
mesh: meshIndex
|
|
@@ -28522,13 +27037,13 @@ void main(void) {
|
|
|
28522
27037
|
const buffer = scenegraph.getTypedArrayForBufferView(dracoExtension.bufferView);
|
|
28523
27038
|
const bufferCopy = sliceArrayBuffer(buffer.buffer, buffer.byteOffset);
|
|
28524
27039
|
const {
|
|
28525
|
-
parse:
|
|
27040
|
+
parse: parse5
|
|
28526
27041
|
} = context;
|
|
28527
27042
|
const dracoOptions = {
|
|
28528
27043
|
...options
|
|
28529
27044
|
};
|
|
28530
27045
|
delete dracoOptions["3d-tiles"];
|
|
28531
|
-
const decodedData = await
|
|
27046
|
+
const decodedData = await parse5(bufferCopy, DracoLoader2, dracoOptions, context);
|
|
28532
27047
|
const decodedAttributes = getGLTFAccessors(decodedData.attributes);
|
|
28533
27048
|
for (const [attributeName, decodedAttribute] of Object.entries(decodedAttributes)) {
|
|
28534
27049
|
if (attributeName in primitive.attributes) {
|
|
@@ -28812,12 +27327,12 @@ void main(void) {
|
|
|
28812
27327
|
gltfScenegraph.json.lights = extension.lights;
|
|
28813
27328
|
gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);
|
|
28814
27329
|
}
|
|
28815
|
-
for (const
|
|
28816
|
-
const nodeExtension = gltfScenegraph.getObjectExtension(
|
|
27330
|
+
for (const node2 of json.nodes || []) {
|
|
27331
|
+
const nodeExtension = gltfScenegraph.getObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
|
|
28817
27332
|
if (nodeExtension) {
|
|
28818
|
-
|
|
27333
|
+
node2.light = nodeExtension.light;
|
|
28819
27334
|
}
|
|
28820
|
-
gltfScenegraph.removeObjectExtension(
|
|
27335
|
+
gltfScenegraph.removeObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
|
|
28821
27336
|
}
|
|
28822
27337
|
}
|
|
28823
27338
|
async function encode3(gltfData) {
|
|
@@ -28833,8 +27348,8 @@ void main(void) {
|
|
|
28833
27348
|
}
|
|
28834
27349
|
if (gltfScenegraph.json.lights) {
|
|
28835
27350
|
for (const light of gltfScenegraph.json.lights) {
|
|
28836
|
-
const
|
|
28837
|
-
gltfScenegraph.addObjectExtension(
|
|
27351
|
+
const node2 = light.node;
|
|
27352
|
+
gltfScenegraph.addObjectExtension(node2, KHR_LIGHTS_PUNCTUAL, light);
|
|
28838
27353
|
}
|
|
28839
27354
|
delete gltfScenegraph.json.lights;
|
|
28840
27355
|
}
|
|
@@ -29197,11 +27712,11 @@ void main(void) {
|
|
|
29197
27712
|
for (const mesh of json.meshes) {
|
|
29198
27713
|
this._convertMeshIds(mesh);
|
|
29199
27714
|
}
|
|
29200
|
-
for (const
|
|
29201
|
-
this._convertNodeIds(
|
|
27715
|
+
for (const node2 of json.nodes) {
|
|
27716
|
+
this._convertNodeIds(node2);
|
|
29202
27717
|
}
|
|
29203
|
-
for (const
|
|
29204
|
-
this._convertSceneIds(
|
|
27718
|
+
for (const node2 of json.scenes) {
|
|
27719
|
+
this._convertSceneIds(node2);
|
|
29205
27720
|
}
|
|
29206
27721
|
}
|
|
29207
27722
|
_convertTextureIds(texture) {
|
|
@@ -29227,17 +27742,17 @@ void main(void) {
|
|
|
29227
27742
|
}
|
|
29228
27743
|
}
|
|
29229
27744
|
}
|
|
29230
|
-
_convertNodeIds(
|
|
29231
|
-
if (
|
|
29232
|
-
|
|
27745
|
+
_convertNodeIds(node2) {
|
|
27746
|
+
if (node2.children) {
|
|
27747
|
+
node2.children = node2.children.map((child) => this._convertIdToIndex(child, "node"));
|
|
29233
27748
|
}
|
|
29234
|
-
if (
|
|
29235
|
-
|
|
27749
|
+
if (node2.meshes) {
|
|
27750
|
+
node2.meshes = node2.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
|
|
29236
27751
|
}
|
|
29237
27752
|
}
|
|
29238
27753
|
_convertSceneIds(scene) {
|
|
29239
27754
|
if (scene.nodes) {
|
|
29240
|
-
scene.nodes = scene.nodes.map((
|
|
27755
|
+
scene.nodes = scene.nodes.map((node2) => this._convertIdToIndex(node2, "node"));
|
|
29241
27756
|
}
|
|
29242
27757
|
}
|
|
29243
27758
|
_convertIdsToIndices(json, topLevelArrayName) {
|
|
@@ -29384,7 +27899,7 @@ void main(void) {
|
|
|
29384
27899
|
json.meshes = json.meshes.map((mesh, i3) => this._resolveMesh(mesh, i3));
|
|
29385
27900
|
}
|
|
29386
27901
|
if (json.nodes) {
|
|
29387
|
-
json.nodes = json.nodes.map((
|
|
27902
|
+
json.nodes = json.nodes.map((node2, i3) => this._resolveNode(node2, i3));
|
|
29388
27903
|
}
|
|
29389
27904
|
if (json.skins) {
|
|
29390
27905
|
json.skins = json.skins.map((skin, i3) => this._resolveSkin(skin, i3));
|
|
@@ -29444,18 +27959,18 @@ void main(void) {
|
|
|
29444
27959
|
}
|
|
29445
27960
|
_resolveScene(scene, index) {
|
|
29446
27961
|
scene.id = scene.id || "scene-".concat(index);
|
|
29447
|
-
scene.nodes = (scene.nodes || []).map((
|
|
27962
|
+
scene.nodes = (scene.nodes || []).map((node2) => this.getNode(node2));
|
|
29448
27963
|
return scene;
|
|
29449
27964
|
}
|
|
29450
|
-
_resolveNode(
|
|
29451
|
-
|
|
29452
|
-
if (
|
|
29453
|
-
|
|
27965
|
+
_resolveNode(node2, index) {
|
|
27966
|
+
node2.id = node2.id || "node-".concat(index);
|
|
27967
|
+
if (node2.children) {
|
|
27968
|
+
node2.children = node2.children.map((child) => this.getNode(child));
|
|
29454
27969
|
}
|
|
29455
|
-
if (
|
|
29456
|
-
|
|
29457
|
-
} else if (
|
|
29458
|
-
|
|
27970
|
+
if (node2.mesh !== void 0) {
|
|
27971
|
+
node2.mesh = this.getMesh(node2.mesh);
|
|
27972
|
+
} else if (node2.meshes !== void 0 && node2.meshes.length) {
|
|
27973
|
+
node2.mesh = node2.meshes.reduce((accum, meshIndex) => {
|
|
29459
27974
|
const mesh = this.getMesh(meshIndex);
|
|
29460
27975
|
accum.id = mesh.id;
|
|
29461
27976
|
accum.primitives = accum.primitives.concat(mesh.primitives);
|
|
@@ -29464,13 +27979,13 @@ void main(void) {
|
|
|
29464
27979
|
primitives: []
|
|
29465
27980
|
});
|
|
29466
27981
|
}
|
|
29467
|
-
if (
|
|
29468
|
-
|
|
27982
|
+
if (node2.camera !== void 0) {
|
|
27983
|
+
node2.camera = this.getCamera(node2.camera);
|
|
29469
27984
|
}
|
|
29470
|
-
if (
|
|
29471
|
-
|
|
27985
|
+
if (node2.skin !== void 0) {
|
|
27986
|
+
node2.skin = this.getSkin(node2.skin);
|
|
29472
27987
|
}
|
|
29473
|
-
return
|
|
27988
|
+
return node2;
|
|
29474
27989
|
}
|
|
29475
27990
|
_resolveSkin(skin, index) {
|
|
29476
27991
|
skin.id = skin.id || "skin-".concat(index);
|
|
@@ -29643,7 +28158,7 @@ void main(void) {
|
|
|
29643
28158
|
var GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED = 1;
|
|
29644
28159
|
var GLB_V1_CONTENT_FORMAT_JSON = 0;
|
|
29645
28160
|
var LE = true;
|
|
29646
|
-
function
|
|
28161
|
+
function getMagicString3(dataView) {
|
|
29647
28162
|
let byteOffset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
29648
28163
|
return "".concat(String.fromCharCode(dataView.getUint8(byteOffset + 0))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 1))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 2))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 3)));
|
|
29649
28164
|
}
|
|
@@ -29661,7 +28176,7 @@ void main(void) {
|
|
|
29661
28176
|
let byteOffset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
29662
28177
|
let options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
29663
28178
|
const dataView = new DataView(arrayBuffer);
|
|
29664
|
-
const type =
|
|
28179
|
+
const type = getMagicString3(dataView, byteOffset + 0);
|
|
29665
28180
|
const version = dataView.getUint32(byteOffset + 4, LE);
|
|
29666
28181
|
const byteLength = dataView.getUint32(byteOffset + 8, LE);
|
|
29667
28182
|
Object.assign(glb, {
|
|
@@ -29855,7 +28370,7 @@ void main(void) {
|
|
|
29855
28370
|
async function loadImage2(gltf, image, index, options, context) {
|
|
29856
28371
|
const {
|
|
29857
28372
|
fetch: fetch2,
|
|
29858
|
-
parse:
|
|
28373
|
+
parse: parse5
|
|
29859
28374
|
} = context;
|
|
29860
28375
|
let arrayBuffer;
|
|
29861
28376
|
if (image.uri && !image.hasOwnProperty("bufferView")) {
|
|
@@ -29871,7 +28386,7 @@ void main(void) {
|
|
|
29871
28386
|
arrayBuffer = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
|
|
29872
28387
|
}
|
|
29873
28388
|
assert11(arrayBuffer, "glTF image has no data");
|
|
29874
|
-
let parsedImage = await
|
|
28389
|
+
let parsedImage = await parse5(arrayBuffer, [ImageLoader, BasisLoader], {
|
|
29875
28390
|
mimeType: image.mimeType,
|
|
29876
28391
|
basis: options.basis || {
|
|
29877
28392
|
format: selectSupportedBasisFormat()
|
|
@@ -29895,13 +28410,13 @@ void main(void) {
|
|
|
29895
28410
|
name: "glTF",
|
|
29896
28411
|
id: "gltf",
|
|
29897
28412
|
module: "gltf",
|
|
29898
|
-
version:
|
|
28413
|
+
version: VERSION10,
|
|
29899
28414
|
extensions: ["gltf", "glb"],
|
|
29900
28415
|
mimeTypes: ["model/gltf+json", "model/gltf-binary"],
|
|
29901
28416
|
text: true,
|
|
29902
28417
|
binary: true,
|
|
29903
28418
|
tests: ["glTF"],
|
|
29904
|
-
parse:
|
|
28419
|
+
parse: parse3,
|
|
29905
28420
|
options: {
|
|
29906
28421
|
gltf: {
|
|
29907
28422
|
normalize: true,
|
|
@@ -29922,7 +28437,7 @@ void main(void) {
|
|
|
29922
28437
|
}
|
|
29923
28438
|
}
|
|
29924
28439
|
};
|
|
29925
|
-
async function
|
|
28440
|
+
async function parse3(arrayBuffer) {
|
|
29926
28441
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
29927
28442
|
let context = arguments.length > 2 ? arguments[2] : void 0;
|
|
29928
28443
|
options = {
|
|
@@ -29966,7 +28481,7 @@ void main(void) {
|
|
|
29966
28481
|
extractGLTFBufferOrURL(tile, gltfFormat, options);
|
|
29967
28482
|
if (tile3DOptions.loadGLTF) {
|
|
29968
28483
|
const {
|
|
29969
|
-
parse:
|
|
28484
|
+
parse: parse5,
|
|
29970
28485
|
fetch: fetch2
|
|
29971
28486
|
} = context;
|
|
29972
28487
|
if (tile.gltfUrl) {
|
|
@@ -29974,7 +28489,7 @@ void main(void) {
|
|
|
29974
28489
|
tile.gltfByteOffset = 0;
|
|
29975
28490
|
}
|
|
29976
28491
|
if (tile.gltfArrayBuffer) {
|
|
29977
|
-
tile.gltf = await
|
|
28492
|
+
tile.gltf = await parse5(tile.gltfArrayBuffer, GLTFLoader, options, context);
|
|
29978
28493
|
delete tile.gltfArrayBuffer;
|
|
29979
28494
|
delete tile.gltfByteOffset;
|
|
29980
28495
|
delete tile.gltfByteLength;
|
|
@@ -30180,9 +28695,9 @@ void main(void) {
|
|
|
30180
28695
|
tile.rotateYtoZ = true;
|
|
30181
28696
|
tile.gltfUpAxis = options["3d-tiles"] && options["3d-tiles"].assetGltfUpAxis ? options["3d-tiles"].assetGltfUpAxis : "Y";
|
|
30182
28697
|
const {
|
|
30183
|
-
parse:
|
|
28698
|
+
parse: parse5
|
|
30184
28699
|
} = context;
|
|
30185
|
-
tile.gltf = await
|
|
28700
|
+
tile.gltf = await parse5(arrayBuffer, GLTFLoader, options, context);
|
|
30186
28701
|
}
|
|
30187
28702
|
|
|
30188
28703
|
// ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/parse-3d-tile.js
|
|
@@ -30192,7 +28707,7 @@ void main(void) {
|
|
|
30192
28707
|
let context = arguments.length > 3 ? arguments[3] : void 0;
|
|
30193
28708
|
let tile = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
|
|
30194
28709
|
tile.byteOffset = byteOffset;
|
|
30195
|
-
tile.type =
|
|
28710
|
+
tile.type = getMagicString2(arrayBuffer, byteOffset);
|
|
30196
28711
|
switch (tile.type) {
|
|
30197
28712
|
case TILE3D_TYPE.COMPOSITE:
|
|
30198
28713
|
return await parseComposite3DTile(tile, arrayBuffer, byteOffset, options, context, parse3DTile);
|
|
@@ -30282,7 +28797,7 @@ void main(void) {
|
|
|
30282
28797
|
id: "3d-tiles-subtree",
|
|
30283
28798
|
name: "3D Tiles Subtree",
|
|
30284
28799
|
module: "3d-tiles",
|
|
30285
|
-
version:
|
|
28800
|
+
version: VERSION8,
|
|
30286
28801
|
extensions: ["subtree"],
|
|
30287
28802
|
mimeTypes: ["application/octet-stream"],
|
|
30288
28803
|
tests: ["subtree"],
|
|
@@ -30290,7 +28805,11 @@ void main(void) {
|
|
|
30290
28805
|
options: {}
|
|
30291
28806
|
};
|
|
30292
28807
|
|
|
28808
|
+
// ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/parse-3d-tile-header.js
|
|
28809
|
+
var import_core41 = __toESM(require_core3());
|
|
28810
|
+
|
|
30293
28811
|
// ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js
|
|
28812
|
+
var import_core40 = __toESM(require_core3());
|
|
30294
28813
|
var QUADTREE_DEVISION_COUNT = 4;
|
|
30295
28814
|
var OCTREE_DEVISION_COUNT = 8;
|
|
30296
28815
|
var SUBDIVISION_COUNT_MAP = {
|
|
@@ -30353,7 +28872,7 @@ void main(void) {
|
|
|
30353
28872
|
if (isChildSubtreeAvailable) {
|
|
30354
28873
|
const subtreePath = "".concat(basePath, "/").concat(subtreesUriTemplate);
|
|
30355
28874
|
const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, lev, x2, y2, z);
|
|
30356
|
-
const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader);
|
|
28875
|
+
const childSubtree = await (0, import_core40.load)(childSubtreeUrl, Tile3DSubtreeLoader);
|
|
30357
28876
|
subtree = childSubtree;
|
|
30358
28877
|
globalData.mortonIndex = childTileMortonIndex;
|
|
30359
28878
|
globalData.x = childTileX;
|
|
@@ -30588,7 +29107,7 @@ void main(void) {
|
|
|
30588
29107
|
} = implicitTilingExtension;
|
|
30589
29108
|
const replacedUrlTemplate = replaceContentUrlTemplate(subtreesUriTemplate, 0, 0, 0, 0);
|
|
30590
29109
|
const subtreeUrl = resolveUri(replacedUrlTemplate, basePath);
|
|
30591
|
-
const subtree = await load(subtreeUrl, Tile3DSubtreeLoader, options);
|
|
29110
|
+
const subtree = await (0, import_core41.load)(subtreeUrl, Tile3DSubtreeLoader, options);
|
|
30592
29111
|
const contentUrlTemplate = resolveUri(tile.content.uri, basePath);
|
|
30593
29112
|
const refine = tileset === null || tileset === void 0 ? void 0 : (_tileset$root = tileset.root) === null || _tileset$root === void 0 ? void 0 : _tileset$root.refine;
|
|
30594
29113
|
const rootLodMetricValue = tile.geometricError;
|
|
@@ -30645,11 +29164,11 @@ void main(void) {
|
|
|
30645
29164
|
id: "3d-tiles",
|
|
30646
29165
|
name: "3D Tiles",
|
|
30647
29166
|
module: "3d-tiles",
|
|
30648
|
-
version:
|
|
29167
|
+
version: VERSION8,
|
|
30649
29168
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
30650
29169
|
mimeTypes: ["application/octet-stream"],
|
|
30651
29170
|
tests: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
30652
|
-
parse:
|
|
29171
|
+
parse: parse4,
|
|
30653
29172
|
options: {
|
|
30654
29173
|
"3d-tiles": {
|
|
30655
29174
|
loadGLTF: true,
|
|
@@ -30684,7 +29203,7 @@ void main(void) {
|
|
|
30684
29203
|
tilesetJson.lodMetricValue = ((_tilesetJson$root = tilesetJson.root) === null || _tilesetJson$root === void 0 ? void 0 : _tilesetJson$root.lodMetricValue) || 0;
|
|
30685
29204
|
return tilesetJson;
|
|
30686
29205
|
}
|
|
30687
|
-
async function
|
|
29206
|
+
async function parse4(data, options, context) {
|
|
30688
29207
|
const loaderOptions = options["3d-tiles"] || {};
|
|
30689
29208
|
let isTileset;
|
|
30690
29209
|
if (loaderOptions.isTileset === "auto") {
|
|
@@ -30854,7 +29373,7 @@ void main(void) {
|
|
|
30854
29373
|
}
|
|
30855
29374
|
Object.assign(options, preloadOptions);
|
|
30856
29375
|
}
|
|
30857
|
-
const tilesetJson = await load(tilesetUrl, loader, options.loadOptions);
|
|
29376
|
+
const tilesetJson = await (0, import_core44.load)(tilesetUrl, loader, options.loadOptions);
|
|
30858
29377
|
const tileset3d = new Tileset3D(tilesetJson, {
|
|
30859
29378
|
onTileLoad: this._onTileLoad.bind(this),
|
|
30860
29379
|
onTileUnload: this._onTileUnload.bind(this),
|
|
@@ -32143,14 +30662,14 @@ void main(void) {
|
|
|
32143
30662
|
}
|
|
32144
30663
|
|
|
32145
30664
|
// ../../node_modules/@loaders.gl/terrain/dist/esm/lib/utils/version.js
|
|
32146
|
-
var
|
|
30665
|
+
var VERSION13 = true ? "3.3.1" : "latest";
|
|
32147
30666
|
|
|
32148
30667
|
// ../../node_modules/@loaders.gl/terrain/dist/esm/terrain-loader.js
|
|
32149
30668
|
var TerrainLoader = {
|
|
32150
30669
|
name: "Terrain",
|
|
32151
30670
|
id: "terrain",
|
|
32152
30671
|
module: "terrain",
|
|
32153
|
-
version:
|
|
30672
|
+
version: VERSION13,
|
|
32154
30673
|
worker: true,
|
|
32155
30674
|
extensions: ["png", "pngraw", "jpg", "jpeg", "gif", "webp", "bmp"],
|
|
32156
30675
|
mimeTypes: ["image/png", "image/jpeg", "image/gif", "image/webp", "image/bmp"],
|
|
@@ -32175,7 +30694,7 @@ void main(void) {
|
|
|
32175
30694
|
name: "Quantized Mesh",
|
|
32176
30695
|
id: "quantized-mesh",
|
|
32177
30696
|
module: "terrain",
|
|
32178
|
-
version:
|
|
30697
|
+
version: VERSION13,
|
|
32179
30698
|
worker: true,
|
|
32180
30699
|
extensions: ["terrain"],
|
|
32181
30700
|
mimeTypes: ["application/vnd.quantized-mesh"],
|
|
@@ -34059,7 +32578,7 @@ void main(void) {
|
|
|
34059
32578
|
// ../../node_modules/@loaders.gl/mvt/dist/esm/lib/parse-mvt.js
|
|
34060
32579
|
function parseMVT(arrayBuffer, options) {
|
|
34061
32580
|
var _options$gis, _options$mvt;
|
|
34062
|
-
const mvtOptions =
|
|
32581
|
+
const mvtOptions = normalizeOptions(options);
|
|
34063
32582
|
const shape = (options === null || options === void 0 ? void 0 : (_options$gis = options.gis) === null || _options$gis === void 0 ? void 0 : _options$gis.format) || (options === null || options === void 0 ? void 0 : (_options$mvt = options.mvt) === null || _options$mvt === void 0 ? void 0 : _options$mvt.shape);
|
|
34064
32583
|
switch (shape) {
|
|
34065
32584
|
case "columnar-table":
|
|
@@ -34142,7 +32661,7 @@ void main(void) {
|
|
|
34142
32661
|
});
|
|
34143
32662
|
return features;
|
|
34144
32663
|
}
|
|
34145
|
-
function
|
|
32664
|
+
function normalizeOptions(options) {
|
|
34146
32665
|
var _options$mvt2;
|
|
34147
32666
|
if (!(options !== null && options !== void 0 && options.mvt)) {
|
|
34148
32667
|
throw new Error("mvt options required");
|
|
@@ -34191,7 +32710,7 @@ void main(void) {
|
|
|
34191
32710
|
}
|
|
34192
32711
|
|
|
34193
32712
|
// ../../node_modules/@loaders.gl/mvt/dist/esm/mvt-loader.js
|
|
34194
|
-
var
|
|
32713
|
+
var VERSION14 = true ? "3.3.1" : "latest";
|
|
34195
32714
|
var DEFAULT_MVT_LOADER_OPTIONS = {
|
|
34196
32715
|
mvt: {
|
|
34197
32716
|
shape: "geojson",
|
|
@@ -34205,7 +32724,7 @@ void main(void) {
|
|
|
34205
32724
|
name: "Mapbox Vector Tile",
|
|
34206
32725
|
id: "mvt",
|
|
34207
32726
|
module: "mvt",
|
|
34208
|
-
version:
|
|
32727
|
+
version: VERSION14,
|
|
34209
32728
|
extensions: ["mvt", "pbf"],
|
|
34210
32729
|
mimeTypes: [
|
|
34211
32730
|
"application/vnd.mapbox-vector-tile",
|
|
@@ -34772,3 +33291,5 @@ void main(void) {
|
|
|
34772
33291
|
__publicField(GeohashLayer, "defaultProps", defaultProps14);
|
|
34773
33292
|
return __toCommonJS(bundle_exports);
|
|
34774
33293
|
})();
|
|
33294
|
+
return __exports__;
|
|
33295
|
+
});
|