@antv/g-canvas 1.9.12 → 1.9.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1349,6 +1349,23 @@
1349
1349
 
1350
1350
  return out;
1351
1351
  }
1352
+ /**
1353
+ * Creates a new vec3 initialized with the given values
1354
+ *
1355
+ * @param {Number} x X component
1356
+ * @param {Number} y Y component
1357
+ * @param {Number} z Z component
1358
+ * @returns {vec3} a new 3D vector
1359
+ */
1360
+
1361
+
1362
+ function fromValues(x, y, z) {
1363
+ var out = new ARRAY_TYPE(3);
1364
+ out[0] = x;
1365
+ out[1] = y;
1366
+ out[2] = z;
1367
+ return out;
1368
+ }
1352
1369
  /**
1353
1370
  * Set the components of a vec3 to the given values
1354
1371
  *
@@ -1388,6 +1405,25 @@
1388
1405
  out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
1389
1406
  return out;
1390
1407
  }
1408
+ /**
1409
+ * Transforms the vec3 with a mat3.
1410
+ *
1411
+ * @param {vec3} out the receiving vector
1412
+ * @param {ReadonlyVec3} a the vector to transform
1413
+ * @param {ReadonlyMat3} m the 3x3 matrix to transform with
1414
+ * @returns {vec3} out
1415
+ */
1416
+
1417
+
1418
+ function transformMat3(out, a, m) {
1419
+ var x = a[0],
1420
+ y = a[1],
1421
+ z = a[2];
1422
+ out[0] = x * m[0] + y * m[3] + z * m[6];
1423
+ out[1] = x * m[1] + y * m[4] + z * m[7];
1424
+ out[2] = x * m[2] + y * m[5] + z * m[8];
1425
+ return out;
1426
+ }
1391
1427
  /**
1392
1428
  * Perform some operation over an array of vec3s.
1393
1429
  *
@@ -1567,7 +1603,7 @@
1567
1603
  this.pathGeneratorFactory = void 0;
1568
1604
  this.pointInPathPickerFactory = void 0;
1569
1605
 
1570
- this.isHit = function (displayObject, position, worldTransform) {
1606
+ this.isHit = function (displayObject, position, worldTransform, isClipPath) {
1571
1607
  // use picker for current shape's type
1572
1608
  var pick = _this.pointInPathPickerFactory[displayObject.nodeName];
1573
1609
 
@@ -1584,7 +1620,7 @@
1584
1620
  localPosition[0] += (anchor && anchor[0] || 0) * halfExtents[0] * 2;
1585
1621
  localPosition[1] += (anchor && anchor[1] || 0) * halfExtents[1] * 2;
1586
1622
 
1587
- if (pick(displayObject, new gLite.Point(localPosition[0], localPosition[1]), _this.isPointInPath)) {
1623
+ if (pick(displayObject, new gLite.Point(localPosition[0], localPosition[1]), isClipPath, _this.isPointInPath)) {
1588
1624
  return true;
1589
1625
  }
1590
1626
  }
@@ -1662,7 +1698,7 @@
1662
1698
  for (var _iterator = _createForOfIteratorHelperLoose(hitTestList), _step; !(_step = _iterator()).done;) {
1663
1699
  var displayObject = _step.value;
1664
1700
  var worldTransform = displayObject.getWorldTransform();
1665
- var isHitOriginShape = this.isHit(displayObject, position, worldTransform);
1701
+ var isHitOriginShape = this.isHit(displayObject, position, worldTransform, false);
1666
1702
 
1667
1703
  if (isHitOriginShape) {
1668
1704
  // should look up in the ancestor node
@@ -1670,7 +1706,7 @@
1670
1706
 
1671
1707
  if (clipped) {
1672
1708
  var clipPath = clipped.parsedStyle.clipPath;
1673
- var isHitClipPath = this.isHit(clipPath, position, clipPath.getWorldTransform());
1709
+ var isHitClipPath = this.isHit(clipPath, position, clipPath.getWorldTransform(), true);
1674
1710
 
1675
1711
  if (isHitClipPath) {
1676
1712
  if (topmost) {
@@ -1941,6 +1977,104 @@
1941
1977
  return totalLength / 2;
1942
1978
  }
1943
1979
 
1980
+ function quadraticAt(p0, p1, p2, t) {
1981
+ var onet = 1 - t;
1982
+ return onet * onet * p0 + 2 * t * onet * p1 + t * t * p2;
1983
+ } // 求极值
1984
+
1985
+
1986
+ function extrema(p0, p1, p2) {
1987
+ var a = p0 + p2 - 2 * p1;
1988
+
1989
+ if (isNumberEqual(a, 0)) {
1990
+ return [0.5];
1991
+ }
1992
+
1993
+ var rst = (p0 - p1) / a;
1994
+
1995
+ if (rst <= 1 && rst >= 0) {
1996
+ return [rst];
1997
+ }
1998
+
1999
+ return [];
2000
+ }
2001
+
2002
+ function derivativeAt(p0, p1, p2, t) {
2003
+ return 2 * (1 - t) * (p1 - p0) + 2 * t * (p2 - p1);
2004
+ } // 分割贝塞尔曲线
2005
+
2006
+
2007
+ function divideQuadratic(x1, y1, x2, y2, x3, y3, t) {
2008
+ // 划分点
2009
+ var xt = quadraticAt(x1, x2, x3, t);
2010
+ var yt = quadraticAt(y1, y2, y3, t); // 分割的第一条曲线的控制点
2011
+
2012
+ var controlPoint1 = line.pointAt(x1, y1, x2, y2, t); // 分割的第二条曲线的控制点
2013
+
2014
+ var controlPoint2 = line.pointAt(x2, y2, x3, y3, t);
2015
+ return [[x1, y1, controlPoint1.x, controlPoint1.y, xt, yt], [xt, yt, controlPoint2.x, controlPoint2.y, x3, y3]];
2016
+ } // 使用迭代法取贝塞尔曲线的长度
2017
+
2018
+
2019
+ function quadraticLength(x1, y1, x2, y2, x3, y3, iterationCount) {
2020
+ if (iterationCount === 0) {
2021
+ return (distance(x1, y1, x2, y2) + distance(x2, y2, x3, y3) + distance(x1, y1, x3, y3)) / 2;
2022
+ }
2023
+
2024
+ var quadratics = divideQuadratic(x1, y1, x2, y2, x3, y3, 0.5);
2025
+ var left = quadratics[0];
2026
+ var right = quadratics[1];
2027
+ left.push(iterationCount - 1);
2028
+ right.push(iterationCount - 1);
2029
+ return quadraticLength.apply(void 0, left) + quadraticLength.apply(void 0, right);
2030
+ }
2031
+
2032
+ var quadratic = {
2033
+ box: function box(x1, y1, x2, y2, x3, y3) {
2034
+ var xExtrema = extrema(x1, x2, x3)[0];
2035
+ var yExtrema = extrema(y1, y2, y3)[0]; // 控制点不加入 box 的计算
2036
+
2037
+ var xArr = [x1, x3];
2038
+ var yArr = [y1, y3];
2039
+
2040
+ if (xExtrema !== undefined) {
2041
+ xArr.push(quadraticAt(x1, x2, x3, xExtrema));
2042
+ }
2043
+
2044
+ if (yExtrema !== undefined) {
2045
+ yArr.push(quadraticAt(y1, y2, y3, yExtrema));
2046
+ }
2047
+
2048
+ return getBBoxByArray(xArr, yArr);
2049
+ },
2050
+ length: function length(x1, y1, x2, y2, x3, y3) {
2051
+ return quadraticLength(x1, y1, x2, y2, x3, y3, 3);
2052
+ },
2053
+ nearestPoint: function nearestPoint$1(x1, y1, x2, y2, x3, y3, x0, y0) {
2054
+ return nearestPoint([x1, x2, x3], [y1, y2, y3], x0, y0, quadraticAt);
2055
+ },
2056
+ pointDistance: function pointDistance(x1, y1, x2, y2, x3, y3, x0, y0) {
2057
+ var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0);
2058
+ return distance(point.x, point.y, x0, y0);
2059
+ },
2060
+ interpolationAt: quadraticAt,
2061
+ pointAt: function pointAt(x1, y1, x2, y2, x3, y3, t) {
2062
+ return {
2063
+ x: quadraticAt(x1, x2, x3, t),
2064
+ y: quadraticAt(y1, y2, y3, t)
2065
+ };
2066
+ },
2067
+ divide: function divide(x1, y1, x2, y2, x3, y3, t) {
2068
+ return divideQuadratic(x1, y1, x2, y2, x3, y3, t);
2069
+ },
2070
+ tangentAngle: function tangentAngle(x1, y1, x2, y2, x3, y3, t) {
2071
+ var dx = derivativeAt(x1, x2, x3, t);
2072
+ var dy = derivativeAt(y1, y2, y3, t);
2073
+ var angle = Math.atan2(dy, dx);
2074
+ return piMod(angle);
2075
+ }
2076
+ };
2077
+
1944
2078
  function cubicAt(p0, p1, p2, p3, t) {
1945
2079
  var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍
1946
2080
 
@@ -2208,18 +2342,16 @@
2208
2342
  return isHit;
2209
2343
  }
2210
2344
 
2211
- function isPointInPath(displayObject, position) {
2345
+ function isPointInPath(displayObject, position, isClipPath) {
2212
2346
  var _displayObject$parsed = displayObject.parsedStyle,
2213
2347
  r = _displayObject$parsed.r,
2214
2348
  fill = _displayObject$parsed.fill,
2215
2349
  stroke = _displayObject$parsed.stroke,
2216
2350
  lineWidth = _displayObject$parsed.lineWidth,
2217
2351
  increasedLineWidthForHitTesting = _displayObject$parsed.increasedLineWidthForHitTesting,
2218
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2219
2352
  pointerEvents = _displayObject$parsed.pointerEvents;
2220
2353
  var halfLineWidth = ((lineWidth || 0) + (increasedLineWidthForHitTesting || 0)) / 2;
2221
2354
  var absDistance = distance$1(r, r, position.x, position.y);
2222
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);
2223
2355
 
2224
2356
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2225
2357
  hasFill = _isFillOrStrokeAffect[0],
@@ -2244,9 +2376,7 @@
2244
2376
  return squareX / (rx * rx) + squareY / (ry * ry);
2245
2377
  }
2246
2378
 
2247
- function isPointInPath$1(displayObject, _ref) {
2248
- var x = _ref.x,
2249
- y = _ref.y;
2379
+ function isPointInPath$1(displayObject, position, isClipPath) {
2250
2380
  var _displayObject$parsed = displayObject.parsedStyle,
2251
2381
  rx = _displayObject$parsed.rx,
2252
2382
  ry = _displayObject$parsed.ry,
@@ -2254,9 +2384,9 @@
2254
2384
  stroke = _displayObject$parsed.stroke,
2255
2385
  lineWidth = _displayObject$parsed.lineWidth,
2256
2386
  increasedLineWidthForHitTesting = _displayObject$parsed.increasedLineWidthForHitTesting,
2257
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2258
2387
  pointerEvents = _displayObject$parsed.pointerEvents;
2259
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);
2388
+ var x = position.x,
2389
+ y = position.y;
2260
2390
 
2261
2391
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2262
2392
  hasFill = _isFillOrStrokeAffect[0],
@@ -2281,7 +2411,7 @@
2281
2411
  return false;
2282
2412
  }
2283
2413
 
2284
- function isPointInPath$2(displayObject, position) {
2414
+ function isPointInPath$2(displayObject, position, isClipPath) {
2285
2415
  var _displayObject$parsed = displayObject.parsedStyle,
2286
2416
  x1 = _displayObject$parsed.x1,
2287
2417
  y1 = _displayObject$parsed.y1,
@@ -2293,11 +2423,9 @@
2293
2423
  x = _displayObject$parsed2 === void 0 ? 0 : _displayObject$parsed2,
2294
2424
  _displayObject$parsed3 = _displayObject$parsed.defY,
2295
2425
  y = _displayObject$parsed3 === void 0 ? 0 : _displayObject$parsed3,
2296
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2297
2426
  pointerEvents = _displayObject$parsed.pointerEvents,
2298
2427
  fill = _displayObject$parsed.fill,
2299
- stroke = _displayObject$parsed.stroke;
2300
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length); // eslint-disable-next-line @typescript-eslint/no-unused-vars
2428
+ stroke = _displayObject$parsed.stroke; // eslint-disable-next-line @typescript-eslint/no-unused-vars
2301
2429
 
2302
2430
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2303
2431
  _ = _isFillOrStrokeAffect[0],
@@ -2312,12 +2440,18 @@
2312
2440
 
2313
2441
  function isPointInStroke(segments, lineWidth, px, py, length) {
2314
2442
  var isHit = false;
2443
+ var halfWidth = lineWidth / 2;
2315
2444
 
2316
2445
  for (var i = 0; i < segments.length; i++) {
2317
2446
  var segment = segments[i];
2318
2447
  var currentPoint = segment.currentPoint,
2319
2448
  params = segment.params,
2320
- prePoint = segment.prePoint;
2449
+ prePoint = segment.prePoint,
2450
+ box = segment.box; // 如果在前面已经生成过包围盒,直接按照包围盒计算
2451
+
2452
+ if (box && !inBox(box.x - halfWidth, box.y - halfWidth, box.width + lineWidth, box.height + lineWidth, px, py)) {
2453
+ continue;
2454
+ }
2321
2455
 
2322
2456
  switch (segment.command) {
2323
2457
  // L 和 Z 都是直线, M 不进行拾取
@@ -2326,12 +2460,35 @@
2326
2460
  isHit = inLine(prePoint[0], prePoint[1], currentPoint[0], currentPoint[1], lineWidth, px, py);
2327
2461
  break;
2328
2462
 
2463
+ case 'Q':
2464
+ var qDistance = quadratic.pointDistance(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], px, py);
2465
+ isHit = qDistance <= lineWidth / 2;
2466
+ break;
2467
+
2329
2468
  case 'C':
2330
2469
  var cDistance = cubic.pointDistance(prePoint[0], // 上一段结束位置, 即 C 的起始点
2331
2470
  prePoint[1], params[1], // 'C' 的参数,1、2 为第一个控制点,3、4 为第二个控制点,5、6 为结束点
2332
2471
  params[2], params[3], params[4], params[5], params[6], px, py, length);
2333
2472
  isHit = cDistance <= lineWidth / 2;
2334
2473
  break;
2474
+
2475
+ case 'A':
2476
+ // 计算点到椭圆圆弧的距离,暂时使用近似算法,后面可以改成切割法求最近距离
2477
+ var arcParams = segment.arcParams;
2478
+ var cx = arcParams.cx,
2479
+ cy = arcParams.cy,
2480
+ rx = arcParams.rx,
2481
+ ry = arcParams.ry,
2482
+ startAngle = arcParams.startAngle,
2483
+ endAngle = arcParams.endAngle,
2484
+ xRotation = arcParams.xRotation;
2485
+ var p = fromValues(px, py, 1);
2486
+ var r = rx > ry ? rx : ry;
2487
+ var scaleX = rx > ry ? 1 : rx / ry;
2488
+ var scaleY = rx > ry ? ry / rx : 1;
2489
+ transformMat3(p, p, gLite.fromRotationTranslationScale(-xRotation, -cx, -cy, 1 / scaleX, 1 / scaleY));
2490
+ isHit = inArc(0, 0, r, startAngle, endAngle, lineWidth, p[0], p[1]);
2491
+ break;
2335
2492
  }
2336
2493
 
2337
2494
  if (isHit) {
@@ -2342,7 +2499,7 @@
2342
2499
  return isHit;
2343
2500
  }
2344
2501
 
2345
- function isPointInPath$3(displayObject, position, isPointInPath) {
2502
+ function isPointInPath$3(displayObject, position, isClipPath, isPointInPath) {
2346
2503
  var _displayObject$parsed = displayObject.parsedStyle,
2347
2504
  lineWidth = _displayObject$parsed.lineWidth,
2348
2505
  increasedLineWidthForHitTesting = _displayObject$parsed.increasedLineWidthForHitTesting,
@@ -2352,7 +2509,6 @@
2352
2509
  x = _displayObject$parsed2 === void 0 ? 0 : _displayObject$parsed2,
2353
2510
  _displayObject$parsed3 = _displayObject$parsed.defY,
2354
2511
  y = _displayObject$parsed3 === void 0 ? 0 : _displayObject$parsed3,
2355
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2356
2512
  path = _displayObject$parsed.path,
2357
2513
  pointerEvents = _displayObject$parsed.pointerEvents;
2358
2514
 
@@ -2365,7 +2521,6 @@
2365
2521
  polylines = path.polylines,
2366
2522
  polygons = path.polygons;
2367
2523
  var totalLength = gLite.getOrCalculatePathTotalLength(displayObject);
2368
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);
2369
2524
  var isHit = false;
2370
2525
 
2371
2526
  if (hasFill || isClipPath) {
@@ -2407,7 +2562,7 @@
2407
2562
  return isHit;
2408
2563
  }
2409
2564
 
2410
- function isPointInPath$4(displayObject, position) {
2565
+ function isPointInPath$4(displayObject, position, isClipPath) {
2411
2566
  var _displayObject$parsed = displayObject.parsedStyle,
2412
2567
  stroke = _displayObject$parsed.stroke,
2413
2568
  fill = _displayObject$parsed.fill,
@@ -2418,9 +2573,7 @@
2418
2573
  x = _displayObject$parsed2 === void 0 ? 0 : _displayObject$parsed2,
2419
2574
  _displayObject$parsed3 = _displayObject$parsed.defY,
2420
2575
  y = _displayObject$parsed3 === void 0 ? 0 : _displayObject$parsed3,
2421
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2422
2576
  pointerEvents = _displayObject$parsed.pointerEvents;
2423
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);
2424
2577
 
2425
2578
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2426
2579
  hasFill = _isFillOrStrokeAffect[0],
@@ -2439,7 +2592,7 @@
2439
2592
  return isHit;
2440
2593
  }
2441
2594
 
2442
- function isPointInPath$5(displayObject, position) {
2595
+ function isPointInPath$5(displayObject, position, isClipPath) {
2443
2596
  var _displayObject$parsed = displayObject.parsedStyle,
2444
2597
  lineWidth = _displayObject$parsed.lineWidth,
2445
2598
  increasedLineWidthForHitTesting = _displayObject$parsed.increasedLineWidthForHitTesting,
@@ -2448,14 +2601,11 @@
2448
2601
  x = _displayObject$parsed2 === void 0 ? 0 : _displayObject$parsed2,
2449
2602
  _displayObject$parsed3 = _displayObject$parsed.defY,
2450
2603
  y = _displayObject$parsed3 === void 0 ? 0 : _displayObject$parsed3,
2451
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2452
2604
  pointerEvents = _displayObject$parsed.pointerEvents,
2453
2605
  fill = _displayObject$parsed.fill,
2454
2606
  stroke = _displayObject$parsed.stroke;
2455
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length); // eslint-disable-next-line @typescript-eslint/no-unused-vars
2456
2607
 
2457
2608
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2458
- _ = _isFillOrStrokeAffect[0],
2459
2609
  hasStroke = _isFillOrStrokeAffect[1];
2460
2610
 
2461
2611
  if (!hasStroke && !isClipPath || !lineWidth) {
@@ -2465,7 +2615,7 @@
2465
2615
  return inPolyline(points.points, (lineWidth || 0) + (increasedLineWidthForHitTesting || 0), position.x + x, position.y + y, false);
2466
2616
  }
2467
2617
 
2468
- function isPointInPath$6(displayObject, position, isPointInPath) {
2618
+ function isPointInPath$6(displayObject, position, isClipPath, isPointInPath) {
2469
2619
  var _displayObject$parsed = displayObject.parsedStyle,
2470
2620
  radius = _displayObject$parsed.radius,
2471
2621
  fill = _displayObject$parsed.fill,
@@ -2474,9 +2624,7 @@
2474
2624
  increasedLineWidthForHitTesting = _displayObject$parsed.increasedLineWidthForHitTesting,
2475
2625
  width = _displayObject$parsed.width,
2476
2626
  height = _displayObject$parsed.height,
2477
- clipPathTargets = _displayObject$parsed.clipPathTargets,
2478
2627
  pointerEvents = _displayObject$parsed.pointerEvents;
2479
- var isClipPath = !!(clipPathTargets === null || clipPathTargets === void 0 ? void 0 : clipPathTargets.length);
2480
2628
 
2481
2629
  var _isFillOrStrokeAffect = gLite.isFillOrStrokeAffected(pointerEvents, fill, stroke),
2482
2630
  hasFill = _isFillOrStrokeAffect[0],
@@ -3255,7 +3403,7 @@
3255
3403
  */
