@visactor/vchart-extension 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.
Files changed (39) hide show
  1. package/build/index.js +157 -331
  2. package/build/index.min.js +2 -2
  3. package/cjs/charts/compare-sankey/compare-sankey.d.ts +2 -0
  4. package/cjs/charts/compare-sankey/compare-sankey.js +6 -0
  5. package/cjs/charts/compare-sankey/compare-sankey.js.map +1 -1
  6. package/cjs/charts/compare-sankey-diff/compare-sankey-diff-transformer.js +2 -1
  7. package/cjs/charts/compare-sankey-diff/interface.js +1 -2
  8. package/cjs/charts/sequence-scatter-kde/constant.js +2 -1
  9. package/cjs/charts/sequence-scatter-kde/interface.js +1 -2
  10. package/cjs/charts/sequence-scatter-pixel/constant.js +1 -1
  11. package/cjs/charts/sequence-scatter-pixel/interface.js +1 -1
  12. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js +1 -1
  13. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel.js +1 -1
  14. package/cjs/charts/sequence-scatter-pixel/utils.js +1 -1
  15. package/cjs/components/bar-link/index.js +2 -1
  16. package/cjs/components/series-label/constant.js +1 -2
  17. package/cjs/components/series-label/index.js +1 -1
  18. package/cjs/components/series-label/series-label.js +1 -1
  19. package/cjs/components/series-label/type.js +1 -1
  20. package/cjs/components/series-label/util.js +1 -1
  21. package/esm/charts/compare-sankey/compare-sankey.d.ts +2 -0
  22. package/esm/charts/compare-sankey/compare-sankey.js +6 -0
  23. package/esm/charts/compare-sankey/compare-sankey.js.map +1 -1
  24. package/esm/charts/compare-sankey-diff/compare-sankey-diff-transformer.js +2 -1
  25. package/esm/charts/compare-sankey-diff/interface.js +1 -2
  26. package/esm/charts/sequence-scatter-kde/constant.js +2 -1
  27. package/esm/charts/sequence-scatter-kde/interface.js +1 -2
  28. package/esm/charts/sequence-scatter-pixel/constant.js +1 -1
  29. package/esm/charts/sequence-scatter-pixel/interface.js +1 -1
  30. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js +1 -1
  31. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel.js +1 -1
  32. package/esm/charts/sequence-scatter-pixel/utils.js +1 -1
  33. package/esm/components/bar-link/index.js +2 -1
  34. package/esm/components/series-label/constant.js +1 -2
  35. package/esm/components/series-label/index.js +1 -1
  36. package/esm/components/series-label/series-label.js +1 -1
  37. package/esm/components/series-label/type.js +1 -1
  38. package/esm/components/series-label/util.js +1 -1
  39. package/package.json +14 -9
package/build/index.js CHANGED
@@ -328,10 +328,7 @@
328
328
  const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
329
329
  var isType$1 = isType;
330
330
 
331
- const isBoolean = function (value) {
332
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
333
- return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
334
- };
331
+ const isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
335
332
  var isBoolean$1 = isBoolean;
336
333
 
337
334
  const isFunction = value => "function" == typeof value;
@@ -361,8 +358,7 @@
361
358
  };
362
359
  var isPlainObject$1 = isPlainObject;
363
360
 
