@visactor/vchart 1.13.22-alpha.4 → 1.13.23-alpha.0

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/build/index.es.js CHANGED
@@ -430,10 +430,7 @@ var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
430
430
  const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
431
431
  var isType$1 = isType;
432
432
 
433
- const isBoolean = function (value) {
434
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
435
- return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
436
- };
433
+ const isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
437
434
  var isBoolean$1 = isBoolean;
438
435
 
439
436
  const isFunction = value => "function" == typeof value;
@@ -466,8 +463,7 @@ var isPlainObject$1 = isPlainObject;
466
463
  const isUndefined = value => void 0 === value;
467
464
  var isUndefined$1 = isUndefined;
468
465
 
469
- const isString = function (value) {
470
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
466
+ const isString = (value, fuzzy = !1) => {
471
467
  const type = typeof value;
472
468
  return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
473
469
  };
@@ -484,8 +480,7 @@ var isArrayLike$1 = isArrayLike;
484
480
  const isDate = value => isType$1(value, "Date");
485
481
  var isDate$1 = isDate;
486
482
 
487
- const isNumber = function (value) {
488
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
483
+ const isNumber = (value, fuzzy = !1) => {
489
484
  const type = typeof value;
490
485
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
491
486
  };
@@ -551,9 +546,7 @@ function cloneDeep(value, ignoreWhen, excludeKeys) {
551
546
  return result;
552
547
  }
553
548
 
554
- function baseMerge(target, source) {
555
- let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
556
- let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
549
+ function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
557
550
  if (source) {
558
551
  if (target === source) return;
559
552
  if (isValid$1(source) && "object" == typeof source) {
@@ -571,9 +564,7 @@ function baseMerge(target, source) {
571
564
  }
572
565
  }
573
566
  }
574
- function baseMergeDeep(target, source, key) {
575
- let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
576
- let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
567
+ function baseMergeDeep(target, source, key, shallowArray = !1, skipTargetArray = !1) {
577
568
  const objValue = target[key],
578
569
  srcValue = source[key];
579
570
  let newValue = source[key],
@@ -594,11 +585,11 @@ function assignMergeValue(target, key, value) {
594
585
  function eq(value, other) {
595
586
  return value === other || Number.isNaN(value) && Number.isNaN(other);
596
587
  }
597
- function merge$1(target) {
588
+ function merge$1(target, ...sources) {
598
589
  let sourceIndex = -1;
599
- const length = arguments.length <= 1 ? 0 : arguments.length - 1;
590
+ const length = sources.length;
600
591
  for (; ++sourceIndex < length;) {
601
- baseMerge(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
592
+ baseMerge(target, sources[sourceIndex], !0);
602
593
  }
603
594
  return target;
604
595
  }
@@ -662,8 +653,7 @@ function defaults(target, source, overlay) {
662
653
  }
663
654
  return target;
664
655
  }
665
- function mixin(target, source) {
666
- let override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
656
+ function mixin(target, source, override = !0) {
667
657
  if (target = "prototype" in target ? target.prototype : target, source = "prototype" in source ? source.prototype : source, Object.getOwnPropertyNames) {
668
658
  const keyList = Object.getOwnPropertyNames(source);
669
659
  for (let i = 0; i < keyList.length; i++) {
@@ -710,8 +700,7 @@ function arrayEqual(a, b) {
710
700
  function uniqArray(arr) {
711
701
  return arr && isArray$1(arr) ? Array.from(new Set(array(arr))) : arr;
712
702
  }
713
- function shuffleArray(arr) {
714
- let random = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.random;
703
+ function shuffleArray(arr, random = Math.random) {
715
704
  let j,
716
705
  x,
717
706
  i = arr.length;
@@ -742,8 +731,7 @@ function toNumber(a) {
742
731
  return Number(a);
743
732
  }
744
733
 
745
- function quantileSorted(values, percent) {
746
- let valueof = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : toNumber;
734
+ function quantileSorted(values, percent, valueof = toNumber) {
747
735
  const n = values.length;
748
736
  if (!n) return;
749
737
  if (percent <= 0 || n < 2) return valueof(values[0], 0, values);
@@ -776,9 +764,7 @@ class Logger {
776
764
  static clearInstance() {
777
765
  Logger._instance = null;
778
766
  }
779
- constructor() {
780
- let level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LoggerLevel.None;
781
- let method = arguments.length > 1 ? arguments[1] : undefined;
767
+ constructor(level = LoggerLevel.None, method) {
782
768
  this._onErrorHandler = [], this._level = level, this._method = method;
783
769
  }
784
770
  addErrorHandler(handler) {
@@ -788,10 +774,7 @@ class Logger {
788
774
  const index = this._onErrorHandler.findIndex(h => h === handler);
789
775
  index < 0 || this._onErrorHandler.splice(index, 1);
790
776
  }
791
- callErrorHandler() {
792
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
793
- args[_key] = arguments[_key];
794
- }
777
+ callErrorHandler(...args) {
795
778
  this._onErrorHandler.forEach(h => h(...args));
796
779
  }
797
780
  canLogInfo() {
@@ -809,37 +792,23 @@ class Logger {
809
792
  level(levelValue) {
810
793
  return arguments.length ? (this._level = +levelValue, this) : this._level;
811
794
  }
812
- error() {
795
+ error(...args) {
813
796
  var _a;
814
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
815
- args[_key2] = arguments[_key2];
816
- }
817
797
  return this._level >= LoggerLevel.Error && (this._onErrorHandler.length ? this.callErrorHandler(...args) : log$1(null !== (_a = this._method) && void 0 !== _a ? _a : "error", "ERROR", args)), this;
818
798
  }
819
- warn() {
820
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
821
- args[_key3] = arguments[_key3];
822
- }
799
+ warn(...args) {
823
800
  return this._level >= LoggerLevel.Warn && log$1(this._method || "warn", "WARN", args), this;
824
801
  }
825
- info() {
826
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
827
- args[_key4] = arguments[_key4];
828
- }
802
+ info(...args) {
829
803
  return this._level >= LoggerLevel.Info && log$1(this._method || "log", "INFO", args), this;
830
804
  }
831
- debug() {
832
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
833
- args[_key5] = arguments[_key5];
834
- }
805
+ debug(...args) {
835
806
  return this._level >= LoggerLevel.Debug && log$1(this._method || "log", "DEBUG", args), this;
836
807
  }
837
808
  }
838
809
  Logger._instance = null;
839
810
 
840
- function bisect(a, x) {
841
- let lo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
842
- let hi = arguments.length > 3 ? arguments[3] : undefined;
811
+ function bisect(a, x, lo = 0, hi) {
843
812
  for (isNil$1(hi) && (hi = a.length); lo < hi;) {
844
813
  const mid = lo + hi >>> 1;
845
814
  ascending$1(a[mid], x) > 0 ? hi = mid : lo = mid + 1;
@@ -884,9 +853,7 @@ const median$1 = (values, isSorted) => {
884
853
 
885
854
  const DEFAULT_ABSOLUTE_TOLERATE = 1e-10,
886
855
  DEFAULT_RELATIVE_TOLERATE = 1e-10;
887
- function isNumberClose(a, b) {
888
- let relTol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_RELATIVE_TOLERATE;
889
- let absTol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_ABSOLUTE_TOLERATE;
856
+ function isNumberClose(a, b, relTol = DEFAULT_RELATIVE_TOLERATE, absTol = DEFAULT_ABSOLUTE_TOLERATE) {
890
857
  const abs = absTol,
891
858
  rel = relTol * Math.max(a, b);
892
859
  return Math.abs(a - b) <= Math.max(abs, rel);
@@ -901,12 +868,7 @@ function isLess(a, b, relTol, absTol) {
901
868
  const memoize = func => {
902
869
  let lastArgs = null,
903
870
  lastResult = null;
904
- return function () {
905
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
906
- args[_key] = arguments[_key];
907
- }
908
- return lastArgs && args.every((val, i) => val === lastArgs[i]) || (lastArgs = args, lastResult = func(...args)), lastResult;
909
- };
871
+ return (...args) => (lastArgs && args.every((val, i) => val === lastArgs[i]) || (lastArgs = args, lastResult = func(...args)), lastResult);
910
872
  };
911
873
 
912
874
  const clamp = function (input, min, max) {
@@ -970,12 +932,9 @@ function debounce(func, wait, options) {
970
932
  function trailingEdge(time) {
971
933
  return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0, result);
972
934
  }
973
- function debounced() {
935
+ function debounced(...args) {
974
936
  const time = Date.now(),
975
937
  isInvoking = shouldInvoke(time);
976
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
977
- args[_key] = arguments[_key];
978
- }
979
938
  if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
980
939
  if (void 0 === timerId) return function (time) {
981
940
  return lastInvokeTime = time, timerId = startTimer(timerExpired, wait), leading ? invokeFunc(time) : result;
@@ -1100,8 +1059,7 @@ function dotProduct(a, b) {
1100
1059
  function fuzzyEqualVec(a, b) {
1101
1060
  return abs$1(a[0] - b[0]) + abs$1(a[1] - b[1]) < 1e-12;
1102
1061
  }
1103
- function fixPrecision$1(num) {
1104
- let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
1062
+ function fixPrecision$1(num, precision = 10) {
1105
1063
  return Math.round(num * precision) / precision;
1106
1064
  }
1107
1065
  function getDecimalPlaces(n) {
@@ -1117,11 +1075,7 @@ function precisionSub(a, b) {
1117
1075
  }
1118
1076
 
1119
1077
  class Point {
1120
- constructor() {
1121
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1122
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1123
- let x1 = arguments.length > 2 ? arguments[2] : undefined;
1124
- let y1 = arguments.length > 3 ? arguments[3] : undefined;
1078
+ constructor(x = 0, y = 0, x1, y1) {
1125
1079
  this.x = 0, this.y = 0, this.x = x, this.y = y, this.x1 = x1, this.y1 = y1;
1126
1080
  }
1127
1081
  clone() {
@@ -1167,8 +1121,7 @@ function degreeToRadian(degree) {
1167
1121
  function radianToDegree(radian) {
1168
1122
  return 180 * radian / Math.PI;
1169
1123
  }
1170
- const clampRadian = function () {
1171
- let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1124
+ const clampRadian = (angle = 0) => {
1172
1125
  if (angle < 0) for (; angle < -tau$1;) angle += tau$1;else if (angle > 0) for (; angle > tau$1;) angle -= tau$1;
1173
1126
  return angle;
1174
1127
  };
@@ -1182,13 +1135,10 @@ function polarToCartesian(center, radius, angleInRadian) {
1182
1135
  y: center.y
1183
1136
  };
1184
1137
  }
1185
- function cartesianToPolar(point) {
1186
- let center = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
1187
- x: 0,
1188
- y: 0
1189
- };
1190
- let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1191
- let endAngle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2 * Math.PI;
1138
+ function cartesianToPolar(point, center = {
1139
+ x: 0,
1140
+ y: 0
1141
+ }, startAngle = 0, endAngle = 2 * Math.PI) {
1192
1142
  const {
1193
1143
  x: x,
1194
1144
  y: y
@@ -1364,15 +1314,13 @@ function pointInRect(point, bbox, format) {
1364
1314
  function getProjectionRadius(checkAxis, axis) {
1365
1315
  return Math.abs(axis[0] * checkAxis[0] + axis[1] * checkAxis[1]);
1366
1316
  }
1367
- function rotatePoint(_ref, rad) {
1368
- let {
1369
- x: x,
1370
- y: y
1371
- } = _ref;
1372
- let origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
1373
- x: 0,
1374
- y: 0
1375
- };
1317
+ function rotatePoint({
1318
+ x: x,
1319
+ y: y
1320
+ }, rad, origin = {
1321
+ x: 0,
1322
+ y: 0
1323
+ }) {
1376
1324
  return {
1377
1325
  x: (x - origin.x) * Math.cos(rad) - (y - origin.y) * Math.sin(rad) + origin.x,
1378
1326
  y: (x - origin.x) * Math.sin(rad) + (y - origin.y) * Math.cos(rad) + origin.y
@@ -1401,8 +1349,7 @@ function toRect$1(box, isDeg) {
1401
1349
  y: box.y2
1402
1350
  }, deg, cp)];
1403
1351
  }
1404
- function isRotateAABBIntersect(box1, box2) {
1405
- let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1352
+ function isRotateAABBIntersect(box1, box2, isDeg = !1) {
1406
1353
  const rect1 = toRect$1(box1, isDeg),
1407
1354
  rect2 = toRect$1(box2, isDeg),
1408
1355
  vector = (start, end) => [end.x - start.x, end.y - start.y],
@@ -1482,9 +1429,7 @@ const eastAsianCharacterInfo = character => {
1482
1429
  return 55296 <= x && x <= 56319 && 56320 <= y && y <= 57343 && (x &= 1023, y &= 1023, codePoint = x << 10 | y, codePoint += 65536), 12288 === codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 ? "F" : 8361 === codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518 ? "H" : 4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141 ? "W" : 32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 === codePoint || 175 === codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630 ? "Na" : 161 === codePoint || 164 === codePoint || 167 <= codePoint && codePoint <= 168 || 170 === codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 === codePoint || 208 === codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 === codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 === codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 === codePoint || 254 === codePoint || 257 === codePoint || 273 === codePoint || 275 === codePoint || 283 === codePoint || 294 <= codePoint && codePoint <= 295 || 299 === codePoint || 305 <= codePoint && codePoint <= 307 || 312 === codePoint || 319 <= codePoint && codePoint <= 322 || 324 === codePoint || 328 <= codePoint && codePoint <= 331 || 333 === codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 === codePoint || 462 === codePoint || 464 === codePoint || 466 === codePoint || 468 === codePoint || 470 === codePoint || 472 === codePoint || 474 === codePoint || 476 === codePoint || 593 === codePoint || 609 === codePoint || 708 === codePoint || 711 === codePoint || 713 <= codePoint && codePoint <= 715 || 717 === codePoint || 720 === codePoint || 728 <= codePoint && codePoint <= 731 || 733 === codePoint || 735 === codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 === codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 === codePoint || 8208 === codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 === codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 === codePoint || 8251 === codePoint || 8254 === codePoint || 8308 === codePoint || 8319 === codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 === codePoint || 8451 === codePoint || 8453 === codePoint || 8457 === codePoint || 8467 === codePoint || 8470 === codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 === codePoint || 8491 === codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 === codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 === codePoint || 8660 === codePoint || 8679 === codePoint || 8704 === codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 === codePoint || 8719 === codePoint || 8721 === codePoint || 8725 === codePoint || 8730 === codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 === codePoint || 8741 === codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 === codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 === codePoint || 8780 === codePoint || 8786 === codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 === codePoint || 8857 === codePoint || 8869 === codePoint || 8895 === codePoint || 8978 === codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 === codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 === codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 === codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 === codePoint || 9758 === codePoint || 9792 === codePoint || 9794 === codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 === codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 === codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 === codePoint || 10071 === codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 === codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109 ? "A" : "N";
1483
1430
  };
1484
1431
 
1485
- function getContextFont(text) {
1486
- let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1487
- let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
1432
+ function getContextFont(text, defaultAttr = {}, fontSizeScale) {
1488
1433
  fontSizeScale || (fontSizeScale = 1);
1489
1434
  const {
1490
1435
  fontStyle = defaultAttr.fontStyle,
@@ -1810,49 +1755,29 @@ class Bounds {
1810
1755
  equals(b) {
1811
1756
  return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;
1812
1757
  }
1813
- setValue() {
1814
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1815
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1816
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1817
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1758
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
1818
1759
  return this.x1 = x1, this.y1 = y1, this.x2 = x2, this.y2 = y2, this;
1819
1760
  }
1820
- set() {
1821
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1822
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1823
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1824
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1761
+ set(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
1825
1762
  return x2 < x1 ? (this.x2 = x1, this.x1 = x2) : (this.x1 = x1, this.x2 = x2), y2 < y1 ? (this.y2 = y1, this.y1 = y2) : (this.y1 = y1, this.y2 = y2), this;
1826
1763
  }
1827
- add() {
1828
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1829
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1764
+ add(x = 0, y = 0) {
1830
1765
  return x < this.x1 && (this.x1 = x), y < this.y1 && (this.y1 = y), x > this.x2 && (this.x2 = x), y > this.y2 && (this.y2 = y), this;
1831
1766
  }
1832
- expand() {
1833
- let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1767
+ expand(d = 0) {
1834
1768
  return isArray$1(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
1835
1769
  }
1836
1770
  round() {
1837
1771
  return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
1838
1772
  }
1839
- translate() {
1840
- let dx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1841
- let dy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1773
+ translate(dx = 0, dy = 0) {
1842
1774
  return this.x1 += dx, this.x2 += dx, this.y1 += dy, this.y2 += dy, this;
1843
1775
  }
1844
- rotate() {
1845
- let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1846
- let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1847
- let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1776
+ rotate(angle = 0, x = 0, y = 0) {
1848
1777
  const p = this.rotatedPoints(angle, x, y);
1849
1778
  return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);
1850
1779
  }
1851
- scale() {
1852
- let sx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1853
- let sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1854
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1855
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1780
+ scale(sx = 0, sy = 0, x = 0, y = 0) {
1856
1781
  const p = this.scalePoints(sx, sy, x, y);
1857
1782
  return this.clear().add(p[0], p[1]).add(p[2], p[3]);
1858
1783
  }
@@ -1871,9 +1796,7 @@ class Bounds {
1871
1796
  intersects(b) {
1872
1797
  return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);
1873
1798
  }
1874
- contains() {
1875
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1876
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1799
+ contains(x = 0, y = 0) {
1877
1800
  return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);
1878
1801
  }
1879
1802
  containsPoint(p) {
@@ -1885,12 +1808,10 @@ class Bounds {
1885
1808
  height() {
1886
1809
  return this.empty() ? 0 : this.y2 - this.y1;
1887
1810
  }
1888
- scaleX() {
1889
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1811
+ scaleX(s = 0) {
1890
1812
  return this.x1 *= s, this.x2 *= s, this;
1891
1813
  }
1892
- scaleY() {
1893
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1814
+ scaleY(s = 0) {
1894
1815
  return this.y1 *= s, this.y2 *= s, this;
1895
1816
  }
1896
1817
  transformWithMatrix(matrix) {
@@ -1924,20 +1845,14 @@ class Bounds {
1924
1845
  }
1925
1846
  class AABBBounds extends Bounds {}
1926
1847
  class OBBBounds extends Bounds {
1927
- constructor(bounds) {
1928
- let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1848
+ constructor(bounds, angle = 0) {
1929
1849
  var _a;
1930
1850
  super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
1931
1851
  }
1932
1852
  intersects(b) {
1933
1853
  return isRotateAABBIntersect(this, b);
1934
1854
  }
1935
- setValue() {
1936
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1937
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1938
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1939
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1940
- let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
1855
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0, angle = 0) {
1941
1856
  return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
1942
1857
  }
1943
1858
  clone() {
@@ -1965,13 +1880,7 @@ class OBBBounds extends Bounds {
1965
1880
  }
1966
1881
 
1967
1882
  class Matrix {
1968
- constructor() {
1969
- let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
1970
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1971
- let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1972
- let d = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
1973
- let e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
1974
- let f = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
1883
+ constructor(a = 1, b = 0, c = 0, d = 1, e = 0, f = 0) {
1975
1884
  this.a = a, this.b = b, this.c = c, this.d = d, this.e = e, this.f = f;
1976
1885
  }
1977
1886
  equalToMatrix(m2) {
@@ -2081,8 +1990,7 @@ class Matrix {
2081
1990
  } = source;
2082
1991
  target.x = x * nextA + y * nextC + nextE, target.y = x * nextB + y * nextD + nextF;
2083
1992
  }
2084
- onlyTranslate() {
2085
- let scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
1993
+ onlyTranslate(scale = 1) {
2086
1994
  return this.a === scale && 0 === this.b && 0 === this.c && this.d === scale;
2087
1995
  }
2088
1996
  clone() {
@@ -2389,16 +2297,13 @@ const setHex = (formatValue, forceHex) => {
2389
2297
  }
2390
2298
  };
2391
2299
  class Color {
2392
- static Brighter(source) {
2393
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2300
+ static Brighter(source, b = 1) {
2394
2301
  return 1 === b ? source : new Color(source).brighter(b).toRGBA();
2395
2302
  }
2396
- static SetOpacity(source) {
2397
- let o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2303
+ static SetOpacity(source, o = 1) {
2398
2304
  return 1 === o ? source : new Color(source).setOpacity(o).toRGBA();
2399
2305
  }
2400
- static getColorBrightness(source) {
2401
- let model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "hsl";
2306
+ static getColorBrightness(source, model = "hsl") {
2402
2307
  const color = source instanceof Color ? source : new Color(source);
2403
2308
  switch (model) {
2404
2309
  case "hsv":
@@ -2502,8 +2407,7 @@ class Color {
2502
2407
  setScalar(scalar) {
2503
2408
  return this.color.r = scalar, this.color.g = scalar, this.color.b = scalar, this;
2504
2409
  }
2505
- setOpacity() {
2506
- let o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2410
+ setOpacity(o = 1) {
2507
2411
  return this.color.opacity = o, this;
2508
2412
  }
2509
2413
  getLuminance() {
@@ -2526,12 +2430,10 @@ class Color {
2526
2430
  clone() {
2527
2431
  return new Color(this.color.toString());
2528
2432
  }
2529
- copyGammaToLinear(color) {
2530
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
2433
+ copyGammaToLinear(color, gammaFactor = 2) {
2531
2434
  return this.color.r = Math.pow(color.color.r, gammaFactor), this.color.g = Math.pow(color.color.g, gammaFactor), this.color.b = Math.pow(color.color.b, gammaFactor), this;
2532
2435
  }
2533
- copyLinearToGamma(color) {
2534
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
2436
+ copyLinearToGamma(color, gammaFactor = 2) {
2535
2437
  const safeInverse = gammaFactor > 0 ? 1 / gammaFactor : 1;
2536
2438
  return this.color.r = Math.pow(color.color.r, safeInverse), this.color.g = Math.pow(color.color.g, safeInverse), this.color.b = Math.pow(color.color.b, safeInverse), this;
2537
2439
  }
@@ -2651,9 +2553,7 @@ function normalizePadding$1(padding) {
2651
2553
  return [0, 0, 0, 0];
2652
2554
  }
2653
2555
 
2654
- function getContainerSize(el) {
2655
- let defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2656
- let defaultHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2556
+ function getContainerSize(el, defaultWidth = 0, defaultHeight = 0) {
2657
2557
  if (!el) return {
2658
2558
  width: defaultWidth,
2659
2559
  height: defaultHeight
@@ -2688,8 +2588,7 @@ function getElementAbsolutePosition(element) {
2688
2588
  y: y
2689
2589
  };
2690
2590
  }
2691
- const styleStringToObject = function () {
2692
- let styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
2591
+ const styleStringToObject = (styleStr = "") => {
2693
2592
  const res = {};
2694
2593
  return styleStr.split(";").forEach(item => {
2695
2594
  if (item) {
@@ -2885,8 +2784,7 @@ function isPointInPolygon(point, polygon) {
2885
2784
  }
2886
2785
  return result;
2887
2786
  }
2888
- function destination(point, distance, bearing) {
2889
- let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
2787
+ function destination(point, distance, bearing, options = {}) {
2890
2788
  const longitude1 = degreeToRadian(point[0]),
2891
2789
  latitude1 = degreeToRadian(point[1]),
2892
2790
  bearingRad = degreeToRadian(bearing),
@@ -3253,8 +3151,7 @@ function formatTrim(s) {
3253
3151
  }
3254
3152
 
3255
3153
  class FormatSpecifier {
3256
- constructor() {
3257
- let specifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3154
+ constructor(specifier = {}) {
3258
3155
  this.fill = void 0 === specifier.fill ? " " : specifier.fill + "", this.align = void 0 === specifier.align ? ">" : specifier.align + "", this.sign = void 0 === specifier.sign ? "-" : specifier.sign + "", this.symbol = void 0 === specifier.symbol ? "" : specifier.symbol + "", this.zero = !!specifier.zero, this.width = void 0 === specifier.width ? void 0 : +specifier.width, this.comma = !!specifier.comma, this.precision = void 0 === specifier.precision ? void 0 : +specifier.precision, this.trim = !!specifier.trim, this.type = void 0 === specifier.type ? "" : specifier.type + "";
3259
3156
  }
3260
3157
  toString() {
@@ -6014,10 +5911,7 @@ var lib = simplifyGeometry;
6014
5911
  var simplifyGeojsonExports = simplifyGeojson.exports;
6015
5912
  var geoSimplify = /*@__PURE__*/getDefaultExportFromCjs(simplifyGeojsonExports);
6016
5913
 
6017
- const mergeDeepImmer = function (target) {
6018
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
6019
- sources[_key2 - 1] = arguments[_key2];
6020
- }
5914
+ const mergeDeepImmer = function (target, ...sources) {
6021
5915
  return mergeOption(cloneDeep(target), ...sources);
6022
5916
  };
6023
5917
  function _mergeOptionDeep(target, source, key) {
@@ -6030,12 +5924,12 @@ function _mergeOptionDeep(target, source, key) {
6030
5924
  function _mergeOptionBase(target, source) {
6031
5925
  if (isObject$2(source) && target !== source) for (const key in source) _mergeOptionDeep(target, source, key);
6032
5926
  }
6033
- function mergeOption(target) {
5927
+ function mergeOption(target, ...sources) {
6034
5928
  target || (target = {});
6035
5929
  let sourceIndex = -1;
6036
- const length = arguments.length <= 1 ? 0 : arguments.length - 1;
5930
+ const length = sources.length;
6037
5931
  for (; ++sourceIndex < length;) {
6038
- _mergeOptionBase(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1]);
5932
+ _mergeOptionBase(target, sources[sourceIndex]);
6039
5933
  }
6040
5934
  return target;
6041
5935
  }
@@ -6279,9 +6173,7 @@ var tsvParse = tsv.parse;
6279
6173
  const DEFAULT_DSV_PARSER_OPTIONS = {
6280
6174
  delimiter: ","
6281
6175
  };
6282
- const dsvParser = function (data) {
6283
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6284
- let dataView = arguments.length > 2 ? arguments[2] : undefined;
6176
+ const dsvParser = (data, options = {}, dataView) => {
6285
6177
  dataView.type = DATAVIEW_TYPE.DSV;
6286
6178
  const mergeOptions = mergeDeepImmer(DEFAULT_DSV_PARSER_OPTIONS, options),
6287
6179
  {
@@ -6290,14 +6182,8 @@ const dsvParser = function (data) {
6290
6182
  if (!isString$1(delimiter)) throw new TypeError("Invalid delimiter: must be a string!");
6291
6183
  return dsvFormat(delimiter).parse(data);
6292
6184
  };
6293
- const csvParser = function (data) {
6294
- let dataView = arguments.length > 2 ? arguments[2] : undefined;
6295
- return dataView.type = DATAVIEW_TYPE.DSV, csvParse(data);
6296
- };
6297
- const tsvParser = function (data) {
6298
- let dataView = arguments.length > 2 ? arguments[2] : undefined;
6299
- return dataView.type = DATAVIEW_TYPE.DSV, tsvParse(data);
6300
- };
6185
+ const csvParser = (data, options = {}, dataView) => (dataView.type = DATAVIEW_TYPE.DSV, csvParse(data));
6186
+ const tsvParser = (data, options = {}, dataView) => (dataView.type = DATAVIEW_TYPE.DSV, tsvParse(data));
6301
6187
 
6302
6188
  /**
6303
6189
  * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
@@ -6900,9 +6786,7 @@ const flattenFeature = data => {
6900
6786
  }) : featuresArr.push(MultiToSingle(item));
6901
6787
  }), featuresArr;
6902
6788
  };
6903
- const geoJSONParser = function (data) {
6904
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6905
- let dataView = arguments.length > 2 ? arguments[2] : undefined;
6789
+ const geoJSONParser = (data, options = {}, dataView) => {
6906
6790
  dataView.type = DATAVIEW_TYPE.GEO;
6907
6791
  const mergeOptions = mergeDeepImmer(DEFAULT_GEOJSON_OPTIONS, options),
6908
6792
  {
@@ -6972,8 +6856,7 @@ const tagNameToType = {
6972
6856
  function splitNumberSequence(rawStr) {
6973
6857
  return rawStr.match(numberReg) || [];
6974
6858
  }
6975
- const svgParser = function (data) {
6976
- let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6859
+ const svgParser = (data, option = {}, dataView) => {
6977
6860
  let parser = option.customDOMParser;
6978
6861
  if (parser || (null === window || void 0 === window ? void 0 : window.DOMParser) && (parser = svg => new DOMParser().parseFromString(svg, "text/xml")), !parser) throw new Error("No Available DOMParser!");
6979
6862
  const svg = parser(data);
@@ -6985,8 +6868,7 @@ const svgParser = function (data) {
6985
6868
  return null;
6986
6869
  };
6987
6870
  let idx = 0;
6988
- function parseSvgNode(svg) {
6989
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6871
+ function parseSvgNode(svg, opt = {}) {
6990
6872
  const elements = [],
6991
6873
  root = parseNode(svg, null);
6992
6874
  let width = parseFloat(svg.getAttribute("width") || opt.width),
@@ -7113,8 +6995,7 @@ function parseTransform$1(node) {
7113
6995
  } = matrix;
7114
6996
  return new Matrix(a, b, c, d, e, f);
7115
6997
  }
7116
- function traverse(node, parsedParent) {
7117
- let result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
6998
+ function traverse(node, parsedParent, result = []) {
7118
6999
  var _a;
7119
7000
  if (!node) return;
7120
7001
  let parseResult;
@@ -7125,8 +7006,7 @@ function traverse(node, parsedParent) {
7125
7006
 
7126
7007
  let idIndex = 0;
7127
7008
  const maxId = 1e8;
7128
- function getUUID() {
7129
- let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "dataset";
7009
+ function getUUID(prefix = "dataset") {
7130
7010
  return idIndex > maxId && (idIndex = 0), prefix + "_" + idIndex++;
7131
7011
  }
7132
7012
 
@@ -7215,25 +7095,20 @@ class DataSet {
7215
7095
  const DataViewDiffRank = "_data-view-diff-rank";
7216
7096
  class DataView {
7217
7097
  constructor(dataSet, options) {
7218
- var _this = this;
7219
7098
  let name;
7220
- this.dataSet = dataSet, this.options = options, this.isDataView = !0, this.target = new EventEmitter(), this.parseOption = null, this.transformsArr = [], this.isRunning = !1, this.rawData = {}, this.history = !1, this.parserData = {}, this.latestData = {}, this._fields = null, this.reRunAllTransform = function () {
7221
- let opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
7222
- pushHistory: !0,
7223
- emitMessage: !0
7224
- };
7225
- return _this.isRunning = !0, _this.resetTransformData(), _this.transformsArr.forEach(t => {
7226
- _this.executeTransform(t, {
7227
- pushHistory: opt.pushHistory,
7228
- emitMessage: !1
7229
- }), _this.isLastTransform(t) && _this.diffLastData();
7230
- }), _this.isRunning = !1, !1 !== opt.emitMessage && _this.target.emit("change", []), _this;
7231
- }, this.markRunning = () => {
7099
+ this.dataSet = dataSet, this.options = options, this.isDataView = !0, this.target = new EventEmitter(), this.parseOption = null, this.transformsArr = [], this.isRunning = !1, this.rawData = {}, this.history = !1, this.parserData = {}, this.latestData = {}, this._fields = null, this.reRunAllTransform = (opt = {
7100
+ pushHistory: !0,
7101
+ emitMessage: !0
7102
+ }) => (this.isRunning = !0, this.resetTransformData(), this.transformsArr.forEach(t => {
7103
+ this.executeTransform(t, {
7104
+ pushHistory: opt.pushHistory,
7105
+ emitMessage: !1
7106
+ }), this.isLastTransform(t) && this.diffLastData();
7107
+ }), this.isRunning = !1, !1 !== opt.emitMessage && this.target.emit("change", []), this), this.markRunning = () => {
7232
7108
  this.isRunning = !0, this.target.emit("markRunning", []);
7233
7109
  }, name = (null == options ? void 0 : options.name) ? options.name : getUUID("dataview"), this.name = name, (null == options ? void 0 : options.history) && (this.history = options.history, this.historyData = []), this.dataSet.setDataView(name, this), this.setFields(null == options ? void 0 : options.fields);
7234
7110
  }
7235
- parse(data, options) {
7236
- let emit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
7111
+ parse(data, options, emit = !1) {
7237
7112
  var _a;
7238
7113
  this.isRunning = !0, emit && this.target.emit("beforeParse", []), options && (this.parseOption = options);
7239
7114
  const cloneData = this.cloneParseData(data, options);
@@ -7243,8 +7118,7 @@ class DataView {
7243
7118
  } else this.parserData = cloneData, this.rawData = cloneData, this.history && this.historyData.push(cloneData), this.latestData = cloneData;
7244
7119
  return this.isRunning = !1, emit && this.target.emit("afterParse", []), this;
7245
7120
  }
7246
- transform(options) {
7247
- let execute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
7121
+ transform(options, execute = !0) {
7248
7122
  if (this.isRunning = !0, options && options.type) {
7249
7123
  let pushOption = !0;
7250
7124
  if ("fields" === options.type) {
@@ -7268,11 +7142,10 @@ class DataView {
7268
7142
  return (null !== (_a = a.level) && void 0 !== _a ? _a : 0) - (null !== (_b = b.level) && void 0 !== _b ? _b : 0);
7269
7143
  });
7270
7144
  }
7271
- executeTransform(options) {
7272
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
7273
- pushHistory: !0,
7274
- emitMessage: !0
7275
- };
7145
+ executeTransform(options, opt = {
7146
+ pushHistory: !0,
7147
+ emitMessage: !0
7148
+ }) {
7276
7149
  const {
7277
7150
  pushHistory: pushHistory,
7278
7151
  emitMessage: emitMessage
@@ -7333,8 +7206,7 @@ class DataView {
7333
7206
  var _a;
7334
7207
  return this._fields ? this._fields : "dataview" === (null === (_a = this.parseOption) || void 0 === _a ? void 0 : _a.type) && 1 === this.rawData.length && this.rawData[0].getFields ? this.rawData[0].getFields() : null;
7335
7208
  }
7336
- setFields(f) {
7337
- let foreMerge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7209
+ setFields(f, foreMerge = !1) {
7338
7210
  this._fields = f && foreMerge ? merge$1({}, this._fields, f) : f;
7339
7211
  const fieldsOption = this.transformsArr.find(_op => "fields" === _op.type);
7340
7212
  !isNil$1(this._fields) && isNil$1(fieldsOption) ? (this.dataSet.registerTransform("fields", fields), this.transform({
@@ -7850,20 +7722,14 @@ class ContributionProviderCache {
7850
7722
  }
7851
7723
  }
7852
7724
  function bindContributionProvider(bind, id) {
7853
- bind(ContributionProvider).toDynamicValue(_ref => {
7854
- let {
7855
- container: container
7856
- } = _ref;
7857
- return new ContributionProviderCache(id, container);
7858
- }).inSingletonScope().whenTargetNamed(id);
7725
+ bind(ContributionProvider).toDynamicValue(({
7726
+ container: container
7727
+ }) => new ContributionProviderCache(id, container)).inSingletonScope().whenTargetNamed(id);
7859
7728
  }
7860
7729
  function bindContributionProviderNoSingletonScope(bind, id) {
7861
- bind(ContributionProvider).toDynamicValue(_ref2 => {
7862
- let {
7863
- container: container
7864
- } = _ref2;
7865
- return new ContributionProviderCache(id, container);
7866
- }).whenTargetNamed(id);
7730
+ bind(ContributionProvider).toDynamicValue(({
7731
+ container: container
7732
+ }) => new ContributionProviderCache(id, container)).whenTargetNamed(id);
7867
7733
  }
7868
7734
  class ContributionStore {
7869
7735
  static getStore(id) {
@@ -7933,10 +7799,7 @@ class Hook {
7933
7799
  }
7934
7800
 
7935
7801
  class SyncHook extends Hook {
7936
- call() {
7937
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7938
- args[_key] = arguments[_key];
7939
- }
7802
+ call(...args) {
7940
7803
  this.taps.map(t => t.fn).forEach(cb => cb(...args));
7941
7804
  }
7942
7805
  }
@@ -8180,16 +8043,13 @@ let DefaultGlobal = class extends EventListenerManager {
8180
8043
  updateDom(dom, params) {
8181
8044
  return this._env || this.setEnv("browser"), this.envContribution.updateDom(dom, params);
8182
8045
  }
8183
- getElementTop(dom) {
8184
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8046
+ getElementTop(dom, baseWindow = !1) {
8185
8047
  return this._env || this.setEnv("browser"), this.envContribution.getElementTop(dom, baseWindow);
8186
8048
  }
8187
- getElementLeft(dom) {
8188
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8049
+ getElementLeft(dom, baseWindow = !1) {
8189
8050
  return this._env || this.setEnv("browser"), this.envContribution.getElementLeft(dom, baseWindow);
8190
8051
  }
8191
- getElementTopLeft(dom) {
8192
- let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8052
+ getElementTopLeft(dom, baseWindow = !1) {
8193
8053
  return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
8194
8054
  }
8195
8055
  isMacOS() {
@@ -8255,7 +8115,7 @@ class BoundsContext {
8255
8115
  clear() {
8256
8116
  this.bounds.clear();
8257
8117
  }
8258
- release() {}
8118
+ release(...params) {}
8259
8119
  }
8260
8120
 
8261
8121
  class CurvePath {
@@ -8466,12 +8326,7 @@ const addArcToBezierPath$1 = (bezierPath, startAngle, endAngle, cx, cy, rx, ry)
8466
8326
  };
8467
8327
 
8468
8328
  const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
8469
- function renderCommandList(commandList, context) {
8470
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
8471
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
8472
- let sx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
8473
- let sy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
8474
- let z = arguments.length > 6 ? arguments[6] : undefined;
8329
+ function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z) {
8475
8330
  for (let i = 0; i < commandList.length; i++) {
8476
8331
  const command = commandList[i];
8477
8332
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
@@ -8761,7 +8616,7 @@ class ReflectSegContext extends SegContext {
8761
8616
  }
8762
8617
  }
8763
8618
 
8764
- function genCurveSegments(path, points) {
8619
+ function genCurveSegments(path, points, step = 1) {
8765
8620
  let defined0 = !1;
8766
8621
  for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
8767
8622
  }
@@ -8804,8 +8659,7 @@ class Linear {
8804
8659
  return this.context.tryUpdateLength();
8805
8660
  }
8806
8661
  }
8807
- function genLinearSegments(points) {
8808
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8662
+ function genLinearSegments(points, params = {}) {
8809
8663
  const {
8810
8664
  direction: direction,
8811
8665
  startPoint: startPoint
@@ -8815,7 +8669,7 @@ function genLinearSegments(points) {
8815
8669
  return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
8816
8670
  }
8817
8671
  function genLinearTypeSegments(path, points) {
8818
- return genCurveSegments(path, points);
8672
+ return genCurveSegments(path, points, 1);
8819
8673
  }
8820
8674
 
8821
8675
  function point$4(curveClass, x, y, defined, p) {
@@ -8858,10 +8712,9 @@ class Basis {
8858
8712
  }
8859
8713
  }
8860
8714
  function genBasisTypeSegments(path, points) {
8861
- return genCurveSegments(path, points);
8715
+ return genCurveSegments(path, points, 2);
8862
8716
  }
8863
- function genBasisSegments(points) {
8864
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8717
+ function genBasisSegments(points, params = {}) {
8865
8718
  const {
8866
8719
  direction: direction,
8867
8720
  startPoint: startPoint
@@ -8954,10 +8807,9 @@ class MonotoneY extends MonotoneX {
8954
8807
  }
8955
8808
  }
8956
8809
  function genMonotoneXTypeSegments(path, points) {
8957
- return genCurveSegments(path, points);
8810
+ return genCurveSegments(path, points, 2);
8958
8811
  }
8959
- function genMonotoneXSegments(points) {
8960
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8812
+ function genMonotoneXSegments(points, params = {}) {
8961
8813
  const {
8962
8814
  direction: direction,
8963
8815
  startPoint: startPoint
@@ -8968,10 +8820,9 @@ function genMonotoneXSegments(points) {
8968
8820
  return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
8969
8821
  }
8970
8822
  function genMonotoneYTypeSegments(path, points) {
8971
- return genCurveSegments(path, points);
8823
+ return genCurveSegments(path, points, 2);
8972
8824
  }
8973
- function genMonotoneYSegments(points) {
8974
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8825
+ function genMonotoneYSegments(points, params = {}) {
8975
8826
  const {
8976
8827
  direction: direction,
8977
8828
  startPoint: startPoint
@@ -8983,9 +8834,7 @@ function genMonotoneYSegments(points) {
8983
8834
  }
8984
8835
 
8985
8836
  let Step$1 = class Step {
8986
- constructor(context) {
8987
- let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
8988
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
8837
+ constructor(context, t = .5, startPoint) {
8989
8838
  this.context = context, this._t = t, this.startPoint = startPoint;
8990
8839
  }
8991
8840
  areaStart() {
@@ -9026,8 +8875,7 @@ class StepClosed extends Step$1 {
9026
8875
  this.context.closePath();
9027
8876
  }
9028
8877
  }
9029
- function genStepSegments(points, t) {
9030
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8878
+ function genStepSegments(points, t, params = {}) {
9031
8879
  const {
9032
8880
  direction: direction,
9033
8881
  startPoint: startPoint
@@ -9037,10 +8885,9 @@ function genStepSegments(points, t) {
9037
8885
  return genStepTypeSegments(new Step$1(segContext, t, startPoint), points), segContext;
9038
8886
  }
9039
8887
  function genStepTypeSegments(path, points) {
9040
- return genCurveSegments(path, points);
8888
+ return genCurveSegments(path, points, 1);
9041
8889
  }
9042
- function genStepClosedSegments(points, t) {
9043
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8890
+ function genStepClosedSegments(points, t, params = {}) {
9044
8891
  const {
9045
8892
  direction: direction,
9046
8893
  startPoint: startPoint
@@ -9055,8 +8902,7 @@ class LinearClosed extends Linear {
9055
8902
  this.context.closePath();
9056
8903
  }
9057
8904
  }
9058
- function genLinearClosedSegments(points) {
9059
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8905
+ function genLinearClosedSegments(points, params = {}) {
9060
8906
  const {
9061
8907
  direction: direction,
9062
8908
  startPoint: startPoint
@@ -9066,7 +8912,7 @@ function genLinearClosedSegments(points) {
9066
8912
  return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
9067
8913
  }
9068
8914
  function genLinearClosedTypeSegments(path, points) {
9069
- return genCurveSegments(path, points);
8915
+ return genCurveSegments(path, points, 1);
9070
8916
  }
9071
8917
 
9072
8918
  function point$2(curveClass, x, y, defined, p) {
@@ -9087,9 +8933,7 @@ function point$2(curveClass, x, y, defined, p) {
9087
8933
  curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
9088
8934
  }
9089
8935
  class CatmullRom {
9090
- constructor(context) {
9091
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
9092
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
8936
+ constructor(context, alpha = .5, startPoint) {
9093
8937
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
9094
8938
  }
9095
8939
  areaStart() {
@@ -9143,8 +8987,7 @@ class CatmullRom {
9143
8987
  }
9144
8988
  }
9145
8989
  function commonGenCatmullRomSegments(type, cons) {
9146
- return function (points, alpha) {
9147
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8990
+ return function (points, alpha, params = {}) {
9148
8991
  const {
9149
8992
  direction: direction,
9150
8993
  startPoint: startPoint
@@ -9153,15 +8996,13 @@ function commonGenCatmullRomSegments(type, cons) {
9153
8996
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
9154
8997
  const segContext = genSegContext(type, direction, points),
9155
8998
  gatmullRom = new cons(segContext, alpha, startPoint);
9156
- return genCurveSegments(gatmullRom, points), segContext;
8999
+ return genCurveSegments(gatmullRom, points, 2), segContext;
9157
9000
  };
9158
9001
  }
9159
9002
  const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
9160
9003
 
9161
9004
  class CatmullRomClosed {
9162
- constructor(context) {
9163
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
9164
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
9005
+ constructor(context, alpha = .5, startPoint) {
9165
9006
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
9166
9007
  }
9167
9008
  areaStart() {
@@ -9416,11 +9257,7 @@ class CustomPath2D extends CurvePath {
9416
9257
  cmd[1] = cmd[1] * sx + x, cmd[2] = cmd[2] * sy + y, cmd[3] = cmd[3] * (sx + sy) / 2;
9417
9258
  }
9418
9259
  closePathTransform() {}
9419
- _runCommandStrList(commandStrList) {
9420
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
9421
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
9422
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
9423
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
9260
+ _runCommandStrList(commandStrList, l = 0, t = 0, sX = 1, sY = 1) {
9424
9261
  let current,
9425
9262
  tempX,
9426
9263
  tempY,
@@ -9494,11 +9331,7 @@ class CustomPath2D extends CurvePath {
9494
9331
  previous = current;
9495
9332
  }
9496
9333
  }
9497
- _runCommandList(commandList) {
9498
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
9499
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
9500
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
9501
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
9334
+ _runCommandList(commandList, l = 0, t = 0, sX = 1, sY = 1) {
9502
9335
  if (0 !== l || 0 !== t || 1 !== sX || 1 !== sY) for (let i = 0, len = commandList.length; i < len; ++i) {
9503
9336
  const current = commandList[i].slice();
9504
9337
  switch (current[0]) {
@@ -10151,9 +9984,7 @@ function getScaledStroke(context, width, dpr) {
10151
9984
  scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
10152
9985
  return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
10153
9986
  }
10154
- function createColor(context, c, params) {
10155
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
10156
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
9987
+ function createColor(context, c, params, offsetX = 0, offsetY = 0) {
10157
9988
  var _a, _b, _c, _d;
10158
9989
  if (!c || !0 === c) return "black";
10159
9990
  let result, color;
@@ -10292,8 +10123,7 @@ function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter)
10292
10123
  }
10293
10124
  return needTestLetter && (index = testLetter(desc, index)), index;
10294
10125
  }
10295
- function testLetter(string, index) {
10296
- let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
10126
+ function testLetter(string, index, negativeWrongMatch = !1) {
10297
10127
  let i = index;
10298
10128
  for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
10299
10129
  return i;
@@ -10303,8 +10133,7 @@ function testLetter2(string, index) {
10303
10133
  for (; regLetter.test(string[i + 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
10304
10134
  return i + 1;
10305
10135
  }
10306
- function measureTextCanvas(text, character) {
10307
- let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "actual";
10136
+ function measureTextCanvas(text, character, mode = "actual") {
10308
10137
  var _a;
10309
10138
  if ("" === text) return {
10310
10139
  ascent: 0,
@@ -10374,10 +10203,9 @@ let ATextMeasure = class {
10374
10203
  }
10375
10204
  return metrics;
10376
10205
  }
10377
- estimate(text, _ref) {
10378
- let {
10379
- fontSize = DefaultTextAttribute.fontSize
10380
- } = _ref;
10206
+ estimate(text, {
10207
+ fontSize = DefaultTextAttribute.fontSize
10208
+ }) {
10381
10209
  let eCharLen = 0,
10382
10210
  cCharLen = 0;
10383
10211
  for (let i = 0; i < text.length; i++) text.charCodeAt(i) < 128 ? eCharLen++ : cCharLen++;
@@ -10688,8 +10516,7 @@ let ATextMeasure = class {
10688
10516
  });
10689
10517
  });
10690
10518
  }
10691
- clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
10692
- let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
10519
+ clipTextWithSuffix(text, options, width, suffix, wordBreak, position, forceSuffix = !1) {
10693
10520
  if ("" === suffix) return this.clipText(text, options, width, wordBreak);
10694
10521
  if (0 === text.length) return {
10695
10522
  str: "",
@@ -11134,7 +10961,7 @@ class DefaultCanvasAllocate {
11134
10961
  get length() {
11135
10962
  return this.pools.length;
11136
10963
  }
11137
- release() {
10964
+ release(...params) {
11138
10965
  this.pools = [];
11139
10966
  }
11140
10967
  }
@@ -11330,8 +11157,7 @@ let DefaultGraphicUtil = class {
11330
11157
  bindTextMeasure(tm) {
11331
11158
  this._textMeasure = tm;
11332
11159
  }
11333
- measureText(text, tc) {
11334
- let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "native";
11160
+ measureText(text, tc, method = "native") {
11335
11161
  var _a;
11336
11162
  this.configure(this.global, this.global.env);
11337
11163
  const m = this.global.measureTextMethod;
@@ -11514,8 +11340,7 @@ class Theme {
11514
11340
  for (; group.parent;) if ((group = group.parent).theme) return group;
11515
11341
  return null;
11516
11342
  }
11517
- applyTheme(group, pt) {
11518
- let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
11343
+ applyTheme(group, pt, force = !1) {
11519
11344
  if (this.dirty) {
11520
11345
  const parentGroup = this.getParentWithTheme(group);
11521
11346
  if (parentGroup) {
@@ -11614,8 +11439,7 @@ class Node extends EventEmitter {
11614
11439
  constructor() {
11615
11440
  super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
11616
11441
  }
11617
- forEachChildren(cb) {
11618
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
11442
+ forEachChildren(cb, reverse = !1) {
11619
11443
  if (reverse) {
11620
11444
  let child = this._lastChild,
11621
11445
  i = 0;
@@ -11632,8 +11456,7 @@ class Node extends EventEmitter {
11632
11456
  }
11633
11457
  }
11634
11458
  }
11635
- forEachChildrenAsync(cb) {
11636
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
11459
+ forEachChildrenAsync(cb, reverse = !1) {
11637
11460
  return __awaiter$8(this, void 0, void 0, function* () {
11638
11461
  if (reverse) {
11639
11462
  let child = this._lastChild,
@@ -11657,13 +11480,12 @@ class Node extends EventEmitter {
11657
11480
  forEach(cb) {
11658
11481
  return this.forEachChildren(cb);
11659
11482
  }
11660
- appendChild(node) {
11661
- let highPerformance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
11483
+ appendChild(node, highPerformance = !0) {
11662
11484
  if (this._uid === node._uid) return null;
11663
11485
  if (!highPerformance && node.isAncestorsOf(this)) throw new Error("【Node::appendChild】不能将父辈元素append为子元素");
11664
11486
  return node.parent && node.parent.removeChild(node), node.parent = this, this._lastChild ? (this._lastChild._next = node, node._prev = this._lastChild, this._lastChild = node) : (this._firstChild = this._lastChild = node, node._prev = node._next = null), this._idMap || (this._idMap = new Map()), this._idMap.set(node._uid, node), this.setCount(node.count), this._structEdit = !0, node;
11665
11487
  }
11666
- appendChildArrHighPerformance(nodes) {
11488
+ appendChildArrHighPerformance(nodes, replace = !1) {
11667
11489
  return console.error("暂不支持该函数"), nodes;
11668
11490
  }
11669
11491
  insertBefore(newNode, referenceNode) {
@@ -11731,8 +11553,7 @@ class Node extends EventEmitter {
11731
11553
  replaceChild(newChild, oldChild) {
11732
11554
  throw new Error("暂不支持");
11733
11555
  }
11734
- find(callback) {
11735
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
11556
+ find(callback, deep = !1) {
11736
11557
  let target = null;
11737
11558
  return this.forEachChildren((node, index) => !(node === this || !callback(node, index)) && (target = node, !0)), deep && this.forEachChildren(child => {
11738
11559
  if (child.isContainer) {
@@ -11742,8 +11563,7 @@ class Node extends EventEmitter {
11742
11563
  return !1;
11743
11564
  }), target;
11744
11565
  }
11745
- findAll(callback) {
11746
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
11566
+ findAll(callback, deep = !1) {
11747
11567
  let nodes = [];
11748
11568
  return this.forEachChildren((node, index) => {
11749
11569
  node !== this && callback(node, index) && nodes.push(node);
@@ -11772,8 +11592,7 @@ class Node extends EventEmitter {
11772
11592
  getElementsByType(type) {
11773
11593
  return this.findAll(node => node.type === type, !0);
11774
11594
  }
11775
- getChildByName(name) {
11776
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
11595
+ getChildByName(name, deep = !1) {
11777
11596
  return this.find(node => node.name === name, deep);
11778
11597
  }
11779
11598
  getChildAt(idx) {
@@ -11892,10 +11711,7 @@ class Node extends EventEmitter {
11892
11711
  removeAllListeners() {
11893
11712
  return this.removeAllEventListeners();
11894
11713
  }
11895
- dispatchEvent(event) {
11896
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11897
- args[_key - 1] = arguments[_key];
11898
- }
11714
+ dispatchEvent(event, ...args) {
11899
11715
  return super.emit(event.type, event, ...args), !event.defaultPrevented;
11900
11716
  }
11901
11717
  emit(event, data) {
@@ -12594,8 +12410,7 @@ class DefaultTicker extends EventEmitter {
12594
12410
  get mode() {
12595
12411
  return this._mode;
12596
12412
  }
12597
- constructor() {
12598
- let timelines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
12413
+ constructor(timelines = []) {
12599
12414
  super(), this.handleTick = (handler, params) => {
12600
12415
  const {
12601
12416
  once = !1
@@ -12691,8 +12506,7 @@ class DefaultTicker extends EventEmitter {
12691
12506
  }
12692
12507
  return !1;
12693
12508
  }
12694
- start() {
12695
- let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
12509
+ start(force = !1) {
12696
12510
  if (this.status === STATUS$1.RUNNING) return !1;
12697
12511
  if (!this.tickerHandler) return !1;
12698
12512
  if (!force) {
@@ -12910,8 +12724,7 @@ class DefaultTimeline {
12910
12724
  for (; animate;) animate.release(), animate = animate.nextAnimate;
12911
12725
  this.animateHead = null, this.animateTail = null, this.animateCount = 0;
12912
12726
  }
12913
- removeAnimate(animate) {
12914
- let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
12727
+ removeAnimate(animate, release = !0) {
12915
12728
  animate._onRemove && animate._onRemove.forEach(cb => cb()), animate === this.animateHead ? (this.animateHead = animate.nextAnimate, animate === this.animateTail ? this.animateTail = null : this.animateHead.prevAnimate = null) : animate === this.animateTail ? (this.animateTail = animate.prevAnimate, this.animateTail.nextAnimate = null) : (animate.prevAnimate.nextAnimate = animate.nextAnimate, animate.nextAnimate.prevAnimate = animate.prevAnimate), release && animate.release();
12916
12729
  }
12917
12730
  }
@@ -12960,10 +12773,7 @@ class CbAnimate extends ACustomAnimate {
12960
12773
  }
12961
12774
  }
12962
12775
  let Animate$1 = class Animate {
12963
- constructor() {
12964
- let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
12965
- let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
12966
- let slience = arguments.length > 2 ? arguments[2] : undefined;
12776
+ constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
12967
12777
  this.id = id, this.timeline = timeline || defaultTimeline, this.status = AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
12968
12778
  }
12969
12779
  setTimeline(timeline) {
@@ -12998,8 +12808,7 @@ let Animate$1 = class Animate {
12998
12808
  }
12999
12809
  return 1 === this.subAnimates.length && this.tailAnimate.totalDuration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
13000
12810
  }
13001
- trySetAttribute(attr) {
13002
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Animate.mode;
12811
+ trySetAttribute(attr, mode = Animate.mode) {
13003
12812
  attr && mode & AnimateMode.SET_ATTR_IMMEDIATELY && this.target.setAttributes && this.target.setAttributes(attr, !1, {
13004
12813
  type: AttributeUpdateType.ANIMATE_PLAY
13005
12814
  });
@@ -13393,8 +13202,7 @@ function getAttributeFromDefaultAttrList(attr, key) {
13393
13202
  return attr[key];
13394
13203
  }
13395
13204
  class RafBasedSTO {
13396
- constructor() {
13397
- let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RafBasedSTO.TimeOut;
13205
+ constructor(timeout = RafBasedSTO.TimeOut) {
13398
13206
  this.durations = [], this.timeout = timeout, this.lastDate = 0, this.durationsListThreshold = 30;
13399
13207
  }
13400
13208
  call(cb) {
@@ -13661,8 +13469,7 @@ class TagPointsUpdate extends ACustomAnimate {
13661
13469
  var _a, _b;
13662
13470
  super(from, to, duration, easing, params), this.newPointAnimateType = null !== (_a = null == params ? void 0 : params.newPointAnimateType) && void 0 !== _a ? _a : "grow", this.clipRangeByDimension = null !== (_b = null == params ? void 0 : params.clipRangeByDimension) && void 0 !== _b ? _b : "x";
13663
13471
  }
13664
- getPoints(attribute) {
13665
- let cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
13472
+ getPoints(attribute, cache = !1) {
13666
13473
  if (attribute.points) return attribute.points;
13667
13474
  if (attribute.segments) {
13668
13475
  const points = [];
@@ -14544,9 +14351,7 @@ var ColorType;
14544
14351
  ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
14545
14352
  }(ColorType || (ColorType = {}));
14546
14353
  class ColorStore {
14547
- static Get(str) {
14548
- let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorType.Color1;
14549
- let arr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0, 1];
14354
+ static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
14550
14355
  if (size === ColorType.Color1) {
14551
14356
  const color = ColorStore.store1[str];
14552
14357
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
@@ -14574,8 +14379,7 @@ class ColorStore {
14574
14379
  }
14575
14380
  ColorStore.store255 = {}, ColorStore.store1 = {};
14576
14381
 
14577
- function colorArrayToString(color) {
14578
- let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
14382
+ function colorArrayToString(color, alphaChannel = !1) {
14579
14383
  return Array.isArray(color) && isNumber$1(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
14580
14384
  }
14581
14385
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
@@ -15192,8 +14996,7 @@ class SquareSymbol extends BaseSymbol {
15192
14996
  }
15193
14997
  var square$3 = new SquareSymbol();
15194
14998
 
15195
- function trianglUpOffset(ctx, r, x, y) {
15196
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
14999
+ function trianglUpOffset(ctx, r, x, y, offset = 0) {
15197
15000
  return ctx.moveTo(x + r + 2 * offset, r + y + offset), ctx.lineTo(x - r - 2 * offset, r + y + offset), ctx.lineTo(x, y - r - 2 * offset), ctx.closePath(), !0;
15198
15001
  }
15199
15002
  class TriangleUpSymbol extends BaseSymbol {
@@ -15339,8 +15142,7 @@ class TriangleLeftSymbol extends BaseSymbol {
15339
15142
  }
15340
15143
  var triangleLeft = new TriangleLeftSymbol();
15341
15144
 
15342
- function trianglRightOffset(ctx, r, x, y) {
15343
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
15145
+ function trianglRightOffset(ctx, r, x, y, offset = 0) {
15344
15146
  return ctx.moveTo(x - r - offset, r + y + 2 * offset), ctx.lineTo(r + x + 2 * offset, y), ctx.lineTo(x - r - offset, y - r - 2 * offset), ctx.closePath(), !0;
15345
15147
  }
15346
15148
  class TriangleRightSymbol extends BaseSymbol {
@@ -15356,8 +15158,7 @@ class TriangleRightSymbol extends BaseSymbol {
15356
15158
  }
15357
15159
  var triangleRight = new TriangleRightSymbol();
15358
15160
 
15359
- function trianglDownOffset(ctx, r, x, y) {
15360
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
15161
+ function trianglDownOffset(ctx, r, x, y, offset = 0) {
15361
15162
  return ctx.moveTo(x - r - 2 * offset, y - r - offset), ctx.lineTo(x + r + 2 * offset, y - r - offset), ctx.lineTo(x, y + r + 2 * offset), ctx.closePath(), !0;
15362
15163
  }
15363
15164
  class TriangleDownSymbol extends BaseSymbol {
@@ -15574,8 +15375,7 @@ var rect = new RectSymbol();
15574
15375
 
15575
15376
  const tempBounds = new AABBBounds();
15576
15377
  class CustomSymbolClass {
15577
- constructor(type, path) {
15578
- let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
15378
+ constructor(type, path, isSvg = !1) {
15579
15379
  this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
15580
15380
  }
15581
15381
  drawOffset(ctx, size, x, y, offset, z, cb) {
@@ -15597,10 +15397,9 @@ class CustomSymbolClass {
15597
15397
  bounds(size, bounds) {
15598
15398
  if (size = this.parseSize(size), this.isSvg) {
15599
15399
  if (!this.svgCache) return;
15600
- return bounds.clear(), void this.svgCache.forEach(_ref => {
15601
- let {
15602
- path: path
15603
- } = _ref;
15400
+ return bounds.clear(), void this.svgCache.forEach(({
15401
+ path: path
15402
+ }) => {
15604
15403
  tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size, tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
15605
15404
  });
15606
15405
  }
@@ -15656,8 +15455,7 @@ function findClosingIndex(xmlData, str, i, errMsg) {
15656
15455
  if (-1 === closingIndex) throw new Error(errMsg);
15657
15456
  return closingIndex + str.length - 1;
15658
15457
  }
15659
- function tagExpWithClosingIndex(xmlData, i) {
15660
- let closingChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ">";
15458
+ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
15661
15459
  let attrBoundary,
15662
15460
  tagExp = "";
15663
15461
  for (let index = i; index < xmlData.length; index++) {
@@ -15675,8 +15473,7 @@ function tagExpWithClosingIndex(xmlData, i) {
15675
15473
  tagExp += ch;
15676
15474
  }
15677
15475
  }
15678
- function readTagExp(xmlData, i, removeNSPrefix) {
15679
- let closingChar = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ">";
15476
+ function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") {
15680
15477
  const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
15681
15478
  if (!result) return;
15682
15479
  let tagExp = result.data;
@@ -15857,8 +15654,7 @@ function waitForAllSubLayers(stage) {
15857
15654
  }), yield Promise.all(promiseList);
15858
15655
  });
15859
15656
  }
15860
- function boundStroke(bounds, halfW, miter) {
15861
- let pad = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
15657
+ function boundStroke(bounds, halfW, miter, pad = 0) {
15862
15658
  return bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0))), bounds;
15863
15659
  }
15864
15660
  function miterAdjustment(miter, strokeWidth) {
@@ -15994,8 +15790,7 @@ class Graphic extends Node {
15994
15790
  get globalTransMatrix() {
15995
15791
  return this.tryUpdateGlobalTransMatrix(!0);
15996
15792
  }
15997
- constructor() {
15998
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15793
+ constructor(params = {}) {
15999
15794
  var _a;
16000
15795
  super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
16001
15796
  }
@@ -16008,8 +15803,7 @@ class Graphic extends Node {
16008
15803
  set2dMode() {
16009
15804
  this.in3dMode = !1;
16010
15805
  }
16011
- getOffsetXY(attr) {
16012
- let includeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
15806
+ getOffsetXY(attr, includeScroll = !1) {
16013
15807
  var _a, _b;
16014
15808
  const {
16015
15809
  dx = attr.dx,
@@ -16038,10 +15832,9 @@ class Graphic extends Node {
16038
15832
  return this.doUpdateOBBBounds();
16039
15833
  }
16040
15834
  combindShadowAABBBounds(bounds) {
16041
- if (this.shadowRoot) {
16042
- const b = this.shadowRoot.AABBBounds.clone();
16043
- bounds.union(b);
16044
- }
15835
+ if (!this.shadowRoot) return;
15836
+ const b = this.shadowRoot.AABBBounds.clone();
15837
+ bounds.union(b);
16045
15838
  }
16046
15839
  doUpdateOBBBounds() {
16047
15840
  return this._OBBBounds;
@@ -16120,7 +15913,7 @@ class Graphic extends Node {
16120
15913
  const b = this.AABBBounds;
16121
15914
  return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this._globalAABBBounds.empty() || this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
16122
15915
  }
16123
- tryUpdateGlobalTransMatrix() {
15916
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
16124
15917
  if (this._globalTransMatrix) {
16125
15918
  if (this.parent) {
16126
15919
  const m = this.parent.globalTransMatrix;
@@ -16132,8 +15925,7 @@ class Graphic extends Node {
16132
15925
  shouldUpdateGlobalMatrix() {
16133
15926
  return !0;
16134
15927
  }
16135
- tryUpdateLocalTransMatrix() {
16136
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
15928
+ tryUpdateLocalTransMatrix(clearTag = !0) {
16137
15929
  return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
16138
15930
  }
16139
15931
  shouldUpdateAABBBounds() {
@@ -16173,14 +15965,10 @@ class Graphic extends Node {
16173
15965
  setWidthHeightWithoutTransform(aabbBounds) {
16174
15966
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
16175
15967
  }
16176
- setAttributes(params) {
16177
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
16178
- let context = arguments.length > 2 ? arguments[2] : undefined;
15968
+ setAttributes(params, forceUpdateTag = !1, context) {
16179
15969
  (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
16180
15970
  }
16181
- _setAttributes(params) {
16182
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
16183
- let context = arguments.length > 2 ? arguments[2] : undefined;
15971
+ _setAttributes(params, forceUpdateTag = !1, context) {
16184
15972
  const keys = Object.keys(params);
16185
15973
  for (let i = 0; i < keys.length; i++) {
16186
15974
  const key = keys[i];
@@ -16195,16 +15983,14 @@ class Graphic extends Node {
16195
15983
  }, this.attribute, key, context);
16196
15984
  params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
16197
15985
  }
16198
- needUpdateTags(keys) {
16199
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
15986
+ needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
16200
15987
  for (let i = 0; i < k.length; i++) {
16201
15988
  const attrKey = k[i];
16202
15989
  if (-1 !== keys.indexOf(attrKey)) return !0;
16203
15990
  }
16204
15991
  return !1;
16205
15992
  }
16206
- needUpdateTag(key) {
16207
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
15993
+ needUpdateTag(key, k = GRAPHIC_UPDATE_TAG_KEY) {
16208
15994
  for (let i = 0; i < k.length; i++) {
16209
15995
  if (key === k[i]) return !0;
16210
15996
  }
@@ -16368,8 +16154,7 @@ class Graphic extends Node {
16368
16154
  newNormalAttrs[key] = this.getNormalAttribute(key);
16369
16155
  }), this.normalAttrs = newNormalAttrs;
16370
16156
  }
16371
- stopStateAnimates() {
16372
- let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
16157
+ stopStateAnimates(type = "end") {
16373
16158
  this.animates && this.animates.forEach(animate => {
16374
16159
  animate.stateNames && (animate.stop(type), this.animates.delete(animate.id));
16375
16160
  });
@@ -16611,8 +16396,7 @@ class Graphic extends Node {
16611
16396
  var _a;
16612
16397
  return null !== (_a = this.attribute[name]) && void 0 !== _a ? _a : this.getDefaultAttribute(name);
16613
16398
  }
16614
- onSetStage(cb) {
16615
- let immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
16399
+ onSetStage(cb, immediate = !1) {
16616
16400
  this._onSetStage = cb, immediate && this.stage && cb(this, this.stage);
16617
16401
  }
16618
16402
  attachShadow(shadowRoot) {
@@ -16633,8 +16417,7 @@ class Graphic extends Node {
16633
16417
  createPathProxy(path) {
16634
16418
  return isString$1(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
16635
16419
  }
16636
- loadImage(image) {
16637
- let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
16420
+ loadImage(image, background = !1) {
16638
16421
  if (!image || background && backgroundNotImage(image)) return;
16639
16422
  const url = image;
16640
16423
  this.resources || (this.resources = new Map());
@@ -16664,8 +16447,7 @@ class Graphic extends Node {
16664
16447
  animate.stop();
16665
16448
  });
16666
16449
  }
16667
- stopAnimates() {
16668
- let stopChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
16450
+ stopAnimates(stopChildren = !1) {
16669
16451
  this._stopAnimates(this.animates), this.shadowRoot && this.shadowRoot.stopAnimates(!0), this.isContainer && stopChildren && this.forEachChildren(c => {
16670
16452
  c.stopAnimates(stopChildren);
16671
16453
  });
@@ -16804,8 +16586,7 @@ let Group$1 = class Group extends Graphic {
16804
16586
  _updateChildToStage(child) {
16805
16587
  return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
16806
16588
  }
16807
- appendChild(node) {
16808
- let addStage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
16589
+ appendChild(node, addStage = !0) {
16809
16590
  const data = super.appendChild(node);
16810
16591
  return addStage && this.stage && data && data.setStage(this.stage, this.layer), this.addUpdateBoundTag(), data;
16811
16592
  }
@@ -16822,8 +16603,7 @@ let Group$1 = class Group extends Graphic {
16822
16603
  const data = super.removeChild(child);
16823
16604
  return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
16824
16605
  }
16825
- removeAllChild() {
16826
- let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
16606
+ removeAllChild(deep = !1) {
16827
16607
  this.forEachChildren(child => {
16828
16608
  application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
16829
16609
  }), super.removeAllChild(), this.addUpdateBoundTag();
@@ -16843,8 +16623,7 @@ let Group$1 = class Group extends Graphic {
16843
16623
  g.isContainer && g.addUpdateGlobalPositionTag();
16844
16624
  });
16845
16625
  }
16846
- tryUpdateGlobalTransMatrix() {
16847
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
16626
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
16848
16627
  if (this.shouldUpdateGlobalMatrix()) {
16849
16628
  if (this._globalTransMatrix) {
16850
16629
  if (this.parent) {
@@ -16918,8 +16697,7 @@ class Layer extends Group$1 {
16918
16697
  zIndex: null !== (_a = params.zIndex) && void 0 !== _a ? _a : 0
16919
16698
  }), this.layer = this, this.subLayers = new Map(), this.theme = new Theme(), this.background = "rgba(0, 0, 0, 0)", this.afterDrawCbs = [];
16920
16699
  }
16921
- combineSubLayer() {
16922
- let removeIncrementalKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
16700
+ combineSubLayer(removeIncrementalKey = !0) {
16923
16701
  const subLayers = Array.from(this.subLayers.values()).sort((a, b) => a.zIndex - b.zIndex);
16924
16702
  this.layerHandler.merge(subLayers.map(l => (l.layer.subLayers.size && l.layer.combineSubLayer(removeIncrementalKey), l.layer.getNativeHandler()))), removeIncrementalKey && subLayers.forEach(l => {
16925
16703
  l.group && (l.group.incremental = 0);
@@ -17028,10 +16806,9 @@ let DefaultLayerService = DefaultLayerService_1 = class {
17028
16806
  let layerHandler;
17029
16807
  return layerHandler = "static" === layerMode ? container.get(StaticLayerHandlerContribution) : "dynamic" === layerMode ? container.get(DynamicLayerHandlerContribution) : container.get(VirtualLayerHandlerContribution), layerHandler;
17030
16808
  }
17031
- createLayer(stage) {
17032
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
17033
- main: !1
17034
- };
16809
+ createLayer(stage, options = {
16810
+ main: !1
16811
+ }) {
17035
16812
  var _a;
17036
16813
  this.tryInit();
17037
16814
  let layerMode = this.getRecommendedLayerType(options.layerMode);
@@ -17277,9 +17054,7 @@ class ColorInterpolate extends LRU {
17277
17054
  static getInstance() {
17278
17055
  return ColorInterpolate._instance || (ColorInterpolate._instance = new ColorInterpolate()), ColorInterpolate._instance;
17279
17056
  }
17280
- constructor() {
17281
- let stops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
17282
- let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
17057
+ constructor(stops = [], precision = 100) {
17283
17058
  super(), this.cacheParams = {
17284
17059
  CLEAN_THRESHOLD: 100,
17285
17060
  L_TIME: 1e3
@@ -17297,9 +17072,7 @@ class ColorInterpolate extends LRU {
17297
17072
  const rgba = this.rgbaSet.slice(4 * offset, 4 * offset + 4);
17298
17073
  return `rgba(${rgba[0]}, ${rgba[1]}, ${rgba[2]}, ${rgba[3] / 255})`;
17299
17074
  }
17300
- GetOrCreate(x, y, w, h) {
17301
- let stops = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
17302
- let precision = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 100;
17075
+ GetOrCreate(x, y, w, h, stops = [], precision = 100) {
17303
17076
  let str = `${x}${y}${w}${h}`;
17304
17077
  stops.forEach(item => str += item.join()), str += precision;
17305
17078
  let colorInter = this.dataMap.get(str);
@@ -17398,8 +17171,7 @@ const InteractiveSubRenderContribution = Symbol.for("InteractiveSubRenderContrib
17398
17171
  function textDrawOffsetX(textAlign, width) {
17399
17172
  return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
17400
17173
  }
17401
- function textLayoutOffsetY(baseline, lineHeight, fontSize) {
17402
- let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
17174
+ function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
17403
17175
  return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
17404
17176
  }
17405
17177
  function textAttributesToStyle(attrs) {
@@ -17544,7 +17316,7 @@ class DefaultMatrixAllocate {
17544
17316
  get length() {
17545
17317
  return this.pools.length;
17546
17318
  }
17547
- release() {
17319
+ release(...params) {
17548
17320
  this.pools = [];
17549
17321
  }
17550
17322
  }
@@ -17572,7 +17344,7 @@ class DefaultMat4Allocate {
17572
17344
  get length() {
17573
17345
  return this.pools.length;
17574
17346
  }
17575
- release() {
17347
+ release(...params) {
17576
17348
  this.pools = [];
17577
17349
  }
17578
17350
  }
@@ -17789,10 +17561,9 @@ const updateBoundsOfCommonOuterBorder = (attribute, theme, aabbBounds) => {
17789
17561
 
17790
17562
  const CIRCLE_UPDATE_TAG_KEY = ["radius", "startAngle", "endAngle", ...GRAPHIC_UPDATE_TAG_KEY];
17791
17563
  class Circle extends Graphic {
17792
- constructor() {
17793
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
17794
- radius: 1
17795
- };
17564
+ constructor(params = {
17565
+ radius: 1
17566
+ }) {
17796
17567
  super(params), this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
17797
17568
  }
17798
17569
  isValid() {
@@ -17873,10 +17644,7 @@ class CanvasTextLayout {
17873
17644
  } else bbox.yOffset = -bbox.height;
17874
17645
  return bbox;
17875
17646
  }
17876
- GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
17877
- let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
17878
- let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
17879
- let params = arguments.length > 6 ? arguments[6] : undefined;
17647
+ GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = "", wordBreak, params) {
17880
17648
  const {
17881
17649
  lineWidth: lineWidth,
17882
17650
  suffixPosition = "end",
@@ -17999,11 +17767,10 @@ let Text$1 = class Text extends Graphic {
17999
17767
  get isMultiLine() {
18000
17768
  return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
18001
17769
  }
18002
- constructor() {
18003
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
18004
- text: "",
18005
- fontSize: 16
18006
- };
17770
+ constructor(params = {
17771
+ text: "",
17772
+ fontSize: 16
17773
+ }) {
18007
17774
  super(params), this.type = "text", this.numberType = TEXT_NUMBER_TYPE, this.cache = {};
18008
17775
  }
18009
17776
  isValid() {
@@ -18335,12 +18102,10 @@ let Text$1 = class Text extends Graphic {
18335
18102
  var _a;
18336
18103
  return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
18337
18104
  }
18338
- needUpdateTags(keys) {
18339
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
18105
+ needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
18340
18106
  return super.needUpdateTags(keys, k);
18341
18107
  }
18342
- needUpdateTag(key) {
18343
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
18108
+ needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
18344
18109
  return super.needUpdateTag(key, k);
18345
18110
  }
18346
18111
  _interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
@@ -18399,19 +18164,15 @@ const updateBoundsOfSymbolOuterBorder = (attribute, symbolTheme, aabbBounds) =>
18399
18164
 
18400
18165
  const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
18401
18166
  let Symbol$1 = class Symbol extends Graphic {
18402
- constructor() {
18403
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
18404
- symbolType: "circle"
18405
- };
18167
+ constructor(params = {
18168
+ symbolType: "circle"
18169
+ }) {
18406
18170
  super(params), this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
18407
18171
  }
18408
18172
  getParsedPath() {
18409
18173
  return this.shouldUpdateShape() && (this._parsedPath = this.doUpdateParsedPath(), this.clearUpdateShapeTag()), this._parsedPath;
18410
18174
  }
18411
- getParsedPath2D() {
18412
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
18413
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
18414
- let size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
18175
+ getParsedPath2D(x = 0, y = 0, size = 1) {
18415
18176
  let path = null;
18416
18177
  try {
18417
18178
  path = new Path2D();
@@ -18496,8 +18257,7 @@ function createSymbol(attributes) {
18496
18257
 
18497
18258
  const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
18498
18259
  let Line$1 = class Line extends Graphic {
18499
- constructor() {
18500
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18260
+ constructor(params = {}) {
18501
18261
  super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
18502
18262
  }
18503
18263
  isValid() {
@@ -18734,9 +18494,7 @@ class Glyph extends Graphic {
18734
18494
  g.addUpdateShapeAndBoundsTag(), g.addUpdatePositionTag();
18735
18495
  });
18736
18496
  }
18737
- setAttributes(params) {
18738
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
18739
- let context = arguments.length > 2 ? arguments[2] : undefined;
18497
+ setAttributes(params, forceUpdateTag = !1, context) {
18740
18498
  super.setAttributes(params, forceUpdateTag, context), this.subGraphic.forEach(g => {
18741
18499
  g.addUpdateShapeAndBoundsTag(), g.addUpdatePositionTag();
18742
18500
  });
@@ -19392,8 +19150,7 @@ class Wrapper {
19392
19150
  line = new Line(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
19393
19151
  this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
19394
19152
  }
19395
- deal(paragraph) {
19396
- let singleLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
19153
+ deal(paragraph, singleLine = !1) {
19397
19154
  paragraph instanceof RichTextIcon ? "horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : 0 === this.lineBuffer.length ? (this.store(paragraph), this.send()) : (this.send(), this.deal(paragraph)) : "number" != typeof this.width || this.width < 0 || (paragraph.newLine && this.send(), (0 !== paragraph.text.length || this.newLine) && ("horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : this.lineWidth === this[this.directionKey.width] ? (this.send(), this.deal(paragraph)) : this.cut(paragraph, singleLine)));
19398
19155
  }
19399
19156
  cut(paragraph, singleLine) {
@@ -20327,8 +20084,7 @@ class ShadowRoot extends Group$1 {
20327
20084
  addUpdateShapeAndBoundsTag() {
20328
20085
  super.addUpdateShapeAndBoundsTag(), this.shadowHost && this.shadowHost.addUpdateBoundTag();
20329
20086
  }
20330
- tryUpdateGlobalTransMatrix() {
20331
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
20087
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
20332
20088
  if (this.shouldUpdateGlobalMatrix()) {
20333
20089
  const m = this.transMatrix;
20334
20090
  this._globalTransMatrix ? this._globalTransMatrix.setValue(m.a, m.b, m.c, m.d, m.e, m.f) : this._globalTransMatrix = m.clone(), this.doUpdateGlobalMatrix(), clearTag && this.clearUpdateGlobalPositionTag();
@@ -20858,9 +20614,7 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
20858
20614
  const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
20859
20615
 
20860
20616
  const halfPi = pi$1 / 2;
20861
- function createRectPath(path, x, y, width, height, rectCornerRadius) {
20862
- let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
20863
- let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
20617
+ function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
20864
20618
  let cornerRadius;
20865
20619
  if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
20866
20620
  const cornerRadiusArr = rectCornerRadius;
@@ -21201,8 +20955,7 @@ class BaseRender {
21201
20955
  doStroke: doStroke
21202
20956
  };
21203
20957
  }
21204
- transform(graphic, graphicAttribute, context) {
21205
- let use3dMatrixIn3dMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
20958
+ transform(graphic, graphicAttribute, context, use3dMatrixIn3dMode = !1) {
21206
20959
  const {
21207
20960
  x = graphicAttribute.x,
21208
20961
  y = graphicAttribute.y,
@@ -22330,7 +22083,7 @@ class DefaultBoundsAllocate {
22330
22083
  get length() {
22331
22084
  return this.pools.length;
22332
22085
  }
22333
- release() {
22086
+ release(...params) {
22334
22087
  this.pools = [];
22335
22088
  }
22336
22089
  }
@@ -22553,8 +22306,7 @@ function drawPolygon(path, points, x, y) {
22553
22306
  path.moveTo(points[0].x + x, points[0].y + y);
22554
22307
  for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
22555
22308
  }
22556
- function drawRoundedPolygon(path, points, x, y, cornerRadius) {
22557
- let closePath = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
22309
+ function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
22558
22310
  var _a;
22559
22311
  if (points.length < 3) return void drawPolygon(path, points, x, y);
22560
22312
  let startI = 0,
@@ -23303,7 +23055,7 @@ let DefaultPluginService = class {
23303
23055
  unRegister(plugin) {
23304
23056
  "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
23305
23057
  }
23306
- release() {
23058
+ release(...params) {
23307
23059
  this.onStartupFinishedPlugin.forEach(plugin => {
23308
23060
  plugin.deactivate(this);
23309
23061
  }), this.onStartupFinishedPlugin = [], this.onRegisterPlugin.forEach(plugin => {
@@ -23450,9 +23202,7 @@ function parseChildMap(graphic, defaultZIndex, reverse) {
23450
23202
  zIdxArray: zIdxArray
23451
23203
  };
23452
23204
  }
23453
- function foreach(graphic, defaultZIndex, cb) {
23454
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
23455
- let sort3d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
23205
+ function foreach(graphic, defaultZIndex, cb, reverse = !1, sort3d = !1) {
23456
23206
  let needSort = !1;
23457
23207
  if (sort3d) needSort = !0;else {
23458
23208
  let lastZIndex;
@@ -23483,14 +23233,12 @@ function foreach(graphic, defaultZIndex, cb) {
23483
23233
  }
23484
23234
  } else graphic.forEachChildren(cb, reverse);
23485
23235
  }
23486
- function foreachAsync(graphic, defaultZIndex, cb) {
23487
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
23236
+ function foreachAsync(graphic, defaultZIndex, cb, reverse = !1) {
23488
23237
  return __awaiter$6(this, void 0, void 0, function* () {
23489
23238
  yield graphic.forEachChildrenAsync(cb, reverse);
23490
23239
  });
23491
23240
  }
23492
- function findNextGraphic(graphic, id, defaultZIndex) {
23493
- let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
23241
+ function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
23494
23242
  let needSort = !1;
23495
23243
  graphic.forEachChildren((item, i) => {
23496
23244
  const {
@@ -24223,8 +23971,7 @@ class Stage extends Group$1 {
24223
23971
  get eventSystem() {
24224
23972
  return this._eventSystem;
24225
23973
  }
24226
- constructor() {
24227
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23974
+ constructor(params = {}) {
24228
23975
  var _a;
24229
23976
  super({}), this.tickedBeforeRender = !0, this._onVisibleChange = visible => {
24230
23977
  if (!(this._skipRender < 0)) if (visible) {
@@ -24259,8 +24006,7 @@ class Stage extends Group$1 {
24259
24006
  background: this._background
24260
24007
  }), this.ticker.on("afterTick", this.afterTickCb);
24261
24008
  }
24262
- pauseRender() {
24263
- let sr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
24009
+ pauseRender(sr = -1) {
24264
24010
  this._skipRender = sr;
24265
24011
  }
24266
24012
  resumeRender() {
@@ -24282,8 +24028,7 @@ class Stage extends Group$1 {
24282
24028
  optmize(params) {
24283
24029
  this.optmizeRender(params.skipRenderWithOutRange), this.params.optimize = params;
24284
24030
  }
24285
- optmizeRender() {
24286
- let skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
24031
+ optmizeRender(skipRenderWithOutRange = !1) {
24287
24032
  skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(this._onVisibleChange));
24288
24033
  }
24289
24034
  getTimeline() {
@@ -24537,18 +24282,15 @@ class Stage extends Group$1 {
24537
24282
  renderStyle: this.renderStyle
24538
24283
  }, params)));
24539
24284
  }
24540
- resizeWindow(w, h) {
24541
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24285
+ resizeWindow(w, h, rerender = !0) {
24542
24286
  this.window.resize(w, h), rerender && this.render();
24543
24287
  }
24544
- resize(w, h) {
24545
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24288
+ resize(w, h, rerender = !0) {
24546
24289
  "released" !== this.releaseStatus && (this.window.hasSubView() || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.window.resize(w, h), this.forEachChildren(c => {
24547
24290
  c.resize(w, h);
24548
24291
  }), this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render());
24549
24292
  }
24550
- resizeView(w, h) {
24551
- let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24293
+ resizeView(w, h, rerender = !0) {
24552
24294
  "released" !== this.releaseStatus && (this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.forEachChildren(c => {
24553
24295
  c.resizeView(w, h);
24554
24296
  }), this.camera && (this.camera.params = Object.assign(Object.assign({}, this.camera.params), {
@@ -24562,8 +24304,7 @@ class Stage extends Group$1 {
24562
24304
  c.resizeView(this.viewBox.width(), this.viewBox.height());
24563
24305
  }), isRerender && this.render();
24564
24306
  }
24565
- setDpr(dpr) {
24566
- let rerender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
24307
+ setDpr(dpr, rerender = !0) {
24567
24308
  this.forEachChildren(c => {
24568
24309
  c.setDpr(dpr);
24569
24310
  }), rerender && this.render();
@@ -24613,8 +24354,7 @@ class Stage extends Group$1 {
24613
24354
  });
24614
24355
  });
24615
24356
  }
24616
- renderToNewWindow() {
24617
- let viewBox = arguments.length > 1 ? arguments[1] : undefined;
24357
+ renderToNewWindow(fullImage = !0, viewBox) {
24618
24358
  if ("released" === this.releaseStatus) return;
24619
24359
  const window = container.get(VWindow),
24620
24360
  x1 = viewBox ? -viewBox.x1 : 0,
@@ -24638,9 +24378,7 @@ class Stage extends Group$1 {
24638
24378
  title: ""
24639
24379
  }), this.renderTo(window), window;
24640
24380
  }
24641
- toCanvas() {
24642
- let fullImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
24643
- let viewBox = arguments.length > 1 ? arguments[1] : undefined;
24381
+ toCanvas(fullImage = !0, viewBox) {
24644
24382
  if ("released" === this.releaseStatus) return;
24645
24383
  const c = this.renderToNewWindow(fullImage, viewBox).getNativeHandler();
24646
24384
  return c.nativeCanvas ? c.nativeCanvas : null;
@@ -24701,8 +24439,7 @@ let EmptyContext2d = class {
24701
24439
  getContext() {
24702
24440
  throw new Error("不支持getContext");
24703
24441
  }
24704
- setTransformForCurrent() {
24705
- let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
24442
+ setTransformForCurrent(force = !1) {
24706
24443
  !force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix = this.cloneMatrix(this.matrix));
24707
24444
  }
24708
24445
  get currentMatrix() {
@@ -24720,8 +24457,7 @@ let EmptyContext2d = class {
24720
24457
  highPerformanceRestore() {
24721
24458
  this.stack.length > 0 && (matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
24722
24459
  }
24723
- rotate(rad) {
24724
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
24460
+ rotate(rad, setTransform = !0) {
24725
24461
  this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
24726
24462
  }
24727
24463
  save() {
@@ -24732,55 +24468,41 @@ let EmptyContext2d = class {
24732
24468
  const matrix = this.cloneMatrix(this.matrix);
24733
24469
  this.stack.push(matrix);
24734
24470
  }
24735
- scale(sx, sy) {
24736
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24471
+ scale(sx, sy, setTransform = !0) {
24737
24472
  this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
24738
24473
  }
24739
- setScale(sx, sy) {
24740
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24474
+ setScale(sx, sy, setTransform = !0) {
24741
24475
  this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
24742
24476
  }
24743
- scalePoint(sx, sy, px, py) {
24744
- let setTransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
24477
+ scalePoint(sx, sy, px, py, setTransform = !0) {
24745
24478
  this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1), setTransform && this.setTransformForCurrent();
24746
24479
  }
24747
- setTransform(a, b, c, d, e, f) {
24748
- let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
24749
- let dpr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : this.dpr;
24480
+ setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
24750
24481
  this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
24751
24482
  }
24752
- setTransformFromMatrix(matrix) {
24753
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
24754
- let dpr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dpr;
24483
+ setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
24755
24484
  this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr), setTransform && this.setTransformForCurrent();
24756
24485
  }
24757
- resetTransform() {
24758
- let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
24759
- let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
24486
+ resetTransform(setTransform = !0, dpr = this.dpr) {
24760
24487
  this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
24761
24488
  }
24762
- transform(a, b, c, d, e, f) {
24763
- let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
24489
+ transform(a, b, c, d, e, f, setTransform = !0) {
24764
24490
  this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
24765
24491
  }
24766
24492
  transformFromMatrix(matrix, setTransform) {
24767
24493
  this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), setTransform && this.setTransformForCurrent();
24768
24494
  }
24769
- translate(x, y) {
24770
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
24495
+ translate(x, y, setTransform = !0) {
24771
24496
  this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
24772
24497
  }
24773
- rotateDegrees(deg) {
24774
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
24498
+ rotateDegrees(deg, setTransform = !0) {
24775
24499
  const rad = deg * Math.PI / 180;
24776
24500
  this.rotate(rad, setTransform);
24777
24501
  }
24778
- rotateAbout(rad, x, y) {
24779
- let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
24502
+ rotateAbout(rad, x, y, setTransform = !0) {
24780
24503
  this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
24781
24504
  }
24782
- rotateDegreesAbout(deg, x, y) {
24783
- let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
24505
+ rotateDegreesAbout(deg, x, y, setTransform = !0) {
24784
24506
  this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
24785
24507
  }
24786
24508
  beginPath() {
@@ -24874,19 +24596,16 @@ let EmptyContext2d = class {
24874
24596
  setTextStyleWithoutAlignBaseline(params, defaultParams) {}
24875
24597
  setTextStyle(params, defaultParams) {}
24876
24598
  draw() {}
24877
- clearMatrix() {
24878
- let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
24879
- let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
24599
+ clearMatrix(setTransform = !0, dpr = this.dpr) {
24880
24600
  this.setTransformFromMatrix(initMatrix, setTransform, dpr);
24881
24601
  }
24882
24602
  setClearMatrix(a, b, c, d, e, f) {
24883
24603
  this._clearMatrix.setValue(a, b, c, d, e, f);
24884
24604
  }
24885
- onlyTranslate() {
24886
- let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
24605
+ onlyTranslate(dpr = this.dpr) {
24887
24606
  return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
24888
24607
  }
24889
- release() {
24608
+ release(...params) {
24890
24609
  this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
24891
24610
  }
24892
24611
  };
@@ -24986,7 +24705,7 @@ class BaseCanvas {
24986
24705
  transferToImageBitmap() {
24987
24706
  throw new Error("暂未实现");
24988
24707
  }
24989
- release() {
24708
+ release(...params) {
24990
24709
  this.controled && this._nativeCanvas.parentElement && this._nativeCanvas.parentElement.removeChild(this._nativeCanvas);
24991
24710
  }
24992
24711
  }
@@ -25025,7 +24744,7 @@ var __decorate$17 = undefined && undefined.__decorate || function (decorators, t
25025
24744
  });
25026
24745
  };
25027
24746
  let BaseEnvContribution = class {
25028
- configure(service) {
24747
+ configure(service, ...p) {
25029
24748
  service.env === this.type && service.setActiveEnvContribution(this);
25030
24749
  }
25031
24750
  getNativeAABBBounds(dom) {
@@ -25128,7 +24847,7 @@ let BaseWindowHandlerContribution = class {
25128
24847
  configure(window, global) {
25129
24848
  global.env === this.type && window.setWindowHandler(this);
25130
24849
  }
25131
- release() {
24850
+ release(...params) {
25132
24851
  this.releaseWindow();
25133
24852
  }
25134
24853
  isVisible(bbox) {
@@ -25157,8 +24876,7 @@ let BaseWindowHandlerContribution = class {
25157
24876
  BaseWindowHandlerContribution = __decorate$16([injectable(), __metadata$R("design:paramtypes", [])], BaseWindowHandlerContribution);
25158
24877
 
25159
24878
  class DirectionalLight {
25160
- constructor(dir, color) {
25161
- let ambient = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .8;
24879
+ constructor(dir, color, ambient = .8) {
25162
24880
  this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
25163
24881
  const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
25164
24882
  this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
@@ -26317,15 +26035,13 @@ const splitAccessPath = p => {
26317
26035
  return b && error("Access path missing closing bracket: " + p), q && error("Access path missing closing quote: " + p), j > i && (j += 1, push()), path;
26318
26036
  };
26319
26037
 
26320
- const fieldSingle = function (fieldStr, name) {
26321
- let opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26038
+ const fieldSingle = (fieldStr, name, opt = {}) => {
26322
26039
  if (isFunction$1(fieldStr)) return fieldStr;
26323
26040
  const path = splitAccessPath(fieldStr),
26324
26041
  parsedField = 1 === path.length ? path[0] : fieldStr;
26325
26042
  return accessor((opt && opt.get || getter)(path), [parsedField], name || parsedField);
26326
26043
  };
26327
- const field$3 = function (fieldStr, name) {
26328
- let opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26044
+ const field$3 = (fieldStr, name, opt = {}) => {
26329
26045
  if (isArray$1(fieldStr)) {
26330
26046
  const funcs = fieldStr.map(entry => fieldSingle(entry, name, opt));
26331
26047
  return datum => funcs.map(func => func(datum));
@@ -26371,9 +26087,7 @@ function rSquared(data, x, y, uY, predict) {
26371
26087
  SSE += sse * sse, SST += sst * sst;
26372
26088
  }), 1 - SSE / SST;
26373
26089
  }
26374
- function regressionLinear(data) {
26375
- let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datum => datum.x;
26376
- let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : datum => datum.y;
26090
+ function regressionLinear(data, x = datum => datum.x, y = datum => datum.y) {
26377
26091
  let X = 0,
26378
26092
  Y = 0,
26379
26093
  XY = 0,
@@ -26545,15 +26259,11 @@ const drawTextMask = (shape, width, height, ctx) => {
26545
26259
  ctx.fillText(text, width / 2, height / 2), ctx.scale(scale, scale);
26546
26260
  } else baseFontSize = Math.floor(baseFontSize * width / textWidth), baseFontSize = Math.min(baseFontSize, height), ctx.font = `${fontStyle} ${fontVariant} ${fontWeight} ${baseFontSize}px ${fontFamily}`, ctx.fillText(text, Math.floor(width / 2), Math.floor(height / 2));
26547
26261
  };
26548
- const generatePoints = function (center, radius) {
26549
- let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
26550
- let count = arguments.length > 3 ? arguments[3] : undefined;
26262
+ const generatePoints = (center, radius, startAngle = 0, count) => {
26551
26263
  const angle = 2 * Math.PI / count;
26552
26264
  return new Array(count).fill(0).map((entry, index) => polarToCartesian(center, radius, startAngle + index * angle));
26553
26265
  };
26554
- const generateCardioidPoints = function (center, radius) {
26555
- let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
26556
- let count = arguments.length > 3 ? arguments[3] : undefined;
26266
+ const generateCardioidPoints = (center, radius, startAngle = 0, count) => {
26557
26267
  const angle = 2 * Math.PI / count,
26558
26268
  func = getShapeFunction("cardioid");
26559
26269
  return new Array(count).fill(0).map((entry, index) => {
@@ -26771,8 +26481,7 @@ const calcDirection = (start, end) => {
26771
26481
  };
26772
26482
  };
26773
26483
  class Gesture extends EventEmitter {
26774
- constructor(element) {
26775
- let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26484
+ constructor(element, config = {}) {
26776
26485
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
26777
26486
  super(), this.cachedEvents = [], this.startPoints = [], this.processEvent = {}, this.throttleTimer = 0, this.emitThrottles = [], this.lastTapTarget = null, this.onStart = ev => {
26778
26487
  this.startTime = clock.now();
@@ -27117,8 +26826,7 @@ let BrowserContext2d = class {
27117
26826
  getContext() {
27118
26827
  return this.nativeContext;
27119
26828
  }
27120
- setTransformForCurrent() {
27121
- let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
26829
+ setTransformForCurrent(force = !1) {
27122
26830
  !force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix.setValue(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f), this.nativeContext.setTransform(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f));
27123
26831
  }
27124
26832
  get currentMatrix() {
@@ -27136,8 +26844,7 @@ let BrowserContext2d = class {
27136
26844
  highPerformanceRestore() {
27137
26845
  this.stack.length > 0 && (matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
27138
26846
  }
27139
- rotate(rad) {
27140
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
26847
+ rotate(rad, setTransform = !0) {
27141
26848
  this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
27142
26849
  }
27143
26850
  save() {
@@ -27148,55 +26855,41 @@ let BrowserContext2d = class {
27148
26855
  const matrix = this.cloneMatrix(this.matrix);
27149
26856
  this.stack.push(matrix);
27150
26857
  }
27151
- scale(sx, sy) {
27152
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
26858
+ scale(sx, sy, setTransform = !0) {
27153
26859
  this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
27154
26860
  }
27155
- setScale(sx, sy) {
27156
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
26861
+ setScale(sx, sy, setTransform = !0) {
27157
26862
  this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
27158
26863
  }
27159
- scalePoint(sx, sy, px, py) {
27160
- let setTransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
26864
+ scalePoint(sx, sy, px, py, setTransform = !0) {
27161
26865
  this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1), setTransform && this.setTransformForCurrent();
27162
26866
  }
27163
- setTransform(a, b, c, d, e, f) {
27164
- let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
27165
- let dpr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : this.dpr;
26867
+ setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
27166
26868
  this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
27167
26869
  }
27168
- setTransformFromMatrix(matrix) {
27169
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
27170
- let dpr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dpr;
26870
+ setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
27171
26871
  this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr), setTransform && this.setTransformForCurrent();
27172
26872
  }
27173
- resetTransform() {
27174
- let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
27175
- let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
26873
+ resetTransform(setTransform = !0, dpr = this.dpr) {
27176
26874
  this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
27177
26875
  }
27178
- transform(a, b, c, d, e, f) {
27179
- let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
26876
+ transform(a, b, c, d, e, f, setTransform = !0) {
27180
26877
  this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
27181
26878
  }
27182
26879
  transformFromMatrix(matrix, setTransform) {
27183
26880
  this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), setTransform && this.setTransformForCurrent();
27184
26881
  }
27185
- translate(x, y) {
27186
- let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
26882
+ translate(x, y, setTransform = !0) {
27187
26883
  this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
27188
26884
  }
27189
- rotateDegrees(deg) {
27190
- let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
26885
+ rotateDegrees(deg, setTransform = !0) {
27191
26886
  const rad = deg * Math.PI / 180;
27192
26887
  this.rotate(rad, setTransform);
27193
26888
  }
27194
- rotateAbout(rad, x, y) {
27195
- let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
26889
+ rotateAbout(rad, x, y, setTransform = !0) {
27196
26890
  this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
27197
26891
  }
27198
- rotateDegreesAbout(deg, x, y) {
27199
- let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
26892
+ rotateDegreesAbout(deg, x, y, setTransform = !0) {
27200
26893
  this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
27201
26894
  }
27202
26895
  beginPath() {
@@ -27333,8 +27026,7 @@ let BrowserContext2d = class {
27333
27026
  isPointInStroke(x, y) {
27334
27027
  return this.nativeContext.isPointInStroke(x, y);
27335
27028
  }
27336
- measureText(text) {
27337
- let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
27029
+ measureText(text, method = application.global.measureTextMethod) {
27338
27030
  var _a, _b;
27339
27031
  if (!method || "native" === method) return this.nativeContext.measureText(text);
27340
27032
  this.mathTextMeasure || (this.mathTextMeasure = application.graphicUtil.createTextMeasureInstance({}, {}, () => this.canvas.nativeCanvas));
@@ -27469,19 +27161,16 @@ let BrowserContext2d = class {
27469
27161
  this.fontFamily = fontFamily, this.fontSize = fontSize, _context.textAlign = null !== (_a = params.textAlign) && void 0 !== _a ? _a : defaultParams.textAlign, _context.textBaseline = null !== (_b = params.textBaseline) && void 0 !== _b ? _b : defaultParams.textBaseline;
27470
27162
  }
27471
27163
  draw() {}
27472
- clearMatrix() {
27473
- let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
27474
- let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
27164
+ clearMatrix(setTransform = !0, dpr = this.dpr) {
27475
27165
  this.setTransformFromMatrix(this._clearMatrix, setTransform, dpr);
27476
27166
  }
27477
27167
  setClearMatrix(a, b, c, d, e, f) {
27478
27168
  this._clearMatrix.setValue(a, b, c, d, e, f);
27479
27169
  }
27480
- onlyTranslate() {
27481
- let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
27170
+ onlyTranslate(dpr = this.dpr) {
27482
27171
  return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
27483
27172
  }
27484
- release() {
27173
+ release(...params) {
27485
27174
  this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
27486
27175
  }
27487
27176
  };
@@ -27888,8 +27577,7 @@ class DynamicB {
27888
27577
  this.dom = dom;
27889
27578
  }
27890
27579
  }
27891
- function createImageElement$1(src) {
27892
- let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
27580
+ function createImageElement$1(src, isSvg = !1) {
27893
27581
  const img = document.createElement("img");
27894
27582
  if (application.global.isImageAnonymous && (img.crossOrigin = "anonymous"), isSvg) {
27895
27583
  const data = new Blob([src], {
@@ -28036,7 +27724,7 @@ let BrowserEnvContribution = class extends BaseEnvContribution {
28036
27724
  getDocument() {
28037
27725
  return document;
28038
27726
  }
28039
- release() {}
27727
+ release(...params) {}
28040
27728
  getElementTop(element, baseWindow) {
28041
27729
  let actualTop = element.offsetTop,
28042
27730
  current = element.offsetParent;
@@ -28090,8 +27778,7 @@ const browserEnvModule = new ContainerModule(bind => {
28090
27778
  browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
28091
27779
  });
28092
27780
  browserEnvModule.isBrowserBound = !1;
28093
- function loadBrowserEnv(container) {
28094
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
27781
+ function loadBrowserEnv(container, loadPicker = !0) {
28095
27782
  loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
28096
27783
  }
28097
27784
  loadBrowserEnv.__loaded = !1;
@@ -28160,7 +27847,7 @@ let FeishuCanvas = class extends BaseCanvas {
28160
27847
  init() {
28161
27848
  this._context = new FeishuContext2d(this, this._dpr);
28162
27849
  }
28163
- release() {}
27850
+ release(...params) {}
28164
27851
  };
28165
27852
  FeishuCanvas.env = "feishu", FeishuCanvas = __decorate$U([injectable(), __metadata$J("design:paramtypes", [Object])], FeishuCanvas);
28166
27853
 
@@ -28923,7 +28610,7 @@ let FeishuEnvContribution = class extends BaseEnvContribution {
28923
28610
  getDocument() {
28924
28611
  return null;
28925
28612
  }
28926
- release() {}
28613
+ release(...params) {}
28927
28614
  mapToCanvasPoint(event) {
28928
28615
  var _a;
28929
28616
  return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
@@ -28935,8 +28622,7 @@ const feishuEnvModule = new ContainerModule(bind => {
28935
28622
  feishuEnvModule.isFeishuBound || (feishuEnvModule.isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
28936
28623
  });
28937
28624
  feishuEnvModule.isFeishuBound = !1;
28938
- function loadFeishuEnv(container) {
28939
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
28625
+ function loadFeishuEnv(container, loadPicker = !0) {
28940
28626
  loadFeishuEnv.__loaded || (loadFeishuEnv.__loaded = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
28941
28627
  }
28942
28628
  loadFeishuEnv.__loaded = !1;
@@ -28985,8 +28671,7 @@ let LynxContext2d = class extends BrowserContext2d {
28985
28671
  _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || !lineDash || (_context.setLineDash(lineDash), _context.lineDashOffset = lineDashOffset), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
28986
28672
  }
28987
28673
  }
28988
- measureText(text) {
28989
- let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
28674
+ measureText(text, method = application.global.measureTextMethod) {
28990
28675
  this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
28991
28676
  return {
28992
28677
  width: super.measureText(text, method).width,
@@ -29031,7 +28716,7 @@ let LynxCanvas = class extends BaseCanvas {
29031
28716
  this._pixelWidth = width * this._dpr, this._pixelHeight = height * this._dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas.width = this._pixelWidth, this._nativeCanvas.height = this._pixelHeight, this._nativeCanvas.nativeCanvas && (this._nativeCanvas.nativeCanvas.width = this._pixelWidth, this._nativeCanvas.nativeCanvas.height = this._pixelHeight);
29032
28717
  this._context.dpr = this._dpr;
29033
28718
  }
29034
- release() {}
28719
+ release(...params) {}
29035
28720
  };
29036
28721
  LynxCanvas.env = "lynx", LynxCanvas = __decorate$E([injectable(), __metadata$w("design:paramtypes", [Object])], LynxCanvas);
29037
28722
 
@@ -29221,8 +28906,7 @@ function makeUpCanvas$3(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCan
29221
28906
  canvasMap.set(id, canvas), freeCanvasList.push(canvas);
29222
28907
  }
29223
28908
  }
29224
- function createImageElement(src) {
29225
- let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
28909
+ function createImageElement(src, isSvg = !1) {
29226
28910
  if (isSvg) return Promise.reject();
29227
28911
  const img = lynx.createImage(src);
29228
28912
  return new Promise((resolve, reject) => {
@@ -29305,7 +28989,7 @@ let LynxEnvContribution = class extends BaseEnvContribution {
29305
28989
  getDocument() {
29306
28990
  return null;
29307
28991
  }
29308
- release() {}
28992
+ release(...params) {}
29309
28993
  };
29310
28994
  LynxEnvContribution = __decorate$C([injectable(), __metadata$u("design:paramtypes", [])], LynxEnvContribution);
29311
28995
 
@@ -29313,8 +28997,7 @@ const lynxEnvModule = new ContainerModule(bind => {
29313
28997
  lynxEnvModule.isLynxBound || (lynxEnvModule.isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
29314
28998
  });
29315
28999
  lynxEnvModule.isLynxBound = !1;
29316
- function loadLynxEnv(container) {
29317
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
29000
+ function loadLynxEnv(container, loadPicker = !0) {
29318
29001
  loadLynxEnv.__loaded || (loadLynxEnv.__loaded = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
29319
29002
  }
29320
29003
  loadLynxEnv.__loaded = !1;
@@ -29336,7 +29019,7 @@ let NodeContext2d = class extends BrowserContext2d {
29336
29019
  if (!context) throw new Error("发生错误,获取2d上下文失败");
29337
29020
  this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = null != dpr ? dpr : 1;
29338
29021
  }
29339
- release() {}
29022
+ release(...params) {}
29340
29023
  };
29341
29024
  NodeContext2d.env = "node", NodeContext2d = __decorate$B([injectable(), __metadata$t("design:paramtypes", [Object, Number])], NodeContext2d);
29342
29025
 
@@ -29357,7 +29040,7 @@ let NodeCanvas = class extends BaseCanvas {
29357
29040
  init() {
29358
29041
  this._context = new NodeContext2d(this, this._dpr), this.nativeCanvas.width = this._pixelWidth, this.nativeCanvas.height = this._pixelHeight;
29359
29042
  }
29360
- release() {
29043
+ release(...params) {
29361
29044
  this._nativeCanvas.release && isFunction$1(this._nativeCanvas.release) && this._nativeCanvas.release();
29362
29045
  }
29363
29046
  };
@@ -29452,8 +29135,7 @@ let NodeWindowHandlerContribution = class extends BaseWindowHandlerContribution
29452
29135
  getDpr() {
29453
29136
  return this.canvas.dpr;
29454
29137
  }
29455
- getImageBuffer() {
29456
- let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png";
29138
+ getImageBuffer(type = "image/png") {
29457
29139
  return this.canvas.nativeCanvas.toBuffer(type);
29458
29140
  }
29459
29141
  addEventListener(type, listener, options) {}
@@ -29556,7 +29238,7 @@ let NodeEnvContribution = class extends BaseEnvContribution {
29556
29238
  return null;
29557
29239
  }
29558
29240
  dispatchEvent(event) {}
29559
- release() {}
29241
+ release(...params) {}
29560
29242
  createOffscreenCanvas(params) {}
29561
29243
  };
29562
29244
  NodeEnvContribution = __decorate$y([injectable()], NodeEnvContribution);
@@ -29565,7 +29247,7 @@ const nodeEnvModule = new ContainerModule(bind => {
29565
29247
  nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
29566
29248
  });
29567
29249
  nodeEnvModule.isNodeBound = !1;
29568
- function loadNodeEnv(container) {
29250
+ function loadNodeEnv(container, loadPicker = !0) {
29569
29251
  loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
29570
29252
  }
29571
29253
  loadNodeEnv.__loaded = !1;
@@ -29678,7 +29360,7 @@ let TaroCanvas = class extends BaseCanvas {
29678
29360
  init() {
29679
29361
  this._context = new TaroContext2d(this, this._dpr);
29680
29362
  }
29681
- release() {}
29363
+ release(...params) {}
29682
29364
  };
29683
29365
  TaroCanvas.env = "taro", TaroCanvas = __decorate$w([injectable(), __metadata$q("design:paramtypes", [Object])], TaroCanvas);
29684
29366
 
@@ -29947,7 +29629,7 @@ let TaroEnvContribution = class extends BaseEnvContribution {
29947
29629
  getDocument() {
29948
29630
  return null;
29949
29631
  }
29950
- release() {}
29632
+ release(...params) {}
29951
29633
  };
29952
29634
  TaroEnvContribution = __decorate$u([injectable(), __metadata$o("design:paramtypes", [])], TaroEnvContribution);
29953
29635
 
@@ -29955,8 +29637,7 @@ const taroEnvModule = new ContainerModule(bind => {
29955
29637
  taroEnvModule.isTaroBound || (taroEnvModule.isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
29956
29638
  });
29957
29639
  taroEnvModule.isTaroBound = !1;
29958
- function loadTaroEnv(container) {
29959
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
29640
+ function loadTaroEnv(container, loadPicker = !0) {
29960
29641
  loadTaroEnv.__loaded || (loadTaroEnv.__loaded = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
29961
29642
  }
29962
29643
  loadTaroEnv.__loaded = !1;
@@ -29993,7 +29674,7 @@ let WxCanvas = class extends BaseCanvas {
29993
29674
  init() {
29994
29675
  this._context = new WxContext2d(this, this._dpr);
29995
29676
  }
29996
- release() {}
29677
+ release(...params) {}
29997
29678
  };
29998
29679
  WxCanvas.env = "wx", WxCanvas = __decorate$s([injectable(), __metadata$n("design:paramtypes", [Object])], WxCanvas);
29999
29680
 
@@ -30266,7 +29947,7 @@ let WxEnvContribution = class extends BaseEnvContribution {
30266
29947
  getDocument() {
30267
29948
  return null;
30268
29949
  }
30269
- release() {}
29950
+ release(...params) {}
30270
29951
  mapToCanvasPoint(event) {
30271
29952
  var _a;
30272
29953
  return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
@@ -30278,8 +29959,7 @@ const wxEnvModule = new ContainerModule(bind => {
30278
29959
  wxEnvModule._isWxBound || (wxEnvModule._isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
30279
29960
  });
30280
29961
  wxEnvModule._isWxBound = !1;
30281
- function loadWxEnv(container) {
30282
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
29962
+ function loadWxEnv(container, loadPicker = !0) {
30283
29963
  loadWxEnv.__loaded || (loadWxEnv.__loaded = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
30284
29964
  }
30285
29965
  loadWxEnv.__loaded = !1;
@@ -30288,7 +29968,7 @@ function loadAllEnv(container) {
30288
29968
  loadAllModule(container);
30289
29969
  }
30290
29970
  function loadAllModule(container) {
30291
- loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
29971
+ loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container, !1), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
30292
29972
  "browser" !== env && loadMathPicker(container);
30293
29973
  }));
30294
29974
  }
@@ -30324,7 +30004,7 @@ let TTCanvas = class extends BaseCanvas {
30324
30004
  init() {
30325
30005
  this._context = new TTContext2d(this, this._dpr);
30326
30006
  }
30327
- release() {}
30007
+ release(...params) {}
30328
30008
  };
30329
30009
  TTCanvas.env = "tt", TTCanvas = __decorate$o([injectable(), __metadata$k("design:paramtypes", [Object])], TTCanvas);
30330
30010
 
@@ -30592,7 +30272,7 @@ let TTEnvContribution = class extends BaseEnvContribution {
30592
30272
  getDocument() {
30593
30273
  return null;
30594
30274
  }
30595
- release() {}
30275
+ release(...params) {}
30596
30276
  mapToCanvasPoint(event) {
30597
30277
  var _a;
30598
30278
  return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
@@ -30604,8 +30284,7 @@ const ttEnvModule = new ContainerModule(bind => {
30604
30284
  ttEnvModule.isTTBound || (ttEnvModule.isTTBound = !0, bind(TTEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TTEnvContribution));
30605
30285
  });
30606
30286
  ttEnvModule.isTTBound = !1;
30607
- function loadTTEnv(container) {
30608
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
30287
+ function loadTTEnv(container, loadPicker = !0) {
30609
30288
  loadTTEnv.__loaded || (loadTTEnv.__loaded = !0, container.load(ttEnvModule), container.load(ttCanvasModule), container.load(ttWindowModule), loadPicker && loadMathPicker(container));
30610
30289
  }
30611
30290
  loadTTEnv.__loaded = !1;
@@ -30654,8 +30333,7 @@ let HarmonyContext2d = class extends BrowserContext2d {
30654
30333
  _context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || (lineDash && _context.setLineDash(lineDash), _context.lineDashOffset = lineDashOffset), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
30655
30334
  }
30656
30335
  }
30657
- measureText(text) {
30658
- let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
30336
+ measureText(text, method = application.global.measureTextMethod) {
30659
30337
  this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
30660
30338
  return super.measureText(text, method);
30661
30339
  }
@@ -30715,7 +30393,7 @@ let HarmonyCanvas = class extends BaseCanvas {
30715
30393
  this._context = new HarmonyContext2d(this, this._dpr);
30716
30394
  }
30717
30395
  resize(width, height) {}
30718
- release() {}
30396
+ release(...params) {}
30719
30397
  };
30720
30398
  HarmonyCanvas.env = "harmony", HarmonyCanvas = __decorate$k([injectable(), __metadata$h("design:paramtypes", [Object])], HarmonyCanvas);
30721
30399
 
@@ -30959,7 +30637,7 @@ let HarmonyEnvContribution = class extends BaseEnvContribution {
30959
30637
  getDocument() {
30960
30638
  return null;
30961
30639
  }
30962
- release() {}
30640
+ release(...params) {}
30963
30641
  };
30964
30642
  HarmonyEnvContribution = __decorate$i([injectable(), __metadata$f("design:paramtypes", [])], HarmonyEnvContribution);
30965
30643
 
@@ -30967,8 +30645,7 @@ const harmonyEnvModule = new ContainerModule(bind => {
30967
30645
  harmonyEnvModule.isHarmonyBound || (harmonyEnvModule.isHarmonyBound = !0, bind(HarmonyEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(HarmonyEnvContribution));
30968
30646
  });
30969
30647
  harmonyEnvModule.isHarmonyBound = !1;
30970
- function loadHarmonyEnv(container) {
30971
- let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
30648
+ function loadHarmonyEnv(container, loadPicker = !0) {
30972
30649
  loadHarmonyEnv.__loaded || (loadHarmonyEnv.__loaded = !0, container.load(harmonyEnvModule), container.load(harmonyCanvasModule), container.load(harmonyWindowModule), loadPicker && loadMathPicker(container));
30973
30650
  }
30974
30651
  loadHarmonyEnv.__loaded = !1;
@@ -31625,65 +31302,48 @@ function _registerText() {
31625
31302
  _registerText.__loaded = !1;
31626
31303
  const registerText = _registerText;
31627
31304
 
31628
- function pseudoRandom(n) {
31629
- let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
31305
+ function pseudoRandom(n, seed = 0) {
31630
31306
  let hash = 3735928559 ^ seed;
31631
31307
  return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
31632
31308
  }
31633
- function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31634
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31635
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31309
+ function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31636
31310
  const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
31637
31311
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
31638
31312
  return Math.min(1, Math.max(0, _r));
31639
31313
  }
31640
- function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31641
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31642
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31314
+ function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31643
31315
  const delay = column / columnCount,
31644
31316
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31645
31317
  return Math.min(1, Math.max(0, _r));
31646
31318
  }
31647
- function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31648
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31649
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31319
+ function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31650
31320
  const delay = (columnCount - 1 - column) / columnCount,
31651
31321
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31652
31322
  return Math.min(1, Math.max(0, _r));
31653
31323
  }
31654
- function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31655
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31656
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31324
+ function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31657
31325
  const delay = row / rowCount,
31658
31326
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31659
31327
  return Math.min(1, Math.max(0, _r));
31660
31328
  }
31661
- function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31662
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31663
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31329
+ function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31664
31330
  const delay = (rowCount - 1 - row) / rowCount,
31665
31331
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31666
31332
  return Math.min(1, Math.max(0, _r));
31667
31333
  }
31668
- function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31669
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31670
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31334
+ function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31671
31335
  const centerRow = rowCount / 2,
31672
31336
  centerCol = columnCount / 2,
31673
31337
  distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
31674
31338
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
31675
31339
  return Math.min(1, Math.max(0, _r));
31676
31340
  }
31677
- function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31678
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31679
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31341
+ function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31680
31342
  const delay = (row / rowCount + column / columnCount) / 2,
31681
31343
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31682
31344
  return Math.min(1, Math.max(0, _r));
31683
31345
  }
31684
- function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31685
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31686
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31346
+ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31687
31347
  const centerRow = rowCount / 2,
31688
31348
  centerCol = columnCount / 2,
31689
31349
  angle = Math.atan2(row - centerRow, column - centerCol),
@@ -31691,33 +31351,25 @@ function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31691
31351
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
31692
31352
  return Math.min(1, Math.max(0, _r));
31693
31353
  }
31694
- function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31695
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31696
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31354
+ function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31697
31355
  const centerRow = rowCount / 2,
31698
31356
  centerCol = columnCount / 2,
31699
31357
  normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
31700
31358
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
31701
31359
  return Math.min(1, Math.max(0, _r));
31702
31360
  }
31703
- function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31704
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31705
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31361
+ function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31706
31362
  const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
31707
31363
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
31708
31364
  return Math.min(1, Math.max(0, _r));
31709
31365
  }
31710
- function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31711
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31712
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31366
+ function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31713
31367
  const rowPhase = row / rowCount,
31714
31368
  colPhase = column / columnCount,
31715
31369
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
31716
31370
  return Math.min(1, Math.max(0, _r));
31717
31371
  }
31718
- function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31719
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31720
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31372
+ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31721
31373
  const centerRow = rowCount / 2,
31722
31374
  centerCol = columnCount / 2,
31723
31375
  distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
@@ -31726,41 +31378,31 @@ function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31726
31378
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
31727
31379
  return Math.min(1, Math.max(0, _r));
31728
31380
  }
31729
- function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31730
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31731
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31381
+ function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31732
31382
  const centerCol = columnCount / 2,
31733
31383
  distance = Math.abs(column - centerCol) / centerCol,
31734
31384
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
31735
31385
  return Math.min(1, Math.max(0, _r));
31736
31386
  }
31737
- function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31738
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31739
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31387
+ function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31740
31388
  const centerCol = columnCount / 2,
31741
31389
  distance = 1 - Math.abs(column - centerCol) / centerCol,
31742
31390
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
31743
31391
  return Math.min(1, Math.max(0, _r));
31744
31392
  }
31745
- function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31746
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31747
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31393
+ function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31748
31394
  const centerRow = rowCount / 2,
31749
31395
  distance = Math.abs(row - centerRow) / centerRow,
31750
31396
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
31751
31397
  return Math.min(1, Math.max(0, _r));
31752
31398
  }
31753
- function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31754
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31755
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31399
+ function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31756
31400
  const centerRow = rowCount / 2,
31757
31401
  distance = 1 - Math.abs(row - centerRow) / centerRow,
31758
31402
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
31759
31403
  return Math.min(1, Math.max(0, _r));
31760
31404
  }
31761
- function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31762
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31763
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31405
+ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31764
31406
  const centerRow = rowCount / 2,
31765
31407
  centerCol = columnCount / 2,
31766
31408
  distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
@@ -31768,9 +31410,7 @@ function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic)
31768
31410
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31769
31411
  return Math.min(1, Math.max(0, _r));
31770
31412
  }
31771
- function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31772
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31773
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31413
+ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31774
31414
  const centerRow = rowCount / 2,
31775
31415
  centerCol = columnCount / 2,
31776
31416
  distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
@@ -31778,9 +31418,7 @@ function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic)
31778
31418
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
31779
31419
  return Math.min(1, Math.max(0, _r));
31780
31420
  }
31781
- function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31782
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31783
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31421
+ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31784
31422
  const centerRow = rowCount / 2,
31785
31423
  centerCol = columnCount / 2,
31786
31424
  distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
@@ -31790,9 +31428,7 @@ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31790
31428
  _r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
31791
31429
  return Math.min(1, Math.max(0, _r));
31792
31430
  }
31793
- function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31794
- let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31795
- let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31431
+ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
31796
31432
  const index = row * columnCount + column,
31797
31433
  phase = 2 * pseudoRandom(index, 0) * Math.PI,
31798
31434
  speed = .5 * pseudoRandom(index, 1) + .5,
@@ -31935,8 +31571,7 @@ let ScrollBar$1 = class ScrollBar extends AbstractComponent {
31935
31571
  }), this._clearDragEvents();
31936
31572
  };
31937
31573
  }
31938
- setScrollRange(range) {
31939
- let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
31574
+ setScrollRange(range, render = !0) {
31940
31575
  const {
31941
31576
  direction = "horizontal",
31942
31577
  limitRange = [0, 1],
@@ -32439,8 +32074,7 @@ const initTextMeasure$1 = (textSpec, option, useNaiveCanvas, defaultFontParams)
32439
32074
  getTextBounds: useNaiveCanvas ? void 0 : getTextBounds,
32440
32075
  specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
32441
32076
  }, null != option ? option : {}), textSpec);
32442
- function measureTextSize(text, textSpec) {
32443
- let defaultTextTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
32077
+ function measureTextSize(text, textSpec, defaultTextTheme = {}) {
32444
32078
  if (!text) return {
32445
32079
  width: 0,
32446
32080
  height: 0
@@ -32461,12 +32095,10 @@ function measureTextSize(text, textSpec) {
32461
32095
  height: bounds.height()
32462
32096
  };
32463
32097
  }
32464
- function isRichText(attributes) {
32465
- let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
32098
+ function isRichText(attributes, typeKey = "type") {
32466
32099
  return "rich" === getTextType(attributes, typeKey);
32467
32100
  }
32468
- function getTextType(attributes) {
32469
- let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
32101
+ function getTextType(attributes, typeKey = "type") {
32470
32102
  var _a, _b;
32471
32103
  return isObject$2(attributes.text) && "type" in attributes.text ? null !== (_a = attributes.text.type) && void 0 !== _a ? _a : "text" : typeKey in attributes && null !== (_b = attributes[typeKey]) && void 0 !== _b ? _b : "text";
32472
32104
  }
@@ -32494,8 +32126,7 @@ function reactAttributeTransform(attributes) {
32494
32126
  } = text;
32495
32127
  return attributes.react = react, attributes.text = _originText, attributes.renderable = !1, attributes;
32496
32128
  }
32497
- function createTextGraphicByType(textAttributes) {
32498
- let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
32129
+ function createTextGraphicByType(textAttributes, typeKey = "type") {
32499
32130
  const textType = getTextType(textAttributes, typeKey);
32500
32131
  return "rich" === textType ? graphicCreator.richtext(richTextAttributeTransform(textAttributes)) : ("html" === textType ? textAttributes = htmlAttributeTransform(textAttributes) : "react" === textType && (textAttributes = reactAttributeTransform(textAttributes)), graphicCreator.text(textAttributes));
32501
32132
  }
@@ -33914,14 +33545,12 @@ function itemIntersect(item1, item2) {
33914
33545
  return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
33915
33546
  }
33916
33547
  const DELTA_ANGLE = Math.sin(Math.PI / 10);
33917
- function isAngleVertical(angle) {
33918
- let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
33548
+ function isAngleVertical(angle, delta = DELTA_ANGLE) {
33919
33549
  const hasAngle = !isNil$1(angle) && 0 !== angle,
33920
33550
  cos = hasAngle ? Math.cos(angle) : 1;
33921
33551
  return hasAngle && Math.abs(cos) <= delta;
33922
33552
  }
33923
- function isAngleHorizontal(angle) {
33924
- let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
33553
+ function isAngleHorizontal(angle, delta = DELTA_ANGLE) {
33925
33554
  const hasAngle = !isNil$1(angle) && 0 !== angle,
33926
33555
  sin = hasAngle ? Math.sin(angle) : 0;
33927
33556
  return !hasAngle || Math.abs(sin) <= delta;
@@ -33933,8 +33562,7 @@ function getCircleLabelPosition(tickPosition, tickVector) {
33933
33562
  y: tickPosition.y + tickVector[1]
33934
33563
  };
33935
33564
  }
33936
- function getAxisBreakSymbolAttrs() {
33937
- let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
33565
+ function getAxisBreakSymbolAttrs(props = {}) {
33938
33566
  var _a, _b;
33939
33567
  const {
33940
33568
  style = {},
@@ -33959,9 +33587,7 @@ function getVerticalCoord(point, vector) {
33959
33587
  y: point.y + vector[1]
33960
33588
  };
33961
33589
  }
33962
- function getCircleVerticalVector(offset, point, center) {
33963
- let inside = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
33964
- let axisInside = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
33590
+ function getCircleVerticalVector(offset, point, center, inside = !1, axisInside = !1) {
33965
33591
  const vector = [point.x - center.x, point.y - center.y];
33966
33592
  return scale(vector, (inside ? -1 : 1) * (axisInside ? -1 : 1) * offset / length(vector));
33967
33593
  }
@@ -34345,8 +33971,7 @@ function hasBounds(item) {
34345
33971
  function reset$1(items) {
34346
33972
  return items.forEach(item => item.setAttribute("opacity", 1)), items;
34347
33973
  }
34348
- function forceItemVisible$1(sourceItem, items, check, comparator) {
34349
- let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
33974
+ function forceItemVisible$1(sourceItem, items, check, comparator, inverse = !1) {
34350
33975
  if (check && !sourceItem.attribute.opacity) {
34351
33976
  const remainLength = items.length;
34352
33977
  if (remainLength > 1) {
@@ -34374,10 +33999,7 @@ function autoHide(labels, config) {
34374
33999
  do {
34375
34000
  items = reduce(items, sep);
34376
34001
  } while (items.length >= 3 && hasOverlap$1(items, sep));
34377
- const shouldCheck = function (length, visibility) {
34378
- let checkLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
34379
- return checkLength && length < 3 || visibility;
34380
- },
34002
+ const shouldCheck = (length, visibility, checkLength = !0) => checkLength && length < 3 || visibility,
34381
34003
  checkFirst = shouldCheck(items.length, config.firstVisible, !1);
34382
34004
  let checkLast = shouldCheck(items.length, config.lastVisible);
34383
34005
  const firstSourceItem = source[0],
@@ -34412,8 +34034,7 @@ function hasIntersect(items) {
34412
34034
  function tryRotate(orient, items) {
34413
34035
  "bottom" !== orient && "top" !== orient || rotateXAxis(orient, items), "left" !== orient && "right" !== orient || rotateYAxis(orient, items), genRotateBounds(items);
34414
34036
  }
34415
- function clampAngle() {
34416
- let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
34037
+ function clampAngle(angle = 0) {
34417
34038
  if (angle < 0) for (; angle < 0;) angle += 2 * Math.PI;
34418
34039
  if (angle > 0) for (; angle >= 2 * Math.PI;) angle -= 2 * Math.PI;
34419
34040
  return angle;
@@ -34432,8 +34053,7 @@ function rotateXAxis(orient, items) {
34432
34053
  }));
34433
34054
  });
34434
34055
  }
34435
- function getXAxisLabelAlign(orient) {
34436
- let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
34056
+ function getXAxisLabelAlign(orient, angle = 0) {
34437
34057
  let align = ["center", "left", "left", "left", "center", "right", "right", "right", "left"],
34438
34058
  baseline = ["top", "top", "middle", "bottom", "bottom", "bottom", "middle", "top", "top"];
34439
34059
  "top" === orient && (align = ["center", "right", "right", "right", "center", "left", "left", "left", "right"], baseline = ["bottom", "bottom", "middle", "top", "top", "top", "middle", "bottom", "bottom"]);
@@ -34444,8 +34064,7 @@ function getXAxisLabelAlign(orient) {
34444
34064
  textBaseline: baseline[index]
34445
34065
  };
34446
34066
  }
34447
- function getYAxisLabelAlign(orient) {
34448
- let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
34067
+ function getYAxisLabelAlign(orient, angle = 0) {
34449
34068
  let align = ["right", "right", "center", "left", "left", "left", "center", "right", "right"],
34450
34069
  baseline = ["middle", "middle", "top", "top", "middle", "middle", "bottom", "bottom", "middle"];
34451
34070
  "right" === orient && (align = ["left", "left", "center", "right", "right", "right", "center", "left", "left"], baseline = ["middle", "middle", "bottom", "bottom", "middle", "middle", "top", "middle", "middle"]);
@@ -34623,8 +34242,7 @@ class LineAxisMixin {
34623
34242
  } = this.attribute;
34624
34243
  return [end.x - start.x, end.y - start.y];
34625
34244
  }
34626
- getVerticalVector(offset) {
34627
- let inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
34245
+ getVerticalVector(offset, inside = !1, point) {
34628
34246
  const {
34629
34247
  verticalFactor = 1
34630
34248
  } = this.attribute,
@@ -35080,9 +34698,7 @@ class CircleAxisMixin {
35080
34698
  } = this.attribute;
35081
34699
  return polarToCartesian(center, inside && innerRadius > 0 ? innerRadius : radius, startAngle + (endAngle - startAngle) * tickValue);
35082
34700
  }
35083
- getVerticalVector(offset) {
35084
- let inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
35085
- let point = arguments.length > 2 ? arguments[2] : undefined;
34701
+ getVerticalVector(offset, inside = !1, point) {
35086
34702
  return getCircleVerticalVector(offset, point, this.attribute.center, inside, this.attribute.inside);
35087
34703
  }
35088
34704
  getRelativeVector(point) {
@@ -35331,7 +34947,31 @@ class CircleAxis extends AxisBase {
35331
34947
  separation: autoHideSeparation
35332
34948
  }));
35333
34949
  }
35334
- afterLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {}
34950
+ afterLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
34951
+ var _a;
34952
+ const {
34953
+ layoutRect: layoutRect,
34954
+ autoLabelMaxWidth: autoLabelMaxWidth
34955
+ } = this.attribute;
34956
+ if (!autoLabelMaxWidth || !layoutRect || !labelShapes || 0 === labelShapes.length) return;
34957
+ const rectRight = 0 + layoutRect.width;
34958
+ for (let i = 0; i < labelShapes.length; i++) {
34959
+ const label = labelShapes[i],
34960
+ x = label.attribute.x,
34961
+ align = null !== (_a = label.attribute.textAlign) && void 0 !== _a ? _a : "center";
34962
+ let maxWidth = 0;
34963
+ if ("left" === align) maxWidth = rectRight - x;else if ("right" === align) maxWidth = x - 0;else {
34964
+ const leftDist = x - 0,
34965
+ rightDist = rectRight - x;
34966
+ maxWidth = 2 * Math.max(0, Math.min(leftDist, rightDist));
34967
+ }
34968
+ maxWidth > 0 ? label.setAttributes({
34969
+ maxLineWidth: maxWidth
34970
+ }) : label.setAttributes({
34971
+ maxLineWidth: 0
34972
+ });
34973
+ }
34974
+ }
35335
34975
  getTextBaseline(vector) {
35336
34976
  return Math.abs(vector[1] / vector[0]) < .3 ? "middle" : vector[1] < 0 ? "bottom" : vector[1] > 0 ? "top" : "middle";
35337
34977
  }
@@ -35427,8 +35067,7 @@ const convertDomainToTickData = domain => domain.map((t, index) => ({
35427
35067
  index: index,
35428
35068
  value: t
35429
35069
  }));
35430
- const labelOverlap = function (prevLabel, nextLabel) {
35431
- let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
35070
+ const labelOverlap = (prevLabel, nextLabel, gap = 0) => {
35432
35071
  const prevBounds = new AABBBounds(prevLabel).expand(gap / 2),
35433
35072
  nextBounds = new AABBBounds(nextLabel).expand(gap / 2);
35434
35073
  return prevBounds.intersects(nextBounds);
@@ -35581,8 +35220,7 @@ const nice = (domain, options) => {
35581
35220
  x1 = newDomain[endIndex];
35582
35221
  return x1 < x0 && ([startIndex, endIndex] = [endIndex, startIndex], [x0, x1] = [x1, x0]), newDomain[startIndex] = options.floor(x0), newDomain[endIndex] = options.ceil(x1), newDomain;
35583
35222
  };
35584
- const niceNumber = function (value) {
35585
- let round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
35223
+ const niceNumber = (value, round = !1) => {
35586
35224
  const exponent = Math.floor(Math.log10(value)),
35587
35225
  fraction = value / Math.pow(10, exponent);
35588
35226
  let niceFraction;
@@ -35826,22 +35464,19 @@ class BandScale extends OrdinalScale {
35826
35464
  rangeRound(_, slience) {
35827
35465
  return this._range = [toNumber(_[0]), toNumber(_[1])], this._round = !0, this.rescale(slience);
35828
35466
  }
35829
- ticks() {
35830
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35467
+ ticks(count = 10) {
35831
35468
  const d = this.calculateVisibleDomain(this._range);
35832
35469
  if (-1 === count) return d;
35833
35470
  return ticks$1(0, d.length - 1, count, !1).map(i => d[i]);
35834
35471
  }
35835
- tickData() {
35836
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35472
+ tickData(count = 10) {
35837
35473
  return this.ticks(count).map((tick, index) => ({
35838
35474
  index: index,
35839
35475
  tick: tick,
35840
35476
  value: (this.scale(tick) - this._range[0] + this._bandwidth / 2) / (this._range[1] - this._range[0])
35841
35477
  }));
35842
35478
  }
35843
- forceTicks() {
35844
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35479
+ forceTicks(count = 10) {
35845
35480
  const d = this.calculateVisibleDomain(this._range);
35846
35481
  return ticks$1(0, d.length - 1, count, !0).filter(i => i < d.length).map(i => d[i]);
35847
35482
  }
@@ -35937,9 +35572,7 @@ function interpolate(a, b) {
35937
35572
  }
35938
35573
 
35939
35574
  class ContinuousScale extends BaseScale {
35940
- constructor() {
35941
- let transformer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : identity;
35942
- let untransformer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
35575
+ constructor(transformer = identity, untransformer = identity) {
35943
35576
  super(), this._unknown = void 0, this.transformer = transformer, this.untransformer = untransformer, this._forceAlign = !0, this._domain = [0, 1], this._range = [0, 1], this._clamp = identity, this._piecewise = bimap, this._interpolate = interpolate;
35944
35577
  }
35945
35578
  calculateVisibleDomain(range) {
@@ -36001,11 +35634,10 @@ class ContinuousScale extends BaseScale {
36001
35634
  interpolate(_, slience) {
36002
35635
  return arguments.length ? (this._interpolate = _, this.rescale(slience)) : this._interpolate;
36003
35636
  }
36004
- ticks() {
35637
+ ticks(count = 10) {
36005
35638
  return [];
36006
35639
  }
36007
- tickData() {
36008
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35640
+ tickData(count = 10) {
36009
35641
  const ticks = this.ticks(count);
36010
35642
  return (null != ticks ? ticks : []).map((tick, index) => ({
36011
35643
  index: index,
@@ -36159,8 +35791,7 @@ function stepTicks(start, stop, step) {
36159
35791
  for (; ++i < count;) ticks[i] = start + i * step;
36160
35792
  return reverse && ticks.reverse(), ticks;
36161
35793
  }
36162
- function niceLinear(d) {
36163
- let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
35794
+ function niceLinear(d, count = 10) {
36164
35795
  let prestep,
36165
35796
  step,
36166
35797
  i0 = 0,
@@ -36247,15 +35878,11 @@ class LinearScale extends ContinuousScale {
36247
35878
  tickFormat() {
36248
35879
  return () => {};
36249
35880
  }
36250
- d3Ticks() {
36251
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36252
- let options = arguments.length > 1 ? arguments[1] : undefined;
35881
+ d3Ticks(count = 10, options) {
36253
35882
  const d = this.calculateVisibleDomain(this._range);
36254
35883
  return d3Ticks(d[0], d[d.length - 1], count, options);
36255
35884
  }
36256
- ticks() {
36257
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36258
- let options = arguments.length > 1 ? arguments[1] : undefined;
35885
+ ticks(count = 10, options) {
36259
35886
  var _a;
36260
35887
  if (isFunction$1(null == options ? void 0 : options.customTicks)) return options.customTicks(this, count);
36261
35888
  if (isValid$1(this._rangeFactorStart) && isValid$1(this._rangeFactorEnd) && (this._rangeFactorStart > 0 || this._rangeFactorEnd < 1) && 2 === this._range.length || !this._niceType) return this.d3Ticks(count, options);
@@ -36275,8 +35902,7 @@ class LinearScale extends ContinuousScale {
36275
35902
  }
36276
35903
  return ticksResult;
36277
35904
  }
36278
- forceTicks() {
36279
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35905
+ forceTicks(count = 10) {
36280
35906
  const d = this.calculateVisibleDomain(this._range);
36281
35907
  return forceTicks(d[0], d[d.length - 1], count);
36282
35908
  }
@@ -36284,9 +35910,7 @@ class LinearScale extends ContinuousScale {
36284
35910
  const d = this.calculateVisibleDomain(this._range);
36285
35911
  return stepTicks(d[0], d[d.length - 1], step);
36286
35912
  }
36287
- nice() {
36288
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36289
- let option = arguments.length > 1 ? arguments[1] : undefined;
35913
+ nice(count = 10, option) {
36290
35914
  var _a, _b;
36291
35915
  const originalDomain = this._domain;
36292
35916
  let niceMinMax = [];
@@ -36300,15 +35924,13 @@ class LinearScale extends ContinuousScale {
36300
35924
  }
36301
35925
  return this;
36302
35926
  }
36303
- niceMin() {
36304
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35927
+ niceMin(count = 10) {
36305
35928
  this._niceType = "min";
36306
35929
  const maxD = this._domain[this._domain.length - 1],
36307
35930
  niceDomain = niceLinear(this.domain(), count);
36308
35931
  return niceDomain && (niceDomain[niceDomain.length - 1] = maxD, this._niceDomain = niceDomain, this.rescale()), this;
36309
35932
  }
36310
- niceMax() {
36311
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
35933
+ niceMax(count = 10) {
36312
35934
  this._niceType = "max";
36313
35935
  const minD = this._domain[0],
36314
35936
  niceDomain = niceLinear(this._domain.slice(), count);
@@ -36317,8 +35939,7 @@ class LinearScale extends ContinuousScale {
36317
35939
  }
36318
35940
 
36319
35941
  class LogNiceMixin {
36320
- nice() {
36321
- let option = arguments.length > 1 ? arguments[1] : undefined;
35942
+ nice(count = 10, option) {
36322
35943
  var _b, _c, _d, _e;
36323
35944
  const originalDomain = this._domain;
36324
35945
  let niceMinMax = [],
@@ -36353,12 +35974,10 @@ class LogNiceMixin {
36353
35974
  function reflect(f) {
36354
35975
  return x => -f(-x);
36355
35976
  }
36356
- function limitPositiveZero() {
36357
- let min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.EPSILON;
35977
+ function limitPositiveZero(min = Number.EPSILON) {
36358
35978
  return x => Math.max(x, min);
36359
35979
  }
36360
- function limitNegativeZero() {
36361
- let min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.EPSILON;
35980
+ function limitNegativeZero(min = Number.EPSILON) {
36362
35981
  return x => Math.min(x, -min);
36363
35982
  }
36364
35983
  class LogScale extends ContinuousScale {
@@ -36389,21 +36008,17 @@ class LogScale extends ContinuousScale {
36389
36008
  tickFormat() {
36390
36009
  return identity;
36391
36010
  }
36392
- d3Ticks() {
36393
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36394
- let options = arguments.length > 1 ? arguments[1] : undefined;
36011
+ d3Ticks(count = 10, options) {
36395
36012
  const d = this.domain(),
36396
36013
  u = this._limit(d[0]),
36397
36014
  v = this._limit(d[d.length - 1]);
36398
36015
  return d3TicksForLog(u, v, count, this._base, this.transformer, this.untransformer, options);
36399
36016
  }
36400
- ticks() {
36401
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36017
+ ticks(count = 10) {
36402
36018
  const d = this.calculateVisibleDomain(this._range);
36403
36019
  return ticksBaseTransform(this._limit(d[0]), this._limit(d[d.length - 1]), count, this._base, this.transformer, this.untransformer);
36404
36020
  }
36405
- forceTicks() {
36406
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36021
+ forceTicks(count = 10) {
36407
36022
  const d = this.calculateVisibleDomain(this._range);
36408
36023
  return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
36409
36024
  }
@@ -36445,21 +36060,17 @@ class SymlogScale extends LinearScale {
36445
36060
  constant(_, slience) {
36446
36061
  return arguments.length ? (this._const = _, this.transformer = symlog(_), this.untransformer = symexp(_), this.rescale(slience)) : this._const;
36447
36062
  }
36448
- d3Ticks() {
36449
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36450
- let options = arguments.length > 1 ? arguments[1] : undefined;
36063
+ d3Ticks(count = 10, options) {
36451
36064
  const d = this.domain(),
36452
36065
  u = d[0],
36453
36066
  v = d[d.length - 1];
36454
36067
  return d3TicksForLog(u, v, count, this._const, this.transformer, this.untransformer, options);
36455
36068
  }
36456
- ticks() {
36457
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36069
+ ticks(count = 10) {
36458
36070
  const d = this.calculateVisibleDomain(this._range);
36459
36071
  return ticksBaseTransform(d[0], d[d.length - 1], count, this._const, this.transformer, this.untransformer);
36460
36072
  }
36461
- forceTicks() {
36462
- let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
36073
+ forceTicks(count = 10) {
36463
36074
  const d = this.calculateVisibleDomain(this._range);
36464
36075
  return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
36465
36076
  }
@@ -36515,8 +36126,7 @@ function getScaleTicks(op, scale, count, getTicks) {
36515
36126
  } else scaleTicks = getTicks(count);
36516
36127
  return scaleTicks;
36517
36128
  }
36518
- function forceItemVisible(sourceItem, items, check, comparator) {
36519
- let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
36129
+ function forceItemVisible(sourceItem, items, check, comparator, inverse = !1) {
36520
36130
  if (check && !items.includes(sourceItem)) {
36521
36131
  let remainLength = items.length;
36522
36132
  if (remainLength > 1) {
@@ -36618,10 +36228,7 @@ const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) => {
36618
36228
  const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
36619
36229
  return labelBoundsList && labelBoundsList.map(bounds => isHorizontal ? [bounds.x1, bounds.x2, bounds.width()] : [bounds.y1, bounds.y2, bounds.height()]);
36620
36230
  },
36621
- boundsOverlap = function (prevBounds, nextBounds) {
36622
- let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
36623
- return Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
36624
- };
36231
+ boundsOverlap = (prevBounds, nextBounds, gap = 0) => Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
36625
36232
  const boundsDistance = (prevBounds, nextBounds) => prevBounds[1] < nextBounds[0] ? nextBounds[0] - prevBounds[1] : nextBounds[1] < prevBounds[0] ? prevBounds[0] - nextBounds[1] : 0;
36626
36233
  const linearDiscreteTicks = (scale, op) => {
36627
36234
  var _a;
@@ -36851,13 +36458,12 @@ function bitmap(w, h) {
36851
36458
  const index = y * w + x;
36852
36459
  _clear(index >>> 5, ~(1 << (31 & index)));
36853
36460
  },
36854
- getRange: _ref => {
36855
- let {
36856
- x1: x1,
36857
- y1: y1,
36858
- x2: x2,
36859
- y2: y2
36860
- } = _ref;
36461
+ getRange: ({
36462
+ x1: x1,
36463
+ y1: y1,
36464
+ x2: x2,
36465
+ y2: y2
36466
+ }) => {
36861
36467
  if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return !0;
36862
36468
  let start,
36863
36469
  end,
@@ -36873,36 +36479,31 @@ function bitmap(w, h) {
36873
36479
  }
36874
36480
  return !1;
36875
36481
  },
36876
- setRange: _ref2 => {
36877
- let {
36878
- x1: x1,
36879
- y1: y1,
36880
- x2: x2,
36881
- y2: y2
36882
- } = _ref2;
36482
+ setRange: ({
36483
+ x1: x1,
36484
+ y1: y1,
36485
+ x2: x2,
36486
+ y2: y2
36487
+ }) => {
36883
36488
  if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return;
36884
36489
  let start, end, indexStart, indexEnd, i;
36885
36490
  for (; y1 <= y2; ++y1) if (start = y1 * w + x1, end = y1 * w + x2, indexStart = start >>> 5, indexEnd = end >>> 5, indexStart === indexEnd) _set(indexStart, RIGHT0[31 & start] & RIGHT1[1 + (31 & end)]);else for (_set(indexStart, RIGHT0[31 & start]), _set(indexEnd, RIGHT1[1 + (31 & end)]), i = indexStart + 1; i < indexEnd; ++i) _set(i, 4294967295);
36886
36491
  },
36887
- clearRange: _ref3 => {
36888
- let {
36889
- x1: x1,
36890
- y1: y1,
36891
- x2: x2,
36892
- y2: y2
36893
- } = _ref3;
36492
+ clearRange: ({
36493
+ x1: x1,
36494
+ y1: y1,
36495
+ x2: x2,
36496
+ y2: y2
36497
+ }) => {
36894
36498
  let start, end, indexStart, indexEnd, i;
36895
36499
  for (; y1 <= y2; ++y1) if (start = y1 * w + x1, end = y1 * w + x2, indexStart = start >>> 5, indexEnd = end >>> 5, indexStart === indexEnd) _clear(indexStart, RIGHT1[31 & start] | RIGHT0[1 + (31 & end)]);else for (_clear(indexStart, RIGHT1[31 & start]), _clear(indexEnd, RIGHT0[1 + (31 & end)]), i = indexStart + 1; i < indexEnd; ++i) _clear(i, 0);
36896
36500
  },
36897
- outOfBounds: _ref4 => {
36898
- let {
36899
- x1: x1,
36900
- y1: y1,
36901
- x2: x2,
36902
- y2: y2
36903
- } = _ref4;
36904
- return x1 < 0 || y1 < 0 || y2 >= h || x2 >= w;
36905
- },
36501
+ outOfBounds: ({
36502
+ x1: x1,
36503
+ y1: y1,
36504
+ x2: x2,
36505
+ y2: y2
36506
+ }) => x1 < 0 || y1 < 0 || y2 >= h || x2 >= w,
36906
36507
  toImageData: ctx => {
36907
36508
  const imageData = ctx.createImageData(w, h),
36908
36509
  data = imageData.data;
@@ -36917,13 +36518,12 @@ function bitmap(w, h) {
36917
36518
  };
36918
36519
  }
36919
36520
 
36920
- function bitmapTool(width, height) {
36921
- let padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
36922
- top: 0,
36923
- left: 0,
36924
- right: 0,
36925
- bottom: 0
36926
- };
36521
+ function bitmapTool(width, height, padding = {
36522
+ top: 0,
36523
+ left: 0,
36524
+ right: 0,
36525
+ bottom: 0
36526
+ }) {
36927
36527
  const {
36928
36528
  top = 0,
36929
36529
  left = 0,
@@ -36960,8 +36560,7 @@ function clampRangeByBitmap($, range) {
36960
36560
  y2: $.y(_y2)
36961
36561
  };
36962
36562
  }
36963
- function boundToRange($, bound) {
36964
- let clamp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
36563
+ function boundToRange($, bound, clamp = !1) {
36965
36564
  return clamp ? clampRangeByBitmap($, bound) : {
36966
36565
  x1: $.x(bound.x1),
36967
36566
  x2: $.x(bound.x2),
@@ -36970,9 +36569,7 @@ function boundToRange($, bound) {
36970
36569
  };
36971
36570
  }
36972
36571
 
36973
- function canPlace($, bitmap, bound) {
36974
- let checkBound = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
36975
- let pad = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
36572
+ function canPlace($, bitmap, bound, checkBound = !0, pad = 0) {
36976
36573
  let range = bound;
36977
36574
  pad > 0 && (range = {
36978
36575
  x1: bound.x1 - pad,
@@ -36983,11 +36580,7 @@ function canPlace($, bitmap, bound) {
36983
36580
  const outOfBounds = bitmap.outOfBounds(range);
36984
36581
  return (!checkBound || !outOfBounds) && (outOfBounds && (range = clampRangeByBitmap($, range)), !bitmap.getRange(range));
36985
36582
  }
36986
- function placeToCandidates($, bitmap, text) {
36987
- let candidates = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
36988
- let clampForce = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
36989
- let pad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
36990
- let changePosition = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
36583
+ function placeToCandidates($, bitmap, text, candidates = [], clampForce = !0, pad = 0, changePosition = !1) {
36991
36584
  const validCandidates = candidates.filter(candidate => isValid$1(candidate));
36992
36585
  for (let i = 0; i < validCandidates.length; i++) {
36993
36586
  let measureText;
@@ -37028,8 +36621,7 @@ const DefaultRectPositions = ["top", "inside-top", "inside"];
37028
36621
  function defaultLabelPosition(type) {
37029
36622
  return "rect" === type ? DefaultRectPositions : DefaultPositions;
37030
36623
  }
37031
- function clampText(text, width, height) {
37032
- let padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
36624
+ function clampText(text, width, height, padding = {}) {
37033
36625
  const {
37034
36626
  x1: x1,
37035
36627
  x2: x2,
@@ -37056,8 +36648,7 @@ function clampText(text, width, height) {
37056
36648
  };
37057
36649
  }
37058
36650
 
37059
- const fadeIn$1 = function () {
37060
- let textAttribute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
36651
+ const fadeIn$1 = (textAttribute = {}) => {
37061
36652
  var _a, _b, _c;
37062
36653
  return {
37063
36654
  from: {
@@ -37072,8 +36663,7 @@ const fadeIn$1 = function () {
37072
36663
  }
37073
36664
  };
37074
36665
  },
37075
- fadeOut$1 = function () {
37076
- let textAttribute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
36666
+ fadeOut$1 = (textAttribute = {}) => {
37077
36667
  var _a, _b, _c;
37078
36668
  return {
37079
36669
  from: {
@@ -37227,9 +36817,7 @@ function checkBoundsOverlap(boundsA, boundsB) {
37227
36817
  } = boundsB;
37228
36818
  return !(ax1 <= bx1 && ax2 <= bx1 || ax1 >= bx2 && ax2 >= bx2 || ay1 <= by1 && ay2 <= by1 || ay1 >= by2 && ay2 >= by2);
37229
36819
  }
37230
- const labelingPoint = function (textBounds, graphicBounds) {
37231
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
37232
- let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
36820
+ const labelingPoint = (textBounds, graphicBounds, position = "top", offset = 0) => {
37233
36821
  if (!textBounds) return;
37234
36822
  const {
37235
36823
  x1: x1,
@@ -37295,9 +36883,7 @@ const getPointsOfLineArea = graphic => {
37295
36883
  }
37296
36884
  return points;
37297
36885
  };
37298
- function labelingLineOrArea(textBounds, graphicBounds) {
37299
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
37300
- let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
36886
+ function labelingLineOrArea(textBounds, graphicBounds, position = "end", offset = 0) {
37301
36887
  if (!textBounds || !graphicBounds) return {
37302
36888
  x: 1 / 0,
37303
36889
  y: 1 / 0
@@ -37351,11 +36937,7 @@ function loadLabelComponent() {
37351
36937
  }
37352
36938
 
37353
36939
  const isIntersect = (top, bottom) => Math.ceil(top) > Math.floor(bottom),
37354
- isXIntersect = (_ref, _ref2) => {
37355
- let [a, b] = _ref;
37356
- let [c, d] = _ref2;
37357
- return d > a && b > c;
37358
- };
36940
+ isXIntersect = ([a, b], [c, d]) => d > a && b > c;
37359
36941
  function getIntersectionLength(range1, range2) {
37360
36942
  const [start1, end1] = range1,
37361
36943
  [start2, end2] = range2,
@@ -37678,8 +37260,7 @@ class LabelBase extends AbstractComponent {
37678
37260
  getRelatedGraphic(item) {
37679
37261
  return this._idToGraphic.get(item.id);
37680
37262
  }
37681
- _initText() {
37682
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
37263
+ _initText(data = []) {
37683
37264
  const {
37684
37265
  textStyle = {}
37685
37266
  } = this.attribute,
@@ -37793,8 +37374,7 @@ class LabelBase extends AbstractComponent {
37793
37374
  visible: !1
37794
37375
  }), !1);
37795
37376
  }
37796
- _processClampForce(text, bmpTool, bitmap) {
37797
- let overlapPadding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
37377
+ _processClampForce(text, bmpTool, bitmap, overlapPadding = 0) {
37798
37378
  const {
37799
37379
  dy = 0,
37800
37380
  dx = 0
@@ -37907,9 +37487,7 @@ class LabelBase extends AbstractComponent {
37907
37487
  } = this.attribute;
37908
37488
  if (baseMarkGroupName) return this.getRootNode().find(node => node.name === baseMarkGroupName, !0);
37909
37489
  }
37910
- getGraphicBounds(graphic) {
37911
- let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
37912
- let position = arguments.length > 2 ? arguments[2] : undefined;
37490
+ getGraphicBounds(graphic, point = {}, position) {
37913
37491
  if (graphic) {
37914
37492
  if (!1 !== graphic.attribute.visible) return graphic.AABBBounds;
37915
37493
  const {
@@ -38052,13 +37630,12 @@ class LabelBase extends AbstractComponent {
38052
37630
  _syncStateWithRelatedGraphic(relatedGraphic) {
38053
37631
  this.attribute.syncState && relatedGraphic && relatedGraphic.on("afterAttributeUpdate", this._handleRelatedGraphicSetState);
38054
37632
  }
38055
- _afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, _ref) {
38056
- let {
38057
- mode: mode,
38058
- duration: duration,
38059
- easing: easing,
38060
- delay: delay
38061
- } = _ref;
37633
+ _afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, {
37634
+ mode: mode,
37635
+ duration: duration,
37636
+ easing: easing,
37637
+ delay: delay
37638
+ }) {
38062
37639
  const listener = event => {
38063
37640
  var _a, _b, _c;
38064
37641
  const {
@@ -38205,9 +37782,7 @@ class SymbolLabel extends LabelBase {
38205
37782
  data: data
38206
37783
  }, merge$1({}, SymbolLabel.defaultAttributes, restAttributes))), this.name = "symbol-label";
38207
37784
  }
38208
- labeling(textBounds, graphicBounds) {
38209
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
38210
- let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
37785
+ labeling(textBounds, graphicBounds, position = "top", offset = 0) {
38211
37786
  return labelingPoint(textBounds, graphicBounds, position, offset);
38212
37787
  }
38213
37788
  }
@@ -38241,9 +37816,7 @@ class RectLabel extends LabelBase {
38241
37816
  data: data
38242
37817
  }, merge$1({}, RectLabel.defaultAttributes, restAttributes)));
38243
37818
  }
38244
- labeling(textBounds, graphicBounds) {
38245
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
38246
- let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
37819
+ labeling(textBounds, graphicBounds, position = "top", offset = 0) {
38247
37820
  if (!textBounds || !graphicBounds) return;
38248
37821
  const {
38249
37822
  x1: x1,
@@ -38305,9 +37878,7 @@ let LineLabel$1 = class LineLabel extends LabelBase {
38305
37878
  data: data
38306
37879
  }, merge$1({}, LineLabel.defaultAttributes, restAttributes))), this.name = "line-label";
38307
37880
  }
38308
- getGraphicBounds(graphic) {
38309
- let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
38310
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
37881
+ getGraphicBounds(graphic, point = {}, position = "end") {
38311
37882
  if (!graphic || "line" !== graphic.type && "area" !== graphic.type) return super.getGraphicBounds(graphic, point);
38312
37883
  let points = graphic.attribute.points;
38313
37884
  const segments = graphic.attribute.segments;
@@ -38323,9 +37894,7 @@ let LineLabel$1 = class LineLabel extends LabelBase {
38323
37894
  y2: points[index].y
38324
37895
  } : void 0;
38325
37896
  }
38326
- labeling(textBounds, graphicBounds) {
38327
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
38328
- let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
37897
+ labeling(textBounds, graphicBounds, position = "end", offset = 0) {
38329
37898
  return labelingLineOrArea(textBounds, graphicBounds, position, offset);
38330
37899
  }
38331
37900
  };
@@ -38380,7 +37949,7 @@ class ArcLabel extends LabelBase {
38380
37949
  _overlapping(labels) {
38381
37950
  return ["inside", "inside-center"].includes(this.attribute.position) ? super._overlapping(labels) : labels;
38382
37951
  }
38383
- labeling(textBounds, graphicBounds) {
37952
+ labeling(textBounds, graphicBounds, position = "outside", offset = 0) {
38384
37953
  if (textBounds && graphicBounds) return {
38385
37954
  x: 0,
38386
37955
  y: 0
@@ -42992,8 +42561,7 @@ let DiscreteLegend$1 = class DiscreteLegend extends LegendBase {
42992
42561
  item.hasState(LegendStateValue.selected) && selectedData.push(item.data);
42993
42562
  }), selectedData;
42994
42563
  }
42995
- _appendDataToShape(shape, name, data, delegateShape) {
42996
- let states = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
42564
+ _appendDataToShape(shape, name, data, delegateShape, states = {}) {
42997
42565
  shape.name = name, shape.data = data, shape.delegate = delegateShape, shape.states = merge$1({}, DEFAULT_STATES, states);
42998
42566
  }
42999
42567
  _dispatchLegendEvent(eventName, legendItem, event) {
@@ -43953,8 +43521,7 @@ ColorContinuousLegend.defaultAttributes = {
43953
43521
  }
43954
43522
  };
43955
43523
 
43956
- function getSizeHandlerPath() {
43957
- let align = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "bottom";
43524
+ function getSizeHandlerPath(align = "bottom") {
43958
43525
  let centerX = 0;
43959
43526
  return "top" === align ? `\n M${centerX},-6L${centerX - 3.5},-2.5\n v5\n h7\n v-5\n Z\n` : "left" === align ? (centerX = 1, `\n M${centerX - 6},0L${centerX - 6 + 2.5},-3.5\n h5\n v7\n h-5\n Z\n`) : "right" === align ? (centerX = -1, `\n M${centerX + 6},0L${centerX + 6 - 2.5},-3.5\n h-5\n v7\n h5\n Z\n `) : `\n M${centerX},6L${centerX - 3.5},2.5\n v-5\n h7\n v5\n Z\n`;
43960
43527
  }
@@ -44521,72 +44088,54 @@ var PlayerEventEnum;
44521
44088
  PlayerEventEnum.change = "change", PlayerEventEnum.play = "play", PlayerEventEnum.pause = "pause", PlayerEventEnum.backward = "backward", PlayerEventEnum.forward = "forward", PlayerEventEnum.end = "end", PlayerEventEnum.OnChange = "change", PlayerEventEnum.OnPlay = "play", PlayerEventEnum.OnPause = "pause", PlayerEventEnum.OnBackward = "backward", PlayerEventEnum.OnForward = "forward", PlayerEventEnum.OnEnd = "end";
44522
44089
  }(PlayerEventEnum || (PlayerEventEnum = {}));
44523
44090
 
44524
- const isReachEndByDefault = _ref3 => {
44525
- let {
44526
- direction: direction,
44527
- maxIndex: maxIndex,
44528
- dataIndex: dataIndex
44529
- } = _ref3;
44530
- return direction === DirectionEnum.Default && dataIndex === maxIndex;
44531
- };
44532
- const isReachEndByReverse = _ref4 => {
44533
- let {
44534
- direction: direction,
44535
- minIndex: minIndex,
44536
- dataIndex: dataIndex
44537
- } = _ref4;
44538
- return direction === DirectionEnum.Reverse && dataIndex === minIndex;
44539
- };
44540
- const isReachEnd = _ref5 => {
44541
- let {
44542
- direction: direction,
44543
- maxIndex: maxIndex,
44544
- minIndex: minIndex,
44545
- dataIndex: dataIndex
44546
- } = _ref5;
44547
- return isReachEndByDefault({
44548
- direction: direction,
44549
- maxIndex: maxIndex,
44550
- dataIndex: dataIndex
44551
- }) || isReachEndByReverse({
44552
- direction: direction,
44553
- minIndex: minIndex,
44554
- dataIndex: dataIndex
44555
- });
44556
- };
44557
- const isReachStartByDefault = _ref6 => {
44558
- let {
44559
- direction: direction,
44560
- minIndex: minIndex,
44561
- dataIndex: dataIndex
44562
- } = _ref6;
44563
- return direction === DirectionEnum.Default && dataIndex === minIndex;
44564
- };
44565
- const isReachStartByReverse = _ref7 => {
44566
- let {
44567
- direction: direction,
44568
- maxIndex: maxIndex,
44569
- dataIndex: dataIndex
44570
- } = _ref7;
44571
- return direction === DirectionEnum.Reverse && dataIndex === maxIndex;
44572
- };
44573
- const isReachStart = _ref8 => {
44574
- let {
44575
- direction: direction,
44576
- maxIndex: maxIndex,
44577
- minIndex: minIndex,
44578
- dataIndex: dataIndex
44579
- } = _ref8;
44580
- return isReachStartByDefault({
44581
- direction: direction,
44582
- minIndex: minIndex,
44583
- dataIndex: dataIndex
44584
- }) || isReachStartByReverse({
44585
- direction: direction,
44586
- maxIndex: maxIndex,
44587
- dataIndex: dataIndex
44588
- });
44589
- };
44091
+ const isReachEndByDefault = ({
44092
+ direction: direction,
44093
+ maxIndex: maxIndex,
44094
+ dataIndex: dataIndex
44095
+ }) => direction === DirectionEnum.Default && dataIndex === maxIndex;
44096
+ const isReachEndByReverse = ({
44097
+ direction: direction,
44098
+ minIndex: minIndex,
44099
+ dataIndex: dataIndex
44100
+ }) => direction === DirectionEnum.Reverse && dataIndex === minIndex;
44101
+ const isReachEnd = ({
44102
+ direction: direction,
44103
+ maxIndex: maxIndex,
44104
+ minIndex: minIndex,
44105
+ dataIndex: dataIndex
44106
+ }) => isReachEndByDefault({
44107
+ direction: direction,
44108
+ maxIndex: maxIndex,
44109
+ dataIndex: dataIndex
44110
+ }) || isReachEndByReverse({
44111
+ direction: direction,
44112
+ minIndex: minIndex,
44113
+ dataIndex: dataIndex
44114
+ });
44115
+ const isReachStartByDefault = ({
44116
+ direction: direction,
44117
+ minIndex: minIndex,
44118
+ dataIndex: dataIndex
44119
+ }) => direction === DirectionEnum.Default && dataIndex === minIndex;
44120
+ const isReachStartByReverse = ({
44121
+ direction: direction,
44122
+ maxIndex: maxIndex,
44123
+ dataIndex: dataIndex
44124
+ }) => direction === DirectionEnum.Reverse && dataIndex === maxIndex;
44125
+ const isReachStart = ({
44126
+ direction: direction,
44127
+ maxIndex: maxIndex,
44128
+ minIndex: minIndex,
44129
+ dataIndex: dataIndex
44130
+ }) => isReachStartByDefault({
44131
+ direction: direction,
44132
+ minIndex: minIndex,
44133
+ dataIndex: dataIndex
44134
+ }) || isReachStartByReverse({
44135
+ direction: direction,
44136
+ maxIndex: maxIndex,
44137
+ dataIndex: dataIndex
44138
+ });
44590
44139
  const isHorizontal$1 = orient => "top" === orient || "bottom" === orient;
44591
44140
  const forwardStep = (direction, currentIndex, min, max) => "default" === direction ? Math.min(currentIndex + 1, max) : Math.max(currentIndex - 1, min);
44592
44141
 
@@ -45244,10 +44793,7 @@ let Brush$1 = class Brush extends AbstractComponent {
45244
44793
  };
45245
44794
  Brush$1.defaultAttributes = DEFAULT_BRUSH_ATTRIBUTES;
45246
44795
 
45247
- const mergeRowAttrs = function (target) {
45248
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
45249
- sources[_key - 1] = arguments[_key];
45250
- }
44796
+ const mergeRowAttrs = (target, ...sources) => {
45251
44797
  const shapeList = [target.shape, ...sources.map(s => null == s ? void 0 : s.shape)],
45252
44798
  keyList = [target.key, ...sources.map(s => null == s ? void 0 : s.key)],
45253
44799
  valueList = [target.value, ...sources.map(s => null == s ? void 0 : s.value)];
@@ -45565,8 +45111,7 @@ let Tooltip$1 = class Tooltip extends AbstractComponent {
45565
45111
  const shapeWidths = [],
45566
45112
  keyWidths = [],
45567
45113
  valueWidths = [];
45568
- filteredContent.forEach((_ref, i) => {
45569
- let [item, itemAttr] = _ref;
45114
+ filteredContent.forEach(([item, itemAttr], i) => {
45570
45115
  var _a;
45571
45116
  const {
45572
45117
  key: key,
@@ -48227,16 +47772,15 @@ const getProperty = (target, path, defaultValue) => {
48227
47772
  };
48228
47773
 
48229
47774
  const ignoreWhen = value => isDataView(value) || isHTMLElement(value);
48230
- function cloneDeepSpec(spec) {
48231
- let excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ["data"];
47775
+ function cloneDeepSpec(spec, excludeKeys = ["data"]) {
48232
47776
  return cloneDeep(spec, ignoreWhen, excludeKeys);
48233
47777
  }
48234
47778
 
48235
- function mergeSpec(target) {
47779
+ function mergeSpec(target, ...sources) {
48236
47780
  let sourceIndex = -1;
48237
- const length = arguments.length <= 1 ? 0 : arguments.length - 1;
47781
+ const length = sources.length;
48238
47782
  for (; ++sourceIndex < length;) {
48239
- const source = sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1];
47783
+ const source = sources[sourceIndex];
48240
47784
  baseMerge(target, source, !0, !0);
48241
47785
  }
48242
47786
  return target;
@@ -49331,8 +48875,7 @@ function getLinePoints(items, includeOnePoint, lastPoints, isArea) {
49331
48875
  return isNil$1(attrs.x) && (attrs.x = x), isNil$1(attrs.y) && (attrs.y = y), isNil$1(attrs.defined) && !1 === defined && (attrs.defined = !1), attrs.context = item.key, isArea && (isNil$1(attrs.x1) && (attrs.x1 = x1), isNil$1(attrs.y1) && (attrs.y1 = y1)), attrs;
49332
48876
  }) : null != lastPoints ? lastPoints : [];
49333
48877
  }
49334
- function getLargeRectsPoints(items, includeOnePoint) {
49335
- let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
48878
+ function getLargeRectsPoints(items, includeOnePoint, lastPoints = []) {
49336
48879
  if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
49337
48880
  const arr = new Float32Array(4 * items.length);
49338
48881
  return items.forEach((item, index) => {
@@ -49345,8 +48888,7 @@ function getLargeRectsPoints(items, includeOnePoint) {
49345
48888
  arr[4 * index] = x, arr[4 * index + 1] = y, arr[4 * index + 2] = width, arr[4 * index + 3] = y1 - y;
49346
48889
  }), arr;
49347
48890
  }
49348
- function getLargeSymbolsPoints(items, includeOnePoint) {
49349
- let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
48891
+ function getLargeSymbolsPoints(items, includeOnePoint, lastPoints = []) {
49350
48892
  if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
49351
48893
  const arr = new Float32Array(2 * items.length);
49352
48894
  return items.forEach((item, index) => {
@@ -49565,8 +49107,7 @@ Factory._plotMarks = {}, Factory._marks = {}, Factory._components = {}, Factory.
49565
49107
  }, Factory.getStageEventPlugin = type => Factory._stageEventPlugins[type];
49566
49108
 
49567
49109
  const isMarkType = type => !!GrammarMarkType[type];
49568
- function createGraphicItem(mark, markType) {
49569
- let attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
49110
+ function createGraphicItem(mark, markType, attrs = {}) {
49570
49111
  var _a;
49571
49112
  const graphicItem = Factory.getGraphicType(markType) ? Factory.createGraphic(markType, attrs) : Factory.createGraphicComponent(markType, attrs, {
49572
49113
  skipDefault: null === (_a = null == mark ? void 0 : mark.spec) || void 0 === _a ? void 0 : _a.skipTheme
@@ -49576,8 +49117,7 @@ function createGraphicItem(mark, markType) {
49576
49117
  }
49577
49118
  return graphicItem;
49578
49119
  }
49579
- function createGlyphGraphicItem(mark, glyphMeta) {
49580
- let attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
49120
+ function createGlyphGraphicItem(mark, glyphMeta, attrs = {}) {
49581
49121
  if (!Factory.getGraphicType(GrammarMarkType.glyph)) return;
49582
49122
  const graphicItem = Factory.createGraphic(GrammarMarkType.glyph, attrs),
49583
49123
  glyphMarks = glyphMeta.getMarks(),
@@ -49794,8 +49334,7 @@ let Element$1 = class Element {
49794
49334
  }, graphicAttributes;
49795
49335
  }, this.mark = mark;
49796
49336
  }
49797
- initGraphicItem() {
49798
- let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
49337
+ initGraphicItem(attributes = {}) {
49799
49338
  if (this.graphicItem) return;
49800
49339
  const attrTransforms = this.mark.getAttributeTransforms();
49801
49340
  if (this.graphicItem = this.mark.addGraphicItem(attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes, this.groupKey), !this.graphicItem) return;
@@ -49873,9 +49412,7 @@ let Element$1 = class Element {
49873
49412
  const setCustomizedShape = null === (_a = this.mark.getSpec()) || void 0 === _a ? void 0 : _a.setCustomizedShape;
49874
49413
  setCustomizedShape && (this.graphicItem.pathProxy = attrs => setCustomizedShape(this.data, attrs, new CustomPath2D()));
49875
49414
  }
49876
- encodeItems(items, encoders) {
49877
- let isReentered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
49878
- let parameters = arguments.length > 3 ? arguments[3] : undefined;
49415
+ encodeItems(items, encoders, isReentered = !1, parameters) {
49879
49416
  const isCollectionMark = this.mark.isCollectionMark(),
49880
49417
  updateEncoder = encoders[BuiltInEncodeNames.update],
49881
49418
  enterEncoder = encoders[BuiltInEncodeNames.enter],
@@ -50014,8 +49551,7 @@ let Element$1 = class Element {
50014
49551
  this.graphicItem.setAttributes(currentGraphicAttributes);
50015
49552
  } else this.graphicItem.setAttributes(graphicAttributes);
50016
49553
  }
50017
- getGraphicAttribute(channel) {
50018
- let prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
49554
+ getGraphicAttribute(channel, prev = !1) {
50019
49555
  var _a;
50020
49556
  if (!this.graphicItem) return;
50021
49557
  if (prev) {
@@ -50031,15 +49567,13 @@ let Element$1 = class Element {
50031
49567
  }
50032
49568
  return get$1(null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.attribute, getKey);
50033
49569
  }
50034
- setGraphicAttribute(channel, value) {
50035
- let final = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
49570
+ setGraphicAttribute(channel, value, final = !0) {
50036
49571
  if (!this.graphicItem) return;
50037
49572
  const finalGraphicAttributes = this.getFinalGraphicAttributes(),
50038
49573
  prevGraphicAttributes = this.getPrevGraphicAttributes();
50039
49574
  final && finalGraphicAttributes && (finalGraphicAttributes[channel] = value), prevGraphicAttributes && !has$1(prevGraphicAttributes, channel) && (prevGraphicAttributes[channel] = this.graphicItem.attribute[channel]), this.graphicItem.setAttribute(channel, value);
50040
49575
  }
50041
- setGraphicAttributes(attributes) {
50042
- let final = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
49576
+ setGraphicAttributes(attributes, final = !0) {
50043
49577
  if (!this.graphicItem) return;
50044
49578
  const finalGraphicAttributes = this.getFinalGraphicAttributes(),
50045
49579
  prevGraphicAttributes = this.getPrevGraphicAttributes();
@@ -50799,17 +50333,11 @@ class GrammarBase extends EventEmitter {
50799
50333
  removeEventListener(type, handler) {
50800
50334
  return handler ? this.off(type, handler) : this.off(type), this;
50801
50335
  }
50802
- emit(event) {
50336
+ emit(event, ...args) {
50803
50337
  var _a, _b;
50804
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
50805
- args[_key - 1] = arguments[_key];
50806
- }
50807
50338
  return null === (_b = null === (_a = this.view) || void 0 === _a ? void 0 : _a.emit) || void 0 === _b || _b.call(_a, event, ...args), super.emit(event, ...args);
50808
50339
  }
50809
- emitGrammarEvent(event) {
50810
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
50811
- args[_key2 - 1] = arguments[_key2];
50812
- }
50340
+ emitGrammarEvent(event, ...args) {
50813
50341
  return super.emit(event, ...args);
50814
50342
  }
50815
50343
  evaluateTransform(transforms, upstream, parameters) {
@@ -50832,15 +50360,13 @@ class GrammarBase extends EventEmitter {
50832
50360
  name(name) {
50833
50361
  return arguments.length ? (this._name = name, this) : this._name;
50834
50362
  }
50835
- attach(reference) {
50836
- let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
50363
+ attach(reference, count = 1) {
50837
50364
  return array(reference).filter(ref => !isNil$1(ref)).forEach(ref => {
50838
50365
  var _a;
50839
50366
  isNil$1(reference) || (ref.targets.includes(this) || ref.targets.push(this), this.references.set(ref, (null !== (_a = this.references.get(ref)) && void 0 !== _a ? _a : 0) + count));
50840
50367
  }), this;
50841
50368
  }
50842
- detach(reference) {
50843
- let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
50369
+ detach(reference, count = 1) {
50844
50370
  return array(reference).filter(ref => !isNil$1(ref)).forEach(ref => {
50845
50371
  const refCount = this.references.get(ref) - count;
50846
50372
  refCount > 0 ? this.references.set(ref, refCount - 1) : (this.references.delete(ref), ref.targets.includes(this) && (ref.targets = ref.targets.filter(target => target !== this)));
@@ -50980,7 +50506,7 @@ const parseTransformSpec = (spec, view) => {
50980
50506
  return null;
50981
50507
  };
50982
50508
 
50983
- const jsonParser = function (data) {
50509
+ const jsonParser = (data, options = {}, dataView) => {
50984
50510
  if (!isString$1(data)) return array(data);
50985
50511
  try {
50986
50512
  return array(JSON.parse(data));
@@ -51069,24 +50595,21 @@ class Data extends GrammarBase {
51069
50595
  getDataIDKey() {
51070
50596
  return this._dataIDKey;
51071
50597
  }
51072
- values(values, format) {
51073
- let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
50598
+ values(values, format, load = !0) {
51074
50599
  const spec = Object.assign({}, this.spec, {
51075
50600
  values: values,
51076
50601
  format: format
51077
50602
  });
51078
50603
  return isNil$1(values) || (spec.url = void 0, spec.source = void 0), load ? this.parseLoad(spec) : this;
51079
50604
  }
51080
- url(url, format) {
51081
- let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
50605
+ url(url, format, load = !0) {
51082
50606
  const spec = Object.assign({}, this.spec, {
51083
50607
  url: url,
51084
50608
  format: format
51085
50609
  });
51086
50610
  return isNil$1(url) || (spec.values = void 0, spec.source = void 0), load ? this.parseLoad(spec) : this;
51087
50611
  }
51088
- source(source, format) {
51089
- let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
50612
+ source(source, format, load = !0) {
51090
50613
  const spec = Object.assign({}, this.spec, {
51091
50614
  source: source,
51092
50615
  format: format
@@ -51350,12 +50873,10 @@ class CanvasRenderer {
51350
50873
  resize(width, height) {
51351
50874
  return this._view.emit(HOOK_EVENT.BEFORE_STAGE_RESIZE), this.shouldResize(width, height) && (this._width = width, this._height = height, this._stage && this._stage.resize(width, height)), this._view.emit(HOOK_EVENT.AFTER_STAGE_RESIZE), this;
51352
50875
  }
51353
- setViewBox(viewBox) {
51354
- let rerender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
50876
+ setViewBox(viewBox, rerender = !0) {
51355
50877
  return this._stage ? (!viewBox || this._viewBox && viewBox.x1 === this._viewBox.x1 && viewBox.x2 === this._viewBox.x2 && viewBox.y1 === this._viewBox.y1 && viewBox.y2 === this._viewBox.y2 || (this._viewBox = viewBox, this._stage.setViewBox(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1, rerender)), this) : this;
51356
50878
  }
51357
- render() {
51358
- let immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
50879
+ render(immediately = !1) {
51359
50880
  return this._view.emit(HOOK_EVENT.BEFORE_VRENDER_DRAW), this.initStage(), this._stage.disableDirtyBounds(), this._stage.afterNextRender(this.handleAfterNextRender), immediately && (this._stage.render(), this._view.emit(HOOK_EVENT.AFTER_VRENDER_DRAW)), this;
51360
50881
  }
51361
50882
  renderNextFrame() {
@@ -51462,8 +50983,7 @@ function getChangedTouchesPos(e) {
51462
50983
  canvasY: pos.y
51463
50984
  };
51464
50985
  }
51465
- function defineSrPosition(event, pos) {
51466
- let client = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
50986
+ function defineSrPosition(event, pos, client = !0) {
51467
50987
  const keys = ["canvasX", "canvasY"];
51468
50988
  return client && (keys.push("clientX"), keys.push("clientY")), keys.forEach(key => {
51469
50989
  isValidNumber$1(pos[key]) && Object.defineProperty(event, key, {
@@ -52272,8 +51792,7 @@ let GroupMark$1 = class GroupMark extends Mark {
52272
51792
  removeChild(mark) {
52273
51793
  return this.children = this.children.filter(child => child !== mark), this;
52274
51794
  }
52275
- includesChild(mark) {
52276
- let descendant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
51795
+ includesChild(mark, descendant = !0) {
52277
51796
  return !!this.children.includes(mark) || !!descendant && this.children.some(child => child.markType === GrammarMarkType.group && child.includesChild(mark, !0));
52278
51797
  }
52279
51798
  updateLayoutChildren() {
@@ -53313,13 +52832,10 @@ class View extends EventEmitter {
53313
52832
  fn();
53314
52833
  });
53315
52834
  }
53316
- constructor() {
53317
- var _this;
53318
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
53319
- let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
53320
- (super(), _this = this), this._observer = null, this._onResize = debounce(function () {
53321
- const size = _this._getContainerSize();
53322
- size && _this.resize(size.width, size.height);
52835
+ constructor(options = {}, config = {}) {
52836
+ super(), this._observer = null, this._onResize = debounce((...args) => {
52837
+ const size = this._getContainerSize();
52838
+ size && this.resize(size.width, size.height);
53323
52839
  }, 100), this.delegateEvent = (event, type) => {
53324
52840
  const extendedEvt = getExtendedEvents(this, event, type, EVENT_SOURCE_VIEW);
53325
52841
  this.emit(type, extendedEvt, event.element);
@@ -53429,22 +52945,19 @@ class View extends EventEmitter {
53429
52945
  glyphType: glyphType
53430
52946
  });
53431
52947
  }
53432
- component(componentType, group) {
53433
- let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "2d";
52948
+ component(componentType, group, mode = "2d") {
53434
52949
  return this.mark(GrammarMarkType.component, group, {
53435
52950
  componentType: componentType,
53436
52951
  mode: mode
53437
52952
  });
53438
52953
  }
53439
- axis(group) {
53440
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
52954
+ axis(group, mode = "2d") {
53441
52955
  return this.mark(GrammarMarkType.component, group, {
53442
52956
  componentType: ComponentEnum.axis,
53443
52957
  mode: mode
53444
52958
  });
53445
52959
  }
53446
- grid(group) {
53447
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
52960
+ grid(group, mode = "2d") {
53448
52961
  return this.mark(GrammarMarkType.component, group, {
53449
52962
  componentType: ComponentEnum.grid,
53450
52963
  mode: mode
@@ -53593,8 +53106,7 @@ class View extends EventEmitter {
53593
53106
  getCurrentTheme() {
53594
53107
  return this._theme;
53595
53108
  }
53596
- setCurrentTheme(theme) {
53597
- let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
53109
+ setCurrentTheme(theme, render = !0) {
53598
53110
  return this.theme(theme), this.grammars.getAllMarks().forEach(mark => {
53599
53111
  mark.commit();
53600
53112
  }), render ? (this.evaluate(), this.renderer.render(!0)) : this._dataflow.evaluate(), this;
@@ -53796,8 +53308,7 @@ class View extends EventEmitter {
53796
53308
  }
53797
53309
  return null;
53798
53310
  }
53799
- resize(width, height) {
53800
- let render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
53311
+ resize(width, height, render = !0) {
53801
53312
  let needDataflow = !1;
53802
53313
  return width !== this.width() && (needDataflow = !0, this.updateSignal(SIGNAL_WIDTH, width)), height !== this.height() && (needDataflow = !0, this.updateSignal(SIGNAL_HEIGHT, height)), needDataflow && (render ? this.evaluate({
53803
53314
  morph: !1
@@ -54082,8 +53593,7 @@ class GlyphElement extends Element$1 {
54082
53593
  getGlyphGraphicItems() {
54083
53594
  return this.glyphGraphicItems;
54084
53595
  }
54085
- initGraphicItem() {
54086
- let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
53596
+ initGraphicItem(attributes = {}) {
54087
53597
  if (this.graphicItem) return;
54088
53598
  this.graphicItem = this.mark.addGraphicItem(attributes, this.groupKey), this.graphicItem[BridgeElementKey] = this, this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(!1);
54089
53599
  const glyphMarks = this.glyphMeta.getMarks();
@@ -54144,8 +53654,7 @@ class GlyphElement extends Element$1 {
54144
53654
  }
54145
53655
  return defaultEncodeValues;
54146
53656
  }
54147
- _onGlyphAttributeUpdate() {
54148
- let first = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
53657
+ _onGlyphAttributeUpdate(first = !1) {
54149
53658
  return attributes => {
54150
53659
  if (!this.mark) return attributes;
54151
53660
  const glyphMarks = this.glyphMeta.getMarks(),
@@ -54179,26 +53688,20 @@ class GlyphElement extends Element$1 {
54179
53688
  glyphItem.nextAttrs = Object.assign({}, items[index].nextAttrs, additionalAttributes);
54180
53689
  }), glyphItems;
54181
53690
  }
54182
- getGraphicAttribute(channel) {
54183
- let prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
54184
- let markName = arguments.length > 2 ? arguments[2] : undefined;
53691
+ getGraphicAttribute(channel, prev = !1, markName) {
54185
53692
  if (!this.graphicItem) return;
54186
53693
  const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
54187
53694
  if (prev && has$1(prevGraphicAttributes, channel)) return prevGraphicAttributes[channel];
54188
53695
  return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).attribute[channel];
54189
53696
  }
54190
- setGraphicAttribute(channel, value) {
54191
- let final = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
54192
- let markName = arguments.length > 3 ? arguments[3] : undefined;
53697
+ setGraphicAttribute(channel, value, final = !0, markName) {
54193
53698
  if (!this.graphicItem) return;
54194
53699
  const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem,
54195
53700
  finalGraphicAttributes = this.getFinalGraphicAttributes(markName),
54196
53701
  prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
54197
53702
  final && (finalGraphicAttributes[channel] = value), has$1(prevGraphicAttributes, channel) || (prevGraphicAttributes[channel] = graphicItem.attribute[channel]), graphicItem.setAttribute(channel, value);
54198
53703
  }
54199
- setGraphicAttributes(attributes) {
54200
- let final = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
54201
- let markName = arguments.length > 2 ? arguments[2] : undefined;
53704
+ setGraphicAttributes(attributes, final = !0, markName) {
54202
53705
  if (!this.graphicItem) return;
54203
53706
  const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem,
54204
53707
  finalGraphicAttributes = this.getFinalGraphicAttributes(markName),
@@ -55135,8 +54638,7 @@ var __rest = undefined && undefined.__rest || function (s, e) {
55135
54638
  }
55136
54639
  return t;
55137
54640
  };
55138
- const generateLabelAttributes = function (marks, groupSize, encoder, labelStyle, parameters) {
55139
- let theme = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
54641
+ const generateLabelAttributes = (marks, groupSize, encoder, labelStyle, parameters, theme = {}) => {
55140
54642
  var _a;
55141
54643
  const labelTheme = null === (_a = theme.components) || void 0 === _a ? void 0 : _a.dataLabel,
55142
54644
  dataLabels = marks.map((mark, index) => {
@@ -56943,9 +56445,7 @@ class Animator {
56943
56445
  animate(animationParameters, parameters) {
56944
56446
  return this.isAnimating = !0, this.animateElement(animationParameters, parameters), 0 === this.runnings.length && this.animationEnd(), this;
56945
56447
  }
56946
- stop() {
56947
- let stopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
56948
- let invokeCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
56448
+ stop(stopState = "end", invokeCallback = !0) {
56949
56449
  return this.runnings.forEach(running => running.stop(stopState)), this.animationEnd(invokeCallback), this;
56950
56450
  }
56951
56451
  pause() {
@@ -56968,8 +56468,7 @@ class Animator {
56968
56468
  getEndAttributes() {
56969
56469
  return this.runnings.reduce((attributes, running) => Object.assign(attributes, running.getEndProps()), {});
56970
56470
  }
56971
- animationEnd() {
56972
- let invokeCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
56471
+ animationEnd(invokeCallback = !0) {
56973
56472
  var _a;
56974
56473
  this.isAnimating = !1, this.runnings = null, invokeCallback && (null === (_a = this.callbackFunction) || void 0 === _a || _a.call(null));
56975
56474
  }
@@ -57071,8 +56570,7 @@ function normalizeAnimationConfig(config) {
57071
56570
  normalizedConfig = normalizedConfig.concat(normalizeStateAnimationConfig(state, config[state]));
57072
56571
  }), normalizedConfig;
57073
56572
  }
57074
- function normalizeStateAnimationConfig(state, config) {
57075
- let initialIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
56573
+ function normalizeStateAnimationConfig(state, config, initialIndex = 0) {
57076
56574
  const normalizedConfig = [];
57077
56575
  let index = initialIndex;
57078
56576
  return array(config).forEach(animationConfig => {
@@ -57242,8 +56740,7 @@ class Animate {
57242
56740
  release() {
57243
56741
  this.stop(), this.animators.clear(), this.configs = null, this.animators = null, this.elementRecorder = null, this.timelineCount = null;
57244
56742
  }
57245
- animateByTimeline(config, elements, parameters) {
57246
- let forceState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
56743
+ animateByTimeline(config, elements, parameters, forceState = !1) {
57247
56744
  var _a;
57248
56745
  const animators = [],
57249
56746
  animatedElements = elements.filter(element => {
@@ -57342,8 +56839,7 @@ class Animate {
57342
56839
  timeSlices: timeSlices
57343
56840
  };
57344
56841
  }
57345
- clearElementAnimation(element) {
57346
- let clearElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
56842
+ clearElementAnimation(element, clearElement = !0) {
57347
56843
  this.animators.forEach(animators => {
57348
56844
  animators.forEach(animator => {
57349
56845
  animator.element === element && (animator.animationOptions.state === DiffState.exit ? animator.stop("start", !1) : animator.stop("end", !1), this.handleAnimatorEnd(animator, clearElement));
@@ -57356,12 +56852,10 @@ class Animate {
57356
56852
  this.clearElement(element, i === elements.length - 1);
57357
56853
  });
57358
56854
  }
57359
- clearElement(element) {
57360
- let updateMark = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
56855
+ clearElement(element, updateMark = !0) {
57361
56856
  this.clearElementAnimation(element), element.getGraphicItem() && (element.clearGraphicAttributes(), element.diffState === DiffState.exit && (element.isReserved = !1), updateMark && this.mark.cleanExitElements());
57362
56857
  }
57363
- handleAnimatorEnd(animator) {
57364
- let clearElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
56858
+ handleAnimatorEnd(animator, clearElement = !0) {
57365
56859
  const element = animator.element,
57366
56860
  animationOptions = animator.animationOptions,
57367
56861
  animationState = animationOptions.state,
@@ -64288,7 +63782,7 @@ const registerVChartCore = () => {
64288
63782
  };
64289
63783
  registerVChartCore();
64290
63784
 
64291
- const version = "1.13.22-alpha.4";
63785
+ const version = "1.13.13";
64292
63786
 
64293
63787
  const addVChartProperty = (data, op) => {
64294
63788
  const context = op.beforeCall();
@@ -78850,7 +78344,7 @@ class PolarAxis extends AxisComponent {
78850
78344
  return this._startAngle;
78851
78345
  }
78852
78346
  _layoutAngleAxis() {
78853
- var _a, _b, _c;
78347
+ var _a, _b, _c, _d, _e;
78854
78348
  const center = this.getCenter();
78855
78349
  const radius = this.computeLayoutOuterRadius();
78856
78350
  const innerRadius = this.computeLayoutInnerRadius();
@@ -78858,7 +78352,7 @@ class PolarAxis extends AxisComponent {
78858
78352
  const items = this.getLabelItems(angleRange);
78859
78353
  const commonAttrs = Object.assign(Object.assign({}, this.getLayoutStartPoint()), { inside: this._spec.inside, center,
78860
78354
  radius,
78861
- innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, sides: ((_c = (_b = (_a = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _a === void 0 ? void 0 : _a.getSpec()) === null || _b === void 0 ? void 0 : _b.grid) === null || _c === void 0 ? void 0 : _c.smooth)
78355
+ innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, layoutRect: this.getRefLayoutRect(), autoLabelMaxWidth: (_b = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.autoLabelMaxWidth) !== null && _b !== void 0 ? _b : false, sides: ((_e = (_d = (_c = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _c === void 0 ? void 0 : _c.getSpec()) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.smooth)
78862
78356
  ? undefined
78863
78357
  : this.getScale().domain().length });
78864
78358
  const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {
@@ -81875,9 +81369,7 @@ let GridLayout$1 = class GridLayout extends BaseLayout {
81875
81369
  }
81876
81370
  return this.pointsAtRadius[radius] = points, points;
81877
81371
  }
81878
- getTextInfo(item) {
81879
- let shrinkRatio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
81880
- let index = arguments.length > 2 ? arguments[2] : undefined;
81372
+ getTextInfo(item, shrinkRatio = 1, index) {
81881
81373
  var _a;
81882
81374
  const sizeShrinkRatio = this.options.clip ? 1 : shrinkRatio,
81883
81375
  fontSize = Math.max(Math.floor((this.isTryRepeatFill ? this.options.fillTextFontSize : this.getTextFontSize(item)) * sizeShrinkRatio), this.options.minFontSize);
@@ -81955,8 +81447,7 @@ let GridLayout$1 = class GridLayout extends BaseLayout {
81955
81447
  }
81956
81448
  return !0;
81957
81449
  }
81958
- layoutWord(index) {
81959
- let shrinkRatio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
81450
+ layoutWord(index, shrinkRatio = 1) {
81960
81451
  const item = this.data[index],
81961
81452
  info = this.getTextInfo(item, shrinkRatio, index);
81962
81453
  if (!info) return !1;
@@ -84371,9 +83862,7 @@ const registerSunburstAnimation = () => {
84371
83862
  }));
84372
83863
  };
84373
83864
 
84374
- const flattenNodes = function (nodes) {
84375
- let output = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
84376
- let options = arguments.length > 2 ? arguments[2] : undefined;
83865
+ const flattenNodes = (nodes, output = [], options) => {
84377
83866
  const hasMaxDepth = (null == options ? void 0 : options.maxDepth) >= 0;
84378
83867
  return nodes.forEach(node => {
84379
83868
  (!hasMaxDepth || node.depth <= options.maxDepth) && (output.push((null == options ? void 0 : options.callback) ? options.callback(node) : node), node.children && (hasMaxDepth && node.depth === options.maxDepth ? (node.children = null, node.isLeaf = !0) : flattenNodes(node.children, output, options)));
@@ -84414,13 +83903,12 @@ function binary (parent, x0, y0, x1, y1) {
84414
83903
  partition(0, n, parent.value, x0, y0, x1, y1);
84415
83904
  }
84416
83905
 
84417
- function dice (parent, x0, y0, x1, y1) {
84418
- let keyMap = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
84419
- x0: "x0",
84420
- x1: "x1",
84421
- y0: "y0",
84422
- y1: "y1"
84423
- };
83906
+ function dice (parent, x0, y0, x1, y1, keyMap = {
83907
+ x0: "x0",
83908
+ x1: "x1",
83909
+ y0: "y0",
83910
+ y1: "y1"
83911
+ }) {
84424
83912
  const nodes = parent.children;
84425
83913
  let node,
84426
83914
  i = -1;
@@ -84483,12 +83971,7 @@ const generateSquarify = ratio => (parent, x0, y0, x1, y1) => {
84483
83971
  squarifyRatio(ratio, parent, x0, y0, x1, y1);
84484
83972
  };
84485
83973
 
84486
- const calculateNodeValue$1 = function (subTree, output) {
84487
- let depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
84488
- let flattenIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;
84489
- let parent = arguments.length > 4 ? arguments[4] : undefined;
84490
- let getNodeKey = arguments.length > 5 ? arguments[5] : undefined;
84491
- let valueField = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "value";
83974
+ const calculateNodeValue$1 = (subTree, output, depth = 0, flattenIndex = -1, parent, getNodeKey, valueField = "value") => {
84492
83975
  let sum = 0,
84493
83976
  prevFlattenIndex = null != flattenIndex ? flattenIndex : -1,
84494
83977
  maxDepth = depth;
@@ -84808,8 +84291,7 @@ SunburstLayout.defaultOpionts = {
84808
84291
  const a = 1664525,
84809
84292
  c = 1013904223,
84810
84293
  m = 4294967296;
84811
- function randomLCG() {
84812
- let initS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
84294
+ function randomLCG(initS = 1) {
84813
84295
  let s = initS;
84814
84296
  return () => (s = (a * s + c) % m) / m;
84815
84297
  }
@@ -90024,21 +89506,18 @@ const getArcsFromCircles = circles => {
90024
89506
  circleList = Object.values(circles);
90025
89507
  if (!circleList.length) return [];
90026
89508
  intersectionArea(circleList, areaStats);
90027
- const arcs = areaStats.arcs.map(_ref => {
90028
- let {
90029
- p1: p1,
90030
- p2: p2,
90031
- circle: circle,
90032
- width: width
90033
- } = _ref;
90034
- return {
90035
- p1: p1,
90036
- p2: p2,
90037
- radius: circle.radius,
90038
- setId: circle.setId,
90039
- largeArcFlag: width > circle.radius
90040
- };
90041
- }),
89509
+ const arcs = areaStats.arcs.map(({
89510
+ p1: p1,
89511
+ p2: p2,
89512
+ circle: circle,
89513
+ width: width
89514
+ }) => ({
89515
+ p1: p1,
89516
+ p2: p2,
89517
+ radius: circle.radius,
89518
+ setId: circle.setId,
89519
+ largeArcFlag: width > circle.radius
89520
+ })),
90042
89521
  result = [];
90043
89522
  let i = 0,
90044
89523
  arc = arcs[0];