@seip/blue-bird 0.6.4 → 0.7.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.
@@ -1,1465 +0,0 @@
1
- /*
2
- * anime.js v3.2.2
3
- * (c) 2023 Julian Garnier
4
- * Released under the MIT license
5
- * animejs.com
6
- */
7
-
8
- !(function (n, e) {
9
- "object" == typeof exports && "undefined" != typeof module
10
- ? (module.exports = e())
11
- : "function" == typeof define && define.amd
12
- ? define(e)
13
- : (n.anime = e());
14
- })(this, function () {
15
- "use strict";
16
- var i = {
17
- update: null,
18
- begin: null,
19
- loopBegin: null,
20
- changeBegin: null,
21
- change: null,
22
- changeComplete: null,
23
- loopComplete: null,
24
- complete: null,
25
- loop: 1,
26
- direction: "normal",
27
- autoplay: !0,
28
- timelineOffset: 0,
29
- },
30
- M = {
31
- duration: 1e3,
32
- delay: 0,
33
- endDelay: 0,
34
- easing: "easeOutElastic(1, .5)",
35
- round: 0,
36
- },
37
- j = [
38
- "translateX",
39
- "translateY",
40
- "translateZ",
41
- "rotate",
42
- "rotateX",
43
- "rotateY",
44
- "rotateZ",
45
- "scale",
46
- "scaleX",
47
- "scaleY",
48
- "scaleZ",
49
- "skew",
50
- "skewX",
51
- "skewY",
52
- "perspective",
53
- "matrix",
54
- "matrix3d",
55
- ],
56
- l = { CSS: {}, springs: {} };
57
- function C(n, e, t) {
58
- return Math.min(Math.max(n, e), t);
59
- }
60
- function u(n, e) {
61
- return -1 < n.indexOf(e);
62
- }
63
- function o(n, e) {
64
- return n.apply(null, e);
65
- }
66
- var w = {
67
- arr: function (n) {
68
- return Array.isArray(n);
69
- },
70
- obj: function (n) {
71
- return u(Object.prototype.toString.call(n), "Object");
72
- },
73
- pth: function (n) {
74
- return w.obj(n) && n.hasOwnProperty("totalLength");
75
- },
76
- svg: function (n) {
77
- return n instanceof SVGElement;
78
- },
79
- inp: function (n) {
80
- return n instanceof HTMLInputElement;
81
- },
82
- dom: function (n) {
83
- return n.nodeType || w.svg(n);
84
- },
85
- str: function (n) {
86
- return "string" == typeof n;
87
- },
88
- fnc: function (n) {
89
- return "function" == typeof n;
90
- },
91
- und: function (n) {
92
- return void 0 === n;
93
- },
94
- nil: function (n) {
95
- return w.und(n) || null === n;
96
- },
97
- hex: function (n) {
98
- return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n);
99
- },
100
- rgb: function (n) {
101
- return /^rgb/.test(n);
102
- },
103
- hsl: function (n) {
104
- return /^hsl/.test(n);
105
- },
106
- col: function (n) {
107
- return w.hex(n) || w.rgb(n) || w.hsl(n);
108
- },
109
- key: function (n) {
110
- return (
111
- !i.hasOwnProperty(n) &&
112
- !M.hasOwnProperty(n) &&
113
- "targets" !== n &&
114
- "keyframes" !== n
115
- );
116
- },
117
- };
118
- function d(n) {
119
- n = /\(([^)]+)\)/.exec(n);
120
- return n
121
- ? n[1].split(",").map(function (n) {
122
- return parseFloat(n);
123
- })
124
- : [];
125
- }
126
- function c(r, t) {
127
- var n = d(r),
128
- e = C(w.und(n[0]) ? 1 : n[0], 0.1, 100),
129
- a = C(w.und(n[1]) ? 100 : n[1], 0.1, 100),
130
- o = C(w.und(n[2]) ? 10 : n[2], 0.1, 100),
131
- n = C(w.und(n[3]) ? 0 : n[3], 0.1, 100),
132
- u = Math.sqrt(a / e),
133
- i = o / (2 * Math.sqrt(a * e)),
134
- c = i < 1 ? u * Math.sqrt(1 - i * i) : 0,
135
- s = i < 1 ? (i * u - n) / c : -n + u;
136
- function f(n) {
137
- var e = t ? (t * n) / 1e3 : n,
138
- e =
139
- i < 1
140
- ? Math.exp(-e * i * u) * (+Math.cos(c * e) + s * Math.sin(c * e))
141
- : (1 + s * e) * Math.exp(-e * u);
142
- return 0 === n || 1 === n ? n : 1 - e;
143
- }
144
- return t
145
- ? f
146
- : function () {
147
- var n = l.springs[r];
148
- if (n) return n;
149
- for (var e = 0, t = 0; ; )
150
- if (1 === f((e += 1 / 6))) {
151
- if (16 <= ++t) break;
152
- } else t = 0;
153
- return ((n = e * (1 / 6) * 1e3), (l.springs[r] = n));
154
- };
155
- }
156
- function q(e) {
157
- return (
158
- void 0 === e && (e = 10),
159
- function (n) {
160
- return Math.ceil(C(n, 1e-6, 1) * e) * (1 / e);
161
- }
162
- );
163
- }
164
- var H = function (b, e, M, t) {
165
- if (0 <= b && b <= 1 && 0 <= M && M <= 1) {
166
- var x = new Float32Array(11);
167
- if (b !== e || M !== t)
168
- for (var n = 0; n < 11; ++n) x[n] = k(0.1 * n, b, M);
169
- return function (n) {
170
- return (b === e && M === t) || 0 === n || 1 === n ? n : k(r(n), e, t);
171
- };
172
- }
173
- function r(n) {
174
- for (var e = 0, t = 1; 10 !== t && x[t] <= n; ++t) e += 0.1;
175
- var r = e + 0.1 * ((n - x[--t]) / (x[t + 1] - x[t])),
176
- a = O(r, b, M);
177
- if (0.001 <= a) {
178
- for (var o = n, u = r, i = b, c = M, s = 0; s < 4; ++s) {
179
- var f = O(u, i, c);
180
- if (0 === f) return u;
181
- u -= (k(u, i, c) - o) / f;
182
- }
183
- return u;
184
- }
185
- if (0 === a) return r;
186
- for (
187
- var l, d, p = n, h = e, g = e + 0.1, m = b, v = M, y = 0;
188
- 0 < (l = k((d = h + (g - h) / 2), m, v) - p) ? (g = d) : (h = d),
189
- 1e-7 < Math.abs(l) && ++y < 10;
190
- );
191
- return d;
192
- }
193
- };
194
- function r(n, e) {
195
- return 1 - 3 * e + 3 * n;
196
- }
197
- function k(n, e, t) {
198
- return ((r(e, t) * n + (3 * t - 6 * e)) * n + 3 * e) * n;
199
- }
200
- function O(n, e, t) {
201
- return 3 * r(e, t) * n * n + 2 * (3 * t - 6 * e) * n + 3 * e;
202
- }
203
- ((e = {
204
- linear: function () {
205
- return function (n) {
206
- return n;
207
- };
208
- },
209
- }),
210
- (t = {
211
- Sine: function () {
212
- return function (n) {
213
- return 1 - Math.cos((n * Math.PI) / 2);
214
- };
215
- },
216
- Expo: function () {
217
- return function (n) {
218
- return n ? Math.pow(2, 10 * n - 10) : 0;
219
- };
220
- },
221
- Circ: function () {
222
- return function (n) {
223
- return 1 - Math.sqrt(1 - n * n);
224
- };
225
- },
226
- Back: function () {
227
- return function (n) {
228
- return n * n * (3 * n - 2);
229
- };
230
- },
231
- Bounce: function () {
232
- return function (n) {
233
- for (var e, t = 4; n < ((e = Math.pow(2, --t)) - 1) / 11; );
234
- return (
235
- 1 / Math.pow(4, 3 - t) - 7.5625 * Math.pow((3 * e - 2) / 22 - n, 2)
236
- );
237
- };
238
- },
239
- Elastic: function (n, e) {
240
- void 0 === e && (e = 0.5);
241
- var t = C((n = void 0 === n ? 1 : n), 1, 10),
242
- r = C(e, 0.1, 2);
243
- return function (n) {
244
- return 0 === n || 1 === n
245
- ? n
246
- : -t *
247
- Math.pow(2, 10 * (n - 1)) *
248
- Math.sin(
249
- ((n - 1 - (r / (2 * Math.PI)) * Math.asin(1 / t)) *
250
- (2 * Math.PI)) /
251
- r,
252
- );
253
- };
254
- },
255
- }),
256
- ["Quad", "Cubic", "Quart", "Quint"].forEach(function (n, e) {
257
- t[n] = function () {
258
- return function (n) {
259
- return Math.pow(n, e + 2);
260
- };
261
- };
262
- }),
263
- Object.keys(t).forEach(function (n) {
264
- var r = t[n];
265
- ((e["easeIn" + n] = r),
266
- (e["easeOut" + n] = function (e, t) {
267
- return function (n) {
268
- return 1 - r(e, t)(1 - n);
269
- };
270
- }),
271
- (e["easeInOut" + n] = function (e, t) {
272
- return function (n) {
273
- return n < 0.5 ? r(e, t)(2 * n) / 2 : 1 - r(e, t)(-2 * n + 2) / 2;
274
- };
275
- }),
276
- (e["easeOutIn" + n] = function (e, t) {
277
- return function (n) {
278
- return n < 0.5
279
- ? (1 - r(e, t)(1 - 2 * n)) / 2
280
- : (r(e, t)(2 * n - 1) + 1) / 2;
281
- };
282
- }));
283
- }));
284
- var e,
285
- t,
286
- s = e;
287
- function P(n, e) {
288
- if (w.fnc(n)) return n;
289
- var t = n.split("(")[0],
290
- r = s[t],
291
- a = d(n);
292
- switch (t) {
293
- case "spring":
294
- return c(n, e);
295
- case "cubicBezier":
296
- return o(H, a);
297
- case "steps":
298
- return o(q, a);
299
- default:
300
- return o(r, a);
301
- }
302
- }
303
- function a(n) {
304
- try {
305
- return document.querySelectorAll(n);
306
- } catch (n) {}
307
- }
308
- function I(n, e) {
309
- for (
310
- var t,
311
- r = n.length,
312
- a = 2 <= arguments.length ? e : void 0,
313
- o = [],
314
- u = 0;
315
- u < r;
316
- u++
317
- )
318
- u in n && ((t = n[u]), e.call(a, t, u, n)) && o.push(t);
319
- return o;
320
- }
321
- function f(n) {
322
- return n.reduce(function (n, e) {
323
- return n.concat(w.arr(e) ? f(e) : e);
324
- }, []);
325
- }
326
- function p(n) {
327
- return w.arr(n)
328
- ? n
329
- : (n = w.str(n) ? a(n) || n : n) instanceof NodeList ||
330
- n instanceof HTMLCollection
331
- ? [].slice.call(n)
332
- : [n];
333
- }
334
- function h(n, e) {
335
- return n.some(function (n) {
336
- return n === e;
337
- });
338
- }
339
- function g(n) {
340
- var e,
341
- t = {};
342
- for (e in n) t[e] = n[e];
343
- return t;
344
- }
345
- function x(n, e) {
346
- var t,
347
- r = g(n);
348
- for (t in n) r[t] = (e.hasOwnProperty(t) ? e : n)[t];
349
- return r;
350
- }
351
- function D(n, e) {
352
- var t,
353
- r = g(n);
354
- for (t in e) r[t] = (w.und(n[t]) ? e : n)[t];
355
- return r;
356
- }
357
- function V(n) {
358
- var e, t, r, a, o, u, i;
359
- return w.rgb(n)
360
- ? (e = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec((t = n)))
361
- ? "rgba(" + e[1] + ",1)"
362
- : t
363
- : w.hex(n)
364
- ? ((e = (e = n).replace(
365
- /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
366
- function (n, e, t, r) {
367
- return e + e + t + t + r + r;
368
- },
369
- )),
370
- (e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e)),
371
- "rgba(" +
372
- parseInt(e[1], 16) +
373
- "," +
374
- parseInt(e[2], 16) +
375
- "," +
376
- parseInt(e[3], 16) +
377
- ",1)")
378
- : w.hsl(n)
379
- ? ((t =
380
- /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec((t = n)) ||
381
- /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t)),
382
- (n = parseInt(t[1], 10) / 360),
383
- (u = parseInt(t[2], 10) / 100),
384
- (i = parseInt(t[3], 10) / 100),
385
- (t = t[4] || 1),
386
- 0 == u
387
- ? (r = a = o = i)
388
- : ((r = c(
389
- (u = 2 * i - (i = i < 0.5 ? i * (1 + u) : i + u - i * u)),
390
- i,
391
- n + 1 / 3,
392
- )),
393
- (a = c(u, i, n)),
394
- (o = c(u, i, n - 1 / 3))),
395
- "rgba(" + 255 * r + "," + 255 * a + "," + 255 * o + "," + t + ")")
396
- : void 0;
397
- function c(n, e, t) {
398
- return (
399
- t < 0 && (t += 1),
400
- 1 < t && --t,
401
- t < 1 / 6
402
- ? n + 6 * (e - n) * t
403
- : t < 0.5
404
- ? e
405
- : t < 2 / 3
406
- ? n + (e - n) * (2 / 3 - t) * 6
407
- : n
408
- );
409
- }
410
- }
411
- function B(n) {
412
- n =
413
- /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(
414
- n,
415
- );
416
- if (n) return n[1];
417
- }
418
- function m(n, e) {
419
- return w.fnc(n) ? n(e.target, e.id, e.total) : n;
420
- }
421
- function v(n, e) {
422
- return n.getAttribute(e);
423
- }
424
- function y(n, e, t) {
425
- var r, a, o;
426
- return h([t, "deg", "rad", "turn"], B(e))
427
- ? e
428
- : ((r = l.CSS[e + t]),
429
- w.und(r)
430
- ? ((a = document.createElement(n.tagName)),
431
- (n =
432
- n.parentNode && n.parentNode !== document
433
- ? n.parentNode
434
- : document.body).appendChild(a),
435
- (a.style.position = "absolute"),
436
- (a.style.width = 100 + t),
437
- (o = 100 / a.offsetWidth),
438
- n.removeChild(a),
439
- (n = o * parseFloat(e)),
440
- (l.CSS[e + t] = n))
441
- : r);
442
- }
443
- function $(n, e, t) {
444
- var r;
445
- if (e in n.style)
446
- return (
447
- (r = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()),
448
- (e = n.style[e] || getComputedStyle(n).getPropertyValue(r) || "0"),
449
- t ? y(n, e, t) : e
450
- );
451
- }
452
- function b(n, e) {
453
- return w.dom(n) && !w.inp(n) && (!w.nil(v(n, e)) || (w.svg(n) && n[e]))
454
- ? "attribute"
455
- : w.dom(n) && h(j, e)
456
- ? "transform"
457
- : w.dom(n) && "transform" !== e && $(n, e)
458
- ? "css"
459
- : null != n[e]
460
- ? "object"
461
- : void 0;
462
- }
463
- function W(n) {
464
- if (w.dom(n)) {
465
- for (
466
- var e,
467
- t = n.style.transform || "",
468
- r = /(\w+)\(([^)]*)\)/g,
469
- a = new Map();
470
- (e = r.exec(t));
471
- )
472
- a.set(e[1], e[2]);
473
- return a;
474
- }
475
- }
476
- function X(n, e, t, r) {
477
- var a = u(e, "scale")
478
- ? 1
479
- : 0 +
480
- (u((a = e), "translate") || "perspective" === a
481
- ? "px"
482
- : u(a, "rotate") || u(a, "skew")
483
- ? "deg"
484
- : void 0),
485
- o = W(n).get(e) || a;
486
- return (
487
- t && (t.transforms.list.set(e, o), (t.transforms.last = e)),
488
- r ? y(n, o, r) : o
489
- );
490
- }
491
- function T(n, e, t, r) {
492
- switch (b(n, e)) {
493
- case "transform":
494
- return X(n, e, r, t);
495
- case "css":
496
- return $(n, e, t);
497
- case "attribute":
498
- return v(n, e);
499
- default:
500
- return n[e] || 0;
501
- }
502
- }
503
- function E(n, e) {
504
- var t = /^(\*=|\+=|-=)/.exec(n);
505
- if (!t) return n;
506
- var r = B(n) || 0,
507
- a = parseFloat(e),
508
- o = parseFloat(n.replace(t[0], ""));
509
- switch (t[0][0]) {
510
- case "+":
511
- return a + o + r;
512
- case "-":
513
- return a - o + r;
514
- case "*":
515
- return a * o + r;
516
- }
517
- }
518
- function Y(n, e) {
519
- var t;
520
- return w.col(n)
521
- ? V(n)
522
- : /\s/g.test(n)
523
- ? n
524
- : ((t = (t = B(n)) ? n.substr(0, n.length - t.length) : n),
525
- e ? t + e : t);
526
- }
527
- function F(n, e) {
528
- return Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2));
529
- }
530
- function Z(n) {
531
- for (var e, t = n.points, r = 0, a = 0; a < t.numberOfItems; a++) {
532
- var o = t.getItem(a);
533
- (0 < a && (r += F(e, o)), (e = o));
534
- }
535
- return r;
536
- }
537
- function G(n) {
538
- if (n.getTotalLength) return n.getTotalLength();
539
- switch (n.tagName.toLowerCase()) {
540
- case "circle":
541
- return 2 * Math.PI * v(n, "r");
542
- case "rect":
543
- return 2 * v((t = n), "width") + 2 * v(t, "height");
544
- case "line":
545
- return F(
546
- { x: v((t = n), "x1"), y: v(t, "y1") },
547
- { x: v(t, "x2"), y: v(t, "y2") },
548
- );
549
- case "polyline":
550
- return Z(n);
551
- case "polygon":
552
- return (
553
- (e = n.points),
554
- Z(n) + F(e.getItem(e.numberOfItems - 1), e.getItem(0))
555
- );
556
- }
557
- var e, t;
558
- }
559
- function Q(n, e) {
560
- var e = e || {},
561
- n =
562
- e.el ||
563
- (function (n) {
564
- for (var e = n.parentNode; w.svg(e) && w.svg(e.parentNode); )
565
- e = e.parentNode;
566
- return e;
567
- })(n),
568
- t = n.getBoundingClientRect(),
569
- r = v(n, "viewBox"),
570
- a = t.width,
571
- t = t.height,
572
- e = e.viewBox || (r ? r.split(" ") : [0, 0, a, t]);
573
- return {
574
- el: n,
575
- viewBox: e,
576
- x: +e[0],
577
- y: +e[1],
578
- w: a,
579
- h: t,
580
- vW: e[2],
581
- vH: e[3],
582
- };
583
- }
584
- function z(n, e) {
585
- var t = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,
586
- r = Y(w.pth(n) ? n.totalLength : n, e) + "";
587
- return {
588
- original: r,
589
- numbers: r.match(t) ? r.match(t).map(Number) : [0],
590
- strings: w.str(n) || e ? r.split(t) : [],
591
- };
592
- }
593
- function A(n) {
594
- return I(n ? f(w.arr(n) ? n.map(p) : p(n)) : [], function (n, e, t) {
595
- return t.indexOf(n) === e;
596
- });
597
- }
598
- function _(n) {
599
- var t = A(n);
600
- return t.map(function (n, e) {
601
- return { target: n, id: e, total: t.length, transforms: { list: W(n) } };
602
- });
603
- }
604
- function R(e) {
605
- for (
606
- var t = I(
607
- f(
608
- e.map(function (n) {
609
- return Object.keys(n);
610
- }),
611
- ),
612
- function (n) {
613
- return w.key(n);
614
- },
615
- ).reduce(function (n, e) {
616
- return (n.indexOf(e) < 0 && n.push(e), n);
617
- }, []),
618
- a = {},
619
- n = 0;
620
- n < t.length;
621
- n++
622
- )
623
- !(function (n) {
624
- var r = t[n];
625
- a[r] = e.map(function (n) {
626
- var e,
627
- t = {};
628
- for (e in n) w.key(e) ? e == r && (t.value = n[e]) : (t[e] = n[e]);
629
- return t;
630
- });
631
- })(n);
632
- return a;
633
- }
634
- function J(n, e) {
635
- var t,
636
- r = [],
637
- a = e.keyframes;
638
- for (t in (e = a ? D(R(a), e) : e))
639
- w.key(t) &&
640
- r.push({
641
- name: t,
642
- tweens: (function (n, t) {
643
- var e,
644
- r = g(t),
645
- a =
646
- (/^spring/.test(r.easing) && (r.duration = c(r.easing)),
647
- w.arr(n) &&
648
- (2 === (e = n.length) && !w.obj(n[0])
649
- ? (n = { value: n })
650
- : w.fnc(t.duration) || (r.duration = t.duration / e)),
651
- w.arr(n) ? n : [n]);
652
- return a
653
- .map(function (n, e) {
654
- n = w.obj(n) && !w.pth(n) ? n : { value: n };
655
- return (
656
- w.und(n.delay) && (n.delay = e ? 0 : t.delay),
657
- w.und(n.endDelay) &&
658
- (n.endDelay = e === a.length - 1 ? t.endDelay : 0),
659
- n
660
- );
661
- })
662
- .map(function (n) {
663
- return D(n, r);
664
- });
665
- })(e[t], n),
666
- });
667
- return r;
668
- }
669
- function K(i, c) {
670
- var s;
671
- return i.tweens.map(function (n) {
672
- var n = (function (n, e) {
673
- var t,
674
- r = {};
675
- for (t in n) {
676
- var a = m(n[t], e);
677
- (w.arr(a) &&
678
- 1 ===
679
- (a = a.map(function (n) {
680
- return m(n, e);
681
- })).length &&
682
- (a = a[0]),
683
- (r[t] = a));
684
- }
685
- return (
686
- (r.duration = parseFloat(r.duration)),
687
- (r.delay = parseFloat(r.delay)),
688
- r
689
- );
690
- })(n, c),
691
- e = n.value,
692
- t = w.arr(e) ? e[1] : e,
693
- r = B(t),
694
- a = T(c.target, i.name, r, c),
695
- o = s ? s.to.original : a,
696
- u = w.arr(e) ? e[0] : o,
697
- a = B(u) || B(a),
698
- r = r || a;
699
- return (
700
- w.und(t) && (t = o),
701
- (n.from = z(u, r)),
702
- (n.to = z(E(t, u), r)),
703
- (n.start = s ? s.end : 0),
704
- (n.end = n.start + n.delay + n.duration + n.endDelay),
705
- (n.easing = P(n.easing, n.duration)),
706
- (n.isPath = w.pth(e)),
707
- (n.isPathTargetInsideSVG = n.isPath && w.svg(c.target)),
708
- (n.isColor = w.col(n.from.original)),
709
- n.isColor && (n.round = 1),
710
- (s = n)
711
- );
712
- });
713
- }
714
- var U = {
715
- css: function (n, e, t) {
716
- return (n.style[e] = t);
717
- },
718
- attribute: function (n, e, t) {
719
- return n.setAttribute(e, t);
720
- },
721
- object: function (n, e, t) {
722
- return (n[e] = t);
723
- },
724
- transform: function (n, e, t, r, a) {
725
- var o;
726
- (r.list.set(e, t),
727
- (e !== r.last && !a) ||
728
- ((o = ""),
729
- r.list.forEach(function (n, e) {
730
- o += e + "(" + n + ") ";
731
- }),
732
- (n.style.transform = o)));
733
- },
734
- };
735
- function nn(n, u) {
736
- _(n).forEach(function (n) {
737
- for (var e in u) {
738
- var t = m(u[e], n),
739
- r = n.target,
740
- a = B(t),
741
- o = T(r, e, a, n),
742
- t = E(Y(t, a || B(o)), o),
743
- a = b(r, e);
744
- U[a](r, e, t, n.transforms, !0);
745
- }
746
- });
747
- }
748
- function en(n, e) {
749
- return I(
750
- f(
751
- n.map(function (o) {
752
- return e.map(function (n) {
753
- var e,
754
- t,
755
- r = o,
756
- a = b(r.target, n.name);
757
- if (a)
758
- return (
759
- (t = (e = K(n, r))[e.length - 1]),
760
- {
761
- type: a,
762
- property: n.name,
763
- animatable: r,
764
- tweens: e,
765
- duration: t.end,
766
- delay: e[0].delay,
767
- endDelay: t.endDelay,
768
- }
769
- );
770
- });
771
- }),
772
- ),
773
- function (n) {
774
- return !w.und(n);
775
- },
776
- );
777
- }
778
- function tn(n, e) {
779
- function t(n) {
780
- return n.timelineOffset || 0;
781
- }
782
- var r = n.length,
783
- a = {};
784
- return (
785
- (a.duration = r
786
- ? Math.max.apply(
787
- Math,
788
- n.map(function (n) {
789
- return t(n) + n.duration;
790
- }),
791
- )
792
- : e.duration),
793
- (a.delay = r
794
- ? Math.min.apply(
795
- Math,
796
- n.map(function (n) {
797
- return t(n) + n.delay;
798
- }),
799
- )
800
- : e.delay),
801
- (a.endDelay = r
802
- ? a.duration -
803
- Math.max.apply(
804
- Math,
805
- n.map(function (n) {
806
- return t(n) + n.duration - n.endDelay;
807
- }),
808
- )
809
- : e.endDelay),
810
- a
811
- );
812
- }
813
- var rn = 0;
814
- var N,
815
- S = [],
816
- an =
817
- ("undefined" != typeof document &&
818
- document.addEventListener("visibilitychange", function () {
819
- L.suspendWhenDocumentHidden &&
820
- (n()
821
- ? (N = cancelAnimationFrame(N))
822
- : (S.forEach(function (n) {
823
- return n._onDocumentVisibility();
824
- }),
825
- an()));
826
- }),
827
- function () {
828
- !(N || (n() && L.suspendWhenDocumentHidden)) &&
829
- 0 < S.length &&
830
- (N = requestAnimationFrame(on));
831
- });
832
- function on(n) {
833
- for (var e = S.length, t = 0; t < e; ) {
834
- var r = S[t];
835
- r.paused ? (S.splice(t, 1), e--) : (r.tick(n), t++);
836
- }
837
- N = 0 < t ? requestAnimationFrame(on) : void 0;
838
- }
839
- function n() {
840
- return document && document.hidden;
841
- }
842
- function L(n) {
843
- var c,
844
- s = 0,
845
- f = 0,
846
- l = 0,
847
- d = 0,
848
- p = null;
849
- function h(n) {
850
- var e =
851
- window.Promise &&
852
- new Promise(function (n) {
853
- return (p = n);
854
- });
855
- return (n.finished = e);
856
- }
857
- ((e = x(i, (n = n = void 0 === n ? {} : n))),
858
- (t = J((r = x(M, n)), n)),
859
- (n = _(n.targets)),
860
- (r = tn((t = en(n, t)), r)),
861
- (a = rn),
862
- rn++);
863
- var e,
864
- t,
865
- r,
866
- a,
867
- k = D(e, {
868
- id: a,
869
- children: [],
870
- animatables: n,
871
- animations: t,
872
- duration: r.duration,
873
- delay: r.delay,
874
- endDelay: r.endDelay,
875
- });
876
- h(k);
877
- function g() {
878
- var n = k.direction;
879
- ("alternate" !== n &&
880
- (k.direction = "normal" !== n ? "normal" : "reverse"),
881
- (k.reversed = !k.reversed),
882
- c.forEach(function (n) {
883
- return (n.reversed = k.reversed);
884
- }));
885
- }
886
- function m(n) {
887
- return k.reversed ? k.duration - n : n;
888
- }
889
- function o() {
890
- ((s = 0), (f = m(k.currentTime) * (1 / L.speed)));
891
- }
892
- function v(n, e) {
893
- e && e.seek(n - e.timelineOffset);
894
- }
895
- function y(e) {
896
- for (var n = 0, t = k.animations, r = t.length; n < r; ) {
897
- for (
898
- var a = t[n],
899
- o = a.animatable,
900
- u = a.tweens,
901
- i = u.length - 1,
902
- c = u[i],
903
- i =
904
- (i &&
905
- (c =
906
- I(u, function (n) {
907
- return e < n.end;
908
- })[0] || c),
909
- C(e - c.start - c.delay, 0, c.duration) / c.duration),
910
- s = isNaN(i) ? 1 : c.easing(i),
911
- f = c.to.strings,
912
- l = c.round,
913
- d = [],
914
- p = c.to.numbers.length,
915
- h = void 0,
916
- g = 0;
917
- g < p;
918
- g++
919
- ) {
920
- var m = void 0,
921
- v = c.to.numbers[g],
922
- y = c.from.numbers[g] || 0,
923
- m = c.isPath
924
- ? (function (e, t, n) {
925
- function r(n) {
926
- return e.el.getPointAtLength(
927
- 1 <= t + (n = void 0 === n ? 0 : n) ? t + n : 0,
928
- );
929
- }
930
- var a = Q(e.el, e.svg),
931
- o = r(),
932
- u = r(-1),
933
- i = r(1),
934
- c = n ? 1 : a.w / a.vW,
935
- s = n ? 1 : a.h / a.vH;
936
- switch (e.property) {
937
- case "x":
938
- return (o.x - a.x) * c;
939
- case "y":
940
- return (o.y - a.y) * s;
941
- case "angle":
942
- return (180 * Math.atan2(i.y - u.y, i.x - u.x)) / Math.PI;
943
- }
944
- })(c.value, s * v, c.isPathTargetInsideSVG)
945
- : y + s * (v - y);
946
- (!l || (c.isColor && 2 < g) || (m = Math.round(m * l) / l),
947
- d.push(m));
948
- }
949
- var b = f.length;
950
- if (b)
951
- for (var h = f[0], M = 0; M < b; M++) {
952
- f[M];
953
- var x = f[M + 1],
954
- w = d[M];
955
- isNaN(w) || (h += x ? w + x : w + " ");
956
- }
957
- else h = d[0];
958
- (U[a.type](o.target, a.property, h, o.transforms),
959
- (a.currentValue = h),
960
- n++);
961
- }
962
- }
963
- function b(n) {
964
- k[n] && !k.passThrough && k[n](k);
965
- }
966
- function u(n) {
967
- var e = k.duration,
968
- t = k.delay,
969
- r = e - k.endDelay,
970
- a = m(n);
971
- if (
972
- ((k.progress = C((a / e) * 100, 0, 100)),
973
- (k.reversePlayback = a < k.currentTime),
974
- c)
975
- ) {
976
- var o = a;
977
- if (k.reversePlayback) for (var u = d; u--; ) v(o, c[u]);
978
- else for (var i = 0; i < d; i++) v(o, c[i]);
979
- }
980
- (!k.began && 0 < k.currentTime && ((k.began = !0), b("begin")),
981
- !k.loopBegan &&
982
- 0 < k.currentTime &&
983
- ((k.loopBegan = !0), b("loopBegin")),
984
- a <= t && 0 !== k.currentTime && y(0),
985
- ((r <= a && k.currentTime !== e) || !e) && y(e),
986
- t < a && a < r
987
- ? (k.changeBegan ||
988
- ((k.changeBegan = !0),
989
- (k.changeCompleted = !1),
990
- b("changeBegin")),
991
- b("change"),
992
- y(a))
993
- : k.changeBegan &&
994
- ((k.changeCompleted = !0),
995
- (k.changeBegan = !1),
996
- b("changeComplete")),
997
- (k.currentTime = C(a, 0, e)),
998
- k.began && b("update"),
999
- e <= n &&
1000
- ((f = 0),
1001
- k.remaining && !0 !== k.remaining && k.remaining--,
1002
- k.remaining
1003
- ? ((s = l),
1004
- b("loopComplete"),
1005
- (k.loopBegan = !1),
1006
- "alternate" === k.direction && g())
1007
- : ((k.paused = !0),
1008
- k.completed ||
1009
- ((k.completed = !0),
1010
- b("loopComplete"),
1011
- b("complete"),
1012
- !k.passThrough && "Promise" in window && (p(), h(k))))));
1013
- }
1014
- return (
1015
- (k.reset = function () {
1016
- var n = k.direction;
1017
- ((k.passThrough = !1),
1018
- (k.currentTime = 0),
1019
- (k.progress = 0),
1020
- (k.paused = !0),
1021
- (k.began = !1),
1022
- (k.loopBegan = !1),
1023
- (k.changeBegan = !1),
1024
- (k.completed = !1),
1025
- (k.changeCompleted = !1),
1026
- (k.reversePlayback = !1),
1027
- (k.reversed = "reverse" === n),
1028
- (k.remaining = k.loop),
1029
- (c = k.children));
1030
- for (var e = (d = c.length); e--; ) k.children[e].reset();
1031
- (((k.reversed && !0 !== k.loop) ||
1032
- ("alternate" === n && 1 === k.loop)) &&
1033
- k.remaining++,
1034
- y(k.reversed ? k.duration : 0));
1035
- }),
1036
- (k._onDocumentVisibility = o),
1037
- (k.set = function (n, e) {
1038
- return (nn(n, e), k);
1039
- }),
1040
- (k.tick = function (n) {
1041
- u(((l = n) + (f - (s = s || l))) * L.speed);
1042
- }),
1043
- (k.seek = function (n) {
1044
- u(m(n));
1045
- }),
1046
- (k.pause = function () {
1047
- ((k.paused = !0), o());
1048
- }),
1049
- (k.play = function () {
1050
- k.paused &&
1051
- (k.completed && k.reset(), (k.paused = !1), S.push(k), o(), an());
1052
- }),
1053
- (k.reverse = function () {
1054
- (g(), (k.completed = !k.reversed), o());
1055
- }),
1056
- (k.restart = function () {
1057
- (k.reset(), k.play());
1058
- }),
1059
- (k.remove = function (n) {
1060
- cn(A(n), k);
1061
- }),
1062
- k.reset(),
1063
- k.autoplay && k.play(),
1064
- k
1065
- );
1066
- }
1067
- function un(n, e) {
1068
- for (var t = e.length; t--; )
1069
- h(n, e[t].animatable.target) && e.splice(t, 1);
1070
- }
1071
- function cn(n, e) {
1072
- var t = e.animations,
1073
- r = e.children;
1074
- un(n, t);
1075
- for (var a = r.length; a--; ) {
1076
- var o = r[a],
1077
- u = o.animations;
1078
- (un(n, u), u.length || o.children.length || r.splice(a, 1));
1079
- }
1080
- t.length || r.length || e.pause();
1081
- }
1082
- return (
1083
- (L.version = "3.2.1"),
1084
- (L.speed = 1),
1085
- (L.suspendWhenDocumentHidden = !0),
1086
- (L.running = S),
1087
- (L.remove = function (n) {
1088
- for (var e = A(n), t = S.length; t--; ) cn(e, S[t]);
1089
- }),
1090
- (L.get = T),
1091
- (L.set = nn),
1092
- (L.convertPx = y),
1093
- (L.path = function (n, e) {
1094
- var t = w.str(n) ? a(n)[0] : n,
1095
- r = e || 100;
1096
- return function (n) {
1097
- return { property: n, el: t, svg: Q(t), totalLength: G(t) * (r / 100) };
1098
- };
1099
- }),
1100
- (L.setDashoffset = function (n) {
1101
- var e = G(n);
1102
- return (n.setAttribute("stroke-dasharray", e), e);
1103
- }),
1104
- (L.stagger = function (n, e) {
1105
- var i = (e = void 0 === e ? {} : e).direction || "normal",
1106
- c = e.easing ? P(e.easing) : null,
1107
- s = e.grid,
1108
- f = e.axis,
1109
- l = e.from || 0,
1110
- d = "first" === l,
1111
- p = "center" === l,
1112
- h = "last" === l,
1113
- g = w.arr(n),
1114
- m = g ? parseFloat(n[0]) : parseFloat(n),
1115
- v = g ? parseFloat(n[1]) : 0,
1116
- y = B(g ? n[1] : n) || 0,
1117
- b = e.start || 0 + (g ? m : 0),
1118
- M = [],
1119
- x = 0;
1120
- return function (n, e, t) {
1121
- if (
1122
- (d && (l = 0), p && (l = (t - 1) / 2), h && (l = t - 1), !M.length)
1123
- ) {
1124
- for (var r, a, o, u = 0; u < t; u++)
1125
- (s
1126
- ? ((r = p ? (s[0] - 1) / 2 : l % s[0]),
1127
- (a = p ? (s[1] - 1) / 2 : Math.floor(l / s[0])),
1128
- (r = r - (u % s[0])),
1129
- (a = a - Math.floor(u / s[0])),
1130
- (o = Math.sqrt(r * r + a * a)),
1131
- "x" === f && (o = -r),
1132
- M.push((o = "y" === f ? -a : o)))
1133
- : M.push(Math.abs(l - u)),
1134
- (x = Math.max.apply(Math, M)));
1135
- (c &&
1136
- (M = M.map(function (n) {
1137
- return c(n / x) * x;
1138
- })),
1139
- "reverse" === i &&
1140
- (M = M.map(function (n) {
1141
- return f ? (n < 0 ? -1 * n : -n) : Math.abs(x - n);
1142
- })));
1143
- }
1144
- return b + (g ? (v - m) / x : m) * (Math.round(100 * M[e]) / 100) + y;
1145
- };
1146
- }),
1147
- (L.timeline = function (u) {
1148
- var i = L((u = void 0 === u ? {} : u));
1149
- return (
1150
- (i.duration = 0),
1151
- (i.add = function (n, e) {
1152
- var t = S.indexOf(i),
1153
- r = i.children;
1154
- function a(n) {
1155
- n.passThrough = !0;
1156
- }
1157
- -1 < t && S.splice(t, 1);
1158
- for (var o = 0; o < r.length; o++) a(r[o]);
1159
- ((t = D(n, x(M, u))),
1160
- (t.targets = t.targets || u.targets),
1161
- (n = i.duration),
1162
- (t.autoplay = !1),
1163
- (t.direction = i.direction),
1164
- (t.timelineOffset = w.und(e) ? n : E(e, n)),
1165
- a(i),
1166
- i.seek(t.timelineOffset),
1167
- (e = L(t)),
1168
- a(e),
1169
- r.push(e),
1170
- (n = tn(r, u)));
1171
- return (
1172
- (i.delay = n.delay),
1173
- (i.endDelay = n.endDelay),
1174
- (i.duration = n.duration),
1175
- i.seek(0),
1176
- i.reset(),
1177
- i.autoplay && i.play(),
1178
- i
1179
- );
1180
- }),
1181
- i
1182
- );
1183
- }),
1184
- (L.easing = P),
1185
- (L.penner = s),
1186
- (L.random = function (n, e) {
1187
- return Math.floor(Math.random() * (e - n + 1)) + n;
1188
- }),
1189
- L
1190
- );
1191
- });
1192
-
1193
- /* ==========================================================================
1194
- Animations Helper (Anime.js Wrapper)
1195
- ========================================================================== */
1196
- window.Animations = {
1197
- fadeUp: (selector, delay = 0) => {
1198
- return anime({
1199
- targets: selector,
1200
- translateY: [20, 0],
1201
- opacity: [0, 1],
1202
- duration: 350,
1203
- delay: delay,
1204
- easing: 'easeOutQuad'
1205
- });
1206
- },
1207
- fadeIn: (selector, delay = 0) => {
1208
- return anime({
1209
- targets: selector,
1210
- opacity: [0, 1],
1211
- duration: 600,
1212
- delay: delay,
1213
- easing: 'easeInOutQuad'
1214
- });
1215
- },
1216
- staggerFadeUp: (selector) => {
1217
- return anime({
1218
- targets: selector,
1219
- translateY: [15, 0],
1220
- opacity: [0, 1],
1221
- delay: anime.stagger(60, { start: 100 }),
1222
- duration: 300,
1223
- easing: 'easeOutCubic'
1224
- });
1225
- },
1226
- easeOutBack: (selector, delay = 150) => {
1227
- return anime({
1228
- targets: selector,
1229
- translateY: [10, 0],
1230
- opacity: [0, 1],
1231
- scale: [0.95, 1],
1232
- delay: anime.stagger(50, { start: delay }),
1233
- duration: 350,
1234
- easing: 'easeOutBack'
1235
- });
1236
- }
1237
- };
1238
-
1239
- /* ==========================================================================
1240
- blueBird-SPA Navigation Engine with Anime.js Transitions
1241
- ========================================================================== */
1242
- (function () {
1243
- const CONTENT_ID = 'blueBird-spa-content';
1244
- const TIMEOUT_MS = 5000;
1245
-
1246
- function shouldBypassSPA(urlStr) {
1247
- try {
1248
- const url = new URL(urlStr);
1249
- const path = url.pathname;
1250
- if (path.startsWith('/api/') ||
1251
- path === '/logout' ||
1252
- path === '/cerrar-sesion' ||
1253
- path.startsWith('/auth/')) {
1254
- return true;
1255
- }
1256
- return false;
1257
- } catch (e) {
1258
- return true;
1259
- }
1260
- }
1261
-
1262
- async function navigate(url, push = true) {
1263
- const container = document.getElementById(CONTENT_ID);
1264
-
1265
- if (container && window.enabledAnime !== false) {
1266
- await anime({
1267
- targets: container,
1268
- opacity: 0,
1269
- translateY: [0, -8],
1270
- duration: 100,
1271
- easing: 'easeInQuad'
1272
- }).finished;
1273
- }
1274
-
1275
- const controller = new AbortController();
1276
- const timeoutId = setTimeout(() => controller.abort(), TIMEOUT_MS);
1277
-
1278
- try {
1279
- let requestUrl = url;
1280
- const separator = requestUrl.includes('?') ? '&' : '?';
1281
- const response = await fetch(`${requestUrl}${separator}source=frontend`, {
1282
- signal: controller.signal,
1283
- headers: {
1284
- 'X-blueBird-SPA': 'true',
1285
- 'Accept': 'application/json'
1286
- }
1287
- });
1288
-
1289
- clearTimeout(timeoutId);
1290
-
1291
- if (response.status === 401 || response.status === 403) {
1292
- window.location.href = url;
1293
- return;
1294
- }
1295
-
1296
- if (!response.ok) {
1297
- throw new Error(`HTTP error! status: ${response.status}`);
1298
- }
1299
-
1300
- const data = await response.json();
1301
-
1302
- if (data.meta) {
1303
- document.title = data.meta.title || document.title;
1304
- ['description', 'keywords', 'author'].forEach(name => {
1305
- const el = document.querySelector(`meta[name="${name}"]`);
1306
- if (el && data.meta[name]) el.setAttribute("content", data.meta[name]);
1307
- });
1308
- }
1309
-
1310
- if (data.css && Array.isArray(data.css)) {
1311
- data.css.forEach(href => {
1312
- if (!document.head.querySelector(`link[href="${href}"]`)) {
1313
- const link = document.createElement('link');
1314
- link.rel = 'stylesheet';
1315
- link.href = href;
1316
- document.head.appendChild(link);
1317
- }
1318
- });
1319
- }
1320
-
1321
- if (container) {
1322
- container.innerHTML = data.body;
1323
-
1324
- const partialScripts = container.querySelectorAll('script');
1325
- const partialLinks = container.querySelectorAll('link[rel="stylesheet"]');
1326
-
1327
- partialLinks.forEach(link => {
1328
- if (!document.head.querySelector(`link[href="${link.href}"]`)) {
1329
- document.head.appendChild(link.cloneNode(true));
1330
- }
1331
- link.remove();
1332
- });
1333
-
1334
- partialScripts.forEach(oldScript => {
1335
- const newScript = document.createElement('script');
1336
- Array.from(oldScript.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value));
1337
- newScript.textContent = oldScript.textContent;
1338
-
1339
- if (oldScript.src) {
1340
- const existing = document.head.querySelector(`script[src="${oldScript.src}"]`);
1341
- if (existing && (oldScript.hasAttribute('data-spa-reload') || oldScript.src.includes('source=frontend'))) {
1342
- existing.remove();
1343
- }
1344
- if (!document.head.querySelector(`script[src="${oldScript.src}"]`)) {
1345
- document.head.appendChild(newScript);
1346
- }
1347
- } else {
1348
- const content = oldScript.textContent.trim();
1349
- if (content) {
1350
- Array.from(document.head.querySelectorAll('script:not([src])'))
1351
- .filter(s => s.textContent.trim() === content)
1352
- .forEach(s => s.remove());
1353
- document.head.appendChild(newScript);
1354
- }
1355
- }
1356
- oldScript.remove();
1357
- });
1358
-
1359
- if (!url.includes('set-lang=true')) {
1360
- const hash = url.split('#')[1];
1361
- if (hash) {
1362
- const element = document.getElementById(hash);
1363
- if (element) {
1364
- element.scrollIntoView({ behavior: 'smooth' });
1365
- }
1366
- } else {
1367
- window.scrollTo({ top: 0, behavior: 'smooth' });
1368
- }
1369
- }
1370
-
1371
- if (window.enabledAnime !== false) {
1372
- anime({
1373
- targets: container,
1374
- opacity: [0, 1],
1375
- duration: 150,
1376
- easing: 'easeOutQuad'
1377
- });
1378
-
1379
- const animTargets = container.querySelectorAll('h1, h2, h3, h4, p, button, a.px-8, .grid > div, .bg-slate-900\\/50, .bg-slate-900\\/40, li');
1380
- if (animTargets.length > 0) {
1381
- anime({
1382
- targets: animTargets,
1383
- translateY: [12, 0],
1384
- opacity: [0, 1],
1385
- scale: [0.97, 1],
1386
- delay: anime.stagger(35, { start: 40 }),
1387
- duration: 300,
1388
- easing: 'easeOutBack'
1389
- });
1390
- }
1391
- } else {
1392
- container.style.opacity = 1;
1393
- container.style.transform = 'none';
1394
- }
1395
- }
1396
-
1397
- if (push) {
1398
- let finalUrl = response.url || url;
1399
- try {
1400
- const urlObj = new URL(finalUrl);
1401
- const hasSetLang = urlObj.searchParams.has('set-lang');
1402
- urlObj.searchParams.delete('source');
1403
- urlObj.searchParams.delete('set-lang');
1404
- if (hasSetLang) {
1405
- urlObj.searchParams.delete('lang');
1406
- }
1407
- finalUrl = urlObj.pathname + urlObj.search + urlObj.hash;
1408
- } catch (e) {
1409
- finalUrl = finalUrl.replace(/[?&]source=frontend/, '').replace(/[?&]set-lang=true/, '');
1410
- }
1411
- window.history.pushState({ url: finalUrl }, data.meta?.title || '', finalUrl);
1412
- }
1413
-
1414
- document.dispatchEvent(new CustomEvent('blueBird:navigation', {
1415
- detail: { url, data }
1416
- }));
1417
- document.dispatchEvent(new CustomEvent('blueBird:content-loaded', {
1418
- detail: { url, data }
1419
- }));
1420
-
1421
- } catch (error) {
1422
- if (error.name === 'AbortError') {
1423
- console.warn('SPA Navigation timeout, redirecting...');
1424
- } else {
1425
- console.error('SPA Navigation failed:', error);
1426
- }
1427
- window.location.href = url;
1428
- }
1429
- }
1430
-
1431
- window.blueBirdNav = { navigate };
1432
-
1433
- function initSPA() {
1434
- document.addEventListener('click', (e) => {
1435
- const link = e.target.closest('a');
1436
-
1437
- if (link &&
1438
- link.href &&
1439
- link.href.startsWith(window.location.origin) &&
1440
- !link.hasAttribute('download') &&
1441
- !link.hasAttribute('data-no-spa') &&
1442
- !shouldBypassSPA(link.href) &&
1443
- link.target !== '_blank' &&
1444
- !e.ctrlKey && !e.metaKey && !e.shiftKey) {
1445
-
1446
- e.preventDefault();
1447
- navigate(link.href);
1448
- }
1449
- });
1450
-
1451
- window.addEventListener('popstate', (e) => {
1452
- if (e.state && e.state.url) {
1453
- navigate(e.state.url, false);
1454
- } else {
1455
- window.location.reload();
1456
- }
1457
- });
1458
- }
1459
-
1460
- if (document.readyState === 'loading') {
1461
- document.addEventListener('DOMContentLoaded', initSPA);
1462
- } else {
1463
- initSPA();
1464
- }
1465
- })();