@loaders.gl/i3s 3.3.0-alpha.5 → 3.3.0-alpha.6

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 (94) hide show
  1. package/dist/dist.min.js +984 -1291
  2. package/dist/es5/arcgis-webscene-loader.js +2 -8
  3. package/dist/es5/arcgis-webscene-loader.js.map +1 -1
  4. package/dist/es5/bundle.js +0 -1
  5. package/dist/es5/bundle.js.map +1 -1
  6. package/dist/es5/i3s-attribute-loader.js +19 -60
  7. package/dist/es5/i3s-attribute-loader.js.map +1 -1
  8. package/dist/es5/i3s-building-scene-layer-loader.js +1 -10
  9. package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
  10. package/dist/es5/i3s-content-loader.js +1 -14
  11. package/dist/es5/i3s-content-loader.js.map +1 -1
  12. package/dist/es5/i3s-loader.js +7 -45
  13. package/dist/es5/i3s-loader.js.map +1 -1
  14. package/dist/es5/i3s-node-page-loader.js +1 -12
  15. package/dist/es5/i3s-node-page-loader.js.map +1 -1
  16. package/dist/es5/index.js +12 -18
  17. package/dist/es5/index.js.map +1 -1
  18. package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +18 -78
  19. package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
  20. package/dist/es5/lib/parsers/constants.js +2 -18
  21. package/dist/es5/lib/parsers/constants.js.map +1 -1
  22. package/dist/es5/lib/parsers/parse-arcgis-webscene.js +128 -30
  23. package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -1
  24. package/dist/es5/lib/parsers/parse-i3s-attribute.js +1 -23
  25. package/dist/es5/lib/parsers/parse-i3s-attribute.js.map +1 -1
  26. package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js +8 -25
  27. package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
  28. package/dist/es5/lib/parsers/parse-i3s-tile-content.js +10 -124
  29. package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  30. package/dist/es5/lib/parsers/parse-i3s.js +5 -36
  31. package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
  32. package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js +0 -7
  33. package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
  34. package/dist/es5/lib/utils/customizeColors.js +4 -53
  35. package/dist/es5/lib/utils/customizeColors.js.map +1 -1
  36. package/dist/es5/lib/utils/url-utils.js +3 -8
  37. package/dist/es5/lib/utils/url-utils.js.map +1 -1
  38. package/dist/es5/types.js +0 -3
  39. package/dist/es5/types.js.map +1 -1
  40. package/dist/es5/workers/i3s-content-nodejs-worker.js +0 -3
  41. package/dist/es5/workers/i3s-content-nodejs-worker.js.map +1 -1
  42. package/dist/es5/workers/i3s-content-worker.js +0 -2
  43. package/dist/es5/workers/i3s-content-worker.js.map +1 -1
  44. package/dist/esm/arcgis-webscene-loader.js +3 -1
  45. package/dist/esm/arcgis-webscene-loader.js.map +1 -1
  46. package/dist/esm/bundle.js +1 -1
  47. package/dist/esm/bundle.js.map +1 -1
  48. package/dist/esm/i3s-attribute-loader.js +8 -25
  49. package/dist/esm/i3s-attribute-loader.js.map +1 -1
  50. package/dist/esm/i3s-building-scene-layer-loader.js +2 -3
  51. package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
  52. package/dist/esm/i3s-content-loader.js +2 -4
  53. package/dist/esm/i3s-content-loader.js.map +1 -1
  54. package/dist/esm/i3s-loader.js +4 -13
  55. package/dist/esm/i3s-loader.js.map +1 -1
  56. package/dist/esm/i3s-node-page-loader.js +1 -2
  57. package/dist/esm/i3s-node-page-loader.js.map +1 -1
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +2 -45
  60. package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
  61. package/dist/esm/lib/parsers/constants.js +1 -10
  62. package/dist/esm/lib/parsers/constants.js.map +1 -1
  63. package/dist/esm/lib/parsers/parse-arcgis-webscene.js +50 -11
  64. package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -1
  65. package/dist/esm/lib/parsers/parse-i3s-attribute.js +1 -8
  66. package/dist/esm/lib/parsers/parse-i3s-attribute.js.map +1 -1
  67. package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js +1 -4
  68. package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
  69. package/dist/esm/lib/parsers/parse-i3s-tile-content.js +23 -71
  70. package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
  71. package/dist/esm/lib/parsers/parse-i3s.js +15 -17
  72. package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
  73. package/dist/esm/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
  74. package/dist/esm/lib/utils/customizeColors.js +24 -36
  75. package/dist/esm/lib/utils/customizeColors.js.map +1 -1
  76. package/dist/esm/lib/utils/url-utils.js +5 -5
  77. package/dist/esm/lib/utils/url-utils.js.map +1 -1
  78. package/dist/esm/types.js +0 -3
  79. package/dist/esm/types.js.map +1 -1
  80. package/dist/esm/workers/i3s-content-nodejs-worker.js.map +1 -1
  81. package/dist/esm/workers/i3s-content-worker.js.map +1 -1
  82. package/dist/i3s-content-nodejs-worker.js +61 -60
  83. package/dist/i3s-content-nodejs-worker.js.map +3 -3
  84. package/dist/i3s-content-worker.js +490 -1020
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/lib/parsers/parse-arcgis-webscene.d.ts.map +1 -1
  88. package/dist/lib/parsers/parse-arcgis-webscene.js +49 -7
  89. package/dist/types.d.ts +1 -0
  90. package/dist/types.d.ts.map +1 -1
  91. package/package.json +8 -8
  92. package/src/index.ts +2 -1
  93. package/src/lib/parsers/parse-arcgis-webscene.ts +57 -7
  94. package/src/types.ts +1 -0
@@ -14,16 +14,16 @@
14
14
  for (var name in all)
15
15
  __defProp(target, name, { get: all[name], enumerable: true });
16
16
  };
