@itwin/rpcinterface-full-stack-tests 4.4.0-dev.3 → 4.4.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js +14 -0
- package/lib/dist/_bea9.bundled-tests.js.map +1 -0
- package/lib/dist/bundled-tests.js +5550 -4535
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js → vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js} +595 -273
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -0
- package/package.json +16 -16
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js.map +0 -1
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-
|
|
2
|
+
(self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6"],{
|
|
3
3
|
|
|
4
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
5
|
-
|
|
6
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
7
|
-
|
|
4
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js":
|
|
5
|
+
/*!****************************************************************************************************************************!*\
|
|
6
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js ***!
|
|
7
|
+
\****************************************************************************************************************************/
|
|
8
8
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9
9
|
|
|
10
10
|
__webpack_require__.r(__webpack_exports__);
|
|
11
11
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
/* harmony export */ DracoLoader: () => (/* binding */ DracoLoader),
|
|
13
|
-
/* harmony export */ _TypecheckDracoLoader: () => (/* binding */ _TypecheckDracoLoader)
|
|
12
|
+
/* harmony export */ "DracoLoader": () => (/* binding */ DracoLoader),
|
|
13
|
+
/* harmony export */ "_TypecheckDracoLoader": () => (/* binding */ _TypecheckDracoLoader)
|
|
14
14
|
/* harmony export */ });
|
|
15
|
-
/* harmony import */ var
|
|
16
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.4.14/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
17
|
-
|
|
15
|
+
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
18
16
|
|
|
19
17
|
const DEFAULT_DRACO_OPTIONS = {
|
|
20
18
|
draco: {
|
|
@@ -26,10 +24,10 @@ const DEFAULT_DRACO_OPTIONS = {
|
|
|
26
24
|
};
|
|
27
25
|
const DracoLoader = {
|
|
28
26
|
name: 'Draco',
|
|
29
|
-
id:
|
|
27
|
+
id: 'draco',
|
|
30
28
|
module: 'draco',
|
|
31
29
|
shapes: ['mesh'],
|
|
32
|
-
version:
|
|
30
|
+
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__.VERSION,
|
|
33
31
|
worker: true,
|
|
34
32
|
extensions: ['drc'],
|
|
35
33
|
mimeTypes: ['application/octet-stream'],
|
|
@@ -42,19 +40,19 @@ const _TypecheckDracoLoader = DracoLoader;
|
|
|
42
40
|
|
|
43
41
|
/***/ }),
|
|
44
42
|
|
|
45
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
46
|
-
|
|
47
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
48
|
-
|
|
43
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js":
|
|
44
|
+
/*!****************************************************************************************************************************!*\
|
|
45
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js ***!
|
|
46
|
+
\****************************************************************************************************************************/
|
|
49
47
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
50
48
|
|
|
51
49
|
__webpack_require__.r(__webpack_exports__);
|
|
52
50
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
53
|
-
/* harmony export */ DracoWriter: () => (/* binding */ DracoWriter)
|
|
51
|
+
/* harmony export */ "DracoWriter": () => (/* binding */ DracoWriter)
|
|
54
52
|
/* harmony export */ });
|
|
55
|
-
/* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
56
|
-
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
57
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
53
|
+
/* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js");
|
|
54
|
+
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
55
|
+
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
58
56
|
|
|
59
57
|
|
|
60
58
|
|
|
@@ -73,12 +71,13 @@ const DracoWriter = {
|
|
|
73
71
|
draco: DEFAULT_DRACO_OPTIONS
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
|
|
75
|
+
async function encode(data, options = {}) {
|
|
78
76
|
const {
|
|
79
77
|
draco
|
|
80
78
|
} = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__.loadDracoEncoderModule)(options);
|
|
81
79
|
const dracoBuilder = new _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__["default"](draco);
|
|
80
|
+
|
|
82
81
|
try {
|
|
83
82
|
return dracoBuilder.encodeSync(data, options.draco);
|
|
84
83
|
} finally {
|
|
@@ -89,75 +88,61 @@ async function encode(data) {
|
|
|
89
88
|
|
|
90
89
|
/***/ }),
|
|
91
90
|
|
|
92
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
93
|
-
|
|
94
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
95
|
-
|
|
91
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/index.js":
|
|
92
|
+
/*!*********************************************************************************************************************!*\
|
|
93
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/index.js ***!
|
|
94
|
+
\*********************************************************************************************************************/
|
|
96
95
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
97
96
|
|
|
98
97
|
__webpack_require__.r(__webpack_exports__);
|
|
99
98
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
100
|
-
/* harmony export */ DracoLoader: () => (/* binding */ DracoLoader),
|
|
101
|
-
/* harmony export */ DracoWorkerLoader: () => (/* reexport safe */
|
|
102
|
-
/* harmony export */ DracoWriter: () => (/* reexport safe */ _draco_writer__WEBPACK_IMPORTED_MODULE_0__.DracoWriter),
|
|
103
|
-
/* harmony export */
|
|
104
|
-
/* harmony export */ _TypecheckDracoLoader: () => (/* binding */ _TypecheckDracoLoader)
|
|
99
|
+
/* harmony export */ "DracoLoader": () => (/* binding */ DracoLoader),
|
|
100
|
+
/* harmony export */ "DracoWorkerLoader": () => (/* reexport safe */ _draco_loader__WEBPACK_IMPORTED_MODULE_1__.DracoLoader),
|
|
101
|
+
/* harmony export */ "DracoWriter": () => (/* reexport safe */ _draco_writer__WEBPACK_IMPORTED_MODULE_0__.DracoWriter),
|
|
102
|
+
/* harmony export */ "_TypecheckDracoLoader": () => (/* binding */ _TypecheckDracoLoader)
|
|
105
103
|
/* harmony export */ });
|
|
106
|
-
/* harmony import */ var
|
|
107
|
-
/* harmony import */ var
|
|
108
|
-
/* harmony import */ var
|
|
109
|
-
/* harmony import */ var
|
|
110
|
-
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.4.14/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
111
|
-
/* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.4.14/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js");
|
|
112
|
-
|
|
104
|
+
/* harmony import */ var _draco_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./draco-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js");
|
|
105
|
+
/* harmony import */ var _lib_draco_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/draco-parser */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js");
|
|
106
|
+
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
107
|
+
/* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js");
|
|
113
108
|
|
|
114
109
|
|
|
115
110
|
|
|
116
111
|
|
|
117
112
|
|
|
118
|
-
const
|
|
119
|
-
id: _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_1__.isBrowser ? 'draco-writer' : 'draco-writer-nodejs',
|
|
120
|
-
name: 'Draco compressed geometry writer',
|
|
121
|
-
module: 'draco',
|
|
122
|
-
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_2__.VERSION,
|
|
123
|
-
worker: true,
|
|
124
|
-
options: {
|
|
125
|
-
draco: {},
|
|
126
|
-
source: null
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
const DracoLoader = {
|
|
131
|
-
..._draco_loader__WEBPACK_IMPORTED_MODULE_3__.DracoLoader,
|
|
113
|
+
const DracoLoader = { ..._draco_loader__WEBPACK_IMPORTED_MODULE_1__.DracoLoader,
|
|
132
114
|
parse
|
|
133
115
|
};
|
|
116
|
+
|
|
134
117
|
async function parse(arrayBuffer, options) {
|
|
135
118
|
const {
|
|
136
119
|
draco
|
|
137
|
-
} = await (0,
|
|
138
|
-
const dracoParser = new
|
|
120
|
+
} = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_2__.loadDracoDecoderModule)(options);
|
|
121
|
+
const dracoParser = new _lib_draco_parser__WEBPACK_IMPORTED_MODULE_3__["default"](draco);
|
|
122
|
+
|
|
139
123
|
try {
|
|
140
124
|
return dracoParser.parseSync(arrayBuffer, options === null || options === void 0 ? void 0 : options.draco);
|
|
141
125
|
} finally {
|
|
142
126
|
dracoParser.destroy();
|
|
143
127
|
}
|
|
144
128
|
}
|
|
129
|
+
|
|
145
130
|
const _TypecheckDracoLoader = DracoLoader;
|
|
146
131
|
|
|
147
132
|
|
|
148
133
|
/***/ }),
|
|
149
134
|
|
|
150
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
151
|
-
|
|
152
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
153
|
-
|
|
135
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js":
|
|
136
|
+
/*!*********************************************************************************************************************************!*\
|
|
137
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js ***!
|
|
138
|
+
\*********************************************************************************************************************************/
|
|
154
139
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
155
140
|
|
|
156
141
|
__webpack_require__.r(__webpack_exports__);
|
|
157
142
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
158
143
|
/* harmony export */ "default": () => (/* binding */ DracoBuilder)
|
|
159
144
|
/* harmony export */ });
|
|
160
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
145
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
161
146
|
|
|
162
147
|
const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
163
148
|
POSITION: 'POSITION',
|
|
@@ -165,19 +150,27 @@ const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
|
165
150
|
COLOR_0: 'COLOR',
|
|
166
151
|
TEXCOORD_0: 'TEX_COORD'
|
|
167
152
|
};
|
|
153
|
+
|
|
168
154
|
const noop = () => {};
|
|
155
|
+
|
|
169
156
|
class DracoBuilder {
|
|
170
157
|
constructor(draco) {
|
|
171
158
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
159
|
+
|
|
172
160
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoEncoder", void 0);
|
|
161
|
+
|
|
173
162
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMeshBuilder", void 0);
|
|
163
|
+
|
|
174
164
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMetadataBuilder", void 0);
|
|
165
|
+
|
|
175
166
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "log", void 0);
|
|
167
|
+
|
|
176
168
|
this.draco = draco;
|
|
177
169
|
this.dracoEncoder = new this.draco.Encoder();
|
|
178
170
|
this.dracoMeshBuilder = new this.draco.MeshBuilder();
|
|
179
171
|
this.dracoMetadataBuilder = new this.draco.MetadataBuilder();
|
|
180
172
|
}
|
|
173
|
+
|
|
181
174
|
destroy() {
|
|
182
175
|
this.destroyEncodedObject(this.dracoMeshBuilder);
|
|
183
176
|
this.destroyEncodedObject(this.dracoEncoder);
|
|
@@ -186,40 +179,53 @@ class DracoBuilder {
|
|
|
186
179
|
this.dracoEncoder = null;
|
|
187
180
|
this.draco = null;
|
|
188
181
|
}
|
|
182
|
+
|
|
189
183
|
destroyEncodedObject(object) {
|
|
190
184
|
if (object) {
|
|
191
185
|
this.draco.destroy(object);
|
|
192
186
|
}
|
|
193
187
|
}
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
|
|
189
|
+
encodeSync(mesh, options = {}) {
|
|
196
190
|
this.log = noop;
|
|
191
|
+
|
|
197
192
|
this._setOptions(options);
|
|
193
|
+
|
|
198
194
|
return options.pointcloud ? this._encodePointCloud(mesh, options) : this._encodeMesh(mesh, options);
|
|
199
195
|
}
|
|
196
|
+
|
|
200
197
|
_getAttributesFromMesh(mesh) {
|
|
201
|
-
const attributes = {
|
|
202
|
-
...mesh,
|
|
198
|
+
const attributes = { ...mesh,
|
|
203
199
|
...mesh.attributes
|
|
204
200
|
};
|
|
201
|
+
|
|
205
202
|
if (mesh.indices) {
|
|
206
203
|
attributes.indices = mesh.indices;
|
|
207
204
|
}
|
|
205
|
+
|
|
208
206
|
return attributes;
|
|
209
207
|
}
|
|
208
|
+
|
|
210
209
|
_encodePointCloud(pointcloud, options) {
|
|
211
210
|
const dracoPointCloud = new this.draco.PointCloud();
|
|
211
|
+
|
|
212
212
|
if (options.metadata) {
|
|
213
213
|
this._addGeometryMetadata(dracoPointCloud, options.metadata);
|
|
214
214
|
}
|
|
215
|
+
|
|
215
216
|
const attributes = this._getAttributesFromMesh(pointcloud);
|
|
217
|
+
|
|
216
218
|
this._createDracoPointCloud(dracoPointCloud, attributes, options);
|
|
219
|
+
|
|
217
220
|
const dracoData = new this.draco.DracoInt8Array();
|
|
221
|
+
|
|
218
222
|
try {
|
|
219
223
|
const encodedLen = this.dracoEncoder.EncodePointCloudToDracoBuffer(dracoPointCloud, false, dracoData);
|
|
224
|
+
|
|
220
225
|
if (!(encodedLen > 0)) {
|
|
221
226
|
throw new Error('Draco encoding failed.');
|
|
222
227
|
}
|
|
228
|
+
|
|
223
229
|
this.log("DRACO encoded ".concat(dracoPointCloud.num_points(), " points\n with ").concat(dracoPointCloud.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
224
230
|
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
225
231
|
} finally {
|
|
@@ -227,19 +233,27 @@ class DracoBuilder {
|
|
|
227
233
|
this.destroyEncodedObject(dracoPointCloud);
|
|
228
234
|
}
|
|
229
235
|
}
|
|
236
|
+
|
|
230
237
|
_encodeMesh(mesh, options) {
|
|
231
238
|
const dracoMesh = new this.draco.Mesh();
|
|
239
|
+
|
|
232
240
|
if (options.metadata) {
|
|
233
241
|
this._addGeometryMetadata(dracoMesh, options.metadata);
|
|
234
242
|
}
|
|
243
|
+
|
|
235
244
|
const attributes = this._getAttributesFromMesh(mesh);
|
|
245
|
+
|
|
236
246
|
this._createDracoMesh(dracoMesh, attributes, options);
|
|
247
|
+
|
|
237
248
|
const dracoData = new this.draco.DracoInt8Array();
|
|
249
|
+
|
|
238
250
|
try {
|
|
239
251
|
const encodedLen = this.dracoEncoder.EncodeMeshToDracoBuffer(dracoMesh, dracoData);
|
|
252
|
+
|
|
240
253
|
if (encodedLen <= 0) {
|
|
241
254
|
throw new Error('Draco encoding failed.');
|
|
242
255
|
}
|
|
256
|
+
|
|
243
257
|
this.log("DRACO encoded ".concat(dracoMesh.num_points(), " points\n with ").concat(dracoMesh.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
244
258
|
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
245
259
|
} finally {
|
|
@@ -247,14 +261,17 @@ class DracoBuilder {
|
|
|
247
261
|
this.destroyEncodedObject(dracoMesh);
|
|
248
262
|
}
|
|
249
263
|
}
|
|
264
|
+
|
|
250
265
|
_setOptions(options) {
|
|
251
266
|
if ('speed' in options) {
|
|
252
267
|
this.dracoEncoder.SetSpeedOptions(...options.speed);
|
|
253
268
|
}
|
|
269
|
+
|
|
254
270
|
if ('method' in options) {
|
|
255
271
|
const dracoMethod = this.draco[options.method || 'MESH_SEQUENTIAL_ENCODING'];
|
|
256
272
|
this.dracoEncoder.SetEncodingMethod(dracoMethod);
|
|
257
273
|
}
|
|
274
|
+
|
|
258
275
|
if ('quantization' in options) {
|
|
259
276
|
for (const attribute in options.quantization) {
|
|
260
277
|
const bits = options.quantization[attribute];
|
|
@@ -263,18 +280,25 @@ class DracoBuilder {
|
|
|
263
280
|
}
|
|
264
281
|
}
|
|
265
282
|
}
|
|
283
|
+
|
|
266
284
|
_createDracoMesh(dracoMesh, attributes, options) {
|
|
267
285
|
const optionalMetadata = options.attributesMetadata || {};
|
|
286
|
+
|
|
268
287
|
try {
|
|
269
288
|
const positions = this._getPositionAttribute(attributes);
|
|
289
|
+
|
|
270
290
|
if (!positions) {
|
|
271
291
|
throw new Error('positions');
|
|
272
292
|
}
|
|
293
|
+
|
|
273
294
|
const vertexCount = positions.length / 3;
|
|
295
|
+
|
|
274
296
|
for (let attributeName in attributes) {
|
|
275
297
|
const attribute = attributes[attributeName];
|
|
276
298
|
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
299
|
+
|
|
277
300
|
const uniqueId = this._addAttributeToMesh(dracoMesh, attributeName, attribute, vertexCount);
|
|
301
|
+
|
|
278
302
|
if (uniqueId !== -1) {
|
|
279
303
|
this._addAttributeMetadata(dracoMesh, uniqueId, {
|
|
280
304
|
name: attributeName,
|
|
@@ -286,20 +310,28 @@ class DracoBuilder {
|
|
|
286
310
|
this.destroyEncodedObject(dracoMesh);
|
|
287
311
|
throw error;
|
|
288
312
|
}
|
|
313
|
+
|
|
289
314
|
return dracoMesh;
|
|
290
315
|
}
|
|
316
|
+
|
|
291
317
|
_createDracoPointCloud(dracoPointCloud, attributes, options) {
|
|
292
318
|
const optionalMetadata = options.attributesMetadata || {};
|
|
319
|
+
|
|
293
320
|
try {
|
|
294
321
|
const positions = this._getPositionAttribute(attributes);
|
|
322
|
+
|
|
295
323
|
if (!positions) {
|
|
296
324
|
throw new Error('positions');
|
|
297
325
|
}
|
|
326
|
+
|
|
298
327
|
const vertexCount = positions.length / 3;
|
|
328
|
+
|
|
299
329
|
for (let attributeName in attributes) {
|
|
300
330
|
const attribute = attributes[attributeName];
|
|
301
331
|
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
332
|
+
|
|
302
333
|
const uniqueId = this._addAttributeToMesh(dracoPointCloud, attributeName, attribute, vertexCount);
|
|
334
|
+
|
|
303
335
|
if (uniqueId !== -1) {
|
|
304
336
|
this._addAttributeMetadata(dracoPointCloud, uniqueId, {
|
|
305
337
|
name: attributeName,
|
|
@@ -311,85 +343,115 @@ class DracoBuilder {
|
|
|
311
343
|
this.destroyEncodedObject(dracoPointCloud);
|
|
312
344
|
throw error;
|
|
313
345
|
}
|
|
346
|
+
|
|
314
347
|
return dracoPointCloud;
|
|
315
348
|
}
|
|
349
|
+
|
|
316
350
|
_addAttributeToMesh(mesh, attributeName, attribute, vertexCount) {
|
|
317
351
|
if (!ArrayBuffer.isView(attribute)) {
|
|
318
352
|
return -1;
|
|
319
353
|
}
|
|
354
|
+
|
|
320
355
|
const type = this._getDracoAttributeType(attributeName);
|
|
356
|
+
|
|
321
357
|
const size = attribute.length / vertexCount;
|
|
358
|
+
|
|
322
359
|
if (type === 'indices') {
|
|
323
360
|
const numFaces = attribute.length / 3;
|
|
324
361
|
this.log("Adding attribute ".concat(attributeName, ", size ").concat(numFaces));
|
|
325
362
|
this.dracoMeshBuilder.AddFacesToMesh(mesh, numFaces, attribute);
|
|
326
363
|
return -1;
|
|
327
364
|
}
|
|
365
|
+
|
|
328
366
|
this.log("Adding attribute ".concat(attributeName, ", size ").concat(size));
|
|
329
367
|
const builder = this.dracoMeshBuilder;
|
|
330
368
|
const {
|
|
331
369
|
buffer
|
|
332
370
|
} = attribute;
|
|
371
|
+
|
|
333
372
|
switch (attribute.constructor) {
|
|
334
373
|
case Int8Array:
|
|
335
374
|
return builder.AddInt8Attribute(mesh, type, vertexCount, size, new Int8Array(buffer));
|
|
375
|
+
|
|
336
376
|
case Int16Array:
|
|
337
377
|
return builder.AddInt16Attribute(mesh, type, vertexCount, size, new Int16Array(buffer));
|
|
378
|
+
|
|
338
379
|
case Int32Array:
|
|
339
380
|
return builder.AddInt32Attribute(mesh, type, vertexCount, size, new Int32Array(buffer));
|
|
381
|
+
|
|
340
382
|
case Uint8Array:
|
|
341
383
|
case Uint8ClampedArray:
|
|
342
384
|
return builder.AddUInt8Attribute(mesh, type, vertexCount, size, new Uint8Array(buffer));
|
|
385
|
+
|
|
343
386
|
case Uint16Array:
|
|
344
387
|
return builder.AddUInt16Attribute(mesh, type, vertexCount, size, new Uint16Array(buffer));
|
|
388
|
+
|
|
345
389
|
case Uint32Array:
|
|
346
390
|
return builder.AddUInt32Attribute(mesh, type, vertexCount, size, new Uint32Array(buffer));
|
|
391
|
+
|
|
347
392
|
case Float32Array:
|
|
348
393
|
default:
|
|
349
394
|
return builder.AddFloatAttribute(mesh, type, vertexCount, size, new Float32Array(buffer));
|
|
350
395
|
}
|
|
351
396
|
}
|
|
397
|
+
|
|
352
398
|
_getDracoAttributeType(attributeName) {
|
|
353
399
|
switch (attributeName.toLowerCase()) {
|
|
354
400
|
case 'indices':
|
|
355
401
|
return 'indices';
|
|
402
|
+
|
|
356
403
|
case 'position':
|
|
357
404
|
case 'positions':
|
|
358
405
|
case 'vertices':
|
|
359
406
|
return this.draco.POSITION;
|
|
407
|
+
|
|
360
408
|
case 'normal':
|
|
361
409
|
case 'normals':
|
|
362
410
|
return this.draco.NORMAL;
|
|
411
|
+
|
|
363
412
|
case 'color':
|
|
364
413
|
case 'colors':
|
|
365
414
|
return this.draco.COLOR;
|
|
415
|
+
|
|
366
416
|
case 'texcoord':
|
|
367
417
|
case 'texcoords':
|
|
368
418
|
return this.draco.TEX_COORD;
|
|
419
|
+
|
|
369
420
|
default:
|
|
370
421
|
return this.draco.GENERIC;
|
|
371
422
|
}
|
|
372
423
|
}
|
|
424
|
+
|
|
373
425
|
_getPositionAttribute(attributes) {
|
|
374
426
|
for (const attributeName in attributes) {
|
|
375
427
|
const attribute = attributes[attributeName];
|
|
428
|
+
|
|
376
429
|
const dracoType = this._getDracoAttributeType(attributeName);
|
|
430
|
+
|
|
377
431
|
if (dracoType === this.draco.POSITION) {
|
|
378
432
|
return attribute;
|
|
379
433
|
}
|
|
380
434
|
}
|
|
435
|
+
|
|
381
436
|
return null;
|
|
382
437
|
}
|
|
438
|
+
|
|
383
439
|
_addGeometryMetadata(dracoGeometry, metadata) {
|
|
384
440
|
const dracoMetadata = new this.draco.Metadata();
|
|
441
|
+
|
|
385
442
|
this._populateDracoMetadata(dracoMetadata, metadata);
|
|
443
|
+
|
|
386
444
|
this.dracoMeshBuilder.AddMetadata(dracoGeometry, dracoMetadata);
|
|
387
445
|
}
|
|
446
|
+
|
|
388
447
|
_addAttributeMetadata(dracoGeometry, uniqueAttributeId, metadata) {
|
|
389
448
|
const dracoAttributeMetadata = new this.draco.Metadata();
|
|
449
|
+
|
|
390
450
|
this._populateDracoMetadata(dracoAttributeMetadata, metadata);
|
|
451
|
+
|
|
391
452
|
this.dracoMeshBuilder.SetMetadataForAttribute(dracoGeometry, uniqueAttributeId, dracoAttributeMetadata);
|
|
392
453
|
}
|
|
454
|
+
|
|
393
455
|
_populateDracoMetadata(dracoMetadata, metadata) {
|
|
394
456
|
for (const [key, value] of getEntries(metadata)) {
|
|
395
457
|
switch (typeof value) {
|
|
@@ -399,28 +461,37 @@ class DracoBuilder {
|
|
|
399
461
|
} else {
|
|
400
462
|
this.dracoMetadataBuilder.AddDoubleEntry(dracoMetadata, key, value);
|
|
401
463
|
}
|
|
464
|
+
|
|
402
465
|
break;
|
|
466
|
+
|
|
403
467
|
case 'object':
|
|
404
468
|
if (value instanceof Int32Array) {
|
|
405
469
|
this.dracoMetadataBuilder.AddIntEntryArray(dracoMetadata, key, value, value.length);
|
|
406
470
|
}
|
|
471
|
+
|
|
407
472
|
break;
|
|
473
|
+
|
|
408
474
|
case 'string':
|
|
409
475
|
default:
|
|
410
476
|
this.dracoMetadataBuilder.AddStringEntry(dracoMetadata, key, value);
|
|
411
477
|
}
|
|
412
478
|
}
|
|
413
479
|
}
|
|
480
|
+
|
|
414
481
|
}
|
|
482
|
+
|
|
415
483
|
function dracoInt8ArrayToArrayBuffer(dracoData) {
|
|
416
484
|
const byteLength = dracoData.size();
|
|
417
485
|
const outputBuffer = new ArrayBuffer(byteLength);
|
|
418
486
|
const outputData = new Int8Array(outputBuffer);
|
|
487
|
+
|
|
419
488
|
for (let i = 0; i < byteLength; ++i) {
|
|
420
489
|
outputData[i] = dracoData.GetValue(i);
|
|
421
490
|
}
|
|
491
|
+
|
|
422
492
|
return outputBuffer;
|
|
423
493
|
}
|
|
494
|
+
|
|
424
495
|
function getEntries(container) {
|
|
425
496
|
const hasEntriesFunc = container.entries && !container.hasOwnProperty('entries');
|
|
426
497
|
return hasEntriesFunc ? container.entries() : Object.entries(container);
|
|
@@ -429,30 +500,29 @@ function getEntries(container) {
|
|
|
429
500
|
|
|
430
501
|
/***/ }),
|
|
431
502
|
|
|
432
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
433
|
-
|
|
434
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
435
|
-
|
|
503
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js":
|
|
504
|
+
/*!***************************************************************************************************************************************!*\
|
|
505
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js ***!
|
|
506
|
+
\***************************************************************************************************************************************/
|
|
436
507
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
437
508
|
|
|
438
509
|
__webpack_require__.r(__webpack_exports__);
|
|
439
510
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
440
|
-
/* harmony export */ loadDracoDecoderModule: () => (/* binding */ loadDracoDecoderModule),
|
|
441
|
-
/* harmony export */ loadDracoEncoderModule: () => (/* binding */ loadDracoEncoderModule)
|
|
511
|
+
/* harmony export */ "loadDracoDecoderModule": () => (/* binding */ loadDracoDecoderModule),
|
|
512
|
+
/* harmony export */ "loadDracoEncoderModule": () => (/* binding */ loadDracoEncoderModule)
|
|
442
513
|
/* harmony export */ });
|
|
443
|
-
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
444
|
-
|
|
445
|
-
const
|
|
446
|
-
const
|
|
447
|
-
const
|
|
448
|
-
const
|
|
449
|
-
const
|
|
450
|
-
const DRACO_WASM_DECODER_URL = "".concat(STATIC_DECODER_URL, "/draco_decoder.wasm");
|
|
451
|
-
const DRACO_ENCODER_URL = "https://raw.githubusercontent.com/google/draco/".concat(DRACO_ENCODER_VERSION, "/javascript/draco_encoder.js");
|
|
514
|
+
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js");
|
|
515
|
+
|
|
516
|
+
const DRACO_VERSION = '1.4.1';
|
|
517
|
+
const DRACO_JS_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.js");
|
|
518
|
+
const DRACO_WASM_WRAPPER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_wasm_wrapper.js");
|
|
519
|
+
const DRACO_WASM_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.wasm");
|
|
520
|
+
const DRACO_ENCODER_URL = "https://raw.githubusercontent.com/google/draco/".concat(DRACO_VERSION, "/javascript/draco_encoder.js");
|
|
452
521
|
let loadDecoderPromise;
|
|
453
522
|
let loadEncoderPromise;
|
|
454
523
|
async function loadDracoDecoderModule(options) {
|
|
455
524
|
const modules = options.modules || {};
|
|
525
|
+
|
|
456
526
|
if (modules.draco3d) {
|
|
457
527
|
loadDecoderPromise = loadDecoderPromise || modules.draco3d.createDecoderModule({}).then(draco => {
|
|
458
528
|
return {
|
|
@@ -462,10 +532,12 @@ async function loadDracoDecoderModule(options) {
|
|
|
462
532
|
} else {
|
|
463
533
|
loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);
|
|
464
534
|
}
|
|
535
|
+
|
|
465
536
|
return await loadDecoderPromise;
|
|
466
537
|
}
|
|
467
538
|
async function loadDracoEncoderModule(options) {
|
|
468
539
|
const modules = options.modules || {};
|
|
540
|
+
|
|
469
541
|
if (modules.draco3d) {
|
|
470
542
|
loadEncoderPromise = loadEncoderPromise || modules.draco3d.createEncoderModule({}).then(draco => {
|
|
471
543
|
return {
|
|
@@ -475,36 +547,44 @@ async function loadDracoEncoderModule(options) {
|
|
|
475
547
|
} else {
|
|
476
548
|
loadEncoderPromise = loadEncoderPromise || loadDracoEncoder(options);
|
|
477
549
|
}
|
|
550
|
+
|
|
478
551
|
return await loadEncoderPromise;
|
|
479
552
|
}
|
|
553
|
+
|
|
480
554
|
async function loadDracoDecoder(options) {
|
|
481
555
|
let DracoDecoderModule;
|
|
482
556
|
let wasmBinary;
|
|
557
|
+
|
|
483
558
|
switch (options.draco && options.draco.decoderType) {
|
|
484
559
|
case 'js':
|
|
485
560
|
DracoDecoderModule = await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_JS_DECODER_URL, 'draco', options);
|
|
486
561
|
break;
|
|
562
|
+
|
|
487
563
|
case 'wasm':
|
|
488
564
|
default:
|
|
489
565
|
[DracoDecoderModule, wasmBinary] = await Promise.all([await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_WRAPPER_URL, 'draco', options), await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_DECODER_URL, 'draco', options)]);
|
|
490
566
|
}
|
|
567
|
+
|
|
491
568
|
DracoDecoderModule = DracoDecoderModule || globalThis.DracoDecoderModule;
|
|
492
569
|
return await initializeDracoDecoder(DracoDecoderModule, wasmBinary);
|
|
493
570
|
}
|
|
571
|
+
|
|
494
572
|
function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
|
|
495
573
|
const options = {};
|
|
574
|
+
|
|
496
575
|
if (wasmBinary) {
|
|
497
576
|
options.wasmBinary = wasmBinary;
|
|
498
577
|
}
|
|
578
|
+
|
|
499
579
|
return new Promise(resolve => {
|
|
500
|
-
DracoDecoderModule({
|
|
501
|
-
...options,
|
|
580
|
+
DracoDecoderModule({ ...options,
|
|
502
581
|
onModuleLoaded: draco => resolve({
|
|
503
582
|
draco
|
|
504
583
|
})
|
|
505
584
|
});
|
|
506
585
|
});
|
|
507
586
|
}
|
|
587
|
+
|
|
508
588
|
async function loadDracoEncoder(options) {
|
|
509
589
|
let DracoEncoderModule = await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_ENCODER_URL, 'draco', options);
|
|
510
590
|
DracoEncoderModule = DracoEncoderModule || globalThis.DracoEncoderModule;
|
|
@@ -520,19 +600,19 @@ async function loadDracoEncoder(options) {
|
|
|
520
600
|
|
|
521
601
|
/***/ }),
|
|
522
602
|
|
|
523
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
524
|
-
|
|
525
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
526
|
-
|
|
603
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js":
|
|
604
|
+
/*!********************************************************************************************************************************!*\
|
|
605
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js ***!
|
|
606
|
+
\********************************************************************************************************************************/
|
|
527
607
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
528
608
|
|
|
529
609
|
__webpack_require__.r(__webpack_exports__);
|
|
530
610
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
531
611
|
/* harmony export */ "default": () => (/* binding */ DracoParser)
|
|
532
612
|
/* harmony export */ });
|
|
533
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
534
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
535
|
-
/* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
613
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
614
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js");
|
|
615
|
+
/* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js");
|
|
536
616
|
|
|
537
617
|
|
|
538
618
|
|
|
@@ -559,41 +639,55 @@ const INDEX_ITEM_SIZE = 4;
|
|
|
559
639
|
class DracoParser {
|
|
560
640
|
constructor(draco) {
|
|
561
641
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
642
|
+
|
|
562
643
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "decoder", void 0);
|
|
644
|
+
|
|
563
645
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadataQuerier", void 0);
|
|
646
|
+
|
|
564
647
|
this.draco = draco;
|
|
565
648
|
this.decoder = new this.draco.Decoder();
|
|
566
649
|
this.metadataQuerier = new this.draco.MetadataQuerier();
|
|
567
650
|
}
|
|
651
|
+
|
|
568
652
|
destroy() {
|
|
569
653
|
this.draco.destroy(this.decoder);
|
|
570
654
|
this.draco.destroy(this.metadataQuerier);
|
|
571
655
|
}
|
|
572
|
-
|
|
573
|
-
|
|
656
|
+
|
|
657
|
+
parseSync(arrayBuffer, options = {}) {
|
|
574
658
|
const buffer = new this.draco.DecoderBuffer();
|
|
575
659
|
buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);
|
|
660
|
+
|
|
576
661
|
this._disableAttributeTransforms(options);
|
|
662
|
+
|
|
577
663
|
const geometry_type = this.decoder.GetEncodedGeometryType(buffer);
|
|
578
664
|
const dracoGeometry = geometry_type === this.draco.TRIANGULAR_MESH ? new this.draco.Mesh() : new this.draco.PointCloud();
|
|
665
|
+
|
|
579
666
|
try {
|
|
580
667
|
let dracoStatus;
|
|
668
|
+
|
|
581
669
|
switch (geometry_type) {
|
|
582
670
|
case this.draco.TRIANGULAR_MESH:
|
|
583
671
|
dracoStatus = this.decoder.DecodeBufferToMesh(buffer, dracoGeometry);
|
|
584
672
|
break;
|
|
673
|
+
|
|
585
674
|
case this.draco.POINT_CLOUD:
|
|
586
675
|
dracoStatus = this.decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
|
|
587
676
|
break;
|
|
677
|
+
|
|
588
678
|
default:
|
|
589
679
|
throw new Error('DRACO: Unknown geometry type.');
|
|
590
680
|
}
|
|
681
|
+
|
|
591
682
|
if (!dracoStatus.ok() || !dracoGeometry.ptr) {
|
|
592
683
|
const message = "DRACO decompression failed: ".concat(dracoStatus.error_msg());
|
|
593
684
|
throw new Error(message);
|
|
594
685
|
}
|
|
686
|
+
|
|
595
687
|
const loaderData = this._getDracoLoaderData(dracoGeometry, geometry_type, options);
|
|
688
|
+
|
|
596
689
|
const geometry = this._getMeshData(dracoGeometry, loaderData, options);
|
|
690
|
+
|
|
597
691
|
const boundingBox = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.getMeshBoundingBox)(geometry.attributes);
|
|
598
692
|
const schema = (0,_utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__.getDracoSchema)(geometry.attributes, loaderData, geometry.indices);
|
|
599
693
|
const data = {
|
|
@@ -609,14 +703,18 @@ class DracoParser {
|
|
|
609
703
|
return data;
|
|
610
704
|
} finally {
|
|
611
705
|
this.draco.destroy(buffer);
|
|
706
|
+
|
|
612
707
|
if (dracoGeometry) {
|
|
613
708
|
this.draco.destroy(dracoGeometry);
|
|
614
709
|
}
|
|
615
710
|
}
|
|
616
711
|
}
|
|
712
|
+
|
|
617
713
|
_getDracoLoaderData(dracoGeometry, geometry_type, options) {
|
|
618
714
|
const metadata = this._getTopLevelMetadata(dracoGeometry);
|
|
715
|
+
|
|
619
716
|
const attributes = this._getDracoAttributes(dracoGeometry, options);
|
|
717
|
+
|
|
620
718
|
return {
|
|
621
719
|
geometry_type,
|
|
622
720
|
num_attributes: dracoGeometry.num_attributes(),
|
|
@@ -626,11 +724,15 @@ class DracoParser {
|
|
|
626
724
|
attributes
|
|
627
725
|
};
|
|
628
726
|
}
|
|
727
|
+
|
|
629
728
|
_getDracoAttributes(dracoGeometry, options) {
|
|
630
729
|
const dracoAttributes = {};
|
|
730
|
+
|
|
631
731
|
for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {
|
|
632
732
|
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);
|
|
733
|
+
|
|
633
734
|
const metadata = this._getAttributeMetadata(dracoGeometry, attributeId);
|
|
735
|
+
|
|
634
736
|
dracoAttributes[dracoAttribute.unique_id()] = {
|
|
635
737
|
unique_id: dracoAttribute.unique_id(),
|
|
636
738
|
attribute_type: dracoAttribute.attribute_type(),
|
|
@@ -642,23 +744,32 @@ class DracoParser {
|
|
|
642
744
|
attribute_index: attributeId,
|
|
643
745
|
metadata
|
|
644
746
|
};
|
|
747
|
+
|
|
645
748
|
const quantization = this._getQuantizationTransform(dracoAttribute, options);
|
|
749
|
+
|
|
646
750
|
if (quantization) {
|
|
647
751
|
dracoAttributes[dracoAttribute.unique_id()].quantization_transform = quantization;
|
|
648
752
|
}
|
|
753
|
+
|
|
649
754
|
const octahedron = this._getOctahedronTransform(dracoAttribute, options);
|
|
755
|
+
|
|
650
756
|
if (octahedron) {
|
|
651
757
|
dracoAttributes[dracoAttribute.unique_id()].octahedron_transform = octahedron;
|
|
652
758
|
}
|
|
653
759
|
}
|
|
760
|
+
|
|
654
761
|
return dracoAttributes;
|
|
655
762
|
}
|
|
763
|
+
|
|
656
764
|
_getMeshData(dracoGeometry, loaderData, options) {
|
|
657
765
|
const attributes = this._getMeshAttributes(loaderData, dracoGeometry, options);
|
|
766
|
+
|
|
658
767
|
const positionAttribute = attributes.POSITION;
|
|
768
|
+
|
|
659
769
|
if (!positionAttribute) {
|
|
660
770
|
throw new Error('DRACO: No position attribute found.');
|
|
661
771
|
}
|
|
772
|
+
|
|
662
773
|
if (dracoGeometry instanceof this.draco.Mesh) {
|
|
663
774
|
switch (options.topology) {
|
|
664
775
|
case 'triangle-strip':
|
|
@@ -671,6 +782,7 @@ class DracoParser {
|
|
|
671
782
|
size: 1
|
|
672
783
|
}
|
|
673
784
|
};
|
|
785
|
+
|
|
674
786
|
case 'triangle-list':
|
|
675
787
|
default:
|
|
676
788
|
return {
|
|
@@ -684,21 +796,27 @@ class DracoParser {
|
|
|
684
796
|
};
|
|
685
797
|
}
|
|
686
798
|
}
|
|
799
|
+
|
|
687
800
|
return {
|
|
688
801
|
topology: 'point-list',
|
|
689
802
|
mode: 0,
|
|
690
803
|
attributes
|
|
691
804
|
};
|
|
692
805
|
}
|
|
806
|
+
|
|
693
807
|
_getMeshAttributes(loaderData, dracoGeometry, options) {
|
|
694
808
|
const attributes = {};
|
|
809
|
+
|
|
695
810
|
for (const loaderAttribute of Object.values(loaderData.attributes)) {
|
|
696
811
|
const attributeName = this._deduceAttributeName(loaderAttribute, options);
|
|
812
|
+
|
|
697
813
|
loaderAttribute.name = attributeName;
|
|
814
|
+
|
|
698
815
|
const {
|
|
699
816
|
value,
|
|
700
817
|
size
|
|
701
818
|
} = this._getAttributeValues(dracoGeometry, loaderAttribute);
|
|
819
|
+
|
|
702
820
|
attributes[attributeName] = {
|
|
703
821
|
value,
|
|
704
822
|
size,
|
|
@@ -707,13 +825,17 @@ class DracoParser {
|
|
|
707
825
|
normalized: loaderAttribute.normalized
|
|
708
826
|
};
|
|
709
827
|
}
|
|
828
|
+
|
|
710
829
|
return attributes;
|
|
711
830
|
}
|
|
831
|
+
|
|
712
832
|
_getTriangleListIndices(dracoGeometry) {
|
|
713
833
|
const numFaces = dracoGeometry.num_faces();
|
|
714
834
|
const numIndices = numFaces * 3;
|
|
715
835
|
const byteLength = numIndices * INDEX_ITEM_SIZE;
|
|
836
|
+
|
|
716
837
|
const ptr = this.draco._malloc(byteLength);
|
|
838
|
+
|
|
717
839
|
try {
|
|
718
840
|
this.decoder.GetTrianglesUInt32Array(dracoGeometry, byteLength, ptr);
|
|
719
841
|
return new Uint32Array(this.draco.HEAPF32.buffer, ptr, numIndices).slice();
|
|
@@ -721,8 +843,10 @@ class DracoParser {
|
|
|
721
843
|
this.draco._free(ptr);
|
|
722
844
|
}
|
|
723
845
|
}
|
|
846
|
+
|
|
724
847
|
_getTriangleStripIndices(dracoGeometry) {
|
|
725
848
|
const dracoArray = new this.draco.DracoInt32Array();
|
|
849
|
+
|
|
726
850
|
try {
|
|
727
851
|
this.decoder.GetTriangleStripsFromMesh(dracoGeometry, dracoArray);
|
|
728
852
|
return getUint32Array(dracoArray);
|
|
@@ -730,6 +854,7 @@ class DracoParser {
|
|
|
730
854
|
this.draco.destroy(dracoArray);
|
|
731
855
|
}
|
|
732
856
|
}
|
|
857
|
+
|
|
733
858
|
_getAttributeValues(dracoGeometry, attribute) {
|
|
734
859
|
const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
|
|
735
860
|
const numComponents = attribute.num_components;
|
|
@@ -738,7 +863,9 @@ class DracoParser {
|
|
|
738
863
|
const byteLength = numValues * TypedArrayCtor.BYTES_PER_ELEMENT;
|
|
739
864
|
const dataType = getDracoDataType(this.draco, TypedArrayCtor);
|
|
740
865
|
let value;
|
|
866
|
+
|
|
741
867
|
const ptr = this.draco._malloc(byteLength);
|
|
868
|
+
|
|
742
869
|
try {
|
|
743
870
|
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attribute.attribute_index);
|
|
744
871
|
this.decoder.GetAttributeDataArrayForAllPoints(dracoGeometry, dracoAttribute, dataType, byteLength, ptr);
|
|
@@ -746,53 +873,70 @@ class DracoParser {
|
|
|
746
873
|
} finally {
|
|
747
874
|
this.draco._free(ptr);
|
|
748
875
|
}
|
|
876
|
+
|
|
749
877
|
return {
|
|
750
878
|
value,
|
|
751
879
|
size: numComponents
|
|
752
880
|
};
|
|
753
881
|
}
|
|
882
|
+
|
|
754
883
|
_deduceAttributeName(attribute, options) {
|
|
755
884
|
const uniqueId = attribute.unique_id;
|
|
885
|
+
|
|
756
886
|
for (const [attributeName, attributeUniqueId] of Object.entries(options.extraAttributes || {})) {
|
|
757
887
|
if (attributeUniqueId === uniqueId) {
|
|
758
888
|
return attributeName;
|
|
759
889
|
}
|
|
760
890
|
}
|
|
891
|
+
|
|
761
892
|
const thisAttributeType = attribute.attribute_type;
|
|
893
|
+
|
|
762
894
|
for (const dracoAttributeConstant in DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP) {
|
|
763
895
|
const attributeType = this.draco[dracoAttributeConstant];
|
|
896
|
+
|
|
764
897
|
if (attributeType === thisAttributeType) {
|
|
765
898
|
return DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP[dracoAttributeConstant];
|
|
766
899
|
}
|
|
767
900
|
}
|
|
901
|
+
|
|
768
902
|
const entryName = options.attributeNameEntry || 'name';
|
|
903
|
+
|
|
769
904
|
if (attribute.metadata[entryName]) {
|
|
770
905
|
return attribute.metadata[entryName].string;
|
|
771
906
|
}
|
|
907
|
+
|
|
772
908
|
return "CUSTOM_ATTRIBUTE_".concat(uniqueId);
|
|
773
909
|
}
|
|
910
|
+
|
|
774
911
|
_getTopLevelMetadata(dracoGeometry) {
|
|
775
912
|
const dracoMetadata = this.decoder.GetMetadata(dracoGeometry);
|
|
776
913
|
return this._getDracoMetadata(dracoMetadata);
|
|
777
914
|
}
|
|
915
|
+
|
|
778
916
|
_getAttributeMetadata(dracoGeometry, attributeId) {
|
|
779
917
|
const dracoMetadata = this.decoder.GetAttributeMetadata(dracoGeometry, attributeId);
|
|
780
918
|
return this._getDracoMetadata(dracoMetadata);
|
|
781
919
|
}
|
|
920
|
+
|
|
782
921
|
_getDracoMetadata(dracoMetadata) {
|
|
783
922
|
if (!dracoMetadata || !dracoMetadata.ptr) {
|
|
784
923
|
return {};
|
|
785
924
|
}
|
|
925
|
+
|
|
786
926
|
const result = {};
|
|
787
927
|
const numEntries = this.metadataQuerier.NumEntries(dracoMetadata);
|
|
928
|
+
|
|
788
929
|
for (let entryIndex = 0; entryIndex < numEntries; entryIndex++) {
|
|
789
930
|
const entryName = this.metadataQuerier.GetEntryName(dracoMetadata, entryIndex);
|
|
790
931
|
result[entryName] = this._getDracoMetadataField(dracoMetadata, entryName);
|
|
791
932
|
}
|
|
933
|
+
|
|
792
934
|
return result;
|
|
793
935
|
}
|
|
936
|
+
|
|
794
937
|
_getDracoMetadataField(dracoMetadata, entryName) {
|
|
795
938
|
const dracoArray = new this.draco.DracoInt32Array();
|
|
939
|
+
|
|
796
940
|
try {
|
|
797
941
|
this.metadataQuerier.GetIntEntryArray(dracoMetadata, entryName, dracoArray);
|
|
798
942
|
const intArray = getInt32Array(dracoArray);
|
|
@@ -806,24 +950,29 @@ class DracoParser {
|
|
|
806
950
|
this.draco.destroy(dracoArray);
|
|
807
951
|
}
|
|
808
952
|
}
|
|
953
|
+
|
|
809
954
|
_disableAttributeTransforms(options) {
|
|
810
955
|
const {
|
|
811
956
|
quantizedAttributes = [],
|
|
812
957
|
octahedronAttributes = []
|
|
813
958
|
} = options;
|
|
814
959
|
const skipAttributes = [...quantizedAttributes, ...octahedronAttributes];
|
|
960
|
+
|
|
815
961
|
for (const dracoAttributeName of skipAttributes) {
|
|
816
962
|
this.decoder.SkipAttributeTransform(this.draco[dracoAttributeName]);
|
|
817
963
|
}
|
|
818
964
|
}
|
|
965
|
+
|
|
819
966
|
_getQuantizationTransform(dracoAttribute, options) {
|
|
820
967
|
const {
|
|
821
968
|
quantizedAttributes = []
|
|
822
969
|
} = options;
|
|
823
970
|
const attribute_type = dracoAttribute.attribute_type();
|
|
824
971
|
const skip = quantizedAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
972
|
+
|
|
825
973
|
if (skip) {
|
|
826
974
|
const transform = new this.draco.AttributeQuantizationTransform();
|
|
975
|
+
|
|
827
976
|
try {
|
|
828
977
|
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
829
978
|
return {
|
|
@@ -836,16 +985,20 @@ class DracoParser {
|
|
|
836
985
|
this.draco.destroy(transform);
|
|
837
986
|
}
|
|
838
987
|
}
|
|
988
|
+
|
|
839
989
|
return null;
|
|
840
990
|
}
|
|
991
|
+
|
|
841
992
|
_getOctahedronTransform(dracoAttribute, options) {
|
|
842
993
|
const {
|
|
843
994
|
octahedronAttributes = []
|
|
844
995
|
} = options;
|
|
845
996
|
const attribute_type = dracoAttribute.attribute_type();
|
|
846
997
|
const octahedron = octahedronAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
998
|
+
|
|
847
999
|
if (octahedron) {
|
|
848
1000
|
const transform = new this.draco.AttributeQuantizationTransform();
|
|
1001
|
+
|
|
849
1002
|
try {
|
|
850
1003
|
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
851
1004
|
return {
|
|
@@ -856,133 +1009,159 @@ class DracoParser {
|
|
|
856
1009
|
this.draco.destroy(transform);
|
|
857
1010
|
}
|
|
858
1011
|
}
|
|
1012
|
+
|
|
859
1013
|
return null;
|
|
860
1014
|
}
|
|
1015
|
+
|
|
861
1016
|
}
|
|
1017
|
+
|
|
862
1018
|
function getDracoDataType(draco, attributeType) {
|
|
863
1019
|
switch (attributeType) {
|
|
864
1020
|
case Float32Array:
|
|
865
1021
|
return draco.DT_FLOAT32;
|
|
1022
|
+
|
|
866
1023
|
case Int8Array:
|
|
867
1024
|
return draco.DT_INT8;
|
|
1025
|
+
|
|
868
1026
|
case Int16Array:
|
|
869
1027
|
return draco.DT_INT16;
|
|
1028
|
+
|
|
870
1029
|
case Int32Array:
|
|
871
1030
|
return draco.DT_INT32;
|
|
1031
|
+
|
|
872
1032
|
case Uint8Array:
|
|
873
1033
|
return draco.DT_UINT8;
|
|
1034
|
+
|
|
874
1035
|
case Uint16Array:
|
|
875
1036
|
return draco.DT_UINT16;
|
|
1037
|
+
|
|
876
1038
|
case Uint32Array:
|
|
877
1039
|
return draco.DT_UINT32;
|
|
1040
|
+
|
|
878
1041
|
default:
|
|
879
1042
|
return draco.DT_INVALID;
|
|
880
1043
|
}
|
|
881
1044
|
}
|
|
1045
|
+
|
|
882
1046
|
function getInt32Array(dracoArray) {
|
|
883
1047
|
const numValues = dracoArray.size();
|
|
884
1048
|
const intArray = new Int32Array(numValues);
|
|
1049
|
+
|
|
885
1050
|
for (let i = 0; i < numValues; i++) {
|
|
886
1051
|
intArray[i] = dracoArray.GetValue(i);
|
|
887
1052
|
}
|
|
1053
|
+
|
|
888
1054
|
return intArray;
|
|
889
1055
|
}
|
|
1056
|
+
|
|
890
1057
|
function getUint32Array(dracoArray) {
|
|
891
1058
|
const numValues = dracoArray.size();
|
|
892
1059
|
const intArray = new Int32Array(numValues);
|
|
1060
|
+
|
|
893
1061
|
for (let i = 0; i < numValues; i++) {
|
|
894
1062
|
intArray[i] = dracoArray.GetValue(i);
|
|
895
1063
|
}
|
|
1064
|
+
|
|
896
1065
|
return intArray;
|
|
897
1066
|
}
|
|
898
1067
|
|
|
899
1068
|
|
|
900
1069
|
/***/ }),
|
|
901
1070
|
|
|
902
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
903
|
-
|
|
904
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
905
|
-
|
|
1071
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js":
|
|
1072
|
+
/*!******************************************************************************************************************************************!*\
|
|
1073
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js ***!
|
|
1074
|
+
\******************************************************************************************************************************************/
|
|
906
1075
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
907
1076
|
|
|
908
1077
|
__webpack_require__.r(__webpack_exports__);
|
|
909
1078
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
910
|
-
/* harmony export */ getDracoSchema: () => (/* binding */ getDracoSchema)
|
|
1079
|
+
/* harmony export */ "getDracoSchema": () => (/* binding */ getDracoSchema)
|
|
911
1080
|
/* harmony export */ });
|
|
912
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
913
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1081
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js");
|
|
1082
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
|
|
914
1083
|
|
|
915
1084
|
|
|
916
1085
|
function getDracoSchema(attributes, loaderData, indices) {
|
|
917
1086
|
const metadataMap = makeMetadata(loaderData.metadata);
|
|
918
1087
|
const fields = [];
|
|
919
1088
|
const namedLoaderDataAttributes = transformAttributesLoaderData(loaderData.attributes);
|
|
1089
|
+
|
|
920
1090
|
for (const attributeName in attributes) {
|
|
921
1091
|
const attribute = attributes[attributeName];
|
|
922
1092
|
const field = getArrowFieldFromAttribute(attributeName, attribute, namedLoaderDataAttributes[attributeName]);
|
|
923
1093
|
fields.push(field);
|
|
924
1094
|
}
|
|
1095
|
+
|
|
925
1096
|
if (indices) {
|
|
926
1097
|
const indicesField = getArrowFieldFromAttribute('indices', indices);
|
|
927
1098
|
fields.push(indicesField);
|
|
928
1099
|
}
|
|
1100
|
+
|
|
929
1101
|
return new _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__["default"](fields, metadataMap);
|
|
930
1102
|
}
|
|
1103
|
+
|
|
931
1104
|
function transformAttributesLoaderData(loaderData) {
|
|
932
1105
|
const result = {};
|
|
1106
|
+
|
|
933
1107
|
for (const key in loaderData) {
|
|
934
1108
|
const dracoAttribute = loaderData[key];
|
|
935
1109
|
result[dracoAttribute.name || 'undefined'] = dracoAttribute;
|
|
936
1110
|
}
|
|
1111
|
+
|
|
937
1112
|
return result;
|
|
938
1113
|
}
|
|
1114
|
+
|
|
939
1115
|
function getArrowFieldFromAttribute(attributeName, attribute, loaderData) {
|
|
940
1116
|
const metadataMap = loaderData ? makeMetadata(loaderData.metadata) : undefined;
|
|
941
1117
|
const field = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.deduceMeshField)(attributeName, attribute, metadataMap);
|
|
942
1118
|
return field;
|
|
943
1119
|
}
|
|
1120
|
+
|
|
944
1121
|
function makeMetadata(metadata) {
|
|
945
1122
|
const metadataMap = new Map();
|
|
1123
|
+
|
|
946
1124
|
for (const key in metadata) {
|
|
947
1125
|
metadataMap.set("".concat(key, ".string"), JSON.stringify(metadata[key]));
|
|
948
1126
|
}
|
|
1127
|
+
|
|
949
1128
|
return metadataMap;
|
|
950
1129
|
}
|
|
951
1130
|
|
|
952
1131
|
|
|
953
1132
|
/***/ }),
|
|
954
1133
|
|
|
955
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
956
|
-
|
|
957
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
958
|
-
|
|
1134
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js":
|
|
1135
|
+
/*!*********************************************************************************************************************************!*\
|
|
1136
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js ***!
|
|
1137
|
+
\*********************************************************************************************************************************/
|
|
959
1138
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
960
1139
|
|
|
961
1140
|
__webpack_require__.r(__webpack_exports__);
|
|
962
1141
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
963
|
-
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
1142
|
+
/* harmony export */ "VERSION": () => (/* binding */ VERSION)
|
|
964
1143
|
/* harmony export */ });
|
|
965
|
-
const VERSION = true ? "3.
|
|
1144
|
+
const VERSION = true ? "3.1.6" : 0;
|
|
966
1145
|
|
|
967
1146
|
|
|
968
1147
|
/***/ }),
|
|
969
1148
|
|
|
970
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
971
|
-
|
|
972
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
973
|
-
|
|
1149
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js":
|
|
1150
|
+
/*!**************************************************************************************************************************************************!*\
|
|
1151
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js ***!
|
|
1152
|
+
\**************************************************************************************************************************************************/
|
|
974
1153
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
975
1154
|
|
|
976
1155
|
__webpack_require__.r(__webpack_exports__);
|
|
977
1156
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
978
|
-
/* harmony export */ deduceMeshField: () => (/* binding */ deduceMeshField),
|
|
979
|
-
/* harmony export */ deduceMeshSchema: () => (/* binding */ deduceMeshSchema),
|
|
980
|
-
/* harmony export */ makeMeshAttributeMetadata: () => (/* binding */ makeMeshAttributeMetadata)
|
|
1157
|
+
/* harmony export */ "deduceMeshField": () => (/* binding */ deduceMeshField),
|
|
1158
|
+
/* harmony export */ "deduceMeshSchema": () => (/* binding */ deduceMeshSchema),
|
|
1159
|
+
/* harmony export */ "makeMeshAttributeMetadata": () => (/* binding */ makeMeshAttributeMetadata)
|
|
981
1160
|
/* harmony export */ });
|
|
982
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
983
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
984
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
985
|
-
/* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1161
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
|
|
1162
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js");
|
|
1163
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
|
|
1164
|
+
/* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js");
|
|
986
1165
|
|
|
987
1166
|
|
|
988
1167
|
function deduceMeshSchema(attributes, metadata) {
|
|
@@ -995,50 +1174,61 @@ function deduceMeshField(attributeName, attribute, optionalMetadata) {
|
|
|
995
1174
|
const field = new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__["default"](attributeName, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__.FixedSizeList(attribute.size, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__["default"]('value', type)), false, metadata);
|
|
996
1175
|
return field;
|
|
997
1176
|
}
|
|
1177
|
+
|
|
998
1178
|
function deduceMeshFields(attributes) {
|
|
999
1179
|
const fields = [];
|
|
1180
|
+
|
|
1000
1181
|
for (const attributeName in attributes) {
|
|
1001
1182
|
const attribute = attributes[attributeName];
|
|
1002
1183
|
fields.push(deduceMeshField(attributeName, attribute));
|
|
1003
1184
|
}
|
|
1185
|
+
|
|
1004
1186
|
return fields;
|
|
1005
1187
|
}
|
|
1188
|
+
|
|
1006
1189
|
function makeMeshAttributeMetadata(attribute) {
|
|
1007
1190
|
const result = new Map();
|
|
1191
|
+
|
|
1008
1192
|
if ('byteOffset' in attribute) {
|
|
1009
1193
|
result.set('byteOffset', attribute.byteOffset.toString(10));
|
|
1010
1194
|
}
|
|
1195
|
+
|
|
1011
1196
|
if ('byteStride' in attribute) {
|
|
1012
1197
|
result.set('byteStride', attribute.byteStride.toString(10));
|
|
1013
1198
|
}
|
|
1199
|
+
|
|
1014
1200
|
if ('normalized' in attribute) {
|
|
1015
1201
|
result.set('normalized', attribute.normalized.toString());
|
|
1016
1202
|
}
|
|
1203
|
+
|
|
1017
1204
|
return result;
|
|
1018
1205
|
}
|
|
1019
1206
|
|
|
1020
1207
|
|
|
1021
1208
|
/***/ }),
|
|
1022
1209
|
|
|
1023
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1024
|
-
|
|
1025
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1026
|
-
|
|
1210
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js":
|
|
1211
|
+
/*!******************************************************************************************************************************************!*\
|
|
1212
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js ***!
|
|
1213
|
+
\******************************************************************************************************************************************/
|
|
1027
1214
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1028
1215
|
|
|
1029
1216
|
__webpack_require__.r(__webpack_exports__);
|
|
1030
1217
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1031
|
-
/* harmony export */ getMeshBoundingBox: () => (/* binding */ getMeshBoundingBox),
|
|
1032
|
-
/* harmony export */ getMeshSize: () => (/* binding */ getMeshSize)
|
|
1218
|
+
/* harmony export */ "getMeshBoundingBox": () => (/* binding */ getMeshBoundingBox),
|
|
1219
|
+
/* harmony export */ "getMeshSize": () => (/* binding */ getMeshSize)
|
|
1033
1220
|
/* harmony export */ });
|
|
1034
1221
|
function getMeshSize(attributes) {
|
|
1035
1222
|
let size = 0;
|
|
1223
|
+
|
|
1036
1224
|
for (const attributeName in attributes) {
|
|
1037
1225
|
const attribute = attributes[attributeName];
|
|
1226
|
+
|
|
1038
1227
|
if (ArrayBuffer.isView(attribute)) {
|
|
1039
1228
|
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
1040
1229
|
}
|
|
1041
1230
|
}
|
|
1231
|
+
|
|
1042
1232
|
return size;
|
|
1043
1233
|
}
|
|
1044
1234
|
function getMeshBoundingBox(attributes) {
|
|
@@ -1050,6 +1240,7 @@ function getMeshBoundingBox(attributes) {
|
|
|
1050
1240
|
let maxZ = -Infinity;
|
|
1051
1241
|
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
1052
1242
|
const len = positions && positions.length;
|
|
1243
|
+
|
|
1053
1244
|
for (let i = 0; i < len; i += 3) {
|
|
1054
1245
|
const x = positions[i];
|
|
1055
1246
|
const y = positions[i + 1];
|
|
@@ -1061,42 +1252,51 @@ function getMeshBoundingBox(attributes) {
|
|
|
1061
1252
|
maxY = y > maxY ? y : maxY;
|
|
1062
1253
|
maxZ = z > maxZ ? z : maxZ;
|
|
1063
1254
|
}
|
|
1255
|
+
|
|
1064
1256
|
return [[minX, minY, minZ], [maxX, maxY, maxZ]];
|
|
1065
1257
|
}
|
|
1066
1258
|
|
|
1067
1259
|
|
|
1068
1260
|
/***/ }),
|
|
1069
1261
|
|
|
1070
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1071
|
-
|
|
1072
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1073
|
-
|
|
1262
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js":
|
|
1263
|
+
/*!*************************************************************************************************************************************************!*\
|
|
1264
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js ***!
|
|
1265
|
+
\*************************************************************************************************************************************************/
|
|
1074
1266
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1075
1267
|
|
|
1076
1268
|
__webpack_require__.r(__webpack_exports__);
|
|
1077
1269
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1078
|
-
/* harmony export */ getArrowTypeFromTypedArray: () => (/* binding */ getArrowTypeFromTypedArray)
|
|
1270
|
+
/* harmony export */ "getArrowTypeFromTypedArray": () => (/* binding */ getArrowTypeFromTypedArray)
|
|
1079
1271
|
/* harmony export */ });
|
|
1080
|
-
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1272
|
+
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
|
|
1081
1273
|
|
|
1082
1274
|
function getArrowTypeFromTypedArray(array) {
|
|
1083
1275
|
switch (array.constructor) {
|
|
1084
1276
|
case Int8Array:
|
|
1085
1277
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int8();
|
|
1278
|
+
|
|
1086
1279
|
case Uint8Array:
|
|
1087
1280
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint8();
|
|
1281
|
+
|
|
1088
1282
|
case Int16Array:
|
|
1089
1283
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int16();
|
|
1284
|
+
|
|
1090
1285
|
case Uint16Array:
|
|
1091
1286
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint16();
|
|
1287
|
+
|
|
1092
1288
|
case Int32Array:
|
|
1093
1289
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int32();
|
|
1290
|
+
|
|
1094
1291
|
case Uint32Array:
|
|
1095
1292
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint32();
|
|
1293
|
+
|
|
1096
1294
|
case Float32Array:
|
|
1097
1295
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float32();
|
|
1296
|
+
|
|
1098
1297
|
case Float64Array:
|
|
1099
1298
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float64();
|
|
1299
|
+
|
|
1100
1300
|
default:
|
|
1101
1301
|
throw new Error('array type not supported');
|
|
1102
1302
|
}
|
|
@@ -1105,17 +1305,19 @@ function getArrowTypeFromTypedArray(array) {
|
|
|
1105
1305
|
|
|
1106
1306
|
/***/ }),
|
|
1107
1307
|
|
|
1108
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1109
|
-
|
|
1110
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1111
|
-
|
|
1308
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js":
|
|
1309
|
+
/*!**************************************************************************************************************************************!*\
|
|
1310
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js ***!
|
|
1311
|
+
\**************************************************************************************************************************************/
|
|
1112
1312
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1113
1313
|
|
|
1114
1314
|
__webpack_require__.r(__webpack_exports__);
|
|
1115
1315
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1116
|
-
/* harmony export */ Type: () => (/* binding */ Type)
|
|
1316
|
+
/* harmony export */ "Type": () => (/* binding */ Type)
|
|
1117
1317
|
/* harmony export */ });
|
|
1118
|
-
let Type
|
|
1318
|
+
let Type;
|
|
1319
|
+
|
|
1320
|
+
(function (Type) {
|
|
1119
1321
|
Type[Type["NONE"] = 0] = "NONE";
|
|
1120
1322
|
Type[Type["Null"] = 1] = "Null";
|
|
1121
1323
|
Type[Type["Int"] = 2] = "Int";
|
|
@@ -1160,112 +1362,124 @@ let Type = function (Type) {
|
|
|
1160
1362
|
Type[Type["SparseUnion"] = -24] = "SparseUnion";
|
|
1161
1363
|
Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime";
|
|
1162
1364
|
Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth";
|
|
1163
|
-
|
|
1164
|
-
}({});
|
|
1365
|
+
})(Type || (Type = {}));
|
|
1165
1366
|
|
|
1166
1367
|
|
|
1167
1368
|
/***/ }),
|
|
1168
1369
|
|
|
1169
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1170
|
-
|
|
1171
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1172
|
-
|
|
1370
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js":
|
|
1371
|
+
/*!***************************************************************************************************************************************!*\
|
|
1372
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js ***!
|
|
1373
|
+
\***************************************************************************************************************************************/
|
|
1173
1374
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1174
1375
|
|
|
1175
1376
|
__webpack_require__.r(__webpack_exports__);
|
|
1176
1377
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1177
1378
|
/* harmony export */ "default": () => (/* binding */ Field)
|
|
1178
1379
|
/* harmony export */ });
|
|
1179
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
1380
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1180
1381
|
|
|
1181
1382
|
class Field {
|
|
1182
|
-
constructor(name, type) {
|
|
1183
|
-
let nullable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1184
|
-
let metadata = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new Map();
|
|
1383
|
+
constructor(name, type, nullable = false, metadata = new Map()) {
|
|
1185
1384
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
1385
|
+
|
|
1186
1386
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
1387
|
+
|
|
1187
1388
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "nullable", void 0);
|
|
1389
|
+
|
|
1188
1390
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
1391
|
+
|
|
1189
1392
|
this.name = name;
|
|
1190
1393
|
this.type = type;
|
|
1191
1394
|
this.nullable = nullable;
|
|
1192
1395
|
this.metadata = metadata;
|
|
1193
1396
|
}
|
|
1397
|
+
|
|
1194
1398
|
get typeId() {
|
|
1195
1399
|
return this.type && this.type.typeId;
|
|
1196
1400
|
}
|
|
1401
|
+
|
|
1197
1402
|
clone() {
|
|
1198
1403
|
return new Field(this.name, this.type, this.nullable, this.metadata);
|
|
1199
1404
|
}
|
|
1405
|
+
|
|
1200
1406
|
compareTo(other) {
|
|
1201
1407
|
return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata;
|
|
1202
1408
|
}
|
|
1409
|
+
|
|
1203
1410
|
toString() {
|
|
1204
1411
|
return "".concat(this.type).concat(this.nullable ? ', nullable' : '').concat(this.metadata ? ", metadata: ".concat(this.metadata) : '');
|
|
1205
1412
|
}
|
|
1413
|
+
|
|
1206
1414
|
}
|
|
1207
1415
|
|
|
1208
1416
|
|
|
1209
1417
|
/***/ }),
|
|
1210
1418
|
|
|
1211
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1212
|
-
|
|
1213
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1214
|
-
|
|
1419
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js":
|
|
1420
|
+
/*!****************************************************************************************************************************************!*\
|
|
1421
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js ***!
|
|
1422
|
+
\****************************************************************************************************************************************/
|
|
1215
1423
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1216
1424
|
|
|
1217
1425
|
__webpack_require__.r(__webpack_exports__);
|
|
1218
1426
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1219
1427
|
/* harmony export */ "default": () => (/* binding */ Schema)
|
|
1220
1428
|
/* harmony export */ });
|
|
1221
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
1222
|
-
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1429
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1430
|
+
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js");
|
|
1223
1431
|
|
|
1224
1432
|
|
|
1225
1433
|
class Schema {
|
|
1226
1434
|
constructor(fields, metadata) {
|
|
1227
1435
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fields", void 0);
|
|
1436
|
+
|
|
1228
1437
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
1438
|
+
|
|
1229
1439
|
(0,_utils_assert__WEBPACK_IMPORTED_MODULE_1__.assert)(Array.isArray(fields));
|
|
1230
1440
|
checkNames(fields);
|
|
1231
1441
|
this.fields = fields;
|
|
1232
1442
|
this.metadata = metadata || new Map();
|
|
1233
1443
|
}
|
|
1444
|
+
|
|
1234
1445
|
compareTo(other) {
|
|
1235
1446
|
if (this.metadata !== other.metadata) {
|
|
1236
1447
|
return false;
|
|
1237
1448
|
}
|
|
1449
|
+
|
|
1238
1450
|
if (this.fields.length !== other.fields.length) {
|
|
1239
1451
|
return false;
|
|
1240
1452
|
}
|
|
1453
|
+
|
|
1241
1454
|
for (let i = 0; i < this.fields.length; ++i) {
|
|
1242
1455
|
if (!this.fields[i].compareTo(other.fields[i])) {
|
|
1243
1456
|
return false;
|
|
1244
1457
|
}
|
|
1245
1458
|
}
|
|
1459
|
+
|
|
1246
1460
|
return true;
|
|
1247
1461
|
}
|
|
1248
|
-
|
|
1462
|
+
|
|
1463
|
+
select(...columnNames) {
|
|
1249
1464
|
const nameMap = Object.create(null);
|
|
1250
|
-
|
|
1251
|
-
columnNames[_key] = arguments[_key];
|
|
1252
|
-
}
|
|
1465
|
+
|
|
1253
1466
|
for (const name of columnNames) {
|
|
1254
1467
|
nameMap[name] = true;
|
|
1255
1468
|
}
|
|
1469
|
+
|
|
1256
1470
|
const selectedFields = this.fields.filter(field => nameMap[field.name]);
|
|
1257
1471
|
return new Schema(selectedFields, this.metadata);
|
|
1258
1472
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
columnIndices[_key2] = arguments[_key2];
|
|
1262
|
-
}
|
|
1473
|
+
|
|
1474
|
+
selectAt(...columnIndices) {
|
|
1263
1475
|
const selectedFields = columnIndices.map(index => this.fields[index]).filter(Boolean);
|
|
1264
1476
|
return new Schema(selectedFields, this.metadata);
|
|
1265
1477
|
}
|
|
1478
|
+
|
|
1266
1479
|
assign(schemaOrFields) {
|
|
1267
1480
|
let fields;
|
|
1268
1481
|
let metadata = this.metadata;
|
|
1482
|
+
|
|
1269
1483
|
if (schemaOrFields instanceof Schema) {
|
|
1270
1484
|
const otherSchema = schemaOrFields;
|
|
1271
1485
|
fields = otherSchema.fields;
|
|
@@ -1273,26 +1487,35 @@ class Schema {
|
|
|
1273
1487
|
} else {
|
|
1274
1488
|
fields = schemaOrFields;
|
|
1275
1489
|
}
|
|
1490
|
+
|
|
1276
1491
|
const fieldMap = Object.create(null);
|
|
1492
|
+
|
|
1277
1493
|
for (const field of this.fields) {
|
|
1278
1494
|
fieldMap[field.name] = field;
|
|
1279
1495
|
}
|
|
1496
|
+
|
|
1280
1497
|
for (const field of fields) {
|
|
1281
1498
|
fieldMap[field.name] = field;
|
|
1282
1499
|
}
|
|
1500
|
+
|
|
1283
1501
|
const mergedFields = Object.values(fieldMap);
|
|
1284
1502
|
return new Schema(mergedFields, metadata);
|
|
1285
1503
|
}
|
|
1504
|
+
|
|
1286
1505
|
}
|
|
1506
|
+
|
|
1287
1507
|
function checkNames(fields) {
|
|
1288
1508
|
const usedNames = {};
|
|
1509
|
+
|
|
1289
1510
|
for (const field of fields) {
|
|
1290
1511
|
if (usedNames[field.name]) {
|
|
1291
1512
|
console.warn('Schema: duplicated field name', field.name, field);
|
|
1292
1513
|
}
|
|
1514
|
+
|
|
1293
1515
|
usedNames[field.name] = true;
|
|
1294
1516
|
}
|
|
1295
1517
|
}
|
|
1518
|
+
|
|
1296
1519
|
function mergeMaps(m1, m2) {
|
|
1297
1520
|
return new Map([...(m1 || new Map()), ...(m2 || new Map())]);
|
|
1298
1521
|
}
|
|
@@ -1300,198 +1523,241 @@ function mergeMaps(m1, m2) {
|
|
|
1300
1523
|
|
|
1301
1524
|
/***/ }),
|
|
1302
1525
|
|
|
1303
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1304
|
-
|
|
1305
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1306
|
-
|
|
1526
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js":
|
|
1527
|
+
/*!**************************************************************************************************************************************!*\
|
|
1528
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js ***!
|
|
1529
|
+
\**************************************************************************************************************************************/
|
|
1307
1530
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1308
1531
|
|
|
1309
1532
|
__webpack_require__.r(__webpack_exports__);
|
|
1310
1533
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1311
|
-
/* harmony export */ Binary: () => (/* binding */ Binary),
|
|
1312
|
-
/* harmony export */ Bool: () => (/* binding */ Bool),
|
|
1313
|
-
/* harmony export */ DataType: () => (/* binding */ DataType),
|
|
1314
|
-
/* harmony export */ Date: () => (/* binding */ Date),
|
|
1315
|
-
/* harmony export */ DateDay: () => (/* binding */ DateDay),
|
|
1316
|
-
/* harmony export */ DateMillisecond: () => (/* binding */ DateMillisecond),
|
|
1317
|
-
/* harmony export */ FixedSizeList: () => (/* binding */ FixedSizeList),
|
|
1318
|
-
/* harmony export */ Float: () => (/* binding */ Float),
|
|
1319
|
-
/* harmony export */ Float16: () => (/* binding */ Float16),
|
|
1320
|
-
/* harmony export */ Float32: () => (/* binding */ Float32),
|
|
1321
|
-
/* harmony export */ Float64: () => (/* binding */ Float64),
|
|
1322
|
-
/* harmony export */ Int: () => (/* binding */ Int),
|
|
1323
|
-
/* harmony export */ Int16: () => (/* binding */ Int16),
|
|
1324
|
-
/* harmony export */ Int32: () => (/* binding */ Int32),
|
|
1325
|
-
/* harmony export */ Int64: () => (/* binding */ Int64),
|
|
1326
|
-
/* harmony export */ Int8: () => (/* binding */ Int8),
|
|
1327
|
-
/* harmony export */ Interval: () => (/* binding */ Interval),
|
|
1328
|
-
/* harmony export */ IntervalDayTime: () => (/* binding */ IntervalDayTime),
|
|
1329
|
-
/* harmony export */ IntervalYearMonth: () => (/* binding */ IntervalYearMonth),
|
|
1330
|
-
/* harmony export */ Null: () => (/* binding */ Null),
|
|
1331
|
-
/* harmony export */ Struct: () => (/* binding */ Struct),
|
|
1332
|
-
/* harmony export */ Time: () => (/* binding */ Time),
|
|
1333
|
-
/* harmony export */ TimeMillisecond: () => (/* binding */ TimeMillisecond),
|
|
1334
|
-
/* harmony export */ TimeSecond: () => (/* binding */ TimeSecond),
|
|
1335
|
-
/* harmony export */ Timestamp: () => (/* binding */ Timestamp),
|
|
1336
|
-
/* harmony export */ TimestampMicrosecond: () => (/* binding */ TimestampMicrosecond),
|
|
1337
|
-
/* harmony export */ TimestampMillisecond: () => (/* binding */ TimestampMillisecond),
|
|
1338
|
-
/* harmony export */ TimestampNanosecond: () => (/* binding */ TimestampNanosecond),
|
|
1339
|
-
/* harmony export */ TimestampSecond: () => (/* binding */ TimestampSecond),
|
|
1340
|
-
/* harmony export */ Type: () => (/* reexport safe */ _enum__WEBPACK_IMPORTED_MODULE_1__.Type),
|
|
1341
|
-
/* harmony export */ Uint16: () => (/* binding */ Uint16),
|
|
1342
|
-
/* harmony export */ Uint32: () => (/* binding */ Uint32),
|
|
1343
|
-
/* harmony export */ Uint64: () => (/* binding */ Uint64),
|
|
1344
|
-
/* harmony export */ Uint8: () => (/* binding */ Uint8),
|
|
1345
|
-
/* harmony export */ Utf8: () => (/* binding */ Utf8)
|
|
1534
|
+
/* harmony export */ "Binary": () => (/* binding */ Binary),
|
|
1535
|
+
/* harmony export */ "Bool": () => (/* binding */ Bool),
|
|
1536
|
+
/* harmony export */ "DataType": () => (/* binding */ DataType),
|
|
1537
|
+
/* harmony export */ "Date": () => (/* binding */ Date),
|
|
1538
|
+
/* harmony export */ "DateDay": () => (/* binding */ DateDay),
|
|
1539
|
+
/* harmony export */ "DateMillisecond": () => (/* binding */ DateMillisecond),
|
|
1540
|
+
/* harmony export */ "FixedSizeList": () => (/* binding */ FixedSizeList),
|
|
1541
|
+
/* harmony export */ "Float": () => (/* binding */ Float),
|
|
1542
|
+
/* harmony export */ "Float16": () => (/* binding */ Float16),
|
|
1543
|
+
/* harmony export */ "Float32": () => (/* binding */ Float32),
|
|
1544
|
+
/* harmony export */ "Float64": () => (/* binding */ Float64),
|
|
1545
|
+
/* harmony export */ "Int": () => (/* binding */ Int),
|
|
1546
|
+
/* harmony export */ "Int16": () => (/* binding */ Int16),
|
|
1547
|
+
/* harmony export */ "Int32": () => (/* binding */ Int32),
|
|
1548
|
+
/* harmony export */ "Int64": () => (/* binding */ Int64),
|
|
1549
|
+
/* harmony export */ "Int8": () => (/* binding */ Int8),
|
|
1550
|
+
/* harmony export */ "Interval": () => (/* binding */ Interval),
|
|
1551
|
+
/* harmony export */ "IntervalDayTime": () => (/* binding */ IntervalDayTime),
|
|
1552
|
+
/* harmony export */ "IntervalYearMonth": () => (/* binding */ IntervalYearMonth),
|
|
1553
|
+
/* harmony export */ "Null": () => (/* binding */ Null),
|
|
1554
|
+
/* harmony export */ "Struct": () => (/* binding */ Struct),
|
|
1555
|
+
/* harmony export */ "Time": () => (/* binding */ Time),
|
|
1556
|
+
/* harmony export */ "TimeMillisecond": () => (/* binding */ TimeMillisecond),
|
|
1557
|
+
/* harmony export */ "TimeSecond": () => (/* binding */ TimeSecond),
|
|
1558
|
+
/* harmony export */ "Timestamp": () => (/* binding */ Timestamp),
|
|
1559
|
+
/* harmony export */ "TimestampMicrosecond": () => (/* binding */ TimestampMicrosecond),
|
|
1560
|
+
/* harmony export */ "TimestampMillisecond": () => (/* binding */ TimestampMillisecond),
|
|
1561
|
+
/* harmony export */ "TimestampNanosecond": () => (/* binding */ TimestampNanosecond),
|
|
1562
|
+
/* harmony export */ "TimestampSecond": () => (/* binding */ TimestampSecond),
|
|
1563
|
+
/* harmony export */ "Type": () => (/* reexport safe */ _enum__WEBPACK_IMPORTED_MODULE_1__.Type),
|
|
1564
|
+
/* harmony export */ "Uint16": () => (/* binding */ Uint16),
|
|
1565
|
+
/* harmony export */ "Uint32": () => (/* binding */ Uint32),
|
|
1566
|
+
/* harmony export */ "Uint64": () => (/* binding */ Uint64),
|
|
1567
|
+
/* harmony export */ "Uint8": () => (/* binding */ Uint8),
|
|
1568
|
+
/* harmony export */ "Utf8": () => (/* binding */ Utf8)
|
|
1346
1569
|
/* harmony export */ });
|
|
1347
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.
|
|
1348
|
-
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1570
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.23.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1571
|
+
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js");
|
|
1572
|
+
|
|
1349
1573
|
|
|
1350
1574
|
let _Symbol$toStringTag, _Symbol$toStringTag2, _Symbol$toStringTag3, _Symbol$toStringTag4, _Symbol$toStringTag5, _Symbol$toStringTag6, _Symbol$toStringTag7, _Symbol$toStringTag8;
|
|
1351
1575
|
|
|
1352
1576
|
|
|
1577
|
+
|
|
1353
1578
|
class DataType {
|
|
1354
1579
|
static isNull(x) {
|
|
1355
1580
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
|
|
1356
1581
|
}
|
|
1582
|
+
|
|
1357
1583
|
static isInt(x) {
|
|
1358
1584
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
|
|
1359
1585
|
}
|
|
1586
|
+
|
|
1360
1587
|
static isFloat(x) {
|
|
1361
1588
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
|
|
1362
1589
|
}
|
|
1590
|
+
|
|
1363
1591
|
static isBinary(x) {
|
|
1364
1592
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
|
|
1365
1593
|
}
|
|
1594
|
+
|
|
1366
1595
|
static isUtf8(x) {
|
|
1367
1596
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
|
|
1368
1597
|
}
|
|
1598
|
+
|
|
1369
1599
|
static isBool(x) {
|
|
1370
1600
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
|
|
1371
1601
|
}
|
|
1602
|
+
|
|
1372
1603
|
static isDecimal(x) {
|
|
1373
1604
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Decimal;
|
|
1374
1605
|
}
|
|
1606
|
+
|
|
1375
1607
|
static isDate(x) {
|
|
1376
1608
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
|
|
1377
1609
|
}
|
|
1610
|
+
|
|
1378
1611
|
static isTime(x) {
|
|
1379
1612
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
|
|
1380
1613
|
}
|
|
1614
|
+
|
|
1381
1615
|
static isTimestamp(x) {
|
|
1382
1616
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
|
|
1383
1617
|
}
|
|
1618
|
+
|
|
1384
1619
|
static isInterval(x) {
|
|
1385
1620
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
|
|
1386
1621
|
}
|
|
1622
|
+
|
|
1387
1623
|
static isList(x) {
|
|
1388
1624
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.List;
|
|
1389
1625
|
}
|
|
1626
|
+
|
|
1390
1627
|
static isStruct(x) {
|
|
1391
1628
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
|
|
1392
1629
|
}
|
|
1630
|
+
|
|
1393
1631
|
static isUnion(x) {
|
|
1394
1632
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Union;
|
|
1395
1633
|
}
|
|
1634
|
+
|
|
1396
1635
|
static isFixedSizeBinary(x) {
|
|
1397
1636
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeBinary;
|
|
1398
1637
|
}
|
|
1638
|
+
|
|
1399
1639
|
static isFixedSizeList(x) {
|
|
1400
1640
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
|
|
1401
1641
|
}
|
|
1642
|
+
|
|
1402
1643
|
static isMap(x) {
|
|
1403
1644
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Map;
|
|
1404
1645
|
}
|
|
1646
|
+
|
|
1405
1647
|
static isDictionary(x) {
|
|
1406
1648
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Dictionary;
|
|
1407
1649
|
}
|
|
1650
|
+
|
|
1408
1651
|
get typeId() {
|
|
1409
1652
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;
|
|
1410
1653
|
}
|
|
1654
|
+
|
|
1411
1655
|
compareTo(other) {
|
|
1412
1656
|
return this === other;
|
|
1413
1657
|
}
|
|
1658
|
+
|
|
1414
1659
|
}
|
|
1415
1660
|
class Null extends DataType {
|
|
1416
1661
|
get typeId() {
|
|
1417
1662
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
|
|
1418
1663
|
}
|
|
1664
|
+
|
|
1419
1665
|
get [Symbol.toStringTag]() {
|
|
1420
1666
|
return 'Null';
|
|
1421
1667
|
}
|
|
1668
|
+
|
|
1422
1669
|
toString() {
|
|
1423
1670
|
return 'Null';
|
|
1424
1671
|
}
|
|
1672
|
+
|
|
1425
1673
|
}
|
|
1426
1674
|
class Bool extends DataType {
|
|
1427
1675
|
get typeId() {
|
|
1428
1676
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
|
|
1429
1677
|
}
|
|
1678
|
+
|
|
1430
1679
|
get [Symbol.toStringTag]() {
|
|
1431
1680
|
return 'Bool';
|
|
1432
1681
|
}
|
|
1682
|
+
|
|
1433
1683
|
toString() {
|
|
1434
1684
|
return 'Bool';
|
|
1435
1685
|
}
|
|
1686
|
+
|
|
1436
1687
|
}
|
|
1437
1688
|
_Symbol$toStringTag = Symbol.toStringTag;
|
|
1438
1689
|
class Int extends DataType {
|
|
1439
1690
|
constructor(isSigned, bitWidth) {
|
|
1440
1691
|
super();
|
|
1692
|
+
|
|
1441
1693
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isSigned", void 0);
|
|
1694
|
+
|
|
1442
1695
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
1696
|
+
|
|
1443
1697
|
this.isSigned = isSigned;
|
|
1444
1698
|
this.bitWidth = bitWidth;
|
|
1445
1699
|
}
|
|
1700
|
+
|
|
1446
1701
|
get typeId() {
|
|
1447
1702
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
|
|
1448
1703
|
}
|
|
1704
|
+
|
|
1449
1705
|
get [_Symbol$toStringTag]() {
|
|
1450
1706
|
return 'Int';
|
|
1451
1707
|
}
|
|
1708
|
+
|
|
1452
1709
|
toString() {
|
|
1453
1710
|
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth);
|
|
1454
1711
|
}
|
|
1712
|
+
|
|
1455
1713
|
}
|
|
1456
1714
|
class Int8 extends Int {
|
|
1457
1715
|
constructor() {
|
|
1458
1716
|
super(true, 8);
|
|
1459
1717
|
}
|
|
1718
|
+
|
|
1460
1719
|
}
|
|
1461
1720
|
class Int16 extends Int {
|
|
1462
1721
|
constructor() {
|
|
1463
1722
|
super(true, 16);
|
|
1464
1723
|
}
|
|
1724
|
+
|
|
1465
1725
|
}
|
|
1466
1726
|
class Int32 extends Int {
|
|
1467
1727
|
constructor() {
|
|
1468
1728
|
super(true, 32);
|
|
1469
1729
|
}
|
|
1730
|
+
|
|
1470
1731
|
}
|
|
1471
1732
|
class Int64 extends Int {
|
|
1472
1733
|
constructor() {
|
|
1473
1734
|
super(true, 64);
|
|
1474
1735
|
}
|
|
1736
|
+
|
|
1475
1737
|
}
|
|
1476
1738
|
class Uint8 extends Int {
|
|
1477
1739
|
constructor() {
|
|
1478
1740
|
super(false, 8);
|
|
1479
1741
|
}
|
|
1742
|
+
|
|
1480
1743
|
}
|
|
1481
1744
|
class Uint16 extends Int {
|
|
1482
1745
|
constructor() {
|
|
1483
1746
|
super(false, 16);
|
|
1484
1747
|
}
|
|
1748
|
+
|
|
1485
1749
|
}
|
|
1486
1750
|
class Uint32 extends Int {
|
|
1487
1751
|
constructor() {
|
|
1488
1752
|
super(false, 32);
|
|
1489
1753
|
}
|
|
1754
|
+
|
|
1490
1755
|
}
|
|
1491
1756
|
class Uint64 extends Int {
|
|
1492
1757
|
constructor() {
|
|
1493
1758
|
super(false, 64);
|
|
1494
1759
|
}
|
|
1760
|
+
|
|
1495
1761
|
}
|
|
1496
1762
|
const Precision = {
|
|
1497
1763
|
HALF: 16,
|
|
@@ -1502,58 +1768,74 @@ _Symbol$toStringTag2 = Symbol.toStringTag;
|
|
|
1502
1768
|
class Float extends DataType {
|
|
1503
1769
|
constructor(precision) {
|
|
1504
1770
|
super();
|
|
1771
|
+
|
|
1505
1772
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "precision", void 0);
|
|
1773
|
+
|
|
1506
1774
|
this.precision = precision;
|
|
1507
1775
|
}
|
|
1776
|
+
|
|
1508
1777
|
get typeId() {
|
|
1509
1778
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
|
|
1510
1779
|
}
|
|
1780
|
+
|
|
1511
1781
|
get [_Symbol$toStringTag2]() {
|
|
1512
1782
|
return 'Float';
|
|
1513
1783
|
}
|
|
1784
|
+
|
|
1514
1785
|
toString() {
|
|
1515
1786
|
return "Float".concat(this.precision);
|
|
1516
1787
|
}
|
|
1788
|
+
|
|
1517
1789
|
}
|
|
1518
1790
|
class Float16 extends Float {
|
|
1519
1791
|
constructor() {
|
|
1520
1792
|
super(Precision.HALF);
|
|
1521
1793
|
}
|
|
1794
|
+
|
|
1522
1795
|
}
|
|
1523
1796
|
class Float32 extends Float {
|
|
1524
1797
|
constructor() {
|
|
1525
1798
|
super(Precision.SINGLE);
|
|
1526
1799
|
}
|
|
1800
|
+
|
|
1527
1801
|
}
|
|
1528
1802
|
class Float64 extends Float {
|
|
1529
1803
|
constructor() {
|
|
1530
1804
|
super(Precision.DOUBLE);
|
|
1531
1805
|
}
|
|
1806
|
+
|
|
1532
1807
|
}
|
|
1533
1808
|
class Binary extends DataType {
|
|
1534
1809
|
constructor() {
|
|
1535
1810
|
super();
|
|
1536
1811
|
}
|
|
1812
|
+
|
|
1537
1813
|
get typeId() {
|
|
1538
1814
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
|
|
1539
1815
|
}
|
|
1816
|
+
|
|
1540
1817
|
toString() {
|
|
1541
1818
|
return 'Binary';
|
|
1542
1819
|
}
|
|
1820
|
+
|
|
1543
1821
|
get [Symbol.toStringTag]() {
|
|
1544
1822
|
return 'Binary';
|
|
1545
1823
|
}
|
|
1824
|
+
|
|
1546
1825
|
}
|
|
1547
1826
|
class Utf8 extends DataType {
|
|
1548
1827
|
get typeId() {
|
|
1549
1828
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
|
|
1550
1829
|
}
|
|
1830
|
+
|
|
1551
1831
|
get [Symbol.toStringTag]() {
|
|
1552
1832
|
return 'Utf8';
|
|
1553
1833
|
}
|
|
1834
|
+
|
|
1554
1835
|
toString() {
|
|
1555
1836
|
return 'Utf8';
|
|
1556
1837
|
}
|
|
1838
|
+
|
|
1557
1839
|
}
|
|
1558
1840
|
const DateUnit = {
|
|
1559
1841
|
DAY: 0,
|
|
@@ -1563,28 +1845,36 @@ _Symbol$toStringTag3 = Symbol.toStringTag;
|
|
|
1563
1845
|
class Date extends DataType {
|
|
1564
1846
|
constructor(unit) {
|
|
1565
1847
|
super();
|
|
1848
|
+
|
|
1566
1849
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1850
|
+
|
|
1567
1851
|
this.unit = unit;
|
|
1568
1852
|
}
|
|
1853
|
+
|
|
1569
1854
|
get typeId() {
|
|
1570
1855
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
|
|
1571
1856
|
}
|
|
1857
|
+
|
|
1572
1858
|
get [_Symbol$toStringTag3]() {
|
|
1573
1859
|
return 'Date';
|
|
1574
1860
|
}
|
|
1861
|
+
|
|
1575
1862
|
toString() {
|
|
1576
1863
|
return "Date".concat((this.unit + 1) * 32, "<").concat(DateUnit[this.unit], ">");
|
|
1577
1864
|
}
|
|
1865
|
+
|
|
1578
1866
|
}
|
|
1579
1867
|
class DateDay extends Date {
|
|
1580
1868
|
constructor() {
|
|
1581
1869
|
super(DateUnit.DAY);
|
|
1582
1870
|
}
|
|
1871
|
+
|
|
1583
1872
|
}
|
|
1584
1873
|
class DateMillisecond extends Date {
|
|
1585
1874
|
constructor() {
|
|
1586
1875
|
super(DateUnit.MILLISECOND);
|
|
1587
1876
|
}
|
|
1877
|
+
|
|
1588
1878
|
}
|
|
1589
1879
|
const TimeUnit = {
|
|
1590
1880
|
SECOND: 1,
|
|
@@ -1596,74 +1886,89 @@ _Symbol$toStringTag4 = Symbol.toStringTag;
|
|
|
1596
1886
|
class Time extends DataType {
|
|
1597
1887
|
constructor(unit, bitWidth) {
|
|
1598
1888
|
super();
|
|
1889
|
+
|
|
1599
1890
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1891
|
+
|
|
1600
1892
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
1893
|
+
|
|
1601
1894
|
this.unit = unit;
|
|
1602
1895
|
this.bitWidth = bitWidth;
|
|
1603
1896
|
}
|
|
1897
|
+
|
|
1604
1898
|
get typeId() {
|
|
1605
1899
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
|
|
1606
1900
|
}
|
|
1901
|
+
|
|
1607
1902
|
toString() {
|
|
1608
1903
|
return "Time".concat(this.bitWidth, "<").concat(TimeUnit[this.unit], ">");
|
|
1609
1904
|
}
|
|
1905
|
+
|
|
1610
1906
|
get [_Symbol$toStringTag4]() {
|
|
1611
1907
|
return 'Time';
|
|
1612
1908
|
}
|
|
1909
|
+
|
|
1613
1910
|
}
|
|
1614
1911
|
class TimeSecond extends Time {
|
|
1615
1912
|
constructor() {
|
|
1616
1913
|
super(TimeUnit.SECOND, 32);
|
|
1617
1914
|
}
|
|
1915
|
+
|
|
1618
1916
|
}
|
|
1619
1917
|
class TimeMillisecond extends Time {
|
|
1620
1918
|
constructor() {
|
|
1621
1919
|
super(TimeUnit.MILLISECOND, 32);
|
|
1622
1920
|
}
|
|
1921
|
+
|
|
1623
1922
|
}
|
|
1624
1923
|
_Symbol$toStringTag5 = Symbol.toStringTag;
|
|
1625
1924
|
class Timestamp extends DataType {
|
|
1626
|
-
constructor(unit) {
|
|
1627
|
-
let timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1925
|
+
constructor(unit, timezone = null) {
|
|
1628
1926
|
super();
|
|
1927
|
+
|
|
1629
1928
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1929
|
+
|
|
1630
1930
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "timezone", void 0);
|
|
1931
|
+
|
|
1631
1932
|
this.unit = unit;
|
|
1632
1933
|
this.timezone = timezone;
|
|
1633
1934
|
}
|
|
1935
|
+
|
|
1634
1936
|
get typeId() {
|
|
1635
1937
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
|
|
1636
1938
|
}
|
|
1939
|
+
|
|
1637
1940
|
get [_Symbol$toStringTag5]() {
|
|
1638
1941
|
return 'Timestamp';
|
|
1639
1942
|
}
|
|
1943
|
+
|
|
1640
1944
|
toString() {
|
|
1641
1945
|
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">");
|
|
1642
1946
|
}
|
|
1947
|
+
|
|
1643
1948
|
}
|
|
1644
1949
|
class TimestampSecond extends Timestamp {
|
|
1645
|
-
constructor() {
|
|
1646
|
-
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1950
|
+
constructor(timezone = null) {
|
|
1647
1951
|
super(TimeUnit.SECOND, timezone);
|
|
1648
1952
|
}
|
|
1953
|
+
|
|
1649
1954
|
}
|
|
1650
1955
|
class TimestampMillisecond extends Timestamp {
|
|
1651
|
-
constructor() {
|
|
1652
|
-
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1956
|
+
constructor(timezone = null) {
|
|
1653
1957
|
super(TimeUnit.MILLISECOND, timezone);
|
|
1654
1958
|
}
|
|
1959
|
+
|
|
1655
1960
|
}
|
|
1656
1961
|
class TimestampMicrosecond extends Timestamp {
|
|
1657
|
-
constructor() {
|
|
1658
|
-
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1962
|
+
constructor(timezone = null) {
|
|
1659
1963
|
super(TimeUnit.MICROSECOND, timezone);
|
|
1660
1964
|
}
|
|
1965
|
+
|
|
1661
1966
|
}
|
|
1662
1967
|
class TimestampNanosecond extends Timestamp {
|
|
1663
|
-
constructor() {
|
|
1664
|
-
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1968
|
+
constructor(timezone = null) {
|
|
1665
1969
|
super(TimeUnit.NANOSECOND, timezone);
|
|
1666
1970
|
}
|
|
1971
|
+
|
|
1667
1972
|
}
|
|
1668
1973
|
const IntervalUnit = {
|
|
1669
1974
|
DAY_TIME: 0,
|
|
@@ -1673,84 +1978,107 @@ _Symbol$toStringTag6 = Symbol.toStringTag;
|
|
|
1673
1978
|
class Interval extends DataType {
|
|
1674
1979
|
constructor(unit) {
|
|
1675
1980
|
super();
|
|
1981
|
+
|
|
1676
1982
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1983
|
+
|
|
1677
1984
|
this.unit = unit;
|
|
1678
1985
|
}
|
|
1986
|
+
|
|
1679
1987
|
get typeId() {
|
|
1680
1988
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
|
|
1681
1989
|
}
|
|
1990
|
+
|
|
1682
1991
|
get [_Symbol$toStringTag6]() {
|
|
1683
1992
|
return 'Interval';
|
|
1684
1993
|
}
|
|
1994
|
+
|
|
1685
1995
|
toString() {
|
|
1686
1996
|
return "Interval<".concat(IntervalUnit[this.unit], ">");
|
|
1687
1997
|
}
|
|
1998
|
+
|
|
1688
1999
|
}
|
|
1689
2000
|
class IntervalDayTime extends Interval {
|
|
1690
2001
|
constructor() {
|
|
1691
2002
|
super(IntervalUnit.DAY_TIME);
|
|
1692
2003
|
}
|
|
2004
|
+
|
|
1693
2005
|
}
|
|
1694
2006
|
class IntervalYearMonth extends Interval {
|
|
1695
2007
|
constructor() {
|
|
1696
2008
|
super(IntervalUnit.YEAR_MONTH);
|
|
1697
2009
|
}
|
|
2010
|
+
|
|
1698
2011
|
}
|
|
1699
2012
|
_Symbol$toStringTag7 = Symbol.toStringTag;
|
|
1700
2013
|
class FixedSizeList extends DataType {
|
|
1701
2014
|
constructor(listSize, child) {
|
|
1702
2015
|
super();
|
|
2016
|
+
|
|
1703
2017
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "listSize", void 0);
|
|
2018
|
+
|
|
1704
2019
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2020
|
+
|
|
1705
2021
|
this.listSize = listSize;
|
|
1706
2022
|
this.children = [child];
|
|
1707
2023
|
}
|
|
2024
|
+
|
|
1708
2025
|
get typeId() {
|
|
1709
2026
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
|
|
1710
2027
|
}
|
|
2028
|
+
|
|
1711
2029
|
get valueType() {
|
|
1712
2030
|
return this.children[0].type;
|
|
1713
2031
|
}
|
|
2032
|
+
|
|
1714
2033
|
get valueField() {
|
|
1715
2034
|
return this.children[0];
|
|
1716
2035
|
}
|
|
2036
|
+
|
|
1717
2037
|
get [_Symbol$toStringTag7]() {
|
|
1718
2038
|
return 'FixedSizeList';
|
|
1719
2039
|
}
|
|
2040
|
+
|
|
1720
2041
|
toString() {
|
|
1721
2042
|
return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
|
|
1722
2043
|
}
|
|
2044
|
+
|
|
1723
2045
|
}
|
|
1724
2046
|
_Symbol$toStringTag8 = Symbol.toStringTag;
|
|
1725
2047
|
class Struct extends DataType {
|
|
1726
2048
|
constructor(children) {
|
|
1727
2049
|
super();
|
|
2050
|
+
|
|
1728
2051
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2052
|
+
|
|
1729
2053
|
this.children = children;
|
|
1730
2054
|
}
|
|
2055
|
+
|
|
1731
2056
|
get typeId() {
|
|
1732
2057
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
|
|
1733
2058
|
}
|
|
2059
|
+
|
|
1734
2060
|
toString() {
|
|
1735
2061
|
return "Struct<{".concat(this.children.map(f => "".concat(f.name, ":").concat(f.type)).join(', '), "}>");
|
|
1736
2062
|
}
|
|
2063
|
+
|
|
1737
2064
|
get [_Symbol$toStringTag8]() {
|
|
1738
2065
|
return 'Struct';
|
|
1739
2066
|
}
|
|
2067
|
+
|
|
1740
2068
|
}
|
|
1741
2069
|
|
|
1742
2070
|
|
|
1743
2071
|
/***/ }),
|
|
1744
2072
|
|
|
1745
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1746
|
-
|
|
1747
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1748
|
-
|
|
2073
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js":
|
|
2074
|
+
/*!**********************************************************************************************************************************!*\
|
|
2075
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js ***!
|
|
2076
|
+
\**********************************************************************************************************************************/
|
|
1749
2077
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1750
2078
|
|
|
1751
2079
|
__webpack_require__.r(__webpack_exports__);
|
|
1752
2080
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1753
|
-
/* harmony export */ assert: () => (/* binding */ assert)
|
|
2081
|
+
/* harmony export */ "assert": () => (/* binding */ assert)
|
|
1754
2082
|
/* harmony export */ });
|
|
1755
2083
|
function assert(condition, message) {
|
|
1756
2084
|
if (!condition) {
|
|
@@ -1761,15 +2089,15 @@ function assert(condition, message) {
|
|
|
1761
2089
|
|
|
1762
2090
|
/***/ }),
|
|
1763
2091
|
|
|
1764
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1765
|
-
|
|
1766
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1767
|
-
|
|
2092
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js":
|
|
2093
|
+
/*!**************************************************************************************************************************************************!*\
|
|
2094
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js ***!
|
|
2095
|
+
\**************************************************************************************************************************************************/
|
|
1768
2096
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1769
2097
|
|
|
1770
2098
|
__webpack_require__.r(__webpack_exports__);
|
|
1771
2099
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1772
|
-
/* harmony export */ assert: () => (/* binding */ assert)
|
|
2100
|
+
/* harmony export */ "assert": () => (/* binding */ assert)
|
|
1773
2101
|
/* harmony export */ });
|
|
1774
2102
|
function assert(condition, message) {
|
|
1775
2103
|
if (!condition) {
|
|
@@ -1780,22 +2108,22 @@ function assert(condition, message) {
|
|
|
1780
2108
|
|
|
1781
2109
|
/***/ }),
|
|
1782
2110
|
|
|
1783
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1784
|
-
|
|
1785
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1786
|
-
|
|
2111
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js":
|
|
2112
|
+
/*!***************************************************************************************************************************************************!*\
|
|
2113
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js ***!
|
|
2114
|
+
\***************************************************************************************************************************************************/
|
|
1787
2115
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1788
2116
|
|
|
1789
2117
|
__webpack_require__.r(__webpack_exports__);
|
|
1790
2118
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1791
|
-
/* harmony export */ document: () => (/* binding */ document_),
|
|
1792
|
-
/* harmony export */ global: () => (/* binding */ global_),
|
|
1793
|
-
/* harmony export */ isBrowser: () => (/* binding */ isBrowser),
|
|
1794
|
-
/* harmony export */ isMobile: () => (/* binding */ isMobile),
|
|
1795
|
-
/* harmony export */ isWorker: () => (/* binding */ isWorker),
|
|
1796
|
-
/* harmony export */ nodeVersion: () => (/* binding */ nodeVersion),
|
|
1797
|
-
/* harmony export */ self: () => (/* binding */ self_),
|
|
1798
|
-
/* harmony export */ window: () => (/* binding */ window_)
|
|
2119
|
+
/* harmony export */ "document": () => (/* binding */ document_),
|
|
2120
|
+
/* harmony export */ "global": () => (/* binding */ global_),
|
|
2121
|
+
/* harmony export */ "isBrowser": () => (/* binding */ isBrowser),
|
|
2122
|
+
/* harmony export */ "isMobile": () => (/* binding */ isMobile),
|
|
2123
|
+
/* harmony export */ "isWorker": () => (/* binding */ isWorker),
|
|
2124
|
+
/* harmony export */ "nodeVersion": () => (/* binding */ nodeVersion),
|
|
2125
|
+
/* harmony export */ "self": () => (/* binding */ self_),
|
|
2126
|
+
/* harmony export */ "window": () => (/* binding */ window_)
|
|
1799
2127
|
/* harmony export */ });
|
|
1800
2128
|
const globals = {
|
|
1801
2129
|
self: typeof self !== 'undefined' && self,
|
|
@@ -1817,33 +2145,33 @@ const nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
|
1817
2145
|
|
|
1818
2146
|
/***/ }),
|
|
1819
2147
|
|
|
1820
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1821
|
-
|
|
1822
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1823
|
-
|
|
2148
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js":
|
|
2149
|
+
/*!*************************************************************************************************************************************************************!*\
|
|
2150
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js ***!
|
|
2151
|
+
\*************************************************************************************************************************************************************/
|
|
1824
2152
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1825
2153
|
|
|
1826
2154
|
__webpack_require__.r(__webpack_exports__);
|
|
1827
2155
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1828
|
-
/* harmony export */ getLibraryUrl: () => (/* binding */ getLibraryUrl),
|
|
1829
|
-
/* harmony export */ loadLibrary: () => (/* binding */ loadLibrary)
|
|
2156
|
+
/* harmony export */ "getLibraryUrl": () => (/* binding */ getLibraryUrl),
|
|
2157
|
+
/* harmony export */ "loadLibrary": () => (/* binding */ loadLibrary)
|
|
1830
2158
|
/* harmony export */ });
|
|
1831
|
-
/* harmony import */ var
|
|
1832
|
-
/* harmony import */ var
|
|
1833
|
-
/* harmony import */ var
|
|
2159
|
+
/* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
2160
|
+
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node/require-utils.node */ "?bea9");
|
|
2161
|
+
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__);
|
|
2162
|
+
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
1834
2163
|
|
|
1835
2164
|
|
|
1836
2165
|
|
|
1837
2166
|
|
|
1838
2167
|
const LATEST = 'latest';
|
|
1839
|
-
const VERSION = true ? "3.
|
|
2168
|
+
const VERSION = true ? "3.1.6" : 0;
|
|
1840
2169
|
const loadLibraryPromises = {};
|
|
1841
|
-
async function loadLibrary(libraryUrl) {
|
|
1842
|
-
let moduleName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1843
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2170
|
+
async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
1844
2171
|
if (moduleName) {
|
|
1845
2172
|
libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);
|
|
1846
2173
|
}
|
|
2174
|
+
|
|
1847
2175
|
loadLibraryPromises[libraryUrl] = loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);
|
|
1848
2176
|
return await loadLibraryPromises[libraryUrl];
|
|
1849
2177
|
}
|
|
@@ -1851,83 +2179,77 @@ function getLibraryUrl(library, moduleName, options) {
|
|
|
1851
2179
|
if (library.startsWith('http')) {
|
|
1852
2180
|
return library;
|
|
1853
2181
|
}
|
|
2182
|
+
|
|
1854
2183
|
const modules = options.modules || {};
|
|
2184
|
+
|
|
1855
2185
|
if (modules[library]) {
|
|
1856
2186
|
return modules[library];
|
|
1857
2187
|
}
|
|
1858
|
-
|
|
2188
|
+
|
|
2189
|
+
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
|
|
1859
2190
|
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
|
|
1860
2191
|
}
|
|
2192
|
+
|
|
1861
2193
|
if (options.CDN) {
|
|
1862
|
-
(0,
|
|
2194
|
+
(0,_env_utils_assert__WEBPACK_IMPORTED_MODULE_2__.assert)(options.CDN.startsWith('http'));
|
|
1863
2195
|
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION, "/dist/libs/").concat(library);
|
|
1864
2196
|
}
|
|
1865
|
-
|
|
2197
|
+
|
|
2198
|
+
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
1866
2199
|
return "../src/libs/".concat(library);
|
|
1867
2200
|
}
|
|
2201
|
+
|
|
1868
2202
|
return "modules/".concat(moduleName, "/src/libs/").concat(library);
|
|
1869
2203
|
}
|
|
2204
|
+
|
|
1870
2205
|
async function loadLibraryFromFile(libraryUrl) {
|
|
1871
2206
|
if (libraryUrl.endsWith('wasm')) {
|
|
1872
2207
|
const response = await fetch(libraryUrl);
|
|
1873
2208
|
return await response.arrayBuffer();
|
|
1874
2209
|
}
|
|
1875
|
-
|
|
2210
|
+
|
|
2211
|
+
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
|
|
1876
2212
|
try {
|
|
1877
|
-
return
|
|
2213
|
+
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile && (await _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile(libraryUrl));
|
|
1878
2214
|
} catch {
|
|
1879
2215
|
return null;
|
|
1880
2216
|
}
|
|
1881
2217
|
}
|
|
1882
|
-
|
|
2218
|
+
|
|
2219
|
+
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
1883
2220
|
return importScripts(libraryUrl);
|
|
1884
2221
|
}
|
|
2222
|
+
|
|
1885
2223
|
const response = await fetch(libraryUrl);
|
|
1886
2224
|
const scriptSource = await response.text();
|
|
1887
2225
|
return loadLibraryFromString(scriptSource, libraryUrl);
|
|
1888
2226
|
}
|
|
2227
|
+
|
|
1889
2228
|
function loadLibraryFromString(scriptSource, id) {
|
|
1890
|
-
if (!
|
|
1891
|
-
return
|
|
2229
|
+
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
|
|
2230
|
+
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString(scriptSource, id);
|
|
1892
2231
|
}
|
|
1893
|
-
|
|
1894
|
-
|
|
2232
|
+
|
|
2233
|
+
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
2234
|
+
eval.call(_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.global, scriptSource);
|
|
1895
2235
|
return null;
|
|
1896
2236
|
}
|
|
2237
|
+
|
|
1897
2238
|
const script = document.createElement('script');
|
|
1898
2239
|
script.id = id;
|
|
2240
|
+
|
|
1899
2241
|
try {
|
|
1900
2242
|
script.appendChild(document.createTextNode(scriptSource));
|
|
1901
2243
|
} catch (e) {
|
|
1902
2244
|
script.text = scriptSource;
|
|
1903
2245
|
}
|
|
2246
|
+
|
|
1904
2247
|
document.body.appendChild(script);
|
|
1905
2248
|
return null;
|
|
1906
2249
|
}
|
|
1907
2250
|
|
|
1908
2251
|
|
|
1909
|
-
/***/ }),
|
|
1910
|
-
|
|
1911
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.4.14/node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/require-utils.browser.js":
|
|
1912
|
-
/*!*************************************************************************************************************************************************************!*\
|
|
1913
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.4.14/node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/require-utils.browser.js ***!
|
|
1914
|
-
\*************************************************************************************************************************************************************/
|
|
1915
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1916
|
-
|
|
1917
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1918
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1919
|
-
/* harmony export */ readFileAsArrayBuffer: () => (/* binding */ readFileAsArrayBuffer),
|
|
1920
|
-
/* harmony export */ readFileAsText: () => (/* binding */ readFileAsText),
|
|
1921
|
-
/* harmony export */ requireFromFile: () => (/* binding */ requireFromFile),
|
|
1922
|
-
/* harmony export */ requireFromString: () => (/* binding */ requireFromString)
|
|
1923
|
-
/* harmony export */ });
|
|
1924
|
-
const readFileAsArrayBuffer = null;
|
|
1925
|
-
const readFileAsText = null;
|
|
1926
|
-
const requireFromFile = null;
|
|
1927
|
-
const requireFromString = null;
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
2252
|
/***/ })
|
|
1931
2253
|
|
|
1932
2254
|
}]);
|
|
1933
|
-
//# sourceMappingURL=vendors-
|
|
2255
|
+
//# sourceMappingURL=vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map
|