@leafer/worker 1.12.0 → 1.12.2

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.
@@ -216,7 +216,7 @@ class LeafData {
216
216
  }
217
217
  }
218
218
 
219
- const {floor: floor$3, max: max$6} = Math;
219
+ const {floor: floor$3, max: max$7} = Math;
220
220
 
221
221
  const Platform = {
222
222
  toURL(text, fileType) {
@@ -242,7 +242,7 @@ const Platform = {
242
242
  return url;
243
243
  },
244
244
  resize(image, width, height, xGap, yGap, clip, smooth, opacity, _filters) {
245
- const canvas = Platform.origin.createCanvas(max$6(floor$3(width + (xGap || 0)), 1), max$6(floor$3(height + (yGap || 0)), 1));
245
+ const canvas = Platform.origin.createCanvas(max$7(floor$3(width + (xGap || 0)), 1), max$7(floor$3(height + (yGap || 0)), 1));
246
246
  const ctx = canvas.getContext("2d");
247
247
  if (opacity) ctx.globalAlpha = opacity;
248
248
  ctx.imageSmoothingEnabled = smooth === false ? false : true;
@@ -289,7 +289,7 @@ const I$2 = IncrementId;
289
289
 
290
290
  let tempA, tempB, tempTo;
291
291
 
292
- const {max: max$5} = Math, tempFour = [ 0, 0, 0, 0 ];
292
+ const {max: max$6} = Math, tempFour = [ 0, 0, 0, 0 ];
293
293
 
294
294
  const FourNumberHelper = {
295
295
  zero: [ ...tempFour ],
@@ -341,9 +341,9 @@ const FourNumberHelper = {
341
341
  return data;
342
342
  },
343
343
  max(t, other, change) {
344
- if (isNumber(t) && isNumber(other)) return max$5(t, other);
344
+ if (isNumber(t) && isNumber(other)) return max$6(t, other);
345
345
  toTempAB(t, other, change);
346
- return set$2(tempTo, max$5(tempA[0], tempB[0]), max$5(tempA[1], tempB[1]), max$5(tempA[2], tempB[2]), max$5(tempA[3], tempB[3]));
346
+ return set$2(tempTo, max$6(tempA[0], tempB[0]), max$6(tempA[1], tempB[1]), max$6(tempA[2], tempB[2]), max$6(tempA[3], tempB[3]));
347
347
  },
348
348
  add(t, other, change) {
349
349
  if (isNumber(t) && isNumber(other)) return t + other;
@@ -360,7 +360,7 @@ const FourNumberHelper = {
360
360
 
361
361
  const {set: set$2, get: get$5, setTemp: setTemp, toTempAB: toTempAB} = FourNumberHelper;
362
362
 
363
- const {round: round$6, pow: pow$2, max: max$4, floor: floor$2, PI: PI$4} = Math;
363
+ const {round: round$6, pow: pow$2, max: max$5, floor: floor$2, PI: PI$4} = Math;
364
364
 
365
365
  const MathHelper = {
366
366
  within(value, min, max) {
@@ -414,7 +414,7 @@ const MathHelper = {
414
414
  }
415
415
  },
416
416
  getFloorScale(num, min = 1) {
417
- return max$4(floor$2(num), min) / num;
417
+ return max$5(floor$2(num), min) / num;
418
418
  },
419
419
  randInt: randInt,
420
420
  randColor(opacity) {
@@ -461,9 +461,9 @@ function getMatrixData() {
461
461
 
462
462
  const {sin: sin$6, cos: cos$6, acos: acos, sqrt: sqrt$5} = Math;
463
463
 
464
- const {float: float$3} = MathHelper;
464
+ const {float: float$5} = MathHelper;
465
465
 
466
- const tempPoint$4 = {};
466
+ const tempPoint$5 = {};
467
467
 
468
468
  function getWorld() {
469
469
  return Object.assign(Object.assign(Object.assign({}, getMatrixData()), getBoundsData()), {
@@ -522,8 +522,8 @@ const MatrixHelper = {
522
522
  to.f = t.f * pixelRatio;
523
523
  },
524
524
  scaleOfOuter(t, origin, scaleX, scaleY) {
525
- M$b.toInnerPoint(t, origin, tempPoint$4);
526
- M$b.scaleOfInner(t, tempPoint$4, scaleX, scaleY);
525
+ M$b.toInnerPoint(t, origin, tempPoint$5);
526
+ M$b.scaleOfInner(t, tempPoint$5, scaleX, scaleY);
527
527
  },
528
528
  scaleOfInner(t, origin, scaleX, scaleY = scaleX) {
529
529
  M$b.translateInner(t, origin.x, origin.y);
@@ -541,8 +541,8 @@ const MatrixHelper = {
541
541
  t.d = c * sinR + d * cosR;
542
542
  },
543
543
  rotateOfOuter(t, origin, rotation) {
544
- M$b.toInnerPoint(t, origin, tempPoint$4);
545
- M$b.rotateOfInner(t, tempPoint$4, rotation);
544
+ M$b.toInnerPoint(t, origin, tempPoint$5);
545
+ M$b.rotateOfInner(t, tempPoint$5, rotation);
546
546
  },
547
547
  rotateOfInner(t, origin, rotation) {
548
548
  M$b.translateInner(t, origin.x, origin.y);
@@ -563,8 +563,8 @@ const MatrixHelper = {
563
563
  }
564
564
  },
565
565
  skewOfOuter(t, origin, skewX, skewY) {
566
- M$b.toInnerPoint(t, origin, tempPoint$4);
567
- M$b.skewOfInner(t, tempPoint$4, skewX, skewY);
566
+ M$b.toInnerPoint(t, origin, tempPoint$5);
567
+ M$b.skewOfInner(t, tempPoint$5, skewX, skewY);
568
568
  },
569
569
  skewOfInner(t, origin, skewX, skewY = 0) {
570
570
  M$b.translateInner(t, origin.x, origin.y);
@@ -712,12 +712,12 @@ const MatrixHelper = {
712
712
  const cosR = c / scaleY;
713
713
  rotation = PI_2 - (d > 0 ? acos(-cosR) : -acos(cosR));
714
714
  }
715
- const cosR = float$3(cos$6(rotation));
715
+ const cosR = float$5(cos$6(rotation));
716
716
  const sinR = sin$6(rotation);
717
- scaleX = float$3(scaleX), scaleY = float$3(scaleY);
718
- skewX = cosR ? float$3((c / scaleY + sinR) / cosR / OneRadian, 9) : 0;
719
- skewY = cosR ? float$3((b / scaleX - sinR) / cosR / OneRadian, 9) : 0;
720
- rotation = float$3(rotation / OneRadian);
717
+ scaleX = float$5(scaleX), scaleY = float$5(scaleY);
718
+ skewX = cosR ? float$5((c / scaleY + sinR) / cosR / OneRadian, 9) : 0;
719
+ skewY = cosR ? float$5((b / scaleX - sinR) / cosR / OneRadian, 9) : 0;
720
+ rotation = float$5(rotation / OneRadian);
721
721
  } else {
722
722
  scaleX = a;
723
723
  scaleY = d;
@@ -761,9 +761,11 @@ const MatrixHelper = {
761
761
 
762
762
  const M$b = MatrixHelper;
763
763
 
764
+ const {float: float$4} = MathHelper;
765
+
764
766
  const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
765
767
 
766
- const {sin: sin$5, cos: cos$5, abs: abs$a, sqrt: sqrt$4, atan2: atan2$2, min: min$2, round: round$5} = Math;
768
+ const {sin: sin$5, cos: cos$5, abs: abs$a, sqrt: sqrt$4, atan2: atan2$2, min: min$3, round: round$5} = Math;
767
769
 
768
770
  const PointHelper = {
769
771
  defaultPoint: getPointData(),
@@ -812,22 +814,27 @@ const PointHelper = {
812
814
  },
813
815
  tempToInnerOf(t, matrix) {
814
816
  const {tempPoint: temp} = P$7;
815
- copy$d(temp, t);
817
+ copy$c(temp, t);
816
818
  toInnerPoint$2(matrix, temp, temp);
817
819
  return temp;
818
820
  },
819
821
  tempToOuterOf(t, matrix) {
820
822
  const {tempPoint: temp} = P$7;
821
- copy$d(temp, t);
823
+ copy$c(temp, t);
822
824
  toOuterPoint$3(matrix, temp, temp);
823
825
  return temp;
824
826
  },
825
827
  tempToInnerRadiusPointOf(t, matrix) {
826
828
  const {tempRadiusPoint: temp} = P$7;
827
- copy$d(temp, t);
829
+ copy$c(temp, t);
828
830
  P$7.toInnerRadiusPointOf(t, matrix, temp);
829
831
  return temp;
830
832
  },
833
+ copyRadiusPoint(t, point, x, y) {
834
+ copy$c(t, point);
835
+ setRadius(t, x, y);
836
+ return t;
837
+ },
831
838
  toInnerRadiusPointOf(t, matrix, to) {
832
839
  to || (to = t);
833
840
  toInnerPoint$2(matrix, t, to);
@@ -861,7 +868,7 @@ const PointHelper = {
861
868
  return sqrt$4(x * x + y * y);
862
869
  },
863
870
  getMinDistanceFrom(x1, y1, x2, y2, x3, y3) {
864
- return min$2(getDistanceFrom(x1, y1, x2, y2), getDistanceFrom(x2, y2, x3, y3));
871
+ return min$3(getDistanceFrom(x1, y1, x2, y2), getDistanceFrom(x2, y2, x3, y3));
865
872
  },
866
873
  getAngle(t, to) {
867
874
  return getAtan2(t, to) / OneRadian;
@@ -895,7 +902,7 @@ const PointHelper = {
895
902
  return points;
896
903
  },
897
904
  isSame(t, point) {
898
- return t.x === point.x && t.y === point.y;
905
+ return float$4(t.x) === float$4(point.x) && float$4(t.y) === float$4(point.y);
899
906
  },
900
907
  reset(t) {
901
908
  P$7.reset(t);
@@ -904,7 +911,7 @@ const PointHelper = {
904
911
 
905
912
  const P$7 = PointHelper;
906
913
 
907
- const {getDistanceFrom: getDistanceFrom, copy: copy$d, getAtan2: getAtan2} = P$7;
914
+ const {getDistanceFrom: getDistanceFrom, copy: copy$c, setRadius: setRadius, getAtan2: getAtan2} = P$7;
908
915
 
909
916
  class Point {
910
917
  constructor(x, y) {
@@ -979,7 +986,7 @@ class Point {
979
986
  }
980
987
  }
981
988
 
982
- const tempPoint$3 = new Point;
989
+ const tempPoint$4 = new Point;
983
990
 
984
991
  class Matrix {
985
992
  constructor(a, b, c, d, e, f) {
@@ -1250,7 +1257,7 @@ const {tempPointBounds: tempPointBounds$1, setPoint: setPoint$5, addPoint: addPo
1250
1257
 
1251
1258
  const {toOuterPoint: toOuterPoint$2} = MatrixHelper;
1252
1259
 
1253
- const {float: float$2, fourNumber: fourNumber$1} = MathHelper;
1260
+ const {float: float$3, fourNumber: fourNumber$1} = MathHelper;
1254
1261
 
1255
1262
  const {floor: floor$1, ceil: ceil$2} = Math;
1256
1263
 
@@ -1315,7 +1322,7 @@ const BoundsHelper = {
1315
1322
  return t;
1316
1323
  },
1317
1324
  toOffsetOutBounds(t, to, offsetBounds) {
1318
- if (!to) to = t; else copy$c(to, t);
1325
+ if (!to) to = t; else copy$b(to, t);
1319
1326
  if (!offsetBounds) offsetBounds = t;
1320
1327
  to.offsetX = B.maxX(offsetBounds);
1321
1328
  to.offsetY = B.maxY(offsetBounds);
@@ -1425,10 +1432,10 @@ const BoundsHelper = {
1425
1432
  }
1426
1433
  },
1427
1434
  float(t, maxLength) {
1428
- t.x = float$2(t.x, maxLength);
1429
- t.y = float$2(t.y, maxLength);
1430
- t.width = float$2(t.width, maxLength);
1431
- t.height = float$2(t.height, maxLength);
1435
+ t.x = float$3(t.x, maxLength);
1436
+ t.y = float$3(t.y, maxLength);
1437
+ t.width = float$3(t.width, maxLength);
1438
+ t.height = float$3(t.height, maxLength);
1432
1439
  },
1433
1440
  add(t, bounds, isPoint) {
1434
1441
  right$4 = t.x + t.width;
@@ -1462,7 +1469,7 @@ const BoundsHelper = {
1462
1469
  if (bounds && (bounds.width || bounds.height)) {
1463
1470
  if (first) {
1464
1471
  first = false;
1465
- if (!addMode) copy$c(t, bounds);
1472
+ if (!addMode) copy$b(t, bounds);
1466
1473
  } else {
1467
1474
  add$2(t, bounds);
1468
1475
  }
@@ -1549,7 +1556,7 @@ const BoundsHelper = {
1549
1556
 
1550
1557
  const B = BoundsHelper;
1551
1558
 
1552
- const {add: add$2, copy: copy$c} = B;
1559
+ const {add: add$2, copy: copy$b} = B;
1553
1560
 
1554
1561
  class Bounds {
1555
1562
  get minX() {
@@ -2247,7 +2254,7 @@ __decorate([ contextMethod() ], Canvas$1.prototype, "measureText", null);
2247
2254
 
2248
2255
  __decorate([ contextMethod() ], Canvas$1.prototype, "strokeText", null);
2249
2256
 
2250
- const {copy: copy$b, multiplyParent: multiplyParent$4, pixelScale: pixelScale} = MatrixHelper, {round: round$4} = Math, tempPixelBounds = new Bounds, tempPixelBounds2 = new Bounds;
2257
+ const {copy: copy$a, multiplyParent: multiplyParent$4, pixelScale: pixelScale} = MatrixHelper, {round: round$4} = Math, tempPixelBounds = new Bounds, tempPixelBounds2 = new Bounds;
2251
2258
 
2252
2259
  const minSize = {
2253
2260
  width: 1,
@@ -2407,7 +2414,7 @@ class LeaferCanvasBase extends Canvas$1 {
2407
2414
  const {pixelRatio: pixelRatio} = this;
2408
2415
  this.filter = `blur(${blur * pixelRatio}px)`;
2409
2416
  }
2410
- copyWorld(canvas, from, to, blendMode, ceilPixel = true) {
2417
+ copyWorld(canvas, from, to, blendMode, ceilPixel) {
2411
2418
  if (blendMode) this.blendMode = blendMode;
2412
2419
  if (from) {
2413
2420
  this.setTempPixelBounds(from, ceilPixel);
@@ -2418,7 +2425,7 @@ class LeaferCanvasBase extends Canvas$1 {
2418
2425
  }
2419
2426
  if (blendMode) this.blendMode = "source-over";
2420
2427
  }
2421
- copyWorldToInner(canvas, fromWorld, toInnerBounds, blendMode, ceilPixel = true) {
2428
+ copyWorldToInner(canvas, fromWorld, toInnerBounds, blendMode, ceilPixel) {
2422
2429
  if (fromWorld.b || fromWorld.c) {
2423
2430
  this.save();
2424
2431
  this.resetTransform();
@@ -2431,7 +2438,7 @@ class LeaferCanvasBase extends Canvas$1 {
2431
2438
  if (blendMode) this.blendMode = "source-over";
2432
2439
  }
2433
2440
  }
2434
- copyWorldByReset(canvas, from, to, blendMode, onlyResetTransform, ceilPixel = true) {
2441
+ copyWorldByReset(canvas, from, to, blendMode, onlyResetTransform, ceilPixel) {
2435
2442
  this.resetTransform();
2436
2443
  this.copyWorld(canvas, from, to, blendMode, ceilPixel);
2437
2444
  if (!onlyResetTransform) this.useWorldTransform();
@@ -2501,7 +2508,7 @@ class LeaferCanvasBase extends Canvas$1 {
2501
2508
  getSameCanvas(useSameWorldTransform, useSameSmooth) {
2502
2509
  const {size: size, pixelSnap: pixelSnap} = this, canvas = this.manager ? this.manager.get(size) : Creator.canvas(Object.assign({}, size));
2503
2510
  canvas.save();
2504
- if (useSameWorldTransform) copy$b(canvas.worldTransform, this.worldTransform), canvas.useWorldTransform();
2511
+ if (useSameWorldTransform) copy$a(canvas.worldTransform, this.worldTransform), canvas.useWorldTransform();
2505
2512
  if (useSameSmooth) canvas.smooth = this.smooth;
2506
2513
  canvas.pixelSnap !== pixelSnap && (canvas.pixelSnap = pixelSnap);
2507
2514
  return canvas;
@@ -2642,7 +2649,7 @@ const RectHelper = {
2642
2649
  }
2643
2650
  };
2644
2651
 
2645
- const {sin: sin$4, cos: cos$4, hypot: hypot, atan2: atan2$1, ceil: ceil$1, abs: abs$9, PI: PI$3, sqrt: sqrt$3, pow: pow$1} = Math;
2652
+ const {sin: sin$4, cos: cos$4, hypot: hypot$1, atan2: atan2$1, ceil: ceil$1, abs: abs$9, PI: PI$3, sqrt: sqrt$3, pow: pow$1} = Math;
2646
2653
 
2647
2654
  const {setPoint: setPoint$4, addPoint: addPoint$2} = TwoPointBoundsHelper;
2648
2655
 
@@ -2650,7 +2657,7 @@ const {set: set$1, toNumberPoints: toNumberPoints$1} = PointHelper;
2650
2657
 
2651
2658
  const {M: M$a, L: L$a, C: C$8, Q: Q$7, Z: Z$8} = PathCommandMap;
2652
2659
 
2653
- const tempPoint$2 = {};
2660
+ const tempPoint$3 = {};
2654
2661
 
2655
2662
  const BezierHelper = {
2656
2663
  points(data, originPoints, curve, close) {
@@ -2658,7 +2665,7 @@ const BezierHelper = {
2658
2665
  data.push(M$a, points[0], points[1]);
2659
2666
  if (curve && points.length > 5) {
2660
2667
  let aX, aY, bX, bY, cX, cY, c1X, c1Y, c2X, c2Y;
2661
- let ba, cb, d, len = points.length;
2668
+ let baX, baY, ba, cb, d, len = points.length;
2662
2669
  const t = curve === true ? .5 : curve;
2663
2670
  if (close) {
2664
2671
  points = [ points[len - 2], points[len - 1], ...points, points[0], points[1], points[2], points[3] ];
@@ -2671,7 +2678,9 @@ const BezierHelper = {
2671
2678
  bY = points[i + 1];
2672
2679
  cX = points[i + 2];
2673
2680
  cY = points[i + 3];
2674
- ba = sqrt$3(pow$1(bX - aX, 2) + pow$1(bY - aY, 2));
2681
+ baX = bX - aX;
2682
+ baY = bY - aY;
2683
+ ba = sqrt$3(pow$1(baX, 2) + pow$1(baY, 2));
2675
2684
  cb = sqrt$3(pow$1(cX - bX, 2) + pow$1(cY - bY, 2));
2676
2685
  if (!ba && !cb) continue;
2677
2686
  d = ba + cb;
@@ -2684,7 +2693,7 @@ const BezierHelper = {
2684
2693
  if (i === 2) {
2685
2694
  if (!close) data.push(Q$7, c1X, c1Y, bX, bY);
2686
2695
  } else {
2687
- data.push(C$8, c2X, c2Y, c1X, c1Y, bX, bY);
2696
+ if (baX || baY) data.push(C$8, c2X, c2Y, c1X, c1Y, bX, bY);
2688
2697
  }
2689
2698
  c2X = bX + cb * cX;
2690
2699
  c2Y = bY + cb * cY;
@@ -2713,8 +2722,8 @@ const BezierHelper = {
2713
2722
  const CBy = toY - y1;
2714
2723
  let startRadian = atan2$1(BAy, BAx);
2715
2724
  let endRadian = atan2$1(CBy, CBx);
2716
- const lenBA = hypot(BAx, BAy);
2717
- const lenCB = hypot(CBx, CBy);
2725
+ const lenBA = hypot$1(BAx, BAy);
2726
+ const lenCB = hypot$1(CBx, CBy);
2718
2727
  let totalRadian = endRadian - startRadian;
2719
2728
  if (totalRadian < 0) totalRadian += PI2;
2720
2729
  if (lenBA < 1e-12 || lenCB < 1e-12 || totalRadian < 1e-12 || abs$9(totalRadian - PI$3) < 1e-12) {
@@ -2819,8 +2828,8 @@ const BezierHelper = {
2819
2828
  addMode ? addPoint$2(pointBounds, fromX, fromY) : setPoint$4(pointBounds, fromX, fromY);
2820
2829
  addPoint$2(pointBounds, toX, toY);
2821
2830
  for (let i = 0, len = tList.length; i < len; i++) {
2822
- getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$2);
2823
- addPoint$2(pointBounds, tempPoint$2.x, tempPoint$2.y);
2831
+ getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$3);
2832
+ addPoint$2(pointBounds, tempPoint$3.x, tempPoint$3.y);
2824
2833
  }
2825
2834
  },
2826
2835
  getPointAndSet(t, fromX, fromY, x1, y1, x2, y2, toX, toY, setPoint) {
@@ -3230,7 +3239,7 @@ const {M: M$8, L: L$8, C: C$6, Q: Q$5, Z: Z$6, N: N$4, D: D$5, X: X$4, G: G$4, F
3230
3239
 
3231
3240
  const {getMinDistanceFrom: getMinDistanceFrom, getRadianFrom: getRadianFrom} = PointHelper;
3232
3241
 
3233
- const {tan: tan, min: min$1, abs: abs$8} = Math;
3242
+ const {tan: tan, min: min$2, abs: abs$8} = Math;
3234
3243
 
3235
3244
  const startPoint = {};
3236
3245
 
@@ -3269,6 +3278,7 @@ const PathCommandDataHelper = {
3269
3278
  }
3270
3279
  },
3271
3280
  ellipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
3281
+ if (radiusX === radiusY) return arc$2(data, x, y, radiusX, startAngle, endAngle, anticlockwise);
3272
3282
  if (isNull(rotation)) {
3273
3283
  data.push(F$5, x, y, radiusX, radiusY);
3274
3284
  } else {
@@ -3281,6 +3291,7 @@ const PathCommandDataHelper = {
3281
3291
  if (isNull(startAngle)) {
3282
3292
  data.push(P$4, x, y, radius);
3283
3293
  } else {
3294
+ if (isNull(startAngle)) startAngle = 0;
3284
3295
  if (isNull(endAngle)) endAngle = 360;
3285
3296
  data.push(O$5, x, y, radius, startAngle, endAngle, anticlockwise ? 1 : 0);
3286
3297
  }
@@ -3288,7 +3299,7 @@ const PathCommandDataHelper = {
3288
3299
  arcTo(data, x1, y1, x2, y2, radius, lastX, lastY) {
3289
3300
  if (!isUndefined(lastX)) {
3290
3301
  const d = getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2);
3291
- radius = min$1(radius, min$1(d / 2, d / 2 * abs$8(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
3302
+ radius = min$2(radius, min$2(d / 2, d / 2 * abs$8(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
3292
3303
  }
3293
3304
  data.push(U$4, x1, y1, x2, y2, radius);
3294
3305
  },
@@ -3490,7 +3501,7 @@ const {M: M$6, L: L$6, C: C$4, Q: Q$3, Z: Z$4, N: N$2, D: D$3, X: X$2, G: G$2, F
3490
3501
 
3491
3502
  const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc: arc, ellipse: ellipse$1} = BezierHelper;
3492
3503
 
3493
- const {addPointBounds: addPointBounds, copy: copy$a, addPoint: addPoint$1, setPoint: setPoint$3, addBounds: addBounds, toBounds: toBounds$2} = TwoPointBoundsHelper;
3504
+ const {addPointBounds: addPointBounds, copy: copy$9, addPoint: addPoint$1, setPoint: setPoint$3, addBounds: addBounds, toBounds: toBounds$2} = TwoPointBoundsHelper;
3494
3505
 
3495
3506
  const debug$d = Debug.get("PathBounds");
3496
3507
 
@@ -3572,7 +3583,7 @@ const PathBounds = {
3572
3583
 
3573
3584
  case G$2:
3574
3585
  ellipse$1(null, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6], data[i + 7], data[i + 8], tempPointBounds, setEndPoint);
3575
- i === 0 ? copy$a(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3586
+ i === 0 ? copy$9(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3576
3587
  x = setEndPoint.x;
3577
3588
  y = setEndPoint.y;
3578
3589
  i += 9;
@@ -3590,7 +3601,7 @@ const PathBounds = {
3590
3601
 
3591
3602
  case O$3:
3592
3603
  arc(null, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6], tempPointBounds, setEndPoint);
3593
- i === 0 ? copy$a(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3604
+ i === 0 ? copy$9(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3594
3605
  x = setEndPoint.x;
3595
3606
  y = setEndPoint.y;
3596
3607
  i += 7;
@@ -3607,7 +3618,7 @@ const PathBounds = {
3607
3618
 
3608
3619
  case U$2:
3609
3620
  arcTo$1(null, x, y, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], tempPointBounds, setEndPoint);
3610
- i === 0 ? copy$a(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3621
+ i === 0 ? copy$9(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3611
3622
  x = setEndPoint.x;
3612
3623
  y = setEndPoint.y;
3613
3624
  i += 6;
@@ -3631,6 +3642,7 @@ const PathCorner = {
3631
3642
  smooth(data, cornerRadius, _cornerSmoothing) {
3632
3643
  let command, lastCommand, commandLen;
3633
3644
  let i = 0, x = 0, y = 0, startX = 0, startY = 0, secondX = 0, secondY = 0, lastX = 0, lastY = 0;
3645
+ if (isArray(cornerRadius)) cornerRadius = cornerRadius[0] || 0;
3634
3646
  const len = data.length;
3635
3647
  const smooth = [];
3636
3648
  while (i < len) {
@@ -4046,7 +4058,9 @@ const R = Resource;
4046
4058
  const ImageManager = {
4047
4059
  maxRecycled: 10,
4048
4060
  recycledList: [],
4049
- patternTasker: new TaskProcessor,
4061
+ patternTasker: new TaskProcessor({
4062
+ parallel: 1
4063
+ }),
4050
4064
  get(config) {
4051
4065
  let image = Resource.get(config.url);
4052
4066
  if (!image) Resource.set(config.url, image = Creator.image(config));
@@ -4627,7 +4641,7 @@ function registerUIEvent() {
4627
4641
  };
4628
4642
  }
4629
4643
 
4630
- const {copy: copy$9, toInnerPoint: toInnerPoint$1, toOuterPoint: toOuterPoint$1, scaleOfOuter: scaleOfOuter$2, rotateOfOuter: rotateOfOuter$2, skewOfOuter: skewOfOuter, multiplyParent: multiplyParent$3, divideParent: divideParent, getLayout: getLayout} = MatrixHelper;
4644
+ const {copy: copy$8, toInnerPoint: toInnerPoint$1, toOuterPoint: toOuterPoint$1, scaleOfOuter: scaleOfOuter$2, rotateOfOuter: rotateOfOuter$2, skewOfOuter: skewOfOuter, multiplyParent: multiplyParent$3, divideParent: divideParent, getLayout: getLayout} = MatrixHelper;
4631
4645
 
4632
4646
  const matrix$3 = {}, {round: round$3} = Math;
4633
4647
 
@@ -4725,7 +4739,7 @@ const LeafHelper = {
4725
4739
  if (scaleY) transition = scaleY;
4726
4740
  scaleY = scaleX;
4727
4741
  }
4728
- copy$9(matrix$3, o);
4742
+ copy$8(matrix$3, o);
4729
4743
  scaleOfOuter$2(matrix$3, origin, scaleX, scaleY);
4730
4744
  if (L$4.hasHighPosition(t)) {
4731
4745
  L$4.setTransform(t, matrix$3, resize, transition);
@@ -4744,7 +4758,7 @@ const LeafHelper = {
4744
4758
  },
4745
4759
  rotateOfLocal(t, origin, angle, transition) {
4746
4760
  const o = t.__localMatrix;
4747
- copy$9(matrix$3, o);
4761
+ copy$8(matrix$3, o);
4748
4762
  rotateOfOuter$2(matrix$3, origin, angle);
4749
4763
  if (L$4.hasHighPosition(t)) L$4.setTransform(t, matrix$3, false, transition); else t.set({
4750
4764
  x: t.x + matrix$3.e - o.e,
@@ -4756,18 +4770,18 @@ const LeafHelper = {
4756
4770
  L$4.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize, transition);
4757
4771
  },
4758
4772
  skewOfLocal(t, origin, skewX, skewY = 0, resize, transition) {
4759
- copy$9(matrix$3, t.__localMatrix);
4773
+ copy$8(matrix$3, t.__localMatrix);
4760
4774
  skewOfOuter(matrix$3, origin, skewX, skewY);
4761
4775
  L$4.setTransform(t, matrix$3, resize, transition);
4762
4776
  },
4763
4777
  transformWorld(t, transform, resize, transition) {
4764
- copy$9(matrix$3, t.worldTransform);
4778
+ copy$8(matrix$3, t.worldTransform);
4765
4779
  multiplyParent$3(matrix$3, transform);
4766
4780
  if (t.parent) divideParent(matrix$3, t.parent.scrollWorldTransform);
4767
4781
  L$4.setTransform(t, matrix$3, resize, transition);
4768
4782
  },
4769
4783
  transform(t, transform, resize, transition) {
4770
- copy$9(matrix$3, t.localTransform);
4784
+ copy$8(matrix$3, t.localTransform);
4771
4785
  multiplyParent$3(matrix$3, transform);
4772
4786
  L$4.setTransform(t, matrix$3, resize, transition);
4773
4787
  },
@@ -4805,7 +4819,7 @@ const LeafHelper = {
4805
4819
  return innerOrigin;
4806
4820
  },
4807
4821
  getRelativeWorld(t, relative, temp) {
4808
- copy$9(matrix$3, t.worldTransform);
4822
+ copy$8(matrix$3, t.worldTransform);
4809
4823
  divideParent(matrix$3, relative.scrollWorldTransform);
4810
4824
  return temp ? matrix$3 : Object.assign({}, matrix$3);
4811
4825
  },
@@ -4951,10 +4965,53 @@ const BranchHelper = {
4951
4965
  if (exclude && exclude === branch) continue;
4952
4966
  updateBounds$4(branch);
4953
4967
  }
4968
+ },
4969
+ move(branch, x, y) {
4970
+ let w;
4971
+ const {children: children} = branch;
4972
+ for (let i = 0, len = children.length; i < len; i++) {
4973
+ branch = children[i];
4974
+ w = branch.__world;
4975
+ w.e += x;
4976
+ w.f += y;
4977
+ w.x += x;
4978
+ w.y += y;
4979
+ if (branch.isBranch) move$9(branch, x, y);
4980
+ }
4981
+ },
4982
+ scale(branch, x, y, scaleX, scaleY, a, b) {
4983
+ let w;
4984
+ const {children: children} = branch;
4985
+ const changeScaleX = scaleX - 1;
4986
+ const changeScaleY = scaleY - 1;
4987
+ for (let i = 0, len = children.length; i < len; i++) {
4988
+ branch = children[i];
4989
+ w = branch.__world;
4990
+ w.a *= scaleX;
4991
+ w.d *= scaleY;
4992
+ if (w.b || w.c) {
4993
+ w.b *= scaleX;
4994
+ w.c *= scaleY;
4995
+ }
4996
+ if (w.e === w.x && w.f === w.y) {
4997
+ w.x = w.e += (w.e - a) * changeScaleX + x;
4998
+ w.y = w.f += (w.f - b) * changeScaleY + y;
4999
+ } else {
5000
+ w.e += (w.e - a) * changeScaleX + x;
5001
+ w.f += (w.f - b) * changeScaleY + y;
5002
+ w.x += (w.x - a) * changeScaleX + x;
5003
+ w.y += (w.y - b) * changeScaleY + y;
5004
+ }
5005
+ w.width *= scaleX;
5006
+ w.height *= scaleY;
5007
+ w.scaleX *= scaleX;
5008
+ w.scaleY *= scaleY;
5009
+ if (branch.isBranch) scale$2(branch, x, y, scaleX, scaleY, a, b);
5010
+ }
4954
5011
  }
4955
5012
  };
4956
5013
 
4957
- const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack} = BranchHelper;
5014
+ const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$9, scale: scale$2} = BranchHelper;
4958
5015
 
4959
5016
  const WaitHelper = {
4960
5017
  run(wait) {
@@ -4970,7 +5027,7 @@ const WaitHelper = {
4970
5027
 
4971
5028
  const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$3} = LeafHelper;
4972
5029
 
4973
- const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$8} = BoundsHelper;
5030
+ const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$7} = BoundsHelper;
4974
5031
 
4975
5032
  const localContent = "_localContentBounds";
4976
5033
 
@@ -5209,7 +5266,7 @@ class LeafLayout {
5209
5266
  matrix = getRelativeWorld$1(leaf, relative, true);
5210
5267
  }
5211
5268
  if (!layoutBounds) layoutBounds = MatrixHelper.getLayout(matrix);
5212
- copy$8(layoutBounds, bounds);
5269
+ copy$7(layoutBounds, bounds);
5213
5270
  PointHelper.copy(layoutBounds, point);
5214
5271
  if (unscale) {
5215
5272
  const {scaleX: scaleX, scaleY: scaleY} = layoutBounds;
@@ -5831,7 +5888,7 @@ const LeafDataProxy = {
5831
5888
 
5832
5889
  const {setLayout: setLayout, multiplyParent: multiplyParent$2, translateInner: translateInner, defaultWorld: defaultWorld} = MatrixHelper;
5833
5890
 
5834
- const {toPoint: toPoint$4, tempPoint: tempPoint$1} = AroundHelper;
5891
+ const {toPoint: toPoint$4, tempPoint: tempPoint$2} = AroundHelper;
5835
5892
 
5836
5893
  const LeafMatrix = {
5837
5894
  __updateWorldMatrix() {
@@ -5851,8 +5908,8 @@ const LeafMatrix = {
5851
5908
  local.e = data.x + data.offsetX;
5852
5909
  local.f = data.y + data.offsetY;
5853
5910
  if (data.around || data.origin) {
5854
- toPoint$4(data.around || data.origin, layout.boxBounds, tempPoint$1);
5855
- translateInner(local, -tempPoint$1.x, -tempPoint$1.y, !data.around);
5911
+ toPoint$4(data.around || data.origin, layout.boxBounds, tempPoint$2);
5912
+ translateInner(local, -tempPoint$2.x, -tempPoint$2.y, !data.around);
5856
5913
  }
5857
5914
  }
5858
5915
  this.__layout.matrixChanged = undefined;
@@ -5863,7 +5920,7 @@ const {updateMatrix: updateMatrix$3, updateAllMatrix: updateAllMatrix$3} = LeafH
5863
5920
 
5864
5921
  const {updateBounds: updateBounds$2} = BranchHelper;
5865
5922
 
5866
- const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$3, copy: copy$7} = BoundsHelper;
5923
+ const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$3, copy: copy$6} = BoundsHelper;
5867
5924
 
5868
5925
  const {toBounds: toBounds$1} = PathBounds;
5869
5926
 
@@ -5974,7 +6031,7 @@ const LeafBounds = {
5974
6031
  },
5975
6032
  __updateRenderBounds(_bounds) {
5976
6033
  const layout = this.__layout, {renderSpread: renderSpread} = layout;
5977
- isNumber(renderSpread) && renderSpread <= 0 ? copy$7(layout.renderBounds, layout.strokeBounds) : copyAndSpread$3(layout.renderBounds, layout.boxBounds, renderSpread);
6034
+ isNumber(renderSpread) && renderSpread <= 0 ? copy$6(layout.renderBounds, layout.strokeBounds) : copyAndSpread$3(layout.renderBounds, layout.boxBounds, renderSpread);
5978
6035
  }
5979
6036
  };
5980
6037
 
@@ -6079,7 +6136,7 @@ const {toInnerPoint: toInnerPoint, toOuterPoint: toOuterPoint, multiplyParent: m
6079
6136
 
6080
6137
  const {toOuterOf: toOuterOf$1} = BoundsHelper;
6081
6138
 
6082
- const {copy: copy$6, move: move$8} = PointHelper;
6139
+ const {copy: copy$5, move: move$8} = PointHelper;
6083
6140
 
6084
6141
  const {moveLocal: moveLocal, zoomOfLocal: zoomOfLocal, rotateOfLocal: rotateOfLocal, skewOfLocal: skewOfLocal, moveWorld: moveWorld, zoomOfWorld: zoomOfWorld, rotateOfWorld: rotateOfWorld, skewOfWorld: skewOfWorld, transform: transform, transformWorld: transformWorld, setTransform: setTransform, getFlipTransform: getFlipTransform, getLocalOrigin: getLocalOrigin, getRelativeWorld: getRelativeWorld, drop: drop} = LeafHelper;
6085
6142
 
@@ -6398,14 +6455,14 @@ let Leaf = class Leaf {
6398
6455
  if (this.parent) {
6399
6456
  this.parent.worldToInner(world, to, distance, relative);
6400
6457
  } else {
6401
- if (to) copy$6(to, world);
6458
+ if (to) copy$5(to, world);
6402
6459
  }
6403
6460
  }
6404
6461
  localToWorld(local, to, distance, relative) {
6405
6462
  if (this.parent) {
6406
6463
  this.parent.innerToWorld(local, to, distance, relative);
6407
6464
  } else {
6408
- if (to) copy$6(to, local);
6465
+ if (to) copy$5(to, local);
6409
6466
  }
6410
6467
  }
6411
6468
  worldToInner(world, to, distance, relative) {
@@ -6518,10 +6575,10 @@ let Leaf = class Leaf {
6518
6575
  hit(_world, _hitRadius) {
6519
6576
  return true;
6520
6577
  }
6521
- __hitWorld(_point) {
6578
+ __hitWorld(_point, _forceHitFill) {
6522
6579
  return true;
6523
6580
  }
6524
- __hit(_local) {
6581
+ __hit(_local, _forceHitFill) {
6525
6582
  return true;
6526
6583
  }
6527
6584
  __hitFill(_inner) {
@@ -6880,7 +6937,7 @@ class LeafLevelList {
6880
6937
  }
6881
6938
  }
6882
6939
 
6883
- const version = "1.12.0";
6940
+ const version = "1.12.2";
6884
6941
 
6885
6942
  class LeaferCanvas extends LeaferCanvasBase {
6886
6943
  get allowBackgroundColor() {
@@ -7529,6 +7586,10 @@ class Renderer {
7529
7586
 
7530
7587
  Renderer.clipSpread = 10;
7531
7588
 
7589
+ const tempPoint$1 = {};
7590
+
7591
+ const {copyRadiusPoint: copyRadiusPoint$1} = PointHelper;
7592
+
7532
7593
  const {hitRadiusPoint: hitRadiusPoint$1} = BoundsHelper;
7533
7594
 
7534
7595
  class Picker {
@@ -7655,15 +7716,15 @@ class Picker {
7655
7716
  this.eachFind(branch.children, branch.__onlyHitMask);
7656
7717
  }
7657
7718
  eachFind(children, hitMask) {
7658
- let child, hit;
7719
+ let child, hit, data;
7659
7720
  const {point: point} = this, len = children.length;
7660
7721
  for (let i = len - 1; i > -1; i--) {
7661
- child = children[i];
7662
- if (!child.__.visible || hitMask && !child.__.mask) continue;
7663
- hit = child.__.hitRadius ? true : hitRadiusPoint$1(child.__world, point);
7722
+ child = children[i], data = child.__;
7723
+ if (!data.visible || hitMask && !data.mask) continue;
7724
+ hit = hitRadiusPoint$1(child.__world, data.hitRadius ? copyRadiusPoint$1(tempPoint$1, point, data.hitRadius) : point);
7664
7725
  if (child.isBranch) {
7665
7726
  if (hit || child.__ignoreHitWorld) {
7666
- if (child.isBranchLeaf && child.__.__clipAfterFill && !child.__hitWorld(point)) continue;
7727
+ if (child.isBranchLeaf && data.__clipAfterFill && !child.__hitWorld(point, true)) continue;
7667
7728
  if (child.topChildren) this.eachFind(child.topChildren, false);
7668
7729
  this.eachFind(child.children, child.__onlyHitMask);
7669
7730
  if (child.isBranchLeaf) this.hitChild(child, point);
@@ -8150,7 +8211,7 @@ class CanvasData extends RectData {
8150
8211
  }
8151
8212
  }
8152
8213
 
8153
- const {max: max$3, add: add$1} = FourNumberHelper;
8214
+ const {max: max$4, add: add$1} = FourNumberHelper;
8154
8215
 
8155
8216
  const UIBounds = {
8156
8217
  __updateStrokeSpread() {
@@ -8166,7 +8227,7 @@ const UIBounds = {
8166
8227
  }
8167
8228
  if (data.__useArrow) spread += strokeWidth * 5;
8168
8229
  if (box) {
8169
- spread = max$3(spread, box.__layout.strokeSpread = box.__updateStrokeSpread());
8230
+ spread = max$4(spread, box.__layout.strokeSpread = box.__updateStrokeSpread());
8170
8231
  boxSpread = Math.max(boxSpread, box.__layout.strokeBoxSpread);
8171
8232
  }
8172
8233
  this.__layout.strokeBoxSpread = boxSpread;
@@ -8176,15 +8237,15 @@ const UIBounds = {
8176
8237
  let spread = 0;
8177
8238
  const {shadow: shadow, innerShadow: innerShadow, blur: blur, backgroundBlur: backgroundBlur, filter: filter, renderSpread: renderSpread} = this.__, {strokeSpread: strokeSpread} = this.__layout, box = this.__box;
8178
8239
  if (shadow) spread = Effect.getShadowRenderSpread(this, shadow);
8179
- if (blur) spread = max$3(spread, blur);
8240
+ if (blur) spread = max$4(spread, blur);
8180
8241
  if (filter) spread = add$1(spread, Filter.getSpread(filter));
8181
8242
  if (renderSpread) spread = add$1(spread, renderSpread);
8182
8243
  if (strokeSpread) spread = add$1(spread, strokeSpread);
8183
8244
  let shapeSpread = spread;
8184
- if (innerShadow) shapeSpread = max$3(shapeSpread, Effect.getInnerShadowSpread(this, innerShadow));
8185
- if (backgroundBlur) shapeSpread = max$3(shapeSpread, backgroundBlur);
8245
+ if (innerShadow) shapeSpread = max$4(shapeSpread, Effect.getInnerShadowSpread(this, innerShadow));
8246
+ if (backgroundBlur) shapeSpread = max$4(shapeSpread, backgroundBlur);
8186
8247
  this.__layout.renderShapeSpread = shapeSpread;
8187
- return box ? max$3(box.__updateRenderSpread(), spread) : spread;
8248
+ return box ? max$4(box.__updateRenderSpread(), spread) : spread;
8188
8249
  }
8189
8250
  };
8190
8251
 
@@ -8240,7 +8301,7 @@ const UIRender = {
8240
8301
  if (stroke && !__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke, this, canvas, options) : Paint.stroke(stroke, this, canvas, options);
8241
8302
  }
8242
8303
  } else {
8243
- if (data.__pathInputed) drawFast(this, canvas, options); else this.__drawFast(canvas, options);
8304
+ if (data.__pathForRender) drawFast(this, canvas, options); else this.__drawFast(canvas, options);
8244
8305
  }
8245
8306
  },
8246
8307
  __drawShape(canvas, options) {
@@ -8364,7 +8425,7 @@ let UI = UI_1 = class UI extends Leaf {
8364
8425
  getPath(curve, pathForRender) {
8365
8426
  this.__layout.update();
8366
8427
  let path = pathForRender ? this.__.__pathForRender : this.__.path;
8367
- if (!path) pen.set(path = []), this.__drawPathByBox(pen);
8428
+ if (!path) pen.set(path = []), this.__drawPathByBox(pen, !pathForRender);
8368
8429
  return curve ? PathConvert.toCanvasData(path, true) : path;
8369
8430
  }
8370
8431
  getPathString(curve, pathForRender, floatLength) {
@@ -8392,17 +8453,18 @@ let UI = UI_1 = class UI extends Leaf {
8392
8453
  }
8393
8454
  __drawPath(canvas) {
8394
8455
  canvas.beginPath();
8395
- this.__drawPathByData(canvas, this.__.path);
8456
+ this.__drawPathByData(canvas, this.__.path, true);
8396
8457
  }
8397
- __drawPathByData(drawer, data) {
8398
- data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer);
8458
+ __drawPathByData(drawer, data, ignoreCornerRadius) {
8459
+ data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
8399
8460
  }
8400
- __drawPathByBox(drawer) {
8461
+ __drawPathByBox(drawer, ignoreCornerRadius) {
8401
8462
  const {x: x, y: y, width: width, height: height} = this.__layout.boxBounds;
8402
- if (this.__.cornerRadius) {
8463
+ if (this.__.cornerRadius && !ignoreCornerRadius) {
8403
8464
  const {cornerRadius: cornerRadius} = this.__;
8404
8465
  drawer.roundRect(x, y, width, height, isNumber(cornerRadius) ? [ cornerRadius ] : cornerRadius);
8405
8466
  } else drawer.rect(x, y, width, height);
8467
+ drawer.closePath();
8406
8468
  }
8407
8469
  drawImagePlaceholder(_paint, canvas, renderOptions) {
8408
8470
  Paint.fill(this.__.placeholderColor, this, canvas, renderOptions);
@@ -8671,6 +8733,9 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8671
8733
  get layoutLocked() {
8672
8734
  return !this.layouter.running;
8673
8735
  }
8736
+ get view() {
8737
+ return this.canvas && this.canvas.view;
8738
+ }
8674
8739
  get FPS() {
8675
8740
  return this.renderer ? this.renderer.FPS : 60;
8676
8741
  }
@@ -8722,7 +8787,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8722
8787
  this.__controllers.push(this.renderer = Creator.renderer(this, canvas, config), this.watcher = Creator.watcher(this, config), this.layouter = Creator.layouter(this, config));
8723
8788
  if (this.isApp) this.__setApp();
8724
8789
  this.__checkAutoLayout();
8725
- this.view = canvas.view;
8726
8790
  if (!parentApp) {
8727
8791
  this.selector = Creator.selector(this);
8728
8792
  this.interaction = Creator.interaction(this, canvas, this.selector, config);
@@ -9002,7 +9066,7 @@ let Leafer = Leafer_1 = class Leafer extends Group {
9002
9066
  if (this.canvasManager) this.canvasManager.destroy();
9003
9067
  }
9004
9068
  if (this.canvas) this.canvas.destroy();
9005
- this.config.view = this.view = this.parentApp = null;
9069
+ this.config.view = this.parentApp = null;
9006
9070
  if (this.userConfig) this.userConfig.view = null;
9007
9071
  super.destroy();
9008
9072
  setTimeout(() => {
@@ -9186,7 +9250,6 @@ let Ellipse = class Ellipse extends UI {
9186
9250
  if (startAngle || endAngle) {
9187
9251
  if (innerRadius < 1) ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false);
9188
9252
  ellipse(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
9189
- if (innerRadius < 1) closePath$2(path);
9190
9253
  } else {
9191
9254
  if (innerRadius < 1) {
9192
9255
  ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius);
@@ -9194,16 +9257,16 @@ let Ellipse = class Ellipse extends UI {
9194
9257
  }
9195
9258
  ellipse(path, rx, ry, rx, ry, 0, 360, 0, true);
9196
9259
  }
9197
- if (Platform.ellipseToCurve) this.__.path = this.getPath(true);
9198
9260
  } else {
9199
9261
  if (startAngle || endAngle) {
9200
9262
  moveTo$3(path, rx, ry);
9201
9263
  ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
9202
- closePath$2(path);
9203
9264
  } else {
9204
9265
  ellipse(path, rx, ry, rx, ry);
9205
9266
  }
9206
9267
  }
9268
+ closePath$2(path);
9269
+ if (Platform.ellipseToCurve) this.__.path = this.getPath(true);
9207
9270
  }
9208
9271
  };
9209
9272
 
@@ -9854,7 +9917,7 @@ class UIEvent extends Event {
9854
9917
  }
9855
9918
  }
9856
9919
 
9857
- const {min: min, max: max$2, abs: abs$7} = Math, {float: float$1, sign: sign$2} = MathHelper, {minX: minX, maxX: maxX, minY: minY, maxY: maxY} = BoundsHelper;
9920
+ const {min: min$1, max: max$3, abs: abs$7} = Math, {float: float$2, sign: sign$2} = MathHelper, {minX: minX, maxX: maxX, minY: minY, maxY: maxY} = BoundsHelper;
9858
9921
 
9859
9922
  const tempContent = new Bounds, tempDragBounds = new Bounds;
9860
9923
 
@@ -9894,8 +9957,8 @@ const DragBoundsHelper = {
9894
9957
  } else {
9895
9958
  if (y < dragBounds.y) move.y += dragBounds.y - y; else if (bottom > boundsBottom) move.y += boundsBottom - bottom;
9896
9959
  }
9897
- move.x = float$1(move.x);
9898
- move.y = float$1(move.y);
9960
+ move.x = float$2(move.x);
9961
+ move.y = float$2(move.y);
9899
9962
  return move;
9900
9963
  },
9901
9964
  getValidScaleOf(content, dragBounds, dragBoundsType, origin, scale, lockRatio, change) {
@@ -9907,44 +9970,44 @@ const DragBoundsHelper = {
9907
9970
  let correctScaleX = 1, correctScaleY = 1, aScale, bScale, aSize, bSize;
9908
9971
  if (D$2.isInnerMode(content, dragBounds, dragBoundsType, "width")) {
9909
9972
  if (scale.x < 0) tempContent.scaleOf(origin, correctScaleX = 1 / scale.x, 1);
9910
- aSize = float$1(tempContent.minX - tempDragBounds.minX);
9911
- bSize = float$1(tempDragBounds.maxX - tempContent.maxX);
9973
+ aSize = float$2(tempContent.minX - tempDragBounds.minX);
9974
+ bSize = float$2(tempDragBounds.maxX - tempContent.maxX);
9912
9975
  aScale = originLeftScale && aSize > 0 ? 1 + aSize / (originLeftScale * tempContent.width) : 1;
9913
9976
  bScale = originRightScale && bSize > 0 ? 1 + bSize / (originRightScale * tempContent.width) : 1;
9914
- correctScaleX *= max$2(aScale, bScale);
9977
+ correctScaleX *= max$3(aScale, bScale);
9915
9978
  } else {
9916
9979
  if (scale.x < 0) {
9917
- if (float$1(minX(content) - minX(dragBounds)) <= 0 || float$1(maxX(dragBounds) - maxX(content)) <= 0) tempContent.scaleOf(origin, correctScaleX = 1 / scale.x, 1);
9980
+ if (float$2(minX(content) - minX(dragBounds)) <= 0 || float$2(maxX(dragBounds) - maxX(content)) <= 0) tempContent.scaleOf(origin, correctScaleX = 1 / scale.x, 1);
9918
9981
  tempContent.unsign();
9919
9982
  }
9920
- aSize = float$1(tempDragBounds.minX - tempContent.minX);
9921
- bSize = float$1(tempContent.maxX - tempDragBounds.maxX);
9983
+ aSize = float$2(tempDragBounds.minX - tempContent.minX);
9984
+ bSize = float$2(tempContent.maxX - tempDragBounds.maxX);
9922
9985
  aScale = originLeftScale && aSize > 0 ? 1 - aSize / (originLeftScale * tempContent.width) : 1;
9923
9986
  bScale = originRightScale && bSize > 0 ? 1 - bSize / (originRightScale * tempContent.width) : 1;
9924
- correctScaleX *= min(aScale, bScale);
9987
+ correctScaleX *= min$1(aScale, bScale);
9925
9988
  }
9926
9989
  if (D$2.isInnerMode(content, dragBounds, dragBoundsType, "height")) {
9927
9990
  if (scale.y < 0) tempContent.scaleOf(origin, 1, correctScaleY = 1 / scale.y);
9928
- aSize = float$1(tempContent.minY - tempDragBounds.minY);
9929
- bSize = float$1(tempDragBounds.maxY - tempContent.maxY);
9991
+ aSize = float$2(tempContent.minY - tempDragBounds.minY);
9992
+ bSize = float$2(tempDragBounds.maxY - tempContent.maxY);
9930
9993
  aScale = originTopScale && aSize > 0 ? 1 + aSize / (originTopScale * tempContent.height) : 1;
9931
9994
  bScale = originBottomScale && bSize > 0 ? 1 + bSize / (originBottomScale * tempContent.height) : 1;
9932
- correctScaleY *= max$2(aScale, bScale);
9995
+ correctScaleY *= max$3(aScale, bScale);
9933
9996
  if (lockRatio) {
9934
- aScale = max$2(abs$7(correctScaleX), abs$7(correctScaleY));
9997
+ aScale = max$3(abs$7(correctScaleX), abs$7(correctScaleY));
9935
9998
  correctScaleX = sign$2(correctScaleX) * aScale;
9936
9999
  correctScaleY = sign$2(correctScaleY) * aScale;
9937
10000
  }
9938
10001
  } else {
9939
10002
  if (scale.y < 0) {
9940
- if (float$1(minY(content) - minY(dragBounds)) <= 0 || float$1(maxY(dragBounds) - maxY(content)) <= 0) tempContent.scaleOf(origin, 1, correctScaleY = 1 / scale.y);
10003
+ if (float$2(minY(content) - minY(dragBounds)) <= 0 || float$2(maxY(dragBounds) - maxY(content)) <= 0) tempContent.scaleOf(origin, 1, correctScaleY = 1 / scale.y);
9941
10004
  tempContent.unsign();
9942
10005
  }
9943
- aSize = float$1(tempDragBounds.minY - tempContent.minY);
9944
- bSize = float$1(tempContent.maxY - tempDragBounds.maxY);
10006
+ aSize = float$2(tempDragBounds.minY - tempContent.minY);
10007
+ bSize = float$2(tempContent.maxY - tempDragBounds.maxY);
9945
10008
  aScale = originTopScale && aSize > 0 ? 1 - aSize / (originTopScale * tempContent.height) : 1;
9946
10009
  bScale = originBottomScale && bSize > 0 ? 1 - bSize / (originBottomScale * tempContent.height) : 1;
9947
- correctScaleY *= min(aScale, bScale);
10010
+ correctScaleY *= min$1(aScale, bScale);
9948
10011
  }
9949
10012
  scale.x *= isFinite$1(correctScaleX) ? correctScaleX : 1;
9950
10013
  scale.y *= isFinite$1(correctScaleY) ? correctScaleY : 1;
@@ -10093,6 +10156,8 @@ MoveEvent.START = "move.start";
10093
10156
 
10094
10157
  MoveEvent.MOVE = "move";
10095
10158
 
10159
+ MoveEvent.DRAG_ANIMATE = "move.drag_animate";
10160
+
10096
10161
  MoveEvent.END = "move.end";
10097
10162
 
10098
10163
  MoveEvent = __decorate([ registerUIEvent() ], MoveEvent);
@@ -10191,6 +10256,7 @@ const InteractionHelper = {
10191
10256
  ctrlKey: e.ctrlKey,
10192
10257
  shiftKey: e.shiftKey,
10193
10258
  metaKey: e.metaKey,
10259
+ time: Date.now(),
10194
10260
  buttons: isUndefined(e.buttons) ? 1 : e.buttons === 0 ? pointerUpButtons : e.buttons,
10195
10261
  origin: e
10196
10262
  };
@@ -10226,6 +10292,7 @@ const {getDragEventData: getDragEventData, getDropEventData: getDropEventData, g
10226
10292
 
10227
10293
  class Dragger {
10228
10294
  constructor(interaction) {
10295
+ this.dragDataList = [];
10229
10296
  this.interaction = interaction;
10230
10297
  }
10231
10298
  setDragData(data) {
@@ -10288,6 +10355,7 @@ class Dragger {
10288
10355
  this.dragData = getDragEventData(downData, dragData, data);
10289
10356
  if (throughPath) this.dragData.throughPath = throughPath;
10290
10357
  this.dragData.path = path;
10358
+ this.dragDataList.push(this.dragData);
10291
10359
  if (this.moving) {
10292
10360
  data.moving = true;
10293
10361
  this.dragData.moveType = "drag";
@@ -10338,9 +10406,9 @@ class Dragger {
10338
10406
  interaction.emit(DragEvent.ENTER, data, path, dragEnterPath);
10339
10407
  this.dragEnterPath = path;
10340
10408
  }
10341
- dragEnd(data, speed) {
10409
+ dragEnd(data) {
10342
10410
  if (!this.dragging && !this.moving) return;
10343
- if (this.checkDragEndAnimate(data, speed)) return;
10411
+ if (this.checkDragEndAnimate(data)) return;
10344
10412
  this.dragEndReal(data);
10345
10413
  }
10346
10414
  dragEndReal(data) {
@@ -10382,11 +10450,13 @@ class Dragger {
10382
10450
  }
10383
10451
  dragReset() {
10384
10452
  DragEvent.list = DragEvent.data = this.draggableList = this.dragData = this.downData = this.dragOverPath = this.dragEnterPath = null;
10453
+ this.dragDataList = [];
10385
10454
  }
10386
10455
  checkDragEndAnimate(_data, _speed) {
10387
10456
  return false;
10388
10457
  }
10389
10458
  animate(_func, _off) {}
10459
+ stopAnimate() {}
10390
10460
  checkDragOut(_data) {}
10391
10461
  autoMoveOnDragOut(_data) {}
10392
10462
  autoMoveCancel() {}
@@ -10780,6 +10850,9 @@ class InteractionBase {
10780
10850
  this.pointerHover(hoverData);
10781
10851
  }
10782
10852
  }
10853
+ stopDragAnimate() {
10854
+ this.dragger.stopAnimate();
10855
+ }
10783
10856
  updateDownData(data, options, merge) {
10784
10857
  const {downData: downData} = this;
10785
10858
  if (!data && downData) data = downData;
@@ -10963,7 +11036,7 @@ Platform.getSelector = function(leaf) {
10963
11036
  return leaf.leafer ? leaf.leafer.selector : Platform.selector || (Platform.selector = Creator.selector());
10964
11037
  };
10965
11038
 
10966
- const {toInnerRadiusPointOf: toInnerRadiusPointOf, copy: copy$5, setRadius: setRadius} = PointHelper;
11039
+ const {toInnerRadiusPointOf: toInnerRadiusPointOf, copyRadiusPoint: copyRadiusPoint} = PointHelper;
10967
11040
 
10968
11041
  const {hitRadiusPoint: hitRadiusPoint, hitPoint: hitPoint} = BoundsHelper;
10969
11042
 
@@ -10973,8 +11046,7 @@ const leaf$1 = Leaf.prototype;
10973
11046
 
10974
11047
  leaf$1.hit = function(worldPoint, hitRadius = 0) {
10975
11048
  this.updateLayout();
10976
- copy$5(worldRadiusPoint, worldPoint);
10977
- setRadius(worldRadiusPoint, hitRadius);
11049
+ copyRadiusPoint(worldRadiusPoint, worldPoint, hitRadius);
10978
11050
  const world = this.__world;
10979
11051
  if (hitRadius ? !hitRadiusPoint(world, worldRadiusPoint) : !hitPoint(world, worldRadiusPoint)) return false;
10980
11052
  return this.isBranch ? Platform.getSelector(this).hitPoint(Object.assign({}, worldRadiusPoint), hitRadius, {
@@ -10982,14 +11054,14 @@ leaf$1.hit = function(worldPoint, hitRadius = 0) {
10982
11054
  }) : this.__hitWorld(worldRadiusPoint);
10983
11055
  };
10984
11056
 
10985
- leaf$1.__hitWorld = function(point) {
11057
+ leaf$1.__hitWorld = function(point, forceHitFill) {
10986
11058
  const data = this.__;
10987
11059
  if (!data.hitSelf) return false;
10988
11060
  const world = this.__world, layout = this.__layout;
10989
11061
  const isSmall = world.width < 10 && world.height < 10;
10990
11062
  if (data.hitRadius) {
10991
- copy$5(inner, point), point = inner;
10992
- setRadius(point, data.hitRadius);
11063
+ copyRadiusPoint(inner, point, data.hitRadius);
11064
+ point = inner;
10993
11065
  }
10994
11066
  toInnerRadiusPointOf(point, world, inner);
10995
11067
  if (data.hitBox || isSmall) {
@@ -11000,7 +11072,7 @@ leaf$1.__hitWorld = function(point) {
11000
11072
  this.__updateHitCanvas();
11001
11073
  if (!layout.boundsChanged) layout.hitCanvasChanged = false;
11002
11074
  }
11003
- return this.__hit(inner);
11075
+ return this.__hit(inner, forceHitFill);
11004
11076
  };
11005
11077
 
11006
11078
  leaf$1.__hitFill = function(inner) {
@@ -11067,12 +11139,12 @@ ui$5.__updateHitCanvas = function() {
11067
11139
  h.setStrokeOptions(data);
11068
11140
  };
11069
11141
 
11070
- ui$5.__hit = function(inner) {
11142
+ ui$5.__hit = function(inner, forceHitFill) {
11071
11143
  if (this.__box && this.__box.__hit(inner)) return true;
11072
11144
  const data = this.__;
11073
11145
  if (data.__isHitPixel && this.__hitPixel(inner)) return true;
11074
11146
  const {hitFill: hitFill} = data;
11075
- const needHitFillPath = (data.fill || data.__isCanvas) && (hitFill === "path" || hitFill === "pixel" && !(data.__isAlphaPixelFill || data.__isCanvas)) || hitFill === "all";
11147
+ const needHitFillPath = (data.fill || data.__isCanvas) && (hitFill === "path" || hitFill === "pixel" && !(data.__isAlphaPixelFill || data.__isCanvas)) || hitFill === "all" || forceHitFill;
11076
11148
  if (needHitFillPath && this.__hitFill(inner)) return true;
11077
11149
  const {hitStroke: hitStroke, __maxStrokeWidth: strokeWidth} = data;
11078
11150
  const needHitStrokePath = data.stroke && (hitStroke === "path" || hitStroke === "pixel" && !data.__isAlphaPixelStroke) || hitStroke === "all";
@@ -11797,10 +11869,12 @@ const {getFloorScale: getFloorScale} = MathHelper, {abs: abs$6} = Math;
11797
11869
  function createPatternTask(paint, ui, canvas, renderOptions) {
11798
11870
  if (!paint.patternTask) {
11799
11871
  paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function*() {
11800
- paint.patternTask = null;
11801
- if (canvas.bounds.hit(ui.__nowWorld)) PaintImage.createPattern(paint, ui, canvas, renderOptions);
11872
+ PaintImage.createPattern(paint, ui, canvas, renderOptions);
11802
11873
  ui.forceUpdate("surface");
11803
- }), 300);
11874
+ }), 0, () => {
11875
+ paint.patternTask = null;
11876
+ return canvas.bounds.hit(ui.__nowWorld);
11877
+ });
11804
11878
  }
11805
11879
  }
11806
11880
 
@@ -12050,7 +12124,7 @@ const PaintGradientModule = {
12050
12124
  getTransform: getTransform
12051
12125
  };
12052
12126
 
12053
- const {copy: copy$3, move: move$6, toOffsetOutBounds: toOffsetOutBounds$1} = BoundsHelper, {max: max$1, abs: abs$5} = Math;
12127
+ const {copy: copy$3, move: move$6, toOffsetOutBounds: toOffsetOutBounds$1} = BoundsHelper, {max: max$2, abs: abs$5} = Math;
12054
12128
 
12055
12129
  const tempBounds = {}, tempMatrix = new Matrix;
12056
12130
 
@@ -12095,10 +12169,10 @@ function getShadowRenderSpread(_ui, shadow) {
12095
12169
  let top = 0, right = 0, bottom = 0, left = 0, x, y, spread, blur;
12096
12170
  shadow.forEach(item => {
12097
12171
  x = item.x || 0, y = item.y || 0, blur = (item.blur || 0) * 1.5, spread = abs$5(item.spread || 0);
12098
- top = max$1(top, spread + blur - y);
12099
- right = max$1(right, spread + blur + x);
12100
- bottom = max$1(bottom, spread + blur + y);
12101
- left = max$1(left, spread + blur - x);
12172
+ top = max$2(top, spread + blur - y);
12173
+ right = max$2(right, spread + blur + x);
12174
+ bottom = max$2(bottom, spread + blur + y);
12175
+ left = max$2(left, spread + blur - x);
12102
12176
  });
12103
12177
  return top === right && right === bottom && bottom === left ? top : [ top, right, bottom, left ];
12104
12178
  }
@@ -12977,7 +13051,11 @@ class Stroker extends UI {
12977
13051
  matrix$1.half = strokeWidth % 2;
12978
13052
  canvas.setWorld(matrix$1, options.matrix);
12979
13053
  canvas.beginPath();
12980
- if (leaf.__.__useArrow) leaf.__drawPath(canvas); else leaf.__.__pathForRender ? leaf.__drawRenderPath(canvas) : leaf.__drawPathByBox(canvas);
13054
+ if (this.strokePathType === "path") {
13055
+ leaf.__drawPath(canvas);
13056
+ } else {
13057
+ if (leaf.__.__useArrow) leaf.__drawPath(canvas); else leaf.__.__pathForRender ? leaf.__drawRenderPath(canvas) : leaf.__drawPathByBox(canvas);
13058
+ }
12981
13059
  data.strokeWidth = strokeWidth / Math.max(aScaleX, aScaleY);
12982
13060
  if (stroke) isString(stroke) ? Paint.stroke(stroke, this, canvas, options) : Paint.strokes(stroke, this, canvas, options);
12983
13061
  if (fill) isString(fill) ? Paint.fill(fill, this, canvas, options) : Paint.fills(fill, this, canvas, options);
@@ -12994,6 +13072,8 @@ class Stroker extends UI {
12994
13072
 
12995
13073
  __decorate([ targetAttr(onTarget$1) ], Stroker.prototype, "target", void 0);
12996
13074
 
13075
+ __decorate([ surfaceType("render-path") ], Stroker.prototype, "strokePathType", void 0);
13076
+
12997
13077
  function onTarget$1(stroker) {
12998
13078
  const value = stroker.target;
12999
13079
  stroker.list = value ? isArray(value) ? value : [ value ] : [];
@@ -13108,10 +13188,11 @@ class EditSelect extends Group {
13108
13188
  }
13109
13189
  update() {
13110
13190
  this.hoverStroker.update();
13111
- const {stroke: stroke, strokeWidth: strokeWidth, selectedStyle: selectedStyle} = this.editor.mergedConfig;
13191
+ const {stroke: stroke, strokeWidth: strokeWidth, selectedPathType: selectedPathType, selectedStyle: selectedStyle} = this.editor.mergedConfig;
13112
13192
  this.targetStroker.update(Object.assign({
13113
13193
  stroke: stroke,
13114
- strokeWidth: strokeWidth && Math.max(1, strokeWidth / 2)
13194
+ strokeWidth: strokeWidth && Math.max(1, strokeWidth / 2),
13195
+ strokePathType: selectedPathType
13115
13196
  }, selectedStyle || {}));
13116
13197
  }
13117
13198
  onPointerMove(e) {
@@ -14496,7 +14577,7 @@ class TransformTool {
14496
14577
  const {target: target, mergeConfig: mergeConfig, single: single, dragStartData: dragStartData} = this.editBox;
14497
14578
  let {around: around, lockRatio: lockRatio, flipable: flipable, editSize: editSize} = mergeConfig, totalMove;
14498
14579
  if (e instanceof ZoomEvent) {
14499
- around = target.getBoxPoint(e);
14580
+ if (!around) around = target.getBoxPoint(e);
14500
14581
  totalMove = e.totalScale;
14501
14582
  } else {
14502
14583
  totalMove = e.getInnerTotal(target);
@@ -15807,7 +15888,11 @@ function addViewport(leafer, mergeConfig, custom) {
15807
15888
  addViewportConfig(leafer.parentApp ? leafer.parentApp : leafer, mergeConfig);
15808
15889
  if (leafer.isApp || custom) return;
15809
15890
  leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, e => {
15810
- leafer.zoomLayer.move(leafer.getValidMove(e.moveX, e.moveY, false));
15891
+ const move = leafer.getValidMove(e.moveX, e.moveY, false);
15892
+ leafer.zoomLayer.move(move);
15893
+ }), leafer.on_(MoveEvent.DRAG_ANIMATE, () => {
15894
+ const move = leafer.getValidMove(0, 0);
15895
+ if (move.x || move.y) leafer.interaction.stopDragAnimate();
15811
15896
  }), leafer.on_(MoveEvent.END, e => {
15812
15897
  LeafHelper.animateMove(leafer.zoomLayer, leafer.getValidMove(e.moveX, e.moveY));
15813
15898
  }), leafer.on_(ZoomEvent.BEFORE_ZOOM, e => {
@@ -15958,7 +16043,7 @@ const MultiTouchHelper = {
15958
16043
 
15959
16044
  const M$3 = MultiTouchHelper;
15960
16045
 
15961
- const {abs: abs$2, max: max} = Math, {sign: sign, within: within$2} = MathHelper;
16046
+ const {abs: abs$2, max: max$1} = Math, {sign: sign, within: within$2} = MathHelper;
15962
16047
 
15963
16048
  const WheelEventHelper = {
15964
16049
  getMove(event, config) {
@@ -15969,8 +16054,8 @@ const WheelEventHelper = {
15969
16054
  deltaY = 0;
15970
16055
  }
15971
16056
  const absX = abs$2(deltaX), absY = abs$2(deltaY);
15972
- if (absX > 50) deltaX = max(50, absX / 3) * sign(deltaX);
15973
- if (absY > 50) deltaY = max(50, absY / 3) * sign(deltaY);
16057
+ if (absX > 50) deltaX = max$1(50, absX / 3) * sign(deltaX);
16058
+ if (absY > 50) deltaY = max$1(50, absY / 3) * sign(deltaY);
15974
16059
  return {
15975
16060
  x: -deltaX * moveSpeed * 2,
15976
16061
  y: -deltaY * moveSpeed * 2
@@ -16120,7 +16205,7 @@ leafer.getValidMove = function(moveX, moveY, checkLimit = true) {
16120
16205
  if (type.includes("x")) move$4.y = 0; else if (type.includes("y")) move$4.x = 0; else Math.abs(move$4.x) > Math.abs(move$4.y) ? move$4.y = 0 : move$4.x = 0;
16121
16206
  if (checkLimit && type.includes("limit")) {
16122
16207
  bounds.set(this.__world).addPoint(this.zoomLayer);
16123
- DragBoundsHelper.getValidMove(bounds, this.canvas.bounds, "inner", move$4, true);
16208
+ DragBoundsHelper.getValidMove(bounds, this.canvas.bounds, "auto", move$4, true);
16124
16209
  if (type.includes("x")) move$4.y = 0; else if (type.includes("y")) move$4.x = 0;
16125
16210
  }
16126
16211
  }
@@ -16228,22 +16313,52 @@ interaction.multiTouch = function(data, list) {
16228
16313
 
16229
16314
  const dragger = Dragger.prototype;
16230
16315
 
16231
- const {abs: abs$1} = Math;
16316
+ const {abs: abs$1, min: min, max: max, hypot: hypot} = Math;
16232
16317
 
16233
- dragger.checkDragEndAnimate = function(data, speed) {
16234
- const {moveX: moveX, moveY: moveY} = this.dragData;
16235
- const absMoveX = abs$1(moveX), absMoveY = abs$1(moveY), minMove = speed ? 1 : .1;
16236
- const dragAnimate = this.canAnimate && this.moving && (absMoveX > minMove || absMoveY > minMove) && this.interaction.m.dragAnimate;
16318
+ dragger.checkDragEndAnimate = function(data) {
16319
+ const {interaction: interaction} = this;
16320
+ const dragAnimate = this.canAnimate && this.moving && interaction.m.dragAnimate;
16237
16321
  if (dragAnimate) {
16238
- const inertia = data.pointerType === "touch" ? 3 : 1, maxMove = 70;
16239
- speed = speed ? isNumber(dragAnimate) ? dragAnimate : .95 : inertia;
16240
- if (absMoveX * speed > maxMove) speed = maxMove / absMoveX; else if (absMoveY * speed > maxMove) speed = maxMove / absMoveY;
16241
- data = Object.assign({}, data);
16242
- PointHelper.move(data, moveX * speed, moveY * speed);
16243
- this.drag(data);
16244
- this.animate(() => {
16245
- this.dragEnd(data, 1);
16246
- });
16322
+ const inertia = isNumber(dragAnimate) ? dragAnimate : .95;
16323
+ const stopMove = .15;
16324
+ const maxMove = 150;
16325
+ let moveX = 0, moveY = 0, flickSpeed = 0;
16326
+ let totalWeight = 0, weight, w = 3, s, frame;
16327
+ const {dragDataList: dragDataList} = this, len = dragDataList.length;
16328
+ for (let i = len - 1; i >= max(len - 3, 0); i--) {
16329
+ frame = dragDataList[i];
16330
+ if (frame.time && Date.now() - frame.time > 100) break;
16331
+ weight = w--;
16332
+ moveX += frame.moveX * weight;
16333
+ moveY += frame.moveY * weight;
16334
+ totalWeight += weight;
16335
+ s = hypot(frame.moveX, frame.moveY);
16336
+ if (s > flickSpeed) flickSpeed = s;
16337
+ }
16338
+ if (totalWeight) moveX /= totalWeight, moveY /= totalWeight;
16339
+ if (flickSpeed > 8) {
16340
+ const t = min((flickSpeed - 8) / 17, 1);
16341
+ const boost = 1.15 + t * (1.6 - 1.15);
16342
+ moveX *= boost;
16343
+ moveY *= boost;
16344
+ }
16345
+ const maxAbs = max(abs$1(moveX), abs$1(moveY));
16346
+ if (maxAbs > maxMove) {
16347
+ s = maxMove / maxAbs;
16348
+ moveX *= s;
16349
+ moveY *= s;
16350
+ }
16351
+ const step = () => {
16352
+ moveX *= inertia;
16353
+ moveY *= inertia;
16354
+ data = Object.assign({}, data);
16355
+ if (abs$1(moveX) < stopMove && abs$1(moveY) < stopMove) return this.dragEndReal(data);
16356
+ PointHelper.move(data, moveX, moveY);
16357
+ this.drag(data);
16358
+ this.animate(step);
16359
+ interaction.emit(MoveEvent.DRAG_ANIMATE, data);
16360
+ };
16361
+ this.animate(step);
16247
16362
  }
16248
16363
  return dragAnimate;
16249
16364
  };
@@ -16254,6 +16369,13 @@ dragger.animate = function(func, off) {
16254
16369
  this.animateWait = func;
16255
16370
  };
16256
16371
 
16372
+ dragger.stopAnimate = function() {
16373
+ this.animate(null, "off");
16374
+ this.interaction.target.nextRender(() => {
16375
+ if (this.dragData) this.dragEndReal(this.dragData);
16376
+ });
16377
+ };
16378
+
16257
16379
  dragger.checkDragOut = function(data) {
16258
16380
  const {interaction: interaction} = this;
16259
16381
  this.autoMoveCancel();
@@ -16325,7 +16447,6 @@ function getFixBounds(bounds, scaleBounds) {
16325
16447
  Plugin.add("view");
16326
16448
 
16327
16449
  Leafer.prototype.zoom = function(zoomType, optionsOrPadding, scroll, transition) {
16328
- this.killAnimate();
16329
16450
  let padding;
16330
16451
  if (isData(optionsOrPadding)) {
16331
16452
  padding = optionsOrPadding.padding;
@@ -16338,8 +16459,9 @@ Leafer.prototype.zoom = function(zoomType, optionsOrPadding, scroll, transition)
16338
16459
  x: limitBounds.x + limitBounds.width / 2,
16339
16460
  y: limitBounds.y + limitBounds.height / 2
16340
16461
  };
16462
+ zoomLayer.killAnimate();
16341
16463
  let changeScale;
16342
- const {x: x, y: y, scaleX: scaleX, scaleY: scaleY} = zoomLayer.__;
16464
+ const {x: x, y: y, scaleX: scaleX, scaleY: scaleY} = zoomLayer.__, {boxBounds: boxBounds} = zoomLayer;
16343
16465
  if (isString(zoomType)) {
16344
16466
  switch (zoomType) {
16345
16467
  case "in":
@@ -16351,16 +16473,16 @@ Leafer.prototype.zoom = function(zoomType, optionsOrPadding, scroll, transition)
16351
16473
  break;
16352
16474
 
16353
16475
  case "fit":
16354
- zoomType = this.boxBounds;
16476
+ zoomType = boxBounds;
16355
16477
  break;
16356
16478
 
16357
16479
  case "fit-width":
16358
- zoomType = new Bounds(this.boxBounds);
16480
+ zoomType = new Bounds(boxBounds);
16359
16481
  zoomType.height = 0;
16360
16482
  break;
16361
16483
 
16362
16484
  case "fit-height":
16363
- zoomType = new Bounds(this.boxBounds);
16485
+ zoomType = new Bounds(boxBounds);
16364
16486
  zoomType.width = 0;
16365
16487
  break;
16366
16488
  }
@@ -17762,6 +17884,8 @@ let Animate = class Animate extends Eventer {
17762
17884
  }
17763
17885
  constructor(target, keyframe, options, isTemp) {
17764
17886
  super();
17887
+ this.nowIndex = 0;
17888
+ this.playedTotalTime = 0;
17765
17889
  if (keyframe) {
17766
17890
  if (keyframe.keyframes) options = keyframe, keyframe = keyframe.keyframes; else if (keyframe.style) options = keyframe,
17767
17891
  keyframe = keyframe.style;
@@ -17808,7 +17932,7 @@ let Animate = class Animate extends Eventer {
17808
17932
  play() {
17809
17933
  if (this.destroyed) return;
17810
17934
  this.running = true;
17811
- if (!this.started) this.clearTimer(), this.start(); else if (!this.timer) this.requestAnimate();
17935
+ if (!this.started) this.clearTimer(), this.start(); else if (!this.timer) this.startRequestAnimate();
17812
17936
  this.emitType(AnimateEvent.PLAY);
17813
17937
  }
17814
17938
  pause() {
@@ -17822,14 +17946,28 @@ let Animate = class Animate extends Eventer {
17822
17946
  this.complete();
17823
17947
  this.emitType(AnimateEvent.STOP);
17824
17948
  }
17825
- seek(time) {
17949
+ seek(time, includeDelay) {
17826
17950
  if (this.destroyed) return;
17827
- if (isObject(time)) time = UnitConvert.number(time, this.duration);
17951
+ const {delay: delay} = this;
17952
+ if (isObject(time)) time = UnitConvert.number(time, this.duration + (includeDelay ? delay : 0));
17953
+ if (includeDelay) time -= delay;
17828
17954
  if (time) time /= this.speed;
17829
- if (!this.started || time < this.time) this.start(true);
17955
+ let waitBeginTime;
17956
+ if (time < 0) {
17957
+ waitBeginTime = -time;
17958
+ time = 0;
17959
+ }
17960
+ if (!this.started || time < this.time || !time) this.start(true);
17830
17961
  this.time = time;
17831
- this.animate(0, true);
17832
- this.clearTimer(() => this.requestAnimate());
17962
+ if (!waitBeginTime) this.animate(0, true);
17963
+ this.clearTimer(() => {
17964
+ if (waitBeginTime) {
17965
+ this.timer = setTimeout(() => {
17966
+ this.timer = 0;
17967
+ this.begin();
17968
+ }, waitBeginTime * 1e3);
17969
+ } else this.startRequestAnimate();
17970
+ });
17833
17971
  this.emitType(AnimateEvent.SEEK);
17834
17972
  }
17835
17973
  kill(complete = true, killStyle) {
@@ -17912,14 +18050,24 @@ let Animate = class Animate extends Eventer {
17912
18050
  }
17913
18051
  }
17914
18052
  }
17915
- requestAnimate() {
18053
+ startRequestAnimate() {
17916
18054
  this.requestAnimateTime = Date.now();
18055
+ this.requestAnimatePageTime = 0;
18056
+ if (!this.waitRequestRender) this.requestAnimate();
18057
+ }
18058
+ requestAnimate() {
18059
+ this.waitRequestRender = true;
17917
18060
  Platform.requestRender(this.animate.bind(this));
17918
18061
  }
17919
- animate(_runtime, seek) {
18062
+ animate(pageTime, seek) {
17920
18063
  if (!seek) {
18064
+ this.waitRequestRender = false;
17921
18065
  if (!this.running) return;
17922
- this.time += (Date.now() - this.requestAnimateTime) / 1e3;
18066
+ let frameTime;
18067
+ if (pageTime && this.requestAnimatePageTime) frameTime = pageTime - this.requestAnimatePageTime; else frameTime = Date.now() - this.requestAnimateTime;
18068
+ this.time += frameTime / 1e3;
18069
+ this.requestAnimatePageTime = pageTime;
18070
+ this.requestAnimateTime = Date.now();
17923
18071
  }
17924
18072
  const {duration: duration} = this, realTime = this.time * this.speed;
17925
18073
  if (realTime < duration) {
@@ -17960,21 +18108,24 @@ let Animate = class Animate extends Eventer {
17960
18108
  }
17961
18109
  start(seek) {
17962
18110
  this.requestAnimateTime = 1;
17963
- const {reverse: reverse} = this;
18111
+ const {reverse: reverse, jump: jump} = this;
17964
18112
  if (reverse || this.mainReverse) this.mainReverse = reverse;
17965
18113
  if (this.looped) this.looped = 0;
17966
18114
  if (seek) this.begin(true); else {
17967
18115
  const {delay: delay} = this;
17968
- if (delay) this.timer = setTimeout(() => {
17969
- this.timer = 0;
17970
- this.begin();
17971
- }, delay / this.speed * 1e3); else this.begin();
18116
+ if (delay) {
18117
+ if (jump) this.begin(true);
18118
+ this.timer = setTimeout(() => {
18119
+ this.timer = 0;
18120
+ this.begin();
18121
+ }, delay / this.speed * 1e3);
18122
+ } else this.begin();
17972
18123
  }
17973
18124
  }
17974
18125
  begin(seek) {
17975
18126
  this.playedTotalTime = this.time = 0;
17976
18127
  this.mainReverse ? this.setTo() : this.setFrom();
17977
- if (!seek) this.requestAnimate();
18128
+ if (!seek) this.startRequestAnimate();
17978
18129
  }
17979
18130
  end() {
17980
18131
  this.mainReverse ? this.setFrom() : this.setTo();
@@ -18090,6 +18241,8 @@ __decorate([ animateAttr(true) ], Animate.prototype, "autoplay", void 0);
18090
18241
 
18091
18242
  __decorate([ animateAttr() ], Animate.prototype, "join", void 0);
18092
18243
 
18244
+ __decorate([ animateAttr() ], Animate.prototype, "jump", void 0);
18245
+
18093
18246
  __decorate([ animateAttr() ], Animate.prototype, "attrs", void 0);
18094
18247
 
18095
18248
  Animate = __decorate([ useModule(LeafEventer) ], Animate);
@@ -18328,7 +18481,7 @@ const hslMatch = /^hsl\((\d+),\s*(\d+)%\s*,\s*(\d+)%/i;
18328
18481
 
18329
18482
  const hslaMatch = /^hsla\((\d+),\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d*\.?\d+)/i;
18330
18483
 
18331
- const int = parseInt, float = parseFloat, {round: round$1} = Math;
18484
+ const int = parseInt, float$1 = parseFloat, {round: round$1} = Math;
18332
18485
 
18333
18486
  let cache = {}, totalCache = 0;
18334
18487
 
@@ -18441,18 +18594,18 @@ function rgbaToRGBA(color) {
18441
18594
  r: int(match[1]),
18442
18595
  g: int(match[2]),
18443
18596
  b: int(match[3]),
18444
- a: float(match[4])
18597
+ a: float$1(match[4])
18445
18598
  };
18446
18599
  }
18447
18600
 
18448
18601
  function hslToRGBA(color) {
18449
18602
  const match = hslMatch.exec(color);
18450
- return hsla(float(match[1]), float(match[2]), float(match[3]), 1);
18603
+ return hsla(float$1(match[1]), float$1(match[2]), float$1(match[3]), 1);
18451
18604
  }
18452
18605
 
18453
18606
  function hslaToRGBA(color) {
18454
18607
  const match = hslaMatch.exec(color);
18455
- return hsla(float(match[1]), float(match[2]), float(match[3]), float(match[4]));
18608
+ return hsla(float$1(match[1]), float$1(match[2]), float$1(match[3]), float$1(match[4]));
18456
18609
  }
18457
18610
 
18458
18611
  const n1 = 1 / 6, n2 = .5, n3 = 2 / 3, n4 = 1 / 3;
@@ -18691,7 +18844,7 @@ const HighBezierHelper = {
18691
18844
 
18692
18845
  const {getDistance: getDistance} = HighBezierHelper;
18693
18846
 
18694
- const {M: M, L: L, C: C, Z: Z} = PathCommandMap;
18847
+ const {M: M, L: L, C: C, Z: Z} = PathCommandMap, {float: float} = MathHelper;
18695
18848
 
18696
18849
  const tempPoint = {}, tempFrom = {};
18697
18850
 
@@ -18828,7 +18981,7 @@ const HighCurveHelper = {
18828
18981
  getDistancePath(distanceData, motionDistance, motionPrecision) {
18829
18982
  const {segments: segments, data: data} = distanceData, path = [];
18830
18983
  motionDistance = UnitConvert.number(motionDistance, distanceData.total);
18831
- let total = 0, distance, to = {};
18984
+ let total = 0, distance, cutDistance, to = {};
18832
18985
  let i = 0, index = 0, x = 0, y = 0, toX, toY, command;
18833
18986
  let x1, y1, x2, y2, t;
18834
18987
  const len = data.length;
@@ -18840,14 +18993,17 @@ const HighCurveHelper = {
18840
18993
  toX = data[i + 1];
18841
18994
  toY = data[i + 2];
18842
18995
  distance = segments[index];
18843
- if (total + distance >= motionDistance || !distanceData.total) {
18996
+ if (total + distance > motionDistance || !distanceData.total) {
18844
18997
  if (!i) x = toX, y = toY;
18845
18998
  tempFrom.x = x;
18846
18999
  tempFrom.y = y;
18847
19000
  to.x = toX;
18848
19001
  to.y = toY;
18849
- PointHelper.getDistancePoint(tempFrom, to, motionDistance - total, true);
18850
- path.push(command, to.x, to.y);
19002
+ cutDistance = float(motionDistance - total);
19003
+ if (cutDistance) {
19004
+ PointHelper.getDistancePoint(tempFrom, to, cutDistance, true);
19005
+ path.push(command, to.x, to.y);
19006
+ }
18851
19007
  return path;
18852
19008
  }
18853
19009
  x = toX;
@@ -18861,9 +19017,12 @@ const HighCurveHelper = {
18861
19017
  toX = data[i + 5];
18862
19018
  toY = data[i + 6];
18863
19019
  distance = segments[index];
18864
- if (total + distance >= motionDistance) {
18865
- t = HighBezierHelper.getT(motionDistance - total, distance, x, y, x1, y1, x2, y2, toX, toY, motionPrecision);
18866
- HighBezierHelper.cut(path, t, x, y, x1, y1, x2, y2, toX, toY);
19020
+ if (total + distance > motionDistance) {
19021
+ cutDistance = float(motionDistance - total);
19022
+ if (cutDistance) {
19023
+ t = HighBezierHelper.getT(cutDistance, distance, x, y, x1, y1, x2, y2, toX, toY, motionPrecision);
19024
+ HighBezierHelper.cut(path, t, x, y, x1, y1, x2, y2, toX, toY);
19025
+ }
18867
19026
  return path;
18868
19027
  }
18869
19028
  x = toX;
@@ -19594,6 +19753,7 @@ class Finder {
19594
19753
  for (let i = 0, len = children.length; i < len; i++) {
19595
19754
  child = children[i];
19596
19755
  result = method(child, options);
19756
+ if (typeof result === "boolean") result = result ? 1 : 0;
19597
19757
  if (result === Yes || result === YesAndSkip) {
19598
19758
  if (list) {
19599
19759
  list.push(child);
@@ -19937,4 +20097,4 @@ Plugin.add("bright");
19937
20097
 
19938
20098
  UI.addAttr("bright", false, dimType);
19939
20099
 
19940
- export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, Arrow, ArrowData, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent, Dragger, DropEvent, EditBox, EditDataHelper, EditPoint, EditSelect, EditSelectHelper, EditTool, EditToolCreator, Editor, EditorEvent, EditorGroupEvent, EditorHelper, EditorMoveEvent, EditorRotateEvent, EditorScaleEvent, EditorSkewEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, Flow, FourNumberHelper, Frame, FrameData, Group, GroupData, HTMLText, HTMLTextData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, InnerEditor, InnerEditorEvent, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, LineData, LineEditTool, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathArrowModule, PathBounds, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathMatrixHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, PathScaler, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, ScrollBar, SelectArea, Selector, Star, StarData, State, StringNumberMap, Stroker, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TextEditor, TouchEvent, TransformTool, Transformer, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, WheelEventHelper, ZoomEvent, addViewport, addViewportConfig, affectRenderBoundsType, affectStrokeBoundsType, arrowType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite$1 as isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerEditTool, registerInnerEditor, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleResize, scaleResizeFontSize, scaleResizeGroup, scaleResizePath, scaleResizePoints, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$3 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };
20100
+ export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, Arrow, ArrowData, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent, Dragger, DropEvent, EditBox, EditDataHelper, EditPoint, EditSelect, EditSelectHelper, EditTool, EditToolCreator, Editor, EditorEvent, EditorGroupEvent, EditorHelper, EditorMoveEvent, EditorRotateEvent, EditorScaleEvent, EditorSkewEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, Flow, FourNumberHelper, Frame, FrameData, Group, GroupData, HTMLText, HTMLTextData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, InnerEditor, InnerEditorEvent, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, LineData, LineEditTool, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathArrowModule, PathBounds, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathMatrixHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, PathScaler, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, ScrollBar, SelectArea, Selector, Star, StarData, State, StringNumberMap, Stroker, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TextEditor, TouchEvent, TransformTool, Transformer, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, WheelEventHelper, ZoomEvent, addViewport, addViewportConfig, affectRenderBoundsType, affectStrokeBoundsType, arrowType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite$1 as isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerEditTool, registerInnerEditor, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleResize, scaleResizeFontSize, scaleResizeGroup, scaleResizePath, scaleResizePoints, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$4 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };