gralobe 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/dist/gralobe.js +137 -127
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +2 -2
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +17 -0
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as A from "three";
|
|
2
2
|
import { Controls as Ur, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as Fr, Plane as zr, MathUtils as Nr, Matrix4 as Tn, Object3D as $r } from "three";
|
|
3
|
-
function
|
|
3
|
+
function Ce(a) {
|
|
4
4
|
if (a === void 0)
|
|
5
5
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6
6
|
return a;
|
|
@@ -19,13 +19,13 @@ var he = {
|
|
|
19
19
|
duration: 0.5,
|
|
20
20
|
overwrite: !1,
|
|
21
21
|
delay: 0
|
|
22
|
-
},
|
|
22
|
+
}, Ci, K, z, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, Br = oi / 4, Gr = 0, Dn = Math.sqrt, Vr = Math.cos, Hr = Math.sin, Z = function(e) {
|
|
23
23
|
return typeof e == "string";
|
|
24
24
|
}, G = function(e) {
|
|
25
25
|
return typeof e == "function";
|
|
26
26
|
}, Ae = function(e) {
|
|
27
27
|
return typeof e == "number";
|
|
28
|
-
},
|
|
28
|
+
}, Pi = function(e) {
|
|
29
29
|
return typeof e > "u";
|
|
30
30
|
}, Ee = function(e) {
|
|
31
31
|
return typeof e == "object";
|
|
@@ -68,7 +68,7 @@ var he = {
|
|
|
68
68
|
}, He = function(e) {
|
|
69
69
|
return e._gsap || Ri(me(e))[0]._gsap;
|
|
70
70
|
}, Nn = function(e, t, i) {
|
|
71
|
-
return (i = e[t]) && G(i) ? e[t]() :
|
|
71
|
+
return (i = e[t]) && G(i) ? e[t]() : Pi(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
72
72
|
}, te = function(e, t) {
|
|
73
73
|
return (e = e.split(",")).forEach(t) || e;
|
|
74
74
|
}, V = function(e) {
|
|
@@ -269,16 +269,16 @@ var he = {
|
|
|
269
269
|
edges: 0.5,
|
|
270
270
|
end: 1
|
|
271
271
|
}[n] || 0 : !o && l && (h = n[0], u = n[1]), function(p, m, f) {
|
|
272
|
-
var d = (f || t).length, g = s[d], _, y, x, v, b,
|
|
272
|
+
var d = (f || t).length, g = s[d], _, y, x, v, b, C, E, P, w;
|
|
273
273
|
if (!g) {
|
|
274
274
|
if (w = t.grid === "auto" ? 0 : (t.grid || [1, fe])[1], !w) {
|
|
275
275
|
for (E = -fe; E < (E = f[w++].getBoundingClientRect().left) && w < d; )
|
|
276
276
|
;
|
|
277
277
|
w < d && w--;
|
|
278
278
|
}
|
|
279
|
-
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0,
|
|
280
|
-
x =
|
|
281
|
-
n === "random" && Kn(g), g.max = E -
|
|
279
|
+
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, P = fe, C = 0; C < d; C++)
|
|
280
|
+
x = C % w - _, v = y - (C / w | 0), g[C] = b = c ? Math.abs(c === "y" ? v : x) : Dn(x * x + v * v), b > E && (E = b), b < P && (P = b);
|
|
281
|
+
n === "random" && Kn(g), g.max = E - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = W(t.amount || t.each) || 0, i = i && d < 0 ? sr(i) : i;
|
|
282
282
|
}
|
|
283
283
|
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
284
284
|
};
|
|
@@ -389,7 +389,7 @@ var he = {
|
|
|
389
389
|
render: Fi,
|
|
390
390
|
add: Oi,
|
|
391
391
|
kill: As,
|
|
392
|
-
modifier:
|
|
392
|
+
modifier: Ps,
|
|
393
393
|
rawVars: 0
|
|
394
394
|
}, s = {
|
|
395
395
|
targetTest: 0,
|
|
@@ -475,12 +475,12 @@ var he = {
|
|
|
475
475
|
var t = e.join(" "), i;
|
|
476
476
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
477
477
|
return i = us.test(t), e[1] = Ji(e[1], i), e[0] = Ji(e[0], i, nr(e[1])), !0;
|
|
478
|
-
},
|
|
478
|
+
}, Ct, oe = (function() {
|
|
479
479
|
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
|
|
480
|
-
var _ = a() - n, y = g === !0, x, v, b,
|
|
481
|
-
if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (
|
|
480
|
+
var _ = a() - n, y = g === !0, x, v, b, C;
|
|
481
|
+
if ((_ > e || _ < 0) && (i += _ - t), n += _, b = n - i, x = b - s, (x > 0 || y) && (C = ++u.frame, p = b - u.time * 1e3, u.time = b = b / 1e3, s += x + (x >= r ? 4 : r - x), v = 1), y || (l = c(d)), v)
|
|
482
482
|
for (m = 0; m < o.length; m++)
|
|
483
|
-
o[m](b, p,
|
|
483
|
+
o[m](b, p, C, g);
|
|
484
484
|
};
|
|
485
485
|
return u = {
|
|
486
486
|
time: 0,
|
|
@@ -494,10 +494,10 @@ var he = {
|
|
|
494
494
|
wake: function() {
|
|
495
495
|
kn && (!hi && Ai() && (ye = hi = window, Si = ye.document || {}, ce.gsap = re, (ye.gsapVersions || (ye.gsapVersions = [])).push(re.version), Un(Nt || ye.GreenSockGlobals || !ye.gsap && ye || {}), er.forEach(tr)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
|
|
496
496
|
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
497
|
-
},
|
|
497
|
+
}, Ct = 1, f(2));
|
|
498
498
|
},
|
|
499
499
|
sleep: function() {
|
|
500
|
-
(h ? cancelAnimationFrame : clearTimeout)(l),
|
|
500
|
+
(h ? cancelAnimationFrame : clearTimeout)(l), Ct = 0, c = Et;
|
|
501
501
|
},
|
|
502
502
|
lagSmoothing: function(g, _) {
|
|
503
503
|
e = g || 1 / 0, t = Math.min(_ || 33, e);
|
|
@@ -506,8 +506,8 @@ var he = {
|
|
|
506
506
|
r = 1e3 / (g || 240), s = u.time * 1e3 + r;
|
|
507
507
|
},
|
|
508
508
|
add: function(g, _, y) {
|
|
509
|
-
var x = _ ? function(v, b,
|
|
510
|
-
g(v, b,
|
|
509
|
+
var x = _ ? function(v, b, C, E) {
|
|
510
|
+
g(v, b, C, E), u.remove(x);
|
|
511
511
|
} : g;
|
|
512
512
|
return u.remove(g), o[y ? "unshift" : "push"](x), ht(), x;
|
|
513
513
|
},
|
|
@@ -517,7 +517,7 @@ var he = {
|
|
|
517
517
|
_listeners: o
|
|
518
518
|
}, u;
|
|
519
519
|
})(), ht = function() {
|
|
520
|
-
return !
|
|
520
|
+
return !Ct && oe.wake();
|
|
521
521
|
}, M = {}, ds = /^[\d.\-M][\d.\-,\s]/, ps = /["']/g, fs = function(e) {
|
|
522
522
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
|
|
523
523
|
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(ps, "").trim() : +c, n = l.substr(o + 1).trim();
|
|
@@ -624,9 +624,9 @@ te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", functio
|
|
|
624
624
|
});
|
|
625
625
|
var lr = function(e, t) {
|
|
626
626
|
this.id = Gr++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Ui;
|
|
627
|
-
},
|
|
627
|
+
}, Pt = /* @__PURE__ */ (function() {
|
|
628
628
|
function a(t) {
|
|
629
|
-
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)),
|
|
629
|
+
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)), Ct || oe.wake();
|
|
630
630
|
}
|
|
631
631
|
var e = a.prototype;
|
|
632
632
|
return e.delay = function(i) {
|
|
@@ -728,7 +728,7 @@ var lr = function(e, t) {
|
|
|
728
728
|
mt(this);
|
|
729
729
|
}, a;
|
|
730
730
|
})();
|
|
731
|
-
ue(
|
|
731
|
+
ue(Pt.prototype, {
|
|
732
732
|
_time: 0,
|
|
733
733
|
_start: 0,
|
|
734
734
|
_end: 0,
|
|
@@ -752,7 +752,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
752
752
|
Mn(e, a);
|
|
753
753
|
function e(i, n) {
|
|
754
754
|
var r;
|
|
755
|
-
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), N && xe(i.parent || N,
|
|
755
|
+
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), N && xe(i.parent || N, Ce(r), n), i.reversed && r.reverse(), i.paused && r.paused(!0), i.scrollTrigger && jn(Ce(r), i.scrollTrigger), r;
|
|
756
756
|
}
|
|
757
757
|
var t = e.prototype;
|
|
758
758
|
return t.to = function(n, r, s) {
|
|
@@ -772,16 +772,16 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
772
772
|
}, t.staggerFromTo = function(n, r, s, o, l, c, h, u) {
|
|
773
773
|
return o.startAt = s, yt(o).immediateRender = ee(o.immediateRender), this.staggerTo(n, r, o, l, c, h, u);
|
|
774
774
|
}, t.render = function(n, r, s) {
|
|
775
|
-
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, v, b,
|
|
775
|
+
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, c = this._dur, h = n <= 0 ? 0 : j(n), u = this._zTime < 0 != n < 0 && (this._initted || !c), p, m, f, d, g, _, y, x, v, b, C, E;
|
|
776
776
|
if (this !== N && h > l && n >= 0 && (h = l), h !== this._tTime || s || u) {
|
|
777
777
|
if (o !== this._time && c && (h += this._time - o, n += this._time - o), p = h, v = this._start, x = this._ts, _ = !x, u && (c || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
|
|
778
|
-
if (
|
|
778
|
+
if (C = this._yoyo, g = c + this._rDelay, this._repeat < -1 && n < 0)
|
|
779
779
|
return this.totalTime(g * 100 + n, r, s);
|
|
780
|
-
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d),
|
|
781
|
-
var
|
|
782
|
-
if (d < b && (
|
|
780
|
+
if (p = j(h % g), h === l ? (d = this._repeat, p = c) : (b = j(h / g), d = ~~b, d && d === b && (p = c, d--), p > c && (p = c)), b = ot(this._tTime, g), !o && this._tTime && b !== d && this._tTime - b * g - this._dur <= 0 && (b = d), C && d & 1 && (p = c - p, E = 1), d !== b && !this._lock) {
|
|
781
|
+
var P = C && b & 1, w = P === (C && d & 1);
|
|
782
|
+
if (d < b && (P = !P), o = P ? 0 : h % c ? c : h, this._lock = 1, this.render(o || (E ? 0 : j(d * g)), r, !c)._lock = 0, this._tTime = h, !r && this.parent && le(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
783
783
|
return this;
|
|
784
|
-
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o =
|
|
784
|
+
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = P ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
785
785
|
return this;
|
|
786
786
|
ar(this, E);
|
|
787
787
|
}
|
|
@@ -821,7 +821,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
821
821
|
return this;
|
|
822
822
|
}, t.add = function(n, r) {
|
|
823
823
|
var s = this;
|
|
824
|
-
if (Ae(r) || (r = pe(this, r, n)), !(n instanceof
|
|
824
|
+
if (Ae(r) || (r = pe(this, r, n)), !(n instanceof Pt)) {
|
|
825
825
|
if (X(n))
|
|
826
826
|
return n.forEach(function(o) {
|
|
827
827
|
return s.add(o, r);
|
|
@@ -937,7 +937,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
}, e;
|
|
940
|
-
})(
|
|
940
|
+
})(Pt);
|
|
941
941
|
ue(q.prototype, {
|
|
942
942
|
_lock: 0,
|
|
943
943
|
_hasPause: 0,
|
|
@@ -959,7 +959,7 @@ var _s = function(e, t, i, n, r, s, o) {
|
|
|
959
959
|
G(n) && (n = n(r || 0, e, s));
|
|
960
960
|
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? Es : dr : ki, f;
|
|
961
961
|
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (W(p) || 0), (f || f === 0) && (n = f))), !h || p !== n || gi)
|
|
962
|
-
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ?
|
|
962
|
+
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Cs : pr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Ti(t, n), _s.call(this, e, t, p, n, m, l || he.stringFilter, c));
|
|
963
963
|
}, ys = function(e, t, i, n, r) {
|
|
964
964
|
if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || X(e) || Rn(e))
|
|
965
965
|
return Z(e) ? bt(e, r, t, i, n) : e;
|
|
@@ -974,7 +974,7 @@ var _s = function(e, t, i, n, r, s, o) {
|
|
|
974
974
|
c[o._props[h]] = l;
|
|
975
975
|
return o;
|
|
976
976
|
}, Te, gi, Ii = function a(e, t, i) {
|
|
977
|
-
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !
|
|
977
|
+
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Ci, v = e.timeline, b, C, E, P, w, T, D, S, R, L, B, F, U;
|
|
978
978
|
if (v && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? sr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !v && !!n.runBackwards, !v || p && !n.stagger) {
|
|
979
979
|
if (S = g[0] ? He(g[0]).harness : 0, F = S && n[S.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : Yr), d._lazy = 0), s) {
|
|
980
980
|
if (Ie(e._startAt = H.set(g, ue({
|
|
@@ -1009,13 +1009,13 @@ var _s = function(e, t, i, n, r, s, o) {
|
|
|
1009
1009
|
else if (!t)
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
|
-
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f,
|
|
1013
|
-
if (w = g[
|
|
1014
|
-
L[Q] =
|
|
1012
|
+
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, C = 0; C < g.length; C++) {
|
|
1013
|
+
if (w = g[C], D = w._gsap || Ri(g)[C]._gsap, e._ptLookup[C] = L = {}, ci[D.id] && Le.length && $t(), B = y === g ? C : y.indexOf(w), S && (R = new S()).init(w, F || b, e, B, y) !== !1 && (e._pt = P = new ie(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
|
|
1014
|
+
L[Q] = P;
|
|
1015
1015
|
}), R.priority && (T = 1)), !S || F)
|
|
1016
1016
|
for (E in b)
|
|
1017
|
-
ae[E] && (R = hr(E, b, e, B, w, y)) ? R.priority && (T = 1) : L[E] =
|
|
1018
|
-
e._op && e._op[
|
|
1017
|
+
ae[E] && (R = hr(E, b, e, B, w, y)) ? R.priority && (T = 1) : L[E] = P = Oi.call(e, w, E, "get", b[E], B, y, 0, n.stringFilter);
|
|
1018
|
+
e._op && e._op[C] && e.kill(w, e._op[C]), x && e._pt && (Te = e, N.killTweensOf(w, L, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[D.id] = 1);
|
|
1019
1019
|
}
|
|
1020
1020
|
T && mr(e), e._onInit && e._onInit(e);
|
|
1021
1021
|
}
|
|
@@ -1071,18 +1071,18 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1071
1071
|
function e(i, n, r, s) {
|
|
1072
1072
|
var o;
|
|
1073
1073
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
|
|
1074
|
-
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (X(i) || Rn(i) ? Ae(i[0]) : "length" in n) ? [i] : me(i), v, b,
|
|
1074
|
+
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (X(i) || Rn(i) ? Ae(i[0]) : "length" in n) ? [i] : me(i), v, b, C, E, P, w, T, D;
|
|
1075
1075
|
if (o._targets = x.length ? Ri(x) : vt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Dt(c) || Dt(h)) {
|
|
1076
1076
|
if (n = o.vars, v = o.timeline = new q({
|
|
1077
1077
|
data: "nested",
|
|
1078
1078
|
defaults: d || {},
|
|
1079
1079
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1080
|
-
}), v.kill(), v.parent = v._dp =
|
|
1080
|
+
}), v.kill(), v.parent = v._dp = Ce(o), v._start = 0, p || Dt(c) || Dt(h)) {
|
|
1081
1081
|
if (E = x.length, T = p && Wn(p), Ee(p))
|
|
1082
|
-
for (
|
|
1083
|
-
~cr.indexOf(
|
|
1082
|
+
for (P in p)
|
|
1083
|
+
~cr.indexOf(P) && (D || (D = {}), D[P] = p[P]);
|
|
1084
1084
|
for (b = 0; b < E; b++)
|
|
1085
|
-
|
|
1085
|
+
C = Bt(n, ur), C.stagger = 0, _ && (C.yoyoEase = _), D && at(C, D), w = x[b], C.duration = +bt(c, Ce(o), b, w, x), C.delay = (+bt(h, Ce(o), b, w, x) || 0) - o._delay, !p && E === 1 && C.delay && (o._delay = h = C.delay, o._start += h, C.delay = 0), v.to(w, C, T ? T(b, w, x) : 0), v._ease = M.none;
|
|
1086
1086
|
v.duration() ? c = h = 0 : o.timeline = 0;
|
|
1087
1087
|
} else if (f) {
|
|
1088
1088
|
yt(ue(v.vars.defaults, {
|
|
@@ -1094,17 +1094,17 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1094
1094
|
return v.to(x, F, ">");
|
|
1095
1095
|
}), v.duration();
|
|
1096
1096
|
else {
|
|
1097
|
-
|
|
1098
|
-
for (
|
|
1099
|
-
|
|
1100
|
-
for (
|
|
1101
|
-
for (R = P
|
|
1097
|
+
C = {};
|
|
1098
|
+
for (P in f)
|
|
1099
|
+
P === "ease" || P === "easeEach" || vs(P, f[P], C, f.easeEach);
|
|
1100
|
+
for (P in C)
|
|
1101
|
+
for (R = C[P].sort(function(F, U) {
|
|
1102
1102
|
return F.t - U.t;
|
|
1103
1103
|
}), S = 0, b = 0; b < R.length; b++)
|
|
1104
1104
|
L = R[b], B = {
|
|
1105
1105
|
ease: L.e,
|
|
1106
1106
|
duration: (L.t - (b ? R[b - 1].t : 0)) / 100 * c
|
|
1107
|
-
}, B[
|
|
1107
|
+
}, B[P] = L.v, v.to(x, B, S), S += B.duration;
|
|
1108
1108
|
v.duration() < c && v.to({}, {
|
|
1109
1109
|
duration: c - v.duration()
|
|
1110
1110
|
});
|
|
@@ -1113,7 +1113,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1113
1113
|
c || o.duration(c = v.duration());
|
|
1114
1114
|
} else
|
|
1115
1115
|
o.timeline = 0;
|
|
1116
|
-
return m === !0 && !
|
|
1116
|
+
return m === !0 && !Ci && (Te = Ce(o), N.killTweensOf(x), Te = 0), xe(y, Ce(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && Qr(Ce(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && jn(Ce(o), g), o;
|
|
1117
1117
|
}
|
|
1118
1118
|
var t = e.prototype;
|
|
1119
1119
|
return t.render = function(n, r, s) {
|
|
@@ -1148,7 +1148,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1148
1148
|
}, t.invalidate = function(n) {
|
|
1149
1149
|
return (!n || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(n), a.prototype.invalidate.call(this, n);
|
|
1150
1150
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1151
|
-
|
|
1151
|
+
Ct || oe.wake(), this._ts || this.play();
|
|
1152
1152
|
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
|
|
1153
1153
|
return this._initted || Ii(this, c), h = this._ease(c / this._dur), xs(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Vn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1154
1154
|
}, t.kill = function(n, r) {
|
|
@@ -1193,7 +1193,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1193
1193
|
}, e.killTweensOf = function(n, r, s) {
|
|
1194
1194
|
return N.killTweensOf(n, r, s);
|
|
1195
1195
|
}, e;
|
|
1196
|
-
})(
|
|
1196
|
+
})(Pt);
|
|
1197
1197
|
ue(H.prototype, {
|
|
1198
1198
|
_targets: [],
|
|
1199
1199
|
_lazy: 0,
|
|
@@ -1216,10 +1216,10 @@ var ki = function(e, t, i) {
|
|
|
1216
1216
|
}, ws = function(e, t, i) {
|
|
1217
1217
|
return e.setAttribute(t, i);
|
|
1218
1218
|
}, Ui = function(e, t) {
|
|
1219
|
-
return G(e[t]) ? dr :
|
|
1219
|
+
return G(e[t]) ? dr : Pi(e[t]) && e.setAttribute ? ws : ki;
|
|
1220
1220
|
}, pr = function(e, t) {
|
|
1221
1221
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1222
|
-
},
|
|
1222
|
+
}, Cs = function(e, t) {
|
|
1223
1223
|
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1224
1224
|
}, fr = function(e, t) {
|
|
1225
1225
|
var i = t._pt, n = "";
|
|
@@ -1236,7 +1236,7 @@ var ki = function(e, t, i) {
|
|
|
1236
1236
|
}, Fi = function(e, t) {
|
|
1237
1237
|
for (var i = t._pt; i; )
|
|
1238
1238
|
i.r(e, i.d), i = i._next;
|
|
1239
|
-
},
|
|
1239
|
+
}, Ps = function(e, t, i, n) {
|
|
1240
1240
|
for (var r = this._pt, s; r; )
|
|
1241
1241
|
s = r._next, r.p === n && r.modifier(e, t, i), r = s;
|
|
1242
1242
|
}, As = function(e) {
|
|
@@ -1498,7 +1498,7 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ms = 0, ei = function(e) {
|
|
|
1498
1498
|
globals: Fn,
|
|
1499
1499
|
Tween: H,
|
|
1500
1500
|
Timeline: q,
|
|
1501
|
-
Animation:
|
|
1501
|
+
Animation: Pt,
|
|
1502
1502
|
getCache: He,
|
|
1503
1503
|
_removeLinkedListItem: Yt,
|
|
1504
1504
|
reverting: function() {
|
|
@@ -1508,7 +1508,7 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ms = 0, ei = function(e) {
|
|
|
1508
1508
|
return e && z && (z.data.push(e), e._ctx = z), z;
|
|
1509
1509
|
},
|
|
1510
1510
|
suppressOverwrites: function(e) {
|
|
1511
|
-
return
|
|
1511
|
+
return Ci = e;
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
};
|
|
@@ -1628,8 +1628,8 @@ var tn, Me, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1628
1628
|
if (e in Se && r) {
|
|
1629
1629
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
1630
1630
|
e = be[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
|
|
1631
|
-
return i.tfm[o] =
|
|
1632
|
-
}) : this.tfm[e] = s.x ? s[e] :
|
|
1631
|
+
return i.tfm[o] = Pe(n, o);
|
|
1632
|
+
}) : this.tfm[e] = s.x ? s[e] : Pe(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
|
|
1633
1633
|
else
|
|
1634
1634
|
return be.transform.split(",").forEach(function(o) {
|
|
1635
1635
|
return a.call(i, o, t);
|
|
@@ -1733,7 +1733,7 @@ var tn, Me, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1733
1733
|
} else
|
|
1734
1734
|
(m || s === "%") && !Zs[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
|
|
1735
1735
|
return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
|
|
1736
|
-
},
|
|
1736
|
+
}, Pe = function(e, t, i, n) {
|
|
1737
1737
|
var r;
|
|
1738
1738
|
return zi || bi(), t in be && t !== "transform" && (t = be[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || Nn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? ke(e, t, r, i) + i : r;
|
|
1739
1739
|
}, Ks = function(e, t, i, n) {
|
|
@@ -1845,23 +1845,23 @@ var tn, Me, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1845
1845
|
return 1;
|
|
1846
1846
|
}
|
|
1847
1847
|
*/
|
|
1848
|
-
}, At = [1, 0, 0, 1, 0, 0],
|
|
1848
|
+
}, At = [1, 0, 0, 1, 0, 0], Cr = {}, Pr = function(e) {
|
|
1849
1849
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
1850
1850
|
}, cn = function(e) {
|
|
1851
1851
|
var t = ge(e, $);
|
|
1852
|
-
return
|
|
1852
|
+
return Pr(t) ? At : t.substr(7).match(Ln).map(V);
|
|
1853
1853
|
}, Bi = function(e, t) {
|
|
1854
1854
|
var i = e._gsap || He(e), n = e.style, r = cn(e), s, o, l, c;
|
|
1855
1855
|
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = cn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
1856
1856
|
}, vi = function(e, t, i, n, r, s) {
|
|
1857
|
-
var o = e._gsap, l = r || Bi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0,
|
|
1858
|
-
i ? l !== At && (E = m * g - f * d) && (
|
|
1857
|
+
var o = e._gsap, l = r || Bi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, C, E, P, w;
|
|
1858
|
+
i ? l !== At && (E = m * g - f * d) && (P = v * (g / E) + b * (-d / E) + (d * y - g * _) / E, w = v * (-f / E) + b * (m / E) - (m * y - f * _) / E, v = P, b = w) : (C = Er(e), v = C.x + (~x[0].indexOf("%") ? v / 100 * C.width : v), b = C.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * C.height : b)), n || n !== !1 && o.smooth ? (_ = v - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = v, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, v), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", v + " " + b);
|
|
1859
1859
|
}, St = function(e, t) {
|
|
1860
1860
|
var i = e._gsap || new lr(e);
|
|
1861
1861
|
if ("x" in i && !t && !i.uncache)
|
|
1862
1862
|
return i;
|
|
1863
|
-
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b,
|
|
1864
|
-
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), E = Bi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), vi(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, E)), b = i.xOrigin || 0,
|
|
1863
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b, C, E, P, w, T, D, S, R, L, B, F, U, Q, ut, dt, pt, Fe, ji, we, ze;
|
|
1864
|
+
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), E = Bi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), vi(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, E)), b = i.xOrigin || 0, C = i.yOrigin || 0, E !== At && (D = E[0], S = E[1], R = E[2], L = E[3], h = B = E[4], u = F = E[5], E.length === 6 ? (m = Math.sqrt(D * D + S * S), f = Math.sqrt(L * L + R * R), d = D || S ? Xe(S, D) * Be : 0, y = R || L ? Xe(R, L) * Be + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * D + C * R), u -= C - (b * S + C * L))) : (ze = E[6], ji = E[7], dt = E[8], pt = E[9], Fe = E[10], we = E[11], h = E[12], u = E[13], p = E[14], P = Xe(ze, Fe), g = P * Be, P && (w = Math.cos(-P), T = Math.sin(-P), U = B * w + dt * T, Q = F * w + pt * T, ut = ze * w + Fe * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Fe = ze * -T + Fe * w, we = ji * -T + we * w, B = U, F = Q, ze = ut), P = Xe(-R, Fe), _ = P * Be, P && (w = Math.cos(-P), T = Math.sin(-P), U = D * w - dt * T, Q = S * w - pt * T, ut = R * w - Fe * T, we = L * T + we * w, D = U, S = Q, R = ut), P = Xe(S, D), d = P * Be, P && (w = Math.cos(P), T = Math.sin(P), U = D * w + S * T, Q = B * w + F * T, S = S * w - D * T, F = F * w - B * T, D = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(D * D + S * S + R * R)), f = V(Math.sqrt(F * F + ze * ze)), P = Xe(B, F), y = Math.abs(P) > 2e-4 ? P * Be : 0, v = we ? 1 / (we < 0 ? -we : we) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Pr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = v + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? Qs : vr ? Ar : qs, i.uncache = 0, i;
|
|
1865
1865
|
}, jt = function(e) {
|
|
1866
1866
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
1867
1867
|
}, ii = function(e, t, i) {
|
|
@@ -1872,13 +1872,13 @@ var tn, Me, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1872
1872
|
}, Ne = "0deg", ft = "0px", $e = ") ", Ar = function(e, t) {
|
|
1873
1873
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, v = "", b = _ === "auto" && e && e !== 1 || _ === !0;
|
|
1874
1874
|
if (x && (u !== Ne || h !== Ne)) {
|
|
1875
|
-
var
|
|
1876
|
-
|
|
1875
|
+
var C = parseFloat(h) * rt, E = Math.sin(C), P = Math.cos(C), w;
|
|
1876
|
+
C = parseFloat(u) * rt, w = Math.cos(C), s = ii(y, s, E * w * -x), o = ii(y, o, -Math.sin(C) * -x), l = ii(y, l, P * w * -x + x);
|
|
1877
1877
|
}
|
|
1878
1878
|
g !== ft && (v += "perspective(" + g + $e), (n || r) && (v += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (v += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), c !== Ne && (v += "rotate(" + c + $e), h !== Ne && (v += "rotateY(" + h + $e), u !== Ne && (v += "rotateX(" + u + $e), (p !== Ne || m !== Ne) && (v += "skew(" + p + ", " + m + $e), (f !== 1 || d !== 1) && (v += "scale(" + f + ", " + d + $e), y.style[$] = v || "translate(0, 0)";
|
|
1879
1879
|
}, Qs = function(e, t) {
|
|
1880
|
-
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), v = parseFloat(o), b,
|
|
1881
|
-
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u,
|
|
1880
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), v = parseFloat(o), b, C, E, P, w;
|
|
1881
|
+
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, C = Math.sin(l) * u, E = Math.sin(l - c) * -p, P = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), E *= w, P *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, C *= w)), b = V(b), C = V(C), E = V(E), P = V(P)) : (b = u, P = p, C = E = 0), (x && !~(s + "").indexOf("px") || v && !~(o + "").indexOf("px")) && (x = ke(m, "x", s, "px"), v = ke(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * E) + g), v = V(v + d - (f * C + d * P) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), v = V(v + r / 100 * w.height)), w = "matrix(" + b + "," + C + "," + E + "," + P + "," + x + "," + v + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
|
|
1882
1882
|
}, Js = function(e, t, i, n, r) {
|
|
1883
1883
|
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Be : 1), c = l - n, h = n + c + "deg", u, p;
|
|
1884
1884
|
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * rn) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * rn) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Us), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
@@ -1901,7 +1901,7 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
1901
1901
|
var p, m;
|
|
1902
1902
|
if (arguments.length < 4)
|
|
1903
1903
|
return p = s.map(function(f) {
|
|
1904
|
-
return
|
|
1904
|
+
return Pe(o, f, c);
|
|
1905
1905
|
}), m = p.join(" "), m.split(p[0]).length === 5 ? p[0] : m;
|
|
1906
1906
|
p = (h + "").split(" "), m = {}, s.forEach(function(f, d) {
|
|
1907
1907
|
return m[f] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
@@ -1915,25 +1915,25 @@ var Sr = {
|
|
|
1915
1915
|
return e.style && e.nodeType;
|
|
1916
1916
|
},
|
|
1917
1917
|
init: function(e, t, i, n, r) {
|
|
1918
|
-
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, v, b,
|
|
1919
|
-
zi || bi(), this.styles = this.styles || br(e),
|
|
1918
|
+
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, v, b, C, E, P;
|
|
1919
|
+
zi || bi(), this.styles = this.styles || br(e), P = this.styles.props, this.tween = i;
|
|
1920
1920
|
for (d in t)
|
|
1921
1921
|
if (d !== "autoRound" && (h = t[d], !(ae[d] && hr(d, t, i, n, e, r)))) {
|
|
1922
1922
|
if (m = typeof h, f = Ht[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
|
|
1923
1923
|
f(this, e, d, h, i) && (E = 1);
|
|
1924
1924
|
else if (d.substr(0, 2) === "--")
|
|
1925
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = W(c), _ = W(h)), _ ? g !== _ && (c = ke(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d),
|
|
1925
|
+
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = W(c), _ = W(h)), _ ? g !== _ && (c = ke(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), P.push(d, 0, o[d]);
|
|
1926
1926
|
else if (m !== "undefined") {
|
|
1927
|
-
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), W(c + "") || c === "auto" || (c += he.units[d] || W(
|
|
1928
|
-
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform || St(e, t.parseTransform),
|
|
1927
|
+
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), W(c + "") || c === "auto" || (c += he.units[d] || W(Pe(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Pe(e, d))) : c = Pe(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in be && (d === "autoAlpha" && (p === 1 && Pe(e, "visibility") === "hidden" && u && (p = 0), P.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = be[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Se, x) {
|
|
1928
|
+
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform || St(e, t.parseTransform), C = t.smoothOrigin !== !1 && b.smooth, v = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), v.dep = 1), d === "scale")
|
|
1929
1929
|
this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
1930
1930
|
else if (d === "transformOrigin") {
|
|
1931
|
-
|
|
1931
|
+
P.push(ne, 0, o[ne]), h = Ws(h), b.svg ? vi(e, h, 0, C, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
|
|
1932
1932
|
continue;
|
|
1933
1933
|
} else if (d === "svgOrigin") {
|
|
1934
|
-
vi(e, h, 1,
|
|
1934
|
+
vi(e, h, 1, C, 0, this);
|
|
1935
1935
|
continue;
|
|
1936
|
-
} else if (d in
|
|
1936
|
+
} else if (d in Cr) {
|
|
1937
1937
|
Js(this, b, d, p, y ? it(p, y + h) : h);
|
|
1938
1938
|
continue;
|
|
1939
1939
|
} else if (d === "smoothOrigin") {
|
|
@@ -1957,7 +1957,7 @@ var Sr = {
|
|
|
1957
1957
|
Ti(d, h);
|
|
1958
1958
|
continue;
|
|
1959
1959
|
}
|
|
1960
|
-
x || (d in o ?
|
|
1960
|
+
x || (d in o ? P.push(d, 0, o[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, c || e[d])), s.push(d);
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
1963
|
E && mr(this);
|
|
@@ -1969,11 +1969,11 @@ var Sr = {
|
|
|
1969
1969
|
else
|
|
1970
1970
|
t.styles.revert();
|
|
1971
1971
|
},
|
|
1972
|
-
get:
|
|
1972
|
+
get: Pe,
|
|
1973
1973
|
aliases: be,
|
|
1974
1974
|
getSetter: function(e, t, i) {
|
|
1975
1975
|
var n = be[t];
|
|
1976
|
-
return n && n.indexOf(",") < 0 && (t = n), t in Se && t !== ne && (e._gsap.x ||
|
|
1976
|
+
return n && n.indexOf(",") < 0 && (t = n), t in Se && t !== ne && (e._gsap.x || Pe(e, "x")) ? i && nn === i ? t === "scale" ? Gs : Bs : (nn = i || {}) && (t === "scale" ? Vs : Hs) : e.style && !Pi(e.style[t]) ? Ns : ~t.indexOf("-") ? $s : Ui(e, t);
|
|
1977
1977
|
},
|
|
1978
1978
|
core: {
|
|
1979
1979
|
_removeProperty: Ke,
|
|
@@ -1987,7 +1987,7 @@ re.core.getStyleSaver = br;
|
|
|
1987
1987
|
Se[r] = 1;
|
|
1988
1988
|
});
|
|
1989
1989
|
te(e, function(r) {
|
|
1990
|
-
he.units[r] = "deg",
|
|
1990
|
+
he.units[r] = "deg", Cr[r] = 1;
|
|
1991
1991
|
}), be[n[13]] = a + "," + e, te(i, function(r) {
|
|
1992
1992
|
var s = r.split(":");
|
|
1993
1993
|
be[s[1]] = n[s[0]];
|
|
@@ -3269,7 +3269,7 @@ class fa extends Ur {
|
|
|
3269
3269
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
3270
3270
|
*/
|
|
3271
3271
|
constructor(e, t = null) {
|
|
3272
|
-
super(e, t), this.state = O.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ga.bind(this), this._onPointerDown = ma.bind(this), this._onPointerUp = _a.bind(this), this._onContextMenu =
|
|
3272
|
+
super(e, t), this.state = O.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ga.bind(this), this._onPointerDown = ma.bind(this), this._onPointerUp = _a.bind(this), this._onContextMenu = Ca.bind(this), this._onMouseWheel = ba.bind(this), this._onKeyDown = va.bind(this), this._onTouchStart = Ea.bind(this), this._onTouchMove = wa.bind(this), this._onMouseDown = ya.bind(this), this._onMouseMove = xa.bind(this), this._interceptControlDown = Pa.bind(this), this._interceptControlUp = Aa.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
3273
3273
|
}
|
|
3274
3274
|
connect(e) {
|
|
3275
3275
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -3696,10 +3696,10 @@ function wa(a) {
|
|
|
3696
3696
|
this.state = O.NONE;
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
|
-
function
|
|
3699
|
+
function Ca(a) {
|
|
3700
3700
|
this.enabled !== !1 && a.preventDefault();
|
|
3701
3701
|
}
|
|
3702
|
-
function
|
|
3702
|
+
function Pa(a) {
|
|
3703
3703
|
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
3704
3704
|
}
|
|
3705
3705
|
function Aa(a) {
|
|
@@ -4205,19 +4205,29 @@ class Ua {
|
|
|
4205
4205
|
countries = [];
|
|
4206
4206
|
loaded = !1;
|
|
4207
4207
|
statsMap;
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4208
|
+
topologyConfig;
|
|
4209
|
+
constructor(e) {
|
|
4210
|
+
this.canvas = document.createElement("canvas"), this.canvas.width = Lt, this.canvas.height = Ot, this.ctx = this.canvas.getContext("2d"), this.topologyConfig = {
|
|
4211
|
+
url: e?.url || "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json",
|
|
4212
|
+
objectName: e?.objectName || "countries",
|
|
4213
|
+
disableNormalization: e?.disableNormalization || !1
|
|
4214
|
+
}, this.statsMap = /* @__PURE__ */ new Map(), Mr.forEach((t) => {
|
|
4215
|
+
this.statsMap.set(t.id, t);
|
|
4211
4216
|
}), this.loadCountries();
|
|
4212
4217
|
}
|
|
4213
4218
|
async loadCountries() {
|
|
4214
4219
|
try {
|
|
4215
|
-
const t = await (await fetch(
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4220
|
+
const t = await (await fetch(this.topologyConfig.url)).json(), i = t.objects[this.topologyConfig.objectName];
|
|
4221
|
+
if (!i)
|
|
4222
|
+
throw new Error(
|
|
4223
|
+
`Topology object '${this.topologyConfig.objectName}' not found in ${this.topologyConfig.url}`
|
|
4224
|
+
);
|
|
4225
|
+
const n = Da(t, i);
|
|
4226
|
+
this.countries = n.features, this.loaded = !0, console.log(
|
|
4227
|
+
`Loaded ${this.countries.length} boundaries from ${this.topologyConfig.objectName}`
|
|
4228
|
+
);
|
|
4219
4229
|
} catch (e) {
|
|
4220
|
-
console.error("Failed to load
|
|
4230
|
+
console.error("Failed to load map boundaries:", e);
|
|
4221
4231
|
}
|
|
4222
4232
|
}
|
|
4223
4233
|
/**
|
|
@@ -4303,14 +4313,14 @@ class Ua {
|
|
|
4303
4313
|
renderCustomTexture(e, t, i) {
|
|
4304
4314
|
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Lt, Ot), !this.loaded)
|
|
4305
4315
|
return this.canvas;
|
|
4306
|
-
const n = ka(e);
|
|
4316
|
+
const n = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e : ka(e);
|
|
4307
4317
|
return this.countries.forEach((r) => {
|
|
4308
4318
|
const s = n[r.id];
|
|
4309
4319
|
if (s !== void 0) {
|
|
4310
|
-
const o = Math.max(
|
|
4311
|
-
|
|
4312
|
-
(s - i[0]) / (i[1] - i[0])
|
|
4313
|
-
)
|
|
4320
|
+
const o = Math.max(
|
|
4321
|
+
0,
|
|
4322
|
+
Math.min(1, (s - i[0]) / (i[1] - i[0]))
|
|
4323
|
+
), l = this.interpolateColor(t, o);
|
|
4314
4324
|
this.ctx.fillStyle = l;
|
|
4315
4325
|
} else
|
|
4316
4326
|
this.ctx.fillStyle = "#2a2a2a";
|
|
@@ -4904,13 +4914,13 @@ var si = 12, vn = 5003, Za = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047,
|
|
|
4904
4914
|
function Ka(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array(vn), o = new Int32Array(vn)) {
|
|
4905
4915
|
let l = s.length, c = Math.max(2, i);
|
|
4906
4916
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4907
|
-
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, v = 0, b = t[0],
|
|
4908
|
-
for (let w = l; w < 65536; w *= 2) ++
|
|
4909
|
-
|
|
4917
|
+
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, v = 0, b = t[0], C = 0;
|
|
4918
|
+
for (let w = l; w < 65536; w *= 2) ++C;
|
|
4919
|
+
C = 8 - C, n.writeByte(c), P(_);
|
|
4910
4920
|
let E = t.length;
|
|
4911
4921
|
for (let w = 1; w < E; w++)
|
|
4912
4922
|
e: {
|
|
4913
|
-
let T = t[w], D = (T << si) + b, S = T <<
|
|
4923
|
+
let T = t[w], D = (T << si) + b, S = T << C ^ b;
|
|
4914
4924
|
if (s[S] === D) {
|
|
4915
4925
|
b = o[S];
|
|
4916
4926
|
break e;
|
|
@@ -4920,10 +4930,10 @@ function Ka(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
4920
4930
|
b = o[S];
|
|
4921
4931
|
break e;
|
|
4922
4932
|
}
|
|
4923
|
-
|
|
4933
|
+
P(b), b = T, x < 1 << si ? (o[S] = x++, s[S] = D) : (s.fill(-1), x = _ + 2, f = !0, P(_));
|
|
4924
4934
|
}
|
|
4925
|
-
return
|
|
4926
|
-
function
|
|
4935
|
+
return P(b), P(y), n.writeByte(0), n.bytesView();
|
|
4936
|
+
function P(w) {
|
|
4927
4937
|
for (h &= Za[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
4928
4938
|
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
|
|
4929
4939
|
for (; u > 0; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
@@ -5002,15 +5012,15 @@ function qa(a, e, t = {}) {
|
|
|
5002
5012
|
for (x = ++f[0]; x > 1 && (v = x >> 1, !(u[y = f[v]].err <= b)); x = v) f[x] = y;
|
|
5003
5013
|
f[x] = g;
|
|
5004
5014
|
}
|
|
5005
|
-
var
|
|
5006
|
-
for (g = 0; g <
|
|
5015
|
+
var C = d - e;
|
|
5016
|
+
for (g = 0; g < C; ) {
|
|
5007
5017
|
for (var E; ; ) {
|
|
5008
|
-
var
|
|
5009
|
-
if (E = u[
|
|
5010
|
-
E.mtm == m ?
|
|
5011
|
-
var b = u[
|
|
5018
|
+
var P = f[1];
|
|
5019
|
+
if (E = u[P], E.tm >= E.mtm && u[E.nn].mtm <= E.tm) break;
|
|
5020
|
+
E.mtm == m ? P = f[1] = f[f[0]--] : (En(u, P), E.tm = g);
|
|
5021
|
+
var b = u[P].err;
|
|
5012
5022
|
for (x = 1; (v = x + x) <= f[0] && (v < f[0] && u[f[v]].err > u[f[v + 1]].err && v++, !(b <= u[y = f[v]].err)); x = v) f[x] = y;
|
|
5013
|
-
f[x] =
|
|
5023
|
+
f[x] = P;
|
|
5014
5024
|
}
|
|
5015
5025
|
var w = u[E.nn], T = E.cnt, D = w.cnt, _ = 1 / (T + D);
|
|
5016
5026
|
h && (E.ac = _ * (T * E.ac + D * w.ac)), E.rc = _ * (T * E.rc + D * w.rc), E.gc = _ * (T * E.gc + D * w.gc), E.bc = _ * (T * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
|
|
@@ -5099,8 +5109,8 @@ function io(a = {}) {
|
|
|
5099
5109
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
5100
5110
|
ro(i, u, p, _, x), wn(i, _), y >= 0 && so(i, y);
|
|
5101
5111
|
}
|
|
5102
|
-
let
|
|
5103
|
-
no(i, v,
|
|
5112
|
+
let C = Math.round(g / 10);
|
|
5113
|
+
no(i, v, C, f, d);
|
|
5104
5114
|
let E = !!_ && !b;
|
|
5105
5115
|
ao(i, u, p, E ? _ : null), E && wn(i, _), oo(i, h, u, p, x, r, s, o);
|
|
5106
5116
|
} };
|
|
@@ -5209,9 +5219,9 @@ class lo {
|
|
|
5209
5219
|
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(m, f, h, u, d) : e.rect(m, f, h, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, f + 28);
|
|
5210
5220
|
const g = m + 16, _ = f + 40, y = h - 32, x = 20, v = s.style.background || "";
|
|
5211
5221
|
let b = [];
|
|
5212
|
-
const
|
|
5213
|
-
if (
|
|
5214
|
-
b =
|
|
5222
|
+
const C = v.match(/rgba?\([^)]+\)/g);
|
|
5223
|
+
if (C && C.length >= 2)
|
|
5224
|
+
b = C;
|
|
5215
5225
|
else {
|
|
5216
5226
|
const E = v.match(/#[0-9a-fA-F]{3,8}/g);
|
|
5217
5227
|
E && E.length >= 2 && (b = E);
|
|
@@ -5224,8 +5234,8 @@ class lo {
|
|
|
5224
5234
|
E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, x, 4) : e.rect(g, _, y, x), e.fill(), console.log("Legend gradient style:", v);
|
|
5225
5235
|
}
|
|
5226
5236
|
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, f + 78), l) {
|
|
5227
|
-
const E = l.textContent || "",
|
|
5228
|
-
e.fillText(E, g + y -
|
|
5237
|
+
const E = l.textContent || "", P = e.measureText(E).width;
|
|
5238
|
+
e.fillText(E, g + y - P, f + 78);
|
|
5229
5239
|
}
|
|
5230
5240
|
c && c.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(c.textContent, g, f + 95));
|
|
5231
5241
|
} catch (n) {
|
|
@@ -5389,10 +5399,10 @@ function kr(a) {
|
|
|
5389
5399
|
function wo(a, e, t) {
|
|
5390
5400
|
return (t ?? kr(e))(a);
|
|
5391
5401
|
}
|
|
5392
|
-
let
|
|
5402
|
+
let Cn = !1;
|
|
5393
5403
|
function ho() {
|
|
5394
|
-
if (
|
|
5395
|
-
|
|
5404
|
+
if (Cn) return;
|
|
5405
|
+
Cn = !0;
|
|
5396
5406
|
const a = document.createElement("style");
|
|
5397
5407
|
a.setAttribute("data-gralobe-legend", "true"), a.textContent = `
|
|
5398
5408
|
.gralobe-legend {
|
|
@@ -6111,9 +6121,9 @@ void main() {
|
|
|
6111
6121
|
|
|
6112
6122
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
6113
6123
|
}
|
|
6114
|
-
`,
|
|
6124
|
+
`, Pn = Math.PI / 180;
|
|
6115
6125
|
function yo(a, e, t = _e) {
|
|
6116
|
-
const i = (90 - a) *
|
|
6126
|
+
const i = (90 - a) * Pn, n = (e + 180) * Pn;
|
|
6117
6127
|
return new A.Vector3(
|
|
6118
6128
|
-t * Math.sin(i) * Math.cos(n),
|
|
6119
6129
|
t * Math.cos(i),
|
|
@@ -6439,7 +6449,7 @@ const An = {
|
|
|
6439
6449
|
},
|
|
6440
6450
|
extrudeHeight: !1
|
|
6441
6451
|
};
|
|
6442
|
-
class
|
|
6452
|
+
class Co {
|
|
6443
6453
|
container;
|
|
6444
6454
|
config;
|
|
6445
6455
|
// Three.js core
|
|
@@ -6495,7 +6505,7 @@ class Po {
|
|
|
6495
6505
|
0,
|
|
6496
6506
|
0,
|
|
6497
6507
|
this.config.initialView === "flat" ? 350 : 150
|
|
6498
|
-
), this.renderer = new A.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new fa(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Ua(), this.config.showLegend && (this.legend = new co(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new ja(this.container, _e), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new lo(this.renderer, this.scene, this.camera), this.legend && this.exporter.setLegendElement(this.legend.getElement()), this.countryLabels && this.exporter.setCountryLabels(this.countryLabels), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), document.addEventListener("fullscreenchange", this.handleFullscreenChange), this.renderer.domElement.tabIndex = 0, this.renderer.domElement.style.outline = "none", this.renderer.domElement.addEventListener("mousedown", () => {
|
|
6508
|
+
), this.renderer = new A.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new fa(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Ua(this.config.topology), this.config.showLegend && (this.legend = new co(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new ja(this.container, _e), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new lo(this.renderer, this.scene, this.camera), this.legend && this.exporter.setLegendElement(this.legend.getElement()), this.countryLabels && this.exporter.setCountryLabels(this.countryLabels), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), document.addEventListener("fullscreenchange", this.handleFullscreenChange), this.renderer.domElement.tabIndex = 0, this.renderer.domElement.style.outline = "none", this.renderer.domElement.addEventListener("mousedown", () => {
|
|
6499
6509
|
this.renderer.domElement.focus();
|
|
6500
6510
|
}), this.renderer.domElement.addEventListener("keydown", this.handleKeydown), this.animate(), this.resolveReady();
|
|
6501
6511
|
}
|
|
@@ -6758,7 +6768,7 @@ class Po {
|
|
|
6758
6768
|
}
|
|
6759
6769
|
export {
|
|
6760
6770
|
wi as BUILT_IN_STATISTICS,
|
|
6761
|
-
|
|
6771
|
+
Co as GlobeViz,
|
|
6762
6772
|
Mr as WORLD_STATISTICS,
|
|
6763
6773
|
kr as createFormatter,
|
|
6764
6774
|
wo as formatValue,
|