@loaders.gl/3d-tiles 4.4.0-alpha.13 → 4.4.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.dev.js CHANGED
@@ -4329,7 +4329,139 @@ var __exports__ = (() => {
4329
4329
  }
4330
4330
 
4331
4331
  // ../../node_modules/@probe.gl/env/dist/index.js
4332
- var VERSION = true ? "4.0.7" : "untranspiled source";
4332
+ var VERSION = true ? "4.1.1" : "untranspiled source";
4333
+
4334
+ // ../../node_modules/@probe.gl/log/dist/utils/assert.js
4335
+ function assert3(condition, message) {
4336
+ if (!condition) {
4337
+ throw new Error(message || "Assertion failed");
4338
+ }
4339
+ }
4340
+
4341
+ // ../../node_modules/@probe.gl/log/dist/loggers/log-utils.js
4342
+ function normalizeLogLevel(logLevel) {
4343
+ if (!logLevel) {
4344
+ return 0;
4345
+ }
4346
+ let resolvedLevel;
4347
+ switch (typeof logLevel) {
4348
+ case "number":
4349
+ resolvedLevel = logLevel;
4350
+ break;
4351
+ case "object":
4352
+ resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
4353
+ break;
4354
+ default:
4355
+ return 0;
4356
+ }
4357
+ assert3(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
4358
+ return resolvedLevel;
4359
+ }
4360
+ function normalizeArguments(opts) {
4361
+ const { logLevel, message } = opts;
4362
+ opts.logLevel = normalizeLogLevel(logLevel);
4363
+ const args = opts.args ? Array.from(opts.args) : [];
4364
+ while (args.length && args.shift() !== message) {
4365
+ }
4366
+ switch (typeof logLevel) {
4367
+ case "string":
4368
+ case "function":
4369
+ if (message !== void 0) {
4370
+ args.unshift(message);
4371
+ }
4372
+ opts.message = logLevel;
4373
+ break;
4374
+ case "object":
4375
+ Object.assign(opts, logLevel);
4376
+ break;
4377
+ default:
4378
+ }
4379
+ if (typeof opts.message === "function") {
4380
+ opts.message = opts.message();
4381
+ }
4382
+ const messageType = typeof opts.message;
4383
+ assert3(messageType === "string" || messageType === "object");
4384
+ return Object.assign(opts, { args }, opts.opts);
4385
+ }
4386
+
4387
+ // ../../node_modules/@probe.gl/log/dist/loggers/base-log.js
4388
+ var noop = () => {
4389
+ };
4390
+ var BaseLog = class {
4391
+ constructor({ level = 0 } = {}) {
4392
+ this.userData = {};
4393
+ this._onceCache = /* @__PURE__ */ new Set();
4394
+ this._level = level;
4395
+ }
4396
+ set level(newLevel) {
4397
+ this.setLevel(newLevel);
4398
+ }
4399
+ get level() {
4400
+ return this.getLevel();
4401
+ }
4402
+ setLevel(level) {
4403
+ this._level = level;
4404
+ return this;
4405
+ }
4406
+ getLevel() {
4407
+ return this._level;
4408
+ }
4409
+ // Unconditional logging
4410
+ warn(message, ...args) {
4411
+ return this._log("warn", 0, message, args, { once: true });
4412
+ }
4413
+ error(message, ...args) {
4414
+ return this._log("error", 0, message, args);
4415
+ }
4416
+ // Conditional logging
4417
+ log(logLevel, message, ...args) {
4418
+ return this._log("log", logLevel, message, args);
4419
+ }
4420
+ info(logLevel, message, ...args) {
4421
+ return this._log("info", logLevel, message, args);
4422
+ }
4423
+ once(logLevel, message, ...args) {
4424
+ return this._log("once", logLevel, message, args, { once: true });
4425
+ }
4426
+ _log(type, logLevel, message, args, options = {}) {
4427
+ const normalized = normalizeArguments({
4428
+ logLevel,
4429
+ message,
4430
+ args: this._buildArgs(logLevel, message, args),
4431
+ opts: options
4432
+ });
4433
+ return this._createLogFunction(type, normalized, options);
4434
+ }
4435
+ _buildArgs(logLevel, message, args) {
4436
+ return [logLevel, message, ...args];
4437
+ }
4438
+ _createLogFunction(type, normalized, options) {
4439
+ if (!this._shouldLog(normalized.logLevel)) {
4440
+ return noop;
4441
+ }
4442
+ const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
4443
+ if ((options.once || normalized.once) && tag !== void 0) {
4444
+ if (this._onceCache.has(tag)) {
4445
+ return noop;
4446
+ }
4447
+ this._onceCache.add(tag);
4448
+ }
4449
+ return this._emit(type, normalized);
4450
+ }
4451
+ _shouldLog(logLevel) {
4452
+ return this.getLevel() >= normalizeLogLevel(logLevel);
4453
+ }
4454
+ _getOnceTag(tag) {
4455
+ if (tag === void 0) {
4456
+ return void 0;
4457
+ }
4458
+ try {
4459
+ return typeof tag === "string" ? tag : String(tag);
4460
+ } catch {
4461
+ return void 0;
4462
+ }
4463
+ }
4464
+ };
4333
4465
 
4334
4466
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
4335
4467
  function getStorage(type) {
@@ -4448,13 +4580,6 @@ var __exports__ = (() => {
4448
4580
  }
4449
4581
  }
4450
4582
 
4451
- // ../../node_modules/@probe.gl/log/dist/utils/assert.js
4452
- function assert3(condition, message) {
4453
- if (!condition) {
4454
- throw new Error(message || "Assertion failed");
4455
- }
4456
- }
4457
-
4458
4583
  // ../../node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
4459
4584
  function getHiResTimestamp() {
4460
4585
  let timestamp;
@@ -4469,7 +4594,7 @@ var __exports__ = (() => {
4469
4594
  return timestamp;
4470
4595
  }
4471
4596
 
4472
- // ../../node_modules/@probe.gl/log/dist/log.js
4597
+ // ../../node_modules/@probe.gl/log/dist/loggers/probe-log.js
4473
4598
  var originalConsole = {
4474
4599
  debug: isBrowser2() ? console.debug || console.log : console.log,
4475
4600
  log: console.log,
@@ -4481,12 +4606,9 @@ var __exports__ = (() => {
4481
4606
  enabled: true,
4482
4607
  level: 0
4483
4608
  };
4484
- function noop() {
4485
- }
4486
- var cache = {};
4487
- var ONCE = { once: true };
4488
- var Log = class {
4609
+ var ProbeLog = class extends BaseLog {
4489
4610
  constructor({ id } = { id: "" }) {
4611
+ super({ level: 0 });
4490
4612
  this.VERSION = VERSION;
4491
4613
  this._startTs = getHiResTimestamp();
4492
4614
  this._deltaTs = getHiResTimestamp();
@@ -4494,22 +4616,16 @@ var __exports__ = (() => {
4494
4616
  this.LOG_THROTTLE_TIMEOUT = 0;
4495
4617
  this.id = id;
4496
4618
  this.userData = {};
4497
- this._storage = new LocalStorage(`__probe-${this.id}__`, DEFAULT_LOG_CONFIGURATION);
4619
+ this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
4498
4620
  this.timeStamp(`${this.id} started`);
4499
4621
  autobind(this);
4500
4622
  Object.seal(this);
4501
4623
  }
4502
- set level(newLevel) {
4503
- this.setLevel(newLevel);
4504
- }
4505
- get level() {
4506
- return this.getLevel();
4507
- }
4508
4624
  isEnabled() {
4509
- return this._storage.config.enabled;
4625
+ return this._getConfiguration().enabled;
4510
4626
  }
4511
4627
  getLevel() {
4512
- return this._storage.config.level;
4628
+ return this._getConfiguration().level;
4513
4629
  }
4514
4630
  /** @return milliseconds, with fractions */
4515
4631
  getTotal() {
@@ -4533,20 +4649,20 @@ var __exports__ = (() => {
4533
4649
  }
4534
4650
  // Configure
4535
4651
  enable(enabled = true) {
4536
- this._storage.setConfiguration({ enabled });
4652
+ this._updateConfiguration({ enabled });
4537
4653
  return this;
4538
4654
  }
4539
4655
  setLevel(level) {
4540
- this._storage.setConfiguration({ level });
4656
+ this._updateConfiguration({ level });
4541
4657
  return this;
4542
4658
  }
4543
4659
  /** return the current status of the setting */
4544
4660
  get(setting) {
4545
- return this._storage.config[setting];
4661
+ return this._getConfiguration()[setting];
4546
4662
  }
4547
4663
  // update the status of the setting
4548
4664
  set(setting, value) {
4549
- this._storage.setConfiguration({ [setting]: value });
4665
+ this._updateConfiguration({ [setting]: value });
4550
4666
  }
4551
4667
  /** Logs the current settings as a table */
4552
4668
  settings() {
@@ -4562,11 +4678,16 @@ var __exports__ = (() => {
4562
4678
  throw new Error(message || "Assertion failed");
4563
4679
  }
4564
4680
  }
4565
- warn(message) {
4566
- return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);
4681
+ warn(message, ...args) {
4682
+ return this._log("warn", 0, message, args, {
4683
+ method: originalConsole.warn,
4684
+ once: true
4685
+ });
4567
4686
  }
4568
- error(message) {
4569
- return this._getLogFunction(0, message, originalConsole.error, arguments);
4687
+ error(message, ...args) {
4688
+ return this._log("error", 0, message, args, {
4689
+ method: originalConsole.error
4690
+ });
4570
4691
  }
4571
4692
  /** Print a deprecation warning */
4572
4693
  deprecated(oldUsage, newUsage) {
@@ -4576,50 +4697,63 @@ var __exports__ = (() => {
4576
4697
  removed(oldUsage, newUsage) {
4577
4698
  return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
4578
4699
  }
4579
- probe(logLevel, message) {
4580
- return this._getLogFunction(logLevel, message, originalConsole.log, arguments, {
4700
+ probe(logLevel, message, ...args) {
4701
+ return this._log("log", logLevel, message, args, {
4702
+ method: originalConsole.log,
4581
4703
  time: true,
4582
4704
  once: true
4583
4705
  });
4584
4706
  }
4585
- log(logLevel, message) {
4586
- return this._getLogFunction(logLevel, message, originalConsole.debug, arguments);
4707
+ log(logLevel, message, ...args) {
4708
+ return this._log("log", logLevel, message, args, {
4709
+ method: originalConsole.debug
4710
+ });
4587
4711
  }
4588
- info(logLevel, message) {
4589
- return this._getLogFunction(logLevel, message, console.info, arguments);
4712
+ info(logLevel, message, ...args) {
4713
+ return this._log("info", logLevel, message, args, { method: console.info });
4590
4714
  }
4591
- once(logLevel, message) {
4592
- return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
4715
+ once(logLevel, message, ...args) {
4716
+ return this._log("once", logLevel, message, args, {
4717
+ method: originalConsole.debug || originalConsole.info,
4718
+ once: true
4719
+ });
4593
4720
  }
4594
4721
  /** Logs an object as a table */
4595
4722
  table(logLevel, table, columns) {
4596
4723
  if (table) {
4597
- return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {
4724
+ return this._log("table", logLevel, table, columns && [columns] || [], {
4725
+ method: console.table || noop,
4598
4726
  tag: getTableHeader(table)
4599
4727
  });
4600
4728
  }
4601
4729
  return noop;
4602
4730
  }
4603
4731
  time(logLevel, message) {
4604
- return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
4732
+ return this._log("time", logLevel, message, [], {
4733
+ method: console.time ? console.time : console.info
4734
+ });
4605
4735
  }
4606
4736
  timeEnd(logLevel, message) {
4607
- return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
4737
+ return this._log("time", logLevel, message, [], {
4738
+ method: console.timeEnd ? console.timeEnd : console.info
4739
+ });
4608
4740
  }
4609
4741
  timeStamp(logLevel, message) {
4610
- return this._getLogFunction(logLevel, message, console.timeStamp || noop);
4742
+ return this._log("time", logLevel, message, [], {
4743
+ method: console.timeStamp || noop
4744
+ });
4611
4745
  }
4612
4746
  group(logLevel, message, opts = { collapsed: false }) {
4613
- const options = normalizeArguments({ logLevel, message, opts });
4614
- const { collapsed } = opts;
4615
- options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
4616
- return this._getLogFunction(options);
4747
+ const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
4748
+ return this._log("group", logLevel, message, [], { method });
4617
4749
  }
4618
4750
  groupCollapsed(logLevel, message, opts = {}) {
4619
4751
  return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
4620
4752
  }
4621
4753
  groupEnd(logLevel) {
4622
- return this._getLogFunction(logLevel, "", console.groupEnd || noop);
4754
+ return this._log("groupEnd", logLevel, "", [], {
4755
+ method: console.groupEnd || noop
4756
+ });
4623
4757
  }
4624
4758
  // EXPERIMENTAL
4625
4759
  withGroup(logLevel, message, func) {
@@ -4635,78 +4769,34 @@ var __exports__ = (() => {
4635
4769
  console.trace();
4636
4770
  }
4637
4771
  }
4638
- // PRIVATE METHODS
4639
- /** Deduces log level from a variety of arguments */
4640
4772
  _shouldLog(logLevel) {
4641
- return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
4642
- }
4643
- _getLogFunction(logLevel, message, method, args, opts) {
4644
- if (this._shouldLog(logLevel)) {
4645
- opts = normalizeArguments({ logLevel, message, args, opts });
4646
- method = method || opts.method;
4647
- assert3(method);
4648
- opts.total = this.getTotal();
4649
- opts.delta = this.getDelta();
4650
- this._deltaTs = getHiResTimestamp();
4651
- const tag = opts.tag || opts.message;
4652
- if (opts.once && tag) {
4653
- if (!cache[tag]) {
4654
- cache[tag] = getHiResTimestamp();
4655
- } else {
4656
- return noop;
4657
- }
4658
- }
4659
- message = decorateMessage(this.id, opts.message, opts);
4660
- return method.bind(console, message, ...opts.args);
4661
- }
4662
- return noop;
4663
- }
4664
- };
4665
- Log.VERSION = VERSION;
4666
- function normalizeLogLevel(logLevel) {
4667
- if (!logLevel) {
4668
- return 0;
4773
+ return this.isEnabled() && super._shouldLog(logLevel);
4669
4774
  }
4670
- let resolvedLevel;
4671
- switch (typeof logLevel) {
4672
- case "number":
4673
- resolvedLevel = logLevel;
4674
- break;
4675
- case "object":
4676
- resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
4677
- break;
4678
- default:
4679
- return 0;
4680
- }
4681
- assert3(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
4682
- return resolvedLevel;
4683
- }
4684
- function normalizeArguments(opts) {
4685
- const { logLevel, message } = opts;
4686
- opts.logLevel = normalizeLogLevel(logLevel);
4687
- const args = opts.args ? Array.from(opts.args) : [];
4688
- while (args.length && args.shift() !== message) {
4775
+ _emit(_type, normalized) {
4776
+ const method = normalized.method;
4777
+ assert3(method);
4778
+ normalized.total = this.getTotal();
4779
+ normalized.delta = this.getDelta();
4780
+ this._deltaTs = getHiResTimestamp();
4781
+ const message = decorateMessage(this.id, normalized.message, normalized);
4782
+ return method.bind(console, message, ...normalized.args);
4689
4783
  }
4690
- switch (typeof logLevel) {
4691
- case "string":
4692
- case "function":
4693
- if (message !== void 0) {
4694
- args.unshift(message);
4695
- }
4696
- opts.message = logLevel;
4697
- break;
4698
- case "object":
4699
- Object.assign(opts, logLevel);
4700
- break;
4701
- default:
4784
+ _getConfiguration() {
4785
+ if (!this._storage.config[this.id]) {
4786
+ this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
4787
+ }
4788
+ return this._storage.config[this.id];
4702
4789
  }
4703
- if (typeof opts.message === "function") {
4704
- opts.message = opts.message();
4790
+ _updateConfiguration(configuration) {
4791
+ const currentConfiguration = this._storage.config[this.id] || {
4792
+ ...DEFAULT_LOG_CONFIGURATION
4793
+ };
4794
+ this._storage.setConfiguration({
4795
+ [this.id]: { ...currentConfiguration, ...configuration }
4796
+ });
4705
4797
  }
4706
- const messageType = typeof opts.message;
4707
- assert3(messageType === "string" || messageType === "object");
4708
- return Object.assign(opts, { args }, opts.opts);
4709
- }
4798
+ };
4799
+ ProbeLog.VERSION = VERSION;
4710
4800
  function decorateMessage(id, message, opts) {
4711
4801
  if (typeof message === "string") {
4712
4802
  const time = opts.time ? leftPad(formatTime(opts.total)) : "";
@@ -4728,7 +4818,7 @@ var __exports__ = (() => {
4728
4818
  globalThis.probe = {};
4729
4819
 
4730
4820
  // ../../node_modules/@probe.gl/log/dist/index.js
4731
- var dist_default = new Log({ id: "@probe.gl/log" });
4821
+ var dist_default = new ProbeLog({ id: "@probe.gl/log" });
4732
4822
 
4733
4823
  // ../loader-utils/src/lib/javascript-utils/is-type.ts
4734
4824
  var isSharedArrayBuffer = (value) => typeof SharedArrayBuffer !== "undefined" && value instanceof SharedArrayBuffer;
@@ -11720,7 +11810,7 @@ var __exports__ = (() => {
11720
11810
  if (length4 === void 0) {
11721
11811
  length4 = (buffer.byteLength - byteOffset) / GLType.getByteSize(glType);
11722
11812
  }
11723
- const arrayBuffer = buffer instanceof ArrayBuffer ? buffer : buffer.buffer;
11813
+ const arrayBuffer = ArrayBuffer.isView(buffer) ? buffer.buffer : buffer;
11724
11814
  const ArrayType = GLType.getArrayType(glType);
11725
11815
  return new ArrayType(arrayBuffer, byteOffset, length4);
11726
11816
  }
@@ -17704,295 +17794,328 @@ var __exports__ = (() => {
17704
17794
  // ../../node_modules/long/index.js
17705
17795
  var wasm = null;
17706
17796
  try {
17707
- wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
17708
- 0,
17709
- 97,
17710
- 115,
17711
- 109,
17712
- 1,
17713
- 0,
17714
- 0,
17715
- 0,
17716
- 1,
17717
- 13,
17718
- 2,
17719
- 96,
17720
- 0,
17721
- 1,
17722
- 127,
17723
- 96,
17724
- 4,
17725
- 127,
17726
- 127,
17727
- 127,
17728
- 127,
17729
- 1,
17730
- 127,
17731
- 3,
17732
- 7,
17733
- 6,
17734
- 0,
17735
- 1,
17736
- 1,
17737
- 1,
17738
- 1,
17739
- 1,
17740
- 6,
17741
- 6,
17742
- 1,
17743
- 127,
17744
- 1,
17745
- 65,
17746
- 0,
17747
- 11,
17748
- 7,
17749
- 50,
17750
- 6,
17751
- 3,
17752
- 109,
17753
- 117,
17754
- 108,
17755
- 0,
17756
- 1,
17757
- 5,
17758
- 100,
17759
- 105,
17760
- 118,
17761
- 95,
17762
- 115,
17763
- 0,
17764
- 2,
17765
- 5,
17766
- 100,
17767
- 105,
17768
- 118,
17769
- 95,
17770
- 117,
17771
- 0,
17772
- 3,
17773
- 5,
17774
- 114,
17775
- 101,
17776
- 109,
17777
- 95,
17778
- 115,
17779
- 0,
17780
- 4,
17781
- 5,
17782
- 114,
17783
- 101,
17784
- 109,
17785
- 95,
17786
- 117,
17787
- 0,
17788
- 5,
17789
- 8,
17790
- 103,
17791
- 101,
17792
- 116,
17793
- 95,
17794
- 104,
17795
- 105,
17796
- 103,
17797
- 104,
17798
- 0,
17799
- 0,
17800
- 10,
17801
- 191,
17802
- 1,
17803
- 6,
17804
- 4,
17805
- 0,
17806
- 35,
17807
- 0,
17808
- 11,
17809
- 36,
17810
- 1,
17811
- 1,
17812
- 126,
17813
- 32,
17814
- 0,
17815
- 173,
17816
- 32,
17817
- 1,
17818
- 173,
17819
- 66,
17820
- 32,
17821
- 134,
17822
- 132,
17823
- 32,
17824
- 2,
17825
- 173,
17826
- 32,
17827
- 3,
17828
- 173,
17829
- 66,
17830
- 32,
17831
- 134,
17832
- 132,
17833
- 126,
17834
- 34,
17835
- 4,
17836
- 66,
17837
- 32,
17838
- 135,
17839
- 167,
17840
- 36,
17841
- 0,
17842
- 32,
17843
- 4,
17844
- 167,
17845
- 11,
17846
- 36,
17847
- 1,
17848
- 1,
17849
- 126,
17850
- 32,
17851
- 0,
17852
- 173,
17853
- 32,
17854
- 1,
17855
- 173,
17856
- 66,
17857
- 32,
17858
- 134,
17859
- 132,
17860
- 32,
17861
- 2,
17862
- 173,
17863
- 32,
17864
- 3,
17865
- 173,
17866
- 66,
17867
- 32,
17868
- 134,
17869
- 132,
17870
- 127,
17871
- 34,
17872
- 4,
17873
- 66,
17874
- 32,
17875
- 135,
17876
- 167,
17877
- 36,
17878
- 0,
17879
- 32,
17880
- 4,
17881
- 167,
17882
- 11,
17883
- 36,
17884
- 1,
17885
- 1,
17886
- 126,
17887
- 32,
17888
- 0,
17889
- 173,
17890
- 32,
17891
- 1,
17892
- 173,
17893
- 66,
17894
- 32,
17895
- 134,
17896
- 132,
17897
- 32,
17898
- 2,
17899
- 173,
17900
- 32,
17901
- 3,
17902
- 173,
17903
- 66,
17904
- 32,
17905
- 134,
17906
- 132,
17907
- 128,
17908
- 34,
17909
- 4,
17910
- 66,
17911
- 32,
17912
- 135,
17913
- 167,
17914
- 36,
17915
- 0,
17916
- 32,
17917
- 4,
17918
- 167,
17919
- 11,
17920
- 36,
17921
- 1,
17922
- 1,
17923
- 126,
17924
- 32,
17925
- 0,
17926
- 173,
17927
- 32,
17928
- 1,
17929
- 173,
17930
- 66,
17931
- 32,
17932
- 134,
17933
- 132,
17934
- 32,
17935
- 2,
17936
- 173,
17937
- 32,
17938
- 3,
17939
- 173,
17940
- 66,
17941
- 32,
17942
- 134,
17943
- 132,
17944
- 129,
17945
- 34,
17946
- 4,
17947
- 66,
17948
- 32,
17949
- 135,
17950
- 167,
17951
- 36,
17952
- 0,
17953
- 32,
17954
- 4,
17955
- 167,
17956
- 11,
17957
- 36,
17958
- 1,
17959
- 1,
17960
- 126,
17961
- 32,
17962
- 0,
17963
- 173,
17964
- 32,
17965
- 1,
17966
- 173,
17967
- 66,
17968
- 32,
17969
- 134,
17970
- 132,
17971
- 32,
17972
- 2,
17973
- 173,
17974
- 32,
17975
- 3,
17976
- 173,
17977
- 66,
17978
- 32,
17979
- 134,
17980
- 132,
17981
- 130,
17982
- 34,
17983
- 4,
17984
- 66,
17985
- 32,
17986
- 135,
17987
- 167,
17988
- 36,
17989
- 0,
17990
- 32,
17991
- 4,
17992
- 167,
17993
- 11
17994
- ])), {}).exports;
17995
- } catch (e) {
17797
+ wasm = new WebAssembly.Instance(
17798
+ new WebAssembly.Module(
17799
+ new Uint8Array([
17800
+ // \0asm
17801
+ 0,
17802
+ 97,
17803
+ 115,
17804
+ 109,
17805
+ // version 1
17806
+ 1,
17807
+ 0,
17808
+ 0,
17809
+ 0,
17810
+ // section "type"
17811
+ 1,
17812
+ 13,
17813
+ 2,
17814
+ // 0, () => i32
17815
+ 96,
17816
+ 0,
17817
+ 1,
17818
+ 127,
17819
+ // 1, (i32, i32, i32, i32) => i32
17820
+ 96,
17821
+ 4,
17822
+ 127,
17823
+ 127,
17824
+ 127,
17825
+ 127,
17826
+ 1,
17827
+ 127,
17828
+ // section "function"
17829
+ 3,
17830
+ 7,
17831
+ 6,
17832
+ // 0, type 0
17833
+ 0,
17834
+ // 1, type 1
17835
+ 1,
17836
+ // 2, type 1
17837
+ 1,
17838
+ // 3, type 1
17839
+ 1,
17840
+ // 4, type 1
17841
+ 1,
17842
+ // 5, type 1
17843
+ 1,
17844
+ // section "global"
17845
+ 6,
17846
+ 6,
17847
+ 1,
17848
+ // 0, "high", mutable i32
17849
+ 127,
17850
+ 1,
17851
+ 65,
17852
+ 0,
17853
+ 11,
17854
+ // section "export"
17855
+ 7,
17856
+ 50,
17857
+ 6,
17858
+ // 0, "mul"
17859
+ 3,
17860
+ 109,
17861
+ 117,
17862
+ 108,
17863
+ 0,
17864
+ 1,
17865
+ // 1, "div_s"
17866
+ 5,
17867
+ 100,
17868
+ 105,
17869
+ 118,
17870
+ 95,
17871
+ 115,
17872
+ 0,
17873
+ 2,
17874
+ // 2, "div_u"
17875
+ 5,
17876
+ 100,
17877
+ 105,
17878
+ 118,
17879
+ 95,
17880
+ 117,
17881
+ 0,
17882
+ 3,
17883
+ // 3, "rem_s"
17884
+ 5,
17885
+ 114,
17886
+ 101,
17887
+ 109,
17888
+ 95,
17889
+ 115,
17890
+ 0,
17891
+ 4,
17892
+ // 4, "rem_u"
17893
+ 5,
17894
+ 114,
17895
+ 101,
17896
+ 109,
17897
+ 95,
17898
+ 117,
17899
+ 0,
17900
+ 5,
17901
+ // 5, "get_high"
17902
+ 8,
17903
+ 103,
17904
+ 101,
17905
+ 116,
17906
+ 95,
17907
+ 104,
17908
+ 105,
17909
+ 103,
17910
+ 104,
17911
+ 0,
17912
+ 0,
17913
+ // section "code"
17914
+ 10,
17915
+ 191,
17916
+ 1,
17917
+ 6,
17918
+ // 0, "get_high"
17919
+ 4,
17920
+ 0,
17921
+ 35,
17922
+ 0,
17923
+ 11,
17924
+ // 1, "mul"
17925
+ 36,
17926
+ 1,
17927
+ 1,
17928
+ 126,
17929
+ 32,
17930
+ 0,
17931
+ 173,
17932
+ 32,
17933
+ 1,
17934
+ 173,
17935
+ 66,
17936
+ 32,
17937
+ 134,
17938
+ 132,
17939
+ 32,
17940
+ 2,
17941
+ 173,
17942
+ 32,
17943
+ 3,
17944
+ 173,
17945
+ 66,
17946
+ 32,
17947
+ 134,
17948
+ 132,
17949
+ 126,
17950
+ 34,
17951
+ 4,
17952
+ 66,
17953
+ 32,
17954
+ 135,
17955
+ 167,
17956
+ 36,
17957
+ 0,
17958
+ 32,
17959
+ 4,
17960
+ 167,
17961
+ 11,
17962
+ // 2, "div_s"
17963
+ 36,
17964
+ 1,
17965
+ 1,
17966
+ 126,
17967
+ 32,
17968
+ 0,
17969
+ 173,
17970
+ 32,
17971
+ 1,
17972
+ 173,
17973
+ 66,
17974
+ 32,
17975
+ 134,
17976
+ 132,
17977
+ 32,
17978
+ 2,
17979
+ 173,
17980
+ 32,
17981
+ 3,
17982
+ 173,
17983
+ 66,
17984
+ 32,
17985
+ 134,
17986
+ 132,
17987
+ 127,
17988
+ 34,
17989
+ 4,
17990
+ 66,
17991
+ 32,
17992
+ 135,
17993
+ 167,
17994
+ 36,
17995
+ 0,
17996
+ 32,
17997
+ 4,
17998
+ 167,
17999
+ 11,
18000
+ // 3, "div_u"
18001
+ 36,
18002
+ 1,
18003
+ 1,
18004
+ 126,
18005
+ 32,
18006
+ 0,
18007
+ 173,
18008
+ 32,
18009
+ 1,
18010
+ 173,
18011
+ 66,
18012
+ 32,
18013
+ 134,
18014
+ 132,
18015
+ 32,
18016
+ 2,
18017
+ 173,
18018
+ 32,
18019
+ 3,
18020
+ 173,
18021
+ 66,
18022
+ 32,
18023
+ 134,
18024
+ 132,
18025
+ 128,
18026
+ 34,
18027
+ 4,
18028
+ 66,
18029
+ 32,
18030
+ 135,
18031
+ 167,
18032
+ 36,
18033
+ 0,
18034
+ 32,
18035
+ 4,
18036
+ 167,
18037
+ 11,
18038
+ // 4, "rem_s"
18039
+ 36,
18040
+ 1,
18041
+ 1,
18042
+ 126,
18043
+ 32,
18044
+ 0,
18045
+ 173,
18046
+ 32,
18047
+ 1,
18048
+ 173,
18049
+ 66,
18050
+ 32,
18051
+ 134,
18052
+ 132,
18053
+ 32,
18054
+ 2,
18055
+ 173,
18056
+ 32,
18057
+ 3,
18058
+ 173,
18059
+ 66,
18060
+ 32,
18061
+ 134,
18062
+ 132,
18063
+ 129,
18064
+ 34,
18065
+ 4,
18066
+ 66,
18067
+ 32,
18068
+ 135,
18069
+ 167,
18070
+ 36,
18071
+ 0,
18072
+ 32,
18073
+ 4,
18074
+ 167,
18075
+ 11,
18076
+ // 5, "rem_u"
18077
+ 36,
18078
+ 1,
18079
+ 1,
18080
+ 126,
18081
+ 32,
18082
+ 0,
18083
+ 173,
18084
+ 32,
18085
+ 1,
18086
+ 173,
18087
+ 66,
18088
+ 32,
18089
+ 134,
18090
+ 132,
18091
+ 32,
18092
+ 2,
18093
+ 173,
18094
+ 32,
18095
+ 3,
18096
+ 173,
18097
+ 66,
18098
+ 32,
18099
+ 134,
18100
+ 132,
18101
+ 130,
18102
+ 34,
18103
+ 4,
18104
+ 66,
18105
+ 32,
18106
+ 135,
18107
+ 167,
18108
+ 36,
18109
+ 0,
18110
+ 32,
18111
+ 4,
18112
+ 167,
18113
+ 11
18114
+ ])
18115
+ ),
18116
+ {}
18117
+ ).exports;
18118
+ } catch {
17996
18119
  }
17997
18120
  function Long(low, high, unsigned) {
17998
18121
  this.low = low | 0;
@@ -18012,27 +18135,27 @@ var __exports__ = (() => {
18012
18135
  var INT_CACHE = {};
18013
18136
  var UINT_CACHE = {};
18014
18137
  function fromInt(value, unsigned) {
18015
- var obj, cachedObj, cache2;
18138
+ var obj, cachedObj, cache;
18016
18139
  if (unsigned) {
18017
18140
  value >>>= 0;
18018
- if (cache2 = 0 <= value && value < 256) {
18141
+ if (cache = 0 <= value && value < 256) {
18019
18142
  cachedObj = UINT_CACHE[value];
18020
18143
  if (cachedObj)
18021
18144
  return cachedObj;
18022
18145
  }
18023
18146
  obj = fromBits(value, 0, true);
18024
- if (cache2)
18147
+ if (cache)
18025
18148
  UINT_CACHE[value] = obj;
18026
18149
  return obj;
18027
18150
  } else {
18028
18151
  value |= 0;
18029
- if (cache2 = -128 <= value && value < 128) {
18152
+ if (cache = -128 <= value && value < 128) {
18030
18153
  cachedObj = INT_CACHE[value];
18031
18154
  if (cachedObj)
18032
18155
  return cachedObj;
18033
18156
  }
18034
18157
  obj = fromBits(value, value < 0 ? -1 : 0, false);
18035
- if (cache2)
18158
+ if (cache)
18036
18159
  INT_CACHE[value] = obj;
18037
18160
  return obj;
18038
18161
  }
@@ -18054,7 +18177,11 @@ var __exports__ = (() => {
18054
18177
  }
18055
18178
  if (value < 0)
18056
18179
  return fromNumber(-value, unsigned).neg();
18057
- return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
18180
+ return fromBits(
18181
+ value % TWO_PWR_32_DBL | 0,
18182
+ value / TWO_PWR_32_DBL | 0,
18183
+ unsigned
18184
+ );
18058
18185
  }
18059
18186
  Long.fromNumber = fromNumber;
18060
18187
  function fromBits(lowBits, highBits, unsigned) {
@@ -18103,7 +18230,11 @@ var __exports__ = (() => {
18103
18230
  return fromNumber(val, unsigned);
18104
18231
  if (typeof val === "string")
18105
18232
  return fromString(val, unsigned);
18106
- return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
18233
+ return fromBits(
18234
+ val.low,
18235
+ val.high,
18236
+ typeof unsigned === "boolean" ? unsigned : val.unsigned
18237
+ );
18107
18238
  }
18108
18239
  Long.fromValue = fromValue;
18109
18240
  var TWO_PWR_16_DBL = 1 << 16;
@@ -18185,6 +18316,14 @@ var __exports__ = (() => {
18185
18316
  break;
18186
18317
  return this.high != 0 ? bit + 33 : bit + 1;
18187
18318
  };
18319
+ LongPrototype.isSafeInteger = function isSafeInteger() {
18320
+ var top11Bits = this.high >> 21;
18321
+ if (!top11Bits)
18322
+ return true;
18323
+ if (this.unsigned)
18324
+ return false;
18325
+ return top11Bits === -1 && !(this.low === 0 && this.high === -2097152);
18326
+ };
18188
18327
  LongPrototype.isZero = function isZero() {
18189
18328
  return this.high === 0 && this.low === 0;
18190
18329
  };
@@ -18305,12 +18444,7 @@ var __exports__ = (() => {
18305
18444
  if (!isLong(multiplier))
18306
18445
  multiplier = fromValue(multiplier);
18307
18446
  if (wasm) {
18308
- var low = wasm["mul"](
18309
- this.low,
18310
- this.high,
18311
- multiplier.low,
18312
- multiplier.high
18313
- );
18447
+ var low = wasm["mul"](this.low, this.high, multiplier.low, multiplier.high);
18314
18448
  return fromBits(low, wasm["get_high"](), this.unsigned);
18315
18449
  }
18316
18450
  if (multiplier.isZero())
@@ -18480,7 +18614,11 @@ var __exports__ = (() => {
18480
18614
  if ((numBits &= 63) === 0)
18481
18615
  return this;
18482
18616
  else if (numBits < 32)
18483
- return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
18617
+ return fromBits(
18618
+ this.low << numBits,
18619
+ this.high << numBits | this.low >>> 32 - numBits,
18620
+ this.unsigned
18621
+ );
18484
18622
  else
18485
18623
  return fromBits(0, this.low << numBits - 32, this.unsigned);
18486
18624
  };
@@ -18491,9 +18629,17 @@ var __exports__ = (() => {
18491
18629
  if ((numBits &= 63) === 0)
18492
18630
  return this;
18493
18631
  else if (numBits < 32)
18494
- return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
18632
+ return fromBits(
18633
+ this.low >>> numBits | this.high << 32 - numBits,
18634
+ this.high >> numBits,
18635
+ this.unsigned
18636
+ );
18495
18637
  else
18496
- return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
18638
+ return fromBits(
18639
+ this.high >> numBits - 32,
18640
+ this.high >= 0 ? 0 : -1,
18641
+ this.unsigned
18642
+ );
18497
18643
  };
18498
18644
  LongPrototype.shr = LongPrototype.shiftRight;
18499
18645
  LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
@@ -18502,7 +18648,11 @@ var __exports__ = (() => {
18502
18648
  if ((numBits &= 63) === 0)
18503
18649
  return this;
18504
18650
  if (numBits < 32)
18505
- return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >>> numBits, this.unsigned);
18651
+ return fromBits(
18652
+ this.low >>> numBits | this.high << 32 - numBits,
18653
+ this.high >>> numBits,
18654
+ this.unsigned
18655
+ );
18506
18656
  if (numBits === 32)
18507
18657
  return fromBits(this.high, 0, this.unsigned);
18508
18658
  return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
@@ -18519,11 +18669,19 @@ var __exports__ = (() => {
18519
18669
  return fromBits(this.high, this.low, this.unsigned);
18520
18670
  if (numBits < 32) {
18521
18671
  b = 32 - numBits;
18522
- return fromBits(this.low << numBits | this.high >>> b, this.high << numBits | this.low >>> b, this.unsigned);
18672
+ return fromBits(
18673
+ this.low << numBits | this.high >>> b,
18674
+ this.high << numBits | this.low >>> b,
18675
+ this.unsigned
18676
+ );
18523
18677
  }
18524
18678
  numBits -= 32;
18525
18679
  b = 32 - numBits;
18526
- return fromBits(this.high << numBits | this.low >>> b, this.low << numBits | this.high >>> b, this.unsigned);
18680
+ return fromBits(
18681
+ this.high << numBits | this.low >>> b,
18682
+ this.low << numBits | this.high >>> b,
18683
+ this.unsigned
18684
+ );
18527
18685
  };
18528
18686
  LongPrototype.rotl = LongPrototype.rotateLeft;
18529
18687
  LongPrototype.rotateRight = function rotateRight(numBits) {
@@ -18536,11 +18694,19 @@ var __exports__ = (() => {
18536
18694
  return fromBits(this.high, this.low, this.unsigned);
18537
18695
  if (numBits < 32) {
18538
18696
  b = 32 - numBits;
18539
- return fromBits(this.high << b | this.low >>> numBits, this.low << b | this.high >>> numBits, this.unsigned);
18697
+ return fromBits(
18698
+ this.high << b | this.low >>> numBits,
18699
+ this.low << b | this.high >>> numBits,
18700
+ this.unsigned
18701
+ );
18540
18702
  }
18541
18703
  numBits -= 32;
18542
18704
  b = 32 - numBits;
18543
- return fromBits(this.low << b | this.high >>> numBits, this.high << b | this.low >>> numBits, this.unsigned);
18705
+ return fromBits(
18706
+ this.low << b | this.high >>> numBits,
18707
+ this.high << b | this.low >>> numBits,
18708
+ this.unsigned
18709
+ );
18544
18710
  };
18545
18711
  LongPrototype.rotr = LongPrototype.rotateRight;
18546
18712
  LongPrototype.toSigned = function toSigned() {
@@ -18599,6 +18765,23 @@ var __exports__ = (() => {
18599
18765
  unsigned
18600
18766
  );
18601
18767
  };
18768
+ if (typeof BigInt === "function") {
18769
+ Long.fromBigInt = function fromBigInt(value, unsigned) {
18770
+ var lowBits = Number(BigInt.asIntN(32, value));
18771
+ var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
18772
+ return fromBits(lowBits, highBits, unsigned);
18773
+ };
18774
+ Long.fromValue = function fromValueWithBigInt(value, unsigned) {
18775
+ if (typeof value === "bigint")
18776
+ return Long.fromBigInt(value, unsigned);
18777
+ return fromValue(value, unsigned);
18778
+ };
18779
+ LongPrototype.toBigInt = function toBigInt2() {
18780
+ var lowBigInt = BigInt(this.low >>> 0);
18781
+ var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
18782
+ return highBigInt << BigInt(32) | lowBigInt;
18783
+ };
18784
+ }
18602
18785
  var long_default = Long;
18603
18786
 
18604
18787
  // src/lib/utils/s2/s2-token-functions.ts