3256
3404
 
3257
3405
 
3258
- function fromValues(x, y, z) {
3406
+ function fromValues$1(x, y, z) {
3259
3407
  var out = new ARRAY_TYPE$1(3);
3260
3408
  out[0] = x;
3261
3409
  out[1] = y;
@@ -3472,7 +3620,7 @@
3472
3620
  var context = contextService.getContext(); // clear & clip dirty rectangle
3473
3621
 
3474
3622
  var dpr = contextService.getDPR();
3475
- fromScaling(_this.dprMatrix, fromValues(dpr, dpr, 1));
3623
+ fromScaling(_this.dprMatrix, fromValues$1(dpr, dpr, 1));
3476
3624
  multiply(_this.vpMatrix, _this.dprMatrix, camera.getOrthoMatrix());
3477
3625
 
3478
3626
  if (_this.clearFullScreen) {
@@ -3485,7 +3633,7 @@
3485
3633
  maxX = _ref2.maxX,
3486
3634
  maxY = _ref2.maxY;
3487
3635
  var aabb = new gLite.AABB();
3488
- aabb.setMinMax(fromValues(minX, minY, 0), fromValues(maxX, maxY, 0));
3636
+ aabb.setMinMax(fromValues$1(minX, minY, 0), fromValues$1(maxX, maxY, 0));
3489
3637
  return aabb;
3490
3638
  })));
3491
3639
 
@@ -3502,10 +3650,10 @@
3502
3650
  y = dirtyRect.y,
3503
3651
  width = dirtyRect.width,
3504
3652
  height = dirtyRect.height;
3505
- var tl = transformMat4$1(_this.vec3a, fromValues(x, y, 0), _this.vpMatrix);
3506
- var tr = transformMat4$1(_this.vec3b, fromValues(x + width, y, 0), _this.vpMatrix);
3507
- var bl = transformMat4$1(_this.vec3c, fromValues(x, y + height, 0), _this.vpMatrix);
3508
- var br = transformMat4$1(_this.vec3d, fromValues(x + width, y + height, 0), _this.vpMatrix);
3653
+ var tl = transformMat4$1(_this.vec3a, fromValues$1(x, y, 0), _this.vpMatrix);
3654
+ var tr = transformMat4$1(_this.vec3b, fromValues$1(x + width, y, 0), _this.vpMatrix);
3655
+ var bl = transformMat4$1(_this.vec3c, fromValues$1(x, y + height, 0), _this.vpMatrix);
3656
+ var br = transformMat4$1(_this.vec3d, fromValues$1(x + width, y + height, 0), _this.vpMatrix);
3509
3657
  var minx = Math.min(tl[0], tr[0], br[0], bl[0]);
3510
3658
  var miny = Math.min(tl[1], tr[1], br[1], bl[1]);
3511
3659
  var maxx = Math.max(tl[0], tr[0], br[0], bl[0]);
@@ -5353,7 +5501,8 @@
5353
5501
 
5354
5502
  var camera = context.camera,
5355
5503
  renderingContext = context.renderingContext,
5356
- renderingService = context.renderingService;
5504
+ renderingService = context.renderingService,
5505
+ displayObjectPool = context.displayObjectPool;
5357
5506
  this.context = context;
5358
5507
  var canvas = renderingContext.root.ownerDocument.defaultView;
5359
5508
 
@@ -5365,7 +5514,11 @@
5365
5514
  var object = e.target;
5366
5515
 
5367
5516
  if (object.nodeName === gLite.Shape.HTML) {
5368
- // create DOM element
5517
+ if (!_this.$camera) {
5518
+ _this.$camera = _this.createCamera(camera);
5519
+ } // create DOM element
5520
+
5521
+
5369
5522
  var $el = _this.getOrCreateEl(object);
5370
5523
 
5371
5524
  _this.$camera.appendChild($el); // apply documentElement's style
@@ -5420,11 +5573,13 @@
5420
5573
  };
5421
5574
 
5422
5575
  var handleCanvasResize = function handleCanvasResize() {
5423
- var _this$context$config = _this.context.config,
5424
- width = _this$context$config.width,
5425
- height = _this$context$config.height;
5426
- _this.$camera.style.width = (width || 0) + "px";
5427
- _this.$camera.style.height = (height || 0) + "px";
5576
+ if (_this.$camera) {
5577
+ var _this$context$config = _this.context.config,
5578
+ width = _this$context$config.width,
5579
+ height = _this$context$config.height;
5580
+ _this.$camera.style.width = (width || 0) + "px";
5581
+ _this.$camera.style.height = (height || 0) + "px";
5582
+ }
5428
5583
  };
5429
5584
 
