@itwin/rpcinterface-full-stack-tests 3.3.0-dev.81 → 3.3.0-dev.84
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/_c41d.bundled-tests.js +14 -0
- package/lib/dist/_c41d.bundled-tests.js.map +1 -0
- package/lib/dist/bundled-tests.js +55983 -56254
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/{2.bundled-tests.js → core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js} +10 -9
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -0
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_5_node_modules_loaders_gl_draco_di-e0b0bc.bundled-tests.js +2271 -0
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_5_node_modules_loaders_gl_draco_di-e0b0bc.bundled-tests.js.map +1 -0
- package/lib/frontend/IModelConnection.test.js +2 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/package.json +23 -18
- package/lib/dist/0.bundled-tests.js +0 -4569
- package/lib/dist/0.bundled-tests.js.map +0 -1
- package/lib/dist/1.bundled-tests.js +0 -26
- package/lib/dist/1.bundled-tests.js.map +0 -1
- package/lib/dist/2.bundled-tests.js.map +0 -1
|
@@ -1,4569 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{
|
|
2
|
-
|
|
3
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js":
|
|
4
|
-
/*!************************************************************************************************************************************!*\
|
|
5
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js ***!
|
|
6
|
-
\************************************************************************************************************************************/
|
|
7
|
-
/*! exports provided: DracoLoader, _TypecheckDracoLoader */
|
|
8
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
|
|
10
|
-
"use strict";
|
|
11
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DracoLoader", function() { return DracoLoader; });
|
|
13
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_TypecheckDracoLoader", function() { return _TypecheckDracoLoader; });
|
|
14
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
15
|
-
|
|
16
|
-
const DEFAULT_DRACO_OPTIONS = {
|
|
17
|
-
draco: {
|
|
18
|
-
decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js',
|
|
19
|
-
libraryPath: 'libs/',
|
|
20
|
-
extraAttributes: {},
|
|
21
|
-
attributeNameEntry: undefined
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const DracoLoader = {
|
|
25
|
-
name: 'Draco',
|
|
26
|
-
id: 'draco',
|
|
27
|
-
module: 'draco',
|
|
28
|
-
shapes: ['mesh'],
|
|
29
|
-
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__["VERSION"],
|
|
30
|
-
worker: true,
|
|
31
|
-
extensions: ['drc'],
|
|
32
|
-
mimeTypes: ['application/octet-stream'],
|
|
33
|
-
binary: true,
|
|
34
|
-
tests: ['DRACO'],
|
|
35
|
-
options: DEFAULT_DRACO_OPTIONS
|
|
36
|
-
};
|
|
37
|
-
const _TypecheckDracoLoader = DracoLoader;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/***/ }),
|
|
41
|
-
|
|
42
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js":
|
|
43
|
-
/*!************************************************************************************************************************************!*\
|
|
44
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js ***!
|
|
45
|
-
\************************************************************************************************************************************/
|
|
46
|
-
/*! exports provided: DracoWriter */
|
|
47
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
48
|
-
|
|
49
|
-
"use strict";
|
|
50
|
-
__webpack_require__.r(__webpack_exports__);
|
|
51
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DracoWriter", function() { return DracoWriter; });
|
|
52
|
-
/* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js");
|
|
53
|
-
/* 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.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
54
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const DEFAULT_DRACO_OPTIONS = {
|
|
59
|
-
pointcloud: false,
|
|
60
|
-
attributeNameEntry: 'name'
|
|
61
|
-
};
|
|
62
|
-
const DracoWriter = {
|
|
63
|
-
name: 'DRACO',
|
|
64
|
-
id: 'draco',
|
|
65
|
-
module: 'draco',
|
|
66
|
-
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_2__["VERSION"],
|
|
67
|
-
extensions: ['drc'],
|
|
68
|
-
encode,
|
|
69
|
-
options: {
|
|
70
|
-
draco: DEFAULT_DRACO_OPTIONS
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
async function encode(data, options = {}) {
|
|
75
|
-
const {
|
|
76
|
-
draco
|
|
77
|
-
} = await Object(_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__["loadDracoEncoderModule"])(options);
|
|
78
|
-
const dracoBuilder = new _lib_draco_builder__WEBPACK_IMPORTED_MODULE_0__["default"](draco);
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
return dracoBuilder.encodeSync(data, options.draco);
|
|
82
|
-
} finally {
|
|
83
|
-
dracoBuilder.destroy();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/***/ }),
|
|
89
|
-
|
|
90
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/index.js":
|
|
91
|
-
/*!*****************************************************************************************************************************!*\
|
|
92
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/index.js ***!
|
|
93
|
-
\*****************************************************************************************************************************/
|
|
94
|
-
/*! exports provided: DracoWriter, DracoWriterWorker, DracoWorkerLoader, DracoLoader, _TypecheckDracoLoader */
|
|
95
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
96
|
-
|
|
97
|
-
"use strict";
|
|
98
|
-
__webpack_require__.r(__webpack_exports__);
|
|
99
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DracoWriterWorker", function() { return DracoWriterWorker; });
|
|
100
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DracoLoader", function() { return DracoLoader; });
|
|
101
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_TypecheckDracoLoader", function() { return _TypecheckDracoLoader; });
|
|
102
|
-
/* harmony import */ var _draco_loader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js");
|
|
103
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DracoWorkerLoader", function() { return _draco_loader__WEBPACK_IMPORTED_MODULE_0__["DracoLoader"]; });
|
|
104
|
-
|
|
105
|
-
/* harmony import */ var _lib_draco_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-parser */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/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.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
107
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
108
|
-
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/index.js");
|
|
109
|
-
/* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js");
|
|
110
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DracoWriter", function() { return _draco_writer__WEBPACK_IMPORTED_MODULE_5__["DracoWriter"]; });
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const DracoWriterWorker = {
|
|
119
|
-
id: _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_4__["isBrowser"] ? 'draco-writer' : 'draco-writer-nodejs',
|
|
120
|
-
name: 'Draco compressed geometry writer',
|
|
121
|
-
module: 'draco',
|
|
122
|
-
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_3__["VERSION"],
|
|
123
|
-
worker: true,
|
|
124
|
-
options: {
|
|
125
|
-
draco: {},
|
|
126
|
-
source: null
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
const DracoLoader = { ..._draco_loader__WEBPACK_IMPORTED_MODULE_0__["DracoLoader"],
|
|
131
|
-
parse
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
async function parse(arrayBuffer, options) {
|
|
135
|
-
const {
|
|
136
|
-
draco
|
|
137
|
-
} = await Object(_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_2__["loadDracoDecoderModule"])(options);
|
|
138
|
-
const dracoParser = new _lib_draco_parser__WEBPACK_IMPORTED_MODULE_1__["default"](draco);
|
|
139
|
-
|
|
140
|
-
try {
|
|
141
|
-
return dracoParser.parseSync(arrayBuffer, options === null || options === void 0 ? void 0 : options.draco);
|
|
142
|
-
} finally {
|
|
143
|
-
dracoParser.destroy();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const _TypecheckDracoLoader = DracoLoader;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/***/ }),
|
|
151
|
-
|
|
152
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js":
|
|
153
|
-
/*!*****************************************************************************************************************************************!*\
|
|
154
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js ***!
|
|
155
|
-
\*****************************************************************************************************************************************/
|
|
156
|
-
/*! exports provided: default */
|
|
157
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
158
|
-
|
|
159
|
-
"use strict";
|
|
160
|
-
__webpack_require__.r(__webpack_exports__);
|
|
161
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DracoBuilder; });
|
|
162
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
163
|
-
|
|
164
|
-
const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
165
|
-
POSITION: 'POSITION',
|
|
166
|
-
NORMAL: 'NORMAL',
|
|
167
|
-
COLOR_0: 'COLOR',
|
|
168
|
-
TEXCOORD_0: 'TEX_COORD'
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const noop = () => {};
|
|
172
|
-
|
|
173
|
-
class DracoBuilder {
|
|
174
|
-
constructor(draco) {
|
|
175
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
176
|
-
|
|
177
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoEncoder", void 0);
|
|
178
|
-
|
|
179
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMeshBuilder", void 0);
|
|
180
|
-
|
|
181
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMetadataBuilder", void 0);
|
|
182
|
-
|
|
183
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "log", void 0);
|
|
184
|
-
|
|
185
|
-
this.draco = draco;
|
|
186
|
-
this.dracoEncoder = new this.draco.Encoder();
|
|
187
|
-
this.dracoMeshBuilder = new this.draco.MeshBuilder();
|
|
188
|
-
this.dracoMetadataBuilder = new this.draco.MetadataBuilder();
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
destroy() {
|
|
192
|
-
this.destroyEncodedObject(this.dracoMeshBuilder);
|
|
193
|
-
this.destroyEncodedObject(this.dracoEncoder);
|
|
194
|
-
this.destroyEncodedObject(this.dracoMetadataBuilder);
|
|
195
|
-
this.dracoMeshBuilder = null;
|
|
196
|
-
this.dracoEncoder = null;
|
|
197
|
-
this.draco = null;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
destroyEncodedObject(object) {
|
|
201
|
-
if (object) {
|
|
202
|
-
this.draco.destroy(object);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
encodeSync(mesh, options = {}) {
|
|
207
|
-
this.log = noop;
|
|
208
|
-
|
|
209
|
-
this._setOptions(options);
|
|
210
|
-
|
|
211
|
-
return options.pointcloud ? this._encodePointCloud(mesh, options) : this._encodeMesh(mesh, options);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
_getAttributesFromMesh(mesh) {
|
|
215
|
-
const attributes = { ...mesh,
|
|
216
|
-
...mesh.attributes
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
if (mesh.indices) {
|
|
220
|
-
attributes.indices = mesh.indices;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return attributes;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
_encodePointCloud(pointcloud, options) {
|
|
227
|
-
const dracoPointCloud = new this.draco.PointCloud();
|
|
228
|
-
|
|
229
|
-
if (options.metadata) {
|
|
230
|
-
this._addGeometryMetadata(dracoPointCloud, options.metadata);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const attributes = this._getAttributesFromMesh(pointcloud);
|
|
234
|
-
|
|
235
|
-
this._createDracoPointCloud(dracoPointCloud, attributes, options);
|
|
236
|
-
|
|
237
|
-
const dracoData = new this.draco.DracoInt8Array();
|
|
238
|
-
|
|
239
|
-
try {
|
|
240
|
-
const encodedLen = this.dracoEncoder.EncodePointCloudToDracoBuffer(dracoPointCloud, false, dracoData);
|
|
241
|
-
|
|
242
|
-
if (!(encodedLen > 0)) {
|
|
243
|
-
throw new Error('Draco encoding failed.');
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
this.log("DRACO encoded ".concat(dracoPointCloud.num_points(), " points\n with ").concat(dracoPointCloud.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
247
|
-
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
248
|
-
} finally {
|
|
249
|
-
this.destroyEncodedObject(dracoData);
|
|
250
|
-
this.destroyEncodedObject(dracoPointCloud);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
_encodeMesh(mesh, options) {
|
|
255
|
-
const dracoMesh = new this.draco.Mesh();
|
|
256
|
-
|
|
257
|
-
if (options.metadata) {
|
|
258
|
-
this._addGeometryMetadata(dracoMesh, options.metadata);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const attributes = this._getAttributesFromMesh(mesh);
|
|
262
|
-
|
|
263
|
-
this._createDracoMesh(dracoMesh, attributes, options);
|
|
264
|
-
|
|
265
|
-
const dracoData = new this.draco.DracoInt8Array();
|
|
266
|
-
|
|
267
|
-
try {
|
|
268
|
-
const encodedLen = this.dracoEncoder.EncodeMeshToDracoBuffer(dracoMesh, dracoData);
|
|
269
|
-
|
|
270
|
-
if (encodedLen <= 0) {
|
|
271
|
-
throw new Error('Draco encoding failed.');
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
this.log("DRACO encoded ".concat(dracoMesh.num_points(), " points\n with ").concat(dracoMesh.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
275
|
-
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
276
|
-
} finally {
|
|
277
|
-
this.destroyEncodedObject(dracoData);
|
|
278
|
-
this.destroyEncodedObject(dracoMesh);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
_setOptions(options) {
|
|
283
|
-
if ('speed' in options) {
|
|
284
|
-
this.dracoEncoder.SetSpeedOptions(...options.speed);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
if ('method' in options) {
|
|
288
|
-
const dracoMethod = this.draco[options.method || 'MESH_SEQUENTIAL_ENCODING'];
|
|
289
|
-
this.dracoEncoder.SetEncodingMethod(dracoMethod);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if ('quantization' in options) {
|
|
293
|
-
for (const attribute in options.quantization) {
|
|
294
|
-
const bits = options.quantization[attribute];
|
|
295
|
-
const dracoPosition = this.draco[attribute];
|
|
296
|
-
this.dracoEncoder.SetAttributeQuantization(dracoPosition, bits);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
_createDracoMesh(dracoMesh, attributes, options) {
|
|
302
|
-
const optionalMetadata = options.attributesMetadata || {};
|
|
303
|
-
|
|
304
|
-
try {
|
|
305
|
-
const positions = this._getPositionAttribute(attributes);
|
|
306
|
-
|
|
307
|
-
if (!positions) {
|
|
308
|
-
throw new Error('positions');
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
const vertexCount = positions.length / 3;
|
|
312
|
-
|
|
313
|
-
for (let attributeName in attributes) {
|
|
314
|
-
const attribute = attributes[attributeName];
|
|
315
|
-
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
316
|
-
|
|
317
|
-
const uniqueId = this._addAttributeToMesh(dracoMesh, attributeName, attribute, vertexCount);
|
|
318
|
-
|
|
319
|
-
if (uniqueId !== -1) {
|
|
320
|
-
this._addAttributeMetadata(dracoMesh, uniqueId, {
|
|
321
|
-
name: attributeName,
|
|
322
|
-
...(optionalMetadata[attributeName] || {})
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
} catch (error) {
|
|
327
|
-
this.destroyEncodedObject(dracoMesh);
|
|
328
|
-
throw error;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
return dracoMesh;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
_createDracoPointCloud(dracoPointCloud, attributes, options) {
|
|
335
|
-
const optionalMetadata = options.attributesMetadata || {};
|
|
336
|
-
|
|
337
|
-
try {
|
|
338
|
-
const positions = this._getPositionAttribute(attributes);
|
|
339
|
-
|
|
340
|
-
if (!positions) {
|
|
341
|
-
throw new Error('positions');
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
const vertexCount = positions.length / 3;
|
|
345
|
-
|
|
346
|
-
for (let attributeName in attributes) {
|
|
347
|
-
const attribute = attributes[attributeName];
|
|
348
|
-
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
349
|
-
|
|
350
|
-
const uniqueId = this._addAttributeToMesh(dracoPointCloud, attributeName, attribute, vertexCount);
|
|
351
|
-
|
|
352
|
-
if (uniqueId !== -1) {
|
|
353
|
-
this._addAttributeMetadata(dracoPointCloud, uniqueId, {
|
|
354
|
-
name: attributeName,
|
|
355
|
-
...(optionalMetadata[attributeName] || {})
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
} catch (error) {
|
|
360
|
-
this.destroyEncodedObject(dracoPointCloud);
|
|
361
|
-
throw error;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return dracoPointCloud;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
_addAttributeToMesh(mesh, attributeName, attribute, vertexCount) {
|
|
368
|
-
if (!ArrayBuffer.isView(attribute)) {
|
|
369
|
-
return -1;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
const type = this._getDracoAttributeType(attributeName);
|
|
373
|
-
|
|
374
|
-
const size = attribute.length / vertexCount;
|
|
375
|
-
|
|
376
|
-
if (type === 'indices') {
|
|
377
|
-
const numFaces = attribute.length / 3;
|
|
378
|
-
this.log("Adding attribute ".concat(attributeName, ", size ").concat(numFaces));
|
|
379
|
-
this.dracoMeshBuilder.AddFacesToMesh(mesh, numFaces, attribute);
|
|
380
|
-
return -1;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
this.log("Adding attribute ".concat(attributeName, ", size ").concat(size));
|
|
384
|
-
const builder = this.dracoMeshBuilder;
|
|
385
|
-
const {
|
|
386
|
-
buffer
|
|
387
|
-
} = attribute;
|
|
388
|
-
|
|
389
|
-
switch (attribute.constructor) {
|
|
390
|
-
case Int8Array:
|
|
391
|
-
return builder.AddInt8Attribute(mesh, type, vertexCount, size, new Int8Array(buffer));
|
|
392
|
-
|
|
393
|
-
case Int16Array:
|
|
394
|
-
return builder.AddInt16Attribute(mesh, type, vertexCount, size, new Int16Array(buffer));
|
|
395
|
-
|
|
396
|
-
case Int32Array:
|
|
397
|
-
return builder.AddInt32Attribute(mesh, type, vertexCount, size, new Int32Array(buffer));
|
|
398
|
-
|
|
399
|
-
case Uint8Array:
|
|
400
|
-
case Uint8ClampedArray:
|
|
401
|
-
return builder.AddUInt8Attribute(mesh, type, vertexCount, size, new Uint8Array(buffer));
|
|
402
|
-
|
|
403
|
-
case Uint16Array:
|
|
404
|
-
return builder.AddUInt16Attribute(mesh, type, vertexCount, size, new Uint16Array(buffer));
|
|
405
|
-
|
|
406
|
-
case Uint32Array:
|
|
407
|
-
return builder.AddUInt32Attribute(mesh, type, vertexCount, size, new Uint32Array(buffer));
|
|
408
|
-
|
|
409
|
-
case Float32Array:
|
|
410
|
-
default:
|
|
411
|
-
return builder.AddFloatAttribute(mesh, type, vertexCount, size, new Float32Array(buffer));
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
_getDracoAttributeType(attributeName) {
|
|
416
|
-
switch (attributeName.toLowerCase()) {
|
|
417
|
-
case 'indices':
|
|
418
|
-
return 'indices';
|
|
419
|
-
|
|
420
|
-
case 'position':
|
|
421
|
-
case 'positions':
|
|
422
|
-
case 'vertices':
|
|
423
|
-
return this.draco.POSITION;
|
|
424
|
-
|
|
425
|
-
case 'normal':
|
|
426
|
-
case 'normals':
|
|
427
|
-
return this.draco.NORMAL;
|
|
428
|
-
|
|
429
|
-
case 'color':
|
|
430
|
-
case 'colors':
|
|
431
|
-
return this.draco.COLOR;
|
|
432
|
-
|
|
433
|
-
case 'texcoord':
|
|
434
|
-
case 'texcoords':
|
|
435
|
-
return this.draco.TEX_COORD;
|
|
436
|
-
|
|
437
|
-
default:
|
|
438
|
-
return this.draco.GENERIC;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
_getPositionAttribute(attributes) {
|
|
443
|
-
for (const attributeName in attributes) {
|
|
444
|
-
const attribute = attributes[attributeName];
|
|
445
|
-
|
|
446
|
-
const dracoType = this._getDracoAttributeType(attributeName);
|
|
447
|
-
|
|
448
|
-
if (dracoType === this.draco.POSITION) {
|
|
449
|
-
return attribute;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
return null;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
_addGeometryMetadata(dracoGeometry, metadata) {
|
|
457
|
-
const dracoMetadata = new this.draco.Metadata();
|
|
458
|
-
|
|
459
|
-
this._populateDracoMetadata(dracoMetadata, metadata);
|
|
460
|
-
|
|
461
|
-
this.dracoMeshBuilder.AddMetadata(dracoGeometry, dracoMetadata);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
_addAttributeMetadata(dracoGeometry, uniqueAttributeId, metadata) {
|
|
465
|
-
const dracoAttributeMetadata = new this.draco.Metadata();
|
|
466
|
-
|
|
467
|
-
this._populateDracoMetadata(dracoAttributeMetadata, metadata);
|
|
468
|
-
|
|
469
|
-
this.dracoMeshBuilder.SetMetadataForAttribute(dracoGeometry, uniqueAttributeId, dracoAttributeMetadata);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
_populateDracoMetadata(dracoMetadata, metadata) {
|
|
473
|
-
for (const [key, value] of getEntries(metadata)) {
|
|
474
|
-
switch (typeof value) {
|
|
475
|
-
case 'number':
|
|
476
|
-
if (Math.trunc(value) === value) {
|
|
477
|
-
this.dracoMetadataBuilder.AddIntEntry(dracoMetadata, key, value);
|
|
478
|
-
} else {
|
|
479
|
-
this.dracoMetadataBuilder.AddDoubleEntry(dracoMetadata, key, value);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
break;
|
|
483
|
-
|
|
484
|
-
case 'object':
|
|
485
|
-
if (value instanceof Int32Array) {
|
|
486
|
-
this.dracoMetadataBuilder.AddIntEntryArray(dracoMetadata, key, value, value.length);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
break;
|
|
490
|
-
|
|
491
|
-
case 'string':
|
|
492
|
-
default:
|
|
493
|
-
this.dracoMetadataBuilder.AddStringEntry(dracoMetadata, key, value);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
function dracoInt8ArrayToArrayBuffer(dracoData) {
|
|
501
|
-
const byteLength = dracoData.size();
|
|
502
|
-
const outputBuffer = new ArrayBuffer(byteLength);
|
|
503
|
-
const outputData = new Int8Array(outputBuffer);
|
|
504
|
-
|
|
505
|
-
for (let i = 0; i < byteLength; ++i) {
|
|
506
|
-
outputData[i] = dracoData.GetValue(i);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
return outputBuffer;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
function getEntries(container) {
|
|
513
|
-
const hasEntriesFunc = container.entries && !container.hasOwnProperty('entries');
|
|
514
|
-
return hasEntriesFunc ? container.entries() : Object.entries(container);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
/***/ }),
|
|
519
|
-
|
|
520
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js":
|
|
521
|
-
/*!***********************************************************************************************************************************************!*\
|
|
522
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js ***!
|
|
523
|
-
\***********************************************************************************************************************************************/
|
|
524
|
-
/*! exports provided: loadDracoDecoderModule, loadDracoEncoderModule */
|
|
525
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
526
|
-
|
|
527
|
-
"use strict";
|
|
528
|
-
__webpack_require__.r(__webpack_exports__);
|
|
529
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadDracoDecoderModule", function() { return loadDracoDecoderModule; });
|
|
530
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadDracoEncoderModule", function() { return loadDracoEncoderModule; });
|
|
531
|
-
/* 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.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/index.js");
|
|
532
|
-
|
|
533
|
-
const DRACO_VERSION = '1.4.1';
|
|
534
|
-
const DRACO_JS_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.js");
|
|
535
|
-
const DRACO_WASM_WRAPPER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_wasm_wrapper.js");
|
|
536
|
-
const DRACO_WASM_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.wasm");
|
|
537
|
-
const DRACO_ENCODER_URL = "https://raw.githubusercontent.com/google/draco/".concat(DRACO_VERSION, "/javascript/draco_encoder.js");
|
|
538
|
-
let loadDecoderPromise;
|
|
539
|
-
let loadEncoderPromise;
|
|
540
|
-
async function loadDracoDecoderModule(options) {
|
|
541
|
-
const modules = options.modules || {};
|
|
542
|
-
|
|
543
|
-
if (modules.draco3d) {
|
|
544
|
-
loadDecoderPromise = loadDecoderPromise || modules.draco3d.createDecoderModule({}).then(draco => {
|
|
545
|
-
return {
|
|
546
|
-
draco
|
|
547
|
-
};
|
|
548
|
-
});
|
|
549
|
-
} else {
|
|
550
|
-
loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
return await loadDecoderPromise;
|
|
554
|
-
}
|
|
555
|
-
async function loadDracoEncoderModule(options) {
|
|
556
|
-
const modules = options.modules || {};
|
|
557
|
-
|
|
558
|
-
if (modules.draco3d) {
|
|
559
|
-
loadEncoderPromise = loadEncoderPromise || modules.draco3d.createEncoderModule({}).then(draco => {
|
|
560
|
-
return {
|
|
561
|
-
draco
|
|
562
|
-
};
|
|
563
|
-
});
|
|
564
|
-
} else {
|
|
565
|
-
loadEncoderPromise = loadEncoderPromise || loadDracoEncoder(options);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
return await loadEncoderPromise;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
async function loadDracoDecoder(options) {
|
|
572
|
-
let DracoDecoderModule;
|
|
573
|
-
let wasmBinary;
|
|
574
|
-
|
|
575
|
-
switch (options.draco && options.draco.decoderType) {
|
|
576
|
-
case 'js':
|
|
577
|
-
DracoDecoderModule = await Object(_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__["loadLibrary"])(DRACO_JS_DECODER_URL, 'draco', options);
|
|
578
|
-
break;
|
|
579
|
-
|
|
580
|
-
case 'wasm':
|
|
581
|
-
default:
|
|
582
|
-
[DracoDecoderModule, wasmBinary] = await Promise.all([await Object(_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__["loadLibrary"])(DRACO_WASM_WRAPPER_URL, 'draco', options), await Object(_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__["loadLibrary"])(DRACO_WASM_DECODER_URL, 'draco', options)]);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
DracoDecoderModule = DracoDecoderModule || globalThis.DracoDecoderModule;
|
|
586
|
-
return await initializeDracoDecoder(DracoDecoderModule, wasmBinary);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
|
|
590
|
-
const options = {};
|
|
591
|
-
|
|
592
|
-
if (wasmBinary) {
|
|
593
|
-
options.wasmBinary = wasmBinary;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
return new Promise(resolve => {
|
|
597
|
-
DracoDecoderModule({ ...options,
|
|
598
|
-
onModuleLoaded: draco => resolve({
|
|
599
|
-
draco
|
|
600
|
-
})
|
|
601
|
-
});
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
async function loadDracoEncoder(options) {
|
|
606
|
-
let DracoEncoderModule = await Object(_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__["loadLibrary"])(DRACO_ENCODER_URL, 'draco', options);
|
|
607
|
-
DracoEncoderModule = DracoEncoderModule || globalThis.DracoEncoderModule;
|
|
608
|
-
return new Promise(resolve => {
|
|
609
|
-
DracoEncoderModule({
|
|
610
|
-
onModuleLoaded: draco => resolve({
|
|
611
|
-
draco
|
|
612
|
-
})
|
|
613
|
-
});
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
/***/ }),
|
|
619
|
-
|
|
620
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js":
|
|
621
|
-
/*!****************************************************************************************************************************************!*\
|
|
622
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js ***!
|
|
623
|
-
\****************************************************************************************************************************************/
|
|
624
|
-
/*! exports provided: default */
|
|
625
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
626
|
-
|
|
627
|
-
"use strict";
|
|
628
|
-
__webpack_require__.r(__webpack_exports__);
|
|
629
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DracoParser; });
|
|
630
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
631
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/index.js");
|
|
632
|
-
/* 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.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js");
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
const GEOMETRY_TYPE = {
|
|
637
|
-
TRIANGULAR_MESH: 0,
|
|
638
|
-
POINT_CLOUD: 1
|
|
639
|
-
};
|
|
640
|
-
const DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP = {
|
|
641
|
-
POSITION: 'POSITION',
|
|
642
|
-
NORMAL: 'NORMAL',
|
|
643
|
-
COLOR: 'COLOR_0',
|
|
644
|
-
TEX_COORD: 'TEXCOORD_0'
|
|
645
|
-
};
|
|
646
|
-
const DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP = {
|
|
647
|
-
1: Int8Array,
|
|
648
|
-
2: Uint8Array,
|
|
649
|
-
3: Int16Array,
|
|
650
|
-
4: Uint16Array,
|
|
651
|
-
5: Int32Array,
|
|
652
|
-
6: Uint32Array,
|
|
653
|
-
9: Float32Array
|
|
654
|
-
};
|
|
655
|
-
const INDEX_ITEM_SIZE = 4;
|
|
656
|
-
class DracoParser {
|
|
657
|
-
constructor(draco) {
|
|
658
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
659
|
-
|
|
660
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "decoder", void 0);
|
|
661
|
-
|
|
662
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadataQuerier", void 0);
|
|
663
|
-
|
|
664
|
-
this.draco = draco;
|
|
665
|
-
this.decoder = new this.draco.Decoder();
|
|
666
|
-
this.metadataQuerier = new this.draco.MetadataQuerier();
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
destroy() {
|
|
670
|
-
this.draco.destroy(this.decoder);
|
|
671
|
-
this.draco.destroy(this.metadataQuerier);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
parseSync(arrayBuffer, options = {}) {
|
|
675
|
-
const buffer = new this.draco.DecoderBuffer();
|
|
676
|
-
buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);
|
|
677
|
-
|
|
678
|
-
this._disableAttributeTransforms(options);
|
|
679
|
-
|
|
680
|
-
const geometry_type = this.decoder.GetEncodedGeometryType(buffer);
|
|
681
|
-
const dracoGeometry = geometry_type === this.draco.TRIANGULAR_MESH ? new this.draco.Mesh() : new this.draco.PointCloud();
|
|
682
|
-
|
|
683
|
-
try {
|
|
684
|
-
let dracoStatus;
|
|
685
|
-
|
|
686
|
-
switch (geometry_type) {
|
|
687
|
-
case this.draco.TRIANGULAR_MESH:
|
|
688
|
-
dracoStatus = this.decoder.DecodeBufferToMesh(buffer, dracoGeometry);
|
|
689
|
-
break;
|
|
690
|
-
|
|
691
|
-
case this.draco.POINT_CLOUD:
|
|
692
|
-
dracoStatus = this.decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
|
|
693
|
-
break;
|
|
694
|
-
|
|
695
|
-
default:
|
|
696
|
-
throw new Error('DRACO: Unknown geometry type.');
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
if (!dracoStatus.ok() || !dracoGeometry.ptr) {
|
|
700
|
-
const message = "DRACO decompression failed: ".concat(dracoStatus.error_msg());
|
|
701
|
-
throw new Error(message);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
const loaderData = this._getDracoLoaderData(dracoGeometry, geometry_type, options);
|
|
705
|
-
|
|
706
|
-
const geometry = this._getMeshData(dracoGeometry, loaderData, options);
|
|
707
|
-
|
|
708
|
-
const boundingBox = Object(_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__["getMeshBoundingBox"])(geometry.attributes);
|
|
709
|
-
const schema = Object(_utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__["getDracoSchema"])(geometry.attributes, loaderData, geometry.indices);
|
|
710
|
-
const data = {
|
|
711
|
-
loader: 'draco',
|
|
712
|
-
loaderData,
|
|
713
|
-
header: {
|
|
714
|
-
vertexCount: dracoGeometry.num_points(),
|
|
715
|
-
boundingBox
|
|
716
|
-
},
|
|
717
|
-
...geometry,
|
|
718
|
-
schema
|
|
719
|
-
};
|
|
720
|
-
return data;
|
|
721
|
-
} finally {
|
|
722
|
-
this.draco.destroy(buffer);
|
|
723
|
-
|
|
724
|
-
if (dracoGeometry) {
|
|
725
|
-
this.draco.destroy(dracoGeometry);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
_getDracoLoaderData(dracoGeometry, geometry_type, options) {
|
|
731
|
-
const metadata = this._getTopLevelMetadata(dracoGeometry);
|
|
732
|
-
|
|
733
|
-
const attributes = this._getDracoAttributes(dracoGeometry, options);
|
|
734
|
-
|
|
735
|
-
return {
|
|
736
|
-
geometry_type,
|
|
737
|
-
num_attributes: dracoGeometry.num_attributes(),
|
|
738
|
-
num_points: dracoGeometry.num_points(),
|
|
739
|
-
num_faces: dracoGeometry instanceof this.draco.Mesh ? dracoGeometry.num_faces() : 0,
|
|
740
|
-
metadata,
|
|
741
|
-
attributes
|
|
742
|
-
};
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
_getDracoAttributes(dracoGeometry, options) {
|
|
746
|
-
const dracoAttributes = {};
|
|
747
|
-
|
|
748
|
-
for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {
|
|
749
|
-
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);
|
|
750
|
-
|
|
751
|
-
const metadata = this._getAttributeMetadata(dracoGeometry, attributeId);
|
|
752
|
-
|
|
753
|
-
dracoAttributes[dracoAttribute.unique_id()] = {
|
|
754
|
-
unique_id: dracoAttribute.unique_id(),
|
|
755
|
-
attribute_type: dracoAttribute.attribute_type(),
|
|
756
|
-
data_type: dracoAttribute.data_type(),
|
|
757
|
-
num_components: dracoAttribute.num_components(),
|
|
758
|
-
byte_offset: dracoAttribute.byte_offset(),
|
|
759
|
-
byte_stride: dracoAttribute.byte_stride(),
|
|
760
|
-
normalized: dracoAttribute.normalized(),
|
|
761
|
-
attribute_index: attributeId,
|
|
762
|
-
metadata
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
const quantization = this._getQuantizationTransform(dracoAttribute, options);
|
|
766
|
-
|
|
767
|
-
if (quantization) {
|
|
768
|
-
dracoAttributes[dracoAttribute.unique_id()].quantization_transform = quantization;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
const octahedron = this._getOctahedronTransform(dracoAttribute, options);
|
|
772
|
-
|
|
773
|
-
if (octahedron) {
|
|
774
|
-
dracoAttributes[dracoAttribute.unique_id()].octahedron_transform = octahedron;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
return dracoAttributes;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
_getMeshData(dracoGeometry, loaderData, options) {
|
|
782
|
-
const attributes = this._getMeshAttributes(loaderData, dracoGeometry, options);
|
|
783
|
-
|
|
784
|
-
const positionAttribute = attributes.POSITION;
|
|
785
|
-
|
|
786
|
-
if (!positionAttribute) {
|
|
787
|
-
throw new Error('DRACO: No position attribute found.');
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
if (dracoGeometry instanceof this.draco.Mesh) {
|
|
791
|
-
switch (options.topology) {
|
|
792
|
-
case 'triangle-strip':
|
|
793
|
-
return {
|
|
794
|
-
topology: 'triangle-strip',
|
|
795
|
-
mode: 4,
|
|
796
|
-
attributes,
|
|
797
|
-
indices: {
|
|
798
|
-
value: this._getTriangleStripIndices(dracoGeometry),
|
|
799
|
-
size: 1
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
case 'triangle-list':
|
|
804
|
-
default:
|
|
805
|
-
return {
|
|
806
|
-
topology: 'triangle-list',
|
|
807
|
-
mode: 5,
|
|
808
|
-
attributes,
|
|
809
|
-
indices: {
|
|
810
|
-
value: this._getTriangleListIndices(dracoGeometry),
|
|
811
|
-
size: 1
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
return {
|
|
818
|
-
topology: 'point-list',
|
|
819
|
-
mode: 0,
|
|
820
|
-
attributes
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
_getMeshAttributes(loaderData, dracoGeometry, options) {
|
|
825
|
-
const attributes = {};
|
|
826
|
-
|
|
827
|
-
for (const loaderAttribute of Object.values(loaderData.attributes)) {
|
|
828
|
-
const attributeName = this._deduceAttributeName(loaderAttribute, options);
|
|
829
|
-
|
|
830
|
-
loaderAttribute.name = attributeName;
|
|
831
|
-
|
|
832
|
-
const {
|
|
833
|
-
value,
|
|
834
|
-
size
|
|
835
|
-
} = this._getAttributeValues(dracoGeometry, loaderAttribute);
|
|
836
|
-
|
|
837
|
-
attributes[attributeName] = {
|
|
838
|
-
value,
|
|
839
|
-
size,
|
|
840
|
-
byteOffset: loaderAttribute.byte_offset,
|
|
841
|
-
byteStride: loaderAttribute.byte_stride,
|
|
842
|
-
normalized: loaderAttribute.normalized
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
return attributes;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
_getTriangleListIndices(dracoGeometry) {
|
|
850
|
-
const numFaces = dracoGeometry.num_faces();
|
|
851
|
-
const numIndices = numFaces * 3;
|
|
852
|
-
const byteLength = numIndices * INDEX_ITEM_SIZE;
|
|
853
|
-
|
|
854
|
-
const ptr = this.draco._malloc(byteLength);
|
|
855
|
-
|
|
856
|
-
try {
|
|
857
|
-
this.decoder.GetTrianglesUInt32Array(dracoGeometry, byteLength, ptr);
|
|
858
|
-
return new Uint32Array(this.draco.HEAPF32.buffer, ptr, numIndices).slice();
|
|
859
|
-
} finally {
|
|
860
|
-
this.draco._free(ptr);
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
_getTriangleStripIndices(dracoGeometry) {
|
|
865
|
-
const dracoArray = new this.draco.DracoInt32Array();
|
|
866
|
-
|
|
867
|
-
try {
|
|
868
|
-
this.decoder.GetTriangleStripsFromMesh(dracoGeometry, dracoArray);
|
|
869
|
-
return getUint32Array(dracoArray);
|
|
870
|
-
} finally {
|
|
871
|
-
this.draco.destroy(dracoArray);
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
_getAttributeValues(dracoGeometry, attribute) {
|
|
876
|
-
const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
|
|
877
|
-
const numComponents = attribute.num_components;
|
|
878
|
-
const numPoints = dracoGeometry.num_points();
|
|
879
|
-
const numValues = numPoints * numComponents;
|
|
880
|
-
const byteLength = numValues * TypedArrayCtor.BYTES_PER_ELEMENT;
|
|
881
|
-
const dataType = getDracoDataType(this.draco, TypedArrayCtor);
|
|
882
|
-
let value;
|
|
883
|
-
|
|
884
|
-
const ptr = this.draco._malloc(byteLength);
|
|
885
|
-
|
|
886
|
-
try {
|
|
887
|
-
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attribute.attribute_index);
|
|
888
|
-
this.decoder.GetAttributeDataArrayForAllPoints(dracoGeometry, dracoAttribute, dataType, byteLength, ptr);
|
|
889
|
-
value = new TypedArrayCtor(this.draco.HEAPF32.buffer, ptr, numValues).slice();
|
|
890
|
-
} finally {
|
|
891
|
-
this.draco._free(ptr);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
return {
|
|
895
|
-
value,
|
|
896
|
-
size: numComponents
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
_deduceAttributeName(attribute, options) {
|
|
901
|
-
const uniqueId = attribute.unique_id;
|
|
902
|
-
|
|
903
|
-
for (const [attributeName, attributeUniqueId] of Object.entries(options.extraAttributes || {})) {
|
|
904
|
-
if (attributeUniqueId === uniqueId) {
|
|
905
|
-
return attributeName;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
const thisAttributeType = attribute.attribute_type;
|
|
910
|
-
|
|
911
|
-
for (const dracoAttributeConstant in DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP) {
|
|
912
|
-
const attributeType = this.draco[dracoAttributeConstant];
|
|
913
|
-
|
|
914
|
-
if (attributeType === thisAttributeType) {
|
|
915
|
-
return DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP[dracoAttributeConstant];
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const entryName = options.attributeNameEntry || 'name';
|
|
920
|
-
|
|
921
|
-
if (attribute.metadata[entryName]) {
|
|
922
|
-
return attribute.metadata[entryName].string;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
return "CUSTOM_ATTRIBUTE_".concat(uniqueId);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
_getTopLevelMetadata(dracoGeometry) {
|
|
929
|
-
const dracoMetadata = this.decoder.GetMetadata(dracoGeometry);
|
|
930
|
-
return this._getDracoMetadata(dracoMetadata);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
_getAttributeMetadata(dracoGeometry, attributeId) {
|
|
934
|
-
const dracoMetadata = this.decoder.GetAttributeMetadata(dracoGeometry, attributeId);
|
|
935
|
-
return this._getDracoMetadata(dracoMetadata);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
_getDracoMetadata(dracoMetadata) {
|
|
939
|
-
if (!dracoMetadata || !dracoMetadata.ptr) {
|
|
940
|
-
return {};
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
const result = {};
|
|
944
|
-
const numEntries = this.metadataQuerier.NumEntries(dracoMetadata);
|
|
945
|
-
|
|
946
|
-
for (let entryIndex = 0; entryIndex < numEntries; entryIndex++) {
|
|
947
|
-
const entryName = this.metadataQuerier.GetEntryName(dracoMetadata, entryIndex);
|
|
948
|
-
result[entryName] = this._getDracoMetadataField(dracoMetadata, entryName);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
return result;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
_getDracoMetadataField(dracoMetadata, entryName) {
|
|
955
|
-
const dracoArray = new this.draco.DracoInt32Array();
|
|
956
|
-
|
|
957
|
-
try {
|
|
958
|
-
this.metadataQuerier.GetIntEntryArray(dracoMetadata, entryName, dracoArray);
|
|
959
|
-
const intArray = getInt32Array(dracoArray);
|
|
960
|
-
return {
|
|
961
|
-
int: this.metadataQuerier.GetIntEntry(dracoMetadata, entryName),
|
|
962
|
-
string: this.metadataQuerier.GetStringEntry(dracoMetadata, entryName),
|
|
963
|
-
double: this.metadataQuerier.GetDoubleEntry(dracoMetadata, entryName),
|
|
964
|
-
intArray
|
|
965
|
-
};
|
|
966
|
-
} finally {
|
|
967
|
-
this.draco.destroy(dracoArray);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
_disableAttributeTransforms(options) {
|
|
972
|
-
const {
|
|
973
|
-
quantizedAttributes = [],
|
|
974
|
-
octahedronAttributes = []
|
|
975
|
-
} = options;
|
|
976
|
-
const skipAttributes = [...quantizedAttributes, ...octahedronAttributes];
|
|
977
|
-
|
|
978
|
-
for (const dracoAttributeName of skipAttributes) {
|
|
979
|
-
this.decoder.SkipAttributeTransform(this.draco[dracoAttributeName]);
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
_getQuantizationTransform(dracoAttribute, options) {
|
|
984
|
-
const {
|
|
985
|
-
quantizedAttributes = []
|
|
986
|
-
} = options;
|
|
987
|
-
const attribute_type = dracoAttribute.attribute_type();
|
|
988
|
-
const skip = quantizedAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
989
|
-
|
|
990
|
-
if (skip) {
|
|
991
|
-
const transform = new this.draco.AttributeQuantizationTransform();
|
|
992
|
-
|
|
993
|
-
try {
|
|
994
|
-
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
995
|
-
return {
|
|
996
|
-
quantization_bits: transform.quantization_bits(),
|
|
997
|
-
range: transform.range(),
|
|
998
|
-
min_values: new Float32Array([1, 2, 3]).map(i => transform.min_value(i))
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
1001
|
-
} finally {
|
|
1002
|
-
this.draco.destroy(transform);
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
return null;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
_getOctahedronTransform(dracoAttribute, options) {
|
|
1010
|
-
const {
|
|
1011
|
-
octahedronAttributes = []
|
|
1012
|
-
} = options;
|
|
1013
|
-
const attribute_type = dracoAttribute.attribute_type();
|
|
1014
|
-
const octahedron = octahedronAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
1015
|
-
|
|
1016
|
-
if (octahedron) {
|
|
1017
|
-
const transform = new this.draco.AttributeQuantizationTransform();
|
|
1018
|
-
|
|
1019
|
-
try {
|
|
1020
|
-
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
1021
|
-
return {
|
|
1022
|
-
quantization_bits: transform.quantization_bits()
|
|
1023
|
-
};
|
|
1024
|
-
}
|
|
1025
|
-
} finally {
|
|
1026
|
-
this.draco.destroy(transform);
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
return null;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
function getDracoDataType(draco, attributeType) {
|
|
1036
|
-
switch (attributeType) {
|
|
1037
|
-
case Float32Array:
|
|
1038
|
-
return draco.DT_FLOAT32;
|
|
1039
|
-
|
|
1040
|
-
case Int8Array:
|
|
1041
|
-
return draco.DT_INT8;
|
|
1042
|
-
|
|
1043
|
-
case Int16Array:
|
|
1044
|
-
return draco.DT_INT16;
|
|
1045
|
-
|
|
1046
|
-
case Int32Array:
|
|
1047
|
-
return draco.DT_INT32;
|
|
1048
|
-
|
|
1049
|
-
case Uint8Array:
|
|
1050
|
-
return draco.DT_UINT8;
|
|
1051
|
-
|
|
1052
|
-
case Uint16Array:
|
|
1053
|
-
return draco.DT_UINT16;
|
|
1054
|
-
|
|
1055
|
-
case Uint32Array:
|
|
1056
|
-
return draco.DT_UINT32;
|
|
1057
|
-
|
|
1058
|
-
default:
|
|
1059
|
-
return draco.DT_INVALID;
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
function getInt32Array(dracoArray) {
|
|
1064
|
-
const numValues = dracoArray.size();
|
|
1065
|
-
const intArray = new Int32Array(numValues);
|
|
1066
|
-
|
|
1067
|
-
for (let i = 0; i < numValues; i++) {
|
|
1068
|
-
intArray[i] = dracoArray.GetValue(i);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
return intArray;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
function getUint32Array(dracoArray) {
|
|
1075
|
-
const numValues = dracoArray.size();
|
|
1076
|
-
const intArray = new Int32Array(numValues);
|
|
1077
|
-
|
|
1078
|
-
for (let i = 0; i < numValues; i++) {
|
|
1079
|
-
intArray[i] = dracoArray.GetValue(i);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
return intArray;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
/***/ }),
|
|
1087
|
-
|
|
1088
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js":
|
|
1089
|
-
/*!**************************************************************************************************************************************************!*\
|
|
1090
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js ***!
|
|
1091
|
-
\**************************************************************************************************************************************************/
|
|
1092
|
-
/*! exports provided: getDracoSchema */
|
|
1093
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1094
|
-
|
|
1095
|
-
"use strict";
|
|
1096
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1097
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDracoSchema", function() { return getDracoSchema; });
|
|
1098
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/index.js");
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
function getDracoSchema(attributes, loaderData, indices) {
|
|
1102
|
-
const metadataMap = makeMetadata(loaderData.metadata);
|
|
1103
|
-
const fields = [];
|
|
1104
|
-
const namedLoaderDataAttributes = transformAttributesLoaderData(loaderData.attributes);
|
|
1105
|
-
|
|
1106
|
-
for (const attributeName in attributes) {
|
|
1107
|
-
const attribute = attributes[attributeName];
|
|
1108
|
-
const field = getArrowFieldFromAttribute(attributeName, attribute, namedLoaderDataAttributes[attributeName]);
|
|
1109
|
-
fields.push(field);
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
if (indices) {
|
|
1113
|
-
const indicesField = getArrowFieldFromAttribute('indices', indices);
|
|
1114
|
-
fields.push(indicesField);
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
return new _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__["Schema"](fields, metadataMap);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
function transformAttributesLoaderData(loaderData) {
|
|
1121
|
-
const result = {};
|
|
1122
|
-
|
|
1123
|
-
for (const key in loaderData) {
|
|
1124
|
-
const dracoAttribute = loaderData[key];
|
|
1125
|
-
result[dracoAttribute.name || 'undefined'] = dracoAttribute;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
return result;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
function getArrowFieldFromAttribute(attributeName, attribute, loaderData) {
|
|
1132
|
-
const metadataMap = loaderData ? makeMetadata(loaderData.metadata) : undefined;
|
|
1133
|
-
const field = Object(_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__["deduceMeshField"])(attributeName, attribute, metadataMap);
|
|
1134
|
-
return field;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
function makeMetadata(metadata) {
|
|
1138
|
-
const metadataMap = new Map();
|
|
1139
|
-
|
|
1140
|
-
for (const key in metadata) {
|
|
1141
|
-
metadataMap.set("".concat(key, ".string"), JSON.stringify(metadata[key]));
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
return metadataMap;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
/***/ }),
|
|
1149
|
-
|
|
1150
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js":
|
|
1151
|
-
/*!*****************************************************************************************************************************************!*\
|
|
1152
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.5/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js ***!
|
|
1153
|
-
\*****************************************************************************************************************************************/
|
|
1154
|
-
/*! exports provided: VERSION */
|
|
1155
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1156
|
-
|
|
1157
|
-
"use strict";
|
|
1158
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1159
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
1160
|
-
const VERSION = true ? "3.2.5" : undefined;
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
/***/ }),
|
|
1164
|
-
|
|
1165
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js":
|
|
1166
|
-
/*!**********************************************************************************************************************************************************!*\
|
|
1167
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js ***!
|
|
1168
|
-
\**********************************************************************************************************************************************************/
|
|
1169
|
-
/*! exports provided: deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata */
|
|
1170
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1171
|
-
|
|
1172
|
-
"use strict";
|
|
1173
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1174
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deduceMeshSchema", function() { return deduceMeshSchema; });
|
|
1175
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deduceMeshField", function() { return deduceMeshField; });
|
|
1176
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeMeshAttributeMetadata", function() { return makeMeshAttributeMetadata; });
|
|
1177
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js");
|
|
1178
|
-
/* 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.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js");
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
function deduceMeshSchema(attributes, metadata) {
|
|
1182
|
-
const fields = deduceMeshFields(attributes);
|
|
1183
|
-
return new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["Schema"](fields, metadata);
|
|
1184
|
-
}
|
|
1185
|
-
function deduceMeshField(attributeName, attribute, optionalMetadata) {
|
|
1186
|
-
const type = Object(_lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__["getArrowTypeFromTypedArray"])(attribute.value);
|
|
1187
|
-
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
1188
|
-
const field = new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["Field"](attributeName, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["FixedSizeList"](attribute.size, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["Field"]('value', type)), false, metadata);
|
|
1189
|
-
return field;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
function deduceMeshFields(attributes) {
|
|
1193
|
-
const fields = [];
|
|
1194
|
-
|
|
1195
|
-
for (const attributeName in attributes) {
|
|
1196
|
-
const attribute = attributes[attributeName];
|
|
1197
|
-
fields.push(deduceMeshField(attributeName, attribute));
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
return fields;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
function makeMeshAttributeMetadata(attribute) {
|
|
1204
|
-
const result = new Map();
|
|
1205
|
-
|
|
1206
|
-
if ('byteOffset' in attribute) {
|
|
1207
|
-
result.set('byteOffset', attribute.byteOffset.toString(10));
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
if ('byteStride' in attribute) {
|
|
1211
|
-
result.set('byteStride', attribute.byteStride.toString(10));
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
if ('normalized' in attribute) {
|
|
1215
|
-
result.set('normalized', attribute.normalized.toString());
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
return result;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
/***/ }),
|
|
1223
|
-
|
|
1224
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js":
|
|
1225
|
-
/*!**************************************************************************************************************************************************!*\
|
|
1226
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js ***!
|
|
1227
|
-
\**************************************************************************************************************************************************/
|
|
1228
|
-
/*! exports provided: getMeshSize, getMeshBoundingBox */
|
|
1229
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1230
|
-
|
|
1231
|
-
"use strict";
|
|
1232
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1233
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMeshSize", function() { return getMeshSize; });
|
|
1234
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMeshBoundingBox", function() { return getMeshBoundingBox; });
|
|
1235
|
-
function getMeshSize(attributes) {
|
|
1236
|
-
let size = 0;
|
|
1237
|
-
|
|
1238
|
-
for (const attributeName in attributes) {
|
|
1239
|
-
const attribute = attributes[attributeName];
|
|
1240
|
-
|
|
1241
|
-
if (ArrayBuffer.isView(attribute)) {
|
|
1242
|
-
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
return size;
|
|
1247
|
-
}
|
|
1248
|
-
function getMeshBoundingBox(attributes) {
|
|
1249
|
-
let minX = Infinity;
|
|
1250
|
-
let minY = Infinity;
|
|
1251
|
-
let minZ = Infinity;
|
|
1252
|
-
let maxX = -Infinity;
|
|
1253
|
-
let maxY = -Infinity;
|
|
1254
|
-
let maxZ = -Infinity;
|
|
1255
|
-
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
1256
|
-
const len = positions && positions.length;
|
|
1257
|
-
|
|
1258
|
-
for (let i = 0; i < len; i += 3) {
|
|
1259
|
-
const x = positions[i];
|
|
1260
|
-
const y = positions[i + 1];
|
|
1261
|
-
const z = positions[i + 2];
|
|
1262
|
-
minX = x < minX ? x : minX;
|
|
1263
|
-
minY = y < minY ? y : minY;
|
|
1264
|
-
minZ = z < minZ ? z : minZ;
|
|
1265
|
-
maxX = x > maxX ? x : maxX;
|
|
1266
|
-
maxY = y > maxY ? y : maxY;
|
|
1267
|
-
maxZ = z > maxZ ? z : maxZ;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
return [[minX, minY, minZ], [maxX, maxY, maxZ]];
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
/***/ }),
|
|
1275
|
-
|
|
1276
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/index.js":
|
|
1277
|
-
/*!*******************************************************************************************************************************!*\
|
|
1278
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/index.js ***!
|
|
1279
|
-
\*******************************************************************************************************************************/
|
|
1280
|
-
/*! exports provided: TableBatchBuilder, RowTableBatchAggregator, ColumnarTableBatchAggregator, convertToObjectRow, convertToArrayRow, getMeshSize, getMeshBoundingBox, deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata, Schema, Field, DataType, Null, Binary, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct, deduceTypeFromColumn, deduceTypeFromValue, getTypeInfo, getArrowTypeFromTypedArray, AsyncQueue */
|
|
1281
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1282
|
-
|
|
1283
|
-
"use strict";
|
|
1284
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1285
|
-
/* harmony import */ var _lib_batches_table_batch_builder__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/batches/table-batch-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/table-batch-builder.js");
|
|
1286
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableBatchBuilder", function() { return _lib_batches_table_batch_builder__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
1287
|
-
|
|
1288
|
-
/* harmony import */ var _lib_batches_row_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/batches/row-table-batch-aggregator */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/row-table-batch-aggregator.js");
|
|
1289
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RowTableBatchAggregator", function() { return _lib_batches_row_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
1290
|
-
|
|
1291
|
-
/* harmony import */ var _lib_batches_columnar_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/batches/columnar-table-batch-aggregator */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/columnar-table-batch-aggregator.js");
|
|
1292
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColumnarTableBatchAggregator", function() { return _lib_batches_columnar_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
1293
|
-
|
|
1294
|
-
/* harmony import */ var _lib_utils_row_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/utils/row-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/row-utils.js");
|
|
1295
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToObjectRow", function() { return _lib_utils_row_utils__WEBPACK_IMPORTED_MODULE_3__["convertToObjectRow"]; });
|
|
1296
|
-
|
|
1297
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToArrayRow", function() { return _lib_utils_row_utils__WEBPACK_IMPORTED_MODULE_3__["convertToArrayRow"]; });
|
|
1298
|
-
|
|
1299
|
-
/* harmony import */ var _category_mesh_mesh_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./category/mesh/mesh-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js");
|
|
1300
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMeshSize", function() { return _category_mesh_mesh_utils__WEBPACK_IMPORTED_MODULE_4__["getMeshSize"]; });
|
|
1301
|
-
|
|
1302
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMeshBoundingBox", function() { return _category_mesh_mesh_utils__WEBPACK_IMPORTED_MODULE_4__["getMeshBoundingBox"]; });
|
|
1303
|
-
|
|
1304
|
-
/* harmony import */ var _category_mesh_deduce_mesh_schema__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./category/mesh/deduce-mesh-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js");
|
|
1305
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deduceMeshSchema", function() { return _category_mesh_deduce_mesh_schema__WEBPACK_IMPORTED_MODULE_5__["deduceMeshSchema"]; });
|
|
1306
|
-
|
|
1307
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deduceMeshField", function() { return _category_mesh_deduce_mesh_schema__WEBPACK_IMPORTED_MODULE_5__["deduceMeshField"]; });
|
|
1308
|
-
|
|
1309
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeMeshAttributeMetadata", function() { return _category_mesh_deduce_mesh_schema__WEBPACK_IMPORTED_MODULE_5__["makeMeshAttributeMetadata"]; });
|
|
1310
|
-
|
|
1311
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js");
|
|
1312
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Schema", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Schema"]; });
|
|
1313
|
-
|
|
1314
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Field"]; });
|
|
1315
|
-
|
|
1316
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataType", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["DataType"]; });
|
|
1317
|
-
|
|
1318
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Null", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Null"]; });
|
|
1319
|
-
|
|
1320
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Binary", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Binary"]; });
|
|
1321
|
-
|
|
1322
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bool", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Bool"]; });
|
|
1323
|
-
|
|
1324
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Int"]; });
|
|
1325
|
-
|
|
1326
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int8", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Int8"]; });
|
|
1327
|
-
|
|
1328
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int16", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Int16"]; });
|
|
1329
|
-
|
|
1330
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int32", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Int32"]; });
|
|
1331
|
-
|
|
1332
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int64", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Int64"]; });
|
|
1333
|
-
|
|
1334
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint8", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Uint8"]; });
|
|
1335
|
-
|
|
1336
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint16", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Uint16"]; });
|
|
1337
|
-
|
|
1338
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint32", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Uint32"]; });
|
|
1339
|
-
|
|
1340
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint64", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Uint64"]; });
|
|
1341
|
-
|
|
1342
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Float"]; });
|
|
1343
|
-
|
|
1344
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float16", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Float16"]; });
|
|
1345
|
-
|
|
1346
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float32", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Float32"]; });
|
|
1347
|
-
|
|
1348
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float64", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Float64"]; });
|
|
1349
|
-
|
|
1350
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Utf8", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Utf8"]; });
|
|
1351
|
-
|
|
1352
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Date", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Date"]; });
|
|
1353
|
-
|
|
1354
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateDay", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["DateDay"]; });
|
|
1355
|
-
|
|
1356
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateMillisecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["DateMillisecond"]; });
|
|
1357
|
-
|
|
1358
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Time", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Time"]; });
|
|
1359
|
-
|
|
1360
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeMillisecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimeMillisecond"]; });
|
|
1361
|
-
|
|
1362
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeSecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimeSecond"]; });
|
|
1363
|
-
|
|
1364
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Timestamp"]; });
|
|
1365
|
-
|
|
1366
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampSecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimestampSecond"]; });
|
|
1367
|
-
|
|
1368
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampMillisecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimestampMillisecond"]; });
|
|
1369
|
-
|
|
1370
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampMicrosecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimestampMicrosecond"]; });
|
|
1371
|
-
|
|
1372
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampNanosecond", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["TimestampNanosecond"]; });
|
|
1373
|
-
|
|
1374
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Interval", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Interval"]; });
|
|
1375
|
-
|
|
1376
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntervalDayTime", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["IntervalDayTime"]; });
|
|
1377
|
-
|
|
1378
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntervalYearMonth", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["IntervalYearMonth"]; });
|
|
1379
|
-
|
|
1380
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FixedSizeList", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["FixedSizeList"]; });
|
|
1381
|
-
|
|
1382
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Struct", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_6__["Struct"]; });
|
|
1383
|
-
|
|
1384
|
-
/* harmony import */ var _lib_schema_utils_deduce_column_type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lib/schema-utils/deduce-column-type */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema-utils/deduce-column-type.js");
|
|
1385
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deduceTypeFromColumn", function() { return _lib_schema_utils_deduce_column_type__WEBPACK_IMPORTED_MODULE_7__["deduceTypeFromColumn"]; });
|
|
1386
|
-
|
|
1387
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deduceTypeFromValue", function() { return _lib_schema_utils_deduce_column_type__WEBPACK_IMPORTED_MODULE_7__["deduceTypeFromValue"]; });
|
|
1388
|
-
|
|
1389
|
-
/* harmony import */ var _lib_arrow_get_type_info__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lib/arrow/get-type-info */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/get-type-info.js");
|
|
1390
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTypeInfo", function() { return _lib_arrow_get_type_info__WEBPACK_IMPORTED_MODULE_8__["getTypeInfo"]; });
|
|
1391
|
-
|
|
1392
|
-
/* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js");
|
|
1393
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getArrowTypeFromTypedArray", function() { return _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_9__["getArrowTypeFromTypedArray"]; });
|
|
1394
|
-
|
|
1395
|
-
/* harmony import */ var _lib_utils_async_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lib/utils/async-queue */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/async-queue.js");
|
|
1396
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncQueue", function() { return _lib_utils_async_queue__WEBPACK_IMPORTED_MODULE_10__["default"]; });
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
/***/ }),
|
|
1412
|
-
|
|
1413
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js":
|
|
1414
|
-
/*!*********************************************************************************************************************************************************!*\
|
|
1415
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js ***!
|
|
1416
|
-
\*********************************************************************************************************************************************************/
|
|
1417
|
-
/*! exports provided: getArrowTypeFromTypedArray */
|
|
1418
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1419
|
-
|
|
1420
|
-
"use strict";
|
|
1421
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1422
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getArrowTypeFromTypedArray", function() { return getArrowTypeFromTypedArray; });
|
|
1423
|
-
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js");
|
|
1424
|
-
|
|
1425
|
-
function getArrowTypeFromTypedArray(array) {
|
|
1426
|
-
switch (array.constructor) {
|
|
1427
|
-
case Int8Array:
|
|
1428
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Int8"]();
|
|
1429
|
-
|
|
1430
|
-
case Uint8Array:
|
|
1431
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Uint8"]();
|
|
1432
|
-
|
|
1433
|
-
case Int16Array:
|
|
1434
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Int16"]();
|
|
1435
|
-
|
|
1436
|
-
case Uint16Array:
|
|
1437
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Uint16"]();
|
|
1438
|
-
|
|
1439
|
-
case Int32Array:
|
|
1440
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Int32"]();
|
|
1441
|
-
|
|
1442
|
-
case Uint32Array:
|
|
1443
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Uint32"]();
|
|
1444
|
-
|
|
1445
|
-
case Float32Array:
|
|
1446
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Float32"]();
|
|
1447
|
-
|
|
1448
|
-
case Float64Array:
|
|
1449
|
-
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Float64"]();
|
|
1450
|
-
|
|
1451
|
-
default:
|
|
1452
|
-
throw new Error('array type not supported');
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
/***/ }),
|
|
1458
|
-
|
|
1459
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/get-type-info.js":
|
|
1460
|
-
/*!*************************************************************************************************************************************************!*\
|
|
1461
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/get-type-info.js ***!
|
|
1462
|
-
\*************************************************************************************************************************************************/
|
|
1463
|
-
/*! exports provided: getTypeInfo */
|
|
1464
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1465
|
-
|
|
1466
|
-
"use strict";
|
|
1467
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1468
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTypeInfo", function() { return getTypeInfo; });
|
|
1469
|
-
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js");
|
|
1470
|
-
|
|
1471
|
-
function getTypeInfo(arrowTypeLike) {
|
|
1472
|
-
return {
|
|
1473
|
-
typeId: arrowTypeLike.typeId,
|
|
1474
|
-
ArrayType: arrowTypeLike.ArrayType,
|
|
1475
|
-
typeName: arrowTypeLike.toString(),
|
|
1476
|
-
typeEnumName: getTypeKey(arrowTypeLike.typeId),
|
|
1477
|
-
precision: arrowTypeLike.precision
|
|
1478
|
-
};
|
|
1479
|
-
}
|
|
1480
|
-
let ReverseType = null;
|
|
1481
|
-
|
|
1482
|
-
function getTypeKey(typeKey) {
|
|
1483
|
-
if (!ReverseType) {
|
|
1484
|
-
ReverseType = {};
|
|
1485
|
-
|
|
1486
|
-
for (const key in _schema_schema__WEBPACK_IMPORTED_MODULE_0__["Type"]) {
|
|
1487
|
-
ReverseType[_schema_schema__WEBPACK_IMPORTED_MODULE_0__["Type"][key]] = key;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
return ReverseType[typeKey];
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
/***/ }),
|
|
1496
|
-
|
|
1497
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/base-table-batch-aggregator.js":
|
|
1498
|
-
/*!*****************************************************************************************************************************************************************!*\
|
|
1499
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/base-table-batch-aggregator.js ***!
|
|
1500
|
-
\*****************************************************************************************************************************************************************/
|
|
1501
|
-
/*! exports provided: default */
|
|
1502
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1503
|
-
|
|
1504
|
-
"use strict";
|
|
1505
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1506
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return RowTableBatchAggregator; });
|
|
1507
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1508
|
-
|
|
1509
|
-
const DEFAULT_ROW_COUNT = 100;
|
|
1510
|
-
class RowTableBatchAggregator {
|
|
1511
|
-
constructor(schema, options) {
|
|
1512
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "schema", void 0);
|
|
1513
|
-
|
|
1514
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "options", void 0);
|
|
1515
|
-
|
|
1516
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "length", 0);
|
|
1517
|
-
|
|
1518
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "rows", null);
|
|
1519
|
-
|
|
1520
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "cursor", 0);
|
|
1521
|
-
|
|
1522
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_headers", []);
|
|
1523
|
-
|
|
1524
|
-
this.options = options;
|
|
1525
|
-
this.schema = schema;
|
|
1526
|
-
|
|
1527
|
-
if (!Array.isArray(schema)) {
|
|
1528
|
-
this._headers = [];
|
|
1529
|
-
|
|
1530
|
-
for (const key in schema) {
|
|
1531
|
-
this._headers[schema[key].index] = schema[key].name;
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
rowCount() {
|
|
1537
|
-
return this.length;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
addArrayRow(row, cursor) {
|
|
1541
|
-
if (Number.isFinite(cursor)) {
|
|
1542
|
-
this.cursor = cursor;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
1546
|
-
this.rows[this.length] = row;
|
|
1547
|
-
this.length++;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
addObjectRow(row, cursor) {
|
|
1551
|
-
if (Number.isFinite(cursor)) {
|
|
1552
|
-
this.cursor = cursor;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
1556
|
-
this.rows[this.length] = row;
|
|
1557
|
-
this.length++;
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
getBatch() {
|
|
1561
|
-
let rows = this.rows;
|
|
1562
|
-
|
|
1563
|
-
if (!rows) {
|
|
1564
|
-
return null;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
rows = rows.slice(0, this.length);
|
|
1568
|
-
this.rows = null;
|
|
1569
|
-
const batch = {
|
|
1570
|
-
shape: this.options.shape,
|
|
1571
|
-
batchType: 'data',
|
|
1572
|
-
data: rows,
|
|
1573
|
-
length: this.length,
|
|
1574
|
-
schema: this.schema,
|
|
1575
|
-
cursor: this.cursor
|
|
1576
|
-
};
|
|
1577
|
-
return batch;
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
/***/ }),
|
|
1584
|
-
|
|
1585
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/columnar-table-batch-aggregator.js":
|
|
1586
|
-
/*!*********************************************************************************************************************************************************************!*\
|
|
1587
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/columnar-table-batch-aggregator.js ***!
|
|
1588
|
-
\*********************************************************************************************************************************************************************/
|
|
1589
|
-
/*! exports provided: default */
|
|
1590
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1591
|
-
|
|
1592
|
-
"use strict";
|
|
1593
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1594
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ColumnarTableBatchAggregator; });
|
|
1595
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1596
|
-
|
|
1597
|
-
const DEFAULT_ROW_COUNT = 100;
|
|
1598
|
-
class ColumnarTableBatchAggregator {
|
|
1599
|
-
constructor(schema, options) {
|
|
1600
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "schema", void 0);
|
|
1601
|
-
|
|
1602
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "length", 0);
|
|
1603
|
-
|
|
1604
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "allocated", 0);
|
|
1605
|
-
|
|
1606
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "columns", {});
|
|
1607
|
-
|
|
1608
|
-
this.schema = schema;
|
|
1609
|
-
|
|
1610
|
-
this._reallocateColumns();
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
rowCount() {
|
|
1614
|
-
return this.length;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
addArrayRow(row) {
|
|
1618
|
-
this._reallocateColumns();
|
|
1619
|
-
|
|
1620
|
-
let i = 0;
|
|
1621
|
-
|
|
1622
|
-
for (const fieldName in this.columns) {
|
|
1623
|
-
this.columns[fieldName][this.length] = row[i++];
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
this.length++;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
addObjectRow(row) {
|
|
1630
|
-
this._reallocateColumns();
|
|
1631
|
-
|
|
1632
|
-
for (const fieldName in row) {
|
|
1633
|
-
this.columns[fieldName][this.length] = row[fieldName];
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
this.length++;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
getBatch() {
|
|
1640
|
-
this._pruneColumns();
|
|
1641
|
-
|
|
1642
|
-
const columns = Array.isArray(this.schema) ? this.columns : {};
|
|
1643
|
-
|
|
1644
|
-
if (!Array.isArray(this.schema)) {
|
|
1645
|
-
for (const fieldName in this.schema) {
|
|
1646
|
-
const field = this.schema[fieldName];
|
|
1647
|
-
columns[field.name] = this.columns[field.index];
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
this.columns = {};
|
|
1652
|
-
const batch = {
|
|
1653
|
-
shape: 'columnar-table',
|
|
1654
|
-
batchType: 'data',
|
|
1655
|
-
data: columns,
|
|
1656
|
-
schema: this.schema,
|
|
1657
|
-
length: this.length
|
|
1658
|
-
};
|
|
1659
|
-
return batch;
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
_reallocateColumns() {
|
|
1663
|
-
if (this.length < this.allocated) {
|
|
1664
|
-
return;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
this.allocated = this.allocated > 0 ? this.allocated *= 2 : DEFAULT_ROW_COUNT;
|
|
1668
|
-
this.columns = {};
|
|
1669
|
-
|
|
1670
|
-
for (const fieldName in this.schema) {
|
|
1671
|
-
const field = this.schema[fieldName];
|
|
1672
|
-
const ArrayType = field.type || Float32Array;
|
|
1673
|
-
const oldColumn = this.columns[field.index];
|
|
1674
|
-
|
|
1675
|
-
if (oldColumn && ArrayBuffer.isView(oldColumn)) {
|
|
1676
|
-
const typedArray = new ArrayType(this.allocated);
|
|
1677
|
-
typedArray.set(oldColumn);
|
|
1678
|
-
this.columns[field.index] = typedArray;
|
|
1679
|
-
} else if (oldColumn) {
|
|
1680
|
-
oldColumn.length = this.allocated;
|
|
1681
|
-
this.columns[field.index] = oldColumn;
|
|
1682
|
-
} else {
|
|
1683
|
-
this.columns[field.index] = new ArrayType(this.allocated);
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
_pruneColumns() {
|
|
1689
|
-
for (const [columnName, column] of Object.entries(this.columns)) {
|
|
1690
|
-
this.columns[columnName] = column.slice(0, this.length);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
/***/ }),
|
|
1698
|
-
|
|
1699
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/row-table-batch-aggregator.js":
|
|
1700
|
-
/*!****************************************************************************************************************************************************************!*\
|
|
1701
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/row-table-batch-aggregator.js ***!
|
|
1702
|
-
\****************************************************************************************************************************************************************/
|
|
1703
|
-
/*! exports provided: default */
|
|
1704
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1705
|
-
|
|
1706
|
-
"use strict";
|
|
1707
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1708
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return RowTableBatchAggregator; });
|
|
1709
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1710
|
-
/* harmony import */ var _utils_row_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/row-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/row-utils.js");
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
const DEFAULT_ROW_COUNT = 100;
|
|
1714
|
-
class RowTableBatchAggregator {
|
|
1715
|
-
constructor(schema, options) {
|
|
1716
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "schema", void 0);
|
|
1717
|
-
|
|
1718
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "options", void 0);
|
|
1719
|
-
|
|
1720
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "length", 0);
|
|
1721
|
-
|
|
1722
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "objectRows", null);
|
|
1723
|
-
|
|
1724
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "arrayRows", null);
|
|
1725
|
-
|
|
1726
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "cursor", 0);
|
|
1727
|
-
|
|
1728
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_headers", []);
|
|
1729
|
-
|
|
1730
|
-
this.options = options;
|
|
1731
|
-
this.schema = schema;
|
|
1732
|
-
|
|
1733
|
-
if (!Array.isArray(schema)) {
|
|
1734
|
-
this._headers = [];
|
|
1735
|
-
|
|
1736
|
-
for (const key in schema) {
|
|
1737
|
-
this._headers[schema[key].index] = schema[key].name;
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
rowCount() {
|
|
1743
|
-
return this.length;
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
addArrayRow(row, cursor) {
|
|
1747
|
-
if (Number.isFinite(cursor)) {
|
|
1748
|
-
this.cursor = cursor;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
switch (this.options.shape) {
|
|
1752
|
-
case 'object-row-table':
|
|
1753
|
-
const rowObject = Object(_utils_row_utils__WEBPACK_IMPORTED_MODULE_1__["convertToObjectRow"])(row, this._headers);
|
|
1754
|
-
this.addObjectRow(rowObject, cursor);
|
|
1755
|
-
break;
|
|
1756
|
-
|
|
1757
|
-
case 'array-row-table':
|
|
1758
|
-
this.arrayRows = this.arrayRows || new Array(DEFAULT_ROW_COUNT);
|
|
1759
|
-
this.arrayRows[this.length] = row;
|
|
1760
|
-
this.length++;
|
|
1761
|
-
break;
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
addObjectRow(row, cursor) {
|
|
1766
|
-
if (Number.isFinite(cursor)) {
|
|
1767
|
-
this.cursor = cursor;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
switch (this.options.shape) {
|
|
1771
|
-
case 'array-row-table':
|
|
1772
|
-
const rowArray = Object(_utils_row_utils__WEBPACK_IMPORTED_MODULE_1__["convertToArrayRow"])(row, this._headers);
|
|
1773
|
-
this.addArrayRow(rowArray, cursor);
|
|
1774
|
-
break;
|
|
1775
|
-
|
|
1776
|
-
case 'object-row-table':
|
|
1777
|
-
this.objectRows = this.objectRows || new Array(DEFAULT_ROW_COUNT);
|
|
1778
|
-
this.objectRows[this.length] = row;
|
|
1779
|
-
this.length++;
|
|
1780
|
-
break;
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
getBatch() {
|
|
1785
|
-
let rows = this.arrayRows || this.objectRows;
|
|
1786
|
-
|
|
1787
|
-
if (!rows) {
|
|
1788
|
-
return null;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
rows = rows.slice(0, this.length);
|
|
1792
|
-
this.arrayRows = null;
|
|
1793
|
-
this.objectRows = null;
|
|
1794
|
-
return {
|
|
1795
|
-
shape: this.options.shape,
|
|
1796
|
-
batchType: 'data',
|
|
1797
|
-
data: rows,
|
|
1798
|
-
length: this.length,
|
|
1799
|
-
schema: this.schema,
|
|
1800
|
-
cursor: this.cursor
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
/***/ }),
|
|
1808
|
-
|
|
1809
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/table-batch-builder.js":
|
|
1810
|
-
/*!*********************************************************************************************************************************************************!*\
|
|
1811
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/table-batch-builder.js ***!
|
|
1812
|
-
\*********************************************************************************************************************************************************/
|
|
1813
|
-
/*! exports provided: default */
|
|
1814
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1815
|
-
|
|
1816
|
-
"use strict";
|
|
1817
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1818
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TableBatchBuilder; });
|
|
1819
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1820
|
-
/* harmony import */ var _base_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base-table-batch-aggregator */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/base-table-batch-aggregator.js");
|
|
1821
|
-
/* harmony import */ var _row_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./row-table-batch-aggregator */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/row-table-batch-aggregator.js");
|
|
1822
|
-
/* harmony import */ var _columnar_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./columnar-table-batch-aggregator */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/batches/columnar-table-batch-aggregator.js");
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
const DEFAULT_OPTIONS = {
|
|
1828
|
-
shape: 'array-row-table',
|
|
1829
|
-
batchSize: 'auto',
|
|
1830
|
-
batchDebounceMs: 0,
|
|
1831
|
-
limit: 0,
|
|
1832
|
-
_limitMB: 0
|
|
1833
|
-
};
|
|
1834
|
-
const ERR_MESSAGE = 'TableBatchBuilder';
|
|
1835
|
-
class TableBatchBuilder {
|
|
1836
|
-
constructor(schema, options) {
|
|
1837
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "schema", void 0);
|
|
1838
|
-
|
|
1839
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "options", void 0);
|
|
1840
|
-
|
|
1841
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "aggregator", null);
|
|
1842
|
-
|
|
1843
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "batchCount", 0);
|
|
1844
|
-
|
|
1845
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bytesUsed", 0);
|
|
1846
|
-
|
|
1847
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isChunkComplete", false);
|
|
1848
|
-
|
|
1849
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastBatchEmittedMs", Date.now());
|
|
1850
|
-
|
|
1851
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "totalLength", 0);
|
|
1852
|
-
|
|
1853
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "totalBytes", 0);
|
|
1854
|
-
|
|
1855
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "rowBytes", 0);
|
|
1856
|
-
|
|
1857
|
-
this.schema = schema;
|
|
1858
|
-
this.options = { ...DEFAULT_OPTIONS,
|
|
1859
|
-
...options
|
|
1860
|
-
};
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
limitReached() {
|
|
1864
|
-
var _this$options, _this$options2;
|
|
1865
|
-
|
|
1866
|
-
if (Boolean((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.limit) && this.totalLength >= this.options.limit) {
|
|
1867
|
-
return true;
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
if (Boolean((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2._limitMB) && this.totalBytes / 1e6 >= this.options._limitMB) {
|
|
1871
|
-
return true;
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
return false;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
addRow(row) {
|
|
1878
|
-
if (this.limitReached()) {
|
|
1879
|
-
return;
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
this.totalLength++;
|
|
1883
|
-
this.rowBytes = this.rowBytes || this._estimateRowMB(row);
|
|
1884
|
-
this.totalBytes += this.rowBytes;
|
|
1885
|
-
|
|
1886
|
-
if (Array.isArray(row)) {
|
|
1887
|
-
this.addArrayRow(row);
|
|
1888
|
-
} else {
|
|
1889
|
-
this.addObjectRow(row);
|
|
1890
|
-
}
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
addArrayRow(row) {
|
|
1894
|
-
if (!this.aggregator) {
|
|
1895
|
-
const TableBatchType = this._getTableBatchType();
|
|
1896
|
-
|
|
1897
|
-
this.aggregator = new TableBatchType(this.schema, this.options);
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
this.aggregator.addArrayRow(row);
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
addObjectRow(row) {
|
|
1904
|
-
if (!this.aggregator) {
|
|
1905
|
-
const TableBatchType = this._getTableBatchType();
|
|
1906
|
-
|
|
1907
|
-
this.aggregator = new TableBatchType(this.schema, this.options);
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
this.aggregator.addObjectRow(row);
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
chunkComplete(chunk) {
|
|
1914
|
-
if (chunk instanceof ArrayBuffer) {
|
|
1915
|
-
this.bytesUsed += chunk.byteLength;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
if (typeof chunk === 'string') {
|
|
1919
|
-
this.bytesUsed += chunk.length;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
this.isChunkComplete = true;
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
getFullBatch(options) {
|
|
1926
|
-
return this._isFull() ? this._getBatch(options) : null;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
getFinalBatch(options) {
|
|
1930
|
-
return this._getBatch(options);
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
_estimateRowMB(row) {
|
|
1934
|
-
return Array.isArray(row) ? row.length * 8 : Object.keys(row).length * 8;
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
_isFull() {
|
|
1938
|
-
if (!this.aggregator || this.aggregator.rowCount() === 0) {
|
|
1939
|
-
return false;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
if (this.options.batchSize === 'auto') {
|
|
1943
|
-
if (!this.isChunkComplete) {
|
|
1944
|
-
return false;
|
|
1945
|
-
}
|
|
1946
|
-
} else if (this.options.batchSize > this.aggregator.rowCount()) {
|
|
1947
|
-
return false;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
if (this.options.batchDebounceMs > Date.now() - this.lastBatchEmittedMs) {
|
|
1951
|
-
return false;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
this.isChunkComplete = false;
|
|
1955
|
-
this.lastBatchEmittedMs = Date.now();
|
|
1956
|
-
return true;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
_getBatch(options) {
|
|
1960
|
-
if (!this.aggregator) {
|
|
1961
|
-
return null;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
if (options !== null && options !== void 0 && options.bytesUsed) {
|
|
1965
|
-
this.bytesUsed = options.bytesUsed;
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
const normalizedBatch = this.aggregator.getBatch();
|
|
1969
|
-
normalizedBatch.count = this.batchCount;
|
|
1970
|
-
normalizedBatch.bytesUsed = this.bytesUsed;
|
|
1971
|
-
Object.assign(normalizedBatch, options);
|
|
1972
|
-
this.batchCount++;
|
|
1973
|
-
this.aggregator = null;
|
|
1974
|
-
return normalizedBatch;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
_getTableBatchType() {
|
|
1978
|
-
switch (this.options.shape) {
|
|
1979
|
-
case 'row-table':
|
|
1980
|
-
return _base_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
1981
|
-
|
|
1982
|
-
case 'array-row-table':
|
|
1983
|
-
case 'object-row-table':
|
|
1984
|
-
return _row_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
1985
|
-
|
|
1986
|
-
case 'columnar-table':
|
|
1987
|
-
return _columnar_table_batch_aggregator__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
1988
|
-
|
|
1989
|
-
case 'arrow-table':
|
|
1990
|
-
if (!TableBatchBuilder.ArrowBatch) {
|
|
1991
|
-
throw new Error(ERR_MESSAGE);
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
return TableBatchBuilder.ArrowBatch;
|
|
1995
|
-
|
|
1996
|
-
default:
|
|
1997
|
-
throw new Error(ERR_MESSAGE);
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(TableBatchBuilder, "ArrowBatch", void 0);
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
/***/ }),
|
|
2007
|
-
|
|
2008
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema-utils/deduce-column-type.js":
|
|
2009
|
-
/*!*************************************************************************************************************************************************************!*\
|
|
2010
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema-utils/deduce-column-type.js ***!
|
|
2011
|
-
\*************************************************************************************************************************************************************/
|
|
2012
|
-
/*! exports provided: deduceTypeFromColumn, deduceTypeFromValue */
|
|
2013
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2014
|
-
|
|
2015
|
-
"use strict";
|
|
2016
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2017
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deduceTypeFromColumn", function() { return deduceTypeFromColumn; });
|
|
2018
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deduceTypeFromValue", function() { return deduceTypeFromValue; });
|
|
2019
|
-
function deduceTypeFromColumn(value) {
|
|
2020
|
-
if (value instanceof Date) {
|
|
2021
|
-
return Date;
|
|
2022
|
-
} else if (value instanceof Number) {
|
|
2023
|
-
return Float32Array;
|
|
2024
|
-
} else if (typeof value === 'string') {
|
|
2025
|
-
return String;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
return null;
|
|
2029
|
-
}
|
|
2030
|
-
function deduceTypeFromValue(value) {
|
|
2031
|
-
if (value instanceof Date) {
|
|
2032
|
-
return Date;
|
|
2033
|
-
} else if (value instanceof Number) {
|
|
2034
|
-
return Float32Array;
|
|
2035
|
-
} else if (typeof value === 'string') {
|
|
2036
|
-
return String;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
return null;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
/***/ }),
|
|
2044
|
-
|
|
2045
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js":
|
|
2046
|
-
/*!**********************************************************************************************************************************************!*\
|
|
2047
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js ***!
|
|
2048
|
-
\**********************************************************************************************************************************************/
|
|
2049
|
-
/*! exports provided: Type */
|
|
2050
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2051
|
-
|
|
2052
|
-
"use strict";
|
|
2053
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2054
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return Type; });
|
|
2055
|
-
let Type;
|
|
2056
|
-
|
|
2057
|
-
(function (Type) {
|
|
2058
|
-
Type[Type["NONE"] = 0] = "NONE";
|
|
2059
|
-
Type[Type["Null"] = 1] = "Null";
|
|
2060
|
-
Type[Type["Int"] = 2] = "Int";
|
|
2061
|
-
Type[Type["Float"] = 3] = "Float";
|
|
2062
|
-
Type[Type["Binary"] = 4] = "Binary";
|
|
2063
|
-
Type[Type["Utf8"] = 5] = "Utf8";
|
|
2064
|
-
Type[Type["Bool"] = 6] = "Bool";
|
|
2065
|
-
Type[Type["Decimal"] = 7] = "Decimal";
|
|
2066
|
-
Type[Type["Date"] = 8] = "Date";
|
|
2067
|
-
Type[Type["Time"] = 9] = "Time";
|
|
2068
|
-
Type[Type["Timestamp"] = 10] = "Timestamp";
|
|
2069
|
-
Type[Type["Interval"] = 11] = "Interval";
|
|
2070
|
-
Type[Type["List"] = 12] = "List";
|
|
2071
|
-
Type[Type["Struct"] = 13] = "Struct";
|
|
2072
|
-
Type[Type["Union"] = 14] = "Union";
|
|
2073
|
-
Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary";
|
|
2074
|
-
Type[Type["FixedSizeList"] = 16] = "FixedSizeList";
|
|
2075
|
-
Type[Type["Map"] = 17] = "Map";
|
|
2076
|
-
Type[Type["Dictionary"] = -1] = "Dictionary";
|
|
2077
|
-
Type[Type["Int8"] = -2] = "Int8";
|
|
2078
|
-
Type[Type["Int16"] = -3] = "Int16";
|
|
2079
|
-
Type[Type["Int32"] = -4] = "Int32";
|
|
2080
|
-
Type[Type["Int64"] = -5] = "Int64";
|
|
2081
|
-
Type[Type["Uint8"] = -6] = "Uint8";
|
|
2082
|
-
Type[Type["Uint16"] = -7] = "Uint16";
|
|
2083
|
-
Type[Type["Uint32"] = -8] = "Uint32";
|
|
2084
|
-
Type[Type["Uint64"] = -9] = "Uint64";
|
|
2085
|
-
Type[Type["Float16"] = -10] = "Float16";
|
|
2086
|
-
Type[Type["Float32"] = -11] = "Float32";
|
|
2087
|
-
Type[Type["Float64"] = -12] = "Float64";
|
|
2088
|
-
Type[Type["DateDay"] = -13] = "DateDay";
|
|
2089
|
-
Type[Type["DateMillisecond"] = -14] = "DateMillisecond";
|
|
2090
|
-
Type[Type["TimestampSecond"] = -15] = "TimestampSecond";
|
|
2091
|
-
Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond";
|
|
2092
|
-
Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond";
|
|
2093
|
-
Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond";
|
|
2094
|
-
Type[Type["TimeSecond"] = -19] = "TimeSecond";
|
|
2095
|
-
Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond";
|
|
2096
|
-
Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond";
|
|
2097
|
-
Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond";
|
|
2098
|
-
Type[Type["DenseUnion"] = -23] = "DenseUnion";
|
|
2099
|
-
Type[Type["SparseUnion"] = -24] = "SparseUnion";
|
|
2100
|
-
Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime";
|
|
2101
|
-
Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth";
|
|
2102
|
-
})(Type || (Type = {}));
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
/***/ }),
|
|
2106
|
-
|
|
2107
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js":
|
|
2108
|
-
/*!***********************************************************************************************************************************************!*\
|
|
2109
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js ***!
|
|
2110
|
-
\***********************************************************************************************************************************************/
|
|
2111
|
-
/*! exports provided: default */
|
|
2112
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2113
|
-
|
|
2114
|
-
"use strict";
|
|
2115
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2116
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Field; });
|
|
2117
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
2118
|
-
|
|
2119
|
-
class Field {
|
|
2120
|
-
constructor(name, type, nullable = false, metadata = new Map()) {
|
|
2121
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
2122
|
-
|
|
2123
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
2124
|
-
|
|
2125
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "nullable", void 0);
|
|
2126
|
-
|
|
2127
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
2128
|
-
|
|
2129
|
-
this.name = name;
|
|
2130
|
-
this.type = type;
|
|
2131
|
-
this.nullable = nullable;
|
|
2132
|
-
this.metadata = metadata;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
get typeId() {
|
|
2136
|
-
return this.type && this.type.typeId;
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
clone() {
|
|
2140
|
-
return new Field(this.name, this.type, this.nullable, this.metadata);
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
compareTo(other) {
|
|
2144
|
-
return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata;
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
toString() {
|
|
2148
|
-
return "".concat(this.type).concat(this.nullable ? ', nullable' : '').concat(this.metadata ? ", metadata: ".concat(this.metadata) : '');
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
/***/ }),
|
|
2155
|
-
|
|
2156
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js":
|
|
2157
|
-
/*!************************************************************************************************************************************************!*\
|
|
2158
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js ***!
|
|
2159
|
-
\************************************************************************************************************************************************/
|
|
2160
|
-
/*! exports provided: default */
|
|
2161
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2162
|
-
|
|
2163
|
-
"use strict";
|
|
2164
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2165
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Schema; });
|
|
2166
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
2167
|
-
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js");
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
class Schema {
|
|
2171
|
-
constructor(fields, metadata) {
|
|
2172
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fields", void 0);
|
|
2173
|
-
|
|
2174
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
2175
|
-
|
|
2176
|
-
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_1__["assert"])(Array.isArray(fields));
|
|
2177
|
-
checkNames(fields);
|
|
2178
|
-
this.fields = fields;
|
|
2179
|
-
this.metadata = metadata || new Map();
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
compareTo(other) {
|
|
2183
|
-
if (this.metadata !== other.metadata) {
|
|
2184
|
-
return false;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
if (this.fields.length !== other.fields.length) {
|
|
2188
|
-
return false;
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
for (let i = 0; i < this.fields.length; ++i) {
|
|
2192
|
-
if (!this.fields[i].compareTo(other.fields[i])) {
|
|
2193
|
-
return false;
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
return true;
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
select(...columnNames) {
|
|
2201
|
-
const nameMap = Object.create(null);
|
|
2202
|
-
|
|
2203
|
-
for (const name of columnNames) {
|
|
2204
|
-
nameMap[name] = true;
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
const selectedFields = this.fields.filter(field => nameMap[field.name]);
|
|
2208
|
-
return new Schema(selectedFields, this.metadata);
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
selectAt(...columnIndices) {
|
|
2212
|
-
const selectedFields = columnIndices.map(index => this.fields[index]).filter(Boolean);
|
|
2213
|
-
return new Schema(selectedFields, this.metadata);
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
assign(schemaOrFields) {
|
|
2217
|
-
let fields;
|
|
2218
|
-
let metadata = this.metadata;
|
|
2219
|
-
|
|
2220
|
-
if (schemaOrFields instanceof Schema) {
|
|
2221
|
-
const otherSchema = schemaOrFields;
|
|
2222
|
-
fields = otherSchema.fields;
|
|
2223
|
-
metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata);
|
|
2224
|
-
} else {
|
|
2225
|
-
fields = schemaOrFields;
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
const fieldMap = Object.create(null);
|
|
2229
|
-
|
|
2230
|
-
for (const field of this.fields) {
|
|
2231
|
-
fieldMap[field.name] = field;
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
for (const field of fields) {
|
|
2235
|
-
fieldMap[field.name] = field;
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
const mergedFields = Object.values(fieldMap);
|
|
2239
|
-
return new Schema(mergedFields, metadata);
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
function checkNames(fields) {
|
|
2245
|
-
const usedNames = {};
|
|
2246
|
-
|
|
2247
|
-
for (const field of fields) {
|
|
2248
|
-
if (usedNames[field.name]) {
|
|
2249
|
-
console.warn('Schema: duplicated field name', field.name, field);
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
usedNames[field.name] = true;
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
function mergeMaps(m1, m2) {
|
|
2257
|
-
return new Map([...(m1 || new Map()), ...(m2 || new Map())]);
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
/***/ }),
|
|
2262
|
-
|
|
2263
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js":
|
|
2264
|
-
/*!**********************************************************************************************************************************************!*\
|
|
2265
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js ***!
|
|
2266
|
-
\**********************************************************************************************************************************************/
|
|
2267
|
-
/*! exports provided: Type, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Binary, Utf8, Date, DateDay, DateMillisecond, Time, TimeSecond, TimeMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct */
|
|
2268
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2269
|
-
|
|
2270
|
-
"use strict";
|
|
2271
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2272
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataType", function() { return DataType; });
|
|
2273
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Null", function() { return Null; });
|
|
2274
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bool", function() { return Bool; });
|
|
2275
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int", function() { return Int; });
|
|
2276
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int8", function() { return Int8; });
|
|
2277
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int16", function() { return Int16; });
|
|
2278
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int32", function() { return Int32; });
|
|
2279
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int64", function() { return Int64; });
|
|
2280
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uint8", function() { return Uint8; });
|
|
2281
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uint16", function() { return Uint16; });
|
|
2282
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uint32", function() { return Uint32; });
|
|
2283
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uint64", function() { return Uint64; });
|
|
2284
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Float", function() { return Float; });
|
|
2285
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Float16", function() { return Float16; });
|
|
2286
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Float32", function() { return Float32; });
|
|
2287
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Float64", function() { return Float64; });
|
|
2288
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Binary", function() { return Binary; });
|
|
2289
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Utf8", function() { return Utf8; });
|
|
2290
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Date", function() { return Date; });
|
|
2291
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateDay", function() { return DateDay; });
|
|
2292
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateMillisecond", function() { return DateMillisecond; });
|
|
2293
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Time", function() { return Time; });
|
|
2294
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeSecond", function() { return TimeSecond; });
|
|
2295
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeMillisecond", function() { return TimeMillisecond; });
|
|
2296
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
|
|
2297
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimestampSecond", function() { return TimestampSecond; });
|
|
2298
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimestampMillisecond", function() { return TimestampMillisecond; });
|
|
2299
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimestampMicrosecond", function() { return TimestampMicrosecond; });
|
|
2300
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimestampNanosecond", function() { return TimestampNanosecond; });
|
|
2301
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interval", function() { return Interval; });
|
|
2302
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntervalDayTime", function() { return IntervalDayTime; });
|
|
2303
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntervalYearMonth", function() { return IntervalYearMonth; });
|
|
2304
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedSizeList", function() { return FixedSizeList; });
|
|
2305
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Struct", function() { return Struct; });
|
|
2306
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
2307
|
-
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js");
|
|
2308
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"]; });
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
let _Symbol$toStringTag, _Symbol$toStringTag2, _Symbol$toStringTag3, _Symbol$toStringTag4, _Symbol$toStringTag5, _Symbol$toStringTag6, _Symbol$toStringTag7, _Symbol$toStringTag8;
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
class DataType {
|
|
2317
|
-
static isNull(x) {
|
|
2318
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Null;
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
static isInt(x) {
|
|
2322
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Int;
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
static isFloat(x) {
|
|
2326
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Float;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
static isBinary(x) {
|
|
2330
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Binary;
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
static isUtf8(x) {
|
|
2334
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Utf8;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
static isBool(x) {
|
|
2338
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Bool;
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
static isDecimal(x) {
|
|
2342
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Decimal;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
static isDate(x) {
|
|
2346
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Date;
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
static isTime(x) {
|
|
2350
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Time;
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
static isTimestamp(x) {
|
|
2354
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Timestamp;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
static isInterval(x) {
|
|
2358
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Interval;
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
static isList(x) {
|
|
2362
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].List;
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
static isStruct(x) {
|
|
2366
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Struct;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
static isUnion(x) {
|
|
2370
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Union;
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
static isFixedSizeBinary(x) {
|
|
2374
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].FixedSizeBinary;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
static isFixedSizeList(x) {
|
|
2378
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].FixedSizeList;
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
static isMap(x) {
|
|
2382
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Map;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
static isDictionary(x) {
|
|
2386
|
-
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Dictionary;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
get typeId() {
|
|
2390
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].NONE;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
compareTo(other) {
|
|
2394
|
-
return this === other;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
}
|
|
2398
|
-
class Null extends DataType {
|
|
2399
|
-
get typeId() {
|
|
2400
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Null;
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
get [Symbol.toStringTag]() {
|
|
2404
|
-
return 'Null';
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
toString() {
|
|
2408
|
-
return 'Null';
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
}
|
|
2412
|
-
class Bool extends DataType {
|
|
2413
|
-
get typeId() {
|
|
2414
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Bool;
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
get [Symbol.toStringTag]() {
|
|
2418
|
-
return 'Bool';
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
|
-
toString() {
|
|
2422
|
-
return 'Bool';
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
}
|
|
2426
|
-
_Symbol$toStringTag = Symbol.toStringTag;
|
|
2427
|
-
class Int extends DataType {
|
|
2428
|
-
constructor(isSigned, bitWidth) {
|
|
2429
|
-
super();
|
|
2430
|
-
|
|
2431
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isSigned", void 0);
|
|
2432
|
-
|
|
2433
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
2434
|
-
|
|
2435
|
-
this.isSigned = isSigned;
|
|
2436
|
-
this.bitWidth = bitWidth;
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
get typeId() {
|
|
2440
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Int;
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
get [_Symbol$toStringTag]() {
|
|
2444
|
-
return 'Int';
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
toString() {
|
|
2448
|
-
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth);
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
}
|
|
2452
|
-
class Int8 extends Int {
|
|
2453
|
-
constructor() {
|
|
2454
|
-
super(true, 8);
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
}
|
|
2458
|
-
class Int16 extends Int {
|
|
2459
|
-
constructor() {
|
|
2460
|
-
super(true, 16);
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
class Int32 extends Int {
|
|
2465
|
-
constructor() {
|
|
2466
|
-
super(true, 32);
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
}
|
|
2470
|
-
class Int64 extends Int {
|
|
2471
|
-
constructor() {
|
|
2472
|
-
super(true, 64);
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
}
|
|
2476
|
-
class Uint8 extends Int {
|
|
2477
|
-
constructor() {
|
|
2478
|
-
super(false, 8);
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
}
|
|
2482
|
-
class Uint16 extends Int {
|
|
2483
|
-
constructor() {
|
|
2484
|
-
super(false, 16);
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
}
|
|
2488
|
-
class Uint32 extends Int {
|
|
2489
|
-
constructor() {
|
|
2490
|
-
super(false, 32);
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
}
|
|
2494
|
-
class Uint64 extends Int {
|
|
2495
|
-
constructor() {
|
|
2496
|
-
super(false, 64);
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
}
|
|
2500
|
-
const Precision = {
|
|
2501
|
-
HALF: 16,
|
|
2502
|
-
SINGLE: 32,
|
|
2503
|
-
DOUBLE: 64
|
|
2504
|
-
};
|
|
2505
|
-
_Symbol$toStringTag2 = Symbol.toStringTag;
|
|
2506
|
-
class Float extends DataType {
|
|
2507
|
-
constructor(precision) {
|
|
2508
|
-
super();
|
|
2509
|
-
|
|
2510
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "precision", void 0);
|
|
2511
|
-
|
|
2512
|
-
this.precision = precision;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
get typeId() {
|
|
2516
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Float;
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
get [_Symbol$toStringTag2]() {
|
|
2520
|
-
return 'Float';
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
toString() {
|
|
2524
|
-
return "Float".concat(this.precision);
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
}
|
|
2528
|
-
class Float16 extends Float {
|
|
2529
|
-
constructor() {
|
|
2530
|
-
super(Precision.HALF);
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
}
|
|
2534
|
-
class Float32 extends Float {
|
|
2535
|
-
constructor() {
|
|
2536
|
-
super(Precision.SINGLE);
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
}
|
|
2540
|
-
class Float64 extends Float {
|
|
2541
|
-
constructor() {
|
|
2542
|
-
super(Precision.DOUBLE);
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
}
|
|
2546
|
-
class Binary extends DataType {
|
|
2547
|
-
constructor() {
|
|
2548
|
-
super();
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
get typeId() {
|
|
2552
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Binary;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
toString() {
|
|
2556
|
-
return 'Binary';
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
|
-
get [Symbol.toStringTag]() {
|
|
2560
|
-
return 'Binary';
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
}
|
|
2564
|
-
class Utf8 extends DataType {
|
|
2565
|
-
get typeId() {
|
|
2566
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Utf8;
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
get [Symbol.toStringTag]() {
|
|
2570
|
-
return 'Utf8';
|
|
2571
|
-
}
|
|
2572
|
-
|
|
2573
|
-
toString() {
|
|
2574
|
-
return 'Utf8';
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
}
|
|
2578
|
-
const DateUnit = {
|
|
2579
|
-
DAY: 0,
|
|
2580
|
-
MILLISECOND: 1
|
|
2581
|
-
};
|
|
2582
|
-
_Symbol$toStringTag3 = Symbol.toStringTag;
|
|
2583
|
-
class Date extends DataType {
|
|
2584
|
-
constructor(unit) {
|
|
2585
|
-
super();
|
|
2586
|
-
|
|
2587
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
2588
|
-
|
|
2589
|
-
this.unit = unit;
|
|
2590
|
-
}
|
|
2591
|
-
|
|
2592
|
-
get typeId() {
|
|
2593
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Date;
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
get [_Symbol$toStringTag3]() {
|
|
2597
|
-
return 'Date';
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
|
-
toString() {
|
|
2601
|
-
return "Date".concat((this.unit + 1) * 32, "<").concat(DateUnit[this.unit], ">");
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
}
|
|
2605
|
-
class DateDay extends Date {
|
|
2606
|
-
constructor() {
|
|
2607
|
-
super(DateUnit.DAY);
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2610
|
-
}
|
|
2611
|
-
class DateMillisecond extends Date {
|
|
2612
|
-
constructor() {
|
|
2613
|
-
super(DateUnit.MILLISECOND);
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
}
|
|
2617
|
-
const TimeUnit = {
|
|
2618
|
-
SECOND: 1,
|
|
2619
|
-
MILLISECOND: 1e3,
|
|
2620
|
-
MICROSECOND: 1e6,
|
|
2621
|
-
NANOSECOND: 1e9
|
|
2622
|
-
};
|
|
2623
|
-
_Symbol$toStringTag4 = Symbol.toStringTag;
|
|
2624
|
-
class Time extends DataType {
|
|
2625
|
-
constructor(unit, bitWidth) {
|
|
2626
|
-
super();
|
|
2627
|
-
|
|
2628
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
2629
|
-
|
|
2630
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
2631
|
-
|
|
2632
|
-
this.unit = unit;
|
|
2633
|
-
this.bitWidth = bitWidth;
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
get typeId() {
|
|
2637
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Time;
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
toString() {
|
|
2641
|
-
return "Time".concat(this.bitWidth, "<").concat(TimeUnit[this.unit], ">");
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
get [_Symbol$toStringTag4]() {
|
|
2645
|
-
return 'Time';
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
}
|
|
2649
|
-
class TimeSecond extends Time {
|
|
2650
|
-
constructor() {
|
|
2651
|
-
super(TimeUnit.SECOND, 32);
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
}
|
|
2655
|
-
class TimeMillisecond extends Time {
|
|
2656
|
-
constructor() {
|
|
2657
|
-
super(TimeUnit.MILLISECOND, 32);
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
}
|
|
2661
|
-
_Symbol$toStringTag5 = Symbol.toStringTag;
|
|
2662
|
-
class Timestamp extends DataType {
|
|
2663
|
-
constructor(unit, timezone = null) {
|
|
2664
|
-
super();
|
|
2665
|
-
|
|
2666
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
2667
|
-
|
|
2668
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "timezone", void 0);
|
|
2669
|
-
|
|
2670
|
-
this.unit = unit;
|
|
2671
|
-
this.timezone = timezone;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
get typeId() {
|
|
2675
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Timestamp;
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
get [_Symbol$toStringTag5]() {
|
|
2679
|
-
return 'Timestamp';
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
|
-
toString() {
|
|
2683
|
-
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">");
|
|
2684
|
-
}
|
|
2685
|
-
|
|
2686
|
-
}
|
|
2687
|
-
class TimestampSecond extends Timestamp {
|
|
2688
|
-
constructor(timezone = null) {
|
|
2689
|
-
super(TimeUnit.SECOND, timezone);
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
}
|
|
2693
|
-
class TimestampMillisecond extends Timestamp {
|
|
2694
|
-
constructor(timezone = null) {
|
|
2695
|
-
super(TimeUnit.MILLISECOND, timezone);
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
}
|
|
2699
|
-
class TimestampMicrosecond extends Timestamp {
|
|
2700
|
-
constructor(timezone = null) {
|
|
2701
|
-
super(TimeUnit.MICROSECOND, timezone);
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
|
-
}
|
|
2705
|
-
class TimestampNanosecond extends Timestamp {
|
|
2706
|
-
constructor(timezone = null) {
|
|
2707
|
-
super(TimeUnit.NANOSECOND, timezone);
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
}
|
|
2711
|
-
const IntervalUnit = {
|
|
2712
|
-
DAY_TIME: 0,
|
|
2713
|
-
YEAR_MONTH: 1
|
|
2714
|
-
};
|
|
2715
|
-
_Symbol$toStringTag6 = Symbol.toStringTag;
|
|
2716
|
-
class Interval extends DataType {
|
|
2717
|
-
constructor(unit) {
|
|
2718
|
-
super();
|
|
2719
|
-
|
|
2720
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
2721
|
-
|
|
2722
|
-
this.unit = unit;
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
get typeId() {
|
|
2726
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Interval;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
get [_Symbol$toStringTag6]() {
|
|
2730
|
-
return 'Interval';
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
toString() {
|
|
2734
|
-
return "Interval<".concat(IntervalUnit[this.unit], ">");
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
}
|
|
2738
|
-
class IntervalDayTime extends Interval {
|
|
2739
|
-
constructor() {
|
|
2740
|
-
super(IntervalUnit.DAY_TIME);
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
}
|
|
2744
|
-
class IntervalYearMonth extends Interval {
|
|
2745
|
-
constructor() {
|
|
2746
|
-
super(IntervalUnit.YEAR_MONTH);
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
|
-
}
|
|
2750
|
-
_Symbol$toStringTag7 = Symbol.toStringTag;
|
|
2751
|
-
class FixedSizeList extends DataType {
|
|
2752
|
-
constructor(listSize, child) {
|
|
2753
|
-
super();
|
|
2754
|
-
|
|
2755
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "listSize", void 0);
|
|
2756
|
-
|
|
2757
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2758
|
-
|
|
2759
|
-
this.listSize = listSize;
|
|
2760
|
-
this.children = [child];
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
get typeId() {
|
|
2764
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].FixedSizeList;
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
get valueType() {
|
|
2768
|
-
return this.children[0].type;
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
|
-
get valueField() {
|
|
2772
|
-
return this.children[0];
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
get [_Symbol$toStringTag7]() {
|
|
2776
|
-
return 'FixedSizeList';
|
|
2777
|
-
}
|
|
2778
|
-
|
|
2779
|
-
toString() {
|
|
2780
|
-
return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
}
|
|
2784
|
-
_Symbol$toStringTag8 = Symbol.toStringTag;
|
|
2785
|
-
class Struct extends DataType {
|
|
2786
|
-
constructor(children) {
|
|
2787
|
-
super();
|
|
2788
|
-
|
|
2789
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2790
|
-
|
|
2791
|
-
this.children = children;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
get typeId() {
|
|
2795
|
-
return _enum__WEBPACK_IMPORTED_MODULE_1__["Type"].Struct;
|
|
2796
|
-
}
|
|
2797
|
-
|
|
2798
|
-
toString() {
|
|
2799
|
-
return "Struct<{".concat(this.children.map(f => "".concat(f.name, ":").concat(f.type)).join(', '), "}>");
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
get [_Symbol$toStringTag8]() {
|
|
2803
|
-
return 'Struct';
|
|
2804
|
-
}
|
|
2805
|
-
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
/***/ }),
|
|
2810
|
-
|
|
2811
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js":
|
|
2812
|
-
/*!*******************************************************************************************************************************************!*\
|
|
2813
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/schema.js ***!
|
|
2814
|
-
\*******************************************************************************************************************************************/
|
|
2815
|
-
/*! exports provided: Schema, Field, Type, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Binary, Utf8, Date, DateDay, DateMillisecond, Time, TimeSecond, TimeMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct */
|
|
2816
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2817
|
-
|
|
2818
|
-
"use strict";
|
|
2819
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2820
|
-
/* harmony import */ var _impl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./impl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
|
|
2821
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Schema", function() { return _impl_schema__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
2822
|
-
|
|
2823
|
-
/* harmony import */ var _impl_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./impl/field */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js");
|
|
2824
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return _impl_field__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
2825
|
-
|
|
2826
|
-
/* harmony import */ var _impl_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./impl/type */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
|
|
2827
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Type"]; });
|
|
2828
|
-
|
|
2829
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataType", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["DataType"]; });
|
|
2830
|
-
|
|
2831
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Null", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Null"]; });
|
|
2832
|
-
|
|
2833
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bool", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Bool"]; });
|
|
2834
|
-
|
|
2835
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Int"]; });
|
|
2836
|
-
|
|
2837
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int8", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Int8"]; });
|
|
2838
|
-
|
|
2839
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int16", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Int16"]; });
|
|
2840
|
-
|
|
2841
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int32", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Int32"]; });
|
|
2842
|
-
|
|
2843
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Int64", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Int64"]; });
|
|
2844
|
-
|
|
2845
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint8", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Uint8"]; });
|
|
2846
|
-
|
|
2847
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint16", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Uint16"]; });
|
|
2848
|
-
|
|
2849
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint32", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Uint32"]; });
|
|
2850
|
-
|
|
2851
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Uint64", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Uint64"]; });
|
|
2852
|
-
|
|
2853
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Float"]; });
|
|
2854
|
-
|
|
2855
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float16", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Float16"]; });
|
|
2856
|
-
|
|
2857
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float32", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Float32"]; });
|
|
2858
|
-
|
|
2859
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Float64", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Float64"]; });
|
|
2860
|
-
|
|
2861
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Binary", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Binary"]; });
|
|
2862
|
-
|
|
2863
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Utf8", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Utf8"]; });
|
|
2864
|
-
|
|
2865
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Date", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Date"]; });
|
|
2866
|
-
|
|
2867
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateDay", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["DateDay"]; });
|
|
2868
|
-
|
|
2869
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateMillisecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["DateMillisecond"]; });
|
|
2870
|
-
|
|
2871
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Time", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Time"]; });
|
|
2872
|
-
|
|
2873
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeSecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimeSecond"]; });
|
|
2874
|
-
|
|
2875
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeMillisecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimeMillisecond"]; });
|
|
2876
|
-
|
|
2877
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Timestamp"]; });
|
|
2878
|
-
|
|
2879
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampSecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimestampSecond"]; });
|
|
2880
|
-
|
|
2881
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampMillisecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimestampMillisecond"]; });
|
|
2882
|
-
|
|
2883
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampMicrosecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimestampMicrosecond"]; });
|
|
2884
|
-
|
|
2885
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimestampNanosecond", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["TimestampNanosecond"]; });
|
|
2886
|
-
|
|
2887
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Interval", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Interval"]; });
|
|
2888
|
-
|
|
2889
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntervalDayTime", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["IntervalDayTime"]; });
|
|
2890
|
-
|
|
2891
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntervalYearMonth", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["IntervalYearMonth"]; });
|
|
2892
|
-
|
|
2893
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FixedSizeList", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["FixedSizeList"]; });
|
|
2894
|
-
|
|
2895
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Struct", function() { return _impl_type__WEBPACK_IMPORTED_MODULE_2__["Struct"]; });
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
/***/ }),
|
|
2904
|
-
|
|
2905
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js":
|
|
2906
|
-
/*!******************************************************************************************************************************************!*\
|
|
2907
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js ***!
|
|
2908
|
-
\******************************************************************************************************************************************/
|
|
2909
|
-
/*! exports provided: assert */
|
|
2910
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2911
|
-
|
|
2912
|
-
"use strict";
|
|
2913
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2914
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return assert; });
|
|
2915
|
-
function assert(condition, message) {
|
|
2916
|
-
if (!condition) {
|
|
2917
|
-
throw new Error(message || 'loader assertion failed.');
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
/***/ }),
|
|
2923
|
-
|
|
2924
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/async-queue.js":
|
|
2925
|
-
/*!***********************************************************************************************************************************************!*\
|
|
2926
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/async-queue.js ***!
|
|
2927
|
-
\***********************************************************************************************************************************************/
|
|
2928
|
-
/*! exports provided: default, takeAsync */
|
|
2929
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2930
|
-
|
|
2931
|
-
"use strict";
|
|
2932
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2933
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AsyncQueue; });
|
|
2934
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeAsync", function() { return takeAsync; });
|
|
2935
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
let _Symbol$asyncIterator;
|
|
2939
|
-
|
|
2940
|
-
class ArrayQueue extends Array {
|
|
2941
|
-
enqueue(value) {
|
|
2942
|
-
return this.push(value);
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
dequeue() {
|
|
2946
|
-
return this.shift();
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
_Symbol$asyncIterator = Symbol.asyncIterator;
|
|
2952
|
-
class AsyncQueue {
|
|
2953
|
-
constructor() {
|
|
2954
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_values", void 0);
|
|
2955
|
-
|
|
2956
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_settlers", void 0);
|
|
2957
|
-
|
|
2958
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_closed", void 0);
|
|
2959
|
-
|
|
2960
|
-
this._values = new ArrayQueue();
|
|
2961
|
-
this._settlers = new ArrayQueue();
|
|
2962
|
-
this._closed = false;
|
|
2963
|
-
}
|
|
2964
|
-
|
|
2965
|
-
close() {
|
|
2966
|
-
while (this._settlers.length > 0) {
|
|
2967
|
-
this._settlers.dequeue().resolve({
|
|
2968
|
-
done: true
|
|
2969
|
-
});
|
|
2970
|
-
}
|
|
2971
|
-
|
|
2972
|
-
this._closed = true;
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
[_Symbol$asyncIterator]() {
|
|
2976
|
-
return this;
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
enqueue(value) {
|
|
2980
|
-
if (this._closed) {
|
|
2981
|
-
throw new Error('Closed');
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
if (this._settlers.length > 0) {
|
|
2985
|
-
if (this._values.length > 0) {
|
|
2986
|
-
throw new Error('Illegal internal state');
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
const settler = this._settlers.dequeue();
|
|
2990
|
-
|
|
2991
|
-
if (value instanceof Error) {
|
|
2992
|
-
settler.reject(value);
|
|
2993
|
-
} else {
|
|
2994
|
-
settler.resolve({
|
|
2995
|
-
value
|
|
2996
|
-
});
|
|
2997
|
-
}
|
|
2998
|
-
} else {
|
|
2999
|
-
this._values.enqueue(value);
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
next() {
|
|
3004
|
-
if (this._values.length > 0) {
|
|
3005
|
-
const value = this._values.dequeue();
|
|
3006
|
-
|
|
3007
|
-
if (value instanceof Error) {
|
|
3008
|
-
return Promise.reject(value);
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
return Promise.resolve({
|
|
3012
|
-
value
|
|
3013
|
-
});
|
|
3014
|
-
}
|
|
3015
|
-
|
|
3016
|
-
if (this._closed) {
|
|
3017
|
-
if (this._settlers.length > 0) {
|
|
3018
|
-
throw new Error('Illegal internal state');
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
return Promise.resolve({
|
|
3022
|
-
done: true
|
|
3023
|
-
});
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
return new Promise((resolve, reject) => {
|
|
3027
|
-
this._settlers.enqueue({
|
|
3028
|
-
resolve,
|
|
3029
|
-
reject
|
|
3030
|
-
});
|
|
3031
|
-
});
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
}
|
|
3035
|
-
async function takeAsync(asyncIterable, count = Infinity) {
|
|
3036
|
-
const result = [];
|
|
3037
|
-
const iterator = asyncIterable[Symbol.asyncIterator]();
|
|
3038
|
-
|
|
3039
|
-
while (result.length < count) {
|
|
3040
|
-
const {
|
|
3041
|
-
value,
|
|
3042
|
-
done
|
|
3043
|
-
} = await iterator.next();
|
|
3044
|
-
|
|
3045
|
-
if (done) {
|
|
3046
|
-
break;
|
|
3047
|
-
}
|
|
3048
|
-
|
|
3049
|
-
result.push(value);
|
|
3050
|
-
}
|
|
3051
|
-
|
|
3052
|
-
return result;
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
/***/ }),
|
|
3057
|
-
|
|
3058
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/row-utils.js":
|
|
3059
|
-
/*!*********************************************************************************************************************************************!*\
|
|
3060
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+schema@3.2.5/node_modules/@loaders.gl/schema/dist/esm/lib/utils/row-utils.js ***!
|
|
3061
|
-
\*********************************************************************************************************************************************/
|
|
3062
|
-
/*! exports provided: convertToObjectRow, convertToArrayRow */
|
|
3063
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3064
|
-
|
|
3065
|
-
"use strict";
|
|
3066
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3067
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToObjectRow", function() { return convertToObjectRow; });
|
|
3068
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToArrayRow", function() { return convertToArrayRow; });
|
|
3069
|
-
function convertToObjectRow(arrayRow, headers) {
|
|
3070
|
-
if (!arrayRow) {
|
|
3071
|
-
throw new Error('null row');
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
if (!headers) {
|
|
3075
|
-
throw new Error('no headers');
|
|
3076
|
-
}
|
|
3077
|
-
|
|
3078
|
-
const objectRow = {};
|
|
3079
|
-
|
|
3080
|
-
for (let i = 0; i < headers.length; i++) {
|
|
3081
|
-
objectRow[headers[i]] = arrayRow[i];
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
return objectRow;
|
|
3085
|
-
}
|
|
3086
|
-
function convertToArrayRow(objectRow, headers) {
|
|
3087
|
-
if (!objectRow) {
|
|
3088
|
-
throw new Error('null row');
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
if (!headers) {
|
|
3092
|
-
throw new Error('no headers');
|
|
3093
|
-
}
|
|
3094
|
-
|
|
3095
|
-
const arrayRow = new Array(headers.length);
|
|
3096
|
-
|
|
3097
|
-
for (let i = 0; i < headers.length; i++) {
|
|
3098
|
-
arrayRow[i] = objectRow[headers[i]];
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
return arrayRow;
|
|
3102
|
-
}
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
/***/ }),
|
|
3106
|
-
|
|
3107
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/index.js":
|
|
3108
|
-
/*!*******************************************************************************************************************************************!*\
|
|
3109
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/index.js ***!
|
|
3110
|
-
\*******************************************************************************************************************************************/
|
|
3111
|
-
/*! exports provided: assert, isBrowser, isWorker, WorkerJob, WorkerThread, WorkerFarm, WorkerPool, WorkerBody, processOnWorker, canProcessOnWorker, createWorker, getWorkerURL, validateWorkerVersion, getTransferList, getLibraryUrl, loadLibrary, AsyncQueue, ChildProcessProxy, NullWorker */
|
|
3112
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3113
|
-
|
|
3114
|
-
"use strict";
|
|
3115
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3116
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullWorker", function() { return NullWorker; });
|
|
3117
|
-
/* harmony import */ var _lib_env_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/env-utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js");
|
|
3118
|
-
/* harmony import */ var _lib_env_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
3119
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return _lib_env_utils_assert__WEBPACK_IMPORTED_MODULE_1__["assert"]; });
|
|
3120
|
-
|
|
3121
|
-
/* harmony import */ var _lib_env_utils_globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
3122
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return _lib_env_utils_globals__WEBPACK_IMPORTED_MODULE_2__["isBrowser"]; });
|
|
3123
|
-
|
|
3124
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWorker", function() { return _lib_env_utils_globals__WEBPACK_IMPORTED_MODULE_2__["isWorker"]; });
|
|
3125
|
-
|
|
3126
|
-
/* harmony import */ var _lib_worker_farm_worker_job__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/worker-farm/worker-job */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js");
|
|
3127
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkerJob", function() { return _lib_worker_farm_worker_job__WEBPACK_IMPORTED_MODULE_3__["default"]; });
|
|
3128
|
-
|
|
3129
|
-
/* harmony import */ var _lib_worker_farm_worker_thread__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/worker-farm/worker-thread */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js");
|
|
3130
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkerThread", function() { return _lib_worker_farm_worker_thread__WEBPACK_IMPORTED_MODULE_4__["default"]; });
|
|
3131
|
-
|
|
3132
|
-
/* harmony import */ var _lib_worker_farm_worker_farm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/worker-farm/worker-farm */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js");
|
|
3133
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkerFarm", function() { return _lib_worker_farm_worker_farm__WEBPACK_IMPORTED_MODULE_5__["default"]; });
|
|
3134
|
-
|
|
3135
|
-
/* harmony import */ var _lib_worker_farm_worker_pool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/worker-farm/worker-pool */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js");
|
|
3136
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkerPool", function() { return _lib_worker_farm_worker_pool__WEBPACK_IMPORTED_MODULE_6__["default"]; });
|
|
3137
|
-
|
|
3138
|
-
/* harmony import */ var _lib_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lib/worker-farm/worker-body */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-body.js");
|
|
3139
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkerBody", function() { return _lib_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_7__["default"]; });
|
|
3140
|
-
|
|
3141
|
-
/* harmony import */ var _lib_worker_api_process_on_worker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lib/worker-api/process-on-worker */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/process-on-worker.js");
|
|
3142
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "processOnWorker", function() { return _lib_worker_api_process_on_worker__WEBPACK_IMPORTED_MODULE_8__["processOnWorker"]; });
|
|
3143
|
-
|
|
3144
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "canProcessOnWorker", function() { return _lib_worker_api_process_on_worker__WEBPACK_IMPORTED_MODULE_8__["canProcessOnWorker"]; });
|
|
3145
|
-
|
|
3146
|
-
/* harmony import */ var _lib_worker_api_create_worker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/worker-api/create-worker */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/create-worker.js");
|
|
3147
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createWorker", function() { return _lib_worker_api_create_worker__WEBPACK_IMPORTED_MODULE_9__["createWorker"]; });
|
|
3148
|
-
|
|
3149
|
-
/* harmony import */ var _lib_worker_api_get_worker_url__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lib/worker-api/get-worker-url */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js");
|
|
3150
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWorkerURL", function() { return _lib_worker_api_get_worker_url__WEBPACK_IMPORTED_MODULE_10__["getWorkerURL"]; });
|
|
3151
|
-
|
|
3152
|
-
/* harmony import */ var _lib_worker_api_validate_worker_version__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./lib/worker-api/validate-worker-version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/validate-worker-version.js");
|
|
3153
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "validateWorkerVersion", function() { return _lib_worker_api_validate_worker_version__WEBPACK_IMPORTED_MODULE_11__["validateWorkerVersion"]; });
|
|
3154
|
-
|
|
3155
|
-
/* harmony import */ var _lib_worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./lib/worker-utils/get-transfer-list */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js");
|
|
3156
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTransferList", function() { return _lib_worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_12__["getTransferList"]; });
|
|
3157
|
-
|
|
3158
|
-
/* harmony import */ var _lib_library_utils_library_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./lib/library-utils/library-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js");
|
|
3159
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLibraryUrl", function() { return _lib_library_utils_library_utils__WEBPACK_IMPORTED_MODULE_13__["getLibraryUrl"]; });
|
|
3160
|
-
|
|
3161
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadLibrary", function() { return _lib_library_utils_library_utils__WEBPACK_IMPORTED_MODULE_13__["loadLibrary"]; });
|
|
3162
|
-
|
|
3163
|
-
/* harmony import */ var _lib_async_queue_async_queue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./lib/async-queue/async-queue */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/async-queue/async-queue.js");
|
|
3164
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncQueue", function() { return _lib_async_queue_async_queue__WEBPACK_IMPORTED_MODULE_14__["default"]; });
|
|
3165
|
-
|
|
3166
|
-
/* harmony import */ var _lib_process_utils_child_process_proxy__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./lib/process-utils/child-process-proxy */ 7);
|
|
3167
|
-
/* harmony import */ var _lib_process_utils_child_process_proxy__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_lib_process_utils_child_process_proxy__WEBPACK_IMPORTED_MODULE_15__);
|
|
3168
|
-
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "ChildProcessProxy", function() { return _lib_process_utils_child_process_proxy__WEBPACK_IMPORTED_MODULE_15___default.a; });
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
const NullWorker = {
|
|
3186
|
-
id: 'null',
|
|
3187
|
-
name: 'null',
|
|
3188
|
-
module: 'worker-utils',
|
|
3189
|
-
version: _lib_env_utils_version__WEBPACK_IMPORTED_MODULE_0__["VERSION"],
|
|
3190
|
-
options: {
|
|
3191
|
-
null: {}
|
|
3192
|
-
}
|
|
3193
|
-
};
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
/***/ }),
|
|
3197
|
-
|
|
3198
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/async-queue/async-queue.js":
|
|
3199
|
-
/*!*****************************************************************************************************************************************************************!*\
|
|
3200
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/async-queue/async-queue.js ***!
|
|
3201
|
-
\*****************************************************************************************************************************************************************/
|
|
3202
|
-
/*! exports provided: default */
|
|
3203
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3204
|
-
|
|
3205
|
-
"use strict";
|
|
3206
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3207
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AsyncQueue; });
|
|
3208
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
let _Symbol$asyncIterator;
|
|
3212
|
-
|
|
3213
|
-
_Symbol$asyncIterator = Symbol.asyncIterator;
|
|
3214
|
-
class AsyncQueue {
|
|
3215
|
-
constructor() {
|
|
3216
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_values", void 0);
|
|
3217
|
-
|
|
3218
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_settlers", void 0);
|
|
3219
|
-
|
|
3220
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_closed", void 0);
|
|
3221
|
-
|
|
3222
|
-
this._values = [];
|
|
3223
|
-
this._settlers = [];
|
|
3224
|
-
this._closed = false;
|
|
3225
|
-
}
|
|
3226
|
-
|
|
3227
|
-
[_Symbol$asyncIterator]() {
|
|
3228
|
-
return this;
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
push(value) {
|
|
3232
|
-
return this.enqueue(value);
|
|
3233
|
-
}
|
|
3234
|
-
|
|
3235
|
-
enqueue(value) {
|
|
3236
|
-
if (this._closed) {
|
|
3237
|
-
throw new Error('Closed');
|
|
3238
|
-
}
|
|
3239
|
-
|
|
3240
|
-
if (this._settlers.length > 0) {
|
|
3241
|
-
if (this._values.length > 0) {
|
|
3242
|
-
throw new Error('Illegal internal state');
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
const settler = this._settlers.shift();
|
|
3246
|
-
|
|
3247
|
-
if (value instanceof Error) {
|
|
3248
|
-
settler.reject(value);
|
|
3249
|
-
} else {
|
|
3250
|
-
settler.resolve({
|
|
3251
|
-
value
|
|
3252
|
-
});
|
|
3253
|
-
}
|
|
3254
|
-
} else {
|
|
3255
|
-
this._values.push(value);
|
|
3256
|
-
}
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
|
-
close() {
|
|
3260
|
-
while (this._settlers.length > 0) {
|
|
3261
|
-
const settler = this._settlers.shift();
|
|
3262
|
-
|
|
3263
|
-
settler.resolve({
|
|
3264
|
-
done: true
|
|
3265
|
-
});
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
this._closed = true;
|
|
3269
|
-
}
|
|
3270
|
-
|
|
3271
|
-
next() {
|
|
3272
|
-
if (this._values.length > 0) {
|
|
3273
|
-
const value = this._values.shift();
|
|
3274
|
-
|
|
3275
|
-
if (value instanceof Error) {
|
|
3276
|
-
return Promise.reject(value);
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
return Promise.resolve({
|
|
3280
|
-
done: false,
|
|
3281
|
-
value
|
|
3282
|
-
});
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
if (this._closed) {
|
|
3286
|
-
if (this._settlers.length > 0) {
|
|
3287
|
-
throw new Error('Illegal internal state');
|
|
3288
|
-
}
|
|
3289
|
-
|
|
3290
|
-
return Promise.resolve({
|
|
3291
|
-
done: true,
|
|
3292
|
-
value: undefined
|
|
3293
|
-
});
|
|
3294
|
-
}
|
|
3295
|
-
|
|
3296
|
-
return new Promise((resolve, reject) => {
|
|
3297
|
-
this._settlers.push({
|
|
3298
|
-
resolve,
|
|
3299
|
-
reject
|
|
3300
|
-
});
|
|
3301
|
-
});
|
|
3302
|
-
}
|
|
3303
|
-
|
|
3304
|
-
}
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
/***/ }),
|
|
3308
|
-
|
|
3309
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js":
|
|
3310
|
-
/*!**********************************************************************************************************************************************************!*\
|
|
3311
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js ***!
|
|
3312
|
-
\**********************************************************************************************************************************************************/
|
|
3313
|
-
/*! exports provided: assert */
|
|
3314
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3315
|
-
|
|
3316
|
-
"use strict";
|
|
3317
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3318
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return assert; });
|
|
3319
|
-
function assert(condition, message) {
|
|
3320
|
-
if (!condition) {
|
|
3321
|
-
throw new Error(message || 'loaders.gl assertion failed.');
|
|
3322
|
-
}
|
|
3323
|
-
}
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
/***/ }),
|
|
3327
|
-
|
|
3328
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js":
|
|
3329
|
-
/*!***********************************************************************************************************************************************************!*\
|
|
3330
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js ***!
|
|
3331
|
-
\***********************************************************************************************************************************************************/
|
|
3332
|
-
/*! exports provided: self, window, global, document, isBrowser, isWorker, isMobile, nodeVersion */
|
|
3333
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3334
|
-
|
|
3335
|
-
"use strict";
|
|
3336
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3337
|
-
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self_; });
|
|
3338
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window_; });
|
|
3339
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "global", function() { return global_; });
|
|
3340
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return document_; });
|
|
3341
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; });
|
|
3342
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWorker", function() { return isWorker; });
|
|
3343
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
|
3344
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeVersion", function() { return nodeVersion; });
|
|
3345
|
-
const globals = {
|
|
3346
|
-
self: typeof self !== 'undefined' && self,
|
|
3347
|
-
window: typeof window !== 'undefined' && window,
|
|
3348
|
-
global: typeof global !== 'undefined' && global,
|
|
3349
|
-
document: typeof document !== 'undefined' && document
|
|
3350
|
-
};
|
|
3351
|
-
const self_ = globals.self || globals.window || globals.global || {};
|
|
3352
|
-
const window_ = globals.window || globals.self || globals.global || {};
|
|
3353
|
-
const global_ = globals.global || globals.self || globals.window || {};
|
|
3354
|
-
const document_ = globals.document || {};
|
|
3355
|
-
|
|
3356
|
-
const isBrowser = typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
3357
|
-
const isWorker = typeof importScripts === 'function';
|
|
3358
|
-
const isMobile = typeof window !== 'undefined' && typeof window.orientation !== 'undefined';
|
|
3359
|
-
const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
3360
|
-
const nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
3361
|
-
|
|
3362
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../../webpack@4.42.0/node_modules/webpack/buildin/global.js */ "../../common/temp/node_modules/.pnpm/webpack@4.42.0/node_modules/webpack/buildin/global.js")))
|
|
3363
|
-
|
|
3364
|
-
/***/ }),
|
|
3365
|
-
|
|
3366
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js":
|
|
3367
|
-
/*!***********************************************************************************************************************************************************!*\
|
|
3368
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js ***!
|
|
3369
|
-
\***********************************************************************************************************************************************************/
|
|
3370
|
-
/*! exports provided: VERSION */
|
|
3371
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3372
|
-
|
|
3373
|
-
"use strict";
|
|
3374
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3375
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
3376
|
-
const DEFAULT_VERSION = 'latest';
|
|
3377
|
-
const VERSION = true ? "3.2.5" : undefined;
|
|
3378
|
-
|
|
3379
|
-
if (false) {}
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
/***/ }),
|
|
3383
|
-
|
|
3384
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js":
|
|
3385
|
-
/*!*********************************************************************************************************************************************************************!*\
|
|
3386
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js ***!
|
|
3387
|
-
\*********************************************************************************************************************************************************************/
|
|
3388
|
-
/*! exports provided: loadLibrary, getLibraryUrl */
|
|
3389
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3390
|
-
|
|
3391
|
-
"use strict";
|
|
3392
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3393
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadLibrary", function() { return loadLibrary; });
|
|
3394
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLibraryUrl", function() { return getLibraryUrl; });
|
|
3395
|
-
/* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
3396
|
-
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node/require-utils.node */ 6);
|
|
3397
|
-
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__);
|
|
3398
|
-
/* 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.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
3399
|
-
/* harmony import */ var _env_utils_version__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../env-utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js");
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
const LATEST = 'latest';
|
|
3405
|
-
const VERSION = true ? "3.2.5" : undefined;
|
|
3406
|
-
const loadLibraryPromises = {};
|
|
3407
|
-
async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
3408
|
-
if (moduleName) {
|
|
3409
|
-
libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
loadLibraryPromises[libraryUrl] = loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);
|
|
3413
|
-
return await loadLibraryPromises[libraryUrl];
|
|
3414
|
-
}
|
|
3415
|
-
function getLibraryUrl(library, moduleName, options) {
|
|
3416
|
-
if (library.startsWith('http')) {
|
|
3417
|
-
return library;
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
const modules = options.modules || {};
|
|
3421
|
-
|
|
3422
|
-
if (modules[library]) {
|
|
3423
|
-
return modules[library];
|
|
3424
|
-
}
|
|
3425
|
-
|
|
3426
|
-
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isBrowser"]) {
|
|
3427
|
-
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
if (options.CDN) {
|
|
3431
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_2__["assert"])(options.CDN.startsWith('http'));
|
|
3432
|
-
return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION, "/dist/libs/").concat(library);
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isWorker"]) {
|
|
3436
|
-
return "../src/libs/".concat(library);
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
return "modules/".concat(moduleName, "/src/libs/").concat(library);
|
|
3440
|
-
}
|
|
3441
|
-
|
|
3442
|
-
async function loadLibraryFromFile(libraryUrl) {
|
|
3443
|
-
if (libraryUrl.endsWith('wasm')) {
|
|
3444
|
-
const response = await fetch(libraryUrl);
|
|
3445
|
-
return await response.arrayBuffer();
|
|
3446
|
-
}
|
|
3447
|
-
|
|
3448
|
-
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isBrowser"]) {
|
|
3449
|
-
try {
|
|
3450
|
-
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__ && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromFile"] && (await _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromFile"](libraryUrl));
|
|
3451
|
-
} catch {
|
|
3452
|
-
return null;
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
|
|
3456
|
-
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isWorker"]) {
|
|
3457
|
-
return importScripts(libraryUrl);
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
const response = await fetch(libraryUrl);
|
|
3461
|
-
const scriptSource = await response.text();
|
|
3462
|
-
return loadLibraryFromString(scriptSource, libraryUrl);
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
function loadLibraryFromString(scriptSource, id) {
|
|
3466
|
-
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isBrowser"]) {
|
|
3467
|
-
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromString"] && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromString"](scriptSource, id);
|
|
3468
|
-
}
|
|
3469
|
-
|
|
3470
|
-
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isWorker"]) {
|
|
3471
|
-
eval.call(_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["global"], scriptSource);
|
|
3472
|
-
return null;
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
const script = document.createElement('script');
|
|
3476
|
-
script.id = id;
|
|
3477
|
-
|
|
3478
|
-
try {
|
|
3479
|
-
script.appendChild(document.createTextNode(scriptSource));
|
|
3480
|
-
} catch (e) {
|
|
3481
|
-
script.text = scriptSource;
|
|
3482
|
-
}
|
|
3483
|
-
|
|
3484
|
-
document.body.appendChild(script);
|
|
3485
|
-
return null;
|
|
3486
|
-
}
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
/***/ }),
|
|
3490
|
-
|
|
3491
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/worker_threads-browser.js":
|
|
3492
|
-
/*!*********************************************************************************************************************************************************************!*\
|
|
3493
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/worker_threads-browser.js ***!
|
|
3494
|
-
\*********************************************************************************************************************************************************************/
|
|
3495
|
-
/*! exports provided: Worker, parentPort */
|
|
3496
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3497
|
-
|
|
3498
|
-
"use strict";
|
|
3499
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3500
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Worker", function() { return Worker; });
|
|
3501
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parentPort", function() { return parentPort; });
|
|
3502
|
-
class Worker {}
|
|
3503
|
-
const parentPort = null;
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
/***/ }),
|
|
3507
|
-
|
|
3508
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/create-worker.js":
|
|
3509
|
-
/*!******************************************************************************************************************************************************************!*\
|
|
3510
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/create-worker.js ***!
|
|
3511
|
-
\******************************************************************************************************************************************************************/
|
|
3512
|
-
/*! exports provided: createWorker */
|
|
3513
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3514
|
-
|
|
3515
|
-
"use strict";
|
|
3516
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3517
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createWorker", function() { return createWorker; });
|
|
3518
|
-
/* harmony import */ var _async_queue_async_queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../async-queue/async-queue */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/async-queue/async-queue.js");
|
|
3519
|
-
/* harmony import */ var _worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../worker-farm/worker-body */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-body.js");
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
let requestId = 0;
|
|
3523
|
-
let inputBatches;
|
|
3524
|
-
let options;
|
|
3525
|
-
function createWorker(process, processInBatches) {
|
|
3526
|
-
if (!_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].inWorkerThread()) {
|
|
3527
|
-
return;
|
|
3528
|
-
}
|
|
3529
|
-
|
|
3530
|
-
const context = {
|
|
3531
|
-
process: processOnMainThread
|
|
3532
|
-
};
|
|
3533
|
-
|
|
3534
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].onmessage = async (type, payload) => {
|
|
3535
|
-
try {
|
|
3536
|
-
switch (type) {
|
|
3537
|
-
case 'process':
|
|
3538
|
-
if (!process) {
|
|
3539
|
-
throw new Error('Worker does not support atomic processing');
|
|
3540
|
-
}
|
|
3541
|
-
|
|
3542
|
-
const result = await process(payload.input, payload.options || {}, context);
|
|
3543
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].postMessage('done', {
|
|
3544
|
-
result
|
|
3545
|
-
});
|
|
3546
|
-
break;
|
|
3547
|
-
|
|
3548
|
-
case 'process-in-batches':
|
|
3549
|
-
if (!processInBatches) {
|
|
3550
|
-
throw new Error('Worker does not support batched processing');
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
|
-
inputBatches = new _async_queue_async_queue__WEBPACK_IMPORTED_MODULE_0__["default"]();
|
|
3554
|
-
options = payload.options || {};
|
|
3555
|
-
const resultIterator = processInBatches(inputBatches, options, context);
|
|
3556
|
-
|
|
3557
|
-
for await (const batch of resultIterator) {
|
|
3558
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].postMessage('output-batch', {
|
|
3559
|
-
result: batch
|
|
3560
|
-
});
|
|
3561
|
-
}
|
|
3562
|
-
|
|
3563
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].postMessage('done', {});
|
|
3564
|
-
break;
|
|
3565
|
-
|
|
3566
|
-
case 'input-batch':
|
|
3567
|
-
inputBatches.push(payload.input);
|
|
3568
|
-
break;
|
|
3569
|
-
|
|
3570
|
-
case 'input-done':
|
|
3571
|
-
inputBatches.close();
|
|
3572
|
-
break;
|
|
3573
|
-
|
|
3574
|
-
default:
|
|
3575
|
-
}
|
|
3576
|
-
} catch (error) {
|
|
3577
|
-
const message = error instanceof Error ? error.message : '';
|
|
3578
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].postMessage('error', {
|
|
3579
|
-
error: message
|
|
3580
|
-
});
|
|
3581
|
-
}
|
|
3582
|
-
};
|
|
3583
|
-
}
|
|
3584
|
-
|
|
3585
|
-
function processOnMainThread(arrayBuffer, options = {}) {
|
|
3586
|
-
return new Promise((resolve, reject) => {
|
|
3587
|
-
const id = requestId++;
|
|
3588
|
-
|
|
3589
|
-
const onMessage = (type, payload) => {
|
|
3590
|
-
if (payload.id !== id) {
|
|
3591
|
-
return;
|
|
3592
|
-
}
|
|
3593
|
-
|
|
3594
|
-
switch (type) {
|
|
3595
|
-
case 'done':
|
|
3596
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].removeEventListener(onMessage);
|
|
3597
|
-
resolve(payload.result);
|
|
3598
|
-
break;
|
|
3599
|
-
|
|
3600
|
-
case 'error':
|
|
3601
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].removeEventListener(onMessage);
|
|
3602
|
-
reject(payload.error);
|
|
3603
|
-
break;
|
|
3604
|
-
|
|
3605
|
-
default:
|
|
3606
|
-
}
|
|
3607
|
-
};
|
|
3608
|
-
|
|
3609
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].addEventListener(onMessage);
|
|
3610
|
-
const payload = {
|
|
3611
|
-
id,
|
|
3612
|
-
input: arrayBuffer,
|
|
3613
|
-
options
|
|
3614
|
-
};
|
|
3615
|
-
_worker_farm_worker_body__WEBPACK_IMPORTED_MODULE_1__["default"].postMessage('process', payload);
|
|
3616
|
-
});
|
|
3617
|
-
}
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
/***/ }),
|
|
3621
|
-
|
|
3622
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js":
|
|
3623
|
-
/*!*******************************************************************************************************************************************************************!*\
|
|
3624
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js ***!
|
|
3625
|
-
\*******************************************************************************************************************************************************************/
|
|
3626
|
-
/*! exports provided: getWorkerName, getWorkerURL */
|
|
3627
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3628
|
-
|
|
3629
|
-
"use strict";
|
|
3630
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3631
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWorkerName", function() { return getWorkerName; });
|
|
3632
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWorkerURL", function() { return getWorkerURL; });
|
|
3633
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
3634
|
-
/* harmony import */ var _env_utils_version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js");
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
const NPM_TAG = 'latest';
|
|
3638
|
-
const VERSION = true ? "3.2.5" : undefined;
|
|
3639
|
-
function getWorkerName(worker) {
|
|
3640
|
-
const warning = worker.version !== VERSION ? " (worker-utils@".concat(VERSION, ")") : '';
|
|
3641
|
-
return "".concat(worker.name, "@").concat(worker.version).concat(warning);
|
|
3642
|
-
}
|
|
3643
|
-
function getWorkerURL(worker, options = {}) {
|
|
3644
|
-
const workerOptions = options[worker.id] || {};
|
|
3645
|
-
const workerFile = "".concat(worker.id, "-worker.js");
|
|
3646
|
-
let url = workerOptions.workerUrl;
|
|
3647
|
-
|
|
3648
|
-
if (!url && worker.id === 'compression') {
|
|
3649
|
-
url = options.workerUrl;
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
if (options._workerType === 'test') {
|
|
3653
|
-
url = "modules/".concat(worker.module, "/dist/").concat(workerFile);
|
|
3654
|
-
}
|
|
3655
|
-
|
|
3656
|
-
if (!url) {
|
|
3657
|
-
let version = worker.version;
|
|
3658
|
-
|
|
3659
|
-
if (version === 'latest') {
|
|
3660
|
-
version = NPM_TAG;
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
const versionTag = version ? "@".concat(version) : '';
|
|
3664
|
-
url = "https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag, "/dist/").concat(workerFile);
|
|
3665
|
-
}
|
|
3666
|
-
|
|
3667
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(url);
|
|
3668
|
-
return url;
|
|
3669
|
-
}
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
/***/ }),
|
|
3673
|
-
|
|
3674
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/process-on-worker.js":
|
|
3675
|
-
/*!**********************************************************************************************************************************************************************!*\
|
|
3676
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/process-on-worker.js ***!
|
|
3677
|
-
\**********************************************************************************************************************************************************************/
|
|
3678
|
-
/*! exports provided: canProcessOnWorker, processOnWorker */
|
|
3679
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3680
|
-
|
|
3681
|
-
"use strict";
|
|
3682
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3683
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canProcessOnWorker", function() { return canProcessOnWorker; });
|
|
3684
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "processOnWorker", function() { return processOnWorker; });
|
|
3685
|
-
/* harmony import */ var _worker_farm_worker_farm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../worker-farm/worker-farm */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js");
|
|
3686
|
-
/* harmony import */ var _worker_utils_remove_nontransferable_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../worker-utils/remove-nontransferable-options */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/remove-nontransferable-options.js");
|
|
3687
|
-
/* harmony import */ var _get_worker_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-worker-url */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js");
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
function canProcessOnWorker(worker, options) {
|
|
3692
|
-
if (!_worker_farm_worker_farm__WEBPACK_IMPORTED_MODULE_0__["default"].isSupported()) {
|
|
3693
|
-
return false;
|
|
3694
|
-
}
|
|
3695
|
-
|
|
3696
|
-
return worker.worker && (options === null || options === void 0 ? void 0 : options.worker);
|
|
3697
|
-
}
|
|
3698
|
-
async function processOnWorker(worker, data, options = {}, context = {}) {
|
|
3699
|
-
const name = Object(_get_worker_url__WEBPACK_IMPORTED_MODULE_2__["getWorkerName"])(worker);
|
|
3700
|
-
const workerFarm = _worker_farm_worker_farm__WEBPACK_IMPORTED_MODULE_0__["default"].getWorkerFarm(options);
|
|
3701
|
-
const {
|
|
3702
|
-
source
|
|
3703
|
-
} = options;
|
|
3704
|
-
const workerPoolProps = {
|
|
3705
|
-
name,
|
|
3706
|
-
source
|
|
3707
|
-
};
|
|
3708
|
-
|
|
3709
|
-
if (!source) {
|
|
3710
|
-
workerPoolProps.url = Object(_get_worker_url__WEBPACK_IMPORTED_MODULE_2__["getWorkerURL"])(worker, options);
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
|
-
const workerPool = workerFarm.getWorkerPool(workerPoolProps);
|
|
3714
|
-
const jobName = options.jobName || worker.name;
|
|
3715
|
-
const job = await workerPool.startJob(jobName, onMessage.bind(null, context));
|
|
3716
|
-
const transferableOptions = Object(_worker_utils_remove_nontransferable_options__WEBPACK_IMPORTED_MODULE_1__["removeNontransferableOptions"])(options);
|
|
3717
|
-
job.postMessage('process', {
|
|
3718
|
-
input: data,
|
|
3719
|
-
options: transferableOptions
|
|
3720
|
-
});
|
|
3721
|
-
const result = await job.result;
|
|
3722
|
-
return result.result;
|
|
3723
|
-
}
|
|
3724
|
-
|
|
3725
|
-
async function onMessage(context, job, type, payload) {
|
|
3726
|
-
switch (type) {
|
|
3727
|
-
case 'done':
|
|
3728
|
-
job.done(payload);
|
|
3729
|
-
break;
|
|
3730
|
-
|
|
3731
|
-
case 'error':
|
|
3732
|
-
job.error(new Error(payload.error));
|
|
3733
|
-
break;
|
|
3734
|
-
|
|
3735
|
-
case 'process':
|
|
3736
|
-
const {
|
|
3737
|
-
id,
|
|
3738
|
-
input,
|
|
3739
|
-
options
|
|
3740
|
-
} = payload;
|
|
3741
|
-
|
|
3742
|
-
try {
|
|
3743
|
-
if (!context.process) {
|
|
3744
|
-
job.postMessage('error', {
|
|
3745
|
-
id,
|
|
3746
|
-
error: 'Worker not set up to process on main thread'
|
|
3747
|
-
});
|
|
3748
|
-
return;
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3751
|
-
const result = await context.process(input, options);
|
|
3752
|
-
job.postMessage('done', {
|
|
3753
|
-
id,
|
|
3754
|
-
result
|
|
3755
|
-
});
|
|
3756
|
-
} catch (error) {
|
|
3757
|
-
const message = error instanceof Error ? error.message : 'unknown error';
|
|
3758
|
-
job.postMessage('error', {
|
|
3759
|
-
id,
|
|
3760
|
-
error: message
|
|
3761
|
-
});
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
break;
|
|
3765
|
-
|
|
3766
|
-
default:
|
|
3767
|
-
console.warn("process-on-worker: unknown message ".concat(type));
|
|
3768
|
-
}
|
|
3769
|
-
}
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
/***/ }),
|
|
3773
|
-
|
|
3774
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/validate-worker-version.js":
|
|
3775
|
-
/*!****************************************************************************************************************************************************************************!*\
|
|
3776
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/validate-worker-version.js ***!
|
|
3777
|
-
\****************************************************************************************************************************************************************************/
|
|
3778
|
-
/*! exports provided: validateWorkerVersion */
|
|
3779
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3780
|
-
|
|
3781
|
-
"use strict";
|
|
3782
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3783
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateWorkerVersion", function() { return validateWorkerVersion; });
|
|
3784
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
3785
|
-
/* harmony import */ var _env_utils_version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js");
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
function validateWorkerVersion(worker, coreVersion = _env_utils_version__WEBPACK_IMPORTED_MODULE_1__["VERSION"]) {
|
|
3789
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(worker, 'no worker provided');
|
|
3790
|
-
const workerVersion = worker.version;
|
|
3791
|
-
|
|
3792
|
-
if (!coreVersion || !workerVersion) {
|
|
3793
|
-
return false;
|
|
3794
|
-
}
|
|
3795
|
-
|
|
3796
|
-
return true;
|
|
3797
|
-
}
|
|
3798
|
-
|
|
3799
|
-
function parseVersion(version) {
|
|
3800
|
-
const parts = version.split('.').map(Number);
|
|
3801
|
-
return {
|
|
3802
|
-
major: parts[0],
|
|
3803
|
-
minor: parts[1]
|
|
3804
|
-
};
|
|
3805
|
-
}
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
/***/ }),
|
|
3809
|
-
|
|
3810
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-body.js":
|
|
3811
|
-
/*!*****************************************************************************************************************************************************************!*\
|
|
3812
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-body.js ***!
|
|
3813
|
-
\*****************************************************************************************************************************************************************/
|
|
3814
|
-
/*! exports provided: default */
|
|
3815
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3816
|
-
|
|
3817
|
-
"use strict";
|
|
3818
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3819
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WorkerBody; });
|
|
3820
|
-
/* harmony import */ var _worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../worker-utils/get-transfer-list */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js");
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
function getParentPort() {
|
|
3824
|
-
let parentPort;
|
|
3825
|
-
|
|
3826
|
-
try {
|
|
3827
|
-
eval('globalThis.parentPort = require(\'worker_threads\').parentPort');
|
|
3828
|
-
parentPort = globalThis.parentPort;
|
|
3829
|
-
} catch {}
|
|
3830
|
-
|
|
3831
|
-
return parentPort;
|
|
3832
|
-
}
|
|
3833
|
-
|
|
3834
|
-
const onMessageWrapperMap = new Map();
|
|
3835
|
-
class WorkerBody {
|
|
3836
|
-
static inWorkerThread() {
|
|
3837
|
-
return typeof self !== 'undefined' || Boolean(getParentPort());
|
|
3838
|
-
}
|
|
3839
|
-
|
|
3840
|
-
static set onmessage(onMessage) {
|
|
3841
|
-
function handleMessage(message) {
|
|
3842
|
-
const parentPort = getParentPort();
|
|
3843
|
-
const {
|
|
3844
|
-
type,
|
|
3845
|
-
payload
|
|
3846
|
-
} = parentPort ? message : message.data;
|
|
3847
|
-
onMessage(type, payload);
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3850
|
-
const parentPort = getParentPort();
|
|
3851
|
-
|
|
3852
|
-
if (parentPort) {
|
|
3853
|
-
parentPort.on('message', handleMessage);
|
|
3854
|
-
parentPort.on('exit', () => console.debug('Node worker closing'));
|
|
3855
|
-
} else {
|
|
3856
|
-
globalThis.onmessage = handleMessage;
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
|
-
|
|
3860
|
-
static addEventListener(onMessage) {
|
|
3861
|
-
let onMessageWrapper = onMessageWrapperMap.get(onMessage);
|
|
3862
|
-
|
|
3863
|
-
if (!onMessageWrapper) {
|
|
3864
|
-
onMessageWrapper = message => {
|
|
3865
|
-
if (!isKnownMessage(message)) {
|
|
3866
|
-
return;
|
|
3867
|
-
}
|
|
3868
|
-
|
|
3869
|
-
const parentPort = getParentPort();
|
|
3870
|
-
const {
|
|
3871
|
-
type,
|
|
3872
|
-
payload
|
|
3873
|
-
} = parentPort ? message : message.data;
|
|
3874
|
-
onMessage(type, payload);
|
|
3875
|
-
};
|
|
3876
|
-
}
|
|
3877
|
-
|
|
3878
|
-
const parentPort = getParentPort();
|
|
3879
|
-
|
|
3880
|
-
if (parentPort) {
|
|
3881
|
-
console.error('not implemented');
|
|
3882
|
-
} else {
|
|
3883
|
-
globalThis.addEventListener('message', onMessageWrapper);
|
|
3884
|
-
}
|
|
3885
|
-
}
|
|
3886
|
-
|
|
3887
|
-
static removeEventListener(onMessage) {
|
|
3888
|
-
const onMessageWrapper = onMessageWrapperMap.get(onMessage);
|
|
3889
|
-
onMessageWrapperMap.delete(onMessage);
|
|
3890
|
-
const parentPort = getParentPort();
|
|
3891
|
-
|
|
3892
|
-
if (parentPort) {
|
|
3893
|
-
console.error('not implemented');
|
|
3894
|
-
} else {
|
|
3895
|
-
globalThis.removeEventListener('message', onMessageWrapper);
|
|
3896
|
-
}
|
|
3897
|
-
}
|
|
3898
|
-
|
|
3899
|
-
static postMessage(type, payload) {
|
|
3900
|
-
const data = {
|
|
3901
|
-
source: 'loaders.gl',
|
|
3902
|
-
type,
|
|
3903
|
-
payload
|
|
3904
|
-
};
|
|
3905
|
-
const transferList = Object(_worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_0__["getTransferList"])(payload);
|
|
3906
|
-
const parentPort = getParentPort();
|
|
3907
|
-
|
|
3908
|
-
if (parentPort) {
|
|
3909
|
-
parentPort.postMessage(data, transferList);
|
|
3910
|
-
} else {
|
|
3911
|
-
globalThis.postMessage(data, transferList);
|
|
3912
|
-
}
|
|
3913
|
-
}
|
|
3914
|
-
|
|
3915
|
-
}
|
|
3916
|
-
|
|
3917
|
-
function isKnownMessage(message) {
|
|
3918
|
-
const {
|
|
3919
|
-
type,
|
|
3920
|
-
data
|
|
3921
|
-
} = message;
|
|
3922
|
-
return type === 'message' && data && typeof data.source === 'string' && data.source.startsWith('loaders.gl');
|
|
3923
|
-
}
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
/***/ }),
|
|
3927
|
-
|
|
3928
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js":
|
|
3929
|
-
/*!*****************************************************************************************************************************************************************!*\
|
|
3930
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js ***!
|
|
3931
|
-
\*****************************************************************************************************************************************************************/
|
|
3932
|
-
/*! exports provided: default */
|
|
3933
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3934
|
-
|
|
3935
|
-
"use strict";
|
|
3936
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3937
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WorkerFarm; });
|
|
3938
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
3939
|
-
/* harmony import */ var _worker_pool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./worker-pool */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js");
|
|
3940
|
-
/* harmony import */ var _worker_thread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./worker-thread */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js");
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
const DEFAULT_PROPS = {
|
|
3945
|
-
maxConcurrency: 3,
|
|
3946
|
-
maxMobileConcurrency: 1,
|
|
3947
|
-
reuseWorkers: true,
|
|
3948
|
-
onDebug: () => {}
|
|
3949
|
-
};
|
|
3950
|
-
class WorkerFarm {
|
|
3951
|
-
static isSupported() {
|
|
3952
|
-
return _worker_thread__WEBPACK_IMPORTED_MODULE_2__["default"].isSupported();
|
|
3953
|
-
}
|
|
3954
|
-
|
|
3955
|
-
static getWorkerFarm(props = {}) {
|
|
3956
|
-
WorkerFarm._workerFarm = WorkerFarm._workerFarm || new WorkerFarm({});
|
|
3957
|
-
|
|
3958
|
-
WorkerFarm._workerFarm.setProps(props);
|
|
3959
|
-
|
|
3960
|
-
return WorkerFarm._workerFarm;
|
|
3961
|
-
}
|
|
3962
|
-
|
|
3963
|
-
constructor(props) {
|
|
3964
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "props", void 0);
|
|
3965
|
-
|
|
3966
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "workerPools", new Map());
|
|
3967
|
-
|
|
3968
|
-
this.props = { ...DEFAULT_PROPS
|
|
3969
|
-
};
|
|
3970
|
-
this.setProps(props);
|
|
3971
|
-
this.workerPools = new Map();
|
|
3972
|
-
}
|
|
3973
|
-
|
|
3974
|
-
destroy() {
|
|
3975
|
-
for (const workerPool of this.workerPools.values()) {
|
|
3976
|
-
workerPool.destroy();
|
|
3977
|
-
}
|
|
3978
|
-
|
|
3979
|
-
this.workerPools = new Map();
|
|
3980
|
-
}
|
|
3981
|
-
|
|
3982
|
-
setProps(props) {
|
|
3983
|
-
this.props = { ...this.props,
|
|
3984
|
-
...props
|
|
3985
|
-
};
|
|
3986
|
-
|
|
3987
|
-
for (const workerPool of this.workerPools.values()) {
|
|
3988
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
3989
|
-
}
|
|
3990
|
-
}
|
|
3991
|
-
|
|
3992
|
-
getWorkerPool(options) {
|
|
3993
|
-
const {
|
|
3994
|
-
name,
|
|
3995
|
-
source,
|
|
3996
|
-
url
|
|
3997
|
-
} = options;
|
|
3998
|
-
let workerPool = this.workerPools.get(name);
|
|
3999
|
-
|
|
4000
|
-
if (!workerPool) {
|
|
4001
|
-
workerPool = new _worker_pool__WEBPACK_IMPORTED_MODULE_1__["default"]({
|
|
4002
|
-
name,
|
|
4003
|
-
source,
|
|
4004
|
-
url
|
|
4005
|
-
});
|
|
4006
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
4007
|
-
this.workerPools.set(name, workerPool);
|
|
4008
|
-
}
|
|
4009
|
-
|
|
4010
|
-
return workerPool;
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
|
-
_getWorkerPoolProps() {
|
|
4014
|
-
return {
|
|
4015
|
-
maxConcurrency: this.props.maxConcurrency,
|
|
4016
|
-
maxMobileConcurrency: this.props.maxMobileConcurrency,
|
|
4017
|
-
reuseWorkers: this.props.reuseWorkers,
|
|
4018
|
-
onDebug: this.props.onDebug
|
|
4019
|
-
};
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
}
|
|
4023
|
-
|
|
4024
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(WorkerFarm, "_workerFarm", void 0);
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
/***/ }),
|
|
4028
|
-
|
|
4029
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js":
|
|
4030
|
-
/*!****************************************************************************************************************************************************************!*\
|
|
4031
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js ***!
|
|
4032
|
-
\****************************************************************************************************************************************************************/
|
|
4033
|
-
/*! exports provided: default */
|
|
4034
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4035
|
-
|
|
4036
|
-
"use strict";
|
|
4037
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4038
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WorkerJob; });
|
|
4039
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
4040
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
class WorkerJob {
|
|
4044
|
-
constructor(jobName, workerThread) {
|
|
4045
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
4046
|
-
|
|
4047
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "workerThread", void 0);
|
|
4048
|
-
|
|
4049
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isRunning", true);
|
|
4050
|
-
|
|
4051
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "result", void 0);
|
|
4052
|
-
|
|
4053
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_resolve", () => {});
|
|
4054
|
-
|
|
4055
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_reject", () => {});
|
|
4056
|
-
|
|
4057
|
-
this.name = jobName;
|
|
4058
|
-
this.workerThread = workerThread;
|
|
4059
|
-
this.result = new Promise((resolve, reject) => {
|
|
4060
|
-
this._resolve = resolve;
|
|
4061
|
-
this._reject = reject;
|
|
4062
|
-
});
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
|
-
postMessage(type, payload) {
|
|
4066
|
-
this.workerThread.postMessage({
|
|
4067
|
-
source: 'loaders.gl',
|
|
4068
|
-
type,
|
|
4069
|
-
payload
|
|
4070
|
-
});
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
done(value) {
|
|
4074
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_1__["assert"])(this.isRunning);
|
|
4075
|
-
this.isRunning = false;
|
|
4076
|
-
|
|
4077
|
-
this._resolve(value);
|
|
4078
|
-
}
|
|
4079
|
-
|
|
4080
|
-
error(error) {
|
|
4081
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_1__["assert"])(this.isRunning);
|
|
4082
|
-
this.isRunning = false;
|
|
4083
|
-
|
|
4084
|
-
this._reject(error);
|
|
4085
|
-
}
|
|
4086
|
-
|
|
4087
|
-
}
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
/***/ }),
|
|
4091
|
-
|
|
4092
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js":
|
|
4093
|
-
/*!*****************************************************************************************************************************************************************!*\
|
|
4094
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js ***!
|
|
4095
|
-
\*****************************************************************************************************************************************************************/
|
|
4096
|
-
/*! exports provided: default */
|
|
4097
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4098
|
-
|
|
4099
|
-
"use strict";
|
|
4100
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4101
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WorkerPool; });
|
|
4102
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
4103
|
-
/* 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.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
4104
|
-
/* harmony import */ var _worker_thread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./worker-thread */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js");
|
|
4105
|
-
/* harmony import */ var _worker_job__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./worker-job */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js");
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
class WorkerPool {
|
|
4111
|
-
static isSupported() {
|
|
4112
|
-
return _worker_thread__WEBPACK_IMPORTED_MODULE_2__["default"].isSupported();
|
|
4113
|
-
}
|
|
4114
|
-
|
|
4115
|
-
constructor(props) {
|
|
4116
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", 'unnamed');
|
|
4117
|
-
|
|
4118
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "source", void 0);
|
|
4119
|
-
|
|
4120
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "url", void 0);
|
|
4121
|
-
|
|
4122
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "maxConcurrency", 1);
|
|
4123
|
-
|
|
4124
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "maxMobileConcurrency", 1);
|
|
4125
|
-
|
|
4126
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "onDebug", () => {});
|
|
4127
|
-
|
|
4128
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "reuseWorkers", true);
|
|
4129
|
-
|
|
4130
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "props", {});
|
|
4131
|
-
|
|
4132
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "jobQueue", []);
|
|
4133
|
-
|
|
4134
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "idleQueue", []);
|
|
4135
|
-
|
|
4136
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "count", 0);
|
|
4137
|
-
|
|
4138
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isDestroyed", false);
|
|
4139
|
-
|
|
4140
|
-
this.source = props.source;
|
|
4141
|
-
this.url = props.url;
|
|
4142
|
-
this.setProps(props);
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
destroy() {
|
|
4146
|
-
this.idleQueue.forEach(worker => worker.destroy());
|
|
4147
|
-
this.isDestroyed = true;
|
|
4148
|
-
}
|
|
4149
|
-
|
|
4150
|
-
setProps(props) {
|
|
4151
|
-
this.props = { ...this.props,
|
|
4152
|
-
...props
|
|
4153
|
-
};
|
|
4154
|
-
|
|
4155
|
-
if (props.name !== undefined) {
|
|
4156
|
-
this.name = props.name;
|
|
4157
|
-
}
|
|
4158
|
-
|
|
4159
|
-
if (props.maxConcurrency !== undefined) {
|
|
4160
|
-
this.maxConcurrency = props.maxConcurrency;
|
|
4161
|
-
}
|
|
4162
|
-
|
|
4163
|
-
if (props.maxMobileConcurrency !== undefined) {
|
|
4164
|
-
this.maxMobileConcurrency = props.maxMobileConcurrency;
|
|
4165
|
-
}
|
|
4166
|
-
|
|
4167
|
-
if (props.reuseWorkers !== undefined) {
|
|
4168
|
-
this.reuseWorkers = props.reuseWorkers;
|
|
4169
|
-
}
|
|
4170
|
-
|
|
4171
|
-
if (props.onDebug !== undefined) {
|
|
4172
|
-
this.onDebug = props.onDebug;
|
|
4173
|
-
}
|
|
4174
|
-
}
|
|
4175
|
-
|
|
4176
|
-
async startJob(name, onMessage = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
|
|
4177
|
-
const startPromise = new Promise(onStart => {
|
|
4178
|
-
this.jobQueue.push({
|
|
4179
|
-
name,
|
|
4180
|
-
onMessage,
|
|
4181
|
-
onError,
|
|
4182
|
-
onStart
|
|
4183
|
-
});
|
|
4184
|
-
return this;
|
|
4185
|
-
});
|
|
4186
|
-
|
|
4187
|
-
this._startQueuedJob();
|
|
4188
|
-
|
|
4189
|
-
return await startPromise;
|
|
4190
|
-
}
|
|
4191
|
-
|
|
4192
|
-
async _startQueuedJob() {
|
|
4193
|
-
if (!this.jobQueue.length) {
|
|
4194
|
-
return;
|
|
4195
|
-
}
|
|
4196
|
-
|
|
4197
|
-
const workerThread = this._getAvailableWorker();
|
|
4198
|
-
|
|
4199
|
-
if (!workerThread) {
|
|
4200
|
-
return;
|
|
4201
|
-
}
|
|
4202
|
-
|
|
4203
|
-
const queuedJob = this.jobQueue.shift();
|
|
4204
|
-
|
|
4205
|
-
if (queuedJob) {
|
|
4206
|
-
this.onDebug({
|
|
4207
|
-
message: 'Starting job',
|
|
4208
|
-
name: queuedJob.name,
|
|
4209
|
-
workerThread,
|
|
4210
|
-
backlog: this.jobQueue.length
|
|
4211
|
-
});
|
|
4212
|
-
const job = new _worker_job__WEBPACK_IMPORTED_MODULE_3__["default"](queuedJob.name, workerThread);
|
|
4213
|
-
|
|
4214
|
-
workerThread.onMessage = data => queuedJob.onMessage(job, data.type, data.payload);
|
|
4215
|
-
|
|
4216
|
-
workerThread.onError = error => queuedJob.onError(job, error);
|
|
4217
|
-
|
|
4218
|
-
queuedJob.onStart(job);
|
|
4219
|
-
|
|
4220
|
-
try {
|
|
4221
|
-
await job.result;
|
|
4222
|
-
} finally {
|
|
4223
|
-
this.returnWorkerToQueue(workerThread);
|
|
4224
|
-
}
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
|
-
|
|
4228
|
-
returnWorkerToQueue(worker) {
|
|
4229
|
-
const shouldDestroyWorker = this.isDestroyed || !this.reuseWorkers || this.count > this._getMaxConcurrency();
|
|
4230
|
-
|
|
4231
|
-
if (shouldDestroyWorker) {
|
|
4232
|
-
worker.destroy();
|
|
4233
|
-
this.count--;
|
|
4234
|
-
} else {
|
|
4235
|
-
this.idleQueue.push(worker);
|
|
4236
|
-
}
|
|
4237
|
-
|
|
4238
|
-
if (!this.isDestroyed) {
|
|
4239
|
-
this._startQueuedJob();
|
|
4240
|
-
}
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
|
-
_getAvailableWorker() {
|
|
4244
|
-
if (this.idleQueue.length > 0) {
|
|
4245
|
-
return this.idleQueue.shift() || null;
|
|
4246
|
-
}
|
|
4247
|
-
|
|
4248
|
-
if (this.count < this._getMaxConcurrency()) {
|
|
4249
|
-
this.count++;
|
|
4250
|
-
const name = "".concat(this.name.toLowerCase(), " (#").concat(this.count, " of ").concat(this.maxConcurrency, ")");
|
|
4251
|
-
return new _worker_thread__WEBPACK_IMPORTED_MODULE_2__["default"]({
|
|
4252
|
-
name,
|
|
4253
|
-
source: this.source,
|
|
4254
|
-
url: this.url
|
|
4255
|
-
});
|
|
4256
|
-
}
|
|
4257
|
-
|
|
4258
|
-
return null;
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
_getMaxConcurrency() {
|
|
4262
|
-
return _env_utils_globals__WEBPACK_IMPORTED_MODULE_1__["isMobile"] ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
4263
|
-
}
|
|
4264
|
-
|
|
4265
|
-
}
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
/***/ }),
|
|
4269
|
-
|
|
4270
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js":
|
|
4271
|
-
/*!*******************************************************************************************************************************************************************!*\
|
|
4272
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js ***!
|
|
4273
|
-
\*******************************************************************************************************************************************************************/
|
|
4274
|
-
/*! exports provided: default */
|
|
4275
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4276
|
-
|
|
4277
|
-
"use strict";
|
|
4278
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4279
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WorkerThread; });
|
|
4280
|
-
/* 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.18.9/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
4281
|
-
/* harmony import */ var _node_worker_threads__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node/worker_threads */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/worker_threads-browser.js");
|
|
4282
|
-
/* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
4283
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
4284
|
-
/* harmony import */ var _worker_utils_get_loadable_worker_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../worker-utils/get-loadable-worker-url */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-loadable-worker-url.js");
|
|
4285
|
-
/* harmony import */ var _worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../worker-utils/get-transfer-list */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js");
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
const NOOP = () => {};
|
|
4294
|
-
|
|
4295
|
-
class WorkerThread {
|
|
4296
|
-
static isSupported() {
|
|
4297
|
-
return typeof Worker !== 'undefined' && _env_utils_globals__WEBPACK_IMPORTED_MODULE_2__["isBrowser"] || typeof _node_worker_threads__WEBPACK_IMPORTED_MODULE_1__["Worker"] !== undefined;
|
|
4298
|
-
}
|
|
4299
|
-
|
|
4300
|
-
constructor(props) {
|
|
4301
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
4302
|
-
|
|
4303
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "source", void 0);
|
|
4304
|
-
|
|
4305
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "url", void 0);
|
|
4306
|
-
|
|
4307
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "terminated", false);
|
|
4308
|
-
|
|
4309
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "worker", void 0);
|
|
4310
|
-
|
|
4311
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "onMessage", void 0);
|
|
4312
|
-
|
|
4313
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "onError", void 0);
|
|
4314
|
-
|
|
4315
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_loadableURL", '');
|
|
4316
|
-
|
|
4317
|
-
const {
|
|
4318
|
-
name,
|
|
4319
|
-
source,
|
|
4320
|
-
url
|
|
4321
|
-
} = props;
|
|
4322
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_3__["assert"])(source || url);
|
|
4323
|
-
this.name = name;
|
|
4324
|
-
this.source = source;
|
|
4325
|
-
this.url = url;
|
|
4326
|
-
this.onMessage = NOOP;
|
|
4327
|
-
|
|
4328
|
-
this.onError = error => console.log(error);
|
|
4329
|
-
|
|
4330
|
-
this.worker = _env_utils_globals__WEBPACK_IMPORTED_MODULE_2__["isBrowser"] ? this._createBrowserWorker() : this._createNodeWorker();
|
|
4331
|
-
}
|
|
4332
|
-
|
|
4333
|
-
destroy() {
|
|
4334
|
-
this.onMessage = NOOP;
|
|
4335
|
-
this.onError = NOOP;
|
|
4336
|
-
this.worker.terminate();
|
|
4337
|
-
this.terminated = true;
|
|
4338
|
-
}
|
|
4339
|
-
|
|
4340
|
-
get isRunning() {
|
|
4341
|
-
return Boolean(this.onMessage);
|
|
4342
|
-
}
|
|
4343
|
-
|
|
4344
|
-
postMessage(data, transferList) {
|
|
4345
|
-
transferList = transferList || Object(_worker_utils_get_transfer_list__WEBPACK_IMPORTED_MODULE_5__["getTransferList"])(data);
|
|
4346
|
-
this.worker.postMessage(data, transferList);
|
|
4347
|
-
}
|
|
4348
|
-
|
|
4349
|
-
_getErrorFromErrorEvent(event) {
|
|
4350
|
-
let message = 'Failed to load ';
|
|
4351
|
-
message += "worker ".concat(this.name, " from ").concat(this.url, ". ");
|
|
4352
|
-
|
|
4353
|
-
if (event.message) {
|
|
4354
|
-
message += "".concat(event.message, " in ");
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
if (event.lineno) {
|
|
4358
|
-
message += ":".concat(event.lineno, ":").concat(event.colno);
|
|
4359
|
-
}
|
|
4360
|
-
|
|
4361
|
-
return new Error(message);
|
|
4362
|
-
}
|
|
4363
|
-
|
|
4364
|
-
_createBrowserWorker() {
|
|
4365
|
-
this._loadableURL = Object(_worker_utils_get_loadable_worker_url__WEBPACK_IMPORTED_MODULE_4__["getLoadableWorkerURL"])({
|
|
4366
|
-
source: this.source,
|
|
4367
|
-
url: this.url
|
|
4368
|
-
});
|
|
4369
|
-
const worker = new Worker(this._loadableURL, {
|
|
4370
|
-
name: this.name
|
|
4371
|
-
});
|
|
4372
|
-
|
|
4373
|
-
worker.onmessage = event => {
|
|
4374
|
-
if (!event.data) {
|
|
4375
|
-
this.onError(new Error('No data received'));
|
|
4376
|
-
} else {
|
|
4377
|
-
this.onMessage(event.data);
|
|
4378
|
-
}
|
|
4379
|
-
};
|
|
4380
|
-
|
|
4381
|
-
worker.onerror = error => {
|
|
4382
|
-
this.onError(this._getErrorFromErrorEvent(error));
|
|
4383
|
-
this.terminated = true;
|
|
4384
|
-
};
|
|
4385
|
-
|
|
4386
|
-
worker.onmessageerror = event => console.error(event);
|
|
4387
|
-
|
|
4388
|
-
return worker;
|
|
4389
|
-
}
|
|
4390
|
-
|
|
4391
|
-
_createNodeWorker() {
|
|
4392
|
-
let worker;
|
|
4393
|
-
|
|
4394
|
-
if (this.url) {
|
|
4395
|
-
const absolute = this.url.includes(':/') || this.url.startsWith('/');
|
|
4396
|
-
const url = absolute ? this.url : "./".concat(this.url);
|
|
4397
|
-
worker = new _node_worker_threads__WEBPACK_IMPORTED_MODULE_1__["Worker"](url, {
|
|
4398
|
-
eval: false
|
|
4399
|
-
});
|
|
4400
|
-
} else if (this.source) {
|
|
4401
|
-
worker = new _node_worker_threads__WEBPACK_IMPORTED_MODULE_1__["Worker"](this.source, {
|
|
4402
|
-
eval: true
|
|
4403
|
-
});
|
|
4404
|
-
} else {
|
|
4405
|
-
throw new Error('no worker');
|
|
4406
|
-
}
|
|
4407
|
-
|
|
4408
|
-
worker.on('message', data => {
|
|
4409
|
-
this.onMessage(data);
|
|
4410
|
-
});
|
|
4411
|
-
worker.on('error', error => {
|
|
4412
|
-
this.onError(error);
|
|
4413
|
-
});
|
|
4414
|
-
worker.on('exit', code => {});
|
|
4415
|
-
return worker;
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
}
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
/***/ }),
|
|
4422
|
-
|
|
4423
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-loadable-worker-url.js":
|
|
4424
|
-
/*!******************************************************************************************************************************************************************************!*\
|
|
4425
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-loadable-worker-url.js ***!
|
|
4426
|
-
\******************************************************************************************************************************************************************************/
|
|
4427
|
-
/*! exports provided: getLoadableWorkerURL */
|
|
4428
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4429
|
-
|
|
4430
|
-
"use strict";
|
|
4431
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4432
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLoadableWorkerURL", function() { return getLoadableWorkerURL; });
|
|
4433
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
4434
|
-
|
|
4435
|
-
const workerURLCache = new Map();
|
|
4436
|
-
function getLoadableWorkerURL(props) {
|
|
4437
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(props.source && !props.url || !props.source && props.url);
|
|
4438
|
-
let workerURL = workerURLCache.get(props.source || props.url);
|
|
4439
|
-
|
|
4440
|
-
if (!workerURL) {
|
|
4441
|
-
if (props.url) {
|
|
4442
|
-
workerURL = getLoadableWorkerURLFromURL(props.url);
|
|
4443
|
-
workerURLCache.set(props.url, workerURL);
|
|
4444
|
-
}
|
|
4445
|
-
|
|
4446
|
-
if (props.source) {
|
|
4447
|
-
workerURL = getLoadableWorkerURLFromSource(props.source);
|
|
4448
|
-
workerURLCache.set(props.source, workerURL);
|
|
4449
|
-
}
|
|
4450
|
-
}
|
|
4451
|
-
|
|
4452
|
-
Object(_env_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(workerURL);
|
|
4453
|
-
return workerURL;
|
|
4454
|
-
}
|
|
4455
|
-
|
|
4456
|
-
function getLoadableWorkerURLFromURL(url) {
|
|
4457
|
-
if (!url.startsWith('http')) {
|
|
4458
|
-
return url;
|
|
4459
|
-
}
|
|
4460
|
-
|
|
4461
|
-
const workerSource = buildScriptSource(url);
|
|
4462
|
-
return getLoadableWorkerURLFromSource(workerSource);
|
|
4463
|
-
}
|
|
4464
|
-
|
|
4465
|
-
function getLoadableWorkerURLFromSource(workerSource) {
|
|
4466
|
-
const blob = new Blob([workerSource], {
|
|
4467
|
-
type: 'application/javascript'
|
|
4468
|
-
});
|
|
4469
|
-
return URL.createObjectURL(blob);
|
|
4470
|
-
}
|
|
4471
|
-
|
|
4472
|
-
function buildScriptSource(workerUrl) {
|
|
4473
|
-
return "try {\n importScripts('".concat(workerUrl, "');\n} catch (error) {\n console.error(error);\n throw error;\n}");
|
|
4474
|
-
}
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
/***/ }),
|
|
4478
|
-
|
|
4479
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js":
|
|
4480
|
-
/*!************************************************************************************************************************************************************************!*\
|
|
4481
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js ***!
|
|
4482
|
-
\************************************************************************************************************************************************************************/
|
|
4483
|
-
/*! exports provided: getTransferList */
|
|
4484
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4485
|
-
|
|
4486
|
-
"use strict";
|
|
4487
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4488
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTransferList", function() { return getTransferList; });
|
|
4489
|
-
function getTransferList(object, recursive = true, transfers) {
|
|
4490
|
-
const transfersSet = transfers || new Set();
|
|
4491
|
-
|
|
4492
|
-
if (!object) {} else if (isTransferable(object)) {
|
|
4493
|
-
transfersSet.add(object);
|
|
4494
|
-
} else if (isTransferable(object.buffer)) {
|
|
4495
|
-
transfersSet.add(object.buffer);
|
|
4496
|
-
} else if (ArrayBuffer.isView(object)) {} else if (recursive && typeof object === 'object') {
|
|
4497
|
-
for (const key in object) {
|
|
4498
|
-
getTransferList(object[key], recursive, transfersSet);
|
|
4499
|
-
}
|
|
4500
|
-
}
|
|
4501
|
-
|
|
4502
|
-
return transfers === undefined ? Array.from(transfersSet) : [];
|
|
4503
|
-
}
|
|
4504
|
-
|
|
4505
|
-
function isTransferable(object) {
|
|
4506
|
-
if (!object) {
|
|
4507
|
-
return false;
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
if (object instanceof ArrayBuffer) {
|
|
4511
|
-
return true;
|
|
4512
|
-
}
|
|
4513
|
-
|
|
4514
|
-
if (typeof MessagePort !== 'undefined' && object instanceof MessagePort) {
|
|
4515
|
-
return true;
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
|
-
if (typeof ImageBitmap !== 'undefined' && object instanceof ImageBitmap) {
|
|
4519
|
-
return true;
|
|
4520
|
-
}
|
|
4521
|
-
|
|
4522
|
-
if (typeof OffscreenCanvas !== 'undefined' && object instanceof OffscreenCanvas) {
|
|
4523
|
-
return true;
|
|
4524
|
-
}
|
|
4525
|
-
|
|
4526
|
-
return false;
|
|
4527
|
-
}
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
/***/ }),
|
|
4531
|
-
|
|
4532
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/remove-nontransferable-options.js":
|
|
4533
|
-
/*!*************************************************************************************************************************************************************************************!*\
|
|
4534
|
-
!*** D:/vsts_a/6/s/common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.2.5/node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/remove-nontransferable-options.js ***!
|
|
4535
|
-
\*************************************************************************************************************************************************************************************/
|
|
4536
|
-
/*! exports provided: removeNontransferableOptions */
|
|
4537
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4538
|
-
|
|
4539
|
-
"use strict";
|
|
4540
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4541
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNontransferableOptions", function() { return removeNontransferableOptions; });
|
|
4542
|
-
function removeNontransferableOptions(object) {
|
|
4543
|
-
return JSON.parse(stringifyJSON(object));
|
|
4544
|
-
}
|
|
4545
|
-
|
|
4546
|
-
function stringifyJSON(v) {
|
|
4547
|
-
const cache = new Set();
|
|
4548
|
-
return JSON.stringify(v, (key, value) => {
|
|
4549
|
-
if (typeof value === 'object' && value !== null) {
|
|
4550
|
-
if (cache.has(value)) {
|
|
4551
|
-
try {
|
|
4552
|
-
return JSON.parse(JSON.stringify(value));
|
|
4553
|
-
} catch (err) {
|
|
4554
|
-
return undefined;
|
|
4555
|
-
}
|
|
4556
|
-
}
|
|
4557
|
-
|
|
4558
|
-
cache.add(value);
|
|
4559
|
-
}
|
|
4560
|
-
|
|
4561
|
-
return value;
|
|
4562
|
-
});
|
|
4563
|
-
}
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
/***/ })
|
|
4567
|
-
|
|
4568
|
-
}]);
|
|
4569
|
-
//# sourceMappingURL=0.bundled-tests.js.map
|