@loaders.gl/tile-converter 4.0.0-alpha.12 → 4.0.0-alpha.14

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.
Files changed (85) hide show
  1. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +0 -1
  2. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
  3. package/dist/3d-tiles-converter/3d-tiles-converter.js +8 -19
  4. package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts +4 -1
  5. package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
  6. package/dist/converter.min.js +66 -66
  7. package/dist/dist.min.js +1381 -331
  8. package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +34 -67
  9. package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
  10. package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
  11. package/dist/es5/deps-installer/deps-installer.js +1 -1
  12. package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
  13. package/dist/es5/i3s-converter/helpers/geometry-converter.js +6 -0
  14. package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
  15. package/dist/es5/i3s-converter/helpers/gltf-attributes.js.map +1 -1
  16. package/dist/es5/i3s-converter/i3s-converter.js +10 -21
  17. package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
  18. package/dist/es5/i3s-converter/types.js.map +1 -1
  19. package/dist/es5/pgm-loader.js +1 -1
  20. package/dist/esm/3d-tiles-converter/3d-tiles-converter.js +8 -18
  21. package/dist/esm/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
  22. package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
  23. package/dist/esm/deps-installer/deps-installer.js +1 -1
  24. package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
  25. package/dist/esm/i3s-converter/helpers/geometry-converter.js +6 -0
  26. package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
  27. package/dist/esm/i3s-converter/helpers/gltf-attributes.js.map +1 -1
  28. package/dist/esm/i3s-converter/i3s-converter.js +0 -7
  29. package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
  30. package/dist/esm/i3s-converter/types.js.map +1 -1
  31. package/dist/esm/pgm-loader.js +1 -1
  32. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +1 -1
  33. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
  34. package/dist/i3s-converter/helpers/geometry-converter.d.ts +2 -3
  35. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
  36. package/dist/i3s-converter/helpers/geometry-converter.js +3 -0
  37. package/dist/i3s-converter/helpers/gltf-attributes.d.ts +2 -2
  38. package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
  39. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  40. package/dist/i3s-converter/i3s-converter.js +0 -5
  41. package/dist/i3s-converter/types.d.ts +32 -1
  42. package/dist/i3s-converter/types.d.ts.map +1 -1
  43. package/dist/i3s-converter/types.js +1 -1
  44. package/package.json +16 -18
  45. package/src/3d-tiles-converter/3d-tiles-converter.ts +10 -28
  46. package/src/3d-tiles-converter/helpers/b3dm-converter.ts +5 -2
  47. package/src/i3s-converter/helpers/batch-ids-extensions.ts +6 -6
  48. package/src/i3s-converter/helpers/geometry-converter.ts +17 -17
  49. package/src/i3s-converter/helpers/gltf-attributes.ts +2 -2
  50. package/src/i3s-converter/i3s-converter.ts +0 -5
  51. package/src/i3s-converter/types.ts +32 -1
  52. package/dist/3d-tiles-attributes-worker.d.ts +0 -28
  53. package/dist/3d-tiles-attributes-worker.d.ts.map +0 -1
  54. package/dist/3d-tiles-attributes-worker.js +0 -3
  55. package/dist/3d-tiles-attributes-worker.js.map +0 -7
  56. package/dist/es5/3d-tiles-attributes-worker.js +0 -25
  57. package/dist/es5/3d-tiles-attributes-worker.js.map +0 -1
  58. package/dist/es5/i3s-attributes-worker.js +0 -25
  59. package/dist/es5/i3s-attributes-worker.js.map +0 -1
  60. package/dist/es5/workers/3d-tiles-attributes-worker.js +0 -28
  61. package/dist/es5/workers/3d-tiles-attributes-worker.js.map +0 -1
  62. package/dist/es5/workers/i3s-attributes-worker.js +0 -30
  63. package/dist/es5/workers/i3s-attributes-worker.js.map +0 -1
  64. package/dist/esm/3d-tiles-attributes-worker.js +0 -16
  65. package/dist/esm/3d-tiles-attributes-worker.js.map +0 -1
  66. package/dist/esm/i3s-attributes-worker.js +0 -16
  67. package/dist/esm/i3s-attributes-worker.js.map +0 -1
  68. package/dist/esm/workers/3d-tiles-attributes-worker.js +0 -8
  69. package/dist/esm/workers/3d-tiles-attributes-worker.js.map +0 -1
  70. package/dist/esm/workers/i3s-attributes-worker.js +0 -7
  71. package/dist/esm/workers/i3s-attributes-worker.js.map +0 -1
  72. package/dist/i3s-attributes-worker.d.ts +0 -45
  73. package/dist/i3s-attributes-worker.d.ts.map +0 -1
  74. package/dist/i3s-attributes-worker.js +0 -9
  75. package/dist/i3s-attributes-worker.js.map +0 -7
  76. package/dist/workers/3d-tiles-attributes-worker.d.ts +0 -2
  77. package/dist/workers/3d-tiles-attributes-worker.d.ts.map +0 -1
  78. package/dist/workers/3d-tiles-attributes-worker.js +0 -9
  79. package/dist/workers/i3s-attributes-worker.d.ts +0 -2
  80. package/dist/workers/i3s-attributes-worker.d.ts.map +0 -1
  81. package/dist/workers/i3s-attributes-worker.js +0 -5
  82. package/src/3d-tiles-attributes-worker.ts +0 -43
  83. package/src/i3s-attributes-worker.ts +0 -59
  84. package/src/workers/3d-tiles-attributes-worker.ts +0 -6
  85. package/src/workers/i3s-attributes-worker.ts +0 -7
