presenter 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export.js +16 -16
- package/dist/export.js.map +1 -1
- package/dist/export.mjs +1910 -1907
- package/dist/export.mjs.map +1 -1
- package/dist/extras/IFrame.d.ts +2 -2
- package/dist/objects/Circle.d.ts +3 -3
- package/dist/objects/Image.d.ts +1 -1
- package/dist/objects/Path.d.ts +2 -2
- package/dist/objects/Polygon.d.ts +3 -3
- package/dist/objects/Rectangle.d.ts +4 -4
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +351 -348
- package/dist/presenter.mjs.map +1 -1
- package/dist/utils/objects/circle/getCircleInsetFillPath.d.ts +1 -1
- package/dist/utils/objects/rectangle/getRectangleInsetFillPath.d.ts +1 -1
- package/dist/utils/objects/rectangle/getRoundedRectanglePath.d.ts +1 -1
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var jt = Object.defineProperty;
|
|
2
2
|
var zt = (n, e, t) => e in n ? jt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var k = (n, e, t) => zt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
const u0 = {
|
|
5
5
|
/** Represents an animated change in an object's properties. */
|
|
6
6
|
ANIMATE: "Animate",
|
|
@@ -162,8 +162,8 @@ function dn(n = null) {
|
|
|
162
162
|
const {
|
|
163
163
|
url: e = "https://wikipedia.org/",
|
|
164
164
|
backgroundColor: t = $.TRANSPARENT,
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
strokeColor: o = K,
|
|
166
|
+
strokeWidth: i = 0,
|
|
167
167
|
pointerEvents: a = "auto",
|
|
168
168
|
scale: s = 1,
|
|
169
169
|
anchor: r = o0,
|
|
@@ -288,10 +288,10 @@ function vn(n = null) {
|
|
|
288
288
|
return s0({
|
|
289
289
|
objectType: j.CIRCLE,
|
|
290
290
|
anchor: o0,
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
strokeColor: K,
|
|
292
|
+
strokeWidth: 0,
|
|
293
293
|
drawn: 1,
|
|
294
|
-
|
|
294
|
+
fillColor: K,
|
|
295
295
|
radius: Wt,
|
|
296
296
|
x: 0,
|
|
297
297
|
y: 0,
|
|
@@ -337,19 +337,19 @@ function wn(n) {
|
|
|
337
337
|
y: f = 0,
|
|
338
338
|
objects: x = () => null
|
|
339
339
|
} = n, l = [], u = [];
|
|
340
|
-
let
|
|
340
|
+
let A = 0, y = 0;
|
|
341
341
|
for (let P = 0; P < o; P++) {
|
|
342
342
|
const E = [];
|
|
343
|
-
|
|
343
|
+
A = 0;
|
|
344
344
|
let L = 0;
|
|
345
345
|
for (let S = 0; S < t; S++) {
|
|
346
|
-
const C = x(P, S),
|
|
346
|
+
const C = x(P, S), F = typeof r == "function" ? r(P, S) : r, z = typeof h == "function" ? h(P, S) : h;
|
|
347
347
|
E.push(C), C != null && u.push(
|
|
348
348
|
st([C], {
|
|
349
|
-
x:
|
|
349
|
+
x: A,
|
|
350
350
|
y
|
|
351
351
|
})
|
|
352
|
-
),
|
|
352
|
+
), A += F + i, L = Math.max(L, z);
|
|
353
353
|
}
|
|
354
354
|
l.push(E), y += L + a;
|
|
355
355
|
}
|
|
@@ -358,7 +358,7 @@ function wn(n) {
|
|
|
358
358
|
x: c,
|
|
359
359
|
y: f,
|
|
360
360
|
height: y - a,
|
|
361
|
-
width:
|
|
361
|
+
width: A - i,
|
|
362
362
|
anchor: e,
|
|
363
363
|
...s
|
|
364
364
|
}),
|
|
@@ -369,9 +369,9 @@ function mn(n = null) {
|
|
|
369
369
|
return s0({
|
|
370
370
|
objectType: j.IMAGE,
|
|
371
371
|
anchor: o0,
|
|
372
|
+
cornerRadius: 0,
|
|
372
373
|
height: 100,
|
|
373
374
|
imageId: "",
|
|
374
|
-
rounding: 0,
|
|
375
375
|
smooth: !0,
|
|
376
376
|
width: 100,
|
|
377
377
|
x: 0,
|
|
@@ -379,7 +379,7 @@ function mn(n = null) {
|
|
|
379
379
|
...n
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function An(n = null) {
|
|
383
383
|
return s0({
|
|
384
384
|
objectType: j.LINE,
|
|
385
385
|
color: K,
|
|
@@ -394,7 +394,7 @@ function bn(n = null) {
|
|
|
394
394
|
...n
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Mn(n, e = null) {
|
|
398
398
|
return s0({
|
|
399
399
|
objectType: j.MASK,
|
|
400
400
|
anchor: o0,
|
|
@@ -431,22 +431,22 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
432
|
}, "parseValues"), w0, Q = (w0 = class {
|
|
433
433
|
constructor(e, t, o, i) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
434
|
+
k(this, "x0");
|
|
435
|
+
k(this, "x1");
|
|
436
|
+
k(this, "y0");
|
|
437
|
+
k(this, "y1");
|
|
438
|
+
k(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
|
|
439
|
+
k(this, "getPointAtLength", _((e) => {
|
|
440
440
|
let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
441
441
|
t = Number.isNaN(t) ? 1 : t;
|
|
442
442
|
const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
|
|
443
443
|
return { x: this.x0 + o, y: this.y0 + i };
|
|
444
444
|
}, "getPointAtLength"));
|
|
445
|
-
|
|
445
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
446
446
|
const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
447
447
|
return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
|
|
448
448
|
}, "getTangentAtLength"));
|
|
449
|
-
|
|
449
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
450
450
|
const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
|
|
451
451
|
return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
|
|
452
452
|
}, "getPropertiesAtLength"));
|
|
@@ -454,23 +454,23 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
454
454
|
}
|
|
455
455
|
}, _(w0, "LinearPosition"), w0), m0, at = (m0 = class {
|
|
456
456
|
constructor(e, t, o, i, a, s, r, h, c) {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
457
|
+
k(this, "x0");
|
|
458
|
+
k(this, "y0");
|
|
459
|
+
k(this, "rx");
|
|
460
|
+
k(this, "ry");
|
|
461
|
+
k(this, "xAxisRotate");
|
|
462
|
+
k(this, "LargeArcFlag");
|
|
463
|
+
k(this, "SweepFlag");
|
|
464
|
+
k(this, "x1");
|
|
465
|
+
k(this, "y1");
|
|
466
|
+
k(this, "length");
|
|
467
|
+
k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
468
|
+
k(this, "getPointAtLength", _((e) => {
|
|
469
469
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
470
470
|
const t = ht({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
|
|
471
471
|
return { x: t.x, y: t.y };
|
|
472
472
|
}, "getPointAtLength"));
|
|
473
|
-
|
|
473
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
474
474
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
475
475
|
const t = 0.05, o = this.getPointAtLength(e);
|
|
476
476
|
let i;
|
|
@@ -478,7 +478,7 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
478
478
|
const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
|
|
479
479
|
return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
|
|
480
480
|
}, "getTangentAtLength"));
|
|
481
|
-
|
|
481
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
482
482
|
const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
@@ -497,11 +497,11 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
497
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
498
498
|
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(x.y, 2) - Math.pow(t, 2) * Math.pow(x.x, 2)) / (Math.pow(e, 2) * Math.pow(x.y, 2) + Math.pow(t, 2) * Math.pow(x.x, 2));
|
|
499
499
|
u = u < 0 ? 0 : u;
|
|
500
|
-
const
|
|
501
|
-
let S = ct(E, { x: (-x.x - y) / e, y: (-x.y -
|
|
500
|
+
const A = (i !== a ? 1 : -1) * Math.sqrt(u), y = A * (e * x.y / t), b = A * (-t * x.x / e), P = { x: Math.cos(h) * y - Math.sin(h) * b + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * b + (n.y + s.y) / 2 }, E = { x: (x.x - y) / e, y: (x.y - b) / t }, L = ct({ x: 1, y: 0 }, E);
|
|
501
|
+
let S = ct(E, { x: (-x.x - y) / e, y: (-x.y - b) / t });
|
|
502
502
|
!a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
|
|
503
|
-
const C = L + S * r,
|
|
504
|
-
return { x: Math.cos(h) *
|
|
503
|
+
const C = L + S * r, F = e * Math.cos(C), z = t * Math.sin(C);
|
|
504
|
+
return { x: Math.cos(h) * F - Math.sin(h) * z + P.x, y: Math.sin(h) * F + Math.cos(h) * z + P.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + S, ellipticalArcAngle: C, ellipticalArcCenter: P, resultantRx: e, resultantRy: t };
|
|
505
505
|
}, "pointOnEllipticalArc"), t1 = _((n, e) => {
|
|
506
506
|
n = n ?? 500;
|
|
507
507
|
let t = 0;
|
|
@@ -515,24 +515,24 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
515
515
|
}, "approximateArcLengthOfCurve"), e1 = _((n, e) => (n % e + e) % e, "mod"), n1 = _((n) => n * (Math.PI / 180), "toRadians"), lt = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), r1 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((n, e) => {
|
|
516
516
|
const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
|
|
517
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
518
|
-
}, "angleBetween"), i1 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], o1 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], s1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], a1 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), h1 = _((n, e, t) => It([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), l1 = _((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), i1 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], o1 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], s1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], a1 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), h1 = _((n, e, t) => kt([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), l1 = _((n, e, t) => {
|
|
519
519
|
let o, i;
|
|
520
520
|
const a = t / 2;
|
|
521
521
|
o = 0;
|
|
522
|
-
for (let s = 0; s < 20; s++) i = a * i1[20][s] + a, o += o1[20][s] *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * i1[20][s] + a, o += o1[20][s] * It(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"),
|
|
524
|
+
}, "getCubicArcLength"), kt = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), c1 = _((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
|
-
const f = h / (2 * r), x = t + f, l = c / r - f * f, u = x * x + l > 0 ? Math.sqrt(x * x + l) : 0,
|
|
529
|
-
return Math.sqrt(r) / 2 * (x * u - f *
|
|
528
|
+
const f = h / (2 * r), x = t + f, l = c / r - f * f, u = x * x + l > 0 ? Math.sqrt(x * x + l) : 0, A = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (x + u) / (f + A) !== 0 ? l * Math.log(Math.abs((x + u) / (f + A))) : 0;
|
|
529
|
+
return Math.sqrt(r) / 2 * (x * u - f * A + y);
|
|
530
530
|
}, "getQuadraticArcLength"), u1 = _((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
|
|
531
|
-
function
|
|
531
|
+
function It(n, e, t) {
|
|
532
532
|
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
534
534
|
}
|
|
535
|
-
_(
|
|
535
|
+
_(It, "BFunc");
|
|
536
536
|
var G0 = _((n, e, t) => {
|
|
537
537
|
const o = t.length - 1;
|
|
538
538
|
let i, a;
|
|
@@ -545,7 +545,7 @@ var G0 = _((n, e, t) => {
|
|
|
545
545
|
i = new Array(o);
|
|
546
546
|
for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
|
|
547
547
|
return G0(n - 1, e, i);
|
|
548
|
-
}, "getDerivative"),
|
|
548
|
+
}, "getDerivative"), R0 = _((n, e, t) => {
|
|
549
549
|
let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
|
|
550
550
|
for (; o > 1e-3; ) {
|
|
551
551
|
const r = t(i + a), h = Math.abs(n - r) / e;
|
|
@@ -557,69 +557,69 @@ var G0 = _((n, e, t) => {
|
|
|
557
557
|
if (s++, s > 500) break;
|
|
558
558
|
}
|
|
559
559
|
return i;
|
|
560
|
-
}, "t2length"),
|
|
560
|
+
}, "t2length"), A0, h0 = (A0 = class {
|
|
561
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
562
|
+
k(this, "a");
|
|
563
|
+
k(this, "b");
|
|
564
|
+
k(this, "c");
|
|
565
|
+
k(this, "d");
|
|
566
|
+
k(this, "length");
|
|
567
|
+
k(this, "getArcLength");
|
|
568
|
+
k(this, "getPoint");
|
|
569
|
+
k(this, "getDerivative");
|
|
570
|
+
k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
571
|
+
k(this, "getPointAtLength", _((e) => {
|
|
572
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (a) => this.getArcLength(t, o, a));
|
|
573
573
|
return this.getPoint(t, o, i);
|
|
574
574
|
}, "getPointAtLength"));
|
|
575
|
-
|
|
576
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
575
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
576
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
577
577
|
let r;
|
|
578
578
|
return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
|
|
579
579
|
}, "getTangentAtLength"));
|
|
580
|
-
|
|
581
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
580
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
581
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
582
582
|
let r;
|
|
583
583
|
r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
|
|
584
584
|
const h = this.getPoint(t, o, i);
|
|
585
585
|
return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = l1, this.getPoint = a1, this.getDerivative = h1, this.d = { x: r, y: h }) : (this.getArcLength = c1, this.getPoint =
|
|
587
|
+
k(this, "getC", _(() => this.c, "getC"));
|
|
588
|
+
k(this, "getD", _(() => this.d, "getD"));
|
|
589
|
+
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = l1, this.getPoint = a1, this.getDerivative = h1, this.d = { x: r, y: h }) : (this.getArcLength = c1, this.getPoint = kt, this.getDerivative = u1, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
|
|
590
590
|
}
|
|
591
|
-
}, _(
|
|
591
|
+
}, _(A0, "Bezier"), A0), M0, f1 = (M0 = class {
|
|
592
592
|
constructor(e) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
593
|
+
k(this, "length", 0);
|
|
594
|
+
k(this, "partial_lengths", []);
|
|
595
|
+
k(this, "functions", []);
|
|
596
|
+
k(this, "initial_point", null);
|
|
597
|
+
k(this, "getPartAtLength", _((e) => {
|
|
598
598
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
599
599
|
let t = this.partial_lengths.length - 1;
|
|
600
600
|
for (; this.partial_lengths[t] >= e && t > 0; ) t--;
|
|
601
601
|
return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
|
|
602
602
|
}, "getPartAtLength"));
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
604
|
+
k(this, "getPointAtLength", _((e) => {
|
|
605
605
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
606
606
|
if (o) return o.getPointAtLength(t.fraction);
|
|
607
607
|
if (this.initial_point) return this.initial_point;
|
|
608
608
|
throw new Error("Wrong function at this part.");
|
|
609
609
|
}, "getPointAtLength"));
|
|
610
|
-
|
|
610
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
611
611
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
612
612
|
if (o) return o.getTangentAtLength(t.fraction);
|
|
613
613
|
if (this.initial_point) return { x: 0, y: 0 };
|
|
614
614
|
throw new Error("Wrong function at this part.");
|
|
615
615
|
}, "getTangentAtLength"));
|
|
616
|
-
|
|
616
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
617
617
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
618
618
|
if (o) return o.getPropertiesAtLength(t.fraction);
|
|
619
619
|
if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
|
|
620
620
|
throw new Error("Wrong function at this part.");
|
|
621
621
|
}, "getPropertiesAtLength"));
|
|
622
|
-
|
|
622
|
+
k(this, "getParts", _(() => {
|
|
623
623
|
const e = [];
|
|
624
624
|
for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
|
|
625
625
|
this.functions[t] = this.functions[t];
|
|
@@ -695,28 +695,28 @@ var G0 = _((n, e, t) => {
|
|
|
695
695
|
this.partial_lengths.push(this.length);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
}, _(
|
|
698
|
+
}, _(M0, "SVGPathProperties"), M0), b0, W0 = (b0 = class {
|
|
699
699
|
constructor(e) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
700
|
+
k(this, "inst");
|
|
701
|
+
k(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
702
|
+
k(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
|
|
703
|
+
k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
|
+
k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
|
+
k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
|
|
706
706
|
if (this.inst = new f1(e), !(this instanceof W0)) return new W0(e);
|
|
707
707
|
}
|
|
708
|
-
}, _(
|
|
708
|
+
}, _(b0, "_svgPathProperties"), b0);
|
|
709
709
|
function g1(n = $.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function bn(n = null) {
|
|
713
713
|
const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new W0(r).getTotalLength();
|
|
714
714
|
return s0({
|
|
715
715
|
objectType: j.PATH,
|
|
716
716
|
anchor: o0,
|
|
717
|
-
|
|
717
|
+
strokeColor: K,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
|
|
719
|
+
fillColor: g1(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -733,15 +733,15 @@ function Mn(n = null) {
|
|
|
733
733
|
function Ln(n = null) {
|
|
734
734
|
return s0({
|
|
735
735
|
objectType: j.POLYGON,
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
strokeColor: K,
|
|
737
|
+
strokeWidth: 0,
|
|
738
738
|
drawn: 1,
|
|
739
739
|
points: [
|
|
740
740
|
{ x: 0, y: 0 },
|
|
741
741
|
{ x: 100, y: 0 },
|
|
742
742
|
{ x: 100, y: 100 }
|
|
743
743
|
],
|
|
744
|
-
|
|
744
|
+
fillColor: K,
|
|
745
745
|
...n
|
|
746
746
|
});
|
|
747
747
|
}
|
|
@@ -749,12 +749,12 @@ function Tn(n = null) {
|
|
|
749
749
|
return s0({
|
|
750
750
|
objectType: j.RECTANGLE,
|
|
751
751
|
anchor: o0,
|
|
752
|
-
|
|
753
|
-
|
|
752
|
+
strokeColor: K,
|
|
753
|
+
strokeWidth: 0,
|
|
754
754
|
drawn: 1,
|
|
755
|
-
|
|
755
|
+
fillColor: K,
|
|
756
756
|
height: 100,
|
|
757
|
-
|
|
757
|
+
cornerRadius: 0,
|
|
758
758
|
width: 100,
|
|
759
759
|
x: 0,
|
|
760
760
|
y: 0,
|
|
@@ -826,7 +826,7 @@ m1.writeOn = (n, e = {}) => et(
|
|
|
826
826
|
e
|
|
827
827
|
);
|
|
828
828
|
let Z = null;
|
|
829
|
-
function
|
|
829
|
+
function A1({ presentation: n, onNavigateToSlide: e }) {
|
|
830
830
|
if (Z !== null && !Z.closed) {
|
|
831
831
|
Z.focus();
|
|
832
832
|
return;
|
|
@@ -835,21 +835,21 @@ function b1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
835
835
|
console.error("Failed to open navigator window.");
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
|
-
const t =
|
|
838
|
+
const t = M1(n, e);
|
|
839
839
|
Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
|
|
840
840
|
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function M1(n, e) {
|
|
844
844
|
const t = document.createElement("div");
|
|
845
845
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
846
|
-
const a =
|
|
846
|
+
const a = b1(o, i);
|
|
847
847
|
a.style.cursor = "pointer", a.addEventListener("click", (s) => {
|
|
848
848
|
s.shiftKey && (Z == null || Z.close()), e(i);
|
|
849
849
|
}), t.appendChild(a);
|
|
850
850
|
}), t;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function b1(n, e) {
|
|
853
853
|
const t = document.createElement("div");
|
|
854
854
|
return t.style.marginBottom = "8px", t.style.padding = "8px", t.style.backgroundColor = "#eceed7", t.style.borderRadius = "4px", t.style.userSelect = "none", t.innerHTML = `${e + 1}: ` + (n.title.length > 0 ? n.title : `Slide ${e + 1}`), t;
|
|
855
855
|
}
|
|
@@ -918,16 +918,16 @@ const S1 = {
|
|
|
918
918
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
919
919
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
920
920
|
})
|
|
921
|
-
},
|
|
921
|
+
}, k1 = {
|
|
922
922
|
check: (n) => !0,
|
|
923
923
|
interpolate: (n, e) => e
|
|
924
|
-
},
|
|
924
|
+
}, I1 = {
|
|
925
925
|
check: (n) => typeof n == "number",
|
|
926
926
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
927
927
|
}, ft = [
|
|
928
|
-
|
|
928
|
+
I1,
|
|
929
929
|
S1,
|
|
930
|
-
|
|
930
|
+
k1
|
|
931
931
|
];
|
|
932
932
|
function _1(n, e, t, o = null) {
|
|
933
933
|
if (t === 0)
|
|
@@ -1025,7 +1025,7 @@ function O1({
|
|
|
1025
1025
|
}
|
|
1026
1026
|
return o;
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function F1(n) {
|
|
1029
1029
|
const e = {};
|
|
1030
1030
|
function t(o) {
|
|
1031
1031
|
if (o.objectType === j.SVG) {
|
|
@@ -1041,7 +1041,7 @@ function R1(n) {
|
|
|
1041
1041
|
t(i);
|
|
1042
1042
|
return e;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function R1(n) {
|
|
1045
1045
|
var o;
|
|
1046
1046
|
const { slides: e } = n, t = {
|
|
1047
1047
|
// First build of first slide
|
|
@@ -1081,7 +1081,7 @@ function N0(n, e, t, o) {
|
|
|
1081
1081
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1082
1082
|
}
|
|
1083
1083
|
function N1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1084
|
-
t.shortcuts =
|
|
1084
|
+
t.shortcuts = R1(n), e.addEventListener("mousemove", () => {
|
|
1085
1085
|
e.style.cursor = "auto";
|
|
1086
1086
|
}), e.addEventListener("keyup", (r) => {
|
|
1087
1087
|
if (r.code === "Escape") {
|
|
@@ -1183,18 +1183,18 @@ function z1(n) {
|
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
1185
|
function U1(n) {
|
|
1186
|
-
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, x = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x,
|
|
1187
|
-
x: S.x -
|
|
1188
|
-
y: S.y -
|
|
1186
|
+
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, x = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, A = f.y - c.y, b = Math.hypot(u, A) * e, P = Math.cos(x), E = Math.sin(x), L = h ? { x: l.x - P * b / 2, y: l.y - E * b / 2 } : c, S = h ? { x: l.x + P * b / 2, y: l.y + E * b / 2 } : { x: c.x + P * b, y: c.y + E * b }, C = r ? Math.PI / 6 : Math.PI / 4.5, F = b < s * 2 ? b / 2 : s, z = {
|
|
1187
|
+
x: S.x - F * Math.cos(x - C),
|
|
1188
|
+
y: S.y - F * Math.sin(x - C)
|
|
1189
1189
|
}, W = {
|
|
1190
|
-
x: S.x -
|
|
1191
|
-
y: S.y -
|
|
1190
|
+
x: S.x - F * Math.cos(x + C),
|
|
1191
|
+
y: S.y - F * Math.sin(x + C)
|
|
1192
1192
|
}, U = {
|
|
1193
|
-
x: L.x +
|
|
1194
|
-
y: L.y +
|
|
1193
|
+
x: L.x + F * Math.cos(x - C),
|
|
1194
|
+
y: L.y + F * Math.sin(x - C)
|
|
1195
1195
|
}, X = {
|
|
1196
|
-
x: L.x +
|
|
1197
|
-
y: L.y +
|
|
1196
|
+
x: L.x + F * Math.cos(x + C),
|
|
1197
|
+
y: L.y + F * Math.sin(x + C)
|
|
1198
1198
|
};
|
|
1199
1199
|
return {
|
|
1200
1200
|
arrowPoints: [L, S],
|
|
@@ -1318,7 +1318,7 @@ const Y1 = ({
|
|
|
1318
1318
|
}
|
|
1319
1319
|
};
|
|
1320
1320
|
function X1(n, e) {
|
|
1321
|
-
const t = n.radius - n.
|
|
1321
|
+
const t = n.radius - n.strokeWidth / 2;
|
|
1322
1322
|
if (t <= 0)
|
|
1323
1323
|
return;
|
|
1324
1324
|
const o = e(), i = -Math.PI / 2;
|
|
@@ -1330,7 +1330,7 @@ function H1(n, e) {
|
|
|
1330
1330
|
const i = 2 * Math.PI * n.radius;
|
|
1331
1331
|
return { path: t, length: i };
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function Ft(n, e) {
|
|
1334
1334
|
switch (n.type) {
|
|
1335
1335
|
case V.Browser:
|
|
1336
1336
|
e.type === f0.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
@@ -1349,22 +1349,22 @@ const $1 = ({
|
|
|
1349
1349
|
createPath2D: o
|
|
1350
1350
|
}) => {
|
|
1351
1351
|
const i = e.opacity * t;
|
|
1352
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1352
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1353
1353
|
return;
|
|
1354
1354
|
const { path: a, length: s } = H1(e, o);
|
|
1355
|
-
if (i < 1 && e.
|
|
1355
|
+
if (i < 1 && e.strokeWidth > 0) {
|
|
1356
1356
|
const r = X1(e, o);
|
|
1357
|
-
r !== void 0 && (n.context.save(),
|
|
1357
|
+
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1358
1358
|
} else
|
|
1359
|
-
v0({ ctx: n, path: a, color: e.
|
|
1359
|
+
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1360
1360
|
y0({
|
|
1361
|
-
color: e.
|
|
1361
|
+
color: e.strokeColor,
|
|
1362
1362
|
ctx: n,
|
|
1363
1363
|
drawn: e.drawn,
|
|
1364
1364
|
path: a,
|
|
1365
1365
|
pathLength: s,
|
|
1366
1366
|
opacity: i,
|
|
1367
|
-
width: e.
|
|
1367
|
+
width: e.strokeWidth
|
|
1368
1368
|
});
|
|
1369
1369
|
};
|
|
1370
1370
|
function H(n = null) {
|
|
@@ -1458,8 +1458,8 @@ const W1 = ({
|
|
|
1458
1458
|
0,
|
|
1459
1459
|
0
|
|
1460
1460
|
), n.context.translate(-f, -x);
|
|
1461
|
-
for (const
|
|
1462
|
-
t(
|
|
1461
|
+
for (const A of e.objects)
|
|
1462
|
+
t(A, o * e.opacity);
|
|
1463
1463
|
e.previewColor !== null && (n.context.fillStyle = E0(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(f, x, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1464
1464
|
}
|
|
1465
1465
|
};
|
|
@@ -1503,11 +1503,11 @@ const S0 = {
|
|
|
1503
1503
|
i0({ width: t.width, height: t.height })
|
|
1504
1504
|
), s = e[t.imageId];
|
|
1505
1505
|
if (s !== void 0) {
|
|
1506
|
-
if (n.context.save(), t.
|
|
1506
|
+
if (n.context.save(), t.cornerRadius > 0) {
|
|
1507
1507
|
const r = rt(
|
|
1508
1508
|
a.origin,
|
|
1509
1509
|
a.size,
|
|
1510
|
-
t.
|
|
1510
|
+
t.cornerRadius,
|
|
1511
1511
|
i
|
|
1512
1512
|
);
|
|
1513
1513
|
switch (n.type) {
|
|
@@ -1596,7 +1596,7 @@ const K1 = ({
|
|
|
1596
1596
|
createPath2D: o
|
|
1597
1597
|
}) => {
|
|
1598
1598
|
const i = e.opacity * t;
|
|
1599
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1599
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1600
1600
|
return;
|
|
1601
1601
|
const { origin: a } = g0(
|
|
1602
1602
|
H({ x: e.x, y: e.y }),
|
|
@@ -1606,10 +1606,10 @@ const K1 = ({
|
|
|
1606
1606
|
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), v0({
|
|
1607
1607
|
ctx: n,
|
|
1608
1608
|
path: s,
|
|
1609
|
-
color: e.
|
|
1609
|
+
color: e.fillColor,
|
|
1610
1610
|
opacity: i
|
|
1611
1611
|
}), y0({
|
|
1612
|
-
color: e.
|
|
1612
|
+
color: e.strokeColor,
|
|
1613
1613
|
ctx: n,
|
|
1614
1614
|
drawn: e.drawn,
|
|
1615
1615
|
isRounded: e.isRounded,
|
|
@@ -1647,35 +1647,35 @@ const ee = ({
|
|
|
1647
1647
|
createPath2D: o
|
|
1648
1648
|
}) => {
|
|
1649
1649
|
const i = e.opacity * t;
|
|
1650
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1650
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1651
1651
|
return;
|
|
1652
1652
|
const { path: a, length: s } = te(e, o);
|
|
1653
1653
|
v0({
|
|
1654
1654
|
ctx: n,
|
|
1655
1655
|
path: a,
|
|
1656
|
-
color: e.
|
|
1656
|
+
color: e.fillColor,
|
|
1657
1657
|
opacity: i
|
|
1658
1658
|
}), y0({
|
|
1659
|
-
color: e.
|
|
1659
|
+
color: e.strokeColor,
|
|
1660
1660
|
ctx: n,
|
|
1661
1661
|
drawn: e.drawn,
|
|
1662
1662
|
path: a,
|
|
1663
1663
|
pathLength: s,
|
|
1664
1664
|
opacity: i,
|
|
1665
|
-
width: e.
|
|
1665
|
+
width: e.strokeWidth
|
|
1666
1666
|
});
|
|
1667
1667
|
};
|
|
1668
1668
|
function ne(n, e) {
|
|
1669
|
-
const t = n.
|
|
1669
|
+
const t = n.strokeWidth / 2, { origin: o, size: i } = g0(
|
|
1670
1670
|
H({ x: n.x, y: n.y }),
|
|
1671
1671
|
n.anchor,
|
|
1672
1672
|
i0({ width: n.width, height: n.height })
|
|
1673
|
-
), a = i.width - n.
|
|
1673
|
+
), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
|
|
1674
1674
|
if (a <= 0 || s <= 0)
|
|
1675
1675
|
return;
|
|
1676
1676
|
const r = H({ x: o.x + t, y: o.y + t }), h = i0({ width: a, height: s }), c = Math.max(
|
|
1677
1677
|
0,
|
|
1678
|
-
Math.min(n.
|
|
1678
|
+
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1679
1679
|
);
|
|
1680
1680
|
if (c > 0)
|
|
1681
1681
|
return rt(r, h, c, e).path;
|
|
@@ -1687,7 +1687,10 @@ function re(n, e) {
|
|
|
1687
1687
|
H({ x: n.x, y: n.y }),
|
|
1688
1688
|
n.anchor,
|
|
1689
1689
|
i0({ width: n.width, height: n.height })
|
|
1690
|
-
), i = Math.max(
|
|
1690
|
+
), i = Math.max(
|
|
1691
|
+
0,
|
|
1692
|
+
Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
|
|
1693
|
+
), a = Math.min(n.strokeWidth * 2, o.width - i);
|
|
1691
1694
|
if (i > 0)
|
|
1692
1695
|
return rt(t, o, i, e, a);
|
|
1693
1696
|
{
|
|
@@ -1704,22 +1707,22 @@ const ie = ({
|
|
|
1704
1707
|
createPath2D: o
|
|
1705
1708
|
}) => {
|
|
1706
1709
|
const i = e.opacity * t;
|
|
1707
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1710
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1708
1711
|
return;
|
|
1709
1712
|
const { path: a, length: s } = re(e, o);
|
|
1710
|
-
if (i < 1 && e.
|
|
1713
|
+
if (i < 1 && e.strokeWidth > 0) {
|
|
1711
1714
|
const r = ne(e, o);
|
|
1712
|
-
r !== void 0 && (n.context.save(),
|
|
1715
|
+
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1713
1716
|
} else
|
|
1714
|
-
v0({ ctx: n, path: a, color: e.
|
|
1717
|
+
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1715
1718
|
y0({
|
|
1716
|
-
color: e.
|
|
1719
|
+
color: e.strokeColor,
|
|
1717
1720
|
ctx: n,
|
|
1718
1721
|
drawn: e.drawn,
|
|
1719
1722
|
path: a,
|
|
1720
1723
|
pathLength: s,
|
|
1721
1724
|
opacity: i,
|
|
1722
|
-
width: e.
|
|
1725
|
+
width: e.strokeWidth
|
|
1723
1726
|
});
|
|
1724
1727
|
}, oe = ({
|
|
1725
1728
|
ctx: n,
|
|
@@ -1793,7 +1796,7 @@ function he(n) {
|
|
|
1793
1796
|
height: n.fontBoundingBoxAscent
|
|
1794
1797
|
};
|
|
1795
1798
|
}
|
|
1796
|
-
function
|
|
1799
|
+
function Rt(n, e, t = 1) {
|
|
1797
1800
|
n.context.fillStyle = nt(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
|
|
1798
1801
|
}
|
|
1799
1802
|
function le(n, e, t) {
|
|
@@ -1802,7 +1805,7 @@ function le(n, e, t) {
|
|
|
1802
1805
|
const a = [];
|
|
1803
1806
|
for (const s of i) {
|
|
1804
1807
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1805
|
-
|
|
1808
|
+
Rt(t, c);
|
|
1806
1809
|
const f = t.context.measureText(r);
|
|
1807
1810
|
a.push(he(f));
|
|
1808
1811
|
}
|
|
@@ -1816,13 +1819,13 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1816
1819
|
return;
|
|
1817
1820
|
const { length: i } = e, a = _t(e.text), s = se(e), r = le(a, s, n), h = ae(r, e.lineSpacing), c = g0(H({ x: e.x, y: e.y }), e.anchor, h);
|
|
1818
1821
|
let f = c.origin.x, x = c.origin.y, l = 0, u = 0;
|
|
1819
|
-
for (let
|
|
1820
|
-
const y = a[
|
|
1821
|
-
if (y == null ||
|
|
1822
|
+
for (let A = 0; A < a.length; A++) {
|
|
1823
|
+
const y = a[A], b = r[A];
|
|
1824
|
+
if (y == null || b == null) {
|
|
1822
1825
|
console.error("Could not determine text units or sizes for line");
|
|
1823
1826
|
continue;
|
|
1824
1827
|
}
|
|
1825
|
-
const P =
|
|
1828
|
+
const P = b.reduce((L, S) => L + S.width, 0), E = b.length === 0 ? u : b.reduce((L, S) => Math.max(L, S.height), 0);
|
|
1826
1829
|
switch (e.alignment) {
|
|
1827
1830
|
case x0.LEFT:
|
|
1828
1831
|
f = c.origin.x;
|
|
@@ -1839,21 +1842,21 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1839
1842
|
}
|
|
1840
1843
|
x += E + u * (e.lineSpacing - 1), u = E;
|
|
1841
1844
|
for (let L = 0; L < y.length && !(i !== null && l >= i); L++) {
|
|
1842
|
-
const S = y[L], C =
|
|
1845
|
+
const S = y[L], C = b[L];
|
|
1843
1846
|
if (S == null || C == null) {
|
|
1844
1847
|
console.error("Could not determine text unit or size for unit");
|
|
1845
1848
|
continue;
|
|
1846
1849
|
}
|
|
1847
|
-
const { text:
|
|
1850
|
+
const { text: F, ...z } = S;
|
|
1848
1851
|
let W;
|
|
1849
|
-
if (i !== null && l +
|
|
1852
|
+
if (i !== null && l + F.length > i) {
|
|
1850
1853
|
const a0 = i - l;
|
|
1851
|
-
W =
|
|
1854
|
+
W = F.slice(0, a0);
|
|
1852
1855
|
}
|
|
1853
|
-
const U = W ??
|
|
1856
|
+
const U = W ?? F;
|
|
1854
1857
|
l += U.length;
|
|
1855
1858
|
const X = { ...s, ...z };
|
|
1856
|
-
|
|
1859
|
+
Rt(n, X, o), n.context.fillText(U, f, x), f += C.width;
|
|
1857
1860
|
}
|
|
1858
1861
|
}
|
|
1859
1862
|
}, ue = {
|
|
@@ -1941,7 +1944,7 @@ class Cn {
|
|
|
1941
1944
|
...pt,
|
|
1942
1945
|
imageById: await pe({
|
|
1943
1946
|
...e.resources.images,
|
|
1944
|
-
...
|
|
1947
|
+
...F1(e)
|
|
1945
1948
|
}),
|
|
1946
1949
|
canvas: i,
|
|
1947
1950
|
extrasContainer: a
|
|
@@ -1956,7 +1959,7 @@ class Cn {
|
|
|
1956
1959
|
buildIndex: this.state.buildIndex
|
|
1957
1960
|
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1958
1961
|
},
|
|
1959
|
-
onShowNavigator: () =>
|
|
1962
|
+
onShowNavigator: () => A1({
|
|
1960
1963
|
presentation: e,
|
|
1961
1964
|
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1962
1965
|
})
|
|
@@ -1971,11 +1974,11 @@ class Cn {
|
|
|
1971
1974
|
if (f === void 0 || r === null)
|
|
1972
1975
|
return;
|
|
1973
1976
|
if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
|
|
1974
|
-
for (const
|
|
1975
|
-
|
|
1977
|
+
for (const b of this.state.mountedExtrasCleanups)
|
|
1978
|
+
b();
|
|
1976
1979
|
this.state.mountedExtrasCleanups = [];
|
|
1977
|
-
for (const
|
|
1978
|
-
const P = ge(this.state.extrasContainer,
|
|
1980
|
+
for (const b of f.extras) {
|
|
1981
|
+
const P = ge(this.state.extrasContainer, b);
|
|
1979
1982
|
P !== null && this.state.mountedExtrasCleanups.push(P);
|
|
1980
1983
|
}
|
|
1981
1984
|
}
|
|
@@ -1993,14 +1996,14 @@ class Cn {
|
|
|
1993
1996
|
buildTime: o
|
|
1994
1997
|
});
|
|
1995
1998
|
l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
|
|
1996
|
-
function b
|
|
1997
|
-
const E = i[
|
|
1999
|
+
function A(b, P) {
|
|
2000
|
+
const E = i[b.objectType], L = u.get(b);
|
|
1998
2001
|
E === void 0 || L === void 0 || E({
|
|
1999
2002
|
ctx: l,
|
|
2000
2003
|
imageById: h,
|
|
2001
2004
|
object: L,
|
|
2002
2005
|
opacity: P,
|
|
2003
|
-
renderObject:
|
|
2006
|
+
renderObject: A,
|
|
2004
2007
|
createPath2D: z1
|
|
2005
2008
|
});
|
|
2006
2009
|
}
|
|
@@ -2009,8 +2012,8 @@ class Cn {
|
|
|
2009
2012
|
r.width * (1 - s) / 2,
|
|
2010
2013
|
r.height * (1 - s) / 2
|
|
2011
2014
|
), l.context.scale(s, s));
|
|
2012
|
-
for (const
|
|
2013
|
-
b
|
|
2015
|
+
for (const b of f.objects)
|
|
2016
|
+
A(b, 1);
|
|
2014
2017
|
y && l.context.restore();
|
|
2015
2018
|
}
|
|
2016
2019
|
next(e = !1) {
|
|
@@ -2065,13 +2068,13 @@ function Sn(n = null) {
|
|
|
2065
2068
|
...n
|
|
2066
2069
|
};
|
|
2067
2070
|
}
|
|
2068
|
-
function
|
|
2071
|
+
function kn(n, e = {}) {
|
|
2069
2072
|
return {
|
|
2070
2073
|
...e,
|
|
2071
2074
|
text: n
|
|
2072
2075
|
};
|
|
2073
2076
|
}
|
|
2074
|
-
function
|
|
2077
|
+
function In(n = $.BLACK) {
|
|
2075
2078
|
return { ...n, alpha: 1 };
|
|
2076
2079
|
}
|
|
2077
2080
|
function xe(n) {
|
|
@@ -2152,69 +2155,69 @@ function we() {
|
|
|
2152
2155
|
u.index++;
|
|
2153
2156
|
}
|
|
2154
2157
|
function c(u) {
|
|
2155
|
-
var
|
|
2156
|
-
if (
|
|
2158
|
+
var A = u.path.charCodeAt(u.index);
|
|
2159
|
+
if (A === 48) {
|
|
2157
2160
|
u.param = 0, u.index++;
|
|
2158
2161
|
return;
|
|
2159
2162
|
}
|
|
2160
|
-
if (
|
|
2163
|
+
if (A === 49) {
|
|
2161
2164
|
u.param = 1, u.index++;
|
|
2162
2165
|
return;
|
|
2163
2166
|
}
|
|
2164
2167
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2165
2168
|
}
|
|
2166
2169
|
function f(u) {
|
|
2167
|
-
var
|
|
2168
|
-
if (y >=
|
|
2170
|
+
var A = u.index, y = A, b = u.max, P = !1, E = !1, L = !1, S = !1, C;
|
|
2171
|
+
if (y >= b) {
|
|
2169
2172
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2170
2173
|
return;
|
|
2171
2174
|
}
|
|
2172
|
-
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y <
|
|
2175
|
+
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < b ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
|
|
2173
2176
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2174
2177
|
return;
|
|
2175
2178
|
}
|
|
2176
2179
|
if (C !== 46) {
|
|
2177
|
-
if (P = C === 48, y++, C = y <
|
|
2178
|
-
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " +
|
|
2180
|
+
if (P = C === 48, y++, C = y < b ? u.path.charCodeAt(y) : 0, P && y < b && C && a(C)) {
|
|
2181
|
+
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + A + ")";
|
|
2179
2182
|
return;
|
|
2180
2183
|
}
|
|
2181
|
-
for (; y <
|
|
2184
|
+
for (; y < b && a(u.path.charCodeAt(y)); )
|
|
2182
2185
|
y++, E = !0;
|
|
2183
|
-
C = y <
|
|
2186
|
+
C = y < b ? u.path.charCodeAt(y) : 0;
|
|
2184
2187
|
}
|
|
2185
2188
|
if (C === 46) {
|
|
2186
2189
|
for (S = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2187
2190
|
y++, L = !0;
|
|
2188
|
-
C = y <
|
|
2191
|
+
C = y < b ? u.path.charCodeAt(y) : 0;
|
|
2189
2192
|
}
|
|
2190
2193
|
if (C === 101 || C === 69) {
|
|
2191
2194
|
if (S && !E && !L) {
|
|
2192
2195
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2193
2196
|
return;
|
|
2194
2197
|
}
|
|
2195
|
-
if (y++, C = y <
|
|
2196
|
-
for (; y <
|
|
2198
|
+
if (y++, C = y < b ? u.path.charCodeAt(y) : 0, (C === 43 || C === 45) && y++, y < b && a(u.path.charCodeAt(y)))
|
|
2199
|
+
for (; y < b && a(u.path.charCodeAt(y)); )
|
|
2197
2200
|
y++;
|
|
2198
2201
|
else {
|
|
2199
2202
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2200
2203
|
return;
|
|
2201
2204
|
}
|
|
2202
2205
|
}
|
|
2203
|
-
u.index = y, u.param = parseFloat(u.path.slice(
|
|
2206
|
+
u.index = y, u.param = parseFloat(u.path.slice(A, y)) + 0;
|
|
2204
2207
|
}
|
|
2205
2208
|
function x(u) {
|
|
2206
|
-
var
|
|
2207
|
-
|
|
2208
|
-
var
|
|
2209
|
-
if (y === "m" &&
|
|
2210
|
-
u.result.push([
|
|
2209
|
+
var A, y;
|
|
2210
|
+
A = u.path[u.segmentStart], y = A.toLowerCase();
|
|
2211
|
+
var b = u.data;
|
|
2212
|
+
if (y === "m" && b.length > 2 && (u.result.push([A, b[0], b[1]]), b = b.slice(2), y = "l", A = A === "m" ? "l" : "L"), y === "r")
|
|
2213
|
+
u.result.push([A].concat(b));
|
|
2211
2214
|
else
|
|
2212
|
-
for (;
|
|
2215
|
+
for (; b.length >= n[y] && (u.result.push([A].concat(b.splice(0, n[y]))), !!n[y]); )
|
|
2213
2216
|
;
|
|
2214
2217
|
}
|
|
2215
2218
|
function l(u) {
|
|
2216
|
-
var
|
|
2217
|
-
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index),
|
|
2219
|
+
var A = u.max, y, b, P, E, L;
|
|
2220
|
+
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), b = i(y), !o(y)) {
|
|
2218
2221
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2219
2222
|
return;
|
|
2220
2223
|
}
|
|
@@ -2224,20 +2227,20 @@ function we() {
|
|
|
2224
2227
|
}
|
|
2225
2228
|
for (P = !1; ; ) {
|
|
2226
2229
|
for (L = E; L > 0; L--) {
|
|
2227
|
-
if (
|
|
2230
|
+
if (b && (L === 3 || L === 4) ? c(u) : f(u), u.err.length) {
|
|
2228
2231
|
x(u);
|
|
2229
2232
|
return;
|
|
2230
2233
|
}
|
|
2231
|
-
u.data.push(u.param), h(u), P = !1, u.index <
|
|
2234
|
+
u.data.push(u.param), h(u), P = !1, u.index < A && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), P = !0);
|
|
2232
2235
|
}
|
|
2233
2236
|
if (!P && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2234
2237
|
break;
|
|
2235
2238
|
}
|
|
2236
2239
|
x(u);
|
|
2237
2240
|
}
|
|
2238
|
-
return B0 = function(
|
|
2239
|
-
var y = new r(
|
|
2240
|
-
for (h(y); y.index <
|
|
2241
|
+
return B0 = function(A) {
|
|
2242
|
+
var y = new r(A), b = y.max;
|
|
2243
|
+
for (h(y); y.index < b && !y.err.length; )
|
|
2241
2244
|
l(y);
|
|
2242
2245
|
return y.result.length && ("mM".indexOf(y.result[0][0]) < 0 ? (y.err = "SvgPath: string should start with `M` or `m`", y.result = []) : y.result[0][0] = "M"), {
|
|
2243
2246
|
err: y.err,
|
|
@@ -2342,7 +2345,7 @@ function me() {
|
|
|
2342
2345
|
}, j0;
|
|
2343
2346
|
}
|
|
2344
2347
|
var z0, vt;
|
|
2345
|
-
function
|
|
2348
|
+
function Ae() {
|
|
2346
2349
|
if (vt) return z0;
|
|
2347
2350
|
vt = 1;
|
|
2348
2351
|
var n = Math.PI * 2;
|
|
@@ -2351,9 +2354,9 @@ function be() {
|
|
|
2351
2354
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2352
2355
|
}
|
|
2353
2356
|
function t(i, a, s, r, h, c, f, x, l, u) {
|
|
2354
|
-
var
|
|
2355
|
-
S < 0 && (S = 0), S /=
|
|
2356
|
-
var C = S * f / x * y,
|
|
2357
|
+
var A = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, b = f * f, P = x * x, E = A * A, L = y * y, S = b * P - b * L - P * E;
|
|
2358
|
+
S < 0 && (S = 0), S /= b * L + P * E, S = Math.sqrt(S) * (h === c ? -1 : 1);
|
|
2359
|
+
var C = S * f / x * y, F = S * -x / f * A, z = u * C - l * F + (i + s) / 2, W = l * C + u * F + (a + r) / 2, U = (A - C) / f, X = (y - F) / x, a0 = (-A - C) / f, p0 = (-y - F) / x, c0 = e(1, 0, U, X), J = e(U, X, a0, p0);
|
|
2357
2360
|
return c === 0 && J > 0 && (J -= n), c === 1 && J < 0 && (J += n), [z, W, c0, J];
|
|
2358
2361
|
}
|
|
2359
2362
|
function o(i, a) {
|
|
@@ -2361,23 +2364,23 @@ function be() {
|
|
|
2361
2364
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2362
2365
|
}
|
|
2363
2366
|
return z0 = function(a, s, r, h, c, f, x, l, u) {
|
|
2364
|
-
var
|
|
2365
|
-
if (
|
|
2367
|
+
var A = Math.sin(u * n / 360), y = Math.cos(u * n / 360), b = y * (a - r) / 2 + A * (s - h) / 2, P = -A * (a - r) / 2 + y * (s - h) / 2;
|
|
2368
|
+
if (b === 0 && P === 0)
|
|
2366
2369
|
return [];
|
|
2367
2370
|
if (x === 0 || l === 0)
|
|
2368
2371
|
return [];
|
|
2369
2372
|
x = Math.abs(x), l = Math.abs(l);
|
|
2370
|
-
var E =
|
|
2373
|
+
var E = b * b / (x * x) + P * P / (l * l);
|
|
2371
2374
|
E > 1 && (x *= Math.sqrt(E), l *= Math.sqrt(E));
|
|
2372
|
-
var L = t(a, s, r, h, c, f, x, l,
|
|
2373
|
-
|
|
2375
|
+
var L = t(a, s, r, h, c, f, x, l, A, y), S = [], C = L[2], F = L[3], z = Math.max(Math.ceil(Math.abs(F) / (n / 4)), 1);
|
|
2376
|
+
F /= z;
|
|
2374
2377
|
for (var W = 0; W < z; W++)
|
|
2375
|
-
S.push(o(C,
|
|
2378
|
+
S.push(o(C, F)), C += F;
|
|
2376
2379
|
return S.map(function(U) {
|
|
2377
2380
|
for (var X = 0; X < U.length; X += 2) {
|
|
2378
2381
|
var a0 = U[X + 0], p0 = U[X + 1];
|
|
2379
2382
|
a0 *= x, p0 *= l;
|
|
2380
|
-
var c0 = y * a0 -
|
|
2383
|
+
var c0 = y * a0 - A * p0, J = A * a0 + y * p0;
|
|
2381
2384
|
U[X + 0] = c0 + L[0], U[X + 1] = J + L[1];
|
|
2382
2385
|
}
|
|
2383
2386
|
return U;
|
|
@@ -2385,7 +2388,7 @@ function be() {
|
|
|
2385
2388
|
}, z0;
|
|
2386
2389
|
}
|
|
2387
2390
|
var U0, wt;
|
|
2388
|
-
function
|
|
2391
|
+
function Me() {
|
|
2389
2392
|
if (wt) return U0;
|
|
2390
2393
|
wt = 1;
|
|
2391
2394
|
var n = 1e-10, e = Math.PI / 180;
|
|
@@ -2414,10 +2417,10 @@ function Ae() {
|
|
|
2414
2417
|
}, U0 = t, U0;
|
|
2415
2418
|
}
|
|
2416
2419
|
var Y0, mt;
|
|
2417
|
-
function
|
|
2420
|
+
function be() {
|
|
2418
2421
|
if (mt) return Y0;
|
|
2419
2422
|
mt = 1;
|
|
2420
|
-
var n = we(), e = me(), t = Nt(), o =
|
|
2423
|
+
var n = we(), e = me(), t = Nt(), o = Ae(), i = Me();
|
|
2421
2424
|
function a(s) {
|
|
2422
2425
|
if (!(this instanceof a))
|
|
2423
2426
|
return new a(s);
|
|
@@ -2438,38 +2441,38 @@ function Me() {
|
|
|
2438
2441
|
}, a.prototype.__matrix = function(s) {
|
|
2439
2442
|
var r = this, h;
|
|
2440
2443
|
s.queue.length && this.iterate(function(c, f, x, l) {
|
|
2441
|
-
var u,
|
|
2444
|
+
var u, A, y, b;
|
|
2442
2445
|
switch (c[0]) {
|
|
2443
2446
|
// Process 'assymetric' commands separately
|
|
2444
2447
|
case "v":
|
|
2445
|
-
u = s.calc(0, c[1], !0),
|
|
2448
|
+
u = s.calc(0, c[1], !0), A = u[0] === 0 ? ["v", u[1]] : ["l", u[0], u[1]];
|
|
2446
2449
|
break;
|
|
2447
2450
|
case "V":
|
|
2448
|
-
u = s.calc(x, c[1], !1),
|
|
2451
|
+
u = s.calc(x, c[1], !1), A = u[0] === s.calc(x, l, !1)[0] ? ["V", u[1]] : ["L", u[0], u[1]];
|
|
2449
2452
|
break;
|
|
2450
2453
|
case "h":
|
|
2451
|
-
u = s.calc(c[1], 0, !0),
|
|
2454
|
+
u = s.calc(c[1], 0, !0), A = u[1] === 0 ? ["h", u[0]] : ["l", u[0], u[1]];
|
|
2452
2455
|
break;
|
|
2453
2456
|
case "H":
|
|
2454
|
-
u = s.calc(c[1], l, !1),
|
|
2457
|
+
u = s.calc(c[1], l, !1), A = u[1] === s.calc(x, l, !1)[1] ? ["H", u[0]] : ["L", u[0], u[1]];
|
|
2455
2458
|
break;
|
|
2456
2459
|
case "a":
|
|
2457
2460
|
case "A":
|
|
2458
2461
|
var P = s.toArray(), E = i(c[1], c[2], c[3]).transform(P);
|
|
2459
2462
|
if (P[0] * P[3] - P[1] * P[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === x && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
|
|
2460
|
-
|
|
2463
|
+
A = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2461
2464
|
break;
|
|
2462
2465
|
}
|
|
2463
|
-
E.isDegenerate() ?
|
|
2466
|
+
E.isDegenerate() ? A = [c[0] === "a" ? "l" : "L", u[0], u[1]] : A = [c[0], E.rx, E.ry, E.ax, c[4], c[5], u[0], u[1]];
|
|
2464
2467
|
break;
|
|
2465
2468
|
case "m":
|
|
2466
|
-
|
|
2469
|
+
b = f > 0, u = s.calc(c[1], c[2], b), A = ["m", u[0], u[1]];
|
|
2467
2470
|
break;
|
|
2468
2471
|
default:
|
|
2469
|
-
for (y = c[0],
|
|
2470
|
-
u = s.calc(c[h], c[h + 1],
|
|
2472
|
+
for (y = c[0], A = [y], b = y.toLowerCase() === y, h = 1; h < c.length; h += 2)
|
|
2473
|
+
u = s.calc(c[h], c[h + 1], b), A.push(u[0], u[1]);
|
|
2471
2474
|
}
|
|
2472
|
-
r.segments[f] =
|
|
2475
|
+
r.segments[f] = A;
|
|
2473
2476
|
}, !0);
|
|
2474
2477
|
}, a.prototype.__evaluateStack = function() {
|
|
2475
2478
|
var s, r;
|
|
@@ -2489,8 +2492,8 @@ function Me() {
|
|
|
2489
2492
|
var x = this.segments[c], l = x[0];
|
|
2490
2493
|
l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
|
|
2491
2494
|
for (var u = 1; u < x.length; u++) {
|
|
2492
|
-
var
|
|
2493
|
-
u === 1 ? h &&
|
|
2495
|
+
var A = x[u];
|
|
2496
|
+
u === 1 ? h && A >= 0 && (s += " ") : A >= 0 && (s += " "), s += A;
|
|
2494
2497
|
}
|
|
2495
2498
|
r = l;
|
|
2496
2499
|
}
|
|
@@ -2535,14 +2538,14 @@ function Me() {
|
|
|
2535
2538
|
u && (l[6] += c, l[7] += f), c = l[6] - l[6].toFixed(s), f = l[7] - l[7].toFixed(s), l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s), l[3] = +l[3].toFixed(s + 2), l[6] = +l[6].toFixed(s), l[7] = +l[7].toFixed(s);
|
|
2536
2539
|
return;
|
|
2537
2540
|
default:
|
|
2538
|
-
x = l.length, u && (l[x - 2] += c, l[x - 1] += f), c = l[x - 2] - l[x - 2].toFixed(s), f = l[x - 1] - l[x - 1].toFixed(s), l.forEach(function(
|
|
2541
|
+
x = l.length, u && (l[x - 2] += c, l[x - 1] += f), c = l[x - 2] - l[x - 2].toFixed(s), f = l[x - 1] - l[x - 1].toFixed(s), l.forEach(function(A, y) {
|
|
2539
2542
|
y && (l[y] = +l[y].toFixed(s));
|
|
2540
2543
|
});
|
|
2541
2544
|
return;
|
|
2542
2545
|
}
|
|
2543
2546
|
}), this;
|
|
2544
2547
|
}, a.prototype.iterate = function(s, r) {
|
|
2545
|
-
var h = this.segments, c = {}, f = !1, x = 0, l = 0, u = 0,
|
|
2548
|
+
var h = this.segments, c = {}, f = !1, x = 0, l = 0, u = 0, A = 0, y, b, P;
|
|
2546
2549
|
if (r || this.__evaluateStack(), h.forEach(function(E, L) {
|
|
2547
2550
|
var S = s(E, L, x, l);
|
|
2548
2551
|
Array.isArray(S) && (c[L] = S, f = !0);
|
|
@@ -2550,7 +2553,7 @@ function Me() {
|
|
|
2550
2553
|
switch (E[0]) {
|
|
2551
2554
|
case "m":
|
|
2552
2555
|
case "M":
|
|
2553
|
-
x = E[1] + (C ? x : 0), l = E[2] + (C ? l : 0), u = x,
|
|
2556
|
+
x = E[1] + (C ? x : 0), l = E[2] + (C ? l : 0), u = x, A = l;
|
|
2554
2557
|
return;
|
|
2555
2558
|
case "h":
|
|
2556
2559
|
case "H":
|
|
@@ -2562,7 +2565,7 @@ function Me() {
|
|
|
2562
2565
|
return;
|
|
2563
2566
|
case "z":
|
|
2564
2567
|
case "Z":
|
|
2565
|
-
x = u, l =
|
|
2568
|
+
x = u, l = A;
|
|
2566
2569
|
return;
|
|
2567
2570
|
default:
|
|
2568
2571
|
x = E[E.length - 2] + (C ? x : 0), l = E[E.length - 1] + (C ? l : 0);
|
|
@@ -2571,8 +2574,8 @@ function Me() {
|
|
|
2571
2574
|
return this;
|
|
2572
2575
|
for (P = [], y = 0; y < h.length; y++)
|
|
2573
2576
|
if (typeof c[y] < "u")
|
|
2574
|
-
for (
|
|
2575
|
-
P.push(c[y][
|
|
2577
|
+
for (b = 0; b < c[y].length; b++)
|
|
2578
|
+
P.push(c[y][b]);
|
|
2576
2579
|
else
|
|
2577
2580
|
P.push(h[y]);
|
|
2578
2581
|
return this.segments = P, this;
|
|
@@ -2610,22 +2613,22 @@ function Me() {
|
|
|
2610
2613
|
}, !0), this;
|
|
2611
2614
|
}, a.prototype.unarc = function() {
|
|
2612
2615
|
return this.iterate(function(s, r, h, c) {
|
|
2613
|
-
var f, x, l, u = [],
|
|
2614
|
-
return
|
|
2616
|
+
var f, x, l, u = [], A = s[0];
|
|
2617
|
+
return A !== "A" && A !== "a" ? null : (A === "a" ? (x = h + s[6], l = c + s[7]) : (x = s[6], l = s[7]), f = o(h, c, x, l, s[4], s[5], s[1], s[2], s[3]), f.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (f.forEach(function(y) {
|
|
2615
2618
|
u.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
|
|
2616
2619
|
}), u));
|
|
2617
2620
|
}), this;
|
|
2618
2621
|
}, a.prototype.unshort = function() {
|
|
2619
2622
|
var s = this.segments, r, h, c, f, x;
|
|
2620
|
-
return this.iterate(function(l, u,
|
|
2621
|
-
var
|
|
2622
|
-
u && (P === "T" ? (E =
|
|
2623
|
+
return this.iterate(function(l, u, A, y) {
|
|
2624
|
+
var b = l[0], P = b.toUpperCase(), E;
|
|
2625
|
+
u && (P === "T" ? (E = b === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - A, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, x = -h, E || (f += A, x += y), s[u] = [
|
|
2623
2626
|
E ? "q" : "Q",
|
|
2624
2627
|
f,
|
|
2625
2628
|
x,
|
|
2626
2629
|
l[1],
|
|
2627
2630
|
l[2]
|
|
2628
|
-
]) : P === "S" && (E =
|
|
2631
|
+
]) : P === "S" && (E = b === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - A, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, x = -h, E || (f += A, x += y), s[u] = [
|
|
2629
2632
|
E ? "c" : "C",
|
|
2630
2633
|
f,
|
|
2631
2634
|
x,
|
|
@@ -2637,9 +2640,9 @@ function Me() {
|
|
|
2637
2640
|
}), this;
|
|
2638
2641
|
}, Y0 = a, Y0;
|
|
2639
2642
|
}
|
|
2640
|
-
var X0,
|
|
2643
|
+
var X0, At;
|
|
2641
2644
|
function Le() {
|
|
2642
|
-
return
|
|
2645
|
+
return At || (At = 1, X0 = be()), X0;
|
|
2643
2646
|
}
|
|
2644
2647
|
var Te = Le();
|
|
2645
2648
|
const Pe = /* @__PURE__ */ ve(Te);
|
|
@@ -2648,7 +2651,7 @@ function Ee(n) {
|
|
|
2648
2651
|
var e = [];
|
|
2649
2652
|
return n.replace(Ce, function(t, o, i) {
|
|
2650
2653
|
var a = o.toLowerCase();
|
|
2651
|
-
for (i =
|
|
2654
|
+
for (i = ke(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2652
2655
|
if (i.length === H0[a])
|
|
2653
2656
|
return i.unshift(o), e.push(i);
|
|
2654
2657
|
if (i.length < H0[a])
|
|
@@ -2658,7 +2661,7 @@ function Ee(n) {
|
|
|
2658
2661
|
}), e;
|
|
2659
2662
|
}
|
|
2660
2663
|
var Se = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2661
|
-
function
|
|
2664
|
+
function ke(n) {
|
|
2662
2665
|
var e = n.match(Se);
|
|
2663
2666
|
return e ? e.map(Number) : [];
|
|
2664
2667
|
}
|
|
@@ -2666,7 +2669,7 @@ function e0(n, e, t, o, i, a, s, r) {
|
|
|
2666
2669
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2667
2670
|
}
|
|
2668
2671
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2669
|
-
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = je, this.getPoint = Oe, this.getDerivative = _e) : (this.getArcLength =
|
|
2672
|
+
this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = je, this.getPoint = Oe, this.getDerivative = _e) : (this.getArcLength = Fe, this.getPoint = qt, this.getDerivative = Ie), this.init();
|
|
2670
2673
|
}
|
|
2671
2674
|
Z0.prototype = {
|
|
2672
2675
|
constructor: Z0,
|
|
@@ -2728,7 +2731,7 @@ Z0.prototype = {
|
|
|
2728
2731
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2729
2732
|
}
|
|
2730
2733
|
};
|
|
2731
|
-
function
|
|
2734
|
+
function Ie(n, e, t) {
|
|
2732
2735
|
return {
|
|
2733
2736
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2734
2737
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
@@ -2757,7 +2760,7 @@ function Oe(n, e, t) {
|
|
|
2757
2760
|
var o = (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], i = (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3];
|
|
2758
2761
|
return { x: o, y: i };
|
|
2759
2762
|
}
|
|
2760
|
-
function
|
|
2763
|
+
function Fe(n, e, t) {
|
|
2761
2764
|
t === void 0 && (t = 1);
|
|
2762
2765
|
var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
2763
2766
|
if (r === 0)
|
|
@@ -2767,7 +2770,7 @@ function Re(n, e, t) {
|
|
|
2767
2770
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2768
2771
|
)));
|
|
2769
2772
|
}
|
|
2770
|
-
var
|
|
2773
|
+
var Re = [
|
|
2771
2774
|
[],
|
|
2772
2775
|
[],
|
|
2773
2776
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2846,18 +2849,18 @@ function je(n, e, t) {
|
|
|
2846
2849
|
t === void 0 && (t = 1);
|
|
2847
2850
|
var r = 20;
|
|
2848
2851
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2849
|
-
s = o *
|
|
2852
|
+
s = o * Re[r][a] + o, i += Ne[r][a] * De(n, e, s);
|
|
2850
2853
|
return o * i;
|
|
2851
2854
|
}
|
|
2852
2855
|
var C0 = Math.PI * 2;
|
|
2853
|
-
function
|
|
2856
|
+
function Mt(n, e, t, o) {
|
|
2854
2857
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2855
2858
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2856
2859
|
}
|
|
2857
2860
|
function ze(n, e, t, o, i, a, s, r, h, c) {
|
|
2858
|
-
var f = c * (n - t) / 2 + h * (e - o) / 2, x = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r,
|
|
2859
|
-
|
|
2860
|
-
var P =
|
|
2861
|
+
var f = c * (n - t) / 2 + h * (e - o) / 2, x = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, A = f * f, y = x * x, b = l * u - l * y - u * A;
|
|
2862
|
+
b < 0 && (b = 0), b /= l * y + u * A, b = Math.sqrt(b) * (i === a ? -1 : 1);
|
|
2863
|
+
var P = b * s / r * x, E = b * -r / s * f, L = c * P - h * E + (n + t) / 2, S = h * P + c * E + (e + o) / 2, C = (f - P) / s, F = (x - E) / r, z = (-f - P) / s, W = (-x - E) / r, U = Mt(1, 0, C, F), X = Mt(C, F, z, W);
|
|
2861
2864
|
return a === 0 && X > 0 && (X -= C0), a === 1 && X < 0 && (X += C0), [L, S, U, X];
|
|
2862
2865
|
}
|
|
2863
2866
|
function Ue(n, e) {
|
|
@@ -2873,28 +2876,28 @@ function Ye(n, e, t, o, i, a, s, r, h) {
|
|
|
2873
2876
|
t = Math.abs(t), o = Math.abs(o);
|
|
2874
2877
|
var u = x * x / (t * t) + l * l / (o * o);
|
|
2875
2878
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2876
|
-
var
|
|
2879
|
+
var A = ze(n, e, r, h, a, s, t, o, c, f), y = [], b = A[2], P = A[3], E = Math.max(Math.ceil(Math.abs(P) / (C0 / 4)), 1);
|
|
2877
2880
|
P /= E;
|
|
2878
2881
|
for (var L = 0; L < E; L++)
|
|
2879
|
-
y.push(Ue(
|
|
2882
|
+
y.push(Ue(b, P)), b += P;
|
|
2880
2883
|
return y.map(function(S) {
|
|
2881
2884
|
for (var C = 0; C < S.length; C += 2) {
|
|
2882
|
-
var
|
|
2883
|
-
|
|
2884
|
-
var W = f *
|
|
2885
|
-
S[C + 0] = W +
|
|
2885
|
+
var F = S[C + 0], z = S[C + 1];
|
|
2886
|
+
F *= t, z *= o;
|
|
2887
|
+
var W = f * F - c * z, U = c * F + f * z;
|
|
2888
|
+
S[C + 0] = W + A[0], S[C + 1] = U + A[1];
|
|
2886
2889
|
}
|
|
2887
2890
|
return S;
|
|
2888
2891
|
});
|
|
2889
2892
|
}
|
|
2890
|
-
function
|
|
2893
|
+
function bt(n, e, t, o, i, a, s, r, h) {
|
|
2891
2894
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2892
2895
|
}
|
|
2893
2896
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2894
2897
|
var c = 0, f = [], x = [], l = Ye(n, e, t, o, i, a, s, r, h);
|
|
2895
2898
|
l.forEach(function(u) {
|
|
2896
|
-
var
|
|
2897
|
-
c += y, f.push(y), x.push(
|
|
2899
|
+
var A = new e0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = A.getTotalLength();
|
|
2900
|
+
c += y, f.push(y), x.push(A);
|
|
2898
2901
|
}), this.length = c, this.partialLengths = f, this.curves = x;
|
|
2899
2902
|
}
|
|
2900
2903
|
K0.prototype = {
|
|
@@ -2928,23 +2931,23 @@ K0.prototype = {
|
|
|
2928
2931
|
}
|
|
2929
2932
|
};
|
|
2930
2933
|
function t0(n, e, t, o) {
|
|
2931
|
-
return new
|
|
2934
|
+
return new k0(n, e, t, o);
|
|
2932
2935
|
}
|
|
2933
|
-
function
|
|
2936
|
+
function k0(n, e, t, o) {
|
|
2934
2937
|
this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
|
|
2935
2938
|
}
|
|
2936
|
-
|
|
2939
|
+
k0.prototype.getTotalLength = function() {
|
|
2937
2940
|
return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
2938
2941
|
};
|
|
2939
|
-
|
|
2942
|
+
k0.prototype.getPointAtLength = function(n) {
|
|
2940
2943
|
var e = n / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), t = (this.x1 - this.x0) * e, o = (this.y1 - this.y0) * e;
|
|
2941
2944
|
return { x: this.x0 + t, y: this.y0 + o };
|
|
2942
2945
|
};
|
|
2943
|
-
|
|
2946
|
+
k0.prototype.getTangentAtLength = function() {
|
|
2944
2947
|
var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
2945
2948
|
return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
|
|
2946
2949
|
};
|
|
2947
|
-
|
|
2950
|
+
k0.prototype.getPropertiesAtLength = function(n) {
|
|
2948
2951
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2949
2952
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2950
2953
|
};
|
|
@@ -2954,7 +2957,7 @@ function Xe(n) {
|
|
|
2954
2957
|
if (!s)
|
|
2955
2958
|
return null;
|
|
2956
2959
|
for (var r = Ee(s), h = [0, 0], c = [0, 0], f, x, l = 0; l < r.length; l++)
|
|
2957
|
-
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new t0(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new t0(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new t0(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new t0(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(x[0] - h[0], 2) + Math.pow(x[1] - h[1], 2)), o.push(new t0(h[0], x[0], h[1], x[1])), h = [x[0], x[1]]) : r[l][0] === "C" ? (f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new t0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new t0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new t0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new t0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new
|
|
2960
|
+
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], x = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new t0(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new t0(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new t0(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new t0(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new t0(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(x[0] - h[0], 2) + Math.pow(x[1] - h[1], 2)), o.push(new t0(h[0], x[0], h[1], x[1])), h = [x[0], x[1]]) : r[l][0] === "C" ? (f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new e0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new t0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new t0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new e0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new t0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new e0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new t0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new bt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new bt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
|
|
2958
2961
|
return i;
|
|
2959
2962
|
}
|
|
2960
2963
|
i.getTotalLength = function() {
|
|
@@ -3113,30 +3116,30 @@ function sn(n, e, t) {
|
|
|
3113
3116
|
let o;
|
|
3114
3117
|
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), rn(n, e), $e(n, e, t);
|
|
3115
3118
|
}
|
|
3116
|
-
var
|
|
3119
|
+
var I0 = { exports: {} }, Pt;
|
|
3117
3120
|
function an() {
|
|
3118
|
-
if (Pt) return
|
|
3119
|
-
Pt = 1,
|
|
3121
|
+
if (Pt) return I0.exports;
|
|
3122
|
+
Pt = 1, I0.exports = n, I0.exports.default = n;
|
|
3120
3123
|
function n(g, d, p) {
|
|
3121
3124
|
p = p || 2;
|
|
3122
|
-
var v = d && d.length, w = v ? d[0] * p : g.length, m = e(g, 0, w, p, !0),
|
|
3123
|
-
if (!m || m.next === m.prev) return
|
|
3124
|
-
var T, O,
|
|
3125
|
+
var v = d && d.length, w = v ? d[0] * p : g.length, m = e(g, 0, w, p, !0), M = [];
|
|
3126
|
+
if (!m || m.next === m.prev) return M;
|
|
3127
|
+
var T, O, I, Y, B, R, G;
|
|
3125
3128
|
if (v && (m = h(g, d, m, p)), g.length > 80 * p) {
|
|
3126
|
-
T =
|
|
3129
|
+
T = I = g[0], O = Y = g[1];
|
|
3127
3130
|
for (var D = p; D < w; D += p)
|
|
3128
|
-
B = g[D],
|
|
3129
|
-
G = Math.max(
|
|
3131
|
+
B = g[D], R = g[D + 1], B < T && (T = B), R < O && (O = R), B > I && (I = B), R > Y && (Y = R);
|
|
3132
|
+
G = Math.max(I - T, Y - O), G = G !== 0 ? 32767 / G : 0;
|
|
3130
3133
|
}
|
|
3131
|
-
return o(m,
|
|
3134
|
+
return o(m, M, p, T, O, G, 0), M;
|
|
3132
3135
|
}
|
|
3133
3136
|
function e(g, d, p, v, w) {
|
|
3134
|
-
var m,
|
|
3135
|
-
if (w ===
|
|
3136
|
-
for (m = d; m < p; m += v)
|
|
3137
|
+
var m, M;
|
|
3138
|
+
if (w === F0(g, d, p, v) > 0)
|
|
3139
|
+
for (m = d; m < p; m += v) M = p0(m, g[m], g[m + 1], M);
|
|
3137
3140
|
else
|
|
3138
|
-
for (m = p - v; m >= d; m -= v)
|
|
3139
|
-
return
|
|
3141
|
+
for (m = p - v; m >= d; m -= v) M = p0(m, g[m], g[m + 1], M);
|
|
3142
|
+
return M && S(M, M.next) && (c0(M), M = M.next), M;
|
|
3140
3143
|
}
|
|
3141
3144
|
function t(g, d) {
|
|
3142
3145
|
if (!g) return g;
|
|
@@ -3151,16 +3154,16 @@ function an() {
|
|
|
3151
3154
|
while (v || p !== d);
|
|
3152
3155
|
return d;
|
|
3153
3156
|
}
|
|
3154
|
-
function o(g, d, p, v, w, m,
|
|
3157
|
+
function o(g, d, p, v, w, m, M) {
|
|
3155
3158
|
if (g) {
|
|
3156
|
-
!
|
|
3157
|
-
for (var T = g, O,
|
|
3158
|
-
if (O = g.prev,
|
|
3159
|
-
d.push(O.i / p | 0), d.push(g.i / p | 0), d.push(
|
|
3159
|
+
!M && m && u(g, v, w, m);
|
|
3160
|
+
for (var T = g, O, I; g.prev !== g.next; ) {
|
|
3161
|
+
if (O = g.prev, I = g.next, m ? a(g, v, w, m) : i(g)) {
|
|
3162
|
+
d.push(O.i / p | 0), d.push(g.i / p | 0), d.push(I.i / p | 0), c0(g), g = I.next, T = I.next;
|
|
3160
3163
|
continue;
|
|
3161
3164
|
}
|
|
3162
|
-
if (g =
|
|
3163
|
-
|
|
3165
|
+
if (g = I, g === T) {
|
|
3166
|
+
M ? M === 1 ? (g = s(t(g), d, p), o(g, d, p, v, w, m, 2)) : M === 2 && r(g, d, p, v, w, m) : o(t(g), d, p, v, w, m, 1);
|
|
3164
3167
|
break;
|
|
3165
3168
|
}
|
|
3166
3169
|
}
|
|
@@ -3169,25 +3172,25 @@ function an() {
|
|
|
3169
3172
|
function i(g) {
|
|
3170
3173
|
var d = g.prev, p = g, v = g.next;
|
|
3171
3174
|
if (L(d, p, v) >= 0) return !1;
|
|
3172
|
-
for (var w = d.x, m = p.x,
|
|
3173
|
-
if (D.x >= Y && D.x <=
|
|
3175
|
+
for (var w = d.x, m = p.x, M = v.x, T = d.y, O = p.y, I = v.y, Y = w < m ? w < M ? w : M : m < M ? m : M, B = T < O ? T < I ? T : I : O < I ? O : I, R = w > m ? w > M ? w : M : m > M ? m : M, G = T > O ? T > I ? T : I : O > I ? O : I, D = v.next; D !== d; ) {
|
|
3176
|
+
if (D.x >= Y && D.x <= R && D.y >= B && D.y <= G && P(w, T, m, O, M, I, D.x, D.y) && L(D.prev, D, D.next) >= 0) return !1;
|
|
3174
3177
|
D = D.next;
|
|
3175
3178
|
}
|
|
3176
3179
|
return !0;
|
|
3177
3180
|
}
|
|
3178
3181
|
function a(g, d, p, v) {
|
|
3179
|
-
var w = g.prev, m = g,
|
|
3180
|
-
if (L(w, m,
|
|
3181
|
-
for (var T = w.x, O = m.x,
|
|
3182
|
-
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !==
|
|
3182
|
+
var w = g.prev, m = g, M = g.next;
|
|
3183
|
+
if (L(w, m, M) >= 0) return !1;
|
|
3184
|
+
for (var T = w.x, O = m.x, I = M.x, Y = w.y, B = m.y, R = M.y, G = T < O ? T < I ? T : I : O < I ? O : I, D = Y < B ? Y < R ? Y : R : B < R ? B : R, L0 = T > O ? T > I ? T : I : O > I ? O : I, T0 = Y > B ? Y > R ? Y : R : B > R ? B : R, it = y(G, D, d, p, v), ot = y(L0, T0, d, p, v), N = g.prevZ, q = g.nextZ; N && N.z >= it && q && q.z <= ot; ) {
|
|
3185
|
+
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !== M && P(T, Y, O, B, I, R, N.x, N.y) && L(N.prev, N, N.next) >= 0 || (N = N.prevZ, q.x >= G && q.x <= L0 && q.y >= D && q.y <= T0 && q !== w && q !== M && P(T, Y, O, B, I, R, q.x, q.y) && L(q.prev, q, q.next) >= 0)) return !1;
|
|
3183
3186
|
q = q.nextZ;
|
|
3184
3187
|
}
|
|
3185
3188
|
for (; N && N.z >= it; ) {
|
|
3186
|
-
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !==
|
|
3189
|
+
if (N.x >= G && N.x <= L0 && N.y >= D && N.y <= T0 && N !== w && N !== M && P(T, Y, O, B, I, R, N.x, N.y) && L(N.prev, N, N.next) >= 0) return !1;
|
|
3187
3190
|
N = N.prevZ;
|
|
3188
3191
|
}
|
|
3189
3192
|
for (; q && q.z <= ot; ) {
|
|
3190
|
-
if (q.x >= G && q.x <= L0 && q.y >= D && q.y <= T0 && q !== w && q !==
|
|
3193
|
+
if (q.x >= G && q.x <= L0 && q.y >= D && q.y <= T0 && q !== w && q !== M && P(T, Y, O, B, I, R, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
|
|
3191
3194
|
q = q.nextZ;
|
|
3192
3195
|
}
|
|
3193
3196
|
return !0;
|
|
@@ -3201,23 +3204,23 @@ function an() {
|
|
|
3201
3204
|
return t(v);
|
|
3202
3205
|
}
|
|
3203
3206
|
function r(g, d, p, v, w, m) {
|
|
3204
|
-
var
|
|
3207
|
+
var M = g;
|
|
3205
3208
|
do {
|
|
3206
|
-
for (var T =
|
|
3207
|
-
if (
|
|
3208
|
-
var O = a0(
|
|
3209
|
-
|
|
3209
|
+
for (var T = M.next.next; T !== M.prev; ) {
|
|
3210
|
+
if (M.i !== T.i && E(M, T)) {
|
|
3211
|
+
var O = a0(M, T);
|
|
3212
|
+
M = t(M, M.next), O = t(O, O.next), o(M, d, p, v, w, m, 0), o(O, d, p, v, w, m, 0);
|
|
3210
3213
|
return;
|
|
3211
3214
|
}
|
|
3212
3215
|
T = T.next;
|
|
3213
3216
|
}
|
|
3214
|
-
|
|
3215
|
-
} while (
|
|
3217
|
+
M = M.next;
|
|
3218
|
+
} while (M !== g);
|
|
3216
3219
|
}
|
|
3217
3220
|
function h(g, d, p, v) {
|
|
3218
|
-
var w = [], m,
|
|
3219
|
-
for (m = 0,
|
|
3220
|
-
T = d[m] * v, O = m <
|
|
3221
|
+
var w = [], m, M, T, O, I;
|
|
3222
|
+
for (m = 0, M = d.length; m < M; m++)
|
|
3223
|
+
T = d[m] * v, O = m < M - 1 ? d[m + 1] * v : g.length, I = e(g, T, O, v, !1), I === I.next && (I.steiner = !0), w.push(b(I));
|
|
3221
3224
|
for (w.sort(c), m = 0; m < w.length; m++)
|
|
3222
3225
|
p = f(w[m], p);
|
|
3223
3226
|
return p;
|
|
@@ -3233,22 +3236,22 @@ function an() {
|
|
|
3233
3236
|
return t(v, v.next), t(p, p.next);
|
|
3234
3237
|
}
|
|
3235
3238
|
function x(g, d) {
|
|
3236
|
-
var p = d, v = g.x, w = g.y, m = -1 / 0,
|
|
3239
|
+
var p = d, v = g.x, w = g.y, m = -1 / 0, M;
|
|
3237
3240
|
do {
|
|
3238
3241
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3239
3242
|
var T = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3240
|
-
if (T <= v && T > m && (m = T,
|
|
3241
|
-
return
|
|
3243
|
+
if (T <= v && T > m && (m = T, M = p.x < p.next.x ? p : p.next, T === v))
|
|
3244
|
+
return M;
|
|
3242
3245
|
}
|
|
3243
3246
|
p = p.next;
|
|
3244
3247
|
} while (p !== d);
|
|
3245
|
-
if (!
|
|
3246
|
-
var O =
|
|
3247
|
-
p =
|
|
3248
|
+
if (!M) return null;
|
|
3249
|
+
var O = M, I = M.x, Y = M.y, B = 1 / 0, R;
|
|
3250
|
+
p = M;
|
|
3248
3251
|
do
|
|
3249
|
-
v >= p.x && p.x >=
|
|
3252
|
+
v >= p.x && p.x >= I && v !== p.x && P(w < Y ? v : m, w, I, Y, w < Y ? m : v, w, p.x, p.y) && (R = Math.abs(w - p.y) / (v - p.x), U(p, g) && (R < B || R === B && (p.x > M.x || p.x === M.x && l(M, p))) && (M = p, B = R)), p = p.next;
|
|
3250
3253
|
while (p !== O);
|
|
3251
|
-
return
|
|
3254
|
+
return M;
|
|
3252
3255
|
}
|
|
3253
3256
|
function l(g, d) {
|
|
3254
3257
|
return L(g.prev, g, d.prev) < 0 && L(d.next, g, g.next) < 0;
|
|
@@ -3258,34 +3261,34 @@ function an() {
|
|
|
3258
3261
|
do
|
|
3259
3262
|
w.z === 0 && (w.z = y(w.x, w.y, d, p, v)), w.prevZ = w.prev, w.nextZ = w.next, w = w.next;
|
|
3260
3263
|
while (w !== g);
|
|
3261
|
-
w.prevZ.nextZ = null, w.prevZ = null,
|
|
3264
|
+
w.prevZ.nextZ = null, w.prevZ = null, A(w);
|
|
3262
3265
|
}
|
|
3263
|
-
function
|
|
3264
|
-
var d, p, v, w, m,
|
|
3266
|
+
function A(g) {
|
|
3267
|
+
var d, p, v, w, m, M, T, O, I = 1;
|
|
3265
3268
|
do {
|
|
3266
|
-
for (p = g, g = null, m = null,
|
|
3267
|
-
for (
|
|
3269
|
+
for (p = g, g = null, m = null, M = 0; p; ) {
|
|
3270
|
+
for (M++, v = p, T = 0, d = 0; d < I && (T++, v = v.nextZ, !!v); d++)
|
|
3268
3271
|
;
|
|
3269
|
-
for (O =
|
|
3272
|
+
for (O = I; T > 0 || O > 0 && v; )
|
|
3270
3273
|
T !== 0 && (O === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, T--) : (w = v, v = v.nextZ, O--), m ? m.nextZ = w : g = w, w.prevZ = m, m = w;
|
|
3271
3274
|
p = v;
|
|
3272
3275
|
}
|
|
3273
|
-
m.nextZ = null,
|
|
3274
|
-
} while (
|
|
3276
|
+
m.nextZ = null, I *= 2;
|
|
3277
|
+
} while (M > 1);
|
|
3275
3278
|
return g;
|
|
3276
3279
|
}
|
|
3277
3280
|
function y(g, d, p, v, w) {
|
|
3278
3281
|
return g = (g - p) * w | 0, d = (d - v) * w | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, d = (d | d << 8) & 16711935, d = (d | d << 4) & 252645135, d = (d | d << 2) & 858993459, d = (d | d << 1) & 1431655765, g | d << 1;
|
|
3279
3282
|
}
|
|
3280
|
-
function
|
|
3283
|
+
function b(g) {
|
|
3281
3284
|
var d = g, p = g;
|
|
3282
3285
|
do
|
|
3283
3286
|
(d.x < p.x || d.x === p.x && d.y < p.y) && (p = d), d = d.next;
|
|
3284
3287
|
while (d !== g);
|
|
3285
3288
|
return p;
|
|
3286
3289
|
}
|
|
3287
|
-
function P(g, d, p, v, w, m,
|
|
3288
|
-
return (w -
|
|
3290
|
+
function P(g, d, p, v, w, m, M, T) {
|
|
3291
|
+
return (w - M) * (d - T) >= (g - M) * (m - T) && (g - M) * (v - T) >= (p - M) * (d - T) && (p - M) * (m - T) >= (w - M) * (v - T);
|
|
3289
3292
|
}
|
|
3290
3293
|
function E(g, d) {
|
|
3291
3294
|
return g.next.i !== d.i && g.prev.i !== d.i && !W(g, d) && // dones't intersect other edges
|
|
@@ -3300,10 +3303,10 @@ function an() {
|
|
|
3300
3303
|
return g.x === d.x && g.y === d.y;
|
|
3301
3304
|
}
|
|
3302
3305
|
function C(g, d, p, v) {
|
|
3303
|
-
var w = z(L(g, d, p)), m = z(L(g, d, v)),
|
|
3304
|
-
return !!(w !== m &&
|
|
3306
|
+
var w = z(L(g, d, p)), m = z(L(g, d, v)), M = z(L(p, v, g)), T = z(L(p, v, d));
|
|
3307
|
+
return !!(w !== m && M !== T || w === 0 && F(g, p, d) || m === 0 && F(g, v, d) || M === 0 && F(p, g, v) || T === 0 && F(p, d, v));
|
|
3305
3308
|
}
|
|
3306
|
-
function
|
|
3309
|
+
function F(g, d, p) {
|
|
3307
3310
|
return d.x <= Math.max(g.x, p.x) && d.x >= Math.min(g.x, p.x) && d.y <= Math.max(g.y, p.y) && d.y >= Math.min(g.y, p.y);
|
|
3308
3311
|
}
|
|
3309
3312
|
function z(g) {
|
|
@@ -3342,34 +3345,34 @@ function an() {
|
|
|
3342
3345
|
this.i = g, this.x = d, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
3343
3346
|
}
|
|
3344
3347
|
n.deviation = function(g, d, p, v) {
|
|
3345
|
-
var w = d && d.length, m = w ? d[0] * p : g.length,
|
|
3348
|
+
var w = d && d.length, m = w ? d[0] * p : g.length, M = Math.abs(F0(g, 0, m, p));
|
|
3346
3349
|
if (w)
|
|
3347
3350
|
for (var T = 0, O = d.length; T < O; T++) {
|
|
3348
|
-
var
|
|
3349
|
-
|
|
3351
|
+
var I = d[T] * p, Y = T < O - 1 ? d[T + 1] * p : g.length;
|
|
3352
|
+
M -= Math.abs(F0(g, I, Y, p));
|
|
3350
3353
|
}
|
|
3351
3354
|
var B = 0;
|
|
3352
3355
|
for (T = 0; T < v.length; T += 3) {
|
|
3353
|
-
var
|
|
3356
|
+
var R = v[T] * p, G = v[T + 1] * p, D = v[T + 2] * p;
|
|
3354
3357
|
B += Math.abs(
|
|
3355
|
-
(g[
|
|
3358
|
+
(g[R] - g[D]) * (g[G + 1] - g[R + 1]) - (g[R] - g[G]) * (g[D + 1] - g[R + 1])
|
|
3356
3359
|
);
|
|
3357
3360
|
}
|
|
3358
|
-
return
|
|
3361
|
+
return M === 0 && B === 0 ? 0 : Math.abs((B - M) / M);
|
|
3359
3362
|
};
|
|
3360
|
-
function
|
|
3361
|
-
for (var w = 0, m = d,
|
|
3362
|
-
w += (g[
|
|
3363
|
+
function F0(g, d, p, v) {
|
|
3364
|
+
for (var w = 0, m = d, M = p - v; m < p; m += v)
|
|
3365
|
+
w += (g[M] - g[m]) * (g[m + 1] + g[M + 1]), M = m;
|
|
3363
3366
|
return w;
|
|
3364
3367
|
}
|
|
3365
3368
|
return n.flatten = function(g) {
|
|
3366
3369
|
for (var d = g[0][0].length, p = { vertices: [], holes: [], dimensions: d }, v = 0, w = 0; w < g.length; w++) {
|
|
3367
3370
|
for (var m = 0; m < g[w].length; m++)
|
|
3368
|
-
for (var
|
|
3371
|
+
for (var M = 0; M < d; M++) p.vertices.push(g[w][m][M]);
|
|
3369
3372
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3370
3373
|
}
|
|
3371
3374
|
return p;
|
|
3372
|
-
},
|
|
3375
|
+
}, I0.exports;
|
|
3373
3376
|
}
|
|
3374
3377
|
an();
|
|
3375
3378
|
function Dt(n, e) {
|
|
@@ -3417,7 +3420,7 @@ function On(n) {
|
|
|
3417
3420
|
})
|
|
3418
3421
|
};
|
|
3419
3422
|
}
|
|
3420
|
-
function
|
|
3423
|
+
function Fn(n) {
|
|
3421
3424
|
const e = [];
|
|
3422
3425
|
if (n.isAllKey) {
|
|
3423
3426
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3446,11 +3449,11 @@ export {
|
|
|
3446
3449
|
gn as Hide,
|
|
3447
3450
|
dn as IFrame,
|
|
3448
3451
|
mn as Image,
|
|
3449
|
-
|
|
3450
|
-
|
|
3452
|
+
An as Line,
|
|
3453
|
+
Mn as Mask,
|
|
3451
3454
|
j as ObjectType,
|
|
3452
|
-
|
|
3453
|
-
|
|
3455
|
+
In as Opaque,
|
|
3456
|
+
bn as Path,
|
|
3454
3457
|
En as Pause,
|
|
3455
3458
|
Ln as Polygon,
|
|
3456
3459
|
H as Position,
|
|
@@ -3464,14 +3467,14 @@ export {
|
|
|
3464
3467
|
s0 as SlideObject,
|
|
3465
3468
|
Et as SlideWebExtra,
|
|
3466
3469
|
m1 as Text,
|
|
3467
|
-
|
|
3470
|
+
kn as TextUnit,
|
|
3468
3471
|
g1 as Transparent,
|
|
3469
3472
|
Ct as Update,
|
|
3470
|
-
|
|
3473
|
+
Fn as getKeySlideBuildIndices,
|
|
3471
3474
|
On as getSizingFunctions,
|
|
3472
3475
|
_n as getSmoothPathInterpolator,
|
|
3473
3476
|
w1 as getTextContentLength,
|
|
3474
3477
|
S1 as interpolateColor,
|
|
3475
|
-
|
|
3478
|
+
I1 as interpolateNumber
|
|
3476
3479
|
};
|
|
3477
3480
|
//# sourceMappingURL=presenter.mjs.map
|