364
- const isString = function (value) {
365
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
361
+ const isString = (value, fuzzy = !1) => {
366
362
  const type = typeof value;
367
363
  return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
368
364
  };
@@ -379,8 +375,7 @@
379
375
  const isDate = value => isType$1(value, "Date");
380
376
  var isDate$1 = isDate;
381
377
 
382
- const isNumber = function (value) {
383
- let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
378
+ const isNumber = (value, fuzzy = !1) => {
384
379
  const type = typeof value;
385
380
  return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
386
381
  };
@@ -443,9 +438,7 @@
443
438
  return result;
444
439
  }
445
440
 
446
- function baseMerge(target, source) {
447
- let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
448
- let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
441
+ function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
449
442
  if (source) {
450
443
  if (target === source) return;
451
444
  if (isValid$1(source) && "object" == typeof source) {
@@ -463,9 +456,7 @@
463
456
  }
464
457
  }
465
458
  }
466
- function baseMergeDeep(target, source, key) {
467
- let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
468
- let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
459
+ function baseMergeDeep(target, source, key, shallowArray = !1, skipTargetArray = !1) {
469
460
  const objValue = target[key],
470
461
  srcValue = source[key];
471
462
  let newValue = source[key],
@@ -486,11 +477,11 @@
486
477
  function eq(value, other) {
487
478
  return value === other || Number.isNaN(value) && Number.isNaN(other);
488
479
  }
489
- function merge(target) {
480
+ function merge(target, ...sources) {
490
481
  let sourceIndex = -1;
491
- const length = arguments.length <= 1 ? 0 : arguments.length - 1;
482
+ const length = sources.length;
492
483
  for (; ++sourceIndex < length;) {
493
- baseMerge(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
484
+ baseMerge(target, sources[sourceIndex], !0);
494
485
  }
495
486
  return target;
496
487
  }
@@ -554,9 +545,7 @@
554
545
  static clearInstance() {
555
546
  Logger._instance = null;
556
547
  }
557
- constructor() {
558
- let level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LoggerLevel.None;
559
- let method = arguments.length > 1 ? arguments[1] : undefined;
548
+ constructor(level = LoggerLevel.None, method) {
560
549
  this._onErrorHandler = [], this._level = level, this._method = method;
561
550
  }
562
551
  addErrorHandler(handler) {
@@ -566,10 +555,7 @@
566
555
  const index = this._onErrorHandler.findIndex(h => h === handler);
567
556
  index < 0 || this._onErrorHandler.splice(index, 1);
568
557
  }
569
- callErrorHandler() {
570
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
571
- args[_key] = arguments[_key];
572
- }
558
+ callErrorHandler(...args) {
573
559
  this._onErrorHandler.forEach(h => h(...args));
574
560
  }
575
561
  canLogInfo() {
@@ -587,29 +573,17 @@
587
573
  level(levelValue) {
588
574
  return arguments.length ? (this._level = +levelValue, this) : this._level;
589
575
  }
590
- error() {
576
+ error(...args) {
591
577
  var _a;
592
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
593
- args[_key2] = arguments[_key2];
594
- }
595
578
  return this._level >= LoggerLevel.Error && (this._onErrorHandler.length ? this.callErrorHandler(...args) : log(null !== (_a = this._method) && void 0 !== _a ? _a : "error", "ERROR", args)), this;
596
579
  }
597
- warn() {
598
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
599
- args[_key3] = arguments[_key3];
600
- }
580
+ warn(...args) {
601
581
  return this._level >= LoggerLevel.Warn && log(this._method || "warn", "WARN", args), this;
602
582
  }
603
- info() {
604
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
605
- args[_key4] = arguments[_key4];
606
- }
583
+ info(...args) {
607
584
  return this._level >= LoggerLevel.Info && log(this._method || "log", "INFO", args), this;
608
585
  }
609
- debug() {
610
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
611
- args[_key5] = arguments[_key5];
612
- }
586
+ debug(...args) {
613
587
  return this._level >= LoggerLevel.Debug && log(this._method || "log", "DEBUG", args), this;
614
588
  }
615
589
  }
@@ -617,9 +591,7 @@
617
591
 
618
592
  const DEFAULT_ABSOLUTE_TOLERATE = 1e-10,
619
593
  DEFAULT_RELATIVE_TOLERATE = 1e-10;
620
- function isNumberClose(a, b) {
621
- let relTol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_RELATIVE_TOLERATE;
622
- let absTol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_ABSOLUTE_TOLERATE;
594
+ function isNumberClose(a, b, relTol = DEFAULT_RELATIVE_TOLERATE, absTol = DEFAULT_ABSOLUTE_TOLERATE) {
623
595
  const abs = absTol,
624
596
  rel = relTol * Math.max(a, b);
625
597
  return Math.abs(a - b) <= Math.max(abs, rel);
@@ -637,14 +609,12 @@
637
609
  }
638
610
 
639
611
  const getter = path => obj => get$1(obj, path);
640
- const fieldSingle = function (fieldStr) {
641
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
612
+ const fieldSingle = (fieldStr, opt = {}) => {
642
613
  if (isFunction$1(fieldStr)) return fieldStr;
643
614
  const path = [fieldStr];
644
615
  return (opt && opt.get || getter)(path);
645
616
  };
646
- const field = function (fieldStr) {
647
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
617
+ const field = (fieldStr, opt = {}) => {
648
618
  if (isArray$1(fieldStr)) {
649
619
  const funcs = fieldStr.map(entry => fieldSingle(entry, opt));
650
620
  return datum => funcs.map(func => func(datum));
@@ -681,11 +651,7 @@
681
651
  }
682
652
 
683
653
  class Point {
684
- constructor() {
685
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
686
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
687
- let x1 = arguments.length > 2 ? arguments[2] : undefined;
688
- let y1 = arguments.length > 3 ? arguments[3] : undefined;
654
+ constructor(x = 0, y = 0, x1, y1) {
689
655
  this.x = 0, this.y = 0, this.x = x, this.y = y, this.x1 = x1, this.y1 = y1;
690
656
  }
691
657
  clone() {
@@ -764,15 +730,13 @@
764
730
  function getProjectionRadius(checkAxis, axis) {
765
731
  return Math.abs(axis[0] * checkAxis[0] + axis[1] * checkAxis[1]);
766
732
  }
767
- function rotatePoint(_ref, rad) {
768
- let {
769
- x: x,
770
- y: y
771
- } = _ref;
772
- let origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
773
- x: 0,
774
- y: 0
775
- };
733
+ function rotatePoint({
734
+ x: x,
735
+ y: y
736
+ }, rad, origin = {
737
+ x: 0,
738
+ y: 0
739
+ }) {
776
740
  return {
777
741
  x: (x - origin.x) * Math.cos(rad) - (y - origin.y) * Math.sin(rad) + origin.x,
778
742
  y: (x - origin.x) * Math.sin(rad) + (y - origin.y) * Math.cos(rad) + origin.y
@@ -801,8 +765,7 @@
801
765
  y: box.y2
802
766
  }, deg, cp)];
803
767
  }
804
- function isRotateAABBIntersect(box1, box2) {
805
- let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
768
+ function isRotateAABBIntersect(box1, box2, isDeg = !1) {
806
769
  const rect1 = toRect(box1, isDeg),
807
770
  rect2 = toRect(box2, isDeg),
808
771
  vector = (start, end) => [end.x - start.x, end.y - start.y],
@@ -830,9 +793,7 @@
830
793
  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";
831
794
  };
832
795
 
833
- function getContextFont(text) {
834
- let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
835
- let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
796
+ function getContextFont(text, defaultAttr = {}, fontSizeScale) {
836
797
  fontSizeScale || (fontSizeScale = 1);
837
798
  const {
838
799
  fontStyle = defaultAttr.fontStyle,
@@ -1079,49 +1040,29 @@
1079
1040
  equals(b) {
1080
1041
  return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;
1081
1042
  }
1082
- setValue() {
1083
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1084
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1085
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1086
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1043
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
1087
1044
  return this.x1 = x1, this.y1 = y1, this.x2 = x2, this.y2 = y2, this;
1088
1045
  }
1089
- set() {
1090
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1091
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1092
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1093
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1046
+ set(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
1094
1047
  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;
1095
1048
  }
1096
- add() {
1097
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1098
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1049
+ add(x = 0, y = 0) {
1099
1050
  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;
1100
1051
  }
1101
- expand() {
1102
- let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1052
+ expand(d = 0) {
1103
1053
  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;
1104
1054
  }
1105
1055
  round() {
1106
1056
  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;
1107
1057
  }
1108
- translate() {
1109
- let dx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1110
- let dy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1058
+ translate(dx = 0, dy = 0) {
1111
1059
  return this.x1 += dx, this.x2 += dx, this.y1 += dy, this.y2 += dy, this;
1112
1060
  }
1113
- rotate() {
1114
- let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1115
- let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1116
- let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1061
+ rotate(angle = 0, x = 0, y = 0) {
1117
1062
  const p = this.rotatedPoints(angle, x, y);
1118
1063
  return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);
1119
1064
  }
1120
- scale() {
1121
- let sx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1122
- let sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1123
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1124
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1065
+ scale(sx = 0, sy = 0, x = 0, y = 0) {
1125
1066
  const p = this.scalePoints(sx, sy, x, y);
1126
1067
  return this.clear().add(p[0], p[1]).add(p[2], p[3]);
1127
1068
  }
@@ -1140,9 +1081,7 @@
1140
1081
  intersects(b) {
1141
1082
  return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);
1142
1083
  }
1143
- contains() {
1144
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1145
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1084
+ contains(x = 0, y = 0) {
1146
1085
  return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);
1147
1086
  }
1148
1087
  containsPoint(p) {
@@ -1154,12 +1093,10 @@
1154
1093
  height() {
1155
1094
  return this.empty() ? 0 : this.y2 - this.y1;
1156
1095
  }
1157
- scaleX() {
1158
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1096
+ scaleX(s = 0) {
1159
1097
  return this.x1 *= s, this.x2 *= s, this;
1160
1098
  }
1161
- scaleY() {
1162
- let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1099
+ scaleY(s = 0) {
1163
1100
  return this.y1 *= s, this.y2 *= s, this;
1164
1101
  }
1165
1102
  transformWithMatrix(matrix) {
@@ -1193,20 +1130,14 @@
1193
1130
  }
1194
1131
  class AABBBounds extends Bounds {}
1195
1132
  class OBBBounds extends Bounds {
1196
- constructor(bounds) {
1197
- let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1133
+ constructor(bounds, angle = 0) {
1198
1134
  var _a;
1199
1135
  super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
1200
1136
  }
1201
1137
  intersects(b) {
1202
1138
  return isRotateAABBIntersect(this, b);
1203
1139
  }
1204
- setValue() {
1205
- let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
1206
- let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1207
- let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1208
- let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1209
- let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
1140
+ setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0, angle = 0) {
1210
1141
  return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
1211
1142
  }
1212
1143
  clone() {
@@ -1234,13 +1165,7 @@
1234
1165
  }
1235
1166
 
1236
1167
  class Matrix {
1237
- constructor() {
1238
- let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
1239
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1240
- let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1241
- let d = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
1242
- let e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
1243
- let f = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
1168
+ constructor(a = 1, b = 0, c = 0, d = 1, e = 0, f = 0) {
1244
1169
  this.a = a, this.b = b, this.c = c, this.d = d, this.e = e, this.f = f;
1245
1170
  }
1246
1171
  equalToMatrix(m2) {
@@ -1350,8 +1275,7 @@
1350
1275
  } = source;
1351
1276
  target.x = x * nextA + y * nextC + nextE, target.y = x * nextB + y * nextD + nextF;
1352
1277
  }
1353
- onlyTranslate() {
1354
- let scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
1278
+ onlyTranslate(scale = 1) {
1355
1279
  return this.a === scale && 0 === this.b && 0 === this.c && this.d === scale;
1356
1280
  }
1357
1281
  clone() {
@@ -1610,16 +1534,13 @@
1610
1534
  }
1611
1535
  };
1612
1536
  class Color {
1613
- static Brighter(source) {
1614
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1537
+ static Brighter(source, b = 1) {
1615
1538
  return 1 === b ? source : new Color(source).brighter(b).toRGBA();
1616
1539
  }
1617
- static SetOpacity(source) {
1618
- let o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1540
+ static SetOpacity(source, o = 1) {
1619
1541
  return 1 === o ? source : new Color(source).setOpacity(o).toRGBA();
1620
1542
  }
1621
- static getColorBrightness(source) {
1622
- let model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "hsl";
1543
+ static getColorBrightness(source, model = "hsl") {
1623
1544
  const color = source instanceof Color ? source : new Color(source);
1624
1545
  switch (model) {
1625
1546
  case "hsv":
@@ -1723,8 +1644,7 @@
1723
1644
  setScalar(scalar) {
1724
1645
  return this.color.r = scalar, this.color.g = scalar, this.color.b = scalar, this;
1725
1646
  }
1726
- setOpacity() {
1727
- let o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
1647
+ setOpacity(o = 1) {
1728
1648
  return this.color.opacity = o, this;
1729
1649
  }
1730
1650
  getLuminance() {
@@ -1747,12 +1667,10 @@
1747
1667
  clone() {
1748
1668
  return new Color(this.color.toString());
1749
1669
  }
1750
- copyGammaToLinear(color) {
1751
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
1670
+ copyGammaToLinear(color, gammaFactor = 2) {
1752
1671
  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;
1753
1672
  }
1754
- copyLinearToGamma(color) {
1755
- let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
1673
+ copyLinearToGamma(color, gammaFactor = 2) {
1756
1674
  const safeInverse = gammaFactor > 0 ? 1 / gammaFactor : 1;
1757
1675
  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;
1758
1676
  }
@@ -2878,33 +2796,27 @@
2878
2796
 
2879
2797
  let idIndex = 0;
2880
2798
  const maxId = 1e8;
2881
- function getUUID() {
2882
- let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "dataset";
2799
+ function getUUID(prefix = "dataset") {
2883
2800
  return idIndex > maxId && (idIndex = 0), prefix + "_" + idIndex++;
2884
2801
  }
2885
2802
 
2886
2803
  const DataViewDiffRank = "_data-view-diff-rank";
2887
2804
  class DataView {
2888
2805
  constructor(dataSet, options) {
2889
- var _this = this;
2890
2806
  let name;
2891
- 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 () {
2892
- let opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2893
- pushHistory: !0,
2894
- emitMessage: !0
2895
- };
2896
- return _this.isRunning = !0, _this.resetTransformData(), _this.transformsArr.forEach(t => {
2897
- _this.executeTransform(t, {
2898
- pushHistory: opt.pushHistory,
2899
- emitMessage: !1
2900
- }), _this.isLastTransform(t) && _this.diffLastData();
2901
- }), _this.isRunning = !1, !1 !== opt.emitMessage && _this.target.emit("change", []), _this;
2902
- }, this.markRunning = () => {
2807
+ 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 = {
2808
+ pushHistory: !0,
2809
+ emitMessage: !0
2810
+ }) => (this.isRunning = !0, this.resetTransformData(), this.transformsArr.forEach(t => {
2811
+ this.executeTransform(t, {
2812
+ pushHistory: opt.pushHistory,
2813
+ emitMessage: !1
2814
+ }), this.isLastTransform(t) && this.diffLastData();
2815
+ }), this.isRunning = !1, !1 !== opt.emitMessage && this.target.emit("change", []), this), this.markRunning = () => {
2903
2816
  this.isRunning = !0, this.target.emit("markRunning", []);
2904
2817
  }, 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);
2905
2818
  }
2906
- parse(data, options) {
2907
- let emit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
2819
+ parse(data, options, emit = !1) {
2908
2820
  var _a;
2909
2821
  this.isRunning = !0, emit && this.target.emit("beforeParse", []), options && (this.parseOption = options);
2910
2822
  const cloneData = this.cloneParseData(data, options);
@@ -2914,8 +2826,7 @@
2914
2826
  } else this.parserData = cloneData, this.rawData = cloneData, this.history && this.historyData.push(cloneData), this.latestData = cloneData;
2915
2827
  return this.isRunning = !1, emit && this.target.emit("afterParse", []), this;
2916
2828
  }
2917
- transform(options) {
2918
- let execute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
2829
+ transform(options, execute = !0) {
2919
2830
  if (this.isRunning = !0, options && options.type) {
2920
2831
  let pushOption = !0;
2921
2832
  if ("fields" === options.type) {
@@ -2939,11 +2850,10 @@
2939
2850
  return (null !== (_a = a.level) && void 0 !== _a ? _a : 0) - (null !== (_b = b.level) && void 0 !== _b ? _b : 0);
2940
2851
  });
2941
2852
  }
2942
- executeTransform(options) {
2943
- let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
2944
- pushHistory: !0,
2945
- emitMessage: !0
2946
- };
2853
+ executeTransform(options, opt = {
2854
+ pushHistory: !0,
2855
+ emitMessage: !0
2856
+ }) {
2947
2857
  const {
2948
2858
  pushHistory: pushHistory,
2949
2859
  emitMessage: emitMessage
@@ -3004,8 +2914,7 @@
3004
2914
  var _a;
3005
2915
  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;
3006
2916
  }
3007
- setFields(f) {
3008
- let foreMerge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
2917
+ setFields(f, foreMerge = !1) {
3009
2918
  this._fields = f && foreMerge ? merge({}, this._fields, f) : f;
3010
2919
  const fieldsOption = this.transformsArr.find(_op => "fields" === _op.type);
3011
2920
  !isNil$1(this._fields) && isNil$1(fieldsOption) ? (this.dataSet.registerTransform("fields", fields), this.transform({
@@ -4709,6 +4618,13 @@
4709
4618
  });
4710
4619
  }
4711
4620
  }
4621
+ _handlePointerOutElement() {
4622
+ this._activeLinkData.parseNewData([]);
4623
+ }
4624
+ _clearAllSelectedState() {
4625
+ super._clearAllSelectedState();
4626
+ this._activeLinkData.parseNewData([]);
4627
+ }
4712
4628
  getSubNodeDatum(filter) {
4713
4629
  return getSubNodeDatum(this._nodeMark.getProductElements(), filter);
4714
4630
  }
@@ -5446,12 +5362,9 @@
5446
5362
  }
5447
5363
  }
5448
5364
  function bindContributionProvider(bind, id) {
5449
- bind(ContributionProvider).toDynamicValue(_ref => {
5450
- let {
5451
- container: container
5452
- } = _ref;
5453
- return new ContributionProviderCache(id, container);
5454
- }).inSingletonScope().whenTargetNamed(id);
5365
+ bind(ContributionProvider).toDynamicValue(({
5366
+ container: container
5367
+ }) => new ContributionProviderCache(id, container)).inSingletonScope().whenTargetNamed(id);
5455
5368
  }
5456
5369
  class ContributionStore {
5457
5370
  static getStore(id) {
@@ -5521,10 +5434,7 @@
5521
5434
  }
5522
5435
 
5523
5436
  class SyncHook extends Hook {
5524
- call() {
5525
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5526
- args[_key] = arguments[_key];
5527
- }
5437
+ call(...args) {
5528
5438
  this.taps.map(t => t.fn).forEach(cb => cb(...args));
5529
5439
  }
5530
5440
  }
@@ -5583,7 +5493,7 @@
5583
5493
  clear() {
5584
5494
  this.bounds.clear();
5585
5495
  }
5586
- release() {}
5496
+ release(...params) {}
5587
5497
  }
5588
5498
 
5589
5499
  class CurvePath {
@@ -5794,12 +5704,7 @@
5794
5704
  };
5795
5705
 
5796
5706
  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)];
5797
- function renderCommandList(commandList, context) {
5798
- let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
5799
- let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
5800
- let sx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
5801
- let sy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
5802
- let z = arguments.length > 6 ? arguments[6] : undefined;
5707
+ function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z) {
5803
5708
  for (let i = 0; i < commandList.length; i++) {
5804
5709
  const command = commandList[i];
5805
5710
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
@@ -6081,7 +5986,7 @@
6081
5986
  }
6082
5987
  }
6083
5988
 
6084
- function genCurveSegments(path, points) {
5989
+ function genCurveSegments(path, points, step = 1) {
6085
5990
  let defined0 = !1;
6086
5991
  for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
6087
5992
  }
@@ -6124,8 +6029,7 @@
6124
6029
  return this.context.tryUpdateLength();
6125
6030
  }
6126
6031
  }
6127
- function genLinearSegments(points) {
6128
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6032
+ function genLinearSegments(points, params = {}) {
6129
6033
  const {
6130
6034
  direction: direction,
6131
6035
  startPoint: startPoint
@@ -6135,7 +6039,7 @@
6135
6039
  return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
6136
6040
  }
6137
6041
  function genLinearTypeSegments(path, points) {
6138
- return genCurveSegments(path, points);
6042
+ return genCurveSegments(path, points, 1);
6139
6043
  }
6140
6044
 
6141
6045
  function point$3(curveClass, x, y, defined, p) {
@@ -6178,10 +6082,9 @@
6178
6082
  }
6179
6083
  }
6180
6084
  function genBasisTypeSegments(path, points) {
6181
- return genCurveSegments(path, points);
6085
+ return genCurveSegments(path, points, 2);
6182
6086
  }
6183
- function genBasisSegments(points) {
6184
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6087
+ function genBasisSegments(points, params = {}) {
6185
6088
  const {
6186
6089
  direction: direction,
6187
6090
  startPoint: startPoint
@@ -6274,10 +6177,9 @@
6274
6177
  }
6275
6178
  }
6276
6179
  function genMonotoneXTypeSegments(path, points) {
6277
- return genCurveSegments(path, points);
6180
+ return genCurveSegments(path, points, 2);
6278
6181
  }
6279
- function genMonotoneXSegments(points) {
6280
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6182
+ function genMonotoneXSegments(points, params = {}) {
6281
6183
  const {
6282
6184
  direction: direction,
6283
6185
  startPoint: startPoint
@@ -6288,10 +6190,9 @@
6288
6190
  return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
6289
6191
  }
6290
6192
  function genMonotoneYTypeSegments(path, points) {
6291
- return genCurveSegments(path, points);
6193
+ return genCurveSegments(path, points, 2);
6292
6194
  }
6293
- function genMonotoneYSegments(points) {
6294
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6195
+ function genMonotoneYSegments(points, params = {}) {
6295
6196
  const {
6296
6197
  direction: direction,
6297
6198
  startPoint: startPoint
@@ -6303,9 +6204,7 @@
6303
6204
  }
6304
6205
 
6305
6206
  let Step$1 = class Step {
6306
- constructor(context) {
6307
- let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
6308
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
6207
+ constructor(context, t = .5, startPoint) {
6309
6208
  this.context = context, this._t = t, this.startPoint = startPoint;
6310
6209
  }
6311
6210
  areaStart() {
@@ -6346,8 +6245,7 @@
6346
6245
  this.context.closePath();
6347
6246
  }
6348
6247
  }
6349
- function genStepSegments(points, t) {
6350
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
6248
+ function genStepSegments(points, t, params = {}) {
6351
6249
  const {
6352
6250
  direction: direction,
6353
6251
  startPoint: startPoint
@@ -6357,10 +6255,9 @@
6357
6255
  return genStepTypeSegments(new Step$1(segContext, t, startPoint), points), segContext;
6358
6256
  }
6359
6257
  function genStepTypeSegments(path, points) {
6360
- return genCurveSegments(path, points);
6258
+ return genCurveSegments(path, points, 1);
6361
6259
  }
6362
- function genStepClosedSegments(points, t) {
6363
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
6260
+ function genStepClosedSegments(points, t, params = {}) {
6364
6261
  const {
6365
6262
  direction: direction,
6366
6263
  startPoint: startPoint
@@ -6375,8 +6272,7 @@
6375
6272
  this.context.closePath();
6376
6273
  }
6377
6274
  }
6378
- function genLinearClosedSegments(points) {
6379
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6275
+ function genLinearClosedSegments(points, params = {}) {
6380
6276
  const {
6381
6277
  direction: direction,
6382
6278
  startPoint: startPoint
@@ -6386,7 +6282,7 @@
6386
6282
  return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
6387
6283
  }
6388
6284
  function genLinearClosedTypeSegments(path, points) {
6389
- return genCurveSegments(path, points);
6285
+ return genCurveSegments(path, points, 1);
6390
6286
  }
6391
6287
 
6392
6288
  function point$1(curveClass, x, y, defined, p) {
@@ -6407,9 +6303,7 @@
6407
6303
  curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
6408
6304
  }
6409
6305
  class CatmullRom {
6410
- constructor(context) {
6411
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
6412
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
6306
+ constructor(context, alpha = .5, startPoint) {
6413
6307
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
6414
6308
  }
6415
6309
  areaStart() {
@@ -6463,8 +6357,7 @@
6463
6357
  }
6464
6358
  }
6465
6359
  function commonGenCatmullRomSegments(type, cons) {
6466
- return function (points, alpha) {
6467
- let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
6360
+ return function (points, alpha, params = {}) {
6468
6361
  const {
6469
6362
  direction: direction,
6470
6363
  startPoint: startPoint
@@ -6473,15 +6366,13 @@
6473
6366
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
6474
6367
  const segContext = genSegContext(type, direction, points),
6475
6368
  gatmullRom = new cons(segContext, alpha, startPoint);
6476
- return genCurveSegments(gatmullRom, points), segContext;
6369
+ return genCurveSegments(gatmullRom, points, 2), segContext;
6477
6370
  };
6478
6371
  }
6479
6372
  const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
6480
6373
 
6481
6374
  class CatmullRomClosed {
6482
- constructor(context) {
6483
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
6484
- let startPoint = arguments.length > 2 ? arguments[2] : undefined;
6375
+ constructor(context, alpha = .5, startPoint) {
6485
6376
  this.context = context, this.startPoint = startPoint, this._alpha = alpha;
6486
6377
  }
6487
6378
  areaStart() {
@@ -6736,11 +6627,7 @@
6736
6627
  cmd[1] = cmd[1] * sx + x, cmd[2] = cmd[2] * sy + y, cmd[3] = cmd[3] * (sx + sy) / 2;
6737
6628
  }
6738
6629
  closePathTransform() {}
6739
- _runCommandStrList(commandStrList) {
6740
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
6741
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
6742
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
6743
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
6630
+ _runCommandStrList(commandStrList, l = 0, t = 0, sX = 1, sY = 1) {
6744
6631
  let current,
6745
6632
  tempX,
6746
6633
  tempY,
@@ -6814,11 +6701,7 @@
6814
6701
  previous = current;
6815
6702
  }
6816
6703
  }
6817
- _runCommandList(commandList) {
6818
- let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
6819
- let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
6820
- let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
6821
- let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
6704
+ _runCommandList(commandList, l = 0, t = 0, sX = 1, sY = 1) {
6822
6705
  if (0 !== l || 0 !== t || 1 !== sX || 1 !== sY) for (let i = 0, len = commandList.length; i < len; ++i) {
6823
6706
  const current = commandList[i].slice();
6824
6707
  switch (current[0]) {
@@ -7297,7 +7180,7 @@
7297
7180
  get length() {
7298
7181
  return this.pools.length;
7299
7182
  }
7300
- release() {
7183
+ release(...params) {
7301
7184
  this.pools = [];
7302
7185
  }
7303
7186
  }
@@ -7366,8 +7249,7 @@
7366
7249
  for (; group.parent;) if ((group = group.parent).theme) return group;
7367
7250
  return null;
7368
7251
  }
7369
- applyTheme(group, pt) {
7370
- let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
7252
+ applyTheme(group, pt, force = !1) {
7371
7253
  if (this.dirty) {
7372
7254
  const parentGroup = this.getParentWithTheme(group);
7373
7255
  if (parentGroup) {
@@ -7466,8 +7348,7 @@
7466
7348
  constructor() {
7467
7349
  super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
7468
7350
  }
7469
- forEachChildren(cb) {
7470
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7351
+ forEachChildren(cb, reverse = !1) {
7471
7352
  if (reverse) {
7472
7353
  let child = this._lastChild,
7473
7354
  i = 0;
@@ -7484,8 +7365,7 @@
7484
7365
  }
7485
7366
  }
7486
7367
  }
7487
- forEachChildrenAsync(cb) {
7488
- let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7368
+ forEachChildrenAsync(cb, reverse = !1) {
7489
7369
  return __awaiter(this, void 0, void 0, function* () {
7490
7370
  if (reverse) {
7491
7371
  let child = this._lastChild,
@@ -7509,13 +7389,12 @@
7509
7389
  forEach(cb) {
7510
7390
  return this.forEachChildren(cb);
7511
7391
  }
7512
- appendChild(node) {
7513
- let highPerformance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
7392
+ appendChild(node, highPerformance = !0) {
7514
7393
  if (this._uid === node._uid) return null;
7515
7394
  if (!highPerformance && node.isAncestorsOf(this)) throw new Error("【Node::appendChild】不能将父辈元素append为子元素");
7516
7395
  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;
7517
7396
  }
7518
- appendChildArrHighPerformance(nodes) {
7397
+ appendChildArrHighPerformance(nodes, replace = !1) {
7519
7398
  return console.error("暂不支持该函数"), nodes;
7520
7399
  }
7521
7400
  insertBefore(newNode, referenceNode) {
@@ -7583,8 +7462,7 @@
7583
7462
  replaceChild(newChild, oldChild) {
7584
7463
  throw new Error("暂不支持");
7585
7464
  }
7586
- find(callback) {
7587
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7465
+ find(callback, deep = !1) {
7588
7466
  let target = null;
7589
7467
  return this.forEachChildren((node, index) => !(node === this || !callback(node, index)) && (target = node, !0)), deep && this.forEachChildren(child => {
7590
7468
  if (child.isContainer) {
@@ -7594,8 +7472,7 @@
7594
7472
  return !1;
7595
7473
  }), target;
7596
7474
  }
7597
- findAll(callback) {
7598
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7475
+ findAll(callback, deep = !1) {
7599
7476
  let nodes = [];
7600
7477
  return this.forEachChildren((node, index) => {
7601
7478
  node !== this && callback(node, index) && nodes.push(node);
@@ -7624,8 +7501,7 @@
7624
7501
  getElementsByType(type) {
7625
7502
  return this.findAll(node => node.type === type, !0);
7626
7503
  }
7627
- getChildByName(name) {
7628
- let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7504
+ getChildByName(name, deep = !1) {
7629
7505
  return this.find(node => node.name === name, deep);
7630
7506
  }
7631
7507
  getChildAt(idx) {
@@ -7744,10 +7620,7 @@
7744
7620
  removeAllListeners() {
7745
7621
  return this.removeAllEventListeners();
7746
7622
  }
7747
- dispatchEvent(event) {
7748
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7749
- args[_key - 1] = arguments[_key];
7750
- }
7623
+ dispatchEvent(event, ...args) {
7751
7624
  return super.emit(event.type, event, ...args), !event.defaultPrevented;
7752
7625
  }
7753
7626
  emit(event, data) {
@@ -8005,8 +7878,7 @@
8005
7878
  for (; animate;) animate.release(), animate = animate.nextAnimate;
8006
7879
  this.animateHead = null, this.animateTail = null, this.animateCount = 0;
8007
7880
  }
8008
- removeAnimate(animate) {
8009
- let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
7881
+ removeAnimate(animate, release = !0) {
8010
7882
  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();
8011
7883
  }
8012
7884
  }
@@ -8055,10 +7927,7 @@
8055
7927
  }
8056
7928
  }
8057
7929
  class Animate {
8058
- constructor() {
8059
- let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
8060
- let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
8061
- let slience = arguments.length > 2 ? arguments[2] : undefined;
7930
+ constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
8062
7931
  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;
8063
7932
  }
8064
7933
  setTimeline(timeline) {
@@ -8093,8 +7962,7 @@
8093
7962
  }
8094
7963
  return 1 === this.subAnimates.length && this.tailAnimate.totalDuration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
8095
7964
  }
8096
- trySetAttribute(attr) {
8097
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Animate.mode;
7965
+ trySetAttribute(attr, mode = Animate.mode) {
8098
7966
  attr && mode & AnimateMode.SET_ATTR_IMMEDIATELY && this.target.setAttributes && this.target.setAttributes(attr, !1, {
8099
7967
  type: AttributeUpdateType.ANIMATE_PLAY
8100
7968
  });
@@ -8440,9 +8308,7 @@
8440
8308
  ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
8441
8309
  }(ColorType || (ColorType = {}));
8442
8310
  class ColorStore {
8443
- static Get(str) {
8444
- let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorType.Color1;
8445
- let arr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0, 1];
8311
+ static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
8446
8312
  if (size === ColorType.Color1) {
8447
8313
  const color = ColorStore.store1[str];
8448
8314
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
@@ -8470,8 +8336,7 @@
8470
8336
  }
8471
8337
  ColorStore.store255 = {}, ColorStore.store1 = {};
8472
8338
 
8473
- function colorArrayToString(color) {
8474
- let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
8339
+ function colorArrayToString(color, alphaChannel = !1) {
8475
8340
  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;
8476
8341
  }
8477
8342
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
@@ -8743,8 +8608,7 @@
8743
8608
  }
8744
8609
  var square$1 = new SquareSymbol();
8745
8610
 
8746
- function trianglUpOffset(ctx, r, x, y) {
8747
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
8611
+ function trianglUpOffset(ctx, r, x, y, offset = 0) {
8748
8612
  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;
8749
8613
  }
8750
8614
  class TriangleUpSymbol extends BaseSymbol {
@@ -8890,8 +8754,7 @@
8890
8754
  }
8891
8755
  var triangleLeft = new TriangleLeftSymbol();
8892
8756
 
8893
- function trianglRightOffset(ctx, r, x, y) {
8894
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
8757
+ function trianglRightOffset(ctx, r, x, y, offset = 0) {
8895
8758
  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;
8896
8759
  }
8897
8760
  class TriangleRightSymbol extends BaseSymbol {
@@ -8907,8 +8770,7 @@
8907
8770
  }
8908
8771
  var triangleRight = new TriangleRightSymbol();
8909
8772
 
8910
- function trianglDownOffset(ctx, r, x, y) {
8911
- let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
8773
+ function trianglDownOffset(ctx, r, x, y, offset = 0) {
8912
8774
  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;
8913
8775
  }
8914
8776
  class TriangleDownSymbol extends BaseSymbol {
@@ -9125,8 +8987,7 @@
9125
8987
 
9126
8988
  const tempBounds = new AABBBounds();
9127
8989
  class CustomSymbolClass {
9128
- constructor(type, path) {
9129
- let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
8990
+ constructor(type, path, isSvg = !1) {
9130
8991
  this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
9131
8992
  }
9132
8993
  drawOffset(ctx, size, x, y, offset, z, cb) {
@@ -9148,10 +9009,9 @@
9148
9009
  bounds(size, bounds) {
9149
9010
  if (size = this.parseSize(size), this.isSvg) {
9150
9011
  if (!this.svgCache) return;
9151
- return bounds.clear(), void this.svgCache.forEach(_ref => {
9152
- let {
9153
- path: path
9154
- } = _ref;
9012
+ return bounds.clear(), void this.svgCache.forEach(({
9013
+ path: path
9014
+ }) => {
9155
9015
  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);
9156
9016
  });
9157
9017
  }
@@ -9207,8 +9067,7 @@
9207
9067
  if (-1 === closingIndex) throw new Error(errMsg);
9208
9068
  return closingIndex + str.length - 1;
9209
9069
  }
9210
- function tagExpWithClosingIndex(xmlData, i) {
9211
- let closingChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ">";
9070
+ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
9212
9071
  let attrBoundary,
9213
9072
  tagExp = "";
9214
9073
  for (let index = i; index < xmlData.length; index++) {
@@ -9226,8 +9085,7 @@
9226
9085
  tagExp += ch;
9227
9086
  }
9228
9087
  }
9229
- function readTagExp(xmlData, i, removeNSPrefix) {
9230
- let closingChar = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ">";
9088
+ function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") {
9231
9089
  const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
9232
9090
  if (!result) return;
9233
9091
  let tagExp = result.data;
@@ -9389,8 +9247,7 @@
9389
9247
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9390
9248
  });
9391
9249
  };
9392
- function boundStroke(bounds, halfW, miter) {
9393
- let pad = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
9250
+ function boundStroke(bounds, halfW, miter, pad = 0) {
9394
9251
  return bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0))), bounds;
9395
9252
  }
9396
9253
  function miterAdjustment(miter, strokeWidth) {
@@ -9525,8 +9382,7 @@
9525
9382
  get globalTransMatrix() {
9526
9383
  return this.tryUpdateGlobalTransMatrix(!0);
9527
9384
  }
9528
- constructor() {
9529
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9385
+ constructor(params = {}) {
9530
9386
  var _a;
9531
9387
  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);
9532
9388
  }
@@ -9539,8 +9395,7 @@
9539
9395
  set2dMode() {
9540
9396
  this.in3dMode = !1;
9541
9397
  }
9542
- getOffsetXY(attr) {
9543
- let includeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9398
+ getOffsetXY(attr, includeScroll = !1) {
9544
9399
  var _a, _b;
9545
9400
  const {
9546
9401
  dx = attr.dx,
@@ -9569,10 +9424,9 @@
9569
9424
  return this.doUpdateOBBBounds();
9570
9425
  }
9571
9426
  combindShadowAABBBounds(bounds) {
9572
- if (this.shadowRoot) {
9573
- const b = this.shadowRoot.AABBBounds.clone();
9574
- bounds.union(b);
9575
- }
9427
+ if (!this.shadowRoot) return;
9428
+ const b = this.shadowRoot.AABBBounds.clone();
9429
+ bounds.union(b);
9576
9430
  }
9577
9431
  doUpdateOBBBounds() {
9578
9432
  return this._OBBBounds;
@@ -9651,7 +9505,7 @@
9651
9505
  const b = this.AABBBounds;
9652
9506
  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;
9653
9507
  }
9654
- tryUpdateGlobalTransMatrix() {
9508
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
9655
9509
  if (this._globalTransMatrix) {
9656
9510
  if (this.parent) {
9657
9511
  const m = this.parent.globalTransMatrix;
@@ -9663,8 +9517,7 @@
9663
9517
  shouldUpdateGlobalMatrix() {
9664
9518
  return !0;
9665
9519
  }
9666
- tryUpdateLocalTransMatrix() {
9667
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
9520
+ tryUpdateLocalTransMatrix(clearTag = !0) {
9668
9521
  return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
9669
9522
  }
9670
9523
  shouldUpdateAABBBounds() {
@@ -9704,14 +9557,10 @@
9704
9557
  setWidthHeightWithoutTransform(aabbBounds) {
9705
9558
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
9706
9559
  }
9707
- setAttributes(params) {
9708
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9709
- let context = arguments.length > 2 ? arguments[2] : undefined;
9560
+ setAttributes(params, forceUpdateTag = !1, context) {
9710
9561
  (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);
9711
9562
  }
9712
- _setAttributes(params) {
9713
- let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9714
- let context = arguments.length > 2 ? arguments[2] : undefined;
9563
+ _setAttributes(params, forceUpdateTag = !1, context) {
9715
9564
  const keys = Object.keys(params);
9716
9565
  for (let i = 0; i < keys.length; i++) {
9717
9566
  const key = keys[i];
@@ -9726,16 +9575,14 @@
9726
9575
  }, this.attribute, key, context);
9727
9576
  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);
9728
9577
  }
9729
- needUpdateTags(keys) {
9730
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
9578
+ needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
9731
9579
  for (let i = 0; i < k.length; i++) {
9732
9580
  const attrKey = k[i];
9733
9581
  if (-1 !== keys.indexOf(attrKey)) return !0;
9734
9582
  }
9735
9583
  return !1;
9736
9584
  }
9737
- needUpdateTag(key) {
9738
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
9585
+ needUpdateTag(key, k = GRAPHIC_UPDATE_TAG_KEY) {
9739
9586
  for (let i = 0; i < k.length; i++) {
9740
9587
  if (key === k[i]) return !0;
9741
9588
  }
@@ -9899,8 +9746,7 @@
9899
9746
  newNormalAttrs[key] = this.getNormalAttribute(key);
9900
9747
  }), this.normalAttrs = newNormalAttrs;
9901
9748
  }
9902
- stopStateAnimates() {
9903
- let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
9749
+ stopStateAnimates(type = "end") {
9904
9750
  this.animates && this.animates.forEach(animate => {
9905
9751
  animate.stateNames && (animate.stop(type), this.animates.delete(animate.id));
9906
9752
  });
@@ -10142,8 +9988,7 @@
10142
9988
  var _a;
10143
9989
  return null !== (_a = this.attribute[name]) && void 0 !== _a ? _a : this.getDefaultAttribute(name);
10144
9990
  }
10145
- onSetStage(cb) {
10146
- let immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
9991
+ onSetStage(cb, immediate = !1) {
10147
9992
  this._onSetStage = cb, immediate && this.stage && cb(this, this.stage);
10148
9993
  }
10149
9994
  attachShadow(shadowRoot) {
@@ -10164,8 +10009,7 @@
10164
10009
  createPathProxy(path) {
10165
10010
  return isString$1(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
10166
10011
  }
10167
- loadImage(image) {
10168
- let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
10012
+ loadImage(image, background = !1) {
10169
10013
  if (!image || background && backgroundNotImage(image)) return;
10170
10014
  const url = image;
10171
10015
  this.resources || (this.resources = new Map());
@@ -10195,8 +10039,7 @@
10195
10039
  animate.stop();
10196
10040
  });
10197
10041
  }
10198
- stopAnimates() {
10199
- let stopChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
10042
+ stopAnimates(stopChildren = !1) {
10200
10043
  this._stopAnimates(this.animates), this.shadowRoot && this.shadowRoot.stopAnimates(!0), this.isContainer && stopChildren && this.forEachChildren(c => {
10201
10044
  c.stopAnimates(stopChildren);
10202
10045
  });
@@ -10335,8 +10178,7 @@
10335
10178
  _updateChildToStage(child) {
10336
10179
  return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
10337
10180
  }
10338
- appendChild(node) {
10339
- let addStage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
10181
+ appendChild(node, addStage = !0) {
10340
10182
  const data = super.appendChild(node);
10341
10183
  return addStage && this.stage && data && data.setStage(this.stage, this.layer), this.addUpdateBoundTag(), data;
10342
10184
  }
@@ -10353,8 +10195,7 @@
10353
10195
  const data = super.removeChild(child);
10354
10196
  return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
10355
10197
  }
10356
- removeAllChild() {
10357
- let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
10198
+ removeAllChild(deep = !1) {
10358
10199
  this.forEachChildren(child => {
10359
10200
  application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
10360
10201
  }), super.removeAllChild(), this.addUpdateBoundTag();
@@ -10374,8 +10215,7 @@
10374
10215
  g.isContainer && g.addUpdateGlobalPositionTag();
10375
10216
  });
10376
10217
  }
10377
- tryUpdateGlobalTransMatrix() {
10378
- let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
10218
+ tryUpdateGlobalTransMatrix(clearTag = !0) {
10379
10219
  if (this.shouldUpdateGlobalMatrix()) {
10380
10220
  if (this._globalTransMatrix) {
10381
10221
  if (this.parent) {
@@ -10435,8 +10275,7 @@
10435
10275
  function textDrawOffsetX(textAlign, width) {
10436
10276
  return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
10437
10277
  }
10438
- function textLayoutOffsetY(baseline, lineHeight, fontSize) {
10439
- let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
10278
+ function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
10440
10279
  return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
10441
10280
  }
10442
10281
 
@@ -10546,7 +10385,7 @@
10546
10385
  get length() {
10547
10386
  return this.pools.length;
10548
10387
  }
10549
- release() {
10388
+ release(...params) {
10550
10389
  this.pools = [];
10551
10390
  }
10552
10391
  }
@@ -10775,10 +10614,7 @@
10775
10614
  } else bbox.yOffset = -bbox.height;
10776
10615
  return bbox;
10777
10616
  }
10778
- GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
10779
- let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
10780
- let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
10781
- let params = arguments.length > 6 ? arguments[6] : undefined;
10617
+ GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = "", wordBreak, params) {
10782
10618
  const {
10783
10619
  lineWidth: lineWidth,
10784
10620
  suffixPosition = "end",
@@ -10901,11 +10737,10 @@
10901
10737
  get isMultiLine() {
10902
10738
  return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
10903
10739
  }
10904
- constructor() {
10905
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
10906
- text: "",
10907
- fontSize: 16
10908
- };
10740
+ constructor(params = {
10741
+ text: "",
10742
+ fontSize: 16
10743
+ }) {
10909
10744
  super(params), this.type = "text", this.numberType = TEXT_NUMBER_TYPE, this.cache = {};
10910
10745
  }
10911
10746
  isValid() {
@@ -11237,12 +11072,10 @@
11237
11072
  var _a;
11238
11073
  return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
11239
11074
  }
11240
- needUpdateTags(keys) {
11241
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
11075
+ needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
11242
11076
  return super.needUpdateTags(keys, k);
11243
11077
  }
11244
- needUpdateTag(key) {
11245
- let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
11078
+ needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
11246
11079
  return super.needUpdateTag(key, k);
11247
11080
  }
11248
11081
  _interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
@@ -11301,19 +11134,15 @@
11301
11134
 
11302
11135
  const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
11303
11136
  let Symbol$1 = class Symbol extends Graphic {
11304
- constructor() {
11305
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
11306
- symbolType: "circle"
11307
- };
11137
+ constructor(params = {
11138
+ symbolType: "circle"
11139
+ }) {
11308
11140
  super(params), this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
11309
11141
  }
11310
11142
  getParsedPath() {
11311
11143
  return this.shouldUpdateShape() && (this._parsedPath = this.doUpdateParsedPath(), this.clearUpdateShapeTag()), this._parsedPath;
11312
11144
  }
11313
- getParsedPath2D() {
11314
- let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
11315
- let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
11316
- let size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
11145
+ getParsedPath2D(x = 0, y = 0, size = 1) {
11317
11146
  let path = null;
11318
11147
  try {
11319
11148
  path = new Path2D();
@@ -11398,8 +11227,7 @@
11398
11227
 
11399
11228
  const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
11400
11229
  class Line extends Graphic {
11401
- constructor() {
11402
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11230
+ constructor(params = {}) {
11403
11231
  super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
11404
11232
  }
11405
11233
  isValid() {
@@ -12225,8 +12053,7 @@
12225
12053
  doStroke: doStroke
12226
12054
  };
12227
12055
  }
12228
- transform(graphic, graphicAttribute, context) {
12229
- let use3dMatrixIn3dMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
12056
+ transform(graphic, graphicAttribute, context, use3dMatrixIn3dMode = !1) {
12230
12057
  const {
12231
12058
  x = graphicAttribute.x,
12232
12059
  y = graphicAttribute.y,
@@ -12648,8 +12475,7 @@
12648
12475
  path.moveTo(points[0].x + x, points[0].y + y);
12649
12476
  for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
12650
12477
  }
12651
- function drawRoundedPolygon(path, points, x, y, cornerRadius) {
12652
- let closePath = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
12478
+ function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
12653
12479
  var _a;
12654
12480
  if (points.length < 3) return void drawPolygon(path, points, x, y);
12655
12481
  let startI = 0,