17
- var __reExport = (target, module2, desc) => {
18
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
19
- for (let key of __getOwnPropNames(module2))
17
+ var __reExport = (target, module, desc) => {
18
+ if (module && typeof module === "object" || typeof module === "function") {
19
+ for (let key of __getOwnPropNames(module))
20
20
  if (!__hasOwnProp.call(target, key) && key !== "default")
21
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
21
+ __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
22
22
  }
23
23
  return target;
24
24
  };
25
- var __toModule = (module2) => {
26
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
25
+ var __toModule = (module) => {
26
+ return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
27
27
  };
28
28
 
29
29
  // (disabled):../worker-utils/src/lib/node/require-utils.node
@@ -55,7 +55,7 @@
55
55
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
56
56
 
57
57
  // ../worker-utils/src/lib/env-utils/version.ts
58
- var VERSION = true ? "3.3.0-alpha.5" : DEFAULT_VERSION;
58
+ var VERSION = true ? "3.3.0-alpha.6" : DEFAULT_VERSION;
59
59
  if (false) {
60
60
  console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
61
61
  }
@@ -1045,7 +1045,7 @@
1045
1045
  return await makeResponse(url);
1046
1046
  }
1047
1047
 
1048
- // ../../node_modules/probe.gl/dist/esm/env/is-electron.js
1048
+ // ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
1049
1049
  function isElectron(mockUserAgent) {
1050
1050
  if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
1051
1051
  return true;
@@ -1061,13 +1061,13 @@
1061
1061
  return false;
1062
1062
  }
1063
1063
 
1064
- // ../../node_modules/probe.gl/dist/esm/env/is-browser.js
1064
+ // ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
1065
1065
  function isBrowser3() {
1066
1066
  const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
1067
1067
  return !isNode || isElectron();
1068
1068
  }
1069
1069
 
1070
- // ../../node_modules/probe.gl/dist/esm/env/globals.js
1070
+ // ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
1071
1071
  var globals3 = {
1072
1072
  self: typeof self !== "undefined" && self,
1073
1073
  window: typeof window !== "undefined" && window,
@@ -1077,15 +1077,14 @@
1077
1077
  };
1078
1078
  var self_3 = globals3.self || globals3.window || globals3.global;
1079
1079
  var window_3 = globals3.window || globals3.self || globals3.global;
1080
- var global_3 = globals3.global || globals3.self || globals3.window;
1081
1080
  var document_3 = globals3.document || {};
1082
1081
  var process_ = globals3.process || {};
1083
1082
 
1084
- // ../../node_modules/probe.gl/dist/esm/utils/globals.js
1085
- var VERSION3 = true ? "3.3.0-alpha.5" : "untranspiled source";
1083
+ // ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
1084
+ var VERSION3 = true ? "3.3.0-alpha.6" : "untranspiled source";
1086
1085
  var isBrowser4 = isBrowser3();
1087
1086
 
1088
- // ../../node_modules/probe.gl/dist/esm/utils/local-storage.js
1087
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
1089
1088
  function getStorage(type) {
1090
1089
  try {
1091
1090
  const storage = window[type];
@@ -1098,7 +1097,12 @@
1098
1097
  }
1099
1098
  }
1100
1099
  var LocalStorage = class {
1101
- constructor(id, defaultSettings, type = "sessionStorage") {
1100
+ constructor(id) {
1101
+ let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1102
+ let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
1103
+ _defineProperty(this, "storage", void 0);
1104
+ _defineProperty(this, "id", void 0);
1105
+ _defineProperty(this, "config", {});
1102
1106
  this.storage = getStorage(type);
1103
1107
  this.id = id;
1104
1108
  this.config = {};
@@ -1131,7 +1135,7 @@
1131
1135
  }
1132
1136
  };
1133
1137
 
1134
- // ../../node_modules/probe.gl/dist/esm/utils/formatters.js
1138
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
1135
1139
  function formatTime(ms) {
1136
1140
  let formatted;
1137
1141
  if (ms < 10) {
@@ -1145,11 +1149,13 @@
1145
1149
  }
1146
1150
  return formatted;
1147
1151
  }
1148
- function leftPad(string, length2 = 8) {
1152
+ function leftPad(string) {
1153
+ let length2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
1149
1154
  const padLength = Math.max(length2 - string.length, 0);
1150
1155
  return "".concat(" ".repeat(padLength)).concat(string);
1151
1156
  }
1152
- function formatImage(image, message, scale2, maxWidth = 600) {
1157
+ function formatImage(image, message, scale2) {
1158
+ let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
1153
1159
  const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
1154
1160
  if (image.width > maxWidth) {
1155
1161
  scale2 = Math.min(scale2, maxWidth / image.width);
@@ -1160,30 +1166,31 @@
1160
1166
  return ["".concat(message, " %c+"), style];
1161
1167
  }
1162
1168
 
1163
- // ../../node_modules/probe.gl/dist/esm/utils/color.js
1164
- var COLOR = {
1165
- BLACK: 30,
1166
- RED: 31,
1167
- GREEN: 32,
1168
- YELLOW: 33,
1169
- BLUE: 34,
1170
- MAGENTA: 35,
1171
- CYAN: 36,
1172
- WHITE: 37,
1173
- BRIGHT_BLACK: 90,
1174
- BRIGHT_RED: 91,
1175
- BRIGHT_GREEN: 92,
1176
- BRIGHT_YELLOW: 93,
1177
- BRIGHT_BLUE: 94,
1178
- BRIGHT_MAGENTA: 95,
1179
- BRIGHT_CYAN: 96,
1180
- BRIGHT_WHITE: 97
1181
- };
1169
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
1170
+ var COLOR;
1171
+ (function(COLOR2) {
1172
+ COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
1173
+ COLOR2[COLOR2["RED"] = 31] = "RED";
1174
+ COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
1175
+ COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
1176
+ COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
1177
+ COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
1178
+ COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
1179
+ COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
1180
+ COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
1181
+ COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
1182
+ COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
1183
+ COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
1184
+ COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
1185
+ COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
1186
+ COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
1187
+ COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
1188
+ })(COLOR || (COLOR = {}));
1182
1189
  function getColor(color) {
1183
1190
  return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
1184
1191
  }
1185
1192
  function addColor(string, color, background) {
1186
- if (!isBrowser4 && typeof string === "string") {
1193
+ if (!isBrowser3 && typeof string === "string") {
1187
1194
  if (color) {
1188
1195
  color = getColor(color);
1189
1196
  string = "[".concat(color, "m").concat(string, "");
@@ -1196,8 +1203,9 @@
1196
1203
  return string;
1197
1204
  }
1198
1205
 
1199
- // ../../node_modules/probe.gl/dist/esm/utils/autobind.js
1200
- function autobind(obj, predefined = ["constructor"]) {
1206
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
1207
+ function autobind(obj) {
1208
+ let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
1201
1209
  const proto = Object.getPrototypeOf(obj);
1202
1210
  const propNames = Object.getOwnPropertyNames(proto);
1203
1211
  for (const key of propNames) {
@@ -1209,20 +1217,22 @@
1209
1217
  }
1210
1218
  }
1211
1219
 
1212
- // ../../node_modules/probe.gl/dist/esm/utils/assert.js
1220
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
1213
1221
  function assert3(condition, message) {
1214
1222
  if (!condition) {
1215
1223
  throw new Error(message || "Assertion failed");
1216
1224
  }
1217
1225
  }
1218
1226
 
1219
- // ../../node_modules/probe.gl/dist/esm/utils/hi-res-timestamp.js
1220
- function getHiResTimestamp() {
1227
+ // ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
1228
+ function getHiResTimestamp2() {
1221
1229
  let timestamp;
1222
- if (isBrowser4 && window_3.performance) {
1223
- timestamp = window_3.performance.now();
1224
- } else if (process_.hrtime) {
1225
- const timeParts = process_.hrtime();
1230
+ if (isBrowser3 && "performance" in window_3) {
1231
+ var _window$performance, _window$performance$n;
1232
+ timestamp = window_3 === null || window_3 === void 0 ? void 0 : (_window$performance = window_3.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);
1233
+ } else if ("hrtime" in process_) {
1234
+ var _process$hrtime;
1235
+ const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
1226
1236
  timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
1227
1237
  } else {
1228
1238
  timestamp = Date.now();
@@ -1230,9 +1240,9 @@
1230
1240
  return timestamp;
1231
1241
  }
1232
1242
 
1233
- // ../../node_modules/probe.gl/dist/esm/lib/log.js
1243
+ // ../../node_modules/@probe.gl/log/dist/esm/log.js
1234
1244
  var originalConsole = {
1235
- debug: isBrowser4 ? console.debug || console.log : console.log,
1245
+ debug: isBrowser3 ? console.debug || console.log : console.log,
1236
1246
  log: console.log,
1237
1247
  info: console.info,
1238
1248
  warn: console.warn,
@@ -1248,25 +1258,21 @@
1248
1258
  var ONCE = {
1249
1259
  once: true
1250
1260
  };
1251
- function getTableHeader(table) {
1252
- for (const key in table) {
1253
- for (const title in table[key]) {
1254
- return title || "untitled";
1255
- }
1256
- }
1257
- return "empty";
1258
- }
1259
1261
  var Log = class {
1260
- constructor({
1261
- id
1262
- } = {
1263
- id: ""
1264
- }) {
1262
+ constructor() {
1263
+ let {
1264
+ id
1265
+ } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
1266
+ id: ""
1267
+ };
1268
+ _defineProperty(this, "id", void 0);
1269
+ _defineProperty(this, "VERSION", VERSION3);
1270
+ _defineProperty(this, "_startTs", getHiResTimestamp2());
1271
+ _defineProperty(this, "_deltaTs", getHiResTimestamp2());
1272
+ _defineProperty(this, "_storage", void 0);
1273
+ _defineProperty(this, "userData", {});
1274
+ _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
1265
1275
  this.id = id;
1266
- this.VERSION = VERSION3;
1267
- this._startTs = getHiResTimestamp();
1268
- this._deltaTs = getHiResTimestamp();
1269
- this.LOG_THROTTLE_TIMEOUT = 0;
1270
1276
  this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
1271
1277
  this.userData = {};
1272
1278
  this.timeStamp("".concat(this.id, " started"));
@@ -1286,10 +1292,10 @@
1286
1292
  return this._storage.config.level;
1287
1293
  }
1288
1294
  getTotal() {
1289
- return Number((getHiResTimestamp() - this._startTs).toPrecision(10));
1295
+ return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
1290
1296
  }
1291
1297
  getDelta() {
1292
- return Number((getHiResTimestamp() - this._deltaTs).toPrecision(10));
1298
+ return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
1293
1299
  }
1294
1300
  set priority(newPriority) {
1295
1301
  this.level = newPriority;
@@ -1300,7 +1306,8 @@
1300
1306
  getPriority() {
1301
1307
  return this.level;
1302
1308
  }
1303
- enable(enabled = true) {
1309
+ enable() {
1310
+ let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
1304
1311
  this._storage.updateConfiguration({
1305
1312
  enabled
1306
1313
  });
@@ -1312,6 +1319,21 @@
1312
1319
  });
1313
1320
  return this;
1314
1321
  }
1322
+ get(setting) {
1323
+ return this._storage.config[setting];
1324
+ }
1325
+ set(setting, value) {
1326
+ this._storage.updateConfiguration({
1327
+ [setting]: value
1328
+ });
1329
+ }
1330
+ settings() {
1331
+ if (console.table) {
1332
+ console.table(this._storage.config);
1333
+ } else {
1334
+ console.log(this._storage.config);
1335
+ }
1336
+ }
1315
1337
  assert(condition, message) {
1316
1338
  assert3(condition, message);
1317
1339
  }
@@ -1340,6 +1362,9 @@
1340
1362
  return this._getLogFunction(logLevel, message, console.info, arguments);
1341
1363
  }
1342
1364
  once(logLevel, message) {
1365
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1366
+ args[_key - 2] = arguments[_key];
1367
+ }
1343
1368
  return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
1344
1369
  }
1345
1370
  table(logLevel, table, columns) {
@@ -1350,17 +1375,18 @@
1350
1375
  }
1351
1376
  return noop;
1352
1377
  }
1353
- image({
1354
- logLevel,
1355
- priority,
1356
- image,
1357
- message = "",
1358
- scale: scale2 = 1
1359
- }) {
1378
+ image(_ref) {
1379
+ let {
1380
+ logLevel,
1381
+ priority,
1382
+ image,
1383
+ message = "",
1384
+ scale: scale2 = 1
1385
+ } = _ref;
1360
1386
  if (!this._shouldLog(logLevel || priority)) {
1361
1387
  return noop;
1362
1388
  }
1363
- return isBrowser4 ? logImageInBrowser({
1389
+ return isBrowser3 ? logImageInBrowser({
1364
1390
  image,
1365
1391
  message,
1366
1392
  scale: scale2
@@ -1370,21 +1396,6 @@
1370
1396
  scale: scale2
1371
1397
  });
1372
1398
  }
1373
- settings() {
1374
- if (console.table) {
1375
- console.table(this._storage.config);
1376
- } else {
1377
- console.log(this._storage.config);
1378
- }
1379
- }
1380
- get(setting) {
1381
- return this._storage.config[setting];
1382
- }
1383
- set(setting, value) {
1384
- this._storage.updateConfiguration({
1385
- [setting]: value
1386
- });
1387
- }
1388
1399
  time(logLevel, message) {
1389
1400
  return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
1390
1401
  }
@@ -1394,10 +1405,11 @@
1394
1405
  timeStamp(logLevel, message) {
1395
1406
  return this._getLogFunction(logLevel, message, console.timeStamp || noop);
1396
1407
  }
1397
- group(logLevel, message, opts = {
1398
- collapsed: false
1399
- }) {
1400
- opts = normalizeArguments({
1408
+ group(logLevel, message) {
1409
+ let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
1410
+ collapsed: false
1411
+ };
1412
+ const options = normalizeArguments({
1401
1413
  logLevel,
1402
1414
  message,
1403
1415
  opts
@@ -1405,10 +1417,11 @@
1405
1417
  const {
1406
1418
  collapsed
1407
1419
  } = opts;
1408
- opts.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
1409
- return this._getLogFunction(opts);
1420
+ options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
1421
+ return this._getLogFunction(options);
1410
1422
  }
1411
- groupCollapsed(logLevel, message, opts = {}) {
1423
+ groupCollapsed(logLevel, message) {
1424
+ let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1412
1425
  return this.group(logLevel, message, Object.assign({}, opts, {
1413
1426
  collapsed: true
1414
1427
  }));
@@ -1432,7 +1445,7 @@
1432
1445
  _shouldLog(logLevel) {
1433
1446
  return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
1434
1447
  }
1435
- _getLogFunction(logLevel, message, method, args = [], opts) {
1448
+ _getLogFunction(logLevel, message, method, args, opts) {
1436
1449
  if (this._shouldLog(logLevel)) {
1437
1450
  opts = normalizeArguments({
1438
1451
  logLevel,
@@ -1444,11 +1457,11 @@
1444
1457
  assert3(method);
1445
1458
  opts.total = this.getTotal();
1446
1459
  opts.delta = this.getDelta();
1447
- this._deltaTs = getHiResTimestamp();
1460
+ this._deltaTs = getHiResTimestamp2();
1448
1461
  const tag = opts.tag || opts.message;
1449
1462
  if (opts.once) {
1450
1463
  if (!cache[tag]) {
1451
- cache[tag] = getHiResTimestamp();
1464
+ cache[tag] = getHiResTimestamp2();
1452
1465
  } else {
1453
1466
  return noop;
1454
1467
  }
@@ -1459,7 +1472,7 @@
1459
1472
  return noop;
1460
1473
  }
1461
1474
  };
1462
- Log.VERSION = VERSION3;
1475
+ _defineProperty(Log, "VERSION", VERSION3);
1463
1476
  function normalizeLogLevel(logLevel) {
1464
1477
  if (!logLevel) {
1465
1478
  return 0;
@@ -1487,7 +1500,6 @@
1487
1500
  const args = opts.args ? Array.from(opts.args) : [];
1488
1501
  while (args.length && args.shift() !== message) {
1489
1502
  }
1490
- opts.args = args;
1491
1503
  switch (typeof logLevel) {
1492
1504
  case "string":
1493
1505
  case "function":
@@ -1506,7 +1518,9 @@
1506
1518
  }
1507
1519
  const messageType = typeof opts.message;
1508
1520
  assert3(messageType === "string" || messageType === "object");
1509
- return Object.assign(opts, opts.opts);
1521
+ return Object.assign(opts, {
1522
+ args
1523
+ }, opts.opts);
1510
1524
  }
1511
1525
  function decorateMessage(id, message, opts) {
1512
1526
  if (typeof message === "string") {
@@ -1516,29 +1530,25 @@
1516
1530
  }
1517
1531
  return message;
1518
1532
  }
1519
- function logImageInNode({
1520
- image,
1521
- message = "",
1522
- scale: scale2 = 1
1523
- }) {
1524
- let asciify = null;
1525
- try {
1526
- asciify = module.require("asciify-image");
1527
- } catch (error) {
1528
- }
1529
- if (asciify) {
1530
- return () => asciify(image, {
1531
- fit: "box",
1532
- width: "".concat(Math.round(80 * scale2), "%")
1533
- }).then((data) => console.log(data));
1534
- }
1533
+ function logImageInNode(_ref2) {
1534
+ let {
1535
+ image,
1536
+ message = "",
1537
+ scale: scale2 = 1
1538
+ } = _ref2;
1539
+ asciify.nodeAsciifyImage({
1540
+ image,
1541
+ message,
1542
+ scale: scale2
1543
+ });
1535
1544
  return noop;
1536
1545
  }
1537
- function logImageInBrowser({
1538
- image,
1539
- message = "",
1540
- scale: scale2 = 1
1541
- }) {
1546
+ function logImageInBrowser(_ref3) {
1547
+ let {
1548
+ image,
1549
+ message = "",
1550
+ scale: scale2 = 1
1551
+ } = _ref3;
1542
1552
  if (typeof image === "string") {
1543
1553
  const img = new Image();
1544
1554
  img.onload = () => {
@@ -1561,10 +1571,18 @@
1561
1571
  }
1562
1572
  return noop;
1563
1573
  }
1574
+ function getTableHeader(table) {
1575
+ for (const key in table) {
1576
+ for (const title in table[key]) {
1577
+ return title || "untitled";
1578
+ }
1579
+ }
1580
+ return "empty";
1581
+ }
1564
1582
 
1565
- // ../../node_modules/probe.gl/dist/esm/index.js
1583
+ // ../../node_modules/@probe.gl/log/dist/esm/index.js
1566
1584
  var esm_default = new Log({
1567
- id: "probe.gl"
1585
+ id: "@probe.gl/log"
1568
1586
  });
1569
1587
 
1570
1588
  // ../core/src/lib/loader-utils/loggers.ts
@@ -1739,607 +1757,61 @@
1739
1757
  ...options[key]
1740
1758
  };
1741
1759
  } else {
1742
- mergedOptions[key] = options[key];
1743
- }
1744
- }
1745
- }
1746
- }
1747
- function addUrlOptions(options, url) {
1748
- if (url && !("baseUri" in options)) {
1749
- options.baseUri = url;
1750
- }
1751
- }
1752
-
1753
- // ../core/src/lib/loader-utils/normalize-loader.ts
1754
- function isLoaderObject(loader) {
1755
- if (!loader) {
1756
- return false;
1757
- }
1758
- if (Array.isArray(loader)) {
1759
- loader = loader[0];
1760
- }
1761
- const hasExtensions = Array.isArray(loader?.extensions);
1762
- return hasExtensions;
1763
- }
1764
- function normalizeLoader(loader) {
1765
- assert(loader, "null loader");
1766
- assert(isLoaderObject(loader), "invalid loader");
1767
- let options;
1768
- if (Array.isArray(loader)) {
1769
- options = loader[1];
1770
- loader = loader[0];
1771
- loader = {
1772
- ...loader,
1773
- options: { ...loader.options, ...options }
1774
- };
1775
- }
1776
- if (loader?.parseTextSync || loader?.parseText) {
1777
- loader.text = true;
1778
- }
1779
- if (!loader.text) {
1780
- loader.binary = true;
1781
- }
1782
- return loader;
1783
- }
1784
-
1785
- // ../core/src/lib/api/register-loaders.ts
1786
- var getGlobalLoaderRegistry = () => {
1787
- const state = getGlobalLoaderState();
1788
- state.loaderRegistry = state.loaderRegistry || [];
1789
- return state.loaderRegistry;
1790
- };
1791
- function getRegisteredLoaders() {
1792
- return getGlobalLoaderRegistry();
1793
- }
1794
-
1795
- // ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
1796
- function isElectron2(mockUserAgent) {
1797
- if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
1798
- return true;
1799
- }
1800
- if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions.electron)) {
1801
- return true;
1802
- }
1803
- const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
1804
- const userAgent = mockUserAgent || realUserAgent;
1805
- if (userAgent && userAgent.indexOf("Electron") >= 0) {
1806
- return true;
1807
- }
1808
- return false;
1809
- }
1810
-
1811
- // ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
1812
- function isBrowser5() {
1813
- const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
1814
- return !isNode || isElectron2();
1815
- }
1816
-
1817
- // ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
1818
- var globals4 = {
1819
- self: typeof self !== "undefined" && self,
1820
- window: typeof window !== "undefined" && window,
1821
- global: typeof global !== "undefined" && global,
1822
- document: typeof document !== "undefined" && document,
1823
- process: typeof process === "object" && process
1824
- };
1825
- var self_4 = globals4.self || globals4.window || globals4.global;
1826
- var window_4 = globals4.window || globals4.self || globals4.global;
1827
- var document_4 = globals4.document || {};
1828
- var process_2 = globals4.process || {};
1829
-
1830
- // ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
1831
- var VERSION4 = true ? "3.3.0-alpha.5" : "untranspiled source";
1832
- var isBrowser6 = isBrowser5();
1833
-
1834
- // ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
1835
- function getStorage2(type) {
1836
- try {
1837
- const storage = window[type];
1838
- const x = "__storage_test__";
1839
- storage.setItem(x, x);
1840
- storage.removeItem(x);
1841
- return storage;
1842
- } catch (e2) {
1843
- return null;
1844
- }
1845
- }
1846
- var LocalStorage2 = class {
1847
- constructor(id) {
1848
- let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1849
- let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
1850
- _defineProperty(this, "storage", void 0);
1851
- _defineProperty(this, "id", void 0);
1852
- _defineProperty(this, "config", {});
1853
- this.storage = getStorage2(type);
1854
- this.id = id;
1855
- this.config = {};
1856
- Object.assign(this.config, defaultSettings);
1857
- this._loadConfiguration();
1858
- }
1859
- getConfiguration() {
1860
- return this.config;
1861
- }
1862
- setConfiguration(configuration) {
1863
- this.config = {};
1864
- return this.updateConfiguration(configuration);
1865
- }
1866
- updateConfiguration(configuration) {
1867
- Object.assign(this.config, configuration);
1868
- if (this.storage) {
1869
- const serialized = JSON.stringify(this.config);
1870
- this.storage.setItem(this.id, serialized);
1871
- }
1872
- return this;
1873
- }
1874
- _loadConfiguration() {
1875
- let configuration = {};
1876
- if (this.storage) {
1877
- const serializedConfiguration = this.storage.getItem(this.id);
1878
- configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
1879
- }
1880
- Object.assign(this.config, configuration);
1881
- return this;
1882
- }
1883
- };
1884
-
1885
- // ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
1886
- function formatTime2(ms) {
1887
- let formatted;
1888
- if (ms < 10) {
1889
- formatted = "".concat(ms.toFixed(2), "ms");
1890
- } else if (ms < 100) {
1891
- formatted = "".concat(ms.toFixed(1), "ms");
1892
- } else if (ms < 1e3) {
1893
- formatted = "".concat(ms.toFixed(0), "ms");
1894
- } else {
1895
- formatted = "".concat((ms / 1e3).toFixed(2), "s");
1896
- }
1897
- return formatted;
1898
- }
1899
- function leftPad2(string) {
1900
- let length2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
1901
- const padLength = Math.max(length2 - string.length, 0);
1902
- return "".concat(" ".repeat(padLength)).concat(string);
1903
- }
1904
- function formatImage2(image, message, scale2) {
1905
- let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
1906
- const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
1907
- if (image.width > maxWidth) {
1908
- scale2 = Math.min(scale2, maxWidth / image.width);
1909
- }
1910
- const width = image.width * scale2;
1911
- const height = image.height * scale2;
1912
- 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("");
1913
- return ["".concat(message, " %c+"), style];
1914
- }
1915
-
1916
- // ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
1917
- var COLOR2;
1918
- (function(COLOR3) {
1919
- COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
1920
- COLOR3[COLOR3["RED"] = 31] = "RED";
1921
- COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
1922
- COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
1923
- COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
1924
- COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
1925
- COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
1926
- COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
1927
- COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
1928
- COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
1929
- COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
1930
- COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
1931
- COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
1932
- COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
1933
- COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
1934
- COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
1935
- })(COLOR2 || (COLOR2 = {}));
1936
- function getColor2(color) {
1937
- return typeof color === "string" ? COLOR2[color.toUpperCase()] || COLOR2.WHITE : color;
1938
- }
1939
- function addColor2(string, color, background) {
1940
- if (!isBrowser5 && typeof string === "string") {
1941
- if (color) {
1942
- color = getColor2(color);
1943
- string = "[".concat(color, "m").concat(string, "");
1944
- }
1945
- if (background) {
1946
- color = getColor2(background);
1947
- string = "[".concat(background + 10, "m").concat(string, "");
1948
- }
1949
- }
1950
- return string;
1951
- }
1952
-
1953
- // ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
1954
- function autobind2(obj) {
1955
- let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
1956
- const proto = Object.getPrototypeOf(obj);
1957
- const propNames = Object.getOwnPropertyNames(proto);
1958
- for (const key of propNames) {
1959
- if (typeof obj[key] === "function") {
1960
- if (!predefined.find((name) => key === name)) {
1961
- obj[key] = obj[key].bind(obj);
1962
- }
1963
- }
1964
- }
1965
- }
1966
-
1967
- // ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
1968
- function assert4(condition, message) {
1969
- if (!condition) {
1970
- throw new Error(message || "Assertion failed");
1971
- }
1972
- }
1973
-
1974
- // ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
1975
- function getHiResTimestamp3() {
1976
- let timestamp;
1977
- if (isBrowser5 && "performance" in window_4) {
1978
- var _window$performance, _window$performance$n;
1979
- 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);
1980
- } else if ("hrtime" in process_2) {
1981
- var _process$hrtime;
1982
- 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);
1983
- timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
1984
- } else {
1985
- timestamp = Date.now();
1986
- }
1987
- return timestamp;
1988
- }
1989
-
1990
- // ../../node_modules/@probe.gl/log/dist/esm/log.js
1991
- var originalConsole2 = {
1992
- debug: isBrowser5 ? console.debug || console.log : console.log,
1993
- log: console.log,
1994
- info: console.info,
1995
- warn: console.warn,
1996
- error: console.error
1997
- };
1998
- var DEFAULT_SETTINGS2 = {
1999
- enabled: true,
2000
- level: 0
2001
- };
2002
- function noop2() {
2003
- }
2004
- var cache2 = {};
2005
- var ONCE2 = {
2006
- once: true
2007
- };
2008
- var Log2 = class {
2009
- constructor() {
2010
- let {
2011
- id
2012
- } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
2013
- id: ""
2014
- };
2015
- _defineProperty(this, "id", void 0);
2016
- _defineProperty(this, "VERSION", VERSION4);
2017
- _defineProperty(this, "_startTs", getHiResTimestamp3());
2018
- _defineProperty(this, "_deltaTs", getHiResTimestamp3());
2019
- _defineProperty(this, "_storage", void 0);
2020
- _defineProperty(this, "userData", {});
2021
- _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
2022
- this.id = id;
2023
- this._storage = new LocalStorage2("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS2);
2024
- this.userData = {};
2025
- this.timeStamp("".concat(this.id, " started"));
2026
- autobind2(this);
2027
- Object.seal(this);
2028
- }
2029
- set level(newLevel) {
2030
- this.setLevel(newLevel);
2031
- }
2032
- get level() {
2033
- return this.getLevel();
2034
- }
2035
- isEnabled() {
2036
- return this._storage.config.enabled;
2037
- }
2038
- getLevel() {
2039
- return this._storage.config.level;
2040
- }
2041
- getTotal() {
2042
- return Number((getHiResTimestamp3() - this._startTs).toPrecision(10));
2043
- }
2044
- getDelta() {
2045
- return Number((getHiResTimestamp3() - this._deltaTs).toPrecision(10));
2046
- }
2047
- set priority(newPriority) {
2048
- this.level = newPriority;
2049
- }
2050
- get priority() {
2051
- return this.level;
2052
- }
2053
- getPriority() {
2054
- return this.level;
2055
- }
2056
- enable() {
2057
- let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
2058
- this._storage.updateConfiguration({
2059
- enabled
2060
- });
2061
- return this;
2062
- }
2063
- setLevel(level) {
2064
- this._storage.updateConfiguration({
2065
- level
2066
- });
2067
- return this;
2068
- }
2069
- get(setting) {
2070
- return this._storage.config[setting];
2071
- }
2072
- set(setting, value) {
2073
- this._storage.updateConfiguration({
2074
- [setting]: value
2075
- });
2076
- }
2077
- settings() {
2078
- if (console.table) {
2079
- console.table(this._storage.config);
2080
- } else {
2081
- console.log(this._storage.config);
2082
- }
2083
- }
2084
- assert(condition, message) {
2085
- assert4(condition, message);
2086
- }
2087
- warn(message) {
2088
- return this._getLogFunction(0, message, originalConsole2.warn, arguments, ONCE2);
2089
- }
2090
- error(message) {
2091
- return this._getLogFunction(0, message, originalConsole2.error, arguments);
2092
- }
2093
- deprecated(oldUsage, newUsage) {
2094
- return this.warn("`".concat(oldUsage, "` is deprecated and will be removed in a later version. Use `").concat(newUsage, "` instead"));
2095
- }
2096
- removed(oldUsage, newUsage) {
2097
- return this.error("`".concat(oldUsage, "` has been removed. Use `").concat(newUsage, "` instead"));
2098
- }
2099
- probe(logLevel, message) {
2100
- return this._getLogFunction(logLevel, message, originalConsole2.log, arguments, {
2101
- time: true,
2102
- once: true
2103
- });
2104
- }
2105
- log(logLevel, message) {
2106
- return this._getLogFunction(logLevel, message, originalConsole2.debug, arguments);
2107
- }
2108
- info(logLevel, message) {
2109
- return this._getLogFunction(logLevel, message, console.info, arguments);
2110
- }
2111
- once(logLevel, message) {
2112
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2113
- args[_key - 2] = arguments[_key];
2114
- }
2115
- return this._getLogFunction(logLevel, message, originalConsole2.debug || originalConsole2.info, arguments, ONCE2);
2116
- }
2117
- table(logLevel, table, columns) {
2118
- if (table) {
2119
- return this._getLogFunction(logLevel, table, console.table || noop2, columns && [columns], {
2120
- tag: getTableHeader2(table)
2121
- });
2122
- }
2123
- return noop2;
2124
- }
2125
- image(_ref) {
2126
- let {
2127
- logLevel,
2128
- priority,
2129
- image,
2130
- message = "",
2131
- scale: scale2 = 1
2132
- } = _ref;
2133
- if (!this._shouldLog(logLevel || priority)) {
2134
- return noop2;
2135
- }
2136
- return isBrowser5 ? logImageInBrowser2({
2137
- image,
2138
- message,
2139
- scale: scale2
2140
- }) : logImageInNode2({
2141
- image,
2142
- message,
2143
- scale: scale2
2144
- });
2145
- }
2146
- time(logLevel, message) {
2147
- return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
2148
- }
2149
- timeEnd(logLevel, message) {
2150
- return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
2151
- }
2152
- timeStamp(logLevel, message) {
2153
- return this._getLogFunction(logLevel, message, console.timeStamp || noop2);
2154
- }
2155
- group(logLevel, message) {
2156
- let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
2157
- collapsed: false
2158
- };
2159
- const options = normalizeArguments2({
2160
- logLevel,
2161
- message,
2162
- opts
2163
- });
2164
- const {
2165
- collapsed
2166
- } = opts;
2167
- options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
2168
- return this._getLogFunction(options);
2169
- }
2170
- groupCollapsed(logLevel, message) {
2171
- let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2172
- return this.group(logLevel, message, Object.assign({}, opts, {
2173
- collapsed: true
2174
- }));
2175
- }
2176
- groupEnd(logLevel) {
2177
- return this._getLogFunction(logLevel, "", console.groupEnd || noop2);
2178
- }
2179
- withGroup(logLevel, message, func) {
2180
- this.group(logLevel, message)();
2181
- try {
2182
- func();
2183
- } finally {
2184
- this.groupEnd(logLevel)();
2185
- }
2186
- }
2187
- trace() {
2188
- if (console.trace) {
2189
- console.trace();
2190
- }
2191
- }
2192
- _shouldLog(logLevel) {
2193
- return this.isEnabled() && this.getLevel() >= normalizeLogLevel2(logLevel);
2194
- }
2195
- _getLogFunction(logLevel, message, method, args, opts) {
2196
- if (this._shouldLog(logLevel)) {
2197
- opts = normalizeArguments2({
2198
- logLevel,
2199
- message,
2200
- args,
2201
- opts
2202
- });
2203
- method = method || opts.method;
2204
- assert4(method);
2205
- opts.total = this.getTotal();
2206
- opts.delta = this.getDelta();
2207
- this._deltaTs = getHiResTimestamp3();
2208
- const tag = opts.tag || opts.message;
2209
- if (opts.once) {
2210
- if (!cache2[tag]) {
2211
- cache2[tag] = getHiResTimestamp3();
2212
- } else {
2213
- return noop2;
2214
- }
2215
- }
2216
- message = decorateMessage2(this.id, opts.message, opts);
2217
- return method.bind(console, message, ...opts.args);
2218
- }
2219
- return noop2;
2220
- }
2221
- };
2222
- _defineProperty(Log2, "VERSION", VERSION4);
2223
- function normalizeLogLevel2(logLevel) {
2224
- if (!logLevel) {
2225
- return 0;
2226
- }
2227
- let resolvedLevel;
2228
- switch (typeof logLevel) {
2229
- case "number":
2230
- resolvedLevel = logLevel;
2231
- break;
2232
- case "object":
2233
- resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
2234
- break;
2235
- default:
2236
- return 0;
2237
- }
2238
- assert4(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
2239
- return resolvedLevel;
2240
- }
2241
- function normalizeArguments2(opts) {
2242
- const {
2243
- logLevel,
2244
- message
2245
- } = opts;
2246
- opts.logLevel = normalizeLogLevel2(logLevel);
2247
- const args = opts.args ? Array.from(opts.args) : [];
2248
- while (args.length && args.shift() !== message) {
2249
- }
2250
- switch (typeof logLevel) {
2251
- case "string":
2252
- case "function":
2253
- if (message !== void 0) {
2254
- args.unshift(message);
1760
+ mergedOptions[key] = options[key];
2255
1761
  }
2256
- opts.message = logLevel;
2257
- break;
2258
- case "object":
2259
- Object.assign(opts, logLevel);
2260
- break;
2261
- default:
2262
- }
2263
- if (typeof opts.message === "function") {
2264
- opts.message = opts.message();
1762
+ }
2265
1763
  }
2266
- const messageType = typeof opts.message;
2267
- assert4(messageType === "string" || messageType === "object");
2268
- return Object.assign(opts, {
2269
- args
2270
- }, opts.opts);
2271
1764
  }
2272
- function decorateMessage2(id, message, opts) {
2273
- if (typeof message === "string") {
2274
- const time = opts.time ? leftPad2(formatTime2(opts.total)) : "";
2275
- message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
2276
- message = addColor2(message, opts.color, opts.background);
1765
+ function addUrlOptions(options, url) {
1766
+ if (url && !("baseUri" in options)) {
1767
+ options.baseUri = url;
2277
1768
  }
2278
- return message;
2279
1769
  }
2280
- function logImageInNode2(_ref2) {
2281
- let {
2282
- image,
2283
- message = "",
2284
- scale: scale2 = 1
2285
- } = _ref2;
2286
- let asciify = null;
2287
- try {
2288
- asciify = module.require("asciify-image");
2289
- } catch (error) {
1770
+
1771
+ // ../core/src/lib/loader-utils/normalize-loader.ts
1772
+ function isLoaderObject(loader) {
1773
+ if (!loader) {
1774
+ return false;
2290
1775
  }
2291
- if (asciify) {
2292
- return () => asciify(image, {
2293
- fit: "box",
2294
- width: "".concat(Math.round(80 * scale2), "%")
2295
- }).then((data) => console.log(data));
1776
+ if (Array.isArray(loader)) {
1777
+ loader = loader[0];
2296
1778
  }
2297
- return noop2;
1779
+ const hasExtensions = Array.isArray(loader?.extensions);
1780
+ return hasExtensions;
2298
1781
  }
2299
- function logImageInBrowser2(_ref3) {
2300
- let {
2301
- image,
2302
- message = "",
2303
- scale: scale2 = 1
2304
- } = _ref3;
2305
- if (typeof image === "string") {
2306
- const img = new Image();
2307
- img.onload = () => {
2308
- const args = formatImage2(img, message, scale2);
2309
- console.log(...args);
1782
+ function normalizeLoader(loader) {
1783
+ assert(loader, "null loader");
1784
+ assert(isLoaderObject(loader), "invalid loader");
1785
+ let options;
1786
+ if (Array.isArray(loader)) {
1787
+ options = loader[1];
1788
+ loader = loader[0];
1789
+ loader = {
1790
+ ...loader,
1791
+ options: { ...loader.options, ...options }
2310
1792
  };
2311
- img.src = image;
2312
- return noop2;
2313
- }
2314
- const element = image.nodeName || "";
2315
- if (element.toLowerCase() === "img") {
2316
- console.log(...formatImage2(image, message, scale2));
2317
- return noop2;
2318
1793
  }
2319
- if (element.toLowerCase() === "canvas") {
2320
- const img = new Image();
2321
- img.onload = () => console.log(...formatImage2(img, message, scale2));
2322
- img.src = image.toDataURL();
2323
- return noop2;
1794
+ if (loader?.parseTextSync || loader?.parseText) {
1795
+ loader.text = true;
2324
1796
  }
2325
- return noop2;
2326
- }
2327
- function getTableHeader2(table) {
2328
- for (const key in table) {
2329
- for (const title in table[key]) {
2330
- return title || "untitled";
2331
- }
1797
+ if (!loader.text) {
1798
+ loader.binary = true;
2332
1799
  }
2333
- return "empty";
1800
+ return loader;
2334
1801
  }
2335
1802
 
2336
- // ../../node_modules/@probe.gl/log/dist/esm/index.js
2337
- var esm_default2 = new Log2({
2338
- id: "@probe.gl/log"
2339
- });
1803
+ // ../core/src/lib/api/register-loaders.ts
1804
+ var getGlobalLoaderRegistry = () => {
1805
+ const state = getGlobalLoaderState();
1806
+ state.loaderRegistry = state.loaderRegistry || [];
1807
+ return state.loaderRegistry;
1808
+ };
1809
+ function getRegisteredLoaders() {
1810
+ return getGlobalLoaderRegistry();
1811
+ }
2340
1812
 
2341
1813
  // ../core/src/lib/utils/log.ts
2342
- var log = new Log2({ id: "loaders.gl" });
1814
+ var log = new Log({ id: "loaders.gl" });
2343
1815
 
2344
1816
  // ../core/src/lib/api/select-loader.ts
2345
1817
  var EXT_PATTERN = /\.([^.]+)$/;
@@ -2764,7 +2236,7 @@
2764
2236
  }
2765
2237
 
2766
2238
  // ../../node_modules/@math.gl/core/dist/esm/lib/assert.js
2767
- function assert5(condition, message) {
2239
+ function assert4(condition, message) {
2768
2240
  if (!condition) {
2769
2241
  throw new Error("math.gl assertion ".concat(message));
2770
2242
  }
@@ -2773,18 +2245,16 @@
2773
2245
  // ../../node_modules/@math.gl/core/dist/esm/lib/common.js
2774
2246
  var RADIANS_TO_DEGREES = 1 / Math.PI * 180;
2775
2247
  var DEGREES_TO_RADIANS = 1 / 180 * Math.PI;
2776
- var config = {};
2777
- config.EPSILON = 1e-12;
2778
- config.debug = false;
2779
- config.precision = 4;
2780
- config.printTypes = false;
2781
- config.printDegrees = false;
2782
- config.printRowMajor = true;
2783
- function round(value) {
2784
- return Math.round(value / config.EPSILON) * config.EPSILON;
2785
- }
2248
+ var config = {
2249
+ EPSILON: 1e-12,
2250
+ debug: false,
2251
+ precision: 4,
2252
+ printTypes: false,
2253
+ printDegrees: false,
2254
+ printRowMajor: true
2255
+ };
2786
2256
  function formatValue(value, {
2787
- precision = config.precision || 4
2257
+ precision = config.precision
2788
2258
  } = {}) {
2789
2259
  value = round(value);
2790
2260
  return "".concat(parseFloat(value.toPrecision(precision)));
@@ -2792,19 +2262,6 @@
2792
2262
  function isArray(value) {
2793
2263
  return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);
2794
2264
  }
2795
- function duplicateArray(array) {
2796
- return array.clone ? array.clone() : new Array(array.length);
2797
- }
2798
- function map(value, func, result) {
2799
- if (isArray(value)) {
2800
- result = result || duplicateArray(value);
2801
- for (let i2 = 0; i2 < result.length && i2 < value.length; ++i2) {
2802
- result[i2] = func(value[i2], i2, result);
2803
- }
2804
- return result;
2805
- }
2806
- return func(value);
2807
- }
2808
2265
  function toRadians(degrees2) {
2809
2266
  return radians(degrees2);
2810
2267
  }
@@ -2843,7 +2300,7 @@
2843
2300
  if (b && b.equals) {
2844
2301
  return b.equals(a2);
2845
2302
  }
2846
- if (Number.isFinite(a2) && Number.isFinite(b)) {
2303
+ if (typeof a2 === "number" && typeof b === "number") {
2847
2304
  return Math.abs(a2 - b) <= config.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b));
2848
2305
  }
2849
2306
  return false;
@@ -2851,6 +2308,23 @@
2851
2308
  config.EPSILON = oldEpsilon;
2852
2309
  }
2853
2310
  }
2311
+ function round(value) {
2312
+ return Math.round(value / config.EPSILON) * config.EPSILON;
2313
+ }
2314
+ function duplicateArray(array) {
2315
+ return array.clone ? array.clone() : new Array(array.length);
2316
+ }
2317
+ function map(value, func, result) {
2318
+ if (isArray(value)) {
2319
+ const array = value;
2320
+ result = result || duplicateArray(array);
2321
+ for (let i2 = 0; i2 < result.length && i2 < array.length; ++i2) {
2322
+ result[i2] = func(value[i2], i2, result);
2323
+ }
2324
+ return result;
2325
+ }
2326
+ return func(value);
2327
+ }
2854
2328
 
2855
2329
  // ../../node_modules/@math.gl/core/dist/esm/classes/base/math-array.js
2856
2330
  function _extendableBuiltin(cls) {
@@ -2875,22 +2349,24 @@
2875
2349
  return ExtendableBuiltin;
2876
2350
  }
2877
2351
  var MathArray = class extends _extendableBuiltin(Array) {
2878
- get ELEMENTS() {
2879
- assert5(false);
2880
- return 0;
2881
- }
2882
2352
  clone() {
2883
2353
  return new this.constructor().copy(this);
2884
2354
  }
2885
- from(arrayOrObject) {
2886
- return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
2887
- }
2888
2355
  fromArray(array, offset = 0) {
2889
2356
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2890
2357
  this[i2] = array[i2 + offset];
2891
2358
  }
2892
2359
  return this.check();
2893
2360
  }
2361
+ toArray(targetArray = [], offset = 0) {
2362
+ for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2363
+ targetArray[offset + i2] = this[i2];
2364
+ }
2365
+ return targetArray;
2366
+ }
2367
+ from(arrayOrObject) {
2368
+ return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
2369
+ }
2894
2370
  to(arrayOrObject) {
2895
2371
  if (arrayOrObject === this) {
2896
2372
  return this;
@@ -2900,12 +2376,6 @@
2900
2376
  toTarget(target) {
2901
2377
  return target ? this.to(target) : this;
2902
2378
  }
2903
- toArray(array = [], offset = 0) {
2904
- for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2905
- array[offset + i2] = this[i2];
2906
- }
2907
- return array;
2908
- }
2909
2379
  toFloat32Array() {
2910
2380
  return new Float32Array(this);
2911
2381
  }
@@ -2949,9 +2419,7 @@
2949
2419
  }
2950
2420
  lerp(a2, b, t2) {
2951
2421
  if (t2 === void 0) {
2952
- t2 = b;
2953
- b = a2;
2954
- a2 = this;
2422
+ return this.lerp(this, a2, b);
2955
2423
  }
2956
2424
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2957
2425
  const ai = a2[i2];
@@ -2994,14 +2462,36 @@
2994
2462
  return this.check();
2995
2463
  }
2996
2464
  scale(scale2) {
2997
- if (Array.isArray(scale2)) {
2998
- return this.multiply(scale2);
2465
+ if (typeof scale2 === "number") {
2466
+ for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2467
+ this[i2] *= scale2;
2468
+ }
2469
+ } else {
2470
+ for (let i2 = 0; i2 < this.ELEMENTS && i2 < scale2.length; ++i2) {
2471
+ this[i2] *= scale2[i2];
2472
+ }
2999
2473
  }
2474
+ return this.check();
2475
+ }
2476
+ multiplyByScalar(scalar) {
3000
2477
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
3001
- this[i2] *= scale2;
2478
+ this[i2] *= scalar;
3002
2479
  }
3003
2480
  return this.check();
3004
2481
  }
2482
+ check() {
2483
+ if (config.debug && !this.validate()) {
2484
+ throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
2485
+ }
2486
+ return this;
2487
+ }
2488
+ validate() {
2489
+ let valid = this.length === this.ELEMENTS;
2490
+ for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
2491
+ valid = valid && Number.isFinite(this[i2]);
2492
+ }
2493
+ return valid;
2494
+ }
3005
2495
  sub(a2) {
3006
2496
  return this.subtract(a2);
3007
2497
  }
@@ -3027,7 +2517,7 @@
3027
2517
  return this.check();
3028
2518
  }
3029
2519
  divideScalar(a2) {
3030
- return this.scale(1 / a2);
2520
+ return this.multiplyByScalar(1 / a2);
3031
2521
  }
3032
2522
  clampScalar(min, max) {
3033
2523
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
@@ -3035,25 +2525,9 @@
3035
2525
  }
3036
2526
  return this.check();
3037
2527
  }
3038
- multiplyByScalar(scalar) {
3039
- return this.scale(scalar);
3040
- }
3041
2528
  get elements() {
3042
2529
  return this;
3043
2530
  }
3044
- check() {
3045
- if (config.debug && !this.validate()) {
3046
- throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
3047
- }
3048
- return this;
3049
- }
3050
- validate() {
3051
- let valid = this.length === this.ELEMENTS;
3052
- for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
3053
- valid = valid && Number.isFinite(this[i2]);
3054
- }
3055
- return valid;
3056
- }
3057
2531
  };
3058
2532
 
3059
2533
  // ../../node_modules/@math.gl/core/dist/esm/lib/validators.js
@@ -3080,24 +2554,9 @@
3080
2554
  }
3081
2555
  return v;
3082
2556
  }
3083
- var map2 = {};
3084
- function deprecated(method, version) {
3085
- if (!map2[method]) {
3086
- map2[method] = true;
3087
- console.warn("".concat(method, " has been removed in version ").concat(version, ", see upgrade guide for more information"));
3088
- }
3089
- }
3090
2557
 
3091
2558
  // ../../node_modules/@math.gl/core/dist/esm/classes/base/vector.js
3092
2559
  var Vector = class extends MathArray {
3093
- get ELEMENTS() {
3094
- assert5(false);
3095
- return 0;
3096
- }
3097
- copy(vector) {
3098
- assert5(false);
3099
- return this;
3100
- }
3101
2560
  get x() {
3102
2561
  return this[0];
3103
2562
  }
@@ -3179,11 +2638,11 @@
3179
2638
  return this.distanceSquared(vector);
3180
2639
  }
3181
2640
  getComponent(i2) {
3182
- assert5(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
2641
+ assert4(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
3183
2642
  return checkNumber(this[i2]);
3184
2643
  }
3185
2644
  setComponent(i2, value) {
3186
- assert5(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
2645
+ assert4(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
3187
2646
  this[i2] = value;
3188
2647
  return this.check();
3189
2648
  }
@@ -3417,10 +2876,14 @@
3417
2876
 
3418
2877
  // ../../node_modules/@math.gl/core/dist/esm/classes/vector3.js
3419
2878
  var ORIGIN = [0, 0, 0];
3420
- var constants = {};
2879
+ var ZERO;
3421
2880
  var Vector3 = class extends Vector {
3422
2881
  static get ZERO() {
3423
- return constants.ZERO = constants.ZERO || Object.freeze(new Vector3(0, 0, 0, 0));
2882
+ if (!ZERO) {
2883
+ ZERO = new Vector3(0, 0, 0);
2884
+ Object.freeze(ZERO);
2885
+ }
2886
+ return ZERO;
3424
2887
  }
3425
2888
  constructor(x = 0, y = 0, z = 0) {
3426
2889
  super(-0, -0, -0);
@@ -3530,14 +2993,6 @@
3530
2993
 
3531
2994
  // ../../node_modules/@math.gl/core/dist/esm/classes/base/matrix.js
3532
2995
  var Matrix = class extends MathArray {
3533
- get ELEMENTS() {
3534
- assert5(false);
3535
- return 0;
3536
- }
3537
- get RANK() {
3538
- assert5(false);
3539
- return 0;
3540
- }
3541
2996
  toString() {
3542
2997
  let string = "[";
3543
2998
  if (config.printRowMajor) {
@@ -4004,7 +3459,7 @@
4004
3459
  out[15] = 0;
4005
3460
  return out;
4006
3461
  }
4007
- function perspective(out, fovy, aspect, near, far) {
3462
+ function perspectiveNO(out, fovy, aspect, near, far) {
4008
3463
  var f2 = 1 / Math.tan(fovy / 2), nf;
4009
3464
  out[0] = f2 / aspect;
4010
3465
  out[1] = 0;
@@ -4030,7 +3485,8 @@
4030
3485
  }
4031
3486
  return out;
4032
3487
  }
4033
- function ortho(out, left, right, bottom, top, near, far) {
3488
+ var perspective = perspectiveNO;
3489
+ function orthoNO(out, left, right, bottom, top, near, far) {
4034
3490
  var lr = 1 / (left - right);
4035
3491
  var bt = 1 / (bottom - top);
4036
3492
  var nf = 1 / (near - far);
@@ -4052,6 +3508,7 @@
4052
3508
  out[15] = 1;
4053
3509
  return out;
4054
3510
  }
3511
+ var ortho = orthoNO;
4055
3512
  function lookAt(out, eye, center, up) {
4056
3513
  var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;
4057
3514
  var eyex = eye[0];
@@ -4170,38 +3627,36 @@
4170
3627
  }();
4171
3628
 
4172
3629
  // ../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js
4173
- var IDENTITY = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
4174
- var ZERO = Object.freeze([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
4175
- var INDICES = Object.freeze({
4176
- COL0ROW0: 0,
4177
- COL0ROW1: 1,
4178
- COL0ROW2: 2,
4179
- COL0ROW3: 3,
4180
- COL1ROW0: 4,
4181
- COL1ROW1: 5,
4182
- COL1ROW2: 6,
4183
- COL1ROW3: 7,
4184
- COL2ROW0: 8,
4185
- COL2ROW1: 9,
4186
- COL2ROW2: 10,
4187
- COL2ROW3: 11,
4188
- COL3ROW0: 12,
4189
- COL3ROW1: 13,
4190
- COL3ROW2: 14,
4191
- COL3ROW3: 15
4192
- });
4193
- var constants2 = {};
3630
+ var INDICES;
3631
+ (function(INDICES2) {
3632
+ INDICES2[INDICES2["COL0ROW0"] = 0] = "COL0ROW0";
3633
+ INDICES2[INDICES2["COL0ROW1"] = 1] = "COL0ROW1";
3634
+ INDICES2[INDICES2["COL0ROW2"] = 2] = "COL0ROW2";
3635
+ INDICES2[INDICES2["COL0ROW3"] = 3] = "COL0ROW3";
3636
+ INDICES2[INDICES2["COL1ROW0"] = 4] = "COL1ROW0";
3637
+ INDICES2[INDICES2["COL1ROW1"] = 5] = "COL1ROW1";
3638
+ INDICES2[INDICES2["COL1ROW2"] = 6] = "COL1ROW2";
3639
+ INDICES2[INDICES2["COL1ROW3"] = 7] = "COL1ROW3";
3640
+ INDICES2[INDICES2["COL2ROW0"] = 8] = "COL2ROW0";
3641
+ INDICES2[INDICES2["COL2ROW1"] = 9] = "COL2ROW1";
3642
+ INDICES2[INDICES2["COL2ROW2"] = 10] = "COL2ROW2";
3643
+ INDICES2[INDICES2["COL2ROW3"] = 11] = "COL2ROW3";
3644
+ INDICES2[INDICES2["COL3ROW0"] = 12] = "COL3ROW0";
3645
+ INDICES2[INDICES2["COL3ROW1"] = 13] = "COL3ROW1";
3646
+ INDICES2[INDICES2["COL3ROW2"] = 14] = "COL3ROW2";
3647
+ INDICES2[INDICES2["COL3ROW3"] = 15] = "COL3ROW3";
3648
+ })(INDICES || (INDICES = {}));
3649
+ var DEFAULT_FOVY = 45 * Math.PI / 180;
3650
+ var DEFAULT_ASPECT = 1;
3651
+ var DEFAULT_NEAR = 0.1;
3652
+ var DEFAULT_FAR = 500;
3653
+ var IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
4194
3654
  var Matrix4 = class extends Matrix {
4195
3655
  static get IDENTITY() {
4196
- constants2.IDENTITY = constants2.IDENTITY || Object.freeze(new Matrix4(IDENTITY));
4197
- return constants2.IDENTITY;
3656
+ return getIdentityMatrix();
4198
3657
  }
4199
3658
  static get ZERO() {
4200
- constants2.ZERO = constants2.ZERO || Object.freeze(new Matrix4(ZERO));
4201
- return constants2.ZERO;
4202
- }
4203
- get INDICES() {
4204
- return INDICES;
3659
+ return getZeroMatrix();
4205
3660
  }
4206
3661
  get ELEMENTS() {
4207
3662
  return 16;
@@ -4209,6 +3664,9 @@
4209
3664
  get RANK() {
4210
3665
  return 4;
4211
3666
  }
3667
+ get INDICES() {
3668
+ return INDICES;
3669
+ }
4212
3670
  constructor(array) {
4213
3671
  super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
4214
3672
  if (arguments.length === 1 && Array.isArray(array)) {
@@ -4294,91 +3752,65 @@
4294
3752
  return result;
4295
3753
  }
4296
3754
  identity() {
4297
- return this.copy(IDENTITY);
3755
+ return this.copy(IDENTITY_MATRIX);
4298
3756
  }
4299
- fromQuaternion(q) {
4300
- fromQuat(this, q);
3757
+ fromObject(object) {
4301
3758
  return this.check();
4302
3759
  }
4303
- frustum({
4304
- left,
4305
- right,
4306
- bottom,
4307
- top,
4308
- near,
4309
- far
4310
- }) {
3760
+ fromQuaternion(quaternion) {
3761
+ fromQuat(this, quaternion);
3762
+ return this.check();
3763
+ }
3764
+ frustum(view) {
3765
+ const {
3766
+ left,
3767
+ right,
3768
+ bottom,
3769
+ top,
3770
+ near = DEFAULT_NEAR,
3771
+ far = DEFAULT_FAR
3772
+ } = view;
4311
3773
  if (far === Infinity) {
4312
- Matrix4._computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);
3774
+ computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);
4313
3775
  } else {
4314
3776
  frustum(this, left, right, bottom, top, near, far);
4315
3777
  }
4316
3778
  return this.check();
4317
3779
  }
4318
- static _computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {
4319
- const column0Row0 = 2 * near / (right - left);
4320
- const column1Row1 = 2 * near / (top - bottom);
4321
- const column2Row0 = (right + left) / (right - left);
4322
- const column2Row1 = (top + bottom) / (top - bottom);
4323
- const column2Row2 = -1;
4324
- const column2Row3 = -1;
4325
- const column3Row2 = -2 * near;
4326
- result[0] = column0Row0;
4327
- result[1] = 0;
4328
- result[2] = 0;
4329
- result[3] = 0;
4330
- result[4] = 0;
4331
- result[5] = column1Row1;
4332
- result[6] = 0;
4333
- result[7] = 0;
4334
- result[8] = column2Row0;
4335
- result[9] = column2Row1;
4336
- result[10] = column2Row2;
4337
- result[11] = column2Row3;
4338
- result[12] = 0;
4339
- result[13] = 0;
4340
- result[14] = column3Row2;
4341
- result[15] = 0;
4342
- return result;
4343
- }
4344
- lookAt(eye, center, up) {
4345
- if (arguments.length === 1) {
4346
- ({
4347
- eye,
4348
- center,
4349
- up
4350
- } = eye);
4351
- }
4352
- center = center || [0, 0, 0];
4353
- up = up || [0, 1, 0];
3780
+ lookAt(view) {
3781
+ const {
3782
+ eye,
3783
+ center = [0, 0, 0],
3784
+ up = [0, 1, 0]
3785
+ } = view;
4354
3786
  lookAt(this, eye, center, up);
4355
3787
  return this.check();
4356
3788
  }
4357
- ortho({
4358
- left,
4359
- right,
4360
- bottom,
4361
- top,
4362
- near = 0.1,
4363
- far = 500
4364
- }) {
3789
+ ortho(view) {
3790
+ const {
3791
+ left,
3792
+ right,
3793
+ bottom,
3794
+ top,
3795
+ near = DEFAULT_NEAR,
3796
+ far = DEFAULT_FAR
3797
+ } = view;
4365
3798
  ortho(this, left, right, bottom, top, near, far);
4366
3799
  return this.check();
4367
3800
  }
4368
- orthographic({
4369
- fovy = 45 * Math.PI / 180,
4370
- aspect = 1,
4371
- focalDistance = 1,
4372
- near = 0.1,
4373
- far = 500
4374
- }) {
4375
- if (fovy > Math.PI * 2) {
4376
- throw Error("radians");
4377
- }
3801
+ orthographic(view) {
3802
+ const {
3803
+ fovy = DEFAULT_FOVY,
3804
+ aspect = DEFAULT_ASPECT,
3805
+ focalDistance = 1,
3806
+ near = DEFAULT_NEAR,
3807
+ far = DEFAULT_FAR
3808
+ } = view;
3809
+ checkRadians(fovy);
4378
3810
  const halfY = fovy / 2;
4379
3811
  const top = focalDistance * Math.tan(halfY);
4380
3812
  const right = top * aspect;
4381
- return new Matrix4().ortho({
3813
+ return this.ortho({
4382
3814
  left: -right,
4383
3815
  right,
4384
3816
  bottom: -top,
@@ -4387,17 +3819,14 @@
4387
3819
  far
4388
3820
  });
4389
3821
  }
4390
- perspective({
4391
- fovy = void 0,
4392
- fov = 45 * Math.PI / 180,
4393
- aspect = 1,
4394
- near = 0.1,
4395
- far = 500
4396
- } = {}) {
4397
- fovy = fovy || fov;
4398
- if (fovy > Math.PI * 2) {
4399
- throw Error("radians");
4400
- }
3822
+ perspective(view) {
3823
+ const {
3824
+ fovy = 45 * Math.PI / 180,
3825
+ aspect = 1,
3826
+ near = 0.1,
3827
+ far = 500
3828
+ } = view;
3829
+ checkRadians(fovy);
4401
3830
  perspective(this, fovy, aspect, near, far);
4402
3831
  return this.check();
4403
3832
  }
@@ -4416,8 +3845,10 @@
4416
3845
  result[2] = this[14];
4417
3846
  return result;
4418
3847
  }
4419
- getRotation(result = [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0], scaleResult = null) {
4420
- const scale2 = this.getScale(scaleResult || [-0, -0, -0]);
3848
+ getRotation(result, scaleResult) {
3849
+ result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];
3850
+ scaleResult = scaleResult || [-0, -0, -0];
3851
+ const scale2 = this.getScale(scaleResult);
4421
3852
  const inverseScale0 = 1 / scale2[0];
4422
3853
  const inverseScale1 = 1 / scale2[1];
4423
3854
  const inverseScale2 = 1 / scale2[2];
@@ -4439,8 +3870,10 @@
4439
3870
  result[15] = 1;
4440
3871
  return result;
4441
3872
  }
4442
- getRotationMatrix3(result = [-0, -0, -0, -0, -0, -0, -0, -0, -0], scaleResult = null) {
4443
- const scale2 = this.getScale(scaleResult || [-0, -0, -0]);
3873
+ getRotationMatrix3(result, scaleResult) {
3874
+ result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];
3875
+ scaleResult = scaleResult || [-0, -0, -0];
3876
+ const scale2 = this.getScale(scaleResult);
4444
3877
  const inverseScale0 = 1 / scale2[0];
4445
3878
  const inverseScale1 = 1 / scale2[1];
4446
3879
  const inverseScale2 = 1 / scale2[2];
@@ -4483,23 +3916,19 @@
4483
3916
  rotateZ2(this, this, radians2);
4484
3917
  return this.check();
4485
3918
  }
4486
- rotateXYZ([rx, ry, rz]) {
4487
- return this.rotateX(rx).rotateY(ry).rotateZ(rz);
3919
+ rotateXYZ(angleXYZ) {
3920
+ return this.rotateX(angleXYZ[0]).rotateY(angleXYZ[1]).rotateZ(angleXYZ[2]);
4488
3921
  }
4489
3922
  rotateAxis(radians2, axis) {
4490
3923
  rotate(this, this, radians2, axis);
4491
3924
  return this.check();
4492
3925
  }
4493
3926
  scale(factor) {
4494
- if (Array.isArray(factor)) {
4495
- scale(this, this, factor);
4496
- } else {
4497
- scale(this, this, [factor, factor, factor]);
4498
- }
3927
+ scale(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
4499
3928
  return this.check();
4500
3929
  }
4501
- translate(vec) {
4502
- translate(this, this, vec);
3930
+ translate(vector) {
3931
+ translate(this, this, vector);
4503
3932
  return this.check();
4504
3933
  }
4505
3934
  transform(vector, result) {
@@ -4514,52 +3943,98 @@
4514
3943
  const {
4515
3944
  length: length2
4516
3945
  } = vector;
3946
+ let out;
4517
3947
  switch (length2) {
4518
3948
  case 2:
4519
- result = transformMat4(result || [-0, -0], vector, this);
3949
+ out = transformMat4(result || [-0, -0], vector, this);
4520
3950
  break;
4521
3951
  case 3:
4522
- result = transformMat42(result || [-0, -0, -0], vector, this);
3952
+ out = transformMat42(result || [-0, -0, -0], vector, this);
4523
3953
  break;
4524
3954
  default:
4525
3955
  throw new Error("Illegal vector");
4526
3956
  }
4527
- checkVector(result, vector.length);
4528
- return result;
3957
+ checkVector(out, vector.length);
3958
+ return out;
4529
3959
  }
4530
3960
  transformAsVector(vector, result) {
3961
+ let out;
4531
3962
  switch (vector.length) {
4532
3963
  case 2:
4533
- result = vec2_transformMat4AsVector(result || [-0, -0], vector, this);
3964
+ out = vec2_transformMat4AsVector(result || [-0, -0], vector, this);
4534
3965
  break;
4535
3966
  case 3:
4536
- result = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);
3967
+ out = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);
4537
3968
  break;
4538
3969
  default:
4539
3970
  throw new Error("Illegal vector");
4540
3971
  }
4541
- checkVector(result, vector.length);
4542
- return result;
4543
- }
4544
- makeRotationX(radians2) {
4545
- return this.identity().rotateX(radians2);
4546
- }
4547
- makeTranslation(x, y, z) {
4548
- return this.identity().translate([x, y, z]);
3972
+ checkVector(out, vector.length);
3973
+ return out;
4549
3974
  }
4550
3975
  transformPoint(vector, result) {
4551
- deprecated("Matrix4.transformPoint", "3.0");
4552
3976
  return this.transformAsPoint(vector, result);
4553
3977
  }
4554
3978
  transformVector(vector, result) {
4555
- deprecated("Matrix4.transformVector", "3.0");
4556
3979
  return this.transformAsPoint(vector, result);
4557
3980
  }
4558
3981
  transformDirection(vector, result) {
4559
- deprecated("Matrix4.transformDirection", "3.0");
4560
3982
  return this.transformAsVector(vector, result);
4561
3983
  }
3984
+ makeRotationX(radians2) {
3985
+ return this.identity().rotateX(radians2);
3986
+ }
3987
+ makeTranslation(x, y, z) {
3988
+ return this.identity().translate([x, y, z]);
3989
+ }
4562
3990
  };
3991
+ var ZERO2;
3992
+ var IDENTITY;
3993
+ function getZeroMatrix() {
3994
+ if (!ZERO2) {
3995
+ ZERO2 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
3996
+ Object.freeze(ZERO2);
3997
+ }
3998
+ return ZERO2;
3999
+ }
4000
+ function getIdentityMatrix() {
4001
+ if (!IDENTITY) {
4002
+ IDENTITY = new Matrix4();
4003
+ Object.freeze(IDENTITY);
4004
+ }
4005
+ return IDENTITY;
4006
+ }
4007
+ function checkRadians(possiblyDegrees) {
4008
+ if (possiblyDegrees > Math.PI * 2) {
4009
+ throw Error("expected radians");
4010
+ }
4011
+ }
4012
+ function computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {
4013
+ const column0Row0 = 2 * near / (right - left);
4014
+ const column1Row1 = 2 * near / (top - bottom);
4015
+ const column2Row0 = (right + left) / (right - left);
4016
+ const column2Row1 = (top + bottom) / (top - bottom);
4017
+ const column2Row2 = -1;
4018
+ const column2Row3 = -1;
4019
+ const column3Row2 = -2 * near;
4020
+ result[0] = column0Row0;
4021
+ result[1] = 0;
4022
+ result[2] = 0;
4023
+ result[3] = 0;
4024
+ result[4] = 0;
4025
+ result[5] = column1Row1;
4026
+ result[6] = 0;
4027
+ result[7] = 0;
4028
+ result[8] = column2Row0;
4029
+ result[9] = column2Row1;
4030
+ result[10] = column2Row2;
4031
+ result[11] = column2Row3;
4032
+ result[12] = 0;
4033
+ result[13] = 0;
4034
+ result[14] = column3Row2;
4035
+ result[15] = 0;
4036
+ return result;
4037
+ }
4563
4038
 
4564
4039
  // ../../node_modules/@math.gl/core/dist/esm/lib/math-utils.js
4565
4040
  var math_utils_default = {
@@ -4589,17 +4064,6 @@
4589
4064
  TWO_PI: Math.PI * 2
4590
4065
  };
4591
4066
 
4592
- // ../../node_modules/@math.gl/core/dist/esm/index.js
4593
- var globals5 = {
4594
- self: typeof self !== "undefined" && self,
4595
- window: typeof window !== "undefined" && window,
4596
- global: typeof global !== "undefined" && global
4597
- };
4598
- var global_5 = globals5.global || globals5.self || globals5.window;
4599
- global_5.mathgl = {
4600
- config
4601
- };
4602
-
4603
4067
  // ../../node_modules/@math.gl/geospatial/dist/esm/constants.js
4604
4068
  var WGS84_RADIUS_X = 6378137;
4605
4069
  var WGS84_RADIUS_Y = 6378137;
@@ -4614,61 +4078,63 @@
4614
4078
  };
4615
4079
 
4616
4080
  // ../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js
4617
- var noop3 = (x) => x;
4081
+ function identity2(x) {
4082
+ return x;
4083
+ }
4618
4084
  var scratchVector = new Vector3();
4619
- function fromCartographic(cartographic, result, map3 = noop3) {
4620
- if (isArray(cartographic)) {
4621
- result[0] = map3(cartographic[0]);
4622
- result[1] = map3(cartographic[1]);
4623
- result[2] = cartographic[2];
4624
- } else if ("longitude" in cartographic) {
4625
- result[0] = map3(cartographic.longitude);
4626
- result[1] = map3(cartographic.latitude);
4085
+ function fromCartographic(cartographic, result = [], map2 = identity2) {
4086
+ if ("longitude" in cartographic) {
4087
+ result[0] = map2(cartographic.longitude);
4088
+ result[1] = map2(cartographic.latitude);
4627
4089
  result[2] = cartographic.height;
4628
- } else {
4629
- result[0] = map3(cartographic.x);
4630
- result[1] = map3(cartographic.y);
4090
+ } else if ("x" in cartographic) {
4091
+ result[0] = map2(cartographic.x);
4092
+ result[1] = map2(cartographic.y);
4631
4093
  result[2] = cartographic.z;
4094
+ } else {
4095
+ result[0] = map2(cartographic[0]);
4096
+ result[1] = map2(cartographic[1]);
4097
+ result[2] = cartographic[2];
4632
4098
  }
4633
4099
  return result;
4634
4100
  }
4635
- function fromCartographicToRadians(cartographic, vector = scratchVector) {
4636
- return fromCartographic(cartographic, vector, config._cartographicRadians ? noop3 : toRadians);
4101
+ function fromCartographicToRadians(cartographic, vector = []) {
4102
+ return fromCartographic(cartographic, vector, config._cartographicRadians ? identity2 : toRadians);
4637
4103
  }
4638
- function toCartographic(vector, cartographic, map3 = noop3) {
4639
- if (isArray(cartographic)) {
4640
- cartographic[0] = map3(vector[0]);
4641
- cartographic[1] = map3(vector[1]);
4642
- cartographic[2] = vector[2];
4643
- } else if ("longitude" in cartographic) {
4644
- cartographic.longitude = map3(vector[0]);
4645
- cartographic.latitude = map3(vector[1]);
4104
+ function toCartographic(vector, cartographic, map2 = identity2) {
4105
+ if ("longitude" in cartographic) {
4106
+ cartographic.longitude = map2(vector[0]);
4107
+ cartographic.latitude = map2(vector[1]);
4646
4108
  cartographic.height = vector[2];
4647
- } else {
4648
- cartographic.x = map3(vector[0]);
4649
- cartographic.y = map3(vector[1]);
4109
+ } else if ("x" in cartographic) {
4110
+ cartographic.x = map2(vector[0]);
4111
+ cartographic.y = map2(vector[1]);
4650
4112
  cartographic.z = vector[2];
4113
+ } else {
4114
+ cartographic[0] = map2(vector[0]);
4115
+ cartographic[1] = map2(vector[1]);
4116
+ cartographic[2] = vector[2];
4651
4117
  }
4652
4118
  return cartographic;
4653
4119
  }
4654
4120
  function toCartographicFromRadians(vector, cartographic) {
4655
- return toCartographic(vector, cartographic, config._cartographicRadians ? noop3 : toDegrees);
4121
+ return toCartographic(vector, cartographic, config._cartographicRadians ? identity2 : toDegrees);
4656
4122
  }
4657
4123
 
4658
4124
  // ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js
4659
4125
  var scratchVector2 = new Vector3();
4660
4126
  var scaleToGeodeticSurfaceIntersection = new Vector3();
4661
4127
  var scaleToGeodeticSurfaceGradient = new Vector3();
4662
- function scaleToGeodeticSurface(cartesian, ellipsoid, result = new Vector3()) {
4128
+ function scaleToGeodeticSurface(cartesian, ellipsoid, result = []) {
4663
4129
  const {
4664
4130
  oneOverRadii,
4665
4131
  oneOverRadiiSquared,
4666
4132
  centerToleranceSquared
4667
4133
  } = ellipsoid;
4668
4134
  scratchVector2.from(cartesian);
4669
- const positionX = cartesian.x;
4670
- const positionY = cartesian.y;
4671
- const positionZ = cartesian.z;
4135
+ const positionX = scratchVector2.x;
4136
+ const positionY = scratchVector2.y;
4137
+ const positionZ = scratchVector2.z;
4672
4138
  const oneOverRadiiX = oneOverRadii.x;
4673
4139
  const oneOverRadiiY = oneOverRadii.y;
4674
4140
  const oneOverRadiiZ = oneOverRadii.z;
@@ -4690,7 +4156,7 @@
4690
4156
  const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
4691
4157
  const gradient = scaleToGeodeticSurfaceGradient;
4692
4158
  gradient.set(intersection.x * oneOverRadiiSquaredX * 2, intersection.y * oneOverRadiiSquaredY * 2, intersection.z * oneOverRadiiSquaredZ * 2);
4693
- let lambda = (1 - ratio) * cartesian.len() / (0.5 * gradient.len());
4159
+ let lambda = (1 - ratio) * scratchVector2.len() / (0.5 * gradient.len());
4694
4160
  let correction = 0;
4695
4161
  let xMultiplier;
4696
4162
  let yMultiplier;
@@ -4777,7 +4243,7 @@
4777
4243
  var scratchVector3 = new Vector3();
4778
4244
  function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) {
4779
4245
  const thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis];
4780
- assert5(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));
4246
+ assert4(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));
4781
4247
  let firstAxisVector;
4782
4248
  let secondAxisVector;
4783
4249
  let thirdAxisVector;
@@ -4844,16 +4310,20 @@
4844
4310
  var scratchPosition = new Vector3();
4845
4311
  var scratchHeight = new Vector3();
4846
4312
  var scratchCartesian = new Vector3();
4847
- var wgs84;
4848
4313
  var Ellipsoid = class {
4849
- static get WGS84() {
4850
- wgs84 = wgs84 || new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);
4851
- return wgs84;
4852
- }
4853
4314
  constructor(x = 0, y = 0, z = 0) {
4854
- assert5(x >= 0);
4855
- assert5(y >= 0);
4856
- assert5(z >= 0);
4315
+ _defineProperty(this, "radii", void 0);
4316
+ _defineProperty(this, "radiiSquared", void 0);
4317
+ _defineProperty(this, "radiiToTheFourth", void 0);
4318
+ _defineProperty(this, "oneOverRadii", void 0);
4319
+ _defineProperty(this, "oneOverRadiiSquared", void 0);
4320
+ _defineProperty(this, "minimumRadius", void 0);
4321
+ _defineProperty(this, "maximumRadius", void 0);
4322
+ _defineProperty(this, "centerToleranceSquared", math_utils_default.EPSILON1);
4323
+ _defineProperty(this, "squaredXOverSquaredZ", void 0);
4324
+ assert4(x >= 0);
4325
+ assert4(y >= 0);
4326
+ assert4(z >= 0);
4857
4327
  this.radii = new Vector3(x, y, z);
4858
4328
  this.radiiSquared = new Vector3(x * x, y * y, z * z);
4859
4329
  this.radiiToTheFourth = new Vector3(x * x * x * x, y * y * y * y, z * z * z * z);
@@ -4861,7 +4331,6 @@
4861
4331
  this.oneOverRadiiSquared = new Vector3(x === 0 ? 0 : 1 / (x * x), y === 0 ? 0 : 1 / (y * y), z === 0 ? 0 : 1 / (z * z));
4862
4332
  this.minimumRadius = Math.min(x, y, z);
4863
4333
  this.maximumRadius = Math.max(x, y, z);
4864
- this.centerToleranceSquared = math_utils_default.EPSILON1;
4865
4334
  if (this.radiiSquared.z !== 0) {
4866
4335
  this.squaredXOverSquaredZ = this.radiiSquared.x / this.radiiSquared.z;
4867
4336
  }
@@ -4938,8 +4407,8 @@
4938
4407
  return scratchPosition.from(position).scale(this.radii).to(result);
4939
4408
  }
4940
4409
  getSurfaceNormalIntersectionWithZAxis(position, buffer = 0, result = [0, 0, 0]) {
4941
- assert5(equals(this.radii.x, this.radii.y, math_utils_default.EPSILON15));
4942
- assert5(this.radii.z > 0);
4410
+ assert4(equals(this.radii.x, this.radii.y, math_utils_default.EPSILON15));
4411
+ assert4(this.radii.z > 0);
4943
4412
  scratchPosition.from(position);
4944
4413
  const z = scratchPosition.z * (1 - this.squaredXOverSquaredZ);
4945
4414
  if (Math.abs(z) >= this.radii.z - buffer) {
@@ -4948,9 +4417,10 @@
4948
4417
  return scratchPosition.set(0, 0, z).to(result);
4949
4418
  }
4950
4419
  };
4420
+ _defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
4951
4421
 
4952
4422
  // ../images/src/lib/utils/version.ts
4953
- var VERSION5 = true ? "3.3.0-alpha.5" : "latest";
4423
+ var VERSION4 = true ? "3.3.0-alpha.6" : "latest";
4954
4424
 
4955
4425
  // ../images/src/lib/category-api/image-type.ts
4956
4426
  var { _parseImageNode } = globalThis;
@@ -5289,7 +4759,7 @@
5289
4759
  id: "image",
5290
4760
  module: "images",
5291
4761
  name: "Images",
5292
- version: VERSION5,
4762
+ version: VERSION4,
5293
4763
  mimeTypes: MIME_TYPES,
5294
4764
  extensions: EXTENSIONS,
5295
4765
  parse: parseImage,
@@ -5298,7 +4768,7 @@
5298
4768
  };
5299
4769
 
5300
4770
  // ../draco/src/lib/utils/version.ts
5301
- var VERSION6 = true ? "3.3.0-alpha.5" : "latest";
4771
+ var VERSION5 = true ? "3.3.0-alpha.6" : "latest";
5302
4772
 
5303
4773
  // ../draco/src/draco-loader.ts
5304
4774
  var DEFAULT_DRACO_OPTIONS = {
@@ -5314,7 +4784,7 @@
5314
4784
  id: isBrowser2 ? "draco" : "draco-nodejs",
5315
4785
  module: "draco",
5316
4786
  shapes: ["mesh"],
5317
- version: VERSION6,
4787
+ version: VERSION5,
5318
4788
  worker: true,
5319
4789
  extensions: ["drc"],
5320
4790
  mimeTypes: ["application/octet-stream"],
@@ -5351,7 +4821,7 @@
5351
4821
  }
5352
4822
 
5353
4823
  // ../schema/src/lib/utils/assert.ts
5354
- function assert6(condition, message) {
4824
+ function assert5(condition, message) {
5355
4825
  if (!condition) {
5356
4826
  throw new Error(message || "loader assertion failed.");
5357
4827
  }
@@ -5360,7 +4830,7 @@
5360
4830
  // ../schema/src/lib/schema/impl/schema.ts
5361
4831
  var Schema = class {
5362
4832
  constructor(fields, metadata) {
5363
- assert6(Array.isArray(fields));
4833
+ assert5(Array.isArray(fields));
5364
4834
  checkNames(fields);
5365
4835
  this.fields = fields;
5366
4836
  this.metadata = metadata || new Map();
@@ -6282,12 +5752,12 @@
6282
5752
  }
6283
5753
 
6284
5754
  // ../textures/src/lib/utils/version.ts
6285
- var VERSION7 = true ? "3.3.0-alpha.5" : "beta";
5755
+ var VERSION6 = true ? "3.3.0-alpha.6" : "beta";
6286
5756
 
6287
5757
  // ../textures/src/lib/parsers/basis-module-loader.ts
6288
- var VERSION8 = true ? "3.3.0-alpha.5" : "beta";
6289
- var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION8}/dist/libs/basis_encoder.wasm`;
6290
- var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION8}/dist/libs/basis_encoder.js`;
5758
+ var VERSION7 = true ? "3.3.0-alpha.6" : "beta";
5759
+ var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION7}/dist/libs/basis_encoder.wasm`;
5760
+ var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION7}/dist/libs/basis_encoder.js`;
6291
5761
  var loadBasisTranscoderPromise;
6292
5762
  async function loadBasisTrascoderModule(options) {
6293
5763
  const modules = options.modules || {};
@@ -6313,8 +5783,8 @@
6313
5783
  options.wasmBinary = wasmBinary;
6314
5784
  }
6315
5785
  return new Promise((resolve) => {
6316
- BasisModule(options).then((module2) => {
6317
- const { BasisFile, initializeBasis } = module2;
5786
+ BasisModule(options).then((module) => {
5787
+ const { BasisFile, initializeBasis } = module;
6318
5788
  initializeBasis();
6319
5789
  resolve({ BasisFile });
6320
5790
  });
@@ -6345,8 +5815,8 @@
6345
5815
  options.wasmBinary = wasmBinary;
6346
5816
  }
6347
5817
  return new Promise((resolve) => {
6348
- BasisEncoderModule(options).then((module2) => {
6349
- const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module2;
5818
+ BasisEncoderModule(options).then((module) => {
5819
+ const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module;
6350
5820
  initializeBasis();
6351
5821
  resolve({ BasisFile, KTX2File, BasisEncoder });
6352
5822
  });
@@ -6876,7 +6346,7 @@
6876
6346
  name: "Basis",
6877
6347
  id: isBrowser2 ? "basis" : "basis-nodejs",
6878
6348
  module: "textures",
6879
- version: VERSION7,
6349
+ version: VERSION6,
6880
6350
  worker: true,
6881
6351
  extensions: ["basis", "ktx2"],
6882
6352
  mimeTypes: ["application/octet-stream", "image/ktx2"],
@@ -7189,7 +6659,7 @@
7189
6659
  name: "Texture Containers",
7190
6660
  id: "compressed-texture",
7191
6661
  module: "textures",
7192
- version: VERSION7,
6662
+ version: VERSION6,
7193
6663
  worker: true,
7194
6664
  extensions: [
7195
6665
  "ktx",
@@ -7251,7 +6721,7 @@
7251
6721
  }
7252
6722
 
7253
6723
  // ../../node_modules/@luma.gl/constants/dist/esm/index.js
7254
- var esm_default3 = {
6724
+ var esm_default2 = {
7255
6725
  DEPTH_BUFFER_BIT: 256,
7256
6726
  STENCIL_BUFFER_BIT: 1024,
7257
6727
  COLOR_BUFFER_BIT: 16384,
@@ -7886,11 +7356,11 @@
7886
7356
  }
7887
7357
  }
7888
7358
  var GL_TYPE_MAP = {
7889
- UInt8: esm_default3.UNSIGNED_BYTE,
7890
- UInt16: esm_default3.UNSIGNED_INT,
7891
- Float32: esm_default3.FLOAT,
7892
- UInt32: esm_default3.UNSIGNED_INT,
7893
- UInt64: esm_default3.DOUBLE
7359
+ UInt8: esm_default2.UNSIGNED_BYTE,
7360
+ UInt16: esm_default2.UNSIGNED_INT,
7361
+ Float32: esm_default2.FLOAT,
7362
+ UInt32: esm_default2.UNSIGNED_INT,
7363
+ UInt64: esm_default2.DOUBLE
7894
7364
  };
7895
7365
  function sizeOf(dataType) {
7896
7366
  switch (dataType) {
@@ -7982,12 +7452,12 @@
7982
7452
  }
7983
7453
 
7984
7454
  // src/i3s-attribute-loader.ts
7985
- var VERSION9 = true ? "3.3.0-alpha.5" : "latest";
7455
+ var VERSION8 = true ? "3.3.0-alpha.6" : "latest";
7986
7456
  var I3SAttributeLoader = {
7987
7457
  name: "I3S Attribute",
7988
7458
  id: "i3s-attribute",
7989
7459
  module: "i3s",
7990
- version: VERSION9,
7460
+ version: VERSION8,
7991
7461
  mimeTypes: ["application/binary"],
7992
7462
  parse: parse3,
7993
7463
  extensions: ["bin"],
@@ -8443,13 +7913,13 @@
8443
7913
  }
8444
7914
 
8445
7915
  // src/i3s-content-loader.ts
8446
- var VERSION10 = true ? "3.3.0-alpha.5" : "beta";
7916
+ var VERSION9 = true ? "3.3.0-alpha.6" : "beta";
8447
7917
  var I3SContentLoader = {
8448
7918
  name: "I3S Content (Indexed Scene Layers)",
8449
7919
  id: isBrowser2 ? "i3s-content" : "i3s-content-nodejs",
8450
7920
  module: "i3s",
8451
7921
  worker: true,
8452
- version: VERSION10,
7922
+ version: VERSION9,
8453
7923
  mimeTypes: ["application/octet-stream"],
8454
7924
  parse: parse4,
8455
7925
  extensions: ["bin"],