5430
5585
  renderingService.hooks.init.tapPromise(HTMLRenderingPlugin.tag, /*#__PURE__*/_asyncToGenerator$4( /*#__PURE__*/_regeneratorRuntime$4().mark(function _callee() {
@@ -5432,8 +5587,11 @@
5432
5587
  while (1) {
5433
5588
  switch (_context.prev = _context.next) {
5434
5589
  case 0:
5435
- // append camera
5436
- _this.$camera = _this.createCamera(camera);
5590
+ if (displayObjectPool.getHTMLs().length) {
5591
+ // append camera
5592
+ _this.$camera = _this.createCamera(camera);
5593
+ }
5594
+
5437
5595
  canvas.addEventListener(gLite.CanvasEvent.RESIZE, handleCanvasResize);
5438
5596
  canvas.addEventListener(gLite.ElementEvent.MOUNTED, handleMounted);
5439
5597
  canvas.addEventListener(gLite.ElementEvent.UNMOUNTED, handleUnmounted);
@@ -1,13 +1,13 @@
1
1
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Canvas2D={}),t.window.G)}(this,(function(t,e){"use strict";function r(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new P(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function d(){}var v={};s(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(O([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=d.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(m,"constructor",d),s(d,"constructor",p),p.displayName=s(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var c={}.toString,s=function(t){return null==t},u=function(t){return e="String",c.call(t)==="[object "+e+"]";var e},h=function(t,e,r){return e>t?e:t>r?r:t};function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function p(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var o=r>n?r:n,i=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI)}}function d(t,r){var n,o,i=r.x1,a=r.y1,c=r.x2,s=r.y2,u=r.defX,h=void 0===u?0:u,l=r.defY,f=void 0===l?0:l,p=r.markerStart,d=r.markerEnd,v=r.markerStartOffset,y=r.markerEndOffset,g=0,m=0,w=0,x=0,E=0;p&&p instanceof e.DisplayObject&&v&&(n=c-i,o=s-a,E=Math.atan2(o,n),g=Math.cos(E)*(v||0),m=Math.sin(E)*(v||0)),d&&d instanceof e.DisplayObject&&y&&(n=i-c,o=a-s,E=Math.atan2(o,n),w=Math.cos(E)*(y||0),x=Math.sin(E)*(y||0)),t.moveTo(i-h+g,a-f+m),t.lineTo(c-h+w,s-f+x)}function v(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.path,f=l.zCommandIndexes,p=[].concat(l.curve);f.forEach((function(t,e){p.splice(t+e+1,0,["Z"])}));var d,v,y=p.length&&"Z"===p[p.length-1][0],g=0,m=0,w=0,x=0,E=0;if(c&&c instanceof e.DisplayObject&&u){var b=c.parentNode.getStartTangent(),L=b[0],P=b[1];d=L[0]-P[0],v=L[1]-P[1],E=Math.atan2(v,d),g=Math.cos(E)*(u||0),m=Math.sin(E)*(u||0)}if(s&&s instanceof e.DisplayObject&&h){var O=s.parentNode.getEndTangent(),S=O[0],M=O[1];d=S[0]-M[0],v=S[1]-M[1],E=Math.atan2(v,d),w=Math.cos(E)*(h||0),x=Math.sin(E)*(h||0)}for(var k=0;p.length>k;k++){var T=p[k];switch(T[0]){case"M":t.moveTo(T[1]-o+g,T[2]-a+m);break;case"C":t.bezierCurveTo(T[1]-o,T[2]-a,T[3]-o,T[4]-a,T[5]-o+(k===p.length-(y?2:1)?w:0),T[6]-a+(k===p.length-(y?2:1)?x:0));break;case"Z":t.closePath()}}}function y(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,d=p.length,v=p[0][0]-a,y=p[0][1]-s,g=p[d-1][0]-a,m=p[d-1][1]-s,w=0,x=0,E=0,b=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[d-1][0]-p[0][0],o=p[d-1][1]-p[0][1],L=Math.atan2(o,n),E=Math.cos(L)*(f||0),b=Math.sin(L)*(f||0)),t.moveTo(v+(w||E),y+(x||b));for(var P=1;d-1>P;P++){var O=p[P];t.lineTo(O[0]-a,O[1]-s)}t.lineTo(g,m)}function g(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,d=p.length,v=p[0][0]-a,y=p[0][1]-s,g=p[d-1][0]-a,m=p[d-1][1]-s,w=0,x=0,E=0,b=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[d-2][0]-p[d-1][0],o=p[d-2][1]-p[d-1][1],L=Math.atan2(o,n),E=Math.cos(L)*(f||0),b=Math.sin(L)*(f||0)),t.moveTo(v+w,y+x);for(var P=1;d-1>P;P++){var O=p[P];t.lineTo(O[0]-a,O[1]-s)}t.lineTo(g+E,m+b)}function m(t,e){var r=e.radius,n=e.width,o=e.height,i=n,a=o;if(r&&r.some((function(t){return 0!==t}))){var c=n>0?1:-1,s=o>0?1:-1,u=c+s===0,l=r.map((function(t){return h(t,0,Math.min(Math.abs(i)/2,Math.abs(a)/2))})),f=l[0],p=l[1],d=l[2],v=l[3];t.moveTo(c*f,0),t.lineTo(i-c*p,0),0!==p&&t.arc(i-c*p,s*p,p,-s*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(i,a-s*d),0!==d&&t.arc(i-c*d,a-s*d,d,c>0?0:Math.PI,s>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,a),0!==v&&t.arc(c*v,a-s*v,v,s>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,s*f),0!==f&&t.arc(c*f,s*f,f,c>0?Math.PI:0,s>0?1.5*Math.PI:Math.PI/2,u)}else t.rect(0,0,i,a)}var w=function(t){var r,n;function o(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,l(r,n);var i=o.prototype;return i.init=function(){var t,r=((t={})[e.Shape.CIRCLE]=f,t[e.Shape.ELLIPSE]=p,t[e.Shape.RECT]=m,t[e.Shape.LINE]=d,t[e.Shape.POLYLINE]=g,t[e.Shape.POLYGON]=y,t[e.Shape.PATH]=v,t[e.Shape.TEXT]=void 0,t[e.Shape.GROUP]=void 0,t[e.Shape.IMAGE]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.pathGeneratorFactory=r},i.destroy=function(){delete this.context.pathGeneratorFactory},o}(e.AbstractRendererPlugin),x=Object.freeze({__proto__:null,Plugin:w});function E(){
3
+ r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new O(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function d(){}var v={};s(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(P([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=d.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var s=h(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=d,s(m,"constructor",d),s(d,"constructor",p),p.displayName=s(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var c={}.toString,s=function(t){return null==t},u=function(t){return e="String",c.call(t)==="[object "+e+"]";var e},h=function(t,e,r){return e>t?e:t>r?r:t};function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function p(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var o=r>n?r:n,i=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI)}}function d(t,r){var n,o,i=r.x1,a=r.y1,c=r.x2,s=r.y2,u=r.defX,h=void 0===u?0:u,l=r.defY,f=void 0===l?0:l,p=r.markerStart,d=r.markerEnd,v=r.markerStartOffset,y=r.markerEndOffset,g=0,m=0,w=0,x=0,E=0;p&&p instanceof e.DisplayObject&&v&&(n=c-i,o=s-a,E=Math.atan2(o,n),g=Math.cos(E)*(v||0),m=Math.sin(E)*(v||0)),d&&d instanceof e.DisplayObject&&y&&(n=i-c,o=a-s,E=Math.atan2(o,n),w=Math.cos(E)*(y||0),x=Math.sin(E)*(y||0)),t.moveTo(i-h+g,a-f+m),t.lineTo(c-h+w,s-f+x)}function v(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.path,f=l.zCommandIndexes,p=[].concat(l.curve);f.forEach((function(t,e){p.splice(t+e+1,0,["Z"])}));var d,v,y=p.length&&"Z"===p[p.length-1][0],g=0,m=0,w=0,x=0,E=0;if(c&&c instanceof e.DisplayObject&&u){var b=c.parentNode.getStartTangent(),L=b[0],O=b[1];d=L[0]-O[0],v=L[1]-O[1],E=Math.atan2(v,d),g=Math.cos(E)*(u||0),m=Math.sin(E)*(u||0)}if(s&&s instanceof e.DisplayObject&&h){var P=s.parentNode.getEndTangent(),S=P[0],M=P[1];d=S[0]-M[0],v=S[1]-M[1],E=Math.atan2(v,d),w=Math.cos(E)*(h||0),x=Math.sin(E)*(h||0)}for(var k=0;p.length>k;k++){var A=p[k];switch(A[0]){case"M":t.moveTo(A[1]-o+g,A[2]-a+m);break;case"C":t.bezierCurveTo(A[1]-o,A[2]-a,A[3]-o,A[4]-a,A[5]-o+(k===p.length-(y?2:1)?w:0),A[6]-a+(k===p.length-(y?2:1)?x:0));break;case"Z":t.closePath()}}}function y(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,d=p.length,v=p[0][0]-a,y=p[0][1]-s,g=p[d-1][0]-a,m=p[d-1][1]-s,w=0,x=0,E=0,b=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[d-1][0]-p[0][0],o=p[d-1][1]-p[0][1],L=Math.atan2(o,n),E=Math.cos(L)*(f||0),b=Math.sin(L)*(f||0)),t.moveTo(v+(w||E),y+(x||b));for(var O=1;d-1>O;O++){var P=p[O];t.lineTo(P[0]-a,P[1]-s)}t.lineTo(g,m)}function g(t,r){var n,o,i=r.defX,a=void 0===i?0:i,c=r.defY,s=void 0===c?0:c,u=r.markerStart,h=r.markerEnd,l=r.markerStartOffset,f=r.markerEndOffset,p=r.points.points,d=p.length,v=p[0][0]-a,y=p[0][1]-s,g=p[d-1][0]-a,m=p[d-1][1]-s,w=0,x=0,E=0,b=0,L=0;u&&u instanceof e.DisplayObject&&l&&(n=p[1][0]-p[0][0],o=p[1][1]-p[0][1],L=Math.atan2(o,n),w=Math.cos(L)*(l||0),x=Math.sin(L)*(l||0)),h&&h instanceof e.DisplayObject&&f&&(n=p[d-2][0]-p[d-1][0],o=p[d-2][1]-p[d-1][1],L=Math.atan2(o,n),E=Math.cos(L)*(f||0),b=Math.sin(L)*(f||0)),t.moveTo(v+w,y+x);for(var O=1;d-1>O;O++){var P=p[O];t.lineTo(P[0]-a,P[1]-s)}t.lineTo(g+E,m+b)}function m(t,e){var r=e.radius,n=e.width,o=e.height,i=n,a=o;if(r&&r.some((function(t){return 0!==t}))){var c=n>0?1:-1,s=o>0?1:-1,u=c+s===0,l=r.map((function(t){return h(t,0,Math.min(Math.abs(i)/2,Math.abs(a)/2))})),f=l[0],p=l[1],d=l[2],v=l[3];t.moveTo(c*f,0),t.lineTo(i-c*p,0),0!==p&&t.arc(i-c*p,s*p,p,-s*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(i,a-s*d),0!==d&&t.arc(i-c*d,a-s*d,d,c>0?0:Math.PI,s>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,a),0!==v&&t.arc(c*v,a-s*v,v,s>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,s*f),0!==f&&t.arc(c*f,s*f,f,c>0?Math.PI:0,s>0?1.5*Math.PI:Math.PI/2,u)}else t.rect(0,0,i,a)}var w=function(t){var r,n;function o(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,l(r,n);var i=o.prototype;return i.init=function(){var t,r=((t={})[e.Shape.CIRCLE]=f,t[e.Shape.ELLIPSE]=p,t[e.Shape.RECT]=m,t[e.Shape.LINE]=d,t[e.Shape.POLYLINE]=g,t[e.Shape.POLYGON]=y,t[e.Shape.PATH]=v,t[e.Shape.TEXT]=void 0,t[e.Shape.GROUP]=void 0,t[e.Shape.IMAGE]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.pathGeneratorFactory=r},i.destroy=function(){delete this.context.pathGeneratorFactory},o}(e.AbstractRendererPlugin),x=Object.freeze({__proto__:null,Plugin:w});function E(){
4
4
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
5
- E=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new P(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function b(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function O(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return P(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S="undefined"!=typeof Float32Array?Float32Array:Array;function M(){var t=new S(3);return S!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function k(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var T;T=M();!function(){var t,e=(t=new S(2),S!=Float32Array&&(t[0]=0,t[1]=0),t)}();var A,_=M(),C=M(),j=M(),N=(A=new S(16),S!=Float32Array&&(A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[11]=0,A[12]=0,A[13]=0,A[14]=0),A[0]=1,A[5]=1,A[10]=1,A[15]=1,A),I=function(){function t(){var t=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(r,n,o){var i=t.pointInPathPickerFactory[r.nodeName];if(i){var a=function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],c=e[5],s=e[6],u=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],v=e[13],y=e[14],g=e[15],m=r*c-n*a,w=r*s-o*a,x=r*u-i*a,E=n*s-o*c,b=n*u-i*c,L=o*u-i*s,P=h*v-l*d,O=h*y-f*d,S=h*g-p*d,M=l*y-f*v,k=l*g-p*v,T=f*g-p*y,A=m*T-w*k+x*M+E*S-b*O+L*P;return A?(t[0]=(c*T-s*k+u*M)*(A=1/A),t[1]=(o*k-n*T-i*M)*A,t[2]=(v*L-y*b+g*E)*A,t[3]=(f*b-l*L-p*E)*A,t[4]=(s*S-a*T-u*O)*A,t[5]=(r*T-o*S+i*O)*A,t[6]=(y*x-d*L-g*w)*A,t[7]=(h*L-f*x+p*w)*A,t[8]=(a*k-c*S+u*P)*A,t[9]=(n*S-r*k-i*P)*A,t[10]=(d*b-v*x+g*m)*A,t[11]=(l*x-h*b-p*m)*A,t[12]=(c*O-a*M-s*P)*A,t[13]=(r*M-n*O+o*P)*A,t[14]=(v*w-d*E-y*m)*A,t[15]=(h*E-l*w+f*m)*A,t):null}(N,o),c=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}(C,k(j,n[0],n[1],0),a),s=r.getGeometryBounds().halfExtents,u=r.parsedStyle.anchor;if(c[0]+=(u&&u[0]||0)*s[0]*2,c[1]+=(u&&u[1]||0)*s[1]*2,i(r,new e.Point(c[0],c[1]),t.isPointInPath))return!0}return!1},this.isPointInPath=function(r,n){var o=e.runtime.offscreenCanvas.getOrCreateContext(t.canvasConfig.offscreenCanvas),i=t.pathGeneratorFactory[r.nodeName];return i&&(o.beginPath(),i(o,r.parsedStyle),o.closePath()),o.isPointInPath(n.x,n.y)}}var r=t.prototype;return r.apply=function(e){var r,n=this,o=e.renderingService,i=e.renderingContext,a=e.pathGeneratorFactory,c=e.pointInPathPickerFactory;this.canvasConfig=e.config,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=c;var s=null===(r=i.root)||void 0===r?void 0:r.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(){var t,e=(t=E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(s,e));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){b(i,n,o,a,c,"next",t)}function c(t){b(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),o.hooks.pickSync.tap(t.tag,(function(t){return n.pick(s,t)}))},r.pick=function(t,r){for(var n,o=r.topmost,i=r.position,a=k(_,i.x,i.y,0),c=[],s=O(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(n=s()).done;){var u=n.value,h=u.getWorldTransform();if(this.isHit(u,a,h)){var l=e.findClosestClipPathTarget(u);if(l){var f=l.parsedStyle.clipPath;if(this.isHit(f,a,f.getWorldTransform())){if(o)return r.picked=[u],r;c.push(u)}}else{if(o)return r.picked=[u],r;c.push(u)}}}return r.picked=c,r},t}();function R(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function G(t,e){return.001>Math.abs(t-e)}function F(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}I.tag="CanvasPicker";var B=function(t,e,r,n,o){return{x:(1-o)*t+o*r,y:(1-o)*e+o*n}},D=function(t,e,r,n,o,i){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((o-t)*(o-t)+(i-e)*(i-e));var c=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o}(c,c),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([o-t,i-e],c))};function $(t,e,r,n,o){var i=1-o;return i*i*i*t+3*e*o*i*i+3*r*o*o*i+n*o*o*o}function H(t,e,r,n,o){var i=1-o;return 3*(i*i*(e-t)+2*i*o*(r-e)+o*o*(n-r))}function Y(t,e,r,n){var o,i,a,c=-3*t+9*e-9*r+3*n,s=6*t-12*e+6*r,u=3*e-3*t,h=[];if(G(c,0))G(s,0)||0>(o=-u/s)||o>1||h.push(o);else{var l=s*s-4*c*u;G(l,0)?h.push(-s/(2*c)):l>0&&(i=(-s-(a=Math.sqrt(l)))/(2*c),0>(o=(-s+a)/(2*c))||o>1||h.push(o),0>i||i>1||h.push(i))}return h}function W(t,e,r,n,o,i,a,c,s){var u=$(t,r,o,a,s),h=$(e,n,i,c,s),l=B(t,e,r,n,s),f=B(r,n,o,i,s),p=B(o,i,a,c,s),d=B(l.x,l.y,f.x,f.y,s),v=B(f.x,f.y,p.x,p.y,s);return[[t,e,l.x,l.y,d.x,d.y,u,h],[u,h,v.x,v.y,p.x,p.y,a,c]]}function U(t,e,r,n,o,i,a,c,s){if(0===s)return function(t,e){for(var r=0,n=t.length,o=0;n>o;o++)r+=R(t[o],e[o],t[(o+1)%n],e[(o+1)%n]);return r/2}([t,r,o,a],[e,n,i,c]);var u=W(t,e,r,n,o,i,a,c,.5),h=[].concat(u[0],[s-1]),l=[].concat(u[1],[s-1]);return U.apply(void 0,h)+U.apply(void 0,l)}var X={extrema:Y,box:function(t,e,r,n,o,i,a,c){for(var s=[t,a],u=[e,c],h=Y(t,r,o,a),l=Y(e,n,i,c),f=0;h.length>f;f++)s.push($(t,r,o,a,h[f]));for(var p=0;l.length>p;p++)u.push($(e,n,i,c,l[p]));return F(s,u)},length:function(t,e,r,n,o,i,a,c){return U(t,e,r,n,o,i,a,c,3)},nearestPoint:function(t,e,r,n,o,i,a,c,s,u,h){return function(t,e,r,n,o,i){var a=-1,c=1/0,s=[r,n],u=20;i&&i>200&&(u=i/10);for(var h=1/u,l=h/10,f=0;u>=f;f++){var p=f*h,d=[o.apply(void 0,t.concat([p])),o.apply(void 0,e.concat([p]))],v=R(s[0],s[1],d[0],d[1]);c>v&&(a=p,c=v)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}c=1/0;for(var g=0;32>g&&l>=1e-4;g++){var m=a-l,w=a+l,x=[o.apply(void 0,t.concat([m])),o.apply(void 0,e.concat([m]))],E=R(s[0],s[1],x[0],x[1]);if(m>=0&&c>E)a=m,c=E;else{var b=[o.apply(void 0,t.concat([w])),o.apply(void 0,e.concat([w]))],L=R(s[0],s[1],b[0],b[1]);1>=w&&c>L?(a=w,c=L):l*=.5}}return{x:o.apply(void 0,t.concat([a])),y:o.apply(void 0,e.concat([a]))}}([t,r,o,a],[e,n,i,c],s,u,$,h)},pointDistance:function(t,e,r,n,o,i,a,c,s,u,h){var l=this.nearestPoint(t,e,r,n,o,i,a,c,s,u,h);return R(l.x,l.y,s,u)},interpolationAt:$,pointAt:function(t,e,r,n,o,i,a,c,s){return{x:$(t,r,o,a,s),y:$(e,n,i,c,s)}},divide:function(t,e,r,n,o,i,a,c,s){return W(t,e,r,n,o,i,a,c,s)},tangentAngle:function(t,e,r,n,o,i,a,c,s){var u=H(t,r,o,a,s),h=H(e,n,i,c,s);return(Math.atan2(h,u)+2*Math.PI)%(2*Math.PI)}};function z(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function q(t,e,r,n,o,i){return!(t>o||o>t+r||e>i||i>e+n)}function Z(t,e,r,n,o,i,a,c){var s=(Math.atan2(c-e,a-t)+2*Math.PI)%(2*Math.PI);if(n>s||s>o)return!1;var u={x:t+r*Math.cos(s),y:e+r*Math.sin(s)};return z(u.x,u.y,a,c)<=i/2}function V(t,e,r,n,o,i,a){var c=Math.min(t,r),s=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n),l=o/2;return!(c-l>i||i>s+l||u-l>a||a>h+l)&&D(t,e,r,n,i,a)<=o/2}function Q(t,e,r,n,o){var i=t.length;if(2>i)return!1;for(var a=0;i-1>a;a++){if(V(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(o){var c=t[0],s=t[i-1];if(V(c[0],c[1],s[0],s[1],e,r,n))return!0}return!1}function J(t){return 1e-6>Math.abs(t)?0:0>t?-1:1}function K(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function tt(t,e,r){var n=!1,o=t.length;if(2>=o)return!1;for(var i=0;o>i;i++){var a=t[i],c=t[(i+1)%o];if(K(a,c,[e,r]))return!0;J(a[1]-r)>0!=J(c[1]-r)>0&&0>J(e-(r-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(n=!n)}return n}function et(t,e,r){for(var n=!1,o=0;t.length>o;o++){if(n=tt(t[o],e,r))break}return n}function rt(t,r){var n=t.parsedStyle,o=n.r,i=n.fill,a=n.stroke,c=n.clipPathTargets,s=n.pointerEvents,u=((n.lineWidth||0)+(n.increasedLineWidthForHitTesting||0))/2,h=z(o,o,r.x,r.y),l=!!(null==c?void 0:c.length),f=e.isFillOrStrokeAffected(s,i,a),p=f[0],d=f[1];return p&&d||l?o+u>=h:p?o>=h:!!d&&(h>=o-u&&o+u>=h)}function nt(t,e,r,n){return t/(r*r)+e/(n*n)}function ot(t,r){var n=r.x,o=r.y,i=t.parsedStyle,a=i.rx,c=i.ry,s=i.lineWidth,u=i.increasedLineWidthForHitTesting,h=i.clipPathTargets,l=!!(null==h?void 0:h.length),f=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),p=f[0],d=f[1],v=((s||0)+(u||0))/2,y=(n-a)*(n-a),g=(o-c)*(o-c);return p&&d||l?1>=nt(y,g,a+v,c+v):p?1>=nt(y,g,a,c):!!d&&(nt(y,g,a-v,c-v)>=1&&1>=nt(y,g,a+v,c+v))}function it(t,r){var n=t.parsedStyle,o=n.x1,i=n.y1,a=n.x2,c=n.y2,s=n.lineWidth,u=n.increasedLineWidthForHitTesting,h=n.defX,l=void 0===h?0:h,f=n.defY,p=void 0===f?0:f,d=n.clipPathTargets,v=!!(null==d?void 0:d.length),y=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!y[1]&&!v||!s)&&V(o,i,a,c,(s||0)+(u||0),r.x+l,r.y+p)}function at(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.defX,s=void 0===c?0:c,u=o.defY,h=void 0===u?0:u,l=o.clipPathTargets,f=o.path,p=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),d=p[0],v=p[1],y=f.segments,g=f.hasArc,m=f.polylines,w=f.polygons,x=e.getOrCalculatePathTotalLength(t),E=!!(null==l?void 0:l.length),b=!1;return d||E?b=g?n(t,r):et(w,r.x+s,r.y+h)||et(m,r.x+s,r.y+h):((v||E)&&(b=function(t,e,r,n,o){for(var i=!1,a=0;t.length>a;a++){var c=t[a],s=c.currentPoint,u=c.params,h=c.prePoint;switch(c.command){case"L":case"Z":i=V(h[0],h[1],s[0],s[1],e,r,n);break;case"C":i=e/2>=X.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],r,n,o)}if(i)break}return i}(y,(i||0)+(a||0),r.x+s,r.y+h,x)),b)}function ct(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,s=void 0===c?0:c,u=n.defY,h=void 0===u?0:u,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),p=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke),d=p[0],v=!1;return(p[1]||f)&&(v=Q(a.points,(o||0)+(i||0),r.x+s,r.y+h,!0)),v||!d&&!f||(v=tt(a.points,r.x+s,r.y+h)),v}function st(t,r){var n=t.parsedStyle,o=n.lineWidth,i=n.increasedLineWidthForHitTesting,a=n.points,c=n.defX,s=void 0===c?0:c,u=n.defY,h=void 0===u?0:u,l=n.clipPathTargets,f=!!(null==l?void 0:l.length),p=e.isFillOrStrokeAffected(n.pointerEvents,n.fill,n.stroke);return!(!p[1]&&!f||!o)&&Q(a.points,(o||0)+(i||0),r.x+s,r.y+h,!1)}function ut(t,r,n){var o=t.parsedStyle,i=o.radius,a=o.lineWidth,c=o.increasedLineWidthForHitTesting,s=o.width,u=o.height,l=o.clipPathTargets,f=!!(null==l?void 0:l.length),p=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),d=p[0],v=p[1],y=(a||0)+(c||0);if(i&&i.some((function(t){return 0!==t}))){var g=!1;return(v||f)&&(g=function(t,e,r,n,o,i,a,c){var s=o[0],u=o[1],h=o[2],l=o[3];return V(t+s,e,t+r-u,e,i,a,c)||V(t+r,e+u,t+r,e+n-h,i,a,c)||V(t+r-h,e+n,t+l,e+n,i,a,c)||V(t,e+n-l,t,e+s,i,a,c)||Z(t+r-u,e+u,u,1.5*Math.PI,2*Math.PI,i,a,c)||Z(t+r-h,e+n-h,h,0,.5*Math.PI,i,a,c)||Z(t+l,e+n-l,l,.5*Math.PI,Math.PI,i,a,c)||Z(t+s,e+s,s,Math.PI,1.5*Math.PI,i,a,c)}(0,0,s,u,i.map((function(t){return h(t,0,Math.min(Math.abs(s)/2,Math.abs(u)/2))})),y,r.x,r.y)),g||!d&&!f||(g=n(t,r)),g}var m=y/2;return d&&v||f?q(0-m,0-m,s+m,u+m,r.x,r.y):d?q(0,0,s,u,r.x,r.y):!!v&&function(t,e,r,n,o,i,a){var c=o/2;return q(t-c,e-c,r,o,i,a)||q(t+r-c,e-c,o,n,i,a)||q(t+c,e+n-c,r,o,i,a)||q(t-c,e+c,o,n,i,a)}(0,0,s,u,y,r.x,r.y)}var ht=function(t){var r,n;function o(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,L(r,n);var i=o.prototype;return i.init=function(){var t,r=function(){return!0},n=((t={})[e.Shape.CIRCLE]=rt,t[e.Shape.ELLIPSE]=ot,t[e.Shape.RECT]=ut,t[e.Shape.LINE]=it,t[e.Shape.POLYLINE]=st,t[e.Shape.POLYGON]=ct,t[e.Shape.PATH]=at,t[e.Shape.TEXT]=r,t[e.Shape.GROUP]=null,t[e.Shape.IMAGE]=r,t[e.Shape.HTML]=null,t[e.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new I)},i.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},o}(e.AbstractRendererPlugin),lt=Object.freeze({__proto__:null,Plugin:ht});function ft(){
5
+ E=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new O(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function b(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function P(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return O(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S="undefined"!=typeof Float32Array?Float32Array:Array;function M(){var t=new S(3);return S!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function k(t,e,r){var n=new S(3);return n[0]=t,n[1]=e,n[2]=r,n}function A(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function T(t,e,r){var n=e[0],o=e[1],i=e[2];return t[0]=n*r[0]+o*r[3]+i*r[6],t[1]=n*r[1]+o*r[4]+i*r[7],t[2]=n*r[2]+o*r[5]+i*r[8],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var _;_=M();!function(){var t,e=(t=new S(2),S!=Float32Array&&(t[0]=0,t[1]=0),t)}();var C,j=M(),N=M(),R=M(),I=(C=new S(16),S!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=0,C[12]=0,C[13]=0,C[14]=0),C[0]=1,C[5]=1,C[10]=1,C[15]=1,C),G=function(){function t(){var t=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(r,n,o,i){var a=t.pointInPathPickerFactory[r.nodeName];if(a){var c=function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],c=e[5],s=e[6],u=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],v=e[13],y=e[14],g=e[15],m=r*c-n*a,w=r*s-o*a,x=r*u-i*a,E=n*s-o*c,b=n*u-i*c,L=o*u-i*s,O=h*v-l*d,P=h*y-f*d,S=h*g-p*d,M=l*y-f*v,k=l*g-p*v,A=f*g-p*y,T=m*A-w*k+x*M+E*S-b*P+L*O;return T?(t[0]=(c*A-s*k+u*M)*(T=1/T),t[1]=(o*k-n*A-i*M)*T,t[2]=(v*L-y*b+g*E)*T,t[3]=(f*b-l*L-p*E)*T,t[4]=(s*S-a*A-u*P)*T,t[5]=(r*A-o*S+i*P)*T,t[6]=(y*x-d*L-g*w)*T,t[7]=(h*L-f*x+p*w)*T,t[8]=(a*k-c*S+u*O)*T,t[9]=(n*S-r*k-i*O)*T,t[10]=(d*b-v*x+g*m)*T,t[11]=(l*x-h*b-p*m)*T,t[12]=(c*P-a*M-s*O)*T,t[13]=(r*M-n*P+o*O)*T,t[14]=(v*w-d*E-y*m)*T,t[15]=(h*E-l*w+f*m)*T,t):null}(I,o),s=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}(N,A(R,n[0],n[1],0),c),u=r.getGeometryBounds().halfExtents,h=r.parsedStyle.anchor;if(s[0]+=(h&&h[0]||0)*u[0]*2,s[1]+=(h&&h[1]||0)*u[1]*2,a(r,new e.Point(s[0],s[1]),i,t.isPointInPath))return!0}return!1},this.isPointInPath=function(r,n){var o=e.runtime.offscreenCanvas.getOrCreateContext(t.canvasConfig.offscreenCanvas),i=t.pathGeneratorFactory[r.nodeName];return i&&(o.beginPath(),i(o,r.parsedStyle),o.closePath()),o.isPointInPath(n.x,n.y)}}var r=t.prototype;return r.apply=function(e){var r,n=this,o=e.renderingService,i=e.renderingContext,a=e.pathGeneratorFactory,c=e.pointInPathPickerFactory;this.canvasConfig=e.config,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=c;var s=null===(r=i.root)||void 0===r?void 0:r.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(){var t,e=(t=E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(s,e));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){b(i,n,o,a,c,"next",t)}function c(t){b(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),o.hooks.pickSync.tap(t.tag,(function(t){return n.pick(s,t)}))},r.pick=function(t,r){for(var n,o=r.topmost,i=r.position,a=A(j,i.x,i.y,0),c=[],s=P(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(n=s()).done;){var u=n.value,h=u.getWorldTransform();if(this.isHit(u,a,h,!1)){var l=e.findClosestClipPathTarget(u);if(l){var f=l.parsedStyle.clipPath;if(this.isHit(f,a,f.getWorldTransform(),!0)){if(o)return r.picked=[u],r;c.push(u)}}else{if(o)return r.picked=[u],r;c.push(u)}}}return r.picked=c,r},t}();function F(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function B(t,e){return.001>Math.abs(t-e)}function D(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}function $(t){return(t+2*Math.PI)%(2*Math.PI)}G.tag="CanvasPicker";var H=function(t,e,r,n,o){return{x:(1-o)*t+o*r,y:(1-o)*e+o*n}},Y=function(t,e,r,n,o,i){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((o-t)*(o-t)+(i-e)*(i-e));var c=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o}(c,c),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([o-t,i-e],c))};function W(t,e,r,n,o,i){var a=-1,c=1/0,s=[r,n],u=20;i&&i>200&&(u=i/10);for(var h=1/u,l=h/10,f=0;u>=f;f++){var p=f*h,d=[o.apply(void 0,t.concat([p])),o.apply(void 0,e.concat([p]))],v=F(s[0],s[1],d[0],d[1]);c>v&&(a=p,c=v)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}c=1/0;for(var g=0;32>g&&1e-4<=l;g++){var m=a-l,w=a+l,x=[o.apply(void 0,t.concat([m])),o.apply(void 0,e.concat([m]))],E=F(s[0],s[1],x[0],x[1]);if(m>=0&&c>E)a=m,c=E;else{var b=[o.apply(void 0,t.concat([w])),o.apply(void 0,e.concat([w]))],L=F(s[0],s[1],b[0],b[1]);1>=w&&c>L?(a=w,c=L):l*=.5}}return{x:o.apply(void 0,t.concat([a])),y:o.apply(void 0,e.concat([a]))}}function U(t,e,r,n){var o=1-n;return o*o*t+2*n*o*e+n*n*r}function X(t,e,r){var n=t+r-2*e;if(B(n,0))return[.5];var o=(t-e)/n;return o>1||0>o?[]:[o]}function z(t,e,r,n){return 2*(1-n)*(e-t)+2*n*(r-e)}function q(t,e,r,n,o,i,a){var c=U(t,r,o,a),s=U(e,n,i,a),u=H(t,e,r,n,a),h=H(r,n,o,i,a);return[[t,e,u.x,u.y,c,s],[c,s,h.x,h.y,o,i]]}function Z(t,e,r,n,o,i,a){if(0===a)return(F(t,e,r,n)+F(r,n,o,i)+F(t,e,o,i))/2;var c=q(t,e,r,n,o,i,.5),s=c[0],u=c[1];return s.push(a-1),u.push(a-1),Z.apply(void 0,s)+Z.apply(void 0,u)}var Q={box:function(t,e,r,n,o,i){var a=X(t,r,o)[0],c=X(e,n,i)[0],s=[t,o],u=[e,i];return void 0!==a&&s.push(U(t,r,o,a)),void 0!==c&&u.push(U(e,n,i,c)),D(s,u)},length:function(t,e,r,n,o,i){return Z(t,e,r,n,o,i,3)},nearestPoint:function(t,e,r,n,o,i,a,c){return W([t,r,o],[e,n,i],a,c,U)},pointDistance:function(t,e,r,n,o,i,a,c){var s=this.nearestPoint(t,e,r,n,o,i,a,c);return F(s.x,s.y,a,c)},interpolationAt:U,pointAt:function(t,e,r,n,o,i,a){return{x:U(t,r,o,a),y:U(e,n,i,a)}},divide:function(t,e,r,n,o,i,a){return q(t,e,r,n,o,i,a)},tangentAngle:function(t,e,r,n,o,i,a){var c=z(t,r,o,a),s=z(e,n,i,a);return $(Math.atan2(s,c))}};function V(t,e,r,n,o){var i=1-o;return i*i*i*t+3*e*o*i*i+3*r*o*o*i+n*o*o*o}function J(t,e,r,n,o){var i=1-o;return 3*(i*i*(e-t)+2*i*o*(r-e)+o*o*(n-r))}function K(t,e,r,n){var o,i,a,c=-3*t+9*e-9*r+3*n,s=6*t-12*e+6*r,u=3*e-3*t,h=[];if(B(c,0))B(s,0)||0>(o=-u/s)||o>1||h.push(o);else{var l=s*s-4*c*u;B(l,0)?h.push(-s/(2*c)):l>0&&(i=(-s-(a=Math.sqrt(l)))/(2*c),0>(o=(-s+a)/(2*c))||o>1||h.push(o),0>i||i>1||h.push(i))}return h}function tt(t,e,r,n,o,i,a,c,s){var u=V(t,r,o,a,s),h=V(e,n,i,c,s),l=H(t,e,r,n,s),f=H(r,n,o,i,s),p=H(o,i,a,c,s),d=H(l.x,l.y,f.x,f.y,s),v=H(f.x,f.y,p.x,p.y,s);return[[t,e,l.x,l.y,d.x,d.y,u,h],[u,h,v.x,v.y,p.x,p.y,a,c]]}function et(t,e,r,n,o,i,a,c,s){if(0===s)return function(t,e){for(var r=0,n=t.length,o=0;n>o;o++)r+=F(t[o],e[o],t[(o+1)%n],e[(o+1)%n]);return r/2}([t,r,o,a],[e,n,i,c]);var u=tt(t,e,r,n,o,i,a,c,.5),h=[].concat(u[0],[s-1]),l=[].concat(u[1],[s-1]);return et.apply(void 0,h)+et.apply(void 0,l)}var rt={extrema:K,box:function(t,e,r,n,o,i,a,c){for(var s=[t,a],u=[e,c],h=K(t,r,o,a),l=K(e,n,i,c),f=0;h.length>f;f++)s.push(V(t,r,o,a,h[f]));for(var p=0;l.length>p;p++)u.push(V(e,n,i,c,l[p]));return D(s,u)},length:function(t,e,r,n,o,i,a,c){return et(t,e,r,n,o,i,a,c,3)},nearestPoint:function(t,e,r,n,o,i,a,c,s,u,h){return W([t,r,o,a],[e,n,i,c],s,u,V,h)},pointDistance:function(t,e,r,n,o,i,a,c,s,u,h){var l=this.nearestPoint(t,e,r,n,o,i,a,c,s,u,h);return F(l.x,l.y,s,u)},interpolationAt:V,pointAt:function(t,e,r,n,o,i,a,c,s){return{x:V(t,r,o,a,s),y:V(e,n,i,c,s)}},divide:function(t,e,r,n,o,i,a,c,s){return tt(t,e,r,n,o,i,a,c,s)},tangentAngle:function(t,e,r,n,o,i,a,c,s){var u=J(t,r,o,a,s),h=J(e,n,i,c,s);return $(Math.atan2(h,u))}};function nt(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function ot(t,e,r,n,o,i){return!(t>o||o>t+r||e>i||i>e+n)}function it(t,e,r,n,o,i,a,c){var s=(Math.atan2(c-e,a-t)+2*Math.PI)%(2*Math.PI);if(n>s||s>o)return!1;var u={x:t+r*Math.cos(s),y:e+r*Math.sin(s)};return nt(u.x,u.y,a,c)<=i/2}function at(t,e,r,n,o,i,a){var c=Math.min(t,r),s=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n),l=o/2;return!(c-l>i||i>s+l||u-l>a||a>h+l)&&Y(t,e,r,n,i,a)<=o/2}function ct(t,e,r,n,o){var i=t.length;if(2>i)return!1;for(var a=0;i-1>a;a++){if(at(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(o){var c=t[0],s=t[i-1];if(at(c[0],c[1],s[0],s[1],e,r,n))return!0}return!1}function st(t){return 1e-6>Math.abs(t)?0:0>t?-1:1}function ut(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function ht(t,e,r){var n=!1,o=t.length;if(2>=o)return!1;for(var i=0;o>i;i++){var a=t[i],c=t[(i+1)%o];if(ut(a,c,[e,r]))return!0;st(a[1]-r)>0!=st(c[1]-r)>0&&0>st(e-(r-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(n=!n)}return n}function lt(t,e,r){for(var n=!1,o=0;t.length>o;o++){if(n=ht(t[o],e,r))break}return n}function ft(t,r,n){var o=t.parsedStyle,i=o.r,a=o.fill,c=o.stroke,s=o.pointerEvents,u=((o.lineWidth||0)+(o.increasedLineWidthForHitTesting||0))/2,h=nt(i,i,r.x,r.y),l=e.isFillOrStrokeAffected(s,a,c),f=l[0],p=l[1];return f&&p||n?i+u>=h:f?i>=h:!!p&&(h>=i-u&&i+u>=h)}function pt(t,e,r,n){return t/(r*r)+e/(n*n)}function dt(t,r,n){var o=t.parsedStyle,i=o.rx,a=o.ry,c=o.lineWidth,s=o.increasedLineWidthForHitTesting,u=r.x,h=r.y,l=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),f=l[0],p=l[1],d=((c||0)+(s||0))/2,v=(u-i)*(u-i),y=(h-a)*(h-a);return f&&p||n?1>=pt(v,y,i+d,a+d):f?1>=pt(v,y,i,a):!!p&&(pt(v,y,i-d,a-d)>=1&&1>=pt(v,y,i+d,a+d))}function vt(t,r,n){var o=t.parsedStyle,i=o.x1,a=o.y1,c=o.x2,s=o.y2,u=o.lineWidth,h=o.increasedLineWidthForHitTesting,l=o.defX,f=void 0===l?0:l,p=o.defY,d=void 0===p?0:p,v=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke);return!(!v[1]&&!n||!u)&&at(i,a,c,s,(u||0)+(h||0),r.x+f,r.y+d)}function yt(t,r,n,o){var i=t.parsedStyle,a=i.lineWidth,c=i.increasedLineWidthForHitTesting,s=i.defX,u=void 0===s?0:s,h=i.defY,l=void 0===h?0:h,f=i.path,p=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),d=p[0],v=p[1],y=f.segments,g=f.hasArc,m=f.polylines,w=f.polygons,x=e.getOrCalculatePathTotalLength(t),E=!1;return d||n?E=g?o(t,r):lt(w,r.x+u,r.y+l)||lt(m,r.x+u,r.y+l):((v||n)&&(E=function(t,r,n,o,i){for(var a=!1,c=r/2,s=0;t.length>s;s++){var u=t[s],h=u.currentPoint,l=u.params,f=u.prePoint,p=u.box;if(!p||ot(p.x-c,p.y-c,p.width+r,p.height+r,n,o)){switch(u.command){case"L":case"Z":a=at(f[0],f[1],h[0],h[1],r,n,o);break;case"Q":a=r/2>=Q.pointDistance(f[0],f[1],l[1],l[2],l[3],l[4],n,o);break;case"C":a=r/2>=rt.pointDistance(f[0],f[1],l[1],l[2],l[3],l[4],l[5],l[6],n,o,i);break;case"A":var d=u.arcParams,v=d.cx,y=d.cy,g=d.rx,m=d.ry,w=d.startAngle,x=d.endAngle,E=d.xRotation,b=k(n,o,1),L=g>m?g:m;T(b,b,e.fromRotationTranslationScale(-E,-v,-y,1/(g>m?1:g/m),1/(g>m?m/g:1))),a=it(0,0,L,w,x,r,b[0],b[1])}if(a)break}}return a}(y,(a||0)+(c||0),r.x+u,r.y+l,x)),E)}function gt(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.points,s=o.defX,u=void 0===s?0:s,h=o.defY,l=void 0===h?0:h,f=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),p=f[0],d=!1;return(f[1]||n)&&(d=ct(c.points,(i||0)+(a||0),r.x+u,r.y+l,!0)),d||!p&&!n||(d=ht(c.points,r.x+u,r.y+l)),d}function mt(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.points,s=o.defX,u=void 0===s?0:s,h=o.defY,l=void 0===h?0:h;return!(!e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke)[1]&&!n||!i)&&ct(c.points,(i||0)+(a||0),r.x+u,r.y+l,!1)}function wt(t,r,n,o){var i=t.parsedStyle,a=i.radius,c=i.lineWidth,s=i.increasedLineWidthForHitTesting,u=i.width,l=i.height,f=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),p=f[0],d=f[1],v=(c||0)+(s||0);if(a&&a.some((function(t){return 0!==t}))){var y=!1;return(d||n)&&(y=function(t,e,r,n,o,i,a,c){var s=o[0],u=o[1],h=o[2],l=o[3];return at(t+s,e,t+r-u,e,i,a,c)||at(t+r,e+u,t+r,e+n-h,i,a,c)||at(t+r-h,e+n,t+l,e+n,i,a,c)||at(t,e+n-l,t,e+s,i,a,c)||it(t+r-u,e+u,u,1.5*Math.PI,2*Math.PI,i,a,c)||it(t+r-h,e+n-h,h,0,.5*Math.PI,i,a,c)||it(t+l,e+n-l,l,.5*Math.PI,Math.PI,i,a,c)||it(t+s,e+s,s,Math.PI,1.5*Math.PI,i,a,c)}(0,0,u,l,a.map((function(t){return h(t,0,Math.min(Math.abs(u)/2,Math.abs(l)/2))})),v,r.x,r.y)),y||!p&&!n||(y=o(t,r)),y}var g=v/2;return p&&d||n?ot(0-g,0-g,u+g,l+g,r.x,r.y):p?ot(0,0,u,l,r.x,r.y):!!d&&function(t,e,r,n,o,i,a){var c=o/2;return ot(t-c,e-c,r,o,i,a)||ot(t+r-c,e-c,o,n,i,a)||ot(t+c,e+n-c,r,o,i,a)||ot(t-c,e+c,o,n,i,a)}(0,0,u,l,v,r.x,r.y)}var xt=function(t){var r,n;function o(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,L(r,n);var i=o.prototype;return i.init=function(){var t,r=function(){return!0},n=((t={})[e.Shape.CIRCLE]=ft,t[e.Shape.ELLIPSE]=dt,t[e.Shape.RECT]=wt,t[e.Shape.LINE]=vt,t[e.Shape.POLYLINE]=mt,t[e.Shape.POLYGON]=gt,t[e.Shape.PATH]=yt,t[e.Shape.TEXT]=r,t[e.Shape.GROUP]=null,t[e.Shape.IMAGE]=r,t[e.Shape.HTML]=null,t[e.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new G)},i.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},o}(e.AbstractRendererPlugin),Et=Object.freeze({__proto__:null,Plugin:xt});function bt(){
6
6
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
7
- ft=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function pt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function dt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pt(i,n,o,a,c,"next",t)}function c(t){pt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vt.apply(this,arguments)}function yt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,gt(t,e)}function gt(t,e){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},gt(t,e)}var mt="undefined"!=typeof Float32Array?Float32Array:Array;function wt(){var t=new mt(16);return mt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function xt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Et(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],v=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],E=r[2],b=r[3];return t[0]=w*n+x*c+E*l+b*v,t[1]=w*o+x*s+E*f+b*y,t[2]=w*i+x*u+E*p+b*g,t[3]=w*a+x*h+E*d+b*m,t[4]=(w=r[4])*n+(x=r[5])*c+(E=r[6])*l+(b=r[7])*v,t[5]=w*o+x*s+E*f+b*y,t[6]=w*i+x*u+E*p+b*g,t[7]=w*a+x*h+E*d+b*m,t[8]=(w=r[8])*n+(x=r[9])*c+(E=r[10])*l+(b=r[11])*v,t[9]=w*o+x*s+E*f+b*y,t[10]=w*i+x*u+E*p+b*g,t[11]=w*a+x*h+E*d+b*m,t[12]=(w=r[12])*n+(x=r[13])*c+(E=r[14])*l+(b=r[15])*v,t[13]=w*o+x*s+E*f+b*y,t[14]=w*i+x*u+E*p+b*g,t[15]=w*a+x*h+E*d+b*m,t}function bt(t,e,r){var n,o,i,a,c,s,u,h,l,f,p,d,v=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],t[0]=n=e[0],t[1]=o,t[2]=i,t[3]=a,t[4]=c,t[5]=s,t[6]=u,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=d,t[12]=n*v+c*y+l*g+e[12],t[13]=o*v+s*y+f*g+e[13],t[14]=i*v+u*y+p*g+e[14],t[15]=a*v+h*y+d*g+e[15]),t}function Lt(){var t=new mt(3);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Pt(t,e,r){var n=new mt(3);return n[0]=t,n[1]=e,n[2]=r,n}function Ot(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});!function(){var t=Lt()}();var St=function(){function t(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=wt(),this.dprMatrix=wt(),this.tmpMat4=wt(),this.vec3a=Lt(),this.vec3b=Lt(),this.vec3c=Lt(),this.vec3d=Lt(),this.canvasRendererPluginOptions=t}var r=t.prototype;return r.apply=function(r){var n=this;this.context=r;var o=r.config,i=r.camera,a=r.renderingService,c=r.renderingContext,s=r.pathGeneratorFactory;this.rBush=r.rBushRoot,this.pathGeneratorFactory=s;var u=r.contextService,h=c.root.ownerDocument.defaultView,l=function(t){var e=t.target.rBushNode;e.aabb&&n.removedRBushNodeAABBs.push(e.aabb)},f=function(t){var e=t.target.rBushNode;e.aabb&&n.removedRBushNodeAABBs.push(e.aabb)};a.hooks.init.tapPromise(t.tag,dt(ft().mark((function t(){var r,i,a,c;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h.addEventListener(e.ElementEvent.UNMOUNTED,l),h.addEventListener(e.ElementEvent.CULLED,f),r=u.getDPR(),i=o.width,a=o.height,c=u.getContext(),n.clearRect(c,0,0,i*r,a*r,o.background);case 6:case"end":return t.stop()}}),t)})))),a.hooks.destroy.tap(t.tag,(function(){h.removeEventListener(e.ElementEvent.UNMOUNTED,l),h.removeEventListener(e.ElementEvent.CULLED,f)})),a.hooks.beginFrame.tap(t.tag,(function(){var t=u.getContext(),e=u.getDPR(),r=o.width,i=o.height,c=n.canvasRendererPluginOptions,s=c.dirtyObjectNumThreshold,h=c.dirtyObjectRatioThreshold,l=a.getStats(),f=l.rendered,p=f/l.total;n.clearFullScreen=a.disableDirtyRectangleRendering()||f>s&&p>h,t&&(t.resetTransform(),n.clearFullScreen&&n.clearRect(t,0,0,r*e,i*e,o.background))}));var p=function t(e){e.isVisible()&&!e.isCulled()&&(n.renderDisplayObject(e,u,a),n.saveDirtyAABB(e)),(e.sortable.sorted||e.childNodes).forEach((function(e){t(e)}))};a.hooks.endFrame.tap(t.tag,(function(){var t=u.getContext(),r=u.getDPR();if(function(t,e){t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(n.dprMatrix,Pt(r,r,1)),Et(n.vpMatrix,n.dprMatrix,i.getOrthoMatrix()),n.clearFullScreen)p(c.root);else{var s=n.safeMergeAABB.apply(n,[n.mergeDirtyAABBs(n.renderQueue)].concat(n.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,o=t.maxX,i=t.maxY,a=new e.AABB;return a.setMinMax(Pt(r,n,0),Pt(o,i,0)),a}))));if(n.removedRBushNodeAABBs=[],e.AABB.isEmpty(s))return void(n.renderQueue=[]);var l=n.convertAABB2Rect(s),f=l.x,d=l.y,v=l.width,y=l.height,g=Ot(n.vec3a,Pt(f,d,0),n.vpMatrix),m=Ot(n.vec3b,Pt(f+v,d,0),n.vpMatrix),w=Ot(n.vec3c,Pt(f,d+y,0),n.vpMatrix),x=Ot(n.vec3d,Pt(f+v,d+y,0),n.vpMatrix),E=Math.min(g[0],m[0],x[0],w[0]),b=Math.min(g[1],m[1],x[1],w[1]),L=Math.max(g[0],m[0],x[0],w[0]),P=Math.max(g[1],m[1],x[1],w[1]),O=Math.floor(E),S=Math.floor(b),M=Math.ceil(L-E),k=Math.ceil(P-b);t.save(),n.clearRect(t,O,S,M,k,o.background),t.beginPath(),t.rect(O,S,M,k),t.clip(),t.setTransform(n.vpMatrix[0],n.vpMatrix[1],n.vpMatrix[4],n.vpMatrix[5],n.vpMatrix[12],n.vpMatrix[13]),o.renderer.getConfig().enableDirtyRectangleRenderingDebug&&h.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:O,y:S,width:M,height:k}})),n.searchDirtyObjects(s).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(t){t&&t.isVisible()&&!t.isCulled()&&n.renderDisplayObject(t,u,a)})),t.restore(),n.renderQueue.forEach((function(t){n.saveDirtyAABB(t)})),n.renderQueue=[]}n.restoreStack.forEach((function(){t.restore()})),n.restoreStack=[]})),a.hooks.render.tap(t.tag,(function(t){n.clearFullScreen||n.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,o,i){t.clearRect(e,r,n,o),i&&(t.fillStyle=i,t.fillRect(e,r,n,o))},r.renderDisplayObject=function(t,r,n){var o=r.getContext(),i=t.nodeName,a=this.restoreStack[this.restoreStack.length-1];!a||t.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINS||(o.restore(),this.restoreStack.pop());var c=this.context.styleRendererFactory[i],s=this.pathGeneratorFactory[i],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(o,u);var h=this.pathGeneratorFactory[u.nodeName];h&&(o.save(),this.restoreStack.push(t),o.beginPath(),h(o,u.parsedStyle),o.closePath(),o.clip())}c&&(this.applyWorldTransform(o,t),o.save(),this.applyAttributesToContext(o,t)),s&&(o.beginPath(),s(o,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&o.closePath()),c&&(c.render(o,t.parsedStyle,t,n),o.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),o=Math.floor(e[1]);return{x:n,y:o,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-o}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var r=t.getMin(),n=r[0],o=r[1],i=t.getMax();return this.rBush.search({minX:n,minY:o,maxX:i[0],maxY:i[1]}).map((function(t){return e.runtime.displayObjectPool.getByEntity(t.id)}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,o=r.fill,i=r.opacity,a=r.lineDash,c=r.lineDashOffset;a&&t.setLineDash(a),s(c)||(t.lineDashOffset=c),s(i)||(t.globalAlpha*=i),s(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),s(o)||Array.isArray(o)||o.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,o=0,i=(e.parsedStyle||{}).anchor,a=i&&i[0]||0,c=i&&i[1]||0;if(0!==a||0!==c){var s=e.getGeometryBounds();n=-a*(s&&2*s.halfExtents[0]||0),o=-c*(s&&2*s.halfExtents[1]||0)}r?(xt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a),Et(this.tmpMat4,r,this.tmpMat4),Et(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(xt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a),Et(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return n.forEach((function(e){t.add(e)})),t},t}();St.tag="CanvasRenderer";var Mt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,o){var i=r.fill,a=r.fillRule,c=r.opacity,u=r.fillOpacity,h=r.stroke,l=r.strokeOpacity,f=r.lineWidth,p=r.lineCap,d=r.lineJoin,v=r.shadowType,y=r.shadowColor,g=r.shadowBlur,m=r.filter,w=r.miterLimit,x=!s(i)&&!i.isNone,E=!s(h)&&!h.isNone&&f>0,b=0===i.alpha,L=!(!m||!m.length),P=!s(y)&&g>0,O=n.nodeName,S="inner"===v,M=E&&P&&(O===e.Shape.PATH||O===e.Shape.LINE||O===e.Shape.POLYLINE||b||S);x&&(t.globalAlpha=c*u,M||kt(n,t,P),this.fill(t,n,i,a,o),M||this.clearShadowAndFilter(t,L,P)),E&&(t.globalAlpha=c*l,t.lineWidth=f,s(w)||(t.miterLimit=w),s(p)||(t.lineCap=p),s(d)||(t.lineJoin=d),M&&(S&&(t.globalCompositeOperation="source-atop"),kt(n,t,!0),S&&(this.stroke(t,n,h,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,L,!0))),this.stroke(t,n,h,o))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!s(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,o,i){var a=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=a.getColor(e,r,t),t.fill(o)})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,i)),t.fill(o))},r.stroke=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=i.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,o)),t.stroke())},r.getPattern=function(t,e,r,n){return this.imagePool.getOrCreatePatternSync(t,r,(function(){e.renderable.dirty=!0,n.dirtify()}))},r.getColor=function(t,r,n){var o;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var i=r.getGeometryBounds();o=this.imagePool.getOrCreateGradient(vt({type:t.type},t.value,{width:i&&2*i.halfExtents[0]||1,height:i&&2*i.halfExtents[1]||1}),n)}return o},t}();function kt(t,e,r){var n=t.parsedStyle,o=n.filter,i=n.shadowColor,a=n.shadowBlur,c=n.shadowOffsetX,s=n.shadowOffsetY;o&&o.length&&(e.filter=t.style.filter),r&&(e.shadowColor=i.toString(),e.shadowBlur=a||0,e.shadowOffsetX=c||0,e.shadowOffsetY=s||0)}var Tt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,o=e.img,i=e.shadowColor,a=e.shadowBlur,c=e.width,h=e.height;if(u(o)?n=this.imagePool.getImageSync(o):(c||(c=o.width),h||(h=o.height),n=o),n){kt(r,t,!s(i)&&a>0);try{t.drawImage(n,0,0,c,h)}catch(t){}}},t}(),At=function(){function t(){}var e=t.prototype;return e.render=function(t,e,r){var n=e.lineWidth,o=e.textAlign,i=e.textBaseline,a=e.lineJoin,c=e.miterLimit,u=e.letterSpacing,h=e.stroke,l=e.fill,f=e.fillOpacity,p=e.strokeOpacity,d=e.opacity,v=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,w=e.shadowBlur,x=v.lines,E=v.height,b=v.lineHeight,L=v.lineMetrics;t.font=v.font,t.lineWidth=n,t.textAlign="middle"===o?"center":o,t.textBaseline=i,t.lineJoin=a,s(c)||(t.miterLimit=c);var P=0;"middle"===i?P=-E/2-b/2:"bottom"===i||"alphabetic"===i||"ideographic"===i?P=-E:"top"!==i&&"hanging"!==i||(P=-b);var O=y||0;P+=g||0,kt(r,t,!s(m)&&w>0);for(var S=0;x.length>S;S++){var M=n/2+O;P+=b,s(h)||h.isNone||!n||this.drawLetterSpacing(t,x[S],L[S],o,M,P,u,f,p,d,!0),s(l)||this.drawLetterSpacing(t,x[S],L[S],o,M,P,u,f,p,d)}},e.drawLetterSpacing=function(t,e,r,n,o,i,a,c,s,u,h){if(void 0===h&&(h=!1),0!==a){var l=t.textAlign;t.textAlign="left";var f=o;"center"===n||"middle"===n?f=o-r.width/2:"right"!==n&&"end"!==n||(f=o-r.width);for(var p=Array.from(e),d=t.measureText(e).width,v=0,y=0;p.length>y;++y){var g=p[y];h?this.strokeText(t,g,f,i,s):this.fillText(t,g,f,i,c,u),f+=d-(v=t.measureText(e.substring(y+1)).width)+a,d=v}t.textAlign=l}else h?this.strokeText(t,e,o,i,s):this.fillText(t,e,o,i,c,u)},e.fillText=function(t,e,r,n,o,i){var a,c=!s(o)&&1!==o;c&&(a=t.globalAlpha,t.globalAlpha=o*i),t.fillText(e,r,n),c&&(t.globalAlpha=a)},e.strokeText=function(t,e,r,n,o){var i,a=!s(o)&&1!==o;a&&(i=t.globalAlpha,t.globalAlpha=o),t.strokeText(e,r,n),a&&(t.globalAlpha=i)},t}(),_t=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),Ct=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),jt=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),Nt=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),It=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),Rt=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),Gt=function(t){function e(){return t.apply(this,arguments)||this}return yt(e,t),e}(Mt),Ft=function(t){function r(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}yt(r,t);var n=r.prototype;return n.init=function(){var t,r=vt({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,o=new Mt(n),i=((t={})[e.Shape.CIRCLE]=o,t[e.Shape.ELLIPSE]=o,t[e.Shape.RECT]=o,t[e.Shape.IMAGE]=new Tt(n),t[e.Shape.TEXT]=new At,t[e.Shape.LINE]=o,t[e.Shape.POLYLINE]=o,t[e.Shape.POLYGON]=o,t[e.Shape.PATH]=o,t[e.Shape.GROUP]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new St(r))},n.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},r}(e.AbstractRendererPlugin),Bt=Object.freeze({__proto__:null,CircleRenderer:Ct,EllipseRenderer:jt,ImageRenderer:Tt,LineRenderer:Nt,PathRenderer:Gt,Plugin:Ft,PolygonRenderer:Rt,PolylineRenderer:It,RectRenderer:_t,TextRenderer:At});function Dt(){
7
+ bt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Lt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Lt(i,n,o,a,c,"next",t)}function c(t){Lt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Pt(){return Pt=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pt.apply(this,arguments)}function St(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Mt(t,e)}function Mt(t,e){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mt(t,e)}var kt="undefined"!=typeof Float32Array?Float32Array:Array;function At(){var t=new kt(16);return kt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Tt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _t(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],v=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],E=r[2],b=r[3];return t[0]=w*n+x*c+E*l+b*v,t[1]=w*o+x*s+E*f+b*y,t[2]=w*i+x*u+E*p+b*g,t[3]=w*a+x*h+E*d+b*m,t[4]=(w=r[4])*n+(x=r[5])*c+(E=r[6])*l+(b=r[7])*v,t[5]=w*o+x*s+E*f+b*y,t[6]=w*i+x*u+E*p+b*g,t[7]=w*a+x*h+E*d+b*m,t[8]=(w=r[8])*n+(x=r[9])*c+(E=r[10])*l+(b=r[11])*v,t[9]=w*o+x*s+E*f+b*y,t[10]=w*i+x*u+E*p+b*g,t[11]=w*a+x*h+E*d+b*m,t[12]=(w=r[12])*n+(x=r[13])*c+(E=r[14])*l+(b=r[15])*v,t[13]=w*o+x*s+E*f+b*y,t[14]=w*i+x*u+E*p+b*g,t[15]=w*a+x*h+E*d+b*m,t}function Ct(t,e,r){var n,o,i,a,c,s,u,h,l,f,p,d,v=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],t[0]=n=e[0],t[1]=o,t[2]=i,t[3]=a,t[4]=c,t[5]=s,t[6]=u,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=d,t[12]=n*v+c*y+l*g+e[12],t[13]=o*v+s*y+f*g+e[13],t[14]=i*v+u*y+p*g+e[14],t[15]=a*v+h*y+d*g+e[15]),t}function jt(){var t=new kt(3);return kt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Nt(t,e,r){var n=new kt(3);return n[0]=t,n[1]=e,n[2]=r,n}function Rt(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});!function(){var t=jt()}();var It=function(){function t(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=At(),this.dprMatrix=At(),this.tmpMat4=At(),this.vec3a=jt(),this.vec3b=jt(),this.vec3c=jt(),this.vec3d=jt(),this.canvasRendererPluginOptions=t}var r=t.prototype;return r.apply=function(r){var n=this;this.context=r;var o=r.config,i=r.camera,a=r.renderingService,c=r.renderingContext,s=r.pathGeneratorFactory;this.rBush=r.rBushRoot,this.pathGeneratorFactory=s;var u=r.contextService,h=c.root.ownerDocument.defaultView,l=function(t){var e=t.target.rBushNode;e.aabb&&n.removedRBushNodeAABBs.push(e.aabb)},f=function(t){var e=t.target.rBushNode;e.aabb&&n.removedRBushNodeAABBs.push(e.aabb)};a.hooks.init.tapPromise(t.tag,Ot(bt().mark((function t(){var r,i,a,c;return bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h.addEventListener(e.ElementEvent.UNMOUNTED,l),h.addEventListener(e.ElementEvent.CULLED,f),r=u.getDPR(),i=o.width,a=o.height,c=u.getContext(),n.clearRect(c,0,0,i*r,a*r,o.background);case 6:case"end":return t.stop()}}),t)})))),a.hooks.destroy.tap(t.tag,(function(){h.removeEventListener(e.ElementEvent.UNMOUNTED,l),h.removeEventListener(e.ElementEvent.CULLED,f)})),a.hooks.beginFrame.tap(t.tag,(function(){var t=u.getContext(),e=u.getDPR(),r=o.width,i=o.height,c=n.canvasRendererPluginOptions,s=c.dirtyObjectNumThreshold,h=c.dirtyObjectRatioThreshold,l=a.getStats(),f=l.rendered,p=f/l.total;n.clearFullScreen=a.disableDirtyRectangleRendering()||f>s&&p>h,t&&(t.resetTransform(),n.clearFullScreen&&n.clearRect(t,0,0,r*e,i*e,o.background))}));var p=function t(e){e.isVisible()&&!e.isCulled()&&(n.renderDisplayObject(e,u,a),n.saveDirtyAABB(e)),(e.sortable.sorted||e.childNodes).forEach((function(e){t(e)}))};a.hooks.endFrame.tap(t.tag,(function(){var t=u.getContext(),r=u.getDPR();if(function(t,e){t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(n.dprMatrix,Nt(r,r,1)),_t(n.vpMatrix,n.dprMatrix,i.getOrthoMatrix()),n.clearFullScreen)p(c.root);else{var s=n.safeMergeAABB.apply(n,[n.mergeDirtyAABBs(n.renderQueue)].concat(n.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,o=t.maxX,i=t.maxY,a=new e.AABB;return a.setMinMax(Nt(r,n,0),Nt(o,i,0)),a}))));if(n.removedRBushNodeAABBs=[],e.AABB.isEmpty(s))return void(n.renderQueue=[]);var l=n.convertAABB2Rect(s),f=l.x,d=l.y,v=l.width,y=l.height,g=Rt(n.vec3a,Nt(f,d,0),n.vpMatrix),m=Rt(n.vec3b,Nt(f+v,d,0),n.vpMatrix),w=Rt(n.vec3c,Nt(f,d+y,0),n.vpMatrix),x=Rt(n.vec3d,Nt(f+v,d+y,0),n.vpMatrix),E=Math.min(g[0],m[0],x[0],w[0]),b=Math.min(g[1],m[1],x[1],w[1]),L=Math.max(g[0],m[0],x[0],w[0]),O=Math.max(g[1],m[1],x[1],w[1]),P=Math.floor(E),S=Math.floor(b),M=Math.ceil(L-E),k=Math.ceil(O-b);t.save(),n.clearRect(t,P,S,M,k,o.background),t.beginPath(),t.rect(P,S,M,k),t.clip(),t.setTransform(n.vpMatrix[0],n.vpMatrix[1],n.vpMatrix[4],n.vpMatrix[5],n.vpMatrix[12],n.vpMatrix[13]),o.renderer.getConfig().enableDirtyRectangleRenderingDebug&&h.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:P,y:S,width:M,height:k}})),n.searchDirtyObjects(s).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(t){t&&t.isVisible()&&!t.isCulled()&&n.renderDisplayObject(t,u,a)})),t.restore(),n.renderQueue.forEach((function(t){n.saveDirtyAABB(t)})),n.renderQueue=[]}n.restoreStack.forEach((function(){t.restore()})),n.restoreStack=[]})),a.hooks.render.tap(t.tag,(function(t){n.clearFullScreen||n.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,o,i){t.clearRect(e,r,n,o),i&&(t.fillStyle=i,t.fillRect(e,r,n,o))},r.renderDisplayObject=function(t,r,n){var o=r.getContext(),i=t.nodeName,a=this.restoreStack[this.restoreStack.length-1];!a||t.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINS||(o.restore(),this.restoreStack.pop());var c=this.context.styleRendererFactory[i],s=this.pathGeneratorFactory[i],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(o,u);var h=this.pathGeneratorFactory[u.nodeName];h&&(o.save(),this.restoreStack.push(t),o.beginPath(),h(o,u.parsedStyle),o.closePath(),o.clip())}c&&(this.applyWorldTransform(o,t),o.save(),this.applyAttributesToContext(o,t)),s&&(o.beginPath(),s(o,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&o.closePath()),c&&(c.render(o,t.parsedStyle,t,n),o.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),o=Math.floor(e[1]);return{x:n,y:o,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-o}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var r=t.getMin(),n=r[0],o=r[1],i=t.getMax();return this.rBush.search({minX:n,minY:o,maxX:i[0],maxY:i[1]}).map((function(t){return e.runtime.displayObjectPool.getByEntity(t.id)}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,o=r.fill,i=r.opacity,a=r.lineDash,c=r.lineDashOffset;a&&t.setLineDash(a),s(c)||(t.lineDashOffset=c),s(i)||(t.globalAlpha*=i),s(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),s(o)||Array.isArray(o)||o.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,o=0,i=(e.parsedStyle||{}).anchor,a=i&&i[0]||0,c=i&&i[1]||0;if(0!==a||0!==c){var s=e.getGeometryBounds();n=-a*(s&&2*s.halfExtents[0]||0),o=-c*(s&&2*s.halfExtents[1]||0)}r?(Tt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,Ct(this.tmpMat4,this.tmpMat4,this.vec3a),_t(this.tmpMat4,r,this.tmpMat4),_t(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Tt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,Ct(this.tmpMat4,this.tmpMat4,this.vec3a),_t(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return n.forEach((function(e){t.add(e)})),t},t}();It.tag="CanvasRenderer";var Gt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,o){var i=r.fill,a=r.fillRule,c=r.opacity,u=r.fillOpacity,h=r.stroke,l=r.strokeOpacity,f=r.lineWidth,p=r.lineCap,d=r.lineJoin,v=r.shadowType,y=r.shadowColor,g=r.shadowBlur,m=r.filter,w=r.miterLimit,x=!s(i)&&!i.isNone,E=!s(h)&&!h.isNone&&f>0,b=0===i.alpha,L=!(!m||!m.length),O=!s(y)&&g>0,P=n.nodeName,S="inner"===v,M=E&&O&&(P===e.Shape.PATH||P===e.Shape.LINE||P===e.Shape.POLYLINE||b||S);x&&(t.globalAlpha=c*u,M||Ft(n,t,O),this.fill(t,n,i,a,o),M||this.clearShadowAndFilter(t,L,O)),E&&(t.globalAlpha=c*l,t.lineWidth=f,s(w)||(t.miterLimit=w),s(p)||(t.lineCap=p),s(d)||(t.lineJoin=d),M&&(S&&(t.globalCompositeOperation="source-atop"),Ft(n,t,!0),S&&(this.stroke(t,n,h,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,L,!0))),this.stroke(t,n,h,o))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!s(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,o,i){var a=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=a.getColor(e,r,t),t.fill(o)})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,i)),t.fill(o))},r.stroke=function(t,r,n,o){var i=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=i.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,o)),t.stroke())},r.getPattern=function(t,e,r,n){return this.imagePool.getOrCreatePatternSync(t,r,(function(){e.renderable.dirty=!0,n.dirtify()}))},r.getColor=function(t,r,n){var o;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var i=r.getGeometryBounds();o=this.imagePool.getOrCreateGradient(Pt({type:t.type},t.value,{width:i&&2*i.halfExtents[0]||1,height:i&&2*i.halfExtents[1]||1}),n)}return o},t}();function Ft(t,e,r){var n=t.parsedStyle,o=n.filter,i=n.shadowColor,a=n.shadowBlur,c=n.shadowOffsetX,s=n.shadowOffsetY;o&&o.length&&(e.filter=t.style.filter),r&&(e.shadowColor=i.toString(),e.shadowBlur=a||0,e.shadowOffsetX=c||0,e.shadowOffsetY=s||0)}var Bt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,o=e.img,i=e.shadowColor,a=e.shadowBlur,c=e.width,h=e.height;if(u(o)?n=this.imagePool.getImageSync(o):(c||(c=o.width),h||(h=o.height),n=o),n){Ft(r,t,!s(i)&&a>0);try{t.drawImage(n,0,0,c,h)}catch(t){}}},t}(),Dt=function(){function t(){}var e=t.prototype;return e.render=function(t,e,r){var n=e.lineWidth,o=e.textAlign,i=e.textBaseline,a=e.lineJoin,c=e.miterLimit,u=e.letterSpacing,h=e.stroke,l=e.fill,f=e.fillOpacity,p=e.strokeOpacity,d=e.opacity,v=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,w=e.shadowBlur,x=v.lines,E=v.height,b=v.lineHeight,L=v.lineMetrics;t.font=v.font,t.lineWidth=n,t.textAlign="middle"===o?"center":o,t.textBaseline=i,t.lineJoin=a,s(c)||(t.miterLimit=c);var O=0;"middle"===i?O=-E/2-b/2:"bottom"===i||"alphabetic"===i||"ideographic"===i?O=-E:"top"!==i&&"hanging"!==i||(O=-b);var P=y||0;O+=g||0,Ft(r,t,!s(m)&&w>0);for(var S=0;x.length>S;S++){var M=n/2+P;O+=b,s(h)||h.isNone||!n||this.drawLetterSpacing(t,x[S],L[S],o,M,O,u,f,p,d,!0),s(l)||this.drawLetterSpacing(t,x[S],L[S],o,M,O,u,f,p,d)}},e.drawLetterSpacing=function(t,e,r,n,o,i,a,c,s,u,h){if(void 0===h&&(h=!1),0!==a){var l=t.textAlign;t.textAlign="left";var f=o;"center"===n||"middle"===n?f=o-r.width/2:"right"!==n&&"end"!==n||(f=o-r.width);for(var p=Array.from(e),d=t.measureText(e).width,v=0,y=0;p.length>y;++y){var g=p[y];h?this.strokeText(t,g,f,i,s):this.fillText(t,g,f,i,c,u),f+=d-(v=t.measureText(e.substring(y+1)).width)+a,d=v}t.textAlign=l}else h?this.strokeText(t,e,o,i,s):this.fillText(t,e,o,i,c,u)},e.fillText=function(t,e,r,n,o,i){var a,c=!s(o)&&1!==o;c&&(a=t.globalAlpha,t.globalAlpha=o*i),t.fillText(e,r,n),c&&(t.globalAlpha=a)},e.strokeText=function(t,e,r,n,o){var i,a=!s(o)&&1!==o;a&&(i=t.globalAlpha,t.globalAlpha=o),t.strokeText(e,r,n),a&&(t.globalAlpha=i)},t}(),$t=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),Ht=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),Yt=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),Wt=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),Ut=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),Xt=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),zt=function(t){function e(){return t.apply(this,arguments)||this}return St(e,t),e}(Gt),qt=function(t){function r(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}St(r,t);var n=r.prototype;return n.init=function(){var t,r=Pt({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,o=new Gt(n),i=((t={})[e.Shape.CIRCLE]=o,t[e.Shape.ELLIPSE]=o,t[e.Shape.RECT]=o,t[e.Shape.IMAGE]=new Bt(n),t[e.Shape.TEXT]=new Dt,t[e.Shape.LINE]=o,t[e.Shape.POLYLINE]=o,t[e.Shape.POLYGON]=o,t[e.Shape.PATH]=o,t[e.Shape.GROUP]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new It(r))},n.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},r}(e.AbstractRendererPlugin),Zt=Object.freeze({__proto__:null,CircleRenderer:Ht,EllipseRenderer:Yt,ImageRenderer:Bt,LineRenderer:Wt,PathRenderer:zt,Plugin:qt,PolygonRenderer:Xt,PolylineRenderer:Ut,RectRenderer:$t,TextRenderer:Dt});function Qt(){
8
8
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
9
- Dt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function $t(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Ht(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$t(i,n,o,a,c,"next",t)}function c(t){$t(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Yt(t,e){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yt(t,e)}var Wt=function(){function t(){this.context=void 0}return t.prototype.apply=function(e){var r=this,n=e.renderingService,o=e.renderingContext;this.context=e;var i=o.root.ownerDocument.defaultView,a=function(t){n.hooks.pointerMove.call(t)},c=function(t){n.hooks.pointerUp.call(t)},s=function(t){n.hooks.pointerDown.call(t)},u=function(t){n.hooks.pointerOver.call(t)},h=function(t){n.hooks.pointerOut.call(t)},l=function(t){n.hooks.pointerCancel.call(t)},f=function(t){n.hooks.pointerWheel.call(t)},p=function(t){globalThis.document.addEventListener("pointermove",a,!0),t.addEventListener("pointerdown",s,!0),t.addEventListener("pointerleave",h,!0),t.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",c,!0)},d=function(t){t.addEventListener("touchstart",s,!0),t.addEventListener("touchend",c,!0),t.addEventListener("touchmove",a,!0),t.addEventListener("touchcancel",l,!0)},v=function(t){globalThis.document.addEventListener("mousemove",a,!0),t.addEventListener("mousedown",s,!0),t.addEventListener("mouseout",h,!0),t.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",c,!0)};n.hooks.init.tapPromise(t.tag,Ht(Dt().mark((function t(){var e;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):i.supportsPointerEvents&&(e.style.touchAction="none"),i.supportsPointerEvents?p(e):v(e),i.supportsTouchEvents&&d(e),e.addEventListener("wheel",f,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),n.hooks.destroy.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):i.supportsPointerEvents&&(t.style.touchAction=""),i.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",a,!0),t.removeEventListener("pointerdown",s,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",c,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",a,!0),t.removeEventListener("mousedown",s,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",c,!0)}(t),i.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",s,!0),t.removeEventListener("touchend",c,!0),t.removeEventListener("touchmove",a,!0),t.removeEventListener("touchcancel",l,!0)}(t),t.removeEventListener("wheel",f,!0)}))},t}();Wt.tag="DOMInteraction";var Ut=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Yt(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new Wt)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),Xt=Object.freeze({__proto__:null,Plugin:Ut});function zt(){
9
+ Qt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function Vt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Jt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Vt(i,n,o,a,c,"next",t)}function c(t){Vt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Kt(t,e){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kt(t,e)}var te=function(){function t(){this.context=void 0}return t.prototype.apply=function(e){var r=this,n=e.renderingService,o=e.renderingContext;this.context=e;var i=o.root.ownerDocument.defaultView,a=function(t){n.hooks.pointerMove.call(t)},c=function(t){n.hooks.pointerUp.call(t)},s=function(t){n.hooks.pointerDown.call(t)},u=function(t){n.hooks.pointerOver.call(t)},h=function(t){n.hooks.pointerOut.call(t)},l=function(t){n.hooks.pointerCancel.call(t)},f=function(t){n.hooks.pointerWheel.call(t)},p=function(t){globalThis.document.addEventListener("pointermove",a,!0),t.addEventListener("pointerdown",s,!0),t.addEventListener("pointerleave",h,!0),t.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",c,!0)},d=function(t){t.addEventListener("touchstart",s,!0),t.addEventListener("touchend",c,!0),t.addEventListener("touchmove",a,!0),t.addEventListener("touchcancel",l,!0)},v=function(t){globalThis.document.addEventListener("mousemove",a,!0),t.addEventListener("mousedown",s,!0),t.addEventListener("mouseout",h,!0),t.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",c,!0)};n.hooks.init.tapPromise(t.tag,Jt(Qt().mark((function t(){var e;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):i.supportsPointerEvents&&(e.style.touchAction="none"),i.supportsPointerEvents?p(e):v(e),i.supportsTouchEvents&&d(e),e.addEventListener("wheel",f,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),n.hooks.destroy.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):i.supportsPointerEvents&&(t.style.touchAction=""),i.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",a,!0),t.removeEventListener("pointerdown",s,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",c,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",a,!0),t.removeEventListener("mousedown",s,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",c,!0)}(t),i.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",s,!0),t.removeEventListener("touchend",c,!0),t.removeEventListener("touchmove",a,!0),t.removeEventListener("touchcancel",l,!0)}(t),t.removeEventListener("wheel",f,!0)}))},t}();te.tag="DOMInteraction";var ee=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Kt(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new te)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),re=Object.freeze({__proto__:null,Plugin:ee});function ne(){
10
10
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
11
- zt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function qt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qt(i,n,o,a,c,"next",t)}function c(t){qt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Vt(t,e){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vt(t,e)}var Qt=function(){function t(){this.context=void 0,this.$camera=void 0}var r=t.prototype;return r.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},r.apply=function(r){var n=this,o=r.camera,i=r.renderingContext,a=r.renderingService;this.context=r;var c=i.root.ownerDocument.defaultView,s=function(t,e){e.style.transform=n.joinTransformMatrix(t.getWorldTransform())},u=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){var o=n.getOrCreateEl(r);n.$camera.appendChild(o);var i=r.ownerDocument.documentElement.attributes;Object.keys(i).forEach((function(t){o.style[t]=i[t]})),Object.keys(r.attributes).forEach((function(t){n.updateAttribute(t,r)})),s(r,o)}},h=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML&&n.$camera){var o=n.getOrCreateEl(r);o&&o.remove()}},l=function(t){var r=t.target;r.nodeName===e.Shape.HTML&&n.updateAttribute(t.attrName,r)},f=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){var o=n.getOrCreateEl(r);s(r,o)}},p=function(){var t=n.context.config,e=t.height;n.$camera.style.width=(t.width||0)+"px",n.$camera.style.height=(e||0)+"px"};a.hooks.init.tapPromise(t.tag,Zt(zt().mark((function t(){return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.$camera=n.createCamera(o),c.addEventListener(e.CanvasEvent.RESIZE,p),c.addEventListener(e.ElementEvent.MOUNTED,u),c.addEventListener(e.ElementEvent.UNMOUNTED,h),c.addEventListener(e.ElementEvent.ATTR_MODIFIED,l),c.addEventListener(e.ElementEvent.BOUNDS_CHANGED,f);case 6:case"end":return t.stop()}}),t)})))),a.hooks.endFrame.tap(t.tag,(function(){n.$camera&&i.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&(n.$camera.style.transform=n.joinTransformMatrix(o.getOrthoMatrix()))})),a.hooks.destroy.tap(t.tag,(function(){n.$camera&&n.$camera.remove(),c.removeEventListener(e.CanvasEvent.RESIZE,p),c.removeEventListener(e.ElementEvent.MOUNTED,u),c.removeEventListener(e.ElementEvent.UNMOUNTED,h),c.removeEventListener(e.ElementEvent.ATTR_MODIFIED,l),c.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,f)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.createCamera=function(t){var e=this.context.config,r=e.document,n=e.width,o=e.height,i=this.context.contextService.getDomElement(),a=i.parentNode;if(a){var c="g-canvas-camera",s=a.querySelector("#"+c);if(!s){var u=(r||document).createElement("div");s=u,u.id=c,u.style.position="absolute",u.style.left=(i.offsetLeft||0)+"px",u.style.top=(i.offsetTop||0)+"px",u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width=(n||0)+"px",u.style.height=(o||0)+"px",a.appendChild(u)}return s}return null},r.getOrCreateEl=function(t){var e=this.context.config.document,r=this.getId(t),n=this.$camera.querySelector("#"+r);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,n.id=r,t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform())),n},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var o=r.parsedStyle.innerHTML;u(o)?n.innerHTML=o:(n.innerHTML="",n.appendChild(o));break;case"transformOrigin":var i=r.parsedStyle.transformOrigin;n.style["transform-origin"]=i[0].value+" "+i[1].value;break;case"width":var a=r.computedStyleMap().get("width");n.style.width=a.toString();break;case"height":var c=r.computedStyleMap().get("height");n.style.height=c.toString();break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var s=r.parsedStyle.fill,h="";s instanceof e.CSSRGB?h=s.isNone?"transparent":r.getAttribute("fill"):Array.isArray(s)?h=r.getAttribute("fill"):e.isPattern(s),n.style.background=h;break;case"stroke":var l=r.parsedStyle.stroke,f="";l instanceof e.CSSRGB?f=l.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(l)?f=r.getAttribute("stroke"):e.isPattern(l),n.style["border-color"]=f,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}();Qt.tag="HTMLRendering";var Jt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Vt(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new Qt)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),Kt=Object.freeze({__proto__:null,Plugin:Jt});function te(){
11
+ ne=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function oe(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ie(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){oe(i,n,o,a,c,"next",t)}function c(t){oe(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ae(t,e){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ae(t,e)}var ce=function(){function t(){this.context=void 0,this.$camera=void 0}var r=t.prototype;return r.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},r.apply=function(r){var n=this,o=r.camera,i=r.renderingContext,a=r.renderingService,c=r.displayObjectPool;this.context=r;var s=i.root.ownerDocument.defaultView,u=function(t,e){e.style.transform=n.joinTransformMatrix(t.getWorldTransform())},h=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){n.$camera||(n.$camera=n.createCamera(o));var i=n.getOrCreateEl(r);n.$camera.appendChild(i);var a=r.ownerDocument.documentElement.attributes;Object.keys(a).forEach((function(t){i.style[t]=a[t]})),Object.keys(r.attributes).forEach((function(t){n.updateAttribute(t,r)})),u(r,i)}},l=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML&&n.$camera){var o=n.getOrCreateEl(r);o&&o.remove()}},f=function(t){var r=t.target;r.nodeName===e.Shape.HTML&&n.updateAttribute(t.attrName,r)},p=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){var o=n.getOrCreateEl(r);u(r,o)}},d=function(){if(n.$camera){var t=n.context.config,e=t.height;n.$camera.style.width=(t.width||0)+"px",n.$camera.style.height=(e||0)+"px"}};a.hooks.init.tapPromise(t.tag,ie(ne().mark((function t(){return ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.getHTMLs().length&&(n.$camera=n.createCamera(o)),s.addEventListener(e.CanvasEvent.RESIZE,d),s.addEventListener(e.ElementEvent.MOUNTED,h),s.addEventListener(e.ElementEvent.UNMOUNTED,l),s.addEventListener(e.ElementEvent.ATTR_MODIFIED,f),s.addEventListener(e.ElementEvent.BOUNDS_CHANGED,p);case 6:case"end":return t.stop()}}),t)})))),a.hooks.endFrame.tap(t.tag,(function(){n.$camera&&i.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&(n.$camera.style.transform=n.joinTransformMatrix(o.getOrthoMatrix()))})),a.hooks.destroy.tap(t.tag,(function(){n.$camera&&n.$camera.remove(),s.removeEventListener(e.CanvasEvent.RESIZE,d),s.removeEventListener(e.ElementEvent.MOUNTED,h),s.removeEventListener(e.ElementEvent.UNMOUNTED,l),s.removeEventListener(e.ElementEvent.ATTR_MODIFIED,f),s.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,p)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.createCamera=function(t){var e=this.context.config,r=e.document,n=e.width,o=e.height,i=this.context.contextService.getDomElement(),a=i.parentNode;if(a){var c="g-canvas-camera",s=a.querySelector("#"+c);if(!s){var u=(r||document).createElement("div");s=u,u.id=c,u.style.position="absolute",u.style.left=(i.offsetLeft||0)+"px",u.style.top=(i.offsetTop||0)+"px",u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width=(n||0)+"px",u.style.height=(o||0)+"px",a.appendChild(u)}return s}return null},r.getOrCreateEl=function(t){var e=this.context.config.document,r=this.getId(t),n=this.$camera.querySelector("#"+r);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,n.id=r,t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform())),n},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var o=r.parsedStyle.innerHTML;u(o)?n.innerHTML=o:(n.innerHTML="",n.appendChild(o));break;case"transformOrigin":var i=r.parsedStyle.transformOrigin;n.style["transform-origin"]=i[0].value+" "+i[1].value;break;case"width":var a=r.computedStyleMap().get("width");n.style.width=a.toString();break;case"height":var c=r.computedStyleMap().get("height");n.style.height=c.toString();break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var s=r.parsedStyle.fill,h="";s instanceof e.CSSRGB?h=s.isNone?"transparent":r.getAttribute("fill"):Array.isArray(s)?h=r.getAttribute("fill"):e.isPattern(s),n.style.background=h;break;case"stroke":var l=r.parsedStyle.stroke,f="";l instanceof e.CSSRGB?f=l.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(l)?f=r.getAttribute("stroke"):e.isPattern(l),n.style["border-color"]=f,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}();ce.tag="HTMLRendering";var se=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,ae(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new ce)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ue=Object.freeze({__proto__:null,Plugin:se});function he(){
12
12
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
13
- te=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function ee(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function re(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ee(i,n,o,a,c,"next",t)}function c(t){ee(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ne(t,e){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ne(t,e)}var oe=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(o,i){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){o(a)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=t,r.imageCache[t]=a)}))},r.getOrCreatePatternSync=function(t,e,r){var n=this.generatePatternKey(t);if(n&&this.patternCache[n])return this.patternCache[n];var o,i=t.image,a=t.repetition,c=(o=u(i)?this.getImageSync(i,r):i)&&e.createPattern(o,a);return n&&c&&(this.patternCache[n]=c),c},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),o=t.type,i=t.steps,a=t.width,c=t.height,s=t.cx,u=t.cy,h=t.size;if(this.gradientCache[n])return this.gradientCache[n];var l=null;if(o===e.GradientType.LinearGradient){var f=e.computeLinearGradient(a,c,t.angle);l=r.createLinearGradient(f.x1,f.y1,f.x2,f.y2)}else if(o===e.GradientType.RadialGradient){var p=e.computeRadialGradient(a,c,s,u,h),d=p.x,v=p.y;l=r.createRadialGradient(d,v,0,d,v,p.r)}return l&&(i.forEach((function(t){var r,n=t.offset;n.unit===e.UnitType.kPercentage&&(null===(r=l)||void 0===r||r.addColorStop(n.value/100,t.color.toString()))})),this.gradientCache[n]=l),this.gradientCache[n]},r.generateGradientKey=function(t){var e=t.width,r=t.height,n=t.steps,o=t.angle,i=t.cx,a=t.cy,c=t.size;return"gradient-"+t.type+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==i?void 0:i.toString())||0)+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==c?void 0:c.toString())||0)+"-"+e+"-"+r+"-"+n.map((function(t){return""+t.offset+t.color})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;if(u(e))return"pattern-"+e+"-"+r},t}(),ie=function(){function t(){}return t.prototype.apply=function(r){var n=r.renderingService,o=r.imagePool,i=r.renderingContext.root.ownerDocument.defaultView,a=function(t){var r=t.target;if(r.nodeName===e.Shape.IMAGE){var i=r.attributes.img;u(i)&&o.getImageSync(i,(function(){r.renderable.dirty=!0,n.dirtify()}))}},c=function(t){var r=t.target,i=t.newValue;r.nodeName===e.Shape.IMAGE&&"img"===t.attrName&&u(i)&&o.getOrCreateImage(i).then((function(){r.renderable.dirty=!0,n.dirtify()}))};n.hooks.init.tapPromise(t.tag,re(te().mark((function t(){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.addEventListener(e.ElementEvent.MOUNTED,a),i.addEventListener(e.ElementEvent.ATTR_MODIFIED,c);case 2:case"end":return t.stop()}}),t)})))),n.hooks.destroy.tap(t.tag,(function(){i.removeEventListener(e.ElementEvent.MOUNTED,a),i.removeEventListener(e.ElementEvent.ATTR_MODIFIED,c)}))},t}();ie.tag="LoadImage";var ae=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,ne(e,r);var o=n.prototype;return o.init=function(){this.context.imagePool=new oe(this.context.config),this.addRenderingPlugin(new ie)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ce=Object.freeze({__proto__:null,ImagePool:oe,Plugin:ae}),se={}.toString,ue=function(t){return e="String",se.call(t)==="[object "+e+"]";var e},he=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var n=t.prototype;return n.init=function(){var t=o(r().mark((function t(){var e,n,o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(e=this.canvasConfig).container,(o=e.canvas)?(this.$canvas=o,n&&o.parentElement!==n&&n.appendChild(o),this.$container=o.parentElement,this.canvasConfig.container=this.$container):n&&(this.$container=ue(n)?document.getElementById(n):n,this.$container&&(i=document.createElement("canvas"),this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i)),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getContext=function(){return this.context},n.getDomElement=function(){return this.$canvas},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},n.resize=function(t,r){var n=this.canvasConfig.devicePixelRatio||e.isBrowser&&window.devicePixelRatio||1;n=1>n?1:Math.ceil(n),this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r)),this.renderingContext.renderReasons.add(e.RenderReason.CAMERA_CHANGED)},n.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=o(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}(),le=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.context.ContextService=he},r.destroy=function(){delete this.context.ContextService},e}(e.AbstractRendererPlugin),fe=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new le),r.registerPlugin(new ae),r.registerPlugin(new w),r.registerPlugin(new Ft),r.registerPlugin(new Ut),r.registerPlugin(new ht),r.registerPlugin(new Jt),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=x,t.CanvasPicker=lt,t.CanvasRenderer=Bt,t.DomInteraction=Xt,t.HTMLRenderer=Kt,t.ImageLoader=ce,t.Renderer=fe,Object.defineProperty(t,"__esModule",{value:!0})}));
13
+ he=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function l(){}function f(){}function p(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,o)&&(d=y);var g=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var h=s.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=p,c(g,"constructor",p),c(p,"constructor",f),f.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function le(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function fe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){le(i,n,o,a,c,"next",t)}function c(t){le(i,n,o,a,c,"throw",t)}a(void 0)}))}}function pe(t,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pe(t,e)}var de=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(o,i){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){o(a)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=t,r.imageCache[t]=a)}))},r.getOrCreatePatternSync=function(t,e,r){var n=this.generatePatternKey(t);if(n&&this.patternCache[n])return this.patternCache[n];var o,i=t.image,a=t.repetition,c=(o=u(i)?this.getImageSync(i,r):i)&&e.createPattern(o,a);return n&&c&&(this.patternCache[n]=c),c},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),o=t.type,i=t.steps,a=t.width,c=t.height,s=t.cx,u=t.cy,h=t.size;if(this.gradientCache[n])return this.gradientCache[n];var l=null;if(o===e.GradientType.LinearGradient){var f=e.computeLinearGradient(a,c,t.angle);l=r.createLinearGradient(f.x1,f.y1,f.x2,f.y2)}else if(o===e.GradientType.RadialGradient){var p=e.computeRadialGradient(a,c,s,u,h),d=p.x,v=p.y;l=r.createRadialGradient(d,v,0,d,v,p.r)}return l&&(i.forEach((function(t){var r,n=t.offset;n.unit===e.UnitType.kPercentage&&(null===(r=l)||void 0===r||r.addColorStop(n.value/100,t.color.toString()))})),this.gradientCache[n]=l),this.gradientCache[n]},r.generateGradientKey=function(t){var e=t.width,r=t.height,n=t.steps,o=t.angle,i=t.cx,a=t.cy,c=t.size;return"gradient-"+t.type+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==i?void 0:i.toString())||0)+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==c?void 0:c.toString())||0)+"-"+e+"-"+r+"-"+n.map((function(t){return""+t.offset+t.color})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;if(u(e))return"pattern-"+e+"-"+r},t}(),ve=function(){function t(){}return t.prototype.apply=function(r){var n=r.renderingService,o=r.imagePool,i=r.renderingContext.root.ownerDocument.defaultView,a=function(t){var r=t.target;if(r.nodeName===e.Shape.IMAGE){var i=r.attributes.img;u(i)&&o.getImageSync(i,(function(){r.renderable.dirty=!0,n.dirtify()}))}},c=function(t){var r=t.target,i=t.newValue;r.nodeName===e.Shape.IMAGE&&"img"===t.attrName&&u(i)&&o.getOrCreateImage(i).then((function(){r.renderable.dirty=!0,n.dirtify()}))};n.hooks.init.tapPromise(t.tag,fe(he().mark((function t(){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.addEventListener(e.ElementEvent.MOUNTED,a),i.addEventListener(e.ElementEvent.ATTR_MODIFIED,c);case 2:case"end":return t.stop()}}),t)})))),n.hooks.destroy.tap(t.tag,(function(){i.removeEventListener(e.ElementEvent.MOUNTED,a),i.removeEventListener(e.ElementEvent.ATTR_MODIFIED,c)}))},t}();ve.tag="LoadImage";var ye=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,pe(e,r);var o=n.prototype;return o.init=function(){this.context.imagePool=new de(this.context.config),this.addRenderingPlugin(new ve)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ge=Object.freeze({__proto__:null,ImagePool:de,Plugin:ye}),me={}.toString,we=function(t){return e="String",me.call(t)==="[object "+e+"]";var e},xe=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var n=t.prototype;return n.init=function(){var t=o(r().mark((function t(){var e,n,o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(e=this.canvasConfig).container,(o=e.canvas)?(this.$canvas=o,n&&o.parentElement!==n&&n.appendChild(o),this.$container=o.parentElement,this.canvasConfig.container=this.$container):n&&(this.$container=we(n)?document.getElementById(n):n,this.$container&&(i=document.createElement("canvas"),this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i)),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getContext=function(){return this.context},n.getDomElement=function(){return this.$canvas},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},n.resize=function(t,r){var n=this.canvasConfig.devicePixelRatio||e.isBrowser&&window.devicePixelRatio||1;n=1>n?1:Math.ceil(n),this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r)),this.renderingContext.renderReasons.add(e.RenderReason.CAMERA_CHANGED)},n.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=o(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}(),Ee=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.context.ContextService=xe},r.destroy=function(){delete this.context.ContextService},e}(e.AbstractRendererPlugin),be=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new Ee),r.registerPlugin(new ye),r.registerPlugin(new w),r.registerPlugin(new qt),r.registerPlugin(new ee),r.registerPlugin(new xt),r.registerPlugin(new se),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=x,t.CanvasPicker=Et,t.CanvasRenderer=Zt,t.DomInteraction=re,t.HTMLRenderer=ue,t.ImageLoader=ge,t.Renderer=be,Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g-canvas",
3
- "version": "1.9.12",
3
+ "version": "1.9.14",
4
4
  "description": "A renderer implemented by Canvas 2D API",
