billboard.js 3.9.0 → 3.9.1

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 (41) hide show
  1. package/README.md +5 -1
  2. package/dist/billboard.css +1 -1
  3. package/dist/billboard.js +100 -83
  4. package/dist/billboard.min.css +1 -1
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +340 -192
  7. package/dist/billboard.pkgd.min.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +3 -3
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +3 -3
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +242 -111
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +243 -112
  20. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +242 -111
  21. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +243 -112
  22. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +242 -111
  23. package/dist/theme/dark.css +1 -1
  24. package/dist/theme/dark.min.css +1 -1
  25. package/dist/theme/datalab.css +1 -1
  26. package/dist/theme/datalab.min.css +1 -1
  27. package/dist/theme/graph.css +1 -1
  28. package/dist/theme/graph.min.css +1 -1
  29. package/dist/theme/insight.css +1 -1
  30. package/dist/theme/insight.min.css +1 -1
  31. package/dist-esm/billboard.js +71 -54
  32. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  34. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  35. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  36. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  37. package/package.json +23 -23
  38. package/src/ChartInternal/data/data.ts +2 -12
  39. package/src/ChartInternal/interactions/eventrect.ts +7 -4
  40. package/src/ChartInternal/internals/tooltip.ts +55 -41
  41. package/src/ChartInternal/shape/point.ts +20 -2
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.9.0
8
+ * @version 3.9.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -1165,10 +1165,10 @@ var store = __webpack_require__(37);
1165
1165
  (module.exports = function (key, value) {
1166
1166
  return store[key] || (store[key] = value !== undefined ? value : {});
1167
1167
  })('versions', []).push({
1168
- version: '3.31.0',
1168
+ version: '3.31.1',
1169
1169
  mode: IS_PURE ? 'pure' : 'global',
1170
1170
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
1171
- license: 'https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE',
1171
+ license: 'https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE',
1172
1172
  source: 'https://github.com/zloirock/core-js'
1173
1173
  });
1174
1174
 
@@ -2949,7 +2949,6 @@ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
2949
2949
  };
2950
2950
 
2951
2951
  // https://tc39.es/ecma262/#sec-nativeerror
2952
- // https://github.com/tc39/proposal-error-cause
2953
2952
  exportGlobalErrorCauseWrapper('Error', function (init) {
2954
2953
  return function Error(message) { return apply(init, this, arguments); };
2955
2954
  });
@@ -3581,7 +3580,7 @@ var FORCED = !fails(function () {
3581
3580
  return $AggregateError([1], AGGREGATE_ERROR, { cause: 7 }).cause !== 7;
3582
3581
  });
3583
3582
 
