@loaders.gl/pointclouds 5.0.0-beta.1 → 5.0.0-beta.10
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/LAS-README.md +1 -1
- package/PCD-README.md +1 -1
- package/PLY-README.md +1 -1
- package/README.md +5 -1
- package/dist/dist.dev.js +3584 -2211
- package/dist/dist.min.js +20 -20
- package/dist/index.cjs +0 -6
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/las/bundled.cjs +0 -3
- package/dist/las/bundled.cjs.map +2 -2
- package/dist/las/bundled.d.ts +0 -1
- package/dist/las/bundled.d.ts.map +1 -1
- package/dist/las/bundled.js +0 -1
- package/dist/las/bundled.js.map +1 -1
- package/dist/las/index.cjs +0 -3
- package/dist/las/index.cjs.map +3 -3
- package/dist/las/index.d.ts +0 -2
- package/dist/las/index.d.ts.map +1 -1
- package/dist/las/index.js +0 -3
- package/dist/las/index.js.map +1 -1
- package/dist/las/las-copc-loader-types.cjs +1 -1
- package/dist/las/las-copc-loader-types.cjs.map +2 -2
- package/dist/las/las-copc-loader-types.d.ts +13 -9
- package/dist/las/las-copc-loader-types.d.ts.map +1 -1
- package/dist/las/las-copc-loader-types.js +1 -1
- package/dist/las/las-copc-loader-types.js.map +1 -1
- package/dist/las/las-copc-loader.cjs +8 -5
- package/dist/las/las-copc-loader.cjs.map +2 -2
- package/dist/las/las-copc-loader.d.ts +8 -6
- package/dist/las/las-copc-loader.d.ts.map +1 -1
- package/dist/las/las-copc-loader.js +11 -6
- package/dist/las/las-copc-loader.js.map +1 -1
- package/dist/las/las-loader-shared.cjs +4 -2
- package/dist/las/las-loader-shared.cjs.map +2 -2
- package/dist/las/las-loader-shared.d.ts +9 -7
- package/dist/las/las-loader-shared.d.ts.map +1 -1
- package/dist/las/las-loader-shared.js +4 -2
- package/dist/las/las-loader-shared.js.map +1 -1
- package/dist/las/las-loader-types.cjs +3 -6
- package/dist/las/las-loader-types.cjs.map +2 -2
- package/dist/las/las-loader-types.d.ts +18 -45
- package/dist/las/las-loader-types.d.ts.map +1 -1
- package/dist/las/las-loader-types.js +1 -3
- package/dist/las/las-loader-types.js.map +1 -1
- package/dist/las/las-loader.cjs +61 -13
- package/dist/las/las-loader.cjs.map +3 -3
- package/dist/las/las-loader.d.ts +51 -5
- package/dist/las/las-loader.d.ts.map +1 -1
- package/dist/las/las-loader.js +56 -6
- package/dist/las/las-loader.js.map +1 -1
- package/dist/las/las-writer.cjs +3 -3
- package/dist/las/las-writer.cjs.map +2 -2
- package/dist/las/las-writer.d.ts +4 -3
- package/dist/las/las-writer.d.ts.map +1 -1
- package/dist/las/las-writer.js +4 -6
- package/dist/las/las-writer.js.map +1 -1
- package/dist/las/laz-rs-loader-types.cjs +1 -1
- package/dist/las/laz-rs-loader-types.cjs.map +2 -2
- package/dist/las/laz-rs-loader-types.d.ts +13 -9
- package/dist/las/laz-rs-loader-types.d.ts.map +1 -1
- package/dist/las/laz-rs-loader-types.js +1 -1
- package/dist/las/laz-rs-loader-types.js.map +1 -1
- package/dist/las/laz-rs-loader.cjs +8 -5
- package/dist/las/laz-rs-loader.cjs.map +2 -2
- package/dist/las/laz-rs-loader.d.ts +8 -6
- package/dist/las/laz-rs-loader.d.ts.map +1 -1
- package/dist/las/laz-rs-loader.js +11 -6
- package/dist/las/laz-rs-loader.js.map +1 -1
- package/dist/las/lazperf-loader-types.cjs +1 -1
- package/dist/las/lazperf-loader-types.cjs.map +2 -2
- package/dist/las/lazperf-loader-types.d.ts +14 -10
- package/dist/las/lazperf-loader-types.d.ts.map +1 -1
- package/dist/las/lazperf-loader-types.js +1 -1
- package/dist/las/lazperf-loader-types.js.map +1 -1
- package/dist/las/lazperf-loader.cjs +9 -6
- package/dist/las/lazperf-loader.cjs.map +2 -2
- package/dist/las/lazperf-loader.d.ts +9 -7
- package/dist/las/lazperf-loader.d.ts.map +1 -1
- package/dist/las/lazperf-loader.js +12 -7
- package/dist/las/lazperf-loader.js.map +1 -1
- package/dist/las/lib/copc/parse-las.cjs +1 -1
- package/dist/las/lib/copc/parse-las.cjs.map +2 -2
- package/dist/las/lib/copc/parse-las.js +1 -1
- package/dist/las/lib/copc/parse-las.js.map +1 -1
- package/dist/las/lib/get-las-schema.cjs +5 -0
- package/dist/las/lib/get-las-schema.cjs.map +2 -2
- package/dist/las/lib/get-las-schema.d.ts.map +1 -1
- package/dist/las/lib/get-las-schema.js +6 -0
- package/dist/las/lib/get-las-schema.js.map +1 -1
- package/dist/las/lib/las-extra-bytes.cjs +6 -1
- package/dist/las/lib/las-extra-bytes.cjs.map +2 -2
- package/dist/las/lib/las-extra-bytes.d.ts.map +1 -1
- package/dist/las/lib/las-extra-bytes.js +6 -4
- package/dist/las/lib/las-extra-bytes.js.map +1 -1
- package/dist/las/lib/laz-perf/parse-las.cjs +9 -8
- package/dist/las/lib/laz-perf/parse-las.cjs.map +3 -3
- package/dist/las/lib/laz-perf/parse-las.js +9 -8
- package/dist/las/lib/laz-perf/parse-las.js.map +1 -1
- package/dist/las/lib/laz-rs-wasm/parse-las.cjs +9 -8
- package/dist/las/lib/laz-rs-wasm/parse-las.cjs.map +3 -3
- package/dist/las/lib/laz-rs-wasm/parse-las.js +9 -8
- package/dist/las/lib/laz-rs-wasm/parse-las.js.map +1 -1
- package/dist/las/lib/typescript/parse-las.cjs +135 -13
- package/dist/las/lib/typescript/parse-las.cjs.map +3 -3
- package/dist/las/lib/typescript/parse-las.d.ts.map +1 -1
- package/dist/las/lib/typescript/parse-las.js +106 -10
- package/dist/las/lib/typescript/parse-las.js.map +1 -1
- package/dist/las/unbundled.cjs +0 -2
- package/dist/las/unbundled.cjs.map +2 -2
- package/dist/las/unbundled.d.ts +1 -1
- package/dist/las/unbundled.d.ts.map +1 -1
- package/dist/las/unbundled.js +1 -1
- package/dist/las/unbundled.js.map +1 -1
- package/dist/las/workers/las-worker.cjs +5 -5
- package/dist/las/workers/las-worker.cjs.map +2 -2
- package/dist/las/workers/las-worker.js +6 -6
- package/dist/las/workers/las-worker.js.map +1 -1
- package/dist/las-copc-loader-types.cjs +51 -0
- package/dist/las-copc-loader-types.cjs.map +7 -0
- package/dist/las-copc-loader-types.d.ts +2 -0
- package/dist/las-copc-loader-types.d.ts.map +1 -0
- package/dist/las-copc-loader-types.js +2 -0
- package/dist/las-copc-loader-types.js.map +1 -0
- package/dist/las-copc-loader.cjs +62 -0
- package/dist/las-copc-loader.cjs.map +7 -0
- package/dist/las-copc-loader.d.ts +2 -0
- package/dist/las-copc-loader.d.ts.map +1 -0
- package/dist/las-copc-loader.js +2 -0
- package/dist/las-copc-loader.js.map +1 -0
- package/dist/las-loader-types.cjs +53 -0
- package/dist/las-loader-types.cjs.map +7 -0
- package/dist/las-loader-types.d.ts +2 -0
- package/dist/las-loader-types.d.ts.map +1 -0
- package/dist/las-loader-types.js +2 -0
- package/dist/las-loader-types.js.map +1 -0
- package/dist/las-loader.cjs +130 -0
- package/dist/las-loader.cjs.map +7 -0
- package/dist/las-loader.d.ts +2 -0
- package/dist/las-loader.d.ts.map +1 -0
- package/dist/las-loader.js +2 -0
- package/dist/las-loader.js.map +1 -0
- package/dist/las-worker.js +1219 -253
- package/dist/las-writer.cjs +1056 -0
- package/dist/las-writer.cjs.map +7 -0
- package/dist/las-writer.d.ts +2 -0
- package/dist/las-writer.d.ts.map +1 -0
- package/dist/las-writer.js +2 -0
- package/dist/las-writer.js.map +1 -0
- package/dist/laz-rs-loader-types.cjs +51 -0
- package/dist/laz-rs-loader-types.cjs.map +7 -0
- package/dist/laz-rs-loader-types.d.ts +2 -0
- package/dist/laz-rs-loader-types.d.ts.map +1 -0
- package/dist/laz-rs-loader-types.js +2 -0
- package/dist/laz-rs-loader-types.js.map +1 -0
- package/dist/laz-rs-loader.cjs +277 -0
- package/dist/laz-rs-loader.cjs.map +7 -0
- package/dist/laz-rs-loader.d.ts +2 -0
- package/dist/laz-rs-loader.d.ts.map +1 -0
- package/dist/laz-rs-loader.js +2 -0
- package/dist/laz-rs-loader.js.map +1 -0
- package/dist/lazperf-loader-types.cjs +51 -0
- package/dist/lazperf-loader-types.cjs.map +7 -0
- package/dist/lazperf-loader-types.d.ts +2 -0
- package/dist/lazperf-loader-types.d.ts.map +1 -0
- package/dist/lazperf-loader-types.js +2 -0
- package/dist/lazperf-loader-types.js.map +1 -0
- package/dist/lazperf-loader.cjs +65 -0
- package/dist/lazperf-loader.cjs.map +7 -0
- package/dist/lazperf-loader.d.ts +2 -0
- package/dist/lazperf-loader.d.ts.map +1 -0
- package/dist/lazperf-loader.js +2 -0
- package/dist/lazperf-loader.js.map +1 -0
- package/dist/pcd/bundled.cjs +2 -4
- package/dist/pcd/bundled.cjs.map +2 -2
- package/dist/pcd/bundled.d.ts +1 -1
- package/dist/pcd/bundled.d.ts.map +1 -1
- package/dist/pcd/bundled.js +1 -1
- package/dist/pcd/bundled.js.map +1 -1
- package/dist/pcd/index.cjs +0 -3
- package/dist/pcd/index.cjs.map +3 -3
- package/dist/pcd/index.d.ts +0 -2
- package/dist/pcd/index.d.ts.map +1 -1
- package/dist/pcd/index.js +0 -3
- package/dist/pcd/index.js.map +1 -1
- package/dist/pcd/pcd-loader-types.cjs +9 -10
- package/dist/pcd/pcd-loader-types.cjs.map +2 -2
- package/dist/pcd/pcd-loader-types.d.ts +18 -41
- package/dist/pcd/pcd-loader-types.d.ts.map +1 -1
- package/dist/pcd/pcd-loader-types.js +6 -6
- package/dist/pcd/pcd-loader-types.js.map +1 -1
- package/dist/pcd/pcd-loader.cjs +82 -25
- package/dist/pcd/pcd-loader.cjs.map +3 -3
- package/dist/pcd/pcd-loader.d.ts +42 -6
- package/dist/pcd/pcd-loader.d.ts.map +1 -1
- package/dist/pcd/pcd-loader.js +72 -21
- package/dist/pcd/pcd-loader.js.map +1 -1
- package/dist/pcd/pcd-writer.cjs +3 -3
- package/dist/pcd/pcd-writer.cjs.map +2 -2
- package/dist/pcd/pcd-writer.d.ts +5 -4
- package/dist/pcd/pcd-writer.d.ts.map +1 -1
- package/dist/pcd/pcd-writer.js +4 -4
- package/dist/pcd/pcd-writer.js.map +1 -1
- package/dist/pcd/unbundled.cjs +2 -4
- package/dist/pcd/unbundled.cjs.map +2 -2
- package/dist/pcd/unbundled.d.ts +1 -1
- package/dist/pcd/unbundled.d.ts.map +1 -1
- package/dist/pcd/unbundled.js +1 -1
- package/dist/pcd/unbundled.js.map +1 -1
- package/dist/pcd/workers/pcd-worker.cjs +5 -5
- package/dist/pcd/workers/pcd-worker.cjs.map +2 -2
- package/dist/pcd/workers/pcd-worker.js +6 -6
- package/dist/pcd/workers/pcd-worker.js.map +1 -1
- package/dist/pcd-loader-types.cjs +65 -0
- package/dist/pcd-loader-types.cjs.map +7 -0
- package/dist/pcd-loader-types.d.ts +2 -0
- package/dist/pcd-loader-types.d.ts.map +1 -0
- package/dist/pcd-loader-types.js +2 -0
- package/dist/pcd-loader-types.js.map +1 -0
- package/dist/pcd-loader.cjs +203 -0
- package/dist/pcd-loader.cjs.map +7 -0
- package/dist/pcd-loader.d.ts +2 -0
- package/dist/pcd-loader.d.ts.map +1 -0
- package/dist/pcd-loader.js +2 -0
- package/dist/pcd-loader.js.map +1 -0
- package/dist/pcd-worker.js +1457 -418
- package/dist/pcd-writer.cjs +136 -0
- package/dist/pcd-writer.cjs.map +7 -0
- package/dist/pcd-writer.d.ts +2 -0
- package/dist/pcd-writer.d.ts.map +1 -0
- package/dist/pcd-writer.js +2 -0
- package/dist/pcd-writer.js.map +1 -0
- package/dist/ply/bundled.cjs +2 -4
- package/dist/ply/bundled.cjs.map +2 -2
- package/dist/ply/bundled.d.ts +1 -1
- package/dist/ply/bundled.d.ts.map +1 -1
- package/dist/ply/bundled.js +1 -1
- package/dist/ply/bundled.js.map +1 -1
- package/dist/ply/index.cjs +0 -3
- package/dist/ply/index.cjs.map +3 -3
- package/dist/ply/index.d.ts +0 -2
- package/dist/ply/index.d.ts.map +1 -1
- package/dist/ply/index.js +0 -3
- package/dist/ply/index.js.map +1 -1
- package/dist/ply/lib/get-ply-schema.cjs +4 -2
- package/dist/ply/lib/get-ply-schema.cjs.map +2 -2
- package/dist/ply/lib/get-ply-schema.d.ts +6 -0
- package/dist/ply/lib/get-ply-schema.d.ts.map +1 -1
- package/dist/ply/lib/get-ply-schema.js +1 -1
- package/dist/ply/lib/get-ply-schema.js.map +1 -1
- package/dist/ply/lib/parse-ply-arrow.cjs +1 -1
- package/dist/ply/lib/parse-ply-arrow.cjs.map +2 -2
- package/dist/ply/lib/parse-ply-arrow.js +2 -2
- package/dist/ply/lib/parse-ply-arrow.js.map +1 -1
- package/dist/ply/lib/parse-ply-in-batches.cjs +14 -8
- package/dist/ply/lib/parse-ply-in-batches.cjs.map +3 -3
- package/dist/ply/lib/parse-ply-in-batches.d.ts.map +1 -1
- package/dist/ply/lib/parse-ply-in-batches.js +9 -4
- package/dist/ply/lib/parse-ply-in-batches.js.map +1 -1
- package/dist/ply/lib/parse-ply.cjs +3 -0
- package/dist/ply/lib/parse-ply.cjs.map +2 -2
- package/dist/ply/lib/parse-ply.d.ts +1 -1
- package/dist/ply/lib/parse-ply.d.ts.map +1 -1
- package/dist/ply/lib/parse-ply.js +4 -0
- package/dist/ply/lib/parse-ply.js.map +1 -1
- package/dist/ply/ply-loader-types.cjs +9 -10
- package/dist/ply/ply-loader-types.cjs.map +2 -2
- package/dist/ply/ply-loader-types.d.ts +19 -42
- package/dist/ply/ply-loader-types.d.ts.map +1 -1
- package/dist/ply/ply-loader-types.js +6 -6
- package/dist/ply/ply-loader-types.js.map +1 -1
- package/dist/ply/ply-loader.cjs +82 -24
- package/dist/ply/ply-loader.cjs.map +3 -3
- package/dist/ply/ply-loader.d.ts +43 -6
- package/dist/ply/ply-loader.d.ts.map +1 -1
- package/dist/ply/ply-loader.js +71 -19
- package/dist/ply/ply-loader.js.map +1 -1
- package/dist/ply/ply-writer.cjs +3 -3
- package/dist/ply/ply-writer.cjs.map +2 -2
- package/dist/ply/ply-writer.d.ts +5 -4
- package/dist/ply/ply-writer.d.ts.map +1 -1
- package/dist/ply/ply-writer.js +4 -4
- package/dist/ply/ply-writer.js.map +1 -1
- package/dist/ply/unbundled.cjs +2 -4
- package/dist/ply/unbundled.cjs.map +2 -2
- package/dist/ply/unbundled.d.ts +1 -1
- package/dist/ply/unbundled.d.ts.map +1 -1
- package/dist/ply/unbundled.js +1 -1
- package/dist/ply/unbundled.js.map +1 -1
- package/dist/ply/workers/ply-worker.cjs +6 -6
- package/dist/ply/workers/ply-worker.cjs.map +2 -2
- package/dist/ply/workers/ply-worker.js +8 -8
- package/dist/ply/workers/ply-worker.js.map +1 -1
- package/dist/ply-loader-types.cjs +66 -0
- package/dist/ply-loader-types.cjs.map +7 -0
- package/dist/ply-loader-types.d.ts +2 -0
- package/dist/ply-loader-types.d.ts.map +1 -0
- package/dist/ply-loader-types.js +2 -0
- package/dist/ply-loader-types.js.map +1 -0
- package/dist/ply-loader.cjs +194 -0
- package/dist/ply-loader.cjs.map +7 -0
- package/dist/ply-loader.d.ts +2 -0
- package/dist/ply-loader.d.ts.map +1 -0
- package/dist/ply-loader.js +2 -0
- package/dist/ply-loader.js.map +1 -0
- package/dist/ply-worker.js +2099 -312
- package/dist/ply-writer.cjs +177 -0
- package/dist/ply-writer.cjs.map +7 -0
- package/dist/ply-writer.d.ts +2 -0
- package/dist/ply-writer.d.ts.map +1 -0
- package/dist/ply-writer.js +2 -0
- package/dist/ply-writer.js.map +1 -0
- package/package.json +75 -71
- package/src/index.ts +3 -3
- package/src/las/bundled.ts +0 -1
- package/src/las/index.ts +0 -4
- package/src/las/las-copc-loader-types.ts +3 -3
- package/src/las/las-copc-loader.ts +12 -12
- package/src/las/las-loader-shared.ts +9 -7
- package/src/las/las-loader-types.ts +3 -6
- package/src/las/las-loader.ts +63 -9
- package/src/las/las-writer.ts +17 -13
- package/src/las/laz-rs-loader-types.ts +3 -3
- package/src/las/laz-rs-loader.ts +11 -11
- package/src/las/lazperf-loader-types.ts +3 -3
- package/src/las/lazperf-loader.ts +13 -13
- package/src/las/lib/copc/parse-las.ts +1 -1
- package/src/las/lib/get-las-schema.ts +5 -0
- package/src/las/lib/las-extra-bytes.ts +6 -4
- package/src/las/lib/laz-perf/parse-las.ts +8 -9
- package/src/las/lib/laz-rs-wasm/parse-las.ts +8 -9
- package/src/las/lib/typescript/parse-las.ts +143 -11
- package/src/las/libs/laz-rs-wasm/README.md +5 -0
- package/src/las/libs/laz-rs-wasm/package.json +6 -0
- package/src/las/unbundled.ts +1 -1
- package/src/las/workers/las-worker.ts +6 -6
- package/src/las-copc-loader-types.ts +1 -0
- package/src/las-copc-loader.ts +1 -0
- package/src/las-loader-types.ts +1 -0
- package/src/las-loader.ts +1 -0
- package/src/las-writer.ts +1 -0
- package/src/laz-rs-loader-types.ts +1 -0
- package/src/laz-rs-loader.ts +1 -0
- package/src/lazperf-loader-types.ts +1 -0
- package/src/lazperf-loader.ts +1 -0
- package/src/pcd/bundled.ts +1 -4
- package/src/pcd/index.ts +0 -4
- package/src/pcd/pcd-loader-types.ts +10 -11
- package/src/pcd/pcd-loader.ts +97 -29
- package/src/pcd/pcd-writer.ts +12 -8
- package/src/pcd/unbundled.ts +1 -1
- package/src/pcd/workers/pcd-worker.ts +6 -6
- package/src/pcd-loader-types.ts +1 -0
- package/src/pcd-loader.ts +1 -0
- package/src/pcd-writer.ts +1 -0
- package/src/ply/bundled.ts +1 -4
- package/src/ply/index.ts +0 -4
- package/src/ply/lib/get-ply-schema.ts +1 -1
- package/src/ply/lib/parse-ply-arrow.ts +2 -2
- package/src/ply/lib/parse-ply-in-batches.ts +9 -4
- package/src/ply/lib/parse-ply.ts +4 -1
- package/src/ply/ply-loader-types.ts +10 -11
- package/src/ply/ply-loader.ts +94 -24
- package/src/ply/ply-writer.ts +12 -8
- package/src/ply/unbundled.ts +1 -1
- package/src/ply/workers/ply-worker.ts +8 -8
- package/src/ply-loader-types.ts +1 -0
- package/src/ply-loader.ts +1 -0
- package/src/ply-writer.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/las-writer.ts", "../src/las/las-writer.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './las/las-writer.js';\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Table} from 'apache-arrow';\nimport {\n encodeLASzipVLR,\n encodeLAZChunk,\n encodeLAZChunkTable,\n type LAZChunkTableEntry,\n type WriterOptions,\n type WriterWithEncoder\n} from '@loaders.gl/core/loader-utils';\nimport type {Mesh, MeshArrowTable, MeshAttribute} from '@loaders.gl/core/schema';\nimport {convertMeshToArrowTableWrapper, convertTableToMesh} from '@loaders.gl/core/schema-utils';\nimport {LASFormat} from './las-format';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nconst LAS_HEADER_LENGTH = 227;\nconst LAS_1_4_HEADER_LENGTH = 375;\nconst LAS_1_5_HEADER_LENGTH = 393;\nconst VLR_HEADER_LENGTH = 54;\nconst EXTRA_BYTES_DESCRIPTOR_LENGTH = 192;\nconst DEFAULT_LAZ_CHUNK_SIZE = 50_000;\nconst VARIABLE_LAZ_CHUNK_SIZE = 0xffffffff;\nconst LAS_RETURN_BUCKET_COUNT = 15;\nconst POINT_RECORD_LENGTHS: Record<number, number> = {\n 0: 20,\n 1: 28,\n 2: 26,\n 3: 34,\n 4: 57,\n 5: 63,\n 6: 30,\n 7: 36,\n 8: 38,\n 9: 59,\n 10: 67\n};\n\n/** Description of a typed mesh attribute stored in LAS Extra Bytes. */\nexport type LASExtraBytesWriter = {\n /** Name of the mesh attribute to append to each point record. */\n attribute: string;\n /** Optional LAS Extra Bytes field name. */\n name?: string;\n /** Optional LAS Extra Bytes field description. */\n description?: string;\n};\n\n/** Options for `LASWriter`. */\nexport type LASWriterOptions = WriterOptions & {\n /** LAS-specific writer options. */\n las?: {\n /** Output container format. COPC has its own writer in @loaders.gl/tiles-3d/copc. */\n format?: 'las' | 'laz';\n /** LAS file version to write. LAS 1.5 requires a WKT CRS string. */\n version?: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5';\n /** WKT coordinate system required for LAS 1.5 output. */\n wkt?: string;\n /** Optional WKT math transform VLR for LAS 1.5 output. */\n wktMathTransform?: string;\n /** LAS 1.5 GPS time offset in the public header. */\n timeOffset?: number;\n /** LAS point data record format to write. */\n pointDataRecordFormat?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n /** Coordinate scale factors used to quantize positions into LAS integer coordinates. */\n scale?: [number, number, number];\n /** Coordinate offsets used to quantize positions into LAS integer coordinates. */\n offset?: [number, number, number];\n /** Source RGB depth: 8 scales to UInt16, 16 preserves values; auto retains legacy inference. Normalized attributes retain their declared normalization. */\n colorDepth?: number | string;\n /** Number of points per fixed-size LAZ chunk. */\n chunkSize?: number;\n /** Write a variable-size LAZ chunk table instead of a fixed-size table. */\n variableChunkTable?: boolean;\n /** Typed mesh attributes with one or three components to append as Extra Bytes fields. */\n extraBytes?: LASExtraBytesWriter[];\n };\n};\n\n/**\n * Writer for LAS and LAZ point cloud data.\n */\nexport const LASWriter = {\n ...LASFormat,\n dataType: null as unknown as Mesh | MeshArrowTable | Table,\n batchType: null as never,\n version: VERSION,\n extensions: ['las', 'laz'],\n options: {\n las: {}\n },\n encode: async (data, options) => encodeLASSync(data, options),\n encodeSync: encodeLASSync,\n encodeInBatches: async function* (dataIterator, options) {\n const batches: (Mesh | MeshArrowTable | Table)[] = [];\n for await (const batch of dataIterator as AsyncIterable<Mesh | MeshArrowTable | Table>) {\n batches.push(batch);\n }\n yield encodeLASSync(mergeMeshBatches(batches), options);\n }\n} as const satisfies WriterWithEncoder<Mesh | MeshArrowTable | Table, never, LASWriterOptions>;\n\n/** Encode mesh category data as LAS or LAZ bytes. */\nfunction encodeLASSync(\n data: Mesh | MeshArrowTable | Table,\n options: LASWriterOptions = {}\n): ArrayBuffer {\n const format = options.las?.format || 'las';\n const colorDepth = options.las?.colorDepth;\n if (colorDepth !== undefined && colorDepth !== 'auto' && colorDepth !== 8 && colorDepth !== 16)\n throw new Error('LASWriter: invalid source color depth');\n const mesh = normalizeMesh(data);\n const positionAttribute = getRequiredAttribute(mesh, 'POSITION');\n validatePositionAttribute(positionAttribute);\n const vertexCount = positionAttribute.value.length / positionAttribute.size;\n validateOptionalPointAttributes(mesh, vertexCount);\n const colorAttribute = mesh.attributes.COLOR_0;\n const intensityAttribute = mesh.attributes.intensity;\n const classificationAttribute = mesh.attributes.classification;\n const nirAttribute = mesh.attributes.nir;\n const extraByteFields = getExtraByteFields(mesh, options, vertexCount);\n const gpsTimeAttribute = mesh.attributes.gpsTime;\n const scanAngleAttribute = mesh.attributes.scanAngle;\n const userDataAttribute = mesh.attributes.userData;\n const pointSourceIdAttribute = mesh.attributes.pointSourceId;\n const returnNumberAttribute = mesh.attributes.returnNumber;\n const numberOfReturnsAttribute = mesh.attributes.numberOfReturns;\n const scannerChannelAttribute = mesh.attributes.scannerChannel;\n const scanDirectionFlagAttribute = mesh.attributes.scanDirectionFlag;\n const edgeOfFlightLineAttribute = mesh.attributes.edgeOfFlightLine;\n const syntheticAttribute = mesh.attributes.synthetic;\n const keyPointAttribute = mesh.attributes.keyPoint;\n const withheldAttribute = mesh.attributes.withheld;\n const overlapAttribute = mesh.attributes.overlap;\n const waveformDescriptorAttribute = mesh.attributes.wavePacketDescriptorIndex;\n const waveformOffsetAttribute = mesh.attributes.wavePacketOffset;\n const waveformSizeAttribute = mesh.attributes.wavePacketSize;\n const waveformReturnPointAttribute = mesh.attributes.wavePacketReturnPoint;\n const waveformVectorAttribute = mesh.attributes.wavePacketVector;\n const boundingBox = getBoundingBox(positionAttribute, vertexCount);\n const returnCounts = getReturnCounts(returnNumberAttribute, vertexCount);\n const scale = getScale(mesh, options);\n const offset = getOffset(mesh, options, boundingBox);\n validateCoordinateEncoding(positionAttribute, vertexCount, scale, offset);\n const pointDataRecordFormat =\n options.las?.pointDataRecordFormat ?? getDefaultPointDataRecordFormat(options, colorAttribute);\n validateReturnAttributes(mesh, vertexCount, pointDataRecordFormat);\n const basePointDataRecordLength = POINT_RECORD_LENGTHS[pointDataRecordFormat];\n if (!basePointDataRecordLength) {\n throw new Error(`LASWriter: unsupported point data record format ${pointDataRecordFormat}`);\n }\n const pointDataRecordLength =\n basePointDataRecordLength +\n extraByteFields.reduce((byteLength, field) => byteLength + field.byteLength, 0);\n if (pointDataRecordLength > 0xffff) {\n throw new Error(\n `LASWriter: point data record length ${pointDataRecordLength} exceeds the LAS limit`\n );\n }\n validateExtraBytesVLR(extraByteFields);\n const version = options.las?.version || (pointDataRecordFormat >= 6 ? '1.4' : '1.2');\n const headerLength =\n version === '1.5'\n ? LAS_1_5_HEADER_LENGTH\n : version === '1.4'\n ? LAS_1_4_HEADER_LENGTH\n : LAS_HEADER_LENGTH;\n validateLASVersionOptions(version, pointDataRecordFormat, options);\n const gpsTimeRange = getGpsTimeRange(gpsTimeAttribute, vertexCount);\n if (version === '1.5' && options.las?.timeOffset && !gpsTimeAttribute) {\n throw new Error('LASWriter: LAS 1.5 timeOffset requires a GPS time attribute');\n }\n if (format === 'laz') {\n validateLAZOptions(version, pointDataRecordFormat, options.las?.chunkSize);\n }\n validatePointDataRecordVersion(version, pointDataRecordFormat);\n\n const rawPointData = new Uint8Array(vertexCount * pointDataRecordLength);\n const pointDataView = new DataView(rawPointData.buffer);\n\n for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++) {\n const pointOffset = vertexIndex * pointDataRecordLength;\n pointDataView.setInt32(\n pointOffset,\n Math.round((getComponent(positionAttribute, vertexIndex, 0) - offset[0]) / scale[0]),\n true\n );\n pointDataView.setInt32(\n pointOffset + 4,\n Math.round((getComponent(positionAttribute, vertexIndex, 1) - offset[1]) / scale[1]),\n true\n );\n pointDataView.setInt32(\n pointOffset + 8,\n Math.round((getComponent(positionAttribute, vertexIndex, 2) - offset[2]) / scale[2]),\n true\n );\n writePointRecord(\n pointDataView,\n pointOffset,\n vertexIndex,\n pointDataRecordFormat,\n basePointDataRecordLength,\n {\n intensityAttribute,\n classificationAttribute,\n nirAttribute,\n colorAttribute,\n colorDepth,\n gpsTimeAttribute,\n scanAngleAttribute,\n userDataAttribute,\n pointSourceIdAttribute,\n returnNumberAttribute,\n numberOfReturnsAttribute,\n scannerChannelAttribute,\n scanDirectionFlagAttribute,\n edgeOfFlightLineAttribute,\n syntheticAttribute,\n keyPointAttribute,\n withheldAttribute,\n overlapAttribute,\n waveformDescriptorAttribute,\n waveformOffsetAttribute,\n waveformSizeAttribute,\n waveformReturnPointAttribute,\n waveformVectorAttribute,\n extraByteFields\n }\n );\n }\n\n const writeParameters: LASWriteParameters = {\n vertexCount,\n boundingBox,\n scale,\n offset,\n version,\n headerLength,\n pointDataRecordFormat,\n pointDataRecordLength,\n returnCounts,\n maxGpsTime: gpsTimeRange.maximum,\n minGpsTime: gpsTimeRange.minimum,\n timeOffset: options.las?.timeOffset || 0,\n hasGpsTime: Boolean(gpsTimeAttribute),\n hasWkt: Boolean(options.las?.wkt)\n };\n if (format === 'laz') {\n return encodeLAZFile(\n rawPointData,\n writeParameters,\n options.las?.chunkSize,\n options.las?.variableChunkTable,\n extraByteFields,\n options\n );\n }\n\n const metadataVLR = encodeMetadataVLRs(extraByteFields, options);\n const pointDataOffset = headerLength + metadataVLR.byteLength;\n const arrayBuffer = new ArrayBuffer(pointDataOffset + rawPointData.byteLength);\n writeHeader(new DataView(arrayBuffer), {\n ...writeParameters,\n pointDataOffset,\n vlrCount: countMetadataVLRs(extraByteFields, options)\n });\n const bytes = new Uint8Array(arrayBuffer);\n bytes.set(metadataVLR, headerLength);\n bytes.set(rawPointData, pointDataOffset);\n return arrayBuffer;\n}\n\n/** Validate that the selected LAS header can represent the point record format. */\nfunction validatePointDataRecordVersion(version: string, pointDataRecordFormat: number): void {\n const minimumVersionByPointFormat: Record<number, string> = {\n 0: '1.0',\n 1: '1.1',\n 2: '1.2',\n 3: '1.2'\n };\n const minimumVersion = minimumVersionByPointFormat[pointDataRecordFormat];\n if (minimumVersion && version < minimumVersion) {\n throw new Error(\n `LASWriter: point data record format ${pointDataRecordFormat} requires LAS ${minimumVersion} or newer; received ${version}`\n );\n }\n if (\n pointDataRecordFormat >= 4 &&\n pointDataRecordFormat <= 5 &&\n !['1.3', '1.4', '1.5'].includes(version)\n ) {\n throw new Error(\n `LASWriter: point data record format ${pointDataRecordFormat} requires LAS 1.3; received ${version}`\n );\n }\n if (pointDataRecordFormat >= 6 && !['1.4', '1.5'].includes(version)) {\n throw new Error(\n `LASWriter: point data record format ${pointDataRecordFormat} requires LAS 1.4; received ${version}`\n );\n }\n}\n\n/** Validate LAS 1.5 writer requirements before allocating point data. */\nfunction validateLASVersionOptions(\n version: string,\n pointDataRecordFormat: number,\n options: LASWriterOptions\n): void {\n if (version === '1.5') {\n if (pointDataRecordFormat < 6 || pointDataRecordFormat > 10) {\n throw new Error('LASWriter: LAS 1.5 output requires point data record format 6-10');\n }\n if (!options.las?.wkt?.trim()) {\n throw new Error('LASWriter: LAS 1.5 output requires las.wkt');\n }\n const timeOffset = options.las?.timeOffset ?? 0;\n if (!Number.isInteger(timeOffset) || timeOffset < 0 || timeOffset > 0xffff) {\n throw new Error('LASWriter: LAS 1.5 timeOffset must be an unsigned 16-bit integer');\n }\n }\n}\n\n/** Values shared by LAS header and point-data encoding. */\ntype LASWriteParameters = {\n /** Number of point records in the output. */\n vertexCount: number;\n /** World-coordinate bounds. */\n boundingBox: [[number, number, number], [number, number, number]];\n /** Coordinate quantization scales. */\n scale: [number, number, number];\n /** Coordinate quantization offsets. */\n offset: [number, number, number];\n /** LAS file version. */\n version: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5';\n /** Public header byte length. */\n headerLength: number;\n /** LAS point data record format. */\n pointDataRecordFormat: number;\n /** Byte length of each raw point record. */\n pointDataRecordLength: number;\n /** Counts for the fifteen LAS 1.4 return-number buckets. */\n returnCounts: number[];\n /** LAS 1.5 maximum GPS time, or zero when no GPS time is present. */\n maxGpsTime: number;\n /** LAS 1.5 minimum GPS time, or zero when no GPS time is present. */\n minGpsTime: number;\n /** LAS 1.5 GPS time offset. */\n timeOffset: number;\n /** Whether the input contained a GPS time attribute. */\n hasGpsTime: boolean;\n /** Whether a WKT coordinate-system VLR is emitted. */\n hasWkt: boolean;\n};\n\n/** Internal description of one encoded LAS Extra Bytes field. */\ntype LASExtraByteField = LASExtraBytesWriter & {\n /** Mesh attribute containing the field values. */\n meshAttribute: MeshAttribute;\n /** LAS Extra Bytes data type code. */\n dataType: number;\n /** Number of bytes occupied by one field value. */\n byteLength: number;\n /** Number of components in one field value. */\n componentCount: number;\n};\n\n/** Assemble raw LAS point records into a complete fixed-chunk LAZ file. */\nfunction encodeLAZFile(\n rawPointData: Uint8Array,\n parameters: LASWriteParameters,\n requestedChunkSize?: number,\n variableChunkTable = false,\n extraByteFields: LASExtraByteField[] = [],\n options: LASWriterOptions = {}\n): ArrayBuffer {\n const chunkSize = requestedChunkSize || DEFAULT_LAZ_CHUNK_SIZE;\n const laszipVLR = encodeLASzipVLR({\n pointDataRecordFormat: parameters.pointDataRecordFormat,\n pointDataRecordLength: parameters.pointDataRecordLength,\n chunkSize: variableChunkTable ? VARIABLE_LAZ_CHUNK_SIZE : chunkSize\n });\n const metadataVLR = encodeMetadataVLRs(extraByteFields, options);\n const pointDataOffset = parameters.headerLength + metadataVLR.byteLength + laszipVLR.byteLength;\n const compressedChunks: Uint8Array[] = [];\n const chunkTableEntries: LAZChunkTableEntry[] = [];\n\n for (let pointOffset = 0; pointOffset < parameters.vertexCount; pointOffset += chunkSize) {\n const pointCount = Math.min(chunkSize, parameters.vertexCount - pointOffset);\n const byteOffset = pointOffset * parameters.pointDataRecordLength;\n const compressed = encodeLAZChunk(\n rawPointData.subarray(byteOffset, byteOffset + pointCount * parameters.pointDataRecordLength),\n {\n pointDataRecordFormat: parameters.pointDataRecordFormat,\n pointDataRecordLength: parameters.pointDataRecordLength,\n pointCount,\n point14ItemVersion: 3,\n rgb14ItemVersion: 3,\n byte14ItemVersion: 3\n }\n );\n compressedChunks.push(compressed);\n chunkTableEntries.push({pointCount, byteLength: compressed.byteLength});\n }\n\n const compressedPointDataByteLength = compressedChunks.reduce(\n (byteLength, chunk) => byteLength + chunk.byteLength,\n 0\n );\n const chunkTablePayload = encodeLAZChunkTable(chunkTableEntries, {\n variable: variableChunkTable\n });\n const chunkTableOffset = pointDataOffset + 8 + compressedPointDataByteLength;\n const arrayBuffer = new ArrayBuffer(chunkTableOffset + 8 + chunkTablePayload.byteLength);\n const bytes = new Uint8Array(arrayBuffer);\n const dataView = new DataView(arrayBuffer);\n\n writeHeader(dataView, {\n ...parameters,\n pointDataOffset,\n vlrCount: countMetadataVLRs(extraByteFields, options) + 1,\n compressed: true\n });\n bytes.set(metadataVLR, parameters.headerLength);\n bytes.set(laszipVLR, parameters.headerLength + metadataVLR.byteLength);\n writeUint64Fallback(dataView, pointDataOffset, chunkTableOffset);\n let compressedOffset = pointDataOffset + 8;\n for (const chunk of compressedChunks) {\n bytes.set(chunk, compressedOffset);\n compressedOffset += chunk.byteLength;\n }\n dataView.setUint32(chunkTableOffset, 0, true);\n dataView.setUint32(chunkTableOffset + 4, chunkTableEntries.length, true);\n bytes.set(chunkTablePayload, chunkTableOffset + 8);\n return arrayBuffer;\n}\n\n/** Build validated Extra Bytes field descriptions from mesh attributes. */\nfunction getExtraByteFields(\n mesh: Mesh,\n options: LASWriterOptions,\n vertexCount: number\n): LASExtraByteField[] {\n const extraBytes = options.las?.extraBytes || [];\n const attributes = new Set<string>();\n return extraBytes.map(field => {\n if (attributes.has(field.attribute)) {\n throw new Error(`LASWriter: duplicate Extra Bytes attribute ${field.attribute}`);\n }\n attributes.add(field.attribute);\n const meshAttribute = mesh.attributes[field.attribute];\n if (!meshAttribute) {\n throw new Error(`LASWriter: Extra Bytes attribute ${field.attribute} is missing`);\n }\n if (![1, 3].includes(meshAttribute.size)) {\n throw new Error(`LASWriter: Extra Bytes attribute ${field.attribute} must have size 1 or 3`);\n }\n if (meshAttribute.value.length < vertexCount * meshAttribute.size) {\n throw new Error(`LASWriter: Extra Bytes attribute ${field.attribute} is too short`);\n }\n validateFiniteAttributeValues(field.attribute, meshAttribute);\n const dataType = getExtraBytesDataType(meshAttribute.value, meshAttribute.size);\n return {\n ...field,\n meshAttribute,\n dataType,\n byteLength: getExtraBytesDataTypeByteLength(dataType, meshAttribute.size),\n componentCount: meshAttribute.size\n };\n });\n}\n\n/** Return the LAS Extra Bytes data type code for a typed array and component count. */\nfunction getExtraBytesDataType(values: MeshAttribute['value'], componentCount: number): number {\n let scalarDataType = 0;\n if (values instanceof Uint8Array) scalarDataType = 1;\n else if (values instanceof Int8Array) scalarDataType = 2;\n else if (values instanceof Uint16Array) scalarDataType = 3;\n else if (values instanceof Int16Array) scalarDataType = 4;\n else if (values instanceof Uint32Array) scalarDataType = 5;\n else if (values instanceof Int32Array) scalarDataType = 6;\n else if (values instanceof BigUint64Array) scalarDataType = 7;\n else if (values instanceof BigInt64Array) scalarDataType = 8;\n else if (values instanceof Float32Array) scalarDataType = 9;\n else if (values instanceof Float64Array) scalarDataType = 10;\n if (scalarDataType) {\n return scalarDataType + (componentCount === 3 ? 20 : 0);\n }\n throw new Error('LASWriter: Extra Bytes attributes require a supported typed array');\n}\n\n/** Return the byte width for a LAS Extra Bytes data type. */\nfunction getExtraBytesDataTypeByteLength(dataType: number, componentCount: number): number {\n const scalarDataType = dataType > 20 ? dataType - 20 : dataType > 10 ? dataType - 10 : dataType;\n const scalarByteLength =\n scalarDataType <= 2\n ? 1\n : scalarDataType <= 4\n ? 2\n : scalarDataType <= 6 || scalarDataType === 9\n ? 4\n : 8;\n return scalarByteLength * componentCount;\n}\n\n/** Encode the LAS Extra Bytes VLR, or an empty buffer when no fields are configured. */\nfunction encodeExtraBytesVLR(fields: readonly LASExtraByteField[]): Uint8Array {\n if (fields.length === 0) {\n return new Uint8Array(0);\n }\n const payload = new Uint8Array(fields.length * EXTRA_BYTES_DESCRIPTOR_LENGTH);\n const dataView = new DataView(payload.buffer);\n let byteOffset = 0;\n for (const field of fields) {\n dataView.setUint8(byteOffset + 2, field.dataType);\n writeString(dataView, byteOffset + 4, field.name || field.attribute, 32);\n writeString(dataView, byteOffset + 160, field.description || '', 32);\n byteOffset += EXTRA_BYTES_DESCRIPTOR_LENGTH;\n }\n const bytes = new Uint8Array(VLR_HEADER_LENGTH + payload.byteLength);\n const headerView = new DataView(bytes.buffer);\n writeString(headerView, 2, 'LASF_Spec', 16);\n headerView.setUint16(18, 4, true);\n headerView.setUint16(20, payload.byteLength, true);\n writeString(headerView, 22, 'Extra Bytes', 32);\n bytes.set(payload, VLR_HEADER_LENGTH);\n return bytes;\n}\n\n/** Encode projection and Extra Bytes VLRs in the order used by the public header. */\nfunction encodeMetadataVLRs(\n fields: readonly LASExtraByteField[],\n options: LASWriterOptions\n): Uint8Array {\n const records: Uint8Array[] = [];\n if (options.las?.wktMathTransform) {\n records.push(encodeProjectionVLR(2111, 'WKT Math Transform', options.las.wktMathTransform));\n }\n if (options.las?.wkt) {\n records.push(encodeProjectionVLR(2112, 'WKT Coordinate System', options.las.wkt));\n }\n const extraBytesVLR = encodeExtraBytesVLR(fields);\n if (extraBytesVLR.byteLength) {\n records.push(extraBytesVLR);\n }\n const byteLength = records.reduce((total, record) => total + record.byteLength, 0);\n const bytes = new Uint8Array(byteLength);\n let offset = 0;\n for (const record of records) {\n bytes.set(record, offset);\n offset += record.byteLength;\n }\n return bytes;\n}\n\n/** Encode one LAS WKT projection VLR. */\nfunction encodeProjectionVLR(recordId: 2111 | 2112, description: string, wkt: string): Uint8Array {\n const payload = new TextEncoder().encode(`${wkt}\\0`);\n if (payload.byteLength > 0xffff) {\n throw new Error(`LASWriter: WKT VLR ${recordId} exceeds the LAS VLR size limit`);\n }\n const bytes = new Uint8Array(VLR_HEADER_LENGTH + payload.byteLength);\n const dataView = new DataView(bytes.buffer);\n writeString(dataView, 2, 'LASF_Projection', 16);\n dataView.setUint16(18, recordId, true);\n dataView.setUint16(20, payload.byteLength, true);\n writeString(dataView, 22, description, 32);\n bytes.set(payload, VLR_HEADER_LENGTH);\n return bytes;\n}\n\n/** Count the VLR records emitted by the metadata encoder. */\nfunction countMetadataVLRs(\n fields: readonly LASExtraByteField[],\n options: LASWriterOptions\n): number {\n return (\n (options.las?.wktMathTransform ? 1 : 0) + (options.las?.wkt ? 1 : 0) + (fields.length ? 1 : 0)\n );\n}\n\n/** Return the finite GPS time range needed by the LAS 1.5 public header. */\nfunction getGpsTimeRange(\n attribute: MeshAttribute | undefined,\n vertexCount: number\n): {minimum: number; maximum: number} {\n if (!attribute) {\n return {minimum: 0, maximum: 0};\n }\n let minimum = Number(attribute.value[0]);\n let maximum = minimum;\n for (let vertexIndex = 1; vertexIndex < vertexCount; vertexIndex++) {\n const value = Number(attribute.value[vertexIndex * attribute.size]);\n minimum = Math.min(minimum, value);\n maximum = Math.max(maximum, value);\n }\n return {minimum, maximum};\n}\n\n/** Validate that the Extra Bytes VLR payload fits its 16-bit length field. */\nfunction validateExtraBytesVLR(fields: readonly LASExtraByteField[]): void {\n const payloadByteLength = fields.length * EXTRA_BYTES_DESCRIPTOR_LENGTH;\n if (payloadByteLength > 0xffff) {\n throw new Error(\n `LASWriter: Extra Bytes VLR payload ${payloadByteLength} exceeds the LAS limit`\n );\n }\n}\n\n/** Validate the currently supported LAZ container writer surface. */\nfunction validateLAZOptions(\n version: string,\n pointDataRecordFormat: number,\n chunkSize?: number\n): void {\n if (pointDataRecordFormat === 1 && !['1.1', '1.2', '1.3', '1.4', '1.5'].includes(version)) {\n throw new Error(`LASWriter: LAZ PDRF 1 output requires LAS 1.1 or newer; received ${version}`);\n }\n if (\n pointDataRecordFormat >= 2 &&\n pointDataRecordFormat <= 3 &&\n !['1.2', '1.3', '1.4', '1.5'].includes(version)\n ) {\n throw new Error(\n `LASWriter: LAZ PDRF ${pointDataRecordFormat} output requires LAS 1.2 or newer; received ${version}`\n );\n }\n if (\n pointDataRecordFormat >= 4 &&\n pointDataRecordFormat <= 5 &&\n !['1.3', '1.4', '1.5'].includes(version)\n ) {\n throw new Error(\n `LASWriter: LAZ PDRF ${pointDataRecordFormat} requires LAS 1.3 or newer; received ${version}`\n );\n }\n if (pointDataRecordFormat >= 6 && !['1.4', '1.5'].includes(version)) {\n throw new Error(`LASWriter: LAZ output requires LAS 1.4; received ${version}`);\n }\n if (![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].includes(pointDataRecordFormat)) {\n throw new Error(\n `LASWriter: LAZ output currently supports point data record formats 0-10; received ${pointDataRecordFormat}`\n );\n }\n if (\n chunkSize !== undefined &&\n (!Number.isInteger(chunkSize) || chunkSize <= 0 || chunkSize > 0xffffffff)\n ) {\n throw new Error(`LASWriter: invalid LAZ chunk size ${chunkSize}`);\n }\n}\n\n/** Return mesh data as a Mesh, converting MeshArrowTable input first. */\nfunction normalizeMesh(data: Mesh | MeshArrowTable | Table): Mesh {\n if (!('attributes' in data)) {\n return convertTableToMesh(data);\n }\n return data as Mesh;\n}\n\n/** Return mesh data as a MeshArrowTable, converting plain Mesh data first. */\nfunction normalizeMeshArrowTable(data: Mesh | MeshArrowTable | Table): MeshArrowTable | Table {\n return !('attributes' in data) ? data : convertMeshToArrowTableWrapper(data as Mesh);\n}\n\n/** Merge buffered mesh batches for `encodeInBatches`. */\nfunction mergeMeshBatches(\n batches: (Mesh | MeshArrowTable | Table)[]\n): Mesh | MeshArrowTable | Table {\n if (batches.length === 0) {\n throw new Error('LASWriter: at least one input batch is required');\n }\n if (batches.length === 1) {\n return batches[0];\n }\n\n const meshes = batches.map(batch => convertTableToMesh(normalizeMeshArrowTable(batch)));\n const firstMesh = meshes[0];\n const mergedAttributes: Mesh['attributes'] = {};\n\n validateBatchAttributes(meshes);\n\n for (const attributeName of Object.keys(firstMesh.attributes)) {\n const firstAttribute = firstMesh.attributes[attributeName];\n const values = meshes.map(mesh => mesh.attributes[attributeName]?.value);\n if (values.some(value => !value)) {\n continue;\n }\n const totalLength = values.reduce((length, value) => length + value!.length, 0);\n const Constructor = firstAttribute.value.constructor as new (\n length: number\n ) => typeof firstAttribute.value;\n const mergedValue = new Constructor(totalLength);\n let offset = 0;\n for (const value of values) {\n mergedValue.set(value!, offset);\n offset += value!.length;\n }\n mergedAttributes[attributeName] = {...firstAttribute, value: mergedValue};\n }\n\n return {\n ...firstMesh,\n attributes: mergedAttributes,\n header: {\n ...firstMesh.header,\n vertexCount:\n getRequiredAttribute({...firstMesh, attributes: mergedAttributes}, 'POSITION').value\n .length / 3\n }\n };\n}\n\n/** Ensure batched meshes expose the same attributes and typed layouts. */\nfunction validateBatchAttributes(meshes: Mesh[]): void {\n const attributeNames = Object.keys(meshes[0].attributes);\n for (const mesh of meshes.slice(1)) {\n const meshAttributeNames = Object.keys(mesh.attributes);\n if (\n meshAttributeNames.length !== attributeNames.length ||\n attributeNames.some(attributeName => !mesh.attributes[attributeName])\n ) {\n throw new Error('LASWriter: encodeInBatches requires consistent attribute names');\n }\n for (const attributeName of attributeNames) {\n const firstAttribute = meshes[0].attributes[attributeName];\n const attribute = mesh.attributes[attributeName];\n if (\n attribute.size !== firstAttribute.size ||\n attribute.value.constructor !== firstAttribute.value.constructor\n ) {\n throw new Error(`LASWriter: encodeInBatches requires a consistent ${attributeName} layout`);\n }\n }\n }\n}\n\n/** Return a required mesh attribute or throw a format-specific error. */\nfunction getRequiredAttribute(mesh: Mesh, attributeName: string): MeshAttribute {\n const attribute = mesh.attributes[attributeName];\n if (!attribute) {\n throw new Error(`LASWriter: ${attributeName} attribute is required`);\n }\n return attribute;\n}\n\n/** Validate the required LAS position attribute shape. */\nfunction validatePositionAttribute(attribute: MeshAttribute): void {\n if (attribute.size !== 3) {\n throw new Error(`LASWriter: POSITION attribute must have size 3`);\n }\n if (attribute.value.length % attribute.size !== 0) {\n throw new Error(`LASWriter: POSITION attribute length must be divisible by its size`);\n }\n}\n\n/** Validate coordinate quantization before writing LAS signed 32-bit coordinates. */\nfunction validateCoordinateEncoding(\n attribute: MeshAttribute,\n vertexCount: number,\n scale: [number, number, number],\n offset: [number, number, number]\n): void {\n for (let componentIndex = 0; componentIndex < 3; componentIndex++) {\n if (!Number.isFinite(scale[componentIndex]) || scale[componentIndex] <= 0) {\n throw new Error(`LASWriter: coordinate scale must be finite and positive`);\n }\n if (!Number.isFinite(offset[componentIndex])) {\n throw new Error(`LASWriter: coordinate offset must be finite`);\n }\n }\n for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++) {\n for (let componentIndex = 0; componentIndex < 3; componentIndex++) {\n const positionValue = attribute.value[vertexIndex * attribute.size + componentIndex];\n if (!Number.isFinite(positionValue)) {\n throw new Error(`LASWriter: POSITION values must be finite`);\n }\n const encodedValue = Math.round(\n (positionValue - offset[componentIndex]) / scale[componentIndex]\n );\n if (encodedValue < -2147483648 || encodedValue > 2147483647) {\n throw new Error(`LASWriter: encoded coordinate exceeds the signed 32-bit LAS range`);\n }\n }\n }\n}\n\n/** Validate lengths and component shapes for mapped optional point attributes. */\nfunction validateOptionalPointAttributes(mesh: Mesh, vertexCount: number): void {\n const scalarAttributeNames = [\n 'intensity',\n 'classification',\n 'gpsTime',\n 'scanAngle',\n 'userData',\n 'pointSourceId',\n 'returnNumber',\n 'numberOfReturns',\n 'scannerChannel',\n 'scanDirectionFlag',\n 'edgeOfFlightLine',\n 'synthetic',\n 'keyPoint',\n 'withheld',\n 'overlap',\n 'nir',\n 'wavePacketDescriptorIndex',\n 'wavePacketOffset',\n 'wavePacketSize',\n 'wavePacketReturnPoint'\n ];\n for (const attributeName of scalarAttributeNames) {\n const attribute = mesh.attributes[attributeName];\n if (attribute) {\n validateOptionalAttribute(attributeName, attribute, vertexCount, 1);\n }\n }\n const colorAttribute = mesh.attributes.COLOR_0;\n if (colorAttribute) {\n validateOptionalAttribute('COLOR_0', colorAttribute, vertexCount, 3, false);\n }\n const waveformVectorAttribute = mesh.attributes.wavePacketVector;\n if (waveformVectorAttribute) {\n validateOptionalAttribute('wavePacketVector', waveformVectorAttribute, vertexCount, 3);\n }\n}\n\n/** Validate return-number ranges against the selected LAS point-data format. */\nfunction validateReturnAttributes(\n mesh: Mesh,\n vertexCount: number,\n pointDataRecordFormat: number\n): void {\n const maximumReturnNumber = pointDataRecordFormat >= 6 ? 15 : 5;\n const returnNumberAttribute = mesh.attributes.returnNumber;\n const numberOfReturnsAttribute = mesh.attributes.numberOfReturns;\n for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++) {\n const returnNumber = getUInt8Attribute(returnNumberAttribute, vertexIndex, 1);\n const numberOfReturns = getUInt8Attribute(numberOfReturnsAttribute, vertexIndex, 1);\n if (returnNumber < 1 || returnNumber > maximumReturnNumber) {\n throw new Error(\n `LASWriter: returnNumber must be between 1 and ${maximumReturnNumber} for point data record format ${pointDataRecordFormat}`\n );\n }\n if (numberOfReturns < 1 || numberOfReturns > maximumReturnNumber) {\n throw new Error(\n `LASWriter: numberOfReturns must be between 1 and ${maximumReturnNumber} for point data record format ${pointDataRecordFormat}`\n );\n }\n if (returnNumber > numberOfReturns) {\n throw new Error(`LASWriter: returnNumber cannot exceed numberOfReturns`);\n }\n }\n}\n\n/** Validate one optional mapped attribute against the point count. */\nfunction validateOptionalAttribute(\n attributeName: string,\n attribute: MeshAttribute,\n vertexCount: number,\n minimumSize: number,\n requirePointCount = true\n): void {\n if (minimumSize === 1 ? attribute.size !== 1 : attribute.size < minimumSize) {\n throw new Error(`LASWriter: ${attributeName} attribute must have size ${minimumSize}`);\n }\n validateFiniteAttributeValues(attributeName, attribute);\n if (requirePointCount && attribute.value.length < vertexCount * attribute.size) {\n throw new Error(`LASWriter: ${attributeName} attribute is too short`);\n }\n if (!requirePointCount && attribute.value.length < attribute.size) {\n throw new Error(`LASWriter: ${attributeName} attribute is too short`);\n }\n}\n\n/** Reject NaN and infinite values before numeric LAS conversion. */\nfunction validateFiniteAttributeValues(attributeName: string, attribute: MeshAttribute): void {\n for (const value of attribute.value) {\n if (!Number.isFinite(Number(value))) {\n throw new Error(`LASWriter: ${attributeName} attribute must contain finite values`);\n }\n }\n}\n\n/** Write the LAS 1.2 public header block. */\nfunction writeHeader(\n dataView: DataView,\n parameters: LASWriteParameters & {\n /** Absolute point-data byte offset. */\n pointDataOffset: number;\n /** Number of VLR records before point data. */\n vlrCount?: number;\n /** Whether the point format byte carries the LASzip compression flag. */\n compressed?: boolean;\n }\n): void {\n const [versionMajor, versionMinor] = parameters.version.split('.').map(Number);\n writeString(dataView, 0, 'LASF', 4);\n dataView.setUint8(24, versionMajor);\n dataView.setUint8(25, versionMinor);\n writeString(dataView, 26, 'loaders.gl', 32);\n writeString(dataView, 58, 'loaders.gl', 32);\n dataView.setUint16(94, parameters.headerLength, true);\n dataView.setUint32(96, parameters.pointDataOffset, true);\n dataView.setUint32(100, parameters.vlrCount || 0, true);\n dataView.setUint8(104, parameters.pointDataRecordFormat | (parameters.compressed ? 0x80 : 0));\n dataView.setUint16(105, parameters.pointDataRecordLength, true);\n const isExtendedHeader = parameters.version === '1.4' || parameters.version === '1.5';\n dataView.setUint32(107, isExtendedHeader ? 0 : parameters.vertexCount, true);\n for (let returnIndex = 0; returnIndex < 5; returnIndex++) {\n dataView.setUint32(\n 111 + returnIndex * 4,\n isExtendedHeader ? 0 : parameters.returnCounts[returnIndex],\n true\n );\n }\n\n if (parameters.version === '1.5') {\n // LAS 1.5 requires WKT and stores the time range in the extended header.\n dataView.setUint16(\n 6,\n 0x10 | (parameters.hasGpsTime ? 1 : 0) | (parameters.timeOffset ? 0x40 : 0),\n true\n );\n } else if (parameters.version === '1.4' && parameters.hasWkt) {\n dataView.setUint16(6, 0x10, true);\n }\n\n dataView.setFloat64(131, parameters.scale[0], true);\n dataView.setFloat64(139, parameters.scale[1], true);\n dataView.setFloat64(147, parameters.scale[2], true);\n dataView.setFloat64(155, parameters.offset[0], true);\n dataView.setFloat64(163, parameters.offset[1], true);\n dataView.setFloat64(171, parameters.offset[2], true);\n dataView.setFloat64(179, parameters.boundingBox[1][0], true);\n dataView.setFloat64(187, parameters.boundingBox[0][0], true);\n dataView.setFloat64(195, parameters.boundingBox[1][1], true);\n dataView.setFloat64(203, parameters.boundingBox[0][1], true);\n dataView.setFloat64(211, parameters.boundingBox[1][2], true);\n dataView.setFloat64(219, parameters.boundingBox[0][2], true);\n\n if (isExtendedHeader) {\n writeUint64Fallback(dataView, 247, parameters.vertexCount);\n for (let returnIndex = 0; returnIndex < LAS_RETURN_BUCKET_COUNT; returnIndex++) {\n writeUint64Fallback(dataView, 255 + returnIndex * 8, parameters.returnCounts[returnIndex]);\n }\n }\n if (parameters.version === '1.5') {\n dataView.setFloat64(375, parameters.maxGpsTime, true);\n dataView.setFloat64(383, parameters.minGpsTime, true);\n dataView.setUint16(391, parameters.timeOffset, true);\n }\n}\n\n/** Write one LAS point record. */\nfunction writePointRecord(\n dataView: DataView,\n pointOffset: number,\n vertexIndex: number,\n pointDataRecordFormat: number,\n basePointDataRecordLength: number,\n attributes: {\n intensityAttribute?: MeshAttribute;\n classificationAttribute?: MeshAttribute;\n nirAttribute?: MeshAttribute;\n colorAttribute?: MeshAttribute;\n /** Declared source RGB component depth. */\n colorDepth?: number | string;\n gpsTimeAttribute?: MeshAttribute;\n scanAngleAttribute?: MeshAttribute;\n userDataAttribute?: MeshAttribute;\n pointSourceIdAttribute?: MeshAttribute;\n returnNumberAttribute?: MeshAttribute;\n numberOfReturnsAttribute?: MeshAttribute;\n scannerChannelAttribute?: MeshAttribute;\n scanDirectionFlagAttribute?: MeshAttribute;\n edgeOfFlightLineAttribute?: MeshAttribute;\n syntheticAttribute?: MeshAttribute;\n keyPointAttribute?: MeshAttribute;\n withheldAttribute?: MeshAttribute;\n overlapAttribute?: MeshAttribute;\n waveformDescriptorAttribute?: MeshAttribute;\n waveformOffsetAttribute?: MeshAttribute;\n waveformSizeAttribute?: MeshAttribute;\n waveformReturnPointAttribute?: MeshAttribute;\n waveformVectorAttribute?: MeshAttribute;\n extraByteFields: readonly LASExtraByteField[];\n }\n): void {\n dataView.setUint16(\n pointOffset + 12,\n getUInt16Attribute(attributes.intensityAttribute, vertexIndex),\n true\n );\n\n if (pointDataRecordFormat <= 5) {\n const returnNumber = getUInt8Attribute(attributes.returnNumberAttribute, vertexIndex, 1) & 7;\n const numberOfReturns =\n getUInt8Attribute(attributes.numberOfReturnsAttribute, vertexIndex, 1) & 7;\n dataView.setUint8(pointOffset + 14, returnNumber | (numberOfReturns << 3));\n dataView.setUint8(\n pointOffset + 15,\n getUInt8Attribute(attributes.classificationAttribute, vertexIndex) & 0x1f\n );\n dataView.setInt8(\n pointOffset + 16,\n getInt16Attribute(attributes.scanAngleAttribute, vertexIndex)\n );\n dataView.setUint8(\n pointOffset + 17,\n getUInt8Attribute(attributes.userDataAttribute, vertexIndex)\n );\n dataView.setUint16(\n pointOffset + 18,\n getUInt16Attribute(attributes.pointSourceIdAttribute, vertexIndex),\n true\n );\n if (pointDataRecordFormat === 1 || pointDataRecordFormat === 3 || pointDataRecordFormat >= 4) {\n dataView.setFloat64(\n pointOffset + 20,\n getAttributeValue(attributes.gpsTimeAttribute, vertexIndex),\n true\n );\n }\n if (pointDataRecordFormat === 4 || pointDataRecordFormat === 5) {\n const waveformOffset = pointDataRecordFormat === 4 ? 28 : 34;\n writeWaveformPacket(dataView, pointOffset + waveformOffset, vertexIndex, attributes);\n }\n } else {\n const returnNumber = getUInt8Attribute(attributes.returnNumberAttribute, vertexIndex, 1) & 0x0f;\n const numberOfReturns =\n getUInt8Attribute(attributes.numberOfReturnsAttribute, vertexIndex, 1) & 0x0f;\n const scannerChannel = getUInt8Attribute(attributes.scannerChannelAttribute, vertexIndex) & 3;\n const returnFlags = returnNumber | (numberOfReturns << 4);\n const classificationFlags =\n (getBooleanAttribute(attributes.syntheticAttribute, vertexIndex) ? 1 << 0 : 0) |\n (getBooleanAttribute(attributes.keyPointAttribute, vertexIndex) ? 1 << 1 : 0) |\n (getBooleanAttribute(attributes.withheldAttribute, vertexIndex) ? 1 << 2 : 0) |\n (getBooleanAttribute(attributes.overlapAttribute, vertexIndex) ? 1 << 3 : 0) |\n (scannerChannel << 4) |\n (getBooleanAttribute(attributes.scanDirectionFlagAttribute, vertexIndex) ? 1 << 6 : 0) |\n (getBooleanAttribute(attributes.edgeOfFlightLineAttribute, vertexIndex) ? 1 << 7 : 0);\n dataView.setUint8(pointOffset + 14, returnFlags);\n dataView.setUint8(pointOffset + 15, classificationFlags);\n dataView.setUint8(\n pointOffset + 16,\n getUInt8Attribute(attributes.classificationAttribute, vertexIndex)\n );\n dataView.setUint8(\n pointOffset + 17,\n getUInt8Attribute(attributes.userDataAttribute, vertexIndex)\n );\n dataView.setInt16(\n pointOffset + 18,\n getInt16Attribute(attributes.scanAngleAttribute, vertexIndex),\n true\n );\n dataView.setUint16(\n pointOffset + 20,\n getUInt16Attribute(attributes.pointSourceIdAttribute, vertexIndex),\n true\n );\n dataView.setFloat64(\n pointOffset + 22,\n getAttributeValue(attributes.gpsTimeAttribute, vertexIndex),\n true\n );\n if (pointDataRecordFormat === 9 || pointDataRecordFormat === 10) {\n const waveformOffset = pointDataRecordFormat === 9 ? 30 : 38;\n writeWaveformPacket(dataView, pointOffset + waveformOffset, vertexIndex, attributes);\n }\n }\n\n writePointColor(\n dataView,\n pointOffset,\n vertexIndex,\n pointDataRecordFormat,\n attributes.colorAttribute,\n attributes.colorDepth\n );\n if (pointDataRecordFormat === 8 || pointDataRecordFormat === 10) {\n dataView.setUint16(\n pointOffset + 36,\n getUInt16Attribute(attributes.nirAttribute, vertexIndex),\n true\n );\n }\n writeExtraBytes(\n dataView,\n pointOffset,\n vertexIndex,\n basePointDataRecordLength,\n attributes.extraByteFields\n );\n}\n\n/** Write one 29-byte LAS waveform packet reference. */\nfunction writeWaveformPacket(\n dataView: DataView,\n byteOffset: number,\n vertexIndex: number,\n attributes: {\n waveformDescriptorAttribute?: MeshAttribute;\n waveformOffsetAttribute?: MeshAttribute;\n waveformSizeAttribute?: MeshAttribute;\n waveformReturnPointAttribute?: MeshAttribute;\n waveformVectorAttribute?: MeshAttribute;\n }\n): void {\n dataView.setUint8(\n byteOffset,\n getUInt8Attribute(attributes.waveformDescriptorAttribute, vertexIndex)\n );\n dataView.setBigUint64(\n byteOffset + 1,\n getBigUint64Attribute(attributes.waveformOffsetAttribute, vertexIndex),\n true\n );\n dataView.setUint32(\n byteOffset + 9,\n getUInt32Attribute(attributes.waveformSizeAttribute, vertexIndex),\n true\n );\n dataView.setFloat32(\n byteOffset + 13,\n getAttributeValue(attributes.waveformReturnPointAttribute, vertexIndex),\n true\n );\n for (let componentIndex = 0; componentIndex < 3; componentIndex++) {\n dataView.setFloat32(\n byteOffset + 17 + componentIndex * 4,\n getComponent(attributes.waveformVectorAttribute, vertexIndex, componentIndex),\n true\n );\n }\n}\n\n/** Write configured Extra Bytes values into one raw LAS point record. */\nfunction writeExtraBytes(\n dataView: DataView,\n pointOffset: number,\n vertexIndex: number,\n basePointDataRecordLength: number,\n fields: readonly LASExtraByteField[]\n): void {\n let byteOffset = pointOffset + basePointDataRecordLength;\n for (const field of fields) {\n for (let componentIndex = 0; componentIndex < field.componentCount; componentIndex++) {\n writeExtraBytesValue(dataView, byteOffset, vertexIndex, componentIndex, field);\n byteOffset += field.byteLength / field.componentCount;\n }\n }\n}\n\n/** Write one typed Extra Bytes component using its LAS data type code. */\nfunction writeExtraBytesValue(\n dataView: DataView,\n byteOffset: number,\n vertexIndex: number,\n componentIndex: number,\n field: LASExtraByteField\n): void {\n const value = field.meshAttribute.value[vertexIndex * field.componentCount + componentIndex];\n const scalarDataType =\n field.dataType > 20\n ? field.dataType - 20\n : field.dataType > 10\n ? field.dataType - 10\n : field.dataType;\n switch (scalarDataType) {\n case 1:\n dataView.setUint8(byteOffset, Number(value));\n break;\n case 2:\n dataView.setInt8(byteOffset, Number(value));\n break;\n case 3:\n dataView.setUint16(byteOffset, Number(value), true);\n break;\n case 4:\n dataView.setInt16(byteOffset, Number(value), true);\n break;\n case 5:\n dataView.setUint32(byteOffset, Number(value), true);\n break;\n case 6:\n dataView.setInt32(byteOffset, Number(value), true);\n break;\n case 7:\n dataView.setBigUint64(byteOffset, BigInt(value), true);\n break;\n case 8:\n dataView.setBigInt64(byteOffset, BigInt(value), true);\n break;\n case 9:\n dataView.setFloat32(byteOffset, Number(value), true);\n break;\n case 10:\n dataView.setFloat64(byteOffset, Number(value), true);\n break;\n default:\n throw new Error(`LASWriter: unsupported Extra Bytes data type ${field.dataType}`);\n }\n}\n\n/** Write RGB values for point formats that include color. */\nfunction writePointColor(\n dataView: DataView,\n pointOffset: number,\n vertexIndex: number,\n pointDataRecordFormat: number,\n colorAttribute?: MeshAttribute,\n colorDepth?: number | string\n): void {\n const colorOffset = getColorOffset(pointDataRecordFormat);\n if (colorOffset < 0 || !colorAttribute) {\n return;\n }\n dataView.setUint16(\n pointOffset + colorOffset,\n getLASColor(colorAttribute, vertexIndex, 0, colorDepth),\n true\n );\n dataView.setUint16(\n pointOffset + colorOffset + 2,\n getLASColor(colorAttribute, vertexIndex, 1, colorDepth),\n true\n );\n dataView.setUint16(\n pointOffset + colorOffset + 4,\n getLASColor(colorAttribute, vertexIndex, 2, colorDepth),\n true\n );\n}\n\nfunction getColorOffset(pointDataRecordFormat: number): number {\n switch (pointDataRecordFormat) {\n case 2:\n return 20;\n case 3:\n return 28;\n case 5:\n return 57;\n case 7:\n case 8:\n case 10:\n return 30;\n default:\n return -1;\n }\n}\n\nfunction getDefaultPointDataRecordFormat(\n options: LASWriterOptions,\n colorAttribute?: MeshAttribute\n): number {\n if (options.las?.format === 'laz' || options.las?.version === '1.4') {\n return colorAttribute ? 7 : 6;\n }\n return colorAttribute ? 2 : 0;\n}\n\nfunction writeUint64Fallback(dataView: DataView, byteOffset: number, value: number): void {\n dataView.setUint32(byteOffset, value >>> 0, true);\n dataView.setUint32(byteOffset + 4, Math.floor(value / 2 ** 32), true);\n}\n\n/** Write a fixed-length ASCII string into a DataView. */\nfunction writeString(\n dataView: DataView,\n byteOffset: number,\n text: string,\n byteLength: number\n): void {\n if (/[^\\x00-\\x7f]/.test(text)) {\n throw new Error('LASWriter fixed-width text must be ASCII');\n }\n for (let characterIndex = 0; characterIndex < byteLength; characterIndex++) {\n dataView.setUint8(byteOffset + characterIndex, text.charCodeAt(characterIndex) || 0);\n }\n}\n\n/** Return a single attribute component with 0 as the missing component fallback. */\nfunction getComponent(\n attribute: MeshAttribute | undefined,\n vertexIndex: number,\n componentIndex: number\n): number {\n return attribute ? attribute.value[vertexIndex * attribute.size + componentIndex] || 0 : 0;\n}\n\n/** Return a LAS UInt16 attribute value. */\nfunction getUInt16Attribute(attribute: MeshAttribute | undefined, vertexIndex: number): number {\n return attribute\n ? Math.max(0, Math.min(65535, Math.round(getComponent(attribute, vertexIndex, 0))))\n : 0;\n}\n\n/** Return a LAS unsigned 32-bit attribute value. */\nfunction getUInt32Attribute(attribute: MeshAttribute | undefined, vertexIndex: number): number {\n return attribute\n ? Math.max(0, Math.min(0xffffffff, Math.round(getComponent(attribute, vertexIndex, 0))))\n : 0;\n}\n\n/** Return a lossless unsigned 64-bit waveform offset attribute value. */\nfunction getBigUint64Attribute(attribute: MeshAttribute | undefined, vertexIndex: number): bigint {\n if (!attribute) {\n return 0n;\n }\n const value = attribute.value[vertexIndex * attribute.size];\n return typeof value === 'bigint' ? value : BigInt(Math.max(0, Math.round(Number(value))));\n}\n\n/** Return a LAS UInt8 attribute value. */\nfunction getUInt8Attribute(\n attribute: MeshAttribute | undefined,\n vertexIndex: number,\n defaultValue = 0\n): number {\n return attribute\n ? Math.max(0, Math.min(255, Math.round(getComponent(attribute, vertexIndex, 0))))\n : defaultValue;\n}\n\n/** Return a LAS signed 16-bit attribute value. */\nfunction getInt16Attribute(attribute: MeshAttribute | undefined, vertexIndex: number): number {\n return attribute\n ? Math.max(-32768, Math.min(32767, Math.round(getComponent(attribute, vertexIndex, 0))))\n : 0;\n}\n\n/** Return a numeric point attribute value, using zero when it is absent. */\nfunction getAttributeValue(attribute: MeshAttribute | undefined, vertexIndex: number): number {\n return attribute ? getComponent(attribute, vertexIndex, 0) : 0;\n}\n\n/** Return a point flag attribute as a boolean. */\nfunction getBooleanAttribute(attribute: MeshAttribute | undefined, vertexIndex: number): boolean {\n return Boolean(getAttributeValue(attribute, vertexIndex));\n}\n\n/** Count point records by return number for the LAS header histograms. */\nfunction getReturnCounts(\n returnNumberAttribute: MeshAttribute | undefined,\n vertexCount: number\n): number[] {\n const returnCounts = new Array<number>(LAS_RETURN_BUCKET_COUNT).fill(0);\n for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++) {\n const returnNumber = getUInt8Attribute(returnNumberAttribute, vertexIndex, 1) & 0x0f;\n if (returnNumber >= 1 && returnNumber <= LAS_RETURN_BUCKET_COUNT) {\n returnCounts[returnNumber - 1]++;\n }\n }\n return returnCounts;\n}\n\n/** Return one color component as a LAS UInt16 color value. */\nfunction getLASColor(\n attribute: MeshAttribute,\n vertexIndex: number,\n componentIndex: number,\n colorDepth?: number | string\n): number {\n const value = getComponent(attribute, vertexIndex, componentIndex);\n if (attribute.normalized) {\n return scaleNormalizedColor(attribute, value);\n }\n\n if (colorDepth === 8) return clampUInt16(value * 257);\n if (colorDepth === 16) return clampUInt16(value);\n\n if (value <= 1) {\n return clampUInt16(value * 65535);\n }\n\n if (value <= 255) {\n return clampUInt16(value * 257);\n }\n\n return clampUInt16(value);\n}\n\n/** Return a normalized color component scaled to the LAS UInt16 color range. */\nfunction scaleNormalizedColor(attribute: MeshAttribute, value: number): number {\n const componentMaximum = getComponentMaximum(attribute.value);\n return clampUInt16((value / componentMaximum) * 65535);\n}\n\n/** Return the component maximum used by the color attribute's typed array. */\nfunction getComponentMaximum(values: MeshAttribute['value']): number {\n if (values instanceof Uint8Array || values instanceof Uint8ClampedArray) {\n return 255;\n }\n if (values instanceof Uint16Array) {\n return 65535;\n }\n return 1;\n}\n\n/** Clamp a number to the LAS UInt16 range. */\nfunction clampUInt16(value: number): number {\n return Math.max(0, Math.min(65535, Math.round(value)));\n}\n\n/** Compute position bounds, using a finite zero box when there are no points. */\nfunction getBoundingBox(\n positionAttribute: MeshAttribute,\n vertexCount: number\n): [[number, number, number], [number, number, number]] {\n if (vertexCount === 0) {\n return [\n [0, 0, 0],\n [0, 0, 0]\n ];\n }\n const minimum: [number, number, number] = [\n Number.POSITIVE_INFINITY,\n Number.POSITIVE_INFINITY,\n Number.POSITIVE_INFINITY\n ];\n const maximum: [number, number, number] = [\n Number.NEGATIVE_INFINITY,\n Number.NEGATIVE_INFINITY,\n Number.NEGATIVE_INFINITY\n ];\n\n for (let vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++) {\n for (let componentIndex = 0; componentIndex < 3; componentIndex++) {\n const value = getComponent(positionAttribute, vertexIndex, componentIndex);\n minimum[componentIndex] = Math.min(minimum[componentIndex], value);\n maximum[componentIndex] = Math.max(maximum[componentIndex], value);\n }\n }\n\n return [minimum, maximum];\n}\n\n/** Return LAS coordinate scale factors from options, metadata, or defaults. */\nfunction getScale(mesh: Mesh, options: LASWriterOptions): [number, number, number] {\n return (\n options.las?.scale || getNumericTuple(mesh.schema.metadata?.las_scale) || [0.001, 0.001, 0.001]\n );\n}\n\n/** Return LAS coordinate offsets from options, metadata, or the mesh minimum position. */\nfunction getOffset(\n mesh: Mesh,\n options: LASWriterOptions,\n boundingBox: [[number, number, number], [number, number, number]]\n): [number, number, number] {\n return options.las?.offset || getNumericTuple(mesh.schema.metadata?.las_offset) || boundingBox[0];\n}\n\n/** Parse a three-number metadata tuple encoded as JSON. */\nfunction getNumericTuple(value: unknown): [number, number, number] | undefined {\n if (typeof value !== 'string') {\n return undefined;\n }\n\n try {\n const parsedValue = JSON.parse(value);\n return Array.isArray(parsedValue) &&\n parsedValue.length === 3 &&\n parsedValue.every(component => typeof component === 'number')\n ? [parsedValue[0], parsedValue[1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AACjF,SACE,QAAQ,KAAK,SAAS,gBAAgB,KAAK,OAAO,UAAU,SAAS,KAAK,CAAC,MAAO,MAAO,IAAK;AAElG;AAGA,SAAS,UACP,MACA,SACA,aAC0B;AAC1B,SAAO,QAAQ,KAAK,UAAU,gBAAgB,KAAK,OAAO,UAAU,UAAU,KAAK,YAAY,CAAC;AAClG;AAGA,SAAS,gBAAgB,OAAsD;AAC7E,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,cAAc,KAAK,MAAM,KAAK;AACpC,WAAO,MAAM,QAAQ,WAAW,KAC9B,YAAY,WAAW,KACvB,YAAY,MAAM,eAAa,OAAO,cAAc,QAAQ,IAC1D,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,GAAG,YAAY,CAAC,CAAC,IAC/C;AAAA,EACN,QAAQ;AACN,WAAO;AAAA,EACT;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"las-writer.d.ts","sourceRoot":"","sources":["../src/las-writer.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"las-writer.js","sourceRoot":"","sources":["../src/las-writer.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/laz-rs-loader-types.ts
|
|
31
|
+
var laz_rs_loader_types_exports = {};
|
|
32
|
+
__export(laz_rs_loader_types_exports, {
|
|
33
|
+
LAZRsLoader: () => LAZRsLoader
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(laz_rs_loader_types_exports);
|
|
36
|
+
|
|
37
|
+
// src/las/laz-rs-loader-types.ts
|
|
38
|
+
var import_las_loader_shared = require("./las-loader-shared.cjs");
|
|
39
|
+
var LAZRsLoader = {
|
|
40
|
+
...import_las_loader_shared.LAS_LOADER_METADATA,
|
|
41
|
+
name: "LAS (laz-rs)",
|
|
42
|
+
preload: async () => {
|
|
43
|
+
const { LAZRsLoaderWithParser } = await import("@loaders.gl/pointclouds/laz-rs-loader");
|
|
44
|
+
return LAZRsLoaderWithParser;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
LAZRsLoader
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=laz-rs-loader-types.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/laz-rs-loader-types.ts", "../src/las/laz-rs-loader-types.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './las/laz-rs-loader-types.js';\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// LASER (LAS) FILE FORMAT\nimport type {Loader} from '@loaders.gl/core/loader-utils';\nimport type {Table, RecordBatch} from 'apache-arrow';\nimport {LAS_LOADER_METADATA, type LASLoaderOptions} from './las-loader-shared';\nimport type {LASMesh} from './lib/las-types';\n\n/**\n * Metadata-only loader for the LAS (LASer) point cloud format.\n */\nexport const LAZRsLoader = {\n ...LAS_LOADER_METADATA,\n name: 'LAS (laz-rs)',\n preload: async () => {\n const {LAZRsLoaderWithParser} = await import('@loaders.gl/pointclouds/laz-rs-loader');\n return LAZRsLoaderWithParser;\n }\n} as const satisfies Loader<LASMesh | Table, LASMesh | RecordBatch, LASLoaderOptions>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,+BAAyD;AAMlD,IAAM,cAAc;AAAA,EACzB,GAAG;AAAA,EACH,MAAM;AAAA,EACN,SAAS,YAAY;AACnB,UAAM,EAAC,sBAAqB,IAAI,MAAM,OAAO,uCAAuC;AACpF,WAAO;AAAA,EACT;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laz-rs-loader-types.d.ts","sourceRoot":"","sources":["../src/laz-rs-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laz-rs-loader-types.js","sourceRoot":"","sources":["../src/laz-rs-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/laz-rs-loader.ts
|
|
21
|
+
var laz_rs_loader_exports = {};
|
|
22
|
+
__export(laz_rs_loader_exports, {
|
|
23
|
+
LAZRsLoaderWithParser: () => LAZRsLoaderWithParser
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(laz_rs_loader_exports);
|
|
26
|
+
|
|
27
|
+
// src/las/laz-rs-loader.ts
|
|
28
|
+
var import_las_loader = require("./las-loader.cjs");
|
|
29
|
+
var import_schema_utils = require("@loaders.gl/core/schema-utils");
|
|
30
|
+
var import_las_loader_shared = require("./las-loader-shared.cjs");
|
|
31
|
+
var import_parse_las = require("./lib/laz-rs-wasm/parse-las.cjs");
|
|
32
|
+
|
|
33
|
+
// src/las/libs/laz-rs-wasm/laz_rs_wasm.js
|
|
34
|
+
var import_meta = {};
|
|
35
|
+
var wasm;
|
|
36
|
+
var cachedUint8ArrayMemory0 = null;
|
|
37
|
+
function getUint8ArrayMemory0() {
|
|
38
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
39
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
40
|
+
}
|
|
41
|
+
return cachedUint8ArrayMemory0;
|
|
42
|
+
}
|
|
43
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
44
|
+
ptr = ptr >>> 0;
|
|
45
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
46
|
+
}
|
|
47
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
|
|
48
|
+
throw Error("TextDecoder not available");
|
|
49
|
+
} };
|
|
50
|
+
if (typeof TextDecoder !== "undefined") {
|
|
51
|
+
cachedTextDecoder.decode();
|
|
52
|
+
}
|
|
53
|
+
function getStringFromWasm0(ptr, len) {
|
|
54
|
+
ptr = ptr >>> 0;
|
|
55
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
56
|
+
}
|
|
57
|
+
var WASM_VECTOR_LEN = 0;
|
|
58
|
+
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
59
|
+
throw Error("TextEncoder not available");
|
|
60
|
+
} };
|
|
61
|
+
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
62
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
63
|
+
} : function(arg, view) {
|
|
64
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
65
|
+
view.set(buf);
|
|
66
|
+
return {
|
|
67
|
+
read: arg.length,
|
|
68
|
+
written: buf.length
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
72
|
+
if (realloc === void 0) {
|
|
73
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
74
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
75
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
76
|
+
WASM_VECTOR_LEN = buf.length;
|
|
77
|
+
return ptr2;
|
|
78
|
+
}
|
|
79
|
+
let len = arg.length;
|
|
80
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
81
|
+
const mem = getUint8ArrayMemory0();
|
|
82
|
+
let offset = 0;
|
|
83
|
+
for (; offset < len; offset++) {
|
|
84
|
+
const code = arg.charCodeAt(offset);
|
|
85
|
+
if (code > 127) break;
|
|
86
|
+
mem[ptr + offset] = code;
|
|
87
|
+
}
|
|
88
|
+
if (offset !== len) {
|
|
89
|
+
if (offset !== 0) {
|
|
90
|
+
arg = arg.slice(offset);
|
|
91
|
+
}
|
|
92
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
93
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
94
|
+
const ret = encodeString(arg, view);
|
|
95
|
+
offset += ret.written;
|
|
96
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
97
|
+
}
|
|
98
|
+
WASM_VECTOR_LEN = offset;
|
|
99
|
+
return ptr;
|
|
100
|
+
}
|
|
101
|
+
var cachedDataViewMemory0 = null;
|
|
102
|
+
function getDataViewMemory0() {
|
|
103
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
104
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
105
|
+
}
|
|
106
|
+
return cachedDataViewMemory0;
|
|
107
|
+
}
|
|
108
|
+
var WasmLasZipDecompressorFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
109
|
+
}, unregister: () => {
|
|
110
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasmlaszipdecompressor_free(ptr >>> 0, 1));
|
|
111
|
+
var WasmQuickHeaderFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
112
|
+
}, unregister: () => {
|
|
113
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasmquickheader_free(ptr >>> 0, 1));
|
|
114
|
+
async function __wbg_load(module2, imports) {
|
|
115
|
+
if (typeof Response === "function" && module2 instanceof Response) {
|
|
116
|
+
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
117
|
+
try {
|
|
118
|
+
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
if (module2.headers.get("Content-Type") != "application/wasm") {
|
|
121
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
122
|
+
} else {
|
|
123
|
+
throw e;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const bytes = await module2.arrayBuffer();
|
|
128
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
129
|
+
} else {
|
|
130
|
+
const instance = await WebAssembly.instantiate(module2, imports);
|
|
131
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
132
|
+
return { instance, module: module2 };
|
|
133
|
+
} else {
|
|
134
|
+
return instance;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function __wbg_get_imports() {
|
|
139
|
+
const imports = {};
|
|
140
|
+
imports.wbg = {};
|
|
141
|
+
imports.wbg.__wbindgen_copy_to_typed_array = function(arg0, arg1, arg2) {
|
|
142
|
+
new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));
|
|
143
|
+
};
|
|
144
|
+
imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
|
|
145
|
+
const ret = arg0.buffer;
|
|
146
|
+
return ret;
|
|
147
|
+
};
|
|
148
|
+
imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {
|
|
149
|
+
const ret = new Uint8Array(arg0);
|
|
150
|
+
return ret;
|
|
151
|
+
};
|
|
152
|
+
imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {
|
|
153
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
154
|
+
};
|
|
155
|
+
imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {
|
|
156
|
+
const ret = arg0.length;
|
|
157
|
+
return ret;
|
|
158
|
+
};
|
|
159
|
+
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
160
|
+
const ret = new Error();
|
|
161
|
+
return ret;
|
|
162
|
+
};
|
|
163
|
+
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
164
|
+
const ret = arg1.stack;
|
|
165
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
166
|
+
const len1 = WASM_VECTOR_LEN;
|
|
167
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
168
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
169
|
+
};
|
|
170
|
+
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
171
|
+
let deferred0_0;
|
|
172
|
+
let deferred0_1;
|
|
173
|
+
try {
|
|
174
|
+
deferred0_0 = arg0;
|
|
175
|
+
deferred0_1 = arg1;
|
|
176
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
177
|
+
} finally {
|
|
178
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
182
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
183
|
+
};
|
|
184
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
185
|
+
const ret = wasm.memory;
|
|
186
|
+
return ret;
|
|
187
|
+
};
|
|
188
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
189
|
+
const table = wasm.__wbindgen_export_0;
|
|
190
|
+
const offset = table.grow(4);
|
|
191
|
+
table.set(0, void 0);
|
|
192
|
+
table.set(offset + 0, void 0);
|
|
193
|
+
table.set(offset + 1, null);
|
|
194
|
+
table.set(offset + 2, true);
|
|
195
|
+
table.set(offset + 3, false);
|
|
196
|
+
;
|
|
197
|
+
};
|
|
198
|
+
return imports;
|
|
199
|
+
}
|
|
200
|
+
function __wbg_init_memory(imports, memory) {
|
|
201
|
+
}
|
|
202
|
+
function __wbg_finalize_init(instance, module2) {
|
|
203
|
+
wasm = instance.exports;
|
|
204
|
+
__wbg_init.__wbindgen_wasm_module = module2;
|
|
205
|
+
cachedDataViewMemory0 = null;
|
|
206
|
+
cachedUint8ArrayMemory0 = null;
|
|
207
|
+
wasm.__wbindgen_start();
|
|
208
|
+
return wasm;
|
|
209
|
+
}
|
|
210
|
+
async function __wbg_init(module_or_path) {
|
|
211
|
+
if (wasm !== void 0) return wasm;
|
|
212
|
+
if (typeof module_or_path !== "undefined") {
|
|
213
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
214
|
+
({ module_or_path } = module_or_path);
|
|
215
|
+
} else {
|
|
216
|
+
console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (typeof module_or_path === "undefined") {
|
|
220
|
+
module_or_path = new URL("laz_rs_wasm_bg.wasm", import_meta.url);
|
|
221
|
+
}
|
|
222
|
+
const imports = __wbg_get_imports();
|
|
223
|
+
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
|
|
224
|
+
module_or_path = loadWasmModule(module_or_path);
|
|
225
|
+
}
|
|
226
|
+
__wbg_init_memory(imports);
|
|
227
|
+
const { instance, module: module2 } = await __wbg_load(await module_or_path, imports);
|
|
228
|
+
return __wbg_finalize_init(instance, module2);
|
|
229
|
+
}
|
|
230
|
+
var laz_rs_wasm_default = __wbg_init;
|
|
231
|
+
async function loadWasmModule(module_or_path) {
|
|
232
|
+
if (isNodeFileUrl(module_or_path)) {
|
|
233
|
+
const nodeFsPromisesModule = "node:fs/promises";
|
|
234
|
+
const { readFile } = await import(nodeFsPromisesModule);
|
|
235
|
+
return await readFile(module_or_path);
|
|
236
|
+
}
|
|
237
|
+
return fetch(module_or_path);
|
|
238
|
+
}
|
|
239
|
+
function isNodeFileUrl(module_or_path) {
|
|
240
|
+
return typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string" && typeof URL === "function" && module_or_path instanceof URL && module_or_path.protocol === "file:";
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/las/laz-rs-loader.ts
|
|
244
|
+
var LAZRsLoaderWithParser = {
|
|
245
|
+
...import_las_loader_shared.LAS_LOADER_METADATA,
|
|
246
|
+
name: "LAS (laz-rs)",
|
|
247
|
+
parse: async (arrayBuffer, options) => {
|
|
248
|
+
await laz_rs_wasm_default();
|
|
249
|
+
return (0, import_las_loader.toPublicLASResult)(convertLASMesh((0, import_parse_las.parseLAS)(arrayBuffer, { ...options }), options));
|
|
250
|
+
},
|
|
251
|
+
parseInBatches: async function* (arrayBufferIterator, options) {
|
|
252
|
+
await laz_rs_wasm_default();
|
|
253
|
+
for await (const mesh of (0, import_parse_las.parseLASInBatches)(arrayBufferIterator, options)) {
|
|
254
|
+
const result = convertLASMesh(mesh, options);
|
|
255
|
+
if ("shape" in result) yield* (0, import_las_loader.getLASRecordBatches)(result);
|
|
256
|
+
else yield result;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
function convertLASMesh(mesh, options) {
|
|
261
|
+
const formattedMesh = (0, import_las_loader_shared.formatLASMeshColors)(mesh, options?.las?.colorFormat || "uint8norm");
|
|
262
|
+
const table = (0, import_schema_utils.convertMeshToArrowTableWrapper)(formattedMesh);
|
|
263
|
+
if ((0, import_las_loader_shared.getLASShape)(options) === "arrow") {
|
|
264
|
+
return { ...table, loaderData: mesh.loaderData };
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
...(0, import_schema_utils.convertTableToMesh)(table),
|
|
268
|
+
loader: mesh.loader,
|
|
269
|
+
loaderData: mesh.loaderData,
|
|
270
|
+
progress: mesh.progress
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
274
|
+
0 && (module.exports = {
|
|
275
|
+
LAZRsLoaderWithParser
|
|
276
|
+
});
|
|
277
|
+
//# sourceMappingURL=laz-rs-loader.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/laz-rs-loader.ts", "../src/las/laz-rs-loader.ts", "../src/las/libs/laz-rs-wasm/laz_rs_wasm.js"],
|
|
4
|
+
"sourcesContent": ["export * from './las/laz-rs-loader.js';\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// LASER (LAS) FILE FORMAT\nimport type {LoaderWithParser} from '@loaders.gl/core/loader-utils';\nimport type {Table, RecordBatch} from 'apache-arrow';\nimport {getLASRecordBatches, toPublicLASResult} from './las-loader';\nimport type {MeshArrowTable} from '@loaders.gl/core/schema';\nimport {convertMeshToArrowTableWrapper, convertTableToMesh} from '@loaders.gl/core/schema-utils';\nimport {\n formatLASMeshColors,\n getLASShape,\n LAS_LOADER_METADATA,\n type LASLoaderOptions\n} from './las-loader-shared';\nimport type {LASMesh} from './lib/las-types';\nimport {parseLAS, parseLASInBatches} from './lib/laz-rs-wasm/parse-las';\nimport initLazRsWasm from './libs/laz-rs-wasm/laz_rs_wasm';\n\n/**\n * Loader for the LAS (LASer) point cloud format\n */\nexport const LAZRsLoaderWithParser = {\n ...LAS_LOADER_METADATA,\n name: 'LAS (laz-rs)',\n parse: async (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => {\n await initLazRsWasm();\n return toPublicLASResult(convertLASMesh(parseLAS(arrayBuffer, {...options}), options));\n },\n parseInBatches: async function* (arrayBufferIterator, options?: LASLoaderOptions) {\n await initLazRsWasm();\n for await (const mesh of parseLASInBatches(arrayBufferIterator, options)) {\n const result = convertLASMesh(mesh, options);\n if ('shape' in result) yield* getLASRecordBatches(result);\n else yield result;\n }\n }\n} as const satisfies LoaderWithParser<LASMesh | Table, LASMesh | RecordBatch, LASLoaderOptions>;\n\nfunction convertLASMesh(mesh: LASMesh, options?: LASLoaderOptions): LASMesh | MeshArrowTable {\n const formattedMesh = formatLASMeshColors(mesh, options?.las?.colorFormat || 'uint8norm');\n const table = convertMeshToArrowTableWrapper(formattedMesh) as MeshArrowTable;\n if (getLASShape(options) === 'arrow') {\n return {...table, loaderData: mesh.loaderData};\n }\n return {\n ...(convertTableToMesh(table) as LASMesh),\n loader: mesh.loader,\n loaderData: mesh.loaderData,\n progress: (mesh as LASMesh & {progress?: number}).progress\n } as LASMesh & {progress?: number};\n}\n", "// SPDX-License-Identifier: MIT\n\n// @ts-nocheck\n/* eslint-disable */\n\n// laz_rs_wasm is a compiled version of https://github.com/laz-rs/laz-rs-wasm on 2024-11-22.\n\n// To regenerate:\n// ```\n// git clone https://github.com/laz-rs/laz-rs-wasm.git\n// cd laz-rs-wasm\n// cargo build\n// wasm-pack build --target web\n// ```\n// Copy results from `./pkg`\n\nlet wasm;\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_0.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst WasmLasZipDecompressorFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_wasmlaszipdecompressor_free(ptr >>> 0, 1));\n\nexport class WasmLasZipDecompressor {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n WasmLasZipDecompressorFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_wasmlaszipdecompressor_free(ptr, 0);\n }\n /**\n * @returns {WasmQuickHeader}\n */\n get header() {\n const ret = wasm.__wbg_get_wasmlaszipdecompressor_header(this.__wbg_ptr);\n return WasmQuickHeader.__wrap(ret);\n }\n /**\n * @param {WasmQuickHeader} arg0\n */\n set header(arg0) {\n _assertClass(arg0, WasmQuickHeader);\n var ptr0 = arg0.__destroy_into_raw();\n wasm.__wbg_set_wasmlaszipdecompressor_header(this.__wbg_ptr, ptr0);\n }\n /**\n * @param {Uint8Array} buf\n */\n constructor(buf) {\n const ret = wasm.wasmlaszipdecompressor_new(buf);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n this.__wbg_ptr = ret[0] >>> 0;\n WasmLasZipDecompressorFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {Uint8Array} out\n */\n decompress_many(out) {\n var ptr0 = passArray8ToWasm0(out, wasm.__wbindgen_malloc);\n var len0 = WASM_VECTOR_LEN;\n const ret = wasm.wasmlaszipdecompressor_decompress_many(this.__wbg_ptr, ptr0, len0, out);\n if (ret[1]) {\n throw takeFromExternrefTable0(ret[0]);\n }\n }\n}\n\nconst WasmQuickHeaderFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_wasmquickheader_free(ptr >>> 0, 1));\n\nexport class WasmQuickHeader {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(WasmQuickHeader.prototype);\n obj.__wbg_ptr = ptr;\n WasmQuickHeaderFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n WasmQuickHeaderFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_wasmquickheader_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n get major() {\n const ret = wasm.__wbg_get_wasmquickheader_major(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set major(arg0) {\n wasm.__wbg_set_wasmquickheader_major(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get minor() {\n const ret = wasm.__wbg_get_wasmquickheader_minor(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set minor(arg0) {\n wasm.__wbg_set_wasmquickheader_minor(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get offset_to_points() {\n const ret = wasm.__wbg_get_wasmquickheader_offset_to_points(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set offset_to_points(arg0) {\n wasm.__wbg_set_wasmquickheader_offset_to_points(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get num_vlrs() {\n const ret = wasm.__wbg_get_wasmquickheader_num_vlrs(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set num_vlrs(arg0) {\n wasm.__wbg_set_wasmquickheader_num_vlrs(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get point_format_id() {\n const ret = wasm.__wbg_get_wasmquickheader_point_format_id(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set point_format_id(arg0) {\n wasm.__wbg_set_wasmquickheader_point_format_id(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get point_size() {\n const ret = wasm.__wbg_get_wasmquickheader_point_size(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set point_size(arg0) {\n wasm.__wbg_set_wasmquickheader_point_size(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {bigint}\n */\n get num_points() {\n const ret = wasm.__wbg_get_wasmquickheader_num_points(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * @param {bigint} arg0\n */\n set num_points(arg0) {\n wasm.__wbg_set_wasmquickheader_num_points(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get header_size() {\n const ret = wasm.__wbg_get_wasmquickheader_header_size(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set header_size(arg0) {\n wasm.__wbg_set_wasmquickheader_header_size(this.__wbg_ptr, arg0);\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_copy_to_typed_array = function(arg0, arg1, arg2) {\n new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {\n const ret = arg0.buffer;\n return ret;\n };\n imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {\n const ret = new Uint8Array(arg0);\n return ret;\n };\n imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {\n arg0.set(arg1, arg2 >>> 0);\n };\n imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return ret;\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = arg1.stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return ret;\n };\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_0;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('laz_rs_wasm_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = loadWasmModule(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n\nasync function loadWasmModule(module_or_path) {\n if (isNodeFileUrl(module_or_path)) {\n const nodeFsPromisesModule = 'node:fs/promises';\n const { readFile } = await import(nodeFsPromisesModule);\n return await readFile(module_or_path);\n }\n return fetch(module_or_path);\n}\n\nfunction isNodeFileUrl(module_or_path) {\n return typeof process === 'object'\n && typeof process.versions === 'object'\n && typeof process.versions.node === 'string'\n && typeof URL === 'function'\n && module_or_path instanceof URL\n && module_or_path.protocol === 'file:';\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,wBAAqD;AAErD,0BAAiE;AACjE,+BAKO;AAEP,uBAA0C;;;ACjB1C;AAgBA,IAAI;AAEJ,IAAI,0BAA0B;AAE9B,SAAS,uBAAuB;AAC5B,MAAI,4BAA4B,QAAQ,wBAAwB,eAAe,GAAG;AAC9E,8BAA0B,IAAI,WAAW,KAAK,OAAO,MAAM;AAAA,EAC/D;AACA,SAAO;AACX;AAEA,SAAS,oBAAoB,KAAK,KAAK;AACnC,QAAM,QAAQ;AACd,SAAO,qBAAqB,EAAE,SAAS,MAAM,GAAG,MAAM,IAAI,GAAG;AACjE;AAEA,IAAM,oBAAqB,OAAO,gBAAgB,cAAc,IAAI,YAAY,SAAS,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,MAAM;AAAE,QAAM,MAAM,2BAA2B;AAAE,EAAE;AAE1L,IAAI,OAAO,gBAAgB,aAAa;AAAE,oBAAkB,OAAO;AAAG;AAEtE,SAAS,mBAAmB,KAAK,KAAK;AAClC,QAAM,QAAQ;AACd,SAAO,kBAAkB,OAAO,qBAAqB,EAAE,SAAS,KAAK,MAAM,GAAG,CAAC;AACnF;AAeA,IAAI,kBAAkB;AAStB,IAAM,oBAAqB,OAAO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