@loaders.gl/tiles-3d 5.0.0-beta.4 → 5.0.0-beta.5
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/README.md +1 -1
- package/dist/3d-tiles/3d-tiles-archive-loader.js +1 -1
- package/dist/3d-tiles/dist.dev.js +891 -620
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +821 -943
- package/dist/3d-tiles/index.cjs.map +3 -3
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js +5 -1
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/3d-tiles/lib/utils/version.js +1 -1
- package/dist/3d-tiles-archive-writer.cjs +1 -1
- package/dist/cesium-ion-loader-with-parser.cjs +820 -942
- package/dist/cesium-ion-loader-with-parser.cjs.map +3 -3
- package/dist/copc/copc-source-loader.js +2 -2
- package/dist/copc/copc-source-loader.js.map +1 -1
- package/dist/copc/copc-writer.js +1 -1
- package/dist/copc/index.cjs +24 -178
- package/dist/copc/index.cjs.map +3 -3
- package/dist/dist.dev.js +231 -38
- package/dist/dist.min.js +10 -10
- package/dist/i3s/arcgis-webscene-loader.js +1 -1
- package/dist/i3s/dist.dev.js +3080 -710
- package/dist/i3s/dist.min.js +47 -47
- package/dist/i3s/i3s-attribute-loader.js +1 -1
- package/dist/i3s/i3s-building-scene-layer-loader.js +1 -1
- package/dist/i3s/i3s-content-loader.js +1 -1
- package/dist/i3s/i3s-lepcc-loader-types.js +1 -1
- package/dist/i3s/i3s-loader.js +1 -1
- package/dist/i3s/i3s-node-page-loader.js +1 -1
- package/dist/i3s/i3s-slpk-loader.js +1 -1
- package/dist/i3s/i3s-slpk-writer.js +1 -1
- package/dist/i3s/index.cjs +1999 -541
- package/dist/i3s/index.cjs.map +3 -3
- package/dist/i3s-content-worker-node.js +11 -11
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +767 -346
- package/dist/i3s-lepcc-worker-node.js +245 -12
- package/dist/i3s-lepcc-worker-node.js.map +4 -4
- package/dist/i3s-lepcc-worker.js +240 -12
- package/dist/i3s-mesh-writer.cjs +1748 -290
- package/dist/i3s-mesh-writer.cjs.map +3 -3
- package/dist/i3s-slpk-writer.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/point-cloud-tile-source-loader-types.js +1 -1
- package/dist/point-cloud-tile-source-loader.cjs +1 -1
- package/dist/potree/dist.dev.js +226 -82
- package/dist/potree/dist.min.js +30 -30
- package/dist/potree/index.cjs +13 -165
- package/dist/potree/index.cjs.map +3 -3
- package/dist/potree/potree-bin-loader.js +1 -1
- package/dist/potree/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/potree/potree-loader-types.js +1 -1
- package/dist/potree/potree-source-loader.js +1 -1
- package/dist/potree/potree-writer.js +1 -1
- package/dist/potree-loader.cjs +1 -1
- package/package.json +13 -13
- package/src/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
|
|
113
113
|
// ../core/src/worker-utils/lib/env-utils/version.ts
|
|
114
114
|
function getVersion() {
|
|
115
|
-
const version = false ? NPM_TAG : "5.0.0-beta.
|
|
115
|
+
const version = false ? NPM_TAG : "5.0.0-beta.5";
|
|
116
116
|
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
117
117
|
globalThis._loadersgl_.version ||= version;
|
|
118
118
|
return version;
|
|
@@ -161,15 +161,15 @@
|
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
-
// ../../node_modules/@math.gl/
|
|
164
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads-browser.js
|
|
165
165
|
var parentPort;
|
|
166
166
|
var init_worker_threads_browser = __esm({
|
|
167
|
-
"../../node_modules/@math.gl/
|
|
167
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads-browser.js"() {
|
|
168
168
|
parentPort = globalThis.process?.getBuiltinModule?.("node:worker_threads")?.parentPort ?? null;
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
-
// ../../node_modules/@math.gl/
|
|
172
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-utils/get-transfer-list.js
|
|
173
173
|
function getTransferList(object2, recursive = true, transfers) {
|
|
174
174
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
175
175
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -220,11 +220,11 @@
|
|
|
220
220
|
return false;
|
|
221
221
|
}
|
|
222
222
|
var init_get_transfer_list = __esm({
|
|
223
|
-
"../../node_modules/@math.gl/
|
|
223
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-utils/get-transfer-list.js"() {
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
|
|
227
|
-
// ../../node_modules/@math.gl/
|
|
227
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-farm/worker-body.js
|
|
228
228
|
async function getParentPort() {
|
|
229
229
|
return parentPort;
|
|
230
230
|
}
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
}
|
|
238
238
|
var onMessageWrapperMap, WorkerBody;
|
|
239
239
|
var init_worker_body = __esm({
|
|
240
|
-
"../../node_modules/@math.gl/
|
|
240
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-farm/worker-body.js"() {
|
|
241
241
|
init_get_transfer_list();
|
|
242
242
|
init_worker_threads_browser();
|
|
243
243
|
onMessageWrapperMap = /* @__PURE__ */ new Map();
|
|
@@ -318,10 +318,10 @@
|
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
|
|
321
|
-
// ../../node_modules/@math.gl/
|
|
321
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/async-queue/async-queue.js
|
|
322
322
|
var AsyncQueue;
|
|
323
323
|
var init_async_queue = __esm({
|
|
324
|
-
"../../node_modules/@math.gl/
|
|
324
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/async-queue/async-queue.js"() {
|
|
325
325
|
AsyncQueue = class {
|
|
326
326
|
constructor() {
|
|
327
327
|
this._values = [];
|
|
@@ -390,10 +390,10 @@
|
|
|
390
390
|
}
|
|
391
391
|
});
|
|
392
392
|
|
|
393
|
-
// ../../node_modules/@math.gl/
|
|
393
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/shared-state.js
|
|
394
394
|
var SharedWorkerState;
|
|
395
395
|
var init_shared_state = __esm({
|
|
396
|
-
"../../node_modules/@math.gl/
|
|
396
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/shared-state.js"() {
|
|
397
397
|
SharedWorkerState = class {
|
|
398
398
|
constructor(buffer) {
|
|
399
399
|
if (typeof SharedArrayBuffer === "undefined" || !(buffer instanceof SharedArrayBuffer) || buffer.byteLength !== 16)
|
|
@@ -434,18 +434,18 @@
|
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
436
|
|
|
437
|
-
// ../../node_modules/@math.gl/
|
|
437
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/validate-output-ownership.js
|
|
438
438
|
function validateOutputOwnership(ownership) {
|
|
439
439
|
if (ownership !== void 0 && ownership !== "copy" && ownership !== "transfer") {
|
|
440
440
|
throw new Error("Invalid worker output ownership");
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
var init_validate_output_ownership = __esm({
|
|
444
|
-
"../../node_modules/@math.gl/
|
|
444
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/validate-output-ownership.js"() {
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
447
|
|
|
448
|
-
// ../../node_modules/@math.gl/
|
|
448
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/create-worker.js
|
|
449
449
|
async function createWorker(process2, processInBatches, preload5) {
|
|
450
450
|
if (!await WorkerBody.inWorkerThread()) {
|
|
451
451
|
return;
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
}
|
|
651
651
|
var requestId, activeController, activeInputBatches, activeOutputAcknowledgements;
|
|
652
652
|
var init_create_worker = __esm({
|
|
653
|
-
"../../node_modules/@math.gl/
|
|
653
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/create-worker.js"() {
|
|
654
654
|
init_shared_state();
|
|
655
655
|
init_async_queue();
|
|
656
656
|
init_worker_body();
|
|
@@ -662,19 +662,20 @@
|
|
|
662
662
|
}
|
|
663
663
|
});
|
|
664
664
|
|
|
665
|
-
// ../../node_modules/@math.gl/
|
|
665
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/index.js
|
|
666
666
|
var import_meta, path, moduleUrl;
|
|
667
667
|
var init_worker_utils = __esm({
|
|
668
|
-
"../../node_modules/@math.gl/
|
|
668
|
+
"../../node_modules/@math.gl/tasks/dist/worker-utils/index.js"() {
|
|
669
669
|
init_worker_body();
|
|
670
670
|
init_create_worker();
|
|
671
|
+
init_get_transfer_list();
|
|
671
672
|
import_meta = {};
|
|
672
673
|
path = typeof __filename === "string" ? __filename.replace(/\\/g, "/") : "";
|
|
673
674
|
moduleUrl = path ? `file://${path.startsWith("/") ? "" : "/"}${encodeURI(path).replace(/#/g, "%23").replace(/\?/g, "%3F")}` : import_meta.url;
|
|
674
675
|
}
|
|
675
676
|
});
|
|
676
677
|
|
|
677
|
-
// ../../node_modules/@math.gl/
|
|
678
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-preload.js
|
|
678
679
|
function preloadTaskCode(task, signal) {
|
|
679
680
|
if (!task.preload)
|
|
680
681
|
return Promise.resolve();
|
|
@@ -710,23 +711,193 @@
|
|
|
710
711
|
}
|
|
711
712
|
var pending, loaded;
|
|
712
713
|
var init_task_preload = __esm({
|
|
713
|
-
"../../node_modules/@math.gl/
|
|
714
|
+
"../../node_modules/@math.gl/tasks/dist/tasks/task-preload.js"() {
|
|
714
715
|
pending = /* @__PURE__ */ new WeakMap();
|
|
715
716
|
loaded = /* @__PURE__ */ new WeakSet();
|
|
716
717
|
}
|
|
717
718
|
});
|
|
718
719
|
|
|
719
|
-
// ../../node_modules/@math.gl/
|
|
720
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-channel.js
|
|
721
|
+
var TaskRequestError, TaskChannel;
|
|
722
|
+
var init_task_channel = __esm({
|
|
723
|
+
"../../node_modules/@math.gl/tasks/dist/tasks/task-channel.js"() {
|
|
724
|
+
TaskRequestError = class extends Error {
|
|
725
|
+
};
|
|
726
|
+
TaskChannel = class {
|
|
727
|
+
constructor(options) {
|
|
728
|
+
this.options = options;
|
|
729
|
+
this.nextId = 1;
|
|
730
|
+
this.pending = /* @__PURE__ */ new Map();
|
|
731
|
+
this.incoming = /* @__PURE__ */ new Map();
|
|
732
|
+
}
|
|
733
|
+
/** Send a request without serializing other in-flight requests. */
|
|
734
|
+
request(operation2, value2, signal, transfer = []) {
|
|
735
|
+
if (this.failure)
|
|
736
|
+
return Promise.reject(this.failure.reason);
|
|
737
|
+
if (signal?.aborted)
|
|
738
|
+
return Promise.reject(signal.reason);
|
|
739
|
+
const id = this.nextId++;
|
|
740
|
+
return new Promise((resolve, reject) => {
|
|
741
|
+
const abort = () => {
|
|
742
|
+
const pending2 = this.pending.get(id);
|
|
743
|
+
if (!pending2)
|
|
744
|
+
return;
|
|
745
|
+
this.pending.delete(id);
|
|
746
|
+
pending2.cleanup();
|
|
747
|
+
reject(signal?.reason);
|
|
748
|
+
this.send({ source: "math.gl/tasks", kind: "cancel", id });
|
|
749
|
+
};
|
|
750
|
+
this.pending.set(id, {
|
|
751
|
+
resolve,
|
|
752
|
+
reject,
|
|
753
|
+
cleanup: () => signal?.removeEventListener("abort", abort)
|
|
754
|
+
});
|
|
755
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
756
|
+
this.send({ source: "math.gl/tasks", kind: "request", id, operation: operation2, value: value2 }, transfer);
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
/** Send a one-way notification. */
|
|
760
|
+
emit(operation2, value2, transfer = []) {
|
|
761
|
+
if (this.failure)
|
|
762
|
+
throw this.failure.reason;
|
|
763
|
+
this.send({ source: "math.gl/tasks", kind: "event", id: 0, operation: operation2, value: value2 }, transfer);
|
|
764
|
+
}
|
|
765
|
+
/** Dispatch a transport message; unrelated protocols are ignored. */
|
|
766
|
+
receive(message) {
|
|
767
|
+
if (this.failure || message?.source !== "math.gl/tasks")
|
|
768
|
+
return;
|
|
769
|
+
if (message.kind === "failure") {
|
|
770
|
+
const reason = new Error(message.error?.message ?? "Task channel failed");
|
|
771
|
+
this.close(reason);
|
|
772
|
+
this.options.onFailure?.(reason);
|
|
773
|
+
} else if (message.kind === "result" || message.kind === "error") {
|
|
774
|
+
const pending2 = this.pending.get(message.id);
|
|
775
|
+
if (!pending2)
|
|
776
|
+
return;
|
|
777
|
+
this.pending.delete(message.id);
|
|
778
|
+
pending2.cleanup();
|
|
779
|
+
if (message.kind === "result")
|
|
780
|
+
pending2.resolve(message.value);
|
|
781
|
+
else {
|
|
782
|
+
const error = new TaskRequestError(message.error?.message ?? "Task request failed");
|
|
783
|
+
error.name = message.error?.name ?? "Error";
|
|
784
|
+
pending2.reject(error);
|
|
785
|
+
}
|
|
786
|
+
} else if (message.kind === "cancel") {
|
|
787
|
+
this.incoming.get(message.id)?.abort(new DOMException("Task request cancelled", "AbortError"));
|
|
788
|
+
} else if (message.kind === "event") {
|
|
789
|
+
try {
|
|
790
|
+
this.options.handleEvent?.(message.operation, message.value);
|
|
791
|
+
} catch (error) {
|
|
792
|
+
this.fail(error);
|
|
793
|
+
}
|
|
794
|
+
} else if (message.kind === "request") {
|
|
795
|
+
if (this.incoming.has(message.id)) {
|
|
796
|
+
this.fail(new Error("Duplicate task request identifier"));
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
const controller = new AbortController();
|
|
800
|
+
this.incoming.set(message.id, controller);
|
|
801
|
+
void Promise.resolve().then(() => {
|
|
802
|
+
controller.signal.throwIfAborted();
|
|
803
|
+
return this.options.handleRequest(message.operation, message.value, controller.signal);
|
|
804
|
+
}).then((value2) => {
|
|
805
|
+
if (!controller.signal.aborted && !this.failure) {
|
|
806
|
+
this.send({ source: "math.gl/tasks", kind: "result", id: message.id, value: value2 }, this.options.getResultTransferList?.(value2, message.value));
|
|
807
|
+
}
|
|
808
|
+
}).catch((reason) => {
|
|
809
|
+
if (!controller.signal.aborted && !this.failure) {
|
|
810
|
+
this.send({
|
|
811
|
+
source: "math.gl/tasks",
|
|
812
|
+
kind: "error",
|
|
813
|
+
id: message.id,
|
|
814
|
+
error: {
|
|
815
|
+
name: reason instanceof Error ? reason.name : "Error",
|
|
816
|
+
message: reason instanceof Error ? reason.message : String(reason)
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
}).finally(() => this.incoming.delete(message.id));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
/** Reject all outstanding calls with a common cause and abort incoming callbacks. */
|
|
824
|
+
close(reason = new Error("Task channel closed")) {
|
|
825
|
+
if (this.failure)
|
|
826
|
+
return;
|
|
827
|
+
this.failure = { reason };
|
|
828
|
+
for (const pending2 of this.pending.values()) {
|
|
829
|
+
pending2.cleanup();
|
|
830
|
+
pending2.reject(reason);
|
|
831
|
+
}
|
|
832
|
+
this.pending.clear();
|
|
833
|
+
for (const controller of this.incoming.values())
|
|
834
|
+
controller.abort(reason);
|
|
835
|
+
this.incoming.clear();
|
|
836
|
+
}
|
|
837
|
+
send(message, transfer = []) {
|
|
838
|
+
if (this.failure)
|
|
839
|
+
return;
|
|
840
|
+
try {
|
|
841
|
+
this.options.send(message, transfer);
|
|
842
|
+
} catch (error) {
|
|
843
|
+
this.fail(error);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
/** Invalidate the channel and notify the peer when the transport still works. */
|
|
847
|
+
fail(reason) {
|
|
848
|
+
if (this.failure)
|
|
849
|
+
return;
|
|
850
|
+
this.close(reason);
|
|
851
|
+
try {
|
|
852
|
+
this.options.send({
|
|
853
|
+
source: "math.gl/tasks",
|
|
854
|
+
kind: "failure",
|
|
855
|
+
id: 0,
|
|
856
|
+
error: {
|
|
857
|
+
name: reason instanceof Error ? reason.name : "Error",
|
|
858
|
+
message: reason instanceof Error ? reason.message : String(reason)
|
|
859
|
+
}
|
|
860
|
+
}, []);
|
|
861
|
+
} catch {
|
|
862
|
+
}
|
|
863
|
+
this.options.onFailure?.(reason);
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
|
|
869
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-runtime.js
|
|
720
870
|
function assertPayload(value2) {
|
|
721
871
|
if (!value2 || typeof value2 !== "object" || Object.getPrototypeOf(value2) !== Object.prototype) {
|
|
722
872
|
throw new TypeError("Task payloads must be plain objects with named fields");
|
|
723
873
|
}
|
|
724
874
|
}
|
|
875
|
+
function clonePayload(value2, ownership = "copy") {
|
|
876
|
+
assertPayload(value2);
|
|
877
|
+
if (!["copy", "transfer", "share"].includes(ownership))
|
|
878
|
+
throw new TypeError("Invalid input ownership");
|
|
879
|
+
const transfer = getTransferList(value2);
|
|
880
|
+
if (ownership === "share" && transfer.length)
|
|
881
|
+
throw new TypeError("Share requires shared storage");
|
|
882
|
+
return structuredClone(value2, {
|
|
883
|
+
transfer: ownership === "transfer" ? transfer : []
|
|
884
|
+
});
|
|
885
|
+
}
|
|
725
886
|
function taskContext(state, context = {}) {
|
|
726
887
|
const signal = context.signal ?? new AbortController().signal;
|
|
727
888
|
return {
|
|
728
889
|
state,
|
|
729
890
|
signal,
|
|
891
|
+
requestHost: async (operation2, payload, controls) => {
|
|
892
|
+
signal.throwIfAborted();
|
|
893
|
+
if (!context.requestHost)
|
|
894
|
+
throw new Error("No host request handler configured");
|
|
895
|
+
return context.requestHost(operation2, payload, controls);
|
|
896
|
+
},
|
|
897
|
+
emitHost: (operation2, payload) => {
|
|
898
|
+
signal.throwIfAborted();
|
|
899
|
+
context.emitHost?.(operation2, payload);
|
|
900
|
+
},
|
|
730
901
|
throwIfAborted: () => {
|
|
731
902
|
signal.throwIfAborted();
|
|
732
903
|
context.throwIfAborted?.();
|
|
@@ -745,6 +916,69 @@
|
|
|
745
916
|
throw new Error("A task is already installed in this worker");
|
|
746
917
|
installed = true;
|
|
747
918
|
const runtime = new TaskRuntime(task);
|
|
919
|
+
let channelStream;
|
|
920
|
+
const channel = new TaskChannel({
|
|
921
|
+
getResultTransferList: (value2, request) => request.outputOwnership === "transfer" ? getTransferList(value2) : [],
|
|
922
|
+
send: (message, transfer) => {
|
|
923
|
+
const snapshot = structuredClone(message, { transfer });
|
|
924
|
+
void WorkerBody.postMessage("task-channel", snapshot).catch((reason) => channel.fail(reason));
|
|
925
|
+
},
|
|
926
|
+
handleRequest: async (operation2, value2, signal) => {
|
|
927
|
+
const request = value2;
|
|
928
|
+
const context = {
|
|
929
|
+
signal,
|
|
930
|
+
reportProgress: (progress) => channel.emit("task:progress", { id: request.progressId, progress }),
|
|
931
|
+
requestHost: (operation3, payload, controls = {}) => {
|
|
932
|
+
const request2 = {
|
|
933
|
+
operation: operation3,
|
|
934
|
+
payload: clonePayload(payload, controls.inputOwnership),
|
|
935
|
+
outputOwnership: controls.outputOwnership ?? "copy"
|
|
936
|
+
};
|
|
937
|
+
return channel.request("task:host-request", request2, signal, getTransferList(request2));
|
|
938
|
+
},
|
|
939
|
+
emitHost: (operation3, payload) => channel.emit("task:host-event", { operation: operation3, payload, id: request.progressId })
|
|
940
|
+
};
|
|
941
|
+
switch (operation2) {
|
|
942
|
+
case "initialize":
|
|
943
|
+
return runtime.initialize(request.input, context);
|
|
944
|
+
case "process":
|
|
945
|
+
return runtime.process(request.input, request.options, context);
|
|
946
|
+
case "stream-open": {
|
|
947
|
+
if (channelStream)
|
|
948
|
+
throw new Error("A task stream is already open");
|
|
949
|
+
async function* inputs() {
|
|
950
|
+
while (true) {
|
|
951
|
+
const result = await channel.request("task:next-input", { outputOwnership: "transfer" }, signal);
|
|
952
|
+
if (result.done)
|
|
953
|
+
return;
|
|
954
|
+
yield result.value;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
channelStream = runtime.stream(inputs(), request.options, context)[Symbol.asyncIterator]();
|
|
958
|
+
return {};
|
|
959
|
+
}
|
|
960
|
+
case "stream-next":
|
|
961
|
+
if (!channelStream)
|
|
962
|
+
throw new Error("No active task stream");
|
|
963
|
+
return channelStream.next();
|
|
964
|
+
case "stream-close":
|
|
965
|
+
try {
|
|
966
|
+
await channelStream?.return?.();
|
|
967
|
+
} finally {
|
|
968
|
+
channelStream = void 0;
|
|
969
|
+
}
|
|
970
|
+
return {};
|
|
971
|
+
case "destroy":
|
|
972
|
+
return runtime.destroy();
|
|
973
|
+
default:
|
|
974
|
+
throw new Error("Unknown task channel operation");
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
await WorkerBody.addEventListener((type, payload) => {
|
|
979
|
+
if (type === "task-channel")
|
|
980
|
+
channel.receive(payload);
|
|
981
|
+
});
|
|
748
982
|
let streamOptions = {};
|
|
749
983
|
return createWorker(async (request, _options, context) => {
|
|
750
984
|
switch (request.operation) {
|
|
@@ -776,9 +1010,10 @@
|
|
|
776
1010
|
}
|
|
777
1011
|
var TaskRuntime, installed;
|
|
778
1012
|
var init_task_runtime = __esm({
|
|
779
|
-
"../../node_modules/@math.gl/
|
|
1013
|
+
"../../node_modules/@math.gl/tasks/dist/tasks/task-runtime.js"() {
|
|
780
1014
|
init_worker_utils();
|
|
781
1015
|
init_task_preload();
|
|
1016
|
+
init_task_channel();
|
|
782
1017
|
TaskRuntime = class {
|
|
783
1018
|
constructor(task) {
|
|
784
1019
|
this.task = task;
|
|
@@ -829,13 +1064,20 @@
|
|
|
829
1064
|
}
|
|
830
1065
|
});
|
|
831
1066
|
|
|
832
|
-
// ../../node_modules/@math.gl/
|
|
1067
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/index.js
|
|
833
1068
|
var init_tasks = __esm({
|
|
834
|
-
"../../node_modules/@math.gl/
|
|
1069
|
+
"../../node_modules/@math.gl/tasks/dist/tasks/index.js"() {
|
|
835
1070
|
init_task_runtime();
|
|
836
1071
|
}
|
|
837
1072
|
});
|
|
838
1073
|
|
|
1074
|
+
// ../../node_modules/@math.gl/tasks/dist/index.js
|
|
1075
|
+
var init_dist = __esm({
|
|
1076
|
+
"../../node_modules/@math.gl/tasks/dist/index.js"() {
|
|
1077
|
+
init_tasks();
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1080
|
+
|
|
839
1081
|
// ../core/src/worker-utils/lib/node/worker_threads-browser.ts
|
|
840
1082
|
var worker_threads_browser_exports = {};
|
|
841
1083
|
__export(worker_threads_browser_exports, {
|
|
@@ -880,7 +1122,7 @@
|
|
|
880
1122
|
var init_task_runtime2 = __esm({
|
|
881
1123
|
"../core/src/worker-utils/lib/worker-api/task-runtime.ts"() {
|
|
882
1124
|
"use strict";
|
|
883
|
-
|
|
1125
|
+
init_dist();
|
|
884
1126
|
initializeTaskWorker2 = initializeTaskWorker;
|
|
885
1127
|
}
|
|
886
1128
|
});
|
|
@@ -4004,6 +4246,35 @@
|
|
|
4004
4246
|
out[15] = 1;
|
|
4005
4247
|
return out;
|
|
4006
4248
|
}
|
|
4249
|
+
function affineComponents(matrix) {
|
|
4250
|
+
if (matrix.length !== 16 || Array.from(matrix).some((x) => !Number.isFinite(x)) || matrix[3] !== 0 || matrix[7] !== 0 || matrix[11] !== 0 || matrix[15] !== 1) {
|
|
4251
|
+
throw new RangeError("Expected a finite affine matrix");
|
|
4252
|
+
}
|
|
4253
|
+
const scale6 = [
|
|
4254
|
+
Math.hypot(matrix[0], matrix[1], matrix[2]),
|
|
4255
|
+
Math.hypot(matrix[4], matrix[5], matrix[6]),
|
|
4256
|
+
Math.hypot(matrix[8], matrix[9], matrix[10])
|
|
4257
|
+
];
|
|
4258
|
+
if (scale6.some((x) => x === 0 || !Number.isFinite(x)))
|
|
4259
|
+
throw new RangeError("Singular transform");
|
|
4260
|
+
const rotation2 = Array.from({ length: 9 }, (_, i) => matrix[Math.floor(i / 3) * 4 + i % 3] / scale6[Math.floor(i / 3)]);
|
|
4261
|
+
for (const [a, b] of [
|
|
4262
|
+
[0, 3],
|
|
4263
|
+
[0, 6],
|
|
4264
|
+
[3, 6]
|
|
4265
|
+
]) {
|
|
4266
|
+
if (Math.abs(rotation2[a] * rotation2[b] + rotation2[a + 1] * rotation2[b + 1] + rotation2[a + 2] * rotation2[b + 2]) > 1e-7) {
|
|
4267
|
+
throw new RangeError("Sheared transforms do not have a TRS decomposition");
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
const determinant3 = rotation2[0] * (rotation2[4] * rotation2[8] - rotation2[5] * rotation2[7]) - rotation2[3] * (rotation2[1] * rotation2[8] - rotation2[2] * rotation2[7]) + rotation2[6] * (rotation2[1] * rotation2[5] - rotation2[2] * rotation2[4]);
|
|
4271
|
+
if (determinant3 < 0) {
|
|
4272
|
+
scale6[0] = -scale6[0];
|
|
4273
|
+
for (let i = 0; i < 3; i++)
|
|
4274
|
+
rotation2[i] = -rotation2[i];
|
|
4275
|
+
}
|
|
4276
|
+
return { rotation: rotation2, scale: scale6, translation: [matrix[12], matrix[13], matrix[14]] };
|
|
4277
|
+
}
|
|
4007
4278
|
var perspective, ortho;
|
|
4008
4279
|
var init_mat4 = __esm({
|
|
4009
4280
|
"../../node_modules/@math.gl/core/dist/gl-matrix/mat4.js"() {
|
|
@@ -4137,6 +4408,7 @@
|
|
|
4137
4408
|
var init_matrix4 = __esm({
|
|
4138
4409
|
"../../node_modules/@math.gl/core/dist/classes/matrix4.js"() {
|
|
4139
4410
|
init_matrix();
|
|
4411
|
+
init_mat4();
|
|
4140
4412
|
init_validators();
|
|
4141
4413
|
init_gl_matrix_extras();
|
|
4142
4414
|
init_mat4();
|
|
@@ -4421,27 +4693,15 @@
|
|
|
4421
4693
|
* @returns self
|
|
4422
4694
|
*/
|
|
4423
4695
|
getRotation(result, scaleResult) {
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
result[3] = 0;
|
|
4434
|
-
result[4] = this[4] * inverseScale0;
|
|
4435
|
-
result[5] = this[5] * inverseScale1;
|
|
4436
|
-
result[6] = this[6] * inverseScale2;
|
|
4437
|
-
result[7] = 0;
|
|
4438
|
-
result[8] = this[8] * inverseScale0;
|
|
4439
|
-
result[9] = this[9] * inverseScale1;
|
|
4440
|
-
result[10] = this[10] * inverseScale2;
|
|
4441
|
-
result[11] = 0;
|
|
4442
|
-
result[12] = 0;
|
|
4443
|
-
result[13] = 0;
|
|
4444
|
-
result[14] = 0;
|
|
4696
|
+
const { rotation: rotation2, scale: scale6 } = affineComponents(this);
|
|
4697
|
+
result = result || new Array(16);
|
|
4698
|
+
if (scaleResult)
|
|
4699
|
+
for (let i = 0; i < 3; i++)
|
|
4700
|
+
scaleResult[i] = scale6[i];
|
|
4701
|
+
for (let i = 0; i < 16; i++)
|
|
4702
|
+
result[i] = 0;
|
|
4703
|
+
for (let i = 0; i < 9; i++)
|
|
4704
|
+
result[Math.floor(i / 3) * 4 + i % 3] = rotation2[i];
|
|
4445
4705
|
result[15] = 1;
|
|
4446
4706
|
return result;
|
|
4447
4707
|
}
|
|
@@ -4452,21 +4712,13 @@
|
|
|
4452
4712
|
* @returns self
|
|
4453
4713
|
*/
|
|
4454
4714
|
getRotationMatrix3(result, scaleResult) {
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
result[1] = this[1] * inverseScale1;
|
|
4463
|
-
result[2] = this[2] * inverseScale2;
|
|
4464
|
-
result[3] = this[4] * inverseScale0;
|
|
4465
|
-
result[4] = this[5] * inverseScale1;
|
|
4466
|
-
result[5] = this[6] * inverseScale2;
|
|
4467
|
-
result[6] = this[8] * inverseScale0;
|
|
4468
|
-
result[7] = this[9] * inverseScale1;
|
|
4469
|
-
result[8] = this[10] * inverseScale2;
|
|
4715
|
+
const { rotation: rotation2, scale: scale6 } = affineComponents(this);
|
|
4716
|
+
result = result || new Array(9);
|
|
4717
|
+
if (scaleResult)
|
|
4718
|
+
for (let i = 0; i < 3; i++)
|
|
4719
|
+
scaleResult[i] = scale6[i];
|
|
4720
|
+
for (let i = 0; i < 9; i++)
|
|
4721
|
+
result[i] = rotation2[i];
|
|
4470
4722
|
return result;
|
|
4471
4723
|
}
|
|
4472
4724
|
// Modifiers
|
|
@@ -4779,6 +5031,28 @@
|
|
|
4779
5031
|
}
|
|
4780
5032
|
return out;
|
|
4781
5033
|
}
|
|
5034
|
+
function rotateTowards(out, a, b, step) {
|
|
5035
|
+
if (a.length !== 4 || b.length !== 4 || [...Array.from(a), ...Array.from(b), step].some((x) => !Number.isFinite(x))) {
|
|
5036
|
+
throw new RangeError("Expected finite quaternions and step");
|
|
5037
|
+
}
|
|
5038
|
+
if (a.length !== 4 || step < 0)
|
|
5039
|
+
throw new RangeError("Expected quaternions and a nonnegative step");
|
|
5040
|
+
const aScale = Math.max(...Array.from(a, Math.abs)), bScale = Math.max(...Array.from(b, Math.abs));
|
|
5041
|
+
if (!aScale || !bScale)
|
|
5042
|
+
throw new RangeError("Zero quaternion");
|
|
5043
|
+
const an = Array.from(a, (x) => x / aScale), bn = Array.from(b, (x) => x / bScale);
|
|
5044
|
+
const al = Math.hypot(...an), bl = Math.hypot(...bn);
|
|
5045
|
+
for (let i = 0; i < 4; i++) {
|
|
5046
|
+
an[i] /= al;
|
|
5047
|
+
bn[i] /= bl;
|
|
5048
|
+
}
|
|
5049
|
+
const dot5 = an.reduce((sum, x, i) => sum + x * bn[i], 0);
|
|
5050
|
+
const angle2 = 2 * Math.acos(Math.min(1, Math.abs(dot5)));
|
|
5051
|
+
if (out.length < 4)
|
|
5052
|
+
throw new RangeError("Result buffer is too short");
|
|
5053
|
+
slerp(out, an, bn, angle2 === 0 ? 0 : Math.min(1, step / angle2));
|
|
5054
|
+
return out;
|
|
5055
|
+
}
|
|
4782
5056
|
var add2, scale4, dot3, lerp2, length3, squaredLength2, normalize3, rotationTo;
|
|
4783
5057
|
var init_quat = __esm({
|
|
4784
5058
|
"../../node_modules/@math.gl/core/dist/gl-matrix/quat.js"() {
|
|
@@ -4827,6 +5101,7 @@
|
|
|
4827
5101
|
var Quaternion;
|
|
4828
5102
|
var init_quaternion = __esm({
|
|
4829
5103
|
"../../node_modules/@math.gl/core/dist/classes/quaternion.js"() {
|
|
5104
|
+
init_quat();
|
|
4830
5105
|
init_math_array();
|
|
4831
5106
|
init_validators();
|
|
4832
5107
|
init_quat();
|
|
@@ -4900,6 +5175,9 @@
|
|
|
4900
5175
|
return this.check();
|
|
4901
5176
|
}
|
|
4902
5177
|
/** Set a quat to the identity quaternion */
|
|
5178
|
+
rotateTowards(target, step) {
|
|
5179
|
+
return rotateTowards(this, this, target, step);
|
|
5180
|
+
}
|
|
4903
5181
|
identity() {
|
|
4904
5182
|
identity2(this);
|
|
4905
5183
|
return this.check();
|
|
@@ -5376,7 +5654,7 @@
|
|
|
5376
5654
|
});
|
|
5377
5655
|
|
|
5378
5656
|
// ../../node_modules/@math.gl/core/dist/index.js
|
|
5379
|
-
var
|
|
5657
|
+
var init_dist2 = __esm({
|
|
5380
5658
|
"../../node_modules/@math.gl/core/dist/index.js"() {
|
|
5381
5659
|
init_vector3();
|
|
5382
5660
|
init_matrix3();
|
|
@@ -5468,7 +5746,7 @@
|
|
|
5468
5746
|
var scratchVector;
|
|
5469
5747
|
var init_type_utils = __esm({
|
|
5470
5748
|
"../../node_modules/@math.gl/geospatial/dist/type-utils.js"() {
|
|
5471
|
-
|
|
5749
|
+
init_dist2();
|
|
5472
5750
|
scratchVector = new Vector3();
|
|
5473
5751
|
}
|
|
5474
5752
|
});
|
|
@@ -5706,7 +5984,7 @@
|
|
|
5706
5984
|
var surface;
|
|
5707
5985
|
var init_scale_to_geodetic_surface = __esm({
|
|
5708
5986
|
"../../node_modules/@math.gl/geospatial/dist/ellipsoid-helpers/scale-to-geodetic-surface.js"() {
|
|
5709
|
-
|
|
5987
|
+
init_dist2();
|
|
5710
5988
|
init_nearest_surface();
|
|
5711
5989
|
surface = { x: 0, y: 0, z: 0 };
|
|
5712
5990
|
}
|
|
@@ -5728,8 +6006,8 @@
|
|
|
5728
6006
|
var spheroidScratch, scratchVector2, scratchNormal, scratchPosition, scratchCartesian, Ellipsoid;
|
|
5729
6007
|
var init_ellipsoid = __esm({
|
|
5730
6008
|
"../../node_modules/@math.gl/geospatial/dist/ellipsoid.js"() {
|
|
5731
|
-
|
|
5732
|
-
|
|
6009
|
+
init_dist2();
|
|
6010
|
+
init_dist2();
|
|
5733
6011
|
init_constants();
|
|
5734
6012
|
init_type_utils();
|
|
5735
6013
|
init_scale_to_geodetic_surface();
|
|
@@ -7433,8 +7711,8 @@
|
|
|
7433
7711
|
var EPSILON142, scratchOrigin, scratchBasis, VECTOR_PRODUCT_LOCAL_FRAME, degeneratePositionLocalFrame, scratchAxisVectors, scratchVector1, scratchVector22, scratchVector3;
|
|
7434
7712
|
var init_ellipsoid_transform = __esm({
|
|
7435
7713
|
"../../node_modules/@math.gl/geospatial/dist/ellipsoid-helpers/ellipsoid-transform.js"() {
|
|
7436
|
-
|
|
7437
|
-
|
|
7714
|
+
init_dist2();
|
|
7715
|
+
init_dist2();
|
|
7438
7716
|
EPSILON142 = 1e-14;
|
|
7439
7717
|
scratchOrigin = new Vector3();
|
|
7440
7718
|
scratchBasis = createLocalFrameBasis();
|
|
@@ -7504,7 +7782,7 @@
|
|
|
7504
7782
|
}
|
|
7505
7783
|
var init_ellipsoid_transforms = __esm({
|
|
7506
7784
|
"../../node_modules/@math.gl/geospatial/dist/ellipsoid-transforms.js"() {
|
|
7507
|
-
|
|
7785
|
+
init_dist2();
|
|
7508
7786
|
init_ellipsoid_transform();
|
|
7509
7787
|
}
|
|
7510
7788
|
});
|
|
@@ -7558,7 +7836,7 @@
|
|
|
7558
7836
|
});
|
|
7559
7837
|
|
|
7560
7838
|
// ../../node_modules/@math.gl/geometry/dist/index.js
|
|
7561
|
-
var
|
|
7839
|
+
var init_dist3 = __esm({
|
|
7562
7840
|
"../../node_modules/@math.gl/geometry/dist/index.js"() {
|
|
7563
7841
|
init_utils();
|
|
7564
7842
|
}
|
|
@@ -9267,7 +9545,7 @@
|
|
|
9267
9545
|
});
|
|
9268
9546
|
|
|
9269
9547
|
// ../../node_modules/@math.gl/geospatial/dist/index.js
|
|
9270
|
-
var
|
|
9548
|
+
var init_dist4 = __esm({
|
|
9271
9549
|
"../../node_modules/@math.gl/geospatial/dist/index.js"() {
|
|
9272
9550
|
init_ellipsoid2();
|
|
9273
9551
|
init_globe();
|
|
@@ -9497,7 +9775,7 @@
|
|
|
9497
9775
|
var init_version2 = __esm({
|
|
9498
9776
|
"../images/src/lib/utils/version.ts"() {
|
|
9499
9777
|
"use strict";
|
|
9500
|
-
VERSION2 = true ? "5.0.0-beta.
|
|
9778
|
+
VERSION2 = true ? "5.0.0-beta.5" : "latest";
|
|
9501
9779
|
}
|
|
9502
9780
|
});
|
|
9503
9781
|
|
|
@@ -26423,6 +26701,305 @@ return true;`);
|
|
|
26423
26701
|
}
|
|
26424
26702
|
});
|
|
26425
26703
|
|
|
26704
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js
|
|
26705
|
+
function getArrowVariadicBuffers(data) {
|
|
26706
|
+
return data.variadicBuffers ?? [];
|
|
26707
|
+
}
|
|
26708
|
+
function createArrowData(type, offset2, length4, nullCount, buffers, children2, dictionary, variadicBuffers) {
|
|
26709
|
+
return Reflect.construct(Data, [
|
|
26710
|
+
type,
|
|
26711
|
+
offset2,
|
|
26712
|
+
length4,
|
|
26713
|
+
nullCount,
|
|
26714
|
+
buffers,
|
|
26715
|
+
children2,
|
|
26716
|
+
dictionary,
|
|
26717
|
+
variadicBuffers
|
|
26718
|
+
]);
|
|
26719
|
+
}
|
|
26720
|
+
var init_arrow_data = __esm({
|
|
26721
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js"() {
|
|
26722
|
+
init_Arrow_dom();
|
|
26723
|
+
}
|
|
26724
|
+
});
|
|
26725
|
+
|
|
26726
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js
|
|
26727
|
+
function splitArrowBuffers(input, options = {}) {
|
|
26728
|
+
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
26729
|
+
if (isArrowTable2(input)) {
|
|
26730
|
+
return splitArrowTableBuffersInternal(input, context);
|
|
26731
|
+
}
|
|
26732
|
+
if (isArrowRecordBatch2(input)) {
|
|
26733
|
+
return splitArrowRecordBatchBuffers(input, context);
|
|
26734
|
+
}
|
|
26735
|
+
if (isArrowVector2(input)) {
|
|
26736
|
+
return splitArrowVectorBuffers(input, context);
|
|
26737
|
+
}
|
|
26738
|
+
return splitArrowDataBuffers(input, context);
|
|
26739
|
+
}
|
|
26740
|
+
function isArrowTable2(input) {
|
|
26741
|
+
return "batches" in input;
|
|
26742
|
+
}
|
|
26743
|
+
function isArrowRecordBatch2(input) {
|
|
26744
|
+
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
26745
|
+
}
|
|
26746
|
+
function isArrowVector2(input) {
|
|
26747
|
+
return "data" in input && Array.isArray(input.data);
|
|
26748
|
+
}
|
|
26749
|
+
function splitArrowTableBuffersInternal(arrowTable, options) {
|
|
26750
|
+
const recordBatches = arrowTable.batches.map((recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options));
|
|
26751
|
+
return new Table(arrowTable.schema, recordBatches);
|
|
26752
|
+
}
|
|
26753
|
+
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
26754
|
+
return new RecordBatch3(recordBatch.schema, splitArrowDataBuffers(recordBatch.data, options));
|
|
26755
|
+
}
|
|
26756
|
+
function splitArrowDataBuffers(data, options) {
|
|
26757
|
+
const children2 = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
26758
|
+
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
26759
|
+
const buffers = {
|
|
26760
|
+
[BufferType.OFFSET]: splitArrowBuffer(data.buffers[BufferType.OFFSET], options),
|
|
26761
|
+
[BufferType.DATA]: splitArrowBuffer(data.buffers[BufferType.DATA], options),
|
|
26762
|
+
[BufferType.VALIDITY]: splitArrowBuffer(data.buffers[BufferType.VALIDITY], options),
|
|
26763
|
+
[BufferType.TYPE]: splitArrowBuffer(data.buffers[BufferType.TYPE], options)
|
|
26764
|
+
};
|
|
26765
|
+
return createArrowData(
|
|
26766
|
+
data.type,
|
|
26767
|
+
data.offset,
|
|
26768
|
+
data.length,
|
|
26769
|
+
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
26770
|
+
data._nullCount,
|
|
26771
|
+
buffers,
|
|
26772
|
+
children2,
|
|
26773
|
+
dictionary,
|
|
26774
|
+
getArrowVariadicBuffers(data).map((buffer) => splitArrowBuffer(buffer, options))
|
|
26775
|
+
);
|
|
26776
|
+
}
|
|
26777
|
+
function splitArrowVectorBuffers(vector, options) {
|
|
26778
|
+
return new Vector2(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
26779
|
+
}
|
|
26780
|
+
function splitArrowBuffer(array2, options) {
|
|
26781
|
+
if (!isArrowTypedArray(array2)) {
|
|
26782
|
+
return array2;
|
|
26783
|
+
}
|
|
26784
|
+
if (options.copy === "none") {
|
|
26785
|
+
return array2;
|
|
26786
|
+
}
|
|
26787
|
+
if (options.copy !== "all" && array2.byteOffset === 0 && array2.byteLength === array2.buffer.byteLength) {
|
|
26788
|
+
return array2;
|
|
26789
|
+
}
|
|
26790
|
+
let copy2 = options.copies.get(array2);
|
|
26791
|
+
if (!copy2) {
|
|
26792
|
+
copy2 = array2 instanceof Uint8Array ? new Uint8Array(array2) : array2.slice();
|
|
26793
|
+
options.copies.set(array2, copy2);
|
|
26794
|
+
}
|
|
26795
|
+
return copy2;
|
|
26796
|
+
}
|
|
26797
|
+
function isArrowTypedArray(value2) {
|
|
26798
|
+
return ArrayBuffer.isView(value2) && !(value2 instanceof DataView);
|
|
26799
|
+
}
|
|
26800
|
+
var init_split_arrow_buffers = __esm({
|
|
26801
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js"() {
|
|
26802
|
+
init_Arrow_dom();
|
|
26803
|
+
init_arrow_data();
|
|
26804
|
+
}
|
|
26805
|
+
});
|
|
26806
|
+
|
|
26807
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js
|
|
26808
|
+
var init_indexed_arrow_vector = __esm({
|
|
26809
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js"() {
|
|
26810
|
+
}
|
|
26811
|
+
});
|
|
26812
|
+
|
|
26813
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js
|
|
26814
|
+
var init_indexed_arrow_table = __esm({
|
|
26815
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js"() {
|
|
26816
|
+
}
|
|
26817
|
+
});
|
|
26818
|
+
|
|
26819
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js
|
|
26820
|
+
var init_mapped_arrow_table = __esm({
|
|
26821
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js"() {
|
|
26822
|
+
}
|
|
26823
|
+
});
|
|
26824
|
+
|
|
26825
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js
|
|
26826
|
+
var init_rename_arrow_columns = __esm({
|
|
26827
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js"() {
|
|
26828
|
+
}
|
|
26829
|
+
});
|
|
26830
|
+
|
|
26831
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js
|
|
26832
|
+
function dehydrateArrowTable(arrowTable, options) {
|
|
26833
|
+
const splitTable = splitArrowBuffers(arrowTable, options);
|
|
26834
|
+
return {
|
|
26835
|
+
transport: "arrow-js",
|
|
26836
|
+
version: 1,
|
|
26837
|
+
schema: tableToIPC(new Table(splitTable.schema, [])),
|
|
26838
|
+
metadataVersion: splitTable.schema.metadataVersion,
|
|
26839
|
+
batches: splitTable.batches.map((batch) => dehydrateArrowData(batch.data))
|
|
26840
|
+
};
|
|
26841
|
+
}
|
|
26842
|
+
function hydrateArrowTable(table) {
|
|
26843
|
+
if (table.transport !== "arrow-js" || table.version !== 1) {
|
|
26844
|
+
throw new Error("Unsupported Arrow column-buffer transport protocol.");
|
|
26845
|
+
}
|
|
26846
|
+
const decodedSchema = tableFromIPC(table.schema).schema;
|
|
26847
|
+
const schema = new Schema2(decodedSchema.fields, decodedSchema.metadata, decodedSchema.dictionaries, table.metadataVersion);
|
|
26848
|
+
const type = new Struct(schema.fields);
|
|
26849
|
+
const batches = table.batches.map((data) => new RecordBatch3(schema, hydrateArrowData(data, type)));
|
|
26850
|
+
return new Table(schema, batches);
|
|
26851
|
+
}
|
|
26852
|
+
function dehydrateArrowData(data) {
|
|
26853
|
+
return {
|
|
26854
|
+
offset: data.offset,
|
|
26855
|
+
length: data.length,
|
|
26856
|
+
nullCount: data.nullCount,
|
|
26857
|
+
buffers: {
|
|
26858
|
+
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
26859
|
+
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
26860
|
+
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
26861
|
+
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
26862
|
+
},
|
|
26863
|
+
children: data.children.map((child2) => dehydrateArrowData(child2)),
|
|
26864
|
+
variadicBuffers: getArrowVariadicBuffers(data),
|
|
26865
|
+
dictionary: data.dictionary?.data.map((chunk) => dehydrateArrowData(chunk))
|
|
26866
|
+
};
|
|
26867
|
+
}
|
|
26868
|
+
function hydrateArrowData(data, type) {
|
|
26869
|
+
const children2 = data.children.map((child2, index) => hydrateArrowData(child2, type.children[index].type));
|
|
26870
|
+
const dictionary = data.dictionary && DataType.isDictionary(type) ? new Vector2(data.dictionary.map((chunk) => hydrateArrowData(chunk, type.dictionary))) : void 0;
|
|
26871
|
+
return createArrowData(type, data.offset, data.length, data.nullCount, data.buffers, children2, dictionary, data.variadicBuffers);
|
|
26872
|
+
}
|
|
26873
|
+
var init_arrow_table_transport = __esm({
|
|
26874
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js"() {
|
|
26875
|
+
init_Arrow_dom();
|
|
26876
|
+
init_arrow_data();
|
|
26877
|
+
init_split_arrow_buffers();
|
|
26878
|
+
}
|
|
26879
|
+
});
|
|
26880
|
+
|
|
26881
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/index.js
|
|
26882
|
+
var init_arrow = __esm({
|
|
26883
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/index.js"() {
|
|
26884
|
+
init_indexed_arrow_table();
|
|
26885
|
+
init_indexed_arrow_vector();
|
|
26886
|
+
init_mapped_arrow_table();
|
|
26887
|
+
init_rename_arrow_columns();
|
|
26888
|
+
init_split_arrow_buffers();
|
|
26889
|
+
init_arrow_table_transport();
|
|
26890
|
+
}
|
|
26891
|
+
});
|
|
26892
|
+
|
|
26893
|
+
// ../../node_modules/@math.gl/arrow/dist/index.js
|
|
26894
|
+
var init_dist5 = __esm({
|
|
26895
|
+
"../../node_modules/@math.gl/arrow/dist/index.js"() {
|
|
26896
|
+
init_arrow();
|
|
26897
|
+
}
|
|
26898
|
+
});
|
|
26899
|
+
|
|
26900
|
+
// ../core/src/arrow-worker-transport.ts
|
|
26901
|
+
function serializeArrowWorkerResult(result, options) {
|
|
26902
|
+
if (!isArrowTableWrapper(result)) {
|
|
26903
|
+
return result;
|
|
26904
|
+
}
|
|
26905
|
+
const workerOptions = options;
|
|
26906
|
+
const bufferCopyMode = workerOptions?.core?.workerTransferBufferCopy ?? workerOptions?.workerTransferBufferCopy;
|
|
26907
|
+
return {
|
|
26908
|
+
...result,
|
|
26909
|
+
data: dehydrateArrowTable(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
|
|
26910
|
+
};
|
|
26911
|
+
}
|
|
26912
|
+
function deserializeArrowWorkerResult(result) {
|
|
26913
|
+
if (!isDehydratedArrowTableWrapper(result)) {
|
|
26914
|
+
return result;
|
|
26915
|
+
}
|
|
26916
|
+
return { ...result, data: hydrateArrowTable(result.data) };
|
|
26917
|
+
}
|
|
26918
|
+
function isArrowTableWrapper(value2) {
|
|
26919
|
+
const table = value2;
|
|
26920
|
+
return Boolean(
|
|
26921
|
+
table && table.shape === "arrow-table" && table.data && typeof table.data === "object" && "batches" in table.data
|
|
26922
|
+
);
|
|
26923
|
+
}
|
|
26924
|
+
function isDehydratedArrowTableWrapper(value2) {
|
|
26925
|
+
const table = value2;
|
|
26926
|
+
return Boolean(
|
|
26927
|
+
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
26928
|
+
);
|
|
26929
|
+
}
|
|
26930
|
+
var init_arrow_worker_transport = __esm({
|
|
26931
|
+
"../core/src/arrow-worker-transport.ts"() {
|
|
26932
|
+
"use strict";
|
|
26933
|
+
init_dist5();
|
|
26934
|
+
}
|
|
26935
|
+
});
|
|
26936
|
+
|
|
26937
|
+
// ../core/src/schema-utils/lib/schema/data-type.ts
|
|
26938
|
+
function getDataTypeFromValue(value2, defaultNumberType = "float32") {
|
|
26939
|
+
if (value2 instanceof Date) {
|
|
26940
|
+
return "date-millisecond";
|
|
26941
|
+
}
|
|
26942
|
+
if (typeof value2 === "number") {
|
|
26943
|
+
return defaultNumberType;
|
|
26944
|
+
}
|
|
26945
|
+
if (typeof value2 === "boolean") {
|
|
26946
|
+
return "bool";
|
|
26947
|
+
}
|
|
26948
|
+
if (typeof value2 === "string") {
|
|
26949
|
+
return "utf8";
|
|
26950
|
+
}
|
|
26951
|
+
if (value2 === null || value2 === "undefined") {
|
|
26952
|
+
return "null";
|
|
26953
|
+
}
|
|
26954
|
+
return "null";
|
|
26955
|
+
}
|
|
26956
|
+
function getDataTypeFromArray(array2) {
|
|
26957
|
+
let type = getDataTypeFromTypedArray(array2);
|
|
26958
|
+
if (type !== "null") {
|
|
26959
|
+
return { type, nullable: false };
|
|
26960
|
+
}
|
|
26961
|
+
if (array2.length > 0) {
|
|
26962
|
+
type = getDataTypeFromValue(array2[0]);
|
|
26963
|
+
return { type, nullable: true };
|
|
26964
|
+
}
|
|
26965
|
+
return { type: "null", nullable: true };
|
|
26966
|
+
}
|
|
26967
|
+
function getDataTypeFromTypedArray(array2) {
|
|
26968
|
+
if (typeof Float16Array !== "undefined" && array2 instanceof Float16Array) {
|
|
26969
|
+
return "float16";
|
|
26970
|
+
}
|
|
26971
|
+
switch (array2.constructor) {
|
|
26972
|
+
case Int8Array:
|
|
26973
|
+
return "int8";
|
|
26974
|
+
case Uint8Array:
|
|
26975
|
+
case Uint8ClampedArray:
|
|
26976
|
+
return "uint8";
|
|
26977
|
+
case Int16Array:
|
|
26978
|
+
return "int16";
|
|
26979
|
+
case Uint16Array:
|
|
26980
|
+
return "uint16";
|
|
26981
|
+
case Int32Array:
|
|
26982
|
+
return "int32";
|
|
26983
|
+
case Uint32Array:
|
|
26984
|
+
return "uint32";
|
|
26985
|
+
case BigInt64Array:
|
|
26986
|
+
return "int64";
|
|
26987
|
+
case BigUint64Array:
|
|
26988
|
+
return "uint64";
|
|
26989
|
+
case Float32Array:
|
|
26990
|
+
return "float32";
|
|
26991
|
+
case Float64Array:
|
|
26992
|
+
return "float64";
|
|
26993
|
+
default:
|
|
26994
|
+
return "null";
|
|
26995
|
+
}
|
|
26996
|
+
}
|
|
26997
|
+
var init_data_type = __esm({
|
|
26998
|
+
"../core/src/schema-utils/lib/schema/data-type.ts"() {
|
|
26999
|
+
"use strict";
|
|
27000
|
+
}
|
|
27001
|
+
});
|
|
27002
|
+
|
|
26426
27003
|
// ../core/src/schema-utils/lib/schema/convert-arrow-schema.ts
|
|
26427
27004
|
function serializeArrowSchema(arrowSchema) {
|
|
26428
27005
|
return {
|
|
@@ -26430,12 +27007,6 @@ return true;`);
|
|
|
26430
27007
|
metadata: serializeArrowMetadata(arrowSchema.metadata)
|
|
26431
27008
|
};
|
|
26432
27009
|
}
|
|
26433
|
-
function deserializeArrowSchema(schema, options) {
|
|
26434
|
-
return new Schema2(
|
|
26435
|
-
schema.fields.map((field) => deserializeArrowField(field, options)),
|
|
26436
|
-
deserializeArrowMetadata(schema.metadata)
|
|
26437
|
-
);
|
|
26438
|
-
}
|
|
26439
27010
|
function serializeArrowMetadata(arrowMetadata) {
|
|
26440
27011
|
return Object.fromEntries(arrowMetadata);
|
|
26441
27012
|
}
|
|
@@ -26858,260 +27429,6 @@ return true;`);
|
|
|
26858
27429
|
}
|
|
26859
27430
|
});
|
|
26860
27431
|
|
|
26861
|
-
// ../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts
|
|
26862
|
-
function splitArrowBuffers(input, options = {}) {
|
|
26863
|
-
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
26864
|
-
if (isArrowTable2(input)) {
|
|
26865
|
-
return splitArrowTableBuffersInternal(input, context);
|
|
26866
|
-
}
|
|
26867
|
-
if (isArrowRecordBatch2(input)) {
|
|
26868
|
-
return splitArrowRecordBatchBuffers(input, context);
|
|
26869
|
-
}
|
|
26870
|
-
if (isArrowVector2(input)) {
|
|
26871
|
-
return splitArrowVectorBuffers(input, context);
|
|
26872
|
-
}
|
|
26873
|
-
return splitArrowDataBuffers(input, context);
|
|
26874
|
-
}
|
|
26875
|
-
function isArrowTable2(input) {
|
|
26876
|
-
return "batches" in input;
|
|
26877
|
-
}
|
|
26878
|
-
function isArrowRecordBatch2(input) {
|
|
26879
|
-
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
26880
|
-
}
|
|
26881
|
-
function isArrowVector2(input) {
|
|
26882
|
-
return "data" in input && Array.isArray(input.data);
|
|
26883
|
-
}
|
|
26884
|
-
function splitArrowTableBuffersInternal(table, options) {
|
|
26885
|
-
const recordBatches = table.batches.map(
|
|
26886
|
-
(recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
|
|
26887
|
-
);
|
|
26888
|
-
return new Table(table.schema, recordBatches);
|
|
26889
|
-
}
|
|
26890
|
-
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
26891
|
-
return new RecordBatch3(
|
|
26892
|
-
recordBatch.schema,
|
|
26893
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
26894
|
-
);
|
|
26895
|
-
}
|
|
26896
|
-
function splitArrowDataBuffers(data, options) {
|
|
26897
|
-
const children2 = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
26898
|
-
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
26899
|
-
const buffers = {
|
|
26900
|
-
[BufferType.OFFSET]: splitArrowBuffer(data.buffers[BufferType.OFFSET], options),
|
|
26901
|
-
[BufferType.DATA]: splitArrowBuffer(data.buffers[BufferType.DATA], options),
|
|
26902
|
-
[BufferType.VALIDITY]: splitArrowBuffer(data.buffers[BufferType.VALIDITY], options),
|
|
26903
|
-
[BufferType.TYPE]: splitArrowBuffer(data.buffers[BufferType.TYPE], options)
|
|
26904
|
-
};
|
|
26905
|
-
return new Data(
|
|
26906
|
-
data.type,
|
|
26907
|
-
data.offset,
|
|
26908
|
-
data.length,
|
|
26909
|
-
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
26910
|
-
data._nullCount,
|
|
26911
|
-
buffers,
|
|
26912
|
-
children2,
|
|
26913
|
-
dictionary
|
|
26914
|
-
);
|
|
26915
|
-
}
|
|
26916
|
-
function splitArrowVectorBuffers(vector, options) {
|
|
26917
|
-
return new Vector2(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
26918
|
-
}
|
|
26919
|
-
function splitArrowBuffer(array2, options) {
|
|
26920
|
-
if (!isArrowTypedArray(array2)) {
|
|
26921
|
-
return array2;
|
|
26922
|
-
}
|
|
26923
|
-
if (options.copy === "none") {
|
|
26924
|
-
return array2;
|
|
26925
|
-
}
|
|
26926
|
-
if (options.copy !== "all" && array2.byteOffset === 0 && array2.byteLength === array2.buffer.byteLength) {
|
|
26927
|
-
return array2;
|
|
26928
|
-
}
|
|
26929
|
-
let copy2 = options.copies.get(array2);
|
|
26930
|
-
if (!copy2) {
|
|
26931
|
-
copy2 = array2.slice();
|
|
26932
|
-
options.copies.set(array2, copy2);
|
|
26933
|
-
}
|
|
26934
|
-
return copy2;
|
|
26935
|
-
}
|
|
26936
|
-
function isArrowTypedArray(value2) {
|
|
26937
|
-
return ArrayBuffer.isView(value2) && !(value2 instanceof DataView);
|
|
26938
|
-
}
|
|
26939
|
-
var init_split_arrow_buffers = __esm({
|
|
26940
|
-
"../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts"() {
|
|
26941
|
-
"use strict";
|
|
26942
|
-
init_Arrow_dom();
|
|
26943
|
-
}
|
|
26944
|
-
});
|
|
26945
|
-
|
|
26946
|
-
// ../core/src/schema-utils/lib/arrow/arrow-table-transport.ts
|
|
26947
|
-
function dehydrateArrowTable(table, options) {
|
|
26948
|
-
const splitTable = splitArrowBuffers(table, options);
|
|
26949
|
-
return {
|
|
26950
|
-
shape: "arrow-table",
|
|
26951
|
-
transport: "arrow-js",
|
|
26952
|
-
schema: serializeArrowSchema(splitTable.schema),
|
|
26953
|
-
batches: splitTable.batches.map((recordBatch) => dehydrateArrowRecordBatch(recordBatch))
|
|
26954
|
-
};
|
|
26955
|
-
}
|
|
26956
|
-
function hydrateArrowTable(table) {
|
|
26957
|
-
const schema = deserializeArrowSchema(table.schema);
|
|
26958
|
-
const recordBatches = table.batches.map(
|
|
26959
|
-
(recordBatch) => new RecordBatch3(schema, hydrateArrowData(recordBatch.data))
|
|
26960
|
-
);
|
|
26961
|
-
return new Table(schema, recordBatches);
|
|
26962
|
-
}
|
|
26963
|
-
function serializeArrowWorkerResult(result, options) {
|
|
26964
|
-
if (!isArrowTableWrapper(result)) {
|
|
26965
|
-
return result;
|
|
26966
|
-
}
|
|
26967
|
-
const workerOptions = options;
|
|
26968
|
-
const bufferCopyMode = workerOptions?.core?.workerTransferBufferCopy ?? workerOptions?.workerTransferBufferCopy;
|
|
26969
|
-
return {
|
|
26970
|
-
...result,
|
|
26971
|
-
data: dehydrateArrowTable(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
|
|
26972
|
-
};
|
|
26973
|
-
}
|
|
26974
|
-
function deserializeArrowWorkerResult(result) {
|
|
26975
|
-
if (!isDehydratedArrowTableWrapper(result)) {
|
|
26976
|
-
return result;
|
|
26977
|
-
}
|
|
26978
|
-
return { ...result, data: hydrateArrowTable(result.data) };
|
|
26979
|
-
}
|
|
26980
|
-
function isArrowTableWrapper(value2) {
|
|
26981
|
-
const table = value2;
|
|
26982
|
-
return Boolean(
|
|
26983
|
-
table && table.shape === "arrow-table" && table.data && typeof table.data === "object" && "batches" in table.data
|
|
26984
|
-
);
|
|
26985
|
-
}
|
|
26986
|
-
function isDehydratedArrowTableWrapper(value2) {
|
|
26987
|
-
const table = value2;
|
|
26988
|
-
return Boolean(
|
|
26989
|
-
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
26990
|
-
);
|
|
26991
|
-
}
|
|
26992
|
-
function dehydrateArrowRecordBatch(recordBatch) {
|
|
26993
|
-
return { data: dehydrateArrowData(recordBatch.data) };
|
|
26994
|
-
}
|
|
26995
|
-
function dehydrateArrowData(data) {
|
|
26996
|
-
return {
|
|
26997
|
-
type: serializeArrowType(data.type),
|
|
26998
|
-
offset: data.offset,
|
|
26999
|
-
length: data.length,
|
|
27000
|
-
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
27001
|
-
nullCount: data._nullCount,
|
|
27002
|
-
buffers: {
|
|
27003
|
-
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
27004
|
-
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
27005
|
-
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
27006
|
-
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
27007
|
-
},
|
|
27008
|
-
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
27009
|
-
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
27010
|
-
};
|
|
27011
|
-
}
|
|
27012
|
-
function dehydrateArrowVector(vector) {
|
|
27013
|
-
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
27014
|
-
}
|
|
27015
|
-
function hydrateArrowData(data) {
|
|
27016
|
-
const children2 = data.children.map((childData) => hydrateArrowData(childData));
|
|
27017
|
-
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
27018
|
-
return new Data(
|
|
27019
|
-
deserializeArrowType(data.type),
|
|
27020
|
-
data.offset,
|
|
27021
|
-
data.length,
|
|
27022
|
-
data.nullCount,
|
|
27023
|
-
data.buffers,
|
|
27024
|
-
children2,
|
|
27025
|
-
dictionary
|
|
27026
|
-
);
|
|
27027
|
-
}
|
|
27028
|
-
function hydrateArrowVector(vector) {
|
|
27029
|
-
return new Vector2(vector.data.map((data) => hydrateArrowData(data)));
|
|
27030
|
-
}
|
|
27031
|
-
var init_arrow_table_transport = __esm({
|
|
27032
|
-
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
27033
|
-
"use strict";
|
|
27034
|
-
init_Arrow_dom();
|
|
27035
|
-
init_convert_arrow_schema();
|
|
27036
|
-
init_split_arrow_buffers();
|
|
27037
|
-
}
|
|
27038
|
-
});
|
|
27039
|
-
|
|
27040
|
-
// ../core/src/schema-utils/arrow-transport.ts
|
|
27041
|
-
var init_arrow_transport = __esm({
|
|
27042
|
-
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
27043
|
-
"use strict";
|
|
27044
|
-
init_arrow_table_transport();
|
|
27045
|
-
init_split_arrow_buffers();
|
|
27046
|
-
}
|
|
27047
|
-
});
|
|
27048
|
-
|
|
27049
|
-
// ../core/src/schema-utils/lib/schema/data-type.ts
|
|
27050
|
-
function getDataTypeFromValue(value2, defaultNumberType = "float32") {
|
|
27051
|
-
if (value2 instanceof Date) {
|
|
27052
|
-
return "date-millisecond";
|
|
27053
|
-
}
|
|
27054
|
-
if (typeof value2 === "number") {
|
|
27055
|
-
return defaultNumberType;
|
|
27056
|
-
}
|
|
27057
|
-
if (typeof value2 === "boolean") {
|
|
27058
|
-
return "bool";
|
|
27059
|
-
}
|
|
27060
|
-
if (typeof value2 === "string") {
|
|
27061
|
-
return "utf8";
|
|
27062
|
-
}
|
|
27063
|
-
if (value2 === null || value2 === "undefined") {
|
|
27064
|
-
return "null";
|
|
27065
|
-
}
|
|
27066
|
-
return "null";
|
|
27067
|
-
}
|
|
27068
|
-
function getDataTypeFromArray(array2) {
|
|
27069
|
-
let type = getDataTypeFromTypedArray(array2);
|
|
27070
|
-
if (type !== "null") {
|
|
27071
|
-
return { type, nullable: false };
|
|
27072
|
-
}
|
|
27073
|
-
if (array2.length > 0) {
|
|
27074
|
-
type = getDataTypeFromValue(array2[0]);
|
|
27075
|
-
return { type, nullable: true };
|
|
27076
|
-
}
|
|
27077
|
-
return { type: "null", nullable: true };
|
|
27078
|
-
}
|
|
27079
|
-
function getDataTypeFromTypedArray(array2) {
|
|
27080
|
-
if (typeof Float16Array !== "undefined" && array2 instanceof Float16Array) {
|
|
27081
|
-
return "float16";
|
|
27082
|
-
}
|
|
27083
|
-
switch (array2.constructor) {
|
|
27084
|
-
case Int8Array:
|
|
27085
|
-
return "int8";
|
|
27086
|
-
case Uint8Array:
|
|
27087
|
-
case Uint8ClampedArray:
|
|
27088
|
-
return "uint8";
|
|
27089
|
-
case Int16Array:
|
|
27090
|
-
return "int16";
|
|
27091
|
-
case Uint16Array:
|
|
27092
|
-
return "uint16";
|
|
27093
|
-
case Int32Array:
|
|
27094
|
-
return "int32";
|
|
27095
|
-
case Uint32Array:
|
|
27096
|
-
return "uint32";
|
|
27097
|
-
case BigInt64Array:
|
|
27098
|
-
return "int64";
|
|
27099
|
-
case BigUint64Array:
|
|
27100
|
-
return "uint64";
|
|
27101
|
-
case Float32Array:
|
|
27102
|
-
return "float32";
|
|
27103
|
-
case Float64Array:
|
|
27104
|
-
return "float64";
|
|
27105
|
-
default:
|
|
27106
|
-
return "null";
|
|
27107
|
-
}
|
|
27108
|
-
}
|
|
27109
|
-
var init_data_type = __esm({
|
|
27110
|
-
"../core/src/schema-utils/lib/schema/data-type.ts"() {
|
|
27111
|
-
"use strict";
|
|
27112
|
-
}
|
|
27113
|
-
});
|
|
27114
|
-
|
|
27115
27432
|
// ../core/src/schema-utils/lib/mesh/mesh-utils.ts
|
|
27116
27433
|
function getMeshBoundingBox(attributes) {
|
|
27117
27434
|
const positionAttribute = attributes?.POSITION;
|
|
@@ -27202,7 +27519,7 @@ return true;`);
|
|
|
27202
27519
|
var init_float162 = __esm({
|
|
27203
27520
|
"../core/src/schema/float16.ts"() {
|
|
27204
27521
|
"use strict";
|
|
27205
|
-
|
|
27522
|
+
init_dist2();
|
|
27206
27523
|
}
|
|
27207
27524
|
});
|
|
27208
27525
|
|
|
@@ -27519,7 +27836,7 @@ return true;`);
|
|
|
27519
27836
|
var init_version3 = __esm({
|
|
27520
27837
|
"../scene/src/draco/lib/utils/version.ts"() {
|
|
27521
27838
|
"use strict";
|
|
27522
|
-
VERSION3 = true ? "5.0.0-beta.
|
|
27839
|
+
VERSION3 = true ? "5.0.0-beta.5" : "latest";
|
|
27523
27840
|
}
|
|
27524
27841
|
});
|
|
27525
27842
|
|
|
@@ -28598,7 +28915,7 @@ return true;`);
|
|
|
28598
28915
|
var init_draco_loader_types = __esm({
|
|
28599
28916
|
"../scene/src/draco/draco-loader-types.ts"() {
|
|
28600
28917
|
"use strict";
|
|
28601
|
-
|
|
28918
|
+
init_arrow_worker_transport();
|
|
28602
28919
|
init_version3();
|
|
28603
28920
|
init_draco_format();
|
|
28604
28921
|
init_draco_loader_options();
|
|
@@ -30005,7 +30322,7 @@ return true;`);
|
|
|
30005
30322
|
var ARC_SECOND, WGS84;
|
|
30006
30323
|
var init_datum = __esm({
|
|
30007
30324
|
"../../node_modules/@math.gl/geospatial/dist/projection/experimental/datum.js"() {
|
|
30008
|
-
|
|
30325
|
+
init_dist2();
|
|
30009
30326
|
ARC_SECOND = Math.PI / (180 * 3600);
|
|
30010
30327
|
WGS84 = {
|
|
30011
30328
|
ellipsoid: {
|
|
@@ -30079,6 +30396,59 @@ return true;`);
|
|
|
30079
30396
|
}
|
|
30080
30397
|
});
|
|
30081
30398
|
|
|
30399
|
+
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/transform-description.js
|
|
30400
|
+
function describeCRS(crs) {
|
|
30401
|
+
const ellipsoid = Object.freeze({ ...crs.ellipsoid });
|
|
30402
|
+
return Object.freeze({
|
|
30403
|
+
kind: crs.kind,
|
|
30404
|
+
projection: crs.projection,
|
|
30405
|
+
parameters: Object.freeze(Object.fromEntries(Object.entries(crs.parameters).map(([name, value2]) => [name, value2 ?? null]))),
|
|
30406
|
+
ellipsoid,
|
|
30407
|
+
datum: Object.freeze({
|
|
30408
|
+
ellipsoid: Object.freeze({ ...crs.datum.ellipsoid }),
|
|
30409
|
+
towgs84: crs.datum.towgs84 && Object.freeze([...crs.datum.towgs84]),
|
|
30410
|
+
grids: crs.datum.grids && Object.freeze(crs.datum.grids.map((reference) => Object.freeze({
|
|
30411
|
+
name: reference.name,
|
|
30412
|
+
optional: reference.optional,
|
|
30413
|
+
loaded: Boolean(reference.grid)
|
|
30414
|
+
})))
|
|
30415
|
+
}),
|
|
30416
|
+
angularUnit: crs.angularUnit,
|
|
30417
|
+
toMeter: crs.toMeter,
|
|
30418
|
+
verticalUnit: crs.verticalUnit,
|
|
30419
|
+
primeMeridian: crs.primeMeridian,
|
|
30420
|
+
axis: crs.axis,
|
|
30421
|
+
storedAxis: crs.storedAxis,
|
|
30422
|
+
longitudeWrap: crs.longitudeWrap,
|
|
30423
|
+
areaOfUse: crs.areaOfUse && Object.freeze([...crs.areaOfUse]),
|
|
30424
|
+
lossy: crs.lossy,
|
|
30425
|
+
algorithm: crs.algorithm && Object.freeze({ ...crs.algorithm })
|
|
30426
|
+
});
|
|
30427
|
+
}
|
|
30428
|
+
function describeTransform(source, target, forward33, inverse33) {
|
|
30429
|
+
const opaqueReasons = [];
|
|
30430
|
+
if (!source.algorithm)
|
|
30431
|
+
opaqueReasons.push("source-algorithm");
|
|
30432
|
+
if (!target.algorithm)
|
|
30433
|
+
opaqueReasons.push("target-algorithm");
|
|
30434
|
+
if (source.datum.grids || target.datum.grids || source.parameters["geoidgrids"] || target.parameters["geoidgrids"])
|
|
30435
|
+
opaqueReasons.push("grid-resource");
|
|
30436
|
+
return Object.freeze({
|
|
30437
|
+
version: 1,
|
|
30438
|
+
source,
|
|
30439
|
+
target,
|
|
30440
|
+
forward: forward33,
|
|
30441
|
+
inverse: inverse33,
|
|
30442
|
+
lossy: source.lossy || target.lossy,
|
|
30443
|
+
complete: opaqueReasons.length === 0,
|
|
30444
|
+
opaqueReasons: Object.freeze(opaqueReasons)
|
|
30445
|
+
});
|
|
30446
|
+
}
|
|
30447
|
+
var init_transform_description = __esm({
|
|
30448
|
+
"../../node_modules/@math.gl/geospatial/dist/projection/experimental/transform-description.js"() {
|
|
30449
|
+
}
|
|
30450
|
+
});
|
|
30451
|
+
|
|
30082
30452
|
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/typescript-projection.js
|
|
30083
30453
|
function requiredProjections(options) {
|
|
30084
30454
|
const available = registry(options.projections || []);
|
|
@@ -30148,7 +30518,8 @@ return true;`);
|
|
|
30148
30518
|
const verticalGrid = compileVerticalGrid(crs.parameters["geoidgrids"], options.verticalGrids);
|
|
30149
30519
|
if (verticalGrid && (crs.kind === "geocentric" || crs.kind === "identity" || crs.lossy))
|
|
30150
30520
|
unsupportedStage("Vertical grids require a non-lossy geographic or projected CRS");
|
|
30151
|
-
|
|
30521
|
+
const algorithm = plugin ? plugin.semantics : { id: "@math.gl/geospatial/" + crs.kind, version: 1 };
|
|
30522
|
+
return { ...crs, datum, implementation, verticalGrid, algorithm };
|
|
30152
30523
|
}
|
|
30153
30524
|
function finite(point) {
|
|
30154
30525
|
return Number.isFinite(point.x) && Number.isFinite(point.y) && Number.isFinite(point.z);
|
|
@@ -30191,9 +30562,51 @@ return true;`);
|
|
|
30191
30562
|
if (from.kind === "projected" && to.kind === "geographic")
|
|
30192
30563
|
flat = from.implementation?.createInverseFlat?.(context);
|
|
30193
30564
|
}
|
|
30565
|
+
const requiresInputZ = Boolean(from.verticalGrid || to.verticalGrid) || from.kind === "geocentric" || /[ud]/.test(fromAxis.slice(0, 2)) || /[ud]/.test(toAxis.slice(0, 2));
|
|
30566
|
+
const stages = [];
|
|
30567
|
+
if (inputAxis)
|
|
30568
|
+
stages.push("input-axis");
|
|
30569
|
+
if (horizontalOnly)
|
|
30570
|
+
stages.push("discard-height");
|
|
30571
|
+
if (inputScale !== 1)
|
|
30572
|
+
stages.push("input-scale");
|
|
30573
|
+
if (source)
|
|
30574
|
+
stages.push("source-inverse");
|
|
30575
|
+
if (inputVerticalScale !== 1)
|
|
30576
|
+
stages.push("input-height-scale");
|
|
30577
|
+
stages.push("geographic-domain-check");
|
|
30578
|
+
if (fromPrime)
|
|
30579
|
+
stages.push("source-prime-meridian");
|
|
30580
|
+
if (from.verticalGrid)
|
|
30581
|
+
stages.push("source-vertical-grid");
|
|
30582
|
+
if (datum)
|
|
30583
|
+
stages.push("datum");
|
|
30584
|
+
if (to.verticalGrid)
|
|
30585
|
+
stages.push("target-vertical-grid");
|
|
30586
|
+
if (toPrime)
|
|
30587
|
+
stages.push("target-prime-meridian");
|
|
30588
|
+
if (longitudeWrap !== void 0)
|
|
30589
|
+
stages.push("longitude-wrap");
|
|
30590
|
+
if (target)
|
|
30591
|
+
stages.push("target-forward");
|
|
30592
|
+
if (outputScale !== 1)
|
|
30593
|
+
stages.push("output-scale");
|
|
30594
|
+
if (outputVerticalScale !== 1)
|
|
30595
|
+
stages.push("output-height-scale");
|
|
30596
|
+
if (horizontalOnly)
|
|
30597
|
+
stages.push("restore-height");
|
|
30598
|
+
if (outputAxis)
|
|
30599
|
+
stages.push("output-axis");
|
|
30194
30600
|
return {
|
|
30601
|
+
description: Object.freeze({
|
|
30602
|
+
inputAxis: fromAxis,
|
|
30603
|
+
outputAxis: toAxis,
|
|
30604
|
+
requiresInputZ,
|
|
30605
|
+
geocentricOutput: to.kind === "geocentric",
|
|
30606
|
+
stages: Object.freeze(stages)
|
|
30607
|
+
}),
|
|
30195
30608
|
flat,
|
|
30196
|
-
requiresInputZ
|
|
30609
|
+
requiresInputZ,
|
|
30197
30610
|
geocentricOutput: to.kind === "geocentric",
|
|
30198
30611
|
run(point) {
|
|
30199
30612
|
if (!finite(point))
|
|
@@ -30307,6 +30720,7 @@ return true;`);
|
|
|
30307
30720
|
init_parameters();
|
|
30308
30721
|
init_geographic_rendering_profile();
|
|
30309
30722
|
init_vertical_datum();
|
|
30723
|
+
init_transform_description();
|
|
30310
30724
|
ProjectionTransform = class _ProjectionTransform {
|
|
30311
30725
|
/** Resolve required descriptors once, then return an ordinary synchronous instance. */
|
|
30312
30726
|
static async create(options = {}) {
|
|
@@ -30320,6 +30734,10 @@ return true;`);
|
|
|
30320
30734
|
getTargetRenderingProfile(coverage) {
|
|
30321
30735
|
return this.targetRenderingProfile && resolveRenderingProfile(this.targetRenderingProfile, coverage);
|
|
30322
30736
|
}
|
|
30737
|
+
/** Deferred transforms expose metadata only once their implementations are prepared. */
|
|
30738
|
+
get description() {
|
|
30739
|
+
return this.deferred?.implementation?.description ?? this.resolvedDescription;
|
|
30740
|
+
}
|
|
30323
30741
|
constructor(options = {}) {
|
|
30324
30742
|
this.coordinateScratch = new ProjectionScratch();
|
|
30325
30743
|
this.targetLongitudeOrigin = 0;
|
|
@@ -30345,6 +30763,7 @@ return true;`);
|
|
|
30345
30763
|
unsupportedStage("Horizontal extraction cannot be combined with vertical grids");
|
|
30346
30764
|
this.forwardTransform = compileTransform(from, to, Boolean(options.enforceAxis));
|
|
30347
30765
|
this.inverseTransform = compileTransform(to, from, Boolean(options.enforceAxis));
|
|
30766
|
+
this.resolvedDescription = describeTransform(describeCRS(from), describeCRS(to), this.forwardTransform.description, this.inverseTransform.description);
|
|
30348
30767
|
}
|
|
30349
30768
|
this.project = this.project.bind(this);
|
|
30350
30769
|
this.unproject = this.unproject.bind(this);
|
|
@@ -30856,6 +31275,7 @@ return true;`);
|
|
|
30856
31275
|
init_rendering_bounds();
|
|
30857
31276
|
mercator = {
|
|
30858
31277
|
name: "merc",
|
|
31278
|
+
semantics: { id: "@math.gl/geospatial/merc", version: 1 },
|
|
30859
31279
|
aliases: [
|
|
30860
31280
|
"Mercator",
|
|
30861
31281
|
"Popular Visualisation Pseudo Mercator",
|
|
@@ -30949,6 +31369,7 @@ return true;`);
|
|
|
30949
31369
|
init_rendering_bounds();
|
|
30950
31370
|
equidistantCylindrical = {
|
|
30951
31371
|
name: "eqc",
|
|
31372
|
+
semantics: { id: "@math.gl/geospatial/eqc", version: 1 },
|
|
30952
31373
|
aliases: ["Equirectangular", "Equidistant_Cylindrical", "Equidistant_Cylindrical_Spherical"],
|
|
30953
31374
|
parameters: ["lon_0", "lat_0", "lat_ts", "x_0", "y_0"],
|
|
30954
31375
|
create({ semiMajorAxis: a, parameters, primeMeridian: primeMeridian2 = 0 }) {
|
|
@@ -38233,8 +38654,8 @@ return true;`);
|
|
|
38233
38654
|
var init_spatial_coordinate_transformer = __esm({
|
|
38234
38655
|
"src/spatial/spatial-coordinate-transformer.ts"() {
|
|
38235
38656
|
"use strict";
|
|
38236
|
-
|
|
38237
|
-
|
|
38657
|
+
init_dist2();
|
|
38658
|
+
init_dist4();
|
|
38238
38659
|
init_bulk();
|
|
38239
38660
|
init_spatial_resource_registry();
|
|
38240
38661
|
init_normalize_crs_identifier();
|
|
@@ -38628,8 +39049,8 @@ return true;`);
|
|
|
38628
39049
|
var init_i3s_spatial_transformer = __esm({
|
|
38629
39050
|
"src/spatial/i3s-spatial-transformer.ts"() {
|
|
38630
39051
|
"use strict";
|
|
38631
|
-
|
|
38632
|
-
|
|
39052
|
+
init_dist2();
|
|
39053
|
+
init_dist4();
|
|
38633
39054
|
init_spatial_coordinate_transformer();
|
|
38634
39055
|
init_spatial_types();
|
|
38635
39056
|
init_i3s_elevation();
|
|
@@ -39268,7 +39689,7 @@ return true;`);
|
|
|
39268
39689
|
var init_constants6 = __esm({
|
|
39269
39690
|
"src/i3s/lib/parsers/constants.ts"() {
|
|
39270
39691
|
"use strict";
|
|
39271
|
-
|
|
39692
|
+
init_dist3();
|
|
39272
39693
|
GL_TYPE_MAP = {
|
|
39273
39694
|
UInt8: GL.UNSIGNED_BYTE,
|
|
39274
39695
|
UInt16: GL.UNSIGNED_SHORT,
|
|
@@ -40016,9 +40437,9 @@ return true;`);
|
|
|
40016
40437
|
"src/i3s/lib/parsers/parse-i3s-tile-content.ts"() {
|
|
40017
40438
|
"use strict";
|
|
40018
40439
|
init_schema3();
|
|
40019
|
-
|
|
40020
|
-
|
|
40021
|
-
|
|
40440
|
+
init_dist2();
|
|
40441
|
+
init_dist4();
|
|
40442
|
+
init_dist4();
|
|
40022
40443
|
init_loader_utils();
|
|
40023
40444
|
init_src();
|
|
40024
40445
|
init_src2();
|
|
@@ -40108,7 +40529,7 @@ return true;`);
|
|
|
40108
40529
|
"use strict";
|
|
40109
40530
|
init_i3s_format();
|
|
40110
40531
|
init_i3s_loader_options();
|
|
40111
|
-
VERSION4 = true ? "5.0.0-beta.
|
|
40532
|
+
VERSION4 = true ? "5.0.0-beta.5" : "latest";
|
|
40112
40533
|
I3SContentLoader = {
|
|
40113
40534
|
...I3SContentFormat,
|
|
40114
40535
|
dataType: null,
|