3584
- // https://github.com/tc39/proposal-error-cause
3583
+ // https://tc39.es/ecma262/#sec-aggregate-error
3585
3584
  $({ global: true, constructor: true, arity: 2, forced: FORCED }, {
3586
3585
  AggregateError: wrapErrorConstructorWithCause(AGGREGATE_ERROR, function (init) {
3587
3586
  // eslint-disable-next-line no-unused-vars -- required for functions `.length`
@@ -3603,7 +3602,7 @@ var toIntegerOrInfinity = __webpack_require__(62);
3603
3602
  var addToUnscopables = __webpack_require__(140);
3604
3603
 
3605
3604
  // `Array.prototype.at` method
3606
- // https://github.com/tc39/proposal-relative-indexing-method
3605
+ // https://tc39.es/ecma262/#sec-array.prototype.at
3607
3606
  $({ target: 'Array', proto: true }, {
3608
3607
  at: function at(index) {
3609
3608
  var O = toObject(this);
@@ -3988,7 +3987,7 @@ var $findLast = (__webpack_require__(155).findLast);
3988
3987
  var addToUnscopables = __webpack_require__(140);
3989
3988
 
3990
3989
  // `Array.prototype.findLast` method
3991
- // https://github.com/tc39/proposal-array-find-from-last
3990
+ // https://tc39.es/ecma262/#sec-array.prototype.findlast
3992
3991
  $({ target: 'Array', proto: true }, {
3993
3992
  findLast: function findLast(callbackfn /* , that = undefined */) {
3994
3993
  return $findLast(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
@@ -4049,7 +4048,7 @@ var $findLastIndex = (__webpack_require__(155).findLastIndex);
4049
4048
  var addToUnscopables = __webpack_require__(140);
4050
4049
 
4051
4050
  // `Array.prototype.findLastIndex` method
4052
- // https://github.com/tc39/proposal-array-find-from-last
4051
+ // https://tc39.es/ecma262/#sec-array.prototype.findlastindex
4053
4052
  $({ target: 'Array', proto: true }, {
4054
4053
  findLastIndex: function findLastIndex(callbackfn /* , that = undefined */) {
4055
4054
  return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
@@ -5408,7 +5407,7 @@ var addToUnscopables = __webpack_require__(140);
5408
5407
  var $Array = Array;
5409
5408
 
5410
5409
  // `Array.prototype.toReversed` method
5411
- // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
5410
+ // https://tc39.es/ecma262/#sec-array.prototype.toreversed
5412
5411
  $({ target: 'Array', proto: true }, {
5413
5412
  toReversed: function toReversed() {
5414
5413
  return arrayToReversed(toIndexedObject(this), $Array);
@@ -5453,7 +5452,7 @@ var $Array = Array;
5453
5452
  var sort = uncurryThis(getVirtual('Array').sort);
5454
5453
 
5455
5454
  // `Array.prototype.toSorted` method
5456
- // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toSorted
5455
+ // https://tc39.es/ecma262/#sec-array.prototype.tosorted
5457
5456
  $({ target: 'Array', proto: true }, {
5458
5457
  toSorted: function toSorted(compareFn) {
5459
5458
  if (compareFn !== undefined) aCallable(compareFn);
@@ -5511,7 +5510,7 @@ var max = Math.max;
5511
5510
  var min = Math.min;
5512
5511
 
5513
5512
  // `Array.prototype.toSpliced` method
5514
- // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toSpliced
5513
+ // https://tc39.es/ecma262/#sec-array.prototype.tospliced
5515
5514
  $({ target: 'Array', proto: true }, {
5516
5515
  toSpliced: function toSpliced(start, deleteCount /* , ...items */) {
5517
5516
  var O = toIndexedObject(this);
@@ -5632,7 +5631,7 @@ var toIndexedObject = __webpack_require__(12);
5632
5631
  var $Array = Array;
5633
5632
 
5634
5633
  // `Array.prototype.with` method
5635
- // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with
5634
+ // https://tc39.es/ecma262/#sec-array.prototype.with
5636
5635
  $({ target: 'Array', proto: true }, {
5637
5636
  'with': function (index, value) {
5638
5637
  return arrayWith(toIndexedObject(this), $Array, index, value);
@@ -5773,23 +5772,25 @@ var addGetter = function (Constructor, key, getInternalState) {
5773
5772
  };
5774
5773
 
5775
5774
  var get = function (view, count, index, isLittleEndian) {
5776
- var intIndex = toIndex(index);
5777
5775
  var store = getInternalDataViewState(view);
5776
+ var intIndex = toIndex(index);
5777
+ var boolIsLittleEndian = !!isLittleEndian;
5778
5778
  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
5779
5779
  var bytes = store.bytes;
5780
5780
  var start = intIndex + store.byteOffset;
5781
5781
  var pack = arraySlice(bytes, start, start + count);
5782
- return isLittleEndian ? pack : reverse(pack);
5782
+ return boolIsLittleEndian ? pack : reverse(pack);
5783
5783
  };
5784
5784
 
5785
5785
  var set = function (view, count, index, conversion, value, isLittleEndian) {
5786
- var intIndex = toIndex(index);
5787
5786
  var store = getInternalDataViewState(view);
5787
+ var intIndex = toIndex(index);
5788
+ var pack = conversion(+value);
5789
+ var boolIsLittleEndian = !!isLittleEndian;
5788
5790
  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
5789
5791
  var bytes = store.bytes;
5790
5792
  var start = intIndex + store.byteOffset;
5791
- var pack = conversion(+value);
5792
- for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
5793
+ for (var i = 0; i < count; i++) bytes[start + i] = pack[boolIsLittleEndian ? i : count - i - 1];
5793
5794
  };
5794
5795
 
5795
5796
  if (!NATIVE_ARRAY_BUFFER) {
@@ -5849,24 +5850,24 @@ if (!NATIVE_ARRAY_BUFFER) {
5849
5850
  return get(this, 1, byteOffset)[0];
5850
5851
  },
5851
5852
  getInt16: function getInt16(byteOffset /* , littleEndian */) {
5852
- var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
5853
+ var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);
5853
5854
  return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
5854
5855
  },
5855
5856
  getUint16: function getUint16(byteOffset /* , littleEndian */) {
5856
- var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
5857
+ var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);
5857
5858
  return bytes[1] << 8 | bytes[0];
5858
5859
  },
5859
5860
  getInt32: function getInt32(byteOffset /* , littleEndian */) {
5860
- return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
5861
+ return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false));
5861
5862
  },
5862
5863
  getUint32: function getUint32(byteOffset /* , littleEndian */) {
5863
- return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
5864
+ return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false)) >>> 0;
5864
5865
  },
5865
5866
  getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
5866
- return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
5867
+ return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false), 23);
5867
5868
  },
5868
5869
  getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
5869
- return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
5870
+ return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : false), 52);
5870
5871
  },
5871
5872
  setInt8: function setInt8(byteOffset, value) {
5872
5873
  set(this, 1, byteOffset, packInt8, value);
@@ -5875,22 +5876,22 @@ if (!NATIVE_ARRAY_BUFFER) {
5875
5876
  set(this, 1, byteOffset, packInt8, value);
5876
5877
  },
5877
5878
  setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
5878
- set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
5879
+ set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);
5879
5880
  },
5880
5881
  setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
5881
- set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
5882
+ set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);
5882
5883
  },
5883
5884
  setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
5884
- set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
5885
+ set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);
5885
5886
  },
5886
5887
  setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
5887
- set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
5888
+ set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);
5888
5889
  },
5889
5890
  setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
5890
- set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
5891
+ set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : false);
5891
5892
  },
5892
5893
  setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
5893
- set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
5894
+ set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : false);
5894
5895
  }
5895
5896
  });
5896
5897
  } else {
@@ -8979,7 +8980,7 @@ var $ = __webpack_require__(3);
8979
8980
  var hasOwn = __webpack_require__(39);
8980
8981
 
8981
8982
  // `Object.hasOwn` method
8982
- // https://github.com/tc39/proposal-accessible-object-hasownproperty
8983
+ // https://tc39.es/ecma262/#sec-object.hasown
8983
8984
  $({ target: 'Object', stat: true }, {
8984
8985
  hasOwn: hasOwn
8985
8986
  });
@@ -11489,7 +11490,7 @@ var FORCED = fails(function () {
11489
11490
  });
11490
11491
 
11491
11492
  // `String.prototype.at` method
11492
- // https://github.com/tc39/proposal-relative-indexing-method
11493
+ // https://tc39.es/ecma262/#sec-string.prototype.at
11493
11494
  $({ target: 'String', proto: true, forced: FORCED }, {
11494
11495
  at: function at(index) {
11495
11496
  var S = toString(requireObjectCoercible(this));
@@ -13729,7 +13730,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
13729
13730
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13730
13731
 
13731
13732
  // `%TypedArray%.prototype.at` method
13732
- // https://github.com/tc39/proposal-relative-indexing-method
13733
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
13733
13734
  exportTypedArrayMethod('at', function at(index) {
13734
13735
  var O = aTypedArray(this);
13735
13736
  var len = lengthOfArrayLike(O);
@@ -13916,7 +13917,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
13916
13917
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13917
13918
 
13918
13919
  // `%TypedArray%.prototype.findLast` method
13919
- // https://github.com/tc39/proposal-array-find-from-last
13920
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlast
13920
13921
  exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {
13921
13922
  return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13922
13923
  });
@@ -13935,7 +13936,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
13935
13936
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
13936
13937
 
13937
13938
  // `%TypedArray%.prototype.findLastIndex` method
13938
- // https://github.com/tc39/proposal-array-find-from-last
13939
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlastindex
13939
13940
  exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {
13940
13941
  return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
13941
13942
  });
@@ -14481,7 +14482,7 @@ var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
14481
14482
  var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;
14482
14483
 
14483
14484
  // `%TypedArray%.prototype.toReversed` method
14484
- // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
14485
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed
14485
14486
  exportTypedArrayMethod('toReversed', function toReversed() {
14486
14487
  return arrayToReversed(aTypedArray(this), getTypedArrayConstructor(this));
14487
14488
  });
@@ -14504,7 +14505,7 @@ var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
14504
14505
  var sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);
14505
14506
 
14506
14507
  // `%TypedArray%.prototype.toSorted` method
14507
- // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted
14508
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted
14508
14509
  exportTypedArrayMethod('toSorted', function toSorted(compareFn) {
14509
14510
  if (compareFn !== undefined) aCallable(compareFn);
14510
14511
  var O = aTypedArray(this);
@@ -14570,7 +14571,7 @@ var PROPER_ORDER = !!function () {
14570
14571
  }();
14571
14572
 
14572
14573
  // `%TypedArray%.prototype.with` method
14573
- // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with
14574
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.with
14574
14575
  exportTypedArrayMethod('with', { 'with': function (index, value) {
14575
14576
  var O = aTypedArray(this);
14576
14577
  var relativeIndex = toIntegerOrInfinity(index);
@@ -15774,7 +15775,61 @@ var createDataTransfer = function () {
15774
15775
  return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;
15775
15776
  };
15776
15777
 
15777
- var structuredCloneInternal = function (value, map) {
15778
+ var cloneBuffer = function (value, map, $type) {
15779
+ if (mapHas(map, value)) return mapGet(map, value);
15780
+
15781
+ var type = $type || classof(value);
15782
+ var clone, length, options, source, target, i;
15783
+
15784
+ if (type === 'SharedArrayBuffer') {
15785
+ if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value);
15786
+ // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
15787
+ else clone = value;
15788
+ } else {
15789
+ var DataView = global.DataView;
15790
+
15791
+ // `ArrayBuffer#slice` is not available in IE10
15792
+ // `ArrayBuffer#slice` and `DataView` are not available in old FF
15793
+ if (!DataView && typeof value.slice != 'function') throwUnpolyfillable('ArrayBuffer');
15794
+ // detached buffers throws in `DataView` and `.slice`
15795
+ try {
15796
+ if (typeof value.slice == 'function' && !value.resizable) {
15797
+ clone = value.slice(0);
15798
+ } else {
15799
+ length = value.byteLength;
15800
+ options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
15801
+ clone = new ArrayBuffer(length, options);
15802
+ source = new DataView(value);
15803
+ target = new DataView(clone);
15804
+ for (i = 0; i < length; i++) {
15805
+ target.setUint8(i, source.getUint8(i));
15806
+ }
15807
+ }
15808
+ } catch (error) {
15809
+ throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
15810
+ }
15811
+ }
15812
+
15813
+ mapSet(map, value, clone);
15814
+
15815
+ return clone;
15816
+ };
15817
+
15818
+ var cloneView = function (value, type, offset, length, map) {
15819
+ var C = global[type];
15820
+ // in some old engines like Safari 9, typeof C is 'object'
15821
+ // on Uint8ClampedArray or some other constructors
15822
+ if (!isObject(C)) throwUnpolyfillable(type);
15823
+ return new C(cloneBuffer(value.buffer, map), offset, length);
15824
+ };
15825
+
15826
+ var Placeholder = function (object, type, metadata) {
15827
+ this.object = object;
15828
+ this.type = type;
15829
+ this.metadata = metadata;
15830
+ };
15831
+
15832
+ var structuredCloneInternal = function (value, map, transferredBuffers) {
15778
15833
  if (isSymbol(value)) throwUncloneable('Symbol');
15779
15834
  if (!isObject(value)) return value;
15780
15835
  // effectively preserves circular references
@@ -15783,25 +15838,20 @@ var structuredCloneInternal = function (value, map) {
15783
15838
  } else map = new Map();
15784
15839
 
15785
15840
  var type = classof(value);
15786
- var deep = false;
15787
- var C, name, cloned, dataTransfer, i, length, keys, key, source, target, options;
15841
+ var C, name, cloned, dataTransfer, i, length, keys, key;
15788
15842
 
15789
15843
  switch (type) {
15790
15844
  case 'Array':
15791
15845
  cloned = Array(lengthOfArrayLike(value));
15792
- deep = true;
15793
15846
  break;
15794
15847
  case 'Object':
15795
15848
  cloned = {};
15796
- deep = true;
15797
15849
  break;
15798
15850
  case 'Map':
15799
15851
  cloned = new Map();
15800
- deep = true;
15801
15852
  break;
15802
15853
  case 'Set':
15803
15854
  cloned = new Set();
15804
- deep = true;
15805
15855
  break;
15806
15856
  case 'RegExp':
15807
15857
  // in this block because of a Safari 14.1 bug
@@ -15844,11 +15894,15 @@ var structuredCloneInternal = function (value, map) {
15844
15894
  default:
15845
15895
  cloned = Error();
15846
15896
  }
15847
- deep = true;
15848
15897
  break;
15849
15898
  case 'DOMException':
15850
15899
  cloned = new DOMException(value.message, value.name);
15851
- deep = true;
15900
+ break;
15901
+ case 'ArrayBuffer':
15902
+ case 'SharedArrayBuffer':
15903
+ cloned = transferredBuffers
15904
+ ? new Placeholder(value, type)
15905
+ : cloneBuffer(value, map, type);
15852
15906
  break;
15853
15907
  case 'DataView':
15854
15908
  case 'Int8Array':
@@ -15858,28 +15912,23 @@ var structuredCloneInternal = function (value, map) {
15858
15912
  case 'Uint16Array':
15859
15913
  case 'Int32Array':
15860
15914
  case 'Uint32Array':
15915
+ case 'Float16Array':
15861
15916
  case 'Float32Array':
15862
15917
  case 'Float64Array':
15863
15918
  case 'BigInt64Array':
15864
15919
  case 'BigUint64Array':
15865
- C = global[type];
15866
- // in some old engines like Safari 9, typeof C is 'object'
15867
- // on Uint8ClampedArray or some other constructors
15868
- if (!isObject(C)) throwUnpolyfillable(type);
15869
- cloned = new C(
15870
- // this is safe, since arraybuffer cannot have circular references
15871
- structuredCloneInternal(value.buffer, map),
15872
- value.byteOffset,
15873
- type === 'DataView' ? value.byteLength : value.length
15874
- );
15920
+ length = type === 'DataView' ? value.byteLength : value.length;
15921
+ cloned = transferredBuffers
15922
+ ? new Placeholder(value, type, { offset: value.byteOffset, length: length })
15923
+ : cloneView(value, type, value.byteOffset, length, map);
15875
15924
  break;
15876
15925
  case 'DOMQuad':
15877
15926
  try {
15878
15927
  cloned = new DOMQuad(
15879
- structuredCloneInternal(value.p1, map),
15880
- structuredCloneInternal(value.p2, map),
15881
- structuredCloneInternal(value.p3, map),
15882
- structuredCloneInternal(value.p4, map)
15928
+ structuredCloneInternal(value.p1, map, transferredBuffers),
15929
+ structuredCloneInternal(value.p2, map, transferredBuffers),
15930
+ structuredCloneInternal(value.p3, map, transferredBuffers),
15931
+ structuredCloneInternal(value.p4, map, transferredBuffers)
15883
15932
  );
15884
15933
  } catch (error) {
15885
15934
  cloned = tryNativeRestrictedStructuredClone(value, type);
@@ -15900,7 +15949,7 @@ var structuredCloneInternal = function (value, map) {
15900
15949
  dataTransfer = createDataTransfer();
15901
15950
  if (dataTransfer) {
15902
15951
  for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
15903
- dataTransfer.items.add(structuredCloneInternal(value[i], map));
15952
+ dataTransfer.items.add(structuredCloneInternal(value[i], map, transferredBuffers));
15904
15953
  }
15905
15954
  cloned = dataTransfer.files;
15906
15955
  } else cloned = tryNativeRestrictedStructuredClone(value, type);
@@ -15909,7 +15958,7 @@ var structuredCloneInternal = function (value, map) {
15909
15958
  // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
15910
15959
  try {
15911
15960
  cloned = new ImageData(
15912
- structuredCloneInternal(value.data, map),
15961
+ structuredCloneInternal(value.data, map, transferredBuffers),
15913
15962
  value.width,
15914
15963
  value.height,
15915
15964
  { colorSpace: value.colorSpace }
@@ -15937,32 +15986,6 @@ var structuredCloneInternal = function (value, map) {
15937
15986
  case 'Date':
15938
15987
  cloned = new Date(thisTimeValue(value));
15939
15988
  break;
15940
- case 'ArrayBuffer':
15941
- C = global.DataView;
15942
- // `ArrayBuffer#slice` is not available in IE10
15943
- // `ArrayBuffer#slice` and `DataView` are not available in old FF
15944
- if (!C && typeof value.slice != 'function') throwUnpolyfillable(type);
15945
- // detached buffers throws in `DataView` and `.slice`
15946
- try {
15947
- if (typeof value.slice == 'function' && !value.resizable) {
15948
- cloned = value.slice(0);
15949
- } else {
15950
- length = value.byteLength;
15951
- options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
15952
- cloned = new ArrayBuffer(length, options);
15953
- source = new C(value);
15954
- target = new C(cloned);
15955
- for (i = 0; i < length; i++) {
15956
- target.setUint8(i, source.getUint8(i));
15957
- }
15958
- }
15959
- } catch (error) {
15960
- throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
15961
- } break;
15962
- case 'SharedArrayBuffer':
15963
- // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
15964
- cloned = value;
15965
- break;
15966
15989
  case 'Blob':
15967
15990
  try {
15968
15991
  cloned = value.slice(0, value.size, value.type);
@@ -16026,41 +16049,111 @@ var structuredCloneInternal = function (value, map) {
16026
16049
 
16027
16050
  mapSet(map, value, cloned);
16028
16051
 
16029
- if (deep) switch (type) {
16052
+ switch (type) {
16030
16053
  case 'Array':
16031
16054
  case 'Object':
16032
16055
  keys = objectKeys(value);
16033
16056
  for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
16034
16057
  key = keys[i];
16035
- createProperty(cloned, key, structuredCloneInternal(value[key], map));
16058
+ createProperty(cloned, key, structuredCloneInternal(value[key], map, transferredBuffers));
16036
16059
  } break;
16037
16060
  case 'Map':
16038
16061
  value.forEach(function (v, k) {
16039
- mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
16062
+ mapSet(cloned, structuredCloneInternal(k, map, transferredBuffers), structuredCloneInternal(v, map, transferredBuffers));
16040
16063
  });
16041
16064
  break;
16042
16065
  case 'Set':
16043
16066
  value.forEach(function (v) {
16044
- setAdd(cloned, structuredCloneInternal(v, map));
16067
+ setAdd(cloned, structuredCloneInternal(v, map, transferredBuffers));
16045
16068
  });
16046
16069
  break;
16047
16070
  case 'Error':
16048
- createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
16071
+ createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map, transferredBuffers));
16049
16072
  if (hasOwn(value, 'cause')) {
16050
- createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
16073
+ createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map, transferredBuffers));
16051
16074
  }
16052
16075
  if (name == 'AggregateError') {
16053
- cloned.errors = structuredCloneInternal(value.errors, map);
16076
+ cloned.errors = structuredCloneInternal(value.errors, map, transferredBuffers);
16054
16077
  } // break omitted
16055
16078
  case 'DOMException':
16056
16079
  if (ERROR_STACK_INSTALLABLE) {
16057
- createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
16080
+ createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map, transferredBuffers));
16058
16081
  }
16059
16082
  }
16060
16083
 
16061
16084
  return cloned;
16062
16085
  };
16063
16086
 
16087
+ var replacePlaceholders = function (value, map) {
16088
+ if (!isObject(value)) return value;
16089
+ if (mapHas(map, value)) return mapGet(map, value);
16090
+
16091
+ var type, object, metadata, i, length, keys, key, replacement;
16092
+
16093
+ if (value instanceof Placeholder) {
16094
+ type = value.type;
16095
+ object = value.object;
16096
+
16097
+ switch (type) {
16098
+ case 'ArrayBuffer':
16099
+ case 'SharedArrayBuffer':
16100
+ replacement = cloneBuffer(object, map, type);
16101
+ break;
16102
+ case 'DataView':
16103
+ case 'Int8Array':
16104
+ case 'Uint8Array':
16105
+ case 'Uint8ClampedArray':
16106
+ case 'Int16Array':
16107
+ case 'Uint16Array':
16108
+ case 'Int32Array':
16109
+ case 'Uint32Array':
16110
+ case 'Float16Array':
16111
+ case 'Float32Array':
16112
+ case 'Float64Array':
16113
+ case 'BigInt64Array':
16114
+ case 'BigUint64Array':
16115
+ metadata = value.metadata;
16116
+ replacement = cloneView(object, type, metadata.offset, metadata.length, map);
16117
+ }
16118
+ } else switch (classof(value)) {
16119
+ case 'Array':
16120
+ case 'Object':
16121
+ keys = objectKeys(value);
16122
+ for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
16123
+ key = keys[i];
16124
+ value[key] = replacePlaceholders(value[key], map);
16125
+ } break;
16126
+ case 'Map':
16127
+ replacement = new Map();
16128
+ value.forEach(function (v, k) {
16129
+ mapSet(replacement, replacePlaceholders(k, map), replacePlaceholders(v, map));
16130
+ });
16131
+ break;
16132
+ case 'Set':
16133
+ replacement = new Set();
16134
+ value.forEach(function (v) {
16135
+ setAdd(replacement, replacePlaceholders(v, map));
16136
+ });
16137
+ break;
16138
+ case 'Error':
16139
+ value.message = replacePlaceholders(value.message, map);
16140
+ if (hasOwn(value, 'cause')) {
16141
+ value.cause = replacePlaceholders(value.cause, map);
16142
+ }
16143
+ if (value.name == 'AggregateError') {
16144
+ value.errors = replacePlaceholders(value.errors, map);
16145
+ } // break omitted
16146
+ case 'DOMException':
16147
+ if (ERROR_STACK_INSTALLABLE) {
16148
+ value.stack = replacePlaceholders(value.stack, map);
16149
+ }
16150
+ }
16151
+
16152
+ mapSet(map, value, replacement || value);
16153
+
16154
+ return replacement || value;
16155
+ };
16156
+
16064
16157
  var tryToTransfer = function (rawTransfer, map) {
16065
16158
  if (!isObject(rawTransfer)) throw TypeError('Transfer option cannot be converted to a sequence');
16066
16159
 
@@ -16072,18 +16165,24 @@ var tryToTransfer = function (rawTransfer, map) {
16072
16165
 
16073
16166
  var i = 0;
16074
16167
  var length = lengthOfArrayLike(transfer);
16075
- var value, type, C, transferredArray, transferred, canvas, context;
16168
+ var buffers = [];
16169
+ var value, type, C, transferred, canvas, context;
16076
16170
 
16077
- if (PROPER_TRANSFER) {
16078
- transferredArray = nativeStructuredClone(transfer, { transfer: transfer });
16079
- while (i < length) mapSet(map, transfer[i], transferredArray[i++]);
16080
- } else while (i < length) {
16171
+ while (i < length) {
16081
16172
  value = transfer[i++];
16082
- if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
16083
16173
 
16084
16174
  type = classof(value);
16085
16175
 
16086
- switch (type) {
16176
+ if (type === 'ArrayBuffer') {
16177
+ push(buffers, value);
16178
+ continue;
16179
+ }
16180
+
16181
+ if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
16182
+
16183
+ if (PROPER_TRANSFER) {
16184
+ transferred = nativeStructuredClone(value, { transfer: [value] });
16185
+ } else switch (type) {
16087
16186
  case 'ImageBitmap':
16088
16187
  C = global.OffscreenCanvas;
16089
16188
  if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
@@ -16102,10 +16201,6 @@ var tryToTransfer = function (rawTransfer, map) {
16102
16201
  value.close();
16103
16202
  } catch (error) { /* empty */ }
16104
16203
  break;
16105
- case 'ArrayBuffer':
16106
- if (!isCallable(value.transfer)) throwUnpolyfillable(type, TRANSFERRING);
16107
- transferred = value.transfer();
16108
- break;
16109
16204
  case 'MediaSourceHandle':
16110
16205
  case 'MessagePort':
16111
16206
  case 'OffscreenCanvas':
@@ -16116,6 +16211,30 @@ var tryToTransfer = function (rawTransfer, map) {
16116
16211
  }
16117
16212
 
16118
16213
  if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);
16214
+
16215
+ mapSet(map, value, transferred);
16216
+ }
16217
+
16218
+ return buffers;
16219
+ };
16220
+
16221
+ var tryToTransferBuffers = function (transfer, map) {
16222
+ var i = 0;
16223
+ var length = lengthOfArrayLike(transfer);
16224
+ var value, transferred;
16225
+
16226
+ while (i < length) {
16227
+ value = transfer[i++];
16228
+
16229
+ if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
16230
+
16231
+ if (PROPER_TRANSFER) {
16232
+ transferred = nativeStructuredClone(value, { transfer: [value] });
16233
+ } else {
16234
+ if (!isCallable(value.transfer)) throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
16235
+ transferred = value.transfer();
16236
+ }
16237
+
16119
16238
  mapSet(map, value, transferred);
16120
16239
  }
16121
16240
  };
@@ -16126,14 +16245,26 @@ $({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLA
16126
16245
  structuredClone: function structuredClone(value /* , { transfer } */) {
16127
16246
  var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
16128
16247
  var transfer = options ? options.transfer : undefined;
16129
- var map;
16248
+ var transferredBuffers = false;
16249
+ var map, buffers;
16130
16250
 
16131
16251
  if (transfer !== undefined) {
16132
16252
  map = new Map();
16133
- tryToTransfer(transfer, map);
16253
+ buffers = tryToTransfer(transfer, map);
16254
+ transferredBuffers = !!lengthOfArrayLike(buffers);
16255
+ }
16256
+
16257
+ var clone = structuredCloneInternal(value, map, transferredBuffers);
16258
+
16259
+ // since of an issue with cloning views of transferred buffers, we a forced to transfer / clone them in 2 steps
16260
+ // https://github.com/zloirock/core-js/issues/1265
16261
+ if (transferredBuffers) {
16262
+ map = new Map();
16263
+ tryToTransferBuffers(transfer, map);
16264
+ clone = replacePlaceholders(clone, map);
16134
16265
  }
16135
16266
 
16136
- return structuredCloneInternal(value, map);
16267
+ return clone;
16137
16268
  }
16138
16269
  });
16139
16270
 
@@ -18797,7 +18928,7 @@ var Plugin = /*#__PURE__*/function () {
18797
18928
  };
18798
18929
  return Plugin;
18799
18930
  }();
18800
- Plugin.version = "3.9.0";
18931
+ Plugin.version = "3.9.1";
18801
18932
 
18802
18933
  ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
18803
18934
  /**
@@ -23369,7 +23500,7 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
23369
23500
  $$ = this.$$,
23370
23501
  index = $$.getDataIndexFromEvent(e),
23371
23502
  data = (_$$$api$data = $$.api.data(e.target.__id)) == null ? void 0 : _$$$api$data[0],
23372
- d = data == null ? void 0 : (_data$values = data.values) == null ? void 0 : _data$values[index];
23503
+ d = data == null || (_data$values = data.values) == null ? void 0 : _data$values[index];
23373
23504
  if (d && !d.name) {
23374
23505
  d.name = d.id;
23375
23506
  }