package/dist/dist.min.js CHANGED
@@ -214,8 +214,8 @@ var require_assert = __commonJS({
214
214
  Object.defineProperty(exports, "__esModule", {
215
215
  value: true
216
216
  });
217
- exports.default = assert7;
218
- function assert7(condition, message) {
217
+ exports.default = assert8;
218
+ function assert8(condition, message) {
219
219
  if (!condition) {
220
220
  throw new Error("math.gl assertion ".concat(message));
221
221
  }
@@ -1128,9 +1128,9 @@ var require_vec2 = __commonJS({
1128
1128
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
1129
1129
  return { "default": obj };
1130
1130
  }
1131
- var cache2 = _getRequireWildcardCache(nodeInterop);
1132
- if (cache2 && cache2.has(obj)) {
1133
- return cache2.get(obj);
1131
+ var cache3 = _getRequireWildcardCache(nodeInterop);
1132
+ if (cache3 && cache3.has(obj)) {
1133
+ return cache3.get(obj);
1134
1134
  }
1135
1135
  var newObj = {};
1136
1136
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -1145,8 +1145,8 @@ var require_vec2 = __commonJS({
1145
1145
  }
1146
1146
  }
1147
1147
  newObj["default"] = obj;
1148
- if (cache2) {
1149
- cache2.set(obj, newObj);
1148
+ if (cache3) {
1149
+ cache3.set(obj, newObj);
1150
1150
  }
1151
1151
  return newObj;
1152
1152
  }
@@ -1483,9 +1483,9 @@ var require_vector2 = __commonJS({
1483
1483
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
1484
1484
  return { default: obj };
1485
1485
  }
1486
- var cache2 = _getRequireWildcardCache(nodeInterop);
1487
- if (cache2 && cache2.has(obj)) {
1488
- return cache2.get(obj);
1486
+ var cache3 = _getRequireWildcardCache(nodeInterop);
1487
+ if (cache3 && cache3.has(obj)) {
1488
+ return cache3.get(obj);
1489
1489
  }
1490
1490
  var newObj = {};
1491
1491
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -1500,8 +1500,8 @@ var require_vector2 = __commonJS({
1500
1500
  }
1501
1501
  }
1502
1502
  newObj.default = obj;
1503
- if (cache2) {
1504
- cache2.set(obj, newObj);
1503
+ if (cache3) {
1504
+ cache3.set(obj, newObj);
1505
1505
  }
1506
1506
  return newObj;
1507
1507
  }
@@ -1721,9 +1721,9 @@ var require_vec3 = __commonJS({
1721
1721
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
1722
1722
  return { "default": obj };
1723
1723
  }
1724
- var cache2 = _getRequireWildcardCache(nodeInterop);
1725
- if (cache2 && cache2.has(obj)) {
1726
- return cache2.get(obj);
1724
+ var cache3 = _getRequireWildcardCache(nodeInterop);
1725
+ if (cache3 && cache3.has(obj)) {
1726
+ return cache3.get(obj);
1727
1727
  }
1728
1728
  var newObj = {};
1729
1729
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -1738,8 +1738,8 @@ var require_vec3 = __commonJS({
1738
1738
  }
1739
1739
  }
1740
1740
  newObj["default"] = obj;
1741
- if (cache2) {
1742
- cache2.set(obj, newObj);
1741
+ if (cache3) {
1742
+ cache3.set(obj, newObj);
1743
1743
  }
1744
1744
  return newObj;
1745
1745
  }
@@ -2121,9 +2121,9 @@ var require_vector3 = __commonJS({
2121
2121
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
2122
2122
  return { default: obj };
2123
2123
  }
2124
- var cache2 = _getRequireWildcardCache(nodeInterop);
2125
- if (cache2 && cache2.has(obj)) {
2126
- return cache2.get(obj);
2124
+ var cache3 = _getRequireWildcardCache(nodeInterop);
2125
+ if (cache3 && cache3.has(obj)) {
2126
+ return cache3.get(obj);
2127
2127
  }
2128
2128
  var newObj = {};
2129
2129
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -2138,8 +2138,8 @@ var require_vector3 = __commonJS({
2138
2138
  }
2139
2139
  }
2140
2140
  newObj.default = obj;
2141
- if (cache2) {
2142
- cache2.set(obj, newObj);
2141
+ if (cache3) {
2142
+ cache3.set(obj, newObj);
2143
2143
  }
2144
2144
  return newObj;
2145
2145
  }
@@ -2173,15 +2173,15 @@ var require_vector3 = __commonJS({
2173
2173
  }
2174
2174
  var ORIGIN = [0, 0, 0];
2175
2175
  var ZERO2;
2176
- var Vector323 = function(_Vector) {
2177
- (0, _inherits2.default)(Vector324, _Vector);
2178
- var _super = _createSuper(Vector324);
2179
- function Vector324() {
2176
+ var Vector324 = function(_Vector) {
2177
+ (0, _inherits2.default)(Vector325, _Vector);
2178
+ var _super = _createSuper(Vector325);
2179
+ function Vector325() {
2180
2180
  var _this;
2181
2181
  var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
2182
2182
  var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
2183
2183
  var z = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
2184
- (0, _classCallCheck2.default)(this, Vector324);
2184
+ (0, _classCallCheck2.default)(this, Vector325);
2185
2185
  _this = _super.call(this, -0, -0, -0);
2186
2186
  if (arguments.length === 1 && (0, _common.isArray)(x)) {
2187
2187
  _this.copy(x);
@@ -2197,7 +2197,7 @@ var require_vector3 = __commonJS({
2197
2197
  }
2198
2198
  return _this;
2199
2199
  }
2200
- (0, _createClass2.default)(Vector324, [{
2200
+ (0, _createClass2.default)(Vector325, [{
2201
2201
  key: "set",
2202
2202
  value: function set(x, y, z) {
2203
2203
  this[0] = x;
@@ -2318,15 +2318,15 @@ var require_vector3 = __commonJS({
2318
2318
  key: "ZERO",
2319
2319
  get: function get() {
2320
2320
  if (!ZERO2) {
2321
- ZERO2 = new Vector324(0, 0, 0);
2321
+ ZERO2 = new Vector325(0, 0, 0);
2322
2322
  Object.freeze(ZERO2);
2323
2323
  }
2324
2324
  return ZERO2;
2325
2325
  }
2326
2326
  }]);
2327
- return Vector324;
2327
+ return Vector325;
2328
2328
  }(_vector.default);
2329
- exports.default = Vector323;
2329
+ exports.default = Vector324;
2330
2330
  }
2331
2331
  });
2332
2332
 
@@ -2366,9 +2366,9 @@ var require_vector4 = __commonJS({
2366
2366
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
2367
2367
  return { default: obj };
2368
2368
  }
2369
- var cache2 = _getRequireWildcardCache(nodeInterop);
2370
- if (cache2 && cache2.has(obj)) {
2371
- return cache2.get(obj);
2369
+ var cache3 = _getRequireWildcardCache(nodeInterop);
2370
+ if (cache3 && cache3.has(obj)) {
2371
+ return cache3.get(obj);
2372
2372
  }
2373
2373
  var newObj = {};
2374
2374
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -2383,8 +2383,8 @@ var require_vector4 = __commonJS({
2383
2383
  }
2384
2384
  }
2385
2385
  newObj.default = obj;
2386
- if (cache2) {
2387
- cache2.set(obj, newObj);
2386
+ if (cache3) {
2387
+ cache3.set(obj, newObj);
2388
2388
  }
2389
2389
  return newObj;
2390
2390
  }
@@ -2735,9 +2735,9 @@ var require_mat3 = __commonJS({
2735
2735
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
2736
2736
  return { "default": obj };
2737
2737
  }
2738
- var cache2 = _getRequireWildcardCache(nodeInterop);
2739
- if (cache2 && cache2.has(obj)) {
2740
- return cache2.get(obj);
2738
+ var cache3 = _getRequireWildcardCache(nodeInterop);
2739
+ if (cache3 && cache3.has(obj)) {
2740
+ return cache3.get(obj);
2741
2741
  }
2742
2742
  var newObj = {};
2743
2743
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -2752,8 +2752,8 @@ var require_mat3 = __commonJS({
2752
2752
  }
2753
2753
  }
2754
2754
  newObj["default"] = obj;
2755
- if (cache2) {
2756
- cache2.set(obj, newObj);
2755
+ if (cache3) {
2756
+ cache3.set(obj, newObj);
2757
2757
  }
2758
2758
  return newObj;
2759
2759
  }
@@ -3194,9 +3194,9 @@ var require_matrix3 = __commonJS({
3194
3194
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
3195
3195
  return { default: obj };
3196
3196
  }
3197
- var cache2 = _getRequireWildcardCache(nodeInterop);
3198
- if (cache2 && cache2.has(obj)) {
3199
- return cache2.get(obj);
3197
+ var cache3 = _getRequireWildcardCache(nodeInterop);
3198
+ if (cache3 && cache3.has(obj)) {
3199
+ return cache3.get(obj);
3200
3200
  }
3201
3201
  var newObj = {};
3202
3202
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -3211,8 +3211,8 @@ var require_matrix3 = __commonJS({
3211
3211
  }
3212
3212
  }
3213
3213
  newObj.default = obj;
3214
- if (cache2) {
3215
- cache2.set(obj, newObj);
3214
+ if (cache3) {
3215
+ cache3.set(obj, newObj);
3216
3216
  }
3217
3217
  return newObj;
3218
3218
  }
@@ -3553,9 +3553,9 @@ var require_mat4 = __commonJS({
3553
3553
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
3554
3554
  return { "default": obj };
3555
3555
  }
3556
- var cache2 = _getRequireWildcardCache(nodeInterop);
3557
- if (cache2 && cache2.has(obj)) {
3558
- return cache2.get(obj);
3556
+ var cache3 = _getRequireWildcardCache(nodeInterop);
3557
+ if (cache3 && cache3.has(obj)) {
3558
+ return cache3.get(obj);
3559
3559
  }
3560
3560
  var newObj = {};
3561
3561
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -3570,8 +3570,8 @@ var require_mat4 = __commonJS({
3570
3570
  }
3571
3571
  }
3572
3572
  newObj["default"] = obj;
3573
- if (cache2) {
3574
- cache2.set(obj, newObj);
3573
+ if (cache3) {
3574
+ cache3.set(obj, newObj);
3575
3575
  }
3576
3576
  return newObj;
3577
3577
  }
@@ -4849,9 +4849,9 @@ var require_vec4 = __commonJS({
4849
4849
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
4850
4850
  return { "default": obj };
4851
4851
  }
4852
- var cache2 = _getRequireWildcardCache(nodeInterop);
4853
- if (cache2 && cache2.has(obj)) {
4854
- return cache2.get(obj);
4852
+ var cache3 = _getRequireWildcardCache(nodeInterop);
4853
+ if (cache3 && cache3.has(obj)) {
4854
+ return cache3.get(obj);
4855
4855
  }
4856
4856
  var newObj = {};
4857
4857
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -4866,8 +4866,8 @@ var require_vec4 = __commonJS({
4866
4866
  }
4867
4867
  }
4868
4868
  newObj["default"] = obj;
4869
- if (cache2) {
4870
- cache2.set(obj, newObj);
4869
+ if (cache3) {
4870
+ cache3.set(obj, newObj);
4871
4871
  }
4872
4872
  return newObj;
4873
4873
  }
@@ -5216,9 +5216,9 @@ var require_matrix4 = __commonJS({
5216
5216
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
5217
5217
  return { default: obj };
5218
5218
  }
5219
- var cache2 = _getRequireWildcardCache(nodeInterop);
5220
- if (cache2 && cache2.has(obj)) {
5221
- return cache2.get(obj);
5219
+ var cache3 = _getRequireWildcardCache(nodeInterop);
5220
+ if (cache3 && cache3.has(obj)) {
5221
+ return cache3.get(obj);
5222
5222
  }
5223
5223
  var newObj = {};
5224
5224
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -5233,8 +5233,8 @@ var require_matrix4 = __commonJS({
5233
5233
  }
5234
5234
  }
5235
5235
  newObj.default = obj;
5236
- if (cache2) {
5237
- cache2.set(obj, newObj);
5236
+ if (cache3) {
5237
+ cache3.set(obj, newObj);
5238
5238
  }
5239
5239
  return newObj;
5240
5240
  }
@@ -5290,12 +5290,12 @@ var require_matrix4 = __commonJS({
5290
5290
  var DEFAULT_NEAR = 0.1;
5291
5291
  var DEFAULT_FAR = 500;
5292
5292
  var IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
5293
- var Matrix412 = function(_Matrix) {
5294
- (0, _inherits2.default)(Matrix413, _Matrix);
5295
- var _super = _createSuper(Matrix413);
5296
- function Matrix413(array) {
5293
+ var Matrix413 = function(_Matrix) {
5294
+ (0, _inherits2.default)(Matrix414, _Matrix);
5295
+ var _super = _createSuper(Matrix414);
5296
+ function Matrix414(array) {
5297
5297
  var _this;
5298
- (0, _classCallCheck2.default)(this, Matrix413);
5298
+ (0, _classCallCheck2.default)(this, Matrix414);
5299
5299
  _this = _super.call(this, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
5300
5300
  if (arguments.length === 1 && Array.isArray(array)) {
5301
5301
  _this.copy(array);
@@ -5304,7 +5304,7 @@ var require_matrix4 = __commonJS({
5304
5304
  }
5305
5305
  return _this;
5306
5306
  }
5307
- (0, _createClass2.default)(Matrix413, [{
5307
+ (0, _createClass2.default)(Matrix414, [{
5308
5308
  key: "ELEMENTS",
5309
5309
  get: function get() {
5310
5310
  return 16;
@@ -5685,21 +5685,21 @@ var require_matrix4 = __commonJS({
5685
5685
  return getZeroMatrix();
5686
5686
  }
5687
5687
  }]);
5688
- return Matrix413;
5688
+ return Matrix414;
5689
5689
  }(_matrix.default);
5690
- exports.default = Matrix412;
5690
+ exports.default = Matrix413;
5691
5691
  var ZERO2;
5692
5692
  var IDENTITY;
5693
5693
  function getZeroMatrix() {
5694
5694
  if (!ZERO2) {
5695
- ZERO2 = new Matrix412([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
5695
+ ZERO2 = new Matrix413([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
5696
5696
  Object.freeze(ZERO2);
5697
5697
  }
5698
5698
  return ZERO2;
5699
5699
  }
5700
5700
  function getIdentityMatrix() {
5701
5701
  if (!IDENTITY) {
5702
- IDENTITY = new Matrix412();
5702
+ IDENTITY = new Matrix413();
5703
5703
  Object.freeze(IDENTITY);
5704
5704
  }
5705
5705
  return IDENTITY;
@@ -5799,9 +5799,9 @@ var require_quat = __commonJS({
5799
5799
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
5800
5800
  return { "default": obj };
5801
5801
  }
5802
- var cache2 = _getRequireWildcardCache(nodeInterop);
5803
- if (cache2 && cache2.has(obj)) {
5804
- return cache2.get(obj);
5802
+ var cache3 = _getRequireWildcardCache(nodeInterop);
5803
+ if (cache3 && cache3.has(obj)) {
5804
+ return cache3.get(obj);
5805
5805
  }
5806
5806
  var newObj = {};
5807
5807
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -5816,8 +5816,8 @@ var require_quat = __commonJS({
5816
5816
  }
5817
5817
  }
5818
5818
  newObj["default"] = obj;
5819
- if (cache2) {
5820
- cache2.set(obj, newObj);
5819
+ if (cache3) {
5820
+ cache3.set(obj, newObj);
5821
5821
  }
5822
5822
  return newObj;
5823
5823
  }
@@ -6170,9 +6170,9 @@ var require_quaternion = __commonJS({
6170
6170
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
6171
6171
  return { default: obj };
6172
6172
  }
6173
- var cache2 = _getRequireWildcardCache(nodeInterop);
6174
- if (cache2 && cache2.has(obj)) {
6175
- return cache2.get(obj);
6173
+ var cache3 = _getRequireWildcardCache(nodeInterop);
6174
+ if (cache3 && cache3.has(obj)) {
6175
+ return cache3.get(obj);
6176
6176
  }
6177
6177
  var newObj = {};
6178
6178
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -6187,8 +6187,8 @@ var require_quaternion = __commonJS({
6187
6187
  }
6188
6188
  }
6189
6189
  newObj.default = obj;
6190
- if (cache2) {
6191
- cache2.set(obj, newObj);
6190
+ if (cache3) {
6191
+ cache3.set(obj, newObj);
6192
6192
  }
6193
6193
  return newObj;
6194
6194
  }
@@ -6649,9 +6649,9 @@ var require_spherical_coordinates = __commonJS({
6649
6649
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
6650
6650
  return { default: obj };
6651
6651
  }
6652
- var cache2 = _getRequireWildcardCache(nodeInterop);
6653
- if (cache2 && cache2.has(obj)) {
6654
- return cache2.get(obj);
6652
+ var cache3 = _getRequireWildcardCache(nodeInterop);
6653
+ if (cache3 && cache3.has(obj)) {
6654
+ return cache3.get(obj);
6655
6655
  }
6656
6656
  var newObj = {};
6657
6657
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -6666,8 +6666,8 @@ var require_spherical_coordinates = __commonJS({
6666
6666
  }
6667
6667
  }
6668
6668
  newObj.default = obj;
6669
- if (cache2) {
6670
- cache2.set(obj, newObj);
6669
+ if (cache3) {
6670
+ cache3.set(obj, newObj);
6671
6671
  }
6672
6672
  return newObj;
6673
6673
  }
@@ -7848,7 +7848,7 @@ var require_type_utils = __commonJS({
7848
7848
  function identity(x) {
7849
7849
  return x;
7850
7850
  }
7851
- var scratchVector7 = new _core.Vector3();
7851
+ var scratchVector8 = new _core.Vector3();
7852
7852
  function fromCartographic(cartographic) {
7853
7853
  var result = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
7854
7854
  var map = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : identity;
@@ -7902,7 +7902,7 @@ var require_type_utils = __commonJS({
7902
7902
  if (!vector) {
7903
7903
  return false;
7904
7904
  }
7905
- scratchVector7.from(vector);
7905
+ scratchVector8.from(vector);
7906
7906
  var oneOverRadiiSquared = _constants.WGS84_CONSTANTS.oneOverRadiiSquared, centerToleranceSquared = _constants.WGS84_CONSTANTS.centerToleranceSquared;
7907
7907
  var x2 = vector[0] * vector[0] * oneOverRadiiSquared[0];
7908
7908
  var y2 = vector[1] * vector[1] * oneOverRadiiSquared[1];
@@ -7921,16 +7921,16 @@ var require_scale_to_geodetic_surface = __commonJS({
7921
7921
  });
7922
7922
  exports.default = scaleToGeodeticSurface;
7923
7923
  var _core = require_es5();
7924
- var scratchVector7 = new _core.Vector3();
7924
+ var scratchVector8 = new _core.Vector3();
7925
7925
  var scaleToGeodeticSurfaceIntersection = new _core.Vector3();
7926
7926
  var scaleToGeodeticSurfaceGradient = new _core.Vector3();
7927
7927
  function scaleToGeodeticSurface(cartesian, ellipsoid) {
7928
7928
  var result = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
7929
7929
  var oneOverRadii = ellipsoid.oneOverRadii, oneOverRadiiSquared = ellipsoid.oneOverRadiiSquared, centerToleranceSquared = ellipsoid.centerToleranceSquared;
7930
- scratchVector7.from(cartesian);
7931
- var positionX = scratchVector7.x;
7932
- var positionY = scratchVector7.y;
7933
- var positionZ = scratchVector7.z;
7930
+ scratchVector8.from(cartesian);
7931
+ var positionX = scratchVector8.x;
7932
+ var positionY = scratchVector8.y;
7933
+ var positionZ = scratchVector8.z;
7934
7934
  var oneOverRadiiX = oneOverRadii.x;
7935
7935
  var oneOverRadiiY = oneOverRadii.y;
7936
7936
  var oneOverRadiiZ = oneOverRadii.z;
@@ -7952,7 +7952,7 @@ var require_scale_to_geodetic_surface = __commonJS({
7952
7952
  var oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
7953
7953
  var gradient = scaleToGeodeticSurfaceGradient;
7954
7954
  gradient.set(intersection.x * oneOverRadiiSquaredX * 2, intersection.y * oneOverRadiiSquaredY * 2, intersection.z * oneOverRadiiSquaredZ * 2);
7955
- var lambda = (1 - ratio) * scratchVector7.len() / (0.5 * gradient.len());
7955
+ var lambda = (1 - ratio) * scratchVector8.len() / (0.5 * gradient.len());
7956
7956
  var correction = 0;
7957
7957
  var xMultiplier;
7958
7958
  var yMultiplier;
@@ -7974,7 +7974,7 @@ var require_scale_to_geodetic_surface = __commonJS({
7974
7974
  var derivative = -2 * denominator;
7975
7975
  correction = func / derivative;
7976
7976
  } while (Math.abs(func) > _core._MathUtils.EPSILON12);
7977
- return scratchVector7.scale([xMultiplier, yMultiplier, zMultiplier]).to(result);
7977
+ return scratchVector8.scale([xMultiplier, yMultiplier, zMultiplier]).to(result);
7978
7978
  }
7979
7979
  }
7980
7980
  });
@@ -8139,9 +8139,9 @@ var require_ellipsoid = __commonJS({
8139
8139
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
8140
8140
  return { default: obj };
8141
8141
  }
8142
- var cache2 = _getRequireWildcardCache(nodeInterop);
8143
- if (cache2 && cache2.has(obj)) {
8144
- return cache2.get(obj);
8142
+ var cache3 = _getRequireWildcardCache(nodeInterop);
8143
+ if (cache3 && cache3.has(obj)) {
8144
+ return cache3.get(obj);
8145
8145
  }
8146
8146
  var newObj = {};
8147
8147
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -8156,23 +8156,23 @@ var require_ellipsoid = __commonJS({
8156
8156
  }
8157
8157
  }
8158
8158
  newObj.default = obj;
8159
- if (cache2) {
8160
- cache2.set(obj, newObj);
8159
+ if (cache3) {
8160
+ cache3.set(obj, newObj);
8161
8161
  }
8162
8162
  return newObj;
8163
8163
  }
8164
- var scratchVector7 = new _core.Vector3();
8164
+ var scratchVector8 = new _core.Vector3();
8165
8165
  var scratchNormal2 = new _core.Vector3();
8166
8166
  var scratchK = new _core.Vector3();
8167
8167
  var scratchPosition3 = new _core.Vector3();
8168
8168
  var scratchHeight = new _core.Vector3();
8169
8169
  var scratchCartesian = new _core.Vector3();
8170
- var Ellipsoid16 = function() {
8171
- function Ellipsoid17() {
8170
+ var Ellipsoid17 = function() {
8171
+ function Ellipsoid18() {
8172
8172
  var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
8173
8173
  var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
8174
8174
  var z = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
8175
- (0, _classCallCheck2.default)(this, Ellipsoid17);
8175
+ (0, _classCallCheck2.default)(this, Ellipsoid18);
8176
8176
  (0, _defineProperty2.default)(this, "radii", void 0);
8177
8177
  (0, _defineProperty2.default)(this, "radiiSquared", void 0);
8178
8178
  (0, _defineProperty2.default)(this, "radiiToTheFourth", void 0);
@@ -8197,7 +8197,7 @@ var require_ellipsoid = __commonJS({
8197
8197
  }
8198
8198
  Object.freeze(this);
8199
8199
  }
8200
- (0, _createClass2.default)(Ellipsoid17, [{
8200
+ (0, _createClass2.default)(Ellipsoid18, [{
8201
8201
  key: "equals",
8202
8202
  value: function equals2(right) {
8203
8203
  return this === right || Boolean(right && this.radii.equals(right.radii));
@@ -8255,7 +8255,7 @@ var require_ellipsoid = __commonJS({
8255
8255
  key: "geocentricSurfaceNormal",
8256
8256
  value: function geocentricSurfaceNormal(cartesian) {
8257
8257
  var result = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0, 0, 0];
8258
- return scratchVector7.from(cartesian).normalize().to(result);
8258
+ return scratchVector8.from(cartesian).normalize().to(result);
8259
8259
  }
8260
8260
  }, {
8261
8261
  key: "geodeticSurfaceNormalCartographic",
@@ -8265,14 +8265,14 @@ var require_ellipsoid = __commonJS({
8265
8265
  var longitude = cartographicVectorRadians[0];
8266
8266
  var latitude = cartographicVectorRadians[1];
8267
8267
  var cosLatitude = Math.cos(latitude);
8268
- scratchVector7.set(cosLatitude * Math.cos(longitude), cosLatitude * Math.sin(longitude), Math.sin(latitude)).normalize();
8269
- return scratchVector7.to(result);
8268
+ scratchVector8.set(cosLatitude * Math.cos(longitude), cosLatitude * Math.sin(longitude), Math.sin(latitude)).normalize();
8269
+ return scratchVector8.to(result);
8270
8270
  }
8271
8271
  }, {
8272
8272
  key: "geodeticSurfaceNormal",
8273
8273
  value: function geodeticSurfaceNormal(cartesian) {
8274
8274
  var result = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0, 0, 0];
8275
- return scratchVector7.from(cartesian).scale(this.oneOverRadiiSquared).normalize().to(result);
8275
+ return scratchVector8.from(cartesian).scale(this.oneOverRadiiSquared).normalize().to(result);
8276
8276
  }
8277
8277
  }, {
8278
8278
  key: "scaleToGeodeticSurface",
@@ -8318,10 +8318,10 @@ var require_ellipsoid = __commonJS({
8318
8318
  return scratchPosition3.set(0, 0, z).to(result);
8319
8319
  }
8320
8320
  }]);
8321
- return Ellipsoid17;
8321
+ return Ellipsoid18;
8322
8322
  }();
8323
- exports.default = Ellipsoid16;
8324
- (0, _defineProperty2.default)(Ellipsoid16, "WGS84", new Ellipsoid16(_constants.WGS84_RADIUS_X, _constants.WGS84_RADIUS_Y, _constants.WGS84_RADIUS_Z));
8323
+ exports.default = Ellipsoid17;
8324
+ (0, _defineProperty2.default)(Ellipsoid17, "WGS84", new Ellipsoid17(_constants.WGS84_RADIUS_X, _constants.WGS84_RADIUS_Y, _constants.WGS84_RADIUS_Z));
8325
8325
  }
8326
8326
  });
8327
8327
 
@@ -8381,7 +8381,7 @@ var require_axis_aligned_bounding_box = __commonJS({
8381
8381
  var _defineProperty2 = _interopRequireDefault(require_defineProperty());
8382
8382
  var _core = require_es5();
8383
8383
  var _constants = require_constants2();
8384
- var scratchVector7 = new _core.Vector3();
8384
+ var scratchVector8 = new _core.Vector3();
8385
8385
  var scratchNormal2 = new _core.Vector3();
8386
8386
  var AxisAlignedBoundingBox = function() {
8387
8387
  function AxisAlignedBoundingBox2() {
@@ -8393,7 +8393,7 @@ var require_axis_aligned_bounding_box = __commonJS({
8393
8393
  (0, _defineProperty2.default)(this, "halfDiagonal", void 0);
8394
8394
  (0, _defineProperty2.default)(this, "minimum", void 0);
8395
8395
  (0, _defineProperty2.default)(this, "maximum", void 0);
8396
- center = center || scratchVector7.copy(minimum).add(maximum).scale(0.5);
8396
+ center = center || scratchVector8.copy(minimum).add(maximum).scale(0.5);
8397
8397
  this.center = new _core.Vector3(center);
8398
8398
  this.halfDiagonal = new _core.Vector3(maximum).subtract(this.center);
8399
8399
  this.minimum = new _core.Vector3(minimum);
@@ -8441,7 +8441,7 @@ var require_axis_aligned_bounding_box = __commonJS({
8441
8441
  }, {
8442
8442
  key: "distanceSquaredTo",
8443
8443
  value: function distanceSquaredTo(point) {
8444
- var offset = scratchVector7.from(point).subtract(this.center);
8444
+ var offset = scratchVector8.from(point).subtract(this.center);
8445
8445
  var halfDiagonal = this.halfDiagonal;
8446
8446
  var distanceSquared = 0;
8447
8447
  var d;
@@ -8498,9 +8498,9 @@ var require_bounding_sphere = __commonJS({
8498
8498
  if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
8499
8499
  return { default: obj };
8500
8500
  }
8501
- var cache2 = _getRequireWildcardCache(nodeInterop);
8502
- if (cache2 && cache2.has(obj)) {
8503
- return cache2.get(obj);
8501
+ var cache3 = _getRequireWildcardCache(nodeInterop);
8502
+ if (cache3 && cache3.has(obj)) {
8503
+ return cache3.get(obj);
8504
8504
  }
8505
8505
  var newObj = {};
8506
8506
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -8515,12 +8515,12 @@ var require_bounding_sphere = __commonJS({
8515
8515
  }
8516
8516
  }
8517
8517
  newObj.default = obj;
8518
- if (cache2) {
8519
- cache2.set(obj, newObj);
8518
+ if (cache3) {
8519
+ cache3.set(obj, newObj);
8520
8520
  }
8521
8521
  return newObj;
8522
8522
  }
8523
- var scratchVector7 = new _core.Vector3();
8523
+ var scratchVector8 = new _core.Vector3();
8524
8524
  var scratchVector23 = new _core.Vector3();
8525
8525
  var BoundingSphere5 = function() {
8526
8526
  function BoundingSphere6() {
@@ -8543,7 +8543,7 @@ var require_bounding_sphere = __commonJS({
8543
8543
  }, {
8544
8544
  key: "fromCornerPoints",
8545
8545
  value: function fromCornerPoints(corner, oppositeCorner) {
8546
- oppositeCorner = scratchVector7.from(oppositeCorner);
8546
+ oppositeCorner = scratchVector8.from(oppositeCorner);
8547
8547
  this.center = new _core.Vector3().from(corner).add(oppositeCorner).scale(0.5);
8548
8548
  this.radius = this.center.distance(oppositeCorner);
8549
8549
  return this;
@@ -8565,7 +8565,7 @@ var require_bounding_sphere = __commonJS({
8565
8565
  var leftRadius = this.radius;
8566
8566
  var rightCenter = boundingSphere.center;
8567
8567
  var rightRadius = boundingSphere.radius;
8568
- var toRightCenter = scratchVector7.copy(rightCenter).subtract(leftCenter);
8568
+ var toRightCenter = scratchVector8.copy(rightCenter).subtract(leftCenter);
8569
8569
  var centerSeparation = toRightCenter.magnitude();
8570
8570
  if (leftRadius >= centerSeparation + rightRadius) {
8571
8571
  return this.clone();
@@ -8582,7 +8582,7 @@ var require_bounding_sphere = __commonJS({
8582
8582
  }, {
8583
8583
  key: "expand",
8584
8584
  value: function expand(point) {
8585
- var scratchPoint2 = scratchVector7.from(point);
8585
+ var scratchPoint2 = scratchVector8.from(point);
8586
8586
  var radius = scratchPoint2.subtract(this.center).magnitude();
8587
8587
  if (radius > this.radius) {
8588
8588
  this.radius = radius;
@@ -8593,7 +8593,7 @@ var require_bounding_sphere = __commonJS({
8593
8593
  key: "transform",
8594
8594
  value: function transform11(_transform) {
8595
8595
  this.center.transform(_transform);
8596
- var scale = mat4.getScaling(scratchVector7, _transform);
8596
+ var scale = mat4.getScaling(scratchVector8, _transform);
8597
8597
  this.radius = Math.max(scale[0], Math.max(scale[1], scale[2])) * this.radius;
8598
8598
  return this;
8599
8599
  }
@@ -8606,7 +8606,7 @@ var require_bounding_sphere = __commonJS({
8606
8606
  }, {
8607
8607
  key: "distanceTo",
8608
8608
  value: function distanceTo(point) {
8609
- var scratchPoint2 = scratchVector7.from(point);
8609
+ var scratchPoint2 = scratchVector8.from(point);
8610
8610
  var delta = scratchPoint2.subtract(this.center);
8611
8611
  return Math.max(0, delta.len() - this.radius);
8612
8612
  }
@@ -14452,7 +14452,7 @@ var require_graceful_fs = __commonJS({
14452
14452
  gracefulQueue = "___graceful-fs.queue";
14453
14453
  previousSymbol = "___graceful-fs.previous";
14454
14454
  }
14455
- function noop2() {
14455
+ function noop3() {
14456
14456
  }
14457
14457
  function publishQueue(context, queue2) {
14458
14458
  Object.defineProperty(context, gracefulQueue, {
@@ -14461,7 +14461,7 @@ var require_graceful_fs = __commonJS({
14461
14461
  }
14462
14462
  });
14463
14463
  }
14464
- var debug = noop2;
14464
+ var debug = noop3;
14465
14465
  if (util.debuglog)
14466
14466
  debug = util.debuglog("gfs4");
14467
14467
  else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
@@ -17323,8 +17323,8 @@ var require_lodash3 = __commonJS({
17323
17323
  return func(value);
17324
17324
  };
17325
17325
  }
17326
- function cacheHas(cache2, key) {
17327
- return cache2.has(key);
17326
+ function cacheHas(cache3, key) {
17327
+ return cache3.has(key);
17328
17328
  }
17329
17329
  function getValue(object, key) {
17330
17330
  return object == null ? void 0 : object[key];
@@ -17709,8 +17709,8 @@ var require_lodash4 = __commonJS({
17709
17709
  function baseIsNaN(value) {
17710
17710
  return value !== value;
17711
17711
  }
17712
- function cacheHas(cache2, key) {
17713
- return cache2.has(key);
17712
+ function cacheHas(cache3, key) {
17713
+ return cache3.has(key);
17714
17714
  }
17715
17715
  function getValue(object, key) {
17716
17716
  return object == null ? void 0 : object[key];
@@ -17972,7 +17972,7 @@ var require_lodash4 = __commonJS({
17972
17972
  }
17973
17973
  return result;
17974
17974
  }
17975
- var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values) {
17975
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop3 : function(values) {
17976
17976
  return new Set2(values);
17977
17977
  };
17978
17978
  function getMapData(map, key) {
@@ -18036,7 +18036,7 @@ var require_lodash4 = __commonJS({
18036
18036
  function isObjectLike(value) {
18037
18037
  return !!value && typeof value == "object";
18038
18038
  }
18039
- function noop2() {
18039
+ function noop3() {
18040
18040
  }
18041
18041
  module2.exports = union;
18042
18042
  }
@@ -18138,10 +18138,10 @@ var require_old = __commonJS({
18138
18138
  splitRootRe = /^[\/]*/;
18139
18139
  }
18140
18140
  var splitRootRe;
18141
- exports.realpathSync = function realpathSync(p, cache2) {
18141
+ exports.realpathSync = function realpathSync(p, cache3) {
18142
18142
  p = pathModule.resolve(p);
18143
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) {
18144
- return cache2[p];
18143
+ if (cache3 && Object.prototype.hasOwnProperty.call(cache3, p)) {
18144
+ return cache3[p];
18145
18145
  }
18146
18146
  var original = p, seenLinks = {}, knownHard = {};
18147
18147
  var pos;
@@ -18167,18 +18167,18 @@ var require_old = __commonJS({
18167
18167
  current += result[0];
18168
18168
  base = previous + result[1];
18169
18169
  pos = nextPartRe.lastIndex;
18170
- if (knownHard[base] || cache2 && cache2[base] === base) {
18170
+ if (knownHard[base] || cache3 && cache3[base] === base) {
18171
18171
  continue;
18172
18172
  }
18173
18173
  var resolvedLink;
18174
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) {
18175
- resolvedLink = cache2[base];
18174
+ if (cache3 && Object.prototype.hasOwnProperty.call(cache3, base)) {
18175
+ resolvedLink = cache3[base];
18176
18176
  } else {
18177
18177
  var stat2 = fs5.lstatSync(base);
18178
18178
  if (!stat2.isSymbolicLink()) {
18179
18179
  knownHard[base] = true;
18180
- if (cache2)
18181
- cache2[base] = base;
18180
+ if (cache3)
18181
+ cache3[base] = base;
18182
18182
  continue;
18183
18183
  }
18184
18184
  var linkTarget = null;
@@ -18193,26 +18193,26 @@ var require_old = __commonJS({
18193
18193
  linkTarget = fs5.readlinkSync(base);
18194
18194
  }
18195
18195
  resolvedLink = pathModule.resolve(previous, linkTarget);
18196
- if (cache2)
18197
- cache2[base] = resolvedLink;
18196
+ if (cache3)
18197
+ cache3[base] = resolvedLink;
18198
18198
  if (!isWindows)
18199
18199
  seenLinks[id] = linkTarget;
18200
18200
  }
18201
18201
  p = pathModule.resolve(resolvedLink, p.slice(pos));
18202
18202
  start();
18203
18203
  }
18204
- if (cache2)
18205
- cache2[original] = p;
18204
+ if (cache3)
18205
+ cache3[original] = p;
18206
18206
  return p;
18207
18207
  };
18208
- exports.realpath = function realpath(p, cache2, cb) {
18208
+ exports.realpath = function realpath(p, cache3, cb) {
18209
18209
  if (typeof cb !== "function") {
18210
- cb = maybeCallback(cache2);
18211
- cache2 = null;
18210
+ cb = maybeCallback(cache3);
18211
+ cache3 = null;
18212
18212
  }
18213
18213
  p = pathModule.resolve(p);
18214
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) {
18215
- return process.nextTick(cb.bind(null, null, cache2[p]));
18214
+ if (cache3 && Object.prototype.hasOwnProperty.call(cache3, p)) {
18215
+ return process.nextTick(cb.bind(null, null, cache3[p]));
18216
18216
  }
18217
18217
  var original = p, seenLinks = {}, knownHard = {};
18218
18218
  var pos;
@@ -18239,8 +18239,8 @@ var require_old = __commonJS({
18239
18239
  }
18240
18240
  function LOOP() {
18241
18241
  if (pos >= p.length) {
18242
- if (cache2)
18243
- cache2[original] = p;
18242
+ if (cache3)
18243
+ cache3[original] = p;
18244
18244
  return cb(null, p);
18245
18245
  }
18246
18246
  nextPartRe.lastIndex = pos;
@@ -18249,11 +18249,11 @@ var require_old = __commonJS({
18249
18249
  current += result[0];
18250
18250
  base = previous + result[1];
18251
18251
  pos = nextPartRe.lastIndex;
18252
- if (knownHard[base] || cache2 && cache2[base] === base) {
18252
+ if (knownHard[base] || cache3 && cache3[base] === base) {
18253
18253
  return process.nextTick(LOOP);
18254
18254
  }
18255
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) {
18256
- return gotResolvedLink(cache2[base]);
18255
+ if (cache3 && Object.prototype.hasOwnProperty.call(cache3, base)) {
18256
+ return gotResolvedLink(cache3[base]);
18257
18257
  }
18258
18258
  return fs5.lstat(base, gotStat);
18259
18259
  }
@@ -18262,8 +18262,8 @@ var require_old = __commonJS({
18262
18262
  return cb(err);
18263
18263
  if (!stat2.isSymbolicLink()) {
18264
18264
  knownHard[base] = true;
18265
- if (cache2)
18266
- cache2[base] = base;
18265
+ if (cache3)
18266
+ cache3[base] = base;
18267
18267
  return process.nextTick(LOOP);
18268
18268
  }
18269
18269
  if (!isWindows) {
@@ -18286,8 +18286,8 @@ var require_old = __commonJS({
18286
18286
  if (err)
18287
18287
  return cb(err);
18288
18288
  var resolvedLink = pathModule.resolve(previous, target);
18289
- if (cache2)
18290
- cache2[base2] = resolvedLink;
18289
+ if (cache3)
18290
+ cache3[base2] = resolvedLink;
18291
18291
  gotResolvedLink(resolvedLink);
18292
18292
  }
18293
18293
  function gotResolvedLink(resolvedLink) {
@@ -18316,31 +18316,31 @@ var require_fs = __commonJS({
18316
18316
  function newError(er) {
18317
18317
  return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
18318
18318
  }
18319
- function realpath(p, cache2, cb) {
18319
+ function realpath(p, cache3, cb) {
18320
18320
  if (ok) {
18321
- return origRealpath(p, cache2, cb);
18321
+ return origRealpath(p, cache3, cb);
18322
18322
  }
18323
- if (typeof cache2 === "function") {
18324
- cb = cache2;
18325
- cache2 = null;
18323
+ if (typeof cache3 === "function") {
18324
+ cb = cache3;
18325
+ cache3 = null;
18326
18326
  }
18327
- origRealpath(p, cache2, function(er, result) {
18327
+ origRealpath(p, cache3, function(er, result) {
18328
18328
  if (newError(er)) {
18329
- old.realpath(p, cache2, cb);
18329
+ old.realpath(p, cache3, cb);
18330
18330
  } else {
18331
18331
  cb(er, result);
18332
18332
  }
18333
18333
  });
18334
18334
  }
18335
- function realpathSync(p, cache2) {
18335
+ function realpathSync(p, cache3) {
18336
18336
  if (ok) {
18337
- return origRealpathSync(p, cache2);
18337
+ return origRealpathSync(p, cache3);
18338
18338
  }
18339
18339
  try {
18340
- return origRealpathSync(p, cache2);
18340
+ return origRealpathSync(p, cache3);
18341
18341
  } catch (er) {
18342
18342
  if (newError(er)) {
18343
- return old.realpathSync(p, cache2);
18343
+ return old.realpathSync(p, cache3);
18344
18344
  } else {
18345
18345
  throw er;
18346
18346
  }
@@ -19334,7 +19334,7 @@ var require_sync = __commonJS({
19334
19334
  var Glob = require_glob().Glob;
19335
19335
  var util = require("util");
19336
19336
  var path2 = require("path");
19337
- var assert7 = require("assert");
19337
+ var assert8 = require("assert");
19338
19338
  var isAbsolute2 = require_path_is_absolute();
19339
19339
  var common = require_common3();
19340
19340
  var setopts = common.setopts;
@@ -19364,7 +19364,7 @@ var require_sync = __commonJS({
19364
19364
  this._finish();
19365
19365
  }
19366
19366
  GlobSync.prototype._finish = function() {
19367
- assert7.ok(this instanceof GlobSync);
19367
+ assert8.ok(this instanceof GlobSync);
19368
19368
  if (this.realpath) {
19369
19369
  var self2 = this;
19370
19370
  this.matches.forEach(function(matchset, index) {
@@ -19386,7 +19386,7 @@ var require_sync = __commonJS({
19386
19386
  common.finish(this);
19387
19387
  };
19388
19388
  GlobSync.prototype._process = function(pattern, index, inGlobStar) {
19389
- assert7.ok(this instanceof GlobSync);
19389
+ assert8.ok(this instanceof GlobSync);
19390
19390
  var n = 0;
19391
19391
  while (typeof pattern[n] === "string") {
19392
19392
  n++;
@@ -19808,7 +19808,7 @@ var require_glob = __commonJS({
19808
19808
  var inherits = require_inherits2();
19809
19809
  var EE = require("events").EventEmitter;
19810
19810
  var path2 = require("path");
19811
- var assert7 = require("assert");
19811
+ var assert8 = require("assert");
19812
19812
  var isAbsolute2 = require_path_is_absolute();
19813
19813
  var globSync = require_sync();
19814
19814
  var common = require_common3();
@@ -19913,7 +19913,7 @@ var require_glob = __commonJS({
19913
19913
  }
19914
19914
  }
19915
19915
  Glob.prototype._finish = function() {
19916
- assert7(this instanceof Glob);
19916
+ assert8(this instanceof Glob);
19917
19917
  if (this.aborted)
19918
19918
  return;
19919
19919
  if (this.realpath && !this._didRealpath)
@@ -20002,8 +20002,8 @@ var require_glob = __commonJS({
20002
20002
  }
20003
20003
  };
20004
20004
  Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
20005
- assert7(this instanceof Glob);
20006
- assert7(typeof cb === "function");
20005
+ assert8(this instanceof Glob);
20006
+ assert8(typeof cb === "function");
20007
20007
  if (this.aborted)
20008
20008
  return;
20009
20009
  this._processing++;
@@ -22048,7 +22048,7 @@ var require_end_of_stream = __commonJS({
22048
22048
  callback.apply(this, args);
22049
22049
  };
22050
22050
  }
22051
- function noop2() {
22051
+ function noop3() {
22052
22052
  }
22053
22053
  function isRequest(stream) {
22054
22054
  return stream.setHeader && typeof stream.abort === "function";
@@ -22058,7 +22058,7 @@ var require_end_of_stream = __commonJS({
22058
22058
  return eos(stream, null, opts);
22059
22059
  if (!opts)
22060
22060
  opts = {};
22061
- callback = once(callback || noop2);
22061
+ callback = once(callback || noop3);
22062
22062
  var readable = opts.readable || opts.readable !== false && stream.readable;
22063
22063
  var writable = opts.writable || opts.writable !== false && stream.writable;
22064
22064
  var onlegacyfinish = function onlegacyfinish2() {
@@ -23367,7 +23367,7 @@ var require_pipeline = __commonJS({
23367
23367
  var _require$codes = require_errors().codes;
23368
23368
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
23369
23369
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
23370
- function noop2(err) {
23370
+ function noop3(err) {
23371
23371
  if (err)
23372
23372
  throw err;
23373
23373
  }
@@ -23413,9 +23413,9 @@ var require_pipeline = __commonJS({
23413
23413
  }
23414
23414
  function popCallback(streams) {
23415
23415
  if (!streams.length)
23416
- return noop2;
23416
+ return noop3;
23417
23417
  if (typeof streams[streams.length - 1] !== "function")
23418
- return noop2;
23418
+ return noop3;
23419
23419
  return streams.pop();
23420
23420
  }
23421
23421
  function pipeline() {
@@ -25734,7 +25734,7 @@ var require_end_of_stream2 = __commonJS({
25734
25734
  callback.apply(this, args);
25735
25735
  };
25736
25736
  }
25737
- function noop2() {
25737
+ function noop3() {
25738
25738
  }
25739
25739
  function isRequest(stream) {
25740
25740
  return stream.setHeader && typeof stream.abort === "function";
@@ -25744,7 +25744,7 @@ var require_end_of_stream2 = __commonJS({
25744
25744
  return eos(stream, null, opts);
25745
25745
  if (!opts)
25746
25746
  opts = {};
25747
- callback = once(callback || noop2);
25747
+ callback = once(callback || noop3);
25748
25748
  var readable = opts.readable || opts.readable !== false && stream.readable;
25749
25749
  var writable = opts.writable || opts.writable !== false && stream.writable;
25750
25750
  var onlegacyfinish = function onlegacyfinish2() {
@@ -27053,7 +27053,7 @@ var require_pipeline2 = __commonJS({
27053
27053
  var _require$codes = require_errors2().codes;
27054
27054
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
27055
27055
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
27056
- function noop2(err) {
27056
+ function noop3(err) {
27057
27057
  if (err)
27058
27058
  throw err;
27059
27059
  }
@@ -27099,9 +27099,9 @@ var require_pipeline2 = __commonJS({
27099
27099
  }
27100
27100
  function popCallback(streams) {
27101
27101
  if (!streams.length)
27102
- return noop2;
27102
+ return noop3;
27103
27103
  if (typeof streams[streams.length - 1] !== "function")
27104
- return noop2;
27104
+ return noop3;
27105
27105
  return streams.pop();
27106
27106
  }
27107
27107
  function pipeline() {
@@ -28908,7 +28908,7 @@ var require_end_of_stream3 = __commonJS({
28908
28908
  callback.apply(this, args);
28909
28909
  };
28910
28910
  }
28911
- function noop2() {
28911
+ function noop3() {
28912
28912
  }
28913
28913
  function isRequest(stream) {
28914
28914
  return stream.setHeader && typeof stream.abort === "function";
@@ -28918,7 +28918,7 @@ var require_end_of_stream3 = __commonJS({
28918
28918
  return eos(stream, null, opts);
28919
28919
  if (!opts)
28920
28920
  opts = {};
28921
- callback = once(callback || noop2);
28921
+ callback = once(callback || noop3);
28922
28922
  var readable = opts.readable || opts.readable !== false && stream.readable;
28923
28923
  var writable = opts.writable || opts.writable !== false && stream.writable;
28924
28924
  var onlegacyfinish = function onlegacyfinish2() {
@@ -30227,7 +30227,7 @@ var require_pipeline3 = __commonJS({
30227
30227
  var _require$codes = require_errors3().codes;
30228
30228
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
30229
30229
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
30230
- function noop2(err) {
30230
+ function noop3(err) {
30231
30231
  if (err)
30232
30232
  throw err;
30233
30233
  }
@@ -30273,9 +30273,9 @@ var require_pipeline3 = __commonJS({
30273
30273
  }
30274
30274
  function popCallback(streams) {
30275
30275
  if (!streams.length)
30276
- return noop2;
30276
+ return noop3;
30277
30277
  if (typeof streams[streams.length - 1] !== "function")
30278
- return noop2;
30278
+ return noop3;
30279
30279
  return streams.pop();
30280
30280
  }
30281
30281
  function pipeline() {
@@ -32305,7 +32305,7 @@ var require_end_of_stream4 = __commonJS({
32305
32305
  callback.apply(this, args);
32306
32306
  };
32307
32307
  }
32308
- function noop2() {
32308
+ function noop3() {
32309
32309
  }
32310
32310
  function isRequest(stream) {
32311
32311
  return stream.setHeader && typeof stream.abort === "function";
@@ -32315,7 +32315,7 @@ var require_end_of_stream4 = __commonJS({
32315
32315
  return eos(stream, null, opts);
32316
32316
  if (!opts)
32317
32317
  opts = {};
32318
- callback = once(callback || noop2);
32318
+ callback = once(callback || noop3);
32319
32319
  var readable = opts.readable || opts.readable !== false && stream.readable;
32320
32320
  var writable = opts.writable || opts.writable !== false && stream.writable;
32321
32321
  var onlegacyfinish = function onlegacyfinish2() {
@@ -33624,7 +33624,7 @@ var require_pipeline4 = __commonJS({
33624
33624
  var _require$codes = require_errors4().codes;
33625
33625
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
33626
33626
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
33627
- function noop2(err) {
33627
+ function noop3(err) {
33628
33628
  if (err)
33629
33629
  throw err;
33630
33630
  }
@@ -33670,9 +33670,9 @@ var require_pipeline4 = __commonJS({
33670
33670
  }
33671
33671
  function popCallback(streams) {
33672
33672
  if (!streams.length)
33673
- return noop2;
33673
+ return noop3;
33674
33674
  if (typeof streams[streams.length - 1] !== "function")
33675
- return noop2;
33675
+ return noop3;
33676
33676
  return streams.pop();
33677
33677
  }
33678
33678
  function pipeline() {
@@ -35711,7 +35711,7 @@ var require_end_of_stream5 = __commonJS({
35711
35711
  callback.apply(this, args);
35712
35712
  };
35713
35713
  }
35714
- function noop2() {
35714
+ function noop3() {
35715
35715
  }
35716
35716
  function isRequest(stream) {
35717
35717
  return stream.setHeader && typeof stream.abort === "function";
@@ -35721,7 +35721,7 @@ var require_end_of_stream5 = __commonJS({
35721
35721
  return eos(stream, null, opts);
35722
35722
  if (!opts)
35723
35723
  opts = {};
35724
- callback = once(callback || noop2);
35724
+ callback = once(callback || noop3);
35725
35725
  var readable = opts.readable || opts.readable !== false && stream.readable;
35726
35726
  var writable = opts.writable || opts.writable !== false && stream.writable;
35727
35727
  var onlegacyfinish = function onlegacyfinish2() {
@@ -37030,7 +37030,7 @@ var require_pipeline5 = __commonJS({
37030
37030
  var _require$codes = require_errors5().codes;
37031
37031
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
37032
37032
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
37033
- function noop2(err) {
37033
+ function noop3(err) {
37034
37034
  if (err)
37035
37035
  throw err;
37036
37036
  }
@@ -37076,9 +37076,9 @@ var require_pipeline5 = __commonJS({
37076
37076
  }
37077
37077
  function popCallback(streams) {
37078
37078
  if (!streams.length)
37079
- return noop2;
37079
+ return noop3;
37080
37080
  if (typeof streams[streams.length - 1] !== "function")
37081
- return noop2;
37081
+ return noop3;
37082
37082
  return streams.pop();
37083
37083
  }
37084
37084
  function pipeline() {
@@ -37142,7 +37142,7 @@ var require_extract = __commonJS({
37142
37142
  var headers = require_headers();
37143
37143
  var Writable = require_readable6().Writable;
37144
37144
  var PassThrough = require_readable6().PassThrough;
37145
- var noop2 = function() {
37145
+ var noop3 = function() {
37146
37146
  };
37147
37147
  var overflow = function(size) {
37148
37148
  size &= 511;
@@ -37181,7 +37181,7 @@ var require_extract = __commonJS({
37181
37181
  this._buffer = bl();
37182
37182
  this._missing = 0;
37183
37183
  this._partial = false;
37184
- this._onparse = noop2;
37184
+ this._onparse = noop3;
37185
37185
  this._header = null;
37186
37186
  this._stream = null;
37187
37187
  this._overflow = null;
@@ -37329,7 +37329,7 @@ var require_extract = __commonJS({
37329
37329
  if (this._destroyed)
37330
37330
  return;
37331
37331
  var cb = this._cb;
37332
- this._cb = noop2;
37332
+ this._cb = noop3;
37333
37333
  if (this._overflow)
37334
37334
  this._write(this._overflow, void 0, cb);
37335
37335
  else
@@ -37385,7 +37385,7 @@ var require_fs_constants = __commonJS({
37385
37385
  var require_end_of_stream6 = __commonJS({
37386
37386
  "../../node_modules/end-of-stream/index.js"(exports, module2) {
37387
37387
  var once = require_once();
37388
- var noop2 = function() {
37388
+ var noop3 = function() {
37389
37389
  };
37390
37390
  var isRequest = function(stream) {
37391
37391
  return stream.setHeader && typeof stream.abort === "function";
@@ -37398,7 +37398,7 @@ var require_end_of_stream6 = __commonJS({
37398
37398
  return eos(stream, null, opts);
37399
37399
  if (!opts)
37400
37400
  opts = {};
37401
- callback = once(callback || noop2);
37401
+ callback = once(callback || noop3);
37402
37402
  var ws = stream._writableState;
37403
37403
  var rs = stream._readableState;
37404
37404
  var readable = opts.readable || opts.readable !== false && stream.readable;
@@ -37490,7 +37490,7 @@ var require_pack = __commonJS({
37490
37490
  var DMODE = parseInt("755", 8);
37491
37491
  var FMODE = parseInt("644", 8);
37492
37492
  var END_OF_TAR = alloc(1024);
37493
- var noop2 = function() {
37493
+ var noop3 = function() {
37494
37494
  };
37495
37495
  var overflow = function(self2, size) {
37496
37496
  size &= 511;
@@ -37566,7 +37566,7 @@ var require_pack = __commonJS({
37566
37566
  if (!(this instanceof Pack))
37567
37567
  return new Pack(opts);
37568
37568
  Readable.call(this, opts);
37569
- this._drain = noop2;
37569
+ this._drain = noop3;
37570
37570
  this._finalized = false;
37571
37571
  this._finalizing = false;
37572
37572
  this._destroyed = false;
@@ -37583,7 +37583,7 @@ var require_pack = __commonJS({
37583
37583
  buffer = null;
37584
37584
  }
37585
37585
  if (!callback)
37586
- callback = noop2;
37586
+ callback = noop3;
37587
37587
  var self2 = this;
37588
37588
  if (!header.size || header.type === "symlink")
37589
37589
  header.size = 0;
@@ -37707,7 +37707,7 @@ var require_pack = __commonJS({
37707
37707
  };
37708
37708
  Pack.prototype._read = function(n) {
37709
37709
  var drain = this._drain;
37710
- this._drain = noop2;
37710
+ this._drain = noop3;
37711
37711
  drain();
37712
37712
  };
37713
37713
  module2.exports = Pack;
@@ -47432,6 +47432,54 @@ function copyToArray(source, target, targetOffset) {
47432
47432
  return targetOffset + padToNBytes(sourceArray.byteLength, 4);
47433
47433
  }
47434
47434
 
47435
+ // ../loader-utils/src/lib/binary-utils/dataview-copy-utils.ts
47436
+ function padStringToByteAlignment(string, byteAlignment) {
47437
+ const length = string.length;
47438
+ const paddedLength = Math.ceil(length / byteAlignment) * byteAlignment;
47439
+ const padding = paddedLength - length;
47440
+ let whitespace = "";
47441
+ for (let i = 0; i < padding; ++i) {
47442
+ whitespace += " ";
47443
+ }
47444
+ return string + whitespace;
47445
+ }
47446
+ function copyStringToDataView(dataView, byteOffset, string, byteLength) {
47447
+ if (dataView) {
47448
+ for (let i = 0; i < byteLength; i++) {
47449
+ dataView.setUint8(byteOffset + i, string.charCodeAt(i));
47450
+ }
47451
+ }
47452
+ return byteOffset + byteLength;
47453
+ }
47454
+ function copyBinaryToDataView(dataView, byteOffset, binary, byteLength) {
47455
+ if (dataView) {
47456
+ for (let i = 0; i < byteLength; i++) {
47457
+ dataView.setUint8(byteOffset + i, binary[i]);
47458
+ }
47459
+ }
47460
+ return byteOffset + byteLength;
47461
+ }
47462
+ function copyPaddedArrayBufferToDataView(dataView, byteOffset, sourceBuffer, padding) {
47463
+ const paddedLength = padToNBytes(sourceBuffer.byteLength, padding);
47464
+ const padLength = paddedLength - sourceBuffer.byteLength;
47465
+ if (dataView) {
47466
+ const targetArray = new Uint8Array(dataView.buffer, dataView.byteOffset + byteOffset, sourceBuffer.byteLength);
47467
+ const sourceArray = new Uint8Array(sourceBuffer);
47468
+ targetArray.set(sourceArray);
47469
+ for (let i = 0; i < padLength; ++i) {
47470
+ dataView.setUint8(byteOffset + sourceBuffer.byteLength + i, 32);
47471
+ }
47472
+ }
47473
+ byteOffset += paddedLength;
47474
+ return byteOffset;
47475
+ }
47476
+ function copyPaddedStringToDataView(dataView, byteOffset, string, padding) {
47477
+ const textEncoder = new TextEncoder();
47478
+ const stringBuffer = textEncoder.encode(string);
47479
+ byteOffset = copyPaddedArrayBufferToDataView(dataView, byteOffset, stringBuffer, padding);
47480
+ return byteOffset;
47481
+ }
47482
+
47435
47483
  // ../loader-utils/src/lib/iterators/async-iteration.ts
47436
47484
  async function concatenateArrayBuffersAsync(asyncIterator) {
47437
47485
  const arrayBuffers = [];
@@ -48370,23 +48418,23 @@ function formatImage(image, message, scale) {
48370
48418
 
48371
48419
  // ../../node_modules/@probe.gl/log/dist/utils/color.js
48372
48420
  var COLOR;
48373
- (function(COLOR2) {
48374
- COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
48375
- COLOR2[COLOR2["RED"] = 31] = "RED";
48376
- COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
48377
- COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
48378
- COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
48379
- COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
48380
- COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
48381
- COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
48382
- COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
48383
- COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
48384
- COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
48385
- COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
48386
- COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
48387
- COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
48388
- COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
48389
- COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
48421
+ (function(COLOR3) {
48422
+ COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
48423
+ COLOR3[COLOR3["RED"] = 31] = "RED";
48424
+ COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
48425
+ COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
48426
+ COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
48427
+ COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
48428
+ COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
48429
+ COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
48430
+ COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
48431
+ COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
48432
+ COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
48433
+ COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
48434
+ COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
48435
+ COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
48436
+ COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
48437
+ COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
48390
48438
  })(COLOR || (COLOR = {}));
48391
48439
  var BACKGROUND_INCREMENT = 10;
48392
48440
  function getColor(color) {
@@ -49487,6 +49535,12 @@ async function encode(data, writer, options) {
49487
49535
  }
49488
49536
  throw new Error("Writer could not encode data");
49489
49537
  }
49538
+ function encodeSync(data, writer, options) {
49539
+ if (writer.encodeSync) {
49540
+ return writer.encodeSync(data, options);
49541
+ }
49542
+ throw new Error("Writer could not synchronously encode data");
49543
+ }
49490
49544
  function encodeInBatches(data, writer, options) {
49491
49545
  if (writer.encodeInBatches) {
49492
49546
  const dataIterator = getIterator(data);
@@ -51741,6 +51795,12 @@ var TILE3D_TYPE = {
51741
51795
  GLTF: "glTF"
51742
51796
  };
51743
51797
  var TILE3D_TYPES = Object.keys(TILE3D_TYPE);
51798
+ var MAGIC_ARRAY = {
51799
+ BATCHED_MODEL: [98, 51, 100, 109],
51800
+ INSTANCED_MODEL: [105, 51, 100, 109],
51801
+ POINT_CLOUD: [112, 110, 116, 115],
51802
+ COMPOSITE: [99, 109, 112, 116]
51803
+ };
51744
51804
 
51745
51805
  // ../3d-tiles/src/lib/parsers/helpers/parse-utils.ts
51746
51806
  function getStringFromArrayBuffer(arrayBuffer, byteOffset, byteLength) {
@@ -56798,6 +56858,87 @@ async function parse3(arrayBuffer, options = {}, context) {
56798
56858
  return await parseGLTF(gltf, arrayBuffer, byteOffset, options, context);
56799
56859
  }
56800
56860
 
56861
+ // ../gltf/src/lib/encoders/encode-glb.ts
56862
+ var MAGIC_glTF2 = 1179937895;
56863
+ var MAGIC_JSON = 1313821514;
56864
+ var MAGIC_BIN = 5130562;
56865
+ var LE = true;
56866
+ function encodeGLBSync(glb, dataView, byteOffset = 0, options = {}) {
56867
+ const { magic = MAGIC_glTF2, version: version2 = 2, json = {}, binary } = glb;
56868
+ const byteOffsetStart = byteOffset;
56869
+ if (dataView) {
56870
+ dataView.setUint32(byteOffset + 0, magic, LE);
56871
+ dataView.setUint32(byteOffset + 4, version2, LE);
56872
+ dataView.setUint32(byteOffset + 8, 0, LE);
56873
+ }
56874
+ const byteOffsetFileLength = byteOffset + 8;
56875
+ byteOffset += 12;
56876
+ const byteOffsetJsonHeader = byteOffset;
56877
+ if (dataView) {
56878
+ dataView.setUint32(byteOffset + 0, 0, LE);
56879
+ dataView.setUint32(byteOffset + 4, MAGIC_JSON, LE);
56880
+ }
56881
+ byteOffset += 8;
56882
+ const jsonString = JSON.stringify(json);
56883
+ byteOffset = copyPaddedStringToDataView(dataView, byteOffset, jsonString, 4);
56884
+ if (dataView) {
56885
+ const jsonByteLength = byteOffset - byteOffsetJsonHeader - 8;
56886
+ dataView.setUint32(byteOffsetJsonHeader + 0, jsonByteLength, LE);
56887
+ }
56888
+ if (binary) {
56889
+ const byteOffsetBinHeader = byteOffset;
56890
+ if (dataView) {
56891
+ dataView.setUint32(byteOffset + 0, 0, LE);
56892
+ dataView.setUint32(byteOffset + 4, MAGIC_BIN, LE);
56893
+ }
56894
+ byteOffset += 8;
56895
+ byteOffset = copyPaddedArrayBufferToDataView(dataView, byteOffset, binary, 4);
56896
+ if (dataView) {
56897
+ const binByteLength = byteOffset - byteOffsetBinHeader - 8;
56898
+ dataView.setUint32(byteOffsetBinHeader + 0, binByteLength, LE);
56899
+ }
56900
+ }
56901
+ if (dataView) {
56902
+ const fileByteLength = byteOffset - byteOffsetStart;
56903
+ dataView.setUint32(byteOffsetFileLength, fileByteLength, LE);
56904
+ }
56905
+ return byteOffset;
56906
+ }
56907
+
56908
+ // ../gltf/src/lib/encoders/encode-gltf.ts
56909
+ function encodeGLTFSync(gltf, arrayBuffer, byteOffset, options) {
56910
+ convertBuffersToBase64(gltf);
56911
+ return encodeGLBSync(gltf, arrayBuffer, byteOffset, options);
56912
+ }
56913
+ function convertBuffersToBase64(gltf, { firstBuffer = 0 } = {}) {
56914
+ if (gltf.buffers && gltf.buffers.length > firstBuffer) {
56915
+ throw new Error("encodeGLTF: multiple buffers not yet implemented");
56916
+ }
56917
+ }
56918
+
56919
+ // ../gltf/src/gltf-writer.ts
56920
+ var GLTFWriter = {
56921
+ name: "glTF",
56922
+ id: "gltf",
56923
+ module: "gltf",
56924
+ version: VERSION8,
56925
+ extensions: ["glb"],
56926
+ mimeTypes: ["model/gltf-binary"],
56927
+ binary: true,
56928
+ encodeSync: encodeSync2,
56929
+ options: {
56930
+ gltf: {}
56931
+ }
56932
+ };
56933
+ function encodeSync2(gltf, options = {}) {
56934
+ const { byteOffset = 0 } = options;
56935
+ const byteLength = encodeGLTFSync(gltf, null, byteOffset, options);
56936
+ const arrayBuffer = new ArrayBuffer(byteLength);
56937
+ const dataView = new DataView(arrayBuffer);
56938
+ encodeGLTFSync(gltf, dataView, byteOffset, options);
56939
+ return arrayBuffer;
56940
+ }
56941
+
56801
56942
  // ../gltf/src/lib/api/post-process-gltf.ts
56802
56943
  var COMPONENTS2 = {
56803
56944
  SCALAR: 1,
@@ -57455,22 +57596,25 @@ async function parse3DTilesSubtree(data, options, context) {
57455
57596
  if (binaryByteLength) {
57456
57597
  internalBinaryBuffer = data.slice(24 + jsonByteLength);
57457
57598
  }
57458
- if ("bufferView" in subtree.tileAvailability) {
57459
- subtree.tileAvailability.explicitBitstream = await getExplicitBitstream(subtree, "tileAvailability", internalBinaryBuffer, context);
57460
- }
57461
- if ("bufferView" in subtree.contentAvailability) {
57462
- subtree.contentAvailability.explicitBitstream = await getExplicitBitstream(subtree, "contentAvailability", internalBinaryBuffer, context);
57463
- }
57464
- if ("bufferView" in subtree.childSubtreeAvailability) {
57465
- subtree.childSubtreeAvailability.explicitBitstream = await getExplicitBitstream(subtree, "childSubtreeAvailability", internalBinaryBuffer, context);
57599
+ await loadExplicitBitstream(subtree, subtree.tileAvailability, internalBinaryBuffer, context);
57600
+ if (Array.isArray(subtree.contentAvailability)) {
57601
+ for (const contentAvailability of subtree.contentAvailability) {
57602
+ await loadExplicitBitstream(subtree, contentAvailability, internalBinaryBuffer, context);
57603
+ }
57604
+ } else {
57605
+ await loadExplicitBitstream(subtree, subtree.contentAvailability, internalBinaryBuffer, context);
57466
57606
  }
57607
+ await loadExplicitBitstream(subtree, subtree.childSubtreeAvailability, internalBinaryBuffer, context);
57467
57608
  return subtree;
57468
57609
  }
57469
- async function getExplicitBitstream(subtree, name10, internalBinaryBuffer, context) {
57470
- const bufferViewIndex = subtree[name10].bufferView;
57610
+ async function loadExplicitBitstream(subtree, availabilityObject, internalBinaryBuffer, context) {
57611
+ const bufferViewIndex = Number.isFinite(availabilityObject.bitstream) ? availabilityObject.bitstream : availabilityObject.bufferView;
57612
+ if (typeof bufferViewIndex !== "number") {
57613
+ return;
57614
+ }
57471
57615
  const bufferView = subtree.bufferViews[bufferViewIndex];
57472
57616
  const buffer = subtree.buffers[bufferView.buffer];
57473
- if (!context?.url || !context.fetch) {
57617
+ if (!context?.baseUrl) {
57474
57618
  throw new Error("Url is not provided");
57475
57619
  }
57476
57620
  if (!context.fetch) {
@@ -57480,9 +57624,10 @@ async function getExplicitBitstream(subtree, name10, internalBinaryBuffer, conte
57480
57624
  const bufferUri = `${context?.baseUrl || ""}/${buffer.uri}`;
57481
57625
  const response = await context.fetch(bufferUri);
57482
57626
  const data = await response.arrayBuffer();
57483
- return new Uint8Array(data, bufferView.byteOffset, bufferView.byteLength);
57627
+ availabilityObject.explicitBitstream = new Uint8Array(data, bufferView.byteOffset, bufferView.byteLength);
57628
+ return;
57484
57629
  }
57485
- return new Uint8Array(internalBinaryBuffer, bufferView.byteOffset, bufferView.byteLength);
57630
+ availabilityObject.explicitBitstream = new Uint8Array(internalBinaryBuffer, bufferView.byteOffset, bufferView.byteLength);
57486
57631
  }
57487
57632
  function parseUint64Value(buffer) {
57488
57633
  const dataView = new DataView(buffer);
@@ -57504,6 +57649,534 @@ var Tile3DSubtreeLoader = {
57504
57649
  options: {}
57505
57650
  };
57506
57651
 
57652
+ // ../3d-tiles/node_modules/@probe.gl/env/dist/lib/is-electron.js
57653
+ function isElectron2(mockUserAgent) {
57654
+ if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
57655
+ return true;
57656
+ }
57657
+ if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
57658
+ return true;
57659
+ }
57660
+ const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
57661
+ const userAgent = mockUserAgent || realUserAgent;
57662
+ if (userAgent && userAgent.indexOf("Electron") >= 0) {
57663
+ return true;
57664
+ }
57665
+ return false;
57666
+ }
57667
+
57668
+ // ../3d-tiles/node_modules/@probe.gl/env/dist/lib/is-browser.js
57669
+ function isBrowser5() {
57670
+ const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
57671
+ return !isNode || isElectron2();
57672
+ }
57673
+
57674
+ // ../3d-tiles/node_modules/@probe.gl/env/dist/lib/globals.js
57675
+ var self_4 = globalThis.self || globalThis.window || globalThis.global;
57676
+ var window_4 = globalThis.window || globalThis.self || globalThis.global;
57677
+ var document_4 = globalThis.document || {};
57678
+ var process_2 = globalThis.process || {};
57679
+ var console_2 = globalThis.console;
57680
+ var navigator_2 = globalThis.navigator || {};
57681
+
57682
+ // ../3d-tiles/node_modules/@probe.gl/env/dist/utils/globals.js
57683
+ var VERSION12 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
57684
+ var isBrowser6 = isBrowser5();
57685
+
57686
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/local-storage.js
57687
+ function getStorage2(type) {
57688
+ try {
57689
+ const storage = window[type];
57690
+ const x = "__storage_test__";
57691
+ storage.setItem(x, x);
57692
+ storage.removeItem(x);
57693
+ return storage;
57694
+ } catch (e) {
57695
+ return null;
57696
+ }
57697
+ }
57698
+ var LocalStorage2 = class {
57699
+ constructor(id, defaultConfig) {
57700
+ let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
57701
+ this.storage = void 0;
57702
+ this.id = void 0;
57703
+ this.config = void 0;
57704
+ this.storage = getStorage2(type);
57705
+ this.id = id;
57706
+ this.config = defaultConfig;
57707
+ this._loadConfiguration();
57708
+ }
57709
+ getConfiguration() {
57710
+ return this.config;
57711
+ }
57712
+ setConfiguration(configuration) {
57713
+ Object.assign(this.config, configuration);
57714
+ if (this.storage) {
57715
+ const serialized = JSON.stringify(this.config);
57716
+ this.storage.setItem(this.id, serialized);
57717
+ }
57718
+ }
57719
+ _loadConfiguration() {
57720
+ let configuration = {};
57721
+ if (this.storage) {
57722
+ const serializedConfiguration = this.storage.getItem(this.id);
57723
+ configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
57724
+ }
57725
+ Object.assign(this.config, configuration);
57726
+ return this;
57727
+ }
57728
+ };
57729
+
57730
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/formatters.js
57731
+ function formatTime2(ms) {
57732
+ let formatted;
57733
+ if (ms < 10) {
57734
+ formatted = "".concat(ms.toFixed(2), "ms");
57735
+ } else if (ms < 100) {
57736
+ formatted = "".concat(ms.toFixed(1), "ms");
57737
+ } else if (ms < 1e3) {
57738
+ formatted = "".concat(ms.toFixed(0), "ms");
57739
+ } else {
57740
+ formatted = "".concat((ms / 1e3).toFixed(2), "s");
57741
+ }
57742
+ return formatted;
57743
+ }
57744
+ function leftPad2(string) {
57745
+ let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
57746
+ const padLength = Math.max(length - string.length, 0);
57747
+ return "".concat(" ".repeat(padLength)).concat(string);
57748
+ }
57749
+ function formatImage2(image, message, scale) {
57750
+ let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
57751
+ const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
57752
+ if (image.width > maxWidth) {
57753
+ scale = Math.min(scale, maxWidth / image.width);
57754
+ }
57755
+ const width = image.width * scale;
57756
+ const height = image.height * scale;
57757
+ const style = ["font-size:1px;", "padding:".concat(Math.floor(height / 2), "px ").concat(Math.floor(width / 2), "px;"), "line-height:".concat(height, "px;"), "background:url(".concat(imageUrl, ");"), "background-size:".concat(width, "px ").concat(height, "px;"), "color:transparent;"].join("");
57758
+ return ["".concat(message, " %c+"), style];
57759
+ }
57760
+
57761
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/color.js
57762
+ var COLOR2;
57763
+ (function(COLOR3) {
57764
+ COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
57765
+ COLOR3[COLOR3["RED"] = 31] = "RED";
57766
+ COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
57767
+ COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
57768
+ COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
57769
+ COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
57770
+ COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
57771
+ COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
57772
+ COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
57773
+ COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
57774
+ COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
57775
+ COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
57776
+ COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
57777
+ COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
57778
+ COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
57779
+ COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
57780
+ })(COLOR2 || (COLOR2 = {}));
57781
+ var BACKGROUND_INCREMENT2 = 10;
57782
+ function getColor2(color) {
57783
+ if (typeof color !== "string") {
57784
+ return color;
57785
+ }
57786
+ color = color.toUpperCase();
57787
+ return COLOR2[color] || COLOR2.WHITE;
57788
+ }
57789
+ function addColor2(string, color, background) {
57790
+ if (!isBrowser5 && typeof string === "string") {
57791
+ if (color) {
57792
+ const colorCode = getColor2(color);
57793
+ string = "[".concat(colorCode, "m").concat(string, "");
57794
+ }
57795
+ if (background) {
57796
+ const colorCode = getColor2(background);
57797
+ string = "[".concat(colorCode + BACKGROUND_INCREMENT2, "m").concat(string, "");
57798
+ }
57799
+ }
57800
+ return string;
57801
+ }
57802
+
57803
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/autobind.js
57804
+ function autobind2(obj) {
57805
+ let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
57806
+ const proto = Object.getPrototypeOf(obj);
57807
+ const propNames = Object.getOwnPropertyNames(proto);
57808
+ const object = obj;
57809
+ for (const key of propNames) {
57810
+ const value = object[key];
57811
+ if (typeof value === "function") {
57812
+ if (!predefined.find((name10) => key === name10)) {
57813
+ object[key] = value.bind(obj);
57814
+ }
57815
+ }
57816
+ }
57817
+ }
57818
+
57819
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/assert.js
57820
+ function assert7(condition, message) {
57821
+ if (!condition) {
57822
+ throw new Error(message || "Assertion failed");
57823
+ }
57824
+ }
57825
+
57826
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
57827
+ function getHiResTimestamp4() {
57828
+ let timestamp;
57829
+ if (isBrowser5() && window_4.performance) {
57830
+ var _window$performance, _window$performance$n;
57831
+ timestamp = window_4 === null || window_4 === void 0 ? void 0 : (_window$performance = window_4.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
57832
+ } else if ("hrtime" in process_2) {
57833
+ var _process$hrtime;
57834
+ const timeParts = process_2 === null || process_2 === void 0 ? void 0 : (_process$hrtime = process_2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_2);
57835
+ timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
57836
+ } else {
57837
+ timestamp = Date.now();
57838
+ }
57839
+ return timestamp;
57840
+ }
57841
+
57842
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/log.js
57843
+ var originalConsole2 = {
57844
+ debug: isBrowser5() ? console.debug || console.log : console.log,
57845
+ log: console.log,
57846
+ info: console.info,
57847
+ warn: console.warn,
57848
+ error: console.error
57849
+ };
57850
+ var DEFAULT_LOG_CONFIGURATION2 = {
57851
+ enabled: true,
57852
+ level: 0
57853
+ };
57854
+ function noop2() {
57855
+ }
57856
+ var cache2 = {};
57857
+ var ONCE2 = {
57858
+ once: true
57859
+ };
57860
+ var Log2 = class {
57861
+ constructor() {
57862
+ let {
57863
+ id
57864
+ } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
57865
+ id: ""
57866
+ };
57867
+ this.id = void 0;
57868
+ this.VERSION = VERSION12;
57869
+ this._startTs = getHiResTimestamp4();
57870
+ this._deltaTs = getHiResTimestamp4();
57871
+ this._storage = void 0;
57872
+ this.userData = {};
57873
+ this.LOG_THROTTLE_TIMEOUT = 0;
57874
+ this.id = id;
57875
+ this.userData = {};
57876
+ this._storage = new LocalStorage2("__probe-".concat(this.id, "__"), DEFAULT_LOG_CONFIGURATION2);
57877
+ this.timeStamp("".concat(this.id, " started"));
57878
+ autobind2(this);
57879
+ Object.seal(this);
57880
+ }
57881
+ set level(newLevel) {
57882
+ this.setLevel(newLevel);
57883
+ }
57884
+ get level() {
57885
+ return this.getLevel();
57886
+ }
57887
+ isEnabled() {
57888
+ return this._storage.config.enabled;
57889
+ }
57890
+ getLevel() {
57891
+ return this._storage.config.level;
57892
+ }
57893
+ getTotal() {
57894
+ return Number((getHiResTimestamp4() - this._startTs).toPrecision(10));
57895
+ }
57896
+ getDelta() {
57897
+ return Number((getHiResTimestamp4() - this._deltaTs).toPrecision(10));
57898
+ }
57899
+ set priority(newPriority) {
57900
+ this.level = newPriority;
57901
+ }
57902
+ get priority() {
57903
+ return this.level;
57904
+ }
57905
+ getPriority() {
57906
+ return this.level;
57907
+ }
57908
+ enable() {
57909
+ let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
57910
+ this._storage.setConfiguration({
57911
+ enabled
57912
+ });
57913
+ return this;
57914
+ }
57915
+ setLevel(level) {
57916
+ this._storage.setConfiguration({
57917
+ level
57918
+ });
57919
+ return this;
57920
+ }
57921
+ get(setting) {
57922
+ return this._storage.config[setting];
57923
+ }
57924
+ set(setting, value) {
57925
+ this._storage.setConfiguration({
57926
+ [setting]: value
57927
+ });
57928
+ }
57929
+ settings() {
57930
+ if (console.table) {
57931
+ console.table(this._storage.config);
57932
+ } else {
57933
+ console.log(this._storage.config);
57934
+ }
57935
+ }
57936
+ assert(condition, message) {
57937
+ assert7(condition, message);
57938
+ }
57939
+ warn(message) {
57940
+ return this._getLogFunction(0, message, originalConsole2.warn, arguments, ONCE2);
57941
+ }
57942
+ error(message) {
57943
+ return this._getLogFunction(0, message, originalConsole2.error, arguments);
57944
+ }
57945
+ deprecated(oldUsage, newUsage) {
57946
+ return this.warn("`".concat(oldUsage, "` is deprecated and will be removed in a later version. Use `").concat(newUsage, "` instead"));
57947
+ }
57948
+ removed(oldUsage, newUsage) {
57949
+ return this.error("`".concat(oldUsage, "` has been removed. Use `").concat(newUsage, "` instead"));
57950
+ }
57951
+ probe(logLevel, message) {
57952
+ return this._getLogFunction(logLevel, message, originalConsole2.log, arguments, {
57953
+ time: true,
57954
+ once: true
57955
+ });
57956
+ }
57957
+ log(logLevel, message) {
57958
+ return this._getLogFunction(logLevel, message, originalConsole2.debug, arguments);
57959
+ }
57960
+ info(logLevel, message) {
57961
+ return this._getLogFunction(logLevel, message, console.info, arguments);
57962
+ }
57963
+ once(logLevel, message) {
57964
+ return this._getLogFunction(logLevel, message, originalConsole2.debug || originalConsole2.info, arguments, ONCE2);
57965
+ }
57966
+ table(logLevel, table, columns) {
57967
+ if (table) {
57968
+ return this._getLogFunction(logLevel, table, console.table || noop2, columns && [columns], {
57969
+ tag: getTableHeader2(table)
57970
+ });
57971
+ }
57972
+ return noop2;
57973
+ }
57974
+ image(_ref) {
57975
+ let {
57976
+ logLevel,
57977
+ priority,
57978
+ image,
57979
+ message = "",
57980
+ scale = 1
57981
+ } = _ref;
57982
+ if (!this._shouldLog(logLevel || priority)) {
57983
+ return noop2;
57984
+ }
57985
+ return isBrowser5() ? logImageInBrowser2({
57986
+ image,
57987
+ message,
57988
+ scale
57989
+ }) : logImageInNode2({
57990
+ image,
57991
+ message,
57992
+ scale
57993
+ });
57994
+ }
57995
+ time(logLevel, message) {
57996
+ return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
57997
+ }
57998
+ timeEnd(logLevel, message) {
57999
+ return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
58000
+ }
58001
+ timeStamp(logLevel, message) {
58002
+ return this._getLogFunction(logLevel, message, console.timeStamp || noop2);
58003
+ }
58004
+ group(logLevel, message) {
58005
+ let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
58006
+ collapsed: false
58007
+ };
58008
+ const options = normalizeArguments2({
58009
+ logLevel,
58010
+ message,
58011
+ opts
58012
+ });
58013
+ const {
58014
+ collapsed
58015
+ } = opts;
58016
+ options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
58017
+ return this._getLogFunction(options);
58018
+ }
58019
+ groupCollapsed(logLevel, message) {
58020
+ let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
58021
+ return this.group(logLevel, message, Object.assign({}, opts, {
58022
+ collapsed: true
58023
+ }));
58024
+ }
58025
+ groupEnd(logLevel) {
58026
+ return this._getLogFunction(logLevel, "", console.groupEnd || noop2);
58027
+ }
58028
+ withGroup(logLevel, message, func) {
58029
+ this.group(logLevel, message)();
58030
+ try {
58031
+ func();
58032
+ } finally {
58033
+ this.groupEnd(logLevel)();
58034
+ }
58035
+ }
58036
+ trace() {
58037
+ if (console.trace) {
58038
+ console.trace();
58039
+ }
58040
+ }
58041
+ _shouldLog(logLevel) {
58042
+ return this.isEnabled() && this.getLevel() >= normalizeLogLevel2(logLevel);
58043
+ }
58044
+ _getLogFunction(logLevel, message, method, args, opts) {
58045
+ if (this._shouldLog(logLevel)) {
58046
+ opts = normalizeArguments2({
58047
+ logLevel,
58048
+ message,
58049
+ args,
58050
+ opts
58051
+ });
58052
+ method = method || opts.method;
58053
+ assert7(method);
58054
+ opts.total = this.getTotal();
58055
+ opts.delta = this.getDelta();
58056
+ this._deltaTs = getHiResTimestamp4();
58057
+ const tag = opts.tag || opts.message;
58058
+ if (opts.once && tag) {
58059
+ if (!cache2[tag]) {
58060
+ cache2[tag] = getHiResTimestamp4();
58061
+ } else {
58062
+ return noop2;
58063
+ }
58064
+ }
58065
+ message = decorateMessage2(this.id, opts.message, opts);
58066
+ return method.bind(console, message, ...opts.args);
58067
+ }
58068
+ return noop2;
58069
+ }
58070
+ };
58071
+ Log2.VERSION = VERSION12;
58072
+ function normalizeLogLevel2(logLevel) {
58073
+ if (!logLevel) {
58074
+ return 0;
58075
+ }
58076
+ let resolvedLevel;
58077
+ switch (typeof logLevel) {
58078
+ case "number":
58079
+ resolvedLevel = logLevel;
58080
+ break;
58081
+ case "object":
58082
+ resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
58083
+ break;
58084
+ default:
58085
+ return 0;
58086
+ }
58087
+ assert7(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
58088
+ return resolvedLevel;
58089
+ }
58090
+ function normalizeArguments2(opts) {
58091
+ const {
58092
+ logLevel,
58093
+ message
58094
+ } = opts;
58095
+ opts.logLevel = normalizeLogLevel2(logLevel);
58096
+ const args = opts.args ? Array.from(opts.args) : [];
58097
+ while (args.length && args.shift() !== message) {
58098
+ }
58099
+ switch (typeof logLevel) {
58100
+ case "string":
58101
+ case "function":
58102
+ if (message !== void 0) {
58103
+ args.unshift(message);
58104
+ }
58105
+ opts.message = logLevel;
58106
+ break;
58107
+ case "object":
58108
+ Object.assign(opts, logLevel);
58109
+ break;
58110
+ default:
58111
+ }
58112
+ if (typeof opts.message === "function") {
58113
+ opts.message = opts.message();
58114
+ }
58115
+ const messageType = typeof opts.message;
58116
+ assert7(messageType === "string" || messageType === "object");
58117
+ return Object.assign(opts, {
58118
+ args
58119
+ }, opts.opts);
58120
+ }
58121
+ function decorateMessage2(id, message, opts) {
58122
+ if (typeof message === "string") {
58123
+ const time = opts.time ? leftPad2(formatTime2(opts.total)) : "";
58124
+ message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
58125
+ message = addColor2(message, opts.color, opts.background);
58126
+ }
58127
+ return message;
58128
+ }
58129
+ function logImageInNode2(_ref2) {
58130
+ let {
58131
+ image,
58132
+ message = "",
58133
+ scale = 1
58134
+ } = _ref2;
58135
+ console.warn("removed");
58136
+ return noop2;
58137
+ }
58138
+ function logImageInBrowser2(_ref3) {
58139
+ let {
58140
+ image,
58141
+ message = "",
58142
+ scale = 1
58143
+ } = _ref3;
58144
+ if (typeof image === "string") {
58145
+ const img = new Image();
58146
+ img.onload = () => {
58147
+ const args = formatImage2(img, message, scale);
58148
+ console.log(...args);
58149
+ };
58150
+ img.src = image;
58151
+ return noop2;
58152
+ }
58153
+ const element = image.nodeName || "";
58154
+ if (element.toLowerCase() === "img") {
58155
+ console.log(...formatImage2(image, message, scale));
58156
+ return noop2;
58157
+ }
58158
+ if (element.toLowerCase() === "canvas") {
58159
+ const img = new Image();
58160
+ img.onload = () => console.log(...formatImage2(img, message, scale));
58161
+ img.src = image.toDataURL();
58162
+ return noop2;
58163
+ }
58164
+ return noop2;
58165
+ }
58166
+ function getTableHeader2(table) {
58167
+ for (const key in table) {
58168
+ for (const title in table[key]) {
58169
+ return title || "untitled";
58170
+ }
58171
+ }
58172
+ return "empty";
58173
+ }
58174
+
58175
+ // ../3d-tiles/node_modules/@probe.gl/log/dist/index.js
58176
+ var dist_default2 = new Log2({
58177
+ id: "@probe.gl/log"
58178
+ });
58179
+
57507
58180
  // ../../node_modules/long/index.js
57508
58181
  var wasm = null;
57509
58182
  try {
@@ -57815,27 +58488,27 @@ Long.isLong = isLong;
57815
58488
  var INT_CACHE = {};
57816
58489
  var UINT_CACHE = {};
57817
58490
  function fromInt(value, unsigned) {
57818
- var obj, cachedObj, cache2;
58491
+ var obj, cachedObj, cache3;
57819
58492
  if (unsigned) {
57820
58493
  value >>>= 0;
57821
- if (cache2 = 0 <= value && value < 256) {
58494
+ if (cache3 = 0 <= value && value < 256) {
57822
58495
  cachedObj = UINT_CACHE[value];
57823
58496
  if (cachedObj)
57824
58497
  return cachedObj;
57825
58498
  }
57826
58499
  obj = fromBits(value, 0, true);
57827
- if (cache2)
58500
+ if (cache3)
57828
58501
  UINT_CACHE[value] = obj;
57829
58502
  return obj;
57830
58503
  } else {
57831
58504
  value |= 0;
57832
- if (cache2 = -128 <= value && value < 128) {
58505
+ if (cache3 = -128 <= value && value < 128) {
57833
58506
  cachedObj = INT_CACHE[value];
57834
58507
  if (cachedObj)
57835
58508
  return cachedObj;
57836
58509
  }
57837
58510
  obj = fromBits(value, value < 0 ? -1 : 0, false);
57838
- if (cache2)
58511
+ if (cache3)
57839
58512
  INT_CACHE[value] = obj;
57840
58513
  return obj;
57841
58514
  }
@@ -58704,7 +59377,7 @@ function getChildS2VolumeBox(s2VolumeBox, index, subdivisionScheme) {
58704
59377
  }
58705
59378
  async function parseImplicitTiles(params) {
58706
59379
  const {
58707
- options,
59380
+ implicitOptions,
58708
59381
  parentData = {
58709
59382
  mortonIndex: 0,
58710
59383
  x: 0,
@@ -58719,7 +59392,8 @@ async function parseImplicitTiles(params) {
58719
59392
  y: 0,
58720
59393
  z: 0
58721
59394
  },
58722
- s2VolumeBox
59395
+ s2VolumeBox,
59396
+ loaderOptions
58723
59397
  } = params;
58724
59398
  let { subtree, level = 0 } = params;
58725
59399
  const {
@@ -58729,30 +59403,38 @@ async function parseImplicitTiles(params) {
58729
59403
  contentUrlTemplate,
58730
59404
  subtreesUriTemplate,
58731
59405
  basePath
58732
- } = options;
59406
+ } = implicitOptions;
58733
59407
  const tile = { children: [], lodMetricValue: 0, contentUrl: "" };
59408
+ if (!maximumLevel) {
59409
+ dist_default2.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${contentUrlTemplate} won't be loaded...`);
59410
+ return tile;
59411
+ }
59412
+ const lev = level + globalData.level;
59413
+ if (lev > maximumLevel) {
59414
+ return tile;
59415
+ }
58734
59416
  const childrenPerTile = SUBDIVISION_COUNT_MAP[subdivisionScheme];
59417
+ const bitsPerTile = Math.log2(childrenPerTile);
58735
59418
  const childX = childIndex & 1;
58736
59419
  const childY = childIndex >> 1 & 1;
58737
59420
  const childZ = childIndex >> 2 & 1;
58738
59421
  const levelOffset = (childrenPerTile ** level - 1) / (childrenPerTile - 1);
58739
- let childTileMortonIndex = concatBits(parentData.mortonIndex, childIndex);
59422
+ let childTileMortonIndex = concatBits(parentData.mortonIndex, childIndex, bitsPerTile);
58740
59423
  let tileAvailabilityIndex = levelOffset + childTileMortonIndex;
58741
- let childTileX = concatBits(parentData.x, childX);
58742
- let childTileY = concatBits(parentData.y, childY);
58743
- let childTileZ = concatBits(parentData.z, childZ);
59424
+ let childTileX = concatBits(parentData.x, childX, 1);
59425
+ let childTileY = concatBits(parentData.y, childY, 1);
59426
+ let childTileZ = concatBits(parentData.z, childZ, 1);
58744
59427
  let isChildSubtreeAvailable = false;
58745
- if (level + 1 > subtreeLevels) {
59428
+ if (level >= subtreeLevels) {
58746
59429
  isChildSubtreeAvailable = getAvailabilityResult(subtree.childSubtreeAvailability, childTileMortonIndex);
58747
59430
  }
58748
- const x = concatBits(globalData.x, childTileX);
58749
- const y = concatBits(globalData.y, childTileY);
58750
- const z = concatBits(globalData.z, childTileZ);
58751
- const lev = level + globalData.level;
59431
+ const x = concatBits(globalData.x, childTileX, level * bitsPerTile);
59432
+ const y = concatBits(globalData.y, childTileY, level * bitsPerTile);
59433
+ const z = concatBits(globalData.z, childTileZ, level * bitsPerTile);
58752
59434
  if (isChildSubtreeAvailable) {
58753
59435
  const subtreePath = `${basePath}/${subtreesUriTemplate}`;
58754
59436
  const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, lev, x, y, z);
58755
- const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader);
59437
+ const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader, loaderOptions);
58756
59438
  subtree = childSubtree;
58757
59439
  globalData.mortonIndex = childTileMortonIndex;
58758
59440
  globalData.x = childTileX;
@@ -58767,7 +59449,7 @@ async function parseImplicitTiles(params) {
58767
59449
  level = 0;
58768
59450
  }
58769
59451
  const isTileAvailable = getAvailabilityResult(subtree.tileAvailability, tileAvailabilityIndex);
58770
- if (!isTileAvailable || level > maximumLevel) {
59452
+ if (!isTileAvailable) {
58771
59453
  return tile;
58772
59454
  }
58773
59455
  const isContentAvailable = getAvailabilityResult(subtree.contentAvailability, tileAvailabilityIndex);
@@ -58780,28 +59462,38 @@ async function parseImplicitTiles(params) {
58780
59462
  const childS2VolumeBox = getChildS2VolumeBox(s2VolumeBox, index, subdivisionScheme);
58781
59463
  const childTileParsed = await parseImplicitTiles({
58782
59464
  subtree,
58783
- options,
59465
+ implicitOptions,
59466
+ loaderOptions,
58784
59467
  parentData: pData,
58785
59468
  childIndex: index,
58786
59469
  level: childTileLevel,
58787
- globalData,
59470
+ globalData: { ...globalData },
58788
59471
  s2VolumeBox: childS2VolumeBox
58789
59472
  });
58790
59473
  if (childTileParsed.contentUrl || childTileParsed.children.length) {
58791
59474
  const globalLevel = lev + 1;
58792
59475
  const childCoordinates = { childTileX, childTileY, childTileZ };
58793
- const formattedTile = formatTileData(childTileParsed, globalLevel, childCoordinates, options, s2VolumeBox);
59476
+ const formattedTile = formatTileData(childTileParsed, globalLevel, childCoordinates, implicitOptions, s2VolumeBox);
58794
59477
  tile.children.push(formattedTile);
58795
59478
  }
58796
59479
  }
58797
59480
  return tile;
58798
59481
  }
58799
59482
  function getAvailabilityResult(availabilityData, index) {
58800
- if ("constant" in availabilityData) {
58801
- return Boolean(availabilityData.constant);
59483
+ let availabilityObject;
59484
+ if (Array.isArray(availabilityData)) {
59485
+ availabilityObject = availabilityData[0];
59486
+ if (availabilityData.length > 1) {
59487
+ dist_default2.once('Not supported extension "3DTILES_multiple_contents" has been detected');
59488
+ }
59489
+ } else {
59490
+ availabilityObject = availabilityData;
59491
+ }
59492
+ if ("constant" in availabilityObject) {
59493
+ return Boolean(availabilityObject.constant);
58802
59494
  }
58803
- if (availabilityData.explicitBitstream) {
58804
- return getBooleanValueFromBitstream(index, availabilityData.explicitBitstream);
59495
+ if (availabilityObject.explicitBitstream) {
59496
+ return getBooleanValueFromBitstream(index, availabilityObject.explicitBitstream);
58805
59497
  }
58806
59498
  return false;
58807
59499
  }
@@ -58856,8 +59548,8 @@ function calculateBoundingVolumeForChildTile(level, rootBoundingVolume, childCoo
58856
59548
  }
58857
59549
  throw new Error(`Unsupported bounding volume type ${rootBoundingVolume}`);
58858
59550
  }
58859
- function concatBits(first, second) {
58860
- return parseInt(first.toString(2) + second.toString(2), 2);
59551
+ function concatBits(higher, lower, shift) {
59552
+ return (higher << shift) + lower;
58861
59553
  }
58862
59554
  function replaceContentUrlTemplate(templateUrl, level, x, y, z) {
58863
59555
  const mapUrl = generateMapUrl({ level, x, y, z });
@@ -58974,6 +59666,7 @@ async function normalizeImplicitTileHeaders(tile, tileset, basePath, implicitTil
58974
59666
  const {
58975
59667
  subdivisionScheme,
58976
59668
  maximumLevel,
59669
+ availableLevels,
58977
59670
  subtreeLevels,
58978
59671
  subtrees: { uri: subtreesUriTemplate }
58979
59672
  } = implicitTilingExtension;
@@ -58995,7 +59688,7 @@ async function normalizeImplicitTileHeaders(tile, tileset, basePath, implicitTil
58995
59688
  subtreesUriTemplate,
58996
59689
  subdivisionScheme,
58997
59690
  subtreeLevels,
58998
- maximumLevel,
59691
+ maximumLevel: Number.isFinite(availableLevels) ? availableLevels - 1 : maximumLevel,
58999
59692
  refine,
59000
59693
  basePath,
59001
59694
  lodMetricType: LOD_METRIC_TYPE.GEOMETRIC_ERROR,
@@ -59004,15 +59697,16 @@ async function normalizeImplicitTileHeaders(tile, tileset, basePath, implicitTil
59004
59697
  getTileType,
59005
59698
  getRefine
59006
59699
  };
59007
- return await normalizeImplicitTileData(tile, basePath, subtree, implicitOptions);
59700
+ return await normalizeImplicitTileData(tile, basePath, subtree, implicitOptions, options);
59008
59701
  }
59009
- async function normalizeImplicitTileData(tile, basePath, rootSubtree, options) {
59702
+ async function normalizeImplicitTileData(tile, basePath, rootSubtree, implicitOptions, loaderOptions) {
59010
59703
  if (!tile) {
59011
59704
  return null;
59012
59705
  }
59013
59706
  const { children, contentUrl } = await parseImplicitTiles({
59014
59707
  subtree: rootSubtree,
59015
- options
59708
+ implicitOptions,
59709
+ loaderOptions
59016
59710
  });
59017
59711
  let tileContentUrl;
59018
59712
  let tileContent = null;
@@ -59179,6 +59873,177 @@ var CesiumIonLoader = {
59179
59873
  }
59180
59874
  };
59181
59875
 
59876
+ // ../3d-tiles/src/lib/encoders/helpers/encode-3d-tile-header.ts
59877
+ function encode3DTileHeader(tile, dataView, byteOffset) {
59878
+ const HEADER_SIZE = 12;
59879
+ if (!dataView) {
59880
+ return byteOffset + HEADER_SIZE;
59881
+ }
59882
+ const { magic, version: version2 = 1, byteLength = 12 } = tile;
59883
+ assert2(Array.isArray(magic) && Number.isFinite(version2) && Number.isFinite(byteLength));
59884
+ dataView.setUint8(byteOffset + 0, magic[0]);
59885
+ dataView.setUint8(byteOffset + 1, magic[1]);
59886
+ dataView.setUint8(byteOffset + 2, magic[2]);
59887
+ dataView.setUint8(byteOffset + 3, magic[3]);
59888
+ dataView.setUint32(byteOffset + 4, version2, true);
59889
+ dataView.setUint32(byteOffset + 8, byteLength, true);
59890
+ byteOffset += HEADER_SIZE;
59891
+ return byteOffset;
59892
+ }
59893
+ function encode3DTileByteLength(dataView, byteOffsetTileStart, byteLength) {
59894
+ if (!dataView) {
59895
+ return;
59896
+ }
59897
+ dataView.setUint32(byteOffsetTileStart + 8, byteLength, true);
59898
+ }
59899
+
59900
+ // ../3d-tiles/src/lib/encoders/encode-3d-tile-composite.ts
59901
+ function encodeComposite3DTile(tile, dataView, byteOffset, options, encode3DTile2) {
59902
+ tile = { magic: MAGIC_ARRAY.COMPOSITE, tiles: [], ...tile };
59903
+ const byteOffsetStart = byteOffset;
59904
+ byteOffset += encode3DTileHeader(tile, dataView, byteOffset);
59905
+ if (dataView) {
59906
+ dataView.setUint32(byteOffset, tile.tiles.length, true);
59907
+ }
59908
+ byteOffset += 4;
59909
+ for (let i = 0; i < tile.tiles.length; ++i) {
59910
+ byteOffset += encode3DTile2(tile.tiles[i], dataView, byteOffset, options);
59911
+ }
59912
+ encode3DTileByteLength(dataView, byteOffsetStart, byteOffset - byteOffsetStart);
59913
+ return byteOffset;
59914
+ }
59915
+
59916
+ // ../3d-tiles/src/lib/encoders/encode-3d-tile-batched-model.ts
59917
+ function encodeBatchedModel3DTile(tile, dataView, byteOffset, options) {
59918
+ const { featuresLength = 0, batchTable } = tile;
59919
+ const featureTableJson = {
59920
+ BATCH_LENGTH: featuresLength
59921
+ };
59922
+ const featureTableJsonString = JSON.stringify(featureTableJson);
59923
+ const batchTableJsonString = batchTable ? JSON.stringify(batchTable) : "";
59924
+ const featureTableJsonByteLength = padToNBytes(featureTableJsonString.length, 8);
59925
+ const batchTableJsonByteLength = batchTableJsonString ? padToNBytes(batchTableJsonString.length, 8) : 0;
59926
+ tile = { magic: MAGIC_ARRAY.BATCHED_MODEL, ...tile };
59927
+ const byteOffsetStart = byteOffset;
59928
+ byteOffset = encode3DTileHeader(tile, dataView, byteOffset);
59929
+ if (dataView) {
59930
+ dataView.setUint32(12, featureTableJsonByteLength, true);
59931
+ dataView.setUint32(16, 0, true);
59932
+ dataView.setUint32(20, batchTableJsonByteLength, true);
59933
+ dataView.setUint32(24, 0, true);
59934
+ }
59935
+ byteOffset += 16;
59936
+ byteOffset = copyPaddedStringToDataView(dataView, byteOffset, featureTableJsonString, 8);
59937
+ if (batchTable) {
59938
+ byteOffset = copyPaddedStringToDataView(dataView, byteOffset, batchTableJsonString, 8);
59939
+ }
59940
+ const gltfEncoded = tile.gltfEncoded;
59941
+ if (gltfEncoded) {
59942
+ byteOffset = copyBinaryToDataView(dataView, byteOffset, gltfEncoded, gltfEncoded.byteLength);
59943
+ }
59944
+ encode3DTileByteLength(dataView, byteOffsetStart, byteOffset - byteOffsetStart);
59945
+ return byteOffset;
59946
+ }
59947
+
59948
+ // ../3d-tiles/src/lib/encoders/encode-3d-tile-instanced-model.ts
59949
+ function encodeInstancedModel3DTile(tile, dataView, byteOffset, options) {
59950
+ const { featuresLength = 1, gltfFormat = 1, gltfUri = "" } = tile;
59951
+ const gltfUriByteLength = gltfUri.length;
59952
+ const featureTableJson = {
59953
+ INSTANCES_LENGTH: featuresLength,
59954
+ POSITION: new Array(featuresLength * 3).fill(0)
59955
+ };
59956
+ const featureTableJsonString = JSON.stringify(featureTableJson);
59957
+ const featureTableJsonByteLength = featureTableJsonString.length;
59958
+ tile = { magic: MAGIC_ARRAY.INSTANCED_MODEL, ...tile };
59959
+ const byteOffsetStart = byteOffset;
59960
+ byteOffset = encode3DTileHeader(tile, dataView, 0);
59961
+ if (dataView) {
59962
+ dataView.setUint32(12, featureTableJsonByteLength, true);
59963
+ dataView.setUint32(16, 0, true);
59964
+ dataView.setUint32(20, 0, true);
59965
+ dataView.setUint32(24, 0, true);
59966
+ dataView.setUint32(28, gltfFormat, true);
59967
+ }
59968
+ byteOffset += 20;
59969
+ byteOffset += copyStringToDataView(dataView, byteOffset, featureTableJsonString, featureTableJsonByteLength);
59970
+ byteOffset += copyStringToDataView(dataView, byteOffset, gltfUri, gltfUriByteLength);
59971
+ encode3DTileByteLength(dataView, byteOffsetStart, byteOffset - byteOffsetStart);
59972
+ return byteOffset;
59973
+ }
59974
+
59975
+ // ../3d-tiles/src/lib/encoders/encode-3d-tile-point-cloud.ts
59976
+ var DEFAULT_FEATURE_TABLE_JSON = {
59977
+ POINTS_LENGTH: 1,
59978
+ POSITIONS: {
59979
+ byteOffset: 0
59980
+ }
59981
+ };
59982
+ function encodePointCloud3DTile(tile, dataView, byteOffset, options) {
59983
+ const { featureTableJson = DEFAULT_FEATURE_TABLE_JSON } = tile;
59984
+ let featureTableJsonString = JSON.stringify(featureTableJson);
59985
+ featureTableJsonString = padStringToByteAlignment(featureTableJsonString, 4);
59986
+ const { featureTableJsonByteLength = featureTableJsonString.length } = tile;
59987
+ const featureTableBinary = new ArrayBuffer(12);
59988
+ const featureTableBinaryByteLength = featureTableBinary.byteLength;
59989
+ tile = { magic: MAGIC_ARRAY.POINT_CLOUD, ...tile };
59990
+ const byteOffsetStart = byteOffset;
59991
+ byteOffset += encode3DTileHeader(tile, dataView, 0);
59992
+ if (dataView) {
59993
+ dataView.setUint32(byteOffset + 0, featureTableJsonByteLength, true);
59994
+ dataView.setUint32(byteOffset + 4, featureTableBinaryByteLength, true);
59995
+ dataView.setUint32(byteOffset + 8, 0, true);
59996
+ dataView.setUint32(byteOffset + 12, 0, true);
59997
+ }
59998
+ byteOffset += 16;
59999
+ byteOffset += copyStringToDataView(dataView, byteOffset, featureTableJsonString, featureTableJsonByteLength);
60000
+ byteOffset += copyBinaryToDataView(dataView, byteOffset, featureTableBinary, featureTableBinaryByteLength);
60001
+ encode3DTileByteLength(dataView, byteOffsetStart, byteOffset - byteOffsetStart);
60002
+ return byteOffset;
60003
+ }
60004
+
60005
+ // ../3d-tiles/src/lib/encoders/encode-3d-tile.ts
60006
+ function encode3DTile(tile, options) {
60007
+ const byteLength = encode3DTileToDataView(tile, null, 0, options);
60008
+ const arrayBuffer = new ArrayBuffer(byteLength);
60009
+ const dataView = new DataView(arrayBuffer);
60010
+ encode3DTileToDataView(tile, dataView, 0, options);
60011
+ return arrayBuffer;
60012
+ }
60013
+ function encode3DTileToDataView(tile, dataView, byteOffset, options) {
60014
+ assert2(typeof tile.type === "string");
60015
+ switch (tile.type) {
60016
+ case TILE3D_TYPE.COMPOSITE:
60017
+ return encodeComposite3DTile(tile, dataView, byteOffset, options, encode3DTileToDataView);
60018
+ case TILE3D_TYPE.POINT_CLOUD:
60019
+ return encodePointCloud3DTile(tile, dataView, byteOffset, options);
60020
+ case TILE3D_TYPE.BATCHED_3D_MODEL:
60021
+ return encodeBatchedModel3DTile(tile, dataView, byteOffset, options);
60022
+ case TILE3D_TYPE.INSTANCED_3D_MODEL:
60023
+ return encodeInstancedModel3DTile(tile, dataView, byteOffset, options);
60024
+ default:
60025
+ throw new Error("3D Tiles: unknown tile type");
60026
+ }
60027
+ }
60028
+
60029
+ // ../3d-tiles/src/tile-3d-writer.ts
60030
+ var Tile3DWriter = {
60031
+ name: "3D Tile",
60032
+ id: "3d-tiles",
60033
+ module: "3d-tiles",
60034
+ version: VERSION6,
60035
+ extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
60036
+ mimeTypes: ["application/octet-stream"],
60037
+ encodeSync: encodeSync3,
60038
+ binary: true,
60039
+ options: {
60040
+ ["3d-tiles"]: {}
60041
+ }
60042
+ };
60043
+ function encodeSync3(tile, options) {
60044
+ return encode3DTile(tile, options);
60045
+ }
60046
+
59182
60047
  // src/i3s-converter/i3s-converter.ts
59183
60048
  var import_path8 = __toModule(require("path"));
59184
60049
 
@@ -60945,6 +61810,9 @@ function getPropertyTableExtension(tileContent) {
60945
61810
  break;
60946
61811
  }
60947
61812
  }
61813
+ if (!extensionName) {
61814
+ return { extensionName: null, extension: null };
61815
+ }
60948
61816
  const extension = tileContent?.gltf?.extensions?.[extensionName];
60949
61817
  return { extensionName, extension };
60950
61818
  }
@@ -61060,12 +61928,12 @@ function convertScreenThresholdToGeometricError(node2) {
61060
61928
 
61061
61929
  // src/pgm-loader.ts
61062
61930
  var import_geoid = __toModule(require_es54());
61063
- var VERSION12 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
61931
+ var VERSION13 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
61064
61932
  var PGMLoader = {
61065
61933
  name: "PGM - Netpbm grayscale image format",
61066
61934
  id: "pgm",
61067
61935
  module: "tile-converter",
61068
- version: VERSION12,
61936
+ version: VERSION13,
61069
61937
  mimeTypes: ["image/x-portable-graymap"],
61070
61938
  parse: async (arrayBuffer, options) => (0, import_geoid.parsePGM)(new Uint8Array(arrayBuffer), options),
61071
61939
  extensions: ["pgm"],
@@ -61756,18 +62624,6 @@ var WriteQueue = class extends Queue {
61756
62624
  }
61757
62625
  };
61758
62626
 
61759
- // src/i3s-attributes-worker.ts
61760
- var VERSION13 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
61761
- var I3SAttributesWorker = {
61762
- id: "i3s-attributes",
61763
- name: "I3S Attributes Worker",
61764
- module: "tile-converter",
61765
- version: VERSION13,
61766
- options: {
61767
- useCartesianPositions: false
61768
- }
61769
- };
61770
-
61771
62627
  // src/constants.ts
61772
62628
  var BROWSER_ERROR_MESSAGE = "Tile converter does not work in browser, only in node js environment";
61773
62629
 
@@ -62778,20 +63634,16 @@ var I3SConverter = class {
62778
63634
  console.log(`Loading workers source...`);
62779
63635
  if (this.options.draco) {
62780
63636
  const url = getWorkerURL(DracoWriterWorker, { ...getGlobalLoaderOptions() });
62781
- const sourceResponse2 = await fetchFile(url);
62782
- const source2 = await sourceResponse2.text();
62783
- this.workerSource.draco = source2;
63637
+ const sourceResponse = await fetchFile(url);
63638
+ const source = await sourceResponse.text();
63639
+ this.workerSource.draco = source;
62784
63640
  }
62785
63641
  if (this.generateTextures) {
62786
63642
  const url = getWorkerURL(KTX2BasisWriterWorker, { ...getGlobalLoaderOptions() });
62787
- const sourceResponse2 = await fetchFile(url);
62788
- const source2 = await sourceResponse2.text();
62789
- this.workerSource.ktx2 = source2;
62790
- }
62791
- const i3sAttributesWorkerUrl = getWorkerURL(I3SAttributesWorker, { ...getGlobalLoaderOptions() });
62792
- const sourceResponse = await fetchFile(i3sAttributesWorkerUrl);
62793
- const source = await sourceResponse.text();
62794
- this.workerSource.I3SAttributes = source;
63643
+ const sourceResponse = await fetchFile(url);
63644
+ const source = await sourceResponse.text();
63645
+ this.workerSource.ktx2 = source;
63646
+ }
62795
63647
  console.log(`Loading workers source completed!`);
62796
63648
  }
62797
63649
  };
@@ -62802,7 +63654,7 @@ var import_process3 = __toModule(require("process"));
62802
63654
  var import_json_map_transform10 = __toModule(require_json_map_transform());
62803
63655
 
62804
63656
  // ../i3s/src/lib/parsers/constants.ts
62805
- var import_constants10 = __toModule(require_es55());
63657
+ var import_constants15 = __toModule(require_es55());
62806
63658
 
62807
63659
  // ../i3s/src/types.ts
62808
63660
  var DATA_TYPE;
@@ -62841,11 +63693,11 @@ function getConstructorForDataFormat(dataType) {
62841
63693
  }
62842
63694
  }
62843
63695
  var GL_TYPE_MAP = {
62844
- UInt8: import_constants10.default.UNSIGNED_BYTE,
62845
- UInt16: import_constants10.default.UNSIGNED_SHORT,
62846
- Float32: import_constants10.default.FLOAT,
62847
- UInt32: import_constants10.default.UNSIGNED_INT,
62848
- UInt64: import_constants10.default.DOUBLE
63696
+ UInt8: import_constants15.default.UNSIGNED_BYTE,
63697
+ UInt16: import_constants15.default.UNSIGNED_SHORT,
63698
+ Float32: import_constants15.default.FLOAT,
63699
+ UInt32: import_constants15.default.UNSIGNED_INT,
63700
+ UInt64: import_constants15.default.DOUBLE
62849
63701
  };
62850
63702
  function sizeOf(dataType) {
62851
63703
  switch (dataType) {
@@ -63850,20 +64702,226 @@ var TILESET = () => ({
63850
64702
  }
63851
64703
  });
63852
64704
 
63853
- // src/3d-tiles-attributes-worker.ts
63854
- var VERSION18 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
63855
- var Tile3dAttributesWorker = {
63856
- id: "3d-tiles-attributes",
63857
- name: "3DTiles Attributes Worker",
63858
- module: "tile-converter",
63859
- version: VERSION18,
63860
- options: {
63861
- featureAttributes: null
64705
+ // src/3d-tiles-converter/helpers/b3dm-converter.ts
64706
+ var import_core40 = __toModule(require_es5());
64707
+ var import_geospatial16 = __toModule(require_es52());
64708
+
64709
+ // src/3d-tiles-converter/helpers/texture-atlas.ts
64710
+ function convertTextureAtlas(texCoords, uvRegions) {
64711
+ const convertedTexCoords = new Float32Array(texCoords.length);
64712
+ const normalisedRegions = normalizeRegions(uvRegions);
64713
+ for (let index = 0; index < texCoords.length; index += 2) {
64714
+ const uv = texCoords.subarray(index, index + 2);
64715
+ const regions = normalisedRegions.slice(index * 2, index * 2 + 4);
64716
+ const fractatedUV = fract([uv[0], uv[1]]);
64717
+ const subtracted = [regions[2] - regions[0], regions[3] - regions[1]];
64718
+ const multiplicationResult = [fractatedUV[0] * subtracted[0], fractatedUV[1] * subtracted[1]];
64719
+ const convertedUV = [
64720
+ multiplicationResult[0] + regions[0],
64721
+ multiplicationResult[1] + regions[1]
64722
+ ];
64723
+ convertedTexCoords[index] = convertedUV[0];
64724
+ convertedTexCoords[index + 1] = convertedUV[1];
64725
+ }
64726
+ return convertedTexCoords;
64727
+ }
64728
+ function fract(uv) {
64729
+ return [uv[0] - Math.floor(uv[0]), uv[1] - Math.floor(uv[1])];
64730
+ }
64731
+ function normalizeRegions(regions) {
64732
+ const MAX_UINT_16_VALUE = 65535;
64733
+ const normalizedRegions = [];
64734
+ for (let index = 0; index < regions.length; index++) {
64735
+ normalizedRegions[index] = regions[index] / MAX_UINT_16_VALUE;
64736
+ }
64737
+ return normalizedRegions;
64738
+ }
64739
+
64740
+ // src/3d-tiles-converter/helpers/b3dm-converter.ts
64741
+ var Z_UP_TO_Y_UP_MATRIX = new import_core40.Matrix4([1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
64742
+ var scratchVector7 = new import_core40.Vector3();
64743
+ var B3dmConverter = class {
64744
+ async convert(i3sAttributesData, featureAttributes = null) {
64745
+ const gltf = await this.buildGltf(i3sAttributesData, featureAttributes);
64746
+ const b3dm = encodeSync({
64747
+ gltfEncoded: new Uint8Array(gltf),
64748
+ type: "b3dm",
64749
+ featuresLength: this._getFeaturesLength(featureAttributes),
64750
+ batchTable: featureAttributes
64751
+ }, Tile3DWriter);
64752
+ return b3dm;
64753
+ }
64754
+ async buildGltf(i3sAttributesData, featureAttributes) {
64755
+ const { tileContent, textureFormat } = i3sAttributesData;
64756
+ const {
64757
+ material,
64758
+ attributes,
64759
+ indices: originalIndices,
64760
+ cartesianOrigin,
64761
+ cartographicOrigin,
64762
+ modelMatrix
64763
+ } = tileContent;
64764
+ const gltfBuilder = new GLTFScenegraph();
64765
+ const textureIndex = await this._addI3sTextureToGltf(tileContent, textureFormat, gltfBuilder);
64766
+ const pbrMaterialInfo = this._convertI3sMaterialToGltfMaterial(material, textureIndex);
64767
+ const materialIndex = gltfBuilder.addMaterial(pbrMaterialInfo);
64768
+ const positions = attributes.positions;
64769
+ const positionsValue = positions.value;
64770
+ if (attributes.uvRegions && attributes.texCoords) {
64771
+ attributes.texCoords.value = convertTextureAtlas(attributes.texCoords.value, attributes.uvRegions.value);
64772
+ }
64773
+ attributes.positions.value = this._normalizePositions(positionsValue, cartesianOrigin, cartographicOrigin, modelMatrix);
64774
+ this._createBatchIds(tileContent, featureAttributes);
64775
+ if (attributes.normals && !this._checkNormals(attributes.normals.value)) {
64776
+ delete attributes.normals;
64777
+ }
64778
+ const indices = originalIndices || generateSyntheticIndices(positionsValue.length / positions.size);
64779
+ const meshIndex = gltfBuilder.addMesh({
64780
+ attributes,
64781
+ indices,
64782
+ material: materialIndex,
64783
+ mode: 4
64784
+ });
64785
+ const transformMatrix = this._generateTransformMatrix(cartesianOrigin);
64786
+ const nodeIndex = gltfBuilder.addNode({ meshIndex, matrix: transformMatrix });
64787
+ const sceneIndex = gltfBuilder.addScene({ nodeIndices: [nodeIndex] });
64788
+ gltfBuilder.setDefaultScene(sceneIndex);
64789
+ gltfBuilder.createBinaryChunk();
64790
+ const gltfBuffer = encodeSync(gltfBuilder.gltf, GLTFWriter);
64791
+ return gltfBuffer;
64792
+ }
64793
+ async _addI3sTextureToGltf(tileContent, textureFormat, gltfBuilder) {
64794
+ const { texture, material, attributes } = tileContent;
64795
+ let textureIndex = null;
64796
+ let selectedTexture = texture;
64797
+ if (!texture && material) {
64798
+ selectedTexture = material.pbrMetallicRoughness && material.pbrMetallicRoughness.baseColorTexture && material.pbrMetallicRoughness.baseColorTexture.texture.source.image;
64799
+ }
64800
+ if (selectedTexture) {
64801
+ const mimeType = this._deduceMimeTypeFromFormat(textureFormat);
64802
+ const imageIndex = gltfBuilder.addImage(selectedTexture, mimeType);
64803
+ textureIndex = gltfBuilder.addTexture({ imageIndex });
64804
+ delete attributes.colors;
64805
+ }
64806
+ return textureIndex;
64807
+ }
64808
+ _normalizePositions(positionsValue, cartesianOrigin, cartographicOrigin, modelMatrix) {
64809
+ const newPositionsValue = new Float32Array(positionsValue.length);
64810
+ for (let index = 0; index < positionsValue.length; index += 3) {
64811
+ const vertex = positionsValue.subarray(index, index + 3);
64812
+ const cartesianOriginVector = new import_core40.Vector3(cartesianOrigin);
64813
+ let vertexVector = new import_core40.Vector3(Array.from(vertex)).transform(modelMatrix).add(cartographicOrigin);
64814
+ import_geospatial16.Ellipsoid.WGS84.cartographicToCartesian(vertexVector, scratchVector7);
64815
+ vertexVector = scratchVector7.subtract(cartesianOriginVector);
64816
+ newPositionsValue.set(vertexVector, index);
64817
+ }
64818
+ return newPositionsValue;
64819
+ }
64820
+ _generateTransformMatrix(cartesianOrigin) {
64821
+ const translateOriginMatrix = new import_core40.Matrix4().translate(cartesianOrigin);
64822
+ const result = translateOriginMatrix.multiplyLeft(Z_UP_TO_Y_UP_MATRIX);
64823
+ return result;
64824
+ }
64825
+ _createBatchIds(i3sContent, featureAttributes) {
64826
+ const { featureIds } = i3sContent;
64827
+ const { OBJECTID: objectIds } = featureAttributes || {};
64828
+ if (!featureIds || !objectIds) {
64829
+ return;
64830
+ }
64831
+ for (let i = 0; i < featureIds.length; i++) {
64832
+ const featureId = featureIds[i];
64833
+ const batchId = objectIds.indexOf(featureId);
64834
+ featureIds[i] = batchId;
64835
+ }
64836
+ i3sContent.attributes._BATCHID = {
64837
+ size: 1,
64838
+ byteOffset: 0,
64839
+ value: featureIds
64840
+ };
64841
+ }
64842
+ _deduceMimeTypeFromFormat(format) {
64843
+ switch (format) {
64844
+ case "jpg":
64845
+ return "image/jpeg";
64846
+ case "png":
64847
+ return "image/png";
64848
+ case "ktx2":
64849
+ return "image/ktx2";
64850
+ default:
64851
+ console.warn(`Unexpected texture format in I3S: ${format}`);
64852
+ return "image/jpeg";
64853
+ }
64854
+ }
64855
+ _convertI3sMaterialToGltfMaterial(material, textureIndex) {
64856
+ const isTextureIndexExists = textureIndex !== null;
64857
+ if (!material) {
64858
+ material = {
64859
+ alphaMode: "OPAQUE",
64860
+ doubleSided: false,
64861
+ pbrMetallicRoughness: {
64862
+ metallicFactor: 0,
64863
+ roughnessFactor: 1
64864
+ }
64865
+ };
64866
+ if (isTextureIndexExists) {
64867
+ material.pbrMetallicRoughness.baseColorTexture = {
64868
+ index: textureIndex,
64869
+ texCoord: 0
64870
+ };
64871
+ } else {
64872
+ material.pbrMetallicRoughness.baseColorFactor = [1, 1, 1, 1];
64873
+ }
64874
+ return material;
64875
+ }
64876
+ if (textureIndex !== null) {
64877
+ material = this._setGltfTexture(material, textureIndex);
64878
+ }
64879
+ return material;
64880
+ }
64881
+ _setGltfTexture(materialDefinition, textureIndex) {
64882
+ const material = {
64883
+ ...materialDefinition,
64884
+ pbrMetallicRoughness: { ...materialDefinition.pbrMetallicRoughness }
64885
+ };
64886
+ if (materialDefinition.pbrMetallicRoughness && materialDefinition.pbrMetallicRoughness.baseColorTexture) {
64887
+ material.pbrMetallicRoughness.baseColorTexture = {
64888
+ index: textureIndex,
64889
+ texCoord: 0
64890
+ };
64891
+ } else if (materialDefinition.emissiveTexture) {
64892
+ material.emissiveTexture = {
64893
+ index: textureIndex,
64894
+ texCoord: 0
64895
+ };
64896
+ } else if (materialDefinition.pbrMetallicRoughness && materialDefinition.pbrMetallicRoughness.metallicRoughnessTexture) {
64897
+ material.pbrMetallicRoughness.metallicRoughnessTexture = {
64898
+ index: textureIndex,
64899
+ texCoord: 0
64900
+ };
64901
+ } else if (materialDefinition.normalTexture) {
64902
+ material.normalTexture = {
64903
+ index: textureIndex,
64904
+ texCoord: 0
64905
+ };
64906
+ } else if (materialDefinition.occlusionTexture) {
64907
+ material.occlusionTexture = {
64908
+ index: textureIndex,
64909
+ texCoord: 0
64910
+ };
64911
+ }
64912
+ return material;
64913
+ }
64914
+ _getFeaturesLength(attributes) {
64915
+ if (!attributes) {
64916
+ return 0;
64917
+ }
64918
+ const firstKey = Object.keys(attributes)[0];
64919
+ return firstKey ? attributes[firstKey].length : 0;
64920
+ }
64921
+ _checkNormals(normals) {
64922
+ return normals.find((value) => value);
63862
64923
  }
63863
64924
  };
63864
- function transform3DTilesAttributesOnWorker(i3sAttributesData, options) {
63865
- return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);
63866
- }
63867
64925
 
63868
64926
  // src/3d-tiles-converter/3d-tiles-converter.ts
63869
64927
  var I3S = "I3S";
@@ -63890,13 +64948,15 @@ var Tiles3DConverter = class {
63890
64948
  console.log("Loading egm file...");
63891
64949
  this.geoidHeightModel = await load(egmFilePath, PGMLoader);
63892
64950
  console.log("Loading egm file completed!");
63893
- await this.loadWorkers();
63894
64951
  const sourceTilesetJson = await load(inputUrl, I3SLoader, {});
63895
64952
  this.sourceTileset = new Tileset3D(sourceTilesetJson, {
63896
64953
  loadOptions: {
63897
64954
  _nodeWorkers: true,
63898
64955
  reuseWorkers: true,
63899
- i3s: { coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS, decodeTextures: false }
64956
+ i3s: { coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS, decodeTextures: false },
64957
+ "i3s-content": {
64958
+ workerUrl: "./modules/i3s/dist/i3s-content-worker-node.js"
64959
+ }
63900
64960
  }
63901
64961
  });
63902
64962
  await this.sourceTileset.tilesetInitializationPromise;
@@ -63949,10 +65009,8 @@ var Tiles3DConverter = class {
63949
65009
  tileContent: sourceChild.content,
63950
65010
  textureFormat: sourceChild?.header?.textureFormat
63951
65011
  };
63952
- const b3dm = await transform3DTilesAttributesOnWorker(i3sAttributesData, {
63953
- source: this.workerSource.tile3dWorkerSource,
63954
- featureAttributes
63955
- });
65012
+ const b3dmConverter = new B3dmConverter();
65013
+ const b3dm = await b3dmConverter.convert(i3sAttributesData, featureAttributes);
63956
65014
  child.content = {
63957
65015
  uri: `${sourceChild.id}.b3dm`,
63958
65016
  boundingVolume
@@ -64054,14 +65112,6 @@ var Tiles3DConverter = class {
64054
65112
  console.log(`File(s) size: `, filesSize, " bytes");
64055
65113
  console.log(`------------------------------------------------`);
64056
65114
  }
64057
- async loadWorkers() {
64058
- console.log(`Loading workers source...`);
64059
- const tile3dAttributesWorkerUrl = getWorkerURL(Tile3dAttributesWorker, { ...getGlobalLoaderOptions() });
64060
- const sourceResponse = await fetchFile(tile3dAttributesWorkerUrl);
64061
- const source = await sourceResponse.text();
64062
- this.workerSource.tile3dWorkerSource = source;
64063
- console.log(`Loading workers source completed!`);
64064
- }
64065
65115
  };
64066
65116
  // Annotate the CommonJS export names for ESM import in node:
64067
65117
  0 && (module.exports = {