presenter 0.8.1 → 0.8.3
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/README.md +43 -1
- package/dist/navigator/openNavigator.d.ts +14 -2
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +1052 -926
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/BrowserCanvasRenderer.d.ts +11 -0
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (n, e, t) =>
|
|
4
|
-
const
|
|
1
|
+
var $0 = Object.defineProperty;
|
|
2
|
+
var X0 = (n, e, t) => e in n ? $0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var k = (n, e, t) => X0(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const ft = {
|
|
5
5
|
/** Represents an animated change in an object's properties. */
|
|
6
6
|
ANIMATE: "Animate",
|
|
7
7
|
/** Represents a pause in the animation timeline. */
|
|
@@ -9,52 +9,52 @@ const f0 = {
|
|
|
9
9
|
/** Represents an immediate update to an object's properties without animation. */
|
|
10
10
|
UPDATE: "Update"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function G0(n) {
|
|
13
13
|
return n * n * n;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function W0(n) {
|
|
16
16
|
return --n * n * n + 1;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Z0(n) {
|
|
19
19
|
return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var e0 = 1.70158;
|
|
22
22
|
(function n(e) {
|
|
23
23
|
e = +e;
|
|
24
24
|
function t(o) {
|
|
25
25
|
return (o = +o) * o * (e * (o - 1) + o);
|
|
26
26
|
}
|
|
27
27
|
return t.overshoot = n, t;
|
|
28
|
-
})(
|
|
28
|
+
})(e0);
|
|
29
29
|
(function n(e) {
|
|
30
30
|
e = +e;
|
|
31
31
|
function t(o) {
|
|
32
32
|
return --o * o * ((o + 1) * e + o) + 1;
|
|
33
33
|
}
|
|
34
34
|
return t.overshoot = n, t;
|
|
35
|
-
})(
|
|
36
|
-
var
|
|
35
|
+
})(e0);
|
|
36
|
+
var V0 = (function n(e) {
|
|
37
37
|
e = +e;
|
|
38
38
|
function t(o) {
|
|
39
39
|
return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
|
|
40
40
|
}
|
|
41
41
|
return t.overshoot = n, t;
|
|
42
|
-
})(
|
|
43
|
-
const
|
|
42
|
+
})(e0);
|
|
43
|
+
const n0 = {
|
|
44
44
|
LINEAR: (n) => n,
|
|
45
|
-
CUBIC:
|
|
46
|
-
CUBIC_IN:
|
|
47
|
-
CUBIC_OUT:
|
|
48
|
-
BACK_IN_OUT:
|
|
49
|
-
},
|
|
50
|
-
function
|
|
45
|
+
CUBIC: Z0,
|
|
46
|
+
CUBIC_IN: G0,
|
|
47
|
+
CUBIC_OUT: W0,
|
|
48
|
+
BACK_IN_OUT: V0.overshoot(0.8)
|
|
49
|
+
}, K0 = n0.LINEAR;
|
|
50
|
+
function r0(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
|
-
type:
|
|
52
|
+
type: ft.ANIMATE,
|
|
53
53
|
object: n,
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: K0,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,23 +62,23 @@ function et(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function wn(n, e = {}) {
|
|
66
|
+
return r0(n, { opacity: 1 }, {
|
|
67
67
|
duration: 500,
|
|
68
|
-
easing:
|
|
68
|
+
easing: n0.CUBIC,
|
|
69
69
|
...typeof e == "number" ? { duration: e } : e
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function mn(n, e = {}) {
|
|
73
|
+
return r0(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
|
-
easing:
|
|
75
|
+
easing: n0.CUBIC,
|
|
76
76
|
...typeof e == "number" ? { duration: e } : e
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function I0(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
|
-
type:
|
|
81
|
+
type: ft.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
83
83
|
object: n,
|
|
84
84
|
props: e,
|
|
@@ -86,13 +86,13 @@ function Ct(n, e, t = {}) {
|
|
|
86
86
|
...t
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function bn(n) {
|
|
90
|
+
return I0(n, { opacity: 0 });
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function An(n) {
|
|
93
|
+
return I0(n, { opacity: 1 });
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const ot = {
|
|
96
96
|
TOP_LEFT: "TopLeft",
|
|
97
97
|
TOP: "Top",
|
|
98
98
|
TOP_RIGHT: "TopRight",
|
|
@@ -102,8 +102,8 @@ const o0 = {
|
|
|
102
102
|
BOTTOM_LEFT: "BottomLeft",
|
|
103
103
|
BOTTOM: "Bottom",
|
|
104
104
|
BOTTOM_RIGHT: "BottomRight"
|
|
105
|
-
},
|
|
106
|
-
function
|
|
105
|
+
}, ht = ot.TOP_LEFT;
|
|
106
|
+
function W(n, e = 0, t = 0, o = 1) {
|
|
107
107
|
if (typeof n == "string") {
|
|
108
108
|
const i = n.replace("#", ""), a = parseInt(i, 16);
|
|
109
109
|
return isNaN(a) ? (console.warn("Invalid hex color format:", n), Q) : i.length === 6 ? {
|
|
@@ -132,18 +132,18 @@ function $(n, e = 0, t = 0, o = 1) {
|
|
|
132
132
|
...n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
W.BLACK = W(0, 0, 0);
|
|
136
|
+
W.BLUE = W(0, 0, 255);
|
|
137
|
+
W.GREEN = W(0, 255, 0);
|
|
138
|
+
W.RED = W(255, 0, 0);
|
|
139
|
+
W.TRANSPARENT = W(0, 0, 0, 0);
|
|
140
|
+
W.WHITE = W(255, 255, 255);
|
|
141
141
|
const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
142
|
-
function
|
|
142
|
+
function _0(n = null) {
|
|
143
143
|
return {
|
|
144
144
|
content: null,
|
|
145
145
|
setup: null,
|
|
146
|
-
anchor:
|
|
146
|
+
anchor: ot.TOP_LEFT,
|
|
147
147
|
height: 0,
|
|
148
148
|
width: 0,
|
|
149
149
|
x: 0,
|
|
@@ -151,30 +151,30 @@ function St(n = null) {
|
|
|
151
151
|
...n
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function O0(n, e = null) {
|
|
155
155
|
return n.alpha * (e ?? 1);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(
|
|
157
|
+
function Et(n, e = null) {
|
|
158
|
+
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(O0(n, e) * 255);
|
|
159
159
|
return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Mn(n = null) {
|
|
162
162
|
const {
|
|
163
163
|
url: e = "https://wikipedia.org/",
|
|
164
|
-
backgroundColor: t =
|
|
164
|
+
backgroundColor: t = W.TRANSPARENT,
|
|
165
165
|
strokeColor: o = Q,
|
|
166
166
|
strokeWidth: i = 0,
|
|
167
167
|
pointerEvents: a = "auto",
|
|
168
168
|
scale: s = 1,
|
|
169
|
-
anchor: r =
|
|
169
|
+
anchor: r = ht,
|
|
170
170
|
height: h = 1e3,
|
|
171
171
|
width: c = 1e3,
|
|
172
172
|
x: f = 0,
|
|
173
173
|
y: d = 0
|
|
174
174
|
} = n || {}, l = document.createElement("iframe");
|
|
175
|
-
l.src = e, l.style.backgroundColor =
|
|
175
|
+
l.src = e, l.style.backgroundColor = Et(t), l.style.border = i > 0 ? `${i}px solid ${Et(o)}` : "none", l.style.pointerEvents = a;
|
|
176
176
|
const u = (100 / s).toFixed(3) + "%";
|
|
177
|
-
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left",
|
|
177
|
+
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", _0({
|
|
178
178
|
content: l,
|
|
179
179
|
anchor: r,
|
|
180
180
|
height: h,
|
|
@@ -183,19 +183,19 @@ function vn(n = null) {
|
|
|
183
183
|
y: d
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const xt = {
|
|
187
187
|
LEFT: "left",
|
|
188
188
|
CENTER: "center",
|
|
189
189
|
RIGHT: "right"
|
|
190
|
-
},
|
|
191
|
-
function
|
|
190
|
+
}, Q0 = xt.LEFT;
|
|
191
|
+
function st(n, e) {
|
|
192
192
|
throw new Error("Unexpected value: " + n);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Ln(n = null) {
|
|
195
195
|
const {
|
|
196
|
-
alignment: e =
|
|
196
|
+
alignment: e = xt.LEFT,
|
|
197
197
|
scale: t = 1,
|
|
198
|
-
anchor: o =
|
|
198
|
+
anchor: o = ht,
|
|
199
199
|
height: i = 1e3,
|
|
200
200
|
width: a = 1e3,
|
|
201
201
|
x: s = 0,
|
|
@@ -204,17 +204,17 @@ function wn(n = null) {
|
|
|
204
204
|
function h(c) {
|
|
205
205
|
const f = document.createElement("video");
|
|
206
206
|
switch (f.autoplay = !0, f.style.transform = `scale(${t})`, e) {
|
|
207
|
-
case
|
|
207
|
+
case xt.LEFT:
|
|
208
208
|
f.style.transformOrigin = "top left";
|
|
209
209
|
break;
|
|
210
|
-
case
|
|
210
|
+
case xt.CENTER:
|
|
211
211
|
f.style.transformOrigin = "top center";
|
|
212
212
|
break;
|
|
213
|
-
case
|
|
213
|
+
case xt.RIGHT:
|
|
214
214
|
f.style.transformOrigin = "top right";
|
|
215
215
|
break;
|
|
216
216
|
default:
|
|
217
|
-
|
|
217
|
+
st(e);
|
|
218
218
|
}
|
|
219
219
|
c.appendChild(f);
|
|
220
220
|
const d = {
|
|
@@ -234,7 +234,7 @@ function wn(n = null) {
|
|
|
234
234
|
f.srcObject.getTracks().forEach((u) => u.stop()), f.style.display = "none", f.srcObject = null;
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return _0({
|
|
238
238
|
content: null,
|
|
239
239
|
setup: h,
|
|
240
240
|
anchor: o,
|
|
@@ -258,16 +258,16 @@ const U = {
|
|
|
258
258
|
SVG: "SVG",
|
|
259
259
|
TEXT: "Text"
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function lt(n) {
|
|
262
262
|
return {
|
|
263
263
|
objectType: U.SLIDE_OBJECT,
|
|
264
264
|
opacity: 1,
|
|
265
265
|
...n
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Tn(n = null) {
|
|
269
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
270
|
-
return
|
|
270
|
+
return lt({
|
|
271
271
|
objectType: U.ARROW,
|
|
272
272
|
arrowheadSize: i,
|
|
273
273
|
color: Q,
|
|
@@ -283,25 +283,25 @@ function mn(n = null) {
|
|
|
283
283
|
...o
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
return
|
|
286
|
+
const J0 = 50;
|
|
287
|
+
function Cn(n = null) {
|
|
288
|
+
return lt({
|
|
289
289
|
objectType: U.CIRCLE,
|
|
290
|
-
anchor:
|
|
290
|
+
anchor: ht,
|
|
291
291
|
strokeColor: Q,
|
|
292
292
|
strokeWidth: 0,
|
|
293
293
|
drawn: 1,
|
|
294
294
|
fillColor: Q,
|
|
295
|
-
radius:
|
|
295
|
+
radius: J0,
|
|
296
296
|
x: 0,
|
|
297
297
|
y: 0,
|
|
298
298
|
...n
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
301
|
+
function h0(n, e = null) {
|
|
302
|
+
return lt({
|
|
303
303
|
objectType: U.GROUP,
|
|
304
|
-
anchor:
|
|
304
|
+
anchor: ht,
|
|
305
305
|
height: 0,
|
|
306
306
|
objects: n,
|
|
307
307
|
previewColor: null,
|
|
@@ -323,9 +323,9 @@ function st(n, e = null) {
|
|
|
323
323
|
...e
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Pn(n) {
|
|
327
327
|
const {
|
|
328
|
-
anchor: e =
|
|
328
|
+
anchor: e = ht,
|
|
329
329
|
cols: t = 1,
|
|
330
330
|
rows: o = 1,
|
|
331
331
|
gapX: i = 0,
|
|
@@ -338,23 +338,23 @@ function bn(n) {
|
|
|
338
338
|
objects: d = () => null
|
|
339
339
|
} = n, l = [], u = [];
|
|
340
340
|
let m = 0, y = 0;
|
|
341
|
-
for (let
|
|
342
|
-
const
|
|
341
|
+
for (let E = 0; E < o; E++) {
|
|
342
|
+
const L = [];
|
|
343
343
|
m = 0;
|
|
344
|
-
let
|
|
345
|
-
for (let
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
344
|
+
let C = 0;
|
|
345
|
+
for (let S = 0; S < t; S++) {
|
|
346
|
+
const T = d(E, S), I = typeof r == "function" ? r(E, S) : r, N = typeof h == "function" ? h(E, S) : h;
|
|
347
|
+
L.push(T), T != null && u.push(
|
|
348
|
+
h0([T], {
|
|
349
349
|
x: m,
|
|
350
350
|
y
|
|
351
351
|
})
|
|
352
|
-
), m +=
|
|
352
|
+
), m += I + i, C = Math.max(C, N);
|
|
353
353
|
}
|
|
354
|
-
l.push(
|
|
354
|
+
l.push(L), y += C + a;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
|
-
grid:
|
|
357
|
+
grid: h0(u, {
|
|
358
358
|
x: c,
|
|
359
359
|
y: f,
|
|
360
360
|
height: y - a,
|
|
@@ -365,10 +365,10 @@ function bn(n) {
|
|
|
365
365
|
objects: l
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
368
|
+
function En(n = null) {
|
|
369
|
+
return lt({
|
|
370
370
|
objectType: U.IMAGE,
|
|
371
|
-
anchor:
|
|
371
|
+
anchor: ht,
|
|
372
372
|
cornerRadius: 0,
|
|
373
373
|
height: 100,
|
|
374
374
|
imageId: "",
|
|
@@ -379,8 +379,8 @@ function Mn(n = null) {
|
|
|
379
379
|
...n
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function Sn(n = null) {
|
|
383
|
+
return lt({
|
|
384
384
|
objectType: U.LINE,
|
|
385
385
|
color: Q,
|
|
386
386
|
drawn: 1,
|
|
@@ -394,10 +394,10 @@ function Ln(n = null) {
|
|
|
394
394
|
...n
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
397
|
+
function kn(n, e = null) {
|
|
398
|
+
return lt({
|
|
399
399
|
objectType: U.MASK,
|
|
400
|
-
anchor:
|
|
400
|
+
anchor: ht,
|
|
401
401
|
height: 100,
|
|
402
402
|
objects: n,
|
|
403
403
|
preview: !1,
|
|
@@ -407,52 +407,52 @@ function Tn(n, e = null) {
|
|
|
407
407
|
...e
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
var
|
|
411
|
-
const e = (n && n.length > 0 ? n : "M0,0").match(
|
|
410
|
+
var te = Object.defineProperty, O = (n, e) => te(n, "name", { value: e, configurable: !0 }), Ct = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, ee = /([astvzqmhlc])([^astvzqmhlc]*)/gi, ne = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, re = O((n) => {
|
|
411
|
+
const e = (n && n.length > 0 ? n : "M0,0").match(ee);
|
|
412
412
|
if (!e) throw new Error(`No path elements found in string ${n}`);
|
|
413
413
|
return e.reduce((t, o) => {
|
|
414
|
-
let i = o.charAt(0), a = i.toLowerCase(), s =
|
|
414
|
+
let i = o.charAt(0), a = i.toLowerCase(), s = ie(o.substring(1));
|
|
415
415
|
if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
|
|
416
416
|
const r = o.substring(1).trim().split(" ");
|
|
417
417
|
s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
|
|
418
418
|
}
|
|
419
419
|
for (; s.length >= 0; ) {
|
|
420
|
-
if (s.length ===
|
|
421
|
-
t.push([i, ...s.splice(0,
|
|
420
|
+
if (s.length === Ct[a]) {
|
|
421
|
+
t.push([i, ...s.splice(0, Ct[a])]);
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
|
-
if (s.length <
|
|
425
|
-
t.push([i, ...s.splice(0,
|
|
424
|
+
if (s.length < Ct[a]) throw new Error(`Malformed path data: "${i}" must have ${Ct[a]} elements and has ${s.length}: ${o}`);
|
|
425
|
+
t.push([i, ...s.splice(0, Ct[a])]);
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}, []);
|
|
429
|
-
}, "default"),
|
|
430
|
-
const e = n.match(
|
|
429
|
+
}, "default"), ie = O((n) => {
|
|
430
|
+
const e = n.match(ne);
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
|
-
}, "parseValues"),
|
|
432
|
+
}, "parseValues"), wt, J = (wt = class {
|
|
433
433
|
constructor(e, t, o, i) {
|
|
434
434
|
k(this, "x0");
|
|
435
435
|
k(this, "x1");
|
|
436
436
|
k(this, "y0");
|
|
437
437
|
k(this, "y1");
|
|
438
|
-
k(this, "getTotalLength",
|
|
439
|
-
k(this, "getPointAtLength",
|
|
438
|
+
k(this, "getTotalLength", O(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
|
|
439
|
+
k(this, "getPointAtLength", O((e) => {
|
|
440
440
|
let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
441
441
|
t = Number.isNaN(t) ? 1 : t;
|
|
442
442
|
const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
|
|
443
443
|
return { x: this.x0 + o, y: this.y0 + i };
|
|
444
444
|
}, "getPointAtLength"));
|
|
445
|
-
k(this, "getTangentAtLength",
|
|
445
|
+
k(this, "getTangentAtLength", O((e) => {
|
|
446
446
|
const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
447
447
|
return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
|
|
448
448
|
}, "getTangentAtLength"));
|
|
449
|
-
k(this, "getPropertiesAtLength",
|
|
449
|
+
k(this, "getPropertiesAtLength", O((e) => {
|
|
450
450
|
const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
|
|
451
451
|
return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
|
|
452
452
|
}, "getPropertiesAtLength"));
|
|
453
453
|
this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
|
|
454
454
|
}
|
|
455
|
-
},
|
|
455
|
+
}, O(wt, "LinearPosition"), wt), mt, l0 = (mt = class {
|
|
456
456
|
constructor(e, t, o, i, a, s, r, h, c) {
|
|
457
457
|
k(this, "x0");
|
|
458
458
|
k(this, "y0");
|
|
@@ -464,13 +464,13 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
464
464
|
k(this, "x1");
|
|
465
465
|
k(this, "y1");
|
|
466
466
|
k(this, "length");
|
|
467
|
-
k(this, "getTotalLength",
|
|
468
|
-
k(this, "getPointAtLength",
|
|
467
|
+
k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
|
|
468
|
+
k(this, "getPointAtLength", O((e) => {
|
|
469
469
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
470
|
-
const t =
|
|
470
|
+
const t = c0({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
|
|
471
471
|
return { x: t.x, y: t.y };
|
|
472
472
|
}, "getPointAtLength"));
|
|
473
|
-
k(this, "getTangentAtLength",
|
|
473
|
+
k(this, "getTangentAtLength", O((e) => {
|
|
474
474
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
475
475
|
const t = 0.05, o = this.getPointAtLength(e);
|
|
476
476
|
let i;
|
|
@@ -478,74 +478,74 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
|
|
|
478
478
|
const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
|
|
479
479
|
return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
|
|
480
480
|
}, "getTangentAtLength"));
|
|
481
|
-
k(this, "getPropertiesAtLength",
|
|
481
|
+
k(this, "getPropertiesAtLength", O((e) => {
|
|
482
482
|
const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
485
485
|
this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
|
|
486
|
-
const f =
|
|
487
|
-
return
|
|
486
|
+
const f = oe(300, function(d) {
|
|
487
|
+
return c0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
|
|
488
488
|
});
|
|
489
489
|
this.length = f.arcLength;
|
|
490
490
|
}
|
|
491
|
-
},
|
|
492
|
-
e = Math.abs(e), t = Math.abs(t), o =
|
|
493
|
-
const h =
|
|
491
|
+
}, O(mt, "Arc"), mt), c0 = O((n, e, t, o, i, a, s, r) => {
|
|
492
|
+
e = Math.abs(e), t = Math.abs(t), o = se(o, 360);
|
|
493
|
+
const h = ae(o);
|
|
494
494
|
if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
|
|
495
495
|
if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
|
|
496
496
|
const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * f, y: -Math.sin(h) * c + Math.cos(h) * f }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
|
|
497
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
498
498
|
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(d.y, 2) - Math.pow(t, 2) * Math.pow(d.x, 2)) / (Math.pow(e, 2) * Math.pow(d.y, 2) + Math.pow(t, 2) * Math.pow(d.x, 2));
|
|
499
499
|
u = u < 0 ? 0 : u;
|
|
500
|
-
const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e),
|
|
501
|
-
let
|
|
502
|
-
!a &&
|
|
503
|
-
const
|
|
504
|
-
return { x: Math.cos(h) *
|
|
505
|
-
}, "pointOnEllipticalArc"),
|
|
500
|
+
const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e), E = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, L = { x: (d.x - y) / e, y: (d.y - M) / t }, C = f0({ x: 1, y: 0 }, L);
|
|
501
|
+
let S = f0(L, { x: (-d.x - y) / e, y: (-d.y - M) / t });
|
|
502
|
+
!a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
|
|
503
|
+
const T = C + S * r, I = e * Math.cos(T), N = t * Math.sin(T);
|
|
504
|
+
return { x: Math.cos(h) * I - Math.sin(h) * N + E.x, y: Math.sin(h) * I + Math.cos(h) * N + E.y, ellipticalArcStartAngle: C, ellipticalArcEndAngle: C + S, ellipticalArcAngle: T, ellipticalArcCenter: E, resultantRx: e, resultantRy: t };
|
|
505
|
+
}, "pointOnEllipticalArc"), oe = O((n, e) => {
|
|
506
506
|
n = n ?? 500;
|
|
507
507
|
let t = 0;
|
|
508
508
|
const o = [], i = [];
|
|
509
509
|
let a, s = e(0);
|
|
510
510
|
for (let r = 0; r < n; r++) {
|
|
511
|
-
const h =
|
|
512
|
-
a = e(h), t +=
|
|
511
|
+
const h = he(r * (1 / n), 0, 1);
|
|
512
|
+
a = e(h), t += u0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
513
513
|
}
|
|
514
|
-
return a = e(1), i.push([s, a]), t +=
|
|
515
|
-
}, "approximateArcLengthOfCurve"),
|
|
514
|
+
return a = e(1), i.push([s, a]), t += u0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
|
|
515
|
+
}, "approximateArcLengthOfCurve"), se = O((n, e) => (n % e + e) % e, "mod"), ae = O((n) => n * (Math.PI / 180), "toRadians"), u0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), he = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), f0 = O((n, e) => {
|
|
516
516
|
const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
|
|
517
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
518
|
-
}, "angleBetween"), o1 = [[], [], [-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]], s1 = [[], [], [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]], a1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], h1 = _((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"), l1 = _((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"), c1 = _((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), le = [[], [], [-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]], ce = [[], [], [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]], ue = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], fe = O((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"), ge = O((n, e, t) => F0([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"), pe = O((n, e, t) => {
|
|
519
519
|
let o, i;
|
|
520
520
|
const a = t / 2;
|
|
521
521
|
o = 0;
|
|
522
|
-
for (let s = 0; s < 20; s++) i = a *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * le[20][s] + a, o += ce[20][s] * R0(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"),
|
|
524
|
+
}, "getCubicArcLength"), F0 = O((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"), de = O((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
528
|
const f = h / (2 * r), d = t + f, l = c / r - f * f, u = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (d + u) / (f + m) !== 0 ? l * Math.log(Math.abs((d + u) / (f + m))) : 0;
|
|
529
529
|
return Math.sqrt(r) / 2 * (d * u - f * m + y);
|
|
530
|
-
}, "getQuadraticArcLength"),
|
|
531
|
-
function
|
|
532
|
-
const o =
|
|
530
|
+
}, "getQuadraticArcLength"), xe = O((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
|
|
531
|
+
function R0(n, e, t) {
|
|
532
|
+
const o = Zt(1, t, n), i = Zt(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
534
534
|
}
|
|
535
|
-
|
|
536
|
-
var
|
|
535
|
+
O(R0, "BFunc");
|
|
536
|
+
var Zt = O((n, e, t) => {
|
|
537
537
|
const o = t.length - 1;
|
|
538
538
|
let i, a;
|
|
539
539
|
if (o === 0) return 0;
|
|
540
540
|
if (n === 0) {
|
|
541
541
|
a = 0;
|
|
542
|
-
for (let s = 0; s <= o; s++) a +=
|
|
542
|
+
for (let s = 0; s <= o; s++) a += ue[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
543
543
|
return a;
|
|
544
544
|
}
|
|
545
545
|
i = new Array(o);
|
|
546
546
|
for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
|
|
547
|
-
return
|
|
548
|
-
}, "getDerivative"),
|
|
547
|
+
return Zt(n - 1, e, i);
|
|
548
|
+
}, "getDerivative"), Nt = O((n, e, t) => {
|
|
549
549
|
let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
|
|
550
550
|
for (; o > 1e-3; ) {
|
|
551
551
|
const r = t(i + a), h = Math.abs(n - r) / e;
|
|
@@ -557,7 +557,7 @@ var G0 = _((n, e, t) => {
|
|
|
557
557
|
if (s++, s > 500) break;
|
|
558
558
|
}
|
|
559
559
|
return i;
|
|
560
|
-
}, "t2length"),
|
|
560
|
+
}, "t2length"), bt, ct = (bt = class {
|
|
561
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
562
562
|
k(this, "a");
|
|
563
563
|
k(this, "b");
|
|
@@ -567,59 +567,59 @@ var G0 = _((n, e, t) => {
|
|
|
567
567
|
k(this, "getArcLength");
|
|
568
568
|
k(this, "getPoint");
|
|
569
569
|
k(this, "getDerivative");
|
|
570
|
-
k(this, "getTotalLength",
|
|
571
|
-
k(this, "getPointAtLength",
|
|
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 =
|
|
570
|
+
k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
|
|
571
|
+
k(this, "getPointAtLength", O((e) => {
|
|
572
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (a) => this.getArcLength(t, o, a));
|
|
573
573
|
return this.getPoint(t, o, i);
|
|
574
574
|
}, "getPointAtLength"));
|
|
575
|
-
k(this, "getTangentAtLength",
|
|
576
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
575
|
+
k(this, "getTangentAtLength", O((e) => {
|
|
576
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
577
577
|
let r;
|
|
578
578
|
return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
|
|
579
579
|
}, "getTangentAtLength"));
|
|
580
|
-
k(this, "getPropertiesAtLength",
|
|
581
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
580
|
+
k(this, "getPropertiesAtLength", O((e) => {
|
|
581
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
582
582
|
let r;
|
|
583
583
|
r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
|
|
584
584
|
const h = this.getPoint(t, o, i);
|
|
585
585
|
return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
|
-
k(this, "getC",
|
|
588
|
-
k(this, "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 =
|
|
587
|
+
k(this, "getC", O(() => this.c, "getC"));
|
|
588
|
+
k(this, "getD", O(() => 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 = pe, this.getPoint = fe, this.getDerivative = ge, this.d = { x: r, y: h }) : (this.getArcLength = de, this.getPoint = F0, this.getDerivative = xe, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
|
|
590
590
|
}
|
|
591
|
-
},
|
|
591
|
+
}, O(bt, "Bezier"), bt), At, ye = (At = class {
|
|
592
592
|
constructor(e) {
|
|
593
593
|
k(this, "length", 0);
|
|
594
594
|
k(this, "partial_lengths", []);
|
|
595
595
|
k(this, "functions", []);
|
|
596
596
|
k(this, "initial_point", null);
|
|
597
|
-
k(this, "getPartAtLength",
|
|
597
|
+
k(this, "getPartAtLength", O((e) => {
|
|
598
598
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
599
599
|
let t = this.partial_lengths.length - 1;
|
|
600
600
|
for (; this.partial_lengths[t] >= e && t > 0; ) t--;
|
|
601
601
|
return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
|
|
602
602
|
}, "getPartAtLength"));
|
|
603
|
-
k(this, "getTotalLength",
|
|
604
|
-
k(this, "getPointAtLength",
|
|
603
|
+
k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
|
|
604
|
+
k(this, "getPointAtLength", O((e) => {
|
|
605
605
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
606
606
|
if (o) return o.getPointAtLength(t.fraction);
|
|
607
607
|
if (this.initial_point) return this.initial_point;
|
|
608
608
|
throw new Error("Wrong function at this part.");
|
|
609
609
|
}, "getPointAtLength"));
|
|
610
|
-
k(this, "getTangentAtLength",
|
|
610
|
+
k(this, "getTangentAtLength", O((e) => {
|
|
611
611
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
612
612
|
if (o) return o.getTangentAtLength(t.fraction);
|
|
613
613
|
if (this.initial_point) return { x: 0, y: 0 };
|
|
614
614
|
throw new Error("Wrong function at this part.");
|
|
615
615
|
}, "getTangentAtLength"));
|
|
616
|
-
k(this, "getPropertiesAtLength",
|
|
616
|
+
k(this, "getPropertiesAtLength", O((e) => {
|
|
617
617
|
const t = this.getPartAtLength(e), o = this.functions[t.i];
|
|
618
618
|
if (o) return o.getPropertiesAtLength(t.fraction);
|
|
619
619
|
if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
|
|
620
620
|
throw new Error("Wrong function at this part.");
|
|
621
621
|
}, "getPropertiesAtLength"));
|
|
622
|
-
k(this, "getParts",
|
|
622
|
+
k(this, "getParts", O(() => {
|
|
623
623
|
const e = [];
|
|
624
624
|
for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
|
|
625
625
|
this.functions[t] = this.functions[t];
|
|
@@ -628,7 +628,7 @@ var G0 = _((n, e, t) => {
|
|
|
628
628
|
}
|
|
629
629
|
return e;
|
|
630
630
|
}, "getParts"));
|
|
631
|
-
const t = Array.isArray(e) ? e :
|
|
631
|
+
const t = Array.isArray(e) ? e : re(e);
|
|
632
632
|
let o, i = [0, 0], a = [0, 0], s = [0, 0];
|
|
633
633
|
for (let r = 0; r < t.length; r++) {
|
|
634
634
|
if (t[r][0] === "M") i = [t[r][1], t[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: t[r][1], y: t[r][2] });
|
|
@@ -640,83 +640,83 @@ var G0 = _((n, e, t) => {
|
|
|
640
640
|
else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new J(i[0], i[0], i[1], t[r][1])), i[1] = t[r][1];
|
|
641
641
|
else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0], i[1], i[1] + t[r][1])), i[1] = t[r][1] + i[1];
|
|
642
642
|
else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new J(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
|
|
643
|
-
else if (t[r][0] === "C") o = new
|
|
644
|
-
else if (t[r][0] === "c") o = new
|
|
643
|
+
else if (t[r][0] === "C") o = new ct(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
|
|
644
|
+
else if (t[r][0] === "c") o = new ct(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new J(i[0], i[0], i[1], i[1]));
|
|
645
645
|
else if (t[r][0] === "S") {
|
|
646
646
|
if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
|
|
647
647
|
if (o) {
|
|
648
648
|
const h = o.getC();
|
|
649
|
-
o = new
|
|
649
|
+
o = new ct(i[0], i[1], 2 * i[0] - h.x, 2 * i[1] - h.y, t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
650
650
|
}
|
|
651
|
-
} else o = new
|
|
651
|
+
} else o = new ct(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
652
652
|
o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
|
|
653
653
|
} else if (t[r][0] === "s") {
|
|
654
654
|
if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
|
|
655
655
|
if (o) {
|
|
656
656
|
const h = o.getC(), c = o.getD();
|
|
657
|
-
o = new
|
|
657
|
+
o = new ct(i[0], i[1], i[0] + c.x - h.x, i[1] + c.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
|
|
658
658
|
}
|
|
659
|
-
} else o = new
|
|
659
|
+
} else o = new ct(i[0], i[1], i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
|
|
660
660
|
o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
|
|
661
661
|
} else if (t[r][0] === "Q") {
|
|
662
662
|
if (i[0] === t[r][1] && i[1] === t[r][2]) {
|
|
663
663
|
const h = new J(t[r][1], t[r][3], t[r][2], t[r][4]);
|
|
664
664
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
665
|
-
} else o = new
|
|
665
|
+
} else o = new ct(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
666
666
|
i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
|
|
667
667
|
} else if (t[r][0] === "q") {
|
|
668
|
-
if (t[r][1] !== 0 || t[r][2] !== 0) o = new
|
|
668
|
+
if (t[r][1] !== 0 || t[r][2] !== 0) o = new ct(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
669
669
|
else {
|
|
670
670
|
const h = new J(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
|
|
671
671
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
672
672
|
}
|
|
673
673
|
a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
|
|
674
674
|
} else if (t[r][0] === "T") {
|
|
675
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
675
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
|
|
676
676
|
else {
|
|
677
677
|
const h = new J(i[0], t[r][1], i[1], t[r][2]);
|
|
678
678
|
this.functions.push(h), this.length += h.getTotalLength();
|
|
679
679
|
}
|
|
680
680
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
|
|
681
681
|
} else if (t[r][0] === "t") {
|
|
682
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
682
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
683
683
|
else {
|
|
684
684
|
const h = new J(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
|
|
685
685
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
686
686
|
}
|
|
687
687
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
|
|
688
688
|
} else if (t[r][0] === "A") {
|
|
689
|
-
const h = new
|
|
689
|
+
const h = new l0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
|
|
690
690
|
this.length += h.getTotalLength(), i = [t[r][6], t[r][7]], this.functions.push(h);
|
|
691
691
|
} else if (t[r][0] === "a") {
|
|
692
|
-
const h = new
|
|
692
|
+
const h = new l0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
|
|
693
693
|
this.length += h.getTotalLength(), i = [i[0] + t[r][6], i[1] + t[r][7]], this.functions.push(h);
|
|
694
694
|
}
|
|
695
695
|
this.partial_lengths.push(this.length);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
},
|
|
698
|
+
}, O(At, "SVGPathProperties"), At), Mt, Vt = (Mt = class {
|
|
699
699
|
constructor(e) {
|
|
700
700
|
k(this, "inst");
|
|
701
|
-
k(this, "getTotalLength",
|
|
702
|
-
k(this, "getPointAtLength",
|
|
703
|
-
k(this, "getTangentAtLength",
|
|
704
|
-
k(this, "getPropertiesAtLength",
|
|
705
|
-
k(this, "getParts",
|
|
706
|
-
if (this.inst = new
|
|
707
|
-
}
|
|
708
|
-
},
|
|
709
|
-
function
|
|
701
|
+
k(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
702
|
+
k(this, "getPointAtLength", O((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
|
|
703
|
+
k(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
|
+
k(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
|
+
k(this, "getParts", O(() => this.inst.getParts(), "getParts"));
|
|
706
|
+
if (this.inst = new ye(e), !(this instanceof Vt)) return new Vt(e);
|
|
707
|
+
}
|
|
708
|
+
}, O(Mt, "_svgPathProperties"), Mt);
|
|
709
|
+
function ve(n = W.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
|
-
function
|
|
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
|
|
714
|
-
return
|
|
712
|
+
function In(n = null) {
|
|
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 Vt(r).getTotalLength();
|
|
714
|
+
return lt({
|
|
715
715
|
objectType: U.PATH,
|
|
716
|
-
anchor:
|
|
716
|
+
anchor: ht,
|
|
717
717
|
strokeColor: Q,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
fillColor:
|
|
719
|
+
fillColor: ve(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -730,8 +730,8 @@ function Pn(n = null) {
|
|
|
730
730
|
...s
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
733
|
+
function _n(n = null) {
|
|
734
|
+
return lt({
|
|
735
735
|
objectType: U.POLYGON,
|
|
736
736
|
strokeColor: Q,
|
|
737
737
|
strokeWidth: 0,
|
|
@@ -745,10 +745,10 @@ function Cn(n = null) {
|
|
|
745
745
|
...n
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
return
|
|
748
|
+
function On(n = null) {
|
|
749
|
+
return lt({
|
|
750
750
|
objectType: U.RECTANGLE,
|
|
751
|
-
anchor:
|
|
751
|
+
anchor: ht,
|
|
752
752
|
strokeColor: Q,
|
|
753
753
|
strokeWidth: 0,
|
|
754
754
|
drawn: 1,
|
|
@@ -761,10 +761,10 @@ function Sn(n = null) {
|
|
|
761
761
|
...n
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
return
|
|
764
|
+
function Fn(n = null) {
|
|
765
|
+
return lt({
|
|
766
766
|
objectType: U.SVG,
|
|
767
|
-
anchor:
|
|
767
|
+
anchor: ht,
|
|
768
768
|
height: 100,
|
|
769
769
|
svg: "",
|
|
770
770
|
width: 100,
|
|
@@ -773,11 +773,11 @@ function En(n = null) {
|
|
|
773
773
|
...n
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const we = {
|
|
777
777
|
NORMAL: "normal",
|
|
778
778
|
ITALIC: "italic",
|
|
779
779
|
OBLIQUE: "oblique"
|
|
780
|
-
},
|
|
780
|
+
}, me = we.NORMAL, be = {
|
|
781
781
|
THIN: 100,
|
|
782
782
|
EXTRA_LIGHT: 200,
|
|
783
783
|
LIGHT: 300,
|
|
@@ -787,132 +787,217 @@ const d1 = {
|
|
|
787
787
|
BOLD: 700,
|
|
788
788
|
EXTRA_BOLD: 800,
|
|
789
789
|
BLACK: 900
|
|
790
|
-
},
|
|
790
|
+
}, Ae = be.NORMAL, Me = {
|
|
791
791
|
color: Q,
|
|
792
792
|
fontFamily: "sans-serif",
|
|
793
793
|
fontSize: 100,
|
|
794
|
-
fontStyle:
|
|
795
|
-
fontWeight:
|
|
794
|
+
fontStyle: me,
|
|
795
|
+
fontWeight: Ae,
|
|
796
796
|
ligatures: !1,
|
|
797
797
|
subscript: !1,
|
|
798
798
|
superscript: !1
|
|
799
799
|
};
|
|
800
|
-
function
|
|
800
|
+
function N0(n) {
|
|
801
801
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
return
|
|
803
|
+
function Le(n) {
|
|
804
|
+
return N0(n).reduce(
|
|
805
805
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
806
806
|
0
|
|
807
807
|
);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
return
|
|
809
|
+
function Te(n = "", e = null) {
|
|
810
|
+
return lt({
|
|
811
811
|
objectType: U.TEXT,
|
|
812
|
-
alignment:
|
|
813
|
-
anchor:
|
|
812
|
+
alignment: Q0,
|
|
813
|
+
anchor: ht,
|
|
814
814
|
length: null,
|
|
815
815
|
lineSpacing: 1,
|
|
816
816
|
text: n,
|
|
817
817
|
x: 0,
|
|
818
818
|
y: 0,
|
|
819
|
-
...
|
|
819
|
+
...Me,
|
|
820
820
|
...e
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
|
|
823
|
+
Te.writeOn = (n, e = {}) => r0(
|
|
824
824
|
n,
|
|
825
825
|
{
|
|
826
|
-
length:
|
|
826
|
+
length: Le(n.text)
|
|
827
827
|
},
|
|
828
828
|
e
|
|
829
829
|
);
|
|
830
|
-
let
|
|
831
|
-
function
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
830
|
+
let R = null, It = null;
|
|
831
|
+
function Ce({
|
|
832
|
+
presentation: n,
|
|
833
|
+
onNavigateToSlide: e,
|
|
834
|
+
onNext: t
|
|
835
|
+
}) {
|
|
836
|
+
if (R !== null && !R.closed)
|
|
837
|
+
return R.focus(), It;
|
|
838
|
+
if (R = window.open("", "Navigator", "width=1100,height=680,left=20,top=50"), R === null)
|
|
839
|
+
return console.error("Failed to open navigator window."), null;
|
|
840
|
+
const o = Pe(n, e, t);
|
|
841
|
+
return It = o, R.document.title = n.title, R.document.body.replaceChildren(o.element), R.addEventListener("keyup", (i) => {
|
|
842
|
+
(i.key === "Escape" || i.key === "`") && (R == null || R.close(), R = null, It = null);
|
|
843
|
+
}), It;
|
|
844
|
+
}
|
|
845
|
+
function Pe(n, e, t) {
|
|
846
|
+
const o = (R == null ? void 0 : R.document) ?? document, i = o.createElement("div");
|
|
847
|
+
i.style.boxSizing = "border-box", i.style.display = "grid", i.style.gridTemplateColumns = "260px 1fr", i.style.gap = "18px", i.style.height = "100vh", i.style.overflow = "hidden", i.style.padding = "18px", i.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', i.style.backgroundColor = "#f5f6f8", i.style.color = "#1f2937", o.body.style.margin = "0", o.body.style.overflow = "hidden";
|
|
848
|
+
const a = o.createElement("div");
|
|
849
|
+
a.style.display = "flex", a.style.flexDirection = "column", a.style.gap = "8px", a.style.minHeight = "0", a.style.overflowY = "auto", a.style.paddingRight = "4px";
|
|
850
|
+
const s = o.createElement("div");
|
|
851
|
+
s.style.display = "flex", s.style.flexDirection = "column", s.style.gap = "14px", s.style.minHeight = "0", s.style.minWidth = "0", s.style.overflow = "hidden";
|
|
852
|
+
const r = o.createElement("div");
|
|
853
|
+
r.style.display = "flex", r.style.gap = "14px", r.style.alignItems = "center", r.style.flexWrap = "wrap", r.style.fontSize = "13px", r.style.color = "#4b5563";
|
|
854
|
+
const h = o.createElement("div");
|
|
855
|
+
h.style.display = "flex", h.style.gap = "14px", h.style.flex = "1 1 auto", h.style.minHeight = "0", h.style.minWidth = "0", h.style.overflow = "hidden";
|
|
856
|
+
const c = g0("Current", n), f = g0("Next", n);
|
|
857
|
+
f.container.style.cursor = "pointer", f.container.addEventListener("click", t);
|
|
858
|
+
const d = n.slides.map((L, C) => {
|
|
859
|
+
const S = Ee(L, C);
|
|
860
|
+
return S.style.cursor = "pointer", S.addEventListener("click", (T) => {
|
|
861
|
+
T.shiftKey && (R == null || R.close()), e(C);
|
|
862
|
+
}), a.appendChild(S), S;
|
|
863
|
+
}), l = Bt("Slides", a, !0), u = Bt("Current", c.container, !0), m = Bt("Next", f.container, !0), y = () => {
|
|
864
|
+
const L = u.input.checked && m.input.checked && E();
|
|
865
|
+
i.style.gridTemplateColumns = l.input.checked ? "260px 1fr" : "1fr", h.style.flexDirection = L ? "column" : "row", c.container.style.flex = "1 1 0", f.container.style.flex = "1 1 0", requestAnimationFrame(() => {
|
|
866
|
+
c.resize(), f.resize();
|
|
867
|
+
});
|
|
868
|
+
};
|
|
869
|
+
l.input.addEventListener("change", y), u.input.addEventListener("change", y), m.input.addEventListener("change", y), R == null || R.addEventListener("resize", y), r.appendChild(l.element), r.appendChild(u.element), r.appendChild(m.element), h.appendChild(c.container), h.appendChild(f.container), s.appendChild(r), s.appendChild(h), i.appendChild(a), i.appendChild(s);
|
|
870
|
+
function M(L, C, S, T) {
|
|
871
|
+
d.forEach((I, N) => {
|
|
872
|
+
const G = N === L;
|
|
873
|
+
I.style.backgroundColor = G ? "#dbeafe" : "#ffffff", I.style.borderColor = G ? "#60a5fa" : "#e5e7eb", I.style.color = G ? "#1e3a8a" : "#1f2937";
|
|
874
|
+
}), c.label.textContent = p0(n, L, C), f.label.textContent = p0(n, S, T), Se(d[L], a), y();
|
|
875
|
+
}
|
|
876
|
+
function E() {
|
|
877
|
+
const L = R;
|
|
878
|
+
if (L === null)
|
|
879
|
+
return !1;
|
|
880
|
+
const C = l.input.checked ? 278 : 0, S = L.innerWidth - 36 - C, T = L.innerHeight - 36 - r.offsetHeight - 14;
|
|
881
|
+
return S <= 0 || T <= 0 ? !1 : S / T < 1.1;
|
|
835
882
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
883
|
+
return {
|
|
884
|
+
element: i,
|
|
885
|
+
currentCanvas: c.canvas,
|
|
886
|
+
nextCanvas: f.canvas,
|
|
887
|
+
currentLabel: c.label,
|
|
888
|
+
nextLabel: f.label,
|
|
889
|
+
isOpen: () => R !== null && !R.closed,
|
|
890
|
+
update: M
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
function Ee(n, e) {
|
|
894
|
+
const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
|
|
895
|
+
o.style.display = "flex", o.style.alignItems = "center", o.style.gap = "10px", o.style.padding = "8px 10px", o.style.backgroundColor = "#ffffff", o.style.border = "1px solid #e5e7eb", o.style.borderRadius = "6px", o.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.06)", o.style.fontSize = "14px", o.style.lineHeight = "1", o.style.userSelect = "none";
|
|
896
|
+
const i = t.createElement("div");
|
|
897
|
+
i.textContent = `${e + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
|
|
898
|
+
const a = t.createElement("div");
|
|
899
|
+
return a.textContent = n.title.length > 0 ? n.title : `Slide ${e + 1}`, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap", o.appendChild(i), o.appendChild(a), o;
|
|
900
|
+
}
|
|
901
|
+
function g0(n, e) {
|
|
902
|
+
var f;
|
|
903
|
+
const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
|
|
904
|
+
o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
|
|
905
|
+
const i = t.createElement("div");
|
|
906
|
+
i.textContent = n, i.style.marginBottom = "4px", i.style.fontSize = "12px", i.style.fontWeight = "700", i.style.textAlign = "center", i.style.textTransform = "uppercase", i.style.color = "#6b7280";
|
|
907
|
+
const a = t.createElement("div");
|
|
908
|
+
a.style.marginBottom = "6px", a.style.fontSize = "14px", a.style.fontWeight = "600", a.style.textAlign = "center";
|
|
909
|
+
const s = t.createElement("div");
|
|
910
|
+
s.style.flex = "1 1 auto", s.style.display = "flex", s.style.alignItems = "flex-start", s.style.justifyContent = "center", s.style.minHeight = "0", s.style.width = "100%", s.style.overflow = "hidden";
|
|
911
|
+
const r = t.createElement("canvas");
|
|
912
|
+
r.style.display = "block", r.style.width = "0", r.style.height = "0";
|
|
913
|
+
function h() {
|
|
914
|
+
const d = s.clientWidth, l = s.clientHeight;
|
|
915
|
+
if (d <= 0 || l <= 0)
|
|
916
|
+
return;
|
|
917
|
+
const u = e.size.width / e.size.height, m = Math.min(d, l * u), y = m / u;
|
|
918
|
+
r.style.width = `${m}px`, r.style.height = `${y}px`;
|
|
839
919
|
}
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
(o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
|
|
843
|
-
});
|
|
920
|
+
const c = (f = t.defaultView) == null ? void 0 : f.ResizeObserver;
|
|
921
|
+
return c !== void 0 && new c(h).observe(s), R == null || R.addEventListener("resize", h), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: h };
|
|
844
922
|
}
|
|
845
|
-
function
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
}), t;
|
|
853
|
-
}
|
|
854
|
-
function L1(n, e) {
|
|
855
|
-
const t = document.createElement("div");
|
|
856
|
-
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;
|
|
923
|
+
function Bt(n, e, t) {
|
|
924
|
+
const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
|
|
925
|
+
a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
|
|
926
|
+
const s = o.createElement("input");
|
|
927
|
+
return s.type = "checkbox", s.checked = t, s.addEventListener("change", () => {
|
|
928
|
+
e.style.display = s.checked ? i : "none";
|
|
929
|
+
}), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
|
|
857
930
|
}
|
|
858
|
-
function
|
|
931
|
+
function p0(n, e, t) {
|
|
932
|
+
if (e === null)
|
|
933
|
+
return "End of presentation";
|
|
934
|
+
const o = n.slides[e];
|
|
935
|
+
return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
|
|
936
|
+
}
|
|
937
|
+
function Se(n, e) {
|
|
938
|
+
if (n === void 0)
|
|
939
|
+
return;
|
|
940
|
+
const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
|
|
941
|
+
(t < i || o > a) && n.scrollIntoView({ block: "nearest" });
|
|
942
|
+
}
|
|
943
|
+
function at(n = null) {
|
|
859
944
|
return {
|
|
860
945
|
height: 0,
|
|
861
946
|
width: 0,
|
|
862
947
|
...n
|
|
863
948
|
};
|
|
864
949
|
}
|
|
865
|
-
const
|
|
866
|
-
function
|
|
950
|
+
const ke = at({ width: 0, height: 0 });
|
|
951
|
+
function Ie(n = null) {
|
|
867
952
|
return {
|
|
868
|
-
backgroundColor:
|
|
953
|
+
backgroundColor: W.WHITE,
|
|
869
954
|
slides: [],
|
|
870
955
|
title: "Presentation",
|
|
871
|
-
size:
|
|
956
|
+
size: at({ width: 3840, height: 2160 }),
|
|
872
957
|
resources: {
|
|
873
958
|
images: {}
|
|
874
959
|
},
|
|
875
960
|
...n
|
|
876
961
|
};
|
|
877
962
|
}
|
|
878
|
-
function
|
|
963
|
+
function _e(n) {
|
|
879
964
|
const e = Array.isArray(n) ? n : [n];
|
|
880
965
|
let t = 0, o = 0;
|
|
881
966
|
for (const i of e)
|
|
882
967
|
switch (i.type) {
|
|
883
|
-
case
|
|
968
|
+
case ft.PAUSE:
|
|
884
969
|
t += i.duration;
|
|
885
970
|
break;
|
|
886
|
-
case
|
|
971
|
+
case ft.ANIMATE:
|
|
887
972
|
o = Math.max(o, t + i.delay + i.duration), i.block && (t += i.delay + i.duration);
|
|
888
973
|
break;
|
|
889
|
-
case
|
|
974
|
+
case ft.UPDATE:
|
|
890
975
|
break;
|
|
891
976
|
default:
|
|
892
|
-
|
|
977
|
+
st(i);
|
|
893
978
|
}
|
|
894
979
|
return o;
|
|
895
980
|
}
|
|
896
|
-
function
|
|
897
|
-
const { red: t, green: o, blue: i } = n, a =
|
|
981
|
+
function i0(n, e = null) {
|
|
982
|
+
const { red: t, green: o, blue: i } = n, a = O0(n, e);
|
|
898
983
|
return `rgba(${t}, ${o}, ${i}, ${a})`;
|
|
899
984
|
}
|
|
900
|
-
function
|
|
985
|
+
function Oe(n) {
|
|
901
986
|
return n === document.body;
|
|
902
987
|
}
|
|
903
|
-
function
|
|
988
|
+
function Fe(n, e) {
|
|
904
989
|
const t = document.createElement("div");
|
|
905
|
-
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative",
|
|
906
|
-
t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
990
|
+
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", Oe(e)) {
|
|
991
|
+
t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
|
|
907
992
|
const o = n.size.height / n.size.width;
|
|
908
|
-
|
|
993
|
+
d0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => d0(t, o));
|
|
909
994
|
}
|
|
910
995
|
return t;
|
|
911
996
|
}
|
|
912
|
-
function
|
|
997
|
+
function d0(n, e) {
|
|
913
998
|
window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
|
|
914
999
|
}
|
|
915
|
-
const
|
|
1000
|
+
const Re = {
|
|
916
1001
|
check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
|
|
917
1002
|
interpolate: (n, e, t) => ({
|
|
918
1003
|
red: Math.round(n.red + (e.red - n.red) * t),
|
|
@@ -920,23 +1005,23 @@ const k1 = {
|
|
|
920
1005
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
921
1006
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
922
1007
|
})
|
|
923
|
-
},
|
|
1008
|
+
}, Ne = {
|
|
924
1009
|
check: (n) => !0,
|
|
925
1010
|
interpolate: (n, e) => e
|
|
926
|
-
},
|
|
1011
|
+
}, Be = {
|
|
927
1012
|
check: (n) => typeof n == "number",
|
|
928
1013
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
929
|
-
},
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1014
|
+
}, x0 = [
|
|
1015
|
+
Be,
|
|
1016
|
+
Re,
|
|
1017
|
+
Ne
|
|
933
1018
|
];
|
|
934
|
-
function
|
|
1019
|
+
function qe(n, e, t, o = null) {
|
|
935
1020
|
if (t === 0)
|
|
936
1021
|
return n;
|
|
937
1022
|
if (t === 1)
|
|
938
1023
|
return { ...n, ...e };
|
|
939
|
-
const i = o != null ? [...o, ...
|
|
1024
|
+
const i = o != null ? [...o, ...x0] : x0, a = {};
|
|
940
1025
|
for (const s in e) {
|
|
941
1026
|
const r = n[s], h = e[s];
|
|
942
1027
|
for (const c of i)
|
|
@@ -951,7 +1036,7 @@ function O1(n, e, t, o = null) {
|
|
|
951
1036
|
}
|
|
952
1037
|
return { ...n, ...a };
|
|
953
1038
|
}
|
|
954
|
-
function
|
|
1039
|
+
function y0(n, e, t = null) {
|
|
955
1040
|
if (e === null)
|
|
956
1041
|
return;
|
|
957
1042
|
const o = Array.isArray(e) ? e : [e];
|
|
@@ -960,7 +1045,7 @@ function gt(n, e, t = null) {
|
|
|
960
1045
|
if (t !== null && i > t)
|
|
961
1046
|
break;
|
|
962
1047
|
switch (a.type) {
|
|
963
|
-
case
|
|
1048
|
+
case ft.ANIMATE: {
|
|
964
1049
|
const s = n.get(a.object);
|
|
965
1050
|
if (s === void 0)
|
|
966
1051
|
break;
|
|
@@ -973,7 +1058,7 @@ function gt(n, e, t = null) {
|
|
|
973
1058
|
);
|
|
974
1059
|
n.set(a.object, {
|
|
975
1060
|
...s,
|
|
976
|
-
...
|
|
1061
|
+
...qe(
|
|
977
1062
|
s,
|
|
978
1063
|
a.props,
|
|
979
1064
|
a.easing(h),
|
|
@@ -982,7 +1067,7 @@ function gt(n, e, t = null) {
|
|
|
982
1067
|
}), a.block && (i += a.delay + a.duration);
|
|
983
1068
|
break;
|
|
984
1069
|
}
|
|
985
|
-
case
|
|
1070
|
+
case ft.UPDATE: {
|
|
986
1071
|
const s = n.get(a.object);
|
|
987
1072
|
if (s === void 0)
|
|
988
1073
|
break;
|
|
@@ -992,18 +1077,18 @@ function gt(n, e, t = null) {
|
|
|
992
1077
|
});
|
|
993
1078
|
break;
|
|
994
1079
|
}
|
|
995
|
-
case
|
|
1080
|
+
case ft.PAUSE:
|
|
996
1081
|
i += a.duration;
|
|
997
1082
|
break;
|
|
998
1083
|
default:
|
|
999
|
-
|
|
1084
|
+
st(a);
|
|
1000
1085
|
}
|
|
1001
1086
|
}
|
|
1002
1087
|
}
|
|
1003
|
-
function
|
|
1088
|
+
function B0(n) {
|
|
1004
1089
|
return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
|
|
1005
1090
|
}
|
|
1006
|
-
function
|
|
1091
|
+
function De({
|
|
1007
1092
|
slide: n,
|
|
1008
1093
|
buildIndex: e,
|
|
1009
1094
|
buildTime: t
|
|
@@ -1011,7 +1096,7 @@ function F1({
|
|
|
1011
1096
|
const o = /* @__PURE__ */ new Map();
|
|
1012
1097
|
function i(s) {
|
|
1013
1098
|
o.set(s, s);
|
|
1014
|
-
for (const r of
|
|
1099
|
+
for (const r of B0(s))
|
|
1015
1100
|
i(r);
|
|
1016
1101
|
}
|
|
1017
1102
|
for (const s of n.objects)
|
|
@@ -1019,22 +1104,22 @@ function F1({
|
|
|
1019
1104
|
const a = t === null ? e : e - 1;
|
|
1020
1105
|
for (let s = 0; s < a; s++) {
|
|
1021
1106
|
const r = n.animations[s] ?? null;
|
|
1022
|
-
|
|
1107
|
+
y0(o, r);
|
|
1023
1108
|
}
|
|
1024
1109
|
if (t !== null && e > 0) {
|
|
1025
1110
|
const s = n.animations[e - 1] ?? null;
|
|
1026
|
-
|
|
1111
|
+
y0(o, s, t);
|
|
1027
1112
|
}
|
|
1028
1113
|
return o;
|
|
1029
1114
|
}
|
|
1030
|
-
function
|
|
1115
|
+
function ze(n) {
|
|
1031
1116
|
const e = {};
|
|
1032
1117
|
function t(o) {
|
|
1033
1118
|
if (o.objectType === U.SVG) {
|
|
1034
1119
|
const a = o.svg;
|
|
1035
1120
|
a !== void 0 && a.length > 0 && (e[a] = a);
|
|
1036
1121
|
}
|
|
1037
|
-
const i =
|
|
1122
|
+
const i = B0(o);
|
|
1038
1123
|
for (const a of i)
|
|
1039
1124
|
t(a);
|
|
1040
1125
|
}
|
|
@@ -1043,7 +1128,7 @@ function R1(n) {
|
|
|
1043
1128
|
t(i);
|
|
1044
1129
|
return e;
|
|
1045
1130
|
}
|
|
1046
|
-
function
|
|
1131
|
+
function je(n) {
|
|
1047
1132
|
var o;
|
|
1048
1133
|
const { slides: e } = n, t = {
|
|
1049
1134
|
// First build of first slide
|
|
@@ -1061,20 +1146,20 @@ function N1(n) {
|
|
|
1061
1146
|
if (a === void 0)
|
|
1062
1147
|
continue;
|
|
1063
1148
|
const s = a.shortcut;
|
|
1064
|
-
|
|
1149
|
+
qt(t, s, i, 0);
|
|
1065
1150
|
for (let r = 0; r < a.animations.length; r++) {
|
|
1066
1151
|
const h = a.animations[r];
|
|
1067
1152
|
if (h !== void 0)
|
|
1068
1153
|
if (Array.isArray(h))
|
|
1069
1154
|
for (const c of h)
|
|
1070
|
-
|
|
1155
|
+
qt(t, c.shortcut, i, r + 1);
|
|
1071
1156
|
else
|
|
1072
|
-
|
|
1157
|
+
qt(t, h.shortcut, i, r + 1);
|
|
1073
1158
|
}
|
|
1074
1159
|
}
|
|
1075
1160
|
return t;
|
|
1076
1161
|
}
|
|
1077
|
-
function
|
|
1162
|
+
function qt(n, e, t, o) {
|
|
1078
1163
|
if (e !== null)
|
|
1079
1164
|
if (Array.isArray(e))
|
|
1080
1165
|
for (const i of e)
|
|
@@ -1082,8 +1167,8 @@ function N0(n, e, t, o) {
|
|
|
1082
1167
|
else
|
|
1083
1168
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1084
1169
|
}
|
|
1085
|
-
function
|
|
1086
|
-
t.shortcuts =
|
|
1170
|
+
function He(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1171
|
+
t.shortcuts = je(n), e.addEventListener("mousemove", () => {
|
|
1087
1172
|
e.style.cursor = "auto";
|
|
1088
1173
|
}), e.addEventListener("keyup", (r) => {
|
|
1089
1174
|
if (r.code === "Escape") {
|
|
@@ -1118,38 +1203,38 @@ function B1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
1118
1203
|
}
|
|
1119
1204
|
});
|
|
1120
1205
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1123
|
-
const t = localStorage.getItem(
|
|
1206
|
+
const dt = "presenterState";
|
|
1207
|
+
function Ue(n, e) {
|
|
1208
|
+
const t = localStorage.getItem(dt);
|
|
1124
1209
|
if (t === null)
|
|
1125
1210
|
return null;
|
|
1126
1211
|
if (e === null)
|
|
1127
|
-
return localStorage.removeItem(
|
|
1212
|
+
return localStorage.removeItem(dt), null;
|
|
1128
1213
|
let o;
|
|
1129
1214
|
try {
|
|
1130
1215
|
o = JSON.parse(t);
|
|
1131
1216
|
} catch (c) {
|
|
1132
|
-
return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(
|
|
1217
|
+
return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(dt), null;
|
|
1133
1218
|
}
|
|
1134
1219
|
const { title: i, timestamp: a } = o;
|
|
1135
1220
|
let { slideIndex: s, buildIndex: r } = o;
|
|
1136
1221
|
if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * e)
|
|
1137
|
-
return localStorage.removeItem(
|
|
1222
|
+
return localStorage.removeItem(dt), null;
|
|
1138
1223
|
s > n.slides.length - 1 && (s = n.slides.length - 1, r = 0);
|
|
1139
1224
|
const h = n.slides[s];
|
|
1140
|
-
return h === void 0 ? (localStorage.removeItem(
|
|
1225
|
+
return h === void 0 ? (localStorage.removeItem(dt), null) : (r > h.animations.length && (r = h.animations.length), {
|
|
1141
1226
|
title: i,
|
|
1142
1227
|
slideIndex: s,
|
|
1143
1228
|
buildIndex: r
|
|
1144
1229
|
});
|
|
1145
1230
|
}
|
|
1146
|
-
function
|
|
1231
|
+
function Ye({ title: n, slideIndex: e, buildIndex: t }) {
|
|
1147
1232
|
localStorage.setItem(
|
|
1148
|
-
|
|
1233
|
+
dt,
|
|
1149
1234
|
JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
|
|
1150
1235
|
);
|
|
1151
1236
|
}
|
|
1152
|
-
const
|
|
1237
|
+
const v0 = Object.freeze({
|
|
1153
1238
|
canvas: null,
|
|
1154
1239
|
extrasContainer: null,
|
|
1155
1240
|
mountedExtrasCleanups: [],
|
|
@@ -1166,45 +1251,45 @@ const pt = Object.freeze({
|
|
|
1166
1251
|
Browser: "browser",
|
|
1167
1252
|
Node: "node"
|
|
1168
1253
|
};
|
|
1169
|
-
function
|
|
1254
|
+
function $e(n, e) {
|
|
1170
1255
|
e.context.clearRect(0, 0, n.width, n.height);
|
|
1171
1256
|
}
|
|
1172
|
-
function
|
|
1257
|
+
function Xe(n) {
|
|
1173
1258
|
const e = document.createElement("canvas");
|
|
1174
1259
|
return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
|
|
1175
1260
|
}
|
|
1176
|
-
const
|
|
1261
|
+
const gt = {
|
|
1177
1262
|
Browser: "browser",
|
|
1178
1263
|
Node: "node"
|
|
1179
1264
|
};
|
|
1180
|
-
function
|
|
1265
|
+
function Ge(n) {
|
|
1181
1266
|
const e = new Path2D(n);
|
|
1182
1267
|
return {
|
|
1183
|
-
type:
|
|
1268
|
+
type: gt.Browser,
|
|
1184
1269
|
path: e
|
|
1185
1270
|
};
|
|
1186
1271
|
}
|
|
1187
|
-
function
|
|
1188
|
-
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 }, d = 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, m = f.y - c.y, M = Math.hypot(u, m) * e,
|
|
1189
|
-
x:
|
|
1190
|
-
y:
|
|
1272
|
+
function We(n) {
|
|
1273
|
+
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 }, d = 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, m = f.y - c.y, M = Math.hypot(u, m) * e, E = Math.cos(d), L = Math.sin(d), C = h ? { x: l.x - E * M / 2, y: l.y - L * M / 2 } : c, S = h ? { x: l.x + E * M / 2, y: l.y + L * M / 2 } : { x: c.x + E * M, y: c.y + L * M }, T = r ? Math.PI / 6 : Math.PI / 4.5, I = M < s * 2 ? M / 2 : s, N = {
|
|
1274
|
+
x: S.x - I * Math.cos(d - T),
|
|
1275
|
+
y: S.y - I * Math.sin(d - T)
|
|
1191
1276
|
}, G = {
|
|
1192
|
-
x:
|
|
1193
|
-
y:
|
|
1194
|
-
}, z = {
|
|
1195
|
-
x: P.x + O * Math.cos(d - C),
|
|
1196
|
-
y: P.y + O * Math.sin(d - C)
|
|
1277
|
+
x: S.x - I * Math.cos(d + T),
|
|
1278
|
+
y: S.y - I * Math.sin(d + T)
|
|
1197
1279
|
}, H = {
|
|
1198
|
-
x:
|
|
1199
|
-
y:
|
|
1280
|
+
x: C.x + I * Math.cos(d - T),
|
|
1281
|
+
y: C.y + I * Math.sin(d - T)
|
|
1282
|
+
}, $ = {
|
|
1283
|
+
x: C.x + I * Math.cos(d + T),
|
|
1284
|
+
y: C.y + I * Math.sin(d + T)
|
|
1200
1285
|
};
|
|
1201
1286
|
return {
|
|
1202
|
-
arrowPoints: [
|
|
1203
|
-
arrowheadPoints: [
|
|
1204
|
-
doubledArrowheadPoints: [
|
|
1287
|
+
arrowPoints: [C, S],
|
|
1288
|
+
arrowheadPoints: [N, S, G],
|
|
1289
|
+
doubledArrowheadPoints: [H, C, $]
|
|
1205
1290
|
};
|
|
1206
1291
|
}
|
|
1207
|
-
function
|
|
1292
|
+
function yt({
|
|
1208
1293
|
ctx: n,
|
|
1209
1294
|
color: e,
|
|
1210
1295
|
drawn: t = null,
|
|
@@ -1226,39 +1311,39 @@ function y0({
|
|
|
1226
1311
|
]) : n.context.setLineDash([f, c - f]);
|
|
1227
1312
|
} else
|
|
1228
1313
|
n.context.setLineDash([]);
|
|
1229
|
-
if (n.context.lineWidth = h, n.context.strokeStyle =
|
|
1314
|
+
if (n.context.lineWidth = h, n.context.strokeStyle = Et(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
|
|
1230
1315
|
n.context.stroke();
|
|
1231
1316
|
return;
|
|
1232
1317
|
}
|
|
1233
1318
|
switch (n.type) {
|
|
1234
1319
|
case V.Browser:
|
|
1235
|
-
s.type ===
|
|
1320
|
+
s.type === gt.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1236
1321
|
break;
|
|
1237
1322
|
case V.Node:
|
|
1238
|
-
s.type ===
|
|
1323
|
+
s.type === gt.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1239
1324
|
break;
|
|
1240
1325
|
default:
|
|
1241
|
-
|
|
1326
|
+
st(n);
|
|
1242
1327
|
}
|
|
1243
1328
|
}
|
|
1244
1329
|
}
|
|
1245
|
-
function
|
|
1246
|
-
if (n.context.fillStyle =
|
|
1330
|
+
function vt({ ctx: n, path: e, color: t, opacity: o = null }) {
|
|
1331
|
+
if (n.context.fillStyle = i0(t, o), e === void 0) {
|
|
1247
1332
|
n.context.fill();
|
|
1248
1333
|
return;
|
|
1249
1334
|
}
|
|
1250
1335
|
switch (n.type) {
|
|
1251
1336
|
case V.Browser:
|
|
1252
|
-
e.type ===
|
|
1337
|
+
e.type === gt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1253
1338
|
break;
|
|
1254
1339
|
case V.Node:
|
|
1255
|
-
e.type ===
|
|
1340
|
+
e.type === gt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1256
1341
|
break;
|
|
1257
1342
|
default:
|
|
1258
|
-
|
|
1343
|
+
st(n);
|
|
1259
1344
|
}
|
|
1260
1345
|
}
|
|
1261
|
-
function
|
|
1346
|
+
function Dt(n, e) {
|
|
1262
1347
|
const t = e(), o = n[0];
|
|
1263
1348
|
if (o === void 0)
|
|
1264
1349
|
return { path: t, length: 0 };
|
|
@@ -1273,7 +1358,7 @@ function B0(n, e) {
|
|
|
1273
1358
|
}
|
|
1274
1359
|
return { path: t, length: i };
|
|
1275
1360
|
}
|
|
1276
|
-
const
|
|
1361
|
+
const Ze = ({
|
|
1277
1362
|
ctx: n,
|
|
1278
1363
|
object: e,
|
|
1279
1364
|
opacity: t,
|
|
@@ -1282,35 +1367,35 @@ const H1 = ({
|
|
|
1282
1367
|
const i = e.opacity * t;
|
|
1283
1368
|
if (i === 0 || e.drawn === 0)
|
|
1284
1369
|
return;
|
|
1285
|
-
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } =
|
|
1286
|
-
if (
|
|
1370
|
+
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = We(e), { path: h } = Dt(a, o), { path: c } = Dt(s, o);
|
|
1371
|
+
if (yt({
|
|
1287
1372
|
color: e.color,
|
|
1288
1373
|
ctx: n,
|
|
1289
1374
|
path: h,
|
|
1290
1375
|
opacity: i,
|
|
1291
1376
|
width: e.width
|
|
1292
|
-
}), e.isArrowheadFilled && (c.path.closePath(),
|
|
1377
|
+
}), e.isArrowheadFilled && (c.path.closePath(), vt({
|
|
1293
1378
|
ctx: n,
|
|
1294
1379
|
path: c,
|
|
1295
1380
|
color: e.color,
|
|
1296
1381
|
opacity: i
|
|
1297
|
-
})),
|
|
1382
|
+
})), yt({
|
|
1298
1383
|
color: e.color,
|
|
1299
1384
|
ctx: n,
|
|
1300
1385
|
path: c,
|
|
1301
1386
|
opacity: i,
|
|
1302
1387
|
width: e.width
|
|
1303
1388
|
}), e.isArrowheadDoubled) {
|
|
1304
|
-
const { path: f } =
|
|
1389
|
+
const { path: f } = Dt(
|
|
1305
1390
|
r,
|
|
1306
1391
|
o
|
|
1307
1392
|
);
|
|
1308
|
-
e.isArrowheadFilled && (f.path.closePath(),
|
|
1393
|
+
e.isArrowheadFilled && (f.path.closePath(), vt({
|
|
1309
1394
|
ctx: n,
|
|
1310
1395
|
path: f,
|
|
1311
1396
|
color: e.color,
|
|
1312
1397
|
opacity: i
|
|
1313
|
-
})),
|
|
1398
|
+
})), yt({
|
|
1314
1399
|
color: e.color,
|
|
1315
1400
|
ctx: n,
|
|
1316
1401
|
path: f,
|
|
@@ -1319,32 +1404,32 @@ const H1 = ({
|
|
|
1319
1404
|
});
|
|
1320
1405
|
}
|
|
1321
1406
|
};
|
|
1322
|
-
function
|
|
1407
|
+
function Ve(n, e) {
|
|
1323
1408
|
const t = n.radius - n.strokeWidth / 2;
|
|
1324
1409
|
if (t <= 0)
|
|
1325
1410
|
return;
|
|
1326
1411
|
const o = e(), i = -Math.PI / 2;
|
|
1327
1412
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1328
1413
|
}
|
|
1329
|
-
function
|
|
1414
|
+
function Ke(n, e) {
|
|
1330
1415
|
const t = e(), o = -Math.PI / 2;
|
|
1331
1416
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1332
1417
|
const i = 2 * Math.PI * n.radius;
|
|
1333
1418
|
return { path: t, length: i };
|
|
1334
1419
|
}
|
|
1335
|
-
function
|
|
1420
|
+
function q0(n, e) {
|
|
1336
1421
|
switch (n.type) {
|
|
1337
1422
|
case V.Browser:
|
|
1338
|
-
e.type ===
|
|
1423
|
+
e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1339
1424
|
break;
|
|
1340
1425
|
case V.Node:
|
|
1341
|
-
e.type ===
|
|
1426
|
+
e.type === gt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1342
1427
|
break;
|
|
1343
1428
|
default:
|
|
1344
|
-
|
|
1429
|
+
st(n);
|
|
1345
1430
|
}
|
|
1346
1431
|
}
|
|
1347
|
-
const
|
|
1432
|
+
const Qe = ({
|
|
1348
1433
|
ctx: n,
|
|
1349
1434
|
object: e,
|
|
1350
1435
|
opacity: t,
|
|
@@ -1353,13 +1438,13 @@ const G1 = ({
|
|
|
1353
1438
|
const i = e.opacity * t;
|
|
1354
1439
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1355
1440
|
return;
|
|
1356
|
-
const { path: a, length: s } =
|
|
1441
|
+
const { path: a, length: s } = Ke(e, o);
|
|
1357
1442
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1358
|
-
const r =
|
|
1359
|
-
r !== void 0 && (n.context.save(),
|
|
1443
|
+
const r = Ve(e, o);
|
|
1444
|
+
r !== void 0 && (n.context.save(), q0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1360
1445
|
} else
|
|
1361
|
-
|
|
1362
|
-
|
|
1446
|
+
vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1447
|
+
yt({
|
|
1363
1448
|
color: e.strokeColor,
|
|
1364
1449
|
ctx: n,
|
|
1365
1450
|
drawn: e.drawn,
|
|
@@ -1376,77 +1461,77 @@ function X(n = null) {
|
|
|
1376
1461
|
...n
|
|
1377
1462
|
};
|
|
1378
1463
|
}
|
|
1379
|
-
const
|
|
1380
|
-
function
|
|
1464
|
+
const Je = X();
|
|
1465
|
+
function ut(n = null) {
|
|
1381
1466
|
return {
|
|
1382
|
-
origin:
|
|
1383
|
-
size:
|
|
1467
|
+
origin: Je,
|
|
1468
|
+
size: ke,
|
|
1384
1469
|
...n
|
|
1385
1470
|
};
|
|
1386
1471
|
}
|
|
1387
|
-
|
|
1388
|
-
function
|
|
1472
|
+
ut();
|
|
1473
|
+
function pt(n, e, t) {
|
|
1389
1474
|
const { x: o, y: i } = n, { width: a, height: s } = t;
|
|
1390
1475
|
switch (e) {
|
|
1391
|
-
case
|
|
1392
|
-
return
|
|
1476
|
+
case ot.TOP_LEFT:
|
|
1477
|
+
return ut({
|
|
1393
1478
|
origin: X({ x: o, y: i }),
|
|
1394
1479
|
size: t
|
|
1395
1480
|
});
|
|
1396
|
-
case
|
|
1397
|
-
return
|
|
1481
|
+
case ot.TOP:
|
|
1482
|
+
return ut({
|
|
1398
1483
|
origin: X({ x: o - a / 2, y: i }),
|
|
1399
1484
|
size: t
|
|
1400
1485
|
});
|
|
1401
|
-
case
|
|
1402
|
-
return
|
|
1486
|
+
case ot.TOP_RIGHT:
|
|
1487
|
+
return ut({
|
|
1403
1488
|
origin: X({ x: o - a, y: i }),
|
|
1404
1489
|
size: t
|
|
1405
1490
|
});
|
|
1406
|
-
case
|
|
1407
|
-
return
|
|
1491
|
+
case ot.LEFT:
|
|
1492
|
+
return ut({
|
|
1408
1493
|
origin: X({ x: o, y: i - s / 2 }),
|
|
1409
1494
|
size: t
|
|
1410
1495
|
});
|
|
1411
|
-
case
|
|
1412
|
-
return
|
|
1496
|
+
case ot.CENTER:
|
|
1497
|
+
return ut({
|
|
1413
1498
|
origin: X({ x: o - a / 2, y: i - s / 2 }),
|
|
1414
1499
|
size: t
|
|
1415
1500
|
});
|
|
1416
|
-
case
|
|
1417
|
-
return
|
|
1501
|
+
case ot.RIGHT:
|
|
1502
|
+
return ut({
|
|
1418
1503
|
origin: X({ x: o - a, y: i - s / 2 }),
|
|
1419
1504
|
size: t
|
|
1420
1505
|
});
|
|
1421
|
-
case
|
|
1422
|
-
return
|
|
1506
|
+
case ot.BOTTOM_LEFT:
|
|
1507
|
+
return ut({
|
|
1423
1508
|
origin: X({ x: o, y: i - s }),
|
|
1424
1509
|
size: t
|
|
1425
1510
|
});
|
|
1426
|
-
case
|
|
1427
|
-
return
|
|
1511
|
+
case ot.BOTTOM:
|
|
1512
|
+
return ut({
|
|
1428
1513
|
origin: X({ x: o - a / 2, y: i - s }),
|
|
1429
1514
|
size: t
|
|
1430
1515
|
});
|
|
1431
|
-
case
|
|
1432
|
-
return
|
|
1516
|
+
case ot.BOTTOM_RIGHT:
|
|
1517
|
+
return ut({
|
|
1433
1518
|
origin: X({ x: o - a, y: i - s }),
|
|
1434
1519
|
size: t
|
|
1435
1520
|
});
|
|
1436
1521
|
default:
|
|
1437
|
-
|
|
1522
|
+
st(e);
|
|
1438
1523
|
}
|
|
1439
1524
|
}
|
|
1440
|
-
const
|
|
1525
|
+
const t1 = ({
|
|
1441
1526
|
ctx: n,
|
|
1442
1527
|
object: e,
|
|
1443
1528
|
renderObject: t,
|
|
1444
1529
|
opacity: o
|
|
1445
1530
|
}) => {
|
|
1446
|
-
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s =
|
|
1531
|
+
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = pt(
|
|
1447
1532
|
X({ x: e.x, y: e.y }),
|
|
1448
1533
|
e.anchor,
|
|
1449
|
-
|
|
1534
|
+
at({
|
|
1450
1535
|
width: e.width * Math.abs(i),
|
|
1451
1536
|
height: e.height * Math.abs(a)
|
|
1452
1537
|
})
|
|
@@ -1462,10 +1547,10 @@ const Z1 = ({
|
|
|
1462
1547
|
), n.context.translate(-f, -d);
|
|
1463
1548
|
for (const m of e.objects)
|
|
1464
1549
|
t(m, o * e.opacity);
|
|
1465
|
-
e.previewColor !== null && (n.context.fillStyle =
|
|
1550
|
+
e.previewColor !== null && (n.context.fillStyle = Et(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, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1466
1551
|
}
|
|
1467
1552
|
};
|
|
1468
|
-
function
|
|
1553
|
+
function o0(n, e, t, o, i = 0) {
|
|
1469
1554
|
const a = o();
|
|
1470
1555
|
a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
|
|
1471
1556
|
n.x + e.width,
|
|
@@ -1489,24 +1574,24 @@ function rt(n, e, t, o, i = 0) {
|
|
|
1489
1574
|
const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
|
|
1490
1575
|
return { path: a, length: s };
|
|
1491
1576
|
}
|
|
1492
|
-
const
|
|
1577
|
+
const St = {
|
|
1493
1578
|
Browser: "browser",
|
|
1494
1579
|
Node: "node"
|
|
1495
|
-
},
|
|
1580
|
+
}, e1 = ({
|
|
1496
1581
|
ctx: n,
|
|
1497
1582
|
imageById: e,
|
|
1498
1583
|
object: t,
|
|
1499
1584
|
opacity: o,
|
|
1500
1585
|
createPath2D: i
|
|
1501
1586
|
}) => {
|
|
1502
|
-
const a =
|
|
1587
|
+
const a = pt(
|
|
1503
1588
|
X({ x: t.x, y: t.y }),
|
|
1504
1589
|
t.anchor,
|
|
1505
|
-
|
|
1590
|
+
at({ width: t.width, height: t.height })
|
|
1506
1591
|
), s = e[t.imageId];
|
|
1507
1592
|
if (s !== void 0) {
|
|
1508
1593
|
if (n.context.save(), t.cornerRadius > 0) {
|
|
1509
|
-
const r =
|
|
1594
|
+
const r = o0(
|
|
1510
1595
|
a.origin,
|
|
1511
1596
|
a.size,
|
|
1512
1597
|
t.cornerRadius,
|
|
@@ -1514,18 +1599,18 @@ const E0 = {
|
|
|
1514
1599
|
);
|
|
1515
1600
|
switch (n.type) {
|
|
1516
1601
|
case V.Browser:
|
|
1517
|
-
r.path.type ===
|
|
1602
|
+
r.path.type === gt.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1518
1603
|
break;
|
|
1519
1604
|
case V.Node:
|
|
1520
|
-
r.path.type ===
|
|
1605
|
+
r.path.type === gt.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1521
1606
|
break;
|
|
1522
1607
|
default:
|
|
1523
|
-
|
|
1608
|
+
st(n);
|
|
1524
1609
|
}
|
|
1525
1610
|
}
|
|
1526
1611
|
switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
|
|
1527
1612
|
case V.Browser:
|
|
1528
|
-
s.type ===
|
|
1613
|
+
s.type === St.Browser ? n.context.drawImage(
|
|
1529
1614
|
s.image,
|
|
1530
1615
|
a.origin.x,
|
|
1531
1616
|
a.origin.y,
|
|
@@ -1534,7 +1619,7 @@ const E0 = {
|
|
|
1534
1619
|
) : console.warn("Attempted to use Node Image in Browser Canvas context");
|
|
1535
1620
|
break;
|
|
1536
1621
|
case V.Node:
|
|
1537
|
-
s.type ===
|
|
1622
|
+
s.type === St.Node ? n.context.drawImage(
|
|
1538
1623
|
s.image,
|
|
1539
1624
|
a.origin.x,
|
|
1540
1625
|
a.origin.y,
|
|
@@ -1543,18 +1628,18 @@ const E0 = {
|
|
|
1543
1628
|
) : console.warn("Attempted to use Browser Image in Node Canvas context");
|
|
1544
1629
|
break;
|
|
1545
1630
|
default:
|
|
1546
|
-
|
|
1631
|
+
st(n);
|
|
1547
1632
|
}
|
|
1548
1633
|
n.context.restore();
|
|
1549
1634
|
}
|
|
1550
1635
|
};
|
|
1551
|
-
function
|
|
1636
|
+
function n1(n, e) {
|
|
1552
1637
|
const t = e();
|
|
1553
1638
|
t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
|
|
1554
1639
|
const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
|
|
1555
1640
|
return { path: t, length: o };
|
|
1556
1641
|
}
|
|
1557
|
-
const
|
|
1642
|
+
const r1 = ({
|
|
1558
1643
|
ctx: n,
|
|
1559
1644
|
object: e,
|
|
1560
1645
|
opacity: t,
|
|
@@ -1563,8 +1648,8 @@ const Q1 = ({
|
|
|
1563
1648
|
const i = e.opacity * t;
|
|
1564
1649
|
if (i === 0 || e.drawn === 0)
|
|
1565
1650
|
return;
|
|
1566
|
-
const { path: a, length: s } =
|
|
1567
|
-
|
|
1651
|
+
const { path: a, length: s } = n1(e, o);
|
|
1652
|
+
yt({
|
|
1568
1653
|
color: e.color,
|
|
1569
1654
|
ctx: n,
|
|
1570
1655
|
drawn: e.drawn,
|
|
@@ -1575,23 +1660,23 @@ const Q1 = ({
|
|
|
1575
1660
|
opacity: i,
|
|
1576
1661
|
width: e.width
|
|
1577
1662
|
});
|
|
1578
|
-
},
|
|
1663
|
+
}, i1 = ({
|
|
1579
1664
|
ctx: n,
|
|
1580
1665
|
object: e,
|
|
1581
1666
|
opacity: t,
|
|
1582
1667
|
renderObject: o
|
|
1583
1668
|
}) => {
|
|
1584
1669
|
n.context.save();
|
|
1585
|
-
const i =
|
|
1670
|
+
const i = pt(
|
|
1586
1671
|
X({ x: e.x, y: e.y }),
|
|
1587
1672
|
e.anchor,
|
|
1588
|
-
|
|
1673
|
+
at({ width: e.width, height: e.height })
|
|
1589
1674
|
);
|
|
1590
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle =
|
|
1675
|
+
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = Et(W.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();
|
|
1591
1676
|
for (const a of e.objects)
|
|
1592
1677
|
o(a, t * e.opacity);
|
|
1593
1678
|
n.context.restore();
|
|
1594
|
-
},
|
|
1679
|
+
}, o1 = ({
|
|
1595
1680
|
ctx: n,
|
|
1596
1681
|
object: e,
|
|
1597
1682
|
opacity: t,
|
|
@@ -1600,17 +1685,17 @@ const Q1 = ({
|
|
|
1600
1685
|
const i = e.opacity * t;
|
|
1601
1686
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1602
1687
|
return;
|
|
1603
|
-
const { origin: a } =
|
|
1688
|
+
const { origin: a } = pt(
|
|
1604
1689
|
X({ x: e.x, y: e.y }),
|
|
1605
1690
|
e.anchor,
|
|
1606
|
-
|
|
1691
|
+
at({ width: e.width, height: e.height })
|
|
1607
1692
|
), s = o(e.path);
|
|
1608
|
-
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight),
|
|
1693
|
+
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), vt({
|
|
1609
1694
|
ctx: n,
|
|
1610
1695
|
path: s,
|
|
1611
1696
|
color: e.fillColor,
|
|
1612
1697
|
opacity: i
|
|
1613
|
-
}),
|
|
1698
|
+
}), yt({
|
|
1614
1699
|
color: e.strokeColor,
|
|
1615
1700
|
ctx: n,
|
|
1616
1701
|
drawn: e.drawn,
|
|
@@ -1621,7 +1706,7 @@ const Q1 = ({
|
|
|
1621
1706
|
width: e.strokeWidth
|
|
1622
1707
|
}), n.context.restore();
|
|
1623
1708
|
};
|
|
1624
|
-
function
|
|
1709
|
+
function s1(n, e) {
|
|
1625
1710
|
const t = e(), o = n.points, i = o[0];
|
|
1626
1711
|
if (i === void 0)
|
|
1627
1712
|
return { path: t, length: 0 };
|
|
@@ -1642,7 +1727,7 @@ function ee(n, e) {
|
|
|
1642
1727
|
);
|
|
1643
1728
|
return a += r, { path: t, length: a };
|
|
1644
1729
|
}
|
|
1645
|
-
const
|
|
1730
|
+
const a1 = ({
|
|
1646
1731
|
ctx: n,
|
|
1647
1732
|
object: e,
|
|
1648
1733
|
opacity: t,
|
|
@@ -1651,13 +1736,13 @@ const ne = ({
|
|
|
1651
1736
|
const i = e.opacity * t;
|
|
1652
1737
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1653
1738
|
return;
|
|
1654
|
-
const { path: a, length: s } =
|
|
1655
|
-
|
|
1739
|
+
const { path: a, length: s } = s1(e, o);
|
|
1740
|
+
vt({
|
|
1656
1741
|
ctx: n,
|
|
1657
1742
|
path: a,
|
|
1658
1743
|
color: e.fillColor,
|
|
1659
1744
|
opacity: i
|
|
1660
|
-
}),
|
|
1745
|
+
}), yt({
|
|
1661
1746
|
color: e.strokeColor,
|
|
1662
1747
|
ctx: n,
|
|
1663
1748
|
drawn: e.drawn,
|
|
@@ -1667,34 +1752,34 @@ const ne = ({
|
|
|
1667
1752
|
width: e.strokeWidth
|
|
1668
1753
|
});
|
|
1669
1754
|
};
|
|
1670
|
-
function
|
|
1671
|
-
const t = n.strokeWidth / 2, { origin: o, size: i } =
|
|
1755
|
+
function h1(n, e) {
|
|
1756
|
+
const t = n.strokeWidth / 2, { origin: o, size: i } = pt(
|
|
1672
1757
|
X({ x: n.x, y: n.y }),
|
|
1673
1758
|
n.anchor,
|
|
1674
|
-
|
|
1759
|
+
at({ width: n.width, height: n.height })
|
|
1675
1760
|
), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
|
|
1676
1761
|
if (a <= 0 || s <= 0)
|
|
1677
1762
|
return;
|
|
1678
|
-
const r = X({ x: o.x + t, y: o.y + t }), h =
|
|
1763
|
+
const r = X({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), c = Math.max(
|
|
1679
1764
|
0,
|
|
1680
1765
|
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1681
1766
|
);
|
|
1682
1767
|
if (c > 0)
|
|
1683
|
-
return
|
|
1768
|
+
return o0(r, h, c, e).path;
|
|
1684
1769
|
const f = e();
|
|
1685
1770
|
return f.path.moveTo(r.x, r.y), f.path.lineTo(r.x + a, r.y), f.path.lineTo(r.x + a, r.y + s), f.path.lineTo(r.x, r.y + s), f.path.closePath(), f;
|
|
1686
1771
|
}
|
|
1687
|
-
function
|
|
1688
|
-
const { origin: t, size: o } =
|
|
1772
|
+
function l1(n, e) {
|
|
1773
|
+
const { origin: t, size: o } = pt(
|
|
1689
1774
|
X({ x: n.x, y: n.y }),
|
|
1690
1775
|
n.anchor,
|
|
1691
|
-
|
|
1776
|
+
at({ width: n.width, height: n.height })
|
|
1692
1777
|
), i = Math.max(
|
|
1693
1778
|
0,
|
|
1694
1779
|
Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
|
|
1695
1780
|
), a = Math.min(n.strokeWidth * 2, o.width - i);
|
|
1696
1781
|
if (i > 0)
|
|
1697
|
-
return
|
|
1782
|
+
return o0(t, o, i, e, a);
|
|
1698
1783
|
{
|
|
1699
1784
|
const s = e();
|
|
1700
1785
|
s.path.moveTo(t.x, t.y), s.path.lineTo(t.x + o.width, t.y), s.path.lineTo(t.x + o.width, t.y + o.height), s.path.lineTo(t.x, t.y + o.height), s.path.lineTo(t.x, t.y), s.path.lineTo(t.x + a, t.y);
|
|
@@ -1702,7 +1787,7 @@ function ie(n, e) {
|
|
|
1702
1787
|
return { path: s, length: r };
|
|
1703
1788
|
}
|
|
1704
1789
|
}
|
|
1705
|
-
const
|
|
1790
|
+
const c1 = ({
|
|
1706
1791
|
ctx: n,
|
|
1707
1792
|
object: e,
|
|
1708
1793
|
opacity: t,
|
|
@@ -1711,13 +1796,13 @@ const oe = ({
|
|
|
1711
1796
|
const i = e.opacity * t;
|
|
1712
1797
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1713
1798
|
return;
|
|
1714
|
-
const { path: a, length: s } =
|
|
1799
|
+
const { path: a, length: s } = l1(e, o);
|
|
1715
1800
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1716
|
-
const r =
|
|
1717
|
-
r !== void 0 && (n.context.save(),
|
|
1801
|
+
const r = h1(e, o);
|
|
1802
|
+
r !== void 0 && (n.context.save(), q0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1718
1803
|
} else
|
|
1719
|
-
|
|
1720
|
-
|
|
1804
|
+
vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1805
|
+
yt({
|
|
1721
1806
|
color: e.strokeColor,
|
|
1722
1807
|
ctx: n,
|
|
1723
1808
|
drawn: e.drawn,
|
|
@@ -1726,7 +1811,7 @@ const oe = ({
|
|
|
1726
1811
|
opacity: i,
|
|
1727
1812
|
width: e.strokeWidth
|
|
1728
1813
|
});
|
|
1729
|
-
},
|
|
1814
|
+
}, u1 = ({
|
|
1730
1815
|
ctx: n,
|
|
1731
1816
|
imageById: e,
|
|
1732
1817
|
object: t,
|
|
@@ -1738,14 +1823,14 @@ const oe = ({
|
|
|
1738
1823
|
const a = e[t.svg];
|
|
1739
1824
|
if (a === void 0)
|
|
1740
1825
|
return;
|
|
1741
|
-
const s =
|
|
1826
|
+
const s = pt(
|
|
1742
1827
|
X({ x: t.x, y: t.y }),
|
|
1743
1828
|
t.anchor,
|
|
1744
|
-
|
|
1829
|
+
at({ width: t.width, height: t.height })
|
|
1745
1830
|
);
|
|
1746
1831
|
switch (n.context.save(), n.context.globalAlpha = i, n.type) {
|
|
1747
1832
|
case V.Browser:
|
|
1748
|
-
a.type ===
|
|
1833
|
+
a.type === St.Browser && n.context.drawImage(
|
|
1749
1834
|
a.image,
|
|
1750
1835
|
s.origin.x,
|
|
1751
1836
|
s.origin.y,
|
|
@@ -1754,7 +1839,7 @@ const oe = ({
|
|
|
1754
1839
|
);
|
|
1755
1840
|
break;
|
|
1756
1841
|
case V.Node:
|
|
1757
|
-
a.type ===
|
|
1842
|
+
a.type === St.Node && n.context.drawImage(
|
|
1758
1843
|
a.image,
|
|
1759
1844
|
s.origin.x,
|
|
1760
1845
|
s.origin.y,
|
|
@@ -1763,11 +1848,11 @@ const oe = ({
|
|
|
1763
1848
|
);
|
|
1764
1849
|
break;
|
|
1765
1850
|
default:
|
|
1766
|
-
|
|
1851
|
+
st(n);
|
|
1767
1852
|
}
|
|
1768
1853
|
n.context.restore();
|
|
1769
1854
|
};
|
|
1770
|
-
function
|
|
1855
|
+
function f1(n) {
|
|
1771
1856
|
return {
|
|
1772
1857
|
color: n.color,
|
|
1773
1858
|
fontFamily: n.fontFamily,
|
|
@@ -1779,7 +1864,7 @@ function ae(n) {
|
|
|
1779
1864
|
superscript: n.superscript
|
|
1780
1865
|
};
|
|
1781
1866
|
}
|
|
1782
|
-
function
|
|
1867
|
+
function g1(n, e = 1) {
|
|
1783
1868
|
const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
|
|
1784
1869
|
let o = 0, i = 0;
|
|
1785
1870
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -1794,8 +1879,8 @@ function he(n, e = 1) {
|
|
|
1794
1879
|
width: t
|
|
1795
1880
|
};
|
|
1796
1881
|
}
|
|
1797
|
-
const
|
|
1798
|
-
function
|
|
1882
|
+
const p1 = 0.7, d1 = 0.3;
|
|
1883
|
+
function D0(n) {
|
|
1799
1884
|
const e = n.superscript, t = n.subscript && !e;
|
|
1800
1885
|
return !e && !t ? {
|
|
1801
1886
|
baselineShift: 0,
|
|
@@ -1803,30 +1888,30 @@ function Rt(n) {
|
|
|
1803
1888
|
isSubscript: !1,
|
|
1804
1889
|
isSuperscript: !1
|
|
1805
1890
|
} : {
|
|
1806
|
-
baselineShift: n.fontSize *
|
|
1807
|
-
fontSize: n.fontSize *
|
|
1891
|
+
baselineShift: n.fontSize * d1 * (e ? -1 : 1),
|
|
1892
|
+
fontSize: n.fontSize * p1,
|
|
1808
1893
|
isSubscript: t,
|
|
1809
1894
|
isSuperscript: e
|
|
1810
1895
|
};
|
|
1811
1896
|
}
|
|
1812
|
-
function
|
|
1897
|
+
function x1(n) {
|
|
1813
1898
|
return {
|
|
1814
1899
|
width: n.width,
|
|
1815
1900
|
height: n.fontBoundingBoxAscent
|
|
1816
1901
|
};
|
|
1817
1902
|
}
|
|
1818
|
-
function
|
|
1819
|
-
const o =
|
|
1820
|
-
n.context.fillStyle =
|
|
1903
|
+
function z0(n, e, t = 1) {
|
|
1904
|
+
const o = D0(e);
|
|
1905
|
+
n.context.fillStyle = i0(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
|
|
1821
1906
|
}
|
|
1822
|
-
function
|
|
1907
|
+
function y1(n, e, t) {
|
|
1823
1908
|
const o = [];
|
|
1824
1909
|
for (const i of n) {
|
|
1825
1910
|
const a = [];
|
|
1826
1911
|
for (const s of i) {
|
|
1827
1912
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1828
|
-
|
|
1829
|
-
const f = t.context.measureText(r), d =
|
|
1913
|
+
z0(t, c);
|
|
1914
|
+
const f = t.context.measureText(r), d = x1(f), { baselineShift: l } = D0(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
|
|
1830
1915
|
a.push({
|
|
1831
1916
|
...d,
|
|
1832
1917
|
baselineShift: l,
|
|
@@ -1839,11 +1924,11 @@ function fe(n, e, t) {
|
|
|
1839
1924
|
}
|
|
1840
1925
|
return o;
|
|
1841
1926
|
}
|
|
1842
|
-
const
|
|
1927
|
+
const v1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
1843
1928
|
const o = e.opacity * t;
|
|
1844
1929
|
if (o === 0)
|
|
1845
1930
|
return;
|
|
1846
|
-
const { length: i } = e, a =
|
|
1931
|
+
const { length: i } = e, a = N0(e.text), s = f1(e), r = y1(a, s, n), h = g1(r, e.lineSpacing), c = pt(X({ x: e.x, y: e.y }), e.anchor, h);
|
|
1847
1932
|
let f = c.origin.x, d = c.origin.y, l = 0, u = 0;
|
|
1848
1933
|
for (let m = 0; m < a.length; m++) {
|
|
1849
1934
|
const y = a[m], M = r[m];
|
|
@@ -1851,69 +1936,69 @@ const ge = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
1851
1936
|
console.error("Could not determine text units or sizes for line");
|
|
1852
1937
|
continue;
|
|
1853
1938
|
}
|
|
1854
|
-
const
|
|
1939
|
+
const E = M.reduce((I, N) => I + N.width, 0), L = M.length === 0 ? u : M.reduce((I, N) => Math.max(I, N.top), 0), C = M.length === 0 ? 0 : M.reduce((I, N) => Math.max(I, N.bottom), 0), S = L + C;
|
|
1855
1940
|
switch (e.alignment) {
|
|
1856
|
-
case
|
|
1941
|
+
case xt.LEFT:
|
|
1857
1942
|
f = c.origin.x;
|
|
1858
1943
|
break;
|
|
1859
|
-
case
|
|
1860
|
-
f = c.origin.x + (c.size.width -
|
|
1944
|
+
case xt.CENTER:
|
|
1945
|
+
f = c.origin.x + (c.size.width - E) / 2;
|
|
1861
1946
|
break;
|
|
1862
|
-
case
|
|
1863
|
-
f = c.origin.x + (c.size.width -
|
|
1947
|
+
case xt.RIGHT:
|
|
1948
|
+
f = c.origin.x + (c.size.width - E);
|
|
1864
1949
|
break;
|
|
1865
1950
|
default:
|
|
1866
|
-
|
|
1951
|
+
st(e.alignment);
|
|
1867
1952
|
break;
|
|
1868
1953
|
}
|
|
1869
1954
|
d += u * (e.lineSpacing - 1);
|
|
1870
|
-
const
|
|
1871
|
-
u =
|
|
1872
|
-
for (let
|
|
1873
|
-
const
|
|
1874
|
-
if (
|
|
1955
|
+
const T = d + L;
|
|
1956
|
+
u = S;
|
|
1957
|
+
for (let I = 0; I < y.length && !(i !== null && l >= i); I++) {
|
|
1958
|
+
const N = y[I], G = M[I];
|
|
1959
|
+
if (N == null || G == null) {
|
|
1875
1960
|
console.error("Could not determine text unit or size for unit");
|
|
1876
1961
|
continue;
|
|
1877
1962
|
}
|
|
1878
|
-
const { text:
|
|
1879
|
-
let
|
|
1880
|
-
if (i !== null && l +
|
|
1963
|
+
const { text: H, ...$ } = N;
|
|
1964
|
+
let tt;
|
|
1965
|
+
if (i !== null && l + H.length > i) {
|
|
1881
1966
|
const K = i - l;
|
|
1882
|
-
|
|
1967
|
+
tt = H.slice(0, K);
|
|
1883
1968
|
}
|
|
1884
|
-
const
|
|
1885
|
-
l +=
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1969
|
+
const et = tt ?? H;
|
|
1970
|
+
l += et.length;
|
|
1971
|
+
const nt = { ...s, ...$ };
|
|
1972
|
+
z0(n, nt, o), n.context.fillText(et, f, T + G.baselineShift), f += G.width;
|
|
1888
1973
|
}
|
|
1889
|
-
d +=
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
[U.ARROW]:
|
|
1893
|
-
[U.CIRCLE]:
|
|
1894
|
-
[U.GROUP]:
|
|
1895
|
-
[U.IMAGE]:
|
|
1896
|
-
[U.LINE]:
|
|
1897
|
-
[U.MASK]:
|
|
1898
|
-
[U.PATH]:
|
|
1899
|
-
[U.POLYGON]:
|
|
1900
|
-
[U.RECTANGLE]:
|
|
1974
|
+
d += S;
|
|
1975
|
+
}
|
|
1976
|
+
}, w1 = {
|
|
1977
|
+
[U.ARROW]: Ze,
|
|
1978
|
+
[U.CIRCLE]: Qe,
|
|
1979
|
+
[U.GROUP]: t1,
|
|
1980
|
+
[U.IMAGE]: e1,
|
|
1981
|
+
[U.LINE]: r1,
|
|
1982
|
+
[U.MASK]: i1,
|
|
1983
|
+
[U.PATH]: o1,
|
|
1984
|
+
[U.POLYGON]: a1,
|
|
1985
|
+
[U.RECTANGLE]: c1,
|
|
1901
1986
|
[U.SLIDE_OBJECT]: () => {
|
|
1902
1987
|
},
|
|
1903
|
-
[U.SVG]:
|
|
1904
|
-
[U.TEXT]:
|
|
1988
|
+
[U.SVG]: u1,
|
|
1989
|
+
[U.TEXT]: v1
|
|
1905
1990
|
};
|
|
1906
|
-
function
|
|
1991
|
+
function m1(n) {
|
|
1907
1992
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1908
1993
|
return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
|
|
1909
1994
|
}
|
|
1910
|
-
function
|
|
1995
|
+
function b1(n, e) {
|
|
1911
1996
|
if (n === null)
|
|
1912
1997
|
return null;
|
|
1913
|
-
const t =
|
|
1998
|
+
const t = pt(
|
|
1914
1999
|
X({ x: e.x, y: e.y }),
|
|
1915
2000
|
e.anchor,
|
|
1916
|
-
|
|
2001
|
+
at({ width: e.width, height: e.height })
|
|
1917
2002
|
), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1918
2003
|
o.setAttribute("x", t.origin.x.toString()), o.setAttribute("y", t.origin.y.toString()), o.setAttribute("width", e.width.toString()), o.setAttribute("height", e.height.toString());
|
|
1919
2004
|
const i = e.content;
|
|
@@ -1927,7 +2012,7 @@ function xe(n, e) {
|
|
|
1927
2012
|
a !== null && a(), n.removeChild(o);
|
|
1928
2013
|
};
|
|
1929
2014
|
}
|
|
1930
|
-
async function
|
|
2015
|
+
async function A1(n) {
|
|
1931
2016
|
if (Object.keys(n).length === 0)
|
|
1932
2017
|
return {};
|
|
1933
2018
|
const e = {}, t = (i) => new Promise((a, s) => {
|
|
@@ -1940,7 +2025,7 @@ async function ye(n) {
|
|
|
1940
2025
|
}), o = Object.entries(n).map(async ([i, a]) => {
|
|
1941
2026
|
const s = await t(a);
|
|
1942
2027
|
e[i] = {
|
|
1943
|
-
type:
|
|
2028
|
+
type: St.Browser,
|
|
1944
2029
|
image: s
|
|
1945
2030
|
};
|
|
1946
2031
|
});
|
|
@@ -1951,35 +2036,36 @@ async function ye(n) {
|
|
|
1951
2036
|
}
|
|
1952
2037
|
return e;
|
|
1953
2038
|
}
|
|
1954
|
-
class
|
|
2039
|
+
class Rn {
|
|
1955
2040
|
constructor(e) {
|
|
2041
|
+
this.navigator = null;
|
|
1956
2042
|
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1957
2043
|
this.props = {
|
|
1958
|
-
presentation:
|
|
2044
|
+
presentation: Ie(),
|
|
1959
2045
|
element: document.body,
|
|
1960
2046
|
objectRenderers: {
|
|
1961
|
-
...
|
|
2047
|
+
...w1,
|
|
1962
2048
|
...t
|
|
1963
2049
|
},
|
|
1964
2050
|
cacheDurationMinutes: 15,
|
|
1965
|
-
scale:
|
|
2051
|
+
scale: M1(o),
|
|
1966
2052
|
...i
|
|
1967
|
-
}, this.state = { ...
|
|
2053
|
+
}, this.state = { ...v0 };
|
|
1968
2054
|
}
|
|
1969
2055
|
/** Starts the presentation. */
|
|
1970
2056
|
async present() {
|
|
1971
|
-
const { presentation: e, element: t, scale: o } = this.props, i =
|
|
2057
|
+
const { presentation: e, element: t, scale: o } = this.props, i = Xe(e.size), a = m1(e.size);
|
|
1972
2058
|
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1973
|
-
...
|
|
1974
|
-
imageById: await
|
|
2059
|
+
...v0,
|
|
2060
|
+
imageById: await A1({
|
|
1975
2061
|
...e.resources.images,
|
|
1976
|
-
...
|
|
2062
|
+
...ze(e)
|
|
1977
2063
|
}),
|
|
1978
2064
|
canvas: i,
|
|
1979
2065
|
extrasContainer: a
|
|
1980
2066
|
};
|
|
1981
|
-
const s =
|
|
1982
|
-
|
|
2067
|
+
const s = Fe(e, t);
|
|
2068
|
+
He(e, t, this.state.shortcutState, {
|
|
1983
2069
|
onNext: (h) => this.next(h),
|
|
1984
2070
|
onPrevious: (h) => this.previous(h),
|
|
1985
2071
|
onRenderSlide: (h, c) => {
|
|
@@ -1988,62 +2074,94 @@ class kn {
|
|
|
1988
2074
|
buildIndex: this.state.buildIndex
|
|
1989
2075
|
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1990
2076
|
},
|
|
1991
|
-
onShowNavigator: () =>
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2077
|
+
onShowNavigator: () => {
|
|
2078
|
+
this.navigator = Ce({
|
|
2079
|
+
presentation: e,
|
|
2080
|
+
onNavigateToSlide: (h) => this.renderSlide(h),
|
|
2081
|
+
onNext: () => this.next()
|
|
2082
|
+
}), this.updateNavigator();
|
|
2083
|
+
}
|
|
1995
2084
|
}), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
1996
|
-
const r =
|
|
2085
|
+
const r = Ue(e, this.props.cacheDurationMinutes);
|
|
1997
2086
|
r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
|
|
1998
2087
|
}
|
|
1999
2088
|
renderSlide(e, t = 0, o = null) {
|
|
2000
|
-
const {
|
|
2001
|
-
this.state.slideIndex = e, this.state.buildIndex = t, o === null &&
|
|
2002
|
-
const
|
|
2003
|
-
if (
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2089
|
+
const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
|
|
2090
|
+
this.state.slideIndex = e, this.state.buildIndex = t, o === null && Ye({ title: i.title, slideIndex: e, buildIndex: t });
|
|
2091
|
+
const r = i.slides[e];
|
|
2092
|
+
if (!(r === void 0 || a === null)) {
|
|
2093
|
+
if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
|
|
2094
|
+
for (const h of this.state.mountedExtrasCleanups)
|
|
2095
|
+
h();
|
|
2096
|
+
this.state.mountedExtrasCleanups = [];
|
|
2097
|
+
for (const h of r.extras) {
|
|
2098
|
+
const c = b1(this.state.extrasContainer, h);
|
|
2099
|
+
c !== null && this.state.mountedExtrasCleanups.push(c);
|
|
2100
|
+
}
|
|
2012
2101
|
}
|
|
2102
|
+
this.renderCanvas(a, e, t, o, this.props.scale), o === null && this.updateNavigator();
|
|
2013
2103
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2104
|
+
}
|
|
2105
|
+
renderCanvas(e, t, o = 0, i = null, a = 1) {
|
|
2106
|
+
const { objectRenderers: s, presentation: r } = this.props, { imageById: h } = this.state;
|
|
2107
|
+
e.width = r.size.width, e.height = r.size.height;
|
|
2108
|
+
const c = e.getContext("2d");
|
|
2109
|
+
if (c === null)
|
|
2016
2110
|
return;
|
|
2017
|
-
const
|
|
2111
|
+
const f = {
|
|
2018
2112
|
type: V.Browser,
|
|
2019
|
-
context:
|
|
2113
|
+
context: c
|
|
2020
2114
|
};
|
|
2021
|
-
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2115
|
+
$e(e, f);
|
|
2116
|
+
const d = r.slides[t];
|
|
2117
|
+
if (d === void 0)
|
|
2118
|
+
return;
|
|
2119
|
+
const l = De({
|
|
2120
|
+
slide: d,
|
|
2121
|
+
buildIndex: o,
|
|
2122
|
+
buildTime: i
|
|
2026
2123
|
});
|
|
2027
|
-
|
|
2028
|
-
function
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
ctx:
|
|
2124
|
+
f.context.fillStyle = i0(r.backgroundColor), f.context.fillRect(0, 0, e.width, e.height);
|
|
2125
|
+
function u(y, M) {
|
|
2126
|
+
const E = s[y.objectType], L = l.get(y);
|
|
2127
|
+
E === void 0 || L === void 0 || E({
|
|
2128
|
+
ctx: f,
|
|
2032
2129
|
imageById: h,
|
|
2033
|
-
object:
|
|
2034
|
-
opacity:
|
|
2035
|
-
renderObject:
|
|
2036
|
-
createPath2D:
|
|
2130
|
+
object: L,
|
|
2131
|
+
opacity: M,
|
|
2132
|
+
renderObject: u,
|
|
2133
|
+
createPath2D: Ge
|
|
2037
2134
|
});
|
|
2038
2135
|
}
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
),
|
|
2044
|
-
for (const
|
|
2045
|
-
|
|
2046
|
-
|
|
2136
|
+
const m = a !== 1;
|
|
2137
|
+
m && (f.context.save(), f.context.translate(
|
|
2138
|
+
e.width * (1 - a) / 2,
|
|
2139
|
+
e.height * (1 - a) / 2
|
|
2140
|
+
), f.context.scale(a, a));
|
|
2141
|
+
for (const y of d.objects)
|
|
2142
|
+
u(y, 1);
|
|
2143
|
+
m && f.context.restore();
|
|
2144
|
+
}
|
|
2145
|
+
updateNavigator() {
|
|
2146
|
+
const { navigator: e } = this;
|
|
2147
|
+
if (e === null)
|
|
2148
|
+
return;
|
|
2149
|
+
if (!e.isOpen()) {
|
|
2150
|
+
this.navigator = null;
|
|
2151
|
+
return;
|
|
2152
|
+
}
|
|
2153
|
+
const { slideIndex: t, buildIndex: o } = this.state, i = this.getNextSlideBuild(t, o);
|
|
2154
|
+
e.update(t, o, i.slideIndex, i.buildIndex), this.renderCanvas(e.currentCanvas, t, o), i.slideIndex === null ? this.renderEndCanvas(e.nextCanvas) : this.renderCanvas(e.nextCanvas, i.slideIndex, i.buildIndex);
|
|
2155
|
+
}
|
|
2156
|
+
getNextSlideBuild(e, t) {
|
|
2157
|
+
const { presentation: o } = this.props, i = o.slides[e];
|
|
2158
|
+
return i === void 0 ? { slideIndex: e, buildIndex: t } : t < i.animations.length ? { slideIndex: e, buildIndex: t + 1 } : e + 1 < o.slides.length ? { slideIndex: e + 1, buildIndex: 0 } : { slideIndex: null, buildIndex: 0 };
|
|
2159
|
+
}
|
|
2160
|
+
renderEndCanvas(e) {
|
|
2161
|
+
const { presentation: t } = this.props;
|
|
2162
|
+
e.width = t.size.width, e.height = t.size.height;
|
|
2163
|
+
const o = e.getContext("2d");
|
|
2164
|
+
o !== null && (o.fillStyle = "#000000", o.fillRect(0, 0, e.width, e.height));
|
|
2047
2165
|
}
|
|
2048
2166
|
next(e = !1) {
|
|
2049
2167
|
const { presentation: t } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
|
|
@@ -2053,7 +2171,7 @@ class kn {
|
|
|
2053
2171
|
return;
|
|
2054
2172
|
const r = s.animations[a];
|
|
2055
2173
|
if (r !== void 0 && !e) {
|
|
2056
|
-
const h = performance.now(), c =
|
|
2174
|
+
const h = performance.now(), c = _e(r), f = (d) => {
|
|
2057
2175
|
const l = d - h;
|
|
2058
2176
|
l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(f)) : this.renderSlide(i, a + 1, null);
|
|
2059
2177
|
};
|
|
@@ -2070,21 +2188,29 @@ class kn {
|
|
|
2070
2188
|
} else
|
|
2071
2189
|
this.renderSlide(0, 0);
|
|
2072
2190
|
}
|
|
2191
|
+
hasNext() {
|
|
2192
|
+
const { presentation: e } = this.props, { slideIndex: t, buildIndex: o } = this.state, i = e.slides[t];
|
|
2193
|
+
return i === void 0 ? !1 : i.animations[o] !== void 0 ? !0 : t + 1 < e.slides.length;
|
|
2194
|
+
}
|
|
2195
|
+
hasPrevious() {
|
|
2196
|
+
const { slideIndex: e, buildIndex: t } = this.state;
|
|
2197
|
+
return t > 0 || e > 0;
|
|
2198
|
+
}
|
|
2073
2199
|
}
|
|
2074
|
-
function
|
|
2200
|
+
function M1(n) {
|
|
2075
2201
|
return n <= 0 || n > 1 ? (console.warn(
|
|
2076
2202
|
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2077
2203
|
), 1) : n;
|
|
2078
2204
|
}
|
|
2079
|
-
function
|
|
2205
|
+
function Nn(n = 1e3) {
|
|
2080
2206
|
return {
|
|
2081
|
-
type:
|
|
2207
|
+
type: ft.PAUSE,
|
|
2082
2208
|
isKey: !1,
|
|
2083
2209
|
duration: n,
|
|
2084
2210
|
shortcut: null
|
|
2085
2211
|
};
|
|
2086
2212
|
}
|
|
2087
|
-
function
|
|
2213
|
+
function Bn(n = null) {
|
|
2088
2214
|
return {
|
|
2089
2215
|
objects: [],
|
|
2090
2216
|
animations: [],
|
|
@@ -2097,32 +2223,32 @@ function _n(n = null) {
|
|
|
2097
2223
|
...n
|
|
2098
2224
|
};
|
|
2099
2225
|
}
|
|
2100
|
-
function
|
|
2226
|
+
function qn(n, e = {}) {
|
|
2101
2227
|
return {
|
|
2102
2228
|
...e,
|
|
2103
2229
|
text: n
|
|
2104
2230
|
};
|
|
2105
2231
|
}
|
|
2106
|
-
function
|
|
2232
|
+
function Dn(n = W.BLACK) {
|
|
2107
2233
|
return { ...n, alpha: 1 };
|
|
2108
2234
|
}
|
|
2109
|
-
function
|
|
2235
|
+
function L1(n) {
|
|
2110
2236
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2111
2237
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2112
2238
|
return a / 2;
|
|
2113
2239
|
}
|
|
2114
|
-
function
|
|
2240
|
+
function T1(n) {
|
|
2115
2241
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2116
2242
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2117
2243
|
return h;
|
|
2118
2244
|
}
|
|
2119
|
-
function
|
|
2245
|
+
function C1(n) {
|
|
2120
2246
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2121
2247
|
}
|
|
2122
|
-
var
|
|
2123
|
-
function
|
|
2124
|
-
if (
|
|
2125
|
-
|
|
2248
|
+
var zt, w0;
|
|
2249
|
+
function P1() {
|
|
2250
|
+
if (w0) return zt;
|
|
2251
|
+
w0 = 1;
|
|
2126
2252
|
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 = [
|
|
2127
2253
|
5760,
|
|
2128
2254
|
6158,
|
|
@@ -2196,35 +2322,35 @@ function be() {
|
|
|
2196
2322
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2197
2323
|
}
|
|
2198
2324
|
function f(u) {
|
|
2199
|
-
var m = u.index, y = m, M = u.max,
|
|
2325
|
+
var m = u.index, y = m, M = u.max, E = !1, L = !1, C = !1, S = !1, T;
|
|
2200
2326
|
if (y >= M) {
|
|
2201
2327
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2202
2328
|
return;
|
|
2203
2329
|
}
|
|
2204
|
-
if (
|
|
2330
|
+
if (T = u.path.charCodeAt(y), (T === 43 || T === 45) && (y++, T = y < M ? u.path.charCodeAt(y) : 0), !a(T) && T !== 46) {
|
|
2205
2331
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2206
2332
|
return;
|
|
2207
2333
|
}
|
|
2208
|
-
if (
|
|
2209
|
-
if (
|
|
2334
|
+
if (T !== 46) {
|
|
2335
|
+
if (E = T === 48, y++, T = y < M ? u.path.charCodeAt(y) : 0, E && y < M && T && a(T)) {
|
|
2210
2336
|
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + m + ")";
|
|
2211
2337
|
return;
|
|
2212
2338
|
}
|
|
2213
2339
|
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2214
|
-
y++,
|
|
2215
|
-
|
|
2340
|
+
y++, L = !0;
|
|
2341
|
+
T = y < M ? u.path.charCodeAt(y) : 0;
|
|
2216
2342
|
}
|
|
2217
|
-
if (
|
|
2218
|
-
for (
|
|
2219
|
-
y++,
|
|
2220
|
-
|
|
2343
|
+
if (T === 46) {
|
|
2344
|
+
for (S = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2345
|
+
y++, C = !0;
|
|
2346
|
+
T = y < M ? u.path.charCodeAt(y) : 0;
|
|
2221
2347
|
}
|
|
2222
|
-
if (
|
|
2223
|
-
if (
|
|
2348
|
+
if (T === 101 || T === 69) {
|
|
2349
|
+
if (S && !L && !C) {
|
|
2224
2350
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2225
2351
|
return;
|
|
2226
2352
|
}
|
|
2227
|
-
if (y++,
|
|
2353
|
+
if (y++, T = y < M ? u.path.charCodeAt(y) : 0, (T === 43 || T === 45) && y++, y < M && a(u.path.charCodeAt(y)))
|
|
2228
2354
|
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2229
2355
|
y++;
|
|
2230
2356
|
else {
|
|
@@ -2245,29 +2371,29 @@ function be() {
|
|
|
2245
2371
|
;
|
|
2246
2372
|
}
|
|
2247
2373
|
function l(u) {
|
|
2248
|
-
var m = u.max, y, M,
|
|
2374
|
+
var m = u.max, y, M, E, L, C;
|
|
2249
2375
|
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), M = i(y), !o(y)) {
|
|
2250
2376
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2251
2377
|
return;
|
|
2252
2378
|
}
|
|
2253
|
-
if (
|
|
2379
|
+
if (L = n[u.path[u.index].toLowerCase()], u.index++, h(u), u.data = [], !L) {
|
|
2254
2380
|
d(u);
|
|
2255
2381
|
return;
|
|
2256
2382
|
}
|
|
2257
|
-
for (
|
|
2258
|
-
for (
|
|
2259
|
-
if (M && (
|
|
2383
|
+
for (E = !1; ; ) {
|
|
2384
|
+
for (C = L; C > 0; C--) {
|
|
2385
|
+
if (M && (C === 3 || C === 4) ? c(u) : f(u), u.err.length) {
|
|
2260
2386
|
d(u);
|
|
2261
2387
|
return;
|
|
2262
2388
|
}
|
|
2263
|
-
u.data.push(u.param), h(u),
|
|
2389
|
+
u.data.push(u.param), h(u), E = !1, u.index < m && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), E = !0);
|
|
2264
2390
|
}
|
|
2265
|
-
if (!
|
|
2391
|
+
if (!E && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2266
2392
|
break;
|
|
2267
2393
|
}
|
|
2268
2394
|
d(u);
|
|
2269
2395
|
}
|
|
2270
|
-
return
|
|
2396
|
+
return zt = function(m) {
|
|
2271
2397
|
var y = new r(m), M = y.max;
|
|
2272
2398
|
for (h(y); y.index < M && !y.err.length; )
|
|
2273
2399
|
l(y);
|
|
@@ -2275,12 +2401,12 @@ function be() {
|
|
|
2275
2401
|
err: y.err,
|
|
2276
2402
|
segments: y.result
|
|
2277
2403
|
};
|
|
2278
|
-
},
|
|
2404
|
+
}, zt;
|
|
2279
2405
|
}
|
|
2280
|
-
var
|
|
2281
|
-
function
|
|
2282
|
-
if (
|
|
2283
|
-
|
|
2406
|
+
var jt, m0;
|
|
2407
|
+
function j0() {
|
|
2408
|
+
if (m0) return jt;
|
|
2409
|
+
m0 = 1;
|
|
2284
2410
|
function n(t, o) {
|
|
2285
2411
|
return [
|
|
2286
2412
|
t[0] * o[0] + t[2] * o[1],
|
|
@@ -2325,13 +2451,13 @@ function Bt() {
|
|
|
2325
2451
|
t * a[0] + o * a[2] + (i ? 0 : a[4]),
|
|
2326
2452
|
t * a[1] + o * a[3] + (i ? 0 : a[5])
|
|
2327
2453
|
]) : [t, o];
|
|
2328
|
-
},
|
|
2454
|
+
}, jt = e, jt;
|
|
2329
2455
|
}
|
|
2330
|
-
var
|
|
2331
|
-
function
|
|
2332
|
-
if (
|
|
2333
|
-
|
|
2334
|
-
var n =
|
|
2456
|
+
var Ht, b0;
|
|
2457
|
+
function E1() {
|
|
2458
|
+
if (b0) return Ht;
|
|
2459
|
+
b0 = 1;
|
|
2460
|
+
var n = j0(), e = {
|
|
2335
2461
|
matrix: !0,
|
|
2336
2462
|
scale: !0,
|
|
2337
2463
|
rotate: !0,
|
|
@@ -2339,7 +2465,7 @@ function Me() {
|
|
|
2339
2465
|
skewX: !0,
|
|
2340
2466
|
skewY: !0
|
|
2341
2467
|
}, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
|
|
2342
|
-
return
|
|
2468
|
+
return Ht = function(a) {
|
|
2343
2469
|
var s = new n(), r, h;
|
|
2344
2470
|
return a.split(t).forEach(function(c) {
|
|
2345
2471
|
if (c.length) {
|
|
@@ -2371,55 +2497,55 @@ function Me() {
|
|
|
2371
2497
|
}
|
|
2372
2498
|
}
|
|
2373
2499
|
}), s;
|
|
2374
|
-
},
|
|
2500
|
+
}, Ht;
|
|
2375
2501
|
}
|
|
2376
|
-
var
|
|
2377
|
-
function
|
|
2378
|
-
if (
|
|
2379
|
-
|
|
2502
|
+
var Ut, A0;
|
|
2503
|
+
function S1() {
|
|
2504
|
+
if (A0) return Ut;
|
|
2505
|
+
A0 = 1;
|
|
2380
2506
|
var n = Math.PI * 2;
|
|
2381
2507
|
function e(i, a, s, r) {
|
|
2382
2508
|
var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
|
|
2383
2509
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2384
2510
|
}
|
|
2385
2511
|
function t(i, a, s, r, h, c, f, d, l, u) {
|
|
2386
|
-
var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f,
|
|
2387
|
-
|
|
2388
|
-
var
|
|
2389
|
-
return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [
|
|
2512
|
+
var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, E = d * d, L = m * m, C = y * y, S = M * E - M * C - E * L;
|
|
2513
|
+
S < 0 && (S = 0), S /= M * C + E * L, S = Math.sqrt(S) * (h === c ? -1 : 1);
|
|
2514
|
+
var T = S * f / d * y, I = S * -d / f * m, N = u * T - l * I + (i + s) / 2, G = l * T + u * I + (a + r) / 2, H = (m - T) / f, $ = (y - I) / d, tt = (-m - T) / f, et = (-y - I) / d, nt = e(1, 0, H, $), K = e(H, $, tt, et);
|
|
2515
|
+
return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [N, G, nt, K];
|
|
2390
2516
|
}
|
|
2391
2517
|
function o(i, a) {
|
|
2392
2518
|
var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), f = Math.sin(i + a);
|
|
2393
2519
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2394
2520
|
}
|
|
2395
|
-
return
|
|
2396
|
-
var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2,
|
|
2397
|
-
if (M === 0 &&
|
|
2521
|
+
return Ut = function(a, s, r, h, c, f, d, l, u) {
|
|
2522
|
+
var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, E = -m * (a - r) / 2 + y * (s - h) / 2;
|
|
2523
|
+
if (M === 0 && E === 0)
|
|
2398
2524
|
return [];
|
|
2399
2525
|
if (d === 0 || l === 0)
|
|
2400
2526
|
return [];
|
|
2401
2527
|
d = Math.abs(d), l = Math.abs(l);
|
|
2402
|
-
var
|
|
2403
|
-
|
|
2404
|
-
var
|
|
2405
|
-
|
|
2406
|
-
for (var G = 0; G <
|
|
2407
|
-
|
|
2408
|
-
return
|
|
2409
|
-
for (var
|
|
2410
|
-
var
|
|
2411
|
-
|
|
2412
|
-
var
|
|
2413
|
-
|
|
2528
|
+
var L = M * M / (d * d) + E * E / (l * l);
|
|
2529
|
+
L > 1 && (d *= Math.sqrt(L), l *= Math.sqrt(L));
|
|
2530
|
+
var C = t(a, s, r, h, c, f, d, l, m, y), S = [], T = C[2], I = C[3], N = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
|
|
2531
|
+
I /= N;
|
|
2532
|
+
for (var G = 0; G < N; G++)
|
|
2533
|
+
S.push(o(T, I)), T += I;
|
|
2534
|
+
return S.map(function(H) {
|
|
2535
|
+
for (var $ = 0; $ < H.length; $ += 2) {
|
|
2536
|
+
var tt = H[$ + 0], et = H[$ + 1];
|
|
2537
|
+
tt *= d, et *= l;
|
|
2538
|
+
var nt = y * tt - m * et, K = m * tt + y * et;
|
|
2539
|
+
H[$ + 0] = nt + C[0], H[$ + 1] = K + C[1];
|
|
2414
2540
|
}
|
|
2415
|
-
return
|
|
2541
|
+
return H;
|
|
2416
2542
|
});
|
|
2417
|
-
},
|
|
2543
|
+
}, Ut;
|
|
2418
2544
|
}
|
|
2419
|
-
var
|
|
2420
|
-
function
|
|
2421
|
-
if (
|
|
2422
|
-
|
|
2545
|
+
var Yt, M0;
|
|
2546
|
+
function k1() {
|
|
2547
|
+
if (M0) return Yt;
|
|
2548
|
+
M0 = 1;
|
|
2423
2549
|
var n = 1e-10, e = Math.PI / 180;
|
|
2424
2550
|
function t(o, i, a) {
|
|
2425
2551
|
if (!(this instanceof t))
|
|
@@ -2443,13 +2569,13 @@ function Te() {
|
|
|
2443
2569
|
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(u)) : (this.ax += 90, this.rx = Math.sqrt(u), this.ry = Math.sqrt(l)), this;
|
|
2444
2570
|
}, t.prototype.isDegenerate = function() {
|
|
2445
2571
|
return this.rx < n * this.ry || this.ry < n * this.rx;
|
|
2446
|
-
},
|
|
2572
|
+
}, Yt = t, Yt;
|
|
2447
2573
|
}
|
|
2448
|
-
var
|
|
2449
|
-
function
|
|
2450
|
-
if (
|
|
2451
|
-
|
|
2452
|
-
var n =
|
|
2574
|
+
var $t, L0;
|
|
2575
|
+
function I1() {
|
|
2576
|
+
if (L0) return $t;
|
|
2577
|
+
L0 = 1;
|
|
2578
|
+
var n = P1(), e = E1(), t = j0(), o = S1(), i = k1();
|
|
2453
2579
|
function a(s) {
|
|
2454
2580
|
if (!(this instanceof a))
|
|
2455
2581
|
return new a(s);
|
|
@@ -2487,12 +2613,12 @@ function Pe() {
|
|
|
2487
2613
|
break;
|
|
2488
2614
|
case "a":
|
|
2489
2615
|
case "A":
|
|
2490
|
-
var
|
|
2491
|
-
if (
|
|
2616
|
+
var E = s.toArray(), L = i(c[1], c[2], c[3]).transform(E);
|
|
2617
|
+
if (E[0] * E[3] - E[1] * E[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === d && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
|
|
2492
2618
|
m = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2493
2619
|
break;
|
|
2494
2620
|
}
|
|
2495
|
-
|
|
2621
|
+
L.isDegenerate() ? m = [c[0] === "a" ? "l" : "L", u[0], u[1]] : m = [c[0], L.rx, L.ry, L.ax, c[4], c[5], u[0], u[1]];
|
|
2496
2622
|
break;
|
|
2497
2623
|
case "m":
|
|
2498
2624
|
M = f > 0, u = s.calc(c[1], c[2], M), m = ["m", u[0], u[1]];
|
|
@@ -2574,40 +2700,40 @@ function Pe() {
|
|
|
2574
2700
|
}
|
|
2575
2701
|
}), this;
|
|
2576
2702
|
}, a.prototype.iterate = function(s, r) {
|
|
2577
|
-
var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M,
|
|
2578
|
-
if (r || this.__evaluateStack(), h.forEach(function(
|
|
2579
|
-
var
|
|
2580
|
-
Array.isArray(
|
|
2581
|
-
var
|
|
2582
|
-
switch (
|
|
2703
|
+
var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M, E;
|
|
2704
|
+
if (r || this.__evaluateStack(), h.forEach(function(L, C) {
|
|
2705
|
+
var S = s(L, C, d, l);
|
|
2706
|
+
Array.isArray(S) && (c[C] = S, f = !0);
|
|
2707
|
+
var T = L[0] === L[0].toLowerCase();
|
|
2708
|
+
switch (L[0]) {
|
|
2583
2709
|
case "m":
|
|
2584
2710
|
case "M":
|
|
2585
|
-
d =
|
|
2711
|
+
d = L[1] + (T ? d : 0), l = L[2] + (T ? l : 0), u = d, m = l;
|
|
2586
2712
|
return;
|
|
2587
2713
|
case "h":
|
|
2588
2714
|
case "H":
|
|
2589
|
-
d =
|
|
2715
|
+
d = L[1] + (T ? d : 0);
|
|
2590
2716
|
return;
|
|
2591
2717
|
case "v":
|
|
2592
2718
|
case "V":
|
|
2593
|
-
l =
|
|
2719
|
+
l = L[1] + (T ? l : 0);
|
|
2594
2720
|
return;
|
|
2595
2721
|
case "z":
|
|
2596
2722
|
case "Z":
|
|
2597
2723
|
d = u, l = m;
|
|
2598
2724
|
return;
|
|
2599
2725
|
default:
|
|
2600
|
-
d =
|
|
2726
|
+
d = L[L.length - 2] + (T ? d : 0), l = L[L.length - 1] + (T ? l : 0);
|
|
2601
2727
|
}
|
|
2602
2728
|
}), !f)
|
|
2603
2729
|
return this;
|
|
2604
|
-
for (
|
|
2730
|
+
for (E = [], y = 0; y < h.length; y++)
|
|
2605
2731
|
if (typeof c[y] < "u")
|
|
2606
2732
|
for (M = 0; M < c[y].length; M++)
|
|
2607
|
-
|
|
2733
|
+
E.push(c[y][M]);
|
|
2608
2734
|
else
|
|
2609
|
-
|
|
2610
|
-
return this.segments =
|
|
2735
|
+
E.push(h[y]);
|
|
2736
|
+
return this.segments = E, this;
|
|
2611
2737
|
}, a.prototype.abs = function() {
|
|
2612
2738
|
return this.iterate(function(s, r, h, c) {
|
|
2613
2739
|
var f = s[0], d = f.toUpperCase(), l;
|
|
@@ -2650,15 +2776,15 @@ function Pe() {
|
|
|
2650
2776
|
}, a.prototype.unshort = function() {
|
|
2651
2777
|
var s = this.segments, r, h, c, f, d;
|
|
2652
2778
|
return this.iterate(function(l, u, m, y) {
|
|
2653
|
-
var M = l[0],
|
|
2654
|
-
u && (
|
|
2655
|
-
|
|
2779
|
+
var M = l[0], E = M.toUpperCase(), L;
|
|
2780
|
+
u && (E === "T" ? (L = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - m, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, d = -h, L || (f += m, d += y), s[u] = [
|
|
2781
|
+
L ? "q" : "Q",
|
|
2656
2782
|
f,
|
|
2657
2783
|
d,
|
|
2658
2784
|
l[1],
|
|
2659
2785
|
l[2]
|
|
2660
|
-
]) :
|
|
2661
|
-
|
|
2786
|
+
]) : E === "S" && (L = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - m, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, d = -h, L || (f += m, d += y), s[u] = [
|
|
2787
|
+
L ? "c" : "C",
|
|
2662
2788
|
f,
|
|
2663
2789
|
d,
|
|
2664
2790
|
l[1],
|
|
@@ -2667,41 +2793,41 @@ function Pe() {
|
|
|
2667
2793
|
l[4]
|
|
2668
2794
|
]));
|
|
2669
2795
|
}), this;
|
|
2670
|
-
},
|
|
2796
|
+
}, $t = a, $t;
|
|
2671
2797
|
}
|
|
2672
|
-
var
|
|
2673
|
-
function
|
|
2674
|
-
return
|
|
2798
|
+
var Xt, T0;
|
|
2799
|
+
function _1() {
|
|
2800
|
+
return T0 || (T0 = 1, Xt = I1()), Xt;
|
|
2675
2801
|
}
|
|
2676
|
-
var
|
|
2677
|
-
const
|
|
2678
|
-
var
|
|
2679
|
-
function
|
|
2802
|
+
var O1 = _1();
|
|
2803
|
+
const F1 = /* @__PURE__ */ C1(O1);
|
|
2804
|
+
var Gt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, R1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2805
|
+
function N1(n) {
|
|
2680
2806
|
var e = [];
|
|
2681
|
-
return n.replace(
|
|
2807
|
+
return n.replace(R1, function(t, o, i) {
|
|
2682
2808
|
var a = o.toLowerCase();
|
|
2683
|
-
for (i =
|
|
2684
|
-
if (i.length ===
|
|
2809
|
+
for (i = q1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2810
|
+
if (i.length === Gt[a])
|
|
2685
2811
|
return i.unshift(o), e.push(i);
|
|
2686
|
-
if (i.length <
|
|
2812
|
+
if (i.length < Gt[a])
|
|
2687
2813
|
throw new Error("malformed path data");
|
|
2688
|
-
e.push([o].concat(i.splice(0,
|
|
2814
|
+
e.push([o].concat(i.splice(0, Gt[a])));
|
|
2689
2815
|
}
|
|
2690
2816
|
}), e;
|
|
2691
2817
|
}
|
|
2692
|
-
var
|
|
2693
|
-
function
|
|
2694
|
-
var e = n.match(
|
|
2818
|
+
var B1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2819
|
+
function q1(n) {
|
|
2820
|
+
var e = n.match(B1);
|
|
2695
2821
|
return e ? e.map(Number) : [];
|
|
2696
2822
|
}
|
|
2697
|
-
function
|
|
2698
|
-
return new
|
|
2823
|
+
function it(n, e, t, o, i, a, s, r) {
|
|
2824
|
+
return new Kt(n, e, t, o, i, a, s, r);
|
|
2699
2825
|
}
|
|
2700
|
-
function
|
|
2701
|
-
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 =
|
|
2826
|
+
function Kt(n, e, t, o, i, a, s, r) {
|
|
2827
|
+
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 = W1, this.getPoint = j1, this.getDerivative = z1) : (this.getArcLength = H1, this.getPoint = H0, this.getDerivative = D1), this.init();
|
|
2702
2828
|
}
|
|
2703
|
-
|
|
2704
|
-
constructor:
|
|
2829
|
+
Kt.prototype = {
|
|
2830
|
+
constructor: Kt,
|
|
2705
2831
|
init: function() {
|
|
2706
2832
|
this.length = this.getArcLength(
|
|
2707
2833
|
[this.a.x, this.b.x, this.c.x, this.d.x],
|
|
@@ -2712,7 +2838,7 @@ Z0.prototype = {
|
|
|
2712
2838
|
return this.length;
|
|
2713
2839
|
},
|
|
2714
2840
|
getPointAtLength: function(n) {
|
|
2715
|
-
var e =
|
|
2841
|
+
var e = Wt(
|
|
2716
2842
|
n,
|
|
2717
2843
|
this.length,
|
|
2718
2844
|
this.getArcLength,
|
|
@@ -2726,7 +2852,7 @@ Z0.prototype = {
|
|
|
2726
2852
|
);
|
|
2727
2853
|
},
|
|
2728
2854
|
getTangentAtLength: function(n) {
|
|
2729
|
-
var e =
|
|
2855
|
+
var e = Wt(
|
|
2730
2856
|
n,
|
|
2731
2857
|
this.length,
|
|
2732
2858
|
this.getArcLength,
|
|
@@ -2740,7 +2866,7 @@ Z0.prototype = {
|
|
|
2740
2866
|
return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
|
|
2741
2867
|
},
|
|
2742
2868
|
getPropertiesAtLength: function(n) {
|
|
2743
|
-
var e =
|
|
2869
|
+
var e = Wt(
|
|
2744
2870
|
n,
|
|
2745
2871
|
this.length,
|
|
2746
2872
|
this.getArcLength,
|
|
@@ -2760,36 +2886,36 @@ Z0.prototype = {
|
|
|
2760
2886
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2761
2887
|
}
|
|
2762
2888
|
};
|
|
2763
|
-
function
|
|
2889
|
+
function D1(n, e, t) {
|
|
2764
2890
|
return {
|
|
2765
2891
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2766
2892
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
2767
2893
|
};
|
|
2768
2894
|
}
|
|
2769
|
-
function
|
|
2770
|
-
var o =
|
|
2895
|
+
function z1(n, e, t) {
|
|
2896
|
+
var o = H0(
|
|
2771
2897
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
2772
2898
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
2773
2899
|
t
|
|
2774
2900
|
);
|
|
2775
2901
|
return o;
|
|
2776
2902
|
}
|
|
2777
|
-
function
|
|
2903
|
+
function Wt(n, e, t, o, i) {
|
|
2778
2904
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
2779
2905
|
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
|
|
2780
2906
|
f < a ? (a = f, s += r) : d < a ? (a = d, s -= r) : r /= 2;
|
|
2781
2907
|
}
|
|
2782
2908
|
return s;
|
|
2783
2909
|
}
|
|
2784
|
-
function
|
|
2910
|
+
function H0(n, e, t) {
|
|
2785
2911
|
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];
|
|
2786
2912
|
return { x: o, y: i };
|
|
2787
2913
|
}
|
|
2788
|
-
function
|
|
2914
|
+
function j1(n, e, t) {
|
|
2789
2915
|
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];
|
|
2790
2916
|
return { x: o, y: i };
|
|
2791
2917
|
}
|
|
2792
|
-
function
|
|
2918
|
+
function H1(n, e, t) {
|
|
2793
2919
|
t === void 0 && (t = 1);
|
|
2794
2920
|
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;
|
|
2795
2921
|
if (r === 0)
|
|
@@ -2799,7 +2925,7 @@ function Be(n, e, t) {
|
|
|
2799
2925
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2800
2926
|
)));
|
|
2801
2927
|
}
|
|
2802
|
-
var
|
|
2928
|
+
var U1 = [
|
|
2803
2929
|
[],
|
|
2804
2930
|
[],
|
|
2805
2931
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2825,7 +2951,7 @@ var qe = [
|
|
|
2825
2951
|
[-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],
|
|
2826
2952
|
[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],
|
|
2827
2953
|
[-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]
|
|
2828
|
-
],
|
|
2954
|
+
], Y1 = [
|
|
2829
2955
|
[],
|
|
2830
2956
|
[],
|
|
2831
2957
|
[1, 1],
|
|
@@ -2851,53 +2977,53 @@ var qe = [
|
|
|
2851
2977
|
[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],
|
|
2852
2978
|
[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],
|
|
2853
2979
|
[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]
|
|
2854
|
-
],
|
|
2855
|
-
function
|
|
2856
|
-
return
|
|
2980
|
+
], $1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2981
|
+
function X1(n, e) {
|
|
2982
|
+
return $1[n][e];
|
|
2857
2983
|
}
|
|
2858
|
-
function
|
|
2984
|
+
function Qt(n, e, t) {
|
|
2859
2985
|
var o = t.length - 1, i, a, s;
|
|
2860
2986
|
if (o === 0)
|
|
2861
2987
|
return 0;
|
|
2862
2988
|
if (n === 0) {
|
|
2863
2989
|
for (a = 0, s = 0; s <= o; s++)
|
|
2864
|
-
a +=
|
|
2990
|
+
a += X1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2865
2991
|
return a;
|
|
2866
2992
|
} else {
|
|
2867
2993
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
2868
2994
|
i[s] = o * (t[s + 1] - t[s]);
|
|
2869
|
-
return
|
|
2995
|
+
return Qt(n - 1, e, i);
|
|
2870
2996
|
}
|
|
2871
2997
|
}
|
|
2872
|
-
function
|
|
2873
|
-
var o =
|
|
2998
|
+
function G1(n, e, t) {
|
|
2999
|
+
var o = Qt(1, t, n), i = Qt(1, t, e), a = o * o + i * i;
|
|
2874
3000
|
return Math.sqrt(a);
|
|
2875
3001
|
}
|
|
2876
|
-
function
|
|
3002
|
+
function W1(n, e, t) {
|
|
2877
3003
|
var o, i, a, s;
|
|
2878
3004
|
t === void 0 && (t = 1);
|
|
2879
3005
|
var r = 20;
|
|
2880
3006
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2881
|
-
s = o *
|
|
3007
|
+
s = o * U1[r][a] + o, i += Y1[r][a] * G1(n, e, s);
|
|
2882
3008
|
return o * i;
|
|
2883
3009
|
}
|
|
2884
|
-
var
|
|
2885
|
-
function
|
|
3010
|
+
var Pt = Math.PI * 2;
|
|
3011
|
+
function C0(n, e, t, o) {
|
|
2886
3012
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2887
3013
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2888
3014
|
}
|
|
2889
|
-
function
|
|
3015
|
+
function Z1(n, e, t, o, i, a, s, r, h, c) {
|
|
2890
3016
|
var f = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, m = f * f, y = d * d, M = l * u - l * y - u * m;
|
|
2891
3017
|
M < 0 && (M = 0), M /= l * y + u * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
2892
|
-
var
|
|
2893
|
-
return a === 0 &&
|
|
3018
|
+
var E = M * s / r * d, L = M * -r / s * f, C = c * E - h * L + (n + t) / 2, S = h * E + c * L + (e + o) / 2, T = (f - E) / s, I = (d - L) / r, N = (-f - E) / s, G = (-d - L) / r, H = C0(1, 0, T, I), $ = C0(T, I, N, G);
|
|
3019
|
+
return a === 0 && $ > 0 && ($ -= Pt), a === 1 && $ < 0 && ($ += Pt), [C, S, H, $];
|
|
2894
3020
|
}
|
|
2895
|
-
function
|
|
3021
|
+
function V1(n, e) {
|
|
2896
3022
|
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);
|
|
2897
3023
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2898
3024
|
}
|
|
2899
|
-
function
|
|
2900
|
-
var c = Math.sin(i *
|
|
3025
|
+
function K1(n, e, t, o, i, a, s, r, h) {
|
|
3026
|
+
var c = Math.sin(i * Pt / 360), f = Math.cos(i * Pt / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2901
3027
|
if (d === 0 && l === 0)
|
|
2902
3028
|
return [];
|
|
2903
3029
|
if (t === 0 || o === 0)
|
|
@@ -2905,32 +3031,32 @@ function $e(n, e, t, o, i, a, s, r, h) {
|
|
|
2905
3031
|
t = Math.abs(t), o = Math.abs(o);
|
|
2906
3032
|
var u = d * d / (t * t) + l * l / (o * o);
|
|
2907
3033
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2908
|
-
var m =
|
|
2909
|
-
|
|
2910
|
-
for (var
|
|
2911
|
-
y.push(
|
|
2912
|
-
return y.map(function(
|
|
2913
|
-
for (var
|
|
2914
|
-
var
|
|
2915
|
-
|
|
2916
|
-
var G = f *
|
|
2917
|
-
|
|
3034
|
+
var m = Z1(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], E = m[3], L = Math.max(Math.ceil(Math.abs(E) / (Pt / 4)), 1);
|
|
3035
|
+
E /= L;
|
|
3036
|
+
for (var C = 0; C < L; C++)
|
|
3037
|
+
y.push(V1(M, E)), M += E;
|
|
3038
|
+
return y.map(function(S) {
|
|
3039
|
+
for (var T = 0; T < S.length; T += 2) {
|
|
3040
|
+
var I = S[T + 0], N = S[T + 1];
|
|
3041
|
+
I *= t, N *= o;
|
|
3042
|
+
var G = f * I - c * N, H = c * I + f * N;
|
|
3043
|
+
S[T + 0] = G + m[0], S[T + 1] = H + m[1];
|
|
2918
3044
|
}
|
|
2919
|
-
return
|
|
3045
|
+
return S;
|
|
2920
3046
|
});
|
|
2921
3047
|
}
|
|
2922
|
-
function
|
|
2923
|
-
return new
|
|
3048
|
+
function P0(n, e, t, o, i, a, s, r, h) {
|
|
3049
|
+
return new Jt(n, e, t, o, i, a, s, r, h);
|
|
2924
3050
|
}
|
|
2925
|
-
function
|
|
2926
|
-
var c = 0, f = [], d = [], l =
|
|
3051
|
+
function Jt(n, e, t, o, i, a, s, r, h) {
|
|
3052
|
+
var c = 0, f = [], d = [], l = K1(n, e, t, o, i, a, s, r, h);
|
|
2927
3053
|
l.forEach(function(u) {
|
|
2928
|
-
var m = new
|
|
3054
|
+
var m = new it(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
|
|
2929
3055
|
c += y, f.push(y), d.push(m);
|
|
2930
3056
|
}), this.length = c, this.partialLengths = f, this.curves = d;
|
|
2931
3057
|
}
|
|
2932
|
-
|
|
2933
|
-
constructor:
|
|
3058
|
+
Jt.prototype = {
|
|
3059
|
+
constructor: Jt,
|
|
2934
3060
|
init: function() {
|
|
2935
3061
|
},
|
|
2936
3062
|
getTotalLength: function() {
|
|
@@ -2959,34 +3085,34 @@ K0.prototype = {
|
|
|
2959
3085
|
return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
|
|
2960
3086
|
}
|
|
2961
3087
|
};
|
|
2962
|
-
function
|
|
2963
|
-
return new
|
|
3088
|
+
function rt(n, e, t, o) {
|
|
3089
|
+
return new kt(n, e, t, o);
|
|
2964
3090
|
}
|
|
2965
|
-
function
|
|
3091
|
+
function kt(n, e, t, o) {
|
|
2966
3092
|
this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
|
|
2967
3093
|
}
|
|
2968
|
-
|
|
3094
|
+
kt.prototype.getTotalLength = function() {
|
|
2969
3095
|
return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
2970
3096
|
};
|
|
2971
|
-
|
|
3097
|
+
kt.prototype.getPointAtLength = function(n) {
|
|
2972
3098
|
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;
|
|
2973
3099
|
return { x: this.x0 + t, y: this.y0 + o };
|
|
2974
3100
|
};
|
|
2975
|
-
|
|
3101
|
+
kt.prototype.getTangentAtLength = function() {
|
|
2976
3102
|
var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
2977
3103
|
return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
|
|
2978
3104
|
};
|
|
2979
|
-
|
|
3105
|
+
kt.prototype.getPropertiesAtLength = function(n) {
|
|
2980
3106
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2981
3107
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2982
3108
|
};
|
|
2983
|
-
function
|
|
3109
|
+
function Q1(n) {
|
|
2984
3110
|
var e = 0, t = [], o = [];
|
|
2985
3111
|
function i(s) {
|
|
2986
3112
|
if (!s)
|
|
2987
3113
|
return null;
|
|
2988
|
-
for (var r =
|
|
2989
|
-
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [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
|
|
3114
|
+
for (var r = N1(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
|
|
3115
|
+
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [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 rt(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 rt(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 rt(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 rt(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 rt(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 rt(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(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new rt(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new it(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 it(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 it(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 it(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 it(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 it(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 it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new rt(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 rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new it(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 it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new rt(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 it(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 rt(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 P0(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 P0(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);
|
|
2990
3116
|
return i;
|
|
2991
3117
|
}
|
|
2992
3118
|
i.getTotalLength = function() {
|
|
@@ -3009,49 +3135,49 @@ function Ge(n) {
|
|
|
3009
3135
|
};
|
|
3010
3136
|
return i(n);
|
|
3011
3137
|
}
|
|
3012
|
-
function
|
|
3138
|
+
function Ft(n, e) {
|
|
3013
3139
|
return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
|
|
3014
3140
|
}
|
|
3015
|
-
function
|
|
3141
|
+
function U0(n, e, t) {
|
|
3016
3142
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
3017
3143
|
}
|
|
3018
|
-
function
|
|
3019
|
-
return
|
|
3144
|
+
function J1(n, e) {
|
|
3145
|
+
return Ft(n, e) < 1e-9;
|
|
3020
3146
|
}
|
|
3021
|
-
function
|
|
3022
|
-
let o = n.map((i, a) =>
|
|
3147
|
+
function tn(n, e, t) {
|
|
3148
|
+
let o = n.map((i, a) => en(i, e[a]));
|
|
3023
3149
|
return function(i) {
|
|
3024
3150
|
let a = o.map((s) => s(i));
|
|
3025
|
-
return t ?
|
|
3151
|
+
return t ? on(a) : a;
|
|
3026
3152
|
};
|
|
3027
3153
|
}
|
|
3028
|
-
function
|
|
3154
|
+
function en(n, e) {
|
|
3029
3155
|
return function(t) {
|
|
3030
3156
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
3031
3157
|
};
|
|
3032
3158
|
}
|
|
3033
|
-
function
|
|
3159
|
+
function Ot(n) {
|
|
3034
3160
|
return typeof n == "number" && isFinite(n);
|
|
3035
3161
|
}
|
|
3036
|
-
const
|
|
3162
|
+
const t0 = `All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
|
|
3037
3163
|
Example valid ways of supplying a shape would be:
|
|
3038
3164
|
[[0, 0], [10, 0], [10, 10]]
|
|
3039
3165
|
"M0,0 L10,0 L10,10Z"
|
|
3040
3166
|
`;
|
|
3041
|
-
function
|
|
3042
|
-
return new
|
|
3167
|
+
function nn(n) {
|
|
3168
|
+
return new F1(n).abs();
|
|
3043
3169
|
}
|
|
3044
|
-
function
|
|
3170
|
+
function rn(n) {
|
|
3045
3171
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3046
3172
|
}
|
|
3047
|
-
function
|
|
3173
|
+
function on(n) {
|
|
3048
3174
|
return "M" + n.join("L") + "Z";
|
|
3049
3175
|
}
|
|
3050
|
-
function
|
|
3051
|
-
let t =
|
|
3052
|
-
return
|
|
3176
|
+
function sn(n, e) {
|
|
3177
|
+
let t = nn(n);
|
|
3178
|
+
return an(t) || hn(t, e);
|
|
3053
3179
|
}
|
|
3054
|
-
function
|
|
3180
|
+
function an(n) {
|
|
3055
3181
|
let e = n.segments || [], t = [];
|
|
3056
3182
|
if (!e.length || e[0][0] !== "M")
|
|
3057
3183
|
return !1;
|
|
@@ -3070,11 +3196,11 @@ function en(n) {
|
|
|
3070
3196
|
}
|
|
3071
3197
|
return t.length ? { ring: t } : !1;
|
|
3072
3198
|
}
|
|
3073
|
-
function
|
|
3074
|
-
let t =
|
|
3199
|
+
function hn(n, e) {
|
|
3200
|
+
let t = rn(n)[0], o = [], i, a, s = 3;
|
|
3075
3201
|
if (!t)
|
|
3076
|
-
throw new TypeError(
|
|
3077
|
-
a =
|
|
3202
|
+
throw new TypeError(t0);
|
|
3203
|
+
a = ln(t), i = a.getTotalLength(), e && Ot(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3078
3204
|
for (let r = 0; r < s; r++) {
|
|
3079
3205
|
let h = a.getPointAtLength(i * r / s);
|
|
3080
3206
|
o.push([h.x, h.y]);
|
|
@@ -3084,115 +3210,115 @@ function nn(n, e) {
|
|
|
3084
3210
|
skipBisect: !0
|
|
3085
3211
|
};
|
|
3086
3212
|
}
|
|
3087
|
-
function
|
|
3213
|
+
function ln(n) {
|
|
3088
3214
|
if (typeof window < "u" && window && window.document)
|
|
3089
3215
|
try {
|
|
3090
3216
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3091
3217
|
return e.setAttributeNS(null, "d", n), e;
|
|
3092
3218
|
} catch {
|
|
3093
3219
|
}
|
|
3094
|
-
return
|
|
3220
|
+
return Q1(n);
|
|
3095
3221
|
}
|
|
3096
|
-
function
|
|
3097
|
-
const t = n.length + e, o =
|
|
3222
|
+
function E0(n, e) {
|
|
3223
|
+
const t = n.length + e, o = T1(n) / e;
|
|
3098
3224
|
let i = 0, a = 0, s = o / 2;
|
|
3099
3225
|
for (; n.length < t; ) {
|
|
3100
|
-
let r = n[i], h = n[(i + 1) % n.length], c =
|
|
3226
|
+
let r = n[i], h = n[(i + 1) % n.length], c = Ft(r, h);
|
|
3101
3227
|
if (s <= a + c) {
|
|
3102
|
-
n.splice(i + 1, 0, c ?
|
|
3228
|
+
n.splice(i + 1, 0, c ? U0(r, h, (s - a) / c) : r.slice(0)), s += o;
|
|
3103
3229
|
continue;
|
|
3104
3230
|
}
|
|
3105
3231
|
a += c, i++;
|
|
3106
3232
|
}
|
|
3107
3233
|
}
|
|
3108
|
-
function
|
|
3234
|
+
function cn(n, e = 1 / 0) {
|
|
3109
3235
|
for (let t = 0; t < n.length; t++) {
|
|
3110
3236
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3111
|
-
for (;
|
|
3112
|
-
i =
|
|
3237
|
+
for (; Ft(o, i) > e; )
|
|
3238
|
+
i = U0(o, i, 0.5), n.splice(t + 1, 0, i);
|
|
3113
3239
|
}
|
|
3114
3240
|
}
|
|
3115
|
-
function
|
|
3241
|
+
function S0(n, e) {
|
|
3116
3242
|
let t, o, i;
|
|
3117
3243
|
if (typeof n == "string") {
|
|
3118
|
-
let a =
|
|
3244
|
+
let a = sn(n, e);
|
|
3119
3245
|
n = a.ring, i = a.skipBisect;
|
|
3120
3246
|
} else if (!Array.isArray(n))
|
|
3121
|
-
throw new TypeError(
|
|
3122
|
-
if (t = n.slice(0), !
|
|
3123
|
-
throw new TypeError(
|
|
3124
|
-
return t.length > 1 &&
|
|
3247
|
+
throw new TypeError(t0);
|
|
3248
|
+
if (t = n.slice(0), !un(t))
|
|
3249
|
+
throw new TypeError(t0);
|
|
3250
|
+
return t.length > 1 && J1(t[0], t[t.length - 1]) && t.pop(), o = L1(t), o > 0 && t.reverse(), !i && e && Ot(e) && e > 0 && cn(t, e), t;
|
|
3125
3251
|
}
|
|
3126
|
-
function
|
|
3252
|
+
function un(n) {
|
|
3127
3253
|
return n.every(function(e) {
|
|
3128
|
-
return Array.isArray(e) && e.length >= 2 &&
|
|
3254
|
+
return Array.isArray(e) && e.length >= 2 && Ot(e[0]) && Ot(e[1]);
|
|
3129
3255
|
});
|
|
3130
3256
|
}
|
|
3131
|
-
function
|
|
3257
|
+
function fn(n, e) {
|
|
3132
3258
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3133
3259
|
for (let r = 0; r < t; r++)
|
|
3134
3260
|
a = 0, e.forEach(function(h, c) {
|
|
3135
|
-
let f =
|
|
3261
|
+
let f = Ft(n[(r + c) % t], h);
|
|
3136
3262
|
a += f * f;
|
|
3137
3263
|
}), a < o && (o = a, i = r);
|
|
3138
3264
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3139
3265
|
}
|
|
3140
|
-
function
|
|
3141
|
-
let i =
|
|
3266
|
+
function gn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3267
|
+
let i = S0(n, t), a = S0(e, t), s = pn(i, a, o);
|
|
3142
3268
|
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);
|
|
3143
3269
|
}
|
|
3144
|
-
function
|
|
3270
|
+
function pn(n, e, t) {
|
|
3145
3271
|
let o;
|
|
3146
|
-
return o = n.length - e.length,
|
|
3272
|
+
return o = n.length - e.length, E0(n, o < 0 ? o * -1 : 0), E0(e, o > 0 ? o : 0), fn(n, e), tn(n, e, t);
|
|
3147
3273
|
}
|
|
3148
|
-
var
|
|
3149
|
-
function
|
|
3150
|
-
if (
|
|
3151
|
-
|
|
3274
|
+
var _t = { exports: {} }, k0;
|
|
3275
|
+
function dn() {
|
|
3276
|
+
if (k0) return _t.exports;
|
|
3277
|
+
k0 = 1, _t.exports = n, _t.exports.default = n;
|
|
3152
3278
|
function n(g, x, p) {
|
|
3153
3279
|
p = p || 2;
|
|
3154
|
-
var v = x && x.length, w = v ? x[0] * p : g.length,
|
|
3155
|
-
if (!
|
|
3156
|
-
var
|
|
3157
|
-
if (v && (
|
|
3158
|
-
|
|
3280
|
+
var v = x && x.length, w = v ? x[0] * p : g.length, b = e(g, 0, w, p, !0), A = [];
|
|
3281
|
+
if (!b || b.next === b.prev) return A;
|
|
3282
|
+
var P, F, _, Y, z, B, Z;
|
|
3283
|
+
if (v && (b = h(g, x, b, p)), g.length > 80 * p) {
|
|
3284
|
+
P = _ = g[0], F = Y = g[1];
|
|
3159
3285
|
for (var j = p; j < w; j += p)
|
|
3160
|
-
|
|
3161
|
-
|
|
3286
|
+
z = g[j], B = g[j + 1], z < P && (P = z), B < F && (F = B), z > _ && (_ = z), B > Y && (Y = B);
|
|
3287
|
+
Z = Math.max(_ - P, Y - F), Z = Z !== 0 ? 32767 / Z : 0;
|
|
3162
3288
|
}
|
|
3163
|
-
return o(
|
|
3289
|
+
return o(b, A, p, P, F, Z, 0), A;
|
|
3164
3290
|
}
|
|
3165
3291
|
function e(g, x, p, v, w) {
|
|
3166
|
-
var
|
|
3167
|
-
if (w ===
|
|
3168
|
-
for (
|
|
3292
|
+
var b, A;
|
|
3293
|
+
if (w === Rt(g, x, p, v) > 0)
|
|
3294
|
+
for (b = x; b < p; b += v) A = et(b, g[b], g[b + 1], A);
|
|
3169
3295
|
else
|
|
3170
|
-
for (
|
|
3171
|
-
return
|
|
3296
|
+
for (b = p - v; b >= x; b -= v) A = et(b, g[b], g[b + 1], A);
|
|
3297
|
+
return A && S(A, A.next) && (nt(A), A = A.next), A;
|
|
3172
3298
|
}
|
|
3173
3299
|
function t(g, x) {
|
|
3174
3300
|
if (!g) return g;
|
|
3175
3301
|
x || (x = g);
|
|
3176
3302
|
var p = g, v;
|
|
3177
3303
|
do
|
|
3178
|
-
if (v = !1, !p.steiner && (
|
|
3179
|
-
if (
|
|
3304
|
+
if (v = !1, !p.steiner && (S(p, p.next) || C(p.prev, p, p.next) === 0)) {
|
|
3305
|
+
if (nt(p), p = x = p.prev, p === p.next) break;
|
|
3180
3306
|
v = !0;
|
|
3181
3307
|
} else
|
|
3182
3308
|
p = p.next;
|
|
3183
3309
|
while (v || p !== x);
|
|
3184
3310
|
return x;
|
|
3185
3311
|
}
|
|
3186
|
-
function o(g, x, p, v, w,
|
|
3312
|
+
function o(g, x, p, v, w, b, A) {
|
|
3187
3313
|
if (g) {
|
|
3188
|
-
!
|
|
3189
|
-
for (var
|
|
3190
|
-
if (F = g.prev,
|
|
3191
|
-
x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(
|
|
3314
|
+
!A && b && u(g, v, w, b);
|
|
3315
|
+
for (var P = g, F, _; g.prev !== g.next; ) {
|
|
3316
|
+
if (F = g.prev, _ = g.next, b ? a(g, v, w, b) : i(g)) {
|
|
3317
|
+
x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(_.i / p | 0), nt(g), g = _.next, P = _.next;
|
|
3192
3318
|
continue;
|
|
3193
3319
|
}
|
|
3194
|
-
if (g =
|
|
3195
|
-
|
|
3320
|
+
if (g = _, g === P) {
|
|
3321
|
+
A ? A === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, b, 2)) : A === 2 && r(g, x, p, v, w, b) : o(t(g), x, p, v, w, b, 1);
|
|
3196
3322
|
break;
|
|
3197
3323
|
}
|
|
3198
3324
|
}
|
|
@@ -3200,58 +3326,58 @@ function cn() {
|
|
|
3200
3326
|
}
|
|
3201
3327
|
function i(g) {
|
|
3202
3328
|
var x = g.prev, p = g, v = g.next;
|
|
3203
|
-
if (
|
|
3204
|
-
for (var w = x.x,
|
|
3205
|
-
if (j.x >= Y && j.x <=
|
|
3329
|
+
if (C(x, p, v) >= 0) return !1;
|
|
3330
|
+
for (var w = x.x, b = p.x, A = v.x, P = x.y, F = p.y, _ = v.y, Y = w < b ? w < A ? w : A : b < A ? b : A, z = P < F ? P < _ ? P : _ : F < _ ? F : _, B = w > b ? w > A ? w : A : b > A ? b : A, Z = P > F ? P > _ ? P : _ : F > _ ? F : _, j = v.next; j !== x; ) {
|
|
3331
|
+
if (j.x >= Y && j.x <= B && j.y >= z && j.y <= Z && E(w, P, b, F, A, _, j.x, j.y) && C(j.prev, j, j.next) >= 0) return !1;
|
|
3206
3332
|
j = j.next;
|
|
3207
3333
|
}
|
|
3208
3334
|
return !0;
|
|
3209
3335
|
}
|
|
3210
3336
|
function a(g, x, p, v) {
|
|
3211
|
-
var w = g.prev,
|
|
3212
|
-
if (
|
|
3213
|
-
for (var
|
|
3214
|
-
if (
|
|
3215
|
-
|
|
3337
|
+
var w = g.prev, b = g, A = g.next;
|
|
3338
|
+
if (C(w, b, A) >= 0) return !1;
|
|
3339
|
+
for (var P = w.x, F = b.x, _ = A.x, Y = w.y, z = b.y, B = A.y, Z = P < F ? P < _ ? P : _ : F < _ ? F : _, j = Y < z ? Y < B ? Y : B : z < B ? z : B, Lt = P > F ? P > _ ? P : _ : F > _ ? F : _, Tt = Y > z ? Y > B ? Y : B : z > B ? z : B, s0 = y(Z, j, x, p, v), a0 = y(Lt, Tt, x, p, v), q = g.prevZ, D = g.nextZ; q && q.z >= s0 && D && D.z <= a0; ) {
|
|
3340
|
+
if (q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, Y, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0 || (q = q.prevZ, D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, Y, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0)) return !1;
|
|
3341
|
+
D = D.nextZ;
|
|
3216
3342
|
}
|
|
3217
|
-
for (;
|
|
3218
|
-
if (
|
|
3219
|
-
|
|
3343
|
+
for (; q && q.z >= s0; ) {
|
|
3344
|
+
if (q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, Y, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0) return !1;
|
|
3345
|
+
q = q.prevZ;
|
|
3220
3346
|
}
|
|
3221
|
-
for (;
|
|
3222
|
-
if (
|
|
3223
|
-
|
|
3347
|
+
for (; D && D.z <= a0; ) {
|
|
3348
|
+
if (D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, Y, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0) return !1;
|
|
3349
|
+
D = D.nextZ;
|
|
3224
3350
|
}
|
|
3225
3351
|
return !0;
|
|
3226
3352
|
}
|
|
3227
3353
|
function s(g, x, p) {
|
|
3228
3354
|
var v = g;
|
|
3229
3355
|
do {
|
|
3230
|
-
var w = v.prev,
|
|
3231
|
-
!
|
|
3356
|
+
var w = v.prev, b = v.next.next;
|
|
3357
|
+
!S(w, b) && T(w, v, v.next, b) && H(w, b) && H(b, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(b.i / p | 0), nt(v), nt(v.next), v = g = b), v = v.next;
|
|
3232
3358
|
} while (v !== g);
|
|
3233
3359
|
return t(v);
|
|
3234
3360
|
}
|
|
3235
|
-
function r(g, x, p, v, w,
|
|
3236
|
-
var
|
|
3361
|
+
function r(g, x, p, v, w, b) {
|
|
3362
|
+
var A = g;
|
|
3237
3363
|
do {
|
|
3238
|
-
for (var
|
|
3239
|
-
if (
|
|
3240
|
-
var F =
|
|
3241
|
-
|
|
3364
|
+
for (var P = A.next.next; P !== A.prev; ) {
|
|
3365
|
+
if (A.i !== P.i && L(A, P)) {
|
|
3366
|
+
var F = tt(A, P);
|
|
3367
|
+
A = t(A, A.next), F = t(F, F.next), o(A, x, p, v, w, b, 0), o(F, x, p, v, w, b, 0);
|
|
3242
3368
|
return;
|
|
3243
3369
|
}
|
|
3244
|
-
|
|
3370
|
+
P = P.next;
|
|
3245
3371
|
}
|
|
3246
|
-
|
|
3247
|
-
} while (
|
|
3372
|
+
A = A.next;
|
|
3373
|
+
} while (A !== g);
|
|
3248
3374
|
}
|
|
3249
3375
|
function h(g, x, p, v) {
|
|
3250
|
-
var w = [],
|
|
3251
|
-
for (
|
|
3252
|
-
|
|
3253
|
-
for (w.sort(c),
|
|
3254
|
-
p = f(w[
|
|
3376
|
+
var w = [], b, A, P, F, _;
|
|
3377
|
+
for (b = 0, A = x.length; b < A; b++)
|
|
3378
|
+
P = x[b] * v, F = b < A - 1 ? x[b + 1] * v : g.length, _ = e(g, P, F, v, !1), _ === _.next && (_.steiner = !0), w.push(M(_));
|
|
3379
|
+
for (w.sort(c), b = 0; b < w.length; b++)
|
|
3380
|
+
p = f(w[b], p);
|
|
3255
3381
|
return p;
|
|
3256
3382
|
}
|
|
3257
3383
|
function c(g, x) {
|
|
@@ -3261,29 +3387,29 @@ function cn() {
|
|
|
3261
3387
|
var p = d(g, x);
|
|
3262
3388
|
if (!p)
|
|
3263
3389
|
return x;
|
|
3264
|
-
var v =
|
|
3390
|
+
var v = tt(p, g);
|
|
3265
3391
|
return t(v, v.next), t(p, p.next);
|
|
3266
3392
|
}
|
|
3267
3393
|
function d(g, x) {
|
|
3268
|
-
var p = x, v = g.x, w = g.y,
|
|
3394
|
+
var p = x, v = g.x, w = g.y, b = -1 / 0, A;
|
|
3269
3395
|
do {
|
|
3270
3396
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3271
|
-
var
|
|
3272
|
-
if (
|
|
3273
|
-
return
|
|
3397
|
+
var P = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3398
|
+
if (P <= v && P > b && (b = P, A = p.x < p.next.x ? p : p.next, P === v))
|
|
3399
|
+
return A;
|
|
3274
3400
|
}
|
|
3275
3401
|
p = p.next;
|
|
3276
3402
|
} while (p !== x);
|
|
3277
|
-
if (!
|
|
3278
|
-
var F =
|
|
3279
|
-
p =
|
|
3403
|
+
if (!A) return null;
|
|
3404
|
+
var F = A, _ = A.x, Y = A.y, z = 1 / 0, B;
|
|
3405
|
+
p = A;
|
|
3280
3406
|
do
|
|
3281
|
-
v >= p.x && p.x >=
|
|
3407
|
+
v >= p.x && p.x >= _ && v !== p.x && E(w < Y ? v : b, w, _, Y, w < Y ? b : v, w, p.x, p.y) && (B = Math.abs(w - p.y) / (v - p.x), H(p, g) && (B < z || B === z && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, z = B)), p = p.next;
|
|
3282
3408
|
while (p !== F);
|
|
3283
|
-
return
|
|
3409
|
+
return A;
|
|
3284
3410
|
}
|
|
3285
3411
|
function l(g, x) {
|
|
3286
|
-
return
|
|
3412
|
+
return C(g.prev, g, x.prev) < 0 && C(x.next, g, g.next) < 0;
|
|
3287
3413
|
}
|
|
3288
3414
|
function u(g, x, p, v) {
|
|
3289
3415
|
var w = g;
|
|
@@ -3293,17 +3419,17 @@ function cn() {
|
|
|
3293
3419
|
w.prevZ.nextZ = null, w.prevZ = null, m(w);
|
|
3294
3420
|
}
|
|
3295
3421
|
function m(g) {
|
|
3296
|
-
var x, p, v, w,
|
|
3422
|
+
var x, p, v, w, b, A, P, F, _ = 1;
|
|
3297
3423
|
do {
|
|
3298
|
-
for (p = g, g = null,
|
|
3299
|
-
for (
|
|
3424
|
+
for (p = g, g = null, b = null, A = 0; p; ) {
|
|
3425
|
+
for (A++, v = p, P = 0, x = 0; x < _ && (P++, v = v.nextZ, !!v); x++)
|
|
3300
3426
|
;
|
|
3301
|
-
for (F =
|
|
3302
|
-
|
|
3427
|
+
for (F = _; P > 0 || F > 0 && v; )
|
|
3428
|
+
P !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, P--) : (w = v, v = v.nextZ, F--), b ? b.nextZ = w : g = w, w.prevZ = b, b = w;
|
|
3303
3429
|
p = v;
|
|
3304
3430
|
}
|
|
3305
|
-
|
|
3306
|
-
} while (
|
|
3431
|
+
b.nextZ = null, _ *= 2;
|
|
3432
|
+
} while (A > 1);
|
|
3307
3433
|
return g;
|
|
3308
3434
|
}
|
|
3309
3435
|
function y(g, x, p, v, w) {
|
|
@@ -3316,99 +3442,99 @@ function cn() {
|
|
|
3316
3442
|
while (x !== g);
|
|
3317
3443
|
return p;
|
|
3318
3444
|
}
|
|
3319
|
-
function
|
|
3320
|
-
return (w -
|
|
3445
|
+
function E(g, x, p, v, w, b, A, P) {
|
|
3446
|
+
return (w - A) * (x - P) >= (g - A) * (b - P) && (g - A) * (v - P) >= (p - A) * (x - P) && (p - A) * (b - P) >= (w - A) * (v - P);
|
|
3321
3447
|
}
|
|
3322
|
-
function
|
|
3448
|
+
function L(g, x) {
|
|
3323
3449
|
return g.next.i !== x.i && g.prev.i !== x.i && !G(g, x) && // dones't intersect other edges
|
|
3324
|
-
(
|
|
3325
|
-
(
|
|
3326
|
-
|
|
3450
|
+
(H(g, x) && H(x, g) && $(g, x) && // locally visible
|
|
3451
|
+
(C(g.prev, g, x.prev) || C(g, x.prev, x)) || // does not create opposite-facing sectors
|
|
3452
|
+
S(g, x) && C(g.prev, g, g.next) > 0 && C(x.prev, x, x.next) > 0);
|
|
3327
3453
|
}
|
|
3328
|
-
function
|
|
3454
|
+
function C(g, x, p) {
|
|
3329
3455
|
return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
|
|
3330
3456
|
}
|
|
3331
|
-
function
|
|
3457
|
+
function S(g, x) {
|
|
3332
3458
|
return g.x === x.x && g.y === x.y;
|
|
3333
3459
|
}
|
|
3334
|
-
function
|
|
3335
|
-
var w =
|
|
3336
|
-
return !!(w !==
|
|
3460
|
+
function T(g, x, p, v) {
|
|
3461
|
+
var w = N(C(g, x, p)), b = N(C(g, x, v)), A = N(C(p, v, g)), P = N(C(p, v, x));
|
|
3462
|
+
return !!(w !== b && A !== P || w === 0 && I(g, p, x) || b === 0 && I(g, v, x) || A === 0 && I(p, g, v) || P === 0 && I(p, x, v));
|
|
3337
3463
|
}
|
|
3338
|
-
function
|
|
3464
|
+
function I(g, x, p) {
|
|
3339
3465
|
return x.x <= Math.max(g.x, p.x) && x.x >= Math.min(g.x, p.x) && x.y <= Math.max(g.y, p.y) && x.y >= Math.min(g.y, p.y);
|
|
3340
3466
|
}
|
|
3341
|
-
function
|
|
3467
|
+
function N(g) {
|
|
3342
3468
|
return g > 0 ? 1 : g < 0 ? -1 : 0;
|
|
3343
3469
|
}
|
|
3344
3470
|
function G(g, x) {
|
|
3345
3471
|
var p = g;
|
|
3346
3472
|
do {
|
|
3347
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i &&
|
|
3473
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && T(p, p.next, g, x)) return !0;
|
|
3348
3474
|
p = p.next;
|
|
3349
3475
|
} while (p !== g);
|
|
3350
3476
|
return !1;
|
|
3351
3477
|
}
|
|
3352
|
-
function z(g, x) {
|
|
3353
|
-
return P(g.prev, g, g.next) < 0 ? P(g, x, g.next) >= 0 && P(g, g.prev, x) >= 0 : P(g, x, g.prev) < 0 || P(g, g.next, x) < 0;
|
|
3354
|
-
}
|
|
3355
3478
|
function H(g, x) {
|
|
3356
|
-
|
|
3479
|
+
return C(g.prev, g, g.next) < 0 ? C(g, x, g.next) >= 0 && C(g, g.prev, x) >= 0 : C(g, x, g.prev) < 0 || C(g, g.next, x) < 0;
|
|
3480
|
+
}
|
|
3481
|
+
function $(g, x) {
|
|
3482
|
+
var p = g, v = !1, w = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
|
|
3357
3483
|
do
|
|
3358
|
-
p.y >
|
|
3484
|
+
p.y > b != p.next.y > b && p.next.y !== p.y && w < (p.next.x - p.x) * (b - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
|
|
3359
3485
|
while (p !== g);
|
|
3360
3486
|
return v;
|
|
3361
3487
|
}
|
|
3362
|
-
function
|
|
3363
|
-
var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next,
|
|
3364
|
-
return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v,
|
|
3488
|
+
function tt(g, x) {
|
|
3489
|
+
var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, b = x.prev;
|
|
3490
|
+
return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, b.next = v, v.prev = b, v;
|
|
3365
3491
|
}
|
|
3366
|
-
function
|
|
3492
|
+
function et(g, x, p, v) {
|
|
3367
3493
|
var w = new K(g, x, p);
|
|
3368
3494
|
return v ? (w.next = v.next, w.prev = v, v.next.prev = w, v.next = w) : (w.prev = w, w.next = w), w;
|
|
3369
3495
|
}
|
|
3370
|
-
function
|
|
3496
|
+
function nt(g) {
|
|
3371
3497
|
g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
|
|
3372
3498
|
}
|
|
3373
3499
|
function K(g, x, p) {
|
|
3374
3500
|
this.i = g, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
3375
3501
|
}
|
|
3376
3502
|
n.deviation = function(g, x, p, v) {
|
|
3377
|
-
var w = x && x.length,
|
|
3503
|
+
var w = x && x.length, b = w ? x[0] * p : g.length, A = Math.abs(Rt(g, 0, b, p));
|
|
3378
3504
|
if (w)
|
|
3379
|
-
for (var
|
|
3380
|
-
var
|
|
3381
|
-
|
|
3505
|
+
for (var P = 0, F = x.length; P < F; P++) {
|
|
3506
|
+
var _ = x[P] * p, Y = P < F - 1 ? x[P + 1] * p : g.length;
|
|
3507
|
+
A -= Math.abs(Rt(g, _, Y, p));
|
|
3382
3508
|
}
|
|
3383
|
-
var
|
|
3384
|
-
for (
|
|
3385
|
-
var
|
|
3386
|
-
|
|
3387
|
-
(g[
|
|
3509
|
+
var z = 0;
|
|
3510
|
+
for (P = 0; P < v.length; P += 3) {
|
|
3511
|
+
var B = v[P] * p, Z = v[P + 1] * p, j = v[P + 2] * p;
|
|
3512
|
+
z += Math.abs(
|
|
3513
|
+
(g[B] - g[j]) * (g[Z + 1] - g[B + 1]) - (g[B] - g[Z]) * (g[j + 1] - g[B + 1])
|
|
3388
3514
|
);
|
|
3389
3515
|
}
|
|
3390
|
-
return
|
|
3516
|
+
return A === 0 && z === 0 ? 0 : Math.abs((z - A) / A);
|
|
3391
3517
|
};
|
|
3392
|
-
function
|
|
3393
|
-
for (var w = 0,
|
|
3394
|
-
w += (g[
|
|
3518
|
+
function Rt(g, x, p, v) {
|
|
3519
|
+
for (var w = 0, b = x, A = p - v; b < p; b += v)
|
|
3520
|
+
w += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
|
|
3395
3521
|
return w;
|
|
3396
3522
|
}
|
|
3397
3523
|
return n.flatten = function(g) {
|
|
3398
3524
|
for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, v = 0, w = 0; w < g.length; w++) {
|
|
3399
|
-
for (var
|
|
3400
|
-
for (var
|
|
3525
|
+
for (var b = 0; b < g[w].length; b++)
|
|
3526
|
+
for (var A = 0; A < x; A++) p.vertices.push(g[w][b][A]);
|
|
3401
3527
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3402
3528
|
}
|
|
3403
3529
|
return p;
|
|
3404
|
-
},
|
|
3530
|
+
}, _t.exports;
|
|
3405
3531
|
}
|
|
3406
|
-
|
|
3407
|
-
function
|
|
3532
|
+
dn();
|
|
3533
|
+
function Y0(n, e) {
|
|
3408
3534
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3409
3535
|
}
|
|
3410
|
-
function
|
|
3411
|
-
return n.length === 1 && (n =
|
|
3536
|
+
function xn(n) {
|
|
3537
|
+
return n.length === 1 && (n = yn(n)), {
|
|
3412
3538
|
left: function(e, t, o, i) {
|
|
3413
3539
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3414
3540
|
var a = o + i >>> 1;
|
|
@@ -3425,20 +3551,20 @@ function un(n) {
|
|
|
3425
3551
|
}
|
|
3426
3552
|
};
|
|
3427
3553
|
}
|
|
3428
|
-
function
|
|
3554
|
+
function yn(n) {
|
|
3429
3555
|
return function(e, t) {
|
|
3430
|
-
return
|
|
3556
|
+
return Y0(n(e), t);
|
|
3431
3557
|
};
|
|
3432
3558
|
}
|
|
3433
|
-
|
|
3434
|
-
function
|
|
3435
|
-
const o =
|
|
3559
|
+
xn(Y0);
|
|
3560
|
+
function zn(n, e, t = 3) {
|
|
3561
|
+
const o = gn(n, e, { maxSegmentLength: t });
|
|
3436
3562
|
return {
|
|
3437
3563
|
check: (i) => typeof i == "string",
|
|
3438
3564
|
interpolate: (i, a, s) => o(s)
|
|
3439
3565
|
};
|
|
3440
3566
|
}
|
|
3441
|
-
function
|
|
3567
|
+
function jn(n) {
|
|
3442
3568
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3443
3569
|
return {
|
|
3444
3570
|
scaleX: e,
|
|
@@ -3449,7 +3575,7 @@ function Nn(n) {
|
|
|
3449
3575
|
})
|
|
3450
3576
|
};
|
|
3451
3577
|
}
|
|
3452
|
-
function
|
|
3578
|
+
function Hn(n) {
|
|
3453
3579
|
const e = [];
|
|
3454
3580
|
if (n.isAllKey) {
|
|
3455
3581
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3461,49 +3587,49 @@ function Bn(n) {
|
|
|
3461
3587
|
}), n.isEndKey && e[e.length - 1] !== n.animations.length && e.push(n.animations.length), e;
|
|
3462
3588
|
}
|
|
3463
3589
|
export {
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3590
|
+
xt as Alignment,
|
|
3591
|
+
ot as Anchor,
|
|
3592
|
+
r0 as Animate,
|
|
3593
|
+
Tn as Arrow,
|
|
3594
|
+
Rn as BrowserCanvasRenderer,
|
|
3595
|
+
Cn as Circle,
|
|
3596
|
+
W as Color,
|
|
3597
|
+
n0 as Easing,
|
|
3598
|
+
wn as FadeIn,
|
|
3599
|
+
mn as FadeOut,
|
|
3600
|
+
we as FontStyle,
|
|
3601
|
+
be as FontWeight,
|
|
3602
|
+
Pn as Grid,
|
|
3603
|
+
h0 as Group,
|
|
3604
|
+
bn as Hide,
|
|
3605
|
+
Mn as IFrame,
|
|
3606
|
+
En as Image,
|
|
3607
|
+
Sn as Line,
|
|
3608
|
+
kn as Mask,
|
|
3483
3609
|
U as ObjectType,
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3610
|
+
Dn as Opaque,
|
|
3611
|
+
In as Path,
|
|
3612
|
+
Nn as Pause,
|
|
3613
|
+
_n as Polygon,
|
|
3488
3614
|
X as Position,
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3615
|
+
Ie as Presentation,
|
|
3616
|
+
On as Rectangle,
|
|
3617
|
+
Fn as SVG,
|
|
3618
|
+
Ln as ScreenCapture,
|
|
3619
|
+
An as Show,
|
|
3620
|
+
at as Size,
|
|
3621
|
+
Bn as Slide,
|
|
3622
|
+
lt as SlideObject,
|
|
3623
|
+
_0 as SlideWebExtra,
|
|
3624
|
+
Te as Text,
|
|
3625
|
+
qn as TextUnit,
|
|
3626
|
+
ve as Transparent,
|
|
3627
|
+
I0 as Update,
|
|
3628
|
+
Hn as getKeySlideBuildIndices,
|
|
3629
|
+
jn as getSizingFunctions,
|
|
3630
|
+
zn as getSmoothPathInterpolator,
|
|
3631
|
+
Le as getTextContentLength,
|
|
3632
|
+
Re as interpolateColor,
|
|
3633
|
+
Be as interpolateNumber
|
|
3508
3634
|
};
|
|
3509
3635
|
//# sourceMappingURL=presenter.mjs.map
|