presenter 0.8.6 → 0.8.8

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.
@@ -1,6 +1,6 @@
1
- var ie = Object.defineProperty;
2
- var oe = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var I = (n, e, t) => oe(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var he = Object.defineProperty;
2
+ var le = (n, e, t) => e in n ? he(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var k = (n, e, t) => le(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  const ft = {
5
5
  /** Represents an animated change in an object's properties. */
6
6
  ANIMATE: "Animate",
@@ -9,52 +9,52 @@ const ft = {
9
9
  /** Represents an immediate update to an object's properties without animation. */
10
10
  UPDATE: "Update"
11
11
  };
12
- function se(n) {
12
+ function ce(n) {
13
13
  return n * n * n;
14
14
  }
15
- function ae(n) {
15
+ function ue(n) {
16
16
  return --n * n * n + 1;
17
17
  }
18
- function he(n) {
18
+ function fe(n) {
19
19
  return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
20
20
  }
21
- var i0 = 1.70158;
21
+ var o0 = 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
- })(i0);
28
+ })(o0);
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
- })(i0);
36
- var le = (function n(e) {
35
+ })(o0);
36
+ var ge = (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
- })(i0);
43
- const o0 = {
42
+ })(o0);
43
+ const s0 = {
44
44
  LINEAR: (n) => n,
45
- CUBIC: he,
46
- CUBIC_IN: se,
47
- CUBIC_OUT: ae,
48
- BACK_IN_OUT: le.overshoot(0.8)
49
- }, ce = o0.LINEAR;
50
- function s0(n, e, t = {}) {
45
+ CUBIC: fe,
46
+ CUBIC_IN: ce,
47
+ CUBIC_OUT: ue,
48
+ BACK_IN_OUT: ge.overshoot(0.8)
49
+ }, de = s0.LINEAR;
50
+ function a0(n, e, t = {}) {
51
51
  return {
52
52
  type: ft.ANIMATE,
53
53
  object: n,
54
54
  props: e,
55
55
  delay: 0,
56
56
  duration: 1e3,
57
- easing: ce,
57
+ easing: de,
58
58
  block: !1,
59
59
  interpolators: null,
60
60
  isKey: !1,
@@ -62,21 +62,21 @@ function s0(n, e, t = {}) {
62
62
  ...typeof t == "number" ? { duration: t } : t
63
63
  };
64
64
  }
65
- function Nn(n, e = {}) {
66
- return s0(n, { opacity: 1 }, {
65
+ function qn(n, e = {}) {
66
+ return a0(n, { opacity: 1 }, {
67
67
  duration: 500,
68
- easing: o0.CUBIC,
68
+ easing: s0.CUBIC,
69
69
  ...typeof e == "number" ? { duration: e } : e
70
70
  });
71
71
  }
72
- function Rn(n, e = {}) {
73
- return s0(n, { opacity: 0 }, {
72
+ function zn(n, e = {}) {
73
+ return a0(n, { opacity: 0 }, {
74
74
  duration: 500,
75
- easing: o0.CUBIC,
75
+ easing: s0.CUBIC,
76
76
  ...typeof e == "number" ? { duration: e } : e
77
77
  });
78
78
  }
79
- function D0(n, e, t = {}) {
79
+ function j0(n, e, t = {}) {
80
80
  return {
81
81
  type: ft.UPDATE,
82
82
  isKey: !1,
@@ -86,11 +86,11 @@ function D0(n, e, t = {}) {
86
86
  ...t
87
87
  };
88
88
  }
89
- function Fn(n) {
90
- return D0(n, { opacity: 0 });
89
+ function Hn(n) {
90
+ return j0(n, { opacity: 0 });
91
91
  }
92
- function Bn(n) {
93
- return D0(n, { opacity: 1 });
92
+ function jn(n) {
93
+ return j0(n, { opacity: 1 });
94
94
  }
95
95
  const ot = {
96
96
  TOP_LEFT: "TopLeft",
@@ -139,7 +139,7 @@ G.RED = G(255, 0, 0);
139
139
  G.TRANSPARENT = G(0, 0, 0, 0);
140
140
  G.WHITE = G(255, 255, 255);
141
141
  const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
142
- function q0(n = null) {
142
+ function U0(n = null) {
143
143
  return {
144
144
  content: null,
145
145
  setup: null,
@@ -151,14 +151,14 @@ function q0(n = null) {
151
151
  ...n
152
152
  };
153
153
  }
154
- function z0(n, e = null) {
154
+ function $0(n, e = null) {
155
155
  return n.alpha * (e ?? 1);
156
156
  }
157
- function St(n, e = null) {
158
- const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(z0(n, e) * 255);
157
+ function It(n, e = null) {
158
+ const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round($0(n, e) * 255);
159
159
  return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
160
160
  }
161
- function Dn(n = null) {
161
+ function Un(n = null) {
162
162
  const {
163
163
  url: e = "https://wikipedia.org/",
164
164
  backgroundColor: t = G.TRANSPARENT,
@@ -170,28 +170,28 @@ function Dn(n = null) {
170
170
  height: h = 1e3,
171
171
  width: c = 1e3,
172
172
  x: u = 0,
173
- y: p = 0
173
+ y: d = 0
174
174
  } = n || {}, l = document.createElement("iframe");
175
- l.src = e, l.style.backgroundColor = St(t), l.style.border = i > 0 ? `${i}px solid ${St(o)}` : "none", l.style.pointerEvents = a;
175
+ l.src = e, l.style.backgroundColor = It(t), l.style.border = i > 0 ? `${i}px solid ${It(o)}` : "none", l.style.pointerEvents = a;
176
176
  const f = (100 / s).toFixed(3) + "%";
177
- return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", q0({
177
+ return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", U0({
178
178
  content: l,
179
179
  anchor: r,
180
180
  height: h,
181
181
  width: c,
182
182
  x: u,
183
- y: p
183
+ y: d
184
184
  });
185
185
  }
186
186
  const xt = {
187
187
  LEFT: "left",
188
188
  CENTER: "center",
189
189
  RIGHT: "right"
190
- }, ue = xt.LEFT;
190
+ }, pe = xt.LEFT;
191
191
  function st(n, e) {
192
192
  throw new Error("Unexpected value: " + n);
193
193
  }
194
- function qn(n = null) {
194
+ function $n(n = null) {
195
195
  const {
196
196
  alignment: e = xt.LEFT,
197
197
  scale: t = 1,
@@ -217,13 +217,13 @@ function qn(n = null) {
217
217
  st(e);
218
218
  }
219
219
  c.appendChild(u);
220
- const p = {
220
+ const d = {
221
221
  video: {
222
222
  displaySurface: "window"
223
223
  },
224
224
  audio: !1
225
225
  };
226
- return navigator.mediaDevices.getDisplayMedia(p).then((l) => {
226
+ return navigator.mediaDevices.getDisplayMedia(d).then((l) => {
227
227
  const f = l.getVideoTracks()[0];
228
228
  f !== void 0 && (f.onended = function() {
229
229
  u.style.display = "none";
@@ -234,7 +234,7 @@ function qn(n = null) {
234
234
  u.srcObject.getTracks().forEach((f) => f.stop()), u.style.display = "none", u.srcObject = null;
235
235
  };
236
236
  }
237
- return q0({
237
+ return U0({
238
238
  content: null,
239
239
  setup: h,
240
240
  anchor: o,
@@ -244,7 +244,7 @@ function qn(n = null) {
244
244
  y: r
245
245
  });
246
246
  }
247
- const U = {
247
+ const $ = {
248
248
  ARROW: "Arrow",
249
249
  CIRCLE: "Circle",
250
250
  GROUP: "Group",
@@ -260,15 +260,15 @@ const U = {
260
260
  };
261
261
  function lt(n) {
262
262
  return {
263
- objectType: U.SLIDE_OBJECT,
263
+ objectType: $.SLIDE_OBJECT,
264
264
  opacity: 1,
265
265
  ...n
266
266
  };
267
267
  }
268
- function zn(n = null) {
268
+ function Wn(n = null) {
269
269
  const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
270
270
  return lt({
271
- objectType: U.ARROW,
271
+ objectType: $.ARROW,
272
272
  arrowheadSize: i,
273
273
  color: Q,
274
274
  drawn: 1,
@@ -283,24 +283,24 @@ function zn(n = null) {
283
283
  ...o
284
284
  });
285
285
  }
286
- const fe = 50;
287
- function jn(n = null) {
286
+ const xe = 50;
287
+ function Yn(n = null) {
288
288
  return lt({
289
- objectType: U.CIRCLE,
289
+ objectType: $.CIRCLE,
290
290
  anchor: ht,
291
291
  strokeColor: Q,
292
292
  strokeWidth: 0,
293
293
  drawn: 1,
294
294
  fillColor: Q,
295
- radius: fe,
295
+ radius: xe,
296
296
  x: 0,
297
297
  y: 0,
298
298
  ...n
299
299
  });
300
300
  }
301
- function g0(n, e = null) {
301
+ function x0(n, e = null) {
302
302
  return lt({
303
- objectType: U.GROUP,
303
+ objectType: $.GROUP,
304
304
  anchor: ht,
305
305
  height: 0,
306
306
  objects: n,
@@ -323,7 +323,7 @@ function g0(n, e = null) {
323
323
  ...e
324
324
  });
325
325
  }
326
- function Hn(n) {
326
+ function Xn(n) {
327
327
  const {
328
328
  anchor: e = ht,
329
329
  cols: t = 1,
@@ -335,26 +335,26 @@ function Hn(n) {
335
335
  height: h = 0,
336
336
  x: c = 0,
337
337
  y: u = 0,
338
- objects: p = () => null
338
+ objects: d = () => null
339
339
  } = n, l = [], f = [];
340
340
  let v = 0, y = 0;
341
- for (let P = 0; P < o; P++) {
342
- const E = [];
341
+ for (let T = 0; T < o; T++) {
342
+ const S = [];
343
343
  v = 0;
344
- let L = 0;
345
- for (let S = 0; S < t; S++) {
346
- const T = p(P, S), k = typeof r == "function" ? r(P, S) : r, F = typeof h == "function" ? h(P, S) : h;
347
- E.push(T), T != null && f.push(
348
- g0([T], {
344
+ let P = 0;
345
+ for (let E = 0; E < t; E++) {
346
+ const L = d(T, E), I = typeof r == "function" ? r(T, E) : r, F = typeof h == "function" ? h(T, E) : h;
347
+ S.push(L), L != null && f.push(
348
+ x0([L], {
349
349
  x: v,
350
350
  y
351
351
  })
352
- ), v += k + i, L = Math.max(L, F);
352
+ ), v += I + i, P = Math.max(P, F);
353
353
  }
354
- l.push(E), y += L + a;
354
+ l.push(S), y += P + a;
355
355
  }
356
356
  return {
357
- grid: g0(f, {
357
+ grid: x0(f, {
358
358
  x: c,
359
359
  y: u,
360
360
  height: y - a,
@@ -365,9 +365,9 @@ function Hn(n) {
365
365
  objects: l
366
366
  };
367
367
  }
368
- function Un(n = null) {
368
+ function Gn(n = null) {
369
369
  return lt({
370
- objectType: U.IMAGE,
370
+ objectType: $.IMAGE,
371
371
  anchor: ht,
372
372
  cornerRadius: 0,
373
373
  height: 100,
@@ -379,9 +379,9 @@ function Un(n = null) {
379
379
  ...n
380
380
  });
381
381
  }
382
- function $n(n = null) {
382
+ function Kn(n = null) {
383
383
  return lt({
384
- objectType: U.LINE,
384
+ objectType: $.LINE,
385
385
  color: Q,
386
386
  drawn: 1,
387
387
  endX: 100,
@@ -394,9 +394,9 @@ function $n(n = null) {
394
394
  ...n
395
395
  });
396
396
  }
397
- function Yn(n, e = null) {
397
+ function Vn(n, e = null) {
398
398
  return lt({
399
- objectType: U.MASK,
399
+ objectType: $.MASK,
400
400
  anchor: ht,
401
401
  height: 100,
402
402
  objects: n,
@@ -407,70 +407,70 @@ function Yn(n, e = null) {
407
407
  ...e
408
408
  });
409
409
  }
410
- var ge = Object.defineProperty, O = (n, e) => ge(n, "name", { value: e, configurable: !0 }), Pt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, pe = /([astvzqmhlc])([^astvzqmhlc]*)/gi, de = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, xe = O((n) => {
411
- const e = (n && n.length > 0 ? n : "M0,0").match(pe);
410
+ var ye = Object.defineProperty, O = (n, e) => ye(n, "name", { value: e, configurable: !0 }), St = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, ve = /([astvzqmhlc])([^astvzqmhlc]*)/gi, we = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, me = O((n) => {
411
+ const e = (n && n.length > 0 ? n : "M0,0").match(ve);
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 = ye(o.substring(1));
414
+ let i = o.charAt(0), a = i.toLowerCase(), s = be(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 === Pt[a]) {
421
- t.push([i, ...s.splice(0, Pt[a])]);
420
+ if (s.length === St[a]) {
421
+ t.push([i, ...s.splice(0, St[a])]);
422
422
  break;
423
423
  }
424
- if (s.length < Pt[a]) throw new Error(`Malformed path data: "${i}" must have ${Pt[a]} elements and has ${s.length}: ${o}`);
425
- t.push([i, ...s.splice(0, Pt[a])]);
424
+ if (s.length < St[a]) throw new Error(`Malformed path data: "${i}" must have ${St[a]} elements and has ${s.length}: ${o}`);
425
+ t.push([i, ...s.splice(0, St[a])]);
426
426
  }
427
427
  return t;
428
428
  }, []);
429
- }, "default"), ye = O((n) => {
430
- const e = n.match(de);
429
+ }, "default"), be = O((n) => {
430
+ const e = n.match(we);
431
431
  return e ? e.map(Number) : [];
432
- }, "parseValues"), mt, J = (mt = class {
432
+ }, "parseValues"), bt, J = (bt = class {
433
433
  constructor(e, t, o, i) {
434
- I(this, "x0");
435
- I(this, "x1");
436
- I(this, "y0");
437
- I(this, "y1");
438
- I(this, "getTotalLength", O(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
439
- I(this, "getPointAtLength", O((e) => {
434
+ k(this, "x0");
435
+ k(this, "x1");
436
+ k(this, "y0");
437
+ k(this, "y1");
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
- I(this, "getTangentAtLength", O((e) => {
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
- I(this, "getPropertiesAtLength", O((e) => {
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
- }, O(mt, "LinearPosition"), mt), bt, p0 = (bt = class {
455
+ }, O(bt, "LinearPosition"), bt), At, y0 = (At = class {
456
456
  constructor(e, t, o, i, a, s, r, h, c) {
457
- I(this, "x0");
458
- I(this, "y0");
459
- I(this, "rx");
460
- I(this, "ry");
461
- I(this, "xAxisRotate");
462
- I(this, "LargeArcFlag");
463
- I(this, "SweepFlag");
464
- I(this, "x1");
465
- I(this, "y1");
466
- I(this, "length");
467
- I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
468
- I(this, "getPointAtLength", O((e) => {
457
+ k(this, "x0");
458
+ k(this, "y0");
459
+ k(this, "rx");
460
+ k(this, "ry");
461
+ k(this, "xAxisRotate");
462
+ k(this, "LargeArcFlag");
463
+ k(this, "SweepFlag");
464
+ k(this, "x1");
465
+ k(this, "y1");
466
+ k(this, "length");
467
+ k(this, "getTotalLength", 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 = d0({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
470
+ const t = v0({ 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
- I(this, "getTangentAtLength", O((e) => {
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 ge = Object.defineProperty, O = (n, e) => ge(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
- I(this, "getPropertiesAtLength", O((e) => {
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 u = ve(300, function(p) {
487
- return d0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, p);
486
+ const u = Ae(300, function(d) {
487
+ return v0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
488
488
  });
489
489
  this.length = u.arcLength;
490
490
  }
491
- }, O(bt, "Arc"), bt), d0 = O((n, e, t, o, i, a, s, r) => {
492
- e = Math.abs(e), t = Math.abs(t), o = we(o, 360);
493
- const h = me(o);
491
+ }, O(At, "Arc"), At), v0 = O((n, e, t, o, i, a, s, r) => {
492
+ e = Math.abs(e), t = Math.abs(t), o = Me(o, 360);
493
+ const h = Le(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
- const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, p = { x: Math.cos(h) * c + Math.sin(h) * u, y: -Math.sin(h) * c + Math.cos(h) * u }, l = Math.pow(p.x, 2) / Math.pow(e, 2) + Math.pow(p.y, 2) / Math.pow(t, 2);
496
+ const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * u, y: -Math.sin(h) * c + Math.cos(h) * u }, 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
- let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(p.y, 2) - Math.pow(t, 2) * Math.pow(p.x, 2)) / (Math.pow(e, 2) * Math.pow(p.y, 2) + Math.pow(t, 2) * Math.pow(p.x, 2));
498
+ let f = (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
  f = f < 0 ? 0 : f;
500
- const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * p.y / t), M = v * (-t * p.x / e), P = { 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 }, E = { x: (p.x - y) / e, y: (p.y - M) / t }, L = y0({ x: 1, y: 0 }, E);
501
- let S = y0(E, { x: (-p.x - y) / e, y: (-p.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 = L + S * r, k = e * Math.cos(T), F = t * Math.sin(T);
504
- return { x: Math.cos(h) * k - Math.sin(h) * F + P.x, y: Math.sin(h) * k + Math.cos(h) * F + P.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + S, ellipticalArcAngle: T, ellipticalArcCenter: P, resultantRx: e, resultantRy: t };
505
- }, "pointOnEllipticalArc"), ve = O((n, e) => {
500
+ const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * d.y / t), M = v * (-t * d.x / e), T = { 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 }, S = { x: (d.x - y) / e, y: (d.y - M) / t }, P = m0({ x: 1, y: 0 }, S);
501
+ let E = m0(S, { x: (-d.x - y) / e, y: (-d.y - M) / t });
502
+ !a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
503
+ const L = P + E * r, I = e * Math.cos(L), F = t * Math.sin(L);
504
+ return { x: Math.cos(h) * I - Math.sin(h) * F + T.x, y: Math.sin(h) * I + Math.cos(h) * F + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: L, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
505
+ }, "pointOnEllipticalArc"), Ae = 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 = be(r * (1 / n), 0, 1);
512
- a = e(h), t += x0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
511
+ const h = Te(r * (1 / n), 0, 1);
512
+ a = e(h), t += w0(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 += x0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
- }, "approximateArcLengthOfCurve"), we = O((n, e) => (n % e + e) % e, "mod"), me = O((n) => n * (Math.PI / 180), "toRadians"), x0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), be = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), y0 = O((n, e) => {
514
+ return a = e(1), i.push([s, a]), t += w0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
+ }, "approximateArcLengthOfCurve"), Me = O((n, e) => (n % e + e) % e, "mod"), Le = O((n) => n * (Math.PI / 180), "toRadians"), w0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), Te = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), m0 = 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"), Ae = [[], [], [-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]], Me = [[], [], [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]], Le = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], Te = 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"), Ce = O((n, e, t) => j0([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) => {
518
+ }, "angleBetween"), Ce = [[], [], [-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]], Pe = [[], [], [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]], Se = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], Ee = 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"), Ie = O((n, e, t) => W0([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"), ke = 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 * Ae[20][s] + a, o += Me[20][s] * H0(n, e, i);
522
+ for (let s = 0; s < 20; s++) i = a * Ce[20][s] + a, o += Pe[20][s] * Y0(n, e, i);
523
523
  return a * o;
524
- }, "getCubicArcLength"), j0 = 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"), Ee = O((n, e, t) => {
524
+ }, "getCubicArcLength"), W0 = 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"), _e = 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
- const u = h / (2 * r), p = t + u, l = c / r - u * u, f = p * p + l > 0 ? Math.sqrt(p * p + l) : 0, v = u * u + l > 0 ? Math.sqrt(u * u + l) : 0, y = u + Math.sqrt(u * u + l) !== 0 && (p + f) / (u + v) !== 0 ? l * Math.log(Math.abs((p + f) / (u + v))) : 0;
529
- return Math.sqrt(r) / 2 * (p * f - u * v + y);
530
- }, "getQuadraticArcLength"), Se = 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 H0(n, e, t) {
532
- const o = Kt(1, t, n), i = Kt(1, t, e), a = o * o + i * i;
528
+ const u = h / (2 * r), d = t + u, l = c / r - u * u, f = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, v = u * u + l > 0 ? Math.sqrt(u * u + l) : 0, y = u + Math.sqrt(u * u + l) !== 0 && (d + f) / (u + v) !== 0 ? l * Math.log(Math.abs((d + f) / (u + v))) : 0;
529
+ return Math.sqrt(r) / 2 * (d * f - u * v + y);
530
+ }, "getQuadraticArcLength"), Oe = 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 Y0(n, e, t) {
532
+ const o = Qt(1, t, n), i = Qt(1, t, e), a = o * o + i * i;
533
533
  return Math.sqrt(a);
534
534
  }
535
- O(H0, "BFunc");
536
- var Kt = O((n, e, t) => {
535
+ O(Y0, "BFunc");
536
+ var Qt = 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 += Le[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
542
+ for (let s = 0; s <= o; s++) a += Se[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 Kt(n - 1, e, i);
548
- }, "getDerivative"), Dt = O((n, e, t) => {
547
+ return Qt(n - 1, e, i);
548
+ }, "getDerivative"), qt = 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,69 +557,69 @@ var Kt = O((n, e, t) => {
557
557
  if (s++, s > 500) break;
558
558
  }
559
559
  return i;
560
- }, "t2length"), At, ct = (At = class {
560
+ }, "t2length"), Mt, ct = (Mt = class {
561
561
  constructor(e, t, o, i, a, s, r, h) {
562
- I(this, "a");
563
- I(this, "b");
564
- I(this, "c");
565
- I(this, "d");
566
- I(this, "length");
567
- I(this, "getArcLength");
568
- I(this, "getPoint");
569
- I(this, "getDerivative");
570
- I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
571
- I(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 = Dt(e, this.length, (a) => this.getArcLength(t, o, a));
562
+ k(this, "a");
563
+ k(this, "b");
564
+ k(this, "c");
565
+ k(this, "d");
566
+ k(this, "length");
567
+ k(this, "getArcLength");
568
+ k(this, "getPoint");
569
+ k(this, "getDerivative");
570
+ k(this, "getTotalLength", 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 = qt(e, this.length, (a) => this.getArcLength(t, o, a));
573
573
  return this.getPoint(t, o, i);
574
574
  }, "getPointAtLength"));
575
- I(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 = Dt(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);
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 = qt(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
- I(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 = Dt(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);
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 = qt(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
- I(this, "getC", O(() => this.c, "getC"));
588
- I(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 = Te, this.getDerivative = Ce, this.d = { x: r, y: h }) : (this.getArcLength = Ee, this.getPoint = j0, this.getDerivative = Se, 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);
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 = ke, this.getPoint = Ee, this.getDerivative = Ie, this.d = { x: r, y: h }) : (this.getArcLength = _e, this.getPoint = W0, this.getDerivative = Oe, 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
- }, O(At, "Bezier"), At), Mt, ke = (Mt = class {
591
+ }, O(Mt, "Bezier"), Mt), Lt, Ne = (Lt = class {
592
592
  constructor(e) {
593
- I(this, "length", 0);
594
- I(this, "partial_lengths", []);
595
- I(this, "functions", []);
596
- I(this, "initial_point", null);
597
- I(this, "getPartAtLength", O((e) => {
593
+ k(this, "length", 0);
594
+ k(this, "partial_lengths", []);
595
+ k(this, "functions", []);
596
+ k(this, "initial_point", null);
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
- I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
604
- I(this, "getPointAtLength", O((e) => {
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
- I(this, "getTangentAtLength", O((e) => {
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
- I(this, "getPropertiesAtLength", O((e) => {
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
- I(this, "getParts", O(() => {
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 Kt = O((n, e, t) => {
628
628
  }
629
629
  return e;
630
630
  }, "getParts"));
631
- const t = Array.isArray(e) ? e : xe(e);
631
+ const t = Array.isArray(e) ? e : me(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] });
@@ -686,37 +686,37 @@ var Kt = O((n, e, t) => {
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 p0(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]);
689
+ const h = new y0(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 p0(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]);
692
+ const h = new y0(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
- }, O(Mt, "SVGPathProperties"), Mt), Lt, Qt = (Lt = class {
698
+ }, O(Lt, "SVGPathProperties"), Lt), Tt, Jt = (Tt = class {
699
699
  constructor(e) {
700
- I(this, "inst");
701
- I(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
702
- I(this, "getPointAtLength", O((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
703
- I(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
704
- I(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
705
- I(this, "getParts", O(() => this.inst.getParts(), "getParts"));
706
- if (this.inst = new ke(e), !(this instanceof Qt)) return new Qt(e);
707
- }
708
- }, O(Lt, "_svgPathProperties"), Lt);
709
- function Ie(n = G.BLACK) {
700
+ k(this, "inst");
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 Ne(e), !(this instanceof Jt)) return new Jt(e);
707
+ }
708
+ }, O(Tt, "_svgPathProperties"), Tt);
709
+ function Re(n = G.BLACK) {
710
710
  return { ...n, alpha: 0 };
711
711
  }
712
- function Wn(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 Qt(r).getTotalLength();
712
+ function Zn(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 Jt(r).getTotalLength();
714
714
  return lt({
715
- objectType: U.PATH,
715
+ objectType: $.PATH,
716
716
  anchor: ht,
717
717
  strokeColor: Q,
718
718
  drawn: 1,
719
- fillColor: Ie(),
719
+ fillColor: Re(),
720
720
  isRounded: !1,
721
721
  height: t,
722
722
  path: r,
@@ -730,9 +730,9 @@ function Wn(n = null) {
730
730
  ...s
731
731
  });
732
732
  }
733
- function Xn(n = null) {
733
+ function Qn(n = null) {
734
734
  return lt({
735
- objectType: U.POLYGON,
735
+ objectType: $.POLYGON,
736
736
  strokeColor: Q,
737
737
  strokeWidth: 0,
738
738
  drawn: 1,
@@ -745,9 +745,9 @@ function Xn(n = null) {
745
745
  ...n
746
746
  });
747
747
  }
748
- function Gn(n = null) {
748
+ function Jn(n = null) {
749
749
  return lt({
750
- objectType: U.RECTANGLE,
750
+ objectType: $.RECTANGLE,
751
751
  anchor: ht,
752
752
  strokeColor: Q,
753
753
  strokeWidth: 0,
@@ -761,9 +761,9 @@ function Gn(n = null) {
761
761
  ...n
762
762
  });
763
763
  }
764
- function Vn(n = null) {
764
+ function tr(n = null) {
765
765
  return lt({
766
- objectType: U.SVG,
766
+ objectType: $.SVG,
767
767
  anchor: ht,
768
768
  height: 100,
769
769
  svg: "",
@@ -773,11 +773,11 @@ function Vn(n = null) {
773
773
  ...n
774
774
  });
775
775
  }
776
- const _e = {
776
+ const Fe = {
777
777
  NORMAL: "normal",
778
778
  ITALIC: "italic",
779
779
  OBLIQUE: "oblique"
780
- }, Oe = _e.NORMAL, Ne = {
780
+ }, Be = Fe.NORMAL, De = {
781
781
  THIN: 100,
782
782
  EXTRA_LIGHT: 200,
783
783
  LIGHT: 300,
@@ -787,80 +787,113 @@ const _e = {
787
787
  BOLD: 700,
788
788
  EXTRA_BOLD: 800,
789
789
  BLACK: 900
790
- }, Re = Ne.NORMAL, Fe = {
790
+ }, qe = De.NORMAL, ze = {
791
791
  color: Q,
792
792
  fontFamily: "sans-serif",
793
793
  fontSize: 100,
794
- fontStyle: Oe,
795
- fontWeight: Re,
794
+ fontStyle: Be,
795
+ fontWeight: qe,
796
796
  ligatures: !1,
797
797
  subscript: !1,
798
798
  superscript: !1
799
799
  };
800
- function U0(n) {
800
+ function X0(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 Be(n) {
804
- return U0(n).reduce(
803
+ function He(n) {
804
+ return X0(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 De(n = "", e = null) {
809
+ function je(n = "", e = null) {
810
810
  return lt({
811
- objectType: U.TEXT,
812
- alignment: ue,
811
+ objectType: $.TEXT,
812
+ alignment: pe,
813
813
  anchor: ht,
814
814
  length: null,
815
815
  lineSpacing: 1,
816
816
  text: n,
817
817
  x: 0,
818
818
  y: 0,
819
- ...Fe,
819
+ ...ze,
820
820
  ...e
821
821
  });
822
822
  }
823
- De.writeOn = (n, e = {}) => s0(
823
+ je.writeOn = (n, e = {}) => a0(
824
824
  n,
825
825
  {
826
- length: Be(n.text)
826
+ length: He(n.text)
827
827
  },
828
828
  e
829
829
  );
830
- const a0 = "presenter.navigator.open";
831
- function $0() {
830
+ const h0 = "presenter.navigator.state", mt = {
831
+ open: !1,
832
+ visibility: {
833
+ slides: !0,
834
+ current: !0,
835
+ next: !0
836
+ }
837
+ };
838
+ function l0() {
832
839
  return typeof document > "u" ? !1 : Array.from(document.scripts).some((n) => n.src.includes("/@vite/client"));
833
840
  }
834
- function qe() {
835
- var n;
836
- return $0() ? ((n = h0()) == null ? void 0 : n.getItem(a0)) === "true" : !1;
841
+ function Ue() {
842
+ return l0() ? c0().open : !1;
837
843
  }
838
- function ze() {
839
- var n;
840
- $0() && ((n = h0()) == null || n.setItem(a0, "true"));
844
+ function $e() {
845
+ K0({
846
+ ...c0(),
847
+ open: !0
848
+ });
841
849
  }
842
- function Y0() {
850
+ function G0() {
843
851
  var n;
844
- (n = h0()) == null || n.removeItem(a0);
852
+ (n = u0()) == null || n.removeItem(h0);
845
853
  }
846
- function h0() {
854
+ function c0() {
855
+ var n, e, t, o;
856
+ if (!l0())
857
+ return mt;
858
+ try {
859
+ const i = (n = u0()) == null ? void 0 : n.getItem(h0);
860
+ if (i == null)
861
+ return mt;
862
+ const a = JSON.parse(i);
863
+ return {
864
+ open: typeof a.open == "boolean" ? a.open : mt.open,
865
+ visibility: {
866
+ slides: typeof ((e = a.visibility) == null ? void 0 : e.slides) == "boolean" ? a.visibility.slides : mt.visibility.slides,
867
+ current: typeof ((t = a.visibility) == null ? void 0 : t.current) == "boolean" ? a.visibility.current : mt.visibility.current,
868
+ next: typeof ((o = a.visibility) == null ? void 0 : o.next) == "boolean" ? a.visibility.next : mt.visibility.next
869
+ }
870
+ };
871
+ } catch {
872
+ return mt;
873
+ }
874
+ }
875
+ function K0(n) {
876
+ var e;
877
+ l0() && ((e = u0()) == null || e.setItem(h0, JSON.stringify(n)));
878
+ }
879
+ function u0() {
847
880
  try {
848
881
  return window.sessionStorage;
849
882
  } catch {
850
883
  return null;
851
884
  }
852
885
  }
853
- function W0(n) {
886
+ function V0(n) {
854
887
  return n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
855
888
  }
856
- function v0(n) {
889
+ function b0(n) {
857
890
  var o, i;
858
891
  if (n === null)
859
892
  return !1;
860
893
  const e = n, t = (o = e.tagName) == null ? void 0 : o.toLowerCase();
861
894
  return t === "input" || t === "textarea" || t === "select" || t === "button" || e.isContentEditable ? !0 : (((i = e.closest) == null ? void 0 : i.call(e, "[contenteditable=''], [contenteditable='true']")) ?? null) !== null;
862
895
  }
863
- function je(n) {
896
+ function We(n) {
864
897
  var o;
865
898
  const { slides: e } = n, t = {
866
899
  // First build of first slide
@@ -878,20 +911,20 @@ function je(n) {
878
911
  if (a === void 0)
879
912
  continue;
880
913
  const s = a.shortcut;
881
- qt(t, s, i, 0);
914
+ zt(t, s, i, 0);
882
915
  for (let r = 0; r < a.animations.length; r++) {
883
916
  const h = a.animations[r];
884
917
  if (h !== void 0)
885
918
  if (Array.isArray(h))
886
919
  for (const c of h)
887
- qt(t, c.shortcut, i, r + 1);
920
+ zt(t, c.shortcut, i, r + 1);
888
921
  else
889
- qt(t, h.shortcut, i, r + 1);
922
+ zt(t, h.shortcut, i, r + 1);
890
923
  }
891
924
  }
892
925
  return t;
893
926
  }
894
- function qt(n, e, t, o) {
927
+ function zt(n, e, t, o) {
895
928
  if (e !== null)
896
929
  if (Array.isArray(e))
897
930
  for (const i of e)
@@ -899,13 +932,17 @@ function qt(n, e, t, o) {
899
932
  else
900
933
  n[e] = { slideIndex: t, buildIndex: o };
901
934
  }
902
- function X0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: h = e, signal: c } = {}) {
903
- t.shortcuts = je(n);
935
+ function A0(n, e) {
936
+ const t = n[e];
937
+ return t !== void 0 ? t : isNaN(Number(e)) ? null : { slideIndex: Number(e) - 1, buildIndex: 0 };
938
+ }
939
+ function Z0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: h = e, signal: c } = {}) {
940
+ t.shortcuts = We(n);
904
941
  const u = c === void 0 ? void 0 : { signal: c };
905
942
  r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener(
906
943
  "pointerdown",
907
- (p) => {
908
- v0(p.target) || e.focus({ preventScroll: !0 });
944
+ (d) => {
945
+ b0(d.target) || e.focus({ preventScroll: !0 });
909
946
  },
910
947
  u
911
948
  )), e.addEventListener(
@@ -916,53 +953,68 @@ function X0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
916
953
  u
917
954
  ), h.addEventListener(
918
955
  "keyup",
919
- (p) => {
920
- const l = p;
921
- if (!v0(l.target)) {
922
- if (l.code === "Escape") {
956
+ (d) => {
957
+ const l = d;
958
+ if (b0(l.target))
959
+ return;
960
+ if (l.code === "Escape") {
961
+ t.textCommand = null;
962
+ return;
963
+ }
964
+ if (l.code === "ArrowRight" || l.code === "Space") {
965
+ o(l.shiftKey);
966
+ return;
967
+ }
968
+ if (l.code === "ArrowLeft") {
969
+ i(l.shiftKey);
970
+ return;
971
+ }
972
+ const f = Ye(l);
973
+ if (f !== null) {
974
+ const v = A0(
975
+ t.shortcuts,
976
+ f
977
+ );
978
+ t.textCommand = null, v !== null && (l.preventDefault(), a(v.slideIndex, v.buildIndex));
979
+ return;
980
+ }
981
+ if (t.textCommand !== null) {
982
+ if (l.code === "Enter") {
983
+ const v = t.textCommand;
923
984
  t.textCommand = null;
985
+ const y = A0(
986
+ t.shortcuts,
987
+ v
988
+ );
989
+ y !== null && a(y.slideIndex, y.buildIndex);
924
990
  return;
925
- }
926
- if (l.code === "ArrowRight" || l.code === "Space") {
927
- o(l.shiftKey);
928
- return;
929
- }
930
- if (l.code === "ArrowLeft") {
931
- i(l.shiftKey);
932
- return;
933
- }
934
- if (t.textCommand !== null) {
935
- if (l.code === "Enter") {
936
- const f = t.textCommand;
937
- t.textCommand = null;
938
- const v = t.shortcuts[f];
939
- v !== void 0 ? a(v.slideIndex, v.buildIndex) : isNaN(Number(f)) || a(Number(f) - 1, 0);
940
- return;
941
- } else l.code === "Backspace" ? t.textCommand = t.textCommand.slice(0, -1) : t.textCommand += l.key;
942
- return;
943
- }
944
- if (l.key === "g") {
945
- t.textCommand = "";
946
- return;
947
- }
948
- if (l.key === "`" && !W0(l)) {
949
- s();
950
- return;
951
- }
991
+ } else l.code === "Backspace" ? t.textCommand = t.textCommand.slice(0, -1) : t.textCommand += l.key;
992
+ return;
993
+ }
994
+ if (l.key === "g") {
995
+ t.textCommand = "";
996
+ return;
997
+ }
998
+ if (l.key === "`" && !V0(l)) {
999
+ s();
1000
+ return;
952
1001
  }
953
1002
  },
954
1003
  u
955
1004
  );
956
1005
  }
957
- let R = null, Ot = null, yt = null;
958
- const w0 = "__presenterNavigatorInstanceId";
959
- let G0 = {
1006
+ function Ye(n) {
1007
+ return !n.altKey || n.ctrlKey || n.metaKey || n.shiftKey ? null : n.code.startsWith("Key") && n.code.length === 4 ? n.code.slice(3).toLowerCase() : n.code.startsWith("Digit") && n.code.length === 6 ? n.code.slice(5) : n.code.startsWith("Numpad") && n.code.length === 7 ? n.code.slice(6) : null;
1008
+ }
1009
+ let R = null, Nt = null, yt = null;
1010
+ const M0 = "__presenterNavigatorInstanceId";
1011
+ let Q0 = {
960
1012
  width: 700,
961
1013
  height: 680,
962
1014
  left: 20,
963
1015
  top: 50
964
1016
  };
965
- function He({
1017
+ function Xe({
966
1018
  presentation: n,
967
1019
  shortcutState: e,
968
1020
  onNavigateToSlide: t,
@@ -971,20 +1023,20 @@ function He({
971
1023
  onPrevious: a,
972
1024
  forceRefresh: s = !1
973
1025
  }) {
974
- if (R !== null && !R.closed && (Nt(R), !s))
975
- return R.focus(), Ot;
976
- if ((R === null || R.closed) && (R = window.open("", "Navigator", We())), R === null)
1026
+ if (R !== null && !R.closed && (Rt(R), !s))
1027
+ return R.focus(), Nt;
1028
+ if ((R === null || R.closed) && (R = window.open("", "Navigator", Ze())), R === null)
977
1029
  return console.error("Failed to open navigator window."), null;
978
1030
  yt == null || yt();
979
- const r = Xe(R), h = new AbortController();
1031
+ const r = Qe(R), h = new AbortController();
980
1032
  yt = () => h.abort();
981
- const c = Ue(
1033
+ const c = Ge(
982
1034
  n,
983
1035
  t,
984
1036
  i,
985
1037
  r.isActive
986
1038
  );
987
- return Ot = c, ze(), R.document.title = n.title, R.document.body.replaceChildren(c.element), X0(
1039
+ return Nt = c, $e(), R.document.title = n.title, R.document.body.replaceChildren(c.element), Z0(
988
1040
  n,
989
1041
  c.element,
990
1042
  e,
@@ -995,23 +1047,23 @@ function He({
995
1047
  onPrevious: (u) => {
996
1048
  r.isActive() && a(u);
997
1049
  },
998
- onRenderSlide: (u, p) => {
999
- r.isActive() && o(u, p);
1050
+ onRenderSlide: (u, d) => {
1051
+ r.isActive() && o(u, d);
1000
1052
  },
1001
1053
  onShowNavigator: () => {
1002
- r.isActive() && Jt();
1054
+ r.isActive() && t0();
1003
1055
  }
1004
1056
  },
1005
1057
  {
1006
1058
  keyEventTarget: R,
1007
1059
  signal: h.signal
1008
1060
  }
1009
- ), R.addEventListener("resize", () => Nt(R), {
1061
+ ), R.addEventListener("resize", () => Rt(R), {
1010
1062
  signal: h.signal
1011
1063
  }), R.addEventListener(
1012
1064
  "beforeunload",
1013
1065
  () => {
1014
- Nt(R), Y0();
1066
+ Rt(R), G0();
1015
1067
  },
1016
1068
  {
1017
1069
  signal: h.signal
@@ -1019,14 +1071,14 @@ function He({
1019
1071
  ), R.addEventListener(
1020
1072
  "keyup",
1021
1073
  (u) => {
1022
- r.isActive() && (u.key === "Escape" || u.key === "`" && !W0(u)) && Jt();
1074
+ r.isActive() && (u.key === "Escape" || u.key === "`" && !V0(u)) && t0();
1023
1075
  },
1024
1076
  {
1025
1077
  signal: h.signal
1026
1078
  }
1027
- ), Ot;
1079
+ ), Nt;
1028
1080
  }
1029
- function Ue(n, e, t, o = () => !0) {
1081
+ function Ge(n, e, t, o = () => !0) {
1030
1082
  const i = (R == null ? void 0 : R.document) ?? document, a = i.createElement("div");
1031
1083
  a.style.boxSizing = "border-box", a.style.display = "grid", a.style.gridTemplateColumns = "260px 1fr", a.style.gap = "18px", a.style.height = "100vh", a.style.overflow = "hidden", a.style.padding = "18px", a.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', a.style.backgroundColor = "#f5f6f8", a.style.color = "#1f2937", i.body.style.margin = "0", i.body.style.overflow = "hidden";
1032
1084
  const s = i.createElement("div");
@@ -1037,46 +1089,62 @@ function Ue(n, e, t, o = () => !0) {
1037
1089
  h.style.display = "flex", h.style.gap = "14px", h.style.alignItems = "center", h.style.flexWrap = "wrap", h.style.fontSize = "13px", h.style.color = "#4b5563";
1038
1090
  const c = i.createElement("div");
1039
1091
  c.style.display = "flex", c.style.gap = "14px", c.style.flex = "1 1 auto", c.style.minHeight = "0", c.style.minWidth = "0", c.style.overflow = "hidden";
1040
- const u = m0("Current", n), p = m0("Next", n);
1041
- p.container.style.cursor = "pointer", p.container.addEventListener("click", () => {
1092
+ const u = L0("Current", n), d = L0("Next", n), l = c0();
1093
+ d.container.style.cursor = "pointer", d.container.addEventListener("click", () => {
1042
1094
  o() && t();
1043
1095
  });
1044
- const l = n.slides.map((L, S) => {
1045
- const T = $e(L, S);
1046
- return T.style.cursor = "pointer", T.addEventListener("click", (k) => {
1047
- o() && (k.shiftKey && Jt(), e(S));
1048
- }), s.appendChild(T), T;
1049
- }), f = zt("Slides", s, !0), v = zt("Current", u.container, !0), y = zt("Next", p.container, !0), M = () => {
1050
- const L = v.input.checked && y.input.checked && E();
1051
- a.style.gridTemplateColumns = f.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = L ? "column" : "row", u.container.style.flex = "1 1 0", p.container.style.flex = "1 1 0", requestAnimationFrame(() => {
1052
- u.resize(), p.resize();
1096
+ const f = n.slides.map((E, L) => {
1097
+ const I = Ke(E, L);
1098
+ return I.style.cursor = "pointer", I.addEventListener("click", (F) => {
1099
+ o() && (F.shiftKey && t0(), e(L));
1100
+ }), s.appendChild(I), I;
1101
+ }), v = Ht("Slides", s, l.visibility.slides), y = Ht(
1102
+ "Current",
1103
+ u.container,
1104
+ l.visibility.current
1105
+ ), M = Ht(
1106
+ "Next",
1107
+ d.container,
1108
+ l.visibility.next
1109
+ ), T = () => {
1110
+ const E = y.input.checked && M.input.checked && P();
1111
+ a.style.gridTemplateColumns = v.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = E ? "column" : "row", u.container.style.flex = "1 1 0", d.container.style.flex = "1 1 0", requestAnimationFrame(() => {
1112
+ u.resize(), d.resize();
1113
+ }), K0({
1114
+ ...l,
1115
+ open: !0,
1116
+ visibility: {
1117
+ slides: v.input.checked,
1118
+ current: y.input.checked,
1119
+ next: M.input.checked
1120
+ }
1053
1121
  });
1054
1122
  };
1055
- f.input.addEventListener("change", M), v.input.addEventListener("change", M), y.input.addEventListener("change", M), R == null || R.addEventListener("resize", M), h.appendChild(f.element), h.appendChild(v.element), h.appendChild(y.element), c.appendChild(u.container), c.appendChild(p.container), r.appendChild(h), r.appendChild(c), a.appendChild(s), a.appendChild(r);
1056
- function P(L, S, T, k) {
1057
- o() && (l.forEach((F, X) => {
1058
- const z = X === L;
1059
- F.style.backgroundColor = z ? "#dbeafe" : "#ffffff", F.style.borderColor = z ? "#60a5fa" : "#e5e7eb", F.style.color = z ? "#1e3a8a" : "#1f2937";
1060
- }), u.label.textContent = b0(n, L, S), p.label.textContent = b0(n, T, k), Ye(l[L], s), M());
1061
- }
1062
- function E() {
1063
- const L = R;
1064
- if (L === null)
1123
+ v.input.addEventListener("change", T), y.input.addEventListener("change", T), M.input.addEventListener("change", T), R == null || R.addEventListener("resize", T), h.appendChild(v.element), h.appendChild(y.element), h.appendChild(M.element), c.appendChild(u.container), c.appendChild(d.container), r.appendChild(h), r.appendChild(c), a.appendChild(s), a.appendChild(r);
1124
+ function S(E, L, I, F) {
1125
+ o() && (f.forEach((X, z) => {
1126
+ const U = z === E;
1127
+ X.style.backgroundColor = U ? "#dbeafe" : "#ffffff", X.style.borderColor = U ? "#60a5fa" : "#e5e7eb", X.style.color = U ? "#1e3a8a" : "#1f2937";
1128
+ }), u.label.textContent = T0(n, E, L), d.label.textContent = T0(n, I, F), Ve(f[E], s), T());
1129
+ }
1130
+ function P() {
1131
+ const E = R;
1132
+ if (E === null)
1065
1133
  return !1;
1066
- const S = f.input.checked ? 278 : 0, T = L.innerWidth - 36 - S, k = L.innerHeight - 36 - h.offsetHeight - 14;
1067
- return T <= 0 || k <= 0 ? !1 : T / k < 1.1;
1134
+ const L = v.input.checked ? 278 : 0, I = E.innerWidth - 36 - L, F = E.innerHeight - 36 - h.offsetHeight - 14;
1135
+ return I <= 0 || F <= 0 ? !1 : I / F < 1.1;
1068
1136
  }
1069
1137
  return {
1070
1138
  element: a,
1071
1139
  currentCanvas: u.canvas,
1072
- nextCanvas: p.canvas,
1140
+ nextCanvas: d.canvas,
1073
1141
  currentLabel: u.label,
1074
- nextLabel: p.label,
1142
+ nextLabel: d.label,
1075
1143
  isOpen: () => R !== null && !R.closed,
1076
- update: P
1144
+ update: S
1077
1145
  };
1078
1146
  }
1079
- function $e(n, e) {
1147
+ function Ke(n, e) {
1080
1148
  const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1081
1149
  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";
1082
1150
  const i = t.createElement("div");
@@ -1084,7 +1152,7 @@ function $e(n, e) {
1084
1152
  const a = t.createElement("div");
1085
1153
  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;
1086
1154
  }
1087
- function m0(n, e) {
1155
+ function L0(n, e) {
1088
1156
  var u;
1089
1157
  const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1090
1158
  o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
@@ -1097,55 +1165,55 @@ function m0(n, e) {
1097
1165
  const r = t.createElement("canvas");
1098
1166
  r.style.display = "block", r.style.width = "0", r.style.height = "0";
1099
1167
  function h() {
1100
- const p = s.clientWidth, l = s.clientHeight;
1101
- if (p <= 0 || l <= 0)
1168
+ const d = s.clientWidth, l = s.clientHeight;
1169
+ if (d <= 0 || l <= 0)
1102
1170
  return;
1103
- const f = e.size.width / e.size.height, v = Math.min(p, l * f), y = v / f;
1171
+ const f = e.size.width / e.size.height, v = Math.min(d, l * f), y = v / f;
1104
1172
  r.style.width = `${v}px`, r.style.height = `${y}px`;
1105
1173
  }
1106
1174
  const c = (u = t.defaultView) == null ? void 0 : u.ResizeObserver;
1107
1175
  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 };
1108
1176
  }
1109
- function zt(n, e, t) {
1177
+ function Ht(n, e, t) {
1110
1178
  const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1111
1179
  a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
1112
1180
  const s = o.createElement("input");
1113
- return s.type = "checkbox", s.checked = t, s.addEventListener("change", () => {
1181
+ return s.type = "checkbox", s.checked = t, e.style.display = t ? i : "none", s.addEventListener("change", () => {
1114
1182
  e.style.display = s.checked ? i : "none";
1115
1183
  }), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
1116
1184
  }
1117
- function b0(n, e, t) {
1185
+ function T0(n, e, t) {
1118
1186
  if (e === null)
1119
1187
  return "End of presentation";
1120
1188
  const o = n.slides[e];
1121
1189
  return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
1122
1190
  }
1123
- function Ye(n, e) {
1191
+ function Ve(n, e) {
1124
1192
  if (n === void 0)
1125
1193
  return;
1126
1194
  const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
1127
1195
  (t < i || o > a) && n.scrollIntoView({ block: "nearest" });
1128
1196
  }
1129
- function Jt() {
1130
- Nt(R), Y0(), yt == null || yt(), R == null || R.close(), R = null, Ot = null, yt = null;
1197
+ function t0() {
1198
+ Rt(R), G0(), yt == null || yt(), R == null || R.close(), R = null, Nt = null, yt = null;
1131
1199
  }
1132
- function We() {
1133
- const { width: n, height: e, left: t, top: o } = G0;
1200
+ function Ze() {
1201
+ const { width: n, height: e, left: t, top: o } = Q0;
1134
1202
  return `width=${n},height=${e},left=${t},top=${o}`;
1135
1203
  }
1136
- function Nt(n) {
1137
- n === null || n.closed || (G0 = {
1204
+ function Rt(n) {
1205
+ n === null || n.closed || (Q0 = {
1138
1206
  width: n.outerWidth,
1139
1207
  height: n.outerHeight,
1140
1208
  left: n.screenX,
1141
1209
  top: n.screenY
1142
1210
  });
1143
1211
  }
1144
- function Xe(n) {
1212
+ function Qe(n) {
1145
1213
  var o;
1146
1214
  const e = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, t = n;
1147
- return t[w0] = e, {
1148
- isActive: () => !n.closed && t[w0] === e
1215
+ return t[M0] = e, {
1216
+ isActive: () => !n.closed && t[M0] === e
1149
1217
  };
1150
1218
  }
1151
1219
  function at(n = null) {
@@ -1155,8 +1223,8 @@ function at(n = null) {
1155
1223
  ...n
1156
1224
  };
1157
1225
  }
1158
- const Ge = at({ width: 0, height: 0 });
1159
- function Ve(n = null) {
1226
+ const Je = at({ width: 0, height: 0 });
1227
+ function t1(n = null) {
1160
1228
  return {
1161
1229
  backgroundColor: G.WHITE,
1162
1230
  slides: [],
@@ -1168,7 +1236,7 @@ function Ve(n = null) {
1168
1236
  ...n
1169
1237
  };
1170
1238
  }
1171
- function Ze(n) {
1239
+ function e1(n) {
1172
1240
  const e = Array.isArray(n) ? n : [n];
1173
1241
  let t = 0, o = 0;
1174
1242
  for (const i of e)
@@ -1186,26 +1254,26 @@ function Ze(n) {
1186
1254
  }
1187
1255
  return o;
1188
1256
  }
1189
- function l0(n, e = null) {
1190
- const { red: t, green: o, blue: i } = n, a = z0(n, e);
1257
+ function f0(n, e = null) {
1258
+ const { red: t, green: o, blue: i } = n, a = $0(n, e);
1191
1259
  return `rgba(${t}, ${o}, ${i}, ${a})`;
1192
1260
  }
1193
- function V0(n) {
1261
+ function J0(n) {
1194
1262
  return n === document.body;
1195
1263
  }
1196
- function Ke(n, e) {
1264
+ function n1(n, e) {
1197
1265
  const t = document.createElement("div");
1198
- if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", V0(e)) {
1266
+ if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", J0(e)) {
1199
1267
  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";
1200
1268
  const o = n.size.height / n.size.width;
1201
- A0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => A0(t, o));
1269
+ C0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => C0(t, o));
1202
1270
  }
1203
1271
  return t;
1204
1272
  }
1205
- function A0(n, e) {
1273
+ function C0(n, e) {
1206
1274
  window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
1207
1275
  }
1208
- const Qe = {
1276
+ const r1 = {
1209
1277
  check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
1210
1278
  interpolate: (n, e, t) => ({
1211
1279
  red: Math.round(n.red + (e.red - n.red) * t),
@@ -1213,23 +1281,23 @@ const Qe = {
1213
1281
  blue: Math.round(n.blue + (e.blue - n.blue) * t),
1214
1282
  alpha: n.alpha + (e.alpha - n.alpha) * t
1215
1283
  })
1216
- }, Je = {
1284
+ }, i1 = {
1217
1285
  check: (n) => !0,
1218
1286
  interpolate: (n, e) => e
1219
- }, t1 = {
1287
+ }, o1 = {
1220
1288
  check: (n) => typeof n == "number",
1221
1289
  interpolate: (n, e, t) => n + (e - n) * t
1222
- }, M0 = [
1223
- t1,
1224
- Qe,
1225
- Je
1290
+ }, P0 = [
1291
+ o1,
1292
+ r1,
1293
+ i1
1226
1294
  ];
1227
- function e1(n, e, t, o = null) {
1295
+ function s1(n, e, t, o = null) {
1228
1296
  if (t === 0)
1229
1297
  return n;
1230
1298
  if (t === 1)
1231
1299
  return { ...n, ...e };
1232
- const i = o != null ? [...o, ...M0] : M0, a = {};
1300
+ const i = o != null ? [...o, ...P0] : P0, a = {};
1233
1301
  for (const s in e) {
1234
1302
  const r = n[s], h = e[s];
1235
1303
  for (const c of i)
@@ -1244,7 +1312,7 @@ function e1(n, e, t, o = null) {
1244
1312
  }
1245
1313
  return { ...n, ...a };
1246
1314
  }
1247
- function L0(n, e, t = null) {
1315
+ function S0(n, e, t = null) {
1248
1316
  if (e === null)
1249
1317
  return;
1250
1318
  const o = Array.isArray(e) ? e : [e];
@@ -1266,7 +1334,7 @@ function L0(n, e, t = null) {
1266
1334
  );
1267
1335
  n.set(a.object, {
1268
1336
  ...s,
1269
- ...e1(
1337
+ ...s1(
1270
1338
  s,
1271
1339
  a.props,
1272
1340
  a.easing(h),
@@ -1293,10 +1361,10 @@ function L0(n, e, t = null) {
1293
1361
  }
1294
1362
  }
1295
1363
  }
1296
- function Z0(n) {
1364
+ function te(n) {
1297
1365
  return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
1298
1366
  }
1299
- function n1({
1367
+ function a1({
1300
1368
  slide: n,
1301
1369
  buildIndex: e,
1302
1370
  buildTime: t
@@ -1304,7 +1372,7 @@ function n1({
1304
1372
  const o = /* @__PURE__ */ new Map();
1305
1373
  function i(s) {
1306
1374
  o.set(s, s);
1307
- for (const r of Z0(s))
1375
+ for (const r of te(s))
1308
1376
  i(r);
1309
1377
  }
1310
1378
  for (const s of n.objects)
@@ -1312,22 +1380,22 @@ function n1({
1312
1380
  const a = t === null ? e : e - 1;
1313
1381
  for (let s = 0; s < a; s++) {
1314
1382
  const r = n.animations[s] ?? null;
1315
- L0(o, r);
1383
+ S0(o, r);
1316
1384
  }
1317
1385
  if (t !== null && e > 0) {
1318
1386
  const s = n.animations[e - 1] ?? null;
1319
- L0(o, s, t);
1387
+ S0(o, s, t);
1320
1388
  }
1321
1389
  return o;
1322
1390
  }
1323
- function r1(n) {
1391
+ function h1(n) {
1324
1392
  const e = {};
1325
1393
  function t(o) {
1326
- if (o.objectType === U.SVG) {
1394
+ if (o.objectType === $.SVG) {
1327
1395
  const a = o.svg;
1328
1396
  a !== void 0 && a.length > 0 && (e[a] = a);
1329
1397
  }
1330
- const i = Z0(o);
1398
+ const i = te(o);
1331
1399
  for (const a of i)
1332
1400
  t(a);
1333
1401
  }
@@ -1336,38 +1404,38 @@ function r1(n) {
1336
1404
  t(i);
1337
1405
  return e;
1338
1406
  }
1339
- const dt = "presenterState";
1340
- function i1(n, e) {
1341
- const t = localStorage.getItem(dt);
1407
+ const pt = "presenterState";
1408
+ function l1(n, e) {
1409
+ const t = localStorage.getItem(pt);
1342
1410
  if (t === null)
1343
1411
  return null;
1344
1412
  if (e === null)
1345
- return localStorage.removeItem(dt), null;
1413
+ return localStorage.removeItem(pt), null;
1346
1414
  let o;
1347
1415
  try {
1348
1416
  o = JSON.parse(t);
1349
1417
  } catch (c) {
1350
- return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(dt), null;
1418
+ return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(pt), null;
1351
1419
  }
1352
1420
  const { title: i, timestamp: a } = o;
1353
1421
  let { slideIndex: s, buildIndex: r } = o;
1354
1422
  if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * e)
1355
- return localStorage.removeItem(dt), null;
1423
+ return localStorage.removeItem(pt), null;
1356
1424
  s > n.slides.length - 1 && (s = n.slides.length - 1, r = 0);
1357
1425
  const h = n.slides[s];
1358
- return h === void 0 ? (localStorage.removeItem(dt), null) : (r > h.animations.length && (r = h.animations.length), {
1426
+ return h === void 0 ? (localStorage.removeItem(pt), null) : (r > h.animations.length && (r = h.animations.length), {
1359
1427
  title: i,
1360
1428
  slideIndex: s,
1361
1429
  buildIndex: r
1362
1430
  });
1363
1431
  }
1364
- function o1({ title: n, slideIndex: e, buildIndex: t }) {
1432
+ function c1({ title: n, slideIndex: e, buildIndex: t }) {
1365
1433
  localStorage.setItem(
1366
- dt,
1434
+ pt,
1367
1435
  JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
1368
1436
  );
1369
1437
  }
1370
- const T0 = Object.freeze({
1438
+ const E0 = Object.freeze({
1371
1439
  canvas: null,
1372
1440
  extrasContainer: null,
1373
1441
  mountedExtrasCleanups: [],
@@ -1380,14 +1448,14 @@ const T0 = Object.freeze({
1380
1448
  textCommand: null,
1381
1449
  shortcuts: {}
1382
1450
  }
1383
- }), Z = {
1451
+ }), V = {
1384
1452
  Browser: "browser",
1385
1453
  Node: "node"
1386
1454
  };
1387
- function s1(n, e) {
1455
+ function u1(n, e) {
1388
1456
  e.context.clearRect(0, 0, n.width, n.height);
1389
1457
  }
1390
- function a1(n) {
1458
+ function f1(n) {
1391
1459
  const e = document.createElement("canvas");
1392
1460
  return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
1393
1461
  }
@@ -1395,31 +1463,31 @@ const gt = {
1395
1463
  Browser: "browser",
1396
1464
  Node: "node"
1397
1465
  };
1398
- function h1(n) {
1466
+ function g1(n) {
1399
1467
  const e = new Path2D(n);
1400
1468
  return {
1401
1469
  type: gt.Browser,
1402
1470
  path: e
1403
1471
  };
1404
1472
  }
1405
- function l1(n) {
1406
- const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, u = { x: i, y: a }, p = Math.atan2(u.y - c.y, u.x - c.x), l = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, M = Math.hypot(f, v) * e, P = Math.cos(p), E = Math.sin(p), L = h ? { x: l.x - P * M / 2, y: l.y - E * M / 2 } : c, S = h ? { x: l.x + P * M / 2, y: l.y + E * M / 2 } : { x: c.x + P * M, y: c.y + E * M }, T = r ? Math.PI / 6 : Math.PI / 4.5, k = M < s * 2 ? M / 2 : s, F = {
1407
- x: S.x - k * Math.cos(p - T),
1408
- y: S.y - k * Math.sin(p - T)
1473
+ function d1(n) {
1474
+ const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, u = { x: i, y: a }, d = Math.atan2(u.y - c.y, u.x - c.x), l = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, M = Math.hypot(f, v) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, L = r ? Math.PI / 6 : Math.PI / 4.5, I = M < s * 2 ? M / 2 : s, F = {
1475
+ x: E.x - I * Math.cos(d - L),
1476
+ y: E.y - I * Math.sin(d - L)
1409
1477
  }, X = {
1410
- x: S.x - k * Math.cos(p + T),
1411
- y: S.y - k * Math.sin(p + T)
1478
+ x: E.x - I * Math.cos(d + L),
1479
+ y: E.y - I * Math.sin(d + L)
1412
1480
  }, z = {
1413
- x: L.x + k * Math.cos(p - T),
1414
- y: L.y + k * Math.sin(p - T)
1415
- }, Y = {
1416
- x: L.x + k * Math.cos(p + T),
1417
- y: L.y + k * Math.sin(p + T)
1481
+ x: P.x + I * Math.cos(d - L),
1482
+ y: P.y + I * Math.sin(d - L)
1483
+ }, U = {
1484
+ x: P.x + I * Math.cos(d + L),
1485
+ y: P.y + I * Math.sin(d + L)
1418
1486
  };
1419
1487
  return {
1420
- arrowPoints: [L, S],
1421
- arrowheadPoints: [F, S, X],
1422
- doubledArrowheadPoints: [z, L, Y]
1488
+ arrowPoints: [P, E],
1489
+ arrowheadPoints: [F, E, X],
1490
+ doubledArrowheadPoints: [z, P, U]
1423
1491
  };
1424
1492
  }
1425
1493
  function vt({
@@ -1444,15 +1512,15 @@ function vt({
1444
1512
  ]) : n.context.setLineDash([u, c - u]);
1445
1513
  } else
1446
1514
  n.context.setLineDash([]);
1447
- if (n.context.lineWidth = h, n.context.strokeStyle = St(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1515
+ if (n.context.lineWidth = h, n.context.strokeStyle = It(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1448
1516
  n.context.stroke();
1449
1517
  return;
1450
1518
  }
1451
1519
  switch (n.type) {
1452
- case Z.Browser:
1520
+ case V.Browser:
1453
1521
  s.type === gt.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1454
1522
  break;
1455
- case Z.Node:
1523
+ case V.Node:
1456
1524
  s.type === gt.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1457
1525
  break;
1458
1526
  default:
@@ -1461,15 +1529,15 @@ function vt({
1461
1529
  }
1462
1530
  }
1463
1531
  function wt({ ctx: n, path: e, color: t, opacity: o = null }) {
1464
- if (n.context.fillStyle = l0(t, o), e === void 0) {
1532
+ if (n.context.fillStyle = f0(t, o), e === void 0) {
1465
1533
  n.context.fill();
1466
1534
  return;
1467
1535
  }
1468
1536
  switch (n.type) {
1469
- case Z.Browser:
1537
+ case V.Browser:
1470
1538
  e.type === gt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1471
1539
  break;
1472
- case Z.Node:
1540
+ case V.Node:
1473
1541
  e.type === gt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1474
1542
  break;
1475
1543
  default:
@@ -1491,7 +1559,7 @@ function jt(n, e) {
1491
1559
  }
1492
1560
  return { path: t, length: i };
1493
1561
  }
1494
- const c1 = ({
1562
+ const p1 = ({
1495
1563
  ctx: n,
1496
1564
  object: e,
1497
1565
  opacity: t,
@@ -1500,7 +1568,7 @@ const c1 = ({
1500
1568
  const i = e.opacity * t;
1501
1569
  if (i === 0 || e.drawn === 0)
1502
1570
  return;
1503
- const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = l1(e), { path: h } = jt(a, o), { path: c } = jt(s, o);
1571
+ const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = d1(e), { path: h } = jt(a, o), { path: c } = jt(s, o);
1504
1572
  if (vt({
1505
1573
  color: e.color,
1506
1574
  ctx: n,
@@ -1537,32 +1605,32 @@ const c1 = ({
1537
1605
  });
1538
1606
  }
1539
1607
  };
1540
- function u1(n, e) {
1608
+ function x1(n, e) {
1541
1609
  const t = n.radius - n.strokeWidth / 2;
1542
1610
  if (t <= 0)
1543
1611
  return;
1544
1612
  const o = e(), i = -Math.PI / 2;
1545
1613
  return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
1546
1614
  }
1547
- function f1(n, e) {
1615
+ function y1(n, e) {
1548
1616
  const t = e(), o = -Math.PI / 2;
1549
1617
  t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1550
1618
  const i = 2 * Math.PI * n.radius;
1551
1619
  return { path: t, length: i };
1552
1620
  }
1553
- function K0(n, e) {
1621
+ function ee(n, e) {
1554
1622
  switch (n.type) {
1555
- case Z.Browser:
1623
+ case V.Browser:
1556
1624
  e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1557
1625
  break;
1558
- case Z.Node:
1626
+ case V.Node:
1559
1627
  e.type === gt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1560
1628
  break;
1561
1629
  default:
1562
1630
  st(n);
1563
1631
  }
1564
1632
  }
1565
- const g1 = ({
1633
+ const v1 = ({
1566
1634
  ctx: n,
1567
1635
  object: e,
1568
1636
  opacity: t,
@@ -1571,10 +1639,10 @@ const g1 = ({
1571
1639
  const i = e.opacity * t;
1572
1640
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1573
1641
  return;
1574
- const { path: a, length: s } = f1(e, o);
1642
+ const { path: a, length: s } = y1(e, o);
1575
1643
  if (i < 1 && e.strokeWidth > 0) {
1576
- const r = u1(e, o);
1577
- r !== void 0 && (n.context.save(), K0(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1644
+ const r = x1(e, o);
1645
+ r !== void 0 && (n.context.save(), ee(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1578
1646
  } else
1579
1647
  wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1580
1648
  vt({
@@ -1587,103 +1655,103 @@ const g1 = ({
1587
1655
  width: e.strokeWidth
1588
1656
  });
1589
1657
  };
1590
- function W(n = null) {
1658
+ function Y(n = null) {
1591
1659
  return {
1592
1660
  x: 0,
1593
1661
  y: 0,
1594
1662
  ...n
1595
1663
  };
1596
1664
  }
1597
- const p1 = W();
1665
+ const w1 = Y();
1598
1666
  function ut(n = null) {
1599
1667
  return {
1600
- origin: p1,
1601
- size: Ge,
1668
+ origin: w1,
1669
+ size: Je,
1602
1670
  ...n
1603
1671
  };
1604
1672
  }
1605
1673
  ut();
1606
- function pt(n, e, t) {
1674
+ function dt(n, e, t) {
1607
1675
  const { x: o, y: i } = n, { width: a, height: s } = t;
1608
1676
  switch (e) {
1609
1677
  case ot.TOP_LEFT:
1610
1678
  return ut({
1611
- origin: W({ x: o, y: i }),
1679
+ origin: Y({ x: o, y: i }),
1612
1680
  size: t
1613
1681
  });
1614
1682
  case ot.TOP:
1615
1683
  return ut({
1616
- origin: W({ x: o - a / 2, y: i }),
1684
+ origin: Y({ x: o - a / 2, y: i }),
1617
1685
  size: t
1618
1686
  });
1619
1687
  case ot.TOP_RIGHT:
1620
1688
  return ut({
1621
- origin: W({ x: o - a, y: i }),
1689
+ origin: Y({ x: o - a, y: i }),
1622
1690
  size: t
1623
1691
  });
1624
1692
  case ot.LEFT:
1625
1693
  return ut({
1626
- origin: W({ x: o, y: i - s / 2 }),
1694
+ origin: Y({ x: o, y: i - s / 2 }),
1627
1695
  size: t
1628
1696
  });
1629
1697
  case ot.CENTER:
1630
1698
  return ut({
1631
- origin: W({ x: o - a / 2, y: i - s / 2 }),
1699
+ origin: Y({ x: o - a / 2, y: i - s / 2 }),
1632
1700
  size: t
1633
1701
  });
1634
1702
  case ot.RIGHT:
1635
1703
  return ut({
1636
- origin: W({ x: o - a, y: i - s / 2 }),
1704
+ origin: Y({ x: o - a, y: i - s / 2 }),
1637
1705
  size: t
1638
1706
  });
1639
1707
  case ot.BOTTOM_LEFT:
1640
1708
  return ut({
1641
- origin: W({ x: o, y: i - s }),
1709
+ origin: Y({ x: o, y: i - s }),
1642
1710
  size: t
1643
1711
  });
1644
1712
  case ot.BOTTOM:
1645
1713
  return ut({
1646
- origin: W({ x: o - a / 2, y: i - s }),
1714
+ origin: Y({ x: o - a / 2, y: i - s }),
1647
1715
  size: t
1648
1716
  });
1649
1717
  case ot.BOTTOM_RIGHT:
1650
1718
  return ut({
1651
- origin: W({ x: o - a, y: i - s }),
1719
+ origin: Y({ x: o - a, y: i - s }),
1652
1720
  size: t
1653
1721
  });
1654
1722
  default:
1655
1723
  st(e);
1656
1724
  }
1657
1725
  }
1658
- const d1 = ({
1726
+ const m1 = ({
1659
1727
  ctx: n,
1660
1728
  object: e,
1661
1729
  renderObject: t,
1662
1730
  opacity: o
1663
1731
  }) => {
1664
- const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = pt(
1665
- W({ x: e.x, y: e.y }),
1732
+ const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = dt(
1733
+ Y({ x: e.x, y: e.y }),
1666
1734
  e.anchor,
1667
1735
  at({
1668
1736
  width: e.width * Math.abs(i),
1669
1737
  height: e.height * Math.abs(a)
1670
1738
  })
1671
- ), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: u, skewOriginY: p, skewX: l, skewY: f } = e;
1739
+ ), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: u, skewOriginY: d, skewX: l, skewY: f } = e;
1672
1740
  if (!(i === 0 || a === 0)) {
1673
- n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(h, c), n.context.rotate(r * Math.PI / 180), n.context.translate(-h, -c), n.context.translate(u, p), n.context.transform(
1741
+ n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(h, c), n.context.rotate(r * Math.PI / 180), n.context.translate(-h, -c), n.context.translate(u, d), n.context.transform(
1674
1742
  1,
1675
1743
  Math.tan(f * Math.PI / 180),
1676
1744
  Math.tan(l * Math.PI / 180),
1677
1745
  1,
1678
1746
  0,
1679
1747
  0
1680
- ), n.context.translate(-u, -p);
1748
+ ), n.context.translate(-u, -d);
1681
1749
  for (const v of e.objects)
1682
1750
  t(v, o * e.opacity);
1683
- e.previewColor !== null && (n.context.fillStyle = St(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(u, p, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1751
+ e.previewColor !== null && (n.context.fillStyle = It(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(u, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1684
1752
  }
1685
1753
  };
1686
- function c0(n, e, t, o, i = 0) {
1754
+ function g0(n, e, t, o, i = 0) {
1687
1755
  const a = o();
1688
1756
  a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
1689
1757
  n.x + e.width,
@@ -1710,31 +1778,31 @@ function c0(n, e, t, o, i = 0) {
1710
1778
  const kt = {
1711
1779
  Browser: "browser",
1712
1780
  Node: "node"
1713
- }, x1 = ({
1781
+ }, b1 = ({
1714
1782
  ctx: n,
1715
1783
  imageById: e,
1716
1784
  object: t,
1717
1785
  opacity: o,
1718
1786
  createPath2D: i
1719
1787
  }) => {
1720
- const a = pt(
1721
- W({ x: t.x, y: t.y }),
1788
+ const a = dt(
1789
+ Y({ x: t.x, y: t.y }),
1722
1790
  t.anchor,
1723
1791
  at({ width: t.width, height: t.height })
1724
1792
  ), s = e[t.imageId];
1725
1793
  if (s !== void 0) {
1726
1794
  if (n.context.save(), t.cornerRadius > 0) {
1727
- const r = c0(
1795
+ const r = g0(
1728
1796
  a.origin,
1729
1797
  a.size,
1730
1798
  t.cornerRadius,
1731
1799
  i
1732
1800
  );
1733
1801
  switch (n.type) {
1734
- case Z.Browser:
1802
+ case V.Browser:
1735
1803
  r.path.type === gt.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1736
1804
  break;
1737
- case Z.Node:
1805
+ case V.Node:
1738
1806
  r.path.type === gt.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1739
1807
  break;
1740
1808
  default:
@@ -1742,7 +1810,7 @@ const kt = {
1742
1810
  }
1743
1811
  }
1744
1812
  switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
1745
- case Z.Browser:
1813
+ case V.Browser:
1746
1814
  s.type === kt.Browser ? n.context.drawImage(
1747
1815
  s.image,
1748
1816
  a.origin.x,
@@ -1751,7 +1819,7 @@ const kt = {
1751
1819
  a.size.height
1752
1820
  ) : console.warn("Attempted to use Node Image in Browser Canvas context");
1753
1821
  break;
1754
- case Z.Node:
1822
+ case V.Node:
1755
1823
  s.type === kt.Node ? n.context.drawImage(
1756
1824
  s.image,
1757
1825
  a.origin.x,
@@ -1766,13 +1834,13 @@ const kt = {
1766
1834
  n.context.restore();
1767
1835
  }
1768
1836
  };
1769
- function y1(n, e) {
1837
+ function A1(n, e) {
1770
1838
  const t = e();
1771
1839
  t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
1772
1840
  const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
1773
1841
  return { path: t, length: o };
1774
1842
  }
1775
- const v1 = ({
1843
+ const M1 = ({
1776
1844
  ctx: n,
1777
1845
  object: e,
1778
1846
  opacity: t,
@@ -1781,7 +1849,7 @@ const v1 = ({
1781
1849
  const i = e.opacity * t;
1782
1850
  if (i === 0 || e.drawn === 0)
1783
1851
  return;
1784
- const { path: a, length: s } = y1(e, o);
1852
+ const { path: a, length: s } = A1(e, o);
1785
1853
  vt({
1786
1854
  color: e.color,
1787
1855
  ctx: n,
@@ -1793,23 +1861,23 @@ const v1 = ({
1793
1861
  opacity: i,
1794
1862
  width: e.width
1795
1863
  });
1796
- }, w1 = ({
1864
+ }, L1 = ({
1797
1865
  ctx: n,
1798
1866
  object: e,
1799
1867
  opacity: t,
1800
1868
  renderObject: o
1801
1869
  }) => {
1802
1870
  n.context.save();
1803
- const i = pt(
1804
- W({ x: e.x, y: e.y }),
1871
+ const i = dt(
1872
+ Y({ x: e.x, y: e.y }),
1805
1873
  e.anchor,
1806
1874
  at({ width: e.width, height: e.height })
1807
1875
  );
1808
- e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = St(G.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();
1876
+ e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = It(G.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();
1809
1877
  for (const a of e.objects)
1810
1878
  o(a, t * e.opacity);
1811
1879
  n.context.restore();
1812
- }, m1 = ({
1880
+ }, T1 = ({
1813
1881
  ctx: n,
1814
1882
  object: e,
1815
1883
  opacity: t,
@@ -1818,8 +1886,8 @@ const v1 = ({
1818
1886
  const i = e.opacity * t;
1819
1887
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1820
1888
  return;
1821
- const { origin: a } = pt(
1822
- W({ x: e.x, y: e.y }),
1889
+ const { origin: a } = dt(
1890
+ Y({ x: e.x, y: e.y }),
1823
1891
  e.anchor,
1824
1892
  at({ width: e.width, height: e.height })
1825
1893
  ), s = o(e.path);
@@ -1839,7 +1907,7 @@ const v1 = ({
1839
1907
  width: e.strokeWidth
1840
1908
  }), n.context.restore();
1841
1909
  };
1842
- function b1(n, e) {
1910
+ function C1(n, e) {
1843
1911
  const t = e(), o = n.points, i = o[0];
1844
1912
  if (i === void 0)
1845
1913
  return { path: t, length: 0 };
@@ -1860,7 +1928,7 @@ function b1(n, e) {
1860
1928
  );
1861
1929
  return a += r, { path: t, length: a };
1862
1930
  }
1863
- const A1 = ({
1931
+ const P1 = ({
1864
1932
  ctx: n,
1865
1933
  object: e,
1866
1934
  opacity: t,
@@ -1869,7 +1937,7 @@ const A1 = ({
1869
1937
  const i = e.opacity * t;
1870
1938
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1871
1939
  return;
1872
- const { path: a, length: s } = b1(e, o);
1940
+ const { path: a, length: s } = C1(e, o);
1873
1941
  wt({
1874
1942
  ctx: n,
1875
1943
  path: a,
@@ -1885,26 +1953,26 @@ const A1 = ({
1885
1953
  width: e.strokeWidth
1886
1954
  });
1887
1955
  };
1888
- function M1(n, e) {
1889
- const t = n.strokeWidth / 2, { origin: o, size: i } = pt(
1890
- W({ x: n.x, y: n.y }),
1956
+ function S1(n, e) {
1957
+ const t = n.strokeWidth / 2, { origin: o, size: i } = dt(
1958
+ Y({ x: n.x, y: n.y }),
1891
1959
  n.anchor,
1892
1960
  at({ width: n.width, height: n.height })
1893
1961
  ), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
1894
1962
  if (a <= 0 || s <= 0)
1895
1963
  return;
1896
- const r = W({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), c = Math.max(
1964
+ const r = Y({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), c = Math.max(
1897
1965
  0,
1898
1966
  Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
1899
1967
  );
1900
1968
  if (c > 0)
1901
- return c0(r, h, c, e).path;
1969
+ return g0(r, h, c, e).path;
1902
1970
  const u = e();
1903
1971
  return u.path.moveTo(r.x, r.y), u.path.lineTo(r.x + a, r.y), u.path.lineTo(r.x + a, r.y + s), u.path.lineTo(r.x, r.y + s), u.path.closePath(), u;
1904
1972
  }
1905
- function L1(n, e) {
1906
- const { origin: t, size: o } = pt(
1907
- W({ x: n.x, y: n.y }),
1973
+ function E1(n, e) {
1974
+ const { origin: t, size: o } = dt(
1975
+ Y({ x: n.x, y: n.y }),
1908
1976
  n.anchor,
1909
1977
  at({ width: n.width, height: n.height })
1910
1978
  ), i = Math.max(
@@ -1912,7 +1980,7 @@ function L1(n, e) {
1912
1980
  Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
1913
1981
  ), a = Math.min(n.strokeWidth * 2, o.width - i);
1914
1982
  if (i > 0)
1915
- return c0(t, o, i, e, a);
1983
+ return g0(t, o, i, e, a);
1916
1984
  {
1917
1985
  const s = e();
1918
1986
  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);
@@ -1920,7 +1988,7 @@ function L1(n, e) {
1920
1988
  return { path: s, length: r };
1921
1989
  }
1922
1990
  }
1923
- const T1 = ({
1991
+ const I1 = ({
1924
1992
  ctx: n,
1925
1993
  object: e,
1926
1994
  opacity: t,
@@ -1929,10 +1997,10 @@ const T1 = ({
1929
1997
  const i = e.opacity * t;
1930
1998
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1931
1999
  return;
1932
- const { path: a, length: s } = L1(e, o);
2000
+ const { path: a, length: s } = E1(e, o);
1933
2001
  if (i < 1 && e.strokeWidth > 0) {
1934
- const r = M1(e, o);
1935
- r !== void 0 && (n.context.save(), K0(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
2002
+ const r = S1(e, o);
2003
+ r !== void 0 && (n.context.save(), ee(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1936
2004
  } else
1937
2005
  wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1938
2006
  vt({
@@ -1944,7 +2012,7 @@ const T1 = ({
1944
2012
  opacity: i,
1945
2013
  width: e.strokeWidth
1946
2014
  });
1947
- }, C1 = ({
2015
+ }, k1 = ({
1948
2016
  ctx: n,
1949
2017
  imageById: e,
1950
2018
  object: t,
@@ -1956,13 +2024,13 @@ const T1 = ({
1956
2024
  const a = e[t.svg];
1957
2025
  if (a === void 0)
1958
2026
  return;
1959
- const s = pt(
1960
- W({ x: t.x, y: t.y }),
2027
+ const s = dt(
2028
+ Y({ x: t.x, y: t.y }),
1961
2029
  t.anchor,
1962
2030
  at({ width: t.width, height: t.height })
1963
2031
  );
1964
2032
  switch (n.context.save(), n.context.globalAlpha = i, n.type) {
1965
- case Z.Browser:
2033
+ case V.Browser:
1966
2034
  a.type === kt.Browser && n.context.drawImage(
1967
2035
  a.image,
1968
2036
  s.origin.x,
@@ -1971,7 +2039,7 @@ const T1 = ({
1971
2039
  s.size.height
1972
2040
  );
1973
2041
  break;
1974
- case Z.Node:
2042
+ case V.Node:
1975
2043
  a.type === kt.Node && n.context.drawImage(
1976
2044
  a.image,
1977
2045
  s.origin.x,
@@ -1985,7 +2053,7 @@ const T1 = ({
1985
2053
  }
1986
2054
  n.context.restore();
1987
2055
  };
1988
- function P1(n) {
2056
+ function _1(n) {
1989
2057
  return {
1990
2058
  color: n.color,
1991
2059
  fontFamily: n.fontFamily,
@@ -1997,7 +2065,7 @@ function P1(n) {
1997
2065
  superscript: n.superscript
1998
2066
  };
1999
2067
  }
2000
- function E1(n, e = 1) {
2068
+ function O1(n, e = 1) {
2001
2069
  const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
2002
2070
  let o = 0, i = 0;
2003
2071
  for (let a = 0; a < n.length; a++) {
@@ -2012,8 +2080,8 @@ function E1(n, e = 1) {
2012
2080
  width: t
2013
2081
  };
2014
2082
  }
2015
- const S1 = 0.7, k1 = 0.3;
2016
- function Q0(n) {
2083
+ const N1 = 0.7, R1 = 0.3;
2084
+ function ne(n) {
2017
2085
  const e = n.superscript, t = n.subscript && !e;
2018
2086
  return !e && !t ? {
2019
2087
  baselineShift: 0,
@@ -2021,32 +2089,32 @@ function Q0(n) {
2021
2089
  isSubscript: !1,
2022
2090
  isSuperscript: !1
2023
2091
  } : {
2024
- baselineShift: n.fontSize * k1 * (e ? -1 : 1),
2025
- fontSize: n.fontSize * S1,
2092
+ baselineShift: n.fontSize * R1 * (e ? -1 : 1),
2093
+ fontSize: n.fontSize * N1,
2026
2094
  isSubscript: t,
2027
2095
  isSuperscript: e
2028
2096
  };
2029
2097
  }
2030
- function I1(n) {
2098
+ function F1(n) {
2031
2099
  return {
2032
2100
  width: n.width,
2033
2101
  height: n.fontBoundingBoxAscent
2034
2102
  };
2035
2103
  }
2036
- function J0(n, e, t = 1) {
2037
- const o = Q0(e);
2038
- n.context.fillStyle = l0(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === Z.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
2104
+ function re(n, e, t = 1) {
2105
+ const o = ne(e);
2106
+ n.context.fillStyle = f0(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";
2039
2107
  }
2040
- function _1(n, e, t) {
2108
+ function B1(n, e, t) {
2041
2109
  const o = [];
2042
2110
  for (const i of n) {
2043
2111
  const a = [];
2044
2112
  for (const s of i) {
2045
2113
  const { text: r, ...h } = s, c = { ...e, ...h };
2046
- J0(t, c);
2047
- const u = t.context.measureText(r), p = I1(u), { baselineShift: l } = Q0(c), f = p.height + Math.max(0, -l), v = Math.max(0, l);
2114
+ re(t, c);
2115
+ const u = t.context.measureText(r), d = F1(u), { baselineShift: l } = ne(c), f = d.height + Math.max(0, -l), v = Math.max(0, l);
2048
2116
  a.push({
2049
- ...p,
2117
+ ...d,
2050
2118
  baselineShift: l,
2051
2119
  bottom: v,
2052
2120
  height: f + v,
@@ -2057,79 +2125,79 @@ function _1(n, e, t) {
2057
2125
  }
2058
2126
  return o;
2059
2127
  }
2060
- const O1 = ({ ctx: n, object: e, opacity: t }) => {
2128
+ const D1 = ({ ctx: n, object: e, opacity: t }) => {
2061
2129
  const o = e.opacity * t;
2062
2130
  if (o === 0)
2063
2131
  return;
2064
- const { length: i } = e, a = U0(e.text), s = P1(e), r = _1(a, s, n), h = E1(r, e.lineSpacing), c = pt(W({ x: e.x, y: e.y }), e.anchor, h);
2065
- let u = c.origin.x, p = c.origin.y, l = 0, f = 0;
2132
+ const { length: i } = e, a = X0(e.text), s = _1(e), r = B1(a, s, n), h = O1(r, e.lineSpacing), c = dt(Y({ x: e.x, y: e.y }), e.anchor, h);
2133
+ let u = c.origin.x, d = c.origin.y, l = 0, f = 0;
2066
2134
  for (let v = 0; v < a.length; v++) {
2067
2135
  const y = a[v], M = r[v];
2068
2136
  if (y == null || M == null) {
2069
2137
  console.error("Could not determine text units or sizes for line");
2070
2138
  continue;
2071
2139
  }
2072
- const P = M.reduce((k, F) => k + F.width, 0), E = M.length === 0 ? f : M.reduce((k, F) => Math.max(k, F.top), 0), L = M.length === 0 ? 0 : M.reduce((k, F) => Math.max(k, F.bottom), 0), S = E + L;
2140
+ const T = M.reduce((I, F) => I + F.width, 0), S = M.length === 0 ? f : M.reduce((I, F) => Math.max(I, F.top), 0), P = M.length === 0 ? 0 : M.reduce((I, F) => Math.max(I, F.bottom), 0), E = S + P;
2073
2141
  switch (e.alignment) {
2074
2142
  case xt.LEFT:
2075
2143
  u = c.origin.x;
2076
2144
  break;
2077
2145
  case xt.CENTER:
2078
- u = c.origin.x + (c.size.width - P) / 2;
2146
+ u = c.origin.x + (c.size.width - T) / 2;
2079
2147
  break;
2080
2148
  case xt.RIGHT:
2081
- u = c.origin.x + (c.size.width - P);
2149
+ u = c.origin.x + (c.size.width - T);
2082
2150
  break;
2083
2151
  default:
2084
2152
  st(e.alignment);
2085
2153
  break;
2086
2154
  }
2087
- p += f * (e.lineSpacing - 1);
2088
- const T = p + E;
2089
- f = S;
2090
- for (let k = 0; k < y.length && !(i !== null && l >= i); k++) {
2091
- const F = y[k], X = M[k];
2155
+ d += f * (e.lineSpacing - 1);
2156
+ const L = d + S;
2157
+ f = E;
2158
+ for (let I = 0; I < y.length && !(i !== null && l >= i); I++) {
2159
+ const F = y[I], X = M[I];
2092
2160
  if (F == null || X == null) {
2093
2161
  console.error("Could not determine text unit or size for unit");
2094
2162
  continue;
2095
2163
  }
2096
- const { text: z, ...Y } = F;
2164
+ const { text: z, ...U } = F;
2097
2165
  let tt;
2098
2166
  if (i !== null && l + z.length > i) {
2099
- const K = i - l;
2100
- tt = z.slice(0, K);
2167
+ const Z = i - l;
2168
+ tt = z.slice(0, Z);
2101
2169
  }
2102
2170
  const et = tt ?? z;
2103
2171
  l += et.length;
2104
- const nt = { ...s, ...Y };
2105
- J0(n, nt, o), n.context.fillText(et, u, T + X.baselineShift), u += X.width;
2172
+ const nt = { ...s, ...U };
2173
+ re(n, nt, o), n.context.fillText(et, u, L + X.baselineShift), u += X.width;
2106
2174
  }
2107
- p += S;
2108
- }
2109
- }, N1 = {
2110
- [U.ARROW]: c1,
2111
- [U.CIRCLE]: g1,
2112
- [U.GROUP]: d1,
2113
- [U.IMAGE]: x1,
2114
- [U.LINE]: v1,
2115
- [U.MASK]: w1,
2116
- [U.PATH]: m1,
2117
- [U.POLYGON]: A1,
2118
- [U.RECTANGLE]: T1,
2119
- [U.SLIDE_OBJECT]: () => {
2175
+ d += E;
2176
+ }
2177
+ }, q1 = {
2178
+ [$.ARROW]: p1,
2179
+ [$.CIRCLE]: v1,
2180
+ [$.GROUP]: m1,
2181
+ [$.IMAGE]: b1,
2182
+ [$.LINE]: M1,
2183
+ [$.MASK]: L1,
2184
+ [$.PATH]: T1,
2185
+ [$.POLYGON]: P1,
2186
+ [$.RECTANGLE]: I1,
2187
+ [$.SLIDE_OBJECT]: () => {
2120
2188
  },
2121
- [U.SVG]: C1,
2122
- [U.TEXT]: O1
2189
+ [$.SVG]: k1,
2190
+ [$.TEXT]: D1
2123
2191
  };
2124
- function R1(n) {
2192
+ function z1(n) {
2125
2193
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2126
2194
  return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
2127
2195
  }
2128
- function F1(n, e) {
2196
+ function H1(n, e) {
2129
2197
  if (n === null)
2130
2198
  return null;
2131
- const t = pt(
2132
- W({ x: e.x, y: e.y }),
2199
+ const t = dt(
2200
+ Y({ x: e.x, y: e.y }),
2133
2201
  e.anchor,
2134
2202
  at({ width: e.width, height: e.height })
2135
2203
  ), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
@@ -2145,14 +2213,14 @@ function F1(n, e) {
2145
2213
  a !== null && a(), n.removeChild(o);
2146
2214
  };
2147
2215
  }
2148
- async function B1(n) {
2216
+ async function j1(n) {
2149
2217
  if (Object.keys(n).length === 0)
2150
2218
  return {};
2151
2219
  const e = {}, t = (i) => new Promise((a, s) => {
2152
2220
  const r = new Image();
2153
2221
  if (r.onload = () => a(r), r.onerror = (c) => s(c), i.includes("</svg>")) {
2154
- const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), u = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), p = URL.createObjectURL(u);
2155
- r.src = p;
2222
+ const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), u = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), d = URL.createObjectURL(u);
2223
+ r.src = d;
2156
2224
  } else
2157
2225
  r.src = i;
2158
2226
  }), o = Object.entries(n).map(async ([i, a]) => {
@@ -2169,57 +2237,57 @@ async function B1(n) {
2169
2237
  }
2170
2238
  return e;
2171
2239
  }
2172
- class Zn {
2240
+ class er {
2173
2241
  constructor(e) {
2174
2242
  this.navigator = null;
2175
2243
  const { objectRenderers: t, scale: o = 1, ...i } = e;
2176
2244
  this.props = {
2177
- presentation: Ve(),
2245
+ presentation: t1(),
2178
2246
  element: document.body,
2179
2247
  objectRenderers: {
2180
- ...N1,
2248
+ ...q1,
2181
2249
  ...t
2182
2250
  },
2183
2251
  cacheDurationMinutes: 15,
2184
- scale: D1(o),
2252
+ scale: U1(o),
2185
2253
  ...i
2186
- }, this.state = { ...T0 };
2254
+ }, this.state = { ...E0 };
2187
2255
  }
2188
2256
  /** Starts the presentation. */
2189
2257
  async present() {
2190
- const { presentation: e, element: t, scale: o } = this.props, i = a1(e.size), a = R1(e.size);
2258
+ const { presentation: e, element: t, scale: o } = this.props, i = f1(e.size), a = z1(e.size);
2191
2259
  a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
2192
- ...T0,
2193
- imageById: await B1({
2260
+ ...E0,
2261
+ imageById: await j1({
2194
2262
  ...e.resources.images,
2195
- ...r1(e)
2263
+ ...h1(e)
2196
2264
  }),
2197
2265
  canvas: i,
2198
2266
  extrasContainer: a
2199
2267
  };
2200
- const s = Ke(e, t), r = V0(t), h = (p, l) => {
2268
+ const s = n1(e, t), r = J0(t), h = (d, l) => {
2201
2269
  this.state.shortcutState.shortcuts.b = {
2202
2270
  slideIndex: this.state.slideIndex,
2203
2271
  buildIndex: this.state.buildIndex
2204
- }, this.renderSlide(p ?? this.state.slideIndex, l);
2205
- }, c = (p = !1) => {
2206
- r && (this.navigator = He({
2272
+ }, this.renderSlide(d ?? this.state.slideIndex, l);
2273
+ }, c = (d = !1) => {
2274
+ r && (this.navigator = Xe({
2207
2275
  presentation: e,
2208
2276
  shortcutState: this.state.shortcutState,
2209
2277
  onNavigateToSlide: (l) => this.renderSlide(l),
2210
2278
  onRenderSlide: h,
2211
2279
  onNext: (l) => this.next(l),
2212
2280
  onPrevious: (l) => this.previous(l),
2213
- forceRefresh: p
2281
+ forceRefresh: d
2214
2282
  }), this.updateNavigator());
2215
2283
  };
2216
- X0(
2284
+ Z0(
2217
2285
  e,
2218
2286
  s,
2219
2287
  this.state.shortcutState,
2220
2288
  {
2221
- onNext: (p) => this.next(p),
2222
- onPrevious: (p) => this.previous(p),
2289
+ onNext: (d) => this.next(d),
2290
+ onPrevious: (d) => this.previous(d),
2223
2291
  onRenderSlide: h,
2224
2292
  onShowNavigator: () => c()
2225
2293
  },
@@ -2228,12 +2296,12 @@ class Zn {
2228
2296
  keyEventTarget: r ? window : s
2229
2297
  }
2230
2298
  ), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
2231
- const u = i1(e, this.props.cacheDurationMinutes);
2232
- u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), qe() && c(!0);
2299
+ const u = l1(e, this.props.cacheDurationMinutes);
2300
+ u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), Ue() && c(!0);
2233
2301
  }
2234
2302
  renderSlide(e, t = 0, o = null) {
2235
2303
  const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
2236
- this.state.slideIndex = e, this.state.buildIndex = t, o === null && o1({ title: i.title, slideIndex: e, buildIndex: t });
2304
+ this.state.slideIndex = e, this.state.buildIndex = t, o === null && c1({ title: i.title, slideIndex: e, buildIndex: t });
2237
2305
  const r = i.slides[e];
2238
2306
  if (!(r === void 0 || a === null)) {
2239
2307
  if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
@@ -2241,7 +2309,7 @@ class Zn {
2241
2309
  h();
2242
2310
  this.state.mountedExtrasCleanups = [];
2243
2311
  for (const h of r.extras) {
2244
- const c = F1(this.state.extrasContainer, h);
2312
+ const c = H1(this.state.extrasContainer, h);
2245
2313
  c !== null && this.state.mountedExtrasCleanups.push(c);
2246
2314
  }
2247
2315
  }
@@ -2255,28 +2323,28 @@ class Zn {
2255
2323
  if (c === null)
2256
2324
  return;
2257
2325
  const u = {
2258
- type: Z.Browser,
2326
+ type: V.Browser,
2259
2327
  context: c
2260
2328
  };
2261
- s1(e, u);
2262
- const p = r.slides[t];
2263
- if (p === void 0)
2329
+ u1(e, u);
2330
+ const d = r.slides[t];
2331
+ if (d === void 0)
2264
2332
  return;
2265
- const l = n1({
2266
- slide: p,
2333
+ const l = a1({
2334
+ slide: d,
2267
2335
  buildIndex: o,
2268
2336
  buildTime: i
2269
2337
  });
2270
- u.context.fillStyle = l0(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
2338
+ u.context.fillStyle = f0(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
2271
2339
  function f(y, M) {
2272
- const P = s[y.objectType], E = l.get(y);
2273
- P === void 0 || E === void 0 || P({
2340
+ const T = s[y.objectType], S = l.get(y);
2341
+ T === void 0 || S === void 0 || T({
2274
2342
  ctx: u,
2275
2343
  imageById: h,
2276
- object: E,
2344
+ object: S,
2277
2345
  opacity: M,
2278
2346
  renderObject: f,
2279
- createPath2D: h1
2347
+ createPath2D: g1
2280
2348
  });
2281
2349
  }
2282
2350
  const v = a !== 1;
@@ -2284,7 +2352,7 @@ class Zn {
2284
2352
  e.width * (1 - a) / 2,
2285
2353
  e.height * (1 - a) / 2
2286
2354
  ), u.context.scale(a, a));
2287
- for (const y of p.objects)
2355
+ for (const y of d.objects)
2288
2356
  f(y, 1);
2289
2357
  v && u.context.restore();
2290
2358
  }
@@ -2317,8 +2385,8 @@ class Zn {
2317
2385
  return;
2318
2386
  const r = s.animations[a];
2319
2387
  if (r !== void 0 && !e) {
2320
- const h = performance.now(), c = Ze(r), u = (p) => {
2321
- const l = p - h;
2388
+ const h = performance.now(), c = e1(r), u = (d) => {
2389
+ const l = d - h;
2322
2390
  l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(u)) : this.renderSlide(i, a + 1, null);
2323
2391
  };
2324
2392
  this.state.currentAnimationId = requestAnimationFrame(u);
@@ -2347,12 +2415,12 @@ class Zn {
2347
2415
  this.props.element.style.cursor = "none", (t = (e = this.state.canvas) == null ? void 0 : e.parentElement) == null || t.style.setProperty("cursor", "none");
2348
2416
  }
2349
2417
  }
2350
- function D1(n) {
2418
+ function U1(n) {
2351
2419
  return n <= 0 || n > 1 ? (console.warn(
2352
2420
  `BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
2353
2421
  ), 1) : n;
2354
2422
  }
2355
- function Kn(n = 1e3) {
2423
+ function nr(n = 1e3) {
2356
2424
  return {
2357
2425
  type: ft.PAUSE,
2358
2426
  isKey: !1,
@@ -2360,7 +2428,7 @@ function Kn(n = 1e3) {
2360
2428
  shortcut: null
2361
2429
  };
2362
2430
  }
2363
- function Qn(n = null) {
2431
+ function rr(n = null) {
2364
2432
  return {
2365
2433
  objects: [],
2366
2434
  animations: [],
@@ -2373,32 +2441,32 @@ function Qn(n = null) {
2373
2441
  ...n
2374
2442
  };
2375
2443
  }
2376
- function Jn(n, e = {}) {
2444
+ function ir(n, e = {}) {
2377
2445
  return {
2378
2446
  ...e,
2379
2447
  text: n
2380
2448
  };
2381
2449
  }
2382
- function t2(n = G.BLACK) {
2450
+ function or(n = G.BLACK) {
2383
2451
  return { ...n, alpha: 1 };
2384
2452
  }
2385
- function q1(n) {
2453
+ function $1(n) {
2386
2454
  for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
2387
2455
  o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
2388
2456
  return a / 2;
2389
2457
  }
2390
- function z1(n) {
2458
+ function W1(n) {
2391
2459
  for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
2392
2460
  i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
2393
2461
  return h;
2394
2462
  }
2395
- function j1(n) {
2463
+ function Y1(n) {
2396
2464
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2397
2465
  }
2398
- var Ht, C0;
2399
- function H1() {
2400
- if (C0) return Ht;
2401
- C0 = 1;
2466
+ var Ut, I0;
2467
+ function X1() {
2468
+ if (I0) return Ut;
2469
+ I0 = 1;
2402
2470
  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 = [
2403
2471
  5760,
2404
2472
  6158,
@@ -2472,35 +2540,35 @@ function H1() {
2472
2540
  f.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + f.index + ")";
2473
2541
  }
2474
2542
  function u(f) {
2475
- var v = f.index, y = v, M = f.max, P = !1, E = !1, L = !1, S = !1, T;
2543
+ var v = f.index, y = v, M = f.max, T = !1, S = !1, P = !1, E = !1, L;
2476
2544
  if (y >= M) {
2477
2545
  f.err = "SvgPath: missed param (at pos " + y + ")";
2478
2546
  return;
2479
2547
  }
2480
- if (T = f.path.charCodeAt(y), (T === 43 || T === 45) && (y++, T = y < M ? f.path.charCodeAt(y) : 0), !a(T) && T !== 46) {
2548
+ if (L = f.path.charCodeAt(y), (L === 43 || L === 45) && (y++, L = y < M ? f.path.charCodeAt(y) : 0), !a(L) && L !== 46) {
2481
2549
  f.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
2482
2550
  return;
2483
2551
  }
2484
- if (T !== 46) {
2485
- if (P = T === 48, y++, T = y < M ? f.path.charCodeAt(y) : 0, P && y < M && T && a(T)) {
2552
+ if (L !== 46) {
2553
+ if (T = L === 48, y++, L = y < M ? f.path.charCodeAt(y) : 0, T && y < M && L && a(L)) {
2486
2554
  f.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + v + ")";
2487
2555
  return;
2488
2556
  }
2489
2557
  for (; y < M && a(f.path.charCodeAt(y)); )
2490
- y++, E = !0;
2491
- T = y < M ? f.path.charCodeAt(y) : 0;
2558
+ y++, S = !0;
2559
+ L = y < M ? f.path.charCodeAt(y) : 0;
2492
2560
  }
2493
- if (T === 46) {
2494
- for (S = !0, y++; a(f.path.charCodeAt(y)); )
2495
- y++, L = !0;
2496
- T = y < M ? f.path.charCodeAt(y) : 0;
2561
+ if (L === 46) {
2562
+ for (E = !0, y++; a(f.path.charCodeAt(y)); )
2563
+ y++, P = !0;
2564
+ L = y < M ? f.path.charCodeAt(y) : 0;
2497
2565
  }
2498
- if (T === 101 || T === 69) {
2499
- if (S && !E && !L) {
2566
+ if (L === 101 || L === 69) {
2567
+ if (E && !S && !P) {
2500
2568
  f.err = "SvgPath: invalid float exponent (at pos " + y + ")";
2501
2569
  return;
2502
2570
  }
2503
- if (y++, T = y < M ? f.path.charCodeAt(y) : 0, (T === 43 || T === 45) && y++, y < M && a(f.path.charCodeAt(y)))
2571
+ if (y++, L = y < M ? f.path.charCodeAt(y) : 0, (L === 43 || L === 45) && y++, y < M && a(f.path.charCodeAt(y)))
2504
2572
  for (; y < M && a(f.path.charCodeAt(y)); )
2505
2573
  y++;
2506
2574
  else {
@@ -2510,7 +2578,7 @@ function H1() {
2510
2578
  }
2511
2579
  f.index = y, f.param = parseFloat(f.path.slice(v, y)) + 0;
2512
2580
  }
2513
- function p(f) {
2581
+ function d(f) {
2514
2582
  var v, y;
2515
2583
  v = f.path[f.segmentStart], y = v.toLowerCase();
2516
2584
  var M = f.data;
@@ -2521,29 +2589,29 @@ function H1() {
2521
2589
  ;
2522
2590
  }
2523
2591
  function l(f) {
2524
- var v = f.max, y, M, P, E, L;
2592
+ var v = f.max, y, M, T, S, P;
2525
2593
  if (f.segmentStart = f.index, y = f.path.charCodeAt(f.index), M = i(y), !o(y)) {
2526
2594
  f.err = "SvgPath: bad command " + f.path[f.index] + " (at pos " + f.index + ")";
2527
2595
  return;
2528
2596
  }
2529
- if (E = n[f.path[f.index].toLowerCase()], f.index++, h(f), f.data = [], !E) {
2530
- p(f);
2597
+ if (S = n[f.path[f.index].toLowerCase()], f.index++, h(f), f.data = [], !S) {
2598
+ d(f);
2531
2599
  return;
2532
2600
  }
2533
- for (P = !1; ; ) {
2534
- for (L = E; L > 0; L--) {
2535
- if (M && (L === 3 || L === 4) ? c(f) : u(f), f.err.length) {
2536
- p(f);
2601
+ for (T = !1; ; ) {
2602
+ for (P = S; P > 0; P--) {
2603
+ if (M && (P === 3 || P === 4) ? c(f) : u(f), f.err.length) {
2604
+ d(f);
2537
2605
  return;
2538
2606
  }
2539
- f.data.push(f.param), h(f), P = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, h(f), P = !0);
2607
+ f.data.push(f.param), h(f), T = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, h(f), T = !0);
2540
2608
  }
2541
- if (!P && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2609
+ if (!T && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2542
2610
  break;
2543
2611
  }
2544
- p(f);
2612
+ d(f);
2545
2613
  }
2546
- return Ht = function(v) {
2614
+ return Ut = function(v) {
2547
2615
  var y = new r(v), M = y.max;
2548
2616
  for (h(y); y.index < M && !y.err.length; )
2549
2617
  l(y);
@@ -2551,12 +2619,12 @@ function H1() {
2551
2619
  err: y.err,
2552
2620
  segments: y.result
2553
2621
  };
2554
- }, Ht;
2622
+ }, Ut;
2555
2623
  }
2556
- var Ut, P0;
2557
- function te() {
2558
- if (P0) return Ut;
2559
- P0 = 1;
2624
+ var $t, k0;
2625
+ function ie() {
2626
+ if (k0) return $t;
2627
+ k0 = 1;
2560
2628
  function n(t, o) {
2561
2629
  return [
2562
2630
  t[0] * o[0] + t[2] * o[1],
@@ -2601,13 +2669,13 @@ function te() {
2601
2669
  t * a[0] + o * a[2] + (i ? 0 : a[4]),
2602
2670
  t * a[1] + o * a[3] + (i ? 0 : a[5])
2603
2671
  ]) : [t, o];
2604
- }, Ut = e, Ut;
2672
+ }, $t = e, $t;
2605
2673
  }
2606
- var $t, E0;
2607
- function U1() {
2608
- if (E0) return $t;
2609
- E0 = 1;
2610
- var n = te(), e = {
2674
+ var Wt, _0;
2675
+ function G1() {
2676
+ if (_0) return Wt;
2677
+ _0 = 1;
2678
+ var n = ie(), e = {
2611
2679
  matrix: !0,
2612
2680
  scale: !0,
2613
2681
  rotate: !0,
@@ -2615,7 +2683,7 @@ function U1() {
2615
2683
  skewX: !0,
2616
2684
  skewY: !0
2617
2685
  }, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
2618
- return $t = function(a) {
2686
+ return Wt = function(a) {
2619
2687
  var s = new n(), r, h;
2620
2688
  return a.split(t).forEach(function(c) {
2621
2689
  if (c.length) {
@@ -2647,55 +2715,55 @@ function U1() {
2647
2715
  }
2648
2716
  }
2649
2717
  }), s;
2650
- }, $t;
2718
+ }, Wt;
2651
2719
  }
2652
- var Yt, S0;
2653
- function $1() {
2654
- if (S0) return Yt;
2655
- S0 = 1;
2720
+ var Yt, O0;
2721
+ function K1() {
2722
+ if (O0) return Yt;
2723
+ O0 = 1;
2656
2724
  var n = Math.PI * 2;
2657
2725
  function e(i, a, s, r) {
2658
2726
  var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
2659
2727
  return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
2660
2728
  }
2661
- function t(i, a, s, r, h, c, u, p, l, f) {
2662
- var v = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = u * u, P = p * p, E = v * v, L = y * y, S = M * P - M * L - P * E;
2663
- S < 0 && (S = 0), S /= M * L + P * E, S = Math.sqrt(S) * (h === c ? -1 : 1);
2664
- var T = S * u / p * y, k = S * -p / u * v, F = f * T - l * k + (i + s) / 2, X = l * T + f * k + (a + r) / 2, z = (v - T) / u, Y = (y - k) / p, tt = (-v - T) / u, et = (-y - k) / p, nt = e(1, 0, z, Y), K = e(z, Y, tt, et);
2665
- return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [F, X, nt, K];
2729
+ function t(i, a, s, r, h, c, u, d, l, f) {
2730
+ var v = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = u * u, T = d * d, S = v * v, P = y * y, E = M * T - M * P - T * S;
2731
+ E < 0 && (E = 0), E /= M * P + T * S, E = Math.sqrt(E) * (h === c ? -1 : 1);
2732
+ var L = E * u / d * y, I = E * -d / u * v, F = f * L - l * I + (i + s) / 2, X = l * L + f * I + (a + r) / 2, z = (v - L) / u, U = (y - I) / d, tt = (-v - L) / u, et = (-y - I) / d, nt = e(1, 0, z, U), Z = e(z, U, tt, et);
2733
+ return c === 0 && Z > 0 && (Z -= n), c === 1 && Z < 0 && (Z += n), [F, X, nt, Z];
2666
2734
  }
2667
2735
  function o(i, a) {
2668
2736
  var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), u = Math.sin(i + a);
2669
2737
  return [r, h, r - h * s, h + r * s, c + u * s, u - c * s, c, u];
2670
2738
  }
2671
- return Yt = function(a, s, r, h, c, u, p, l, f) {
2672
- var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + v * (s - h) / 2, P = -v * (a - r) / 2 + y * (s - h) / 2;
2673
- if (M === 0 && P === 0)
2739
+ return Yt = function(a, s, r, h, c, u, d, l, f) {
2740
+ var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + v * (s - h) / 2, T = -v * (a - r) / 2 + y * (s - h) / 2;
2741
+ if (M === 0 && T === 0)
2674
2742
  return [];
2675
- if (p === 0 || l === 0)
2743
+ if (d === 0 || l === 0)
2676
2744
  return [];
2677
- p = Math.abs(p), l = Math.abs(l);
2678
- var E = M * M / (p * p) + P * P / (l * l);
2679
- E > 1 && (p *= Math.sqrt(E), l *= Math.sqrt(E));
2680
- var L = t(a, s, r, h, c, u, p, l, v, y), S = [], T = L[2], k = L[3], F = Math.max(Math.ceil(Math.abs(k) / (n / 4)), 1);
2681
- k /= F;
2745
+ d = Math.abs(d), l = Math.abs(l);
2746
+ var S = M * M / (d * d) + T * T / (l * l);
2747
+ S > 1 && (d *= Math.sqrt(S), l *= Math.sqrt(S));
2748
+ var P = t(a, s, r, h, c, u, d, l, v, y), E = [], L = P[2], I = P[3], F = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
2749
+ I /= F;
2682
2750
  for (var X = 0; X < F; X++)
2683
- S.push(o(T, k)), T += k;
2684
- return S.map(function(z) {
2685
- for (var Y = 0; Y < z.length; Y += 2) {
2686
- var tt = z[Y + 0], et = z[Y + 1];
2687
- tt *= p, et *= l;
2688
- var nt = y * tt - v * et, K = v * tt + y * et;
2689
- z[Y + 0] = nt + L[0], z[Y + 1] = K + L[1];
2751
+ E.push(o(L, I)), L += I;
2752
+ return E.map(function(z) {
2753
+ for (var U = 0; U < z.length; U += 2) {
2754
+ var tt = z[U + 0], et = z[U + 1];
2755
+ tt *= d, et *= l;
2756
+ var nt = y * tt - v * et, Z = v * tt + y * et;
2757
+ z[U + 0] = nt + P[0], z[U + 1] = Z + P[1];
2690
2758
  }
2691
2759
  return z;
2692
2760
  });
2693
2761
  }, Yt;
2694
2762
  }
2695
- var Wt, k0;
2696
- function Y1() {
2697
- if (k0) return Wt;
2698
- k0 = 1;
2763
+ var Xt, N0;
2764
+ function V1() {
2765
+ if (N0) return Xt;
2766
+ N0 = 1;
2699
2767
  var n = 1e-10, e = Math.PI / 180;
2700
2768
  function t(o, i, a) {
2701
2769
  if (!(this instanceof t))
@@ -2711,21 +2779,21 @@ function Y1() {
2711
2779
  ], r = s[0] * s[0] + s[2] * s[2], h = s[1] * s[1] + s[3] * s[3], c = ((s[0] - s[3]) * (s[0] - s[3]) + (s[2] + s[1]) * (s[2] + s[1])) * ((s[0] + s[3]) * (s[0] + s[3]) + (s[2] - s[1]) * (s[2] - s[1])), u = (r + h) / 2;
2712
2780
  if (c < n * u)
2713
2781
  return this.rx = this.ry = Math.sqrt(u), this.ax = 0, this;
2714
- var p = s[0] * s[1] + s[2] * s[3];
2782
+ var d = s[0] * s[1] + s[2] * s[3];
2715
2783
  c = Math.sqrt(c);
2716
2784
  var l = u + c / 2, f = u - c / 2;
2717
- return this.ax = Math.abs(p) < n && Math.abs(l - h) < n ? 90 : Math.atan(
2718
- Math.abs(p) > Math.abs(l - h) ? (l - r) / p : p / (l - h)
2785
+ return this.ax = Math.abs(d) < n && Math.abs(l - h) < n ? 90 : Math.atan(
2786
+ Math.abs(d) > Math.abs(l - h) ? (l - r) / d : d / (l - h)
2719
2787
  ) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(f)) : (this.ax += 90, this.rx = Math.sqrt(f), this.ry = Math.sqrt(l)), this;
2720
2788
  }, t.prototype.isDegenerate = function() {
2721
2789
  return this.rx < n * this.ry || this.ry < n * this.rx;
2722
- }, Wt = t, Wt;
2790
+ }, Xt = t, Xt;
2723
2791
  }
2724
- var Xt, I0;
2725
- function W1() {
2726
- if (I0) return Xt;
2727
- I0 = 1;
2728
- var n = H1(), e = U1(), t = te(), o = $1(), i = Y1();
2792
+ var Gt, R0;
2793
+ function Z1() {
2794
+ if (R0) return Gt;
2795
+ R0 = 1;
2796
+ var n = X1(), e = G1(), t = ie(), o = K1(), i = V1();
2729
2797
  function a(s) {
2730
2798
  if (!(this instanceof a))
2731
2799
  return new a(s);
@@ -2745,7 +2813,7 @@ function W1() {
2745
2813
  throw new Error("SvgPath.from: invalid param type " + s);
2746
2814
  }, a.prototype.__matrix = function(s) {
2747
2815
  var r = this, h;
2748
- s.queue.length && this.iterate(function(c, u, p, l) {
2816
+ s.queue.length && this.iterate(function(c, u, d, l) {
2749
2817
  var f, v, y, M;
2750
2818
  switch (c[0]) {
2751
2819
  // Process 'assymetric' commands separately
@@ -2753,22 +2821,22 @@ function W1() {
2753
2821
  f = s.calc(0, c[1], !0), v = f[0] === 0 ? ["v", f[1]] : ["l", f[0], f[1]];
2754
2822
  break;
2755
2823
  case "V":
2756
- f = s.calc(p, c[1], !1), v = f[0] === s.calc(p, l, !1)[0] ? ["V", f[1]] : ["L", f[0], f[1]];
2824
+ f = s.calc(d, c[1], !1), v = f[0] === s.calc(d, l, !1)[0] ? ["V", f[1]] : ["L", f[0], f[1]];
2757
2825
  break;
2758
2826
  case "h":
2759
2827
  f = s.calc(c[1], 0, !0), v = f[1] === 0 ? ["h", f[0]] : ["l", f[0], f[1]];
2760
2828
  break;
2761
2829
  case "H":
2762
- f = s.calc(c[1], l, !1), v = f[1] === s.calc(p, l, !1)[1] ? ["H", f[0]] : ["L", f[0], f[1]];
2830
+ f = s.calc(c[1], l, !1), v = f[1] === s.calc(d, l, !1)[1] ? ["H", f[0]] : ["L", f[0], f[1]];
2763
2831
  break;
2764
2832
  case "a":
2765
2833
  case "A":
2766
- var P = s.toArray(), E = i(c[1], c[2], c[3]).transform(P);
2767
- if (P[0] * P[3] - P[1] * P[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === p && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
2834
+ var T = s.toArray(), S = i(c[1], c[2], c[3]).transform(T);
2835
+ if (T[0] * T[3] - T[1] * T[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = 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) {
2768
2836
  v = [c[0] === "a" ? "l" : "L", f[0], f[1]];
2769
2837
  break;
2770
2838
  }
2771
- E.isDegenerate() ? v = [c[0] === "a" ? "l" : "L", f[0], f[1]] : v = [c[0], E.rx, E.ry, E.ax, c[4], c[5], f[0], f[1]];
2839
+ S.isDegenerate() ? v = [c[0] === "a" ? "l" : "L", f[0], f[1]] : v = [c[0], S.rx, S.ry, S.ax, c[4], c[5], f[0], f[1]];
2772
2840
  break;
2773
2841
  case "m":
2774
2842
  M = u > 0, f = s.calc(c[1], c[2], M), v = ["m", f[0], f[1]];
@@ -2794,10 +2862,10 @@ function W1() {
2794
2862
  var s = "", r = "", h = !1;
2795
2863
  this.__evaluateStack();
2796
2864
  for (var c = 0, u = this.segments.length; c < u; c++) {
2797
- var p = this.segments[c], l = p[0];
2865
+ var d = this.segments[c], l = d[0];
2798
2866
  l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
2799
- for (var f = 1; f < p.length; f++) {
2800
- var v = p[f];
2867
+ for (var f = 1; f < d.length; f++) {
2868
+ var v = d[f];
2801
2869
  f === 1 ? h && v >= 0 && (s += " ") : v >= 0 && (s += " "), s += v;
2802
2870
  }
2803
2871
  r = l;
@@ -2818,7 +2886,7 @@ function W1() {
2818
2886
  }, a.prototype.transform = function(s) {
2819
2887
  return s.trim() ? (this.__stack.push(e(s)), this) : this;
2820
2888
  }, a.prototype.round = function(s) {
2821
- var r = 0, h = 0, c = 0, u = 0, p;
2889
+ var r = 0, h = 0, c = 0, u = 0, d;
2822
2890
  return s = s || 0, this.__evaluateStack(), this.segments.forEach(function(l) {
2823
2891
  var f = l[0].toLowerCase() === l[0];
2824
2892
  switch (l[0]) {
@@ -2843,52 +2911,52 @@ function W1() {
2843
2911
  f && (l[6] += c, l[7] += u), c = l[6] - l[6].toFixed(s), u = l[7] - l[7].toFixed(s), l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s), l[3] = +l[3].toFixed(s + 2), l[6] = +l[6].toFixed(s), l[7] = +l[7].toFixed(s);
2844
2912
  return;
2845
2913
  default:
2846
- p = l.length, f && (l[p - 2] += c, l[p - 1] += u), c = l[p - 2] - l[p - 2].toFixed(s), u = l[p - 1] - l[p - 1].toFixed(s), l.forEach(function(v, y) {
2914
+ d = l.length, f && (l[d - 2] += c, l[d - 1] += u), c = l[d - 2] - l[d - 2].toFixed(s), u = l[d - 1] - l[d - 1].toFixed(s), l.forEach(function(v, y) {
2847
2915
  y && (l[y] = +l[y].toFixed(s));
2848
2916
  });
2849
2917
  return;
2850
2918
  }
2851
2919
  }), this;
2852
2920
  }, a.prototype.iterate = function(s, r) {
2853
- var h = this.segments, c = {}, u = !1, p = 0, l = 0, f = 0, v = 0, y, M, P;
2854
- if (r || this.__evaluateStack(), h.forEach(function(E, L) {
2855
- var S = s(E, L, p, l);
2856
- Array.isArray(S) && (c[L] = S, u = !0);
2857
- var T = E[0] === E[0].toLowerCase();
2858
- switch (E[0]) {
2921
+ var h = this.segments, c = {}, u = !1, d = 0, l = 0, f = 0, v = 0, y, M, T;
2922
+ if (r || this.__evaluateStack(), h.forEach(function(S, P) {
2923
+ var E = s(S, P, d, l);
2924
+ Array.isArray(E) && (c[P] = E, u = !0);
2925
+ var L = S[0] === S[0].toLowerCase();
2926
+ switch (S[0]) {
2859
2927
  case "m":
2860
2928
  case "M":
2861
- p = E[1] + (T ? p : 0), l = E[2] + (T ? l : 0), f = p, v = l;
2929
+ d = S[1] + (L ? d : 0), l = S[2] + (L ? l : 0), f = d, v = l;
2862
2930
  return;
2863
2931
  case "h":
2864
2932
  case "H":
2865
- p = E[1] + (T ? p : 0);
2933
+ d = S[1] + (L ? d : 0);
2866
2934
  return;
2867
2935
  case "v":
2868
2936
  case "V":
2869
- l = E[1] + (T ? l : 0);
2937
+ l = S[1] + (L ? l : 0);
2870
2938
  return;
2871
2939
  case "z":
2872
2940
  case "Z":
2873
- p = f, l = v;
2941
+ d = f, l = v;
2874
2942
  return;
2875
2943
  default:
2876
- p = E[E.length - 2] + (T ? p : 0), l = E[E.length - 1] + (T ? l : 0);
2944
+ d = S[S.length - 2] + (L ? d : 0), l = S[S.length - 1] + (L ? l : 0);
2877
2945
  }
2878
2946
  }), !u)
2879
2947
  return this;
2880
- for (P = [], y = 0; y < h.length; y++)
2948
+ for (T = [], y = 0; y < h.length; y++)
2881
2949
  if (typeof c[y] < "u")
2882
2950
  for (M = 0; M < c[y].length; M++)
2883
- P.push(c[y][M]);
2951
+ T.push(c[y][M]);
2884
2952
  else
2885
- P.push(h[y]);
2886
- return this.segments = P, this;
2953
+ T.push(h[y]);
2954
+ return this.segments = T, this;
2887
2955
  }, a.prototype.abs = function() {
2888
2956
  return this.iterate(function(s, r, h, c) {
2889
- var u = s[0], p = u.toUpperCase(), l;
2890
- if (u !== p)
2891
- switch (s[0] = p, u) {
2957
+ var u = s[0], d = u.toUpperCase(), l;
2958
+ if (u !== d)
2959
+ switch (s[0] = d, u) {
2892
2960
  case "v":
2893
2961
  s[1] += c;
2894
2962
  return;
@@ -2902,9 +2970,9 @@ function W1() {
2902
2970
  }, !0), this;
2903
2971
  }, a.prototype.rel = function() {
2904
2972
  return this.iterate(function(s, r, h, c) {
2905
- var u = s[0], p = u.toLowerCase(), l;
2906
- if (u !== p && !(r === 0 && u === "M"))
2907
- switch (s[0] = p, u) {
2973
+ var u = s[0], d = u.toLowerCase(), l;
2974
+ if (u !== d && !(r === 0 && u === "M"))
2975
+ switch (s[0] = d, u) {
2908
2976
  case "V":
2909
2977
  s[1] -= c;
2910
2978
  return;
@@ -2918,45 +2986,45 @@ function W1() {
2918
2986
  }, !0), this;
2919
2987
  }, a.prototype.unarc = function() {
2920
2988
  return this.iterate(function(s, r, h, c) {
2921
- var u, p, l, f = [], v = s[0];
2922
- return v !== "A" && v !== "a" ? null : (v === "a" ? (p = h + s[6], l = c + s[7]) : (p = s[6], l = s[7]), u = o(h, c, p, l, s[4], s[5], s[1], s[2], s[3]), u.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (u.forEach(function(y) {
2989
+ var u, d, l, f = [], v = s[0];
2990
+ return v !== "A" && v !== "a" ? null : (v === "a" ? (d = h + s[6], l = c + s[7]) : (d = s[6], l = s[7]), u = o(h, c, d, l, s[4], s[5], s[1], s[2], s[3]), u.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (u.forEach(function(y) {
2923
2991
  f.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
2924
2992
  }), f));
2925
2993
  }), this;
2926
2994
  }, a.prototype.unshort = function() {
2927
- var s = this.segments, r, h, c, u, p;
2995
+ var s = this.segments, r, h, c, u, d;
2928
2996
  return this.iterate(function(l, f, v, y) {
2929
- var M = l[0], P = M.toUpperCase(), E;
2930
- f && (P === "T" ? (E = M === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), u = -r, p = -h, E || (u += v, p += y), s[f] = [
2931
- E ? "q" : "Q",
2997
+ var M = l[0], T = M.toUpperCase(), S;
2998
+ f && (T === "T" ? (S = M === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), u = -r, d = -h, S || (u += v, d += y), s[f] = [
2999
+ S ? "q" : "Q",
2932
3000
  u,
2933
- p,
3001
+ d,
2934
3002
  l[1],
2935
3003
  l[2]
2936
- ]) : P === "S" && (E = M === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), u = -r, p = -h, E || (u += v, p += y), s[f] = [
2937
- E ? "c" : "C",
3004
+ ]) : T === "S" && (S = M === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), u = -r, d = -h, S || (u += v, d += y), s[f] = [
3005
+ S ? "c" : "C",
2938
3006
  u,
2939
- p,
3007
+ d,
2940
3008
  l[1],
2941
3009
  l[2],
2942
3010
  l[3],
2943
3011
  l[4]
2944
3012
  ]));
2945
3013
  }), this;
2946
- }, Xt = a, Xt;
3014
+ }, Gt = a, Gt;
2947
3015
  }
2948
- var Gt, _0;
2949
- function X1() {
2950
- return _0 || (_0 = 1, Gt = W1()), Gt;
3016
+ var Kt, F0;
3017
+ function Q1() {
3018
+ return F0 || (F0 = 1, Kt = Z1()), Kt;
2951
3019
  }
2952
- var G1 = X1();
2953
- const V1 = /* @__PURE__ */ j1(G1);
2954
- var Vt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Z1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
2955
- function K1(n) {
3020
+ var J1 = Q1();
3021
+ const tn = /* @__PURE__ */ Y1(J1);
3022
+ var Vt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, en = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
3023
+ function nn(n) {
2956
3024
  var e = [];
2957
- return n.replace(Z1, function(t, o, i) {
3025
+ return n.replace(en, function(t, o, i) {
2958
3026
  var a = o.toLowerCase();
2959
- for (i = J1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
3027
+ for (i = on(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
2960
3028
  if (i.length === Vt[a])
2961
3029
  return i.unshift(o), e.push(i);
2962
3030
  if (i.length < Vt[a])
@@ -2965,19 +3033,19 @@ function K1(n) {
2965
3033
  }
2966
3034
  }), e;
2967
3035
  }
2968
- var Q1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
2969
- function J1(n) {
2970
- var e = n.match(Q1);
3036
+ var rn = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
3037
+ function on(n) {
3038
+ var e = n.match(rn);
2971
3039
  return e ? e.map(Number) : [];
2972
3040
  }
2973
3041
  function it(n, e, t, o, i, a, s, r) {
2974
- return new t0(n, e, t, o, i, a, s, r);
3042
+ return new e0(n, e, t, o, i, a, s, r);
2975
3043
  }
2976
- function t0(n, e, t, o, i, a, s, r) {
2977
- 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 = cn, this.getPoint = nn, this.getDerivative = en) : (this.getArcLength = rn, this.getPoint = ee, this.getDerivative = tn), this.init();
3044
+ function e0(n, e, t, o, i, a, s, r) {
3045
+ 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 = pn, this.getPoint = hn, this.getDerivative = an) : (this.getArcLength = ln, this.getPoint = oe, this.getDerivative = sn), this.init();
2978
3046
  }
2979
- t0.prototype = {
2980
- constructor: t0,
3047
+ e0.prototype = {
3048
+ constructor: e0,
2981
3049
  init: function() {
2982
3050
  this.length = this.getArcLength(
2983
3051
  [this.a.x, this.b.x, this.c.x, this.d.x],
@@ -3036,14 +3104,14 @@ t0.prototype = {
3036
3104
  return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
3037
3105
  }
3038
3106
  };
3039
- function tn(n, e, t) {
3107
+ function sn(n, e, t) {
3040
3108
  return {
3041
3109
  x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
3042
3110
  y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
3043
3111
  };
3044
3112
  }
3045
- function en(n, e, t) {
3046
- var o = ee(
3113
+ function an(n, e, t) {
3114
+ var o = oe(
3047
3115
  [3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
3048
3116
  [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
3049
3117
  t
@@ -3052,30 +3120,30 @@ function en(n, e, t) {
3052
3120
  }
3053
3121
  function Zt(n, e, t, o, i) {
3054
3122
  for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
3055
- var h = t(o, i, s + r), c = t(o, i, s - r), u = Math.abs(n - h) / e, p = Math.abs(n - c) / e;
3056
- u < a ? (a = u, s += r) : p < a ? (a = p, s -= r) : r /= 2;
3123
+ var h = t(o, i, s + r), c = t(o, i, s - r), u = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
3124
+ u < a ? (a = u, s += r) : d < a ? (a = d, s -= r) : r /= 2;
3057
3125
  }
3058
3126
  return s;
3059
3127
  }
3060
- function ee(n, e, t) {
3128
+ function oe(n, e, t) {
3061
3129
  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];
3062
3130
  return { x: o, y: i };
3063
3131
  }
3064
- function nn(n, e, t) {
3132
+ function hn(n, e, t) {
3065
3133
  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];
3066
3134
  return { x: o, y: i };
3067
3135
  }
3068
- function rn(n, e, t) {
3136
+ function ln(n, e, t) {
3069
3137
  t === void 0 && (t = 1);
3070
3138
  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;
3071
3139
  if (r === 0)
3072
3140
  return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
3073
- var u = h / (2 * r), p = c / r, l = t + u, f = p - u * u;
3141
+ var u = h / (2 * r), d = c / r, l = t + u, f = d - u * u;
3074
3142
  return Math.sqrt(r) / 2 * (l * Math.sqrt(l * l + f) - u * Math.sqrt(u * u + f) + f * Math.log(Math.abs(
3075
3143
  (l + Math.sqrt(l * l + f)) / (u + Math.sqrt(u * u + f))
3076
3144
  )));
3077
3145
  }
3078
- var on = [
3146
+ var cn = [
3079
3147
  [],
3080
3148
  [],
3081
3149
  [-0.5773502691896257, 0.5773502691896257],
@@ -3101,7 +3169,7 @@ var on = [
3101
3169
  [-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],
3102
3170
  [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],
3103
3171
  [-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]
3104
- ], sn = [
3172
+ ], un = [
3105
3173
  [],
3106
3174
  [],
3107
3175
  [1, 1],
@@ -3127,86 +3195,86 @@ var on = [
3127
3195
  [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],
3128
3196
  [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],
3129
3197
  [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]
3130
- ], an = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3131
- function hn(n, e) {
3132
- return an[n][e];
3198
+ ], fn = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3199
+ function gn(n, e) {
3200
+ return fn[n][e];
3133
3201
  }
3134
- function e0(n, e, t) {
3202
+ function n0(n, e, t) {
3135
3203
  var o = t.length - 1, i, a, s;
3136
3204
  if (o === 0)
3137
3205
  return 0;
3138
3206
  if (n === 0) {
3139
3207
  for (a = 0, s = 0; s <= o; s++)
3140
- a += hn(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3208
+ a += gn(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3141
3209
  return a;
3142
3210
  } else {
3143
3211
  for (i = new Array(o), s = 0; s < o; s++)
3144
3212
  i[s] = o * (t[s + 1] - t[s]);
3145
- return e0(n - 1, e, i);
3213
+ return n0(n - 1, e, i);
3146
3214
  }
3147
3215
  }
3148
- function ln(n, e, t) {
3149
- var o = e0(1, t, n), i = e0(1, t, e), a = o * o + i * i;
3216
+ function dn(n, e, t) {
3217
+ var o = n0(1, t, n), i = n0(1, t, e), a = o * o + i * i;
3150
3218
  return Math.sqrt(a);
3151
3219
  }
3152
- function cn(n, e, t) {
3220
+ function pn(n, e, t) {
3153
3221
  var o, i, a, s;
3154
3222
  t === void 0 && (t = 1);
3155
3223
  var r = 20;
3156
3224
  for (o = t / 2, i = 0, a = 0; a < r; a++)
3157
- s = o * on[r][a] + o, i += sn[r][a] * ln(n, e, s);
3225
+ s = o * cn[r][a] + o, i += un[r][a] * dn(n, e, s);
3158
3226
  return o * i;
3159
3227
  }
3160
3228
  var Et = Math.PI * 2;
3161
- function O0(n, e, t, o) {
3229
+ function B0(n, e, t, o) {
3162
3230
  var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
3163
3231
  return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
3164
3232
  }
3165
- function un(n, e, t, o, i, a, s, r, h, c) {
3166
- var u = c * (n - t) / 2 + h * (e - o) / 2, p = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, f = r * r, v = u * u, y = p * p, M = l * f - l * y - f * v;
3233
+ function xn(n, e, t, o, i, a, s, r, h, c) {
3234
+ var u = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, f = r * r, v = u * u, y = d * d, M = l * f - l * y - f * v;
3167
3235
  M < 0 && (M = 0), M /= l * y + f * v, M = Math.sqrt(M) * (i === a ? -1 : 1);
3168
- var P = M * s / r * p, E = M * -r / s * u, L = c * P - h * E + (n + t) / 2, S = h * P + c * E + (e + o) / 2, T = (u - P) / s, k = (p - E) / r, F = (-u - P) / s, X = (-p - E) / r, z = O0(1, 0, T, k), Y = O0(T, k, F, X);
3169
- return a === 0 && Y > 0 && (Y -= Et), a === 1 && Y < 0 && (Y += Et), [L, S, z, Y];
3236
+ var T = M * s / r * d, S = M * -r / s * u, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, L = (u - T) / s, I = (d - S) / r, F = (-u - T) / s, X = (-d - S) / r, z = B0(1, 0, L, I), U = B0(L, I, F, X);
3237
+ return a === 0 && U > 0 && (U -= Et), a === 1 && U < 0 && (U += Et), [P, E, z, U];
3170
3238
  }
3171
- function fn(n, e) {
3239
+ function yn(n, e) {
3172
3240
  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);
3173
3241
  return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
3174
3242
  }
3175
- function gn(n, e, t, o, i, a, s, r, h) {
3176
- var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), p = u * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + u * (e - h) / 2;
3177
- if (p === 0 && l === 0)
3243
+ function vn(n, e, t, o, i, a, s, r, h) {
3244
+ var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), d = u * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + u * (e - h) / 2;
3245
+ if (d === 0 && l === 0)
3178
3246
  return [];
3179
3247
  if (t === 0 || o === 0)
3180
3248
  return [];
3181
3249
  t = Math.abs(t), o = Math.abs(o);
3182
- var f = p * p / (t * t) + l * l / (o * o);
3250
+ var f = d * d / (t * t) + l * l / (o * o);
3183
3251
  f > 1 && (t *= Math.sqrt(f), o *= Math.sqrt(f));
3184
- var v = un(n, e, r, h, a, s, t, o, c, u), y = [], M = v[2], P = v[3], E = Math.max(Math.ceil(Math.abs(P) / (Et / 4)), 1);
3185
- P /= E;
3186
- for (var L = 0; L < E; L++)
3187
- y.push(fn(M, P)), M += P;
3188
- return y.map(function(S) {
3189
- for (var T = 0; T < S.length; T += 2) {
3190
- var k = S[T + 0], F = S[T + 1];
3191
- k *= t, F *= o;
3192
- var X = u * k - c * F, z = c * k + u * F;
3193
- S[T + 0] = X + v[0], S[T + 1] = z + v[1];
3252
+ var v = xn(n, e, r, h, a, s, t, o, c, u), y = [], M = v[2], T = v[3], S = Math.max(Math.ceil(Math.abs(T) / (Et / 4)), 1);
3253
+ T /= S;
3254
+ for (var P = 0; P < S; P++)
3255
+ y.push(yn(M, T)), M += T;
3256
+ return y.map(function(E) {
3257
+ for (var L = 0; L < E.length; L += 2) {
3258
+ var I = E[L + 0], F = E[L + 1];
3259
+ I *= t, F *= o;
3260
+ var X = u * I - c * F, z = c * I + u * F;
3261
+ E[L + 0] = X + v[0], E[L + 1] = z + v[1];
3194
3262
  }
3195
- return S;
3263
+ return E;
3196
3264
  });
3197
3265
  }
3198
- function N0(n, e, t, o, i, a, s, r, h) {
3199
- return new n0(n, e, t, o, i, a, s, r, h);
3266
+ function D0(n, e, t, o, i, a, s, r, h) {
3267
+ return new r0(n, e, t, o, i, a, s, r, h);
3200
3268
  }
3201
- function n0(n, e, t, o, i, a, s, r, h) {
3202
- var c = 0, u = [], p = [], l = gn(n, e, t, o, i, a, s, r, h);
3269
+ function r0(n, e, t, o, i, a, s, r, h) {
3270
+ var c = 0, u = [], d = [], l = vn(n, e, t, o, i, a, s, r, h);
3203
3271
  l.forEach(function(f) {
3204
3272
  var v = new it(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
3205
- c += y, u.push(y), p.push(v);
3206
- }), this.length = c, this.partialLengths = u, this.curves = p;
3273
+ c += y, u.push(y), d.push(v);
3274
+ }), this.length = c, this.partialLengths = u, this.curves = d;
3207
3275
  }
3208
- n0.prototype = {
3209
- constructor: n0,
3276
+ r0.prototype = {
3277
+ constructor: r0,
3210
3278
  init: function() {
3211
3279
  },
3212
3280
  getTotalLength: function() {
@@ -3236,33 +3304,33 @@ n0.prototype = {
3236
3304
  }
3237
3305
  };
3238
3306
  function rt(n, e, t, o) {
3239
- return new It(n, e, t, o);
3307
+ return new _t(n, e, t, o);
3240
3308
  }
3241
- function It(n, e, t, o) {
3309
+ function _t(n, e, t, o) {
3242
3310
  this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
3243
3311
  }
3244
- It.prototype.getTotalLength = function() {
3312
+ _t.prototype.getTotalLength = function() {
3245
3313
  return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
3246
3314
  };
3247
- It.prototype.getPointAtLength = function(n) {
3315
+ _t.prototype.getPointAtLength = function(n) {
3248
3316
  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;
3249
3317
  return { x: this.x0 + t, y: this.y0 + o };
3250
3318
  };
3251
- It.prototype.getTangentAtLength = function() {
3319
+ _t.prototype.getTangentAtLength = function() {
3252
3320
  var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
3253
3321
  return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
3254
3322
  };
3255
- It.prototype.getPropertiesAtLength = function(n) {
3323
+ _t.prototype.getPropertiesAtLength = function(n) {
3256
3324
  var e = this.getPointAtLength(n), t = this.getTangentAtLength();
3257
3325
  return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
3258
3326
  };
3259
- function pn(n) {
3327
+ function wn(n) {
3260
3328
  var e = 0, t = [], o = [];
3261
3329
  function i(s) {
3262
3330
  if (!s)
3263
3331
  return null;
3264
- for (var r = K1(s), h = [0, 0], c = [0, 0], u, p, l = 0; l < r.length; l++)
3265
- r[l][0] === "M" ? (h = [r[l][1], r[l][2]], p = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], p = [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(p[0] - h[0], 2) + Math.pow(p[1] - h[1], 2)), o.push(new rt(h[0], p[0], h[1], p[1])), h = [p[0], p[1]]) : r[l][0] === "C" ? (u = 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 + u.getTotalLength(), h = [r[l][5], r[l][6]], o.push(u)) : r[l][0] === "c" ? (u = 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 + u.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(u)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = 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]) : u = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + u.getTotalLength(), h = [r[l][3], r[l][4]], o.push(u)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], h[0] + u.d.x - u.c.x, h[1] + u.d.y - u.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : u = 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 + u.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + u.getTotalLength(), o.push(u), 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 ? u = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : u = 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 + u.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(u)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : u = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(u), e = e + u.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 ? u = 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]) : u = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + u.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(u)) : r[l][0] === "A" ? (u = new N0(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 + u.getTotalLength(), h = [r[l][6], r[l][7]], o.push(u)) : r[l][0] === "a" && (u = new N0(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 + u.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(u)), t.push(e);
3332
+ for (var r = nn(s), h = [0, 0], c = [0, 0], u, d, l = 0; l < r.length; l++)
3333
+ 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" ? (u = 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 + u.getTotalLength(), h = [r[l][5], r[l][6]], o.push(u)) : r[l][0] === "c" ? (u = 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 + u.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(u)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = 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]) : u = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + u.getTotalLength(), h = [r[l][3], r[l][4]], o.push(u)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], h[0] + u.d.x - u.c.x, h[1] + u.d.y - u.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : u = 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 + u.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + u.getTotalLength(), o.push(u), 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 ? u = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : u = 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 + u.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(u)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : u = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(u), e = e + u.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 ? u = 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]) : u = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + u.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(u)) : r[l][0] === "A" ? (u = new D0(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 + u.getTotalLength(), h = [r[l][6], r[l][7]], o.push(u)) : r[l][0] === "a" && (u = new D0(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 + u.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(u)), t.push(e);
3266
3334
  return i;
3267
3335
  }
3268
3336
  i.getTotalLength = function() {
@@ -3285,49 +3353,49 @@ function pn(n) {
3285
3353
  };
3286
3354
  return i(n);
3287
3355
  }
3288
- function Ft(n, e) {
3356
+ function Bt(n, e) {
3289
3357
  return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
3290
3358
  }
3291
- function ne(n, e, t) {
3359
+ function se(n, e, t) {
3292
3360
  return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
3293
3361
  }
3294
- function dn(n, e) {
3295
- return Ft(n, e) < 1e-9;
3362
+ function mn(n, e) {
3363
+ return Bt(n, e) < 1e-9;
3296
3364
  }
3297
- function xn(n, e, t) {
3298
- let o = n.map((i, a) => yn(i, e[a]));
3365
+ function bn(n, e, t) {
3366
+ let o = n.map((i, a) => An(i, e[a]));
3299
3367
  return function(i) {
3300
3368
  let a = o.map((s) => s(i));
3301
- return t ? mn(a) : a;
3369
+ return t ? Tn(a) : a;
3302
3370
  };
3303
3371
  }
3304
- function yn(n, e) {
3372
+ function An(n, e) {
3305
3373
  return function(t) {
3306
3374
  return n.map((o, i) => o + t * (e[i] - o));
3307
3375
  };
3308
3376
  }
3309
- function Rt(n) {
3377
+ function Ft(n) {
3310
3378
  return typeof n == "number" && isFinite(n);
3311
3379
  }
3312
- const r0 = `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).
3380
+ const i0 = `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).
3313
3381
  Example valid ways of supplying a shape would be:
3314
3382
  [[0, 0], [10, 0], [10, 10]]
3315
3383
  "M0,0 L10,0 L10,10Z"
3316
3384
  `;
3317
- function vn(n) {
3318
- return new V1(n).abs();
3385
+ function Mn(n) {
3386
+ return new tn(n).abs();
3319
3387
  }
3320
- function wn(n) {
3388
+ function Ln(n) {
3321
3389
  return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
3322
3390
  }
3323
- function mn(n) {
3391
+ function Tn(n) {
3324
3392
  return "M" + n.join("L") + "Z";
3325
3393
  }
3326
- function bn(n, e) {
3327
- let t = vn(n);
3328
- return An(t) || Mn(t, e);
3394
+ function Cn(n, e) {
3395
+ let t = Mn(n);
3396
+ return Pn(t) || Sn(t, e);
3329
3397
  }
3330
- function An(n) {
3398
+ function Pn(n) {
3331
3399
  let e = n.segments || [], t = [];
3332
3400
  if (!e.length || e[0][0] !== "M")
3333
3401
  return !1;
@@ -3346,11 +3414,11 @@ function An(n) {
3346
3414
  }
3347
3415
  return t.length ? { ring: t } : !1;
3348
3416
  }
3349
- function Mn(n, e) {
3350
- let t = wn(n)[0], o = [], i, a, s = 3;
3417
+ function Sn(n, e) {
3418
+ let t = Ln(n)[0], o = [], i, a, s = 3;
3351
3419
  if (!t)
3352
- throw new TypeError(r0);
3353
- a = Ln(t), i = a.getTotalLength(), e && Rt(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3420
+ throw new TypeError(i0);
3421
+ a = En(t), i = a.getTotalLength(), e && Ft(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3354
3422
  for (let r = 0; r < s; r++) {
3355
3423
  let h = a.getPointAtLength(i * r / s);
3356
3424
  o.push([h.x, h.y]);
@@ -3360,161 +3428,161 @@ function Mn(n, e) {
3360
3428
  skipBisect: !0
3361
3429
  };
3362
3430
  }
3363
- function Ln(n) {
3431
+ function En(n) {
3364
3432
  if (typeof window < "u" && window && window.document)
3365
3433
  try {
3366
3434
  let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3367
3435
  return e.setAttributeNS(null, "d", n), e;
3368
3436
  } catch {
3369
3437
  }
3370
- return pn(n);
3438
+ return wn(n);
3371
3439
  }
3372
- function R0(n, e) {
3373
- const t = n.length + e, o = z1(n) / e;
3440
+ function q0(n, e) {
3441
+ const t = n.length + e, o = W1(n) / e;
3374
3442
  let i = 0, a = 0, s = o / 2;
3375
3443
  for (; n.length < t; ) {
3376
- let r = n[i], h = n[(i + 1) % n.length], c = Ft(r, h);
3444
+ let r = n[i], h = n[(i + 1) % n.length], c = Bt(r, h);
3377
3445
  if (s <= a + c) {
3378
- n.splice(i + 1, 0, c ? ne(r, h, (s - a) / c) : r.slice(0)), s += o;
3446
+ n.splice(i + 1, 0, c ? se(r, h, (s - a) / c) : r.slice(0)), s += o;
3379
3447
  continue;
3380
3448
  }
3381
3449
  a += c, i++;
3382
3450
  }
3383
3451
  }
3384
- function Tn(n, e = 1 / 0) {
3452
+ function In(n, e = 1 / 0) {
3385
3453
  for (let t = 0; t < n.length; t++) {
3386
3454
  let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
3387
- for (; Ft(o, i) > e; )
3388
- i = ne(o, i, 0.5), n.splice(t + 1, 0, i);
3455
+ for (; Bt(o, i) > e; )
3456
+ i = se(o, i, 0.5), n.splice(t + 1, 0, i);
3389
3457
  }
3390
3458
  }
3391
- function F0(n, e) {
3459
+ function z0(n, e) {
3392
3460
  let t, o, i;
3393
3461
  if (typeof n == "string") {
3394
- let a = bn(n, e);
3462
+ let a = Cn(n, e);
3395
3463
  n = a.ring, i = a.skipBisect;
3396
3464
  } else if (!Array.isArray(n))
3397
- throw new TypeError(r0);
3398
- if (t = n.slice(0), !Cn(t))
3399
- throw new TypeError(r0);
3400
- return t.length > 1 && dn(t[0], t[t.length - 1]) && t.pop(), o = q1(t), o > 0 && t.reverse(), !i && e && Rt(e) && e > 0 && Tn(t, e), t;
3465
+ throw new TypeError(i0);
3466
+ if (t = n.slice(0), !kn(t))
3467
+ throw new TypeError(i0);
3468
+ return t.length > 1 && mn(t[0], t[t.length - 1]) && t.pop(), o = $1(t), o > 0 && t.reverse(), !i && e && Ft(e) && e > 0 && In(t, e), t;
3401
3469
  }
3402
- function Cn(n) {
3470
+ function kn(n) {
3403
3471
  return n.every(function(e) {
3404
- return Array.isArray(e) && e.length >= 2 && Rt(e[0]) && Rt(e[1]);
3472
+ return Array.isArray(e) && e.length >= 2 && Ft(e[0]) && Ft(e[1]);
3405
3473
  });
3406
3474
  }
3407
- function Pn(n, e) {
3475
+ function _n(n, e) {
3408
3476
  let t = n.length, o = 1 / 0, i, a, s;
3409
3477
  for (let r = 0; r < t; r++)
3410
3478
  a = 0, e.forEach(function(h, c) {
3411
- let u = Ft(n[(r + c) % t], h);
3479
+ let u = Bt(n[(r + c) % t], h);
3412
3480
  a += u * u;
3413
3481
  }), a < o && (o = a, i = r);
3414
3482
  i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
3415
3483
  }
3416
- function En(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3417
- let i = F0(n, t), a = F0(e, t), s = Sn(i, a, o);
3484
+ function On(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3485
+ let i = z0(n, t), a = z0(e, t), s = Nn(i, a, o);
3418
3486
  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);
3419
3487
  }
3420
- function Sn(n, e, t) {
3488
+ function Nn(n, e, t) {
3421
3489
  let o;
3422
- return o = n.length - e.length, R0(n, o < 0 ? o * -1 : 0), R0(e, o > 0 ? o : 0), Pn(n, e), xn(n, e, t);
3423
- }
3424
- var _t = { exports: {} }, B0;
3425
- function kn() {
3426
- if (B0) return _t.exports;
3427
- B0 = 1, _t.exports = n, _t.exports.default = n;
3428
- function n(g, x, d) {
3429
- d = d || 2;
3430
- var w = x && x.length, m = w ? x[0] * d : g.length, b = e(g, 0, m, d, !0), A = [];
3490
+ return o = n.length - e.length, q0(n, o < 0 ? o * -1 : 0), q0(e, o > 0 ? o : 0), _n(n, e), bn(n, e, t);
3491
+ }
3492
+ var Ot = { exports: {} }, H0;
3493
+ function Rn() {
3494
+ if (H0) return Ot.exports;
3495
+ H0 = 1, Ot.exports = n, Ot.exports.default = n;
3496
+ function n(g, x, p) {
3497
+ p = p || 2;
3498
+ var w = x && x.length, m = w ? x[0] * p : g.length, b = e(g, 0, m, p, !0), A = [];
3431
3499
  if (!b || b.next === b.prev) return A;
3432
- var C, N, _, $, j, B, V;
3433
- if (w && (b = h(g, x, b, d)), g.length > 80 * d) {
3434
- C = _ = g[0], N = $ = g[1];
3435
- for (var H = d; H < m; H += d)
3436
- j = g[H], B = g[H + 1], j < C && (C = j), B < N && (N = B), j > _ && (_ = j), B > $ && ($ = B);
3437
- V = Math.max(_ - C, $ - N), V = V !== 0 ? 32767 / V : 0;
3500
+ var C, N, _, W, H, B, K;
3501
+ if (w && (b = h(g, x, b, p)), g.length > 80 * p) {
3502
+ C = _ = g[0], N = W = g[1];
3503
+ for (var j = p; j < m; j += p)
3504
+ H = g[j], B = g[j + 1], H < C && (C = H), B < N && (N = B), H > _ && (_ = H), B > W && (W = B);
3505
+ K = Math.max(_ - C, W - N), K = K !== 0 ? 32767 / K : 0;
3438
3506
  }
3439
- return o(b, A, d, C, N, V, 0), A;
3507
+ return o(b, A, p, C, N, K, 0), A;
3440
3508
  }
3441
- function e(g, x, d, w, m) {
3509
+ function e(g, x, p, w, m) {
3442
3510
  var b, A;
3443
- if (m === Bt(g, x, d, w) > 0)
3444
- for (b = x; b < d; b += w) A = et(b, g[b], g[b + 1], A);
3511
+ if (m === Dt(g, x, p, w) > 0)
3512
+ for (b = x; b < p; b += w) A = et(b, g[b], g[b + 1], A);
3445
3513
  else
3446
- for (b = d - w; b >= x; b -= w) A = et(b, g[b], g[b + 1], A);
3447
- return A && S(A, A.next) && (nt(A), A = A.next), A;
3514
+ for (b = p - w; b >= x; b -= w) A = et(b, g[b], g[b + 1], A);
3515
+ return A && E(A, A.next) && (nt(A), A = A.next), A;
3448
3516
  }
3449
3517
  function t(g, x) {
3450
3518
  if (!g) return g;
3451
3519
  x || (x = g);
3452
- var d = g, w;
3520
+ var p = g, w;
3453
3521
  do
3454
- if (w = !1, !d.steiner && (S(d, d.next) || L(d.prev, d, d.next) === 0)) {
3455
- if (nt(d), d = x = d.prev, d === d.next) break;
3522
+ if (w = !1, !p.steiner && (E(p, p.next) || P(p.prev, p, p.next) === 0)) {
3523
+ if (nt(p), p = x = p.prev, p === p.next) break;
3456
3524
  w = !0;
3457
3525
  } else
3458
- d = d.next;
3459
- while (w || d !== x);
3526
+ p = p.next;
3527
+ while (w || p !== x);
3460
3528
  return x;
3461
3529
  }
3462
- function o(g, x, d, w, m, b, A) {
3530
+ function o(g, x, p, w, m, b, A) {
3463
3531
  if (g) {
3464
3532
  !A && b && f(g, w, m, b);
3465
3533
  for (var C = g, N, _; g.prev !== g.next; ) {
3466
3534
  if (N = g.prev, _ = g.next, b ? a(g, w, m, b) : i(g)) {
3467
- x.push(N.i / d | 0), x.push(g.i / d | 0), x.push(_.i / d | 0), nt(g), g = _.next, C = _.next;
3535
+ x.push(N.i / p | 0), x.push(g.i / p | 0), x.push(_.i / p | 0), nt(g), g = _.next, C = _.next;
3468
3536
  continue;
3469
3537
  }
3470
3538
  if (g = _, g === C) {
3471
- A ? A === 1 ? (g = s(t(g), x, d), o(g, x, d, w, m, b, 2)) : A === 2 && r(g, x, d, w, m, b) : o(t(g), x, d, w, m, b, 1);
3539
+ A ? A === 1 ? (g = s(t(g), x, p), o(g, x, p, w, m, b, 2)) : A === 2 && r(g, x, p, w, m, b) : o(t(g), x, p, w, m, b, 1);
3472
3540
  break;
3473
3541
  }
3474
3542
  }
3475
3543
  }
3476
3544
  }
3477
3545
  function i(g) {
3478
- var x = g.prev, d = g, w = g.next;
3479
- if (L(x, d, w) >= 0) return !1;
3480
- for (var m = x.x, b = d.x, A = w.x, C = x.y, N = d.y, _ = w.y, $ = m < b ? m < A ? m : A : b < A ? b : A, j = C < N ? C < _ ? C : _ : N < _ ? N : _, B = m > b ? m > A ? m : A : b > A ? b : A, V = C > N ? C > _ ? C : _ : N > _ ? N : _, H = w.next; H !== x; ) {
3481
- if (H.x >= $ && H.x <= B && H.y >= j && H.y <= V && P(m, C, b, N, A, _, H.x, H.y) && L(H.prev, H, H.next) >= 0) return !1;
3482
- H = H.next;
3546
+ var x = g.prev, p = g, w = g.next;
3547
+ if (P(x, p, w) >= 0) return !1;
3548
+ for (var m = x.x, b = p.x, A = w.x, C = x.y, N = p.y, _ = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, H = C < N ? C < _ ? C : _ : N < _ ? N : _, B = m > b ? m > A ? m : A : b > A ? b : A, K = C > N ? C > _ ? C : _ : N > _ ? N : _, j = w.next; j !== x; ) {
3549
+ if (j.x >= W && j.x <= B && j.y >= H && j.y <= K && T(m, C, b, N, A, _, j.x, j.y) && P(j.prev, j, j.next) >= 0) return !1;
3550
+ j = j.next;
3483
3551
  }
3484
3552
  return !0;
3485
3553
  }
3486
- function a(g, x, d, w) {
3554
+ function a(g, x, p, w) {
3487
3555
  var m = g.prev, b = g, A = g.next;
3488
- if (L(m, b, A) >= 0) return !1;
3489
- for (var C = m.x, N = b.x, _ = A.x, $ = m.y, j = b.y, B = A.y, V = C < N ? C < _ ? C : _ : N < _ ? N : _, H = $ < j ? $ < B ? $ : B : j < B ? j : B, Tt = C > N ? C > _ ? C : _ : N > _ ? N : _, Ct = $ > j ? $ > B ? $ : B : j > B ? j : B, u0 = y(V, H, x, d, w), f0 = y(Tt, Ct, x, d, w), D = g.prevZ, q = g.nextZ; D && D.z >= u0 && q && q.z <= f0; ) {
3490
- if (D.x >= V && D.x <= Tt && D.y >= H && D.y <= Ct && D !== m && D !== A && P(C, $, N, j, _, B, D.x, D.y) && L(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= V && q.x <= Tt && q.y >= H && q.y <= Ct && q !== m && q !== A && P(C, $, N, j, _, B, q.x, q.y) && L(q.prev, q, q.next) >= 0)) return !1;
3556
+ if (P(m, b, A) >= 0) return !1;
3557
+ for (var C = m.x, N = b.x, _ = A.x, W = m.y, H = b.y, B = A.y, K = C < N ? C < _ ? C : _ : N < _ ? N : _, j = W < H ? W < B ? W : B : H < B ? H : B, Ct = C > N ? C > _ ? C : _ : N > _ ? N : _, Pt = W > H ? W > B ? W : B : H > B ? H : B, d0 = y(K, j, x, p, w), p0 = y(Ct, Pt, x, p, w), D = g.prevZ, q = g.nextZ; D && D.z >= d0 && q && q.z <= p0; ) {
3558
+ if (D.x >= K && D.x <= Ct && D.y >= j && D.y <= Pt && D !== m && D !== A && T(C, W, N, H, _, B, D.x, D.y) && P(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= K && q.x <= Ct && q.y >= j && q.y <= Pt && q !== m && q !== A && T(C, W, N, H, _, B, q.x, q.y) && P(q.prev, q, q.next) >= 0)) return !1;
3491
3559
  q = q.nextZ;
3492
3560
  }
3493
- for (; D && D.z >= u0; ) {
3494
- if (D.x >= V && D.x <= Tt && D.y >= H && D.y <= Ct && D !== m && D !== A && P(C, $, N, j, _, B, D.x, D.y) && L(D.prev, D, D.next) >= 0) return !1;
3561
+ for (; D && D.z >= d0; ) {
3562
+ if (D.x >= K && D.x <= Ct && D.y >= j && D.y <= Pt && D !== m && D !== A && T(C, W, N, H, _, B, D.x, D.y) && P(D.prev, D, D.next) >= 0) return !1;
3495
3563
  D = D.prevZ;
3496
3564
  }
3497
- for (; q && q.z <= f0; ) {
3498
- if (q.x >= V && q.x <= Tt && q.y >= H && q.y <= Ct && q !== m && q !== A && P(C, $, N, j, _, B, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
3565
+ for (; q && q.z <= p0; ) {
3566
+ if (q.x >= K && q.x <= Ct && q.y >= j && q.y <= Pt && q !== m && q !== A && T(C, W, N, H, _, B, q.x, q.y) && P(q.prev, q, q.next) >= 0) return !1;
3499
3567
  q = q.nextZ;
3500
3568
  }
3501
3569
  return !0;
3502
3570
  }
3503
- function s(g, x, d) {
3571
+ function s(g, x, p) {
3504
3572
  var w = g;
3505
3573
  do {
3506
3574
  var m = w.prev, b = w.next.next;
3507
- !S(m, b) && T(m, w, w.next, b) && z(m, b) && z(b, m) && (x.push(m.i / d | 0), x.push(w.i / d | 0), x.push(b.i / d | 0), nt(w), nt(w.next), w = g = b), w = w.next;
3575
+ !E(m, b) && L(m, w, w.next, b) && z(m, b) && z(b, m) && (x.push(m.i / p | 0), x.push(w.i / p | 0), x.push(b.i / p | 0), nt(w), nt(w.next), w = g = b), w = w.next;
3508
3576
  } while (w !== g);
3509
3577
  return t(w);
3510
3578
  }
3511
- function r(g, x, d, w, m, b) {
3579
+ function r(g, x, p, w, m, b) {
3512
3580
  var A = g;
3513
3581
  do {
3514
3582
  for (var C = A.next.next; C !== A.prev; ) {
3515
- if (A.i !== C.i && E(A, C)) {
3583
+ if (A.i !== C.i && S(A, C)) {
3516
3584
  var N = tt(A, C);
3517
- A = t(A, A.next), N = t(N, N.next), o(A, x, d, w, m, b, 0), o(N, x, d, w, m, b, 0);
3585
+ A = t(A, A.next), N = t(N, N.next), o(A, x, p, w, m, b, 0), o(N, x, p, w, m, b, 0);
3518
3586
  return;
3519
3587
  }
3520
3588
  C = C.next;
@@ -3522,169 +3590,169 @@ function kn() {
3522
3590
  A = A.next;
3523
3591
  } while (A !== g);
3524
3592
  }
3525
- function h(g, x, d, w) {
3593
+ function h(g, x, p, w) {
3526
3594
  var m = [], b, A, C, N, _;
3527
3595
  for (b = 0, A = x.length; b < A; b++)
3528
3596
  C = x[b] * w, N = b < A - 1 ? x[b + 1] * w : g.length, _ = e(g, C, N, w, !1), _ === _.next && (_.steiner = !0), m.push(M(_));
3529
3597
  for (m.sort(c), b = 0; b < m.length; b++)
3530
- d = u(m[b], d);
3531
- return d;
3598
+ p = u(m[b], p);
3599
+ return p;
3532
3600
  }
3533
3601
  function c(g, x) {
3534
3602
  return g.x - x.x;
3535
3603
  }
3536
3604
  function u(g, x) {
3537
- var d = p(g, x);
3538
- if (!d)
3605
+ var p = d(g, x);
3606
+ if (!p)
3539
3607
  return x;
3540
- var w = tt(d, g);
3541
- return t(w, w.next), t(d, d.next);
3608
+ var w = tt(p, g);
3609
+ return t(w, w.next), t(p, p.next);
3542
3610
  }
3543
- function p(g, x) {
3544
- var d = x, w = g.x, m = g.y, b = -1 / 0, A;
3611
+ function d(g, x) {
3612
+ var p = x, w = g.x, m = g.y, b = -1 / 0, A;
3545
3613
  do {
3546
- if (m <= d.y && m >= d.next.y && d.next.y !== d.y) {
3547
- var C = d.x + (m - d.y) * (d.next.x - d.x) / (d.next.y - d.y);
3548
- if (C <= w && C > b && (b = C, A = d.x < d.next.x ? d : d.next, C === w))
3614
+ if (m <= p.y && m >= p.next.y && p.next.y !== p.y) {
3615
+ var C = p.x + (m - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3616
+ if (C <= w && C > b && (b = C, A = p.x < p.next.x ? p : p.next, C === w))
3549
3617
  return A;
3550
3618
  }
3551
- d = d.next;
3552
- } while (d !== x);
3619
+ p = p.next;
3620
+ } while (p !== x);
3553
3621
  if (!A) return null;
3554
- var N = A, _ = A.x, $ = A.y, j = 1 / 0, B;
3555
- d = A;
3622
+ var N = A, _ = A.x, W = A.y, H = 1 / 0, B;
3623
+ p = A;
3556
3624
  do
3557
- w >= d.x && d.x >= _ && w !== d.x && P(m < $ ? w : b, m, _, $, m < $ ? b : w, m, d.x, d.y) && (B = Math.abs(m - d.y) / (w - d.x), z(d, g) && (B < j || B === j && (d.x > A.x || d.x === A.x && l(A, d))) && (A = d, j = B)), d = d.next;
3558
- while (d !== N);
3625
+ w >= p.x && p.x >= _ && w !== p.x && T(m < W ? w : b, m, _, W, m < W ? b : w, m, p.x, p.y) && (B = Math.abs(m - p.y) / (w - p.x), z(p, g) && (B < H || B === H && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, H = B)), p = p.next;
3626
+ while (p !== N);
3559
3627
  return A;
3560
3628
  }
3561
3629
  function l(g, x) {
3562
- return L(g.prev, g, x.prev) < 0 && L(x.next, g, g.next) < 0;
3630
+ return P(g.prev, g, x.prev) < 0 && P(x.next, g, g.next) < 0;
3563
3631
  }
3564
- function f(g, x, d, w) {
3632
+ function f(g, x, p, w) {
3565
3633
  var m = g;
3566
3634
  do
3567
- m.z === 0 && (m.z = y(m.x, m.y, x, d, w)), m.prevZ = m.prev, m.nextZ = m.next, m = m.next;
3635
+ m.z === 0 && (m.z = y(m.x, m.y, x, p, w)), m.prevZ = m.prev, m.nextZ = m.next, m = m.next;
3568
3636
  while (m !== g);
3569
3637
  m.prevZ.nextZ = null, m.prevZ = null, v(m);
3570
3638
  }
3571
3639
  function v(g) {
3572
- var x, d, w, m, b, A, C, N, _ = 1;
3640
+ var x, p, w, m, b, A, C, N, _ = 1;
3573
3641
  do {
3574
- for (d = g, g = null, b = null, A = 0; d; ) {
3575
- for (A++, w = d, C = 0, x = 0; x < _ && (C++, w = w.nextZ, !!w); x++)
3642
+ for (p = g, g = null, b = null, A = 0; p; ) {
3643
+ for (A++, w = p, C = 0, x = 0; x < _ && (C++, w = w.nextZ, !!w); x++)
3576
3644
  ;
3577
3645
  for (N = _; C > 0 || N > 0 && w; )
3578
- C !== 0 && (N === 0 || !w || d.z <= w.z) ? (m = d, d = d.nextZ, C--) : (m = w, w = w.nextZ, N--), b ? b.nextZ = m : g = m, m.prevZ = b, b = m;
3579
- d = w;
3646
+ C !== 0 && (N === 0 || !w || p.z <= w.z) ? (m = p, p = p.nextZ, C--) : (m = w, w = w.nextZ, N--), b ? b.nextZ = m : g = m, m.prevZ = b, b = m;
3647
+ p = w;
3580
3648
  }
3581
3649
  b.nextZ = null, _ *= 2;
3582
3650
  } while (A > 1);
3583
3651
  return g;
3584
3652
  }
3585
- function y(g, x, d, w, m) {
3586
- return g = (g - d) * m | 0, x = (x - w) * m | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
3653
+ function y(g, x, p, w, m) {
3654
+ return g = (g - p) * m | 0, x = (x - w) * m | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
3587
3655
  }
3588
3656
  function M(g) {
3589
- var x = g, d = g;
3657
+ var x = g, p = g;
3590
3658
  do
3591
- (x.x < d.x || x.x === d.x && x.y < d.y) && (d = x), x = x.next;
3659
+ (x.x < p.x || x.x === p.x && x.y < p.y) && (p = x), x = x.next;
3592
3660
  while (x !== g);
3593
- return d;
3661
+ return p;
3594
3662
  }
3595
- function P(g, x, d, w, m, b, A, C) {
3596
- return (m - A) * (x - C) >= (g - A) * (b - C) && (g - A) * (w - C) >= (d - A) * (x - C) && (d - A) * (b - C) >= (m - A) * (w - C);
3663
+ function T(g, x, p, w, m, b, A, C) {
3664
+ return (m - A) * (x - C) >= (g - A) * (b - C) && (g - A) * (w - C) >= (p - A) * (x - C) && (p - A) * (b - C) >= (m - A) * (w - C);
3597
3665
  }
3598
- function E(g, x) {
3666
+ function S(g, x) {
3599
3667
  return g.next.i !== x.i && g.prev.i !== x.i && !X(g, x) && // dones't intersect other edges
3600
- (z(g, x) && z(x, g) && Y(g, x) && // locally visible
3601
- (L(g.prev, g, x.prev) || L(g, x.prev, x)) || // does not create opposite-facing sectors
3602
- S(g, x) && L(g.prev, g, g.next) > 0 && L(x.prev, x, x.next) > 0);
3668
+ (z(g, x) && z(x, g) && U(g, x) && // locally visible
3669
+ (P(g.prev, g, x.prev) || P(g, x.prev, x)) || // does not create opposite-facing sectors
3670
+ E(g, x) && P(g.prev, g, g.next) > 0 && P(x.prev, x, x.next) > 0);
3603
3671
  }
3604
- function L(g, x, d) {
3605
- return (x.y - g.y) * (d.x - x.x) - (x.x - g.x) * (d.y - x.y);
3672
+ function P(g, x, p) {
3673
+ return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
3606
3674
  }
3607
- function S(g, x) {
3675
+ function E(g, x) {
3608
3676
  return g.x === x.x && g.y === x.y;
3609
3677
  }
3610
- function T(g, x, d, w) {
3611
- var m = F(L(g, x, d)), b = F(L(g, x, w)), A = F(L(d, w, g)), C = F(L(d, w, x));
3612
- return !!(m !== b && A !== C || m === 0 && k(g, d, x) || b === 0 && k(g, w, x) || A === 0 && k(d, g, w) || C === 0 && k(d, x, w));
3678
+ function L(g, x, p, w) {
3679
+ var m = F(P(g, x, p)), b = F(P(g, x, w)), A = F(P(p, w, g)), C = F(P(p, w, x));
3680
+ return !!(m !== b && A !== C || m === 0 && I(g, p, x) || b === 0 && I(g, w, x) || A === 0 && I(p, g, w) || C === 0 && I(p, x, w));
3613
3681
  }
3614
- function k(g, x, d) {
3615
- return x.x <= Math.max(g.x, d.x) && x.x >= Math.min(g.x, d.x) && x.y <= Math.max(g.y, d.y) && x.y >= Math.min(g.y, d.y);
3682
+ function I(g, x, p) {
3683
+ 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);
3616
3684
  }
3617
3685
  function F(g) {
3618
3686
  return g > 0 ? 1 : g < 0 ? -1 : 0;
3619
3687
  }
3620
3688
  function X(g, x) {
3621
- var d = g;
3689
+ var p = g;
3622
3690
  do {
3623
- if (d.i !== g.i && d.next.i !== g.i && d.i !== x.i && d.next.i !== x.i && T(d, d.next, g, x)) return !0;
3624
- d = d.next;
3625
- } while (d !== g);
3691
+ if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && L(p, p.next, g, x)) return !0;
3692
+ p = p.next;
3693
+ } while (p !== g);
3626
3694
  return !1;
3627
3695
  }
3628
3696
  function z(g, x) {
3629
- return L(g.prev, g, g.next) < 0 ? L(g, x, g.next) >= 0 && L(g, g.prev, x) >= 0 : L(g, x, g.prev) < 0 || L(g, g.next, x) < 0;
3697
+ 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;
3630
3698
  }
3631
- function Y(g, x) {
3632
- var d = g, w = !1, m = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
3699
+ function U(g, x) {
3700
+ var p = g, w = !1, m = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
3633
3701
  do
3634
- d.y > b != d.next.y > b && d.next.y !== d.y && m < (d.next.x - d.x) * (b - d.y) / (d.next.y - d.y) + d.x && (w = !w), d = d.next;
3635
- while (d !== g);
3702
+ p.y > b != p.next.y > b && p.next.y !== p.y && m < (p.next.x - p.x) * (b - p.y) / (p.next.y - p.y) + p.x && (w = !w), p = p.next;
3703
+ while (p !== g);
3636
3704
  return w;
3637
3705
  }
3638
3706
  function tt(g, x) {
3639
- var d = new K(g.i, g.x, g.y), w = new K(x.i, x.x, x.y), m = g.next, b = x.prev;
3640
- return g.next = x, x.prev = g, d.next = m, m.prev = d, w.next = d, d.prev = w, b.next = w, w.prev = b, w;
3707
+ var p = new Z(g.i, g.x, g.y), w = new Z(x.i, x.x, x.y), m = g.next, b = x.prev;
3708
+ return g.next = x, x.prev = g, p.next = m, m.prev = p, w.next = p, p.prev = w, b.next = w, w.prev = b, w;
3641
3709
  }
3642
- function et(g, x, d, w) {
3643
- var m = new K(g, x, d);
3710
+ function et(g, x, p, w) {
3711
+ var m = new Z(g, x, p);
3644
3712
  return w ? (m.next = w.next, m.prev = w, w.next.prev = m, w.next = m) : (m.prev = m, m.next = m), m;
3645
3713
  }
3646
3714
  function nt(g) {
3647
3715
  g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
3648
3716
  }
3649
- function K(g, x, d) {
3650
- this.i = g, this.x = x, this.y = d, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
3717
+ function Z(g, x, p) {
3718
+ 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;
3651
3719
  }
3652
- n.deviation = function(g, x, d, w) {
3653
- var m = x && x.length, b = m ? x[0] * d : g.length, A = Math.abs(Bt(g, 0, b, d));
3720
+ n.deviation = function(g, x, p, w) {
3721
+ var m = x && x.length, b = m ? x[0] * p : g.length, A = Math.abs(Dt(g, 0, b, p));
3654
3722
  if (m)
3655
3723
  for (var C = 0, N = x.length; C < N; C++) {
3656
- var _ = x[C] * d, $ = C < N - 1 ? x[C + 1] * d : g.length;
3657
- A -= Math.abs(Bt(g, _, $, d));
3724
+ var _ = x[C] * p, W = C < N - 1 ? x[C + 1] * p : g.length;
3725
+ A -= Math.abs(Dt(g, _, W, p));
3658
3726
  }
3659
- var j = 0;
3727
+ var H = 0;
3660
3728
  for (C = 0; C < w.length; C += 3) {
3661
- var B = w[C] * d, V = w[C + 1] * d, H = w[C + 2] * d;
3662
- j += Math.abs(
3663
- (g[B] - g[H]) * (g[V + 1] - g[B + 1]) - (g[B] - g[V]) * (g[H + 1] - g[B + 1])
3729
+ var B = w[C] * p, K = w[C + 1] * p, j = w[C + 2] * p;
3730
+ H += Math.abs(
3731
+ (g[B] - g[j]) * (g[K + 1] - g[B + 1]) - (g[B] - g[K]) * (g[j + 1] - g[B + 1])
3664
3732
  );
3665
3733
  }
3666
- return A === 0 && j === 0 ? 0 : Math.abs((j - A) / A);
3734
+ return A === 0 && H === 0 ? 0 : Math.abs((H - A) / A);
3667
3735
  };
3668
- function Bt(g, x, d, w) {
3669
- for (var m = 0, b = x, A = d - w; b < d; b += w)
3736
+ function Dt(g, x, p, w) {
3737
+ for (var m = 0, b = x, A = p - w; b < p; b += w)
3670
3738
  m += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
3671
3739
  return m;
3672
3740
  }
3673
3741
  return n.flatten = function(g) {
3674
- for (var x = g[0][0].length, d = { vertices: [], holes: [], dimensions: x }, w = 0, m = 0; m < g.length; m++) {
3742
+ for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, w = 0, m = 0; m < g.length; m++) {
3675
3743
  for (var b = 0; b < g[m].length; b++)
3676
- for (var A = 0; A < x; A++) d.vertices.push(g[m][b][A]);
3677
- m > 0 && (w += g[m - 1].length, d.holes.push(w));
3744
+ for (var A = 0; A < x; A++) p.vertices.push(g[m][b][A]);
3745
+ m > 0 && (w += g[m - 1].length, p.holes.push(w));
3678
3746
  }
3679
- return d;
3680
- }, _t.exports;
3747
+ return p;
3748
+ }, Ot.exports;
3681
3749
  }
3682
- kn();
3683
- function re(n, e) {
3750
+ Rn();
3751
+ function ae(n, e) {
3684
3752
  return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
3685
3753
  }
3686
- function In(n) {
3687
- return n.length === 1 && (n = _n(n)), {
3754
+ function Fn(n) {
3755
+ return n.length === 1 && (n = Bn(n)), {
3688
3756
  left: function(e, t, o, i) {
3689
3757
  for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
3690
3758
  var a = o + i >>> 1;
@@ -3701,31 +3769,31 @@ function In(n) {
3701
3769
  }
3702
3770
  };
3703
3771
  }
3704
- function _n(n) {
3772
+ function Bn(n) {
3705
3773
  return function(e, t) {
3706
- return re(n(e), t);
3774
+ return ae(n(e), t);
3707
3775
  };
3708
3776
  }
3709
- In(re);
3710
- function e2(n, e, t = 3) {
3711
- const o = En(n, e, { maxSegmentLength: t });
3777
+ Fn(ae);
3778
+ function sr(n, e, t = 3) {
3779
+ const o = On(n, e, { maxSegmentLength: t });
3712
3780
  return {
3713
3781
  check: (i) => typeof i == "string",
3714
3782
  interpolate: (i, a, s) => o(s)
3715
3783
  };
3716
3784
  }
3717
- function n2(n) {
3785
+ function ar(n) {
3718
3786
  const e = (o) => n.width * o, t = (o) => n.height * o;
3719
3787
  return {
3720
3788
  scaleX: e,
3721
3789
  scaleY: t,
3722
- position: (o, i) => W({
3790
+ position: (o, i) => Y({
3723
3791
  x: e(o),
3724
3792
  y: t(i)
3725
3793
  })
3726
3794
  };
3727
3795
  }
3728
- function r2(n) {
3796
+ function hr(n) {
3729
3797
  const e = [];
3730
3798
  if (n.isAllKey) {
3731
3799
  for (let t = 0; t <= n.animations.length; t++)
@@ -3739,47 +3807,47 @@ function r2(n) {
3739
3807
  export {
3740
3808
  xt as Alignment,
3741
3809
  ot as Anchor,
3742
- s0 as Animate,
3743
- zn as Arrow,
3744
- Zn as BrowserCanvasRenderer,
3745
- jn as Circle,
3810
+ a0 as Animate,
3811
+ Wn as Arrow,
3812
+ er as BrowserCanvasRenderer,
3813
+ Yn as Circle,
3746
3814
  G as Color,
3747
- o0 as Easing,
3748
- Nn as FadeIn,
3749
- Rn as FadeOut,
3750
- _e as FontStyle,
3751
- Ne as FontWeight,
3752
- Hn as Grid,
3753
- g0 as Group,
3754
- Fn as Hide,
3755
- Dn as IFrame,
3756
- Un as Image,
3757
- $n as Line,
3758
- Yn as Mask,
3759
- U as ObjectType,
3760
- t2 as Opaque,
3761
- Wn as Path,
3762
- Kn as Pause,
3763
- Xn as Polygon,
3764
- W as Position,
3765
- Ve as Presentation,
3766
- Gn as Rectangle,
3767
- Vn as SVG,
3768
- qn as ScreenCapture,
3769
- Bn as Show,
3815
+ s0 as Easing,
3816
+ qn as FadeIn,
3817
+ zn as FadeOut,
3818
+ Fe as FontStyle,
3819
+ De as FontWeight,
3820
+ Xn as Grid,
3821
+ x0 as Group,
3822
+ Hn as Hide,
3823
+ Un as IFrame,
3824
+ Gn as Image,
3825
+ Kn as Line,
3826
+ Vn as Mask,
3827
+ $ as ObjectType,
3828
+ or as Opaque,
3829
+ Zn as Path,
3830
+ nr as Pause,
3831
+ Qn as Polygon,
3832
+ Y as Position,
3833
+ t1 as Presentation,
3834
+ Jn as Rectangle,
3835
+ tr as SVG,
3836
+ $n as ScreenCapture,
3837
+ jn as Show,
3770
3838
  at as Size,
3771
- Qn as Slide,
3839
+ rr as Slide,
3772
3840
  lt as SlideObject,
3773
- q0 as SlideWebExtra,
3774
- De as Text,
3775
- Jn as TextUnit,
3776
- Ie as Transparent,
3777
- D0 as Update,
3778
- r2 as getKeySlideBuildIndices,
3779
- n2 as getSizingFunctions,
3780
- e2 as getSmoothPathInterpolator,
3781
- Be as getTextContentLength,
3782
- Qe as interpolateColor,
3783
- t1 as interpolateNumber
3841
+ U0 as SlideWebExtra,
3842
+ je as Text,
3843
+ ir as TextUnit,
3844
+ Re as Transparent,
3845
+ j0 as Update,
3846
+ hr as getKeySlideBuildIndices,
3847
+ ar as getSizingFunctions,
3848
+ sr as getSmoothPathInterpolator,
3849
+ He as getTextContentLength,
3850
+ r1 as interpolateColor,
3851
+ o1 as interpolateNumber
3784
3852
  };
3785
3853
  //# sourceMappingURL=presenter.mjs.map