@loaders.gl/core 5.0.0-alpha.12 → 5.0.0-alpha.13
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/LICENSE +1 -1
- package/SCHEMA-README.md +9 -0
- package/SCHEMA-UTILS-README.md +11 -0
- package/dist/dist.dev.js +163 -142
- package/dist/dist.min.js +3 -3
- package/dist/index.cjs +87 -91
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/iterators/make-iterator/make-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js.map +1 -1
- package/dist/lib/api/core-api.d.ts +1 -1
- package/dist/lib/api/core-api.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +1 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +1 -1
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode-table.d.ts +2 -2
- package/dist/lib/api/encode-table.d.ts.map +1 -1
- package/dist/lib/api/encode-table.js +1 -1
- package/dist/lib/api/encode-table.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +2 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +1 -1
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +1 -1
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +1 -1
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -2
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +40 -4
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +1 -1
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +3 -3
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/preload.d.ts +1 -1
- package/dist/lib/api/preload.d.ts.map +1 -1
- package/dist/lib/api/preload.js.map +1 -1
- package/dist/lib/api/register-loaders.d.ts +1 -1
- package/dist/lib/api/register-loaders.d.ts.map +1 -1
- package/dist/lib/api/select-loader.d.ts +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +1 -1
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.d.ts.map +1 -1
- package/dist/lib/fetch/fetch-file.js +2 -2
- package/dist/lib/fetch/fetch-file.js.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.js +1 -1
- package/dist/lib/filesystems/browser-filesystem.js.map +1 -1
- package/dist/lib/init.js +2 -2
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-data.d.ts +1 -1
- package/dist/lib/loader-utils/get-data.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-data.js +1 -1
- package/dist/lib/loader-utils/get-data.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts.map +1 -1
- package/dist/lib/loader-utils/loader-context.js +1 -1
- package/dist/lib/loader-utils/loader-context.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +1 -1
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +1 -1
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.js +1 -1
- package/dist/lib/loader-utils/normalize-loader.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +1 -1
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +1 -1
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/lib/utils/resource-utils.js +1 -1
- package/dist/lib/utils/resource-utils.js.map +1 -1
- package/dist/lib/utils/response-utils.js +1 -1
- package/dist/lib/utils/response-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +32 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -0
- package/dist/loader-utils/format-types.js +5 -0
- package/dist/loader-utils/format-types.js.map +1 -0
- package/dist/loader-utils/index.cjs +12416 -0
- package/dist/loader-utils/index.cjs.map +6 -0
- package/dist/loader-utils/index.d.ts +122 -0
- package/dist/loader-utils/index.d.ts.map +1 -0
- package/dist/loader-utils/index.js +91 -0
- package/dist/loader-utils/index.js.map +1 -0
- package/dist/loader-utils/json-loader.d.ts +27 -0
- package/dist/loader-utils/json-loader.d.ts.map +1 -0
- package/dist/loader-utils/json-loader.js +32 -0
- package/dist/loader-utils/json-loader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts +32 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js +88 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts +67 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js +245 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts +43 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js +92 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts +3 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js +15 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts +17 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js +43 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts +15 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js +51 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts +20 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js +82 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts +25 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js +59 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts +31 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js +20 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts +6 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.js +13 -0
- package/dist/loader-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts +15 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.js +28 -0
- package/dist/loader-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +40 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js +68 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +54 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +102 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +45 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +13 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +57 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js +114 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts +21 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js +36 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts +19 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.js +39 -0
- package/dist/loader-utils/lib/files/blob-file.js.map +1 -0
- package/dist/loader-utils/lib/files/file.d.ts +33 -0
- package/dist/loader-utils/lib/files/file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/file.js +5 -0
- package/dist/loader-utils/lib/files/file.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +37 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.js +290 -0
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts +49 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.js +5 -0
- package/dist/loader-utils/lib/files/http-file-types.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file.d.ts +55 -0
- package/dist/loader-utils/lib/files/http-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file.js +213 -0
- package/dist/loader-utils/lib/files/http-file.js.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts +22 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.js +45 -0
- package/dist/loader-utils/lib/files/node-file-facade.js.map +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/sources.js +155 -0
- package/dist/loader-utils/lib/files/sources.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts +33 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js +5 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts +23 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js +48 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts +20 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js +102 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts +19 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js +60 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts +59 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js +68 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts +118 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js +427 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts +204 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js +4226 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts +40 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js +1518 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +4 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.js +21 -0
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts +10 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js +44 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts +18 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js +40 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.js +20 -0
- package/dist/loader-utils/lib/node/buffer.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.js +35 -0
- package/dist/loader-utils/lib/node/buffer.js.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.js +5 -0
- package/dist/loader-utils/lib/node/fs.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/promisify.d.ts +13 -0
- package/dist/loader-utils/lib/node/promisify.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/promisify.js +19 -0
- package/dist/loader-utils/lib/node/promisify.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.js +5 -0
- package/dist/loader-utils/lib/node/stream.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.d.ts +6 -0
- package/dist/loader-utils/lib/node/stream.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.js +8 -0
- package/dist/loader-utils/lib/node/stream.js.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts +12 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js +34 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts +5 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js +16 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts +35 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js +64 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts +17 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js +44 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts +3 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js +12 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts +24 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.js +173 -0
- package/dist/loader-utils/lib/path-utils/path.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts +5 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js +59 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts +56 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.js +67 -0
- package/dist/loader-utils/lib/request-utils/authentication.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts +7 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js +20 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts +70 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js +203 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts +201 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js +636 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts +62 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js +236 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts +137 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +379 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts +71 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js +174 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js +261 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts +42 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js +5 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js +86 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts +36 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js +49 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts +75 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js +107 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts +20 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js +183 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts +23 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js +5 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +272 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +97 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts +39 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js +35 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +77 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js +56 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +30 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +161 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts +36 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.js +5 -0
- package/dist/loader-utils/lib/sources/catalog-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts +136 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js +376 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts +79 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.js +145 -0
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts +55 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts +12 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts +17 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js +62 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts +4 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.js +22 -0
- package/dist/loader-utils/lib/sources/raster-region.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts +35 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js +152 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts +302 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.js +20 -0
- package/dist/loader-utils/lib/sources/raster-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts +36 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js +5 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +46 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.js +128 -0
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts +24 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js +109 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts +6 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js +13 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts +190 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts +10 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js +5 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts +13 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +26 -0
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts +76 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +15 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts +9 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js +63 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts +22 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js +155 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts +8 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +23 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts +41 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +239 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
- package/dist/loader-utils/loader-types.d.ts +322 -0
- package/dist/loader-utils/loader-types.d.ts.map +1 -0
- package/dist/loader-utils/loader-types.js +33 -0
- package/dist/loader-utils/loader-types.js.map +1 -0
- package/dist/loader-utils/source-types.d.ts +42 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -0
- package/dist/loader-utils/source-types.js +8 -0
- package/dist/loader-utils/source-types.js.map +1 -0
- package/dist/loader-utils/types.d.ts +24 -0
- package/dist/loader-utils/types.d.ts.map +1 -0
- package/dist/loader-utils/types.js +6 -0
- package/dist/loader-utils/types.js.map +1 -0
- package/dist/loader-utils/workers/json-worker.d.ts +2 -0
- package/dist/loader-utils/workers/json-worker.d.ts.map +1 -0
- package/dist/loader-utils/workers/json-worker.js +7 -0
- package/dist/loader-utils/workers/json-worker.js.map +1 -0
- package/dist/loader-utils/writer-types.d.ts +74 -0
- package/dist/loader-utils/writer-types.d.ts.map +1 -0
- package/dist/loader-utils/writer-types.js +5 -0
- package/dist/loader-utils/writer-types.js.map +1 -0
- package/dist/null-loader.d.ts +2 -2
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -1
- package/dist/null-worker-node.js +7 -7
- package/dist/null-worker.js +7 -7
- package/dist/polyfills/buffer/btoa.node.d.ts +3 -0
- package/dist/polyfills/buffer/btoa.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/btoa.node.js +13 -0
- package/dist/polyfills/buffer/btoa.node.js.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts +2 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js +12 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js.map +1 -0
- package/dist/polyfills/crypto/node-hash.d.ts +29 -0
- package/dist/polyfills/crypto/node-hash.d.ts.map +1 -0
- package/dist/polyfills/crypto/node-hash.js +63 -0
- package/dist/polyfills/crypto/node-hash.js.map +1 -0
- package/dist/polyfills/fetch/decode-data-uri.d.ts +11 -0
- package/dist/polyfills/fetch/decode-data-uri.d.ts.map +1 -0
- package/dist/polyfills/fetch/decode-data-uri.js +63 -0
- package/dist/polyfills/fetch/decode-data-uri.js.map +1 -0
- package/dist/polyfills/fetch/fetch-polyfill.d.ts +11 -0
- package/dist/polyfills/fetch/fetch-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/fetch-polyfill.js +141 -0
- package/dist/polyfills/fetch/fetch-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/headers-polyfill.d.ts +34 -0
- package/dist/polyfills/fetch/headers-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/headers-polyfill.js +105 -0
- package/dist/polyfills/fetch/headers-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/response-polyfill.d.ts +22 -0
- package/dist/polyfills/fetch/response-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/response-polyfill.js +81 -0
- package/dist/polyfills/fetch/response-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.d.ts +11 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.d.ts.map +1 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.js +32 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.js.map +1 -0
- package/dist/polyfills/file/blob-stream-controller.d.ts +29 -0
- package/dist/polyfills/file/blob-stream-controller.d.ts.map +1 -0
- package/dist/polyfills/file/blob-stream-controller.js +64 -0
- package/dist/polyfills/file/blob-stream-controller.js.map +1 -0
- package/dist/polyfills/file/blob-stream.d.ts +25 -0
- package/dist/polyfills/file/blob-stream.d.ts.map +1 -0
- package/dist/polyfills/file/blob-stream.js +38 -0
- package/dist/polyfills/file/blob-stream.js.map +1 -0
- package/dist/polyfills/file/blob.d.ts +58 -0
- package/dist/polyfills/file/blob.d.ts.map +1 -0
- package/dist/polyfills/file/blob.js +166 -0
- package/dist/polyfills/file/blob.js.map +1 -0
- package/dist/polyfills/file/file-reader.d.ts +24 -0
- package/dist/polyfills/file/file-reader.d.ts.map +1 -0
- package/dist/polyfills/file/file-reader.js +51 -0
- package/dist/polyfills/file/file-reader.js.map +1 -0
- package/dist/polyfills/file/file.d.ts +24 -0
- package/dist/polyfills/file/file.d.ts.map +1 -0
- package/dist/polyfills/file/file.js +41 -0
- package/dist/polyfills/file/file.js.map +1 -0
- package/dist/polyfills/file/install-blob-polyfills.d.ts +9 -0
- package/dist/polyfills/file/install-blob-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-blob-polyfills.js +14 -0
- package/dist/polyfills/file/install-blob-polyfills.js.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts +3 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.js +20 -0
- package/dist/polyfills/file/install-file-polyfills.js.map +1 -0
- package/dist/polyfills/file/readable-stream.d.ts +5 -0
- package/dist/polyfills/file/readable-stream.d.ts.map +1 -0
- package/dist/polyfills/file/readable-stream.js +8 -0
- package/dist/polyfills/file/readable-stream.js.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts +8 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.js +88 -0
- package/dist/polyfills/filesystems/fetch-node.js.map +1 -0
- package/dist/polyfills/filesystems/node-file.d.ts +15 -0
- package/dist/polyfills/filesystems/node-file.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-file.js +138 -0
- package/dist/polyfills/filesystems/node-file.js.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts +19 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.js +44 -0
- package/dist/polyfills/filesystems/node-filesystem.js.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts +18 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.js +67 -0
- package/dist/polyfills/filesystems/stream-utils.node.js.map +1 -0
- package/dist/polyfills/images/encode-image-node.d.ts +20 -0
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/encode-image-node.js +37 -0
- package/dist/polyfills/images/encode-image-node.js.map +1 -0
- package/dist/polyfills/images/image-codecs-node.d.ts +8 -0
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -0
- package/dist/polyfills/images/image-codecs-node.js +27 -0
- package/dist/polyfills/images/image-codecs-node.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +38 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.js +64 -0
- package/dist/polyfills/images/node-image-bitmap.js.map +1 -0
- package/dist/polyfills/images/node-image-formats.d.ts +3 -0
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-formats.js +6 -0
- package/dist/polyfills/images/node-image-formats.js.map +1 -0
- package/dist/polyfills/images/parse-image-node.d.ts +11 -0
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/parse-image-node.js +36 -0
- package/dist/polyfills/images/parse-image-node.js.map +1 -0
- package/dist/polyfills/index.browser.d.ts +8 -0
- package/dist/polyfills/index.browser.d.ts.map +1 -0
- package/dist/polyfills/index.browser.js +18 -0
- package/dist/polyfills/index.browser.js.map +1 -0
- package/dist/polyfills/index.cjs +2918 -0
- package/dist/polyfills/index.cjs.map +6 -0
- package/dist/polyfills/index.d.ts +7 -0
- package/dist/polyfills/index.d.ts.map +1 -0
- package/dist/polyfills/index.js +110 -0
- package/dist/polyfills/index.js.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts +10 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js +14 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts +19 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.js +88 -0
- package/dist/polyfills/load-library/require-utils.node.js.map +1 -0
- package/dist/polyfills/streams/make-node-stream.d.ts +10 -0
- package/dist/polyfills/streams/make-node-stream.d.ts.map +1 -0
- package/dist/polyfills/streams/make-node-stream.js +70 -0
- package/dist/polyfills/streams/make-node-stream.js.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts +31 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js +35 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts +15 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.js +2778 -0
- package/dist/polyfills/text-encoder/text-encoder.js.map +1 -0
- package/dist/polyfills/utils/assert.d.ts +2 -0
- package/dist/polyfills/utils/assert.d.ts.map +1 -0
- package/dist/polyfills/utils/assert.js +9 -0
- package/dist/polyfills/utils/assert.js.map +1 -0
- package/dist/polyfills/utils/buffer-utils.d.ts +5 -0
- package/dist/polyfills/utils/buffer-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/buffer-utils.js +34 -0
- package/dist/polyfills/utils/buffer-utils.js.map +1 -0
- package/dist/polyfills/utils/filesystem-types.d.ts +10 -0
- package/dist/polyfills/utils/filesystem-types.d.ts.map +1 -0
- package/dist/polyfills/utils/filesystem-types.js +5 -0
- package/dist/polyfills/utils/filesystem-types.js.map +1 -0
- package/dist/polyfills/utils/is-browser.d.ts +2 -0
- package/dist/polyfills/utils/is-browser.d.ts.map +1 -0
- package/dist/polyfills/utils/is-browser.js +8 -0
- package/dist/polyfills/utils/is-browser.js.map +1 -0
- package/dist/polyfills/utils/path-utils.d.ts +7 -0
- package/dist/polyfills/utils/path-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/path-utils.js +28 -0
- package/dist/polyfills/utils/path-utils.js.map +1 -0
- package/dist/schema/categories/category-gis.d.ts +7 -0
- package/dist/schema/categories/category-gis.d.ts.map +1 -0
- package/dist/schema/categories/category-gis.js +5 -0
- package/dist/schema/categories/category-gis.js.map +1 -0
- package/dist/schema/categories/category-image.d.ts +18 -0
- package/dist/schema/categories/category-image.d.ts.map +1 -0
- package/dist/schema/categories/category-image.js +5 -0
- package/dist/schema/categories/category-image.js.map +1 -0
- package/dist/schema/categories/category-mesh.d.ts +99 -0
- package/dist/schema/categories/category-mesh.d.ts.map +1 -0
- package/dist/schema/categories/category-mesh.js +14 -0
- package/dist/schema/categories/category-mesh.js.map +1 -0
- package/dist/schema/categories/category-table.d.ts +106 -0
- package/dist/schema/categories/category-table.d.ts.map +1 -0
- package/dist/schema/categories/category-table.js +5 -0
- package/dist/schema/categories/category-table.js.map +1 -0
- package/dist/schema/categories/category-texture.d.ts +115 -0
- package/dist/schema/categories/category-texture.d.ts.map +1 -0
- package/dist/schema/categories/category-texture.js +5 -0
- package/dist/schema/categories/category-texture.js.map +1 -0
- package/dist/schema/deprecated/mesh-utils.d.ts +12 -0
- package/dist/schema/deprecated/mesh-utils.d.ts.map +1 -0
- package/dist/schema/deprecated/mesh-utils.js +37 -0
- package/dist/schema/deprecated/mesh-utils.js.map +1 -0
- package/dist/schema/float16.d.ts +19 -0
- package/dist/schema/float16.d.ts.map +1 -0
- package/dist/schema/float16.js +90 -0
- package/dist/schema/float16.js.map +1 -0
- package/dist/schema/geoarrow-metadata.schema.json +117 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts +45 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/arrow-binary-features.js +5 -0
- package/dist/schema/geometry/arrow-binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-features.d.ts +30 -0
- package/dist/schema/geometry/binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/binary-features.js +5 -0
- package/dist/schema/geometry/binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-geometries.d.ts +33 -0
- package/dist/schema/geometry/binary-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/binary-geometries.js +5 -0
- package/dist/schema/geometry/binary-geometries.js.map +1 -0
- package/dist/schema/geometry/flat-geometries.d.ts +61 -0
- package/dist/schema/geometry/flat-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/flat-geometries.js +5 -0
- package/dist/schema/geometry/flat-geometries.js.map +1 -0
- package/dist/schema/geometry/geoarrow.d.ts +69 -0
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -0
- package/dist/schema/geometry/geoarrow.js +5 -0
- package/dist/schema/geometry/geoarrow.js.map +1 -0
- package/dist/schema/geoparquet.schema.json +222 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs +154 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs.map +6 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts +44 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts.map +1 -0
- package/dist/schema/geospatial-metadata-zod-schema.js +151 -0
- package/dist/schema/geospatial-metadata-zod-schema.js.map +1 -0
- package/dist/schema/index.cjs +259 -0
- package/dist/schema/index.cjs.map +6 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/metadata.d.ts +40 -0
- package/dist/schema/metadata.d.ts.map +1 -0
- package/dist/schema/metadata.js +86 -0
- package/dist/schema/metadata.js.map +1 -0
- package/dist/schema/types/batch.d.ts +37 -0
- package/dist/schema/types/batch.d.ts.map +1 -0
- package/dist/schema/types/batch.js +5 -0
- package/dist/schema/types/batch.js.map +1 -0
- package/dist/schema/types/schema.d.ts +70 -0
- package/dist/schema/types/schema.d.ts.map +1 -0
- package/dist/schema/types/schema.js +5 -0
- package/dist/schema/types/schema.js.map +1 -0
- package/dist/schema/types/types.d.ts +16 -0
- package/dist/schema/types/types.d.ts.map +1 -0
- package/dist/schema/types/types.js +6 -0
- package/dist/schema/types/types.js.map +1 -0
- package/dist/schema-utils/arrow-transport.cjs +665 -0
- package/dist/schema-utils/arrow-transport.cjs.map +6 -0
- package/dist/schema-utils/arrow-transport.d.ts +4 -0
- package/dist/schema-utils/arrow-transport.d.ts.map +1 -0
- package/dist/schema-utils/arrow-transport.js +7 -0
- package/dist/schema-utils/arrow-transport.js.map +1 -0
- package/dist/schema-utils/deprecated.d.ts +24 -0
- package/dist/schema-utils/deprecated.d.ts.map +1 -0
- package/dist/schema-utils/deprecated.js +27 -0
- package/dist/schema-utils/deprecated.js.map +1 -0
- package/dist/schema-utils/index.cjs +3423 -0
- package/dist/schema-utils/index.cjs.map +6 -0
- package/dist/schema-utils/index.d.ts +38 -0
- package/dist/schema-utils/index.d.ts.map +1 -0
- package/dist/schema-utils/index.js +77 -0
- package/dist/schema-utils/index.js.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +72 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +162 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +33 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +128 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js +45 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js +33 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.d.ts +10 -0
- package/dist/schema-utils/lib/converters/convert.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +98 -0
- package/dist/schema-utils/lib/converters/convert.js.map +1 -0
- package/dist/schema-utils/lib/converters/converters.d.ts +3 -0
- package/dist/schema-utils/lib/converters/converters.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/converters.js +5 -0
- package/dist/schema-utils/lib/converters/converters.js.map +1 -0
- package/dist/schema-utils/lib/converters/types.d.ts +35 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/types.js +5 -0
- package/dist/schema-utils/lib/converters/types.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +44 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +187 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +217 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js +72 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js +54 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts +98 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +407 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts +39 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js +441 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts +16 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.js +102 -0
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +14 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +101 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts +19 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js +37 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts +43 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js +5 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts +12 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js +82 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +28 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +64 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts +177 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js +441 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts +92 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js +98 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts +13 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js +28 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts +6 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js +8 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +10 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +71 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +28 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +104 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +19 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +64 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +20 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +84 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +21 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +86 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +24 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +5 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +52 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +149 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +10 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js +46 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +17 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +61 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts +15 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js +22 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +9 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +63 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +23 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js +73 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +24 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +151 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +43 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js +122 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +67 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.js +102 -0
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts +15 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js +50 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +68 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js +352 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts +7 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.js +40 -0
- package/dist/schema-utils/lib/table/tables/table-column.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +9 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +19 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +16 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +45 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +12 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.js +24 -0
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -0
- package/dist/schema-utils/lib/utils/assert.d.ts +2 -0
- package/dist/schema-utils/lib/utils/assert.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/assert.js +12 -0
- package/dist/schema-utils/lib/utils/assert.js.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts +18 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.js +96 -0
- package/dist/schema-utils/lib/utils/async-queue.js.map +1 -0
- package/dist/schema-utils/types/types.d.ts +15 -0
- package/dist/schema-utils/types/types.d.ts.map +1 -0
- package/dist/schema-utils/types/types.js +5 -0
- package/dist/schema-utils/types/types.js.map +1 -0
- package/dist/worker-utils/index.cjs +1448 -0
- package/dist/worker-utils/index.cjs.map +6 -0
- package/dist/worker-utils/index.d.ts +22 -0
- package/dist/worker-utils/index.d.ts.map +1 -0
- package/dist/worker-utils/index.js +40 -0
- package/dist/worker-utils/index.js.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +32 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js +91 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.js +13 -0
- package/dist/worker-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts +22 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.js +30 -0
- package/dist/worker-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts +2 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.js +20 -0
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts +42 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js +248 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts +14 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js +22 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts +15 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.js +16 -0
- package/dist/worker-utils/lib/node/worker_threads.js.map +1 -0
- package/dist/worker-utils/lib/npm-tag.d.ts +8 -0
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -0
- package/dist/worker-utils/lib/npm-tag.js +11 -0
- package/dist/worker-utils/lib/npm-tag.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts +8 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js +18 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts +45 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +123 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts +2 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js +32 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js +123 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts +27 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +103 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +44 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +312 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js +35 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +20 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js +131 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +58 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +116 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +34 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js +73 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +94 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +193 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +67 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +175 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts +14 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +72 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +15 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +86 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts +6 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js +27 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js.map +1 -0
- package/dist/worker-utils/null-worker-node.js +349 -0
- package/dist/worker-utils/null-worker-node.js.map +7 -0
- package/dist/worker-utils/null-worker.js +327 -0
- package/dist/worker-utils/null-worker.js.map +7 -0
- package/dist/worker-utils/types.d.ts +79 -0
- package/dist/worker-utils/types.d.ts.map +1 -0
- package/dist/worker-utils/types.js +5 -0
- package/dist/worker-utils/types.js.map +1 -0
- package/dist/worker-utils/workers/null-worker.d.ts +2 -0
- package/dist/worker-utils/workers/null-worker.d.ts.map +1 -0
- package/dist/worker-utils/workers/null-worker.js +17 -0
- package/dist/worker-utils/workers/null-worker.js.map +1 -0
- package/dist/workers/null-worker-node.js +1 -1
- package/dist/workers/null-worker-node.js.map +1 -1
- package/dist/workers/null-worker.js +1 -1
- package/dist/workers/null-worker.js.map +1 -1
- package/package.json +101 -11
- package/src/index.ts +10 -10
- package/src/iterators/make-iterator/make-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-stream-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-string-iterator.ts +1 -1
- package/src/lib/api/core-api.ts +1 -1
- package/src/lib/api/create-data-source.ts +2 -2
- package/src/lib/api/encode-table.ts +2 -2
- package/src/lib/api/encode.ts +3 -3
- package/src/lib/api/load-in-batches.ts +2 -2
- package/src/lib/api/load-loader.ts +2 -2
- package/src/lib/api/load.ts +2 -2
- package/src/lib/api/parse-file.ts +3 -3
- package/src/lib/api/parse-in-batches.ts +44 -6
- package/src/lib/api/parse-sync.ts +2 -2
- package/src/lib/api/parse.ts +4 -4
- package/src/lib/api/preload.ts +6 -1
- package/src/lib/api/register-loaders.ts +1 -1
- package/src/lib/api/select-loader.ts +3 -3
- package/src/lib/api/select-source.ts +1 -1
- package/src/lib/common.ts +1 -1
- package/src/lib/fetch/fetch-file.ts +2 -2
- package/src/lib/filesystems/browser-filesystem.ts +2 -2
- package/src/lib/init.ts +1 -1
- package/src/lib/loader-utils/get-data.ts +2 -2
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loader-context.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +1 -1
- package/src/lib/loader-utils/normalize-loader.ts +2 -2
- package/src/lib/loader-utils/option-defaults.ts +2 -2
- package/src/lib/loader-utils/option-utils.ts +1 -1
- package/src/lib/utils/resource-utils.ts +1 -1
- package/src/lib/utils/response-utils.ts +1 -1
- package/src/loader-utils/format-types.ts +49 -0
- package/src/loader-utils/index.ts +522 -0
- package/src/loader-utils/json-loader.ts +39 -0
- package/src/loader-utils/lib/binary-utils/array-buffer-utils.ts +114 -0
- package/src/loader-utils/lib/binary-utils/binary-chunk-reader.ts +297 -0
- package/src/loader-utils/lib/binary-utils/dataview-copy-utils.ts +121 -0
- package/src/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.ts +17 -0
- package/src/loader-utils/lib/binary-utils/get-first-characters.ts +46 -0
- package/src/loader-utils/lib/binary-utils/hex-transcoder.ts +54 -0
- package/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts +105 -0
- package/src/loader-utils/lib/binary-utils/memory-copy-utils.ts +69 -0
- package/src/loader-utils/lib/crs/crs-reprojection.ts +52 -0
- package/src/loader-utils/lib/env-utils/assert.ts +13 -0
- package/src/loader-utils/lib/env-utils/globals.ts +36 -0
- package/src/loader-utils/lib/file-provider/data-view-file.ts +83 -0
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +114 -0
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +60 -0
- package/src/loader-utils/lib/file-provider/file-provider.ts +130 -0
- package/src/loader-utils/lib/files/array-buffer-file.ts +46 -0
- package/src/loader-utils/lib/files/blob-file.ts +45 -0
- package/src/loader-utils/lib/files/file.ts +39 -0
- package/src/loader-utils/lib/files/http-file-transport.ts +432 -0
- package/src/loader-utils/lib/files/http-file-types.ts +60 -0
- package/src/loader-utils/lib/files/http-file.ts +267 -0
- package/src/loader-utils/lib/files/node-file-facade.ts +57 -0
- package/src/loader-utils/lib/files/sources.ts +154 -0
- package/src/loader-utils/lib/filesystems/filesystem.ts +40 -0
- package/src/loader-utils/lib/filesystems/node-filesystem-facade.ts +65 -0
- package/src/loader-utils/lib/iterators/async-iteration.ts +136 -0
- package/src/loader-utils/lib/iterators/text-iterators.ts +76 -0
- package/src/loader-utils/lib/javascript-utils/is-type.ts +130 -0
- package/src/loader-utils/lib/laz/LASZIP-LICENSE +202 -0
- package/src/loader-utils/lib/laz/LASZIP-NOTICE +6 -0
- package/src/loader-utils/lib/laz/laz-arithmetic-encoder.ts +446 -0
- package/src/loader-utils/lib/laz/laz-chunk-decoder.ts +5251 -0
- package/src/loader-utils/lib/laz/laz-chunk-encoder.ts +1909 -0
- package/src/loader-utils/lib/log-utils/log.ts +28 -0
- package/src/loader-utils/lib/module-utils/initialize-wasm-module.ts +51 -0
- package/src/loader-utils/lib/module-utils/js-module-utils.ts +44 -0
- package/src/loader-utils/lib/node/buffer.browser.ts +22 -0
- package/src/loader-utils/lib/node/buffer.ts +40 -0
- package/src/loader-utils/lib/node/fs.browser.ts +5 -0
- package/src/loader-utils/lib/node/promisify.ts +72 -0
- package/src/loader-utils/lib/node/stream.browser.ts +5 -0
- package/src/loader-utils/lib/node/stream.ts +12 -0
- package/src/loader-utils/lib/option-utils/merge-options.ts +50 -0
- package/src/loader-utils/lib/parser-utils/parse-json.ts +16 -0
- package/src/loader-utils/lib/path-utils/cached-uri-resolver.ts +69 -0
- package/src/loader-utils/lib/path-utils/file-aliases.ts +49 -0
- package/src/loader-utils/lib/path-utils/get-cwd.ts +12 -0
- package/src/loader-utils/lib/path-utils/path.ts +173 -0
- package/src/loader-utils/lib/request-utils/abort-utils.ts +64 -0
- package/src/loader-utils/lib/request-utils/authentication.ts +134 -0
- package/src/loader-utils/lib/request-utils/parse-content-type.ts +22 -0
- package/src/loader-utils/lib/request-utils/range-request-cache.ts +279 -0
- package/src/loader-utils/lib/request-utils/range-request-scheduler.ts +899 -0
- package/src/loader-utils/lib/request-utils/request-cache.ts +296 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +576 -0
- package/src/loader-utils/lib/request-utils/request-scheduler.ts +230 -0
- package/src/loader-utils/lib/scan-utils/columnar-predicate.ts +397 -0
- package/src/loader-utils/lib/scan-utils/experimental-scan-options.ts +46 -0
- package/src/loader-utils/lib/scan-utils/point-cloud-query.ts +176 -0
- package/src/loader-utils/lib/scan-utils/raster-query.ts +82 -0
- package/src/loader-utils/lib/scan-utils/relational-query.ts +188 -0
- package/src/loader-utils/lib/scan-utils/scan-executor.ts +208 -0
- package/src/loader-utils/lib/scan-utils/scan-fragments.ts +33 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +439 -0
- package/src/loader-utils/lib/scan-utils/table-query-explain.ts +88 -0
- package/src/loader-utils/lib/scan-utils/table-query.ts +163 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +200 -0
- package/src/loader-utils/lib/sources/catalog-source.ts +42 -0
- package/src/loader-utils/lib/sources/data-source-manager.ts +569 -0
- package/src/loader-utils/lib/sources/data-source.ts +236 -0
- package/src/loader-utils/lib/sources/image-source.ts +66 -0
- package/src/loader-utils/lib/sources/image-tile-source.ts +22 -0
- package/src/loader-utils/lib/sources/raster-coverage.ts +92 -0
- package/src/loader-utils/lib/sources/raster-region.ts +35 -0
- package/src/loader-utils/lib/sources/raster-sampling.ts +213 -0
- package/src/loader-utils/lib/sources/raster-source.ts +344 -0
- package/src/loader-utils/lib/sources/service-capabilities.ts +50 -0
- package/src/loader-utils/lib/sources/tile-grid.ts +162 -0
- package/src/loader-utils/lib/sources/tile-source-adapter.ts +126 -0
- package/src/loader-utils/lib/sources/tile-source-utils.ts +19 -0
- package/src/loader-utils/lib/sources/tile-source.ts +198 -0
- package/src/loader-utils/lib/sources/utils/image-type.ts +14 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +31 -0
- package/src/loader-utils/lib/sources/vector-source.ts +89 -0
- package/src/loader-utils/lib/sources/vector-tile-source.ts +29 -0
- package/src/loader-utils/lib/sources/xyz-grid.ts +82 -0
- package/src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts +233 -0
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +28 -0
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +347 -0
- package/src/loader-utils/loader-types.ts +531 -0
- package/src/loader-utils/source-types.ts +76 -0
- package/src/loader-utils/types.ts +83 -0
- package/src/loader-utils/workers/json-worker.ts +8 -0
- package/src/loader-utils/writer-types.ts +107 -0
- package/src/null-loader.ts +2 -2
- package/src/polyfills/README.md +16 -0
- package/src/polyfills/buffer/btoa.node.ts +15 -0
- package/src/polyfills/buffer/to-array-buffer.node.ts +12 -0
- package/src/polyfills/crypto/node-hash.ts +78 -0
- package/src/polyfills/fetch/decode-data-uri.ts +71 -0
- package/src/polyfills/fetch/fetch-polyfill.ts +165 -0
- package/src/polyfills/fetch/headers-polyfill.ts +119 -0
- package/src/polyfills/fetch/response-polyfill.ts +101 -0
- package/src/polyfills/fetch/utils/decode-data-uri.node.ts +34 -0
- package/src/polyfills/file/blob-stream-controller.ts +69 -0
- package/src/polyfills/file/blob-stream.ts +40 -0
- package/src/polyfills/file/blob.ts +177 -0
- package/src/polyfills/file/file-reader.ts +59 -0
- package/src/polyfills/file/file.ts +45 -0
- package/src/polyfills/file/install-blob-polyfills.ts +17 -0
- package/src/polyfills/file/install-file-polyfills.ts +24 -0
- package/src/polyfills/file/readable-stream.ts +8 -0
- package/src/polyfills/filesystems/fetch-node.ts +98 -0
- package/src/polyfills/filesystems/node-file.ts +169 -0
- package/src/polyfills/filesystems/node-filesystem.ts +54 -0
- package/src/polyfills/filesystems/stream-utils.node.ts +81 -0
- package/src/polyfills/images/encode-image-node.ts +45 -0
- package/src/polyfills/images/encode-image.node.ts.disabled +41 -0
- package/src/polyfills/images/image-codecs-node.ts +40 -0
- package/src/polyfills/images/node-image-bitmap.ts +81 -0
- package/src/polyfills/images/node-image-formats.ts +6 -0
- package/src/polyfills/images/parse-image-node.ts +54 -0
- package/src/polyfills/images/parse-image.node.ts.disabled +55 -0
- package/src/polyfills/index.browser.ts +23 -0
- package/src/polyfills/index.ts +154 -0
- package/src/polyfills/libs/encoding-indexes-asian.js +15 -0
- package/src/polyfills/load-library/require-utils.node.ts +108 -0
- package/src/polyfills/streams/make-node-stream.ts +83 -0
- package/src/polyfills/text-encoder/encoding-indexes.ts +36 -0
- package/src/polyfills/text-encoder/text-encoder.ts +3085 -0
- package/src/polyfills/utils/assert.ts +9 -0
- package/src/polyfills/utils/buffer-utils.ts +40 -0
- package/src/polyfills/utils/filesystem-types.ts +13 -0
- package/src/polyfills/utils/is-browser.ts +8 -0
- package/src/polyfills/utils/path-utils.ts +31 -0
- package/src/polyfills/wip/fetch-browser/fetch-file.browser.d.ts +34 -0
- package/src/schema/categories/category-gis.ts +63 -0
- package/src/schema/categories/category-image.ts +23 -0
- package/src/schema/categories/category-mesh.ts +138 -0
- package/src/schema/categories/category-table.ts +125 -0
- package/src/schema/categories/category-texture.ts +259 -0
- package/src/schema/deprecated/mesh-utils.ts +46 -0
- package/src/schema/float16.ts +111 -0
- package/src/schema/geometry/arrow-binary-features.ts +54 -0
- package/src/schema/geometry/binary-features.ts +43 -0
- package/src/schema/geometry/binary-geometries.ts +45 -0
- package/src/schema/geometry/flat-geometries.ts +72 -0
- package/src/schema/geometry/geoarrow.ts +116 -0
- package/src/schema/geospatial-metadata-zod-schema.ts +163 -0
- package/src/schema/index.ts +169 -0
- package/src/schema/metadata.ts +115 -0
- package/src/schema/types/batch.ts +47 -0
- package/src/schema/types/schema.ts +86 -0
- package/src/schema/types/types.ts +52 -0
- package/src/schema-utils/arrow-transport.ts +7 -0
- package/src/schema-utils/deprecated.ts +53 -0
- package/src/schema-utils/index.ts +165 -0
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +260 -0
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +235 -0
- package/src/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.ts +78 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +48 -0
- package/src/schema-utils/lib/converters/convert.ts +142 -0
- package/src/schema-utils/lib/converters/converters.ts +6 -0
- package/src/schema-utils/lib/converters/types.ts +44 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +311 -0
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +257 -0
- package/src/schema-utils/lib/mesh/deduce-mesh-schema.ts +85 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +73 -0
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +485 -0
- package/src/schema-utils/lib/schema/convert-arrow-schema.ts +552 -0
- package/src/schema-utils/lib/schema/data-type.ts +122 -0
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +119 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-field.ts +53 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-interface.ts +84 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-schema.ts +101 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +85 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-type.ts +500 -0
- package/src/schema-utils/lib/table/arrow-api/enum.ts +99 -0
- package/src/schema-utils/lib/table/arrow-api/get-type-info.ts +38 -0
- package/src/schema-utils/lib/table/arrow-api/index.ts +50 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +190 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +85 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +123 -0
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +82 -0
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +104 -0
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +108 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +28 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +185 -0
- package/src/schema-utils/lib/table/batches/convert-batches.ts +83 -0
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +81 -0
- package/src/schema-utils/lib/table/batches/make-table-batch-iterator.ts +25 -0
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +84 -0
- package/src/schema-utils/lib/table/query-arrow-table.ts +130 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +198 -0
- package/src/schema-utils/lib/table/tables/convert-table.ts +152 -0
- package/src/schema-utils/lib/table/tables/make-table.ts +127 -0
- package/src/schema-utils/lib/table/tables/row-utils.ts +59 -0
- package/src/schema-utils/lib/table/tables/table-accessors.ts +418 -0
- package/src/schema-utils/lib/table/tables/table-column.ts +49 -0
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +35 -0
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +57 -0
- package/src/schema-utils/lib/table/tables/table-types.ts +37 -0
- package/src/schema-utils/lib/utils/assert.ts +12 -0
- package/src/schema-utils/lib/utils/async-queue.ts +109 -0
- package/src/schema-utils/types/types.ts +45 -0
- package/src/worker-utils/index.ts +80 -0
- package/src/worker-utils/lib/async-queue/async-queue.ts +100 -0
- package/src/worker-utils/lib/env-utils/assert.ts +14 -0
- package/src/worker-utils/lib/env-utils/globals.ts +40 -0
- package/src/worker-utils/lib/env-utils/version.ts +25 -0
- package/src/worker-utils/lib/library-utils/library-utils.ts +303 -0
- package/src/worker-utils/lib/node/worker_threads-browser.ts +34 -0
- package/src/worker-utils/lib/node/worker_threads.ts +58 -0
- package/src/worker-utils/lib/npm-tag.ts +11 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.browser.ts +23 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +165 -0
- package/src/worker-utils/lib/process-utils/process-utils.ts +34 -0
- package/src/worker-utils/lib/worker-api/create-worker.ts +166 -0
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +129 -0
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +413 -0
- package/src/worker-utils/lib/worker-api/validate-worker-version.ts +44 -0
- package/src/worker-utils/lib/worker-farm/worker-body.ts +145 -0
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +144 -0
- package/src/worker-utils/lib/worker-farm/worker-job.ts +83 -0
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +263 -0
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +206 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +81 -0
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +93 -0
- package/src/worker-utils/lib/worker-utils/remove-nontransferable-options.ts +27 -0
- package/src/worker-utils/types.ts +125 -0
- package/src/worker-utils/workers/null-worker.ts +20 -0
- package/src/workers/null-worker-node.ts +1 -1
- package/src/workers/null-worker.ts +1 -1
|
@@ -0,0 +1,1448 @@
|
|
|
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
|
+
// dist/worker-utils/index.js
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AsyncQueue: () => AsyncQueue,
|
|
24
|
+
ChildProcessProxy: () => ChildProcessProxy,
|
|
25
|
+
NullWorker: () => NullWorker,
|
|
26
|
+
WorkerBody: () => WorkerBody,
|
|
27
|
+
WorkerFarm: () => WorkerFarm,
|
|
28
|
+
WorkerJob: () => WorkerJob,
|
|
29
|
+
WorkerPool: () => WorkerPool,
|
|
30
|
+
WorkerThread: () => WorkerThread,
|
|
31
|
+
assert: () => assert,
|
|
32
|
+
canProcessOnWorker: () => canProcessOnWorker,
|
|
33
|
+
createWorker: () => createWorker,
|
|
34
|
+
extractLoadLibraryOptions: () => extractLoadLibraryOptions,
|
|
35
|
+
getLibraryUrl: () => getLibraryUrl,
|
|
36
|
+
getTransferList: () => getTransferList,
|
|
37
|
+
getTransferListForWriter: () => getTransferListForWriter,
|
|
38
|
+
getWorkerURL: () => getWorkerURL,
|
|
39
|
+
isBrowser: () => isBrowser,
|
|
40
|
+
isWorker: () => isWorker,
|
|
41
|
+
loadLibrary: () => loadLibrary,
|
|
42
|
+
preloadWorker: () => preloadWorker,
|
|
43
|
+
processOnWorker: () => processOnWorker,
|
|
44
|
+
processOnWorkerInBatches: () => processOnWorkerInBatches,
|
|
45
|
+
validateWorkerVersion: () => validateWorkerVersion
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(index_exports);
|
|
48
|
+
|
|
49
|
+
// dist/worker-utils/lib/npm-tag.js
|
|
50
|
+
var NPM_TAG = "latest";
|
|
51
|
+
|
|
52
|
+
// dist/worker-utils/lib/env-utils/version.js
|
|
53
|
+
function getVersion() {
|
|
54
|
+
var _a;
|
|
55
|
+
if (!((_a = globalThis._loadersgl_) == null ? void 0 : _a.version)) {
|
|
56
|
+
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
57
|
+
if (false) {
|
|
58
|
+
globalThis._loadersgl_.version = NPM_TAG;
|
|
59
|
+
} else {
|
|
60
|
+
globalThis._loadersgl_.version = "5.0.0-alpha.13";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return globalThis._loadersgl_.version;
|
|
64
|
+
}
|
|
65
|
+
var VERSION = getVersion();
|
|
66
|
+
|
|
67
|
+
// dist/worker-utils/lib/env-utils/assert.js
|
|
68
|
+
function assert(condition, message) {
|
|
69
|
+
if (!condition) {
|
|
70
|
+
throw new Error(message || "loaders.gl assertion failed.");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// dist/worker-utils/lib/env-utils/globals.js
|
|
75
|
+
var globals = {
|
|
76
|
+
self: typeof self !== "undefined" && self,
|
|
77
|
+
window: typeof window !== "undefined" && window,
|
|
78
|
+
global: typeof global !== "undefined" && global,
|
|
79
|
+
document: typeof document !== "undefined" && document
|
|
80
|
+
};
|
|
81
|
+
var self_ = globals.self || globals.window || globals.global || {};
|
|
82
|
+
var window_ = globals.window || globals.self || globals.global || {};
|
|
83
|
+
var global_ = globals.global || globals.self || globals.window || {};
|
|
84
|
+
var document_ = globals.document || {};
|
|
85
|
+
var isBrowser = (
|
|
86
|
+
// @ts-ignore process.browser
|
|
87
|
+
typeof process !== "object" || String(process) !== "[object process]" || process.browser
|
|
88
|
+
);
|
|
89
|
+
var isWorker = typeof importScripts === "function";
|
|
90
|
+
var isMobile = typeof window !== "undefined" && typeof window.orientation !== "undefined";
|
|
91
|
+
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
92
|
+
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
93
|
+
|
|
94
|
+
// dist/worker-utils/lib/worker-farm/worker-job.js
|
|
95
|
+
var WorkerJob = class {
|
|
96
|
+
name;
|
|
97
|
+
workerThread;
|
|
98
|
+
isRunning = true;
|
|
99
|
+
/** Promise that resolves when Job is done */
|
|
100
|
+
result;
|
|
101
|
+
_resolve = () => {
|
|
102
|
+
};
|
|
103
|
+
_reject = () => {
|
|
104
|
+
};
|
|
105
|
+
constructor(jobName, workerThread) {
|
|
106
|
+
this.name = jobName;
|
|
107
|
+
this.workerThread = workerThread;
|
|
108
|
+
this.result = new Promise((resolve, reject) => {
|
|
109
|
+
this._resolve = resolve;
|
|
110
|
+
this._reject = reject;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Send a message to the job's worker thread
|
|
115
|
+
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
116
|
+
*/
|
|
117
|
+
postMessage(type, payload) {
|
|
118
|
+
this.workerThread.postMessage({
|
|
119
|
+
source: "loaders.gl",
|
|
120
|
+
// Lets worker ignore unrelated messages
|
|
121
|
+
type,
|
|
122
|
+
payload
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Call to resolve the `result` Promise with the supplied value
|
|
127
|
+
*/
|
|
128
|
+
done(value) {
|
|
129
|
+
if (!this.isRunning) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.isRunning = false;
|
|
133
|
+
this._resolve(value);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Call to reject the `result` Promise with the supplied error
|
|
137
|
+
*/
|
|
138
|
+
error(error) {
|
|
139
|
+
if (!this.isRunning) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.isRunning = false;
|
|
143
|
+
this._reject(error);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Terminates the worker executing this job and rejects its result.
|
|
147
|
+
* @param reason Abort reason supplied by the caller, or a cross-runtime `AbortError`.
|
|
148
|
+
*/
|
|
149
|
+
abort(reason) {
|
|
150
|
+
if (!this.isRunning) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const error = reason ?? createAbortError(`Worker job "${this.name}" was aborted`);
|
|
154
|
+
this.workerThread.destroy();
|
|
155
|
+
this.error(error);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
function createAbortError(message) {
|
|
159
|
+
const error = new Error(message);
|
|
160
|
+
error.name = "AbortError";
|
|
161
|
+
return error;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// dist/worker-utils/lib/node/worker_threads-browser.js
|
|
165
|
+
var NodeWorker = class {
|
|
166
|
+
/** Restores the native worker constructor when this browser shim is embedded in a Node bundle. */
|
|
167
|
+
constructor(...arguments_) {
|
|
168
|
+
var _a;
|
|
169
|
+
const runtimeProcess = globalThis.process;
|
|
170
|
+
const WorkerConstructor = (_a = runtimeProcess == null ? void 0 : runtimeProcess.getBuiltinModule) == null ? void 0 : _a.call(runtimeProcess, "node:worker_threads").Worker;
|
|
171
|
+
if (WorkerConstructor) {
|
|
172
|
+
return new WorkerConstructor(...arguments_);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/** No-op browser fallback matching the native Worker API. */
|
|
176
|
+
terminate() {
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
var parentPort = null;
|
|
180
|
+
|
|
181
|
+
// dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js
|
|
182
|
+
var workerURLCache = /* @__PURE__ */ new Map();
|
|
183
|
+
function getLoadableWorkerURL(props) {
|
|
184
|
+
assert(props.source && !props.url || !props.source && props.url);
|
|
185
|
+
let workerURL = workerURLCache.get(props.source || props.url);
|
|
186
|
+
if (!workerURL) {
|
|
187
|
+
if (props.url) {
|
|
188
|
+
workerURL = getLoadableWorkerURLFromURL(props.url);
|
|
189
|
+
workerURLCache.set(props.url, workerURL);
|
|
190
|
+
}
|
|
191
|
+
if (props.source) {
|
|
192
|
+
workerURL = getLoadableWorkerURLFromSource(props.source);
|
|
193
|
+
workerURLCache.set(props.source, workerURL);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
assert(workerURL);
|
|
197
|
+
return workerURL;
|
|
198
|
+
}
|
|
199
|
+
function getLoadableWorkerURLFromURL(url) {
|
|
200
|
+
if (!url.startsWith("http")) {
|
|
201
|
+
return url;
|
|
202
|
+
}
|
|
203
|
+
const workerSource = buildScriptSource(url);
|
|
204
|
+
return getLoadableWorkerURLFromSource(workerSource);
|
|
205
|
+
}
|
|
206
|
+
function getLoadableWorkerURLFromSource(workerSource) {
|
|
207
|
+
const blob = new Blob([workerSource], { type: "application/javascript" });
|
|
208
|
+
return URL.createObjectURL(blob);
|
|
209
|
+
}
|
|
210
|
+
function buildScriptSource(workerUrl) {
|
|
211
|
+
return `try {
|
|
212
|
+
importScripts('${workerUrl}');
|
|
213
|
+
} catch (error) {
|
|
214
|
+
console.error(error);
|
|
215
|
+
throw error;
|
|
216
|
+
}`;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// dist/worker-utils/lib/worker-utils/get-transfer-list.js
|
|
220
|
+
function getTransferList(object, recursive = true, transfers) {
|
|
221
|
+
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
222
|
+
if (!object) {
|
|
223
|
+
} else if (isTransferable(object)) {
|
|
224
|
+
transfersSet.add(object);
|
|
225
|
+
} else if (isTransferable(object.buffer)) {
|
|
226
|
+
transfersSet.add(object.buffer);
|
|
227
|
+
} else if (ArrayBuffer.isView(object)) {
|
|
228
|
+
} else if (recursive && typeof object === "object") {
|
|
229
|
+
for (const key in object) {
|
|
230
|
+
getTransferList(object[key], recursive, transfersSet);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return transfers === void 0 ? Array.from(transfersSet) : [];
|
|
234
|
+
}
|
|
235
|
+
function isTransferable(object) {
|
|
236
|
+
if (!object) {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
if (object instanceof ArrayBuffer) {
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
if (typeof MessagePort !== "undefined" && object instanceof MessagePort) {
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
if (typeof ImageBitmap !== "undefined" && object instanceof ImageBitmap) {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
if (typeof OffscreenCanvas !== "undefined" && object instanceof OffscreenCanvas) {
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
function getTransferListForWriter(object) {
|
|
254
|
+
if (object === null) {
|
|
255
|
+
return {};
|
|
256
|
+
}
|
|
257
|
+
const clone = Object.assign({}, object);
|
|
258
|
+
Object.keys(clone).forEach((key) => {
|
|
259
|
+
if (typeof object[key] === "object" && !ArrayBuffer.isView(object[key]) && !(object[key] instanceof Array)) {
|
|
260
|
+
clone[key] = getTransferListForWriter(object[key]);
|
|
261
|
+
} else if (typeof clone[key] === "function" || clone[key] instanceof RegExp) {
|
|
262
|
+
clone[key] = {};
|
|
263
|
+
} else {
|
|
264
|
+
clone[key] = object[key];
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
return clone;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// dist/worker-utils/lib/worker-farm/worker-thread.js
|
|
271
|
+
var NOOP = () => {
|
|
272
|
+
};
|
|
273
|
+
var WorkerThread = class {
|
|
274
|
+
name;
|
|
275
|
+
source;
|
|
276
|
+
url;
|
|
277
|
+
/** Lazily resolves the classic worker URL used as a fallback. */
|
|
278
|
+
getUrl;
|
|
279
|
+
/** Creates a browser Worker directly. */
|
|
280
|
+
loadWorker;
|
|
281
|
+
terminated = false;
|
|
282
|
+
worker;
|
|
283
|
+
onMessage;
|
|
284
|
+
onError;
|
|
285
|
+
_loadableURL = "";
|
|
286
|
+
/** Checks if workers are supported on this platform */
|
|
287
|
+
static isSupported() {
|
|
288
|
+
return typeof Worker !== "undefined" && isBrowser || typeof NodeWorker !== "undefined" && !isBrowser;
|
|
289
|
+
}
|
|
290
|
+
constructor(props) {
|
|
291
|
+
const { name, source, url, getUrl, loadWorker } = props;
|
|
292
|
+
assert(source || url || getUrl || loadWorker);
|
|
293
|
+
this.name = name;
|
|
294
|
+
this.source = source;
|
|
295
|
+
this.url = url;
|
|
296
|
+
this.getUrl = getUrl;
|
|
297
|
+
this.loadWorker = loadWorker;
|
|
298
|
+
this.onMessage = NOOP;
|
|
299
|
+
this.onError = (error) => console.log(error);
|
|
300
|
+
this.worker = isBrowser ? this._createBrowserWorker() : this._createNodeWorker();
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Terminate this worker thread
|
|
304
|
+
* @note Can free up significant memory
|
|
305
|
+
*/
|
|
306
|
+
destroy() {
|
|
307
|
+
this.onMessage = NOOP;
|
|
308
|
+
this.onError = NOOP;
|
|
309
|
+
this.worker.terminate();
|
|
310
|
+
this.terminated = true;
|
|
311
|
+
}
|
|
312
|
+
/** Keeps this worker from preventing Node.js process exit while idle. */
|
|
313
|
+
unref() {
|
|
314
|
+
if (!isBrowser && typeof this.worker.unref === "function") {
|
|
315
|
+
this.worker.unref();
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/** Keeps this worker alive while it is actively processing a job. */
|
|
319
|
+
ref() {
|
|
320
|
+
if (!isBrowser && typeof this.worker.ref === "function") {
|
|
321
|
+
this.worker.ref();
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
get isRunning() {
|
|
325
|
+
return Boolean(this.onMessage);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Send a message to this worker thread
|
|
329
|
+
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
330
|
+
* @param transferList If not supplied, calculated automatically by traversing data
|
|
331
|
+
*/
|
|
332
|
+
postMessage(data, transferList) {
|
|
333
|
+
transferList = transferList || getTransferList(data);
|
|
334
|
+
this.worker.postMessage(data, transferList);
|
|
335
|
+
}
|
|
336
|
+
// PRIVATE
|
|
337
|
+
/**
|
|
338
|
+
* Generate a standard Error from an ErrorEvent
|
|
339
|
+
* @param event
|
|
340
|
+
*/
|
|
341
|
+
_getErrorFromErrorEvent(event) {
|
|
342
|
+
let message = "Failed to load ";
|
|
343
|
+
message += `worker ${this.name} from ${this.url || "built-in worker factory"}. `;
|
|
344
|
+
if (event.message) {
|
|
345
|
+
message += `${event.message} in `;
|
|
346
|
+
}
|
|
347
|
+
if (event.lineno) {
|
|
348
|
+
message += `:${event.lineno}:${event.colno}`;
|
|
349
|
+
}
|
|
350
|
+
return new Error(message);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Creates a worker thread on the browser
|
|
354
|
+
*/
|
|
355
|
+
_createBrowserWorker() {
|
|
356
|
+
var _a;
|
|
357
|
+
if (this.loadWorker) {
|
|
358
|
+
try {
|
|
359
|
+
const worker2 = this.loadWorker();
|
|
360
|
+
if (worker2) {
|
|
361
|
+
return this._initializeBrowserWorker(worker2);
|
|
362
|
+
}
|
|
363
|
+
} catch (error) {
|
|
364
|
+
if (!this.source && !this.url && !this.getUrl) {
|
|
365
|
+
throw error;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
const url = this.url || ((_a = this.getUrl) == null ? void 0 : _a.call(this));
|
|
370
|
+
this._loadableURL = getLoadableWorkerURL({ source: this.source, url });
|
|
371
|
+
const worker = new Worker(this._loadableURL, { name: this.name });
|
|
372
|
+
return this._initializeBrowserWorker(worker);
|
|
373
|
+
}
|
|
374
|
+
/** Attaches protocol handlers to a browser worker. */
|
|
375
|
+
_initializeBrowserWorker(worker) {
|
|
376
|
+
worker.onmessage = (event) => {
|
|
377
|
+
if (!event.data) {
|
|
378
|
+
this.onError(new Error("No data received"));
|
|
379
|
+
} else {
|
|
380
|
+
this.onMessage(event.data);
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
worker.onerror = (error) => {
|
|
384
|
+
this.onError(this._getErrorFromErrorEvent(error));
|
|
385
|
+
this.terminated = true;
|
|
386
|
+
};
|
|
387
|
+
worker.onmessageerror = (event) => console.error(event);
|
|
388
|
+
return worker;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Creates a worker thread in node.js
|
|
392
|
+
* @todo https://nodejs.org/api/async_hooks.html#async-resource-worker-pool
|
|
393
|
+
*/
|
|
394
|
+
_createNodeWorker() {
|
|
395
|
+
let worker;
|
|
396
|
+
if (this.url) {
|
|
397
|
+
const absolute = this.url.includes(":/") || this.url.startsWith("/");
|
|
398
|
+
const url = absolute ? this.url : `./${this.url}`;
|
|
399
|
+
const workerUrl = url.startsWith("file:") ? new URL(url) : url;
|
|
400
|
+
const type = this.url.endsWith(".ts") || this.url.endsWith(".mjs") ? "module" : "commonjs";
|
|
401
|
+
worker = new NodeWorker(workerUrl, { eval: false, type });
|
|
402
|
+
} else if (this.source) {
|
|
403
|
+
worker = new NodeWorker(this.source, { eval: true });
|
|
404
|
+
} else {
|
|
405
|
+
throw new Error("no worker");
|
|
406
|
+
}
|
|
407
|
+
worker.on("message", (data) => {
|
|
408
|
+
this.onMessage(data);
|
|
409
|
+
});
|
|
410
|
+
worker.on("error", (error) => {
|
|
411
|
+
this.onError(error);
|
|
412
|
+
});
|
|
413
|
+
worker.on("exit", (_code) => {
|
|
414
|
+
});
|
|
415
|
+
return worker;
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// dist/worker-utils/lib/worker-farm/worker-pool.js
|
|
420
|
+
var WorkerPool = class {
|
|
421
|
+
name = "unnamed";
|
|
422
|
+
source;
|
|
423
|
+
// | Function;
|
|
424
|
+
url;
|
|
425
|
+
/** Lazily resolves a classic worker fallback URL. */
|
|
426
|
+
getUrl;
|
|
427
|
+
/** Creates a browser Worker directly. */
|
|
428
|
+
loadWorker;
|
|
429
|
+
maxConcurrency = 1;
|
|
430
|
+
maxMobileConcurrency = 1;
|
|
431
|
+
onDebug = () => {
|
|
432
|
+
};
|
|
433
|
+
reuseWorkers = true;
|
|
434
|
+
props = {};
|
|
435
|
+
jobQueue = [];
|
|
436
|
+
idleQueue = [];
|
|
437
|
+
activeJobs = /* @__PURE__ */ new Set();
|
|
438
|
+
count = 0;
|
|
439
|
+
isDestroyed = false;
|
|
440
|
+
/** Checks if workers are supported on this platform */
|
|
441
|
+
static isSupported() {
|
|
442
|
+
return WorkerThread.isSupported();
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @param processor - worker function
|
|
446
|
+
* @param maxConcurrency - max count of workers
|
|
447
|
+
*/
|
|
448
|
+
constructor(props) {
|
|
449
|
+
this.source = props.source;
|
|
450
|
+
this.url = props.url;
|
|
451
|
+
this.getUrl = props.getUrl;
|
|
452
|
+
this.loadWorker = props.loadWorker;
|
|
453
|
+
this.setProps(props);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Terminates all workers in the pool and aborts active jobs.
|
|
457
|
+
* @param reason Optional error delivered to active jobs.
|
|
458
|
+
* @note Can free up significant memory
|
|
459
|
+
*/
|
|
460
|
+
destroy(reason = new Error("Worker pool was destroyed")) {
|
|
461
|
+
this.activeJobs.forEach((job) => job.abort(reason));
|
|
462
|
+
const queuedJobs = this.jobQueue.splice(0);
|
|
463
|
+
queuedJobs.forEach((queuedJob) => queuedJob.onReject(reason));
|
|
464
|
+
this.idleQueue.forEach((worker) => worker.destroy());
|
|
465
|
+
this.isDestroyed = true;
|
|
466
|
+
}
|
|
467
|
+
setProps(props) {
|
|
468
|
+
this.props = { ...this.props, ...props };
|
|
469
|
+
if (props.name !== void 0) {
|
|
470
|
+
this.name = props.name;
|
|
471
|
+
}
|
|
472
|
+
if (props.maxConcurrency !== void 0) {
|
|
473
|
+
this.maxConcurrency = props.maxConcurrency;
|
|
474
|
+
}
|
|
475
|
+
if (props.maxMobileConcurrency !== void 0) {
|
|
476
|
+
this.maxMobileConcurrency = props.maxMobileConcurrency;
|
|
477
|
+
}
|
|
478
|
+
if (props.reuseWorkers !== void 0) {
|
|
479
|
+
this.reuseWorkers = props.reuseWorkers;
|
|
480
|
+
}
|
|
481
|
+
if (props.onDebug !== void 0) {
|
|
482
|
+
this.onDebug = props.onDebug;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
async startJob(name, onMessage2 = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
|
|
486
|
+
if (this.isDestroyed) {
|
|
487
|
+
return Promise.reject(new Error("Worker pool was destroyed"));
|
|
488
|
+
}
|
|
489
|
+
const startPromise = new Promise((onStart, onReject) => {
|
|
490
|
+
this.jobQueue.push({ name, onMessage: onMessage2, onError, onStart, onReject });
|
|
491
|
+
return this;
|
|
492
|
+
});
|
|
493
|
+
this._startQueuedJob();
|
|
494
|
+
return await startPromise;
|
|
495
|
+
}
|
|
496
|
+
// PRIVATE
|
|
497
|
+
/**
|
|
498
|
+
* Starts first queued job if worker is available or can be created
|
|
499
|
+
* Called when job is started and whenever a worker returns to the idleQueue
|
|
500
|
+
*/
|
|
501
|
+
async _startQueuedJob() {
|
|
502
|
+
if (!this.jobQueue.length) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
const workerThread = this._getAvailableWorker();
|
|
506
|
+
if (!workerThread) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
const queuedJob = this.jobQueue.shift();
|
|
510
|
+
if (queuedJob) {
|
|
511
|
+
this.onDebug({
|
|
512
|
+
message: "Starting job",
|
|
513
|
+
name: queuedJob.name,
|
|
514
|
+
workerThread,
|
|
515
|
+
backlog: this.jobQueue.length
|
|
516
|
+
});
|
|
517
|
+
const job = new WorkerJob(queuedJob.name, workerThread);
|
|
518
|
+
this.activeJobs.add(job);
|
|
519
|
+
workerThread.ref();
|
|
520
|
+
workerThread.onMessage = (data) => queuedJob.onMessage(job, data.type, data.payload);
|
|
521
|
+
workerThread.onError = (error) => queuedJob.onError(job, error);
|
|
522
|
+
queuedJob.onStart(job);
|
|
523
|
+
try {
|
|
524
|
+
await job.result;
|
|
525
|
+
} catch {
|
|
526
|
+
} finally {
|
|
527
|
+
this.activeJobs.delete(job);
|
|
528
|
+
this.returnWorkerToQueue(workerThread);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Returns a worker to the idle queue
|
|
534
|
+
* Destroys the worker if
|
|
535
|
+
* - pool is destroyed
|
|
536
|
+
* - if this pool doesn't reuse workers
|
|
537
|
+
* - if maxConcurrency has been lowered
|
|
538
|
+
* @param worker
|
|
539
|
+
*/
|
|
540
|
+
returnWorkerToQueue(worker) {
|
|
541
|
+
const shouldDestroyWorker = (
|
|
542
|
+
// Aborted jobs terminate their worker immediately.
|
|
543
|
+
worker.terminated || // If the pool is destroyed, there is no reason to keep the worker around
|
|
544
|
+
this.isDestroyed || // If the app has disabled worker reuse, any completed workers should be destroyed
|
|
545
|
+
!this.reuseWorkers || // If concurrency has been lowered, this worker might be surplus to requirements
|
|
546
|
+
this.count > this._getMaxConcurrency()
|
|
547
|
+
);
|
|
548
|
+
if (shouldDestroyWorker) {
|
|
549
|
+
if (!worker.terminated) {
|
|
550
|
+
worker.destroy();
|
|
551
|
+
}
|
|
552
|
+
this.count--;
|
|
553
|
+
} else {
|
|
554
|
+
worker.unref();
|
|
555
|
+
this.idleQueue.push(worker);
|
|
556
|
+
}
|
|
557
|
+
if (!this.isDestroyed) {
|
|
558
|
+
this._startQueuedJob();
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Returns idle worker or creates new worker if maxConcurrency has not been reached
|
|
563
|
+
*/
|
|
564
|
+
_getAvailableWorker() {
|
|
565
|
+
if (this.idleQueue.length > 0) {
|
|
566
|
+
return this.idleQueue.shift() || null;
|
|
567
|
+
}
|
|
568
|
+
if (this.count < this._getMaxConcurrency()) {
|
|
569
|
+
this.count++;
|
|
570
|
+
const name = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;
|
|
571
|
+
return new WorkerThread({
|
|
572
|
+
name,
|
|
573
|
+
source: this.source,
|
|
574
|
+
url: this.url,
|
|
575
|
+
getUrl: this.getUrl,
|
|
576
|
+
loadWorker: this.loadWorker
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
return null;
|
|
580
|
+
}
|
|
581
|
+
_getMaxConcurrency() {
|
|
582
|
+
return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
// dist/worker-utils/lib/worker-farm/worker-farm.js
|
|
587
|
+
var DEFAULT_PROPS = {
|
|
588
|
+
maxConcurrency: 3,
|
|
589
|
+
maxMobileConcurrency: 1,
|
|
590
|
+
reuseWorkers: true,
|
|
591
|
+
onDebug: () => {
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
var loadWorkerIds = /* @__PURE__ */ new WeakMap();
|
|
595
|
+
var nextLoadWorkerId = 1;
|
|
596
|
+
var WorkerFarm = class _WorkerFarm {
|
|
597
|
+
props;
|
|
598
|
+
workerPools = /* @__PURE__ */ new Map();
|
|
599
|
+
// singleton
|
|
600
|
+
static _workerFarm;
|
|
601
|
+
/** Checks if workers are supported on this platform */
|
|
602
|
+
static isSupported() {
|
|
603
|
+
return WorkerThread.isSupported();
|
|
604
|
+
}
|
|
605
|
+
/** Get the singleton instance of the global worker farm */
|
|
606
|
+
static getWorkerFarm(props = {}) {
|
|
607
|
+
_WorkerFarm._workerFarm = _WorkerFarm._workerFarm || new _WorkerFarm({});
|
|
608
|
+
_WorkerFarm._workerFarm.setProps(props);
|
|
609
|
+
return _WorkerFarm._workerFarm;
|
|
610
|
+
}
|
|
611
|
+
/** get global instance with WorkerFarm.getWorkerFarm() */
|
|
612
|
+
constructor(props) {
|
|
613
|
+
this.props = { ...DEFAULT_PROPS };
|
|
614
|
+
this.setProps(props);
|
|
615
|
+
this.workerPools = /* @__PURE__ */ new Map();
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Terminate all workers in the farm and abort active jobs.
|
|
619
|
+
* @param reason Optional error delivered to active jobs.
|
|
620
|
+
* @note Can free up significant memory
|
|
621
|
+
*/
|
|
622
|
+
destroy(reason) {
|
|
623
|
+
for (const workerPool of this.workerPools.values()) {
|
|
624
|
+
workerPool.destroy(reason);
|
|
625
|
+
}
|
|
626
|
+
this.workerPools = /* @__PURE__ */ new Map();
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Set props used when initializing worker pools
|
|
630
|
+
* @param props
|
|
631
|
+
*/
|
|
632
|
+
setProps(props) {
|
|
633
|
+
this.props = { ...this.props, ...props };
|
|
634
|
+
for (const workerPool of this.workerPools.values()) {
|
|
635
|
+
workerPool.setProps(this._getWorkerPoolProps());
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Returns a worker pool for the specified worker
|
|
640
|
+
* @param options Worker target used to identify and initialize the pool.
|
|
641
|
+
* @param options.name Worker name used as the base pool identity.
|
|
642
|
+
* @param options.url Worker script URL.
|
|
643
|
+
* @param options.source Inline worker source.
|
|
644
|
+
* @param options.loadWorker Built-in browser worker factory.
|
|
645
|
+
* @example
|
|
646
|
+
* const job = WorkerFarm.getWorkerFarm().getWorkerPool({name, url}).startJob(...);
|
|
647
|
+
*/
|
|
648
|
+
getWorkerPool(options) {
|
|
649
|
+
const { name, source, url, getUrl, loadWorker } = options;
|
|
650
|
+
const workerPoolKey = getWorkerPoolKey(options);
|
|
651
|
+
let workerPool = this.workerPools.get(workerPoolKey);
|
|
652
|
+
if (!workerPool) {
|
|
653
|
+
workerPool = new WorkerPool({
|
|
654
|
+
name,
|
|
655
|
+
source,
|
|
656
|
+
url,
|
|
657
|
+
getUrl,
|
|
658
|
+
loadWorker
|
|
659
|
+
});
|
|
660
|
+
workerPool.setProps(this._getWorkerPoolProps());
|
|
661
|
+
this.workerPools.set(workerPoolKey, workerPool);
|
|
662
|
+
}
|
|
663
|
+
return workerPool;
|
|
664
|
+
}
|
|
665
|
+
_getWorkerPoolProps() {
|
|
666
|
+
return {
|
|
667
|
+
maxConcurrency: this.props.maxConcurrency,
|
|
668
|
+
maxMobileConcurrency: this.props.maxMobileConcurrency,
|
|
669
|
+
reuseWorkers: this.props.reuseWorkers,
|
|
670
|
+
onDebug: this.props.onDebug
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
function getWorkerPoolKey(options) {
|
|
675
|
+
const { name, source, url, urlKey, loadWorker } = options;
|
|
676
|
+
const sourceKey = source ? `source:${source}` : "";
|
|
677
|
+
const urlKeyPart = url || urlKey ? `url:${url || urlKey}` : "";
|
|
678
|
+
const loadWorkerKey = loadWorker ? `loadWorker:${getLoadWorkerId(loadWorker)}` : "";
|
|
679
|
+
return [name, sourceKey, urlKeyPart, loadWorkerKey].filter(Boolean).join("|");
|
|
680
|
+
}
|
|
681
|
+
function getLoadWorkerId(loadWorker) {
|
|
682
|
+
let loadWorkerId = loadWorkerIds.get(loadWorker);
|
|
683
|
+
if (!loadWorkerId) {
|
|
684
|
+
loadWorkerId = nextLoadWorkerId++;
|
|
685
|
+
loadWorkerIds.set(loadWorker, loadWorkerId);
|
|
686
|
+
}
|
|
687
|
+
return loadWorkerId;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// dist/worker-utils/lib/worker-farm/worker-body.js
|
|
691
|
+
async function getParentPort() {
|
|
692
|
+
return parentPort;
|
|
693
|
+
}
|
|
694
|
+
var onMessageWrapperMap = /* @__PURE__ */ new Map();
|
|
695
|
+
var WorkerBody = class {
|
|
696
|
+
/** Check that we are actually in a worker thread */
|
|
697
|
+
static async inWorkerThread() {
|
|
698
|
+
return typeof self !== "undefined" || Boolean(await getParentPort());
|
|
699
|
+
}
|
|
700
|
+
/*
|
|
701
|
+
* (type: WorkerMessageType, payload: WorkerMessagePayload) => any
|
|
702
|
+
*/
|
|
703
|
+
static set onmessage(onMessage2) {
|
|
704
|
+
async function handleMessage(message) {
|
|
705
|
+
const parentPort2 = await getParentPort();
|
|
706
|
+
const { type, payload } = parentPort2 ? message : message.data;
|
|
707
|
+
onMessage2(type, payload);
|
|
708
|
+
}
|
|
709
|
+
getParentPort().then((parentPort2) => {
|
|
710
|
+
if (parentPort2) {
|
|
711
|
+
parentPort2.on("message", (message) => {
|
|
712
|
+
handleMessage(message);
|
|
713
|
+
});
|
|
714
|
+
parentPort2.on("exit", () => console.debug("Node worker closing"));
|
|
715
|
+
} else {
|
|
716
|
+
globalThis.onmessage = handleMessage;
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
static async addEventListener(onMessage2) {
|
|
721
|
+
let onMessageWrapper = onMessageWrapperMap.get(onMessage2);
|
|
722
|
+
if (!onMessageWrapper) {
|
|
723
|
+
onMessageWrapper = (message) => {
|
|
724
|
+
const messageData = getWorkerMessageData(message);
|
|
725
|
+
if (!messageData) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
onMessage2(messageData.type, messageData.payload);
|
|
729
|
+
};
|
|
730
|
+
onMessageWrapperMap.set(onMessage2, onMessageWrapper);
|
|
731
|
+
}
|
|
732
|
+
const parentPort2 = await getParentPort();
|
|
733
|
+
if (parentPort2) {
|
|
734
|
+
parentPort2.on("message", onMessageWrapper);
|
|
735
|
+
} else {
|
|
736
|
+
globalThis.addEventListener("message", onMessageWrapper);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
static async removeEventListener(onMessage2) {
|
|
740
|
+
const onMessageWrapper = onMessageWrapperMap.get(onMessage2);
|
|
741
|
+
onMessageWrapperMap.delete(onMessage2);
|
|
742
|
+
if (!onMessageWrapper) {
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const parentPort2 = await getParentPort();
|
|
746
|
+
if (parentPort2) {
|
|
747
|
+
parentPort2.off("message", onMessageWrapper);
|
|
748
|
+
} else {
|
|
749
|
+
globalThis.removeEventListener("message", onMessageWrapper);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Send a message from a worker to creating thread (main thread)
|
|
754
|
+
* @param type
|
|
755
|
+
* @param payload
|
|
756
|
+
*/
|
|
757
|
+
static async postMessage(type, payload) {
|
|
758
|
+
const data = { source: "loaders.gl", type, payload };
|
|
759
|
+
const transferList = getTransferList(payload);
|
|
760
|
+
const parentPort2 = await getParentPort();
|
|
761
|
+
if (parentPort2) {
|
|
762
|
+
parentPort2.postMessage(data, transferList);
|
|
763
|
+
} else {
|
|
764
|
+
globalThis.postMessage(data, transferList);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
function getWorkerMessageData(message) {
|
|
769
|
+
if (!message || typeof message !== "object") {
|
|
770
|
+
return null;
|
|
771
|
+
}
|
|
772
|
+
const messageData = "data" in message && message.type === "message" ? message.data : message;
|
|
773
|
+
return messageData && typeof messageData.source === "string" && messageData.source.startsWith("loaders.gl") ? messageData : null;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// dist/worker-utils/lib/async-queue/async-queue.js
|
|
777
|
+
var AsyncQueue = class {
|
|
778
|
+
_values;
|
|
779
|
+
_settlers;
|
|
780
|
+
_closed;
|
|
781
|
+
constructor() {
|
|
782
|
+
this._values = [];
|
|
783
|
+
this._settlers = [];
|
|
784
|
+
this._closed = false;
|
|
785
|
+
}
|
|
786
|
+
/** Return an async iterator for this queue */
|
|
787
|
+
[Symbol.asyncIterator]() {
|
|
788
|
+
return this;
|
|
789
|
+
}
|
|
790
|
+
/** Push a new value - the async iterator will yield a promise resolved to this value */
|
|
791
|
+
push(value) {
|
|
792
|
+
return this.enqueue(value);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Push a new value - the async iterator will yield a promise resolved to this value
|
|
796
|
+
* Add an error - the async iterator will yield a promise rejected with this value
|
|
797
|
+
*/
|
|
798
|
+
enqueue(value) {
|
|
799
|
+
if (this._closed) {
|
|
800
|
+
throw new Error("Closed");
|
|
801
|
+
}
|
|
802
|
+
if (this._settlers.length > 0) {
|
|
803
|
+
if (this._values.length > 0) {
|
|
804
|
+
throw new Error("Illegal internal state");
|
|
805
|
+
}
|
|
806
|
+
const settler = this._settlers.shift();
|
|
807
|
+
if (value instanceof Error) {
|
|
808
|
+
settler.reject(value);
|
|
809
|
+
} else {
|
|
810
|
+
settler.resolve({ value });
|
|
811
|
+
}
|
|
812
|
+
} else {
|
|
813
|
+
this._values.push(value);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/** Indicate that we not waiting for more values - The async iterator will be done */
|
|
817
|
+
close() {
|
|
818
|
+
while (this._settlers.length > 0) {
|
|
819
|
+
const settler = this._settlers.shift();
|
|
820
|
+
settler.resolve({ done: true });
|
|
821
|
+
}
|
|
822
|
+
this._closed = true;
|
|
823
|
+
}
|
|
824
|
+
// ITERATOR IMPLEMENTATION
|
|
825
|
+
/** @returns a Promise for an IteratorResult */
|
|
826
|
+
next() {
|
|
827
|
+
if (this._values.length > 0) {
|
|
828
|
+
const value = this._values.shift();
|
|
829
|
+
if (value instanceof Error) {
|
|
830
|
+
return Promise.reject(value);
|
|
831
|
+
}
|
|
832
|
+
return Promise.resolve({ done: false, value });
|
|
833
|
+
}
|
|
834
|
+
if (this._closed) {
|
|
835
|
+
if (this._settlers.length > 0) {
|
|
836
|
+
throw new Error("Illegal internal state");
|
|
837
|
+
}
|
|
838
|
+
return Promise.resolve({ done: true, value: void 0 });
|
|
839
|
+
}
|
|
840
|
+
return new Promise((resolve, reject) => {
|
|
841
|
+
this._settlers.push({ resolve, reject });
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
// dist/worker-utils/lib/worker-api/get-worker-url.js
|
|
847
|
+
var warnedWorkerVersionFallbacks = /* @__PURE__ */ new Set();
|
|
848
|
+
function getWorkerName(worker) {
|
|
849
|
+
const warning = worker.version !== VERSION ? ` (worker-utils@${VERSION})` : "";
|
|
850
|
+
return `${worker.name}@${worker.version}${warning}`;
|
|
851
|
+
}
|
|
852
|
+
function getCustomWorkerURL(worker, options = {}) {
|
|
853
|
+
var _a, _b;
|
|
854
|
+
const workerOptions = options[worker.id] || {};
|
|
855
|
+
const workerFile = isBrowser ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
856
|
+
let url = workerOptions.workerUrl;
|
|
857
|
+
if (!url && worker.id === "compression") {
|
|
858
|
+
url = options.workerUrl;
|
|
859
|
+
}
|
|
860
|
+
const workerType = options._workerType || ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType);
|
|
861
|
+
if (!url && workerType === "test") {
|
|
862
|
+
if (isBrowser) {
|
|
863
|
+
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
864
|
+
} else {
|
|
865
|
+
const workerSourceDirectory = worker.module === "core" && ((_b = worker.workerNode) == null ? void 0 : _b.startsWith("worker-utils/")) ? "worker-utils/workers" : "workers";
|
|
866
|
+
const workerSourceNode = worker.workerSourceNode || `${workerSourceDirectory}/${worker.id}-worker-node.ts`;
|
|
867
|
+
url = `modules/${worker.module}/src/${workerSourceNode}`;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
return url || null;
|
|
871
|
+
}
|
|
872
|
+
function getWorkerURL(worker, options = {}) {
|
|
873
|
+
const customWorkerUrl = getCustomWorkerURL(worker, options);
|
|
874
|
+
const descriptorWorkerUrl = typeof worker.worker === "string" ? worker.worker : null;
|
|
875
|
+
const url = customWorkerUrl || descriptorWorkerUrl || getDefaultWorkerURL(worker, true);
|
|
876
|
+
assert(url);
|
|
877
|
+
return url;
|
|
878
|
+
}
|
|
879
|
+
function getDefaultWorkerURL(worker, warn = false) {
|
|
880
|
+
const workerFile = isBrowser ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
881
|
+
let version = worker.version;
|
|
882
|
+
if (version === "latest") {
|
|
883
|
+
version = NPM_TAG;
|
|
884
|
+
}
|
|
885
|
+
const versionTag = version ? `@${version}` : "";
|
|
886
|
+
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
887
|
+
if (warn) {
|
|
888
|
+
warnIfUsingNpmTagFallback(worker, url);
|
|
889
|
+
}
|
|
890
|
+
return url;
|
|
891
|
+
}
|
|
892
|
+
function warnIfUsingNpmTagFallback(worker, url) {
|
|
893
|
+
if (worker.version !== "latest") {
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const workerId = `${worker.module}:${worker.id}`;
|
|
897
|
+
if (warnedWorkerVersionFallbacks.has(workerId)) {
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
warnedWorkerVersionFallbacks.add(workerId);
|
|
901
|
+
console.warn(`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// dist/worker-utils/lib/worker-api/process-on-worker.js
|
|
905
|
+
function canProcessOnWorker(worker, options) {
|
|
906
|
+
if (!WorkerFarm.isSupported()) {
|
|
907
|
+
return false;
|
|
908
|
+
}
|
|
909
|
+
const workerOptions = options == null ? void 0 : options[worker.id];
|
|
910
|
+
return Boolean((worker.worker || worker.loadWorker || (workerOptions == null ? void 0 : workerOptions.workerUrl)) && (options == null ? void 0 : options.worker));
|
|
911
|
+
}
|
|
912
|
+
async function processOnWorker(worker, data, options = {}, context = {}, jobContext = {}) {
|
|
913
|
+
var _a, _b, _c;
|
|
914
|
+
throwIfAborted(options.signal);
|
|
915
|
+
const name = getWorkerName(worker);
|
|
916
|
+
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
917
|
+
const workerPool = workerFarm.getWorkerPool(getWorkerPoolTarget(worker, options, name));
|
|
918
|
+
const jobName = options.jobName || worker.name;
|
|
919
|
+
const job = await workerPool.startJob(
|
|
920
|
+
jobName,
|
|
921
|
+
// eslint-disable-next-line
|
|
922
|
+
onMessage.bind(null, context)
|
|
923
|
+
);
|
|
924
|
+
const abortJob = () => job.abort(getAbortReason(options.signal));
|
|
925
|
+
(_a = options.signal) == null ? void 0 : _a.addEventListener("abort", abortJob, { once: true });
|
|
926
|
+
if ((_b = options.signal) == null ? void 0 : _b.aborted) {
|
|
927
|
+
abortJob();
|
|
928
|
+
}
|
|
929
|
+
try {
|
|
930
|
+
const { signal: _signal, ...workerOptions } = options;
|
|
931
|
+
const transferableOptions = getTransferListForWriter(workerOptions);
|
|
932
|
+
const transferableContext = getTransferListForWriter(jobContext);
|
|
933
|
+
if (job.isRunning) {
|
|
934
|
+
job.postMessage("process", {
|
|
935
|
+
input: data,
|
|
936
|
+
options: transferableOptions,
|
|
937
|
+
context: transferableContext
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
const result = await job.result;
|
|
941
|
+
return result.result;
|
|
942
|
+
} finally {
|
|
943
|
+
(_c = options.signal) == null ? void 0 : _c.removeEventListener("abort", abortJob);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
function processOnWorkerInBatches(worker, input, options = {}, context = {}, jobContext = {}) {
|
|
947
|
+
return processOnWorkerInBatchesIterator(worker, input, options, context, jobContext);
|
|
948
|
+
}
|
|
949
|
+
async function* processOnWorkerInBatchesIterator(worker, input, options, context, jobContext) {
|
|
950
|
+
var _a, _b, _c;
|
|
951
|
+
throwIfAborted(options.signal);
|
|
952
|
+
const name = getWorkerName(worker);
|
|
953
|
+
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
954
|
+
const workerPool = workerFarm.getWorkerPool(getWorkerPoolTarget(worker, options, name));
|
|
955
|
+
const outputBatches = new AsyncQueue();
|
|
956
|
+
const inputIterator = getAsyncIterator(input);
|
|
957
|
+
let outputFinished = false;
|
|
958
|
+
let inputFinished = false;
|
|
959
|
+
let inputRequest = Promise.resolve();
|
|
960
|
+
const batchJobFailed = new Error("Worker batch job failed");
|
|
961
|
+
const finishOutput = () => {
|
|
962
|
+
if (!outputFinished) {
|
|
963
|
+
outputFinished = true;
|
|
964
|
+
outputBatches.close();
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
const failOutput = (_error) => {
|
|
968
|
+
if (!outputFinished) {
|
|
969
|
+
outputFinished = true;
|
|
970
|
+
outputBatches.enqueue(batchJobFailed);
|
|
971
|
+
outputBatches.close();
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
const job = await workerPool.startJob(options.jobName || worker.name, (activeJob, type, payload) => {
|
|
975
|
+
switch (type) {
|
|
976
|
+
case "input-request":
|
|
977
|
+
inputRequest = inputRequest.then(async () => {
|
|
978
|
+
const nextBatch = await inputIterator.next();
|
|
979
|
+
if (!activeJob.isRunning) {
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
if (nextBatch.done) {
|
|
983
|
+
inputFinished = true;
|
|
984
|
+
activeJob.postMessage("input-done", {});
|
|
985
|
+
} else {
|
|
986
|
+
activeJob.postMessage("input-batch", { input: nextBatch.value });
|
|
987
|
+
}
|
|
988
|
+
}).catch((error) => activeJob.abort(error));
|
|
989
|
+
break;
|
|
990
|
+
case "output-batch":
|
|
991
|
+
outputBatches.push(payload.result);
|
|
992
|
+
break;
|
|
993
|
+
case "done":
|
|
994
|
+
activeJob.done(payload);
|
|
995
|
+
finishOutput();
|
|
996
|
+
break;
|
|
997
|
+
case "error": {
|
|
998
|
+
const error = new Error(payload.error || "Worker batch processing failed");
|
|
999
|
+
activeJob.error(error);
|
|
1000
|
+
failOutput(error);
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
case "process":
|
|
1004
|
+
void onMessage(context, activeJob, type, payload);
|
|
1005
|
+
break;
|
|
1006
|
+
default: {
|
|
1007
|
+
const error = new Error(`Unexpected worker batch message: ${type}`);
|
|
1008
|
+
activeJob.error(error);
|
|
1009
|
+
failOutput(error);
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
const abortJob = () => job.abort(getAbortReason(options.signal));
|
|
1015
|
+
(_a = options.signal) == null ? void 0 : _a.addEventListener("abort", abortJob, { once: true });
|
|
1016
|
+
if ((_b = options.signal) == null ? void 0 : _b.aborted) {
|
|
1017
|
+
abortJob();
|
|
1018
|
+
}
|
|
1019
|
+
void job.result.catch(failOutput);
|
|
1020
|
+
try {
|
|
1021
|
+
const { signal: _signal, ...workerOptions } = options;
|
|
1022
|
+
if (job.isRunning) {
|
|
1023
|
+
job.postMessage("process-in-batches", {
|
|
1024
|
+
options: getTransferListForWriter(workerOptions),
|
|
1025
|
+
context: getTransferListForWriter(jobContext)
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
try {
|
|
1029
|
+
for await (const outputBatch of outputBatches) {
|
|
1030
|
+
yield outputBatch;
|
|
1031
|
+
if (job.isRunning) {
|
|
1032
|
+
job.postMessage("output-ack", {});
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
} catch (error) {
|
|
1036
|
+
if (error === batchJobFailed) {
|
|
1037
|
+
await job.result;
|
|
1038
|
+
}
|
|
1039
|
+
throw error;
|
|
1040
|
+
}
|
|
1041
|
+
await job.result;
|
|
1042
|
+
} finally {
|
|
1043
|
+
(_c = options.signal) == null ? void 0 : _c.removeEventListener("abort", abortJob);
|
|
1044
|
+
if (job.isRunning) {
|
|
1045
|
+
job.abort(createAbortError2("Worker batch iterator was closed"));
|
|
1046
|
+
}
|
|
1047
|
+
if (!inputFinished) {
|
|
1048
|
+
closeInputIterator(inputIterator);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
function throwIfAborted(signal) {
|
|
1053
|
+
if (!(signal == null ? void 0 : signal.aborted)) {
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
throw getAbortReason(signal);
|
|
1057
|
+
}
|
|
1058
|
+
function getAbortReason(signal) {
|
|
1059
|
+
return (signal == null ? void 0 : signal.reason) ?? createAbortError2("Worker job was aborted");
|
|
1060
|
+
}
|
|
1061
|
+
function createAbortError2(message) {
|
|
1062
|
+
const error = new Error(message);
|
|
1063
|
+
error.name = "AbortError";
|
|
1064
|
+
return error;
|
|
1065
|
+
}
|
|
1066
|
+
function getAsyncIterator(input) {
|
|
1067
|
+
if (Symbol.asyncIterator in input) {
|
|
1068
|
+
return input[Symbol.asyncIterator]();
|
|
1069
|
+
}
|
|
1070
|
+
return (async function* iterateSynchronously() {
|
|
1071
|
+
yield* input;
|
|
1072
|
+
})();
|
|
1073
|
+
}
|
|
1074
|
+
function closeInputIterator(inputIterator) {
|
|
1075
|
+
var _a;
|
|
1076
|
+
try {
|
|
1077
|
+
void Promise.resolve((_a = inputIterator.return) == null ? void 0 : _a.call(inputIterator)).catch(() => void 0);
|
|
1078
|
+
} catch {
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
async function preloadWorker(worker, options = {}, preloadOptions = {}) {
|
|
1082
|
+
var _a;
|
|
1083
|
+
const name = getWorkerName(worker);
|
|
1084
|
+
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
1085
|
+
const workerPool = workerFarm.getWorkerPool(getWorkerPoolTarget(worker, options, name));
|
|
1086
|
+
const count = preloadOptions.count ?? options.maxConcurrency ?? ((_a = options.core) == null ? void 0 : _a.maxConcurrency) ?? 1;
|
|
1087
|
+
const preloadJobs = Array.from({ length: count }, async () => {
|
|
1088
|
+
const job = await workerPool.startJob(`${worker.name} preload`, onPreloadMessage);
|
|
1089
|
+
job.postMessage("preload", {});
|
|
1090
|
+
return await job.result;
|
|
1091
|
+
});
|
|
1092
|
+
await Promise.all(preloadJobs);
|
|
1093
|
+
}
|
|
1094
|
+
function getWorkerPoolTarget(worker, options, name) {
|
|
1095
|
+
if (options.source) {
|
|
1096
|
+
return { name, source: options.source };
|
|
1097
|
+
}
|
|
1098
|
+
const customWorkerUrl = getCustomWorkerURL(worker, options);
|
|
1099
|
+
if (customWorkerUrl) {
|
|
1100
|
+
return { name, url: customWorkerUrl };
|
|
1101
|
+
}
|
|
1102
|
+
if (isBrowser && worker.loadWorker) {
|
|
1103
|
+
return {
|
|
1104
|
+
name,
|
|
1105
|
+
loadWorker: worker.loadWorker,
|
|
1106
|
+
getUrl: () => getWorkerURL(worker, options),
|
|
1107
|
+
urlKey: getDefaultWorkerURL(worker)
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
return { name, url: getWorkerURL(worker, options) };
|
|
1111
|
+
}
|
|
1112
|
+
async function onMessage(context, job, type, payload) {
|
|
1113
|
+
switch (type) {
|
|
1114
|
+
case "done":
|
|
1115
|
+
job.done(payload);
|
|
1116
|
+
break;
|
|
1117
|
+
case "error":
|
|
1118
|
+
job.error(new Error(payload.error));
|
|
1119
|
+
break;
|
|
1120
|
+
case "process":
|
|
1121
|
+
const { id, input, options } = payload;
|
|
1122
|
+
try {
|
|
1123
|
+
if (!context.process) {
|
|
1124
|
+
job.postMessage("error", { id, error: "Worker not set up to process on main thread" });
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
const result = await context.process(input, options, void 0, payload.context || {});
|
|
1128
|
+
job.postMessage("done", { id, result });
|
|
1129
|
+
} catch (error) {
|
|
1130
|
+
const message = error instanceof Error ? error.message : "unknown error";
|
|
1131
|
+
job.postMessage("error", { id, error: message });
|
|
1132
|
+
}
|
|
1133
|
+
break;
|
|
1134
|
+
default:
|
|
1135
|
+
console.warn(`process-on-worker: unknown message ${type}`);
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
function onPreloadMessage(job, type, payload) {
|
|
1139
|
+
switch (type) {
|
|
1140
|
+
case "done":
|
|
1141
|
+
job.done(payload);
|
|
1142
|
+
break;
|
|
1143
|
+
case "error":
|
|
1144
|
+
job.error(new Error(payload.error));
|
|
1145
|
+
break;
|
|
1146
|
+
default:
|
|
1147
|
+
console.warn(`process-on-worker: unknown preload message ${type}`);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// dist/worker-utils/lib/worker-api/create-worker.js
|
|
1152
|
+
var requestId = 0;
|
|
1153
|
+
var activeInputBatches = null;
|
|
1154
|
+
var activeOutputAcknowledgements = null;
|
|
1155
|
+
async function createWorker(process2, processInBatches) {
|
|
1156
|
+
if (!await WorkerBody.inWorkerThread()) {
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
const context = {
|
|
1160
|
+
process: processOnMainThread
|
|
1161
|
+
};
|
|
1162
|
+
WorkerBody.onmessage = async (type, payload) => {
|
|
1163
|
+
try {
|
|
1164
|
+
switch (type) {
|
|
1165
|
+
case "preload":
|
|
1166
|
+
WorkerBody.postMessage("done", {});
|
|
1167
|
+
break;
|
|
1168
|
+
case "process":
|
|
1169
|
+
if (!process2) {
|
|
1170
|
+
throw new Error("Worker does not support atomic processing");
|
|
1171
|
+
}
|
|
1172
|
+
const result = await process2(payload.input, payload.options || {}, context, payload.context || {});
|
|
1173
|
+
WorkerBody.postMessage("done", { result });
|
|
1174
|
+
break;
|
|
1175
|
+
case "process-in-batches":
|
|
1176
|
+
if (!processInBatches) {
|
|
1177
|
+
throw new Error("Worker does not support batched processing");
|
|
1178
|
+
}
|
|
1179
|
+
const inputBatches = new AsyncQueue();
|
|
1180
|
+
const outputAcknowledgements = new AsyncQueue();
|
|
1181
|
+
activeInputBatches = inputBatches;
|
|
1182
|
+
activeOutputAcknowledgements = outputAcknowledgements;
|
|
1183
|
+
try {
|
|
1184
|
+
const resultIterator = processInBatches(createDemandDrivenIterator(inputBatches), payload.options || {}, context, payload.context || {});
|
|
1185
|
+
for await (const batch of resultIterator) {
|
|
1186
|
+
await WorkerBody.postMessage("output-batch", { result: batch });
|
|
1187
|
+
await outputAcknowledgements.next();
|
|
1188
|
+
}
|
|
1189
|
+
await WorkerBody.postMessage("done", {});
|
|
1190
|
+
} finally {
|
|
1191
|
+
activeInputBatches = null;
|
|
1192
|
+
activeOutputAcknowledgements = null;
|
|
1193
|
+
}
|
|
1194
|
+
break;
|
|
1195
|
+
case "input-batch":
|
|
1196
|
+
if (!activeInputBatches) {
|
|
1197
|
+
throw new Error("Worker has no active batched processing session");
|
|
1198
|
+
}
|
|
1199
|
+
activeInputBatches.push(payload.input);
|
|
1200
|
+
break;
|
|
1201
|
+
case "input-done":
|
|
1202
|
+
if (!activeInputBatches) {
|
|
1203
|
+
throw new Error("Worker has no active batched processing session");
|
|
1204
|
+
}
|
|
1205
|
+
activeInputBatches.close();
|
|
1206
|
+
break;
|
|
1207
|
+
case "output-ack":
|
|
1208
|
+
if (!activeOutputAcknowledgements) {
|
|
1209
|
+
throw new Error("Worker has no active batched processing session");
|
|
1210
|
+
}
|
|
1211
|
+
activeOutputAcknowledgements.push(void 0);
|
|
1212
|
+
break;
|
|
1213
|
+
default:
|
|
1214
|
+
}
|
|
1215
|
+
} catch (error) {
|
|
1216
|
+
const message = error instanceof Error ? error.message : "";
|
|
1217
|
+
WorkerBody.postMessage("error", { error: message });
|
|
1218
|
+
}
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
async function* createDemandDrivenIterator(inputBatches) {
|
|
1222
|
+
while (true) {
|
|
1223
|
+
await WorkerBody.postMessage("input-request", {});
|
|
1224
|
+
const nextBatch = await inputBatches.next();
|
|
1225
|
+
if (nextBatch.done) {
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1228
|
+
yield nextBatch.value;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
function processOnMainThread(arrayBuffer, options = {}, jobContext = {}) {
|
|
1232
|
+
return new Promise((resolve, reject) => {
|
|
1233
|
+
const id = requestId++;
|
|
1234
|
+
const onMessage2 = (type, payload2) => {
|
|
1235
|
+
if (payload2.id !== id) {
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1238
|
+
switch (type) {
|
|
1239
|
+
case "done":
|
|
1240
|
+
WorkerBody.removeEventListener(onMessage2);
|
|
1241
|
+
resolve(payload2.result);
|
|
1242
|
+
break;
|
|
1243
|
+
case "error":
|
|
1244
|
+
WorkerBody.removeEventListener(onMessage2);
|
|
1245
|
+
reject(payload2.error);
|
|
1246
|
+
break;
|
|
1247
|
+
default:
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1250
|
+
WorkerBody.addEventListener(onMessage2);
|
|
1251
|
+
const payload = { id, input: arrayBuffer, options, context: jobContext };
|
|
1252
|
+
WorkerBody.postMessage("process", payload);
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
// dist/worker-utils/lib/worker-api/validate-worker-version.js
|
|
1257
|
+
function validateWorkerVersion(worker, coreVersion = VERSION) {
|
|
1258
|
+
assert(worker, "no worker provided");
|
|
1259
|
+
const workerVersion = worker.version;
|
|
1260
|
+
if (!coreVersion || !workerVersion) {
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
// dist/worker-utils/lib/library-utils/library-utils.js
|
|
1267
|
+
var loadLibraryPromises = {};
|
|
1268
|
+
function extractLoadLibraryOptions(options = {}) {
|
|
1269
|
+
var _a, _b;
|
|
1270
|
+
const useLocalLibraries = options.useLocalLibraries ?? ((_a = options.core) == null ? void 0 : _a.useLocalLibraries);
|
|
1271
|
+
const CDN = getCDNOption(options.CDN, (_b = options.core) == null ? void 0 : _b.CDN);
|
|
1272
|
+
const modules = options.modules;
|
|
1273
|
+
return {
|
|
1274
|
+
...useLocalLibraries !== void 0 ? { useLocalLibraries } : {},
|
|
1275
|
+
...CDN !== void 0 ? { CDN } : {},
|
|
1276
|
+
...modules !== void 0 ? { modules } : {}
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
function getCDNOption(cdn, coreCDN) {
|
|
1280
|
+
if (typeof cdn === "string" || cdn === null) {
|
|
1281
|
+
return cdn;
|
|
1282
|
+
}
|
|
1283
|
+
if (typeof coreCDN === "string" || coreCDN === null) {
|
|
1284
|
+
return coreCDN;
|
|
1285
|
+
}
|
|
1286
|
+
return void 0;
|
|
1287
|
+
}
|
|
1288
|
+
async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null, moduleLibraryName = null) {
|
|
1289
|
+
var _a, _b;
|
|
1290
|
+
let moduleLibraryUrl = libraryUrl;
|
|
1291
|
+
if (moduleName) {
|
|
1292
|
+
const requestedLibraryName = libraryName || libraryUrl;
|
|
1293
|
+
const injectedLibrary = (_a = options.modules) == null ? void 0 : _a[requestedLibraryName];
|
|
1294
|
+
if (injectedLibrary !== void 0 && typeof injectedLibrary !== "string") {
|
|
1295
|
+
return injectedLibrary;
|
|
1296
|
+
}
|
|
1297
|
+
libraryUrl = getLibraryUrl(libraryUrl, moduleName, options, libraryName);
|
|
1298
|
+
const hasLibraryOverride = typeof injectedLibrary === "string";
|
|
1299
|
+
moduleLibraryUrl = moduleLibraryName && (!hasLibraryOverride || typeof ((_b = options.modules) == null ? void 0 : _b[moduleLibraryName]) === "string") ? getLibraryUrl(moduleLibraryName, moduleName, options, moduleLibraryName) : libraryUrl;
|
|
1300
|
+
}
|
|
1301
|
+
const cacheKey = getLibraryCacheKey(libraryUrl, moduleLibraryUrl, isWorker);
|
|
1302
|
+
loadLibraryPromises[cacheKey] = // eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
1303
|
+
loadLibraryPromises[cacheKey] || loadLibraryFromFile(libraryUrl, moduleLibraryUrl);
|
|
1304
|
+
return await loadLibraryPromises[cacheKey];
|
|
1305
|
+
}
|
|
1306
|
+
function getLibraryCacheKey(libraryUrl, moduleLibraryUrl, worker) {
|
|
1307
|
+
return worker ? JSON.stringify([libraryUrl, moduleLibraryUrl]) : libraryUrl;
|
|
1308
|
+
}
|
|
1309
|
+
function getLibraryUrl(library, moduleName, options = {}, libraryName = null) {
|
|
1310
|
+
if (options == null ? void 0 : options.core) {
|
|
1311
|
+
throw new Error("loadLibrary: options.core must be pre-normalized");
|
|
1312
|
+
}
|
|
1313
|
+
libraryName = libraryName || library;
|
|
1314
|
+
const modules = options.modules || {};
|
|
1315
|
+
if (typeof modules[libraryName] === "string") {
|
|
1316
|
+
return modules[libraryName];
|
|
1317
|
+
}
|
|
1318
|
+
if (!options.useLocalLibraries && library.startsWith("http")) {
|
|
1319
|
+
return library;
|
|
1320
|
+
}
|
|
1321
|
+
if (!isBrowser) {
|
|
1322
|
+
return `modules/${moduleName}/dist/libs/${libraryName}`;
|
|
1323
|
+
}
|
|
1324
|
+
if (options.CDN) {
|
|
1325
|
+
if (typeof options.CDN !== "string") {
|
|
1326
|
+
throw new Error("loadLibrary: options.CDN must be a string or null");
|
|
1327
|
+
}
|
|
1328
|
+
assert(options.CDN.startsWith("http"));
|
|
1329
|
+
return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${libraryName}`;
|
|
1330
|
+
}
|
|
1331
|
+
if (isWorker) {
|
|
1332
|
+
return libraryName.endsWith(".mjs") ? `./libs/${libraryName}` : `../src/libs/${libraryName}`;
|
|
1333
|
+
}
|
|
1334
|
+
return `modules/${moduleName}/src/libs/${libraryName}`;
|
|
1335
|
+
}
|
|
1336
|
+
async function loadLibraryFromFile(libraryUrl, moduleLibraryUrl) {
|
|
1337
|
+
if (libraryUrl.endsWith("wasm")) {
|
|
1338
|
+
return await loadAsArrayBuffer(libraryUrl);
|
|
1339
|
+
}
|
|
1340
|
+
if (!isBrowser) {
|
|
1341
|
+
const { requireFromFile } = globalThis.loaders || {};
|
|
1342
|
+
try {
|
|
1343
|
+
const result = await (requireFromFile == null ? void 0 : requireFromFile(libraryUrl));
|
|
1344
|
+
if (result || !libraryUrl.includes("/dist/libs/")) {
|
|
1345
|
+
return result;
|
|
1346
|
+
}
|
|
1347
|
+
return await (requireFromFile == null ? void 0 : requireFromFile(libraryUrl.replace("/dist/libs/", "/src/libs/")));
|
|
1348
|
+
} catch (error) {
|
|
1349
|
+
if (libraryUrl.includes("/dist/libs/")) {
|
|
1350
|
+
try {
|
|
1351
|
+
return await (requireFromFile == null ? void 0 : requireFromFile(libraryUrl.replace("/dist/libs/", "/src/libs/")));
|
|
1352
|
+
} catch {
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
console.error(error);
|
|
1356
|
+
return null;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
if (isWorker) {
|
|
1360
|
+
return loadLibraryInWorker(libraryUrl, moduleLibraryUrl);
|
|
1361
|
+
}
|
|
1362
|
+
const scriptSource = await loadAsText(libraryUrl);
|
|
1363
|
+
return loadLibraryFromString(scriptSource, libraryUrl);
|
|
1364
|
+
}
|
|
1365
|
+
async function loadLibraryInWorker(libraryUrl, moduleLibraryUrl = libraryUrl) {
|
|
1366
|
+
try {
|
|
1367
|
+
importScripts();
|
|
1368
|
+
} catch {
|
|
1369
|
+
const moduleUrl = new URL(moduleLibraryUrl, globalThis.location.href).href;
|
|
1370
|
+
const library = await import(
|
|
1371
|
+
/* @vite-ignore */
|
|
1372
|
+
moduleUrl
|
|
1373
|
+
);
|
|
1374
|
+
return library.default ?? library;
|
|
1375
|
+
}
|
|
1376
|
+
return importScripts(libraryUrl);
|
|
1377
|
+
}
|
|
1378
|
+
function loadLibraryFromString(scriptSource, id) {
|
|
1379
|
+
const script = document.createElement("script");
|
|
1380
|
+
script.id = id;
|
|
1381
|
+
try {
|
|
1382
|
+
script.appendChild(document.createTextNode(scriptSource));
|
|
1383
|
+
} catch (_e) {
|
|
1384
|
+
script.text = scriptSource;
|
|
1385
|
+
}
|
|
1386
|
+
document.body.appendChild(script);
|
|
1387
|
+
return null;
|
|
1388
|
+
}
|
|
1389
|
+
async function loadAsArrayBuffer(url) {
|
|
1390
|
+
const { readFileAsArrayBuffer } = globalThis.loaders || {};
|
|
1391
|
+
if (isBrowser || !readFileAsArrayBuffer || url.startsWith("http")) {
|
|
1392
|
+
const response = await fetch(url);
|
|
1393
|
+
return await response.arrayBuffer();
|
|
1394
|
+
}
|
|
1395
|
+
try {
|
|
1396
|
+
return await readFileAsArrayBuffer(url);
|
|
1397
|
+
} catch {
|
|
1398
|
+
if (url.includes("/dist/libs/")) {
|
|
1399
|
+
return await readFileAsArrayBuffer(url.replace("/dist/libs/", "/src/libs/"));
|
|
1400
|
+
}
|
|
1401
|
+
throw new Error(`Failed to load ArrayBuffer from ${url}`);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
async function loadAsText(url) {
|
|
1405
|
+
const { readFileAsText } = globalThis.loaders || {};
|
|
1406
|
+
if (isBrowser || !readFileAsText || url.startsWith("http")) {
|
|
1407
|
+
const response = await fetch(url);
|
|
1408
|
+
return await response.text();
|
|
1409
|
+
}
|
|
1410
|
+
try {
|
|
1411
|
+
return await readFileAsText(url);
|
|
1412
|
+
} catch {
|
|
1413
|
+
if (url.includes("/dist/libs/")) {
|
|
1414
|
+
return await readFileAsText(url.replace("/dist/libs/", "/src/libs/"));
|
|
1415
|
+
}
|
|
1416
|
+
throw new Error(`Failed to load text from ${url}`);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
// dist/worker-utils/lib/process-utils/child-process-proxy.browser.js
|
|
1421
|
+
var ChildProcessProxy = class {
|
|
1422
|
+
constructor() {
|
|
1423
|
+
throw new Error("ChildProcessProxy is not available in browser environments");
|
|
1424
|
+
}
|
|
1425
|
+
async start(props) {
|
|
1426
|
+
return await Promise.resolve({});
|
|
1427
|
+
}
|
|
1428
|
+
async stop() {
|
|
1429
|
+
return await Promise.resolve();
|
|
1430
|
+
}
|
|
1431
|
+
async exit() {
|
|
1432
|
+
return await Promise.resolve();
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
// dist/worker-utils/index.js
|
|
1437
|
+
var NullWorker = {
|
|
1438
|
+
id: "null",
|
|
1439
|
+
name: "null",
|
|
1440
|
+
module: "core",
|
|
1441
|
+
workerFile: "worker-utils/null-worker.js",
|
|
1442
|
+
workerNode: "worker-utils/null-worker-node.js",
|
|
1443
|
+
version: VERSION,
|
|
1444
|
+
options: {
|
|
1445
|
+
null: {}
|
|
1446
|
+
}
|
|
1447
|
+
};
|
|
1448
|
+
//# sourceMappingURL=index.cjs.map
|