@lowentry/utils 1.23.1 → 1.23.3

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/index.d.ts CHANGED
@@ -70,7 +70,7 @@ export declare function IS_OBJECT(value: any): boolean;
70
70
  export declare function ISSET(value: any): boolean;
71
71
 
72
72
  export declare namespace LeUtils {
73
- export function equals(value: any, other: any): boolean;
73
+ export function equals(a: any, b: any): boolean;
74
74
  export function equalsMapLike(elementsA: any, elementsB: any, ignoreKeys?: any[]): boolean;
75
75
  export function clone(value: any): any;
76
76
  export function onDomReady(callback: Function): {
package/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
4
- import _typeof from '@babel/runtime/helpers/typeof';
5
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
+ import _typeof from '@babel/runtime/helpers/typeof';
6
6
  import '@babel/runtime/helpers/awaitAsyncGenerator';
7
7
  import _wrapAsyncGenerator from '@babel/runtime/helpers/wrapAsyncGenerator';
8
8
  import _regeneratorRuntime from '@babel/runtime/regenerator';
9
- import FastDeepEqual from 'fast-deep-equal';
10
9
  import CloneDeep from 'clone-deep';
11
10
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
12
11
  import _createClass from '@babel/runtime/helpers/createClass';
@@ -248,14 +247,149 @@ var findTransactionalValueChange = function findTransactionalValueChange(transac
248
247
  };
249
248
  var LeUtils = {
250
249
  /**
251
- * A deep equals implementation (npm package "fast-deep-equal").
250
+ * A deep equals implementation.
252
251
  *
253
- * @param {*} value The value to compare.
254
- * @param {*} other The other value to compare.
252
+ * @param {*} a The value to compare.
253
+ * @param {*} b The other value to compare.
255
254
  * @returns {boolean} Returns true if the values are equivalent.
256
255
  */
257
- equals: function equals(value, other) {
258
- return FastDeepEqual(value, other);
256
+ equals: function equals(a, b) {
257
+ if (a === b) {
258
+ return true;
259
+ }
260
+ if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
261
+ if (a.constructor !== b.constructor) {
262
+ return false;
263
+ }
264
+ if (Array.isArray(a)) {
265
+ var _length = a.length;
266
+ if (_length != b.length) {
267
+ return false;
268
+ }
269
+ for (var i = _length; i-- !== 0;) {
270
+ if (!LeUtils.equals(a[i], b[i])) {
271
+ return false;
272
+ }
273
+ }
274
+ return true;
275
+ }
276
+ if (a instanceof Map && b instanceof Map) {
277
+ if (a.size !== b.size) {
278
+ return false;
279
+ }
280
+ var _iterator = _createForOfIteratorHelper$1(a.entries()),
281
+ _step;
282
+ try {
283
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
284
+ var _i = _step.value;
285
+ if (!b.has(_i[0])) {
286
+ return false;
287
+ }
288
+ }
289
+ } catch (err) {
290
+ _iterator.e(err);
291
+ } finally {
292
+ _iterator.f();
293
+ }
294
+ var _iterator2 = _createForOfIteratorHelper$1(a.entries()),
295
+ _step2;
296
+ try {
297
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
298
+ var _i2 = _step2.value;
299
+ if (!LeUtils.equals(_i2[1], b.get(_i2[0]))) {
300
+ return false;
301
+ }
302
+ }
303
+ } catch (err) {
304
+ _iterator2.e(err);
305
+ } finally {
306
+ _iterator2.f();
307
+ }
308
+ return true;
309
+ }
310
+ if (a instanceof Set && b instanceof Set) {
311
+ if (a.size !== b.size) {
312
+ return false;
313
+ }
314
+ var _iterator3 = _createForOfIteratorHelper$1(a.entries()),
315
+ _step3;
316
+ try {
317
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
318
+ var _i3 = _step3.value;
319
+ if (!b.has(_i3[0])) {
320
+ return false;
321
+ }
322
+ }
323
+ } catch (err) {
324
+ _iterator3.e(err);
325
+ } finally {
326
+ _iterator3.f();
327
+ }
328
+ return true;
329
+ }
330
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
331
+ if ('length' in a && 'length' in b && typeof a.length === 'number' && typeof b.length === 'number') {
332
+ if (a.length != b.length) {
333
+ return false;
334
+ }
335
+ for (var _i4 = a.length; _i4-- !== 0;) {
336
+ if (a[_i4] !== b[_i4]) {
337
+ return false;
338
+ }
339
+ }
340
+ return true;
341
+ }
342
+ if ('byteLength' in a && 'byteLength' in b && typeof a.byteLength === 'number' && typeof b.byteLength === 'number' && 'getUint8' in a && 'getUint8' in b && typeof a.getUint8 === 'function' && typeof b.getUint8 === 'function') {
343
+ if (a.byteLength !== b.byteLength) {
344
+ return false;
345
+ }
346
+ for (var _i5 = a.byteLength; _i5-- !== 0;) {
347
+ if (a.getUint8(_i5) !== b.getUint8(_i5)) {
348
+ return false;
349
+ }
350
+ }
351
+ return true;
352
+ }
353
+ return false;
354
+ }
355
+ if (a.constructor === RegExp) {
356
+ return a.source === b.source && a.flags === b.flags;
357
+ }
358
+ if (a.valueOf !== Object.prototype.valueOf) {
359
+ return a.valueOf() === b.valueOf();
360
+ }
361
+ if (a.toString !== Object.prototype.toString) {
362
+ return a.toString() === b.toString();
363
+ }
364
+ var proto = Object.getPrototypeOf(a);
365
+ if (a.constructor !== Object && a.constructor !== Array && proto !== Object.prototype && typeof a.equals === 'function') {
366
+ return a.equals(b);
367
+ }
368
+ var keys = Object.keys(a);
369
+ var length = keys.length;
370
+ if (length !== Object.keys(b).length) {
371
+ return false;
372
+ }
373
+ for (var _i6 = length; _i6-- !== 0;) {
374
+ if (!Object.prototype.hasOwnProperty.call(b, keys[_i6])) {
375
+ return false;
376
+ }
377
+ }
378
+ for (var _i7 = length; _i7-- !== 0;) {
379
+ var key = keys[_i7];
380
+ if (key === '_owner' && a.$$typeof) {
381
+ // React-specific: avoid traversing _owner, it contains circular references, and is not needed when comparing the actual element
382
+ continue;
383
+ }
384
+ if (!LeUtils.equals(a[key], b[key])) {
385
+ return false;
386
+ }
387
+ }
388
+ return true;
389
+ }
390
+
391
+ // true if both are NaN, false otherwise
392
+ return a !== a && b !== b;
259
393
  },