5
5
  "keywords": [
6
6
  "antv",
@@ -32,12 +32,12 @@
32
32
  "sync": "tnpm sync"
33
33
  },
34
34
  "dependencies": {
35
- "@antv/g-plugin-canvas-path-generator": "^1.1.24",
36
- "@antv/g-plugin-canvas-picker": "^1.8.21",
37
- "@antv/g-plugin-canvas-renderer": "^1.7.27",
38
- "@antv/g-plugin-dom-interaction": "^1.7.24",
39
- "@antv/g-plugin-html-renderer": "^1.7.24",
40
- "@antv/g-plugin-image-loader": "^1.1.25",
35
+ "@antv/g-plugin-canvas-path-generator": "^1.1.26",
36
+ "@antv/g-plugin-canvas-picker": "^1.8.23",
37
+ "@antv/g-plugin-canvas-renderer": "^1.7.29",
38
+ "@antv/g-plugin-dom-interaction": "^1.7.26",
39
+ "@antv/g-plugin-html-renderer": "^1.7.26",
40
+ "@antv/g-plugin-image-loader": "^1.1.27",
41
41
  "@antv/util": "^3.2.4",
42
42
  "tslib": "^2.3.1"
43
43
  },
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "ef44156fad010a95006446c87126c6d0357eed5d"
54
+ "gitHead": "4373901fa61181c6f32291d976b353b9fd9aaca7"
55
55
  }