domquery-com 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/animate.js ADDED
@@ -0,0 +1,1775 @@
1
+ $.fn.animate_interpolateColor = function(b, c, d) {
2
+ function m(p) {
3
+ var t = document.createElement("canvas");
4
+ t.width = t.height = 1;
5
+ t = t.getContext("2d");
6
+ t.fillStyle = p;
7
+ t.fillRect(0, 0, 1, 1);
8
+ const [n, A, u] = t.getImageData(0, 0, 1, 1).data;
9
+ return [n, A, u]
10
+ }
11
+ b = m(b);
12
+ const h = m(c);
13
+ c = b.map((p, t) => Math.round(p + d * (h[t] - p)));
14
+ return function(p, t, n) {
15
+ return "#" + [p, t, n].map(A => {
16
+ A = A.toString(16);
17
+ return 1 === A.length ? "0" + A : A
18
+ }).join("")
19
+ }(c[0], c[1], c[2])
20
+ };
21
+
22
+ function isGradient(b) {
23
+ return b && "string" === typeof b ? b.trim().startsWith("linear-gradient") || b.trim().startsWith("radial-gradient") || b.trim().startsWith("conic-gradient") : !1
24
+ }
25
+
26
+ function parseGradient(b) {
27
+ if (!isGradient(b)) return null;
28
+ var c = b.match(/(linear-gradient|radial-gradient|conic-gradient)\s*\(([^)]+)\)/);
29
+ if (!c) return null;
30
+ b = c[1];
31
+ var d = c[2].trim();
32
+ c = "180deg";
33
+ let m = [];
34
+ if ("linear-gradient" === b) {
35
+ const h = d.match(/^([\d.]+(?:deg|turn|rad|grad)?)\s*,/);
36
+ h ? (c = h[1], m = d.substring(h[0].length).split(",").map(p => p.trim())) : m = d.split(",").map(p => p.trim())
37
+ } else m = d.split(",").map(h => h.trim());
38
+ d = m.map(h => {
39
+ const p = h.trim().split(/\s+/),
40
+ t = p[0];
41
+ h = p[1] || (m.indexOf(h) === m.length - 1 ? "100%" :
42
+ 0 === m.indexOf(h) ? "0%" : m.indexOf(h) / (m.length - 1) * 100 + "%");
43
+ return {
44
+ color: t,
45
+ position: h
46
+ }
47
+ });
48
+ return {
49
+ type: b,
50
+ angle: c,
51
+ stops: d
52
+ }
53
+ }
54
+
55
+ function interpolateGradient(b, c, d) {
56
+ b = parseGradient(b);
57
+ c = parseGradient(c);
58
+ if (!b || !c) return null;
59
+ var m = b.angle;
60
+ if ("linear-gradient" === b.type && "linear-gradient" === c.type) {
61
+ m = parseFloat(b.angle) || 180;
62
+ var h = parseFloat(c.angle) || 180;
63
+ m = m + (h - m) * d + "deg"
64
+ }
65
+ h = Math.max(b.stops.length, c.stops.length);
66
+ const p = [];
67
+ for (let u = 0; u < h; u++) {
68
+ var t = b.stops[Math.min(u, b.stops.length - 1)],
69
+ n = c.stops[Math.min(u, c.stops.length - 1)],
70
+ A = parseFloat(t.position) || u / (h - 1) * 100;
71
+ const B = parseFloat(n.position) || u / (h - 1) * 100;
72
+ A = A + (B - A) * d + "%";
73
+
74
+ function C(e) {
75
+ if (e.startsWith("#")) {
76
+ var w = e.substring(1);
77
+ e = parseInt(w.substring(0, 2), 16);
78
+ var g = parseInt(w.substring(2, 4), 16);
79
+ w = parseInt(w.substring(4, 6), 16);
80
+ return [e, g, w, 1]
81
+ }
82
+ if (e.startsWith("rgba")) return (e = e.match(/[\d.]+/g)) ? e.map(Number) : [0, 0, 0, 1];
83
+ if (e.startsWith("rgb")) return (e = e.match(/\d+/g)) ? [...e.map(Number), 1] : [0, 0, 0, 1];
84
+ try {
85
+ g = document.createElement("canvas");
86
+ g.width = g.height = 1;
87
+ w = g.getContext("2d");
88
+ w.fillStyle = e;
89
+ w.fillRect(0, 0, 1, 1);
90
+ const [a, f, v] = w.getImageData(0, 0, 1, 1).data;
91
+ return [a, f, v, 1]
92
+ } catch (a) {
93
+ return [0,
94
+ 0, 0, 1
95
+ ]
96
+ }
97
+ }
98
+ t = C(t.color);
99
+ n = C(n.color);
100
+ p.push({
101
+ color: `rgba(${Math.round(t[0]+(n[0]-t[0])*d)},${Math.round(t[1]+(n[1]-t[1])*d)},${Math.round(t[2]+(n[2]-t[2])*d)},${t[3]+(n[3]-t[3])*d})`,
102
+ position: A
103
+ })
104
+ }
105
+ d = p.map(u => `${u.color} ${u.position}`).join(", ");
106
+ return `${b.type}(${"linear-gradient"===b.type?m+", ":""}${d})`
107
+ }
108
+ $.fn.animate_getInitialStyles = function(b, c) {
109
+ let d = {};
110
+ var m = b.parentElement || document.body;
111
+ let h = m.getBoundingClientRect(),
112
+ p = b.getBoundingClientRect(),
113
+ t = window.getComputedStyle(b),
114
+ n = "none" !== t.transform ? t.transform : "";
115
+ var A = window.getComputedStyle(m);
116
+ m = parseFloat(A.paddingLeft);
117
+ A = parseFloat(A.paddingTop);
118
+ let u = t.position,
119
+ B = [],
120
+ C = b;
121
+ for (; C.previousElementSibling && C.previousElementSibling.classList.contains(b.classList[0]);) B.unshift(C.previousElementSibling), C = C.previousElementSibling;
122
+ for (let e in c)
123
+ if ("left" ===
124
+ e || "right" === e) {
125
+ let w = 0;
126
+ c = parseFloat(t.marginLeft);
127
+ B.forEach(g => {
128
+ let a = window.getComputedStyle(g);
129
+ w += g.offsetWidth + parseFloat(a.marginLeft) + parseFloat(a.marginRight)
130
+ });
131
+ switch (u) {
132
+ case "static":
133
+ case "relative":
134
+ d[e] = p.left - h.left - m - w - c;
135
+ break;
136
+ case "absolute":
137
+ c = "auto" !== t.left ? parseFloat(t.left) : p.left - h.left - m - w - c;
138
+ d[e] = c;
139
+ break;
140
+ case "fixed":
141
+ d[e] = p.left - w - c
142
+ }
143
+ } else if ("top" === e || "bottom" === e) switch (c = parseFloat(t.marginTop), u) {
144
+ case "static":
145
+ case "relative":
146
+ d[e] = p.top - h.top - A - c;
147
+ "top" === e && (d[e] = p.top - h.top);
148
+ break;
149
+ case "absolute":
150
+ c = "auto" !== t.top ? parseFloat(t.top) : p.top - h.top - A - c;
151
+ "top" === e && (c = "auto" !== t.top ? parseFloat(t.top) : p.top - h.top);
152
+ d[e] = c;
153
+ break;
154
+ case "fixed":
155
+ d[e] = p.top - c, "top" === e && (d[e] = p.top)
156
+ } else "opacity" === e ? d[e] = parseFloat(t[e]) : "scale" === e || "scaleX" === e || "scaleY" === e ? "" === n ? (d.scaleX = 1, d.scaleY = 1, d.scale = 1) : (c = n.match(/matrix\(([^)]+)\)/)) ? (c = c[1].split(","), d.scaleX = parseFloat(c[0]), d.scaleY = parseFloat(c[3]), d.scale = parseFloat(c[0])) : (d.scaleX = 1, d.scaleY = 1, d.scale = 1) : "rotate" === e || "rotateX" ===
157
+ e || "rotateY" === e ? (c = b.getAttribute(`data-${e}`), null !== c ? (c = parseFloat(c), d[e] = isNaN(c) ? 0 : c) : "" === n ? d[e] = 0 : (c = n.match(new RegExp(`${e}\\(([^)]+)deg\\)`)), d[e] = c ? parseFloat(c[1]) : 0)) : "skewX" === e || "skewY" === e ? (c = b.getAttribute(`data-${e}`), null !== c ? (c = parseFloat(c), d[e] = isNaN(c) ? 0 : c) : "" === n ? d[e] = 0 : (c = n.match(new RegExp(`${e}\\(([^)]+)deg\\)`)), d[e] = c ? parseFloat(c[1]) : 0)) : "fontSize" === e ? (c = t[e], d[e] = parseFloat(c), d[e + "Unit"] = c.replace(d[e], "")) : d[e] = parseFloat(t[e]);
158
+ return d
159
+ };
160
+ $.fn.animate_updateStyles = function(b, c, d, m) {
161
+ var h = b.style.transform || "";
162
+ let p = {
163
+ scaleX: m.scaleX || 1,
164
+ scaleY: m.scaleY || 1,
165
+ rotate: m.rotate || 0,
166
+ rotateX: m.rotateX || 0,
167
+ rotateY: m.rotateY || 0,
168
+ skewX: m.skewX || 0,
169
+ skewY: m.skewY || 0
170
+ };
171
+ "left" === c || "top" === c ? b.style[c] = d + "px" : "right" === c ? b.style.left = d + "px" : "bottom" === c ? b.style.top = d + "px" : "opacity" === c ? b.style.opacity = d : "scale" === c ? (p.scaleX = d, p.scaleY = d) : "scaleX" === c || "scaleY" === c ? p[c] = d : "rotate" === c || "rotateX" === c || "rotateY" === c ? (d = parseFloat(d), m = b.getAttribute(`data-${c}`) ||
172
+ "0", m = parseFloat(m), p[c] = m + d) : "skewX" === c || "skewY" === c ? (d = parseFloat(d), m = b.getAttribute(`data-${c}`) || "0", m = parseFloat(m), p[c] = m + d) : "fontSize" === c ? b.style.fontSize = d + m[c + "Unit"] : "background" === c && (c = b.getAttribute("data-initial-background") || "rgba(0,0,0,0)", c = this.interpolateBackground(c, d, b.style.opacity), b.style.background = c);
173
+ h.includes("scale(") && (c = h.match(/scale\(([^)]+)\)/)) && (c = c[1].split(","), p.scaleX = parseFloat(c[0]), p.scaleY = parseFloat(c[1]));
174
+ h.includes("rotate(") && (c = h.match(/rotate\(([^)]+)deg\)/)) &&
175
+ (p.rotate = parseFloat(c[1]));
176
+ h.includes("rotateX(") && (c = h.match(/rotateX\(([^)]+)deg\)/)) && (p.rotateX = parseFloat(c[1]));
177
+ h.includes("rotateY(") && (c = h.match(/rotateY\(([^)]+)deg\)/)) && (p.rotateY = parseFloat(c[1]));
178
+ h.includes("skewX(") && (c = h.match(/skewX\(([^)]+)deg\)/)) && (p.skewX = parseFloat(c[1]));
179
+ h.includes("skewY(") && (h = h.match(/skewY\(([^)]+)deg\)/)) && (p.skewY = parseFloat(h[1]));
180
+ h = `scale(${p.scaleX}, ${p.scaleY}) rotate(${p.rotate}deg) rotateX(${p.rotateX}deg) rotateY(${p.rotateY}deg) skewX(${p.skewX}deg) skewY(${p.skewY}deg)`;
181
+ b.style.transform = h.trim()
182
+ };
183
+ $.fn.animate_calculateFinalValue = function(b, c, d, m, h, p, t, n, A, u) {
184
+ function B(f, v) {
185
+ let [H, y] = f.split(",");
186
+ f = parseFloat(H);
187
+ H.endsWith("%") && (f = parseFloat(H) / 100 * v);
188
+ void 0 !== y && (f += parseFloat(y));
189
+ return f
190
+ }
191
+
192
+ function C(f, v, H, y) {
193
+ if ("string" === typeof f) {
194
+ if (f.startsWith("+=")) {
195
+ if (f.endsWith("%")) return f = parseFloat(f.slice(2, -1)), v + f / 100 * y;
196
+ y = parseFloat(f.slice(2));
197
+ return v + y
198
+ }
199
+ if (f.startsWith("-=")) {
200
+ if (f.endsWith("%")) return f = parseFloat(f.slice(2, -1)), v - f / 100 * y;
201
+ y = parseFloat(f.slice(2));
202
+ return v - y
203
+ }
204
+ if (f.startsWith("+")) {
205
+ if (f.endsWith("%")) return y *=
206
+ parseFloat(f.slice(1, -1)) / 100, v + y;
207
+ y = parseFloat(f.slice(1));
208
+ return v + y
209
+ }
210
+ if (f.startsWith("-")) {
211
+ if (f.endsWith("%")) return y *= parseFloat(f.slice(1, -1)) / 100, v - y;
212
+ y = parseFloat(f.slice(1));
213
+ return v - y
214
+ }
215
+ }
216
+ return parseFloat(f)
217
+ }
218
+ let e = c[b];
219
+ var w = parseFloat(e),
220
+ g = u.offsetParent === document.body || u.offsetParent === document.documentElement;
221
+ w = window.innerWidth;
222
+ let a = window.innerHeight;
223
+ w = g ? w : m.width;
224
+ g = g ? a : m.height;
225
+ "left" === b ? w = "50%" === c[b] ? (w - p) / 2 : "string" !== typeof e || !e.endsWith("%") || e.startsWith("+") || e.startsWith("-") ?
226
+ "string" === typeof e && e.includes(",") ? B(e, w) : "string" === typeof e && (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b], w, h.width) : parseFloat(c[b]) : parseFloat(e) / 100 * w : "right" === b ? (w = "50%" === c[b] ? (w - p) / 2 : "string" !== typeof e || !e.endsWith("%") || e.startsWith("+") || e.startsWith("-") ? "string" === typeof e && e.includes(",") ? w - B(e, w) - h.width : "string" === typeof e && (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b], w, h.width) : w - h.width - parseFloat(c[b]) :
227
+ w - parseFloat(e) / 100 * w - h.width, c.width && (w = "string" === typeof c.width && c.width.endsWith("px") ? w - (Math.abs(parseFloat(c.width)) - p + n) : w - parseFloat(c.width))) : "top" === b ? w = "50%" === c[b] ? (g - t) / 2 : "string" !== typeof e || !e.endsWith("%") || e.startsWith("+") || e.startsWith("-") ? "string" === typeof e && e.includes(",") ? B(e, g) : "string" === typeof e && (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b], g, h.height) : parseFloat(c[b]) : parseFloat(e) / 100 * g : "bottom" === b ? (w = "50%" === c[b] ? (g - t) / 2 :
228
+ "string" !== typeof e || !e.endsWith("%") || e.startsWith("+") || e.startsWith("-") ? "string" === typeof e && e.includes(",") ? g - B(e, g) - h.height : "string" === typeof e && (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b], g, h.height) : g - h.height - parseFloat(c[b]) : g - parseFloat(e) / 100 * g - h.height, c.height && (w = "string" === typeof c.height && c.height.endsWith("px") ? w - (Math.abs(parseFloat(c.height)) - t + A) : w - parseFloat(c.height))) : "width" === b || "height" === b ? (h = "width" === b ? h.width : h.height, w = "string" !==
229
+ typeof e || !e.endsWith("%") || e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=") ? "string" === typeof e && e.endsWith("px") ? Math.abs(parseFloat(e)) : "string" === typeof e && (e.startsWith("+=") || e.startsWith("-=") || e.startsWith("+") || e.startsWith("-")) ? C(e, d[b], w, h) : d[b] + parseFloat(e) : ("width" === b ? m.width : m.height) * parseFloat(e) / 100) : "opacity" === b ? w = parseFloat(c[b]) : "scale" === b || "scaleX" === b || "scaleY" === b ? w = parseFloat(c[b]) : "rotate" === b || "rotateX" === b || "rotateY" === b ? w = "string" === typeof e &&
230
+ (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b] || 0, 0, 0) : parseFloat(c[b]) : "skewX" === b || "skewY" === b ? w = "string" === typeof e && (e.startsWith("+") || e.startsWith("-") || e.startsWith("+=") || e.startsWith("-=")) ? C(e, d[b] || 0, 0, 0) : parseFloat(c[b]) : "fontSize" === b ? (d = c[b].match(/([\d.]+)(\D*)/), b = parseFloat(d[1]), d = d[2] || "px", "em" === d ? (d = parseFloat(window.getComputedStyle(document.documentElement).fontSize), b *= d) : "pt" === d && (b *= 96 / 72), w = b) : "background" === b ? (w = c[b], u.setAttribute("data-initial-background",
231
+ getComputedStyle(u).background)) : w = parseFloat(c[b]);
232
+ window.addEventListener("resize", function() {
233
+ if (u && document.contains(u)) {
234
+ var f = u.offsetParent === document.body || u.offsetParent === document.documentElement ? {
235
+ width: window.innerWidth,
236
+ height: window.innerHeight
237
+ } : u.parentElement ? u.parentElement.getBoundingClientRect() : null;
238
+ if (f) {
239
+ var v = u.getBoundingClientRect(),
240
+ H = u.style.left,
241
+ y = u.style.right,
242
+ V = u.style.top,
243
+ W = u.style.bottom;
244
+ for (let L in c) {
245
+ let Q;
246
+ if ("left" === L || "right" === L) Q = "50%" === c[L] ? (f.width - v.width) / 2 :
247
+ "string" === typeof c[L] && c[L].endsWith("%") ? parseFloat(c[L]) / 100 * f.width : parseFloat(c[L]), "left" === L && "auto" !== H ? (u.style.left = `${Q}px`, u.style.right = "auto") : "right" === L && "auto" !== y && (u.style.right = `${Q}px`, u.style.left = "auto");
248
+ else if ("top" === L || "bottom" === L) Q = "50%" === c[L] ? (f.height - v.height) / 2 : "string" === typeof c[L] && c[L].endsWith("%") ? parseFloat(c[L]) / 100 * f.height : parseFloat(c[L]), "top" === L && "auto" !== V ? (u.style.top = `${Q}px`, u.style.bottom = "auto") : "bottom" === L && "auto" !== W && (u.style.bottom = `${Q}px`,
249
+ u.style.top = "auto")
250
+ }
251
+ u.offsetHeight
252
+ }
253
+ }
254
+ });
255
+ return w
256
+ };
257
+ $.fn._animate1 = function(b, c, d, m) {
258
+ function h(n) {
259
+ if ("number" === typeof n) return {
260
+ top: n,
261
+ right: n,
262
+ bottom: n,
263
+ left: n
264
+ };
265
+ n = n.toString().trim().split(/\s+/);
266
+ switch (n.length) {
267
+ case 1:
268
+ return {
269
+ top: n[0], right: n[0], bottom: n[0], left: n[0]
270
+ };
271
+ case 2:
272
+ return {
273
+ top: n[0], right: n[1], bottom: n[0], left: n[1]
274
+ };
275
+ case 3:
276
+ return {
277
+ top: n[0], right: n[1], bottom: n[2], left: n[1]
278
+ };
279
+ case 4:
280
+ return {
281
+ top: n[0], right: n[1], bottom: n[2], left: n[3]
282
+ };
283
+ default:
284
+ return null
285
+ }
286
+ }
287
+
288
+ function p(n) {
289
+ if ("number" === typeof n) return {
290
+ value: n,
291
+ unit: "px"
292
+ };
293
+ const A = String(n).match(/^(-?\d*\.?\d+)(%|px|em|rem|vh|vw)$/);
294
+ return A ? {
295
+ value: parseFloat(A[1]),
296
+ unit: A[2]
297
+ } : {
298
+ value: parseFloat(n),
299
+ unit: "px"
300
+ }
301
+ }
302
+
303
+ function t(n, A, u, B) {
304
+ return (A = u.parentElement) ? B.toLowerCase().includes("top") || B.toLowerCase().includes("bottom") ? parseFloat(n) / 100 * A.clientHeight : parseFloat(n) / 100 * A.clientWidth : n
305
+ }
306
+ this._Queue = this._Queue.then(() => new Promise((n, A) => {
307
+ let u = this,
308
+ B = this.elements,
309
+ C = [];
310
+ if (1 === Object.keys(b).length && ("scrollTop" in b || "scrollLeft" in b)) {
311
+ let a;
312
+ "scrollTop" in b ? a = new Promise(f => {
313
+ this.scrollTop(b.scrollTop, c, f)
314
+ }) : "scrollLeft" in b &&
315
+ (a = new Promise(f => {
316
+ this.scrollLeft(b.scrollLeft, c, f)
317
+ }));
318
+ a.then(() => {
319
+ d && "function" === typeof d && d.call(this);
320
+ d && d.always && d.always.call(this, this.elements);
321
+ n()
322
+ }).catch(A)
323
+ } else {
324
+ if ("scrollTop" in b || "scrollLeft" in b) {
325
+ let a;
326
+ "scrollTop" in b ? (a = new Promise(f => {
327
+ this.scrollTop(b.scrollTop, c, f)
328
+ }), delete b.scrollTop) : "scrollLeft" in b && (a = new Promise(f => {
329
+ this.scrollLeft(b.scrollLeft, c, f)
330
+ }), delete b.scrollLeft);
331
+ C.push(a)
332
+ }
333
+ "slow" === c && (c = 500);
334
+ var e = () => d && "function" === typeof d.condition ? B.every(a => d.condition(a)) :
335
+ !0;
336
+ if (!e()) return n(), this;
337
+ if ("finish" === m) return B.forEach(a => {
338
+ a.currentAnimationFrame && (cancelAnimationFrame(a.currentAnimationFrame), delete a.currentAnimationFrame)
339
+ }), B.forEach(a => {
340
+ for (let f in b) f in a.style && (a.style[f] = b[f]);
341
+ a.removeAttribute("data-last-animation-options")
342
+ }), d && "function" === typeof d && d.call(this), d && d.done && d.done.call(this, B), n(), this;
343
+ m && B.forEach(a => {
344
+ a.currentAnimationFrame && (cancelAnimationFrame(a.currentAnimationFrame), delete a.currentAnimationFrame)
345
+ });
346
+ var w = "scale scaleX scaleY scaleTL scaleTR scaleBL scaleBR scaleTC scaleBC scaleC scaleLC scaleRC".split(" ");
347
+ w.some(a => a in b);
348
+ var g = b.scaleDirection || "scale";
349
+ b.scaleDirection = g;
350
+ C = B.map(a => {
351
+ const f = window.getComputedStyle(a),
352
+ v = "none" === f.display || "hidden" === f.visibility || 0 === parseFloat(f.opacity);
353
+ var H = !1;
354
+ v || (H = !0);
355
+ return new Promise((y, V) => {
356
+ function W() {
357
+ const k = a.getAttribute("data-origScale");
358
+ if (/^scale(TL|TR|BL|BR|TC|BC|C|LC|RC)?$/.test(k)) {
359
+ b.transformOrigin = k.replace("scale", "").replace(/([A-Z])/g, " $1").toLowerCase().trim().replace(/\s+/g, " ");
360
+ switch (k) {
361
+ case "scaleTC":
362
+ b.transformOrigin = "top center";
363
+ break;
364
+ case "scaleBC":
365
+ b.transformOrigin = "bottom center";
366
+ break;
367
+ case "scaleC":
368
+ b.transformOrigin = "center center";
369
+ break;
370
+ case "scaleLC":
371
+ b.transformOrigin = "left center";
372
+ break;
373
+ case "scaleRC":
374
+ b.transformOrigin = "right center"
375
+ }
376
+ b.scale = 1
377
+ }
378
+ }
379
+ if (!a.isAnimating || b.isClicking || b.allowMultiple) {
380
+ u.elementData.has(a) || u.elementData.set(a, {
381
+ startCss: null,
382
+ currentAnimation: null
383
+ });
384
+ var L = u.elementData.get(a);
385
+ if (w.includes(g))
386
+ if ("scale" === g) L.hasSetScaleOrigin ? b.transformOrigin = b.transformOrigin || "center center" : (b.transformOrigin =
387
+ "center center", L.hasSetScaleOrigin = !0);
388
+ else {
389
+ switch (g) {
390
+ case "scaleTL":
391
+ var Q = "top left";
392
+ break;
393
+ case "scaleTR":
394
+ Q = "top right";
395
+ break;
396
+ case "scaleBL":
397
+ Q = "bottom left";
398
+ break;
399
+ case "scaleBR":
400
+ Q = "bottom right";
401
+ break;
402
+ case "scaleTC":
403
+ Q = "top center";
404
+ break;
405
+ case "scaleBC":
406
+ Q = "bottom center";
407
+ break;
408
+ case "scaleC":
409
+ Q = "center center";
410
+ break;
411
+ case "scaleLC":
412
+ Q = "left center";
413
+ break;
414
+ case "scaleRC":
415
+ Q = "right center"
416
+ }
417
+ a.setAttribute("data-origScale", g);
418
+ b.transformOrigin = Q
419
+ } Q = 1 === Object.keys(b).length && "opacity" in b;
420
+ L = a.hasAttribute("data-origScale");
421
+ if (Q && !v) {
422
+ let k = null;
423
+ const pa = parseFloat(f.opacity),
424
+ R = parseFloat(b.opacity);
425
+
426
+ function P(ba) {
427
+ k || (k = ba);
428
+ ba = Math.min((ba - k) / c, 1);
429
+ a.style.opacity = pa + (R - pa) * ba;
430
+ 1 > ba ? window.requestAnimationFrame(P) : (d && d.done && d.done.call(u, a), y())
431
+ }
432
+ d && d.start && d.start.call(u, a);
433
+ window.requestAnimationFrame(P)
434
+ } else {
435
+ if (Q && (v || L)) L ? W() : (a.style.display = "block", a.style.visibility = "visible", a.style.opacity = 0, b.opacity = parseFloat(b.opacity));
436
+ else if (!b.transformOrigin && !Q && (v || L) && !1 !== b.appear) {
437
+ const {
438
+ scaleTL: k,
439
+ scaleTR: pa,
440
+ scaleBL: R,
441
+ scaleBR: P,
442
+ scale: ba
443
+ } = b;
444
+ Q = [k, pa, R, P, ba].some(za => 0 === za) ? 0 : 1;
445
+ const qa = b.scaleTL || b.scaleTR || b.scaleBL || b.scaleBR || b.scale ? 1 : 0;
446
+ if (0 !== Q) {
447
+ a.style.display = "block";
448
+ a.style.visibility = "visible";
449
+ if (0 === parseFloat(f.opacity) || b.appear) a.style.opacity = 0, b.opacity = void 0 !== b.opacity ? b.opacity : 1;
450
+ L && qa ? W() : qa ? W() : (void 0 === b.scale && void 0 === b.scaleX && (b.scaleX = parseFloat(a.getAttribute("data-scaleX") || "1")), void 0 === b.scale && void 0 === b.scaleY && (b.scaleY = parseFloat(a.getAttribute("data-scaleY") || "1")))
451
+ }
452
+ }!0 === b.alpha &&
453
+ (L = parseFloat(window.getComputedStyle(a).opacity), b.opacity = 0 < L ? 0 : 1);
454
+ void 0 !== b.scaleTL ? (b.transformOrigin = "top left", b.scale = b.scaleTL, a.setAttribute("data-origScale", "scaleTL")) : void 0 !== b.scaleTR ? (b.transformOrigin = "top right", b.scale = b.scaleTR, a.setAttribute("data-origScale", "scaleTR")) : void 0 !== b.scaleBL ? (b.transformOrigin = "bottom left", b.scale = b.scaleBL, a.setAttribute("data-origScale", "scaleBL")) : void 0 !== b.scaleBR ? (b.transformOrigin = "bottom right", b.scale = b.scaleBR, a.setAttribute("data-origScale",
455
+ "scaleBR")) : void 0 !== b.scale || void 0 !== b.scaleX || void 0 !== b.scaleY ? a.setAttribute("data-origScale", "scale") : void 0 !== b.scaleTC ? (b.transformOrigin = "top center", b.scale = b.scaleTC, a.setAttribute("data-origScale", "scaleTC")) : void 0 !== b.scaleBC ? (b.transformOrigin = "bottom center", b.scale = b.scaleBC, a.setAttribute("data-origScale", "scaleBC")) : void 0 !== b.scaleC ? (b.transformOrigin = "center center", b.scale = b.scaleC, a.setAttribute("data-origScale", "scaleC")) : void 0 !== b.scaleLC ? (b.transformOrigin = "left center",
456
+ b.scale = b.scaleLC, a.setAttribute("data-origScale", "scaleLC")) : void 0 !== b.scaleRC && (b.transformOrigin = "right center", b.scale = b.scaleRC, a.setAttribute("data-origScale", "scaleRC"));
457
+ b.fadeIn ? (b.appear = !0, delete b.fadeIn) : b.fadeOut && (b.appear = !1, delete b.fadeOut);
458
+ w.forEach(k => {
459
+ 0 === b[k] && (b[k] = 1E-5)
460
+ });
461
+ (function(k, pa, R, P, ba) {
462
+ function qa(r, q) {
463
+ for (let I in k)
464
+ if (["rotate", "rotateX", "rotateY", "skewX", "skewY"].includes(I))["rotate", "rotateX", "rotateY"].includes(I) && "true" === a.getAttribute(`data-${I}-was-zero`) ?
465
+ (a.setAttribute(`data-${I}`, "0"), a.setAttribute(`data-start-${I}`, "0"), a.removeAttribute(`data-${I}-was-zero`)) : (q = parseFloat(a.getAttribute(`data-start-${I}`) || "0"), a.setAttribute(`data-${I}`, q));
466
+ else if (["scale", "scaleX", "scaleY"].includes(I)) {
467
+ q = void 0 !== k.scaleX ? parseFloat(k.scaleX) : void 0 !== k.scale ? parseFloat(k.scale) : parseFloat(a.getAttribute("data-scaleX") || "1");
468
+ let J = void 0 !== k.scaleY ? parseFloat(k.scaleY) : void 0 !== k.scale ? parseFloat(k.scale) : parseFloat(a.getAttribute("data-scaleY") || "1");
469
+ a.setAttribute("data-scaleX",
470
+ q);
471
+ a.setAttribute("data-scaleY", J)
472
+ } else "fontSize" === I ? a.setAttribute("data-fontSize", k[I]) : "width" === I || "height" === I ? a.setAttribute(`data-${I}`, k[I]) : "borderRadius" === I ? a.setAttribute("data-borderRadius", k[I]) : "backgroundColor" === I && a.setAttribute("data-backgroundColor", k[I]);
473
+ !1 === k.appear && (a.style.visibility = k.visibility ? k.visibility : "hidden", a.style.display = k.display ? k.display : "none");
474
+ a.style.willChange = "auto";
475
+ a.isAnimating = !1;
476
+ R && R.done && R.done.call(u, a);
477
+ r()
478
+ }
479
+
480
+ function za(r, q, I) {
481
+ if (r.transform &&
482
+ (r = r.transform.match(/translate\(([-\d.]+(?:px|%|vw|vh)?\s*,\s*[-\d.]+(?:px|%|vw|vh)?)\)/))) {
483
+ const [J, ra] = r[1].split(",").map(la => la.trim());
484
+ r = parseFloat(a.getAttribute("data-initial-transform-x")) || 0;
485
+ const ha = parseFloat(a.getAttribute("data-initial-transform-y")) || 0,
486
+ ia = parseFloat(J) || 0,
487
+ ja = parseFloat(ra) || 0;
488
+ I += ` translate(${r+(ia-r)*q}px, ${ha+(ja-ha)*q}px)`;
489
+ 1 === q && (a.setAttribute("data-initial-transform-x", ia), a.setAttribute("data-initial-transform-y", ja))
490
+ }
491
+ return I
492
+ }
493
+
494
+ function ma(r) {
495
+ if (e()) {
496
+ if (0 < wa) {
497
+ Aa ||
498
+ (Aa = r);
499
+ if (r - Aa < wa) {
500
+ a.currentAnimationFrame = requestAnimationFrame(ma);
501
+ return
502
+ }
503
+ S || (S = r, wa = 0)
504
+ }
505
+ S || (S = r);
506
+ T && (S = r - X, T = !1);
507
+ X = r - S;
508
+ Y = Math.min((X + da) / pa, 1);
509
+ var q = u._anieasing(0, 1, Y, k.easing || "linear");
510
+ R && R.progress && R.progress.call(u, a, Y, q, k);
511
+ R && R.step && R.step.call(u, a, Y, q, k);
512
+ for (let F in k)
513
+ if ("background" === F || "background1" === F || "background2" === F || "background3" === F) "background" === F || "background1" === F ? (isGradient(Ea) || isGradient(Ga) ? (r = interpolateGradient(Ga, Ea, Y), a.style.background = r ? r : .5 > Y ? Ga : Ea) : (r = window.getComputedStyle(a).backgroundColor,
514
+ r = u.interpolateBackground.call(u, r, Ea, Y), a.style.background = r), a.style.opacity = 1) : "background2" === F ? .5 >= Y ? (r = 1 - 1 * Y, a.style.background = Ga, a.style.opacity = r) : Ha ? a.style.opacity = .5 + (Y - .5) : (a.style.background = Ea, a.style.opacity = .5, Ha = !0) : "background3" === F && (Ha ? a.style.opacity = .5 + .5 * Y : (a.style.background = Ea, a.style.opacity = .5, Ha = !0), a.style.opacity = 1);
515
+ else if ("left top right bottom fontSize width height opacity borderRadius backgroundColor color path".split(" ").includes(F)) {
516
+ r = U[F];
517
+ var I = u.animate_calculateFinalValue(F,
518
+ k, U, Fa, l, E, G, z, x, a);
519
+ r += (I - r) * q;
520
+ if ("fontSize" === F) a.style.fontSize = `${N+(M-N)*q}px`;
521
+ else if ("width" === F) I = r - E, a.style.width = `${r}px`, a.style.right = `${U.right-I/2}px`;
522
+ else if ("height" === F) I = r - G, a.style.height = `${r}px`, a.style.bottom = `${U.bottom-I/2}px`;
523
+ else if ("borderRadius" === F) a.style.borderRadius = `${r}px`;
524
+ else if ("color" === F) r = u.animate_interpolateColor(U.color, k.color, q), a.style.color = r;
525
+ else if ("backgroundColor" === F) a.style.backgroundColor = u.animate_interpolateColor(U.backgroundColor || "rgba(0,0,0,0)",
526
+ k.backgroundColor, q);
527
+ else if ("path" === F) {
528
+ if (r = document.querySelector(k.path)) I = r.getTotalLength(), r = r.getPointAtLength(I * q), a.style.left = `${r.x}px`, a.style.top = `${r.y}px`
529
+ } else u.animate_updateStyles(a, F, r, U)
530
+ } else if ("margin" === F || "padding" === F) {
531
+ if (!a.hasAttribute("data-start-" + F)) {
532
+ const Ba = {};
533
+ ["Top", "Right", "Bottom", "Left"].forEach(na => {
534
+ const Ca = `${F}${na}`;
535
+ Ba[na.toLowerCase()] = parseFloat(getComputedStyle(a)[Ca])
536
+ });
537
+ a.setAttribute("data-start-" + F, JSON.stringify(Ba))
538
+ }
539
+ const sa = h(k[F]),
540
+ Da = JSON.parse(a.getAttribute("data-start-" +
541
+ F));
542
+ if (sa) {
543
+ const Ba = F;
544
+ ["Top", "Right", "Bottom", "Left"].forEach(na => {
545
+ const Ca = `${Ba}${na}`;
546
+ var ta = Da[na.toLowerCase()];
547
+ const {
548
+ value: Ia,
549
+ unit: Ja
550
+ } = p(sa[na.toLowerCase()]);
551
+ "%" === Ja ? (na = t(Ia, Ca, a, Ca), ta += (na - ta) * q) : ta += (Ia - ta) * q;
552
+ a.style[Ca] = `${ta}${Ja||"px"}`
553
+ })
554
+ }
555
+ 1 <= Y && a.removeAttribute("data-start-" + F)
556
+ } else if ("marginTop marginRight marginBottom marginLeft paddingTop paddingRight paddingBottom paddingLeft".split(" ").includes(F)) {
557
+ a.hasAttribute("data-start-" + F) || (r = getComputedStyle(a)[F], r = parseFloat(r),
558
+ a.setAttribute("data-start-" + F, r));
559
+ r = parseFloat(a.getAttribute("data-start-" + F));
560
+ const {
561
+ value: sa,
562
+ unit: Da
563
+ } = p(k[F]);
564
+ "%" === Da ? (I = t(sa, F, a, F), r += (I - r) * q) : r += (sa - r) * q;
565
+ a.style[F] = `${r}${Da||"px"}`;
566
+ 1 <= Y && a.removeAttribute("data-start-" + F)
567
+ }
568
+ r = void 0 !== k.scaleX ? parseFloat(k.scaleX) : void 0 !== k.scale ? parseFloat(k.scale) : K;
569
+ I = void 0 !== k.scaleY ? parseFloat(k.scaleY) : void 0 !== k.scale ? parseFloat(k.scale) : O;
570
+ r = K + (r - K) * q;
571
+ I = O + (I - O) * q;
572
+ var J = f.position,
573
+ ra = parseFloat(a.getAttribute("data-start-rotate")) || 0,
574
+ ha = void 0 !== k.rotate ?
575
+ parseFloat(k.rotate) : ra;
576
+ ra += (ha - ra) * q;
577
+ ha = parseFloat(a.getAttribute("data-start-rotateX")) || 0;
578
+ var ia = void 0 !== k.rotateX ? parseFloat(k.rotateX) : ha;
579
+ ha += (ia - ha) * q;
580
+ ia = parseFloat(a.getAttribute("data-start-rotateY")) || 0;
581
+ var ja = void 0 !== k.rotateY ? parseFloat(k.rotateY) : ia;
582
+ ia += (ja - ia) * q;
583
+ ja = parseFloat(a.getAttribute("data-start-skewX")) || 0;
584
+ var la = void 0 !== k.skewX ? parseFloat(k.skewX) : ja;
585
+ ja += (la - ja) * q;
586
+ la = parseFloat(a.getAttribute("data-start-skewY")) || 0;
587
+ var ua = void 0 !== k.skewY ? parseFloat(k.skewY) : la;
588
+ la += (ua - la) *
589
+ q;
590
+ if (J && "static" !== J && "relative" !== J || !a.getAttribute("data-origScale")) a.style.transformOrigin = k.transformOrigin ? k.transformOrigin : "50% 50%", J = za(k, q, `scale(${r}, ${I})`), a.style.transform = J + ` rotate(${ra}deg)` + ` rotateX(${ha}deg)` + ` rotateY(${ia}deg)` + ` skewX(${ja}deg)` + ` skewY(${la}deg)`;
591
+ else {
592
+ if (!a.hasAttribute("data-original-width"))
593
+ if (J = (Ba, na, Ca) => {
594
+ Ba = parseFloat(f.paddingLeft) || 0;
595
+ na = parseFloat(f.paddingRight) || 0;
596
+ var ta = parseFloat(f.paddingTop) || 0;
597
+ const Ia = parseFloat(f.paddingBottom) || 0;
598
+ ta = a.clientHeight -
599
+ ta - Ia;
600
+ a.setAttribute("data-original-width", a.clientWidth - Ba - na);
601
+ a.setAttribute("data-original-height", ta);
602
+ a.setAttribute("data-original-margin-top", f.marginTop);
603
+ a.setAttribute("data-original-margin-right", f.marginRight);
604
+ a.setAttribute("data-original-margin-bottom", f.marginBottom);
605
+ a.setAttribute("data-original-margin-left", f.marginLeft);
606
+ a.setAttribute("data-original-font-size", f.fontSize);
607
+ a.setAttribute("data-start-scale", Ca);
608
+ a.style.overflow = "hidden"
609
+ }, H) {
610
+ ua = a.clientWidth - (parseFloat(f.paddingLeft) ||
611
+ 0) - (parseFloat(f.paddingRight) || 0);
612
+ var ea = a.clientHeight - (parseFloat(f.paddingTop) || 0) - (parseFloat(f.paddingBottom) || 0);
613
+ J(ua, ea, "1");
614
+ a.style.width = `${ua}px`;
615
+ a.style.height = `${ea}px`
616
+ } else J(0, 0, "0"), a.style.width = "0px", a.style.height = "0px";
617
+ J = parseFloat(a.getAttribute("data-original-width"));
618
+ ua = parseFloat(a.getAttribute("data-original-height"));
619
+ ea = parseFloat(a.getAttribute("data-original-margin-top"));
620
+ parseFloat(a.getAttribute("data-original-margin-right"));
621
+ parseFloat(a.getAttribute("data-original-margin-bottom"));
622
+ const F = parseFloat(a.getAttribute("data-original-margin-left"));
623
+ var xa = parseFloat(a.getAttribute("data-original-font-size")),
624
+ ya = parseFloat(a.getAttribute("data-start-scale"));
625
+ let sa;
626
+ sa = void 0 !== k.scaleX ? k.scaleX : void 0 !== k.scaleY ? k.scaleY : k[a.getAttribute("data-origScale")] || 1;
627
+ ya += (sa - ya) * q;
628
+ const Da = J * ya;
629
+ var va = ua * ya;
630
+ a.style.width = `${Da}px`;
631
+ a.style.height = `${va}px`;
632
+ a.style.fontSize = `${xa*ya}px`;
633
+ xa = J - Da;
634
+ va = ua - va;
635
+ switch (a.getAttribute("data-origScale")) {
636
+ case "scaleTL":
637
+ a.style.marginTop = `${ea}px`;
638
+ a.style.marginLeft =
639
+ `${F}px`;
640
+ break;
641
+ case "scaleTR":
642
+ a.style.marginTop = `${ea}px`;
643
+ a.style.marginLeft = `${F+xa}px`;
644
+ break;
645
+ case "scaleBL":
646
+ a.style.marginTop = `${ea+va}px`;
647
+ a.style.marginLeft = `${F}px`;
648
+ break;
649
+ case "scaleBR":
650
+ a.style.marginTop = `${ea+va}px`;
651
+ a.style.marginLeft = `${F+xa}px`;
652
+ break;
653
+ case "scaleTC":
654
+ a.style.marginTop = `${ea}px`;
655
+ a.style.marginLeft = `${F+xa/2}px`;
656
+ break;
657
+ case "scaleBC":
658
+ a.style.marginTop = `${ea+va}px`;
659
+ a.style.marginLeft = `${F+xa/2}px`;
660
+ break;
661
+ case "scaleC":
662
+ a.style.marginTop = `${ea+va/2}px`;
663
+ a.style.marginLeft = `${F+xa/2}px`;
664
+ break;
665
+ case "scaleLC":
666
+ a.style.marginTop = `${ea+va/2}px`;
667
+ a.style.marginLeft = `${F}px`;
668
+ break;
669
+ case "scaleRC":
670
+ a.style.marginTop = `${ea+va/2}px`;
671
+ a.style.marginLeft = `${F+xa}px`;
672
+ break;
673
+ case "scale":
674
+ void 0 !== k.scaleX ? (a.style.width = `${J*ya}px`, a.style.height = `${ua}px`) : (a.style.width = void 0 !== k.scaleY ? `${J}px` : `${J*ya}px`, a.style.height = `${ua*ya}px`), a.style.marginTop = `${ea}px`, a.style.marginLeft = `${F}px`, a.style.transformOrigin = "center center"
675
+ }
676
+ 1 === q && a.setAttribute("data-start-scale", sa.toString());
677
+ a.style.transformOrigin =
678
+ k.transformOrigin ? k.transformOrigin : "50% 50%";
679
+ J = za(k, q, "");
680
+ 0 !== ra && (J += ` rotate(${ra}deg)`);
681
+ 0 !== ha && (J += ` rotateX(${ha}deg)`);
682
+ 0 !== ia && (J += ` rotateY(${ia}deg)`);
683
+ 0 !== ja && (J += ` skewX(${ja}deg)`);
684
+ 0 !== la && (J += ` skewY(${la}deg)`);
685
+ a.style.transform = J.trim() || "none"
686
+ }
687
+ void 0 !== k.appear && (a.style.opacity = k.noOpacityAnimation || k.alphaOut ? k.appear ? 1 : void 0 !== Z ? Z : k.alphaOut : Z + ((k.appear ? 1 : 0) - Z) * q);
688
+ 1 > Y && !a.animationStopped ? a.currentAnimationFrame = window.requestAnimationFrame(ma) : (1 !== k.scale && 1 !== k.opacity || a.removeAttribute("data-origScale"),
689
+ a.setAttribute("data-scaleX", r), a.setAttribute("data-scaleY", I), a.setAttribute("data-start-rotate", ra), a.setAttribute("data-start-rotateX", ha), a.setAttribute("data-start-rotateY", ia), a.setAttribute("data-start-skewX", ja), a.setAttribute("data-start-skewY", la), qa(P, ba))
690
+ } else qa(P, ba)
691
+ }
692
+ if (e()) {
693
+ var wa = k.delay || 0;
694
+ delete k.delay;
695
+ var Aa = null,
696
+ ka = !1,
697
+ fa = !1;
698
+ !0 === k.appear && ("none" !== window.getComputedStyle(a).display && "hidden" !== window.getComputedStyle(a).visibility && 0 !== parseFloat(window.getComputedStyle(a).opacity) ?
699
+ fa = !0 : "none" === window.getComputedStyle(a).display && (ka = !0, a.style.display = "block"));
700
+ var oa = window.getComputedStyle(a).position;
701
+ a.style.position = oa && "static" !== oa ? k.position || oa : "static";
702
+ var U = u.animate_getInitialStyles(a, k),
703
+ Fa = (a.parentElement || document.body).getBoundingClientRect(),
704
+ l = a.getBoundingClientRect(),
705
+ E = l.width,
706
+ G = l.height;
707
+ ka && (a.style.display = "none");
708
+ void 0 !== k.color && (U.color = window.getComputedStyle(a).color);
709
+ var D = getComputedStyle(a),
710
+ z = 0,
711
+ x = 0;
712
+ k.height && (x = ["borderTopWidth", "borderBottomWidth",
713
+ "paddingTop", "paddingBottom"
714
+ ].reduce((r, q) => r + parseFloat(D[q]), 0));
715
+ k.width && (z = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"].reduce((r, q) => r + parseFloat(D[q]), 0));
716
+ var K = parseFloat(a.getAttribute("data-scaleX")) || 1,
717
+ O = parseFloat(a.getAttribute("data-scaleY")) || 1;
718
+ !v || void 0 === k.scale && void 0 === k.scaleX && void 0 === k.scaleY || (a.style.transform = "scale(0.00001)", a.style.display = "block", a.style.visibility = "visible", O = K = 1E-5, a.dataset.isInitialized = "true");
719
+ ["rotate", "rotateX", "rotateY"].forEach(r => {
720
+ if (void 0 !== k[r] && !a.hasAttribute("data-start-" + r)) {
721
+ var q = a.getAttribute(`data-${r}`);
722
+ null !== q ? (q = parseFloat(q), q = isNaN(q) ? U[r] || 0 : q) : q = U[r] || 0;
723
+ a.setAttribute("data-start-" + r, q)
724
+ }
725
+ });
726
+ ["skewX", "skewY"].forEach(r => {
727
+ if (void 0 !== k[r] && !a.hasAttribute("data-start-" + r)) {
728
+ var q = a.getAttribute(`data-${r}`);
729
+ null !== q ? (q = parseFloat(q), q = isNaN(q) ? U[r] || 0 : q) : q = U[r] || 0;
730
+ a.setAttribute("data-start-" + r, q)
731
+ }
732
+ });
733
+ var N = parseFloat(window.getComputedStyle(a).fontSize),
734
+ M = k.fontSize ? parseFloat(k.fontSize) : N;
735
+ if (k.fontSize && k.fontSize.endsWith("em")) {
736
+ ka =
737
+ parseFloat(k.fontSize) || 1;
738
+ try {
739
+ var ca = a.parentElement || document.body;
740
+ var aa = ca ? parseFloat(window.getComputedStyle(ca).fontSize) || 16 : 16
741
+ } catch (r) {
742
+ console.warn("Error getting parent font size for em calculation:", r), aa = 16
743
+ }
744
+ M = ka * aa
745
+ }
746
+ var Z = !0 === k.appear ? fa ? parseFloat(window.getComputedStyle(a).opacity) : 0 : !1 === k.appear ? 1 : parseFloat(window.getComputedStyle(a).opacity);
747
+ a.style.opacity = Z;
748
+ !0 === k.appear ? (a.style.display = "block", a.style.visibility = "visible") : !1 === k.appear && (a.style.visibility = "visible");
749
+ a.style.willChange =
750
+ "transform, left, top, right, bottom, font-size, width, height, opacity, border-radius, background-color";
751
+ var S = null,
752
+ X = 0,
753
+ da = 0,
754
+ Y = 0,
755
+ T = !1;
756
+ R && R.start && R.start.call(u, a);
757
+ var Ga = window.getComputedStyle(a).background,
758
+ Ea = k.background || k.background1 || k.background2 || k.background3,
759
+ Ha = !1;
760
+ a.hasAttribute("data-initial-transform") || (aa = window.getComputedStyle(a).transform, ca = fa = 0, aa && "none" !== aa && (aa = new DOMMatrix(aa), fa = aa.m41, ca = aa.m42), a.setAttribute("data-initial-transform-x", fa), a.setAttribute("data-initial-transform-y",
761
+ ca));
762
+ ["rotate", "rotateX", "rotateY"].forEach(r => {
763
+ if (void 0 !== k[r]) {
764
+ var q = k[r];
765
+ let I = parseFloat(a.getAttribute(`data-${r}`) || "0");
766
+ if ("string" === typeof q && (q.startsWith("+") || q.startsWith("-") || q.startsWith("+=") || q.startsWith("-="))) {
767
+ let J = 0;
768
+ q.startsWith("+=") ? J = parseFloat(q.slice(2)) || 0 : q.startsWith("-=") ? J = -parseFloat(q.slice(2)) || 0 : q.startsWith("+") ? J = parseFloat(q.slice(1)) || 0 : q.startsWith("-") && (J = -parseFloat(q.slice(1)) || 0);
769
+ k[r] = I + J
770
+ } else q = parseFloat(String(q).replace(/deg/gi, "")), isNaN(q) && (q =
771
+ 0), 0 === q && 0 !== I ? (k[r] = 0, a.setAttribute(`data-${r}-was-zero`, "true")) : (k[r] = q, 0 !== q && a.removeAttribute(`data-${r}-was-zero`))
772
+ }
773
+ });
774
+ ["skewX", "skewY"].forEach(r => {
775
+ if (void 0 !== k[r]) {
776
+ var q = k[r];
777
+ let I = parseFloat(a.getAttribute(`data-${r}`) || "0");
778
+ if ("string" === typeof q && (q.startsWith("+") || q.startsWith("-") || q.startsWith("+=") || q.startsWith("-="))) {
779
+ let J = 0;
780
+ q.startsWith("+=") ? J = parseFloat(q.slice(2).replace(/deg/gi, "")) || 0 : q.startsWith("-=") ? J = -parseFloat(q.slice(2).replace(/deg/gi, "")) || 0 : q.startsWith("+") ?
781
+ J = parseFloat(q.slice(1).replace(/deg/gi, "")) || 0 : q.startsWith("-") && (J = -parseFloat(q.slice(1).replace(/deg/gi, "")) || 0);
782
+ k[r] = I + J
783
+ } else q = parseFloat(String(q).replace(/deg/gi, "")), isNaN(q) && (q = 0), k[r] = q
784
+ }
785
+ });
786
+ a.currentAnimationFrame = requestAnimationFrame(ma);
787
+ a.stop = function() {
788
+ a.currentAnimationFrame && !T && (window.cancelAnimationFrame(a.currentAnimationFrame), da += X, T = !0, a.animationStopped = !0, R && R.fail && R.fail.call(u, a))
789
+ };
790
+ a.start = function() {
791
+ T && (T = !1, a.animationStopped = !1, S = null, window.requestAnimationFrame(ma))
792
+ }
793
+ } else qa(P,
794
+ ba)
795
+ })(b, c, d, y, V)
796
+ }
797
+ } else y()
798
+ })
799
+ });
800
+ Promise.all(C).then(() => {
801
+ "function" === typeof d && d.call(this, this.elements);
802
+ d && d.always && d.always.call(this, this.elements);
803
+ n()
804
+ }).catch(a => {
805
+ A(a)
806
+ })
807
+ }
808
+ }));
809
+ return this
810
+ };
811
+ $.fn._animate0 = function(b, c, d, m) {
812
+ try {
813
+ if (!this.data("queueId")) {
814
+ const f = Date.now(),
815
+ v = Math.random().toString(36).substr(2, 5);
816
+ this.data("queueId", `q_${f}_${v}`)
817
+ }
818
+ const p = this.data("queueId");
819
+ var h = this[0];
820
+ h.hasAttribute("data-is-stopnow") && h.removeAttribute("data-is-stopnow");
821
+ const t = window.getComputedStyle(h);
822
+ if (!this.fx[p] || !this.fx[p].length) {
823
+ if (b.display && t.display === b.display) return this;
824
+ if (void 0 !== b.opacity) {
825
+ const f = parseFloat(t.opacity);
826
+ if (0 === b.opacity && 0 === f || 1 === b.opacity && 1 === f) return this
827
+ }
828
+ }
829
+ if (this.fx[p] &&
830
+ this.fx[p].length) {
831
+ const f = JSON.stringify(this.fx[p][this.fx[p].length - 1].properties),
832
+ v = JSON.stringify(b);
833
+ if (f === v) return this
834
+ }
835
+ this.fx[p] || (this.fx[p] = []);
836
+ if (!this.data("initialState")) {
837
+ const f = {};
838
+ ["left", "top", "right", "bottom"].forEach(v => {
839
+ f[v] = t[v]
840
+ });
841
+ this.data("initialState", f)
842
+ }
843
+ let n;
844
+ h = {};
845
+ b.start && (h.start = b.start);
846
+ b.progress && (h.progress = b.progress);
847
+ b.step && (h.step = b.step);
848
+ b.done && (h.done = b.done);
849
+ b.complete && !b.done && (h.done = b.complete);
850
+ b.fail && (h.fail = b.fail);
851
+ b.always && (h.always = b.always);
852
+ "function" ===
853
+ typeof d ? n = d : d && "object" === typeof d && (n = d.done || d.complete || d, d.complete && !d.done && (d.done = d.complete), Object.assign(h, d));
854
+ const {
855
+ start: A,
856
+ progress: u,
857
+ step: B,
858
+ done: C,
859
+ complete: e,
860
+ fail: w,
861
+ always: g,
862
+ ...a
863
+ } = b;
864
+ this.fx[p].push({
865
+ type: "animate",
866
+ properties: a,
867
+ duration: c,
868
+ callback: n,
869
+ lifecycleCallbacks: h,
870
+ skipQueue: m,
871
+ completed: !1
872
+ });
873
+ 1 === this.fx[p].length && this.dequeue();
874
+ return this
875
+ } catch (p) {
876
+ return this.selector && "string" === typeof this.selector ? this.selector.startsWith("text=") ? console.warn(`No elements found with text containing "${searchText}"`) :
877
+ this.selector.startsWith("size[") ? console.warn(`No elements found matching size condition "${this.selector}"`) : this.selector.startsWith("#") ? console.warn(`No element found with ID "${this.selector.slice(1)}"`) : this.selector.startsWith(".") ? console.warn(`No elements found with class "${this.selector.slice(1)}"`) : console.warn(`No elements found matching selector "${this.selector}"`) : console.warn("Animation initialization error:", p), d?.fail && d.fail.call(this, p), this
878
+ }
879
+ };
880
+ $.animate = function(b, c, d, m) {
881
+ return "object" === typeof c ? (b = {
882
+ ...b,
883
+ ...Object.keys(c).filter(h => "duration" !== h && "queue" !== h).reduce((h, p) => {
884
+ h[p] = c[p];
885
+ return h
886
+ }, {})
887
+ }, this._animate0(b, c.duration || 400, d, c.queue)) : this._animate0(b, c, d, m)
888
+ };
889
+ $.fn.animate = function() {
890
+ return $.animate.apply(this, arguments)
891
+ };
892
+ $.anitime = function(b, c) {
893
+ window._runningAnimations || (window._runningAnimations = new Map);
894
+ if (0 < this.anitimeRunning) return this;
895
+ if (!this.elements || 0 === this.elements.length) return console.warn("No elements found to run animation list."), c && c(), this;
896
+ const d = window._runningAnimations.get(this.selector);
897
+ d && d !== this && (d.elements.forEach(g => {
898
+ $(g).stop(!0, !0)
899
+ }), d._Queue = Promise.resolve(), d.fx && Object.keys(d.fx).forEach(g => {
900
+ d.fx[g] = []
901
+ }));
902
+ window._runningAnimations.set(this.selector, this);
903
+ window._elementOriginalStates ||
904
+ (window._elementOriginalStates = new Map);
905
+ const m = this,
906
+ h = this.elements.map(g => {
907
+ if (g.id) return g.id;
908
+ if (g.getAttribute("data-anitime-id")) return g.getAttribute("data-anitime-id");
909
+ const a = "anitime_" + Math.random().toString(36).substr(2, 9);
910
+ g.setAttribute("data-anitime-id", a);
911
+ return a
912
+ }),
913
+ p = h.join(","),
914
+ t = g => {
915
+ const a = document.createElement("div");
916
+ a.className = "anitime-virtual-parent";
917
+ a.style.cssText = "\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\topacity: 0;\n\t\t\tpointer-events: none;\n\t\t\tz-index: 1;\n\t\t";
918
+ var f = window.getComputedStyle(g);
919
+ const v = f.position,
920
+ H = f.zIndex;
921
+ f = f.transform;
922
+ g.style.position = "relative";
923
+ g.style.zIndex = "2";
924
+ g = g.getBoundingClientRect();
925
+ a._originalRect = {
926
+ top: g.top,
927
+ left: g.left,
928
+ width: g.width,
929
+ height: g.height,
930
+ position: v,
931
+ zIndex: H,
932
+ transform: "none" === f ? "" : f
933
+ };
934
+ return a
935
+ },
936
+ n = g => {
937
+ g = `step_${g}`;
938
+ if (this.animationDump[g]) return !1;
939
+ this.animationDump[g] = this.elements.map(a => {
940
+ var f = a.id || a.getAttribute("data-anitime-id");
941
+ const v = window.getComputedStyle(a);
942
+ let H = {};
943
+ for (let y of v) H[y] = v.getPropertyValue(y);
944
+ H.inlineStyles = a.style.cssText;
945
+ return {
946
+ id: f,
947
+ state: H,
948
+ timestamp: Date.now()
949
+ }
950
+ });
951
+ return !0
952
+ };
953
+ var A = $(this.elements[0]);
954
+ A.data("isStopnow") && (0 === b ? "running" !== A.data("animationState") && this.start() : (this.stop(!0), this.start(), this.dequeue()));
955
+ if (0 === arguments.length) {
956
+ const g = [],
957
+ a = {
958
+ animate: this.animate,
959
+ delay: this.delay,
960
+ css: this.css,
961
+ hide: this.hide,
962
+ show: this.show
963
+ };
964
+ this.elements.forEach(f => {
965
+ f.id || f.getAttribute("data-anitime-id") || f.setAttribute("data-anitime-id", "anitime_" + Math.random().toString(36).substr(2,
966
+ 9))
967
+ });
968
+ this.animate = function(f, v, H) {
969
+ g.push({
970
+ type: "animate",
971
+ properties: f,
972
+ duration: v,
973
+ callback: H,
974
+ args: arguments
975
+ });
976
+ this.animationChains[p] = g;
977
+ return this
978
+ };
979
+ this.css = function(f, v) {
980
+ g.push({
981
+ type: "css",
982
+ properties: f,
983
+ callback: v,
984
+ args: arguments
985
+ });
986
+ this.animationChains[p] = g;
987
+ return this
988
+ };
989
+ this.delay = function(f, v) {
990
+ g.push({
991
+ type: "delay",
992
+ delay: f,
993
+ callback: v,
994
+ args: arguments
995
+ });
996
+ this.animationChains[p] = g;
997
+ return this
998
+ };
999
+ this.hide = function(...f) {
1000
+ g.push({
1001
+ type: "hide",
1002
+ callback: "function" === typeof f[f.length - 1] ? f[f.length - 1] : null,
1003
+ args: f
1004
+ });
1005
+ this.animationChains[p] = g;
1006
+ return this
1007
+ };
1008
+ this.show = function(...f) {
1009
+ g.push({
1010
+ type: "show",
1011
+ callback: "function" === typeof f[f.length - 1] ? f[f.length - 1] : null,
1012
+ args: f
1013
+ });
1014
+ this.animationChains[p] = g;
1015
+ return this
1016
+ };
1017
+ this.end = function(f) {
1018
+ Object.assign(this, a);
1019
+ this.animationChains[p] = g;
1020
+ h.forEach((v, H) => {
1021
+ H = this.elements[H];
1022
+ window._elementOriginalStates.has(v) || (H = H.cloneNode(!0), window._elementOriginalStates.set(v, [H]))
1023
+ });
1024
+ 0 < arguments.length && this.anitime(f, c);
1025
+ return this
1026
+ };
1027
+ return this
1028
+ }
1029
+ this.anitimeRunning = 1;
1030
+ A = this.animationChains[p];
1031
+ if (!A) return console.warn("No animation chain found for elements:", p), c && c(), this;
1032
+ var u = (g => {
1033
+ if (0 === g) return 0;
1034
+ for (g = 10 * Math.floor(g / 10); 0 < g; g -= 10)
1035
+ if (this.animationDump[`step_${g}`]) return g;
1036
+ return 0
1037
+ })(b);
1038
+ let B = [];
1039
+ if (!A.some(g => {
1040
+ if (!["animate", "show", "hide"].includes(g.type)) return !1;
1041
+ g = g.properties;
1042
+ if (!g) return !1;
1043
+ const a = ["left", "top", "right", "bottom"];
1044
+ return Object.entries(g).some(([f, v]) => a.includes(f) ? "string" === typeof v && (v.includes("+=") || v.includes("-=") || /^[+-]\d/.test(v)) : !1)
1045
+ }))
1046
+ if (this.elements.forEach(g => {
1047
+ $(g).css("opacity", "0")
1048
+ }), 0 < u) {
1049
+ const g = this.animationDump[`step_${u}`];
1050
+ this.elements.forEach((a, f) => {
1051
+ var v = window._elementOriginalStates.get(h[f]);
1052
+ v && v[0] && (v = v[0].cloneNode(!0), a.parentNode.replaceChild(v, a), this.elements[f] = v, v.style.cssText = g[f].state.inlineStyles, a = t(v), B.push(a), v.parentNode.insertBefore(a, v), a.appendChild(v))
1053
+ })
1054
+ } else this.elements.forEach(g => {
1055
+ const a = t(g);
1056
+ g.parentNode.insertBefore(a, g);
1057
+ a.appendChild(g);
1058
+ B.push(a)
1059
+ }), this.elements.forEach((g, a) => {
1060
+ var f = window._elementOriginalStates.get(h[a]);
1061
+ f && f[0] && (f = f[0].cloneNode(!0), B[a].replaceChild(f, g), this.elements[a] = f)
1062
+ });
1063
+ var C = "q" + Date.now() + Math.random().toString(36).substr(2, 5);
1064
+ m.data("queueId", C);
1065
+ m.fx[C] = [];
1066
+ let e = !1,
1067
+ w = !1;
1068
+ C = A.filter(g => "animate" === g.type || "hide" === g.type || "show" === g.type).pop();
1069
+ C = A.lastIndexOf(C);
1070
+ for (let g = u; g < A.length; g++) {
1071
+ const a = A[g],
1072
+ f = () => {
1073
+ 0 === (g + 1) % 10 && n(g + 1)
1074
+ };
1075
+ g !== b || e || m.queue(function(H) {
1076
+ setTimeout(() => {
1077
+ m.anitimeRunning = 0
1078
+ }, 0);
1079
+ B.forEach((y, V) => {
1080
+ V = m.elements[V];
1081
+ const W = y._originalRect;
1082
+ V.style.position = W.position;
1083
+ V.style.zIndex =
1084
+ W.zIndex;
1085
+ V.style.transform = W.transform;
1086
+ y.parentNode.insertBefore(V, y);
1087
+ y.remove();
1088
+ $(V).css("opacity", "1")
1089
+ });
1090
+ e = !0;
1091
+ f();
1092
+ H()
1093
+ });
1094
+ const v = H => {
1095
+ g < b || e || this.elements.forEach(y => {
1096
+ $(y).css("opacity", "0")
1097
+ });
1098
+ H()
1099
+ };
1100
+ if ("css" === a.type) m.queue(function(H) {
1101
+ v(() => {
1102
+ m.css(a.properties);
1103
+ a.callback && a.callback.call(m);
1104
+ f();
1105
+ H()
1106
+ })
1107
+ });
1108
+ else if ("delay" === a.type) m.delay(g < b ? 1 : a.delay).queue(function(H) {
1109
+ v(() => {
1110
+ a.callback && a.callback.call(m);
1111
+ f();
1112
+ H()
1113
+ })
1114
+ });
1115
+ else if ("animate" === a.type) m.animate(a.properties, g < b ? 1 : a.duration, g === C ? function() {
1116
+ v(() => {
1117
+ a.callback && a.callback.call(m);
1118
+ f();
1119
+ !w && c && (w = !0, c())
1120
+ })
1121
+ } : function() {
1122
+ v(() => {
1123
+ a.callback && a.callback.call(m);
1124
+ f()
1125
+ })
1126
+ });
1127
+ else if ("hide" === a.type || "show" === a.type) {
1128
+ u = 300;
1129
+ let H = {},
1130
+ y = a.callback || null;
1131
+ "number" === typeof a.args[0] ? (u = a.args[0], "function" === typeof a.args[1] ? y = a.args[1] : "object" === typeof a.args[1] && (H = a.args[1], y = a.args[2])) : (H = "object" === typeof a.args[0] ? a.args[0] : {}, y = "function" === typeof a.args[1] ? a.args[1] : null);
1132
+ m[a.type](g < b ? 1 : u, H, g === C ? function() {
1133
+ v(() => {
1134
+ y && y.call(m);
1135
+ f();
1136
+ !w && c && (w = !0, c())
1137
+ })
1138
+ } :
1139
+ function() {
1140
+ v(() => {
1141
+ y && y.call(m);
1142
+ f()
1143
+ })
1144
+ })
1145
+ }
1146
+ }
1147
+ $(this.elements[0]).removeData("isStopped");
1148
+ m.start();
1149
+ m.dequeue();
1150
+ return this
1151
+ };
1152
+ $.fn.anitime = function(b, c) {
1153
+ $.anitime.apply(this, arguments);
1154
+ return this
1155
+ };
1156
+ $.fn.svg = function() {
1157
+ if (this.data("svgInitialized")) return this;
1158
+ this.data("svgInitialized", !0);
1159
+ this.data("svgPoints", []);
1160
+ const b = this,
1161
+ c = parseFloat(b.css("left")) || 0,
1162
+ d = parseFloat(b.css("top")) || 0,
1163
+ m = this.data("svgPoints");
1164
+ m.push({
1165
+ x: c,
1166
+ y: d
1167
+ });
1168
+ this.data("svgPoints", m);
1169
+ this.animate = function(h, p, t, n) {
1170
+ "function" === typeof p ? (n = p, p = 400, t = "swing") : "function" === typeof t && (n = t, t = "swing");
1171
+ p = p || 400;
1172
+ t = t || "swing";
1173
+ if (void 0 !== h.left && void 0 !== h.top) {
1174
+ const A = this.data("svgPoints");
1175
+ A.push({
1176
+ x: parseFloat(h.left),
1177
+ y: parseFloat(h.top),
1178
+ duration: p,
1179
+ easing: t
1180
+ });
1181
+ this.data("svgPoints", A);
1182
+ clearTimeout(this.data("svgTimeout"));
1183
+ this.data("svgTimeout", setTimeout(() => {
1184
+ createAndAnimateAlongPath(b, this.data("svgPoints"), n)
1185
+ }, 0))
1186
+ }
1187
+ return this
1188
+ };
1189
+ return this
1190
+ };
1191
+
1192
+ function createAndAnimateAlongPath(b, c, d) {
1193
+ function m(B) {
1194
+ B = Math.min((B - u) / A, 1);
1195
+ const C = p.getPointAtLength(n * B);
1196
+ b.css({
1197
+ left: C.x + "px",
1198
+ top: C.y + "px"
1199
+ });
1200
+ 1 > B ? requestAnimationFrame(m) : (h.remove(), b.removeData("svgInitialized"), b.removeData("svgPoints"), b.removeData("svgTimeout"), d && "function" === typeof d && d.call(b))
1201
+ }
1202
+ if (!(2 > c.length)) {
1203
+ var h = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1204
+ h.setAttribute("width", "100%");
1205
+ h.setAttribute("height", "100%");
1206
+ h.style.position = "absolute";
1207
+ h.style.top = "0";
1208
+ h.style.left =
1209
+ "0";
1210
+ h.style.pointerEvents = "none";
1211
+ h.style.zIndex = "-1";
1212
+ var p = document.createElementNS("http://www.w3.org/2000/svg", "path");
1213
+ p.setAttribute("fill", "none");
1214
+ p.setAttribute("stroke", "#00a8ff");
1215
+ p.setAttribute("stroke-width", "2");
1216
+ var t = `M ${c[0].x} ${c[0].y}`;
1217
+ for (let B = 1; B < c.length; B++) {
1218
+ const C = c[B - 1],
1219
+ e = c[B];
1220
+ t += ` C ${C.x+(e.x-C.x)/3} ${C.y}, ${C.x+2*(e.x-C.x)/3} ${e.y}, ${e.x} ${e.y}`
1221
+ }
1222
+ p.setAttribute("d", t);
1223
+ h.appendChild(p);
1224
+ c.forEach(B => {
1225
+ const C = document.createElementNS("http://www.w3.org/2000/svg", "circle");
1226
+ C.setAttribute("cx", B.x);
1227
+ C.setAttribute("cy", B.y);
1228
+ C.setAttribute("r", "3");
1229
+ C.setAttribute("fill", "red");
1230
+ h.appendChild(C)
1231
+ });
1232
+ document.body.appendChild(h);
1233
+ var n = p.getTotalLength(),
1234
+ A = c.reduce((B, C, e) => 0 < e ? B + (C.duration || 400) : B, 0),
1235
+ u = performance.now();
1236
+ requestAnimationFrame(m)
1237
+ }
1238
+ }
1239
+ $.fn.aniPath = function(b, c, d) {
1240
+ if ("string" !== typeof b) return console.error("SVG path specification must be a string"), this;
1241
+ if (!this.length) return console.error("No elements found for the selector"), this;
1242
+ let m = 0;
1243
+ const h = this.length,
1244
+ p = this;
1245
+ this.each(function(t) {
1246
+ t = $(this);
1247
+ var n = t[0];
1248
+ const A = n.closest(".example-container") || n.parentElement || document.body;
1249
+ if (!A) return console.error("Container element not found for aniPath animation"), this;
1250
+ const u = A.getBoundingClientRect();
1251
+ if (!u) return console.error("Failed to get container bounding rect"),
1252
+ this;
1253
+ var B = window.getComputedStyle(n);
1254
+ const C = "none" === B.display || "hidden" === B.visibility || 0 === parseFloat(B.opacity),
1255
+ e = {
1256
+ display: B.display,
1257
+ visibility: B.visibility,
1258
+ opacity: parseFloat(B.opacity)
1259
+ };
1260
+ "static" === B.position && (n.style.position = "absolute");
1261
+ const w = parsePathSpecCorrectly(b);
1262
+ let g = !1;
1263
+ 0 < w.length && !0 === w[0].options.show && (g = !0);
1264
+ let a = !1;
1265
+ C && "none" === B.display && (n.style.display = "block", n.style.visibility = "hidden", a = !0);
1266
+ var f = n.getBoundingClientRect();
1267
+ B = f.width;
1268
+ const v = f.height,
1269
+ H = void 0 !== n.offsetLeft ?
1270
+ n.offsetLeft : f.left - u.left;
1271
+ f = void 0 !== n.offsetTop ? n.offsetTop : f.top - u.top;
1272
+ a && (n.style.display = e.display, n.style.visibility = e.visibility);
1273
+ const y = [{
1274
+ x: H + B / 2,
1275
+ y: f + v / 2,
1276
+ isHidden: C,
1277
+ originalStyles: e,
1278
+ show: g
1279
+ }];
1280
+ d && d.debug && console.log("\ud30c\uc2f1\ub41c \uc120\ud0dd\uc790:", w.map(V => V.selector).join(" -> "));
1281
+ w.forEach(V => {
1282
+ let W;
1283
+ try {
1284
+ W = $(V.selector, A), W.length || (W = $(V.selector))
1285
+ } catch (L) {
1286
+ console.error("\uc120\ud0dd\uc790 \uc624\ub958:", L);
1287
+ return
1288
+ }
1289
+ W && W.length ? W.each(function() {
1290
+ const L = createPointFromSection(V,
1291
+ this, A, u, d);
1292
+ y.push(L)
1293
+ }) : console.warn(`\uc120\ud0dd\uc790 ${V.selector}\uc5d0 \ud574\ub2f9\ud558\ub294 \uc694\uc18c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.`)
1294
+ });
1295
+ n = function() {
1296
+ m++;
1297
+ m === h && "function" === typeof c && c.call(p)
1298
+ };
1299
+ 2 <= y.length ? (n = animateAlongPath(t, y, n, d), t.data("aniPathInstance", n)) : (console.warn("\uc560\ub2c8\uba54\uc774\uc158 \ud3ec\uc778\ud2b8\uac00 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."), m++, m === h && c && c.call(p))
1300
+ });
1301
+ if (0 < this.length) {
1302
+ const t = $(this[0]).data("aniPathInstance");
1303
+ if (t) return t
1304
+ }
1305
+ return this
1306
+ };
1307
+
1308
+ function calculateTargetCenter(b, c, d) {
1309
+ const m = b.getBoundingClientRect();
1310
+ let h;
1311
+ b.offsetParent === c || b.offsetParent && b.offsetParent.contains(c) ? (h = b.offsetLeft, b = b.offsetTop) : (h = m.left - d.left, b = m.top - d.top, d = window.getComputedStyle(c), h -= parseFloat(d.borderLeftWidth) || 0, h -= parseFloat(d.paddingLeft) || 0, b -= parseFloat(d.borderTopWidth) || 0, b -= parseFloat(d.paddingTop) || 0);
1312
+ return {
1313
+ x: h + m.width / 2 + (c.scrollLeft || 0),
1314
+ y: b + m.height / 2 + (c.scrollTop || 0)
1315
+ }
1316
+ }
1317
+
1318
+ function validateAndNormalizeOptions(b, c) {
1319
+ let d = b.time || b.duration || 300;
1320
+ if (isNaN(d) || 0 > d) console.warn(`Invalid duration value for ${c}, using default 300ms`), d = 300;
1321
+ let m = b.delay || 0;
1322
+ if (isNaN(m) || 0 > m) console.warn(`Invalid delay value for ${c}, using default 0ms`), m = 0;
1323
+ b = b.easing || "swing";
1324
+ if ("string" !== typeof b || "" === b.trim()) console.warn(`Invalid easing value for ${c}, using default 'swing'`), b = "swing";
1325
+ return {
1326
+ duration: d,
1327
+ easing: b,
1328
+ delay: m
1329
+ }
1330
+ }
1331
+
1332
+ function createPointFromSection(b, c, d, m, h) {
1333
+ c = calculateTargetCenter(c, d, m);
1334
+ d = validateAndNormalizeOptions(b.options, b.selector);
1335
+ h && h.debug && console.log(`\ud0c0\uac9f ${b.selector} \uc911\uc2ec \uc88c\ud45c:`, c.x, c.y);
1336
+ const p = {
1337
+ x: c.x,
1338
+ y: c.y,
1339
+ duration: d.duration,
1340
+ easing: d.easing,
1341
+ delay: d.delay,
1342
+ targetSelector: b.selector
1343
+ };
1344
+ !0 === b.options.show && (p.show = !0);
1345
+ !0 === b.options.hide && (p.hide = !0);
1346
+ Object.keys(b.options).forEach(t => {
1347
+ "time duration easing delay show hide".split(" ").includes(t) || (p[t] = b.options[t])
1348
+ });
1349
+ return p
1350
+ }
1351
+
1352
+ function parseTransform(b, c = !0) {
1353
+ const d = {
1354
+ scaleX: 1,
1355
+ scaleY: 1,
1356
+ rotate: 0,
1357
+ rotateX: 0,
1358
+ rotateY: 0,
1359
+ skewX: 0,
1360
+ skewY: 0
1361
+ };
1362
+ if (!b || "none" === b) return d;
1363
+ var m = b;
1364
+ c && (m = b.replace(/translate\([^)]+\)/g, "").trim());
1365
+ b = {
1366
+ ...d
1367
+ };
1368
+ if (c = m.match(/scale\(([^,]+),\s*([^)]+)\)/)) b.scaleX = parseFloat(c[1]) || 1, b.scaleY = parseFloat(c[2]) || 1;
1369
+ else if (c = m.match(/scale\(([^)]+)\)/)) c = parseFloat(c[1]) || 1, b.scaleX = c, b.scaleY = c;
1370
+ if (c = m.match(/rotate\(([^)]+)deg\)/)) b.rotate = parseFloat(c[1]) || 0;
1371
+ if (c = m.match(/rotateX\(([^)]+)deg\)/)) b.rotateX = parseFloat(c[1]) ||
1372
+ 0;
1373
+ if (c = m.match(/rotateY\(([^)]+)deg\)/)) b.rotateY = parseFloat(c[1]) || 0;
1374
+ if (c = m.match(/skewX\(([^)]+)deg\)/)) b.skewX = parseFloat(c[1]) || 0;
1375
+ if (m = m.match(/skewY\(([^)]+)deg\)/)) b.skewY = parseFloat(m[1]) || 0;
1376
+ return b
1377
+ }
1378
+
1379
+ function animateAlongPath(b, c, d, m = {}) {
1380
+ function h(l) {
1381
+ return l >= c.length - 1 ? 0 : (c[l + 1].duration || c[l + 1].time || 400) + (c[l + 1].delay || 0)
1382
+ }
1383
+
1384
+ function p(l, E) {
1385
+ if (!l.targetSelector) return {
1386
+ width: 0,
1387
+ height: 0,
1388
+ x: l.x || 0,
1389
+ y: l.y || 0
1390
+ };
1391
+ if (l.targetSelector.startsWith("#")) {
1392
+ var G = $(l.targetSelector, f);
1393
+ if (G.length) return l = G[0].getBoundingClientRect(), {
1394
+ width: l.width,
1395
+ height: l.height,
1396
+ x: l.left - v.left + l.width / 2,
1397
+ y: l.top - v.top + l.height / 2
1398
+ }
1399
+ }
1400
+ return l.targetSelector.startsWith(".") && (V[l.targetSelector] || (V[l.targetSelector] = $(l.targetSelector,
1401
+ f), W[l.targetSelector] = 0), G = V[l.targetSelector], G.length && (0 < E && c[E - 1].targetSelector === l.targetSelector && (W[l.targetSelector]++, W[l.targetSelector] >= G.length && (W[l.targetSelector] = 0)), E = G[W[l.targetSelector]])) ? (l = E.getBoundingClientRect(), {
1402
+ width: l.width,
1403
+ height: l.height,
1404
+ x: l.left - v.left + l.width / 2,
1405
+ y: l.top - v.top + l.height / 2
1406
+ }) : {
1407
+ width: 0,
1408
+ height: 0,
1409
+ x: l.x || 0,
1410
+ y: l.y || 0
1411
+ }
1412
+ }
1413
+
1414
+ function t(l) {
1415
+ if (ma) fa = requestAnimationFrame(t);
1416
+ else {
1417
+ for (l = l - za - Aa; P < c.length - 1 && l > ba + h(P);) ba += h(P), P++;
1418
+ if (P >= c.length - 1 && l > ba) {
1419
+ const O = c[c.length -
1420
+ 1];
1421
+ l = U[c.length - 1];
1422
+ n(a, l.x, l.y);
1423
+ B(b, O, k);
1424
+ if (!0 === O.hide) {
1425
+ const N = O.time || 300,
1426
+ M = performance.now(),
1427
+ ca = parseFloat(window.getComputedStyle(a).opacity);
1428
+
1429
+ function aa(S) {
1430
+ let X = S = Math.min((S - M) / N, 1);
1431
+ const da = O.easing || "linear";
1432
+ "function" === typeof $._anieasing ? X = $._anieasing(0, 1, S, da) : $.easing && $.easing[da] ? X = $.easing[da](null, S, 0, 1, 1) : "swing" === da && (X = .5 - Math.cos(S * Math.PI) / 2);
1433
+ a.style.opacity = ca * (1 - X);
1434
+ a.style.left = Z.left;
1435
+ a.style.top = Z.top;
1436
+ a.style.transform = Z.transform;
1437
+ 1 > S ? requestAnimationFrame(aa) : (a.style.display =
1438
+ "none", f.contains(y) && !1 !== g.lineOut && null !== g.lineOut && Infinity !== g.lineOut && (g.lineOut ? setTimeout(() => {
1439
+ f.removeChild(y)
1440
+ }, g.lineOut) : f.removeChild(y)))
1441
+ }
1442
+ const Z = {
1443
+ left: a.style.left,
1444
+ top: a.style.top,
1445
+ transform: a.style.transform
1446
+ };
1447
+ requestAnimationFrame(aa)
1448
+ } else !1 !== g.lineOut && null !== g.lineOut && Infinity !== g.lineOut && setTimeout(() => {
1449
+ f.contains(y) && f.removeChild(y)
1450
+ }, g.lineOut);
1451
+ ka = !1;
1452
+ oa = !0;
1453
+ fa = null;
1454
+ d && "function" === typeof d && d.call(b)
1455
+ } else {
1456
+ var E = h(P),
1457
+ G = l - ba,
1458
+ D = Math.min(G / E, 1);
1459
+ l = c[P];
1460
+ var z = c[P + 1],
1461
+ x = U[P],
1462
+ K = U[P +
1463
+ 1];
1464
+ z && z.delay && G < z.delay ? requestAnimationFrame(t) : (E = z && z.delay ? (G - z.delay) / (E - z.delay) : D, 0 < E && (G = z.easing || "linear", D = E, "function" === typeof $._anieasing ? D = $._anieasing(0, 1, E, G) : $.easing && $.easing[G] ? D = $.easing[G](null, E, 0, 1, 1) : "swing" === G && (D = .5 - Math.cos(E * Math.PI) / 2), n(a, x.x + (K.x - x.x) * D, x.y + (K.y - x.y) * D), g.line && (A(y, "http://www.w3.org/2000/svg", L, Q, c, l, z, P, D, qa, x, K), qa || (qa = !0)), u(b, a, l, z, D, k)), fa = requestAnimationFrame(t))
1465
+ }
1466
+ }
1467
+ }
1468
+
1469
+ function n(l, E, G) {
1470
+ l.style.left = `${E}px`;
1471
+ l.style.top = `${G}px`;
1472
+ l.style.transform =
1473
+ "translate(-50%, -50%)"
1474
+ }
1475
+
1476
+ function A(l, E, G, D, z, x, K, O, N, M, ca, aa) {
1477
+ if (!M) {
1478
+ let Z = "#00a8ff";
1479
+ x = 2;
1480
+ M = "none";
1481
+ let S = !0;
1482
+ if ("string" === typeof g.line && "" !== g.line.trim()) {
1483
+ const X = g.line.trim();
1484
+ X.includes("point:false") && (S = !1);
1485
+ const da = X.match(/(\d+)(?:px)?\s+(solid|dotted|dashed|double|groove|ridge|inset|outset)\s+(#[0-9a-f]{3,8}|rgba?\([^)]+\)|[a-z]+)/i);
1486
+ if (da) {
1487
+ x = parseInt(da[1], 10) || x;
1488
+ switch (da[2].toLowerCase()) {
1489
+ case "solid":
1490
+ M = "none";
1491
+ break;
1492
+ case "dotted":
1493
+ M = `${x},${x}`;
1494
+ break;
1495
+ case "dashed":
1496
+ M = `${4*x},${2*x}`;
1497
+ break;
1498
+ case "double":
1499
+ M = `${2*x},${x}`;
1500
+ break;
1501
+ default:
1502
+ M = "none"
1503
+ }
1504
+ Z = da[3]
1505
+ } else if (["solid", "dotted", "dashed", "dashdot"].includes(X.toLowerCase())) switch (X.toLowerCase()) {
1506
+ case "solid":
1507
+ M = "none";
1508
+ break;
1509
+ case "dotted":
1510
+ M = "2,2";
1511
+ break;
1512
+ case "dashed":
1513
+ M = "8,4";
1514
+ break;
1515
+ case "dashdot":
1516
+ M = "8,4,2,4"
1517
+ } else if (X.startsWith("#") || X.startsWith("rgb") || /^[a-z]+$/i.test(X)) Z = X
1518
+ }
1519
+ l.appendChild(document.createElementNS(E, "g"));
1520
+ f.appendChild(l);
1521
+ S && z.forEach((X, da) => {
1522
+ var Y = U[da];
1523
+ X = Y.x;
1524
+ Y = Y.y;
1525
+ var T = document.createElementNS(E, "circle");
1526
+ T.setAttribute("cx",
1527
+ X);
1528
+ T.setAttribute("cy", Y);
1529
+ T.setAttribute("r", "3");
1530
+ T.setAttribute("fill", Z);
1531
+ T.setAttribute("opacity", "0");
1532
+ l.appendChild(T);
1533
+ G.push(T);
1534
+ T = document.createElementNS(E, "text");
1535
+ T.setAttribute("x", X + 5);
1536
+ T.setAttribute("y", Y - 5);
1537
+ T.setAttribute("font-size", "10");
1538
+ T.setAttribute("fill", "#333");
1539
+ T.setAttribute("opacity", "0");
1540
+ T.textContent = da;
1541
+ l.appendChild(T);
1542
+ D.push(T)
1543
+ });
1544
+ l.dataset.showMarkers = S;
1545
+ l.dataset.strokeColor = Z;
1546
+ l.dataset.strokeWidth = x;
1547
+ l.dataset.strokeDashArray = M;
1548
+ l.dataset.strokeOpacity = .5
1549
+ }
1550
+ K && (K = Math.max(.01,
1551
+ N), z = ca.x + (aa.x - ca.x) * K, aa = ca.y + (aa.y - ca.y) * K, K = l.querySelector("g"), (x = K.lastElementChild) && x.getAttribute("data-segment-index") === O.toString() ? (ca = x.getAttribute("d").split("L")[0], x.setAttribute("d", `${ca} L ${z} ${aa}`)) : (x = document.createElementNS(E, "path"), x.setAttribute("fill", "none"), x.setAttribute("stroke", l.dataset.strokeColor), x.setAttribute("stroke-width", l.dataset.strokeWidth), x.setAttribute("opacity", l.dataset.strokeOpacity), "none" !== l.dataset.strokeDashArray && x.setAttribute("stroke-dasharray",
1552
+ l.dataset.strokeDashArray), x.setAttribute("d", `${`M ${ca.x} ${ca.y}`} ${`L ${z} ${aa}`}`), x.setAttribute("data-segment-index", O.toString()), K.appendChild(x)), "true" === l.dataset.showMarkers && 0 < G.length && 0 < D.length && (G.forEach((Z, S) => {
1553
+ (S < O || S === O && .9 < N) && Z.setAttribute("opacity", "0.7")
1554
+ }), D.forEach((Z, S) => {
1555
+ (S < O || S === O && .9 < N) && Z.setAttribute("opacity", "0.7")
1556
+ })))
1557
+ }
1558
+
1559
+ function u(l, E, G, D, z, x) {
1560
+ pa.forEach(K => {
1561
+ if (void 0 !== D[K]) {
1562
+ var O = void 0 !== G[K] ? G[K] : x[K],
1563
+ N = D[K],
1564
+ M = N;
1565
+ "string" === typeof N && (N.startsWith("+=") ? M =
1566
+ O + parseFloat(N.substring(2)) : N.startsWith("-=") ? M = O - parseFloat(N.substring(2)) : N.startsWith("+") ? M = O + parseFloat(N.substring(1)) : N.startsWith("-") ? M = O - parseFloat(N.substring(1)) : N.endsWith("%") ? (M = parseFloat(N) / 100, M = "width" === K ? f.clientWidth * M : "height" === K ? f.clientHeight * M : O * M) : M = parseFloat(N));
1567
+ N = O + (M - O) * z;
1568
+ "opacity" === K ? E.style.opacity = N : "width" === K ? E.style.width = `${N}px` : "height" === K ? E.style.height = `${N}px` : "fontSize" === K ? E.style.fontSize = `${N}px` : "color" === K || "backgroundColor" === K ? "function" ===
1569
+ typeof $.fn.animate_interpolateColor ? (O = $.fn.animate_interpolateColor(O, M, z), E.style[K] = O) : E.style[K] = M : "borderRadius" === K ? E.style.borderRadius = `${N}px` : "scale scaleX scaleY rotate rotateX rotateY skewX skewY".split(" ").includes(K) && C(E, K, N)
1570
+ }
1571
+ })
1572
+ }
1573
+
1574
+ function B(l, E, G) {
1575
+ const D = l[0];
1576
+ pa.forEach(z => {
1577
+ if (void 0 !== E[z]) {
1578
+ var x = E[z];
1579
+ "string" === typeof x && (x.startsWith("+=") ? x = G[z] + parseFloat(x.substring(2)) : x.startsWith("-=") ? x = G[z] - parseFloat(x.substring(2)) : x.startsWith("+") ? x = G[z] + parseFloat(x.substring(1)) :
1580
+ x.startsWith("-") ? x = G[z] - parseFloat(x.substring(1)) : x.endsWith("%") ? (x = parseFloat(x) / 100, x = "width" === z ? f.clientWidth * x : "height" === z ? f.clientHeight * x : G[z] * x) : x = parseFloat(x));
1581
+ "opacity" === z ? D.style.opacity = x : "width" === z || "height" === z || "fontSize" === z || "borderRadius" === z ? D.style[z] = `${x}px` : "color" === z || "backgroundColor" === z ? D.style[z] = x : "scale scaleX scaleY rotate rotateX rotateY skewX skewY".split(" ").includes(z) && (C(D, z, x), D.setAttribute(`data-${z}`, x))
1582
+ }
1583
+ })
1584
+ }
1585
+
1586
+ function C(l, E, G) {
1587
+ var D = (l.style.transform ||
1588
+ "").replace(/translate\(-50%,\s*-50%\)/, "").trim();
1589
+ D = parseTransform(D, !1);
1590
+ "scale" === E ? (D.scaleX = G, D.scaleY = G) : D[E] = G;
1591
+ l.style.transform = `translate(-50%, -50%) ${(`scale(${D.scaleX}, ${D.scaleY}) `+`rotate(${D.rotate}deg) `+`rotateX(${D.rotateX}deg) `+`rotateY(${D.rotateY}deg) `+`skewX(${D.skewX}deg) `+`skewY(${D.skewY}deg)`).trim()}`
1592
+ }
1593
+
1594
+ function e(l) {
1595
+ if (!ka || oa) return console.warn("\uc560\ub2c8\uba54\uc774\uc158\uc774 \uc2e4\ud589 \uc911\uc774 \uc544\ub2c8\ubbc0\ub85c \ud3ec\uc778\ud2b8\ub97c \ucd94\uac00\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."),
1596
+ !1;
1597
+ l = parsePathSpecCorrectly(l);
1598
+ const E = f.getBoundingClientRect();
1599
+ l.forEach(G => {
1600
+ let D;
1601
+ try {
1602
+ D = $(G.selector, f), D.length || (D = $(G.selector))
1603
+ } catch (z) {
1604
+ console.error("\uc120\ud0dd\uc790 \uc624\ub958:", z);
1605
+ return
1606
+ }
1607
+ D && D.length && D.each(function() {
1608
+ const z = createPointFromSection(G, this, f, E, null);
1609
+ c.push(z);
1610
+ const x = p(z, c.length - 1);
1611
+ U.push(x);
1612
+ void 0 === z.x && (z.x = x.x);
1613
+ void 0 === z.y && (z.y = x.y)
1614
+ })
1615
+ });
1616
+ return !0
1617
+ }
1618
+
1619
+ function w() {
1620
+ if (!ka || oa) {
1621
+ var l = U[U.length - 1];
1622
+ return {
1623
+ x: l.x,
1624
+ y: l.y
1625
+ }
1626
+ }
1627
+ var E = c[P + 1];
1628
+ l = U[P];
1629
+ const G = U[P + 1];
1630
+ if (!E) return {
1631
+ x: l.x,
1632
+ y: l.y
1633
+ };
1634
+ var D = h(P),
1635
+ z = performance.now() - za - Aa - ba;
1636
+ D = Math.min(Math.max(z / D, 0), 1);
1637
+ E = E.easing || "linear";
1638
+ z = D;
1639
+ "function" === typeof $._anieasing ? z = $._anieasing(0, 1, D, E) : $.easing && $.easing[E] ? z = $.easing[E](null, D, 0, 1, 1) : "swing" === E && (z = .5 - Math.cos(D * Math.PI) / 2);
1640
+ return {
1641
+ x: l.x + (G.x - l.x) * z,
1642
+ y: l.y + (G.y - l.y) * z
1643
+ }
1644
+ }
1645
+ if (2 > c.length) return null;
1646
+ const g = {
1647
+ line: !1,
1648
+ lineOut: 1E3,
1649
+ ...m
1650
+ };
1651
+ !1 === g.line || null === g.line || "string" === typeof g.line && "" !== g.line.trim() || !0 === g.line || (console.warn("Invalid line option value, using default false"),
1652
+ g.line = !1);
1653
+ !1 !== g.lineOut && null !== g.lineOut && Infinity !== g.lineOut && ("number" !== typeof g.lineOut || isNaN(g.lineOut) || 0 > g.lineOut) && (console.warn("Invalid lineOut option value, using default 1000ms"), g.lineOut = 1E3);
1654
+ const a = b[0];
1655
+ if (!a) return console.error("Element not found for animateAlongPath"), null;
1656
+ const f = a.closest(".example-container") || a.parentElement || document.body;
1657
+ if (!f) return console.error("Container element not found for animateAlongPath"), null;
1658
+ const v = f.getBoundingClientRect();
1659
+ if (!v) return console.error("Failed to get container bounding rect for animateAlongPath"),
1660
+ null;
1661
+ const H = window.getComputedStyle(a);
1662
+ "static" === H.position && (a.style.position = "absolute");
1663
+ a.style.transformOrigin = "center center";
1664
+ const y = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1665
+ if (!y) return console.error("Failed to create SVG element"), null;
1666
+ y.setAttribute("width", "100%");
1667
+ y.setAttribute("height", "100%");
1668
+ y.style.position = "absolute";
1669
+ y.style.top = "0";
1670
+ y.style.left = "0";
1671
+ y.style.pointerEvents = "none";
1672
+ y.style.zIndex = "1000";
1673
+ const V = {},
1674
+ W = {};
1675
+ let L = [],
1676
+ Q = [];
1677
+ m = c[0];
1678
+ m.isHidden && !0 === m.show &&
1679
+ ("none" === m.originalStyles.display && (a.style.display = "block"), "hidden" === m.originalStyles.visibility && (a.style.visibility = "visible"), a.style.opacity = "0", 1 < c.length && (c[1].opacity = 1));
1680
+ const k = {},
1681
+ pa = "width height opacity scale scaleX scaleY rotate rotateX rotateY skewX skewY fontSize color backgroundColor borderRadius".split(" "),
1682
+ R = parseTransform(H.transform || a.style.transform || "", !0);
1683
+ pa.forEach(l => {
1684
+ "opacity" === l ? k[l] = parseFloat(H[l]) : "width" === l || "height" === l ? k[l] = a.getBoundingClientRect()[l] : "scale" ===
1685
+ l ? k[l] = R.scaleX : "scaleX" === l ? k[l] = R.scaleX : "scaleY" === l ? k[l] = R.scaleY : ["rotate", "rotateX", "rotateY", "skewX", "skewY"].includes(l) ? k[l] = R[l] : k[l] = parseFloat(H[l]) || 0
1686
+ });
1687
+ let P = 0,
1688
+ ba = 0,
1689
+ qa = !1,
1690
+ za = performance.now(),
1691
+ ma = !1,
1692
+ wa = 0,
1693
+ Aa = 0,
1694
+ ka = !0,
1695
+ fa = null,
1696
+ oa = !1;
1697
+ const U = [];
1698
+ c.forEach((l, E) => {
1699
+ const G = p(l, E);
1700
+ U[E] = G;
1701
+ void 0 === l.x && (l.x = G.x);
1702
+ void 0 === l.y && (l.y = G.y)
1703
+ });
1704
+ const Fa = {
1705
+ addPoint: function(l) {
1706
+ return e(l)
1707
+ },
1708
+ getCurrentPosition: function() {
1709
+ return w()
1710
+ },
1711
+ isRunning: function() {
1712
+ return ka && !oa
1713
+ },
1714
+ pause: function() {
1715
+ ma || !ka || oa || (ma = !0,
1716
+ wa = performance.now());
1717
+ return Fa
1718
+ },
1719
+ resume: function() {
1720
+ ma && ka && !oa && (0 < wa && (Aa += performance.now() - wa, wa = 0), ma = !1);
1721
+ return Fa
1722
+ },
1723
+ stop: function() {
1724
+ null !== fa && (cancelAnimationFrame(fa), fa = null);
1725
+ ka = !1;
1726
+ oa = !0;
1727
+ ma = !1;
1728
+ return Fa
1729
+ },
1730
+ element: b,
1731
+ getCurrentPointIndex: function() {
1732
+ return P
1733
+ },
1734
+ getTotalPoints: function() {
1735
+ return c.length
1736
+ }
1737
+ };
1738
+ fa = requestAnimationFrame(t);
1739
+ return Fa
1740
+ }
1741
+
1742
+ function parsePathSpecCorrectly(b) {
1743
+ const c = [];
1744
+ let d = 0;
1745
+ for (; d < b.length;)
1746
+ if ("#" === b[d] || "." === b[d]) {
1747
+ for (var m = d; d < b.length && " " !== b[d] && "{" !== b[d];) d++;
1748
+ m = b.substring(m, d).trim();
1749
+ const h = {};
1750
+ if ("{" === b[d] || " " === b[d] && -1 !== b.indexOf("{", d)) {
1751
+ for (;
1752
+ " " === b[d];) d++;
1753
+ if ("{" === b[d]) {
1754
+ const p = d + 1;
1755
+ let t = 1;
1756
+ for (d++; d < b.length && 0 < t;) "{" === b[d] && t++, "}" === b[d] && t--, d++;
1757
+ b.substring(p, d - 1).trim().split(",").forEach(n => {
1758
+ const A = n.indexOf(":");
1759
+ if (-1 !== A) {
1760
+ const u = n.substring(0, A).trim();
1761
+ n = n.substring(A + 1).trim();
1762
+ if (n.startsWith('"') &&
1763
+ n.endsWith('"') || n.startsWith("'") && n.endsWith("'")) n = n.substring(1, n.length - 1);
1764
+ "show" === u || "hide" === u ? "true" === n.toLowerCase() ? h[u] = !0 : (n.toLowerCase(), h[u] = !1) : !isNaN(parseFloat(n)) && isFinite(n) ? h[u] = parseFloat(n) : h[u] = n
1765
+ }
1766
+ })
1767
+ }
1768
+ }
1769
+ c.push({
1770
+ selector: m,
1771
+ options: h
1772
+ })
1773
+ } else "-" === b[d] && ">" === b[d + 1] ? d += 2 : d++;
1774
+ return c
1775
+ };