260
394
  /**
261
395
  * Performs a deep equality comparison between two collections (objects, maps, arrays, etc), sorting on the keys before comparing them.
@@ -702,20 +836,20 @@ var LeUtils = {
702
836
  }
703
837
  if (typeof (elements === null || elements === void 0 ? void 0 : elements[Symbol.iterator]) === 'function') {
704
838
  var i = 0;
705
- var _iterator = _createForOfIteratorHelper$1(elements),
706
- _step;
839
+ var _iterator4 = _createForOfIteratorHelper$1(elements),
840
+ _step4;
707
841
  try {
708
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
709
- var value = _step.value;
842
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
843
+ var value = _step4.value;
710
844
  if (i === index) {
711
845
  return value;
712
846
  }
713
847
  i++;
714
848
  }
715
849
  } catch (err) {
716
- _iterator.e(err);
850
+ _iterator4.e(err);
717
851
  } finally {
718
- _iterator.f();
852
+ _iterator4.f();
719
853
  }
720
854
  return undefined;
721
855
  }
@@ -763,7 +897,7 @@ var LeUtils = {
763
897
  eachIterator: function eachIterator(elements) {
764
898
  var optionalSkipHasOwnPropertyCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
765
899
  return /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
766
- var i, _i, _iterator2, _step2, _step2$value, _i2, value, _iterator3, _step3, _value, _i3, _iterator4, _step4, _value2, buffer, _i4, _buffer, entry, _i5, _t, _t2, _t3, _t4, _t5, _t6, _t7;
900
+ var i, _i8, _iterator5, _step5, _step5$value, _i9, value, _iterator6, _step6, _value, _i0, _iterator7, _step7, _value2, buffer, _i1, _buffer, entry, _i10, _t, _t2, _t3, _t4, _t5, _t6, _t7;
767
901
  return _regeneratorRuntime.wrap(function (_context) {
768
902
  while (1) switch (_context.prev = _context.next) {
769
903
  case 0:
@@ -802,13 +936,13 @@ var LeUtils = {
802
936
  _context.next = 8;
803
937
  break;
804
938
  }
805
- _i = _t2.value;
806
- if (!(optionalSkipHasOwnPropertyCheck === true || Object.prototype.hasOwnProperty.call(elements, _i))) {
939
+ _i8 = _t2.value;
940
+ if (!(optionalSkipHasOwnPropertyCheck === true || Object.prototype.hasOwnProperty.call(elements, _i8))) {
807
941
  _context.next = 7;
808
942
  break;
809
943
  }
810
944
  _context.next = 7;
811
- return [elements[_i], _i];
945
+ return [elements[_i8], _i8];
812
946
  case 7:
813
947
  _context.next = 6;
814
948
  break;
@@ -819,17 +953,17 @@ var LeUtils = {
819
953
  _context.next = 17;
820
954
  break;
821
955
  }
822
- _iterator2 = _createForOfIteratorHelper$1(elements);
956
+ _iterator5 = _createForOfIteratorHelper$1(elements);
823
957
  _context.prev = 10;
824
- _iterator2.s();
958
+ _iterator5.s();
825
959
  case 11:
826
- if ((_step2 = _iterator2.n()).done) {
960
+ if ((_step5 = _iterator5.n()).done) {
827
961
  _context.next = 13;
828
962
  break;
829
963
  }
830
- _step2$value = _slicedToArray(_step2.value, 2), _i2 = _step2$value[0], value = _step2$value[1];
964
+ _step5$value = _slicedToArray(_step5.value, 2), _i9 = _step5$value[0], value = _step5$value[1];
831
965
  _context.next = 12;
832
- return [value, _i2];
966
+ return [value, _i9];
833
967
  case 12:
834
968
  _context.next = 11;
835
969
  break;
@@ -839,10 +973,10 @@ var LeUtils = {
839
973
  case 14:
840
974
  _context.prev = 14;
841
975
  _t3 = _context["catch"](10);
842
- _iterator2.e(_t3);
976
+ _iterator5.e(_t3);
843
977
  case 15:
844
978
  _context.prev = 15;
845
- _iterator2.f();
979
+ _iterator5.f();
846
980
  return _context.finish(15);
847
981
  case 16:
848
982
  return _context.abrupt("return");
@@ -851,15 +985,15 @@ var LeUtils = {
851
985
  _context.next = 25;
852
986
  break;
853
987
  }
854
- _iterator3 = _createForOfIteratorHelper$1(elements);
988
+ _iterator6 = _createForOfIteratorHelper$1(elements);
855
989
  _context.prev = 18;
856
- _iterator3.s();
990
+ _iterator6.s();
857
991
  case 19:
858
- if ((_step3 = _iterator3.n()).done) {
992
+ if ((_step6 = _iterator6.n()).done) {
859
993
  _context.next = 21;
860
994
  break;
861
995
  }
862
- _value = _step3.value;
996
+ _value = _step6.value;
863
997
  _context.next = 20;
864
998
  return [_value, _value];
865
999
  case 20:
@@ -871,10 +1005,10 @@ var LeUtils = {
871
1005
  case 22:
872
1006
  _context.prev = 22;
873
1007
  _t4 = _context["catch"](18);
874
- _iterator3.e(_t4);
1008
+ _iterator6.e(_t4);
875
1009
  case 23:
876
1010
  _context.prev = 23;
877
- _iterator3.f();
1011
+ _iterator6.f();
878
1012
  return _context.finish(23);
879
1013
  case 24:
880
1014
  return _context.abrupt("return");
@@ -887,20 +1021,20 @@ var LeUtils = {
887
1021
  _context.next = 34;
888
1022
  break;
889
1023
  }
890
- _i3 = 0;
891
- _iterator4 = _createForOfIteratorHelper$1(elements);
1024
+ _i0 = 0;
1025
+ _iterator7 = _createForOfIteratorHelper$1(elements);
892
1026
  _context.prev = 26;
893
- _iterator4.s();
1027
+ _iterator7.s();
894
1028
  case 27:
895
- if ((_step4 = _iterator4.n()).done) {
1029
+ if ((_step7 = _iterator7.n()).done) {
896
1030
  _context.next = 30;
897
1031
  break;
898
1032
  }
899
- _value2 = _step4.value;
1033
+ _value2 = _step7.value;
900
1034
  _context.next = 28;
901
- return [_value2, _i3];
1035
+ return [_value2, _i0];
902
1036
  case 28:
903
- _i3++;
1037
+ _i0++;
904
1038
  case 29:
905
1039
  _context.next = 27;
906
1040
  break;
@@ -910,10 +1044,10 @@ var LeUtils = {
910
1044
  case 31:
911
1045
  _context.prev = 31;
912
1046
  _t5 = _context["catch"](26);
913
- _iterator4.e(_t5);
1047
+ _iterator7.e(_t5);
914
1048
  case 32:
915
1049
  _context.prev = 32;
916
- _iterator4.f();
1050
+ _iterator7.f();
917
1051
  return _context.finish(32);
918
1052
  case 33:
919
1053
  return _context.abrupt("return");
@@ -926,17 +1060,17 @@ var LeUtils = {
926
1060
  elements.forEach(function (value, i) {
927
1061
  buffer.push([value, i]);
928
1062
  });
929
- _i4 = 0, _buffer = buffer;
1063
+ _i1 = 0, _buffer = buffer;
930
1064
  case 35:
931
- if (!(_i4 < _buffer.length)) {
1065
+ if (!(_i1 < _buffer.length)) {
932
1066
  _context.next = 37;
933
1067
  break;
934
1068
  }
935
- entry = _buffer[_i4];
1069
+ entry = _buffer[_i1];
936
1070
  _context.next = 36;
937
1071
  return entry;
938
1072
  case 36:
939
- _i4++;
1073
+ _i1++;
940
1074
  _context.next = 35;
941
1075
  break;
942
1076
  case 37:
@@ -952,13 +1086,13 @@ var LeUtils = {
952
1086
  _context.next = 41;
953
1087
  break;
954
1088
  }
955
- _i5 = _t7.value;
956
- if (!(optionalSkipHasOwnPropertyCheck === true || Object.prototype.hasOwnProperty.call(elements, _i5))) {
1089
+ _i10 = _t7.value;
1090
+ if (!(optionalSkipHasOwnPropertyCheck === true || Object.prototype.hasOwnProperty.call(elements, _i10))) {
957
1091
  _context.next = 40;
958
1092
  break;
959
1093
  }
960
1094
  _context.next = 40;
961
- return [elements[_i5], _i5];
1095
+ return [elements[_i10], _i10];
962
1096
  case 40:
963
1097
  _context.next = 39;
964
1098
  break;
@@ -983,21 +1117,21 @@ var LeUtils = {
983
1117
  */
