@deck.gl/geo-layers 9.2.8 → 9.2.10

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 (3) hide show
  1. package/dist/dist.dev.js +221 -131
  2. package/dist.min.js +11 -11
  3. package/package.json +2 -2
package/dist/dist.dev.js CHANGED
@@ -1819,27 +1819,27 @@ var __exports__ = (() => {
1819
1819
  var INT_CACHE2 = {};
1820
1820
  var UINT_CACHE2 = {};
1821
1821
  function fromInt2(value, unsigned) {
1822
- var obj, cachedObj, cache2;
1822
+ var obj, cachedObj, cache;
1823
1823
  if (unsigned) {
1824
1824
  value >>>= 0;
1825
- if (cache2 = 0 <= value && value < 256) {
1825
+ if (cache = 0 <= value && value < 256) {
1826
1826
  cachedObj = UINT_CACHE2[value];
1827
1827
  if (cachedObj)
1828
1828
  return cachedObj;
1829
1829
  }
1830
1830
  obj = fromBits2(value, (value | 0) < 0 ? -1 : 0, true);
1831
- if (cache2)
1831
+ if (cache)
1832
1832
  UINT_CACHE2[value] = obj;
1833
1833
  return obj;
1834
1834
  } else {
1835
1835
  value |= 0;
1836
- if (cache2 = -128 <= value && value < 128) {
1836
+ if (cache = -128 <= value && value < 128) {
1837
1837
  cachedObj = INT_CACHE2[value];
1838
1838
  if (cachedObj)
1839
1839
  return cachedObj;
1840
1840
  }
1841
1841
  obj = fromBits2(value, value < 0 ? -1 : 0, false);
1842
- if (cache2)
1842
+ if (cache)
1843
1843
  INT_CACHE2[value] = obj;
1844
1844
  return obj;
1845
1845
  }
@@ -10395,14 +10395,14 @@ var __exports__ = (() => {
10395
10395
  var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
10396
10396
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
10397
10397
 
10398
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
10398
+ // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/lib/globals.js
10399
10399
  var window_2 = globalThis;
10400
10400
  var document_2 = globalThis.document || {};
10401
10401
  var process_ = globalThis.process || {};
10402
10402
  var console_ = globalThis.console;
10403
10403
  var navigator_ = globalThis.navigator || {};
10404
10404
 
10405
- // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
10405
+ // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/lib/is-electron.js
10406
10406
  function isElectron(mockUserAgent) {
10407
10407
  if (typeof window !== "undefined" && window.process?.type === "renderer") {
10408
10408
  return true;
@@ -10415,7 +10415,7 @@ var __exports__ = (() => {
10415
10415
  return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
10416
10416
  }
10417
10417
 
10418
- // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
10418
+ // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/lib/is-browser.js
10419
10419
  function isBrowser2() {
10420
10420
  const isNode = (
10421
10421
  // @ts-expect-error
@@ -10424,8 +10424,140 @@ var __exports__ = (() => {
10424
10424
  return !isNode || isElectron();
10425
10425
  }
10426
10426
 
10427
- // ../../node_modules/@probe.gl/env/dist/index.js
10428
- var VERSION2 = true ? "4.1.0" : "untranspiled source";
10427
+ // ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/index.js
10428
+ var VERSION2 = true ? "4.1.1" : "untranspiled source";
10429
+
10430
+ // ../../node_modules/@probe.gl/log/dist/utils/assert.js
10431
+ function assert4(condition, message) {
10432
+ if (!condition) {
10433
+ throw new Error(message || "Assertion failed");
10434
+ }
10435
+ }
10436
+
10437
+ // ../../node_modules/@probe.gl/log/dist/loggers/log-utils.js
10438
+ function normalizeLogLevel(logLevel) {
10439
+ if (!logLevel) {
10440
+ return 0;
10441
+ }
10442
+ let resolvedLevel;
10443
+ switch (typeof logLevel) {
10444
+ case "number":
10445
+ resolvedLevel = logLevel;
10446
+ break;
10447
+ case "object":
10448
+ resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
10449
+ break;
10450
+ default:
10451
+ return 0;
10452
+ }
10453
+ assert4(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
10454
+ return resolvedLevel;
10455
+ }
10456
+ function normalizeArguments(opts) {
10457
+ const { logLevel, message } = opts;
10458
+ opts.logLevel = normalizeLogLevel(logLevel);
10459
+ const args = opts.args ? Array.from(opts.args) : [];
10460
+ while (args.length && args.shift() !== message) {
10461
+ }
10462
+ switch (typeof logLevel) {
10463
+ case "string":
10464
+ case "function":
10465
+ if (message !== void 0) {
10466
+ args.unshift(message);
10467
+ }
10468
+ opts.message = logLevel;
10469
+ break;
10470
+ case "object":
10471
+ Object.assign(opts, logLevel);
10472
+ break;
10473
+ default:
10474
+ }
10475
+ if (typeof opts.message === "function") {
10476
+ opts.message = opts.message();
10477
+ }
10478
+ const messageType = typeof opts.message;
10479
+ assert4(messageType === "string" || messageType === "object");
10480
+ return Object.assign(opts, { args }, opts.opts);
10481
+ }
10482
+
10483
+ // ../../node_modules/@probe.gl/log/dist/loggers/base-log.js
10484
+ var noop = () => {
10485
+ };
10486
+ var BaseLog = class {
10487
+ constructor({ level = 0 } = {}) {
10488
+ this.userData = {};
10489
+ this._onceCache = /* @__PURE__ */ new Set();
10490
+ this._level = level;
10491
+ }
10492
+ set level(newLevel) {
10493
+ this.setLevel(newLevel);
10494
+ }
10495
+ get level() {
10496
+ return this.getLevel();
10497
+ }
10498
+ setLevel(level) {
10499
+ this._level = level;
10500
+ return this;
10501
+ }
10502
+ getLevel() {
10503
+ return this._level;
10504
+ }
10505
+ // Unconditional logging
10506
+ warn(message, ...args) {
10507
+ return this._log("warn", 0, message, args, { once: true });
10508
+ }
10509
+ error(message, ...args) {
10510
+ return this._log("error", 0, message, args);
10511
+ }
10512
+ // Conditional logging
10513
+ log(logLevel, message, ...args) {
10514
+ return this._log("log", logLevel, message, args);
10515
+ }
10516
+ info(logLevel, message, ...args) {
10517
+ return this._log("info", logLevel, message, args);
10518
+ }
10519
+ once(logLevel, message, ...args) {
10520
+ return this._log("once", logLevel, message, args, { once: true });
10521
+ }
10522
+ _log(type, logLevel, message, args, options = {}) {
10523
+ const normalized = normalizeArguments({
10524
+ logLevel,
10525
+ message,
10526
+ args: this._buildArgs(logLevel, message, args),
10527
+ opts: options
10528
+ });
10529
+ return this._createLogFunction(type, normalized, options);
10530
+ }
10531
+ _buildArgs(logLevel, message, args) {
10532
+ return [logLevel, message, ...args];
10533
+ }
10534
+ _createLogFunction(type, normalized, options) {
10535
+ if (!this._shouldLog(normalized.logLevel)) {
10536
+ return noop;
10537
+ }
10538
+ const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
10539
+ if ((options.once || normalized.once) && tag !== void 0) {
10540
+ if (this._onceCache.has(tag)) {
10541
+ return noop;
10542
+ }
10543
+ this._onceCache.add(tag);
10544
+ }
10545
+ return this._emit(type, normalized);
10546
+ }
10547
+ _shouldLog(logLevel) {
10548
+ return this.getLevel() >= normalizeLogLevel(logLevel);
10549
+ }
10550
+ _getOnceTag(tag) {
10551
+ if (tag === void 0) {
10552
+ return void 0;
10553
+ }
10554
+ try {
10555
+ return typeof tag === "string" ? tag : String(tag);
10556
+ } catch {
10557
+ return void 0;
10558
+ }
10559
+ }
10560
+ };
10429
10561
 
10430
10562
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
10431
10563
  function getStorage(type) {
@@ -10544,13 +10676,6 @@ var __exports__ = (() => {
10544
10676
  }
10545
10677
  }
10546
10678
 
10547
- // ../../node_modules/@probe.gl/log/dist/utils/assert.js
10548
- function assert4(condition, message) {
10549
- if (!condition) {
10550
- throw new Error(message || "Assertion failed");
10551
- }
10552
- }
10553
-
10554
10679
  // ../../node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
10555
10680
  function getHiResTimestamp() {
10556
10681
  let timestamp;
@@ -10565,7 +10690,7 @@ var __exports__ = (() => {
10565
10690
  return timestamp;
10566
10691
  }
10567
10692
 
10568
- // ../../node_modules/@probe.gl/log/dist/log.js
10693
+ // ../../node_modules/@probe.gl/log/dist/loggers/probe-log.js
10569
10694
  var originalConsole = {
10570
10695
  debug: isBrowser2() ? console.debug || console.log : console.log,
10571
10696
  log: console.log,
@@ -10577,12 +10702,9 @@ var __exports__ = (() => {
10577
10702
  enabled: true,
10578
10703
  level: 0
10579
10704
  };
10580
- function noop() {
10581
- }
10582
- var cache = {};
10583
- var ONCE = { once: true };
10584
- var Log = class {
10705
+ var ProbeLog = class extends BaseLog {
10585
10706
  constructor({ id } = { id: "" }) {
10707
+ super({ level: 0 });
10586
10708
  this.VERSION = VERSION2;
10587
10709
  this._startTs = getHiResTimestamp();
10588
10710
  this._deltaTs = getHiResTimestamp();
@@ -10590,22 +10712,16 @@ var __exports__ = (() => {
10590
10712
  this.LOG_THROTTLE_TIMEOUT = 0;
10591
10713
  this.id = id;
10592
10714
  this.userData = {};
10593
- this._storage = new LocalStorage(`__probe-${this.id}__`, DEFAULT_LOG_CONFIGURATION);
10715
+ this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
10594
10716
  this.timeStamp(`${this.id} started`);
10595
10717
  autobind(this);
10596
10718
  Object.seal(this);
10597
10719
  }
10598
- set level(newLevel) {
10599
- this.setLevel(newLevel);
10600
- }
10601
- get level() {
10602
- return this.getLevel();
10603
- }
10604
10720
  isEnabled() {
10605
- return this._storage.config.enabled;
10721
+ return this._getConfiguration().enabled;
10606
10722
  }
10607
10723
  getLevel() {
10608
- return this._storage.config.level;
10724
+ return this._getConfiguration().level;
10609
10725
  }
10610
10726
  /** @return milliseconds, with fractions */
10611
10727
  getTotal() {
@@ -10629,20 +10745,20 @@ var __exports__ = (() => {
10629
10745
  }
10630
10746
  // Configure
10631
10747
  enable(enabled = true) {
10632
- this._storage.setConfiguration({ enabled });
10748
+ this._updateConfiguration({ enabled });
10633
10749
  return this;
10634
10750
  }
10635
10751
  setLevel(level) {
10636
- this._storage.setConfiguration({ level });
10752
+ this._updateConfiguration({ level });
10637
10753
  return this;
10638
10754
  }
10639
10755
  /** return the current status of the setting */
10640
10756
  get(setting) {
10641
- return this._storage.config[setting];
10757
+ return this._getConfiguration()[setting];
10642
10758
  }
10643
10759
  // update the status of the setting
10644
10760
  set(setting, value) {
10645
- this._storage.setConfiguration({ [setting]: value });
10761
+ this._updateConfiguration({ [setting]: value });
10646
10762
  }
10647
10763
  /** Logs the current settings as a table */
10648
10764
  settings() {
@@ -10658,11 +10774,16 @@ var __exports__ = (() => {
10658
10774
  throw new Error(message || "Assertion failed");
10659
10775
  }
10660
10776
  }
10661
- warn(message) {
10662
- return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);
10777
+ warn(message, ...args) {
10778
+ return this._log("warn", 0, message, args, {
10779
+ method: originalConsole.warn,
10780
+ once: true
10781
+ });
10663
10782
  }
10664
- error(message) {
10665
- return this._getLogFunction(0, message, originalConsole.error, arguments);
10783
+ error(message, ...args) {
10784
+ return this._log("error", 0, message, args, {
10785
+ method: originalConsole.error
10786
+ });
10666
10787
  }
10667
10788
  /** Print a deprecation warning */
10668
10789
  deprecated(oldUsage, newUsage) {
@@ -10672,50 +10793,63 @@ var __exports__ = (() => {
10672
10793
  removed(oldUsage, newUsage) {
10673
10794
  return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
10674
10795
  }
10675
- probe(logLevel, message) {
10676
- return this._getLogFunction(logLevel, message, originalConsole.log, arguments, {
10796
+ probe(logLevel, message, ...args) {
10797
+ return this._log("log", logLevel, message, args, {
10798
+ method: originalConsole.log,
10677
10799
  time: true,
10678
10800
  once: true
10679
10801
  });
10680
10802
  }
10681
- log(logLevel, message) {
10682
- return this._getLogFunction(logLevel, message, originalConsole.debug, arguments);
10803
+ log(logLevel, message, ...args) {
10804
+ return this._log("log", logLevel, message, args, {
10805
+ method: originalConsole.debug
10806
+ });
10683
10807
  }
10684
- info(logLevel, message) {
10685
- return this._getLogFunction(logLevel, message, console.info, arguments);
10808
+ info(logLevel, message, ...args) {
10809
+ return this._log("info", logLevel, message, args, { method: console.info });
10686
10810
  }
10687
- once(logLevel, message) {
10688
- return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
10811
+ once(logLevel, message, ...args) {
10812
+ return this._log("once", logLevel, message, args, {
10813
+ method: originalConsole.debug || originalConsole.info,
10814
+ once: true
10815
+ });
10689
10816
  }
10690
10817
  /** Logs an object as a table */
10691
10818
  table(logLevel, table, columns) {
10692
10819
  if (table) {
10693
- return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {
10820
+ return this._log("table", logLevel, table, columns && [columns] || [], {
10821
+ method: console.table || noop,
10694
10822
  tag: getTableHeader(table)
10695
10823
  });
10696
10824
  }
10697
10825
  return noop;
10698
10826
  }
10699
10827
  time(logLevel, message) {
10700
- return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
10828
+ return this._log("time", logLevel, message, [], {
10829
+ method: console.time ? console.time : console.info
10830
+ });
10701
10831
  }
10702
10832
  timeEnd(logLevel, message) {
10703
- return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
10833
+ return this._log("time", logLevel, message, [], {
10834
+ method: console.timeEnd ? console.timeEnd : console.info
10835
+ });
10704
10836
  }
10705
10837
  timeStamp(logLevel, message) {
10706
- return this._getLogFunction(logLevel, message, console.timeStamp || noop);
10838
+ return this._log("time", logLevel, message, [], {
10839
+ method: console.timeStamp || noop
10840
+ });
10707
10841
  }
10708
10842
  group(logLevel, message, opts = { collapsed: false }) {
10709
- const options = normalizeArguments({ logLevel, message, opts });
10710
- const { collapsed } = opts;
10711
- options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
10712
- return this._getLogFunction(options);
10843
+ const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
10844
+ return this._log("group", logLevel, message, [], { method });
10713
10845
  }
10714
10846
  groupCollapsed(logLevel, message, opts = {}) {
10715
10847
  return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
10716
10848
  }
10717
10849
  groupEnd(logLevel) {
10718
- return this._getLogFunction(logLevel, "", console.groupEnd || noop);
10850
+ return this._log("groupEnd", logLevel, "", [], {
10851
+ method: console.groupEnd || noop
10852
+ });
10719
10853
  }
10720
10854
  // EXPERIMENTAL
10721
10855
  withGroup(logLevel, message, func) {
@@ -10731,78 +10865,34 @@ var __exports__ = (() => {
10731
10865
  console.trace();
10732
10866
  }
10733
10867
  }
10734
- // PRIVATE METHODS
10735
- /** Deduces log level from a variety of arguments */
10736
10868
  _shouldLog(logLevel) {
10737
- return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
10738
- }
10739
- _getLogFunction(logLevel, message, method, args, opts) {
10740
- if (this._shouldLog(logLevel)) {
10741
- opts = normalizeArguments({ logLevel, message, args, opts });
10742
- method = method || opts.method;
10743
- assert4(method);
10744
- opts.total = this.getTotal();
10745
- opts.delta = this.getDelta();
10746
- this._deltaTs = getHiResTimestamp();
10747
- const tag = opts.tag || opts.message;
10748
- if (opts.once && tag) {
10749
- if (!cache[tag]) {
10750
- cache[tag] = getHiResTimestamp();
10751
- } else {
10752
- return noop;
10753
- }
10754
- }
10755
- message = decorateMessage(this.id, opts.message, opts);
10756
- return method.bind(console, message, ...opts.args);
10757
- }
10758
- return noop;
10759
- }
10760
- };
10761
- Log.VERSION = VERSION2;
10762
- function normalizeLogLevel(logLevel) {
10763
- if (!logLevel) {
10764
- return 0;
10869
+ return this.isEnabled() && super._shouldLog(logLevel);
10765
10870
  }
10766
- let resolvedLevel;
10767
- switch (typeof logLevel) {
10768
- case "number":
10769
- resolvedLevel = logLevel;
10770
- break;
10771
- case "object":
10772
- resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
10773
- break;
10774
- default:
10775
- return 0;
10776
- }
10777
- assert4(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
10778
- return resolvedLevel;
10779
- }
10780
- function normalizeArguments(opts) {
10781
- const { logLevel, message } = opts;
10782
- opts.logLevel = normalizeLogLevel(logLevel);
10783
- const args = opts.args ? Array.from(opts.args) : [];
10784
- while (args.length && args.shift() !== message) {
10871
+ _emit(_type, normalized) {
10872
+ const method = normalized.method;
10873
+ assert4(method);
10874
+ normalized.total = this.getTotal();
10875
+ normalized.delta = this.getDelta();
10876
+ this._deltaTs = getHiResTimestamp();
10877
+ const message = decorateMessage(this.id, normalized.message, normalized);
10878
+ return method.bind(console, message, ...normalized.args);
10785
10879
  }
10786
- switch (typeof logLevel) {
10787
- case "string":
10788
- case "function":
10789
- if (message !== void 0) {
10790
- args.unshift(message);
10791
- }
10792
- opts.message = logLevel;
10793
- break;
10794
- case "object":
10795
- Object.assign(opts, logLevel);
10796
- break;
10797
- default:
10880
+ _getConfiguration() {
10881
+ if (!this._storage.config[this.id]) {
10882
+ this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
10883
+ }
10884
+ return this._storage.config[this.id];
10798
10885
  }
10799
- if (typeof opts.message === "function") {
10800
- opts.message = opts.message();
10886
+ _updateConfiguration(configuration) {
10887
+ const currentConfiguration = this._storage.config[this.id] || {
10888
+ ...DEFAULT_LOG_CONFIGURATION
10889
+ };
10890
+ this._storage.setConfiguration({
10891
+ [this.id]: { ...currentConfiguration, ...configuration }
10892
+ });
10801
10893
  }
10802
- const messageType = typeof opts.message;
10803
- assert4(messageType === "string" || messageType === "object");
10804
- return Object.assign(opts, { args }, opts.opts);
10805
- }
10894
+ };
10895
+ ProbeLog.VERSION = VERSION2;
10806
10896
  function decorateMessage(id, message, opts) {
10807
10897
  if (typeof message === "string") {
10808
10898
  const time = opts.time ? leftPad(formatTime(opts.total)) : "";
@@ -10824,13 +10914,13 @@ var __exports__ = (() => {
10824
10914
  globalThis.probe = {};
10825
10915
 
10826
10916
  // ../../node_modules/@probe.gl/log/dist/index.js
10827
- var dist_default = new Log({ id: "@probe.gl/log" });
10917
+ var dist_default = new ProbeLog({ id: "@probe.gl/log" });
10828
10918
 
10829
10919
  // ../../node_modules/@loaders.gl/loader-utils/dist/lib/log-utils/log.js
10830
10920
  var VERSION3 = true ? "4.3.3" : "latest";
10831
10921
  var version = VERSION3[0] >= "0" && VERSION3[0] <= "9" ? `v${VERSION3}` : "";
10832
10922
  function createLog() {
10833
- const log8 = new Log({ id: "loaders.gl" });
10923
+ const log8 = new ProbeLog({ id: "loaders.gl" });
10834
10924
  globalThis.loaders = globalThis.loaders || {};
10835
10925
  globalThis.loaders.log = log8;
10836
10926
  globalThis.loaders.version = version;
@@ -26345,27 +26435,27 @@ void main(void) {
26345
26435
  var INT_CACHE = {};
26346
26436
  var UINT_CACHE = {};
26347
26437
  function fromInt(value, unsigned) {
26348
- var obj, cachedObj, cache2;
26438
+ var obj, cachedObj, cache;
26349
26439
  if (unsigned) {
26350
26440
  value >>>= 0;
26351
- if (cache2 = 0 <= value && value < 256) {
26441
+ if (cache = 0 <= value && value < 256) {
26352
26442
  cachedObj = UINT_CACHE[value];
26353
26443
  if (cachedObj)
26354
26444
  return cachedObj;
26355
26445
  }
26356
26446
  obj = fromBits(value, 0, true);
26357
- if (cache2)
26447
+ if (cache)
26358
26448
  UINT_CACHE[value] = obj;
26359
26449
  return obj;
26360
26450
  } else {
26361
26451
  value |= 0;
26362
- if (cache2 = -128 <= value && value < 128) {
26452
+ if (cache = -128 <= value && value < 128) {
26363
26453
  cachedObj = INT_CACHE[value];
26364
26454
  if (cachedObj)
26365
26455
  return cachedObj;
26366
26456
  }
26367
26457
  obj = fromBits(value, value < 0 ? -1 : 0, false);
26368
- if (cache2)
26458
+ if (cache)
26369
26459
  INT_CACHE[value] = obj;
26370
26460
  return obj;
26371
26461
  }