svg-path-commander 2.1.5 → 2.1.7

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,8 +1,8 @@
1
- var je = Object.defineProperty;
2
- var Qe = (e, t, s) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var d = (e, t, s) => Qe(e, typeof t != "symbol" ? t + "" : t, s);
4
- var Ze = Object.defineProperty, De = (e, t, s) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, S = (e, t, s) => De(e, typeof t != "symbol" ? t + "" : t, s);
5
- const Oe = {
1
+ var Qe = Object.defineProperty;
2
+ var Ze = (e, t, s) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var b = (e, t, s) => Ze(e, typeof t != "symbol" ? t + "" : t, s);
4
+ var De = Object.defineProperty, Oe = (e, t, s) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t, s) => Oe(e, typeof t != "symbol" ? t + "" : t, s);
5
+ const Be = {
6
6
  a: 1,
7
7
  b: 0,
8
8
  c: 0,
@@ -27,13 +27,32 @@ const Oe = {
27
27
  m44: 1,
28
28
  is2D: !0,
29
29
  isIdentity: !0
30
- }, Gt = (e) => (e instanceof Float64Array || e instanceof Float32Array || Array.isArray(e) && e.every((t) => typeof t == "number")) && [6, 16].some((t) => e.length === t), te = (e) => e instanceof DOMMatrix || e instanceof T || typeof e == "object" && Object.keys(Oe).every((t) => e && t in e), lt = (e) => {
31
- const t = new T(), s = Array.from(e);
30
+ }, Gt = (e) => (e instanceof Float64Array || e instanceof Float32Array || Array.isArray(e) && e.every((t) => typeof t == "number")) && [6, 16].some((t) => e.length === t), te = (e) => e instanceof DOMMatrix || e instanceof C || typeof e == "object" && Object.keys(Be).every((t) => e && t in e), lt = (e) => {
31
+ const t = new C(), s = Array.from(e);
32
32
  if (!Gt(s))
33
- throw TypeError(`CSSMatrix: "${s.join(",")}" must be an array with 6/16 numbers.`);
33
+ throw TypeError(
34
+ `CSSMatrix: "${s.join(",")}" must be an array with 6/16 numbers.`
35
+ );
34
36
  if (s.length === 16) {
35
- const [r, n, i, o, l, c, a, u, m, h, g, f, y, p, M, N] = s;
36
- t.m11 = r, t.a = r, t.m21 = l, t.c = l, t.m31 = m, t.m41 = y, t.e = y, t.m12 = n, t.b = n, t.m22 = c, t.d = c, t.m32 = h, t.m42 = p, t.f = p, t.m13 = i, t.m23 = a, t.m33 = g, t.m43 = M, t.m14 = o, t.m24 = u, t.m34 = f, t.m44 = N;
37
+ const [
38
+ r,
39
+ n,
40
+ i,
41
+ o,
42
+ l,
43
+ c,
44
+ a,
45
+ u,
46
+ f,
47
+ h,
48
+ y,
49
+ m,
50
+ g,
51
+ d,
52
+ M,
53
+ w
54
+ ] = s;
55
+ t.m11 = r, t.a = r, t.m21 = l, t.c = l, t.m31 = f, t.m41 = g, t.e = g, t.m12 = n, t.b = n, t.m22 = c, t.d = c, t.m32 = h, t.m42 = d, t.f = d, t.m13 = i, t.m23 = a, t.m33 = y, t.m43 = M, t.m14 = o, t.m24 = u, t.m34 = m, t.m44 = w;
37
56
  } else if (s.length === 6) {
38
57
  const [r, n, i, o, l, c] = s;
39
58
  t.m11 = r, t.a = r, t.m12 = n, t.b = n, t.m21 = i, t.c = i, t.m22 = o, t.d = o, t.m41 = l, t.e = l, t.m42 = c, t.f = c;
@@ -59,43 +78,57 @@ const Oe = {
59
78
  e.m43,
60
79
  e.m44
61
80
  ]);
62
- throw TypeError(`CSSMatrix: "${JSON.stringify(e)}" is not a DOMMatrix / CSSMatrix / JSON compatible object.`);
81
+ throw TypeError(
82
+ `CSSMatrix: "${JSON.stringify(e)}" is not a DOMMatrix / CSSMatrix / JSON compatible object.`
83
+ );
63
84
  }, ne = (e) => {
64
85
  if (typeof e != "string")
65
86
  throw TypeError(`CSSMatrix: "${JSON.stringify(e)}" is not a string.`);
66
87
  const t = String(e).replace(/\s/g, "");
67
- let s = new T();
88
+ let s = new C();
68
89
  const r = `CSSMatrix: invalid transform string "${e}"`;
69
90
  return t.split(")").filter((n) => n).forEach((n) => {
70
91
  const [i, o] = n.split("(");
71
92
  if (!o) throw TypeError(r);
72
- const l = o.split(",").map((f) => f.includes("rad") ? parseFloat(f) * (180 / Math.PI) : parseFloat(f)), [c, a, u, m] = l, h = [c, a, u], g = [c, a, u, m];
73
- if (i === "perspective" && c && [a, u].every((f) => f === void 0))
93
+ const l = o.split(",").map(
94
+ (m) => m.includes("rad") ? parseFloat(m) * (180 / Math.PI) : parseFloat(m)
95
+ ), [c, a, u, f] = l, h = [c, a, u], y = [c, a, u, f];
96
+ if (i === "perspective" && c && [a, u].every((m) => m === void 0))
74
97
  s.m34 = -1 / c;
75
- else if (i.includes("matrix") && [6, 16].includes(l.length) && l.every((f) => !Number.isNaN(+f))) {
76
- const f = l.map((y) => Math.abs(y) < 1e-6 ? 0 : y);
77
- s = s.multiply(lt(f));
78
- } else if (i === "translate3d" && h.every((f) => !Number.isNaN(+f)))
98
+ else if (i.includes("matrix") && [6, 16].includes(l.length) && l.every((m) => !Number.isNaN(+m))) {
99
+ const m = l.map((g) => Math.abs(g) < 1e-6 ? 0 : g);
100
+ s = s.multiply(lt(m));
101
+ } else if (i === "translate3d" && h.every((m) => !Number.isNaN(+m)))
79
102
  s = s.translate(c, a, u);
80
103
  else if (i === "translate" && c && u === void 0)
81
104
  s = s.translate(c, a || 0, 0);
82
- else if (i === "rotate3d" && g.every((f) => !Number.isNaN(+f)) && m)
83
- s = s.rotateAxisAngle(c, a, u, m);
84
- else if (i === "rotate" && c && [a, u].every((f) => f === void 0))
105
+ else if (i === "rotate3d" && y.every((m) => !Number.isNaN(+m)) && f)
106
+ s = s.rotateAxisAngle(c, a, u, f);
107
+ else if (i === "rotate" && c && [a, u].every((m) => m === void 0))
85
108
  s = s.rotate(0, 0, c);
86
- else if (i === "scale3d" && h.every((f) => !Number.isNaN(+f)) && h.some((f) => f !== 1))
109
+ else if (i === "scale3d" && h.every((m) => !Number.isNaN(+m)) && h.some((m) => m !== 1))
87
110
  s = s.scale(c, a, u);
88
- else if (i === "scale" && !Number.isNaN(c) && c !== 1 && u === void 0) {
89
- const f = Number.isNaN(+a) ? c : a;
90
- s = s.scale(c, f, 1);
111
+ else if (
112
+ // prop === "scale" && !Number.isNaN(x) && x !== 1 && z === undefined
113
+ // prop === "scale" && !Number.isNaN(x) && [x, y].some((n) => n !== 1) &&
114
+ i === "scale" && !Number.isNaN(c) && (c !== 1 || a !== 1) && u === void 0
115
+ ) {
116
+ const m = Number.isNaN(+a) ? c : a;
117
+ s = s.scale(c, m, 1);
91
118
  } else if (i === "skew" && (c || !Number.isNaN(c) && a) && u === void 0)
92
119
  s = s.skew(c, a || 0);
93
- else if (["translate", "rotate", "scale", "skew"].some((f) => i.includes(f)) && /[XYZ]/.test(i) && c && [a, u].every((f) => f === void 0))
120
+ else if (["translate", "rotate", "scale", "skew"].some(
121
+ (m) => i.includes(m)
122
+ ) && /[XYZ]/.test(i) && c && [a, u].every((m) => m === void 0))
94
123
  if (i === "skewX" || i === "skewY")
95
124
  s = s[i](c);
96
125
  else {
97
- const f = i.replace(/[XYZ]/, ""), y = i.replace(f, ""), p = ["X", "Y", "Z"].indexOf(y), M = f === "scale" ? 1 : 0, N = [p === 0 ? c : M, p === 1 ? c : M, p === 2 ? c : M];
98
- s = s[f](...N);
126
+ const m = i.replace(/[XYZ]/, ""), g = i.replace(m, ""), d = ["X", "Y", "Z"].indexOf(g), M = m === "scale" ? 1 : 0, w = [
127
+ d === 0 ? c : M,
128
+ d === 1 ? c : M,
129
+ d === 2 ? c : M
130
+ ];
131
+ s = s[m](...w);
99
132
  }
100
133
  else
101
134
  throw TypeError(r);
@@ -118,32 +151,32 @@ const Oe = {
118
151
  e.m43,
119
152
  e.m44
120
153
  ], se = (e, t, s) => {
121
- const r = new T();
154
+ const r = new C();
122
155
  return r.m41 = e, r.e = e, r.m42 = t, r.f = t, r.m43 = s, r;
123
156
  }, re = (e, t, s) => {
124
- const r = new T(), n = Math.PI / 180, i = e * n, o = t * n, l = s * n, c = Math.cos(i), a = -Math.sin(i), u = Math.cos(o), m = -Math.sin(o), h = Math.cos(l), g = -Math.sin(l), f = u * h, y = -u * g;
125
- r.m11 = f, r.a = f, r.m12 = y, r.b = y, r.m13 = m;
126
- const p = a * m * h + c * g;
127
- r.m21 = p, r.c = p;
128
- const M = c * h - a * m * g;
129
- return r.m22 = M, r.d = M, r.m23 = -a * u, r.m31 = a * g - c * m * h, r.m32 = a * h + c * m * g, r.m33 = c * u, r;
157
+ const r = new C(), n = Math.PI / 180, i = e * n, o = t * n, l = s * n, c = Math.cos(i), a = -Math.sin(i), u = Math.cos(o), f = -Math.sin(o), h = Math.cos(l), y = -Math.sin(l), m = u * h, g = -u * y;
158
+ r.m11 = m, r.a = m, r.m12 = g, r.b = g, r.m13 = f;
159
+ const d = a * f * h + c * y;
160
+ r.m21 = d, r.c = d;
161
+ const M = c * h - a * f * y;
162
+ return r.m22 = M, r.d = M, r.m23 = -a * u, r.m31 = a * y - c * f * h, r.m32 = a * h + c * f * y, r.m33 = c * u, r;
130
163
  }, ie = (e, t, s, r) => {
131
- const n = new T(), i = Math.sqrt(e * e + t * t + s * s);
164
+ const n = new C(), i = Math.sqrt(e * e + t * t + s * s);
132
165
  if (i === 0)
133
166
  return n;
134
- const o = e / i, l = t / i, c = s / i, a = r * (Math.PI / 360), u = Math.sin(a), m = Math.cos(a), h = u * u, g = o * o, f = l * l, y = c * c, p = 1 - 2 * (f + y) * h;
135
- n.m11 = p, n.a = p;
136
- const M = 2 * (o * l * h + c * u * m);
137
- n.m12 = M, n.b = M, n.m13 = 2 * (o * c * h - l * u * m);
138
- const N = 2 * (l * o * h - c * u * m);
139
- n.m21 = N, n.c = N;
140
- const x = 1 - 2 * (y + g) * h;
141
- return n.m22 = x, n.d = x, n.m23 = 2 * (l * c * h + o * u * m), n.m31 = 2 * (c * o * h + l * u * m), n.m32 = 2 * (c * l * h - o * u * m), n.m33 = 1 - 2 * (g + f) * h, n;
167
+ const o = e / i, l = t / i, c = s / i, a = r * (Math.PI / 360), u = Math.sin(a), f = Math.cos(a), h = u * u, y = o * o, m = l * l, g = c * c, d = 1 - 2 * (m + g) * h;
168
+ n.m11 = d, n.a = d;
169
+ const M = 2 * (o * l * h + c * u * f);
170
+ n.m12 = M, n.b = M, n.m13 = 2 * (o * c * h - l * u * f);
171
+ const w = 2 * (l * o * h - c * u * f);
172
+ n.m21 = w, n.c = w;
173
+ const x = 1 - 2 * (g + y) * h;
174
+ return n.m22 = x, n.d = x, n.m23 = 2 * (l * c * h + o * u * f), n.m31 = 2 * (c * o * h + l * u * f), n.m32 = 2 * (c * l * h - o * u * f), n.m33 = 1 - 2 * (y + m) * h, n;
142
175
  }, oe = (e, t, s) => {
143
- const r = new T();
176
+ const r = new C();
144
177
  return r.m11 = e, r.a = e, r.m22 = t, r.d = t, r.m33 = s, r;
145
178
  }, At = (e, t) => {
146
- const s = new T();
179
+ const s = new C();
147
180
  if (e) {
148
181
  const r = e * Math.PI / 180, n = Math.tan(r);
149
182
  s.m21 = n, s.c = n;
@@ -154,10 +187,27 @@ const Oe = {
154
187
  }
155
188
  return s;
156
189
  }, ce = (e) => At(e, 0), le = (e) => At(0, e), _ = (e, t) => {
157
- const s = t.m11 * e.m11 + t.m12 * e.m21 + t.m13 * e.m31 + t.m14 * e.m41, r = t.m11 * e.m12 + t.m12 * e.m22 + t.m13 * e.m32 + t.m14 * e.m42, n = t.m11 * e.m13 + t.m12 * e.m23 + t.m13 * e.m33 + t.m14 * e.m43, i = t.m11 * e.m14 + t.m12 * e.m24 + t.m13 * e.m34 + t.m14 * e.m44, o = t.m21 * e.m11 + t.m22 * e.m21 + t.m23 * e.m31 + t.m24 * e.m41, l = t.m21 * e.m12 + t.m22 * e.m22 + t.m23 * e.m32 + t.m24 * e.m42, c = t.m21 * e.m13 + t.m22 * e.m23 + t.m23 * e.m33 + t.m24 * e.m43, a = t.m21 * e.m14 + t.m22 * e.m24 + t.m23 * e.m34 + t.m24 * e.m44, u = t.m31 * e.m11 + t.m32 * e.m21 + t.m33 * e.m31 + t.m34 * e.m41, m = t.m31 * e.m12 + t.m32 * e.m22 + t.m33 * e.m32 + t.m34 * e.m42, h = t.m31 * e.m13 + t.m32 * e.m23 + t.m33 * e.m33 + t.m34 * e.m43, g = t.m31 * e.m14 + t.m32 * e.m24 + t.m33 * e.m34 + t.m34 * e.m44, f = t.m41 * e.m11 + t.m42 * e.m21 + t.m43 * e.m31 + t.m44 * e.m41, y = t.m41 * e.m12 + t.m42 * e.m22 + t.m43 * e.m32 + t.m44 * e.m42, p = t.m41 * e.m13 + t.m42 * e.m23 + t.m43 * e.m33 + t.m44 * e.m43, M = t.m41 * e.m14 + t.m42 * e.m24 + t.m43 * e.m34 + t.m44 * e.m44;
158
- return lt([s, r, n, i, o, l, c, a, u, m, h, g, f, y, p, M]);
190
+ const s = t.m11 * e.m11 + t.m12 * e.m21 + t.m13 * e.m31 + t.m14 * e.m41, r = t.m11 * e.m12 + t.m12 * e.m22 + t.m13 * e.m32 + t.m14 * e.m42, n = t.m11 * e.m13 + t.m12 * e.m23 + t.m13 * e.m33 + t.m14 * e.m43, i = t.m11 * e.m14 + t.m12 * e.m24 + t.m13 * e.m34 + t.m14 * e.m44, o = t.m21 * e.m11 + t.m22 * e.m21 + t.m23 * e.m31 + t.m24 * e.m41, l = t.m21 * e.m12 + t.m22 * e.m22 + t.m23 * e.m32 + t.m24 * e.m42, c = t.m21 * e.m13 + t.m22 * e.m23 + t.m23 * e.m33 + t.m24 * e.m43, a = t.m21 * e.m14 + t.m22 * e.m24 + t.m23 * e.m34 + t.m24 * e.m44, u = t.m31 * e.m11 + t.m32 * e.m21 + t.m33 * e.m31 + t.m34 * e.m41, f = t.m31 * e.m12 + t.m32 * e.m22 + t.m33 * e.m32 + t.m34 * e.m42, h = t.m31 * e.m13 + t.m32 * e.m23 + t.m33 * e.m33 + t.m34 * e.m43, y = t.m31 * e.m14 + t.m32 * e.m24 + t.m33 * e.m34 + t.m34 * e.m44, m = t.m41 * e.m11 + t.m42 * e.m21 + t.m43 * e.m31 + t.m44 * e.m41, g = t.m41 * e.m12 + t.m42 * e.m22 + t.m43 * e.m32 + t.m44 * e.m42, d = t.m41 * e.m13 + t.m42 * e.m23 + t.m43 * e.m33 + t.m44 * e.m43, M = t.m41 * e.m14 + t.m42 * e.m24 + t.m43 * e.m34 + t.m44 * e.m44;
191
+ return lt([
192
+ s,
193
+ r,
194
+ n,
195
+ i,
196
+ o,
197
+ l,
198
+ c,
199
+ a,
200
+ u,
201
+ f,
202
+ h,
203
+ y,
204
+ m,
205
+ g,
206
+ d,
207
+ M
208
+ ]);
159
209
  };
160
- class T {
210
+ class C {
161
211
  /**
162
212
  * @constructor
163
213
  * @param init accepts all parameter configurations:
@@ -381,7 +431,7 @@ class T {
381
431
  };
382
432
  }
383
433
  }
384
- S(T, "Translate", se), S(T, "Rotate", re), S(T, "RotateAxisAngle", ie), S(T, "Scale", oe), S(T, "SkewX", ce), S(T, "SkewY", le), S(T, "Skew", At), S(T, "Multiply", _), S(T, "fromArray", lt), S(T, "fromMatrix", ee), S(T, "fromString", ne), S(T, "toArray", zt), S(T, "isCompatibleArray", Gt), S(T, "isCompatibleObject", te);
434
+ j(C, "Translate", se), j(C, "Rotate", re), j(C, "RotateAxisAngle", ie), j(C, "Scale", oe), j(C, "SkewX", ce), j(C, "SkewY", le), j(C, "Skew", At), j(C, "Multiply", _), j(C, "fromArray", lt), j(C, "fromMatrix", ee), j(C, "fromString", ne), j(C, "toArray", zt), j(C, "isCompatibleArray", Gt), j(C, "isCompatibleObject", te);
385
435
  const V = {
386
436
  origin: [0, 0, 0],
387
437
  round: 4
@@ -410,7 +460,7 @@ const V = {
410
460
  )
411
461
  ), !!tt[s]); )
412
462
  ;
413
- }, j = "SVGPathCommander Error", ae = (e) => {
463
+ }, S = "SVGPathCommander Error", ae = (e) => {
414
464
  const { index: t, pathValue: s } = e, r = s.charCodeAt(t);
415
465
  if (r === 48) {
416
466
  e.param = 0, e.index += 1;
@@ -420,21 +470,21 @@ const V = {
420
470
  e.param = 1, e.index += 1;
421
471
  return;
422
472
  }
423
- e.err = `${j}: invalid Arc flag "${s[t]}", expecting 0 or 1 at index ${t}`;
473
+ e.err = `${S}: invalid Arc flag "${s[t]}", expecting 0 or 1 at index ${t}`;
424
474
  }, U = (e) => e >= 48 && e <= 57, J = "Invalid path value", ue = (e) => {
425
475
  const { max: t, pathValue: s, index: r } = e;
426
476
  let n = r, i = !1, o = !1, l = !1, c = !1, a;
427
477
  if (n >= t) {
428
- e.err = `${j}: ${J} at index ${n}, "pathValue" is missing param`;
478
+ e.err = `${S}: ${J} at index ${n}, "pathValue" is missing param`;
429
479
  return;
430
480
  }
431
481
  if (a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1, a = s.charCodeAt(n)), !U(a) && a !== 46) {
432
- e.err = `${j}: ${J} at index ${n}, "${s[n]}" is not a number`;
482
+ e.err = `${S}: ${J} at index ${n}, "${s[n]}" is not a number`;
433
483
  return;
434
484
  }
435
485
  if (a !== 46) {
436
486
  if (i = a === 48, n += 1, a = s.charCodeAt(n), i && n < t && a && U(a)) {
437
- e.err = `${j}: ${J} at index ${r}, "${s[r]}" illegal number`;
487
+ e.err = `${S}: ${J} at index ${r}, "${s[r]}" illegal number`;
438
488
  return;
439
489
  }
440
490
  for (; n < t && U(s.charCodeAt(n)); )
@@ -448,14 +498,14 @@ const V = {
448
498
  }
449
499
  if (a === 101 || a === 69) {
450
500
  if (c && !o && !l) {
451
- e.err = `${j}: ${J} at index ${n}, "${s[n]}" invalid float exponent`;
501
+ e.err = `${S}: ${J} at index ${n}, "${s[n]}" invalid float exponent`;
452
502
  return;
453
503
  }
454
504
  if (n += 1, a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1), n < t && U(s.charCodeAt(n)))
455
505
  for (; n < t && U(s.charCodeAt(n)); )
456
506
  n += 1;
457
507
  else {
458
- e.err = `${j}: ${J} at index ${n}, "${s[n]}" invalid integer exponent`;
508
+ e.err = `${S}: ${J} at index ${n}, "${s[n]}" invalid integer exponent`;
459
509
  return;
460
510
  }
461
511
  }
@@ -522,12 +572,12 @@ const V = {
522
572
  var c;
523
573
  const { max: t, pathValue: s, index: r, segments: n } = e, i = s.charCodeAt(r), o = tt[s[r].toLowerCase()];
524
574
  if (e.segmentStart = r, !fe(i)) {
525
- e.err = `${j}: ${J} "${s[r]}" is not a path command at index ${r}`;
575
+ e.err = `${S}: ${J} "${s[r]}" is not a path command at index ${r}`;
526
576
  return;
527
577
  }
528
578
  const l = n[n.length - 1];
529
579
  if (!ge(i) && ((c = l == null ? void 0 : l[0]) == null ? void 0 : c.toLocaleLowerCase()) === "z") {
530
- e.err = `${j}: ${J} "${s[r]}" is not a MoveTo path command at index ${r}`;
580
+ e.err = `${S}: ${J} "${s[r]}" is not a MoveTo path command at index ${r}`;
531
581
  return;
532
582
  }
533
583
  if (e.index += 1, et(e), e.data = [], !o) {
@@ -590,13 +640,13 @@ const Q = (e) => {
590
640
  return [i].concat(l);
591
641
  }
592
642
  }, Z = (e, t) => {
593
- let s = e.length, r, n = "M", i = "M", o = !1, l = 0, c = 0, a = 0, u = 0, m = 0;
643
+ let s = e.length, r, n = "M", i = "M", o = !1, l = 0, c = 0, a = 0, u = 0, f = 0;
594
644
  for (let h = 0; h < s; h += 1) {
595
- r = e[h], [n] = r, m = r.length, i = n.toUpperCase(), o = i !== n;
596
- const g = t(r, h, l, c);
597
- if (g === !1)
645
+ r = e[h], [n] = r, f = r.length, i = n.toUpperCase(), o = i !== n;
646
+ const y = t(r, h, l, c);
647
+ if (y === !1)
598
648
  break;
599
- i === "Z" ? (l = a, c = u) : i === "H" ? l = r[1] + (o ? l : 0) : i === "V" ? c = r[1] + (o ? c : 0) : (l = r[m - 2] + (o ? l : 0), c = r[m - 1] + (o ? c : 0), i === "M" && (a = l, u = c)), g && (e[h] = g, g[0] === "C" && (s = e.length));
649
+ i === "Z" ? (l = a, c = u) : i === "H" ? l = r[1] + (o ? l : 0) : i === "V" ? c = r[1] + (o ? c : 0) : (l = r[f - 2] + (o ? l : 0), c = r[f - 1] + (o ? c : 0), i === "M" && (a = l, u = c)), y && (e[h] = y, y[0] === "C" && (s = e.length));
600
650
  }
601
651
  return e;
602
652
  }, ht = (e) => {
@@ -639,41 +689,41 @@ const Q = (e) => {
639
689
  const { sin: r, cos: n } = Math, i = e * n(s) - t * r(s), o = e * r(s) + t * n(s);
640
690
  return { x: i, y: o };
641
691
  }, Mt = (e, t, s, r, n, i, o, l, c, a) => {
642
- let u = e, m = t, h = s, g = r, f = l, y = c;
643
- const p = Math.PI * 120 / 180, M = Math.PI / 180 * (+n || 0);
644
- let N = [], x, b, L, C, I;
692
+ let u = e, f = t, h = s, y = r, m = l, g = c;
693
+ const d = Math.PI * 120 / 180, M = Math.PI / 180 * (+n || 0);
694
+ let w = [], x, p, L, T, I;
645
695
  if (a)
646
- [b, L, C, I] = a;
696
+ [p, L, T, I] = a;
647
697
  else {
648
- x = st(u, m, -M), u = x.x, m = x.y, x = st(f, y, -M), f = x.x, y = x.y;
649
- const v = (u - f) / 2, O = (m - y) / 2;
650
- let X = v * v / (h * h) + O * O / (g * g);
651
- X > 1 && (X = Math.sqrt(X), h *= X, g *= X);
652
- const Tt = h * h, $t = g * g, Jt = (i === o ? -1 : 1) * Math.sqrt(
698
+ x = st(u, f, -M), u = x.x, f = x.y, x = st(m, g, -M), m = x.x, g = x.y;
699
+ const v = (u - m) / 2, O = (f - g) / 2;
700
+ let X = v * v / (h * h) + O * O / (y * y);
701
+ X > 1 && (X = Math.sqrt(X), h *= X, y *= X);
702
+ const Ct = h * h, $t = y * y, Jt = (i === o ? -1 : 1) * Math.sqrt(
653
703
  Math.abs(
654
- (Tt * $t - Tt * O * O - $t * v * v) / (Tt * O * O + $t * v * v)
704
+ (Ct * $t - Ct * O * O - $t * v * v) / (Ct * O * O + $t * v * v)
655
705
  )
656
706
  );
657
- C = Jt * h * O / g + (u + f) / 2, I = Jt * -g * v / h + (m + y) / 2, b = Math.asin(((m - I) / g * 10 ** 9 >> 0) / 10 ** 9), L = Math.asin(((y - I) / g * 10 ** 9 >> 0) / 10 ** 9), b = u < C ? Math.PI - b : b, L = f < C ? Math.PI - L : L, b < 0 && (b = Math.PI * 2 + b), L < 0 && (L = Math.PI * 2 + L), o && b > L && (b -= Math.PI * 2), !o && L > b && (L -= Math.PI * 2);
707
+ T = Jt * h * O / y + (u + m) / 2, I = Jt * -y * v / h + (f + g) / 2, p = Math.asin(((f - I) / y * 10 ** 9 >> 0) / 10 ** 9), L = Math.asin(((g - I) / y * 10 ** 9 >> 0) / 10 ** 9), p = u < T ? Math.PI - p : p, L = m < T ? Math.PI - L : L, p < 0 && (p = Math.PI * 2 + p), L < 0 && (L = Math.PI * 2 + L), o && p > L && (p -= Math.PI * 2), !o && L > p && (L -= Math.PI * 2);
658
708
  }
659
- let R = L - b;
660
- if (Math.abs(R) > p) {
661
- const v = L, O = f, X = y;
662
- L = b + p * (o && L > b ? 1 : -1), f = C + h * Math.cos(L), y = I + g * Math.sin(L), N = Mt(f, y, h, g, n, 0, o, O, X, [
709
+ let R = L - p;
710
+ if (Math.abs(R) > d) {
711
+ const v = L, O = m, X = g;
712
+ L = p + d * (o && L > p ? 1 : -1), m = T + h * Math.cos(L), g = I + y * Math.sin(L), w = Mt(m, g, h, y, n, 0, o, O, X, [
663
713
  L,
664
714
  v,
665
- C,
715
+ T,
666
716
  I
667
717
  ]);
668
718
  }
669
- R = L - b;
670
- const P = Math.cos(b), z = Math.sin(b), D = Math.cos(L), K = Math.sin(L), q = Math.tan(R / 4), w = 4 / 3 * h * q, $ = 4 / 3 * g * q, E = [u, m], B = [u + w * z, m - $ * P], F = [f + w * K, y - $ * D], G = [f, y];
719
+ R = L - p;
720
+ const P = Math.cos(p), z = Math.sin(p), D = Math.cos(L), K = Math.sin(L), q = Math.tan(R / 4), N = 4 / 3 * h * q, $ = 4 / 3 * y * q, E = [u, f], B = [u + N * z, f - $ * P], F = [m + N * K, g - $ * D], G = [m, g];
671
721
  if (B[0] = 2 * E[0] - B[0], B[1] = 2 * E[1] - B[1], a)
672
- return [B[0], B[1], F[0], F[1], G[0], G[1]].concat(N);
673
- N = [B[0], B[1], F[0], F[1], G[0], G[1]].concat(N);
722
+ return [B[0], B[1], F[0], F[1], G[0], G[1]].concat(w);
723
+ w = [B[0], B[1], F[0], F[1], G[0], G[1]].concat(w);
674
724
  const W = [];
675
- for (let v = 0, O = N.length; v < O; v += 1)
676
- W[v] = v % 2 ? st(N[v - 1], N[v], M).y : st(N[v], N[v + 1], M).x;
725
+ for (let v = 0, O = w.length; v < O; v += 1)
726
+ W[v] = v % 2 ? st(w[v - 1], w[v], M).y : st(w[v], w[v + 1], M).x;
677
727
  return W;
678
728
  }, xe = (e, t, s, r, n, i) => {
679
729
  const o = 0.3333333333333333, l = 2 / 3;
@@ -717,13 +767,13 @@ const Q = (e) => {
717
767
  ) : s === "Z" ? ["C"].concat(
718
768
  Pt(o, l, c, a)
719
769
  ) : e;
720
- }, wt = (e, t) => {
721
- const [s] = e, r = s.toUpperCase(), n = s !== r, { x1: i, y1: o, x2: l, y2: c, x: a, y: u } = t, m = e.slice(1);
722
- let h = m.map((g, f) => g + (n ? f % 2 ? u : a : 0));
770
+ }, Nt = (e, t) => {
771
+ const [s] = e, r = s.toUpperCase(), n = s !== r, { x1: i, y1: o, x2: l, y2: c, x: a, y: u } = t, f = e.slice(1);
772
+ let h = f.map((y, m) => y + (n ? m % 2 ? u : a : 0));
723
773
  if ("TQ".includes(r) || (t.qx = null, t.qy = null), r === "A")
724
- return h = m.slice(0, -2).concat(
725
- m[5] + (n ? a : 0),
726
- m[6] + (n ? u : 0)
774
+ return h = f.slice(0, -2).concat(
775
+ f[5] + (n ? a : 0),
776
+ f[6] + (n ? u : 0)
727
777
  ), ["A"].concat(h);
728
778
  if (r === "H")
729
779
  return [
@@ -752,20 +802,20 @@ const Q = (e) => {
752
802
  if (r === "C")
753
803
  return ["C"].concat(h);
754
804
  if (r === "S") {
755
- const g = i * 2 - l, f = o * 2 - c;
756
- return t.x1 = g, t.y1 = f, ["C", g, f].concat(h);
805
+ const y = i * 2 - l, m = o * 2 - c;
806
+ return t.x1 = y, t.y1 = m, ["C", y, m].concat(h);
757
807
  } else if (r === "T") {
758
- const g = i * 2 - (t.qx ? t.qx : (
808
+ const y = i * 2 - (t.qx ? t.qx : (
759
809
  /* istanbul ignore next */
760
810
  0
761
- )), f = o * 2 - (t.qy ? t.qy : (
811
+ )), m = o * 2 - (t.qy ? t.qy : (
762
812
  /* istanbul ignore next */
763
813
  0
764
814
  ));
765
- return t.qx = g, t.qy = f, ["Q", g, f].concat(h);
815
+ return t.qx = y, t.qy = m, ["Q", y, m].concat(h);
766
816
  } else if (r === "Q") {
767
- const [g, f] = h;
768
- return t.qx = g, t.qy = f, ["Q"].concat(h);
817
+ const [y, m] = h;
818
+ return t.qx = y, t.qy = m, ["Q"].concat(h);
769
819
  } else if (r === "Z")
770
820
  return ["Z"];
771
821
  return e;
@@ -782,7 +832,7 @@ const Q = (e) => {
782
832
  const t = { ...ut }, s = Q(e);
783
833
  return Z(s, (r, n, i, o) => {
784
834
  t.x = i, t.y = o;
785
- const l = wt(r, t);
835
+ const l = Nt(r, t);
786
836
  let c = pe(l, t);
787
837
  c[0] === "C" && c.length > 7 && (s.splice(
788
838
  n + 1,
@@ -815,12 +865,12 @@ const Q = (e) => {
815
865
  }
816
866
  }
817
867
  return i;
818
- }, Nt = (e, t) => Math.sqrt(
868
+ }, wt = (e, t) => Math.sqrt(
819
869
  (e[0] - t[0]) * (e[0] - t[0]) + (e[1] - t[1]) * (e[1] - t[1])
820
- ), it = (e, t, s, r) => Nt([e, t], [s, r]), Ht = (e, t, s, r, n) => {
870
+ ), it = (e, t, s, r) => wt([e, t], [s, r]), Ht = (e, t, s, r, n) => {
821
871
  let i = { x: e, y: t };
822
872
  if (typeof n == "number") {
823
- const o = Nt([e, t], [s, r]);
873
+ const o = wt([e, t], [s, r]);
824
874
  if (n <= 0)
825
875
  i = { x: e, y: t };
826
876
  else if (n >= o)
@@ -838,64 +888,64 @@ const Q = (e) => {
838
888
  const r = s / 2, n = Math.sin(r), i = Math.cos(r), o = e ** 2 * n ** 2, l = t ** 2 * i ** 2, c = Math.sqrt(o + l) * s;
839
889
  return Math.abs(c);
840
890
  }, Y = (e, t, s, r, n, i) => {
841
- const { sin: o, cos: l } = Math, c = l(n), a = o(n), u = s * l(i), m = r * o(i);
842
- return [e + c * u - a * m, t + a * u + c * m];
891
+ const { sin: o, cos: l } = Math, c = l(n), a = o(n), u = s * l(i), f = r * o(i);
892
+ return [e + c * u - a * f, t + a * u + c * f];
843
893
  }, Et = (e, t) => {
844
894
  const { x: s, y: r } = e, { x: n, y: i } = t, o = s * n + r * i, l = Math.sqrt((s ** 2 + r ** 2) * (n ** 2 + i ** 2));
845
895
  return (s * i - r * n < 0 ? -1 : 1) * Math.acos(o / l);
846
896
  }, Lt = (e, t, s, r, n, i, o, l, c) => {
847
- const { abs: a, sin: u, cos: m, sqrt: h, PI: g } = Math;
848
- let f = a(s), y = a(r);
849
- const M = (n % 360 + 360) % 360 * (g / 180);
897
+ const { abs: a, sin: u, cos: f, sqrt: h, PI: y } = Math;
898
+ let m = a(s), g = a(r);
899
+ const M = (n % 360 + 360) % 360 * (y / 180);
850
900
  if (e === l && t === c)
851
901
  return {
852
- rx: f,
853
- ry: y,
902
+ rx: m,
903
+ ry: g,
854
904
  startAngle: 0,
855
905
  endAngle: 0,
856
906
  center: { x: l, y: c }
857
907
  };
858
- if (f === 0 || y === 0)
908
+ if (m === 0 || g === 0)
859
909
  return {
860
- rx: f,
861
- ry: y,
910
+ rx: m,
911
+ ry: g,
862
912
  startAngle: 0,
863
913
  endAngle: 0,
864
914
  center: { x: (l + e) / 2, y: (c + t) / 2 }
865
915
  };
866
- const N = (e - l) / 2, x = (t - c) / 2, b = {
867
- x: m(M) * N + u(M) * x,
868
- y: -u(M) * N + m(M) * x
869
- }, L = b.x ** 2 / f ** 2 + b.y ** 2 / y ** 2;
870
- L > 1 && (f *= h(L), y *= h(L));
871
- const C = f ** 2 * y ** 2 - f ** 2 * b.y ** 2 - y ** 2 * b.x ** 2, I = f ** 2 * b.y ** 2 + y ** 2 * b.x ** 2;
872
- let R = C / I;
916
+ const w = (e - l) / 2, x = (t - c) / 2, p = {
917
+ x: f(M) * w + u(M) * x,
918
+ y: -u(M) * w + f(M) * x
919
+ }, L = p.x ** 2 / m ** 2 + p.y ** 2 / g ** 2;
920
+ L > 1 && (m *= h(L), g *= h(L));
921
+ const T = m ** 2 * g ** 2 - m ** 2 * p.y ** 2 - g ** 2 * p.x ** 2, I = m ** 2 * p.y ** 2 + g ** 2 * p.x ** 2;
922
+ let R = T / I;
873
923
  R = R < 0 ? 0 : R;
874
924
  const P = (i !== o ? 1 : -1) * h(R), z = {
875
- x: P * (f * b.y / y),
876
- y: P * (-(y * b.x) / f)
925
+ x: P * (m * p.y / g),
926
+ y: P * (-(g * p.x) / m)
877
927
  }, D = {
878
- x: m(M) * z.x - u(M) * z.y + (e + l) / 2,
879
- y: u(M) * z.x + m(M) * z.y + (t + c) / 2
928
+ x: f(M) * z.x - u(M) * z.y + (e + l) / 2,
929
+ y: u(M) * z.x + f(M) * z.y + (t + c) / 2
880
930
  }, K = {
881
- x: (b.x - z.x) / f,
882
- y: (b.y - z.y) / y
883
- }, q = Et({ x: 1, y: 0 }, K), w = {
884
- x: (-b.x - z.x) / f,
885
- y: (-b.y - z.y) / y
931
+ x: (p.x - z.x) / m,
932
+ y: (p.y - z.y) / g
933
+ }, q = Et({ x: 1, y: 0 }, K), N = {
934
+ x: (-p.x - z.x) / m,
935
+ y: (-p.y - z.y) / g
886
936
  };
887
- let $ = Et(K, w);
888
- !o && $ > 0 ? $ -= 2 * g : o && $ < 0 && ($ += 2 * g), $ %= 2 * g;
937
+ let $ = Et(K, N);
938
+ !o && $ > 0 ? $ -= 2 * y : o && $ < 0 && ($ += 2 * y), $ %= 2 * y;
889
939
  const E = q + $;
890
940
  return {
891
941
  center: D,
892
942
  startAngle: q,
893
943
  endAngle: E,
894
- rx: f,
895
- ry: y
944
+ rx: m,
945
+ ry: g
896
946
  };
897
947
  }, _t = (e, t, s, r, n, i, o, l, c) => {
898
- const { rx: a, ry: u, startAngle: m, endAngle: h } = Lt(
948
+ const { rx: a, ry: u, startAngle: f, endAngle: h } = Lt(
899
949
  e,
900
950
  t,
901
951
  s,
@@ -906,10 +956,10 @@ const Q = (e) => {
906
956
  l,
907
957
  c
908
958
  );
909
- return Ft(a, u, h - m);
959
+ return Ft(a, u, h - f);
910
960
  }, be = (e, t, s, r, n, i, o, l, c, a) => {
911
961
  let u = { x: e, y: t };
912
- const { center: m, rx: h, ry: g, startAngle: f, endAngle: y } = Lt(
962
+ const { center: f, rx: h, ry: y, startAngle: m, endAngle: g } = Lt(
913
963
  e,
914
964
  t,
915
965
  s,
@@ -921,26 +971,26 @@ const Q = (e) => {
921
971
  c
922
972
  );
923
973
  if (typeof a == "number") {
924
- const p = Ft(h, g, y - f);
974
+ const d = Ft(h, y, g - m);
925
975
  if (a <= 0)
926
976
  u = { x: e, y: t };
927
- else if (a >= p)
977
+ else if (a >= d)
928
978
  u = { x: l, y: c };
929
979
  else {
930
980
  if (e === l && t === c)
931
981
  return { x: l, y: c };
932
- if (h === 0 || g === 0)
982
+ if (h === 0 || y === 0)
933
983
  return Ht(e, t, l, c, a);
934
- const { PI: M, cos: N, sin: x } = Math, b = y - f, C = (n % 360 + 360) % 360 * (M / 180), I = f + b * (a / p), R = h * N(I), P = g * x(I);
984
+ const { PI: M, cos: w, sin: x } = Math, p = g - m, T = (n % 360 + 360) % 360 * (M / 180), I = m + p * (a / d), R = h * w(I), P = y * x(I);
935
985
  u = {
936
- x: N(C) * R - x(C) * P + m.x,
937
- y: x(C) * R + N(C) * P + m.y
986
+ x: w(T) * R - x(T) * P + f.x,
987
+ y: x(T) * R + w(T) * P + f.y
938
988
  };
939
989
  }
940
990
  }
941
991
  return u;
942
992
  }, de = (e, t, s, r, n, i, o, l, c) => {
943
- const { center: a, rx: u, ry: m, startAngle: h, endAngle: g } = Lt(
993
+ const { center: a, rx: u, ry: f, startAngle: h, endAngle: y } = Lt(
944
994
  e,
945
995
  t,
946
996
  s,
@@ -950,27 +1000,27 @@ const Q = (e) => {
950
1000
  o,
951
1001
  l,
952
1002
  c
953
- ), f = g - h, { min: y, max: p, tan: M, atan2: N, PI: x } = Math, { x: b, y: L } = a, C = n * x / 180, I = M(C), R = N(-m * I, u), P = R, z = R + x, D = N(m, u * I), K = D + x;
954
- let q = y(e, l), w = p(e, l), $ = y(t, c), E = p(t, c);
955
- const B = g - f * 1e-3, F = Y(b, L, u, m, C, B), G = g - f * 0.999, W = Y(b, L, u, m, C, G);
956
- if (F[0] > w || W[0] > w) {
957
- const v = Y(b, L, u, m, C, P);
958
- q = y(q, v[0]), $ = y($, v[1]), w = p(w, v[0]), E = p(E, v[1]);
1003
+ ), m = y - h, { min: g, max: d, tan: M, atan2: w, PI: x } = Math, { x: p, y: L } = a, T = n * x / 180, I = M(T), R = w(-f * I, u), P = R, z = R + x, D = w(f, u * I), K = D + x;
1004
+ let q = g(e, l), N = d(e, l), $ = g(t, c), E = d(t, c);
1005
+ const B = y - m * 1e-3, F = Y(p, L, u, f, T, B), G = y - m * 0.999, W = Y(p, L, u, f, T, G);
1006
+ if (F[0] > N || W[0] > N) {
1007
+ const v = Y(p, L, u, f, T, P);
1008
+ q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
959
1009
  }
960
1010
  if (F[0] < q || W[0] < q) {
961
- const v = Y(b, L, u, m, C, z);
962
- q = y(q, v[0]), $ = y($, v[1]), w = p(w, v[0]), E = p(E, v[1]);
1011
+ const v = Y(p, L, u, f, T, z);
1012
+ q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
963
1013
  }
964
1014
  if (F[1] < $ || W[1] < $) {
965
- const v = Y(b, L, u, m, C, K);
966
- q = y(q, v[0]), $ = y($, v[1]), w = p(w, v[0]), E = p(E, v[1]);
1015
+ const v = Y(p, L, u, f, T, K);
1016
+ q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
967
1017
  }
968
1018
  if (F[1] > E || W[1] > E) {
969
- const v = Y(b, L, u, m, C, D);
970
- q = y(q, v[0]), $ = y($, v[1]), w = p(w, v[0]), E = p(E, v[1]);
1019
+ const v = Y(p, L, u, f, T, D);
1020
+ q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
971
1021
  }
972
- return [q, $, w, E];
973
- }, Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1022
+ return [q, $, N, E];
1023
+ }, He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
974
1024
  __proto__: null,
975
1025
  angleBetween: Et,
976
1026
  arcLength: Ft,
@@ -1042,7 +1092,7 @@ const Q = (e) => {
1042
1092
  t.push(i), s = i;
1043
1093
  }
1044
1094
  return t;
1045
- }, we = (e, t) => {
1095
+ }, Ne = (e, t) => {
1046
1096
  if (t === 0)
1047
1097
  return e[0].t = 0, e[0];
1048
1098
  const s = e.length - 1;
@@ -1065,14 +1115,14 @@ const Q = (e) => {
1065
1115
  y: l * n[0].y + c * n[1].y + a * n[2].y + u * n[3].y,
1066
1116
  t
1067
1117
  };
1068
- }, Ne = (e, t) => {
1118
+ }, we = (e, t) => {
1069
1119
  const s = e(t), r = s.x * s.x + s.y * s.y;
1070
1120
  return Math.sqrt(r);
1071
1121
  }, Le = (e) => {
1072
1122
  const s = Rt.length;
1073
1123
  let r = 0;
1074
1124
  for (let n = 0, i; n < s; n++)
1075
- i = 0.5 * Rt[n] + 0.5, r += Ae[n] * Ne(e, i);
1125
+ i = 0.5 * Rt[n] + 0.5, r += Ae[n] * we(e, i);
1076
1126
  return 0.5 * r;
1077
1127
  }, mt = (e) => {
1078
1128
  const t = [];
@@ -1082,14 +1132,14 @@ const Q = (e) => {
1082
1132
  y: e[r + 1]
1083
1133
  });
1084
1134
  const s = Me(t);
1085
- return Le((r) => we(s[0], r));
1135
+ return Le((r) => Ne(s[0], r));
1086
1136
  }, ve = 1e-8, gt = ([e, t, s]) => {
1087
1137
  const r = Math.min(e, s), n = Math.max(e, s);
1088
1138
  if (t >= e ? s >= t : s <= t)
1089
1139
  return [r, n];
1090
1140
  const i = (e * s - t * t) / (e - 2 * t + s);
1091
1141
  return i < r ? [i, n] : [r, i];
1092
- }, St = ([e, t, s, r]) => {
1142
+ }, jt = ([e, t, s, r]) => {
1093
1143
  const n = e - 3 * t + 3 * s - r;
1094
1144
  if (Math.abs(n) < ve)
1095
1145
  return e === r && e === t ? [e, r] : gt([e, -0.5 * e + 1.5 * t, e - 3 * t + 3 * s]);
@@ -1099,31 +1149,31 @@ const Q = (e) => {
1099
1149
  const o = Math.sqrt(i);
1100
1150
  let l = Math.min(e, r), c = Math.max(e, r);
1101
1151
  const a = e - 2 * t + s;
1102
- for (let u = (a + o) / n, m = 1; m <= 2; u = (a - o) / n, m++)
1152
+ for (let u = (a + o) / n, f = 1; f <= 2; u = (a - o) / n, f++)
1103
1153
  if (u > 0 && u < 1) {
1104
1154
  const h = e * (1 - u) * (1 - u) * (1 - u) + t * 3 * (1 - u) * (1 - u) * u + s * 3 * (1 - u) * u * u + r * u * u * u;
1105
1155
  h < l && (l = h), h > c && (c = h);
1106
1156
  }
1107
1157
  return [l, c];
1108
- }, Ce = ([e, t, s, r, n, i, o, l], c) => {
1158
+ }, Te = ([e, t, s, r, n, i, o, l], c) => {
1109
1159
  const a = 1 - c;
1110
1160
  return {
1111
1161
  x: a ** 3 * e + 3 * a ** 2 * c * s + 3 * a * c ** 2 * n + c ** 3 * o,
1112
1162
  y: a ** 3 * t + 3 * a ** 2 * c * r + 3 * a * c ** 2 * i + c ** 3 * l
1113
1163
  };
1114
- }, xt = (e, t, s, r, n, i, o, l) => mt([e, t, s, r, n, i, o, l]), Te = (e, t, s, r, n, i, o, l, c) => {
1164
+ }, xt = (e, t, s, r, n, i, o, l) => mt([e, t, s, r, n, i, o, l]), Ce = (e, t, s, r, n, i, o, l, c) => {
1115
1165
  const a = typeof c == "number";
1116
1166
  let u = { x: e, y: t };
1117
1167
  if (a) {
1118
- const m = mt([e, t, s, r, n, i, o, l]);
1119
- c <= 0 || (c >= m ? u = { x: o, y: l } : u = Ce(
1168
+ const f = mt([e, t, s, r, n, i, o, l]);
1169
+ c <= 0 || (c >= f ? u = { x: o, y: l } : u = Te(
1120
1170
  [e, t, s, r, n, i, o, l],
1121
- c / m
1171
+ c / f
1122
1172
  ));
1123
1173
  }
1124
1174
  return u;
1125
- }, jt = (e, t, s, r, n, i, o, l) => {
1126
- const c = St([e, s, n, o]), a = St([t, r, i, l]);
1175
+ }, St = (e, t, s, r, n, i, o, l) => {
1176
+ const c = jt([e, s, n, o]), a = jt([t, r, i, l]);
1127
1177
  return [c[0], a[0], c[1], a[1]];
1128
1178
  }, $e = ([e, t, s, r, n, i], o) => {
1129
1179
  const l = 1 - o;
@@ -1145,32 +1195,32 @@ const Q = (e) => {
1145
1195
  }, Qt = (e, t, s, r, n, i) => {
1146
1196
  const o = gt([e, s, n]), l = gt([t, r, i]);
1147
1197
  return [o[0], l[0], o[1], l[1]];
1148
- }, He = (e) => {
1198
+ }, Fe = (e) => {
1149
1199
  const t = e.length;
1150
1200
  let s = -1, r, n = e[t - 1], i = 0;
1151
1201
  for (; ++s < t; )
1152
1202
  r = n, n = e[s], i += r[1] * n[0] - r[0] * n[1];
1153
1203
  return i / 2;
1154
- }, Fe = (e) => e.reduce((t, s, r) => r ? t + Nt(e[r - 1], s) : 0, 0), bt = 1e-5, ot = (e) => {
1204
+ }, _e = (e) => e.reduce((t, s, r) => r ? t + wt(e[r - 1], s) : 0, 0), bt = 1e-5, ot = (e) => {
1155
1205
  const t = Q(e), s = { ...ut };
1156
1206
  return Z(t, (r, n, i, o) => {
1157
1207
  s.x = i, s.y = o;
1158
- const l = wt(r, s), c = l.length;
1208
+ const l = Nt(r, s), c = l.length;
1159
1209
  return s.x1 = +l[c - 2], s.y1 = +l[c - 1], s.x2 = +l[c - 4] || s.x1, s.y2 = +l[c - 3] || s.y1, l;
1160
1210
  });
1161
1211
  }, rt = (e, t) => {
1162
1212
  const s = ot(e);
1163
1213
  let r = !1, n = [], i = "M", o = 0, l = 0, [c, a] = s[0].slice(1);
1164
1214
  const u = typeof t == "number";
1165
- let m = { x: c, y: a }, h = 0, g = m, f = 0;
1166
- return !u || t < bt ? m : (Z(s, (y, p, M, N) => {
1167
- if ([i] = y, r = i === "M", n = r ? n : [M, N].concat(y.slice(1)), r ? ([, c, a] = y, m = { x: c, y: a }, h = 0) : i === "L" ? (m = Ht(
1215
+ let f = { x: c, y: a }, h = 0, y = f, m = 0;
1216
+ return !u || t < bt ? f : (Z(s, (g, d, M, w) => {
1217
+ if ([i] = g, r = i === "M", n = r ? n : [M, w].concat(g.slice(1)), r ? ([, c, a] = g, f = { x: c, y: a }, h = 0) : i === "L" ? (f = Ht(
1168
1218
  n[0],
1169
1219
  n[1],
1170
1220
  n[2],
1171
1221
  n[3],
1172
- t - f
1173
- ), h = it(n[0], n[1], n[2], n[3])) : i === "A" ? (m = be(
1222
+ t - m
1223
+ ), h = it(n[0], n[1], n[2], n[3])) : i === "A" ? (f = be(
1174
1224
  n[0],
1175
1225
  n[1],
1176
1226
  n[2],
@@ -1180,7 +1230,7 @@ const Q = (e) => {
1180
1230
  n[6],
1181
1231
  n[7],
1182
1232
  n[8],
1183
- t - f
1233
+ t - m
1184
1234
  ), h = _t(
1185
1235
  n[0],
1186
1236
  n[1],
@@ -1191,7 +1241,7 @@ const Q = (e) => {
1191
1241
  n[6],
1192
1242
  n[7],
1193
1243
  n[8]
1194
- )) : i === "C" ? (m = Te(
1244
+ )) : i === "C" ? (f = Ce(
1195
1245
  n[0],
1196
1246
  n[1],
1197
1247
  n[2],
@@ -1200,7 +1250,7 @@ const Q = (e) => {
1200
1250
  n[5],
1201
1251
  n[6],
1202
1252
  n[7],
1203
- t - f
1253
+ t - m
1204
1254
  ), h = xt(
1205
1255
  n[0],
1206
1256
  n[1],
@@ -1210,14 +1260,14 @@ const Q = (e) => {
1210
1260
  n[5],
1211
1261
  n[6],
1212
1262
  n[7]
1213
- )) : i === "Q" ? (m = ze(
1263
+ )) : i === "Q" ? (f = ze(
1214
1264
  n[0],
1215
1265
  n[1],
1216
1266
  n[2],
1217
1267
  n[3],
1218
1268
  n[4],
1219
1269
  n[5],
1220
- t - f
1270
+ t - m
1221
1271
  ), h = pt(
1222
1272
  n[0],
1223
1273
  n[1],
@@ -1225,31 +1275,31 @@ const Q = (e) => {
1225
1275
  n[3],
1226
1276
  n[4],
1227
1277
  n[5]
1228
- )) : i === "Z" && (n = [M, N, c, a], m = { x: c, y: a }, h = it(n[0], n[1], n[2], n[3])), [o, l] = n.slice(-2), f < t)
1229
- g = m;
1278
+ )) : i === "Z" && (n = [M, w, c, a], f = { x: c, y: a }, h = it(n[0], n[1], n[2], n[3])), [o, l] = n.slice(-2), m < t)
1279
+ y = f;
1230
1280
  else
1231
1281
  return !1;
1232
- f += h;
1233
- }), t > f - bt ? { x: o, y: l } : g);
1282
+ m += h;
1283
+ }), t > m - bt ? { x: o, y: l } : y);
1234
1284
  }, nt = (e) => {
1235
1285
  const t = Q(e);
1236
- let s = 0, r = 0, n = 0, i = 0, o = 0, l = 0, c = "M", a = 0, u = 0, m = 0;
1237
- return Z(t, (h, g, f, y) => {
1286
+ let s = 0, r = 0, n = 0, i = 0, o = 0, l = 0, c = "M", a = 0, u = 0, f = 0;
1287
+ return Z(t, (h, y, m, g) => {
1238
1288
  [c] = h;
1239
- const p = c.toUpperCase(), N = p !== c ? at(h, g, f, y) : h.slice(0), x = p === "V" ? ["L", f, N[1]] : p === "H" ? ["L", N[1], y] : N;
1240
- if ([c] = x, "TQ".includes(p) || (o = 0, l = 0), c === "M")
1289
+ const d = c.toUpperCase(), w = d !== c ? at(h, y, m, g) : h.slice(0), x = d === "V" ? ["L", m, w[1]] : d === "H" ? ["L", w[1], g] : w;
1290
+ if ([c] = x, "TQ".includes(d) || (o = 0, l = 0), c === "M")
1241
1291
  [, a, u] = x;
1242
1292
  else if (c === "L")
1243
- m += it(
1244
- f,
1245
- y,
1293
+ f += it(
1294
+ m,
1295
+ g,
1246
1296
  x[1],
1247
1297
  x[2]
1248
1298
  );
1249
1299
  else if (c === "A")
1250
- m += _t(
1251
- f,
1252
- y,
1300
+ f += _t(
1301
+ m,
1302
+ g,
1253
1303
  x[1],
1254
1304
  x[2],
1255
1305
  x[3],
@@ -1259,43 +1309,43 @@ const Q = (e) => {
1259
1309
  x[7]
1260
1310
  );
1261
1311
  else if (c === "S") {
1262
- const b = s * 2 - n, L = r * 2 - i;
1263
- m += xt(
1264
- f,
1265
- y,
1266
- b,
1312
+ const p = s * 2 - n, L = r * 2 - i;
1313
+ f += xt(
1314
+ m,
1315
+ g,
1316
+ p,
1267
1317
  L,
1268
1318
  x[1],
1269
1319
  x[2],
1270
1320
  x[3],
1271
1321
  x[4]
1272
1322
  );
1273
- } else c === "C" ? m += xt(
1274
- f,
1275
- y,
1323
+ } else c === "C" ? f += xt(
1324
+ m,
1325
+ g,
1276
1326
  x[1],
1277
1327
  x[2],
1278
1328
  x[3],
1279
1329
  x[4],
1280
1330
  x[5],
1281
1331
  x[6]
1282
- ) : c === "T" ? (o = s * 2 - o, l = r * 2 - l, m += pt(
1283
- f,
1284
- y,
1332
+ ) : c === "T" ? (o = s * 2 - o, l = r * 2 - l, f += pt(
1333
+ m,
1334
+ g,
1285
1335
  o,
1286
1336
  l,
1287
1337
  x[1],
1288
1338
  x[2]
1289
- )) : c === "Q" ? (o = x[1], l = x[2], m += pt(
1290
- f,
1291
- y,
1339
+ )) : c === "Q" ? (o = x[1], l = x[2], f += pt(
1340
+ m,
1341
+ g,
1292
1342
  x[1],
1293
1343
  x[2],
1294
1344
  x[3],
1295
1345
  x[4]
1296
- )) : c === "Z" && (m += it(f, y, a, u));
1346
+ )) : c === "Z" && (f += it(m, g, a, u));
1297
1347
  [s, r] = c === "Z" ? [a, u] : x.slice(-2), [n, i] = c === "C" ? [x[3], x[4]] : c === "S" ? [x[1], x[2]] : [s, r];
1298
- }), m;
1348
+ }), f;
1299
1349
  }, Ut = (e, t) => {
1300
1350
  const s = Q(e);
1301
1351
  let r = s.slice(0), n = nt(r), i = r.length - 1, o = 0, l = 0, c = s[0];
@@ -1325,27 +1375,27 @@ const Q = (e) => {
1325
1375
  ({ lengthAtSegment: u }) => u <= t
1326
1376
  );
1327
1377
  }, vt = (e, t) => {
1328
- const s = Q(e), r = ot(s), n = nt(r), i = (b) => {
1329
- const L = b.x - t.x, C = b.y - t.y;
1330
- return L * L + C * C;
1378
+ const s = Q(e), r = ot(s), n = nt(r), i = (p) => {
1379
+ const L = p.x - t.x, T = p.y - t.y;
1380
+ return L * L + T * T;
1331
1381
  };
1332
- let o = 8, l, c = { x: 0, y: 0 }, a = 0, u = 0, m = 1 / 0;
1333
- for (let b = 0; b <= n; b += o)
1334
- l = rt(r, b), a = i(l), a < m && (c = l, u = b, m = a);
1382
+ let o = 8, l, c = { x: 0, y: 0 }, a = 0, u = 0, f = 1 / 0;
1383
+ for (let p = 0; p <= n; p += o)
1384
+ l = rt(r, p), a = i(l), a < f && (c = l, u = p, f = a);
1335
1385
  o /= 2;
1336
- let h, g, f = 0, y = 0, p = 0, M = 0;
1337
- for (; o > 1e-6 && (f = u - o, h = rt(r, f), p = i(h), y = u + o, g = rt(r, y), M = i(g), f >= 0 && p < m ? (c = h, u = f, m = p) : y <= n && M < m ? (c = g, u = y, m = M) : o /= 2, !(o < 1e-5)); )
1386
+ let h, y, m = 0, g = 0, d = 0, M = 0;
1387
+ for (; o > 1e-6 && (m = u - o, h = rt(r, m), d = i(h), g = u + o, y = rt(r, g), M = i(y), m >= 0 && d < f ? (c = h, u = m, f = d) : g <= n && M < f ? (c = y, u = g, f = M) : o /= 2, !(o < 1e-5)); )
1338
1388
  ;
1339
- const N = Ut(s, u), x = Math.sqrt(m);
1340
- return { closest: c, distance: x, segment: N };
1341
- }, _e = (e, t) => vt(e, t).closest, Ue = (e, t, s, r, n, i, o, l) => 3 * ((l - t) * (s + n) - (o - e) * (r + i) + r * (e - n) - s * (t - i) + l * (n + e / 3) - o * (i + t / 3)) / 20, qe = (e) => {
1389
+ const w = Ut(s, u), x = Math.sqrt(f);
1390
+ return { closest: c, distance: x, segment: w };
1391
+ }, Ue = (e, t) => vt(e, t).closest, Je = (e, t, s, r, n, i, o, l) => 3 * ((l - t) * (s + n) - (o - e) * (r + i) + r * (e - n) - s * (t - i) + l * (n + e / 3) - o * (i + t / 3)) / 20, qe = (e) => {
1342
1392
  let t = 0, s = 0, r = 0;
1343
1393
  return yt(e).map((n) => {
1344
1394
  switch (n[0]) {
1345
1395
  case "M":
1346
1396
  return [, t, s] = n, 0;
1347
1397
  default:
1348
- return r = Ue(
1398
+ return r = Je(
1349
1399
  t,
1350
1400
  s,
1351
1401
  n[1],
@@ -1357,7 +1407,7 @@ const Q = (e) => {
1357
1407
  ), [t, s] = n.slice(-2), r;
1358
1408
  }
1359
1409
  }).reduce((n, i) => n + i, 0);
1360
- }, Je = (e) => qe(yt(e)) >= 0, Wt = (e) => {
1410
+ }, Ke = (e) => qe(yt(e)) >= 0, Wt = (e) => {
1361
1411
  if (!e)
1362
1412
  return {
1363
1413
  x: 0,
@@ -1373,90 +1423,90 @@ const Q = (e) => {
1373
1423
  const t = Q(e);
1374
1424
  let s = "M", r = 0, n = 0;
1375
1425
  const { max: i, min: o } = Math;
1376
- let l = 1 / 0, c = 1 / 0, a = -1 / 0, u = -1 / 0, m = 0, h = 0, g = 0, f = 0, y = 0, p = 0, M = 0, N = 0, x = 0, b = 0;
1426
+ let l = 1 / 0, c = 1 / 0, a = -1 / 0, u = -1 / 0, f = 0, h = 0, y = 0, m = 0, g = 0, d = 0, M = 0, w = 0, x = 0, p = 0;
1377
1427
  Z(t, (I, R, P, z) => {
1378
1428
  [s] = I;
1379
- const D = s.toUpperCase(), q = D !== s ? at(I, R, P, z) : I.slice(0), w = D === "V" ? ["L", P, q[1]] : D === "H" ? ["L", q[1], z] : q;
1380
- if ([s] = w, "TQ".includes(D) || (x = 0, b = 0), s === "M")
1381
- [, r, n] = w, m = r, h = n, g = r, f = n;
1429
+ const D = s.toUpperCase(), q = D !== s ? at(I, R, P, z) : I.slice(0), N = D === "V" ? ["L", P, q[1]] : D === "H" ? ["L", q[1], z] : q;
1430
+ if ([s] = N, "TQ".includes(D) || (x = 0, p = 0), s === "M")
1431
+ [, r, n] = N, f = r, h = n, y = r, m = n;
1382
1432
  else if (s === "L")
1383
- [m, h, g, f] = It(
1433
+ [f, h, y, m] = It(
1384
1434
  P,
1385
1435
  z,
1386
- w[1],
1387
- w[2]
1436
+ N[1],
1437
+ N[2]
1388
1438
  );
1389
1439
  else if (s === "A")
1390
- [m, h, g, f] = de(
1440
+ [f, h, y, m] = de(
1391
1441
  P,
1392
1442
  z,
1393
- w[1],
1394
- w[2],
1395
- w[3],
1396
- w[4],
1397
- w[5],
1398
- w[6],
1399
- w[7]
1443
+ N[1],
1444
+ N[2],
1445
+ N[3],
1446
+ N[4],
1447
+ N[5],
1448
+ N[6],
1449
+ N[7]
1400
1450
  );
1401
1451
  else if (s === "S") {
1402
- const $ = y * 2 - M, E = p * 2 - N;
1403
- [m, h, g, f] = jt(
1452
+ const $ = g * 2 - M, E = d * 2 - w;
1453
+ [f, h, y, m] = St(
1404
1454
  P,
1405
1455
  z,
1406
1456
  $,
1407
1457
  E,
1408
- w[1],
1409
- w[2],
1410
- w[3],
1411
- w[4]
1458
+ N[1],
1459
+ N[2],
1460
+ N[3],
1461
+ N[4]
1412
1462
  );
1413
- } else s === "C" ? [m, h, g, f] = jt(
1463
+ } else s === "C" ? [f, h, y, m] = St(
1414
1464
  P,
1415
1465
  z,
1416
- w[1],
1417
- w[2],
1418
- w[3],
1419
- w[4],
1420
- w[5],
1421
- w[6]
1422
- ) : s === "T" ? (x = y * 2 - x, b = p * 2 - b, [m, h, g, f] = Qt(
1466
+ N[1],
1467
+ N[2],
1468
+ N[3],
1469
+ N[4],
1470
+ N[5],
1471
+ N[6]
1472
+ ) : s === "T" ? (x = g * 2 - x, p = d * 2 - p, [f, h, y, m] = Qt(
1423
1473
  P,
1424
1474
  z,
1425
1475
  x,
1426
- b,
1427
- w[1],
1428
- w[2]
1429
- )) : s === "Q" ? (x = w[1], b = w[2], [m, h, g, f] = Qt(
1476
+ p,
1477
+ N[1],
1478
+ N[2]
1479
+ )) : s === "Q" ? (x = N[1], p = N[2], [f, h, y, m] = Qt(
1430
1480
  P,
1431
1481
  z,
1432
- w[1],
1433
- w[2],
1434
- w[3],
1435
- w[4]
1436
- )) : s === "Z" && ([m, h, g, f] = It(P, z, r, n));
1437
- l = o(m, l), c = o(h, c), a = i(g, a), u = i(f, u), [y, p] = s === "Z" ? [r, n] : w.slice(-2), [M, N] = s === "C" ? [w[3], w[4]] : s === "S" ? [w[1], w[2]] : [y, p];
1482
+ N[1],
1483
+ N[2],
1484
+ N[3],
1485
+ N[4]
1486
+ )) : s === "Z" && ([f, h, y, m] = It(P, z, r, n));
1487
+ l = o(f, l), c = o(h, c), a = i(y, a), u = i(m, u), [g, d] = s === "Z" ? [r, n] : N.slice(-2), [M, w] = s === "C" ? [N[3], N[4]] : s === "S" ? [N[1], N[2]] : [g, d];
1438
1488
  });
1439
- const L = a - l, C = u - c;
1489
+ const L = a - l, T = u - c;
1440
1490
  return {
1441
1491
  width: L,
1442
- height: C,
1492
+ height: T,
1443
1493
  x: l,
1444
1494
  y: c,
1445
1495
  x2: a,
1446
1496
  y2: u,
1447
1497
  cx: l + L / 2,
1448
- cy: c + C / 2,
1498
+ cy: c + T / 2,
1449
1499
  // an estimated guess
1450
- cz: Math.max(L, C) + Math.min(L, C) / 2
1500
+ cz: Math.max(L, T) + Math.min(L, T) / 2
1451
1501
  };
1452
- }, Ke = (e, t) => Ut(e, t).segment, We = (e, t) => vt(e, t).segment, Ct = (e) => Array.isArray(e) && e.every((t) => {
1502
+ }, We = (e, t) => Ut(e, t).segment, Xe = (e, t) => vt(e, t).segment, Tt = (e) => Array.isArray(e) && e.every((t) => {
1453
1503
  const s = t[0].toLowerCase();
1454
1504
  return tt[s] === t.length - 1 && "achlmqstvz".includes(s) && t.slice(1).every(Number.isFinite);
1455
- }) && e.length > 0, Pe = (e) => Ct(e) && // `isPathArray` also checks if it's `Array`
1456
- e.every(([t]) => t === t.toUpperCase()), ke = (e) => Pe(e) && e.every(([t]) => "ACLMQZ".includes(t)), Xe = (e) => ke(e) && e.every(([t]) => "MC".includes(t)), Ye = (e, t) => {
1505
+ }) && e.length > 0, Pe = (e) => Tt(e) && // `isPathArray` also checks if it's `Array`
1506
+ e.every(([t]) => t === t.toUpperCase()), ke = (e) => Pe(e) && e.every(([t]) => "ACLMQZ".includes(t)), Ye = (e) => ke(e) && e.every(([t]) => "MC".includes(t)), Ve = (e, t) => {
1457
1507
  const { distance: s } = vt(e, t);
1458
1508
  return Math.abs(s) < bt;
1459
- }, Ve = (e) => Ct(e) && // `isPathArray` checks if it's `Array`
1509
+ }, Ge = (e) => Tt(e) && // `isPathArray` checks if it's `Array`
1460
1510
  e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1461
1511
  if (typeof e != "string" || !e.length)
1462
1512
  return !1;
@@ -1472,33 +1522,33 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1472
1522
  polygon: ["points"],
1473
1523
  polyline: ["points"],
1474
1524
  glyph: ["d"]
1475
- }, Ge = (e) => {
1525
+ }, Ee = (e) => e != null && typeof e == "object" && e.nodeType === 1, tn = (e) => {
1476
1526
  let { x1: t, y1: s, x2: r, y2: n } = e;
1477
1527
  return [t, s, r, n] = [t, s, r, n].map((i) => +i), [
1478
1528
  ["M", t, s],
1479
1529
  ["L", r, n]
1480
1530
  ];
1481
- }, tn = (e) => {
1531
+ }, en = (e) => {
1482
1532
  const t = [], s = (e.points || "").trim().split(/[\s|,]/).map((n) => +n);
1483
1533
  let r = 0;
1484
1534
  for (; r < s.length; )
1485
1535
  t.push([r ? "L" : "M", s[r], s[r + 1]]), r += 2;
1486
1536
  return e.type === "polygon" ? [...t, ["z"]] : t;
1487
- }, en = (e) => {
1537
+ }, nn = (e) => {
1488
1538
  let { cx: t, cy: s, r } = e;
1489
1539
  return [t, s, r] = [t, s, r].map((n) => +n), [
1490
1540
  ["M", t - r, s],
1491
1541
  ["a", r, r, 0, 1, 0, 2 * r, 0],
1492
1542
  ["a", r, r, 0, 1, 0, -2 * r, 0]
1493
1543
  ];
1494
- }, nn = (e) => {
1544
+ }, sn = (e) => {
1495
1545
  let { cx: t, cy: s } = e, r = e.rx || 0, n = e.ry || r;
1496
1546
  return [t, s, r, n] = [t, s, r, n].map((i) => +i), [
1497
1547
  ["M", t - r, s],
1498
1548
  ["a", r, n, 0, 1, 0, 2 * r, 0],
1499
1549
  ["a", r, n, 0, 1, 0, -2 * r, 0]
1500
1550
  ];
1501
- }, sn = (e) => {
1551
+ }, rn = (e) => {
1502
1552
  const t = +e.x || 0, s = +e.y || 0, r = +e.width, n = +e.height;
1503
1553
  let i = +(e.rx || 0), o = +(e.ry || i);
1504
1554
  return i || o ? (i * 2 > r && (i -= (i * 2 - r) / 2), o * 2 > n && (o -= (o * 2 - n) / 2), [
@@ -1512,40 +1562,38 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1512
1562
  ["v", -n + o * 2],
1513
1563
  ["s", 0, -o, i, -o]
1514
1564
  ]) : [["M", t, s], ["h", r], ["v", n], ["H", t], ["Z"]];
1515
- }, Ee = (e, t) => {
1516
- const r = (t || document).defaultView || /* istanbul ignore next */
1517
- window, n = Object.keys(ct), i = e instanceof r.SVGElement, o = i ? e.tagName : null;
1518
- if (o && [...n, "path"].every((m) => o !== m))
1519
- throw TypeError(`${j}: "${o}" is not SVGElement`);
1520
- const l = i ? o : e.type, c = ct[l], a = { type: l };
1521
- i ? c.forEach((m) => {
1522
- a[m] = e.getAttribute(m);
1523
- }) : Object.assign(a, e);
1524
- let u = [];
1525
- return l === "circle" ? u = en(a) : l === "ellipse" ? u = nn(a) : ["polyline", "polygon"].includes(l) ? u = tn(a) : l === "rect" ? u = sn(a) : l === "line" ? u = Ge(a) : ["glyph", "path"].includes(l) && (u = Q(
1526
- i ? e.getAttribute("d") || /* istanbul ignore next @preserve */
1565
+ }, Re = (e) => {
1566
+ const t = Object.keys(ct), s = Ee(e), r = s ? e.tagName : null;
1567
+ if (r && [...t, "path"].every((c) => r !== c))
1568
+ throw TypeError(`${S}: "${r}" is not SVGElement`);
1569
+ const n = s ? r : e.type, i = ct[n], o = { type: n };
1570
+ s ? i.forEach((c) => {
1571
+ o[c] = e.getAttribute(c);
1572
+ }) : Object.assign(o, e);
1573
+ let l = [];
1574
+ return n === "circle" ? l = nn(o) : n === "ellipse" ? l = sn(o) : ["polyline", "polygon"].includes(n) ? l = en(o) : n === "rect" ? l = rn(o) : n === "line" ? l = tn(o) : ["glyph", "path"].includes(n) && (l = Q(
1575
+ s ? e.getAttribute("d") || /* istanbul ignore next @preserve */
1527
1576
  "" : e.d || ""
1528
- )), Ct(u) && u.length ? u : !1;
1529
- }, rn = (e, t, s) => {
1530
- const r = s || document, n = r.defaultView || /* istanbul ignore next */
1531
- window, i = Object.keys(ct), o = e instanceof n.SVGElement, l = o ? e.tagName : null;
1532
- if (l === "path")
1533
- throw TypeError(`${j}: "${l}" is already SVGPathElement`);
1534
- if (l && i.every((y) => l !== y))
1535
- throw TypeError(`${j}: "${l}" is not SVGElement`);
1536
- const c = r.createElementNS("http://www.w3.org/2000/svg", "path"), a = o ? l : e.type, u = ct[a], m = { type: a }, h = V.round, g = Ee(e, r), f = g && g.length ? kt(g, h) : "";
1537
- return o ? (u.forEach((y) => {
1538
- m[y] = e.getAttribute(y);
1539
- }), Object.values(e.attributes).forEach(({ name: y, value: p }) => {
1540
- u.includes(y) || c.setAttribute(y, p);
1541
- })) : (Object.assign(m, e), Object.keys(m).forEach((y) => {
1542
- !u.includes(y) && y !== "type" && c.setAttribute(
1543
- y.replace(/[A-Z]/g, (p) => `-${p.toLowerCase()}`),
1544
- m[y]
1577
+ )), Tt(l) && l.length ? l : !1;
1578
+ }, on = (e, t, s) => {
1579
+ const r = s || document, n = Object.keys(ct), i = Ee(e), o = i ? e.tagName : null;
1580
+ if (o === "path")
1581
+ throw TypeError(`${S}: "${o}" is already SVGPathElement`);
1582
+ if (o && n.every((m) => o !== m))
1583
+ throw TypeError(`${S}: "${o}" is not SVGElement`);
1584
+ const l = r.createElementNS("http://www.w3.org/2000/svg", "path"), c = i ? o : e.type, a = ct[c], u = { type: c }, f = V.round, h = Re(e), y = h && h.length ? kt(h, f) : "";
1585
+ return i ? (a.forEach((m) => {
1586
+ u[m] = e.getAttribute(m);
1587
+ }), Object.values(e.attributes).forEach(({ name: m, value: g }) => {
1588
+ a.includes(m) || l.setAttribute(m, g);
1589
+ })) : (Object.assign(u, e), Object.keys(u).forEach((m) => {
1590
+ !a.includes(m) && m !== "type" && l.setAttribute(
1591
+ m.replace(/[A-Z]/g, (g) => `-${g.toLowerCase()}`),
1592
+ u[m]
1545
1593
  );
1546
- })), Ie(f) ? (c.setAttribute("d", f), t && o && (e.before(c, e), e.remove()), c) : !1;
1547
- }, Re = (e) => {
1548
- let t = new T();
1594
+ })), Ie(y) ? (l.setAttribute("d", y), t && i && (e.before(l, e), e.remove()), l) : !1;
1595
+ }, je = (e) => {
1596
+ let t = new C();
1549
1597
  const { origin: s } = e, [r, n] = s, { translate: i } = e, { rotate: o } = e, { skew: l } = e, { scale: c } = e;
1550
1598
  return Array.isArray(i) && i.length >= 2 && i.every((a) => !Number.isNaN(+a)) && i.some((a) => a !== 0) ? t = t.translate(...i) : typeof i == "number" && !Number.isNaN(i) && (t = t.translate(i)), (o || l || c) && (t = t.translate(r, n), Array.isArray(o) && o.length >= 2 && o.every((a) => !Number.isNaN(+a)) && o.some((a) => a !== 0) ? t = t.rotate(...o) : typeof o == "number" && !Number.isNaN(o) && (t = t.rotate(o)), Array.isArray(l) && l.length === 2 && l.every(
1551
1599
  (a) => !Number.isNaN(+a)
@@ -1556,15 +1604,15 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1556
1604
  const [n] = e, { round: i } = V, o = typeof i == "number" ? i : (
1557
1605
  /* istanbul ignore next */
1558
1606
  4
1559
- ), l = t.slice(1), { x1: c, y1: a, x2: u, y2: m, x: h, y: g } = s, [f, y] = l.slice(-2), p = e;
1607
+ ), l = t.slice(1), { x1: c, y1: a, x2: u, y2: f, x: h, y } = s, [m, g] = l.slice(-2), d = e;
1560
1608
  if ("TQ".includes(n) || (s.qx = null, s.qy = null), n === "L") {
1561
- if (k(h, o) === k(f, o))
1562
- return ["V", y];
1563
- if (k(g, o) === k(y, o))
1564
- return ["H", f];
1609
+ if (k(h, o) === k(m, o))
1610
+ return ["V", g];
1611
+ if (k(y, o) === k(g, o))
1612
+ return ["H", m];
1565
1613
  } else if (n === "C") {
1566
- const [M, N] = l;
1567
- if (s.x1 = M, s.y1 = N, "CS".includes(r) && (k(M, o) === k(c * 2 - u, o) && k(N, o) === k(a * 2 - m, o) || k(c, o) === k(u * 2 - h, o) && k(a, o) === k(m * 2 - g, o)))
1614
+ const [M, w] = l;
1615
+ if (s.x1 = M, s.y1 = w, "CS".includes(r) && (k(M, o) === k(c * 2 - u, o) && k(w, o) === k(a * 2 - f, o) || k(c, o) === k(u * 2 - h, o) && k(a, o) === k(f * 2 - y, o)))
1568
1616
  return [
1569
1617
  "S",
1570
1618
  l[2],
@@ -1573,11 +1621,11 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1573
1621
  l[5]
1574
1622
  ];
1575
1623
  } else if (n === "Q") {
1576
- const [M, N] = l;
1577
- if (s.qx = M, s.qy = N, "QT".includes(r) && k(M, o) === k(c * 2 - u, o) && k(N, o) === k(a * 2 - m, o))
1624
+ const [M, w] = l;
1625
+ if (s.qx = M, s.qy = w, "QT".includes(r) && k(M, o) === k(c * 2 - u, o) && k(w, o) === k(a * 2 - f, o))
1578
1626
  return ["T", l[2], l[3]];
1579
1627
  }
1580
- return p;
1628
+ return d;
1581
1629
  }, dt = (e, t) => {
1582
1630
  const s = e.slice(1).map(
1583
1631
  (r) => k(r, t)
@@ -1589,34 +1637,34 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1589
1637
  2
1590
1638
  ), n = { ...ut }, i = [];
1591
1639
  let o = "M", l = "Z";
1592
- return Z(s, (c, a, u, m) => {
1593
- n.x = u, n.y = m;
1594
- const h = wt(c, n);
1595
- let g = c;
1640
+ return Z(s, (c, a, u, f) => {
1641
+ n.x = u, n.y = f;
1642
+ const h = Nt(c, n);
1643
+ let y = c;
1596
1644
  if ([o] = c, i[a] = o, a) {
1597
1645
  l = i[a - 1];
1598
- const y = Se(
1646
+ const g = Se(
1599
1647
  c,
1600
1648
  h,
1601
1649
  n,
1602
1650
  l
1603
- ), p = dt(y, r), M = p.join(""), N = Bt(y, a, u, m), x = dt(N, r), b = x.join("");
1604
- g = M.length < b.length ? p : x;
1651
+ ), d = dt(g, r), M = d.join(""), w = Bt(g, a, u, f), x = dt(w, r), p = x.join("");
1652
+ y = M.length < p.length ? d : x;
1605
1653
  }
1606
- const f = h.length;
1607
- return n.x1 = +h[f - 2], n.y1 = +h[f - 1], n.x2 = +h[f - 4] || n.x1, n.y2 = +h[f - 3] || n.y1, g;
1654
+ const m = h.length;
1655
+ return n.x1 = +h[m - 2], n.y1 = +h[m - 1], n.x2 = +h[m - 4] || n.x1, n.y2 = +h[m - 3] || n.y1, y;
1608
1656
  });
1609
- }, on = (e, t) => {
1610
- let s = T.Translate(t[0], t[1], t[2]);
1657
+ }, cn = (e, t) => {
1658
+ let s = C.Translate(t[0], t[1], t[2]);
1611
1659
  return [, , , s.m44] = t, s = e.multiply(s), [s.m41, s.m42, s.m43, s.m44];
1612
1660
  }, Zt = (e, t, s) => {
1613
- const [r, n, i] = s, [o, l, c] = on(e, [t[0], t[1], 0, 1]), a = o - r, u = l - n, m = c - i;
1661
+ const [r, n, i] = s, [o, l, c] = cn(e, [t[0], t[1], 0, 1]), a = o - r, u = l - n, f = c - i;
1614
1662
  return [
1615
1663
  // protect against division by ZERO
1616
- a * (Math.abs(i) / Math.abs(m) || 1) + r,
1617
- u * (Math.abs(i) / Math.abs(m) || 1) + n
1664
+ a * (Math.abs(i) / Math.abs(f) || 1) + r,
1665
+ u * (Math.abs(i) / Math.abs(f) || 1) + n
1618
1666
  ];
1619
- }, cn = (e) => {
1667
+ }, ln = (e) => {
1620
1668
  const t = e.slice(1).map(
1621
1669
  (s, r, n) => r ? n[r - 1].slice(-2).concat(s.slice(1)) : e[0].slice(1).concat(s.slice(1))
1622
1670
  ).map((s) => s.map((r, n) => s[s.length - n - 2 * (1 - n % 2)])).reverse();
@@ -1625,108 +1673,108 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1625
1673
  );
1626
1674
  }, ft = (e) => {
1627
1675
  const t = ht(e), s = ot(t), r = t.length, n = t[r - 1][0] === "Z", i = Z(t, (o, l) => {
1628
- const c = s[l], a = l && t[l - 1], u = a && a[0], m = t[l + 1], h = m && m[0], [g] = o, [f, y] = s[l ? l - 1 : r - 1].slice(-2);
1629
- let p = o;
1630
- switch (g) {
1676
+ const c = s[l], a = l && t[l - 1], u = a && a[0], f = t[l + 1], h = f && f[0], [y] = o, [m, g] = s[l ? l - 1 : r - 1].slice(-2);
1677
+ let d = o;
1678
+ switch (y) {
1631
1679
  case "M":
1632
- p = n ? ["Z"] : [g, f, y];
1680
+ d = n ? ["Z"] : [y, m, g];
1633
1681
  break;
1634
1682
  case "A":
1635
- p = [
1636
- g,
1683
+ d = [
1684
+ y,
1637
1685
  o[1],
1638
1686
  o[2],
1639
1687
  o[3],
1640
1688
  o[4],
1641
1689
  o[5] === 1 ? 0 : 1,
1642
- f,
1643
- y
1690
+ m,
1691
+ g
1644
1692
  ];
1645
1693
  break;
1646
1694
  case "C":
1647
- m && h === "S" ? p = ["S", o[1], o[2], f, y] : p = [
1648
- g,
1695
+ f && h === "S" ? d = ["S", o[1], o[2], m, g] : d = [
1696
+ y,
1649
1697
  o[3],
1650
1698
  o[4],
1651
1699
  o[1],
1652
1700
  o[2],
1653
- f,
1654
- y
1701
+ m,
1702
+ g
1655
1703
  ];
1656
1704
  break;
1657
1705
  case "S":
1658
- u && "CS".includes(u) && (!m || h !== "S") ? p = [
1706
+ u && "CS".includes(u) && (!f || h !== "S") ? d = [
1659
1707
  "C",
1660
1708
  c[3],
1661
1709
  c[4],
1662
1710
  c[1],
1663
1711
  c[2],
1664
- f,
1665
- y
1666
- ] : p = [
1667
- g,
1712
+ m,
1713
+ g
1714
+ ] : d = [
1715
+ y,
1668
1716
  c[1],
1669
1717
  c[2],
1670
- f,
1671
- y
1718
+ m,
1719
+ g
1672
1720
  ];
1673
1721
  break;
1674
1722
  case "Q":
1675
- m && h === "T" ? p = ["T", f, y] : p = [g, o[1], o[2], f, y];
1723
+ f && h === "T" ? d = ["T", m, g] : d = [y, o[1], o[2], m, g];
1676
1724
  break;
1677
1725
  case "T":
1678
- u && "QT".includes(u) && (!m || h !== "T") ? p = [
1726
+ u && "QT".includes(u) && (!f || h !== "T") ? d = [
1679
1727
  "Q",
1680
1728
  c[1],
1681
1729
  c[2],
1682
- f,
1683
- y
1684
- ] : p = [g, f, y];
1730
+ m,
1731
+ g
1732
+ ] : d = [y, m, g];
1685
1733
  break;
1686
1734
  case "Z":
1687
- p = ["M", f, y];
1735
+ d = ["M", m, g];
1688
1736
  break;
1689
1737
  case "H":
1690
- p = [g, f];
1738
+ d = [y, m];
1691
1739
  break;
1692
1740
  case "V":
1693
- p = [g, y];
1741
+ d = [y, g];
1694
1742
  break;
1695
1743
  default:
1696
- p = [g].concat(
1744
+ d = [y].concat(
1697
1745
  o.slice(1, -2),
1698
- f,
1699
- y
1746
+ m,
1747
+ g
1700
1748
  );
1701
1749
  }
1702
- return p;
1750
+ return d;
1703
1751
  });
1704
1752
  return n ? i.reverse() : [i[0]].concat(i.slice(1).reverse());
1705
- }, ln = (e, t) => {
1753
+ }, an = (e, t) => {
1706
1754
  let { round: s } = V;
1707
1755
  return s = t === "off" || typeof t == "number" && t >= 0 ? t : typeof s == "number" && s >= 0 ? s : (
1708
1756
  /* istanbul ignore next @preserve */
1709
1757
  "off"
1710
1758
  ), s === "off" ? e.slice(0) : Z(e, (r) => dt(r, s));
1711
- }, an = (e, t = 0.5) => {
1712
- const s = t, r = e.slice(0, 2), n = e.slice(2, 4), i = e.slice(4, 6), o = e.slice(6, 8), l = H(r, n, s), c = H(n, i, s), a = H(i, o, s), u = H(l, c, s), m = H(c, a, s), h = H(u, m, s);
1759
+ }, un = (e, t = 0.5) => {
1760
+ const s = t, r = e.slice(0, 2), n = e.slice(2, 4), i = e.slice(4, 6), o = e.slice(6, 8), l = H(r, n, s), c = H(n, i, s), a = H(i, o, s), u = H(l, c, s), f = H(c, a, s), h = H(u, f, s);
1713
1761
  return [
1714
1762
  ["C", l[0], l[1], u[0], u[1], h[0], h[1]],
1715
- ["C", m[0], m[1], a[0], a[1], o[0], o[1]]
1763
+ ["C", f[0], f[1], a[0], a[1], o[0], o[1]]
1716
1764
  ];
1717
1765
  }, Yt = (e) => {
1718
1766
  const t = [];
1719
1767
  let s, r = -1, n = 0, i = 0, o = 0, l = 0;
1720
1768
  const c = { ...ut };
1721
1769
  return e.forEach((a) => {
1722
- const [u] = a, m = u.toUpperCase(), h = u.toLowerCase(), g = u === h, f = a.slice(1);
1723
- m === "M" ? (r += 1, [n, i] = f, n += g ? c.x : 0, i += g ? c.y : 0, o = n, l = i, s = [g ? [m, o, l] : a]) : (m === "Z" ? (n = o, i = l) : m === "H" ? ([, n] = a, n += g ? c.x : (
1770
+ const [u] = a, f = u.toUpperCase(), h = u.toLowerCase(), y = u === h, m = a.slice(1);
1771
+ f === "M" ? (r += 1, [n, i] = m, n += y ? c.x : 0, i += y ? c.y : 0, o = n, l = i, s = [y ? [f, o, l] : a]) : (f === "Z" ? (n = o, i = l) : f === "H" ? ([, n] = a, n += y ? c.x : (
1724
1772
  /* istanbul ignore next @preserve */
1725
1773
  0
1726
- )) : m === "V" ? ([, i] = a, i += g ? c.y : (
1774
+ )) : f === "V" ? ([, i] = a, i += y ? c.y : (
1727
1775
  /* istanbul ignore next @preserve */
1728
1776
  0
1729
- )) : ([n, i] = a.slice(-2), n += g ? c.x : 0, i += g ? c.y : 0), s.push(a)), c.x = n, c.y = i, t[r] = s;
1777
+ )) : ([n, i] = a.slice(-2), n += y ? c.x : 0, i += y ? c.y : 0), s.push(a)), c.x = n, c.y = i, t[r] = s;
1730
1778
  }), t;
1731
1779
  }, Vt = (e, t) => {
1732
1780
  let s = 0, r = 0, n = 0, i = 0, o = 0, l = 0, c = "M";
@@ -1734,14 +1782,14 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1734
1782
  if (!t || u && !u.length)
1735
1783
  return a.slice(0);
1736
1784
  t.origin || Object.assign(t, { origin: V.origin });
1737
- const m = t.origin, h = Re(t);
1738
- return h.isIdentity ? a.slice(0) : Z(a, (g, f, y, p) => {
1739
- [c] = g;
1740
- const M = c.toUpperCase(), x = M !== c ? at(g, f, y, p) : g.slice(0);
1741
- let b = M === "A" ? ["C"].concat(
1785
+ const f = t.origin, h = je(t);
1786
+ return h.isIdentity ? a.slice(0) : Z(a, (y, m, g, d) => {
1787
+ [c] = y;
1788
+ const M = c.toUpperCase(), x = M !== c ? at(y, m, g, d) : y.slice(0);
1789
+ let p = M === "A" ? ["C"].concat(
1742
1790
  Mt(
1743
- y,
1744
- p,
1791
+ g,
1792
+ d,
1745
1793
  x[1],
1746
1794
  x[2],
1747
1795
  x[3],
@@ -1750,28 +1798,28 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1750
1798
  x[6],
1751
1799
  x[7]
1752
1800
  )
1753
- ) : M === "V" ? ["L", y, x[1]] : M === "H" ? ["L", x[1], p] : x;
1754
- c = b[0];
1755
- const L = c === "C" && b.length > 7, C = L ? b.slice(0, 7) : b.slice(0);
1801
+ ) : M === "V" ? ["L", g, x[1]] : M === "H" ? ["L", x[1], d] : x;
1802
+ c = p[0];
1803
+ const L = c === "C" && p.length > 7, T = L ? p.slice(0, 7) : p.slice(0);
1756
1804
  if (L && (a.splice(
1757
- f + 1,
1805
+ m + 1,
1758
1806
  0,
1759
1807
  ["C"].concat(
1760
- b.slice(7)
1808
+ p.slice(7)
1761
1809
  )
1762
- ), b = C), c === "L")
1810
+ ), p = T), c === "L")
1763
1811
  [n, i] = Zt(h, [
1764
- b[1],
1765
- b[2]
1766
- ], m), s !== n && r !== i ? b = ["L", n, i] : r === i ? b = ["H", n] : s === n && (b = ["V", i]);
1812
+ p[1],
1813
+ p[2]
1814
+ ], f), s !== n && r !== i ? p = ["L", n, i] : r === i ? p = ["H", n] : s === n && (p = ["V", i]);
1767
1815
  else
1768
- for (o = 1, l = b.length; o < l; o += 2)
1816
+ for (o = 1, l = p.length; o < l; o += 2)
1769
1817
  [n, i] = Zt(
1770
1818
  h,
1771
- [+b[o], +b[o + 1]],
1772
- m
1773
- ), b[o] = n, b[o + 1] = i;
1774
- return s = n, r = i, b;
1819
+ [+p[o], +p[o + 1]],
1820
+ f
1821
+ ), p[o] = n, p[o + 1] = i;
1822
+ return s = n, r = i, p;
1775
1823
  });
1776
1824
  };
1777
1825
  class A {
@@ -1784,7 +1832,7 @@ class A {
1784
1832
  const r = s || {}, n = typeof t > "u";
1785
1833
  if (n || !t.length)
1786
1834
  throw TypeError(
1787
- `${j}: "pathValue" is ${n ? "undefined" : "empty"}`
1835
+ `${S}: "pathValue" is ${n ? "undefined" : "empty"}`
1788
1836
  );
1789
1837
  this.segments = Q(t);
1790
1838
  const { round: i, origin: o } = r;
@@ -1792,11 +1840,11 @@ class A {
1792
1840
  Number.isInteger(i) || i === "off" ? l = i : l = V.round;
1793
1841
  let c = V.origin;
1794
1842
  if (Array.isArray(o) && o.length >= 2) {
1795
- const [a, u, m] = o.map(Number);
1843
+ const [a, u, f] = o.map(Number);
1796
1844
  c = [
1797
1845
  Number.isNaN(a) ? 0 : a,
1798
1846
  Number.isNaN(u) ? 0 : u,
1799
- Number.isNaN(m) ? 0 : m
1847
+ Number.isNaN(f) ? 0 : f
1800
1848
  ];
1801
1849
  }
1802
1850
  return this.round = l, this.origin = c, this;
@@ -1965,32 +2013,32 @@ class A {
1965
2013
  Object.keys(this).forEach((t) => delete this[t]);
1966
2014
  }
1967
2015
  }
1968
- d(A, "CSSMatrix", T), d(A, "pathToAbsolute", ht), d(A, "pathToRelative", Kt), d(A, "pathToCurve", yt), d(A, "pathToString", kt), d(A, "arcTools", Be), d(A, "bezierTools", {
2016
+ b(A, "CSSMatrix", C), b(A, "pathToAbsolute", ht), b(A, "pathToRelative", Kt), b(A, "pathToCurve", yt), b(A, "pathToString", kt), b(A, "arcTools", He), b(A, "bezierTools", {
1969
2017
  Cvalues: Ae,
1970
2018
  Tvalues: Rt,
1971
- minmaxC: St,
2019
+ minmaxC: jt,
1972
2020
  minmaxQ: gt,
1973
2021
  getBezierLength: mt,
1974
2022
  bezierLength: Le,
1975
- calculateBezier: Ne,
1976
- computeBezier: we,
2023
+ calculateBezier: we,
2024
+ computeBezier: Ne,
1977
2025
  deriveBezier: Me,
1978
2026
  CBEZIER_MINMAX_EPSILON: ve
1979
- }), d(A, "cubicTools", {
2027
+ }), b(A, "cubicTools", {
1980
2028
  getCubicLength: xt,
1981
- getCubicBBox: jt,
1982
- getPointAtCubicLength: Te,
1983
- getPointAtCubicSegmentLength: Ce
1984
- }), d(A, "lineTools", {
2029
+ getCubicBBox: St,
2030
+ getPointAtCubicLength: Ce,
2031
+ getPointAtCubicSegmentLength: Te
2032
+ }), b(A, "lineTools", {
1985
2033
  getPointAtLineLength: Ht,
1986
2034
  getLineBBox: It,
1987
2035
  getLineLength: it
1988
- }), d(A, "quadTools", {
2036
+ }), b(A, "quadTools", {
1989
2037
  getPointAtQuadSegmentLength: $e,
1990
2038
  getQuadLength: pt,
1991
2039
  getQuadBBox: Qt,
1992
2040
  getPointAtQuadLength: ze
1993
- }), d(A, "polygonTools", { polygonArea: He, polygonLength: Fe }), d(A, "distanceSquareRoot", Nt), d(A, "distanceEpsilon", bt), d(A, "midPoint", H), d(A, "rotateVector", st), d(A, "roundTo", k), d(A, "finalizeSegment", qt), d(A, "invalidPathValue", J), d(A, "isArcCommand", ye), d(A, "isDigit", U), d(A, "isDigitStart", he), d(A, "isMoveCommand", ge), d(A, "isPathCommand", fe), d(A, "isSpace", me), d(A, "paramsCount", tt), d(A, "paramsParser", ut), d(A, "pathParser", Ot), d(A, "scanFlag", ae), d(A, "scanParam", ue), d(A, "scanSegment", Dt), d(A, "skipSpaces", et), d(A, "getPathBBox", Wt), d(A, "getPathArea", qe), d(A, "getTotalLength", nt), d(A, "getDrawDirection", Je), d(A, "getPointAtLength", rt), d(A, "getPropertiesAtLength", Ut), d(A, "getPropertiesAtPoint", vt), d(A, "getClosestPoint", _e), d(A, "getSegmentOfPoint", We), d(A, "getSegmentAtLength", Ke), d(A, "isPointInStroke", Ye), d(A, "isValidPath", Ie), d(A, "isPathArray", Ct), d(A, "isAbsoluteArray", Pe), d(A, "isRelativeArray", Ve), d(A, "isCurveArray", Xe), d(A, "isNormalizedArray", ke), d(A, "shapeToPath", rn), d(A, "shapeToPathArray", Ee), d(A, "shapeParams", ct), d(A, "parsePathString", Q), d(A, "absolutizeSegment", at), d(A, "arcToCubic", Mt), d(A, "getSVGMatrix", Re), d(A, "iterate", Z), d(A, "lineToCubic", Pt), d(A, "normalizePath", ot), d(A, "normalizeSegment", wt), d(A, "optimizePath", Xt), d(A, "projection2d", Zt), d(A, "quadToCubic", xe), d(A, "relativizeSegment", Bt), d(A, "reverseCurve", cn), d(A, "reversePath", ft), d(A, "roundPath", ln), d(A, "roundSegment", dt), d(A, "segmentToCubic", pe), d(A, "shortenSegment", Se), d(A, "splitCubic", an), d(A, "splitPath", Yt), d(A, "transformPath", Vt);
2041
+ }), b(A, "polygonTools", { polygonArea: Fe, polygonLength: _e }), b(A, "distanceSquareRoot", wt), b(A, "distanceEpsilon", bt), b(A, "midPoint", H), b(A, "rotateVector", st), b(A, "roundTo", k), b(A, "finalizeSegment", qt), b(A, "invalidPathValue", J), b(A, "isArcCommand", ye), b(A, "isDigit", U), b(A, "isDigitStart", he), b(A, "isMoveCommand", ge), b(A, "isPathCommand", fe), b(A, "isSpace", me), b(A, "paramsCount", tt), b(A, "paramsParser", ut), b(A, "pathParser", Ot), b(A, "scanFlag", ae), b(A, "scanParam", ue), b(A, "scanSegment", Dt), b(A, "skipSpaces", et), b(A, "getPathBBox", Wt), b(A, "getPathArea", qe), b(A, "getTotalLength", nt), b(A, "getDrawDirection", Ke), b(A, "getPointAtLength", rt), b(A, "getPropertiesAtLength", Ut), b(A, "getPropertiesAtPoint", vt), b(A, "getClosestPoint", Ue), b(A, "getSegmentOfPoint", Xe), b(A, "getSegmentAtLength", We), b(A, "isPointInStroke", Ve), b(A, "isValidPath", Ie), b(A, "isPathArray", Tt), b(A, "isAbsoluteArray", Pe), b(A, "isRelativeArray", Ge), b(A, "isCurveArray", Ye), b(A, "isNormalizedArray", ke), b(A, "shapeToPath", on), b(A, "shapeToPathArray", Re), b(A, "shapeParams", ct), b(A, "parsePathString", Q), b(A, "absolutizeSegment", at), b(A, "arcToCubic", Mt), b(A, "getSVGMatrix", je), b(A, "iterate", Z), b(A, "lineToCubic", Pt), b(A, "normalizePath", ot), b(A, "normalizeSegment", Nt), b(A, "optimizePath", Xt), b(A, "projection2d", Zt), b(A, "quadToCubic", xe), b(A, "relativizeSegment", Bt), b(A, "reverseCurve", ln), b(A, "reversePath", ft), b(A, "roundPath", an), b(A, "roundSegment", dt), b(A, "segmentToCubic", pe), b(A, "shortenSegment", Se), b(A, "splitCubic", un), b(A, "splitPath", Yt), b(A, "transformPath", Vt);
1994
2042
  export {
1995
2043
  A as default
1996
2044
  };