984
1118
  each: function each(elements, callback) {
985
1119
  var optionalSkipHasOwnPropertyCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
986
- var _iterator5 = _createForOfIteratorHelper$1(LeUtils.eachIterator(elements, optionalSkipHasOwnPropertyCheck)),
987
- _step5;
1120
+ var _iterator8 = _createForOfIteratorHelper$1(LeUtils.eachIterator(elements, optionalSkipHasOwnPropertyCheck)),
1121
+ _step8;
988
1122
  try {
989
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
990
- var _step5$value = _slicedToArray(_step5.value, 2),
991
- value = _step5$value[0],
992
- key = _step5$value[1];
1123
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
1124
+ var _step8$value = _slicedToArray(_step8.value, 2),
1125
+ value = _step8$value[0],
1126
+ key = _step8$value[1];
993
1127
  if (callback.call(value, value, key) === false) {
994
1128
  break;
995
1129
  }
996
1130
  }
997
1131
  } catch (err) {
998
- _iterator5.e(err);
1132
+ _iterator8.e(err);
999
1133
  } finally {
1000
- _iterator5.f();
1134
+ _iterator8.f();
1001
1135
  }
1002
1136
  return elements;
1003
1137
  },
@@ -1106,9 +1240,9 @@ var LeUtils = {
1106
1240
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(elements, asyncCallback) {
1107
1241
  var parallelCount,
1108
1242
  optionalSkipHasOwnPropertyCheck,
1109
- _iterator6,
1110
- _step6,
1111
- _step6$value,
1243
+ _iterator9,
1244
+ _step9,
1245
+ _step9$value,
1112
1246
  value,
1113
1247
  key,
1114
1248
  _args5 = arguments,
@@ -1133,15 +1267,15 @@ var LeUtils = {
1133
1267
  case 1:
1134
1268
  return _context5.abrupt("return", _context5.sent);
1135
1269
  case 2:
1136
- _iterator6 = _createForOfIteratorHelper$1(LeUtils.eachIterator(elements, optionalSkipHasOwnPropertyCheck));
1270
+ _iterator9 = _createForOfIteratorHelper$1(LeUtils.eachIterator(elements, optionalSkipHasOwnPropertyCheck));
1137
1271
  _context5.prev = 3;
1138
- _iterator6.s();
1272
+ _iterator9.s();
1139
1273
  case 4:
1140
- if ((_step6 = _iterator6.n()).done) {
1274
+ if ((_step9 = _iterator9.n()).done) {
1141
1275
  _context5.next = 7;
1142
1276
  break;
1143
1277
  }
1144
- _step6$value = _slicedToArray(_step6.value, 2), value = _step6$value[0], key = _step6$value[1];
1278
+ _step9$value = _slicedToArray(_step9.value, 2), value = _step9$value[0], key = _step9$value[1];
1145
1279
  _context5.next = 5;
1146
1280
  return asyncCallback.call(value, value, key);
1147
1281
  case 5:
@@ -1160,10 +1294,10 @@ var LeUtils = {
1160
1294
  case 8:
1161
1295
  _context5.prev = 8;
1162
1296
  _t0 = _context5["catch"](3);
1163
- _iterator6.e(_t0);
1297
+ _iterator9.e(_t0);
1164
1298
  case 9:
1165
1299
  _context5.prev = 9;
1166
- _iterator6.f();
1300
+ _iterator9.f();
1167
1301
  return _context5.finish(9);
1168
1302
  case 10:
1169
1303
  return _context5.abrupt("return", elements);
@@ -1317,11 +1451,11 @@ var LeUtils = {
1317
1451
  var optionalSkipHasOwnPropertyCheck = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1318
1452
  var keys = LeUtils.sortKeys(elements, comparator, optionalSkipHasOwnPropertyCheck);
1319
1453
  var result = [];
1320
- var _iterator7 = _createForOfIteratorHelper$1(keys),
1321
- _step7;
1454
+ var _iterator0 = _createForOfIteratorHelper$1(keys),
1455
+ _step0;
1322
1456
  try {
1323
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
1324
- var key = _step7.value;
1457
+ for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
1458
+ var key = _step0.value;
1325
1459
  var value = LeUtils.getValueAtIndex(elements, key, optionalSkipHasOwnPropertyCheck);
1326
1460
  if (!callback) {
1327
1461
  result.push(value);
@@ -1330,9 +1464,9 @@ var LeUtils = {
1330
1464
  }
1331
1465
  }
1332
1466
  } catch (err) {
1333
- _iterator7.e(err);
1467
+ _iterator0.e(err);
1334
1468
  } finally {
1335
- _iterator7.f();
1469
+ _iterator0.f();
1336
1470
  }
1337
1471
  return result;
1338
1472
  },
@@ -1590,7 +1724,7 @@ var LeUtils = {
1590
1724
  * @returns {{remove:Function}}
1591
1725
  */
1592
1726
  setTimeout: function setTimeout(callback, ms) {
1593
- var _performance$now, _performance, _performance$now2;
1727
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3;
1594
1728
  if (!(globalThis !== null && globalThis !== void 0 && globalThis.setTimeout) || !(globalThis !== null && globalThis !== void 0 && globalThis.clearTimeout)) {
1595
1729
  console.warn('LeUtils.setTimeout() called in an environment without globalThis.setTimeout, returning a no-op handler.');
1596
1730
  return {
@@ -1598,11 +1732,11 @@ var LeUtils = {
1598
1732
  };
1599
1733
  }
1600
1734
  ms = FLOAT_LAX(ms);
1601
- var lastTime = (_performance$now = (_performance = performance) === null || _performance === void 0 || (_performance$now2 = _performance.now) === null || _performance$now2 === void 0 ? void 0 : _performance$now2.call(_performance)) !== null && _performance$now !== void 0 ? _performance$now : 0;
1735
+ var lastTime = (_globalThis$performan = globalThis === null || globalThis === void 0 || (_globalThis$performan2 = globalThis.performance) === null || _globalThis$performan2 === void 0 || (_globalThis$performan3 = _globalThis$performan2.now) === null || _globalThis$performan3 === void 0 ? void 0 : _globalThis$performan3.call(_globalThis$performan2)) !== null && _globalThis$performan !== void 0 ? _globalThis$performan : 0;
1602
1736
  /** @type {number|null} */
1603
1737
  var handler = globalThis.setTimeout(function () {
1604
- var _performance$now3, _performance2, _performance2$now;
1605
- var currentTime = (_performance$now3 = (_performance2 = performance) === null || _performance2 === void 0 || (_performance2$now = _performance2.now) === null || _performance2$now === void 0 ? void 0 : _performance2$now.call(_performance2)) !== null && _performance$now3 !== void 0 ? _performance$now3 : 0;
1738
+ var _globalThis$performan4, _globalThis$performan5, _globalThis$performan6;
1739
+ var currentTime = (_globalThis$performan4 = globalThis === null || globalThis === void 0 || (_globalThis$performan5 = globalThis.performance) === null || _globalThis$performan5 === void 0 || (_globalThis$performan6 = _globalThis$performan5.now) === null || _globalThis$performan6 === void 0 ? void 0 : _globalThis$performan6.call(_globalThis$performan5)) !== null && _globalThis$performan4 !== void 0 ? _globalThis$performan4 : 0;
1606
1740
  try {
1607
1741
  callback((currentTime - lastTime) / 1000);
1608
1742
  } catch (e) {
@@ -1630,7 +1764,7 @@ var LeUtils = {
1630
1764
  * @returns {{remove:Function}}
1631
1765
  */
1632
1766
  setInterval: function setInterval(callback) {
1633
- var _performance$now4, _performance3, _performance3$now;
1767
+ var _globalThis$performan7, _globalThis$performan8, _globalThis$performan9;
1634
1768
  var intervalMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
1635
1769
  var fireImmediately = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1636
1770
  intervalMs = FLOAT_LAX_ANY(intervalMs, 1000);
@@ -1647,11 +1781,11 @@ var LeUtils = {
1647
1781
  remove: function remove() {}
1648
1782
  };
1649
1783
  }
1650
- var lastTime = (_performance$now4 = (_performance3 = performance) === null || _performance3 === void 0 || (_performance3$now = _performance3.now) === null || _performance3$now === void 0 ? void 0 : _performance3$now.call(_performance3)) !== null && _performance$now4 !== void 0 ? _performance$now4 : 0;
1784
+ var lastTime = (_globalThis$performan7 = globalThis === null || globalThis === void 0 || (_globalThis$performan8 = globalThis.performance) === null || _globalThis$performan8 === void 0 || (_globalThis$performan9 = _globalThis$performan8.now) === null || _globalThis$performan9 === void 0 ? void 0 : _globalThis$performan9.call(_globalThis$performan8)) !== null && _globalThis$performan7 !== void 0 ? _globalThis$performan7 : 0;
1651
1785
  /** @type {number|null} */
1652
1786
  var handler = globalThis.setInterval(function () {
1653
- var _performance$now5, _performance4, _performance4$now;
1654
- var currentTime = (_performance$now5 = (_performance4 = performance) === null || _performance4 === void 0 || (_performance4$now = _performance4.now) === null || _performance4$now === void 0 ? void 0 : _performance4$now.call(_performance4)) !== null && _performance$now5 !== void 0 ? _performance$now5 : 0;
1787
+ var _globalThis$performan0, _globalThis$performan1, _globalThis$performan10;
1788
+ var currentTime = (_globalThis$performan0 = globalThis === null || globalThis === void 0 || (_globalThis$performan1 = globalThis.performance) === null || _globalThis$performan1 === void 0 || (_globalThis$performan10 = _globalThis$performan1.now) === null || _globalThis$performan10 === void 0 ? void 0 : _globalThis$performan10.call(_globalThis$performan1)) !== null && _globalThis$performan0 !== void 0 ? _globalThis$performan0 : 0;
1655
1789
  try {
1656
1790
  callback((currentTime - lastTime) / 1000);
1657
1791
  } catch (e) {
@@ -1678,7 +1812,7 @@ var LeUtils = {
1678
1812
  * @returns {{remove:Function}}
1679
1813
  */
1680
1814
  setAnimationFrameTimeout: function setAnimationFrameTimeout(callback) {
1681
- var _performance$now6, _performance5, _performance5$now;
1815
+ var _globalThis$performan11, _globalThis$performan12, _globalThis$performan13;
1682
1816
  var frames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1683
1817
  if (!(globalThis !== null && globalThis !== void 0 && globalThis.requestAnimationFrame) || !(globalThis !== null && globalThis !== void 0 && globalThis.cancelAnimationFrame)) {
1684
1818
  console.warn('LeUtils.setAnimationFrameTimeout() called in an environment without globalThis.requestAnimationFrame, returning a no-op handler.');
@@ -1689,14 +1823,14 @@ var LeUtils = {
1689
1823
  frames = INT_LAX_ANY(frames, 1);
1690
1824
  var run = true;
1691
1825
  var requestAnimationFrameId = null;
1692
- var lastTime = (_performance$now6 = (_performance5 = performance) === null || _performance5 === void 0 || (_performance5$now = _performance5.now) === null || _performance5$now === void 0 ? void 0 : _performance5$now.call(_performance5)) !== null && _performance$now6 !== void 0 ? _performance$now6 : 0;
1826
+ var lastTime = (_globalThis$performan11 = globalThis === null || globalThis === void 0 || (_globalThis$performan12 = globalThis.performance) === null || _globalThis$performan12 === void 0 || (_globalThis$performan13 = _globalThis$performan12.now) === null || _globalThis$performan13 === void 0 ? void 0 : _globalThis$performan13.call(_globalThis$performan12)) !== null && _globalThis$performan11 !== void 0 ? _globalThis$performan11 : 0;
1693
1827
  var _tick = function tick() {
1694
1828
  if (run) {
1695
1829
  if (frames <= 0) {
1696
- var _performance$now7, _performance6, _performance6$now;
1830
+ var _globalThis$performan14, _globalThis$performan15, _globalThis$performan16;
1697
1831
  run = false;
1698
1832
  requestAnimationFrameId = null;
1699
- var currentTime = (_performance$now7 = (_performance6 = performance) === null || _performance6 === void 0 || (_performance6$now = _performance6.now) === null || _performance6$now === void 0 ? void 0 : _performance6$now.call(_performance6)) !== null && _performance$now7 !== void 0 ? _performance$now7 : 0;
1833
+ var currentTime = (_globalThis$performan14 = globalThis === null || globalThis === void 0 || (_globalThis$performan15 = globalThis.performance) === null || _globalThis$performan15 === void 0 || (_globalThis$performan16 = _globalThis$performan15.now) === null || _globalThis$performan16 === void 0 ? void 0 : _globalThis$performan16.call(_globalThis$performan15)) !== null && _globalThis$performan14 !== void 0 ? _globalThis$performan14 : 0;
1700
1834
  try {
1701
1835
  callback((currentTime - lastTime) / 1000);
1702
1836
  } catch (e) {
@@ -1731,7 +1865,7 @@ var LeUtils = {
1731
1865
  * @returns {{remove:Function}}
1732
1866
  */
1733
1867
  setAnimationFrameInterval: function setAnimationFrameInterval(callback) {
1734
- var _performance$now8, _performance7, _performance7$now;
1868
+ var _globalThis$performan17, _globalThis$performan18, _globalThis$performan19;
1735
1869
  var intervalFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1736
1870
  var fireImmediately = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1737
1871
  intervalFrames = INT_LAX_ANY(intervalFrames, 1);
@@ -1750,13 +1884,13 @@ var LeUtils = {
1750
1884
  }
1751
1885
  var run = true;
1752
1886
  var requestAnimationFrameId = null;
1753
- var lastTime = (_performance$now8 = (_performance7 = performance) === null || _performance7 === void 0 || (_performance7$now = _performance7.now) === null || _performance7$now === void 0 ? void 0 : _performance7$now.call(_performance7)) !== null && _performance$now8 !== void 0 ? _performance$now8 : 0;
1887
+ var lastTime = (_globalThis$performan17 = globalThis === null || globalThis === void 0 || (_globalThis$performan18 = globalThis.performance) === null || _globalThis$performan18 === void 0 || (_globalThis$performan19 = _globalThis$performan18.now) === null || _globalThis$performan19 === void 0 ? void 0 : _globalThis$performan19.call(_globalThis$performan18)) !== null && _globalThis$performan17 !== void 0 ? _globalThis$performan17 : 0;
1754
1888
  var frames = intervalFrames;
1755
1889
  var _tick2 = function tick() {
1756
1890
  if (run) {
1757
1891
  if (frames <= 0) {
1758
- var _performance$now9, _performance8, _performance8$now;
1759
- var currentTime = (_performance$now9 = (_performance8 = performance) === null || _performance8 === void 0 || (_performance8$now = _performance8.now) === null || _performance8$now === void 0 ? void 0 : _performance8$now.call(_performance8)) !== null && _performance$now9 !== void 0 ? _performance$now9 : 0;
1892
+ var _globalThis$performan20, _globalThis$performan21, _globalThis$performan22;
1893
+ var currentTime = (_globalThis$performan20 = globalThis === null || globalThis === void 0 || (_globalThis$performan21 = globalThis.performance) === null || _globalThis$performan21 === void 0 || (_globalThis$performan22 = _globalThis$performan21.now) === null || _globalThis$performan22 === void 0 ? void 0 : _globalThis$performan22.call(_globalThis$performan21)) !== null && _globalThis$performan20 !== void 0 ? _globalThis$performan20 : 0;
1760
1894
  try {
1761
1895
  callback((currentTime - lastTime) / 1000);
1762
1896
  } catch (e) {
@@ -2303,17 +2437,17 @@ var LeUtils = {
2303
2437
  if (string === '') {
2304
2438
  return '1';
2305
2439
  }
2306
- for (var _i6 = string.length - 1; _i6 >= 0; _i6--) {
2307
- var _c = string.charAt(_i6);
2440
+ for (var _i11 = string.length - 1; _i11 >= 0; _i11--) {
2441
+ var _c = string.charAt(_i11);
2308
2442
  if (_c < '0' || _c > '9') {
2309
2443
  return '1';
2310
2444
  }
2311
2445
  if (_c < '9') {
2312
2446
  _c = String.fromCharCode(_c.charCodeAt(0) + 1);
2313
- string = string.substring(0, _i6) + _c + string.substring(_i6 + 1); // string[i] = (char + 1);
2447
+ string = string.substring(0, _i11) + _c + string.substring(_i11 + 1); // string[i] = (char + 1);
2314
2448
  break;
2315
2449
  }
2316
- string = string.substring(0, _i6) + '0' + string.substring(_i6 + 1); // string[i] = '0';
2450
+ string = string.substring(0, _i11) + '0' + string.substring(_i11 + 1); // string[i] = '0';
2317
2451
  }
2318
2452
  if (string.charAt(0) === '0') {
2319
2453
  string = '1' + string;
@@ -2342,9 +2476,9 @@ var LeUtils = {
2342
2476
  var generateUniqueId = function generateUniqueId() {
2343
2477
  var now;
2344
2478
  try {
2345
- var _performance9, _performance0, _performance$now0, _performance1, _performance1$now;
2479
+ var _globalThis$performan23, _globalThis$performan24, _globalThis$performan25, _globalThis$performan26, _globalThis$performan27;
2346
2480
  // noinspection JSDeprecatedSymbols
2347
- now = (((_performance9 = performance) === null || _performance9 === void 0 ? void 0 : _performance9.timeOrigin) || ((_performance0 = performance) === null || _performance0 === void 0 || (_performance0 = _performance0.timing) === null || _performance0 === void 0 ? void 0 : _performance0.navigationStart) || 0) + ((_performance$now0 = (_performance1 = performance) === null || _performance1 === void 0 || (_performance1$now = _performance1.now) === null || _performance1$now === void 0 ? void 0 : _performance1$now.call(_performance1)) !== null && _performance$now0 !== void 0 ? _performance$now0 : 0);
2481
+ now = ((globalThis === null || globalThis === void 0 || (_globalThis$performan23 = globalThis.performance) === null || _globalThis$performan23 === void 0 ? void 0 : _globalThis$performan23.timeOrigin) || (globalThis === null || globalThis === void 0 || (_globalThis$performan24 = globalThis.performance) === null || _globalThis$performan24 === void 0 || (_globalThis$performan24 = _globalThis$performan24.timing) === null || _globalThis$performan24 === void 0 ? void 0 : _globalThis$performan24.navigationStart) || 0) + ((_globalThis$performan25 = globalThis === null || globalThis === void 0 || (_globalThis$performan26 = globalThis.performance) === null || _globalThis$performan26 === void 0 || (_globalThis$performan27 = _globalThis$performan26.now) === null || _globalThis$performan27 === void 0 ? void 0 : _globalThis$performan27.call(_globalThis$performan26)) !== null && _globalThis$performan25 !== void 0 ? _globalThis$performan25 : 0);
2348
2482
  } catch (e) {}
2349
2483
  now = now || (Date.now ? Date.now() : new Date().getTime());
2350
2484
  now = Math.round(now);
@@ -2415,9 +2549,9 @@ var LeUtils = {
2415
2549
  now = FLOAT_LAX(now);
2416
2550
  } else {
2417
2551
  try {
2418
- var _performance10, _performance11, _performance$now1, _performance12, _performance12$now;
2552
+ var _performance, _performance2, _performance$now, _performance3, _performance3$now;
2419
2553
  // noinspection JSDeprecatedSymbols
2420
- now = (((_performance10 = performance) === null || _performance10 === void 0 ? void 0 : _performance10.timeOrigin) || ((_performance11 = performance) === null || _performance11 === void 0 || (_performance11 = _performance11.timing) === null || _performance11 === void 0 ? void 0 : _performance11.navigationStart) || 0) + ((_performance$now1 = (_performance12 = performance) === null || _performance12 === void 0 || (_performance12$now = _performance12.now) === null || _performance12$now === void 0 ? void 0 : _performance12$now.call(_performance12)) !== null && _performance$now1 !== void 0 ? _performance$now1 : 0);
2554
+ now = (((_performance = performance) === null || _performance === void 0 ? void 0 : _performance.timeOrigin) || ((_performance2 = performance) === null || _performance2 === void 0 || (_performance2 = _performance2.timing) === null || _performance2 === void 0 ? void 0 : _performance2.navigationStart) || 0) + ((_performance$now = (_performance3 = performance) === null || _performance3 === void 0 || (_performance3$now = _performance3.now) === null || _performance3$now === void 0 ? void 0 : _performance3$now.call(_performance3)) !== null && _performance$now !== void 0 ? _performance$now : 0);
2421
2555
  } catch (e) {}
2422
2556
  now = now || (Date.now ? Date.now() : new Date().getTime());
2423
2557
  }