presenter 0.7.4 → 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 +537 -521
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/types/BrowserCanvasRendererProps.d.ts +1 -0
- package/dist/types/Update.d.ts +2 -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",
|
|
@@ -46,7 +46,7 @@ const tt = {
|
|
|
46
46
|
CUBIC_IN: Ut,
|
|
47
47
|
CUBIC_OUT: Yt,
|
|
48
48
|
BACK_IN_OUT: Ht.overshoot(0.8)
|
|
49
|
-
},
|
|
49
|
+
}, $t = tt.LINEAR;
|
|
50
50
|
function et(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
52
|
type: u0.ANIMATE,
|
|
@@ -54,7 +54,7 @@ function et(n, e, t = {}) {
|
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: $t,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,33 +62,34 @@ function et(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function un(n, e = {}) {
|
|
66
66
|
return et(n, { opacity: 1 }, {
|
|
67
67
|
duration: 500,
|
|
68
68
|
easing: tt.CUBIC,
|
|
69
69
|
...typeof e == "number" ? { duration: e } : e
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function fn(n, e = {}) {
|
|
73
73
|
return et(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
75
|
easing: tt.CUBIC,
|
|
76
76
|
...typeof e == "number" ? { duration: e } : e
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function Ct(n, e) {
|
|
79
|
+
function Ct(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
81
|
type: u0.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
83
83
|
object: n,
|
|
84
84
|
props: e,
|
|
85
|
-
shortcut: null
|
|
85
|
+
shortcut: null,
|
|
86
|
+
...t
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
+
function gn(n) {
|
|
89
90
|
return Ct(n, { opacity: 0 });
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function pn(n) {
|
|
92
93
|
return Ct(n, { opacity: 1 });
|
|
93
94
|
}
|
|
94
95
|
const n0 = {
|
|
@@ -102,7 +103,7 @@ const n0 = {
|
|
|
102
103
|
BOTTOM: "Bottom",
|
|
103
104
|
BOTTOM_RIGHT: "BottomRight"
|
|
104
105
|
}, o0 = n0.TOP_LEFT;
|
|
105
|
-
function
|
|
106
|
+
function $(n, e = 0, t = 0, o = 1) {
|
|
106
107
|
if (typeof n == "string") {
|
|
107
108
|
const i = n.replace("#", ""), a = parseInt(i, 16);
|
|
108
109
|
return isNaN(a) ? (console.warn("Invalid hex color format:", n), K) : i.length === 6 ? {
|
|
@@ -131,12 +132,12 @@ function G(n, e = 0, t = 0, o = 1) {
|
|
|
131
132
|
...n
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
$.BLACK = $(0, 0, 0);
|
|
136
|
+
$.BLUE = $(0, 0, 255);
|
|
137
|
+
$.GREEN = $(0, 255, 0);
|
|
138
|
+
$.RED = $(255, 0, 0);
|
|
139
|
+
$.TRANSPARENT = $(0, 0, 0, 0);
|
|
140
|
+
$.WHITE = $(255, 255, 255);
|
|
140
141
|
const K = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
141
142
|
function Et(n = null) {
|
|
142
143
|
return {
|
|
@@ -157,12 +158,12 @@ function E0(n, e = null) {
|
|
|
157
158
|
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(St(n, e) * 255);
|
|
158
159
|
return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
+
function dn(n = null) {
|
|
161
162
|
const {
|
|
162
163
|
url: e = "https://wikipedia.org/",
|
|
163
|
-
backgroundColor: t =
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
backgroundColor: t = $.TRANSPARENT,
|
|
165
|
+
strokeColor: o = K,
|
|
166
|
+
strokeWidth: i = 0,
|
|
166
167
|
pointerEvents: a = "auto",
|
|
167
168
|
scale: s = 1,
|
|
168
169
|
anchor: r = o0,
|
|
@@ -186,11 +187,11 @@ const x0 = {
|
|
|
186
187
|
LEFT: "left",
|
|
187
188
|
CENTER: "center",
|
|
188
189
|
RIGHT: "right"
|
|
189
|
-
},
|
|
190
|
+
}, Gt = x0.LEFT;
|
|
190
191
|
function r0(n, e) {
|
|
191
192
|
throw new Error("Unexpected value: " + n);
|
|
192
193
|
}
|
|
193
|
-
function
|
|
194
|
+
function xn(n = null) {
|
|
194
195
|
const {
|
|
195
196
|
alignment: e = x0.LEFT,
|
|
196
197
|
scale: t = 1,
|
|
@@ -264,7 +265,7 @@ function s0(n) {
|
|
|
264
265
|
...n
|
|
265
266
|
};
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function yn(n = null) {
|
|
268
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
269
270
|
return s0({
|
|
270
271
|
objectType: j.ARROW,
|
|
@@ -283,14 +284,14 @@ function xn(n = null) {
|
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
286
|
const Wt = 50;
|
|
286
|
-
function
|
|
287
|
+
function vn(n = null) {
|
|
287
288
|
return s0({
|
|
288
289
|
objectType: j.CIRCLE,
|
|
289
290
|
anchor: o0,
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
strokeColor: K,
|
|
292
|
+
strokeWidth: 0,
|
|
292
293
|
drawn: 1,
|
|
293
|
-
|
|
294
|
+
fillColor: K,
|
|
294
295
|
radius: Wt,
|
|
295
296
|
x: 0,
|
|
296
297
|
y: 0,
|
|
@@ -322,7 +323,7 @@ function st(n, e = null) {
|
|
|
322
323
|
...e
|
|
323
324
|
});
|
|
324
325
|
}
|
|
325
|
-
function
|
|
326
|
+
function wn(n) {
|
|
326
327
|
const {
|
|
327
328
|
anchor: e = o0,
|
|
328
329
|
cols: t = 1,
|
|
@@ -336,19 +337,19 @@ function vn(n) {
|
|
|
336
337
|
y: f = 0,
|
|
337
338
|
objects: x = () => null
|
|
338
339
|
} = n, l = [], u = [];
|
|
339
|
-
let
|
|
340
|
-
for (let
|
|
340
|
+
let A = 0, y = 0;
|
|
341
|
+
for (let P = 0; P < o; P++) {
|
|
341
342
|
const E = [];
|
|
342
|
-
|
|
343
|
+
A = 0;
|
|
343
344
|
let L = 0;
|
|
344
345
|
for (let S = 0; S < t; S++) {
|
|
345
|
-
const
|
|
346
|
-
E.push(
|
|
347
|
-
st([
|
|
348
|
-
x:
|
|
346
|
+
const C = x(P, S), F = typeof r == "function" ? r(P, S) : r, z = typeof h == "function" ? h(P, S) : h;
|
|
347
|
+
E.push(C), C != null && u.push(
|
|
348
|
+
st([C], {
|
|
349
|
+
x: A,
|
|
349
350
|
y
|
|
350
351
|
})
|
|
351
|
-
),
|
|
352
|
+
), A += F + i, L = Math.max(L, z);
|
|
352
353
|
}
|
|
353
354
|
l.push(E), y += L + a;
|
|
354
355
|
}
|
|
@@ -357,20 +358,20 @@ function vn(n) {
|
|
|
357
358
|
x: c,
|
|
358
359
|
y: f,
|
|
359
360
|
height: y - a,
|
|
360
|
-
width:
|
|
361
|
+
width: A - i,
|
|
361
362
|
anchor: e,
|
|
362
363
|
...s
|
|
363
364
|
}),
|
|
364
365
|
objects: l
|
|
365
366
|
};
|
|
366
367
|
}
|
|
367
|
-
function
|
|
368
|
+
function mn(n = null) {
|
|
368
369
|
return s0({
|
|
369
370
|
objectType: j.IMAGE,
|
|
370
371
|
anchor: o0,
|
|
372
|
+
cornerRadius: 0,
|
|
371
373
|
height: 100,
|
|
372
374
|
imageId: "",
|
|
373
|
-
rounding: 0,
|
|
374
375
|
smooth: !0,
|
|
375
376
|
width: 100,
|
|
376
377
|
x: 0,
|
|
@@ -378,7 +379,7 @@ function wn(n = null) {
|
|
|
378
379
|
...n
|
|
379
380
|
});
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
+
function An(n = null) {
|
|
382
383
|
return s0({
|
|
383
384
|
objectType: j.LINE,
|
|
384
385
|
color: K,
|
|
@@ -393,7 +394,7 @@ function mn(n = null) {
|
|
|
393
394
|
...n
|
|
394
395
|
});
|
|
395
396
|
}
|
|
396
|
-
function
|
|
397
|
+
function Mn(n, e = null) {
|
|
397
398
|
return s0({
|
|
398
399
|
objectType: j.MASK,
|
|
399
400
|
anchor: o0,
|
|
@@ -430,22 +431,22 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
430
431
|
return e ? e.map(Number) : [];
|
|
431
432
|
}, "parseValues"), w0, Q = (w0 = class {
|
|
432
433
|
constructor(e, t, o, i) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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) => {
|
|
439
440
|
let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
440
441
|
t = Number.isNaN(t) ? 1 : t;
|
|
441
442
|
const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
|
|
442
443
|
return { x: this.x0 + o, y: this.y0 + i };
|
|
443
444
|
}, "getPointAtLength"));
|
|
444
|
-
|
|
445
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
445
446
|
const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
446
447
|
return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
|
|
447
448
|
}, "getTangentAtLength"));
|
|
448
|
-
|
|
449
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
449
450
|
const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
|
|
450
451
|
return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
|
|
451
452
|
}, "getPropertiesAtLength"));
|
|
@@ -453,23 +454,23 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
453
454
|
}
|
|
454
455
|
}, _(w0, "LinearPosition"), w0), m0, at = (m0 = class {
|
|
455
456
|
constructor(e, t, o, i, a, s, r, h, c) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
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) => {
|
|
468
469
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
469
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);
|
|
470
471
|
return { x: t.x, y: t.y };
|
|
471
472
|
}, "getPointAtLength"));
|
|
472
|
-
|
|
473
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
473
474
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
474
475
|
const t = 0.05, o = this.getPointAtLength(e);
|
|
475
476
|
let i;
|
|
@@ -477,7 +478,7 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
477
478
|
const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
|
|
478
479
|
return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
|
|
479
480
|
}, "getTangentAtLength"));
|
|
480
|
-
|
|
481
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
481
482
|
const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
|
|
482
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
483
484
|
}, "getPropertiesAtLength"));
|
|
@@ -496,11 +497,11 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
496
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
497
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));
|
|
498
499
|
u = u < 0 ? 0 : u;
|
|
499
|
-
const
|
|
500
|
-
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 });
|
|
501
502
|
!a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
|
|
502
|
-
const
|
|
503
|
-
return { x: Math.cos(h) * F - Math.sin(h) * z +
|
|
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 };
|
|
504
505
|
}, "pointOnEllipticalArc"), t1 = _((n, e) => {
|
|
505
506
|
n = n ?? 500;
|
|
506
507
|
let t = 0;
|
|
@@ -514,25 +515,25 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
514
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) => {
|
|
515
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)));
|
|
516
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
517
|
-
}, "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) => {
|
|
518
519
|
let o, i;
|
|
519
520
|
const a = t / 2;
|
|
520
521
|
o = 0;
|
|
521
|
-
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);
|
|
522
523
|
return a * o;
|
|
523
|
-
}, "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) => {
|
|
524
525
|
t === void 0 && (t = 1);
|
|
525
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;
|
|
526
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
527
|
-
const f = h / (2 * r), x = t + f, l = c / r - f * f, u = x * x + l > 0 ? Math.sqrt(x * x + l) : 0,
|
|
528
|
-
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);
|
|
529
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");
|
|
530
|
-
function
|
|
531
|
-
const o =
|
|
531
|
+
function It(n, e, t) {
|
|
532
|
+
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
532
533
|
return Math.sqrt(a);
|
|
533
534
|
}
|
|
534
|
-
_(
|
|
535
|
-
var
|
|
535
|
+
_(It, "BFunc");
|
|
536
|
+
var G0 = _((n, e, t) => {
|
|
536
537
|
const o = t.length - 1;
|
|
537
538
|
let i, a;
|
|
538
539
|
if (o === 0) return 0;
|
|
@@ -543,7 +544,7 @@ var $0 = _((n, e, t) => {
|
|
|
543
544
|
}
|
|
544
545
|
i = new Array(o);
|
|
545
546
|
for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
|
|
546
|
-
return
|
|
547
|
+
return G0(n - 1, e, i);
|
|
547
548
|
}, "getDerivative"), R0 = _((n, e, t) => {
|
|
548
549
|
let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
|
|
549
550
|
for (; o > 1e-3; ) {
|
|
@@ -556,69 +557,69 @@ var $0 = _((n, e, t) => {
|
|
|
556
557
|
if (s++, s > 500) break;
|
|
557
558
|
}
|
|
558
559
|
return i;
|
|
559
|
-
}, "t2length"),
|
|
560
|
+
}, "t2length"), A0, h0 = (A0 = class {
|
|
560
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
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) => {
|
|
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 = R0(e, this.length, (a) => this.getArcLength(t, o, a));
|
|
572
573
|
return this.getPoint(t, o, i);
|
|
573
574
|
}, "getPointAtLength"));
|
|
574
|
-
|
|
575
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
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 = 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);
|
|
576
577
|
let r;
|
|
577
578
|
return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
|
|
578
579
|
}, "getTangentAtLength"));
|
|
579
|
-
|
|
580
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
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 = 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);
|
|
581
582
|
let r;
|
|
582
583
|
r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
|
|
583
584
|
const h = this.getPoint(t, o, i);
|
|
584
585
|
return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
|
|
585
586
|
}, "getPropertiesAtLength"));
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
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);
|
|
589
590
|
}
|
|
590
|
-
}, _(
|
|
591
|
+
}, _(A0, "Bezier"), A0), M0, f1 = (M0 = class {
|
|
591
592
|
constructor(e) {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
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) => {
|
|
597
598
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
598
599
|
let t = this.partial_lengths.length - 1;
|
|
599
600
|
for (; this.partial_lengths[t] >= e && t > 0; ) t--;
|
|
600
601
|
return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
|
|
601
602
|
}, "getPartAtLength"));
|
|
602
|
-
|
|
603
|
-
|
|
603
|
+
k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
|
|
604
|
+
k(this, "getPointAtLength", _((e) => {
|
|
604
605
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
605
606
|
if (o) return o.getPointAtLength(t.fraction);
|
|
606
607
|
if (this.initial_point) return this.initial_point;
|
|
607
608
|
throw new Error("Wrong function at this part.");
|
|
608
609
|
}, "getPointAtLength"));
|
|
609
|
-
|
|
610
|
+
k(this, "getTangentAtLength", _((e) => {
|
|
610
611
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
611
612
|
if (o) return o.getTangentAtLength(t.fraction);
|
|
612
613
|
if (this.initial_point) return { x: 0, y: 0 };
|
|
613
614
|
throw new Error("Wrong function at this part.");
|
|
614
615
|
}, "getTangentAtLength"));
|
|
615
|
-
|
|
616
|
+
k(this, "getPropertiesAtLength", _((e) => {
|
|
616
617
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
617
618
|
if (o) return o.getPropertiesAtLength(t.fraction);
|
|
618
619
|
if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
|
|
619
620
|
throw new Error("Wrong function at this part.");
|
|
620
621
|
}, "getPropertiesAtLength"));
|
|
621
|
-
|
|
622
|
+
k(this, "getParts", _(() => {
|
|
622
623
|
const e = [];
|
|
623
624
|
for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
|
|
624
625
|
this.functions[t] = this.functions[t];
|
|
@@ -694,28 +695,28 @@ var $0 = _((n, e, t) => {
|
|
|
694
695
|
this.partial_lengths.push(this.length);
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
|
-
}, _(
|
|
698
|
+
}, _(M0, "SVGPathProperties"), M0), b0, W0 = (b0 = class {
|
|
698
699
|
constructor(e) {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
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"));
|
|
705
706
|
if (this.inst = new f1(e), !(this instanceof W0)) return new W0(e);
|
|
706
707
|
}
|
|
707
|
-
}, _(
|
|
708
|
-
function g1(n =
|
|
708
|
+
}, _(b0, "_svgPathProperties"), b0);
|
|
709
|
+
function g1(n = $.BLACK) {
|
|
709
710
|
return { ...n, alpha: 0 };
|
|
710
711
|
}
|
|
711
|
-
function
|
|
712
|
+
function bn(n = null) {
|
|
712
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();
|
|
713
714
|
return s0({
|
|
714
715
|
objectType: j.PATH,
|
|
715
716
|
anchor: o0,
|
|
716
|
-
|
|
717
|
+
strokeColor: K,
|
|
717
718
|
drawn: 1,
|
|
718
|
-
|
|
719
|
+
fillColor: g1(),
|
|
719
720
|
isRounded: !1,
|
|
720
721
|
height: t,
|
|
721
722
|
path: r,
|
|
@@ -729,38 +730,38 @@ function An(n = null) {
|
|
|
729
730
|
...s
|
|
730
731
|
});
|
|
731
732
|
}
|
|
732
|
-
function
|
|
733
|
+
function Ln(n = null) {
|
|
733
734
|
return s0({
|
|
734
735
|
objectType: j.POLYGON,
|
|
735
|
-
|
|
736
|
-
|
|
736
|
+
strokeColor: K,
|
|
737
|
+
strokeWidth: 0,
|
|
737
738
|
drawn: 1,
|
|
738
739
|
points: [
|
|
739
740
|
{ x: 0, y: 0 },
|
|
740
741
|
{ x: 100, y: 0 },
|
|
741
742
|
{ x: 100, y: 100 }
|
|
742
743
|
],
|
|
743
|
-
|
|
744
|
+
fillColor: K,
|
|
744
745
|
...n
|
|
745
746
|
});
|
|
746
747
|
}
|
|
747
|
-
function
|
|
748
|
+
function Tn(n = null) {
|
|
748
749
|
return s0({
|
|
749
750
|
objectType: j.RECTANGLE,
|
|
750
751
|
anchor: o0,
|
|
751
|
-
|
|
752
|
-
|
|
752
|
+
strokeColor: K,
|
|
753
|
+
strokeWidth: 0,
|
|
753
754
|
drawn: 1,
|
|
754
|
-
|
|
755
|
+
fillColor: K,
|
|
755
756
|
height: 100,
|
|
756
|
-
|
|
757
|
+
cornerRadius: 0,
|
|
757
758
|
width: 100,
|
|
758
759
|
x: 0,
|
|
759
760
|
y: 0,
|
|
760
761
|
...n
|
|
761
762
|
});
|
|
762
763
|
}
|
|
763
|
-
function
|
|
764
|
+
function Pn(n = null) {
|
|
764
765
|
return s0({
|
|
765
766
|
objectType: j.SVG,
|
|
766
767
|
anchor: o0,
|
|
@@ -806,7 +807,7 @@ function w1(n) {
|
|
|
806
807
|
function m1(n = "", e = null) {
|
|
807
808
|
return s0({
|
|
808
809
|
objectType: j.TEXT,
|
|
809
|
-
alignment:
|
|
810
|
+
alignment: Gt,
|
|
810
811
|
anchor: o0,
|
|
811
812
|
length: null,
|
|
812
813
|
lineSpacing: 1,
|
|
@@ -825,7 +826,7 @@ m1.writeOn = (n, e = {}) => et(
|
|
|
825
826
|
e
|
|
826
827
|
);
|
|
827
828
|
let Z = null;
|
|
828
|
-
function
|
|
829
|
+
function A1({ presentation: n, onNavigateToSlide: e }) {
|
|
829
830
|
if (Z !== null && !Z.closed) {
|
|
830
831
|
Z.focus();
|
|
831
832
|
return;
|
|
@@ -834,21 +835,21 @@ function b1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
834
835
|
console.error("Failed to open navigator window.");
|
|
835
836
|
return;
|
|
836
837
|
}
|
|
837
|
-
const t =
|
|
838
|
+
const t = M1(n, e);
|
|
838
839
|
Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
|
|
839
840
|
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
840
841
|
});
|
|
841
842
|
}
|
|
842
|
-
function
|
|
843
|
+
function M1(n, e) {
|
|
843
844
|
const t = document.createElement("div");
|
|
844
845
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
845
|
-
const a =
|
|
846
|
+
const a = b1(o, i);
|
|
846
847
|
a.style.cursor = "pointer", a.addEventListener("click", (s) => {
|
|
847
848
|
s.shiftKey && (Z == null || Z.close()), e(i);
|
|
848
849
|
}), t.appendChild(a);
|
|
849
850
|
}), t;
|
|
850
851
|
}
|
|
851
|
-
function
|
|
852
|
+
function b1(n, e) {
|
|
852
853
|
const t = document.createElement("div");
|
|
853
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;
|
|
854
855
|
}
|
|
@@ -862,7 +863,7 @@ function i0(n = null) {
|
|
|
862
863
|
const L1 = i0({ width: 0, height: 0 });
|
|
863
864
|
function T1(n = null) {
|
|
864
865
|
return {
|
|
865
|
-
backgroundColor:
|
|
866
|
+
backgroundColor: $.WHITE,
|
|
866
867
|
slides: [],
|
|
867
868
|
title: "Presentation",
|
|
868
869
|
size: i0({ width: 3840, height: 2160 }),
|
|
@@ -917,16 +918,16 @@ const S1 = {
|
|
|
917
918
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
918
919
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
919
920
|
})
|
|
920
|
-
},
|
|
921
|
+
}, k1 = {
|
|
921
922
|
check: (n) => !0,
|
|
922
923
|
interpolate: (n, e) => e
|
|
923
|
-
},
|
|
924
|
+
}, I1 = {
|
|
924
925
|
check: (n) => typeof n == "number",
|
|
925
926
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
926
927
|
}, ft = [
|
|
927
|
-
|
|
928
|
+
I1,
|
|
928
929
|
S1,
|
|
929
|
-
|
|
930
|
+
k1
|
|
930
931
|
];
|
|
931
932
|
function _1(n, e, t, o = null) {
|
|
932
933
|
if (t === 0)
|
|
@@ -1182,18 +1183,18 @@ function z1(n) {
|
|
|
1182
1183
|
};
|
|
1183
1184
|
}
|
|
1184
1185
|
function U1(n) {
|
|
1185
|
-
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,
|
|
1186
|
-
x: S.x - F * Math.cos(x -
|
|
1187
|
-
y: S.y - F * Math.sin(x -
|
|
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)
|
|
1188
1189
|
}, W = {
|
|
1189
|
-
x: S.x - F * Math.cos(x +
|
|
1190
|
-
y: S.y - F * Math.sin(x +
|
|
1190
|
+
x: S.x - F * Math.cos(x + C),
|
|
1191
|
+
y: S.y - F * Math.sin(x + C)
|
|
1191
1192
|
}, U = {
|
|
1192
|
-
x: L.x + F * Math.cos(x -
|
|
1193
|
-
y: L.y + F * Math.sin(x -
|
|
1193
|
+
x: L.x + F * Math.cos(x - C),
|
|
1194
|
+
y: L.y + F * Math.sin(x - C)
|
|
1194
1195
|
}, X = {
|
|
1195
|
-
x: L.x + F * Math.cos(x +
|
|
1196
|
-
y: L.y + F * Math.sin(x +
|
|
1196
|
+
x: L.x + F * Math.cos(x + C),
|
|
1197
|
+
y: L.y + F * Math.sin(x + C)
|
|
1197
1198
|
};
|
|
1198
1199
|
return {
|
|
1199
1200
|
arrowPoints: [L, S],
|
|
@@ -1317,7 +1318,7 @@ const Y1 = ({
|
|
|
1317
1318
|
}
|
|
1318
1319
|
};
|
|
1319
1320
|
function X1(n, e) {
|
|
1320
|
-
const t = n.radius - n.
|
|
1321
|
+
const t = n.radius - n.strokeWidth / 2;
|
|
1321
1322
|
if (t <= 0)
|
|
1322
1323
|
return;
|
|
1323
1324
|
const o = e(), i = -Math.PI / 2;
|
|
@@ -1341,29 +1342,29 @@ function Ft(n, e) {
|
|
|
1341
1342
|
r0(n);
|
|
1342
1343
|
}
|
|
1343
1344
|
}
|
|
1344
|
-
const
|
|
1345
|
+
const $1 = ({
|
|
1345
1346
|
ctx: n,
|
|
1346
1347
|
object: e,
|
|
1347
1348
|
opacity: t,
|
|
1348
1349
|
createPath2D: o
|
|
1349
1350
|
}) => {
|
|
1350
1351
|
const i = e.opacity * t;
|
|
1351
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1352
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1352
1353
|
return;
|
|
1353
1354
|
const { path: a, length: s } = H1(e, o);
|
|
1354
|
-
if (i < 1 && e.
|
|
1355
|
+
if (i < 1 && e.strokeWidth > 0) {
|
|
1355
1356
|
const r = X1(e, o);
|
|
1356
|
-
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.
|
|
1357
|
+
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1357
1358
|
} else
|
|
1358
|
-
v0({ ctx: n, path: a, color: e.
|
|
1359
|
+
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1359
1360
|
y0({
|
|
1360
|
-
color: e.
|
|
1361
|
+
color: e.strokeColor,
|
|
1361
1362
|
ctx: n,
|
|
1362
1363
|
drawn: e.drawn,
|
|
1363
1364
|
path: a,
|
|
1364
1365
|
pathLength: s,
|
|
1365
1366
|
opacity: i,
|
|
1366
|
-
width: e.
|
|
1367
|
+
width: e.strokeWidth
|
|
1367
1368
|
});
|
|
1368
1369
|
};
|
|
1369
1370
|
function H(n = null) {
|
|
@@ -1373,10 +1374,10 @@ function H(n = null) {
|
|
|
1373
1374
|
...n
|
|
1374
1375
|
};
|
|
1375
1376
|
}
|
|
1376
|
-
const
|
|
1377
|
+
const G1 = H();
|
|
1377
1378
|
function l0(n = null) {
|
|
1378
1379
|
return {
|
|
1379
|
-
origin:
|
|
1380
|
+
origin: G1,
|
|
1380
1381
|
size: L1,
|
|
1381
1382
|
...n
|
|
1382
1383
|
};
|
|
@@ -1457,8 +1458,8 @@ const W1 = ({
|
|
|
1457
1458
|
0,
|
|
1458
1459
|
0
|
|
1459
1460
|
), n.context.translate(-f, -x);
|
|
1460
|
-
for (const
|
|
1461
|
-
t(
|
|
1461
|
+
for (const A of e.objects)
|
|
1462
|
+
t(A, o * e.opacity);
|
|
1462
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();
|
|
1463
1464
|
}
|
|
1464
1465
|
};
|
|
@@ -1502,11 +1503,11 @@ const S0 = {
|
|
|
1502
1503
|
i0({ width: t.width, height: t.height })
|
|
1503
1504
|
), s = e[t.imageId];
|
|
1504
1505
|
if (s !== void 0) {
|
|
1505
|
-
if (n.context.save(), t.
|
|
1506
|
+
if (n.context.save(), t.cornerRadius > 0) {
|
|
1506
1507
|
const r = rt(
|
|
1507
1508
|
a.origin,
|
|
1508
1509
|
a.size,
|
|
1509
|
-
t.
|
|
1510
|
+
t.cornerRadius,
|
|
1510
1511
|
i
|
|
1511
1512
|
);
|
|
1512
1513
|
switch (n.type) {
|
|
@@ -1584,7 +1585,7 @@ const K1 = ({
|
|
|
1584
1585
|
e.anchor,
|
|
1585
1586
|
i0({ width: e.width, height: e.height })
|
|
1586
1587
|
);
|
|
1587
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = E0(
|
|
1588
|
+
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = E0($.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
|
|
1588
1589
|
for (const a of e.objects)
|
|
1589
1590
|
o(a, t * e.opacity);
|
|
1590
1591
|
n.context.restore();
|
|
@@ -1595,7 +1596,7 @@ const K1 = ({
|
|
|
1595
1596
|
createPath2D: o
|
|
1596
1597
|
}) => {
|
|
1597
1598
|
const i = e.opacity * t;
|
|
1598
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1599
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1599
1600
|
return;
|
|
1600
1601
|
const { origin: a } = g0(
|
|
1601
1602
|
H({ x: e.x, y: e.y }),
|
|
@@ -1605,10 +1606,10 @@ const K1 = ({
|
|
|
1605
1606
|
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), v0({
|
|
1606
1607
|
ctx: n,
|
|
1607
1608
|
path: s,
|
|
1608
|
-
color: e.
|
|
1609
|
+
color: e.fillColor,
|
|
1609
1610
|
opacity: i
|
|
1610
1611
|
}), y0({
|
|
1611
|
-
color: e.
|
|
1612
|
+
color: e.strokeColor,
|
|
1612
1613
|
ctx: n,
|
|
1613
1614
|
drawn: e.drawn,
|
|
1614
1615
|
isRounded: e.isRounded,
|
|
@@ -1646,35 +1647,35 @@ const ee = ({
|
|
|
1646
1647
|
createPath2D: o
|
|
1647
1648
|
}) => {
|
|
1648
1649
|
const i = e.opacity * t;
|
|
1649
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1650
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1650
1651
|
return;
|
|
1651
1652
|
const { path: a, length: s } = te(e, o);
|
|
1652
1653
|
v0({
|
|
1653
1654
|
ctx: n,
|
|
1654
1655
|
path: a,
|
|
1655
|
-
color: e.
|
|
1656
|
+
color: e.fillColor,
|
|
1656
1657
|
opacity: i
|
|
1657
1658
|
}), y0({
|
|
1658
|
-
color: e.
|
|
1659
|
+
color: e.strokeColor,
|
|
1659
1660
|
ctx: n,
|
|
1660
1661
|
drawn: e.drawn,
|
|
1661
1662
|
path: a,
|
|
1662
1663
|
pathLength: s,
|
|
1663
1664
|
opacity: i,
|
|
1664
|
-
width: e.
|
|
1665
|
+
width: e.strokeWidth
|
|
1665
1666
|
});
|
|
1666
1667
|
};
|
|
1667
1668
|
function ne(n, e) {
|
|
1668
|
-
const t = n.
|
|
1669
|
+
const t = n.strokeWidth / 2, { origin: o, size: i } = g0(
|
|
1669
1670
|
H({ x: n.x, y: n.y }),
|
|
1670
1671
|
n.anchor,
|
|
1671
1672
|
i0({ width: n.width, height: n.height })
|
|
1672
|
-
), a = i.width - n.
|
|
1673
|
+
), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
|
|
1673
1674
|
if (a <= 0 || s <= 0)
|
|
1674
1675
|
return;
|
|
1675
1676
|
const r = H({ x: o.x + t, y: o.y + t }), h = i0({ width: a, height: s }), c = Math.max(
|
|
1676
1677
|
0,
|
|
1677
|
-
Math.min(n.
|
|
1678
|
+
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1678
1679
|
);
|
|
1679
1680
|
if (c > 0)
|
|
1680
1681
|
return rt(r, h, c, e).path;
|
|
@@ -1686,7 +1687,10 @@ function re(n, e) {
|
|
|
1686
1687
|
H({ x: n.x, y: n.y }),
|
|
1687
1688
|
n.anchor,
|
|
1688
1689
|
i0({ width: n.width, height: n.height })
|
|
1689
|
-
), 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);
|
|
1690
1694
|
if (i > 0)
|
|
1691
1695
|
return rt(t, o, i, e, a);
|
|
1692
1696
|
{
|
|
@@ -1703,22 +1707,22 @@ const ie = ({
|
|
|
1703
1707
|
createPath2D: o
|
|
1704
1708
|
}) => {
|
|
1705
1709
|
const i = e.opacity * t;
|
|
1706
|
-
if (i === 0 || e.drawn === 0 && e.
|
|
1710
|
+
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1707
1711
|
return;
|
|
1708
1712
|
const { path: a, length: s } = re(e, o);
|
|
1709
|
-
if (i < 1 && e.
|
|
1713
|
+
if (i < 1 && e.strokeWidth > 0) {
|
|
1710
1714
|
const r = ne(e, o);
|
|
1711
|
-
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.
|
|
1715
|
+
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1712
1716
|
} else
|
|
1713
|
-
v0({ ctx: n, path: a, color: e.
|
|
1717
|
+
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1714
1718
|
y0({
|
|
1715
|
-
color: e.
|
|
1719
|
+
color: e.strokeColor,
|
|
1716
1720
|
ctx: n,
|
|
1717
1721
|
drawn: e.drawn,
|
|
1718
1722
|
path: a,
|
|
1719
1723
|
pathLength: s,
|
|
1720
1724
|
opacity: i,
|
|
1721
|
-
width: e.
|
|
1725
|
+
width: e.strokeWidth
|
|
1722
1726
|
});
|
|
1723
1727
|
}, oe = ({
|
|
1724
1728
|
ctx: n,
|
|
@@ -1815,22 +1819,22 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1815
1819
|
return;
|
|
1816
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);
|
|
1817
1821
|
let f = c.origin.x, x = c.origin.y, l = 0, u = 0;
|
|
1818
|
-
for (let
|
|
1819
|
-
const y = a[
|
|
1820
|
-
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) {
|
|
1821
1825
|
console.error("Could not determine text units or sizes for line");
|
|
1822
1826
|
continue;
|
|
1823
1827
|
}
|
|
1824
|
-
const
|
|
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);
|
|
1825
1829
|
switch (e.alignment) {
|
|
1826
1830
|
case x0.LEFT:
|
|
1827
1831
|
f = c.origin.x;
|
|
1828
1832
|
break;
|
|
1829
1833
|
case x0.CENTER:
|
|
1830
|
-
f = c.origin.x + (c.size.width -
|
|
1834
|
+
f = c.origin.x + (c.size.width - P) / 2;
|
|
1831
1835
|
break;
|
|
1832
1836
|
case x0.RIGHT:
|
|
1833
|
-
f = c.origin.x + (c.size.width -
|
|
1837
|
+
f = c.origin.x + (c.size.width - P);
|
|
1834
1838
|
break;
|
|
1835
1839
|
default:
|
|
1836
1840
|
r0(e.alignment);
|
|
@@ -1838,8 +1842,8 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1838
1842
|
}
|
|
1839
1843
|
x += E + u * (e.lineSpacing - 1), u = E;
|
|
1840
1844
|
for (let L = 0; L < y.length && !(i !== null && l >= i); L++) {
|
|
1841
|
-
const S = y[L],
|
|
1842
|
-
if (S == null ||
|
|
1845
|
+
const S = y[L], C = b[L];
|
|
1846
|
+
if (S == null || C == null) {
|
|
1843
1847
|
console.error("Could not determine text unit or size for unit");
|
|
1844
1848
|
continue;
|
|
1845
1849
|
}
|
|
@@ -1852,12 +1856,12 @@ const ce = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1852
1856
|
const U = W ?? F;
|
|
1853
1857
|
l += U.length;
|
|
1854
1858
|
const X = { ...s, ...z };
|
|
1855
|
-
Rt(n, X, o), n.context.fillText(U, f, x), f +=
|
|
1859
|
+
Rt(n, X, o), n.context.fillText(U, f, x), f += C.width;
|
|
1856
1860
|
}
|
|
1857
1861
|
}
|
|
1858
1862
|
}, ue = {
|
|
1859
1863
|
[j.ARROW]: Y1,
|
|
1860
|
-
[j.CIRCLE]:
|
|
1864
|
+
[j.CIRCLE]: $1,
|
|
1861
1865
|
[j.GROUP]: W1,
|
|
1862
1866
|
[j.IMAGE]: Z1,
|
|
1863
1867
|
[j.LINE]: K1,
|
|
@@ -1918,9 +1922,9 @@ async function pe(n) {
|
|
|
1918
1922
|
}
|
|
1919
1923
|
return e;
|
|
1920
1924
|
}
|
|
1921
|
-
class
|
|
1925
|
+
class Cn {
|
|
1922
1926
|
constructor(e) {
|
|
1923
|
-
const { objectRenderers: t,
|
|
1927
|
+
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1924
1928
|
this.props = {
|
|
1925
1929
|
presentation: T1(),
|
|
1926
1930
|
element: document.body,
|
|
@@ -1929,81 +1933,88 @@ class Pn {
|
|
|
1929
1933
|
...t
|
|
1930
1934
|
},
|
|
1931
1935
|
cacheDurationMinutes: 15,
|
|
1932
|
-
|
|
1936
|
+
scale: de(o),
|
|
1937
|
+
...i
|
|
1933
1938
|
}, this.state = { ...pt };
|
|
1934
1939
|
}
|
|
1935
1940
|
/** Starts the presentation. */
|
|
1936
1941
|
async present() {
|
|
1937
|
-
const { presentation: e, element: t } = this.props,
|
|
1938
|
-
this.state = {
|
|
1942
|
+
const { presentation: e, element: t, scale: o } = this.props, i = j1(e.size), a = fe(e.size);
|
|
1943
|
+
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1939
1944
|
...pt,
|
|
1940
1945
|
imageById: await pe({
|
|
1941
1946
|
...e.resources.images,
|
|
1942
1947
|
...F1(e)
|
|
1943
1948
|
}),
|
|
1944
|
-
canvas:
|
|
1945
|
-
extrasContainer:
|
|
1949
|
+
canvas: i,
|
|
1950
|
+
extrasContainer: a
|
|
1946
1951
|
};
|
|
1947
|
-
const
|
|
1952
|
+
const s = E1(e, t);
|
|
1948
1953
|
N1(e, t, this.state.shortcutState, {
|
|
1949
|
-
onNext: (
|
|
1950
|
-
onPrevious: (
|
|
1951
|
-
onRenderSlide: (
|
|
1954
|
+
onNext: (h) => this.next(h),
|
|
1955
|
+
onPrevious: (h) => this.previous(h),
|
|
1956
|
+
onRenderSlide: (h, c) => {
|
|
1952
1957
|
this.state.shortcutState.shortcuts.b = {
|
|
1953
1958
|
slideIndex: this.state.slideIndex,
|
|
1954
1959
|
buildIndex: this.state.buildIndex
|
|
1955
|
-
}, this.renderSlide(
|
|
1960
|
+
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1956
1961
|
},
|
|
1957
|
-
onShowNavigator: () =>
|
|
1962
|
+
onShowNavigator: () => A1({
|
|
1958
1963
|
presentation: e,
|
|
1959
|
-
onNavigateToSlide: (
|
|
1964
|
+
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1960
1965
|
})
|
|
1961
|
-
}), t.replaceChildren(),
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1966
|
+
}), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
1967
|
+
const r = q1(e, this.props.cacheDurationMinutes);
|
|
1968
|
+
r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
|
|
1964
1969
|
}
|
|
1965
1970
|
renderSlide(e, t = 0, o = null) {
|
|
1966
|
-
const { objectRenderers: i, presentation: a } = this.props, { canvas:
|
|
1971
|
+
const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
|
|
1967
1972
|
this.state.slideIndex = e, this.state.buildIndex = t, o === null && B1({ title: a.title, slideIndex: e, buildIndex: t });
|
|
1968
|
-
const
|
|
1969
|
-
if (
|
|
1973
|
+
const f = a.slides[e];
|
|
1974
|
+
if (f === void 0 || r === null)
|
|
1970
1975
|
return;
|
|
1971
|
-
if (
|
|
1972
|
-
for (const
|
|
1973
|
-
|
|
1976
|
+
if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
|
|
1977
|
+
for (const b of this.state.mountedExtrasCleanups)
|
|
1978
|
+
b();
|
|
1974
1979
|
this.state.mountedExtrasCleanups = [];
|
|
1975
|
-
for (const
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1980
|
+
for (const b of f.extras) {
|
|
1981
|
+
const P = ge(this.state.extrasContainer, b);
|
|
1982
|
+
P !== null && this.state.mountedExtrasCleanups.push(P);
|
|
1978
1983
|
}
|
|
1979
1984
|
}
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
1985
|
+
const x = r.getContext("2d");
|
|
1986
|
+
if (x === null)
|
|
1982
1987
|
return;
|
|
1983
|
-
const
|
|
1988
|
+
const l = {
|
|
1984
1989
|
type: V.Browser,
|
|
1985
|
-
context:
|
|
1990
|
+
context: x
|
|
1986
1991
|
};
|
|
1987
|
-
D1(
|
|
1988
|
-
const
|
|
1989
|
-
slide:
|
|
1992
|
+
D1(r, l);
|
|
1993
|
+
const u = O1({
|
|
1994
|
+
slide: f,
|
|
1990
1995
|
buildIndex: t,
|
|
1991
1996
|
buildTime: o
|
|
1992
1997
|
});
|
|
1993
|
-
|
|
1994
|
-
function
|
|
1995
|
-
const
|
|
1996
|
-
|
|
1997
|
-
ctx:
|
|
1998
|
-
imageById:
|
|
1999
|
-
object:
|
|
2000
|
-
opacity:
|
|
2001
|
-
renderObject:
|
|
1998
|
+
l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
|
|
1999
|
+
function A(b, P) {
|
|
2000
|
+
const E = i[b.objectType], L = u.get(b);
|
|
2001
|
+
E === void 0 || L === void 0 || E({
|
|
2002
|
+
ctx: l,
|
|
2003
|
+
imageById: h,
|
|
2004
|
+
object: L,
|
|
2005
|
+
opacity: P,
|
|
2006
|
+
renderObject: A,
|
|
2002
2007
|
createPath2D: z1
|
|
2003
2008
|
});
|
|
2004
2009
|
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2010
|
+
const y = s !== 1;
|
|
2011
|
+
y && (l.context.save(), l.context.translate(
|
|
2012
|
+
r.width * (1 - s) / 2,
|
|
2013
|
+
r.height * (1 - s) / 2
|
|
2014
|
+
), l.context.scale(s, s));
|
|
2015
|
+
for (const b of f.objects)
|
|
2016
|
+
A(b, 1);
|
|
2017
|
+
y && l.context.restore();
|
|
2007
2018
|
}
|
|
2008
2019
|
next(e = !1) {
|
|
2009
2020
|
const { presentation: t } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
|
|
@@ -2031,7 +2042,12 @@ class Pn {
|
|
|
2031
2042
|
this.renderSlide(0, 0);
|
|
2032
2043
|
}
|
|
2033
2044
|
}
|
|
2034
|
-
function
|
|
2045
|
+
function de(n) {
|
|
2046
|
+
return n <= 0 || n > 1 ? (console.warn(
|
|
2047
|
+
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2048
|
+
), 1) : n;
|
|
2049
|
+
}
|
|
2050
|
+
function En(n = 1e3) {
|
|
2035
2051
|
return {
|
|
2036
2052
|
type: u0.PAUSE,
|
|
2037
2053
|
isKey: !1,
|
|
@@ -2039,7 +2055,7 @@ function Cn(n = 1e3) {
|
|
|
2039
2055
|
shortcut: null
|
|
2040
2056
|
};
|
|
2041
2057
|
}
|
|
2042
|
-
function
|
|
2058
|
+
function Sn(n = null) {
|
|
2043
2059
|
return {
|
|
2044
2060
|
objects: [],
|
|
2045
2061
|
animations: [],
|
|
@@ -2052,30 +2068,30 @@ function En(n = null) {
|
|
|
2052
2068
|
...n
|
|
2053
2069
|
};
|
|
2054
2070
|
}
|
|
2055
|
-
function
|
|
2071
|
+
function kn(n, e = {}) {
|
|
2056
2072
|
return {
|
|
2057
2073
|
...e,
|
|
2058
2074
|
text: n
|
|
2059
2075
|
};
|
|
2060
2076
|
}
|
|
2061
|
-
function In(n =
|
|
2077
|
+
function In(n = $.BLACK) {
|
|
2062
2078
|
return { ...n, alpha: 1 };
|
|
2063
2079
|
}
|
|
2064
|
-
function
|
|
2080
|
+
function xe(n) {
|
|
2065
2081
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2066
2082
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2067
2083
|
return a / 2;
|
|
2068
2084
|
}
|
|
2069
|
-
function
|
|
2085
|
+
function ye(n) {
|
|
2070
2086
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2071
2087
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2072
2088
|
return h;
|
|
2073
2089
|
}
|
|
2074
|
-
function
|
|
2090
|
+
function ve(n) {
|
|
2075
2091
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2076
2092
|
}
|
|
2077
2093
|
var B0, dt;
|
|
2078
|
-
function
|
|
2094
|
+
function we() {
|
|
2079
2095
|
if (dt) return B0;
|
|
2080
2096
|
dt = 1;
|
|
2081
2097
|
var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, e = [
|
|
@@ -2139,69 +2155,69 @@ function ve() {
|
|
|
2139
2155
|
u.index++;
|
|
2140
2156
|
}
|
|
2141
2157
|
function c(u) {
|
|
2142
|
-
var
|
|
2143
|
-
if (
|
|
2158
|
+
var A = u.path.charCodeAt(u.index);
|
|
2159
|
+
if (A === 48) {
|
|
2144
2160
|
u.param = 0, u.index++;
|
|
2145
2161
|
return;
|
|
2146
2162
|
}
|
|
2147
|
-
if (
|
|
2163
|
+
if (A === 49) {
|
|
2148
2164
|
u.param = 1, u.index++;
|
|
2149
2165
|
return;
|
|
2150
2166
|
}
|
|
2151
2167
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2152
2168
|
}
|
|
2153
2169
|
function f(u) {
|
|
2154
|
-
var
|
|
2155
|
-
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) {
|
|
2156
2172
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2157
2173
|
return;
|
|
2158
2174
|
}
|
|
2159
|
-
if (
|
|
2175
|
+
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < b ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
|
|
2160
2176
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2161
2177
|
return;
|
|
2162
2178
|
}
|
|
2163
|
-
if (
|
|
2164
|
-
if (
|
|
2165
|
-
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " +
|
|
2179
|
+
if (C !== 46) {
|
|
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 + ")";
|
|
2166
2182
|
return;
|
|
2167
2183
|
}
|
|
2168
|
-
for (; y <
|
|
2184
|
+
for (; y < b && a(u.path.charCodeAt(y)); )
|
|
2169
2185
|
y++, E = !0;
|
|
2170
|
-
|
|
2186
|
+
C = y < b ? u.path.charCodeAt(y) : 0;
|
|
2171
2187
|
}
|
|
2172
|
-
if (
|
|
2188
|
+
if (C === 46) {
|
|
2173
2189
|
for (S = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2174
2190
|
y++, L = !0;
|
|
2175
|
-
|
|
2191
|
+
C = y < b ? u.path.charCodeAt(y) : 0;
|
|
2176
2192
|
}
|
|
2177
|
-
if (
|
|
2193
|
+
if (C === 101 || C === 69) {
|
|
2178
2194
|
if (S && !E && !L) {
|
|
2179
2195
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2180
2196
|
return;
|
|
2181
2197
|
}
|
|
2182
|
-
if (y++,
|
|
2183
|
-
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)); )
|
|
2184
2200
|
y++;
|
|
2185
2201
|
else {
|
|
2186
2202
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2187
2203
|
return;
|
|
2188
2204
|
}
|
|
2189
2205
|
}
|
|
2190
|
-
u.index = y, u.param = parseFloat(u.path.slice(
|
|
2206
|
+
u.index = y, u.param = parseFloat(u.path.slice(A, y)) + 0;
|
|
2191
2207
|
}
|
|
2192
2208
|
function x(u) {
|
|
2193
|
-
var
|
|
2194
|
-
|
|
2195
|
-
var
|
|
2196
|
-
if (y === "m" &&
|
|
2197
|
-
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));
|
|
2198
2214
|
else
|
|
2199
|
-
for (;
|
|
2215
|
+
for (; b.length >= n[y] && (u.result.push([A].concat(b.splice(0, n[y]))), !!n[y]); )
|
|
2200
2216
|
;
|
|
2201
2217
|
}
|
|
2202
2218
|
function l(u) {
|
|
2203
|
-
var
|
|
2204
|
-
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)) {
|
|
2205
2221
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2206
2222
|
return;
|
|
2207
2223
|
}
|
|
@@ -2209,22 +2225,22 @@ function ve() {
|
|
|
2209
2225
|
x(u);
|
|
2210
2226
|
return;
|
|
2211
2227
|
}
|
|
2212
|
-
for (
|
|
2228
|
+
for (P = !1; ; ) {
|
|
2213
2229
|
for (L = E; L > 0; L--) {
|
|
2214
|
-
if (
|
|
2230
|
+
if (b && (L === 3 || L === 4) ? c(u) : f(u), u.err.length) {
|
|
2215
2231
|
x(u);
|
|
2216
2232
|
return;
|
|
2217
2233
|
}
|
|
2218
|
-
u.data.push(u.param), h(u),
|
|
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);
|
|
2219
2235
|
}
|
|
2220
|
-
if (!
|
|
2236
|
+
if (!P && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2221
2237
|
break;
|
|
2222
2238
|
}
|
|
2223
2239
|
x(u);
|
|
2224
2240
|
}
|
|
2225
|
-
return B0 = function(
|
|
2226
|
-
var y = new r(
|
|
2227
|
-
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; )
|
|
2228
2244
|
l(y);
|
|
2229
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"), {
|
|
2230
2246
|
err: y.err,
|
|
@@ -2283,7 +2299,7 @@ function Nt() {
|
|
|
2283
2299
|
}, D0 = e, D0;
|
|
2284
2300
|
}
|
|
2285
2301
|
var j0, yt;
|
|
2286
|
-
function
|
|
2302
|
+
function me() {
|
|
2287
2303
|
if (yt) return j0;
|
|
2288
2304
|
yt = 1;
|
|
2289
2305
|
var n = Nt(), e = {
|
|
@@ -2329,7 +2345,7 @@ function we() {
|
|
|
2329
2345
|
}, j0;
|
|
2330
2346
|
}
|
|
2331
2347
|
var z0, vt;
|
|
2332
|
-
function
|
|
2348
|
+
function Ae() {
|
|
2333
2349
|
if (vt) return z0;
|
|
2334
2350
|
vt = 1;
|
|
2335
2351
|
var n = Math.PI * 2;
|
|
@@ -2338,9 +2354,9 @@ function me() {
|
|
|
2338
2354
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2339
2355
|
}
|
|
2340
2356
|
function t(i, a, s, r, h, c, f, x, l, u) {
|
|
2341
|
-
var
|
|
2342
|
-
S < 0 && (S = 0), S /=
|
|
2343
|
-
var
|
|
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);
|
|
2344
2360
|
return c === 0 && J > 0 && (J -= n), c === 1 && J < 0 && (J += n), [z, W, c0, J];
|
|
2345
2361
|
}
|
|
2346
2362
|
function o(i, a) {
|
|
@@ -2348,23 +2364,23 @@ function me() {
|
|
|
2348
2364
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2349
2365
|
}
|
|
2350
2366
|
return z0 = function(a, s, r, h, c, f, x, l, u) {
|
|
2351
|
-
var
|
|
2352
|
-
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)
|
|
2353
2369
|
return [];
|
|
2354
2370
|
if (x === 0 || l === 0)
|
|
2355
2371
|
return [];
|
|
2356
2372
|
x = Math.abs(x), l = Math.abs(l);
|
|
2357
|
-
var E =
|
|
2373
|
+
var E = b * b / (x * x) + P * P / (l * l);
|
|
2358
2374
|
E > 1 && (x *= Math.sqrt(E), l *= Math.sqrt(E));
|
|
2359
|
-
var L = t(a, s, r, h, c, f, x, l,
|
|
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);
|
|
2360
2376
|
F /= z;
|
|
2361
2377
|
for (var W = 0; W < z; W++)
|
|
2362
|
-
S.push(o(
|
|
2378
|
+
S.push(o(C, F)), C += F;
|
|
2363
2379
|
return S.map(function(U) {
|
|
2364
2380
|
for (var X = 0; X < U.length; X += 2) {
|
|
2365
2381
|
var a0 = U[X + 0], p0 = U[X + 1];
|
|
2366
2382
|
a0 *= x, p0 *= l;
|
|
2367
|
-
var c0 = y * a0 -
|
|
2383
|
+
var c0 = y * a0 - A * p0, J = A * a0 + y * p0;
|
|
2368
2384
|
U[X + 0] = c0 + L[0], U[X + 1] = J + L[1];
|
|
2369
2385
|
}
|
|
2370
2386
|
return U;
|
|
@@ -2372,7 +2388,7 @@ function me() {
|
|
|
2372
2388
|
}, z0;
|
|
2373
2389
|
}
|
|
2374
2390
|
var U0, wt;
|
|
2375
|
-
function
|
|
2391
|
+
function Me() {
|
|
2376
2392
|
if (wt) return U0;
|
|
2377
2393
|
wt = 1;
|
|
2378
2394
|
var n = 1e-10, e = Math.PI / 180;
|
|
@@ -2401,10 +2417,10 @@ function be() {
|
|
|
2401
2417
|
}, U0 = t, U0;
|
|
2402
2418
|
}
|
|
2403
2419
|
var Y0, mt;
|
|
2404
|
-
function
|
|
2420
|
+
function be() {
|
|
2405
2421
|
if (mt) return Y0;
|
|
2406
2422
|
mt = 1;
|
|
2407
|
-
var n =
|
|
2423
|
+
var n = we(), e = me(), t = Nt(), o = Ae(), i = Me();
|
|
2408
2424
|
function a(s) {
|
|
2409
2425
|
if (!(this instanceof a))
|
|
2410
2426
|
return new a(s);
|
|
@@ -2425,38 +2441,38 @@ function Ae() {
|
|
|
2425
2441
|
}, a.prototype.__matrix = function(s) {
|
|
2426
2442
|
var r = this, h;
|
|
2427
2443
|
s.queue.length && this.iterate(function(c, f, x, l) {
|
|
2428
|
-
var u,
|
|
2444
|
+
var u, A, y, b;
|
|
2429
2445
|
switch (c[0]) {
|
|
2430
2446
|
// Process 'assymetric' commands separately
|
|
2431
2447
|
case "v":
|
|
2432
|
-
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]];
|
|
2433
2449
|
break;
|
|
2434
2450
|
case "V":
|
|
2435
|
-
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]];
|
|
2436
2452
|
break;
|
|
2437
2453
|
case "h":
|
|
2438
|
-
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]];
|
|
2439
2455
|
break;
|
|
2440
2456
|
case "H":
|
|
2441
|
-
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]];
|
|
2442
2458
|
break;
|
|
2443
2459
|
case "a":
|
|
2444
2460
|
case "A":
|
|
2445
|
-
var
|
|
2446
|
-
if (
|
|
2447
|
-
|
|
2461
|
+
var P = s.toArray(), E = i(c[1], c[2], c[3]).transform(P);
|
|
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) {
|
|
2463
|
+
A = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2448
2464
|
break;
|
|
2449
2465
|
}
|
|
2450
|
-
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]];
|
|
2451
2467
|
break;
|
|
2452
2468
|
case "m":
|
|
2453
|
-
|
|
2469
|
+
b = f > 0, u = s.calc(c[1], c[2], b), A = ["m", u[0], u[1]];
|
|
2454
2470
|
break;
|
|
2455
2471
|
default:
|
|
2456
|
-
for (y = c[0],
|
|
2457
|
-
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]);
|
|
2458
2474
|
}
|
|
2459
|
-
r.segments[f] =
|
|
2475
|
+
r.segments[f] = A;
|
|
2460
2476
|
}, !0);
|
|
2461
2477
|
}, a.prototype.__evaluateStack = function() {
|
|
2462
2478
|
var s, r;
|
|
@@ -2476,8 +2492,8 @@ function Ae() {
|
|
|
2476
2492
|
var x = this.segments[c], l = x[0];
|
|
2477
2493
|
l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
|
|
2478
2494
|
for (var u = 1; u < x.length; u++) {
|
|
2479
|
-
var
|
|
2480
|
-
u === 1 ? h &&
|
|
2495
|
+
var A = x[u];
|
|
2496
|
+
u === 1 ? h && A >= 0 && (s += " ") : A >= 0 && (s += " "), s += A;
|
|
2481
2497
|
}
|
|
2482
2498
|
r = l;
|
|
2483
2499
|
}
|
|
@@ -2522,47 +2538,47 @@ function Ae() {
|
|
|
2522
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);
|
|
2523
2539
|
return;
|
|
2524
2540
|
default:
|
|
2525
|
-
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) {
|
|
2526
2542
|
y && (l[y] = +l[y].toFixed(s));
|
|
2527
2543
|
});
|
|
2528
2544
|
return;
|
|
2529
2545
|
}
|
|
2530
2546
|
}), this;
|
|
2531
2547
|
}, a.prototype.iterate = function(s, r) {
|
|
2532
|
-
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;
|
|
2533
2549
|
if (r || this.__evaluateStack(), h.forEach(function(E, L) {
|
|
2534
2550
|
var S = s(E, L, x, l);
|
|
2535
2551
|
Array.isArray(S) && (c[L] = S, f = !0);
|
|
2536
|
-
var
|
|
2552
|
+
var C = E[0] === E[0].toLowerCase();
|
|
2537
2553
|
switch (E[0]) {
|
|
2538
2554
|
case "m":
|
|
2539
2555
|
case "M":
|
|
2540
|
-
x = E[1] + (
|
|
2556
|
+
x = E[1] + (C ? x : 0), l = E[2] + (C ? l : 0), u = x, A = l;
|
|
2541
2557
|
return;
|
|
2542
2558
|
case "h":
|
|
2543
2559
|
case "H":
|
|
2544
|
-
x = E[1] + (
|
|
2560
|
+
x = E[1] + (C ? x : 0);
|
|
2545
2561
|
return;
|
|
2546
2562
|
case "v":
|
|
2547
2563
|
case "V":
|
|
2548
|
-
l = E[1] + (
|
|
2564
|
+
l = E[1] + (C ? l : 0);
|
|
2549
2565
|
return;
|
|
2550
2566
|
case "z":
|
|
2551
2567
|
case "Z":
|
|
2552
|
-
x = u, l =
|
|
2568
|
+
x = u, l = A;
|
|
2553
2569
|
return;
|
|
2554
2570
|
default:
|
|
2555
|
-
x = E[E.length - 2] + (
|
|
2571
|
+
x = E[E.length - 2] + (C ? x : 0), l = E[E.length - 1] + (C ? l : 0);
|
|
2556
2572
|
}
|
|
2557
2573
|
}), !f)
|
|
2558
2574
|
return this;
|
|
2559
|
-
for (
|
|
2575
|
+
for (P = [], y = 0; y < h.length; y++)
|
|
2560
2576
|
if (typeof c[y] < "u")
|
|
2561
|
-
for (
|
|
2562
|
-
|
|
2577
|
+
for (b = 0; b < c[y].length; b++)
|
|
2578
|
+
P.push(c[y][b]);
|
|
2563
2579
|
else
|
|
2564
|
-
|
|
2565
|
-
return this.segments =
|
|
2580
|
+
P.push(h[y]);
|
|
2581
|
+
return this.segments = P, this;
|
|
2566
2582
|
}, a.prototype.abs = function() {
|
|
2567
2583
|
return this.iterate(function(s, r, h, c) {
|
|
2568
2584
|
var f = s[0], x = f.toUpperCase(), l;
|
|
@@ -2597,22 +2613,22 @@ function Ae() {
|
|
|
2597
2613
|
}, !0), this;
|
|
2598
2614
|
}, a.prototype.unarc = function() {
|
|
2599
2615
|
return this.iterate(function(s, r, h, c) {
|
|
2600
|
-
var f, x, l, u = [],
|
|
2601
|
-
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) {
|
|
2602
2618
|
u.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
|
|
2603
2619
|
}), u));
|
|
2604
2620
|
}), this;
|
|
2605
2621
|
}, a.prototype.unshort = function() {
|
|
2606
2622
|
var s = this.segments, r, h, c, f, x;
|
|
2607
|
-
return this.iterate(function(l, u,
|
|
2608
|
-
var
|
|
2609
|
-
u && (
|
|
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] = [
|
|
2610
2626
|
E ? "q" : "Q",
|
|
2611
2627
|
f,
|
|
2612
2628
|
x,
|
|
2613
2629
|
l[1],
|
|
2614
2630
|
l[2]
|
|
2615
|
-
]) :
|
|
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] = [
|
|
2616
2632
|
E ? "c" : "C",
|
|
2617
2633
|
f,
|
|
2618
2634
|
x,
|
|
@@ -2624,18 +2640,18 @@ function Ae() {
|
|
|
2624
2640
|
}), this;
|
|
2625
2641
|
}, Y0 = a, Y0;
|
|
2626
2642
|
}
|
|
2627
|
-
var X0,
|
|
2628
|
-
function
|
|
2629
|
-
return
|
|
2643
|
+
var X0, At;
|
|
2644
|
+
function Le() {
|
|
2645
|
+
return At || (At = 1, X0 = be()), X0;
|
|
2630
2646
|
}
|
|
2631
|
-
var
|
|
2632
|
-
const
|
|
2633
|
-
var H0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 },
|
|
2634
|
-
function
|
|
2647
|
+
var Te = Le();
|
|
2648
|
+
const Pe = /* @__PURE__ */ ve(Te);
|
|
2649
|
+
var H0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Ce = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2650
|
+
function Ee(n) {
|
|
2635
2651
|
var e = [];
|
|
2636
|
-
return n.replace(
|
|
2652
|
+
return n.replace(Ce, function(t, o, i) {
|
|
2637
2653
|
var a = o.toLowerCase();
|
|
2638
|
-
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; ) {
|
|
2639
2655
|
if (i.length === H0[a])
|
|
2640
2656
|
return i.unshift(o), e.push(i);
|
|
2641
2657
|
if (i.length < H0[a])
|
|
@@ -2644,16 +2660,16 @@ function Ce(n) {
|
|
|
2644
2660
|
}
|
|
2645
2661
|
}), e;
|
|
2646
2662
|
}
|
|
2647
|
-
var
|
|
2648
|
-
function
|
|
2649
|
-
var e = n.match(
|
|
2663
|
+
var Se = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2664
|
+
function ke(n) {
|
|
2665
|
+
var e = n.match(Se);
|
|
2650
2666
|
return e ? e.map(Number) : [];
|
|
2651
2667
|
}
|
|
2652
2668
|
function e0(n, e, t, o, i, a, s, r) {
|
|
2653
2669
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2654
2670
|
}
|
|
2655
2671
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2656
|
-
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 =
|
|
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();
|
|
2657
2673
|
}
|
|
2658
2674
|
Z0.prototype = {
|
|
2659
2675
|
constructor: Z0,
|
|
@@ -2667,7 +2683,7 @@ Z0.prototype = {
|
|
|
2667
2683
|
return this.length;
|
|
2668
2684
|
},
|
|
2669
2685
|
getPointAtLength: function(n) {
|
|
2670
|
-
var e =
|
|
2686
|
+
var e = $0(
|
|
2671
2687
|
n,
|
|
2672
2688
|
this.length,
|
|
2673
2689
|
this.getArcLength,
|
|
@@ -2681,7 +2697,7 @@ Z0.prototype = {
|
|
|
2681
2697
|
);
|
|
2682
2698
|
},
|
|
2683
2699
|
getTangentAtLength: function(n) {
|
|
2684
|
-
var e =
|
|
2700
|
+
var e = $0(
|
|
2685
2701
|
n,
|
|
2686
2702
|
this.length,
|
|
2687
2703
|
this.getArcLength,
|
|
@@ -2695,7 +2711,7 @@ Z0.prototype = {
|
|
|
2695
2711
|
return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
|
|
2696
2712
|
},
|
|
2697
2713
|
getPropertiesAtLength: function(n) {
|
|
2698
|
-
var e =
|
|
2714
|
+
var e = $0(
|
|
2699
2715
|
n,
|
|
2700
2716
|
this.length,
|
|
2701
2717
|
this.getArcLength,
|
|
@@ -2721,7 +2737,7 @@ function Ie(n, e, t) {
|
|
|
2721
2737
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
2722
2738
|
};
|
|
2723
2739
|
}
|
|
2724
|
-
function
|
|
2740
|
+
function _e(n, e, t) {
|
|
2725
2741
|
var o = qt(
|
|
2726
2742
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
2727
2743
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
@@ -2729,7 +2745,7 @@ function ke(n, e, t) {
|
|
|
2729
2745
|
);
|
|
2730
2746
|
return o;
|
|
2731
2747
|
}
|
|
2732
|
-
function
|
|
2748
|
+
function $0(n, e, t, o, i) {
|
|
2733
2749
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
2734
2750
|
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, x = Math.abs(n - c) / e;
|
|
2735
2751
|
f < a ? (a = f, s += r) : x < a ? (a = x, s -= r) : r /= 2;
|
|
@@ -2740,11 +2756,11 @@ function qt(n, e, t) {
|
|
|
2740
2756
|
var o = (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], i = (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2];
|
|
2741
2757
|
return { x: o, y: i };
|
|
2742
2758
|
}
|
|
2743
|
-
function
|
|
2759
|
+
function Oe(n, e, t) {
|
|
2744
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];
|
|
2745
2761
|
return { x: o, y: i };
|
|
2746
2762
|
}
|
|
2747
|
-
function
|
|
2763
|
+
function Fe(n, e, t) {
|
|
2748
2764
|
t === void 0 && (t = 1);
|
|
2749
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;
|
|
2750
2766
|
if (r === 0)
|
|
@@ -2754,7 +2770,7 @@ function Oe(n, e, t) {
|
|
|
2754
2770
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2755
2771
|
)));
|
|
2756
2772
|
}
|
|
2757
|
-
var
|
|
2773
|
+
var Re = [
|
|
2758
2774
|
[],
|
|
2759
2775
|
[],
|
|
2760
2776
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2780,7 +2796,7 @@ var Fe = [
|
|
|
2780
2796
|
[-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],
|
|
2781
2797
|
[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],
|
|
2782
2798
|
[-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]
|
|
2783
|
-
],
|
|
2799
|
+
], Ne = [
|
|
2784
2800
|
[],
|
|
2785
2801
|
[],
|
|
2786
2802
|
[1, 1],
|
|
@@ -2806,9 +2822,9 @@ var Fe = [
|
|
|
2806
2822
|
[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],
|
|
2807
2823
|
[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],
|
|
2808
2824
|
[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]
|
|
2809
|
-
],
|
|
2810
|
-
function
|
|
2811
|
-
return
|
|
2825
|
+
], qe = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2826
|
+
function Be(n, e) {
|
|
2827
|
+
return qe[n][e];
|
|
2812
2828
|
}
|
|
2813
2829
|
function V0(n, e, t) {
|
|
2814
2830
|
var o = t.length - 1, i, a, s;
|
|
@@ -2816,7 +2832,7 @@ function V0(n, e, t) {
|
|
|
2816
2832
|
return 0;
|
|
2817
2833
|
if (n === 0) {
|
|
2818
2834
|
for (a = 0, s = 0; s <= o; s++)
|
|
2819
|
-
a +=
|
|
2835
|
+
a += Be(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2820
2836
|
return a;
|
|
2821
2837
|
} else {
|
|
2822
2838
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
@@ -2824,34 +2840,34 @@ function V0(n, e, t) {
|
|
|
2824
2840
|
return V0(n - 1, e, i);
|
|
2825
2841
|
}
|
|
2826
2842
|
}
|
|
2827
|
-
function
|
|
2843
|
+
function De(n, e, t) {
|
|
2828
2844
|
var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
|
|
2829
2845
|
return Math.sqrt(a);
|
|
2830
2846
|
}
|
|
2831
|
-
function
|
|
2847
|
+
function je(n, e, t) {
|
|
2832
2848
|
var o, i, a, s;
|
|
2833
2849
|
t === void 0 && (t = 1);
|
|
2834
2850
|
var r = 20;
|
|
2835
2851
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2836
|
-
s = o *
|
|
2852
|
+
s = o * Re[r][a] + o, i += Ne[r][a] * De(n, e, s);
|
|
2837
2853
|
return o * i;
|
|
2838
2854
|
}
|
|
2839
2855
|
var C0 = Math.PI * 2;
|
|
2840
|
-
function
|
|
2856
|
+
function Mt(n, e, t, o) {
|
|
2841
2857
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2842
2858
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2843
2859
|
}
|
|
2844
|
-
function
|
|
2845
|
-
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,
|
|
2846
|
-
|
|
2847
|
-
var
|
|
2860
|
+
function ze(n, e, t, o, i, a, s, r, h, c) {
|
|
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);
|
|
2848
2864
|
return a === 0 && X > 0 && (X -= C0), a === 1 && X < 0 && (X += C0), [L, S, U, X];
|
|
2849
2865
|
}
|
|
2850
|
-
function
|
|
2866
|
+
function Ue(n, e) {
|
|
2851
2867
|
var t = 1.3333333333333333 * Math.tan(e / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + e), s = Math.sin(n + e);
|
|
2852
2868
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2853
2869
|
}
|
|
2854
|
-
function
|
|
2870
|
+
function Ye(n, e, t, o, i, a, s, r, h) {
|
|
2855
2871
|
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), x = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2856
2872
|
if (x === 0 && l === 0)
|
|
2857
2873
|
return [];
|
|
@@ -2860,28 +2876,28 @@ function Ue(n, e, t, o, i, a, s, r, h) {
|
|
|
2860
2876
|
t = Math.abs(t), o = Math.abs(o);
|
|
2861
2877
|
var u = x * x / (t * t) + l * l / (o * o);
|
|
2862
2878
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2863
|
-
var
|
|
2864
|
-
|
|
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);
|
|
2880
|
+
P /= E;
|
|
2865
2881
|
for (var L = 0; L < E; L++)
|
|
2866
|
-
y.push(
|
|
2882
|
+
y.push(Ue(b, P)), b += P;
|
|
2867
2883
|
return y.map(function(S) {
|
|
2868
|
-
for (var
|
|
2869
|
-
var F = S[
|
|
2884
|
+
for (var C = 0; C < S.length; C += 2) {
|
|
2885
|
+
var F = S[C + 0], z = S[C + 1];
|
|
2870
2886
|
F *= t, z *= o;
|
|
2871
2887
|
var W = f * F - c * z, U = c * F + f * z;
|
|
2872
|
-
S[
|
|
2888
|
+
S[C + 0] = W + A[0], S[C + 1] = U + A[1];
|
|
2873
2889
|
}
|
|
2874
2890
|
return S;
|
|
2875
2891
|
});
|
|
2876
2892
|
}
|
|
2877
|
-
function
|
|
2893
|
+
function bt(n, e, t, o, i, a, s, r, h) {
|
|
2878
2894
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2879
2895
|
}
|
|
2880
2896
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2881
|
-
var c = 0, f = [], x = [], l =
|
|
2897
|
+
var c = 0, f = [], x = [], l = Ye(n, e, t, o, i, a, s, r, h);
|
|
2882
2898
|
l.forEach(function(u) {
|
|
2883
|
-
var
|
|
2884
|
-
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);
|
|
2885
2901
|
}), this.length = c, this.partialLengths = f, this.curves = x;
|
|
2886
2902
|
}
|
|
2887
2903
|
K0.prototype = {
|
|
@@ -2915,33 +2931,33 @@ K0.prototype = {
|
|
|
2915
2931
|
}
|
|
2916
2932
|
};
|
|
2917
2933
|
function t0(n, e, t, o) {
|
|
2918
|
-
return new
|
|
2934
|
+
return new k0(n, e, t, o);
|
|
2919
2935
|
}
|
|
2920
|
-
function
|
|
2936
|
+
function k0(n, e, t, o) {
|
|
2921
2937
|
this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
|
|
2922
2938
|
}
|
|
2923
|
-
|
|
2939
|
+
k0.prototype.getTotalLength = function() {
|
|
2924
2940
|
return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
2925
2941
|
};
|
|
2926
|
-
|
|
2942
|
+
k0.prototype.getPointAtLength = function(n) {
|
|
2927
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;
|
|
2928
2944
|
return { x: this.x0 + t, y: this.y0 + o };
|
|
2929
2945
|
};
|
|
2930
|
-
|
|
2946
|
+
k0.prototype.getTangentAtLength = function() {
|
|
2931
2947
|
var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
2932
2948
|
return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
|
|
2933
2949
|
};
|
|
2934
|
-
|
|
2950
|
+
k0.prototype.getPropertiesAtLength = function(n) {
|
|
2935
2951
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2936
2952
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2937
2953
|
};
|
|
2938
|
-
function
|
|
2954
|
+
function Xe(n) {
|
|
2939
2955
|
var e = 0, t = [], o = [];
|
|
2940
2956
|
function i(s) {
|
|
2941
2957
|
if (!s)
|
|
2942
2958
|
return null;
|
|
2943
|
-
for (var r =
|
|
2944
|
-
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
|
|
2959
|
+
for (var r = Ee(s), h = [0, 0], c = [0, 0], f, x, l = 0; l < r.length; l++)
|
|
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);
|
|
2945
2961
|
return i;
|
|
2946
2962
|
}
|
|
2947
2963
|
i.getTotalLength = function() {
|
|
@@ -2970,14 +2986,14 @@ function O0(n, e) {
|
|
|
2970
2986
|
function Bt(n, e, t) {
|
|
2971
2987
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
2972
2988
|
}
|
|
2973
|
-
function
|
|
2989
|
+
function He(n, e) {
|
|
2974
2990
|
return O0(n, e) < 1e-9;
|
|
2975
2991
|
}
|
|
2976
|
-
function
|
|
2992
|
+
function $e(n, e, t) {
|
|
2977
2993
|
let o = n.map((i, a) => Ge(i, e[a]));
|
|
2978
2994
|
return function(i) {
|
|
2979
2995
|
let a = o.map((s) => s(i));
|
|
2980
|
-
return t ?
|
|
2996
|
+
return t ? Ve(a) : a;
|
|
2981
2997
|
};
|
|
2982
2998
|
}
|
|
2983
2999
|
function Ge(n, e) {
|
|
@@ -2993,20 +3009,20 @@ Example valid ways of supplying a shape would be:
|
|
|
2993
3009
|
[[0, 0], [10, 0], [10, 10]]
|
|
2994
3010
|
"M0,0 L10,0 L10,10Z"
|
|
2995
3011
|
`;
|
|
2996
|
-
function $e(n) {
|
|
2997
|
-
return new Te(n).abs();
|
|
2998
|
-
}
|
|
2999
3012
|
function We(n) {
|
|
3000
|
-
return
|
|
3013
|
+
return new Pe(n).abs();
|
|
3001
3014
|
}
|
|
3002
3015
|
function Ze(n) {
|
|
3016
|
+
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3017
|
+
}
|
|
3018
|
+
function Ve(n) {
|
|
3003
3019
|
return "M" + n.join("L") + "Z";
|
|
3004
3020
|
}
|
|
3005
|
-
function
|
|
3006
|
-
let t =
|
|
3007
|
-
return
|
|
3021
|
+
function Ke(n, e) {
|
|
3022
|
+
let t = We(n);
|
|
3023
|
+
return Qe(t) || Je(t, e);
|
|
3008
3024
|
}
|
|
3009
|
-
function
|
|
3025
|
+
function Qe(n) {
|
|
3010
3026
|
let e = n.segments || [], t = [];
|
|
3011
3027
|
if (!e.length || e[0][0] !== "M")
|
|
3012
3028
|
return !1;
|
|
@@ -3025,11 +3041,11 @@ function Ke(n) {
|
|
|
3025
3041
|
}
|
|
3026
3042
|
return t.length ? { ring: t } : !1;
|
|
3027
3043
|
}
|
|
3028
|
-
function
|
|
3029
|
-
let t =
|
|
3044
|
+
function Je(n, e) {
|
|
3045
|
+
let t = Ze(n)[0], o = [], i, a, s = 3;
|
|
3030
3046
|
if (!t)
|
|
3031
3047
|
throw new TypeError(Q0);
|
|
3032
|
-
a =
|
|
3048
|
+
a = tn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3033
3049
|
for (let r = 0; r < s; r++) {
|
|
3034
3050
|
let h = a.getPointAtLength(i * r / s);
|
|
3035
3051
|
o.push([h.x, h.y]);
|
|
@@ -3039,17 +3055,17 @@ function Qe(n, e) {
|
|
|
3039
3055
|
skipBisect: !0
|
|
3040
3056
|
};
|
|
3041
3057
|
}
|
|
3042
|
-
function
|
|
3058
|
+
function tn(n) {
|
|
3043
3059
|
if (typeof window < "u" && window && window.document)
|
|
3044
3060
|
try {
|
|
3045
3061
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3046
3062
|
return e.setAttributeNS(null, "d", n), e;
|
|
3047
3063
|
} catch {
|
|
3048
3064
|
}
|
|
3049
|
-
return
|
|
3065
|
+
return Xe(n);
|
|
3050
3066
|
}
|
|
3051
3067
|
function Lt(n, e) {
|
|
3052
|
-
const t = n.length + e, o =
|
|
3068
|
+
const t = n.length + e, o = ye(n) / e;
|
|
3053
3069
|
let i = 0, a = 0, s = o / 2;
|
|
3054
3070
|
for (; n.length < t; ) {
|
|
3055
3071
|
let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
|
|
@@ -3060,7 +3076,7 @@ function Lt(n, e) {
|
|
|
3060
3076
|
a += c, i++;
|
|
3061
3077
|
}
|
|
3062
3078
|
}
|
|
3063
|
-
function
|
|
3079
|
+
function en(n, e = 1 / 0) {
|
|
3064
3080
|
for (let t = 0; t < n.length; t++) {
|
|
3065
3081
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3066
3082
|
for (; O0(o, i) > e; )
|
|
@@ -3070,20 +3086,20 @@ function tn(n, e = 1 / 0) {
|
|
|
3070
3086
|
function Tt(n, e) {
|
|
3071
3087
|
let t, o, i;
|
|
3072
3088
|
if (typeof n == "string") {
|
|
3073
|
-
let a =
|
|
3089
|
+
let a = Ke(n, e);
|
|
3074
3090
|
n = a.ring, i = a.skipBisect;
|
|
3075
3091
|
} else if (!Array.isArray(n))
|
|
3076
3092
|
throw new TypeError(Q0);
|
|
3077
|
-
if (t = n.slice(0), !
|
|
3093
|
+
if (t = n.slice(0), !nn(t))
|
|
3078
3094
|
throw new TypeError(Q0);
|
|
3079
|
-
return t.length > 1 &&
|
|
3095
|
+
return t.length > 1 && He(t[0], t[t.length - 1]) && t.pop(), o = xe(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && en(t, e), t;
|
|
3080
3096
|
}
|
|
3081
|
-
function
|
|
3097
|
+
function nn(n) {
|
|
3082
3098
|
return n.every(function(e) {
|
|
3083
3099
|
return Array.isArray(e) && e.length >= 2 && _0(e[0]) && _0(e[1]);
|
|
3084
3100
|
});
|
|
3085
3101
|
}
|
|
3086
|
-
function
|
|
3102
|
+
function rn(n, e) {
|
|
3087
3103
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3088
3104
|
for (let r = 0; r < t; r++)
|
|
3089
3105
|
a = 0, e.forEach(function(h, c) {
|
|
@@ -3092,38 +3108,38 @@ function nn(n, e) {
|
|
|
3092
3108
|
}), a < o && (o = a, i = r);
|
|
3093
3109
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3094
3110
|
}
|
|
3095
|
-
function
|
|
3096
|
-
let i = Tt(n, t), a = Tt(e, t), s =
|
|
3111
|
+
function on(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3112
|
+
let i = Tt(n, t), a = Tt(e, t), s = sn(i, a, o);
|
|
3097
3113
|
return !o || typeof n != "string" && typeof e != "string" ? s : (r) => r < 1e-4 && typeof n == "string" ? n : 1 - r < 1e-4 && typeof e == "string" ? e : s(r);
|
|
3098
3114
|
}
|
|
3099
|
-
function
|
|
3115
|
+
function sn(n, e, t) {
|
|
3100
3116
|
let o;
|
|
3101
|
-
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0),
|
|
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);
|
|
3102
3118
|
}
|
|
3103
|
-
var
|
|
3104
|
-
function
|
|
3105
|
-
if (Pt) return
|
|
3106
|
-
Pt = 1,
|
|
3119
|
+
var I0 = { exports: {} }, Pt;
|
|
3120
|
+
function an() {
|
|
3121
|
+
if (Pt) return I0.exports;
|
|
3122
|
+
Pt = 1, I0.exports = n, I0.exports.default = n;
|
|
3107
3123
|
function n(g, d, p) {
|
|
3108
3124
|
p = p || 2;
|
|
3109
|
-
var v = d && d.length, w = v ? d[0] * p : g.length,
|
|
3110
|
-
if (!
|
|
3111
|
-
var T, O,
|
|
3112
|
-
if (v && (
|
|
3113
|
-
T =
|
|
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;
|
|
3128
|
+
if (v && (m = h(g, d, m, p)), g.length > 80 * p) {
|
|
3129
|
+
T = I = g[0], O = Y = g[1];
|
|
3114
3130
|
for (var D = p; D < w; D += p)
|
|
3115
|
-
B = g[D], R = g[D + 1], B < T && (T = B), R < O && (O = R), B >
|
|
3116
|
-
|
|
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;
|
|
3117
3133
|
}
|
|
3118
|
-
return o(
|
|
3134
|
+
return o(m, M, p, T, O, G, 0), M;
|
|
3119
3135
|
}
|
|
3120
3136
|
function e(g, d, p, v, w) {
|
|
3121
|
-
var
|
|
3137
|
+
var m, M;
|
|
3122
3138
|
if (w === F0(g, d, p, v) > 0)
|
|
3123
|
-
for (
|
|
3139
|
+
for (m = d; m < p; m += v) M = p0(m, g[m], g[m + 1], M);
|
|
3124
3140
|
else
|
|
3125
|
-
for (
|
|
3126
|
-
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;
|
|
3127
3143
|
}
|
|
3128
3144
|
function t(g, d) {
|
|
3129
3145
|
if (!g) return g;
|
|
@@ -3138,16 +3154,16 @@ function sn() {
|
|
|
3138
3154
|
while (v || p !== d);
|
|
3139
3155
|
return d;
|
|
3140
3156
|
}
|
|
3141
|
-
function o(g, d, p, v, w,
|
|
3157
|
+
function o(g, d, p, v, w, m, M) {
|
|
3142
3158
|
if (g) {
|
|
3143
|
-
!
|
|
3144
|
-
for (var T = g, O,
|
|
3145
|
-
if (O = g.prev,
|
|
3146
|
-
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;
|
|
3147
3163
|
continue;
|
|
3148
3164
|
}
|
|
3149
|
-
if (g =
|
|
3150
|
-
|
|
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);
|
|
3151
3167
|
break;
|
|
3152
3168
|
}
|
|
3153
3169
|
}
|
|
@@ -3156,25 +3172,25 @@ function sn() {
|
|
|
3156
3172
|
function i(g) {
|
|
3157
3173
|
var d = g.prev, p = g, v = g.next;
|
|
3158
3174
|
if (L(d, p, v) >= 0) return !1;
|
|
3159
|
-
for (var w = d.x,
|
|
3160
|
-
if (D.x >= Y && D.x <= R && D.y >= B && D.y <=
|
|
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;
|
|
3161
3177
|
D = D.next;
|
|
3162
3178
|
}
|
|
3163
3179
|
return !0;
|
|
3164
3180
|
}
|
|
3165
3181
|
function a(g, d, p, v) {
|
|
3166
|
-
var w = g.prev,
|
|
3167
|
-
if (L(w,
|
|
3168
|
-
for (var T = w.x, O =
|
|
3169
|
-
if (N.x >=
|
|
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;
|
|
3170
3186
|
q = q.nextZ;
|
|
3171
3187
|
}
|
|
3172
3188
|
for (; N && N.z >= it; ) {
|
|
3173
|
-
if (N.x >=
|
|
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;
|
|
3174
3190
|
N = N.prevZ;
|
|
3175
3191
|
}
|
|
3176
3192
|
for (; q && q.z <= ot; ) {
|
|
3177
|
-
if (q.x >=
|
|
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;
|
|
3178
3194
|
q = q.nextZ;
|
|
3179
3195
|
}
|
|
3180
3196
|
return !0;
|
|
@@ -3182,31 +3198,31 @@ function sn() {
|
|
|
3182
3198
|
function s(g, d, p) {
|
|
3183
3199
|
var v = g;
|
|
3184
3200
|
do {
|
|
3185
|
-
var w = v.prev,
|
|
3186
|
-
!S(w,
|
|
3201
|
+
var w = v.prev, m = v.next.next;
|
|
3202
|
+
!S(w, m) && C(w, v, v.next, m) && U(w, m) && U(m, w) && (d.push(w.i / p | 0), d.push(v.i / p | 0), d.push(m.i / p | 0), c0(v), c0(v.next), v = g = m), v = v.next;
|
|
3187
3203
|
} while (v !== g);
|
|
3188
3204
|
return t(v);
|
|
3189
3205
|
}
|
|
3190
|
-
function r(g, d, p, v, w,
|
|
3191
|
-
var
|
|
3206
|
+
function r(g, d, p, v, w, m) {
|
|
3207
|
+
var M = g;
|
|
3192
3208
|
do {
|
|
3193
|
-
for (var T =
|
|
3194
|
-
if (
|
|
3195
|
-
var O = a0(
|
|
3196
|
-
|
|
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);
|
|
3197
3213
|
return;
|
|
3198
3214
|
}
|
|
3199
3215
|
T = T.next;
|
|
3200
3216
|
}
|
|
3201
|
-
|
|
3202
|
-
} while (
|
|
3217
|
+
M = M.next;
|
|
3218
|
+
} while (M !== g);
|
|
3203
3219
|
}
|
|
3204
3220
|
function h(g, d, p, v) {
|
|
3205
|
-
var w = [],
|
|
3206
|
-
for (
|
|
3207
|
-
T = d[
|
|
3208
|
-
for (w.sort(c),
|
|
3209
|
-
p = f(w[
|
|
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));
|
|
3224
|
+
for (w.sort(c), m = 0; m < w.length; m++)
|
|
3225
|
+
p = f(w[m], p);
|
|
3210
3226
|
return p;
|
|
3211
3227
|
}
|
|
3212
3228
|
function c(g, d) {
|
|
@@ -3220,22 +3236,22 @@ function sn() {
|
|
|
3220
3236
|
return t(v, v.next), t(p, p.next);
|
|
3221
3237
|
}
|
|
3222
3238
|
function x(g, d) {
|
|
3223
|
-
var p = d, v = g.x, w = g.y,
|
|
3239
|
+
var p = d, v = g.x, w = g.y, m = -1 / 0, M;
|
|
3224
3240
|
do {
|
|
3225
3241
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3226
3242
|
var T = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3227
|
-
if (T <= v && T >
|
|
3228
|
-
return
|
|
3243
|
+
if (T <= v && T > m && (m = T, M = p.x < p.next.x ? p : p.next, T === v))
|
|
3244
|
+
return M;
|
|
3229
3245
|
}
|
|
3230
3246
|
p = p.next;
|
|
3231
3247
|
} while (p !== d);
|
|
3232
|
-
if (!
|
|
3233
|
-
var O =
|
|
3234
|
-
p =
|
|
3248
|
+
if (!M) return null;
|
|
3249
|
+
var O = M, I = M.x, Y = M.y, B = 1 / 0, R;
|
|
3250
|
+
p = M;
|
|
3235
3251
|
do
|
|
3236
|
-
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;
|
|
3237
3253
|
while (p !== O);
|
|
3238
|
-
return
|
|
3254
|
+
return M;
|
|
3239
3255
|
}
|
|
3240
3256
|
function l(g, d) {
|
|
3241
3257
|
return L(g.prev, g, d.prev) < 0 && L(d.next, g, g.next) < 0;
|
|
@@ -3245,34 +3261,34 @@ function sn() {
|
|
|
3245
3261
|
do
|
|
3246
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;
|
|
3247
3263
|
while (w !== g);
|
|
3248
|
-
w.prevZ.nextZ = null, w.prevZ = null,
|
|
3264
|
+
w.prevZ.nextZ = null, w.prevZ = null, A(w);
|
|
3249
3265
|
}
|
|
3250
|
-
function
|
|
3251
|
-
var d, p, v, w,
|
|
3266
|
+
function A(g) {
|
|
3267
|
+
var d, p, v, w, m, M, T, O, I = 1;
|
|
3252
3268
|
do {
|
|
3253
|
-
for (p = g, g = null,
|
|
3254
|
-
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++)
|
|
3255
3271
|
;
|
|
3256
|
-
for (O =
|
|
3257
|
-
T !== 0 && (O === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, T--) : (w = v, v = v.nextZ, O--),
|
|
3272
|
+
for (O = I; T > 0 || O > 0 && v; )
|
|
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;
|
|
3258
3274
|
p = v;
|
|
3259
3275
|
}
|
|
3260
|
-
|
|
3261
|
-
} while (
|
|
3276
|
+
m.nextZ = null, I *= 2;
|
|
3277
|
+
} while (M > 1);
|
|
3262
3278
|
return g;
|
|
3263
3279
|
}
|
|
3264
3280
|
function y(g, d, p, v, w) {
|
|
3265
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;
|
|
3266
3282
|
}
|
|
3267
|
-
function
|
|
3283
|
+
function b(g) {
|
|
3268
3284
|
var d = g, p = g;
|
|
3269
3285
|
do
|
|
3270
3286
|
(d.x < p.x || d.x === p.x && d.y < p.y) && (p = d), d = d.next;
|
|
3271
3287
|
while (d !== g);
|
|
3272
3288
|
return p;
|
|
3273
3289
|
}
|
|
3274
|
-
function
|
|
3275
|
-
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);
|
|
3276
3292
|
}
|
|
3277
3293
|
function E(g, d) {
|
|
3278
3294
|
return g.next.i !== d.i && g.prev.i !== d.i && !W(g, d) && // dones't intersect other edges
|
|
@@ -3286,9 +3302,9 @@ function sn() {
|
|
|
3286
3302
|
function S(g, d) {
|
|
3287
3303
|
return g.x === d.x && g.y === d.y;
|
|
3288
3304
|
}
|
|
3289
|
-
function
|
|
3290
|
-
var w = z(L(g, d, p)),
|
|
3291
|
-
return !!(w !==
|
|
3305
|
+
function C(g, d, p, v) {
|
|
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));
|
|
3292
3308
|
}
|
|
3293
3309
|
function F(g, d, p) {
|
|
3294
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);
|
|
@@ -3299,7 +3315,7 @@ function sn() {
|
|
|
3299
3315
|
function W(g, d) {
|
|
3300
3316
|
var p = g;
|
|
3301
3317
|
do {
|
|
3302
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !== d.i && p.next.i !== d.i &&
|
|
3318
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== d.i && p.next.i !== d.i && C(p, p.next, g, d)) return !0;
|
|
3303
3319
|
p = p.next;
|
|
3304
3320
|
} while (p !== g);
|
|
3305
3321
|
return !1;
|
|
@@ -3308,15 +3324,15 @@ function sn() {
|
|
|
3308
3324
|
return L(g.prev, g, g.next) < 0 ? L(g, d, g.next) >= 0 && L(g, g.prev, d) >= 0 : L(g, d, g.prev) < 0 || L(g, g.next, d) < 0;
|
|
3309
3325
|
}
|
|
3310
3326
|
function X(g, d) {
|
|
3311
|
-
var p = g, v = !1, w = (g.x + d.x) / 2,
|
|
3327
|
+
var p = g, v = !1, w = (g.x + d.x) / 2, m = (g.y + d.y) / 2;
|
|
3312
3328
|
do
|
|
3313
|
-
p.y >
|
|
3329
|
+
p.y > m != p.next.y > m && p.next.y !== p.y && w < (p.next.x - p.x) * (m - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
|
|
3314
3330
|
while (p !== g);
|
|
3315
3331
|
return v;
|
|
3316
3332
|
}
|
|
3317
3333
|
function a0(g, d) {
|
|
3318
|
-
var p = new J(g.i, g.x, g.y), v = new J(d.i, d.x, d.y), w = g.next,
|
|
3319
|
-
return g.next = d, d.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v,
|
|
3334
|
+
var p = new J(g.i, g.x, g.y), v = new J(d.i, d.x, d.y), w = g.next, m = d.prev;
|
|
3335
|
+
return g.next = d, d.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, m.next = v, v.prev = m, v;
|
|
3320
3336
|
}
|
|
3321
3337
|
function p0(g, d, p, v) {
|
|
3322
3338
|
var w = new J(g, d, p);
|
|
@@ -3329,41 +3345,41 @@ function sn() {
|
|
|
3329
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;
|
|
3330
3346
|
}
|
|
3331
3347
|
n.deviation = function(g, d, p, v) {
|
|
3332
|
-
var w = d && d.length,
|
|
3348
|
+
var w = d && d.length, m = w ? d[0] * p : g.length, M = Math.abs(F0(g, 0, m, p));
|
|
3333
3349
|
if (w)
|
|
3334
3350
|
for (var T = 0, O = d.length; T < O; T++) {
|
|
3335
|
-
var
|
|
3336
|
-
|
|
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));
|
|
3337
3353
|
}
|
|
3338
3354
|
var B = 0;
|
|
3339
3355
|
for (T = 0; T < v.length; T += 3) {
|
|
3340
|
-
var R = v[T] * p,
|
|
3356
|
+
var R = v[T] * p, G = v[T + 1] * p, D = v[T + 2] * p;
|
|
3341
3357
|
B += Math.abs(
|
|
3342
|
-
(g[R] - g[D]) * (g[
|
|
3358
|
+
(g[R] - g[D]) * (g[G + 1] - g[R + 1]) - (g[R] - g[G]) * (g[D + 1] - g[R + 1])
|
|
3343
3359
|
);
|
|
3344
3360
|
}
|
|
3345
|
-
return
|
|
3361
|
+
return M === 0 && B === 0 ? 0 : Math.abs((B - M) / M);
|
|
3346
3362
|
};
|
|
3347
3363
|
function F0(g, d, p, v) {
|
|
3348
|
-
for (var w = 0,
|
|
3349
|
-
w += (g[
|
|
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;
|
|
3350
3366
|
return w;
|
|
3351
3367
|
}
|
|
3352
3368
|
return n.flatten = function(g) {
|
|
3353
3369
|
for (var d = g[0][0].length, p = { vertices: [], holes: [], dimensions: d }, v = 0, w = 0; w < g.length; w++) {
|
|
3354
|
-
for (var
|
|
3355
|
-
for (var
|
|
3370
|
+
for (var m = 0; m < g[w].length; m++)
|
|
3371
|
+
for (var M = 0; M < d; M++) p.vertices.push(g[w][m][M]);
|
|
3356
3372
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3357
3373
|
}
|
|
3358
3374
|
return p;
|
|
3359
|
-
},
|
|
3375
|
+
}, I0.exports;
|
|
3360
3376
|
}
|
|
3361
|
-
|
|
3377
|
+
an();
|
|
3362
3378
|
function Dt(n, e) {
|
|
3363
3379
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3364
3380
|
}
|
|
3365
|
-
function
|
|
3366
|
-
return n.length === 1 && (n =
|
|
3381
|
+
function hn(n) {
|
|
3382
|
+
return n.length === 1 && (n = ln(n)), {
|
|
3367
3383
|
left: function(e, t, o, i) {
|
|
3368
3384
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3369
3385
|
var a = o + i >>> 1;
|
|
@@ -3380,20 +3396,20 @@ function an(n) {
|
|
|
3380
3396
|
}
|
|
3381
3397
|
};
|
|
3382
3398
|
}
|
|
3383
|
-
function
|
|
3399
|
+
function ln(n) {
|
|
3384
3400
|
return function(e, t) {
|
|
3385
3401
|
return Dt(n(e), t);
|
|
3386
3402
|
};
|
|
3387
3403
|
}
|
|
3388
|
-
|
|
3389
|
-
function
|
|
3390
|
-
const o =
|
|
3404
|
+
hn(Dt);
|
|
3405
|
+
function _n(n, e, t = 3) {
|
|
3406
|
+
const o = on(n, e, { maxSegmentLength: t });
|
|
3391
3407
|
return {
|
|
3392
3408
|
check: (i) => typeof i == "string",
|
|
3393
3409
|
interpolate: (i, a, s) => o(s)
|
|
3394
3410
|
};
|
|
3395
3411
|
}
|
|
3396
|
-
function
|
|
3412
|
+
function On(n) {
|
|
3397
3413
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3398
3414
|
return {
|
|
3399
3415
|
scaleX: e,
|
|
@@ -3404,7 +3420,7 @@ function _n(n) {
|
|
|
3404
3420
|
})
|
|
3405
3421
|
};
|
|
3406
3422
|
}
|
|
3407
|
-
function
|
|
3423
|
+
function Fn(n) {
|
|
3408
3424
|
const e = [];
|
|
3409
3425
|
if (n.isAllKey) {
|
|
3410
3426
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3419,46 +3435,46 @@ export {
|
|
|
3419
3435
|
x0 as Alignment,
|
|
3420
3436
|
n0 as Anchor,
|
|
3421
3437
|
et as Animate,
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3438
|
+
yn as Arrow,
|
|
3439
|
+
Cn as BrowserCanvasRenderer,
|
|
3440
|
+
vn as Circle,
|
|
3441
|
+
$ as Color,
|
|
3426
3442
|
tt as Easing,
|
|
3427
|
-
|
|
3428
|
-
|
|
3443
|
+
un as FadeIn,
|
|
3444
|
+
fn as FadeOut,
|
|
3429
3445
|
p1 as FontStyle,
|
|
3430
3446
|
x1 as FontWeight,
|
|
3431
|
-
|
|
3447
|
+
wn as Grid,
|
|
3432
3448
|
st as Group,
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3449
|
+
gn as Hide,
|
|
3450
|
+
dn as IFrame,
|
|
3451
|
+
mn as Image,
|
|
3452
|
+
An as Line,
|
|
3453
|
+
Mn as Mask,
|
|
3438
3454
|
j as ObjectType,
|
|
3439
3455
|
In as Opaque,
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3456
|
+
bn as Path,
|
|
3457
|
+
En as Pause,
|
|
3458
|
+
Ln as Polygon,
|
|
3443
3459
|
H as Position,
|
|
3444
3460
|
T1 as Presentation,
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3461
|
+
Tn as Rectangle,
|
|
3462
|
+
Pn as SVG,
|
|
3463
|
+
xn as ScreenCapture,
|
|
3464
|
+
pn as Show,
|
|
3449
3465
|
i0 as Size,
|
|
3450
|
-
|
|
3466
|
+
Sn as Slide,
|
|
3451
3467
|
s0 as SlideObject,
|
|
3452
3468
|
Et as SlideWebExtra,
|
|
3453
3469
|
m1 as Text,
|
|
3454
|
-
|
|
3470
|
+
kn as TextUnit,
|
|
3455
3471
|
g1 as Transparent,
|
|
3456
3472
|
Ct as Update,
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3473
|
+
Fn as getKeySlideBuildIndices,
|
|
3474
|
+
On as getSizingFunctions,
|
|
3475
|
+
_n as getSmoothPathInterpolator,
|
|
3460
3476
|
w1 as getTextContentLength,
|
|
3461
3477
|
S1 as interpolateColor,
|
|
3462
|
-
|
|
3478
|
+
I1 as interpolateNumber
|
|
3463
3479
|
};
|
|
3464
3480
|
//# sourceMappingURL=presenter.mjs.map
|