gralobe 1.0.63 → 1.0.66
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 +8 -1
- package/dist/gralobe.js +388 -318
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +10 -10
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +7 -1
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as S from "three";
|
|
2
2
|
import { OrbitControls as En } from "three/examples/jsm/controls/OrbitControls.js";
|
|
3
|
-
import { CSS2DRenderer as wn, CSS2DObject as
|
|
3
|
+
import { CSS2DRenderer as wn, CSS2DObject as $i } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
|
4
4
|
const Je = [
|
|
5
5
|
// Major economies and populous nations
|
|
6
6
|
{
|
|
@@ -1877,19 +1877,19 @@ const Pn = {
|
|
|
1877
1877
|
GHA: "288",
|
|
1878
1878
|
GHANA: "288"
|
|
1879
1879
|
};
|
|
1880
|
-
function
|
|
1880
|
+
function Gi(s) {
|
|
1881
1881
|
const e = s.toUpperCase().trim();
|
|
1882
1882
|
return /^\d{1,3}$/.test(s) ? s.padStart(3, "0") : Pn[e] || s;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Sn(s) {
|
|
1885
1885
|
const e = {};
|
|
1886
1886
|
return s instanceof Map ? s.forEach((t, i) => {
|
|
1887
|
-
e[
|
|
1887
|
+
e[Gi(i)] = t;
|
|
1888
1888
|
}) : Object.entries(s).forEach(([t, i]) => {
|
|
1889
|
-
e[
|
|
1889
|
+
e[Gi(t)] = i;
|
|
1890
1890
|
}), e;
|
|
1891
1891
|
}
|
|
1892
|
-
const
|
|
1892
|
+
const Vi = {
|
|
1893
1893
|
"%": (s) => `${s.toFixed(1)}%`,
|
|
1894
1894
|
$: (s) => `$${s.toLocaleString()}`,
|
|
1895
1895
|
years: (s) => `${s.toFixed(1)} yrs`,
|
|
@@ -1897,17 +1897,17 @@ const Gi = {
|
|
|
1897
1897
|
"% of GDP": (s) => `${s.toFixed(1)}%`,
|
|
1898
1898
|
index: (s) => s.toFixed(3),
|
|
1899
1899
|
"": (s) => s.toFixed(3)
|
|
1900
|
-
},
|
|
1900
|
+
}, An = ["per capita", "per 100", "per 1000"];
|
|
1901
1901
|
function gr(s) {
|
|
1902
|
-
return
|
|
1902
|
+
return Vi[s] ? Vi[s] : An.some((e) => s.includes(e)) ? (e) => `${e.toFixed(1)}` : (e) => {
|
|
1903
1903
|
const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
|
|
1904
1904
|
return s ? `${t} ${s}` : t;
|
|
1905
1905
|
};
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function Ho(s, e, t) {
|
|
1908
1908
|
return (t ?? gr(e))(s);
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Se(s) {
|
|
1911
1911
|
if (s === void 0)
|
|
1912
1912
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1913
1913
|
return s;
|
|
@@ -1932,20 +1932,20 @@ var he = {
|
|
|
1932
1932
|
return typeof e == "function";
|
|
1933
1933
|
}, Te = function(e) {
|
|
1934
1934
|
return typeof e == "number";
|
|
1935
|
-
},
|
|
1935
|
+
}, Ei = function(e) {
|
|
1936
1936
|
return typeof e > "u";
|
|
1937
1937
|
}, Pe = function(e) {
|
|
1938
1938
|
return typeof e == "object";
|
|
1939
1939
|
}, ie = function(e) {
|
|
1940
1940
|
return e !== !1;
|
|
1941
|
-
},
|
|
1941
|
+
}, wi = function() {
|
|
1942
1942
|
return typeof window < "u";
|
|
1943
|
-
},
|
|
1943
|
+
}, At = function(e) {
|
|
1944
1944
|
return G(e) || W(e);
|
|
1945
1945
|
}, xr = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
1946
|
-
}, J = Array.isArray, ai = /(?:-?\.?\d|\.)+/gi,
|
|
1946
|
+
}, J = Array.isArray, ai = /(?:-?\.?\d|\.)+/gi, vr = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Qe = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, _r = /[+-]=-?[.\d]+/, Er = /[^,'"\[\]\s]+/gi, In = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, B, _e, oi, Ci, de = {}, Ft = {}, wr, Cr = function(e) {
|
|
1947
1947
|
return (Ft = ot(e, de)) && oe;
|
|
1948
|
-
},
|
|
1948
|
+
}, Pi = function(e, t) {
|
|
1949
1949
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
1950
1950
|
}, yt = function(e, t) {
|
|
1951
1951
|
return !t && console.warn(e);
|
|
@@ -1962,7 +1962,7 @@ var he = {
|
|
|
1962
1962
|
kill: !1
|
|
1963
1963
|
}, kn = {
|
|
1964
1964
|
suppressEvents: !0
|
|
1965
|
-
},
|
|
1965
|
+
}, Si = {}, ke = [], si = {}, Sr, le = {}, Xt = {}, ji = 30, It = [], Ai = "", Ti = function(e) {
|
|
1966
1966
|
var t = e[0], i, r;
|
|
1967
1967
|
if (Pe(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
1968
1968
|
for (r = It.length; r-- && !It[r].targetTest(t); )
|
|
@@ -1973,9 +1973,9 @@ var he = {
|
|
|
1973
1973
|
e[r] && (e[r]._gsap || (e[r]._gsap = new Zr(e[r], i))) || e.splice(r, 1);
|
|
1974
1974
|
return e;
|
|
1975
1975
|
}, He = function(e) {
|
|
1976
|
-
return e._gsap ||
|
|
1977
|
-
},
|
|
1978
|
-
return (i = e[t]) && G(i) ? e[t]() :
|
|
1976
|
+
return e._gsap || Ti(ye(e))[0]._gsap;
|
|
1977
|
+
}, Ar = function(e, t, i) {
|
|
1978
|
+
return (i = e[t]) && G(i) ? e[t]() : Ei(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
1979
1979
|
}, re = function(e, t) {
|
|
1980
1980
|
return (e = e.split(",")).forEach(t) || e;
|
|
1981
1981
|
}, V = function(e) {
|
|
@@ -1993,10 +1993,10 @@ var he = {
|
|
|
1993
1993
|
var e = ke.length, t = ke.slice(0), i, r;
|
|
1994
1994
|
for (si = {}, ke.length = 0, i = 0; i < e; i++)
|
|
1995
1995
|
r = t[i], r && r._lazy && (r.render(r._lazy[0], r._lazy[1], !0)._lazy = 0);
|
|
1996
|
-
},
|
|
1996
|
+
}, Mi = function(e) {
|
|
1997
1997
|
return !!(e._initted || e._startAt || e.add);
|
|
1998
1998
|
}, Tr = function(e, t, i, r) {
|
|
1999
|
-
ke.length && !q && zt(), e.render(t, i, !!(q && t < 0 &&
|
|
1999
|
+
ke.length && !q && zt(), e.render(t, i, !!(q && t < 0 && Mi(e))), ke.length && !q && zt();
|
|
2000
2000
|
}, Mr = function(e) {
|
|
2001
2001
|
var t = parseFloat(e);
|
|
2002
2002
|
return (t || t === 0) && (e + "").match(Er).length < 2 ? t : W(e) ? e.trim() : e;
|
|
@@ -2015,7 +2015,7 @@ var he = {
|
|
|
2015
2015
|
for (var i in t)
|
|
2016
2016
|
e[i] = t[i];
|
|
2017
2017
|
return e;
|
|
2018
|
-
},
|
|
2018
|
+
}, Hi = function s(e, t) {
|
|
2019
2019
|
for (var i in t)
|
|
2020
2020
|
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] = Pe(t[i]) ? s(e[i] || (e[i] = {}), t[i]) : t[i]);
|
|
2021
2021
|
return e;
|
|
@@ -2059,7 +2059,7 @@ var he = {
|
|
|
2059
2059
|
return e._startAt && (q ? e._startAt.revert(Dt) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, r));
|
|
2060
2060
|
}, Nn = function s(e) {
|
|
2061
2061
|
return !e || e._ts && s(e.parent);
|
|
2062
|
-
},
|
|
2062
|
+
}, Yi = function(e) {
|
|
2063
2063
|
return e._repeat ? st(e._tTime, e = e.duration() + e._rDelay) * e : 0;
|
|
2064
2064
|
}, st = function(e, t) {
|
|
2065
2065
|
var i = Math.floor(e = H(e / t));
|
|
@@ -2073,7 +2073,7 @@ var he = {
|
|
|
2073
2073
|
return i && i.smoothChildTiming && e._ts && (e._start = H(i._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), jt(e), i._dirty || Ye(i, e)), e;
|
|
2074
2074
|
}, Ir = function(e, t) {
|
|
2075
2075
|
var i;
|
|
2076
|
-
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Nt(e.rawTime(), t), (!t._dur ||
|
|
2076
|
+
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Nt(e.rawTime(), t), (!t._dur || St(0, t.totalDuration(), i) - t._tTime > z) && t.render(i, !0)), Ye(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
2077
2077
|
if (e._dur < e.duration())
|
|
2078
2078
|
for (i = e; i._dp; )
|
|
2079
2079
|
i.rawTime() >= 0 && i.totalTime(i._tTime), i = i._dp;
|
|
@@ -2082,11 +2082,11 @@ var he = {
|
|
|
2082
2082
|
}, Ee = function(e, t, i, r) {
|
|
2083
2083
|
return t.parent && Fe(t), t._start = H((Te(i) ? i : i || e !== B ? ge(e, i, t) : e._time) + t._delay), t._end = H(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Dr(e, t, "_first", "_last", e._sort ? "_start" : 0), ci(t) || (e._recent = t), r || Ir(e, t), e._ts < 0 && Ht(e, e._tTime), e;
|
|
2084
2084
|
}, Rr = function(e, t) {
|
|
2085
|
-
return (de.ScrollTrigger ||
|
|
2085
|
+
return (de.ScrollTrigger || Pi("scrollTrigger", t)) && de.ScrollTrigger.create(t, e);
|
|
2086
2086
|
}, kr = function(e, t, i, r, n) {
|
|
2087
|
-
if (
|
|
2087
|
+
if (Di(e, t, n), !e._initted)
|
|
2088
2088
|
return 1;
|
|
2089
|
-
if (!i && e._pt && !q && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) &&
|
|
2089
|
+
if (!i && e._pt && !q && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Sr !== ce.frame)
|
|
2090
2090
|
return ke.push(e), e._lazy = [n, r], 1;
|
|
2091
2091
|
}, Bn = function s(e) {
|
|
2092
2092
|
var t = e.parent;
|
|
@@ -2096,7 +2096,7 @@ var he = {
|
|
|
2096
2096
|
return t === "isFromStart" || t === "isStart";
|
|
2097
2097
|
}, $n = function(e, t, i, r) {
|
|
2098
2098
|
var n = e.ratio, a = t < 0 || !t && (!e._start && Bn(e) && !(!e._initted && ci(e)) || (e._ts < 0 || e._dp._ts < 0) && !ci(e)) ? 0 : 1, o = e._rDelay, l = 0, u, c, h;
|
|
2099
|
-
if (o && e._repeat && (l =
|
|
2099
|
+
if (o && e._repeat && (l = St(0, e._tDur, t), c = st(l, o), e._yoyo && c & 1 && (a = 1 - a), c !== st(e._tTime, o) && (n = 1 - a, e.vars.repeatRefresh && e._initted && e.invalidate())), a !== n || q || r || e._zTime === z || !t && e._zTime) {
|
|
2100
2100
|
if (!e._initted && kr(e, t, r, i, l))
|
|
2101
2101
|
return;
|
|
2102
2102
|
for (h = e._zTime, e._zTime = t || (i ? z : 0), i || (i = t && !h), e.ratio = a, e._from && (a = 1 - a), e._time = 0, e._tTime = l, u = e._pt; u; )
|
|
@@ -2120,7 +2120,7 @@ var he = {
|
|
|
2120
2120
|
}, lt = function(e, t, i, r) {
|
|
2121
2121
|
var n = e._repeat, a = H(t) || 0, o = e._tTime / e._tDur;
|
|
2122
2122
|
return o && !r && (e._time *= a / e._dur), e._dur = a, e._tDur = n ? n < 0 ? 1e10 : H(a * (n + 1) + e._rDelay * n) : a, o > 0 && !r && Ht(e, e._tTime = e._tDur * o), e.parent && jt(e), i || Ye(e.parent, e), e;
|
|
2123
|
-
},
|
|
2123
|
+
}, Wi = function(e) {
|
|
2124
2124
|
return e instanceof te ? Ye(e) : lt(e, e._dur);
|
|
2125
2125
|
}, Vn = {
|
|
2126
2126
|
_start: 0,
|
|
@@ -2139,27 +2139,27 @@ var he = {
|
|
|
2139
2139
|
return new j(t[0], a, t[n + 1]);
|
|
2140
2140
|
}, Ue = function(e, t) {
|
|
2141
2141
|
return e || e === 0 ? t(e) : t;
|
|
2142
|
-
},
|
|
2142
|
+
}, St = function(e, t, i) {
|
|
2143
2143
|
return i < e ? e : i > t ? t : i;
|
|
2144
2144
|
}, K = function(e, t) {
|
|
2145
2145
|
return !W(e) || !(t = In.exec(e)) ? "" : t[1];
|
|
2146
2146
|
}, jn = function(e, t, i) {
|
|
2147
2147
|
return Ue(i, function(r) {
|
|
2148
|
-
return
|
|
2148
|
+
return St(e, t, r);
|
|
2149
2149
|
});
|
|
2150
2150
|
}, ui = [].slice, Or = function(e, t) {
|
|
2151
|
-
return e && Pe(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Pe(e[0])) && !e.nodeType && e !==
|
|
2151
|
+
return e && Pe(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Pe(e[0])) && !e.nodeType && e !== _e;
|
|
2152
2152
|
}, Hn = function(e, t, i) {
|
|
2153
2153
|
return i === void 0 && (i = []), e.forEach(function(r) {
|
|
2154
2154
|
var n;
|
|
2155
2155
|
return W(r) && !t || Or(r, 1) ? (n = i).push.apply(n, ye(r)) : i.push(r);
|
|
2156
2156
|
}) || i;
|
|
2157
2157
|
}, ye = function(e, t, i) {
|
|
2158
|
-
return N && !t && N.selector ? N.selector(e) : W(e) && !i && (oi || !ct()) ? ui.call((t ||
|
|
2158
|
+
return N && !t && N.selector ? N.selector(e) : W(e) && !i && (oi || !ct()) ? ui.call((t || Ci).querySelectorAll(e), 0) : J(e) ? Hn(e, i) : Or(e) ? ui.call(e, 0) : e ? [e] : [];
|
|
2159
2159
|
}, hi = function(e) {
|
|
2160
2160
|
return e = ye(e)[0] || yt("Invalid scope") || {}, function(t) {
|
|
2161
2161
|
var i = e.current || e.nativeElement || e;
|
|
2162
|
-
return ye(t, i.querySelectorAll ? i : i === e ? yt("Invalid scope") ||
|
|
2162
|
+
return ye(t, i.querySelectorAll ? i : i === e ? yt("Invalid scope") || Ci.createElement("div") : e);
|
|
2163
2163
|
};
|
|
2164
2164
|
}, Fr = function(e) {
|
|
2165
2165
|
return e.sort(function() {
|
|
@@ -2176,7 +2176,7 @@ var he = {
|
|
|
2176
2176
|
edges: 0.5,
|
|
2177
2177
|
end: 1
|
|
2178
2178
|
}[r] || 0 : !o && l && (c = r[0], h = r[1]), function(p, f, m) {
|
|
2179
|
-
var d = (m || t).length, g = a[d], b, y, x,
|
|
2179
|
+
var d = (m || t).length, g = a[d], b, y, x, _, v, C, w, P, E;
|
|
2180
2180
|
if (!g) {
|
|
2181
2181
|
if (E = t.grid === "auto" ? 0 : (t.grid || [1, be])[1], !E) {
|
|
2182
2182
|
for (w = -be; w < (w = m[E++].getBoundingClientRect().left) && E < d; )
|
|
@@ -2184,7 +2184,7 @@ var he = {
|
|
|
2184
2184
|
E < d && E--;
|
|
2185
2185
|
}
|
|
2186
2186
|
for (g = a[d] = [], b = l ? Math.min(E, d) * c - 0.5 : r % E, y = E === be ? 0 : l ? d * h / E - 0.5 : r / E | 0, w = 0, P = be, C = 0; C < d; C++)
|
|
2187
|
-
x = C % E - b,
|
|
2187
|
+
x = C % E - b, _ = y - (C / E | 0), g[C] = v = u ? Math.abs(u === "y" ? _ : x) : yr(x * x + _ * _), v > w && (w = v), v < P && (P = v);
|
|
2188
2188
|
r === "random" && Fr(g), g.max = w - P, g.min = P, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (E > d ? d - 1 : u ? u === "y" ? d / E : E : Math.max(E, d / E)) || 0) * (r === "edges" ? -1 : 1), g.b = d < 0 ? n - d : n, g.u = K(t.amount || t.each) || 0, i = i && d < 0 ? Wr(i) : i;
|
|
2189
2189
|
}
|
|
2190
2190
|
return d = (g[p] - g.min) / g.max || 0, H(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
@@ -2236,7 +2236,7 @@ var he = {
|
|
|
2236
2236
|
return J(e) ? Br(e, s(0, e.length - 1), t) : Ue(i, function(a) {
|
|
2237
2237
|
return a = (n + (a - e) % n) % n || 0, e + (a > r ? n - a : a);
|
|
2238
2238
|
});
|
|
2239
|
-
},
|
|
2239
|
+
}, vt = function(e) {
|
|
2240
2240
|
for (var t = 0, i = "", r, n, a, o; ~(r = e.indexOf("random(", t)); )
|
|
2241
2241
|
a = e.indexOf(")", r), o = e.charAt(r + 7) === "[", n = e.substr(r + 7, a - r - 7).match(o ? Er : ai), i += e.substr(t, r - t) + Nr(o ? n : +n[0], o ? 0 : +n[1], +n[2] || 1e-5), t = a + 1;
|
|
2242
2242
|
return i + e.substr(t, e.length - t);
|
|
@@ -2268,14 +2268,14 @@ var he = {
|
|
|
2268
2268
|
} else r || (e = ot(J(e) ? [] : {}, e));
|
|
2269
2269
|
if (!c) {
|
|
2270
2270
|
for (l in t)
|
|
2271
|
-
|
|
2271
|
+
Li.call(o, e, l, "get", t[l]);
|
|
2272
2272
|
n = function(m) {
|
|
2273
|
-
return
|
|
2273
|
+
return ki(m, o) || (a ? e.p : e);
|
|
2274
2274
|
};
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
2277
|
return Ue(i, n);
|
|
2278
|
-
},
|
|
2278
|
+
}, Xi = function(e, t, i) {
|
|
2279
2279
|
var r = e.labels, n = be, a, o, l;
|
|
2280
2280
|
for (a in r)
|
|
2281
2281
|
o = r[a] - t, o < 0 == !!i && o && n > (o = Math.abs(o)) && (l = a, n = o);
|
|
@@ -2288,27 +2288,27 @@ var he = {
|
|
|
2288
2288
|
return Fe(e), e.scrollTrigger && e.scrollTrigger.kill(!!q), e.progress() < 1 && ue(e, "onInterrupt"), e;
|
|
2289
2289
|
}, et, Gr = [], Vr = function(e) {
|
|
2290
2290
|
if (e)
|
|
2291
|
-
if (e = !e.name && e.default || e,
|
|
2291
|
+
if (e = !e.name && e.default || e, wi() || e.headless) {
|
|
2292
2292
|
var t = e.name, i = G(e), r = t && !i && e.init ? function() {
|
|
2293
2293
|
this._props = [];
|
|
2294
2294
|
} : e, n = {
|
|
2295
2295
|
init: xt,
|
|
2296
|
-
render:
|
|
2297
|
-
add:
|
|
2296
|
+
render: ki,
|
|
2297
|
+
add: Li,
|
|
2298
2298
|
kill: pa,
|
|
2299
2299
|
modifier: da,
|
|
2300
2300
|
rawVars: 0
|
|
2301
2301
|
}, a = {
|
|
2302
2302
|
targetTest: 0,
|
|
2303
2303
|
get: 0,
|
|
2304
|
-
getSetter:
|
|
2304
|
+
getSetter: Ri,
|
|
2305
2305
|
aliases: {},
|
|
2306
2306
|
register: 0
|
|
2307
2307
|
};
|
|
2308
2308
|
if (ct(), e !== r) {
|
|
2309
2309
|
if (le[t])
|
|
2310
2310
|
return;
|
|
2311
|
-
pe(r, pe(Ut(e, n), a)), ot(r.prototype, ot(n, Ut(e, a))), le[r.prop = t] = r, e.targetTest && (It.push(r),
|
|
2311
|
+
pe(r, pe(Ut(e, n), a)), ot(r.prototype, ot(n, Ut(e, a))), le[r.prop = t] = r, e.targetTest && (It.push(r), Si[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
2312
2312
|
}
|
|
2313
2313
|
Pr(t, r), e.register && e.register(oe, r, ne);
|
|
2314
2314
|
} else
|
|
@@ -2348,7 +2348,7 @@ var he = {
|
|
|
2348
2348
|
if (r = m = e.match(ai), !t)
|
|
2349
2349
|
l = +r[0] % 360 / 360, u = +r[1] / 100, c = +r[2] / 100, a = c <= 0.5 ? c * (u + 1) : c + u - c * u, n = c * 2 - a, r.length > 3 && (r[3] *= 1), r[0] = qt(l + 1 / 3, n, a), r[1] = qt(l, n, a), r[2] = qt(l - 1 / 3, n, a);
|
|
2350
2350
|
else if (~e.indexOf("="))
|
|
2351
|
-
return r = e.match(
|
|
2351
|
+
return r = e.match(vr), i && r.length < 4 && (r[3] = 1), r;
|
|
2352
2352
|
} else
|
|
2353
2353
|
r = e.match(ai) || pt.transparent;
|
|
2354
2354
|
r = r.map(Number);
|
|
@@ -2360,7 +2360,7 @@ var he = {
|
|
|
2360
2360
|
var a = n.match(Qe) || [];
|
|
2361
2361
|
t.push.apply(t, a), i.push(r += a.length + 1);
|
|
2362
2362
|
}), t.c = i, t;
|
|
2363
|
-
},
|
|
2363
|
+
}, qi = function(e, t, i) {
|
|
2364
2364
|
var r = "", n = (e + r).match(Oe), a = t ? "hsla(" : "rgba(", o = 0, l, u, c, h;
|
|
2365
2365
|
if (!n)
|
|
2366
2366
|
return e;
|
|
@@ -2381,13 +2381,13 @@ var he = {
|
|
|
2381
2381
|
})(), Jn = /hsl[a]?\(/, Yr = function(e) {
|
|
2382
2382
|
var t = e.join(" "), i;
|
|
2383
2383
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
2384
|
-
return i = Jn.test(t), e[1] =
|
|
2385
|
-
},
|
|
2384
|
+
return i = Jn.test(t), e[1] = qi(e[1], i), e[0] = qi(e[0], i, Hr(e[1])), !0;
|
|
2385
|
+
}, _t, ce = (function() {
|
|
2386
2386
|
var s = Date.now, e = 500, t = 33, i = s(), r = i, n = 1e3 / 240, a = n, o = [], l, u, c, h, p, f, m = function d(g) {
|
|
2387
|
-
var b = s() - r, y = g === !0, x,
|
|
2388
|
-
if ((b > e || b < 0) && (i += b - t), r += b,
|
|
2387
|
+
var b = s() - r, y = g === !0, x, _, v, C;
|
|
2388
|
+
if ((b > e || b < 0) && (i += b - t), r += b, v = r - i, x = v - a, (x > 0 || y) && (C = ++h.frame, p = v - h.time * 1e3, h.time = v = v / 1e3, a += x + (x >= n ? 4 : n - x), _ = 1), y || (l = u(d)), _)
|
|
2389
2389
|
for (f = 0; f < o.length; f++)
|
|
2390
|
-
o[f](
|
|
2390
|
+
o[f](v, p, C, g);
|
|
2391
2391
|
};
|
|
2392
2392
|
return h = {
|
|
2393
2393
|
time: 0,
|
|
@@ -2399,12 +2399,12 @@ var he = {
|
|
|
2399
2399
|
return p / (1e3 / (g || 60));
|
|
2400
2400
|
},
|
|
2401
2401
|
wake: function() {
|
|
2402
|
-
wr && (!oi &&
|
|
2402
|
+
wr && (!oi && wi() && (_e = oi = window, Ci = _e.document || {}, de.gsap = oe, (_e.gsapVersions || (_e.gsapVersions = [])).push(oe.version), Cr(Ft || _e.GreenSockGlobals || !_e.gsap && _e || {}), Gr.forEach(Vr)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && h.sleep(), u = c || function(g) {
|
|
2403
2403
|
return setTimeout(g, a - h.time * 1e3 + 1 | 0);
|
|
2404
|
-
},
|
|
2404
|
+
}, _t = 1, m(2));
|
|
2405
2405
|
},
|
|
2406
2406
|
sleep: function() {
|
|
2407
|
-
(c ? cancelAnimationFrame : clearTimeout)(l),
|
|
2407
|
+
(c ? cancelAnimationFrame : clearTimeout)(l), _t = 0, u = xt;
|
|
2408
2408
|
},
|
|
2409
2409
|
lagSmoothing: function(g, b) {
|
|
2410
2410
|
e = g || 1 / 0, t = Math.min(b || 33, e);
|
|
@@ -2413,8 +2413,8 @@ var he = {
|
|
|
2413
2413
|
n = 1e3 / (g || 240), a = h.time * 1e3 + n;
|
|
2414
2414
|
},
|
|
2415
2415
|
add: function(g, b, y) {
|
|
2416
|
-
var x = b ? function(
|
|
2417
|
-
g(
|
|
2416
|
+
var x = b ? function(_, v, C, w) {
|
|
2417
|
+
g(_, v, C, w), h.remove(x);
|
|
2418
2418
|
} : g;
|
|
2419
2419
|
return h.remove(g), o[y ? "unshift" : "push"](x), ct(), x;
|
|
2420
2420
|
},
|
|
@@ -2424,7 +2424,7 @@ var he = {
|
|
|
2424
2424
|
_listeners: o
|
|
2425
2425
|
}, h;
|
|
2426
2426
|
})(), ct = function() {
|
|
2427
|
-
return !
|
|
2427
|
+
return !_t && ce.wake();
|
|
2428
2428
|
}, I = {}, Qn = /^[\d.\-M][\d.\-,\s]/, ea = /["']/g, ta = function(e) {
|
|
2429
2429
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), r = i[0], n = 1, a = i.length, o, l, u; n < a; n++)
|
|
2430
2430
|
l = i[n], o = n !== a - 1 ? l.lastIndexOf(",") : l.length, u = l.substr(0, o), t[r] = isNaN(u) ? u.replace(ea, "").trim() : +u, r = l.substr(o + 1).trim();
|
|
@@ -2521,7 +2521,7 @@ I.SteppedEase = I.steps = de.SteppedEase = {
|
|
|
2521
2521
|
e === void 0 && (e = 1);
|
|
2522
2522
|
var i = 1 / e, r = e + (t ? 0 : 1), n = t ? 1 : 0, a = 1 - z;
|
|
2523
2523
|
return function(o) {
|
|
2524
|
-
return ((r *
|
|
2524
|
+
return ((r * St(0, a, o) | 0) + n) * i;
|
|
2525
2525
|
};
|
|
2526
2526
|
}
|
|
2527
2527
|
};
|
|
@@ -2530,10 +2530,10 @@ re("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", functio
|
|
|
2530
2530
|
return Ai += s + "," + s + "Params,";
|
|
2531
2531
|
});
|
|
2532
2532
|
var Zr = function(e, t) {
|
|
2533
|
-
this.id = Mn++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get :
|
|
2533
|
+
this.id = Mn++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Ar, this.set = t ? t.getSetter : Ri;
|
|
2534
2534
|
}, Et = /* @__PURE__ */ (function() {
|
|
2535
2535
|
function s(t) {
|
|
2536
|
-
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, N && (this._ctx = N, N.data.push(this)),
|
|
2536
|
+
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, N && (this._ctx = N, N.data.push(this)), _t || ce.wake();
|
|
2537
2537
|
}
|
|
2538
2538
|
var e = s.prototype;
|
|
2539
2539
|
return e.delay = function(i) {
|
|
@@ -2553,11 +2553,11 @@ var Zr = function(e, t) {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
return (this._tTime !== i || !this._dur && !r || this._initted && Math.abs(this._zTime) === z || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), Tr(this, i, r)), this;
|
|
2555
2555
|
}, e.time = function(i, r) {
|
|
2556
|
-
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i +
|
|
2556
|
+
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i + Yi(this)) % (this._dur + this._rDelay) || (i ? this._dur : 0), r) : this._time;
|
|
2557
2557
|
}, e.totalProgress = function(i, r) {
|
|
2558
2558
|
return arguments.length ? this.totalTime(this.totalDuration() * i, r) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
|
|
2559
2559
|
}, e.progress = function(i, r) {
|
|
2560
|
-
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - i : i) +
|
|
2560
|
+
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - i : i) + Yi(this), r) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
|
|
2561
2561
|
}, e.iteration = function(i, r) {
|
|
2562
2562
|
var n = this.duration() + this._rDelay;
|
|
2563
2563
|
return arguments.length ? this.totalTime(this._time + (i - 1) * n, r) : this._repeat ? st(this._tTime, n) + 1 : 1;
|
|
@@ -2567,7 +2567,7 @@ var Zr = function(e, t) {
|
|
|
2567
2567
|
if (this._rts === i)
|
|
2568
2568
|
return this;
|
|
2569
2569
|
var n = this.parent && this._ts ? Nt(this.parent._time, this) : this._tTime;
|
|
2570
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -z ? 0 : this._rts, this.totalTime(
|
|
2570
|
+
return this._rts = +i || 0, this._ts = this._ps || i === -z ? 0 : this._rts, this.totalTime(St(-Math.abs(this._delay), this.totalDuration(), n), r !== !1), jt(this), Un(this);
|
|
2571
2571
|
}, e.paused = function(i) {
|
|
2572
2572
|
return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ct(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== z && (this._tTime -= z)))), this) : this._ps;
|
|
2573
2573
|
}, e.startTime = function(i) {
|
|
@@ -2585,17 +2585,17 @@ var Zr = function(e, t) {
|
|
|
2585
2585
|
}, e.revert = function(i) {
|
|
2586
2586
|
i === void 0 && (i = kn);
|
|
2587
2587
|
var r = q;
|
|
2588
|
-
return q = i,
|
|
2588
|
+
return q = i, Mi(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), q = r, this;
|
|
2589
2589
|
}, e.globalTime = function(i) {
|
|
2590
2590
|
for (var r = this, n = arguments.length ? i : r.rawTime(); r; )
|
|
2591
2591
|
n = r._start + n / (Math.abs(r._ts) || 1), r = r._dp;
|
|
2592
2592
|
return !this.parent && this._sat ? this._sat.globalTime(i) : n;
|
|
2593
2593
|
}, e.repeat = function(i) {
|
|
2594
|
-
return arguments.length ? (this._repeat = i === 1 / 0 ? -2 : i,
|
|
2594
|
+
return arguments.length ? (this._repeat = i === 1 / 0 ? -2 : i, Wi(this)) : this._repeat === -2 ? 1 / 0 : this._repeat;
|
|
2595
2595
|
}, e.repeatDelay = function(i) {
|
|
2596
2596
|
if (arguments.length) {
|
|
2597
2597
|
var r = this._time;
|
|
2598
|
-
return this._rDelay = i,
|
|
2598
|
+
return this._rDelay = i, Wi(this), r ? this.time(r) : this;
|
|
2599
2599
|
}
|
|
2600
2600
|
return this._rDelay;
|
|
2601
2601
|
}, e.yoyo = function(i) {
|
|
@@ -2659,7 +2659,7 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2659
2659
|
br(e, s);
|
|
2660
2660
|
function e(i, r) {
|
|
2661
2661
|
var n;
|
|
2662
|
-
return i === void 0 && (i = {}), n = s.call(this, i) || this, n.labels = {}, n.smoothChildTiming = !!i.smoothChildTiming, n.autoRemoveChildren = !!i.autoRemoveChildren, n._sort = ie(i.sortChildren), B && Ee(i.parent || B,
|
|
2662
|
+
return i === void 0 && (i = {}), n = s.call(this, i) || this, n.labels = {}, n.smoothChildTiming = !!i.smoothChildTiming, n.autoRemoveChildren = !!i.autoRemoveChildren, n._sort = ie(i.sortChildren), B && Ee(i.parent || B, Se(n), r), i.reversed && n.reverse(), i.paused && n.paused(!0), i.scrollTrigger && Rr(Se(n), i.scrollTrigger), n;
|
|
2663
2663
|
}
|
|
2664
2664
|
var t = e.prototype;
|
|
2665
2665
|
return t.to = function(r, n, a) {
|
|
@@ -2679,21 +2679,21 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2679
2679
|
}, t.staggerFromTo = function(r, n, a, o, l, u, c, h) {
|
|
2680
2680
|
return o.startAt = a, ft(o).immediateRender = ie(o.immediateRender), this.staggerTo(r, n, o, l, u, c, h);
|
|
2681
2681
|
}, t.render = function(r, n, a) {
|
|
2682
|
-
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, u = this._dur, c = r <= 0 ? 0 : H(r), h = this._zTime < 0 != r < 0 && (this._initted || !u), p, f, m, d, g, b, y, x,
|
|
2682
|
+
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, u = this._dur, c = r <= 0 ? 0 : H(r), h = this._zTime < 0 != r < 0 && (this._initted || !u), p, f, m, d, g, b, y, x, _, v, C, w;
|
|
2683
2683
|
if (this !== B && c > l && r >= 0 && (c = l), c !== this._tTime || a || h) {
|
|
2684
|
-
if (o !== this._time && u && (c += this._time - o, r += this._time - o), p = c,
|
|
2684
|
+
if (o !== this._time && u && (c += this._time - o, r += this._time - o), p = c, _ = this._start, x = this._ts, b = !x, h && (u || (o = this._zTime), (r || !n) && (this._zTime = r)), this._repeat) {
|
|
2685
2685
|
if (C = this._yoyo, g = u + this._rDelay, this._repeat < -1 && r < 0)
|
|
2686
2686
|
return this.totalTime(g * 100 + r, n, a);
|
|
2687
|
-
if (p = H(c % g), c === l ? (d = this._repeat, p = u) : (
|
|
2688
|
-
var P = C &&
|
|
2689
|
-
if (d <
|
|
2687
|
+
if (p = H(c % g), c === l ? (d = this._repeat, p = u) : (v = H(c / g), d = ~~v, d && d === v && (p = u, d--), p > u && (p = u)), v = st(this._tTime, g), !o && this._tTime && v !== d && this._tTime - v * g - this._dur <= 0 && (v = d), C && d & 1 && (p = u - p, w = 1), d !== v && !this._lock) {
|
|
2688
|
+
var P = C && v & 1, E = P === (C && d & 1);
|
|
2689
|
+
if (d < v && (P = !P), o = P ? 0 : c % u ? u : c, this._lock = 1, this.render(o || (w ? 0 : H(d * g)), n, !u)._lock = 0, this._tTime = c, !n && this.parent && ue(this, "onRepeat"), this.vars.repeatRefresh && !w && (this.invalidate()._lock = 1), o && o !== this._time || b !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
2690
2690
|
return this;
|
|
2691
2691
|
if (u = this._dur, l = this._tDur, E && (this._lock = 2, o = P ? u : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !w && this.invalidate()), this._lock = 0, !this._ts && !b)
|
|
2692
2692
|
return this;
|
|
2693
2693
|
Xr(this, w);
|
|
2694
2694
|
}
|
|
2695
2695
|
}
|
|
2696
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (y = Gn(this, H(o), H(p)), y && (c -= p - (p = y._start))), this._tTime = c, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = r, o = 0), !o && c && !n && !
|
|
2696
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (y = Gn(this, H(o), H(p)), y && (c -= p - (p = y._start))), this._tTime = c, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = r, o = 0), !o && c && !n && !v && (ue(this, "onStart"), this._tTime !== c))
|
|
2697
2697
|
return this;
|
|
2698
2698
|
if (p >= o && r >= 0)
|
|
2699
2699
|
for (f = this._first; f; ) {
|
|
@@ -2713,7 +2713,7 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2713
2713
|
if (m = f._prev, (f._act || T <= f._end) && f._ts && y !== f) {
|
|
2714
2714
|
if (f.parent !== this)
|
|
2715
2715
|
return this.render(r, n, a);
|
|
2716
|
-
if (f.render(f._ts > 0 ? (T - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (T - f._start) * f._ts, n, a || q &&
|
|
2716
|
+
if (f.render(f._ts > 0 ? (T - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (T - f._start) * f._ts, n, a || q && Mi(f)), p !== this._time || !this._ts && !b) {
|
|
2717
2717
|
y = 0, m && (c += this._zTime = T ? -z : z);
|
|
2718
2718
|
break;
|
|
2719
2719
|
}
|
|
@@ -2722,8 +2722,8 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
2724
|
if (y && !n && (this.pause(), y.render(p >= o ? 0 : -z)._zTime = p >= o ? 1 : -1, this._ts))
|
|
2725
|
-
return this._start =
|
|
2726
|
-
this._onUpdate && !n && ue(this, "onUpdate", !0), (c === l && this._tTime >= this.totalDuration() || !c && o) && (
|
|
2725
|
+
return this._start = _, jt(this), this.render(r, n, a);
|
|
2726
|
+
this._onUpdate && !n && ue(this, "onUpdate", !0), (c === l && this._tTime >= this.totalDuration() || !c && o) && (_ === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((r || !u) && (c === l && this._ts > 0 || !c && this._ts < 0) && Fe(this, 1), !n && !(r < 0 && !o) && (c || o || !l) && (ue(this, c === l && r >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(c < l && this.timeScale() > 0) && this._prom())));
|
|
2727
2727
|
}
|
|
2728
2728
|
return this;
|
|
2729
2729
|
}, t.add = function(r, n) {
|
|
@@ -2800,9 +2800,9 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2800
2800
|
}, t.recent = function() {
|
|
2801
2801
|
return this._recent;
|
|
2802
2802
|
}, t.nextLabel = function(r) {
|
|
2803
|
-
return r === void 0 && (r = this._time),
|
|
2803
|
+
return r === void 0 && (r = this._time), Xi(this, ge(this, r));
|
|
2804
2804
|
}, t.previousLabel = function(r) {
|
|
2805
|
-
return r === void 0 && (r = this._time),
|
|
2805
|
+
return r === void 0 && (r = this._time), Xi(this, ge(this, r), 1);
|
|
2806
2806
|
}, t.currentLabel = function(r) {
|
|
2807
2807
|
return arguments.length ? this.seek(r, !0) : this.previousLabel(this._time + z);
|
|
2808
2808
|
}, t.shiftChildren = function(r, n, a) {
|
|
@@ -2834,8 +2834,8 @@ var te = /* @__PURE__ */ (function(s) {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
return a._tDur;
|
|
2836
2836
|
}, e.updateRoot = function(r) {
|
|
2837
|
-
if (B._ts && (Tr(B, Nt(r, B)),
|
|
2838
|
-
|
|
2837
|
+
if (B._ts && (Tr(B, Nt(r, B)), Sr = ce.frame), ce.frame >= ji) {
|
|
2838
|
+
ji += he.autoSleep || 120;
|
|
2839
2839
|
var n = B._first;
|
|
2840
2840
|
if ((!n || !n._ts) && he.autoSleep && ce._listeners.length < 2) {
|
|
2841
2841
|
for (; n && !n._ts; )
|
|
@@ -2852,7 +2852,7 @@ pe(te.prototype, {
|
|
|
2852
2852
|
});
|
|
2853
2853
|
var na = function(e, t, i, r, n, a, o) {
|
|
2854
2854
|
var l = new ne(this._pt, e, t, 0, 1, rn, null, n), u = 0, c = 0, h, p, f, m, d, g, b, y;
|
|
2855
|
-
for (l.b = i, l.e = r, i += "", r += "", (b = ~r.indexOf("random(")) && (r =
|
|
2855
|
+
for (l.b = i, l.e = r, i += "", r += "", (b = ~r.indexOf("random(")) && (r = vt(r)), a && (y = [i, r], a(y, e, t), i = y[0], r = y[1]), p = i.match(Wt) || []; h = Wt.exec(r); )
|
|
2856
2856
|
m = h[0], d = r.substring(u, h.index), f ? f = (f + 1) % 5 : d.substr(-5) === "rgba(" && (f = 1), m !== p[c++] && (g = parseFloat(p[c - 1]) || 0, l._pt = {
|
|
2857
2857
|
_next: l._pt,
|
|
2858
2858
|
p: d || c === 1 ? d : ",",
|
|
@@ -2861,12 +2861,12 @@ var na = function(e, t, i, r, n, a, o) {
|
|
|
2861
2861
|
c: m.charAt(1) === "=" ? it(g, m) - g : parseFloat(m) - g,
|
|
2862
2862
|
m: f && f < 4 ? Math.round : 0
|
|
2863
2863
|
}, u = Wt.lastIndex);
|
|
2864
|
-
return l.c = u < r.length ? r.substring(u, r.length) : "", l.fp = o, (
|
|
2865
|
-
},
|
|
2864
|
+
return l.c = u < r.length ? r.substring(u, r.length) : "", l.fp = o, (_r.test(r) || b) && (l.e = 0), this._pt = l, l;
|
|
2865
|
+
}, Li = function(e, t, i, r, n, a, o, l, u, c) {
|
|
2866
2866
|
G(r) && (r = r(n || 0, e, a));
|
|
2867
|
-
var h = e[t], p = i !== "get" ? i : G(h) ? u ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](u) : e[t]() : h, f = G(h) ? u ? ca : en :
|
|
2868
|
-
if (W(r) && (~r.indexOf("random(") && (r =
|
|
2869
|
-
return !isNaN(p * r) && r !== "" ? (m = new ne(this._pt, e, t, +p || 0, r - (p || 0), typeof h == "boolean" ? ha : tn, 0, f), u && (m.fp = u), o && m.modifier(o, this, e), this._pt = m) : (!h && !(t in e) &&
|
|
2867
|
+
var h = e[t], p = i !== "get" ? i : G(h) ? u ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](u) : e[t]() : h, f = G(h) ? u ? ca : en : Ii, m;
|
|
2868
|
+
if (W(r) && (~r.indexOf("random(") && (r = vt(r)), r.charAt(1) === "=" && (m = it(p, r) + (K(p) || 0), (m || m === 0) && (r = m))), !c || p !== r || pi)
|
|
2869
|
+
return !isNaN(p * r) && r !== "" ? (m = new ne(this._pt, e, t, +p || 0, r - (p || 0), typeof h == "boolean" ? ha : tn, 0, f), u && (m.fp = u), o && m.modifier(o, this, e), this._pt = m) : (!h && !(t in e) && Pi(t, r), na.call(this, e, t, p, r, f, l || he.stringFilter, u));
|
|
2870
2870
|
}, aa = function(e, t, i, r, n) {
|
|
2871
2871
|
if (G(e) && (e = gt(e, n, t, i, r)), !Pe(e) || e.style && e.nodeType || J(e) || xr(e))
|
|
2872
2872
|
return W(e) ? gt(e, n, t, i, r) : e;
|
|
@@ -2880,10 +2880,10 @@ var na = function(e, t, i, r, n, a, o) {
|
|
|
2880
2880
|
for (u = i._ptLookup[i._targets.indexOf(n)], c = o._props.length; c--; )
|
|
2881
2881
|
u[o._props[c]] = l;
|
|
2882
2882
|
return o;
|
|
2883
|
-
}, Le, pi,
|
|
2884
|
-
var r = e.vars, n = r.ease, a = r.startAt, o = r.immediateRender, l = r.lazy, u = r.onUpdate, c = r.runBackwards, h = r.yoyoEase, p = r.keyframes, f = r.autoRevert, m = e._dur, d = e._startAt, g = e._targets, b = e.parent, y = b && b.data === "nested" ? b.vars.targets : g, x = e._overwrite === "auto" && !_i,
|
|
2885
|
-
if (
|
|
2886
|
-
if (M = g[0] ? He(g[0]).harness : 0, k = M && r[M.prop],
|
|
2883
|
+
}, Le, pi, Di = function s(e, t, i) {
|
|
2884
|
+
var r = e.vars, n = r.ease, a = r.startAt, o = r.immediateRender, l = r.lazy, u = r.onUpdate, c = r.runBackwards, h = r.yoyoEase, p = r.keyframes, f = r.autoRevert, m = e._dur, d = e._startAt, g = e._targets, b = e.parent, y = b && b.data === "nested" ? b.vars.targets : g, x = e._overwrite === "auto" && !_i, _ = e.timeline, v, C, w, P, E, T, L, M, D, R, U, k, O;
|
|
2885
|
+
if (_ && (!p || !n) && (n = "none"), e._ease = We(n, at.ease), e._yEase = h ? Wr(We(h === !0 ? n : h, at.ease)) : 0, h && e._yoyo && !e._repeat && (h = e._yEase, e._yEase = e._ease, e._ease = h), e._from = !_ && !!r.runBackwards, !_ || p && !r.stagger) {
|
|
2886
|
+
if (M = g[0] ? He(g[0]).harness : 0, k = M && r[M.prop], v = Ut(r, Si), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !f ? d.render(-1, !0) : d.revert(c && m ? Dt : Rn), d._lazy = 0), a) {
|
|
2887
2887
|
if (Fe(e._startAt = j.set(g, pe({
|
|
2888
2888
|
data: "isStart",
|
|
2889
2889
|
overwrite: !1,
|
|
@@ -2911,22 +2911,22 @@ var na = function(e, t, i, r, n, a, o) {
|
|
|
2911
2911
|
stagger: 0,
|
|
2912
2912
|
parent: b
|
|
2913
2913
|
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
2914
|
-
},
|
|
2914
|
+
}, v), k && (w[M.prop] = k), Fe(e._startAt = j.set(g, w)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (q ? e._startAt.revert(Dt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
|
|
2915
2915
|
s(e._startAt, z, z);
|
|
2916
2916
|
else if (!t)
|
|
2917
2917
|
return;
|
|
2918
2918
|
}
|
|
2919
2919
|
for (e._pt = e._ptCache = 0, l = m && ie(l) || l && !m, C = 0; C < g.length; C++) {
|
|
2920
|
-
if (E = g[C], L = E._gsap ||
|
|
2920
|
+
if (E = g[C], L = E._gsap || Ti(g)[C]._gsap, e._ptLookup[C] = R = {}, si[L.id] && ke.length && zt(), U = y === g ? C : y.indexOf(E), M && (D = new M()).init(E, k || v, e, U, y) !== !1 && (e._pt = P = new ne(e._pt, E, D.name, 0, 1, D.render, D, 0, D.priority), D._props.forEach(function(Z) {
|
|
2921
2921
|
R[Z] = P;
|
|
2922
2922
|
}), D.priority && (T = 1)), !M || k)
|
|
2923
|
-
for (w in
|
|
2924
|
-
le[w] && (D = Kr(w,
|
|
2923
|
+
for (w in v)
|
|
2924
|
+
le[w] && (D = Kr(w, v, e, U, E, y)) ? D.priority && (T = 1) : R[w] = P = Li.call(e, E, w, "get", v[w], U, y, 0, r.stringFilter);
|
|
2925
2925
|
e._op && e._op[C] && e.kill(E, e._op[C]), x && e._pt && (Le = e, B.killTweensOf(E, R, e.globalTime(t)), O = !e.parent, Le = 0), e._pt && l && (si[L.id] = 1);
|
|
2926
2926
|
}
|
|
2927
2927
|
T && nn(e), e._onInit && e._onInit(e);
|
|
2928
2928
|
}
|
|
2929
|
-
e._onUpdate = u, e._initted = (!e._op || e._pt) && !O, p && t <= 0 &&
|
|
2929
|
+
e._onUpdate = u, e._initted = (!e._op || e._pt) && !O, p && t <= 0 && _.render(be, !0, !0);
|
|
2930
2930
|
}, oa = function(e, t, i, r, n, a, o, l) {
|
|
2931
2931
|
var u = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, h, p, f;
|
|
2932
2932
|
if (!u)
|
|
@@ -2935,7 +2935,7 @@ var na = function(e, t, i, r, n, a, o) {
|
|
|
2935
2935
|
for (c = c.d._pt; c && c.p !== t && c.fp !== t; )
|
|
2936
2936
|
c = c._next;
|
|
2937
2937
|
if (!c)
|
|
2938
|
-
return pi = 1, e.vars[t] = "+=0",
|
|
2938
|
+
return pi = 1, e.vars[t] = "+=0", Di(e, o), pi = 0, l ? yt(t + " not eligible for reset") : 1;
|
|
2939
2939
|
u.push(c);
|
|
2940
2940
|
}
|
|
2941
2941
|
for (f = u.length; f--; )
|
|
@@ -2968,7 +2968,7 @@ var na = function(e, t, i, r, n, a, o) {
|
|
|
2968
2968
|
e: n
|
|
2969
2969
|
});
|
|
2970
2970
|
}, gt = function(e, t, i, r, n) {
|
|
2971
|
-
return G(e) ? e.call(t, i, r, n) : W(e) && ~e.indexOf("random(") ?
|
|
2971
|
+
return G(e) ? e.call(t, i, r, n) : W(e) && ~e.indexOf("random(") ? vt(e) : e;
|
|
2972
2972
|
}, Jr = Ai + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", Qr = {};
|
|
2973
2973
|
re(Jr + ",id,stagger,delay,duration,paused,scrollTrigger", function(s) {
|
|
2974
2974
|
return Qr[s] = 1;
|
|
@@ -2978,28 +2978,28 @@ var j = /* @__PURE__ */ (function(s) {
|
|
|
2978
2978
|
function e(i, r, n, a) {
|
|
2979
2979
|
var o;
|
|
2980
2980
|
typeof r == "number" && (n.duration = r, r = n, n = null), o = s.call(this, a ? r : ft(r)) || this;
|
|
2981
|
-
var l = o.vars, u = l.duration, c = l.delay, h = l.immediateRender, p = l.stagger, f = l.overwrite, m = l.keyframes, d = l.defaults, g = l.scrollTrigger, b = l.yoyoEase, y = r.parent || B, x = (J(i) || xr(i) ? Te(i[0]) : "length" in r) ? [i] : ye(i),
|
|
2982
|
-
if (o._targets = x.length ?
|
|
2983
|
-
if (r = o.vars,
|
|
2981
|
+
var l = o.vars, u = l.duration, c = l.delay, h = l.immediateRender, p = l.stagger, f = l.overwrite, m = l.keyframes, d = l.defaults, g = l.scrollTrigger, b = l.yoyoEase, y = r.parent || B, x = (J(i) || xr(i) ? Te(i[0]) : "length" in r) ? [i] : ye(i), _, v, C, w, P, E, T, L;
|
|
2982
|
+
if (o._targets = x.length ? Ti(x) : yt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = f, m || p || At(u) || At(c)) {
|
|
2983
|
+
if (r = o.vars, _ = o.timeline = new te({
|
|
2984
2984
|
data: "nested",
|
|
2985
2985
|
defaults: d || {},
|
|
2986
2986
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
2987
|
-
}),
|
|
2987
|
+
}), _.kill(), _.parent = _._dp = Se(o), _._start = 0, p || At(u) || At(c)) {
|
|
2988
2988
|
if (w = x.length, T = p && zr(p), Pe(p))
|
|
2989
2989
|
for (P in p)
|
|
2990
2990
|
~Jr.indexOf(P) && (L || (L = {}), L[P] = p[P]);
|
|
2991
|
-
for (
|
|
2992
|
-
C = Ut(r, Qr), C.stagger = 0, b && (C.yoyoEase = b), L && ot(C, L), E = x[
|
|
2993
|
-
|
|
2991
|
+
for (v = 0; v < w; v++)
|
|
2992
|
+
C = Ut(r, Qr), C.stagger = 0, b && (C.yoyoEase = b), L && ot(C, L), E = x[v], C.duration = +gt(u, Se(o), v, E, x), C.delay = (+gt(c, Se(o), v, E, x) || 0) - o._delay, !p && w === 1 && C.delay && (o._delay = c = C.delay, o._start += c, C.delay = 0), _.to(E, C, T ? T(v, E, x) : 0), _._ease = I.none;
|
|
2993
|
+
_.duration() ? u = c = 0 : o.timeline = 0;
|
|
2994
2994
|
} else if (m) {
|
|
2995
|
-
ft(pe(
|
|
2995
|
+
ft(pe(_.vars.defaults, {
|
|
2996
2996
|
ease: "none"
|
|
2997
|
-
})),
|
|
2997
|
+
})), _._ease = We(m.ease || r.ease || "none");
|
|
2998
2998
|
var M = 0, D, R, U;
|
|
2999
2999
|
if (J(m))
|
|
3000
3000
|
m.forEach(function(k) {
|
|
3001
|
-
return
|
|
3002
|
-
}),
|
|
3001
|
+
return _.to(x, k, ">");
|
|
3002
|
+
}), _.duration();
|
|
3003
3003
|
else {
|
|
3004
3004
|
C = {};
|
|
3005
3005
|
for (P in m)
|
|
@@ -3007,31 +3007,31 @@ var j = /* @__PURE__ */ (function(s) {
|
|
|
3007
3007
|
for (P in C)
|
|
3008
3008
|
for (D = C[P].sort(function(k, O) {
|
|
3009
3009
|
return k.t - O.t;
|
|
3010
|
-
}), M = 0,
|
|
3011
|
-
R = D[
|
|
3010
|
+
}), M = 0, v = 0; v < D.length; v++)
|
|
3011
|
+
R = D[v], U = {
|
|
3012
3012
|
ease: R.e,
|
|
3013
|
-
duration: (R.t - (
|
|
3014
|
-
}, U[P] = R.v,
|
|
3015
|
-
|
|
3016
|
-
duration: u -
|
|
3013
|
+
duration: (R.t - (v ? D[v - 1].t : 0)) / 100 * u
|
|
3014
|
+
}, U[P] = R.v, _.to(x, U, M), M += U.duration;
|
|
3015
|
+
_.duration() < u && _.to({}, {
|
|
3016
|
+
duration: u - _.duration()
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
|
-
u || o.duration(u =
|
|
3020
|
+
u || o.duration(u = _.duration());
|
|
3021
3021
|
} else
|
|
3022
3022
|
o.timeline = 0;
|
|
3023
|
-
return f === !0 && !_i && (Le =
|
|
3023
|
+
return f === !0 && !_i && (Le = Se(o), B.killTweensOf(x), Le = 0), Ee(y, Se(o), n), r.reversed && o.reverse(), r.paused && o.paused(!0), (h || !u && !m && o._start === H(y._time) && ie(h) && Nn(Se(o)) && y.data !== "nested") && (o._tTime = -z, o.render(Math.max(0, -c) || 0)), g && Rr(Se(o), g), o;
|
|
3024
3024
|
}
|
|
3025
3025
|
var t = e.prototype;
|
|
3026
3026
|
return t.render = function(r, n, a) {
|
|
3027
|
-
var o = this._time, l = this._tDur, u = this._dur, c = r < 0, h = r > l - z && !c ? l : r < z ? 0 : r, p, f, m, d, g, b, y, x,
|
|
3027
|
+
var o = this._time, l = this._tDur, u = this._dur, c = r < 0, h = r > l - z && !c ? l : r < z ? 0 : r, p, f, m, d, g, b, y, x, _;
|
|
3028
3028
|
if (!u)
|
|
3029
3029
|
$n(this, r, n, a);
|
|
3030
3030
|
else if (h !== this._tTime || !r || a || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== c || this._lazy) {
|
|
3031
3031
|
if (p = h, x = this.timeline, this._repeat) {
|
|
3032
3032
|
if (d = u + this._rDelay, this._repeat < -1 && c)
|
|
3033
3033
|
return this.totalTime(d * 100 + r, n, a);
|
|
3034
|
-
if (p = H(h % d), h === l ? (m = this._repeat, p = u) : (g = H(h / d), m = ~~g, m && m === g ? (p = u, m--) : p > u && (p = u)), b = this._yoyo && m & 1, b && (
|
|
3034
|
+
if (p = H(h % d), h === l ? (m = this._repeat, p = u) : (g = H(h / d), m = ~~g, m && m === g ? (p = u, m--) : p > u && (p = u)), b = this._yoyo && m & 1, b && (_ = this._yEase, p = u - p), g = st(this._tTime, d), p === o && !a && this._initted && m === g)
|
|
3035
3035
|
return this._tTime = h, this;
|
|
3036
3036
|
m !== g && (x && this._yEase && Xr(x, b), this.vars.repeatRefresh && !b && !this._lock && p !== d && this._initted && (this._lock = a = 1, this.render(H(d * m), !0).invalidate()._lock = 0));
|
|
3037
3037
|
}
|
|
@@ -3043,7 +3043,7 @@ var j = /* @__PURE__ */ (function(s) {
|
|
|
3043
3043
|
if (u !== this._dur)
|
|
3044
3044
|
return this.render(r, n, a);
|
|
3045
3045
|
}
|
|
3046
|
-
if (this._tTime = h, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (
|
|
3046
|
+
if (this._tTime = h, this._time = p, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (_ || this._ease)(p / u), this._from && (this.ratio = y = 1 - y), !o && h && !n && !g && (ue(this, "onStart"), this._tTime !== h))
|
|
3047
3047
|
return this;
|
|
3048
3048
|
for (f = this._pt; f; )
|
|
3049
3049
|
f.r(y, f.d), f = f._next;
|
|
@@ -3055,9 +3055,9 @@ var j = /* @__PURE__ */ (function(s) {
|
|
|
3055
3055
|
}, t.invalidate = function(r) {
|
|
3056
3056
|
return (!r || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(r), s.prototype.invalidate.call(this, r);
|
|
3057
3057
|
}, t.resetTo = function(r, n, a, o, l) {
|
|
3058
|
-
|
|
3058
|
+
_t || ce.wake(), this._ts || this.play();
|
|
3059
3059
|
var u = Math.min(this._dur, (this._dp._time - this._start) * this._ts), c;
|
|
3060
|
-
return this._initted ||
|
|
3060
|
+
return this._initted || Di(this, u), c = this._ease(u / this._dur), oa(this, r, n, a, o, c, u, l) ? this.resetTo(r, n, a, o, 1) : (Ht(this, 0), this.parent || Dr(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
3061
3061
|
}, t.kill = function(r, n) {
|
|
3062
3062
|
if (n === void 0 && (n = "all"), !r && (!n || n === "all"))
|
|
3063
3063
|
return this._lazy = this._pt = 0, this.parent ? dt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!q), this;
|
|
@@ -3114,7 +3114,7 @@ re("staggerTo,staggerFrom,staggerFromTo", function(s) {
|
|
|
3114
3114
|
return t.splice(s === "staggerFromTo" ? 5 : 4, 0, 0), e[s].apply(e, t);
|
|
3115
3115
|
};
|
|
3116
3116
|
});
|
|
3117
|
-
var
|
|
3117
|
+
var Ii = function(e, t, i) {
|
|
3118
3118
|
return e[t] = i;
|
|
3119
3119
|
}, en = function(e, t, i) {
|
|
3120
3120
|
return e[t](i);
|
|
@@ -3122,8 +3122,8 @@ var Di = function(e, t, i) {
|
|
|
3122
3122
|
return e[t](r.fp, i);
|
|
3123
3123
|
}, ua = function(e, t, i) {
|
|
3124
3124
|
return e.setAttribute(t, i);
|
|
3125
|
-
},
|
|
3126
|
-
return G(e[t]) ? en :
|
|
3125
|
+
}, Ri = function(e, t) {
|
|
3126
|
+
return G(e[t]) ? en : Ei(e[t]) && e.setAttribute ? ua : Ii;
|
|
3127
3127
|
}, tn = function(e, t) {
|
|
3128
3128
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
3129
3129
|
}, ha = function(e, t) {
|
|
@@ -3140,7 +3140,7 @@ var Di = function(e, t, i) {
|
|
|
3140
3140
|
r += t.c;
|
|
3141
3141
|
}
|
|
3142
3142
|
t.set(t.t, t.p, r, t);
|
|
3143
|
-
},
|
|
3143
|
+
}, ki = function(e, t) {
|
|
3144
3144
|
for (var i = t._pt; i; )
|
|
3145
3145
|
i.r(e, i.d), i = i._next;
|
|
3146
3146
|
}, da = function(e, t, i, r) {
|
|
@@ -3161,7 +3161,7 @@ var Di = function(e, t, i) {
|
|
|
3161
3161
|
e._pt = n;
|
|
3162
3162
|
}, ne = /* @__PURE__ */ (function() {
|
|
3163
3163
|
function s(t, i, r, n, a, o, l, u, c) {
|
|
3164
|
-
this.t = i, this.s = n, this.c = a, this.p = r, this.r = o || tn, this.d = l || this, this.set = u ||
|
|
3164
|
+
this.t = i, this.s = n, this.c = a, this.p = r, this.r = o || tn, this.d = l || this, this.set = u || Ii, this.pr = c || 0, this._next = t, t && (t._prev = this);
|
|
3165
3165
|
}
|
|
3166
3166
|
var e = s.prototype;
|
|
3167
3167
|
return e.modifier = function(i, r, n) {
|
|
@@ -3169,7 +3169,7 @@ var Di = function(e, t, i) {
|
|
|
3169
3169
|
}, s;
|
|
3170
3170
|
})();
|
|
3171
3171
|
re(Ai + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(s) {
|
|
3172
|
-
return
|
|
3172
|
+
return Si[s] = 1;
|
|
3173
3173
|
});
|
|
3174
3174
|
de.TweenMax = de.TweenLite = j;
|
|
3175
3175
|
de.TimelineLite = de.TimelineMax = te;
|
|
@@ -3181,22 +3181,22 @@ B = new te({
|
|
|
3181
3181
|
smoothChildTiming: !0
|
|
3182
3182
|
});
|
|
3183
3183
|
he.stringFilter = Yr;
|
|
3184
|
-
var Xe = [], Rt = {}, ma = [],
|
|
3184
|
+
var Xe = [], Rt = {}, ma = [], Zi = 0, ga = 0, Jt = function(e) {
|
|
3185
3185
|
return (Rt[e] || ma).map(function(t) {
|
|
3186
3186
|
return t();
|
|
3187
3187
|
});
|
|
3188
3188
|
}, fi = function() {
|
|
3189
3189
|
var e = Date.now(), t = [];
|
|
3190
|
-
e -
|
|
3190
|
+
e - Zi > 2 && (Jt("matchMediaInit"), Xe.forEach(function(i) {
|
|
3191
3191
|
var r = i.queries, n = i.conditions, a, o, l, u;
|
|
3192
3192
|
for (o in r)
|
|
3193
|
-
a =
|
|
3193
|
+
a = _e.matchMedia(r[o]).matches, a && (l = 1), a !== n[o] && (n[o] = a, u = 1);
|
|
3194
3194
|
u && (i.revert(), l && t.push(i));
|
|
3195
3195
|
}), Jt("matchMediaRevert"), t.forEach(function(i) {
|
|
3196
3196
|
return i.onMatch(i, function(r) {
|
|
3197
3197
|
return i.add(null, r);
|
|
3198
3198
|
});
|
|
3199
|
-
}),
|
|
3199
|
+
}), Zi = e, Jt("matchMedia"));
|
|
3200
3200
|
}, an = /* @__PURE__ */ (function() {
|
|
3201
3201
|
function s(t, i) {
|
|
3202
3202
|
this.selector = i && hi(i), this.data = [], this._r = [], this.isReverted = !1, this.id = ga++, t && this.add(t);
|
|
@@ -3262,7 +3262,7 @@ var Xe = [], Rt = {}, ma = [], qi = 0, ga = 0, Jt = function(e) {
|
|
|
3262
3262
|
var a = new an(0, n || this.scope), o = a.conditions = {}, l, u, c;
|
|
3263
3263
|
N && !a.selector && (a.selector = N.selector), this.contexts.push(a), r = a.add("onMatch", r), a.queries = i;
|
|
3264
3264
|
for (u in i)
|
|
3265
|
-
u === "all" ? c = 1 : (l =
|
|
3265
|
+
u === "all" ? c = 1 : (l = _e.matchMedia(i[u]), l && (Xe.indexOf(a) < 0 && Xe.push(a), (o[u] = l.matches) && (c = 1), l.addListener ? l.addListener(fi) : l.addEventListener("change", fi)));
|
|
3266
3266
|
return c && r(a, function(h) {
|
|
3267
3267
|
return a.add(null, h);
|
|
3268
3268
|
}), this;
|
|
@@ -3307,7 +3307,7 @@ var Xe = [], Rt = {}, ma = [], qi = 0, ga = 0, Jt = function(e) {
|
|
|
3307
3307
|
e = e[0] || {};
|
|
3308
3308
|
var a = le[t], o = He(e), l = o.harness && (o.harness.aliases || {})[t] || t, u = a ? function(c) {
|
|
3309
3309
|
var h = new a();
|
|
3310
|
-
et._pt = 0, h.init(e, i ? c + i : c, et, 0, [e]), h.render(1, h), et._pt &&
|
|
3310
|
+
et._pt = 0, h.init(e, i ? c + i : c, et, 0, [e]), h.render(1, h), et._pt && ki(1, et);
|
|
3311
3311
|
} : o.set(e, l);
|
|
3312
3312
|
return a ? u : function(c) {
|
|
3313
3313
|
return u(e, l, i ? c + i : c, o, 1);
|
|
@@ -3323,10 +3323,10 @@ var Xe = [], Rt = {}, ma = [], qi = 0, ga = 0, Jt = function(e) {
|
|
|
3323
3323
|
return B.getTweensOf(e, !0).length > 0;
|
|
3324
3324
|
},
|
|
3325
3325
|
defaults: function(e) {
|
|
3326
|
-
return e && e.ease && (e.ease = We(e.ease, at.ease)),
|
|
3326
|
+
return e && e.ease && (e.ease = We(e.ease, at.ease)), Hi(at, e || {});
|
|
3327
3327
|
},
|
|
3328
3328
|
config: function(e) {
|
|
3329
|
-
return
|
|
3329
|
+
return Hi(he, e || {});
|
|
3330
3330
|
},
|
|
3331
3331
|
registerEffect: function(e) {
|
|
3332
3332
|
var t = e.name, i = e.effect, r = e.plugins, n = e.defaults, a = e.extendTimeline;
|
|
@@ -3478,7 +3478,7 @@ var ya = function(e, t) {
|
|
|
3478
3478
|
}, Qt("roundProps", di), Qt("modifiers"), Qt("snap", Ur)) || Bt;
|
|
3479
3479
|
j.version = te.version = oe.version = "3.13.0";
|
|
3480
3480
|
wr = 1;
|
|
3481
|
-
|
|
3481
|
+
wi() && ct();
|
|
3482
3482
|
I.Power0;
|
|
3483
3483
|
I.Power1;
|
|
3484
3484
|
I.Power2;
|
|
@@ -3497,9 +3497,9 @@ I.Bounce;
|
|
|
3497
3497
|
I.Sine;
|
|
3498
3498
|
I.Expo;
|
|
3499
3499
|
I.Circ;
|
|
3500
|
-
var
|
|
3500
|
+
var Ki, De, rt, Oi, Ve, Ji, Fi, va = function() {
|
|
3501
3501
|
return typeof window < "u";
|
|
3502
|
-
}, Me = {}, Ge = 180 / Math.PI, nt = Math.PI / 180, Ke = Math.atan2,
|
|
3502
|
+
}, Me = {}, Ge = 180 / Math.PI, nt = Math.PI / 180, Ke = Math.atan2, Qi = 1e8, zi = /([A-Z])/g, _a = /(left|right|width|margin|padding|x)/i, Ea = /[\s,\(]\S/, we = {
|
|
3503
3503
|
autoAlpha: "opacity,visibility",
|
|
3504
3504
|
scale: "scaleX,scaleY",
|
|
3505
3505
|
alpha: "opacity"
|
|
@@ -3516,9 +3516,9 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3516
3516
|
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
3517
3517
|
}, sn = function(e, t) {
|
|
3518
3518
|
return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
|
|
3519
|
-
}, Aa = function(e, t, i) {
|
|
3520
|
-
return e.style[t] = i;
|
|
3521
3519
|
}, Sa = function(e, t, i) {
|
|
3520
|
+
return e.style[t] = i;
|
|
3521
|
+
}, Aa = function(e, t, i) {
|
|
3522
3522
|
return e.style.setProperty(t, i);
|
|
3523
3523
|
}, Ta = function(e, t, i) {
|
|
3524
3524
|
return e._gsap[t] = i;
|
|
@@ -3535,8 +3535,8 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3535
3535
|
if (e in Me && n) {
|
|
3536
3536
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
3537
3537
|
e = we[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
|
|
3538
|
-
return i.tfm[o] =
|
|
3539
|
-
}) : this.tfm[e] = a.x ? a[e] :
|
|
3538
|
+
return i.tfm[o] = Ae(r, o);
|
|
3539
|
+
}) : this.tfm[e] = a.x ? a[e] : Ae(r, e), e === ae && (this.tfm.zOrigin = a.zOrigin);
|
|
3540
3540
|
else
|
|
3541
3541
|
return we.transform.split(",").forEach(function(o) {
|
|
3542
3542
|
return s.call(i, o, t);
|
|
@@ -3551,11 +3551,11 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3551
3551
|
}, Ra = function() {
|
|
3552
3552
|
var e = this.props, t = this.target, i = t.style, r = t._gsap, n, a;
|
|
3553
3553
|
for (n = 0; n < e.length; n += 3)
|
|
3554
|
-
e[n + 1] ? e[n + 1] === 2 ? t[e[n]](e[n + 2]) : t[e[n]] = e[n + 2] : e[n + 2] ? i[e[n]] = e[n + 2] : i.removeProperty(e[n].substr(0, 2) === "--" ? e[n] : e[n].replace(
|
|
3554
|
+
e[n + 1] ? e[n + 1] === 2 ? t[e[n]](e[n + 2]) : t[e[n]] = e[n + 2] : e[n + 2] ? i[e[n]] = e[n + 2] : i.removeProperty(e[n].substr(0, 2) === "--" ? e[n] : e[n].replace(zi, "-$1").toLowerCase());
|
|
3555
3555
|
if (this.tfm) {
|
|
3556
3556
|
for (a in this.tfm)
|
|
3557
3557
|
r[a] = this.tfm[a];
|
|
3558
|
-
r.svg && (r.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), n =
|
|
3558
|
+
r.svg && (r.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), n = Fi(), (!n || !n.isStart) && !i[$] && (ln(i), r.zOrigin && i[ae] && (i[ae] += " " + r.zOrigin + "px", r.zOrigin = 0, r.renderTransform()), r.uncache = 1);
|
|
3559
3559
|
}
|
|
3560
3560
|
}, cn = function(e, t) {
|
|
3561
3561
|
var i = {
|
|
@@ -3572,19 +3572,19 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3572
3572
|
return i && i.style ? i : De.createElement(e);
|
|
3573
3573
|
}, xe = function s(e, t, i) {
|
|
3574
3574
|
var r = getComputedStyle(e);
|
|
3575
|
-
return r[t] || r.getPropertyValue(t.replace(
|
|
3576
|
-
},
|
|
3575
|
+
return r[t] || r.getPropertyValue(t.replace(zi, "-$1").toLowerCase()) || r.getPropertyValue(t) || !i && s(e, ut(t) || t, 1) || "";
|
|
3576
|
+
}, er = "O,Moz,ms,Ms,Webkit".split(","), ut = function(e, t, i) {
|
|
3577
3577
|
var r = t || Ve, n = r.style, a = 5;
|
|
3578
3578
|
if (e in n && !i)
|
|
3579
3579
|
return e;
|
|
3580
|
-
for (e = e.charAt(0).toUpperCase() + e.substr(1); a-- && !(
|
|
3580
|
+
for (e = e.charAt(0).toUpperCase() + e.substr(1); a-- && !(er[a] + e in n); )
|
|
3581
3581
|
;
|
|
3582
|
-
return a < 0 ? null : (a === 3 ? "ms" : a >= 0 ?
|
|
3582
|
+
return a < 0 ? null : (a === 3 ? "ms" : a >= 0 ? er[a] : "") + e;
|
|
3583
3583
|
}, bi = function() {
|
|
3584
|
-
|
|
3584
|
+
va() && window.document && (Ki = window, De = Ki.document, rt = De.documentElement, Ve = gi("div") || {
|
|
3585
3585
|
style: {}
|
|
3586
|
-
}, gi("div"), $ = ut($), ae = $ + "Origin", Ve.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", un = !!ut("perspective"),
|
|
3587
|
-
},
|
|
3586
|
+
}, gi("div"), $ = ut($), ae = $ + "Origin", Ve.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", un = !!ut("perspective"), Fi = oe.core.reverting, Oi = 1);
|
|
3587
|
+
}, tr = function(e) {
|
|
3588
3588
|
var t = e.ownerSVGElement, i = gi("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), r = e.cloneNode(!0), n;
|
|
3589
3589
|
r.style.display = "block", i.appendChild(r), rt.appendChild(i);
|
|
3590
3590
|
try {
|
|
@@ -3592,7 +3592,7 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3592
3592
|
} catch {
|
|
3593
3593
|
}
|
|
3594
3594
|
return i.removeChild(r), rt.removeChild(i), n;
|
|
3595
|
-
},
|
|
3595
|
+
}, ir = function(e, t) {
|
|
3596
3596
|
for (var i = t.length; i--; )
|
|
3597
3597
|
if (e.hasAttribute(t[i]))
|
|
3598
3598
|
return e.getAttribute(t[i]);
|
|
@@ -3601,11 +3601,11 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3601
3601
|
try {
|
|
3602
3602
|
t = e.getBBox();
|
|
3603
3603
|
} catch {
|
|
3604
|
-
t =
|
|
3604
|
+
t = tr(e), i = 1;
|
|
3605
3605
|
}
|
|
3606
|
-
return t && (t.width || t.height) || i || (t =
|
|
3607
|
-
x: +
|
|
3608
|
-
y: +
|
|
3606
|
+
return t && (t.width || t.height) || i || (t = tr(e)), t && !t.width && !t.x && !t.y ? {
|
|
3607
|
+
x: +ir(e, ["x", "cx", "x1"]) || 0,
|
|
3608
|
+
y: +ir(e, ["y", "cy", "y1"]) || 0,
|
|
3609
3609
|
width: 0,
|
|
3610
3610
|
height: 0
|
|
3611
3611
|
} : t;
|
|
@@ -3614,12 +3614,12 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3614
3614
|
}, qe = function(e, t) {
|
|
3615
3615
|
if (t) {
|
|
3616
3616
|
var i = e.style, r;
|
|
3617
|
-
t in Me && t !== ae && (t = $), i.removeProperty ? (r = t.substr(0, 2), (r === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(r === "--" ? t : t.replace(
|
|
3617
|
+
t in Me && t !== ae && (t = $), i.removeProperty ? (r = t.substr(0, 2), (r === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(r === "--" ? t : t.replace(zi, "-$1").toLowerCase())) : i.removeAttribute(t);
|
|
3618
3618
|
}
|
|
3619
3619
|
}, Ie = function(e, t, i, r, n, a) {
|
|
3620
3620
|
var o = new ne(e._pt, t, i, 0, 1, a ? sn : on);
|
|
3621
3621
|
return e._pt = o, o.b = r, o.e = n, e._props.push(i), o;
|
|
3622
|
-
},
|
|
3622
|
+
}, rr = {
|
|
3623
3623
|
deg: 1,
|
|
3624
3624
|
rad: 1,
|
|
3625
3625
|
turn: 1
|
|
@@ -3627,8 +3627,8 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3627
3627
|
grid: 1,
|
|
3628
3628
|
flex: 1
|
|
3629
3629
|
}, ze = function s(e, t, i, r) {
|
|
3630
|
-
var n = parseFloat(i) || 0, a = (i + "").trim().substr((n + "").length) || "px", o = Ve.style, l =
|
|
3631
|
-
if (r === a || !n ||
|
|
3630
|
+
var n = parseFloat(i) || 0, a = (i + "").trim().substr((n + "").length) || "px", o = Ve.style, l = _a.test(t), u = e.tagName.toLowerCase() === "svg", c = (u ? "client" : "offset") + (l ? "Width" : "Height"), h = 100, p = r === "px", f = r === "%", m, d, g, b;
|
|
3631
|
+
if (r === a || !n || rr[r] || rr[a])
|
|
3632
3632
|
return n;
|
|
3633
3633
|
if (a !== "px" && !p && (n = s(e, t, i, "px")), b = e.getCTM && dn(e), (f || a === "%") && (Me[t] || ~t.indexOf("adius")))
|
|
3634
3634
|
return m = b ? e.getBBox()[l ? "width" : "height"] : e[c], V(f ? n / m * h : n / 100 * m);
|
|
@@ -3640,18 +3640,18 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3640
3640
|
} else
|
|
3641
3641
|
(f || a === "%") && !ka[xe(d, "display")] && (o.position = xe(e, "position")), d === e && (o.position = "static"), d.appendChild(Ve), m = Ve[c], d.removeChild(Ve), o.position = "absolute";
|
|
3642
3642
|
return l && f && (g = He(d), g.time = ce.time, g.width = d[c]), V(p ? m * n / h : m && n ? h / m * n : 0);
|
|
3643
|
-
},
|
|
3643
|
+
}, Ae = function(e, t, i, r) {
|
|
3644
3644
|
var n;
|
|
3645
|
-
return
|
|
3645
|
+
return Oi || bi(), t in we && t !== "transform" && (t = we[t], ~t.indexOf(",") && (t = t.split(",")[0])), Me[t] && t !== "transform" ? (n = Ct(e, r), n = t !== "transformOrigin" ? n[t] : n.svg ? n.origin : Gt(xe(e, ae)) + " " + n.zOrigin + "px") : (n = e.style[t], (!n || n === "auto" || r || ~(n + "").indexOf("calc(")) && (n = $t[t] && $t[t](e, t, i) || xe(e, t) || Ar(e, t) || (t === "opacity" ? 1 : 0))), i && !~(n + "").trim().indexOf(" ") ? ze(e, t, n, i) + i : n;
|
|
3646
3646
|
}, Oa = function(e, t, i, r) {
|
|
3647
3647
|
if (!i || i === "none") {
|
|
3648
3648
|
var n = ut(t, e, 1), a = n && xe(e, n, 1);
|
|
3649
3649
|
a && a !== i ? (t = n, i = a) : t === "borderColor" && (i = xe(e, "borderTopColor"));
|
|
3650
3650
|
}
|
|
3651
|
-
var o = new ne(this._pt, e.style, t, 0, 1, rn), l = 0, u = 0, c, h, p, f, m, d, g, b, y, x,
|
|
3652
|
-
if (o.b = i, o.e = r, i += "", r += "", r.substring(0, 6) === "var(--" && (r = xe(e, r.substring(4, r.indexOf(")")))), r === "auto" && (d = e.style[t], e.style[t] = r, r = xe(e, t) || r, d ? e.style[t] = d : qe(e, t)), c = [i, r], Yr(c), i = c[0], r = c[1], p = i.match(Qe) || [],
|
|
3651
|
+
var o = new ne(this._pt, e.style, t, 0, 1, rn), l = 0, u = 0, c, h, p, f, m, d, g, b, y, x, _, v;
|
|
3652
|
+
if (o.b = i, o.e = r, i += "", r += "", r.substring(0, 6) === "var(--" && (r = xe(e, r.substring(4, r.indexOf(")")))), r === "auto" && (d = e.style[t], e.style[t] = r, r = xe(e, t) || r, d ? e.style[t] = d : qe(e, t)), c = [i, r], Yr(c), i = c[0], r = c[1], p = i.match(Qe) || [], v = r.match(Qe) || [], v.length) {
|
|
3653
3653
|
for (; h = Qe.exec(r); )
|
|
3654
|
-
g = h[0], y = r.substring(l, h.index), m ? m = (m + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (m = 1), g !== (d = p[u++] || "") && (f = parseFloat(d) || 0,
|
|
3654
|
+
g = h[0], y = r.substring(l, h.index), m ? m = (m + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (m = 1), g !== (d = p[u++] || "") && (f = parseFloat(d) || 0, _ = d.substr((f + "").length), g.charAt(1) === "=" && (g = it(f, g) + _), b = parseFloat(g), x = g.substr((b + "").length), l = Qe.lastIndex - x.length, x || (x = x || he.units[t] || _, l === r.length && (r += x, o.e += x)), _ !== x && (f = ze(e, t, d, x) || 0), o._pt = {
|
|
3655
3655
|
_next: o._pt,
|
|
3656
3656
|
p: y || u === 1 ? y : ",",
|
|
3657
3657
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
@@ -3662,8 +3662,8 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3662
3662
|
o.c = l < r.length ? r.substring(l, r.length) : "";
|
|
3663
3663
|
} else
|
|
3664
3664
|
o.r = t === "display" && r === "none" ? sn : on;
|
|
3665
|
-
return
|
|
3666
|
-
},
|
|
3665
|
+
return _r.test(r) && (o.e = 0), this._pt = o, o;
|
|
3666
|
+
}, nr = {
|
|
3667
3667
|
top: "0%",
|
|
3668
3668
|
bottom: "100%",
|
|
3669
3669
|
left: "0%",
|
|
@@ -3671,7 +3671,7 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3671
3671
|
center: "50%"
|
|
3672
3672
|
}, Fa = function(e) {
|
|
3673
3673
|
var t = e.split(" "), i = t[0], r = t[1] || "50%";
|
|
3674
|
-
return (i === "top" || i === "bottom" || r === "left" || r === "right") && (e = i, i = r, r = e), t[0] =
|
|
3674
|
+
return (i === "top" || i === "bottom" || r === "left" || r === "right") && (e = i, i = r, r = e), t[0] = nr[i] || i, t[1] = nr[r] || r, t.join(" ");
|
|
3675
3675
|
}, za = function(e, t) {
|
|
3676
3676
|
if (t.tween && t.tween._time === t.tween._dur) {
|
|
3677
3677
|
var i = t.t, r = i.style, n = t.u, a = i._gsap, o, l, u;
|
|
@@ -3754,21 +3754,21 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3754
3754
|
*/
|
|
3755
3755
|
}, wt = [1, 0, 0, 1, 0, 0], pn = {}, fn = function(e) {
|
|
3756
3756
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
3757
|
-
},
|
|
3757
|
+
}, ar = function(e) {
|
|
3758
3758
|
var t = xe(e, $);
|
|
3759
|
-
return fn(t) ? wt : t.substr(7).match(
|
|
3760
|
-
},
|
|
3761
|
-
var i = e._gsap || He(e), r = e.style, n =
|
|
3762
|
-
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, n = [l.a, l.b, l.c, l.d, l.e, l.f], n.join(",") === "1,0,0,1,0,0" ? wt : n) : (n === wt && !e.offsetParent && e !== rt && !i.svg && (l = r.display, r.display = "block", a = e.parentNode, (!a || !e.offsetParent && !e.getBoundingClientRect().width) && (u = 1, o = e.nextElementSibling, rt.appendChild(e)), n =
|
|
3759
|
+
return fn(t) ? wt : t.substr(7).match(vr).map(V);
|
|
3760
|
+
}, Ui = function(e, t) {
|
|
3761
|
+
var i = e._gsap || He(e), r = e.style, n = ar(e), a, o, l, u;
|
|
3762
|
+
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, n = [l.a, l.b, l.c, l.d, l.e, l.f], n.join(",") === "1,0,0,1,0,0" ? wt : n) : (n === wt && !e.offsetParent && e !== rt && !i.svg && (l = r.display, r.display = "block", a = e.parentNode, (!a || !e.offsetParent && !e.getBoundingClientRect().width) && (u = 1, o = e.nextElementSibling, rt.appendChild(e)), n = ar(e), l ? r.display = l : qe(e, "display"), u && (o ? a.insertBefore(e, o) : a ? a.appendChild(e) : rt.removeChild(e))), t && n.length > 6 ? [n[0], n[1], n[4], n[5], n[12], n[13]] : n);
|
|
3763
3763
|
}, yi = function(e, t, i, r, n, a) {
|
|
3764
|
-
var o = e._gsap, l = n ||
|
|
3765
|
-
i ? l !== wt && (w = f * g - m * d) && (P =
|
|
3764
|
+
var o = e._gsap, l = n || Ui(e, !0), u = o.xOrigin || 0, c = o.yOrigin || 0, h = o.xOffset || 0, p = o.yOffset || 0, f = l[0], m = l[1], d = l[2], g = l[3], b = l[4], y = l[5], x = t.split(" "), _ = parseFloat(x[0]) || 0, v = parseFloat(x[1]) || 0, C, w, P, E;
|
|
3765
|
+
i ? l !== wt && (w = f * g - m * d) && (P = _ * (g / w) + v * (-d / w) + (d * y - g * b) / w, E = _ * (-m / w) + v * (f / w) - (f * y - m * b) / w, _ = P, v = E) : (C = hn(e), _ = C.x + (~x[0].indexOf("%") ? _ / 100 * C.width : _), v = C.y + (~(x[1] || x[0]).indexOf("%") ? v / 100 * C.height : v)), r || r !== !1 && o.smooth ? (b = _ - u, y = v - c, o.xOffset = h + (b * f + y * d) - b, o.yOffset = p + (b * m + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = _, o.yOrigin = v, o.smooth = !!r, o.origin = t, o.originIsAbsolute = !!i, e.style[ae] = "0px 0px", a && (Ie(a, o, "xOrigin", u, _), Ie(a, o, "yOrigin", c, v), Ie(a, o, "xOffset", h, o.xOffset), Ie(a, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", _ + " " + v);
|
|
3766
3766
|
}, Ct = function(e, t) {
|
|
3767
3767
|
var i = e._gsap || new Zr(e);
|
|
3768
3768
|
if ("x" in i && !t && !i.uncache)
|
|
3769
3769
|
return i;
|
|
3770
|
-
var r = e.style, n = i.scaleX < 0, a = "px", o = "deg", l = getComputedStyle(e), u = xe(e, ae) || "0", c, h, p, f, m, d, g, b, y, x,
|
|
3771
|
-
return c = h = p = d = g = b = y = x =
|
|
3770
|
+
var r = e.style, n = i.scaleX < 0, a = "px", o = "deg", l = getComputedStyle(e), u = xe(e, ae) || "0", c, h, p, f, m, d, g, b, y, x, _, v, C, w, P, E, T, L, M, D, R, U, k, O, Z, Ne, A, ve, Q, se, fe, me;
|
|
3771
|
+
return c = h = p = d = g = b = y = x = _ = 0, f = m = 1, i.svg = !!(e.getCTM && dn(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (r[$] = (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[$] : "")), r.scale = r.rotate = r.translate = "none"), w = Ui(e, i.svg), i.svg && (i.uncache ? (Z = e.getBBox(), u = i.xOrigin - Z.x + "px " + (i.yOrigin - Z.y) + "px", O = "") : O = !t && e.getAttribute("data-svg-origin"), yi(e, O || u, !!O || i.originIsAbsolute, i.smooth !== !1, w)), v = i.xOrigin || 0, C = i.yOrigin || 0, w !== wt && (L = w[0], M = w[1], D = w[2], R = w[3], c = U = w[4], h = k = w[5], w.length === 6 ? (f = Math.sqrt(L * L + M * M), m = Math.sqrt(R * R + D * D), d = L || M ? Ke(M, L) * Ge : 0, y = D || R ? Ke(D, R) * Ge + d : 0, y && (m *= Math.abs(Math.cos(y * nt))), i.svg && (c -= v - (v * L + C * D), h -= C - (v * M + C * R))) : (me = w[6], se = w[7], A = w[8], ve = w[9], Q = w[10], fe = w[11], c = w[12], h = w[13], p = w[14], P = Ke(me, Q), g = P * Ge, P && (E = Math.cos(-P), T = Math.sin(-P), O = U * E + A * T, Z = k * E + ve * T, Ne = me * E + Q * T, A = U * -T + A * E, ve = k * -T + ve * E, Q = me * -T + Q * E, fe = se * -T + fe * E, U = O, k = Z, me = Ne), P = Ke(-D, Q), b = P * Ge, P && (E = Math.cos(-P), T = Math.sin(-P), O = L * E - A * T, Z = M * E - ve * T, Ne = D * E - Q * T, fe = R * T + fe * E, L = O, M = Z, D = Ne), P = Ke(M, L), d = P * Ge, P && (E = Math.cos(P), T = Math.sin(P), O = L * E + M * T, Z = U * E + k * T, M = M * E - L * T, k = k * E - U * T, L = O, U = Z), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, b = 180 - b), f = V(Math.sqrt(L * L + M * M + D * D)), m = V(Math.sqrt(k * k + me * me)), P = Ke(U, k), y = Math.abs(P) > 2e-4 ? P * Ge : 0, _ = fe ? 1 / (fe < 0 ? -fe : fe) : 0), i.svg && (O = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !fn(xe(e, $)), O && e.setAttribute("transform", O))), Math.abs(y) > 90 && Math.abs(y) < 270 && (n ? (f *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (m *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = c - ((i.xPercent = c && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-c) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + a, i.y = h - ((i.yPercent = h && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + a, i.z = p + a, i.scaleX = V(f), i.scaleY = V(m), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(b) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = _ + a, (i.zOrigin = parseFloat(u.split(" ")[2]) || !t && i.zOrigin || 0) && (r[ae] = Gt(u)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? Na : un ? mn : Ua, i.uncache = 0, i;
|
|
3772
3772
|
}, Gt = function(e) {
|
|
3773
3773
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
3774
3774
|
}, ei = function(e, t, i) {
|
|
@@ -3777,28 +3777,28 @@ var Zi, De, rt, ki, Ve, Ki, Oi, _a = function() {
|
|
|
3777
3777
|
}, Ua = function(e, t) {
|
|
3778
3778
|
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, mn(e, t);
|
|
3779
3779
|
}, Be = "0deg", ht = "0px", $e = ") ", mn = function(e, t) {
|
|
3780
|
-
var i = t || this, r = i.xPercent, n = i.yPercent, a = i.x, o = i.y, l = i.z, u = i.rotation, c = i.rotationY, h = i.rotationX, p = i.skewX, f = i.skewY, m = i.scaleX, d = i.scaleY, g = i.transformPerspective, b = i.force3D, y = i.target, x = i.zOrigin,
|
|
3780
|
+
var i = t || this, r = i.xPercent, n = i.yPercent, a = i.x, o = i.y, l = i.z, u = i.rotation, c = i.rotationY, h = i.rotationX, p = i.skewX, f = i.skewY, m = i.scaleX, d = i.scaleY, g = i.transformPerspective, b = i.force3D, y = i.target, x = i.zOrigin, _ = "", v = b === "auto" && e && e !== 1 || b === !0;
|
|
3781
3781
|
if (x && (h !== Be || c !== Be)) {
|
|
3782
3782
|
var C = parseFloat(c) * nt, w = Math.sin(C), P = Math.cos(C), E;
|
|
3783
3783
|
C = parseFloat(h) * nt, E = Math.cos(C), a = ei(y, a, w * E * -x), o = ei(y, o, -Math.sin(C) * -x), l = ei(y, l, P * E * -x + x);
|
|
3784
3784
|
}
|
|
3785
|
-
g !== ht && (
|
|
3785
|
+
g !== ht && (_ += "perspective(" + g + $e), (r || n) && (_ += "translate(" + r + "%, " + n + "%) "), (v || a !== ht || o !== ht || l !== ht) && (_ += l !== ht || v ? "translate3d(" + a + ", " + o + ", " + l + ") " : "translate(" + a + ", " + o + $e), u !== Be && (_ += "rotate(" + u + $e), c !== Be && (_ += "rotateY(" + c + $e), h !== Be && (_ += "rotateX(" + h + $e), (p !== Be || f !== Be) && (_ += "skew(" + p + ", " + f + $e), (m !== 1 || d !== 1) && (_ += "scale(" + m + ", " + d + $e), y.style[$] = _ || "translate(0, 0)";
|
|
3786
3786
|
}, Na = function(e, t) {
|
|
3787
|
-
var i = t || this, r = i.xPercent, n = i.yPercent, a = i.x, o = i.y, l = i.rotation, u = i.skewX, c = i.skewY, h = i.scaleX, p = i.scaleY, f = i.target, m = i.xOrigin, d = i.yOrigin, g = i.xOffset, b = i.yOffset, y = i.forceCSS, x = parseFloat(a),
|
|
3788
|
-
l = parseFloat(l), u = parseFloat(u), c = parseFloat(c), c && (c = parseFloat(c), u += c, l += c), l || u ? (l *= nt, u *= nt,
|
|
3787
|
+
var i = t || this, r = i.xPercent, n = i.yPercent, a = i.x, o = i.y, l = i.rotation, u = i.skewX, c = i.skewY, h = i.scaleX, p = i.scaleY, f = i.target, m = i.xOrigin, d = i.yOrigin, g = i.xOffset, b = i.yOffset, y = i.forceCSS, x = parseFloat(a), _ = parseFloat(o), v, C, w, P, E;
|
|
3788
|
+
l = parseFloat(l), u = parseFloat(u), c = parseFloat(c), c && (c = parseFloat(c), u += c, l += c), l || u ? (l *= nt, u *= nt, v = Math.cos(l) * h, C = Math.sin(l) * h, w = Math.sin(l - u) * -p, P = Math.cos(l - u) * p, u && (c *= nt, E = Math.tan(u - c), E = Math.sqrt(1 + E * E), w *= E, P *= E, c && (E = Math.tan(c), E = Math.sqrt(1 + E * E), v *= E, C *= E)), v = V(v), C = V(C), w = V(w), P = V(P)) : (v = h, P = p, C = w = 0), (x && !~(a + "").indexOf("px") || _ && !~(o + "").indexOf("px")) && (x = ze(f, "x", a, "px"), _ = ze(f, "y", o, "px")), (m || d || g || b) && (x = V(x + m - (m * v + d * w) + g), _ = V(_ + d - (m * C + d * P) + b)), (r || n) && (E = f.getBBox(), x = V(x + r / 100 * E.width), _ = V(_ + n / 100 * E.height)), E = "matrix(" + v + "," + C + "," + w + "," + P + "," + x + "," + _ + ")", f.setAttribute("transform", E), y && (f.style[$] = E);
|
|
3789
3789
|
}, Ba = function(e, t, i, r, n) {
|
|
3790
3790
|
var a = 360, o = W(n), l = parseFloat(n) * (o && ~n.indexOf("rad") ? Ge : 1), u = l - r, c = r + u + "deg", h, p;
|
|
3791
|
-
return o && (h = n.split("_")[1], h === "short" && (u %= a, u !== u % (a / 2) && (u += u < 0 ? a : -a)), h === "cw" && u < 0 ? u = (u + a *
|
|
3792
|
-
},
|
|
3791
|
+
return o && (h = n.split("_")[1], h === "short" && (u %= a, u !== u % (a / 2) && (u += u < 0 ? a : -a)), h === "cw" && u < 0 ? u = (u + a * Qi) % a - ~~(u / a) * a : h === "ccw" && u > 0 && (u = (u - a * Qi) % a - ~~(u / a) * a)), e._pt = p = new ne(e._pt, t, i, r, u, wa), p.e = c, p.u = "deg", e._props.push(i), p;
|
|
3792
|
+
}, or = function(e, t) {
|
|
3793
3793
|
for (var i in t)
|
|
3794
3794
|
e[i] = t[i];
|
|
3795
3795
|
return e;
|
|
3796
3796
|
}, $a = function(e, t, i) {
|
|
3797
|
-
var r =
|
|
3797
|
+
var r = or({}, i._gsap), n = "perspective,force3D,transformOrigin,svgOrigin", a = i.style, o, l, u, c, h, p, f, m;
|
|
3798
3798
|
r.svg ? (u = i.getAttribute("transform"), i.setAttribute("transform", ""), a[$] = t, o = Ct(i, 1), qe(i, $), i.setAttribute("transform", u)) : (u = getComputedStyle(i)[$], a[$] = t, o = Ct(i, 1), a[$] = u);
|
|
3799
3799
|
for (l in Me)
|
|
3800
3800
|
u = r[l], c = o[l], u !== c && n.indexOf(l) < 0 && (f = K(u), m = K(c), h = f !== m ? ze(i, l, u, m) : parseFloat(u), p = parseFloat(c), e._pt = new ne(e._pt, o, l, h, p - h, mi), e._pt.u = m || 0, e._props.push(l));
|
|
3801
|
-
|
|
3801
|
+
or(o, r);
|
|
3802
3802
|
};
|
|
3803
3803
|
re("padding,margin,Width,Radius", function(s, e) {
|
|
3804
3804
|
var t = "Top", i = "Right", r = "Bottom", n = "Left", a = (e < 3 ? [t, i, r, n] : [t + n, t + i, r + i, r + n]).map(function(o) {
|
|
@@ -3808,7 +3808,7 @@ re("padding,margin,Width,Radius", function(s, e) {
|
|
|
3808
3808
|
var p, f;
|
|
3809
3809
|
if (arguments.length < 4)
|
|
3810
3810
|
return p = a.map(function(m) {
|
|
3811
|
-
return
|
|
3811
|
+
return Ae(o, m, u);
|
|
3812
3812
|
}), f = p.join(" "), f.split(p[0]).length === 5 ? p[0] : f;
|
|
3813
3813
|
p = (c + "").split(" "), f = {}, a.forEach(function(m, d) {
|
|
3814
3814
|
return f[m] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
@@ -3822,32 +3822,32 @@ var gn = {
|
|
|
3822
3822
|
return e.style && e.nodeType;
|
|
3823
3823
|
},
|
|
3824
3824
|
init: function(e, t, i, r, n) {
|
|
3825
|
-
var a = this._props, o = e.style, l = i.vars.startAt, u, c, h, p, f, m, d, g, b, y, x,
|
|
3826
|
-
|
|
3825
|
+
var a = this._props, o = e.style, l = i.vars.startAt, u, c, h, p, f, m, d, g, b, y, x, _, v, C, w, P;
|
|
3826
|
+
Oi || bi(), this.styles = this.styles || cn(e), P = this.styles.props, this.tween = i;
|
|
3827
3827
|
for (d in t)
|
|
3828
3828
|
if (d !== "autoRound" && (c = t[d], !(le[d] && Kr(d, t, i, r, e, n)))) {
|
|
3829
|
-
if (f = typeof c, m = $t[d], f === "function" && (c = c.call(i, r, e, n), f = typeof c), f === "string" && ~c.indexOf("random(") && (c =
|
|
3829
|
+
if (f = typeof c, m = $t[d], f === "function" && (c = c.call(i, r, e, n), f = typeof c), f === "string" && ~c.indexOf("random(") && (c = vt(c)), m)
|
|
3830
3830
|
m(this, e, d, c, i) && (w = 1);
|
|
3831
3831
|
else if (d.substr(0, 2) === "--")
|
|
3832
3832
|
u = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(u) || (g = K(u), b = K(c)), b ? g !== b && (u = ze(e, d, u, b) + b) : g && (c += g), this.add(o, "setProperty", u, c, r, n, 0, 0, d), a.push(d), P.push(d, 0, o[d]);
|
|
3833
3833
|
else if (f !== "undefined") {
|
|
3834
|
-
if (l && d in l ? (u = typeof l[d] == "function" ? l[d].call(i, r, e, n) : l[d], W(u) && ~u.indexOf("random(") && (u =
|
|
3835
|
-
if (this.styles.save(d), f === "string" && c.substring(0, 6) === "var(--" && (c = xe(e, c.substring(4, c.indexOf(")"))), h = parseFloat(c)),
|
|
3836
|
-
this._pt = new ne(this._pt,
|
|
3834
|
+
if (l && d in l ? (u = typeof l[d] == "function" ? l[d].call(i, r, e, n) : l[d], W(u) && ~u.indexOf("random(") && (u = vt(u)), K(u + "") || u === "auto" || (u += he.units[d] || K(Ae(e, d)) || ""), (u + "").charAt(1) === "=" && (u = Ae(e, d))) : u = Ae(e, d), p = parseFloat(u), y = f === "string" && c.charAt(1) === "=" && c.substr(0, 2), y && (c = c.substr(2)), h = parseFloat(c), d in we && (d === "autoAlpha" && (p === 1 && Ae(e, "visibility") === "hidden" && h && (p = 0), P.push("visibility", 0, o.visibility), Ie(this, o, "visibility", p ? "inherit" : "hidden", h ? "inherit" : "hidden", !h)), d !== "scale" && d !== "transform" && (d = we[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Me, x) {
|
|
3835
|
+
if (this.styles.save(d), f === "string" && c.substring(0, 6) === "var(--" && (c = xe(e, c.substring(4, c.indexOf(")"))), h = parseFloat(c)), _ || (v = e._gsap, v.renderTransform && !t.parseTransform || Ct(e, t.parseTransform), C = t.smoothOrigin !== !1 && v.smooth, _ = this._pt = new ne(this._pt, o, $, 0, 1, v.renderTransform, v, 0, -1), _.dep = 1), d === "scale")
|
|
3836
|
+
this._pt = new ne(this._pt, v, "scaleY", v.scaleY, (y ? it(v.scaleY, y + h) : h) - v.scaleY || 0, mi), this._pt.u = 0, a.push("scaleY", d), d += "X";
|
|
3837
3837
|
else if (d === "transformOrigin") {
|
|
3838
|
-
P.push(ae, 0, o[ae]), c = Fa(c),
|
|
3838
|
+
P.push(ae, 0, o[ae]), c = Fa(c), v.svg ? yi(e, c, 0, C, 0, this) : (b = parseFloat(c.split(" ")[2]) || 0, b !== v.zOrigin && Ie(this, v, "zOrigin", v.zOrigin, b), Ie(this, o, d, Gt(u), Gt(c)));
|
|
3839
3839
|
continue;
|
|
3840
3840
|
} else if (d === "svgOrigin") {
|
|
3841
3841
|
yi(e, c, 1, C, 0, this);
|
|
3842
3842
|
continue;
|
|
3843
3843
|
} else if (d in pn) {
|
|
3844
|
-
Ba(this,
|
|
3844
|
+
Ba(this, v, d, p, y ? it(p, y + c) : c);
|
|
3845
3845
|
continue;
|
|
3846
3846
|
} else if (d === "smoothOrigin") {
|
|
3847
|
-
Ie(this,
|
|
3847
|
+
Ie(this, v, "smooth", v.smooth, c);
|
|
3848
3848
|
continue;
|
|
3849
3849
|
} else if (d === "force3D") {
|
|
3850
|
-
|
|
3850
|
+
v[d] = c;
|
|
3851
3851
|
continue;
|
|
3852
3852
|
} else if (d === "transform") {
|
|
3853
3853
|
$a(this, c, e);
|
|
@@ -3855,13 +3855,13 @@ var gn = {
|
|
|
3855
3855
|
}
|
|
3856
3856
|
} else d in o || (d = ut(d) || d);
|
|
3857
3857
|
if (x || (h || h === 0) && (p || p === 0) && !Ea.test(c) && d in o)
|
|
3858
|
-
g = (u + "").substr((p + "").length), h || (h = 0), b = K(c) || (d in he.units ? he.units[d] : g), g !== b && (p = ze(e, d, u, b)), this._pt = new ne(this._pt, x ?
|
|
3858
|
+
g = (u + "").substr((p + "").length), h || (h = 0), b = K(c) || (d in he.units ? he.units[d] : g), g !== b && (p = ze(e, d, u, b)), this._pt = new ne(this._pt, x ? v : o, d, p, (y ? it(p, y + h) : h) - p, !x && (b === "px" || d === "zIndex") && t.autoRound !== !1 ? Pa : mi), this._pt.u = b || 0, g !== b && b !== "%" && (this._pt.b = u, this._pt.r = Ca);
|
|
3859
3859
|
else if (d in o)
|
|
3860
3860
|
Oa.call(this, e, d, u, y ? y + c : c);
|
|
3861
3861
|
else if (d in e)
|
|
3862
3862
|
this.add(e, d, u || e[d], y ? y + c : c, r, n);
|
|
3863
3863
|
else if (d !== "parseTransform") {
|
|
3864
|
-
|
|
3864
|
+
Pi(d, c);
|
|
3865
3865
|
continue;
|
|
3866
3866
|
}
|
|
3867
3867
|
x || (d in o ? P.push(d, 0, o[d]) : typeof e[d] == "function" ? P.push(d, 2, e[d]()) : P.push(d, 1, u || e[d])), a.push(d);
|
|
@@ -3870,21 +3870,21 @@ var gn = {
|
|
|
3870
3870
|
w && nn(this);
|
|
3871
3871
|
},
|
|
3872
3872
|
render: function(e, t) {
|
|
3873
|
-
if (t.tween._time || !
|
|
3873
|
+
if (t.tween._time || !Fi())
|
|
3874
3874
|
for (var i = t._pt; i; )
|
|
3875
3875
|
i.r(e, i.d), i = i._next;
|
|
3876
3876
|
else
|
|
3877
3877
|
t.styles.revert();
|
|
3878
3878
|
},
|
|
3879
|
-
get:
|
|
3879
|
+
get: Ae,
|
|
3880
3880
|
aliases: we,
|
|
3881
3881
|
getSetter: function(e, t, i) {
|
|
3882
3882
|
var r = we[t];
|
|
3883
|
-
return r && r.indexOf(",") < 0 && (t = r), t in Me && t !== ae && (e._gsap.x ||
|
|
3883
|
+
return r && r.indexOf(",") < 0 && (t = r), t in Me && t !== ae && (e._gsap.x || Ae(e, "x")) ? i && Ji === i ? t === "scale" ? Ma : Ta : (Ji = i || {}) && (t === "scale" ? La : Da) : e.style && !Ei(e.style[t]) ? Sa : ~t.indexOf("-") ? Aa : Ri(e, t);
|
|
3884
3884
|
},
|
|
3885
3885
|
core: {
|
|
3886
3886
|
_removeProperty: qe,
|
|
3887
|
-
_getMatrix:
|
|
3887
|
+
_getMatrix: Ui
|
|
3888
3888
|
}
|
|
3889
3889
|
};
|
|
3890
3890
|
oe.utils.checkPrefix = ut;
|
|
@@ -4271,8 +4271,8 @@ class qa extends Ce {
|
|
|
4271
4271
|
o = y.clientX, l = u = y.clientY, a = !0, c = this.getValue(), h = 0, window.addEventListener("mousemove", m), window.addEventListener("mouseup", d);
|
|
4272
4272
|
}, m = (y) => {
|
|
4273
4273
|
if (a) {
|
|
4274
|
-
const x = y.clientX - o,
|
|
4275
|
-
Math.abs(
|
|
4274
|
+
const x = y.clientX - o, _ = y.clientY - l;
|
|
4275
|
+
Math.abs(_) > p ? (y.preventDefault(), this.$input.blur(), a = !1, this._setDraggingStyle(!0, "vertical")) : Math.abs(x) > p && d();
|
|
4276
4276
|
}
|
|
4277
4277
|
if (!a) {
|
|
4278
4278
|
const x = y.clientY - u;
|
|
@@ -4290,7 +4290,7 @@ class qa extends Ce {
|
|
|
4290
4290
|
}
|
|
4291
4291
|
_initSlider() {
|
|
4292
4292
|
this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("lil-slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("lil-fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("lil-has-slider");
|
|
4293
|
-
const e = (b, y, x,
|
|
4293
|
+
const e = (b, y, x, _, v) => (b - y) / (x - y) * (v - _) + _, t = (b) => {
|
|
4294
4294
|
const y = this.$slider.getBoundingClientRect();
|
|
4295
4295
|
let x = e(b, y.left, y.right, this._min, this._max);
|
|
4296
4296
|
this._snapClampSetValue(x);
|
|
@@ -4825,8 +4825,8 @@ function Qa(s) {
|
|
|
4825
4825
|
const t = document.querySelector("head link[rel=stylesheet], head style");
|
|
4826
4826
|
t ? document.head.insertBefore(e, t) : document.head.appendChild(e);
|
|
4827
4827
|
}
|
|
4828
|
-
let
|
|
4829
|
-
class
|
|
4828
|
+
let sr = !1;
|
|
4829
|
+
class Ni {
|
|
4830
4830
|
/**
|
|
4831
4831
|
* Creates a panel that holds controllers.
|
|
4832
4832
|
* @example
|
|
@@ -4875,7 +4875,7 @@ class Ui {
|
|
|
4875
4875
|
this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
|
|
4876
4876
|
return;
|
|
4877
4877
|
}
|
|
4878
|
-
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !
|
|
4878
|
+
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !sr && o && (Qa(Ja), sr = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), r && this.domElement.style.setProperty("--width", r + "px"), this._closeFolders = a;
|
|
4879
4879
|
}
|
|
4880
4880
|
/**
|
|
4881
4881
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -4946,7 +4946,7 @@ class Ui {
|
|
|
4946
4946
|
* @returns {GUI}
|
|
4947
4947
|
*/
|
|
4948
4948
|
addFolder(e) {
|
|
4949
|
-
const t = new
|
|
4949
|
+
const t = new Ni({ parent: this, title: e });
|
|
4950
4950
|
return this.root._closeFolders && t.close(), t;
|
|
4951
4951
|
}
|
|
4952
4952
|
/**
|
|
@@ -5482,7 +5482,7 @@ class tt {
|
|
|
5482
5482
|
const r = this.currentRenderId;
|
|
5483
5483
|
if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, Tt, Mt), this.onTextureUpdate?.(), !this.loaded)
|
|
5484
5484
|
return this.canvas;
|
|
5485
|
-
const n = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e :
|
|
5485
|
+
const n = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e : Sn(e), a = this.countries.length < 1500;
|
|
5486
5486
|
this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
|
|
5487
5487
|
const o = 500, l = this.countries.length;
|
|
5488
5488
|
let u = 0;
|
|
@@ -5871,7 +5871,7 @@ class so {
|
|
|
5871
5871
|
if (!t) return;
|
|
5872
5872
|
const [i, r] = t, n = this.getSizeCategory(e.code), a = document.createElement("div");
|
|
5873
5873
|
a.className = `country-label hidden size-${n}`, a.textContent = e.name;
|
|
5874
|
-
const o = new
|
|
5874
|
+
const o = new $i(a), l = {
|
|
5875
5875
|
element: a,
|
|
5876
5876
|
object: o,
|
|
5877
5877
|
country: e,
|
|
@@ -5895,7 +5895,7 @@ class so {
|
|
|
5895
5895
|
})) return;
|
|
5896
5896
|
const l = t.size || "small", u = document.createElement("div");
|
|
5897
5897
|
u.className = `country-label hidden size-${l} custom-label`, u.textContent = t.name;
|
|
5898
|
-
const c = new
|
|
5898
|
+
const c = new $i(u), h = {
|
|
5899
5899
|
id: t.id,
|
|
5900
5900
|
code: t.id,
|
|
5901
5901
|
name: t.name
|
|
@@ -5923,19 +5923,19 @@ class so {
|
|
|
5923
5923
|
cameraDirection = new S.Vector3();
|
|
5924
5924
|
labelNormal = new S.Vector3();
|
|
5925
5925
|
updateLabelPosition(e, t, i) {
|
|
5926
|
-
const { lat: r, lon: n, element: a } = t, o = (n + 180) / 360, l = (r + 90) / 180, u = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, h = this.sphereRadius + 0.3, p = h * Math.cos(c) * Math.sin(u), f = h * Math.sin(c), m = h * Math.cos(c) * Math.cos(u), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, b = (o - 0.5) * d, y = (l - 0.5) * g, x = 0.3,
|
|
5926
|
+
const { lat: r, lon: n, element: a } = t, o = (n + 180) / 360, l = (r + 90) / 180, u = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, h = this.sphereRadius + 0.3, p = h * Math.cos(c) * Math.sin(u), f = h * Math.sin(c), m = h * Math.cos(c) * Math.cos(u), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, b = (o - 0.5) * d, y = (l - 0.5) * g, x = 0.3, _ = i * i * (3 - 2 * i);
|
|
5927
5927
|
if (this.localPos.set(
|
|
5928
|
-
b +
|
|
5929
|
-
y +
|
|
5930
|
-
x +
|
|
5928
|
+
b + _ * (p - b),
|
|
5929
|
+
y + _ * (f - y),
|
|
5930
|
+
x + _ * (m - x)
|
|
5931
5931
|
), this.globe) {
|
|
5932
5932
|
this.worldPos.copy(this.localPos), this.worldPos.applyMatrix4(this.globe.matrixWorld), e.position.copy(this.worldPos);
|
|
5933
|
-
let
|
|
5934
|
-
this.camera &&
|
|
5933
|
+
let v = 1;
|
|
5934
|
+
this.camera && _ > 0.5 && (this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(p, f, m).normalize(), this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize(), v = this.labelNormal.dot(this.cameraDirection) > 0.15 ? 1 : 0);
|
|
5935
5935
|
let C = 1;
|
|
5936
5936
|
if (this.camera) {
|
|
5937
5937
|
let P = 150;
|
|
5938
|
-
switch (
|
|
5938
|
+
switch (_ > 0.5 ? P = this.camera.position.length() : P = Math.abs(this.camera.position.z), t.sizeCategory) {
|
|
5939
5939
|
case "tiny":
|
|
5940
5940
|
C = 1 - Math.min(1, Math.max(0, (P - 120) / 30));
|
|
5941
5941
|
break;
|
|
@@ -5950,26 +5950,26 @@ class so {
|
|
|
5950
5950
|
break;
|
|
5951
5951
|
}
|
|
5952
5952
|
}
|
|
5953
|
-
const w =
|
|
5953
|
+
const w = v * C;
|
|
5954
5954
|
w < 0.05 ? a.style.opacity = "0" : a.style.opacity = String(w);
|
|
5955
5955
|
} else {
|
|
5956
5956
|
e.position.copy(this.localPos);
|
|
5957
|
-
let
|
|
5957
|
+
let v = 1;
|
|
5958
5958
|
if (this.camera) {
|
|
5959
5959
|
const C = Math.abs(this.camera.position.z);
|
|
5960
5960
|
switch (t.sizeCategory) {
|
|
5961
5961
|
case "tiny":
|
|
5962
|
-
|
|
5962
|
+
v = 1 - Math.min(1, Math.max(0, (C - 120) / 30));
|
|
5963
5963
|
break;
|
|
5964
5964
|
case "small":
|
|
5965
|
-
|
|
5965
|
+
v = 1 - Math.min(1, Math.max(0, (C - 150) / 40));
|
|
5966
5966
|
break;
|
|
5967
5967
|
case "medium":
|
|
5968
|
-
|
|
5968
|
+
v = 1 - Math.min(1, Math.max(0, (C - 200) / 50));
|
|
5969
5969
|
break;
|
|
5970
5970
|
}
|
|
5971
5971
|
}
|
|
5972
|
-
a.style.opacity =
|
|
5972
|
+
a.style.opacity = v < 0.05 ? "0" : String(v);
|
|
5973
5973
|
}
|
|
5974
5974
|
}
|
|
5975
5975
|
/**
|
|
@@ -6087,10 +6087,10 @@ class so {
|
|
|
6087
6087
|
}), this.labels = [], this.labelRenderer.domElement.remove();
|
|
6088
6088
|
}
|
|
6089
6089
|
}
|
|
6090
|
-
let
|
|
6090
|
+
let lr = !1;
|
|
6091
6091
|
function lo() {
|
|
6092
|
-
if (
|
|
6093
|
-
|
|
6092
|
+
if (lr) return;
|
|
6093
|
+
lr = !0;
|
|
6094
6094
|
const s = document.createElement("style");
|
|
6095
6095
|
s.setAttribute("data-gralobe-datagrid", "true"), s.textContent = `
|
|
6096
6096
|
.gralobe-datagrid-overlay {
|
|
@@ -6290,34 +6290,34 @@ function bn(s = 256) {
|
|
|
6290
6290
|
t = new Uint8Array(r), e > 0 && t.set(o.subarray(0, e), 0);
|
|
6291
6291
|
}
|
|
6292
6292
|
}
|
|
6293
|
-
var ii = 12,
|
|
6294
|
-
function po(s, e, t, i, r = bn(512), n = new Uint8Array(256), a = new Int32Array(
|
|
6293
|
+
var ii = 12, cr = 5003, ho = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
6294
|
+
function po(s, e, t, i, r = bn(512), n = new Uint8Array(256), a = new Int32Array(cr), o = new Int32Array(cr)) {
|
|
6295
6295
|
let l = a.length, u = Math.max(2, i);
|
|
6296
6296
|
n.fill(0), o.fill(0), a.fill(-1);
|
|
6297
|
-
let c = 0, h = 0, p = u + 1, f = p, m = !1, d = f, g = (1 << d) - 1, b = 1 << p - 1, y = b + 1, x = b + 2,
|
|
6297
|
+
let c = 0, h = 0, p = u + 1, f = p, m = !1, d = f, g = (1 << d) - 1, b = 1 << p - 1, y = b + 1, x = b + 2, _ = 0, v = t[0], C = 0;
|
|
6298
6298
|
for (let E = l; E < 65536; E *= 2) ++C;
|
|
6299
6299
|
C = 8 - C, r.writeByte(u), P(b);
|
|
6300
6300
|
let w = t.length;
|
|
6301
6301
|
for (let E = 1; E < w; E++)
|
|
6302
6302
|
e: {
|
|
6303
|
-
let T = t[E], L = (T << ii) +
|
|
6303
|
+
let T = t[E], L = (T << ii) + v, M = T << C ^ v;
|
|
6304
6304
|
if (a[M] === L) {
|
|
6305
|
-
|
|
6305
|
+
v = o[M];
|
|
6306
6306
|
break e;
|
|
6307
6307
|
}
|
|
6308
6308
|
let D = M === 0 ? 1 : l - M;
|
|
6309
6309
|
for (; a[M] >= 0; ) if (M -= D, M < 0 && (M += l), a[M] === L) {
|
|
6310
|
-
|
|
6310
|
+
v = o[M];
|
|
6311
6311
|
break e;
|
|
6312
6312
|
}
|
|
6313
|
-
P(
|
|
6313
|
+
P(v), v = T, x < 1 << ii ? (o[M] = x++, a[M] = L) : (a.fill(-1), x = b + 2, m = !0, P(b));
|
|
6314
6314
|
}
|
|
6315
|
-
return P(
|
|
6315
|
+
return P(v), P(y), r.writeByte(0), r.bytesView();
|
|
6316
6316
|
function P(E) {
|
|
6317
|
-
for (c &= ho[h], h > 0 ? c |= E << h : c = E, h += d; h >= 8; ) n[
|
|
6317
|
+
for (c &= ho[h], h > 0 ? c |= E << h : c = E, h += d; h >= 8; ) n[_++] = c & 255, _ >= 254 && (r.writeByte(_), r.writeBytesView(n, 0, _), _ = 0), c >>= 8, h -= 8;
|
|
6318
6318
|
if ((x > g || m) && (m ? (d = f, g = (1 << d) - 1, m = !1) : (++d, g = d === ii ? 1 << d : (1 << d) - 1)), E == y) {
|
|
6319
|
-
for (; h > 0; ) n[
|
|
6320
|
-
|
|
6319
|
+
for (; h > 0; ) n[_++] = c & 255, _ >= 254 && (r.writeByte(_), r.writeBytesView(n, 0, _), _ = 0), c >>= 8, h -= 8;
|
|
6320
|
+
_ > 0 && (r.writeByte(_), r.writeBytesView(n, 0, _), _ = 0);
|
|
6321
6321
|
}
|
|
6322
6322
|
}
|
|
6323
6323
|
}
|
|
@@ -6328,7 +6328,7 @@ function yn(s, e, t) {
|
|
|
6328
6328
|
function xn(s, e, t, i) {
|
|
6329
6329
|
return s >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
6330
6330
|
}
|
|
6331
|
-
function
|
|
6331
|
+
function vn(s, e, t) {
|
|
6332
6332
|
return s >> 4 << 8 | e & 240 | t >> 4;
|
|
6333
6333
|
}
|
|
6334
6334
|
function Lt(s, e, t) {
|
|
@@ -6337,7 +6337,7 @@ function Lt(s, e, t) {
|
|
|
6337
6337
|
function kt(s) {
|
|
6338
6338
|
return s * s;
|
|
6339
6339
|
}
|
|
6340
|
-
function
|
|
6340
|
+
function ur(s, e, t) {
|
|
6341
6341
|
var i = 0, r = 1e100;
|
|
6342
6342
|
let n = s[e], a = n.cnt;
|
|
6343
6343
|
n.ac;
|
|
@@ -6361,7 +6361,7 @@ function mo(s, e) {
|
|
|
6361
6361
|
p.rc += c, p.gc += u, p.bc += l, p.ac += o, p.cnt++;
|
|
6362
6362
|
}
|
|
6363
6363
|
else if (e === "rgb444") for (let n = 0; n < r; ++n) {
|
|
6364
|
-
let a = s[n], o = a >> 16 & 255, l = a >> 8 & 255, u = a & 255, c =
|
|
6364
|
+
let a = s[n], o = a >> 16 & 255, l = a >> 8 & 255, u = a & 255, c = vn(u, l, o), h = c in i ? i[c] : i[c] = ri();
|
|
6365
6365
|
h.rc += u, h.gc += l, h.bc += o, h.cnt++;
|
|
6366
6366
|
}
|
|
6367
6367
|
else for (let n = 0; n < r; ++n) {
|
|
@@ -6385,11 +6385,11 @@ function go(s, e, t = {}) {
|
|
|
6385
6385
|
kt(e) / d < 0.022 && (u = !1);
|
|
6386
6386
|
for (var g = 0; g < d - 1; ++g) h[g].fw = g + 1, h[g + 1].bk = g, u && (h[g].cnt = Math.sqrt(h[g].cnt));
|
|
6387
6387
|
u && (h[g].cnt = Math.sqrt(h[g].cnt));
|
|
6388
|
-
var y, x,
|
|
6388
|
+
var y, x, _;
|
|
6389
6389
|
for (g = 0; g < d; ++g) {
|
|
6390
|
-
|
|
6391
|
-
var
|
|
6392
|
-
for (x = ++m[0]; x > 1 && (
|
|
6390
|
+
ur(h, g);
|
|
6391
|
+
var v = h[g].err;
|
|
6392
|
+
for (x = ++m[0]; x > 1 && (_ = x >> 1, !(h[y = m[_]].err <= v)); x = _) m[x] = y;
|
|
6393
6393
|
m[x] = g;
|
|
6394
6394
|
}
|
|
6395
6395
|
var C = d - e;
|
|
@@ -6397,9 +6397,9 @@ function go(s, e, t = {}) {
|
|
|
6397
6397
|
for (var w; ; ) {
|
|
6398
6398
|
var P = m[1];
|
|
6399
6399
|
if (w = h[P], w.tm >= w.mtm && h[w.nn].mtm <= w.tm) break;
|
|
6400
|
-
w.mtm == f ? P = m[1] = m[m[0]--] : (
|
|
6401
|
-
var
|
|
6402
|
-
for (x = 1; (
|
|
6400
|
+
w.mtm == f ? P = m[1] = m[m[0]--] : (ur(h, P), w.tm = g);
|
|
6401
|
+
var v = h[P].err;
|
|
6402
|
+
for (x = 1; (_ = x + x) <= m[0] && (_ < m[0] && h[m[_]].err > h[m[_ + 1]].err && _++, !(v <= h[y = m[_]].err)); x = _) m[x] = y;
|
|
6403
6403
|
m[x] = P;
|
|
6404
6404
|
}
|
|
6405
6405
|
var E = h[w.nn], T = w.cnt, L = E.cnt, b = 1 / (T + L);
|
|
@@ -6432,9 +6432,9 @@ function yo(s, e, t = "rgb565") {
|
|
|
6432
6432
|
a[l] = d;
|
|
6433
6433
|
}
|
|
6434
6434
|
else {
|
|
6435
|
-
let l = t === "rgb444" ?
|
|
6435
|
+
let l = t === "rgb444" ? vn : yn;
|
|
6436
6436
|
for (let u = 0; u < r; u++) {
|
|
6437
|
-
let c = i[u], h = c >> 16 & 255, p = c >> 8 & 255, f = c & 255, m = l(f, p, h), d = m in o ? o[m] : o[m] =
|
|
6437
|
+
let c = i[u], h = c >> 16 & 255, p = c >> 8 & 255, f = c & 255, m = l(f, p, h), d = m in o ? o[m] : o[m] = vo(f, p, h, e);
|
|
6438
6438
|
a[u] = d;
|
|
6439
6439
|
}
|
|
6440
6440
|
}
|
|
@@ -6454,7 +6454,7 @@ function xo(s, e, t, i, r) {
|
|
|
6454
6454
|
}
|
|
6455
6455
|
return n;
|
|
6456
6456
|
}
|
|
6457
|
-
function
|
|
6457
|
+
function vo(s, e, t, i) {
|
|
6458
6458
|
let r = 0, n = 1e100;
|
|
6459
6459
|
for (let a = 0; a < i.length; a++) {
|
|
6460
6460
|
let o = i[a], l = o[0], u = je(l - s);
|
|
@@ -6469,7 +6469,7 @@ function _o(s, e, t, i) {
|
|
|
6469
6469
|
function je(s) {
|
|
6470
6470
|
return s * s;
|
|
6471
6471
|
}
|
|
6472
|
-
function
|
|
6472
|
+
function _o(s = {}) {
|
|
6473
6473
|
let { initialCapacity: e = 4096, auto: t = !0 } = s, i = bn(e), r = 5003, n = new Uint8Array(256), a = new Int32Array(r), o = new Int32Array(r), l = !1;
|
|
6474
6474
|
return { reset() {
|
|
6475
6475
|
i.reset(), l = !1;
|
|
@@ -6484,18 +6484,18 @@ function vo(s = {}) {
|
|
|
6484
6484
|
}, get stream() {
|
|
6485
6485
|
return i;
|
|
6486
6486
|
}, writeHeader: u, writeFrame(c, h, p, f = {}) {
|
|
6487
|
-
let { transparent: m = !1, transparentIndex: d = 0, delay: g = 0, palette: b = null, repeat: y = 0, colorDepth: x = 8, dispose:
|
|
6488
|
-
if (t ? l || (
|
|
6487
|
+
let { transparent: m = !1, transparentIndex: d = 0, delay: g = 0, palette: b = null, repeat: y = 0, colorDepth: x = 8, dispose: _ = -1 } = f, v = !1;
|
|
6488
|
+
if (t ? l || (v = !0, u(), l = !0) : v = !!f.first, h = Math.max(0, Math.floor(h)), p = Math.max(0, Math.floor(p)), v) {
|
|
6489
6489
|
if (!b) throw new Error("First frame must include a { palette } option");
|
|
6490
|
-
wo(i, h, p, b, x),
|
|
6490
|
+
wo(i, h, p, b, x), hr(i, b), y >= 0 && Co(i, y);
|
|
6491
6491
|
}
|
|
6492
6492
|
let C = Math.round(g / 10);
|
|
6493
|
-
Eo(i,
|
|
6494
|
-
let w = !!b && !
|
|
6495
|
-
Po(i, h, p, w ? b : null), w &&
|
|
6493
|
+
Eo(i, _, C, m, d);
|
|
6494
|
+
let w = !!b && !v;
|
|
6495
|
+
Po(i, h, p, w ? b : null), w && hr(i, b), So(i, c, h, p, x, n, a, o);
|
|
6496
6496
|
} };
|
|
6497
6497
|
function u() {
|
|
6498
|
-
|
|
6498
|
+
_n(i, "GIF89a");
|
|
6499
6499
|
}
|
|
6500
6500
|
}
|
|
6501
6501
|
function Eo(s, e, t, i, r) {
|
|
@@ -6504,14 +6504,14 @@ function Eo(s, e, t, i, r) {
|
|
|
6504
6504
|
i ? (n = 1, a = 2) : (n = 0, a = 0), e >= 0 && (a = e & 7), a <<= 2, s.writeByte(0 | a | 0 | n), Re(s, t), s.writeByte(r || 0), s.writeByte(0);
|
|
6505
6505
|
}
|
|
6506
6506
|
function wo(s, e, t, i, r = 8) {
|
|
6507
|
-
let n = 1, a = 0, o =
|
|
6507
|
+
let n = 1, a = 0, o = Bi(i.length) - 1, l = n << 7 | r - 1 << 4 | a << 3 | o;
|
|
6508
6508
|
Re(s, e), Re(s, t), s.writeBytes([l, 0, 0]);
|
|
6509
6509
|
}
|
|
6510
6510
|
function Co(s, e) {
|
|
6511
|
-
s.writeByte(33), s.writeByte(255), s.writeByte(11),
|
|
6511
|
+
s.writeByte(33), s.writeByte(255), s.writeByte(11), _n(s, "NETSCAPE2.0"), s.writeByte(3), s.writeByte(1), Re(s, e), s.writeByte(0);
|
|
6512
6512
|
}
|
|
6513
|
-
function
|
|
6514
|
-
let t = 1 <<
|
|
6513
|
+
function hr(s, e) {
|
|
6514
|
+
let t = 1 << Bi(e.length);
|
|
6515
6515
|
for (let i = 0; i < t; i++) {
|
|
6516
6516
|
let r = [0, 0, 0];
|
|
6517
6517
|
i < e.length && (r = e[i]), s.writeByte(r[0]), s.writeByte(r[1]), s.writeByte(r[2]);
|
|
@@ -6519,23 +6519,23 @@ function ur(s, e) {
|
|
|
6519
6519
|
}
|
|
6520
6520
|
function Po(s, e, t, i) {
|
|
6521
6521
|
if (s.writeByte(44), Re(s, 0), Re(s, 0), Re(s, e), Re(s, t), i) {
|
|
6522
|
-
let r = 0, n = 0, a =
|
|
6522
|
+
let r = 0, n = 0, a = Bi(i.length) - 1;
|
|
6523
6523
|
s.writeByte(128 | r | n | 0 | a);
|
|
6524
6524
|
} else s.writeByte(0);
|
|
6525
6525
|
}
|
|
6526
|
-
function
|
|
6526
|
+
function So(s, e, t, i, r = 8, n, a, o) {
|
|
6527
6527
|
fo(t, i, e, r, s, n, a, o);
|
|
6528
6528
|
}
|
|
6529
6529
|
function Re(s, e) {
|
|
6530
6530
|
s.writeByte(e & 255), s.writeByte(e >> 8 & 255);
|
|
6531
6531
|
}
|
|
6532
|
-
function
|
|
6532
|
+
function _n(s, e) {
|
|
6533
6533
|
for (var t = 0; t < e.length; t++) s.writeByte(e.charCodeAt(t));
|
|
6534
6534
|
}
|
|
6535
|
-
function
|
|
6535
|
+
function Bi(s) {
|
|
6536
6536
|
return Math.max(Math.ceil(Math.log2(s)), 1);
|
|
6537
6537
|
}
|
|
6538
|
-
class
|
|
6538
|
+
class Ao {
|
|
6539
6539
|
renderer;
|
|
6540
6540
|
scene;
|
|
6541
6541
|
camera;
|
|
@@ -6601,21 +6601,21 @@ class So {
|
|
|
6601
6601
|
if (!n || !a) return;
|
|
6602
6602
|
const c = 280, h = 100, p = 20, f = t - c - p, m = i - h - p, d = 12;
|
|
6603
6603
|
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(f, m, c, h, d) : e.rect(f, m, c, h), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(n.textContent || "", f + 16, m + 28);
|
|
6604
|
-
const g = f + 16, b = m + 40, y = c - 32, x = 20,
|
|
6605
|
-
let
|
|
6606
|
-
const C =
|
|
6604
|
+
const g = f + 16, b = m + 40, y = c - 32, x = 20, _ = a.style.background || "";
|
|
6605
|
+
let v = [];
|
|
6606
|
+
const C = _.match(/rgba?\([^)]+\)/g);
|
|
6607
6607
|
if (C && C.length >= 2)
|
|
6608
|
-
|
|
6608
|
+
v = C;
|
|
6609
6609
|
else {
|
|
6610
|
-
const w =
|
|
6611
|
-
w && w.length >= 2 && (
|
|
6610
|
+
const w = _.match(/#[0-9a-fA-F]{3,8}/g);
|
|
6611
|
+
w && w.length >= 2 && (v = w);
|
|
6612
6612
|
}
|
|
6613
|
-
if (
|
|
6613
|
+
if (v.length >= 2) {
|
|
6614
6614
|
const w = e.createLinearGradient(g, 0, g + y, 0);
|
|
6615
|
-
w.addColorStop(0,
|
|
6615
|
+
w.addColorStop(0, v[0]), v.length >= 3 ? (w.addColorStop(0.5, v[1]), w.addColorStop(1, v[2])) : w.addColorStop(1, v[1]), e.fillStyle = w, e.beginPath(), e.roundRect ? e.roundRect(g, b, y, x, 4) : e.rect(g, b, y, x), e.fill();
|
|
6616
6616
|
} else {
|
|
6617
6617
|
const w = e.createLinearGradient(g, 0, g + y, 0);
|
|
6618
|
-
w.addColorStop(0, "#cc6600"), w.addColorStop(0.5, "#ffaa44"), w.addColorStop(1, "#ffeecc"), e.fillStyle = w, e.beginPath(), e.roundRect ? e.roundRect(g, b, y, x, 4) : e.rect(g, b, y, x), e.fill(), console.log("Legend gradient style:",
|
|
6618
|
+
w.addColorStop(0, "#cc6600"), w.addColorStop(0.5, "#ffaa44"), w.addColorStop(1, "#ffeecc"), e.fillStyle = w, e.beginPath(), e.roundRect ? e.roundRect(g, b, y, x, 4) : e.rect(g, b, y, x), e.fill(), console.log("Legend gradient style:", _);
|
|
6619
6619
|
}
|
|
6620
6620
|
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, m + 78), l) {
|
|
6621
6621
|
const w = l.textContent || "", P = e.measureText(w).width;
|
|
@@ -6742,7 +6742,7 @@ class So {
|
|
|
6742
6742
|
const { fps: t = 20, filename: i } = e, r = Math.round(1e3 / t);
|
|
6743
6743
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
6744
6744
|
try {
|
|
6745
|
-
const n = this.frames[0], a = n.width, o = n.height, l = go(n.data, 256), u =
|
|
6745
|
+
const n = this.frames[0], a = n.width, o = n.height, l = go(n.data, 256), u = _o();
|
|
6746
6746
|
for (let m = 0; m < this.frames.length; m++) {
|
|
6747
6747
|
const d = this.frames[m], g = yo(d.data, l);
|
|
6748
6748
|
u.writeFrame(g, a, o, {
|
|
@@ -6780,10 +6780,10 @@ class So {
|
|
|
6780
6780
|
i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
6781
6781
|
}
|
|
6782
6782
|
}
|
|
6783
|
-
let
|
|
6783
|
+
let dr = !1;
|
|
6784
6784
|
function To() {
|
|
6785
|
-
if (
|
|
6786
|
-
|
|
6785
|
+
if (dr) return;
|
|
6786
|
+
dr = !0;
|
|
6787
6787
|
const s = document.createElement("style");
|
|
6788
6788
|
s.setAttribute("data-gralobe-legend", "true"), s.textContent = `
|
|
6789
6789
|
.gralobe-legend {
|
|
@@ -7503,9 +7503,9 @@ void main() {
|
|
|
7503
7503
|
|
|
7504
7504
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9 * uOpacity);
|
|
7505
7505
|
}
|
|
7506
|
-
`,
|
|
7506
|
+
`, pr = Math.PI / 180;
|
|
7507
7507
|
function Fo(s, e, t = ee) {
|
|
7508
|
-
const i = (90 - s) *
|
|
7508
|
+
const i = (90 - s) * pr, r = (e + 180) * pr;
|
|
7509
7509
|
return new S.Vector3(
|
|
7510
7510
|
-t * Math.sin(i) * Math.cos(r),
|
|
7511
7511
|
t * Math.cos(i),
|
|
@@ -7693,10 +7693,10 @@ class No {
|
|
|
7693
7693
|
this.markerMeshes = [], this.glowMeshes = [];
|
|
7694
7694
|
}
|
|
7695
7695
|
}
|
|
7696
|
-
let
|
|
7696
|
+
let fr = !1;
|
|
7697
7697
|
function Bo() {
|
|
7698
|
-
if (
|
|
7699
|
-
|
|
7698
|
+
if (fr) return;
|
|
7699
|
+
fr = !0;
|
|
7700
7700
|
const s = document.createElement("style");
|
|
7701
7701
|
s.setAttribute("data-gralobe-toolbar", "true"), s.textContent = `
|
|
7702
7702
|
.gralobe-toolbar {
|
|
@@ -7941,7 +7941,46 @@ const Ot = {
|
|
|
7941
7941
|
}
|
|
7942
7942
|
};
|
|
7943
7943
|
Ot.lifeExpectancy;
|
|
7944
|
-
const
|
|
7944
|
+
const vi = {
|
|
7945
|
+
satellite: {
|
|
7946
|
+
type: "url",
|
|
7947
|
+
url: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg"
|
|
7948
|
+
},
|
|
7949
|
+
natural: {
|
|
7950
|
+
type: "url",
|
|
7951
|
+
url: "https://unpkg.com/three-globe@2.45.0/example/img/earth-blue-marble.jpg"
|
|
7952
|
+
},
|
|
7953
|
+
dark: {
|
|
7954
|
+
type: "url",
|
|
7955
|
+
url: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png"
|
|
7956
|
+
},
|
|
7957
|
+
light: {
|
|
7958
|
+
type: "url",
|
|
7959
|
+
url: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg"
|
|
7960
|
+
},
|
|
7961
|
+
night: {
|
|
7962
|
+
type: "url",
|
|
7963
|
+
url: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png"
|
|
7964
|
+
},
|
|
7965
|
+
topographic: {
|
|
7966
|
+
type: "url",
|
|
7967
|
+
url: "https://unpkg.com/three-globe@2.45.0/example/img/earth-topology.png"
|
|
7968
|
+
},
|
|
7969
|
+
day: {
|
|
7970
|
+
type: "url",
|
|
7971
|
+
url: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg"
|
|
7972
|
+
},
|
|
7973
|
+
bathymetry: {
|
|
7974
|
+
type: "url",
|
|
7975
|
+
url: "https://unpkg.com/three-globe@2.45.0/example/img/earth-water.png"
|
|
7976
|
+
},
|
|
7977
|
+
atlas: {
|
|
7978
|
+
type: "svg",
|
|
7979
|
+
url: "https://upload.wikimedia.org/wikipedia/commons/5/5e/BlankMap-World-Sovereign_Nations.svg",
|
|
7980
|
+
width: 8192,
|
|
7981
|
+
height: 4096
|
|
7982
|
+
}
|
|
7983
|
+
}, $o = Object.keys(vi), Go = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_urban_areas.geojson";
|
|
7945
7984
|
class X {
|
|
7946
7985
|
static urbanFeatures = null;
|
|
7947
7986
|
static isLoading = !1;
|
|
@@ -7952,7 +7991,7 @@ class X {
|
|
|
7952
7991
|
static async loadBaseTopology() {
|
|
7953
7992
|
return X.urbanFeatures ? X.urbanFeatures : (X.loadPromise || (X.isLoading = !0, X.loadPromise = (async () => {
|
|
7954
7993
|
try {
|
|
7955
|
-
const e = await fetch(
|
|
7994
|
+
const e = await fetch(Go);
|
|
7956
7995
|
if (!e.ok) throw new Error("Failed to load urban areas");
|
|
7957
7996
|
const t = await e.json();
|
|
7958
7997
|
return X.urbanFeatures = t.features, X.urbanFeatures || [];
|
|
@@ -8045,14 +8084,7 @@ class X {
|
|
|
8045
8084
|
return n;
|
|
8046
8085
|
}
|
|
8047
8086
|
}
|
|
8048
|
-
const
|
|
8049
|
-
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
8050
|
-
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
8051
|
-
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
8052
|
-
light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
|
|
8053
|
-
night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
8054
|
-
topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
|
|
8055
|
-
}, mr = {
|
|
8087
|
+
const mr = {
|
|
8056
8088
|
texture: "satellite",
|
|
8057
8089
|
labels: "data",
|
|
8058
8090
|
statistic: "lifeExpectancy",
|
|
@@ -8084,7 +8116,7 @@ const fr = {
|
|
|
8084
8116
|
pointRadius: 140,
|
|
8085
8117
|
enableShortcuts: !0
|
|
8086
8118
|
};
|
|
8087
|
-
class
|
|
8119
|
+
class Yo {
|
|
8088
8120
|
container;
|
|
8089
8121
|
config;
|
|
8090
8122
|
// Three.js core
|
|
@@ -8131,7 +8163,7 @@ class Ho {
|
|
|
8131
8163
|
this.container = i;
|
|
8132
8164
|
} else
|
|
8133
8165
|
this.container = e;
|
|
8134
|
-
this.container.classList.add("gralobe-viz-container"), this.config = {
|
|
8166
|
+
this.container.classList.add("gralobe-viz-container"), this.textureLoader.setCrossOrigin("anonymous"), this.config = {
|
|
8135
8167
|
...mr,
|
|
8136
8168
|
...t,
|
|
8137
8169
|
effects: { ...mr.effects, ...t.effects || {} }
|
|
@@ -8153,7 +8185,7 @@ class Ho {
|
|
|
8153
8185
|
duration: 1
|
|
8154
8186
|
}));
|
|
8155
8187
|
}
|
|
8156
|
-
), this.config.showLegend && (this.legend = new Mo(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new so(this.container, ee), 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
|
|
8188
|
+
), this.config.showLegend && (this.legend = new Mo(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new so(this.container, ee), 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 Ao(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.config.showDebug) && this.createGUI(), this.setupInteraction(), await this.choropleth.waitForLoad();
|
|
8157
8189
|
const i = this.choropleth.getFeatureLabels();
|
|
8158
8190
|
i.length > 0 && this.addCustomLabels(i), 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", () => {
|
|
8159
8191
|
this.renderer.domElement.focus();
|
|
@@ -8174,7 +8206,9 @@ class Ho {
|
|
|
8174
8206
|
this.isDestroyed || document.activeElement === this.renderer.domElement && this.config.enableShortcuts && ((e.key === "g" || e.key === "G") && this.toggleProjection(), (e.key === "f" || e.key === "F") && this.toggleFullscreen());
|
|
8175
8207
|
};
|
|
8176
8208
|
async createGlobe() {
|
|
8177
|
-
const e = this.
|
|
8209
|
+
const e = this.loadTextureSource(
|
|
8210
|
+
vi[this.config.texture]
|
|
8211
|
+
), t = new Promise(
|
|
8178
8212
|
(a, o) => setTimeout(() => o(new Error("Texture load timed out after 10s")), 1e4)
|
|
8179
8213
|
), i = await Promise.race([e, t]);
|
|
8180
8214
|
if (this.isDestroyed || !this.renderer) return;
|
|
@@ -8548,12 +8582,12 @@ class Ho {
|
|
|
8548
8582
|
n.onclick = (A) => {
|
|
8549
8583
|
A.stopPropagation(), f(!o);
|
|
8550
8584
|
}, f(!1);
|
|
8551
|
-
const m = (A,
|
|
8585
|
+
const m = (A, ve) => {
|
|
8552
8586
|
const Q = document.createElement("button");
|
|
8553
|
-
Q.className = "gralobe-category-btn", Q.innerText =
|
|
8587
|
+
Q.className = "gralobe-category-btn", Q.innerText = ve, Q.onclick = (me) => {
|
|
8554
8588
|
me.stopPropagation(), p(A);
|
|
8555
8589
|
}, a.appendChild(Q), c[A] = Q;
|
|
8556
|
-
const se = new
|
|
8590
|
+
const se = new Ni({ container: this.container, title: "" });
|
|
8557
8591
|
this.categoryGUIs.push(se), se.domElement.classList.add("root");
|
|
8558
8592
|
const fe = se.domElement.querySelector(".title");
|
|
8559
8593
|
if (fe)
|
|
@@ -8563,12 +8597,12 @@ class Ho {
|
|
|
8563
8597
|
me.classList.contains("children") || me.remove();
|
|
8564
8598
|
}
|
|
8565
8599
|
return u[A] = se, se;
|
|
8566
|
-
}, g = m("texture", "Texture").add(this.config, "texture",
|
|
8600
|
+
}, g = m("texture", "Texture").add(this.config, "texture", $o).name("Theme").onChange((A) => this.setTexture(A));
|
|
8567
8601
|
this.addTooltip(
|
|
8568
8602
|
g,
|
|
8569
8603
|
"<b>Visual Theme</b><br><br>Change the base texture of the globe. Options include satellite imagery, natural earth, dark mode (lights), and more."
|
|
8570
8604
|
);
|
|
8571
|
-
const b = m("nav", "Navigation"), y = b.add({ toGlobe: () => this.toGlobe() }, "toGlobe").name("→ Globe"), x = b.add({ toFlat: () => this.toFlat() }, "toFlat").name("→ Flat"),
|
|
8605
|
+
const b = m("nav", "Navigation"), y = b.add({ toGlobe: () => this.toGlobe() }, "toGlobe").name("→ Globe"), x = b.add({ toFlat: () => this.toFlat() }, "toFlat").name("→ Flat"), _ = b.add({ morph: this.morph }, "morph", 0, 1).name("Morph").listen().onChange((A) => this.setMorph(A));
|
|
8572
8606
|
this.addTooltip(
|
|
8573
8607
|
y,
|
|
8574
8608
|
"<b>Switch to Globe View</b><br><br>Smoothly animate to the 3D spherical view."
|
|
@@ -8576,10 +8610,10 @@ class Ho {
|
|
|
8576
8610
|
x,
|
|
8577
8611
|
"<b>Switch to Map View</b><br><br>Smoothly flatten the globe into a 2D map projection."
|
|
8578
8612
|
), this.addTooltip(
|
|
8579
|
-
|
|
8613
|
+
_,
|
|
8580
8614
|
"<b>Projection Morph</b><br><br>Manually control the transition between Globe (1) and Flat Map (0)."
|
|
8581
8615
|
);
|
|
8582
|
-
const
|
|
8616
|
+
const v = m("stats", "Data"), C = typeof this.config.statistic == "string" ? this.config.statistic : this.config.statistic.definition.id, w = v.add({ stat: C }, "stat", Object.keys(Ot)).name("Metric").onChange((A) => this.setStatistic(A));
|
|
8583
8617
|
this.addTooltip(
|
|
8584
8618
|
w,
|
|
8585
8619
|
"<b>Data Metric</b><br><br>Select the statistical dataset to visualize on the globe."
|
|
@@ -8612,9 +8646,9 @@ class Ho {
|
|
|
8612
8646
|
this.material && (this.material.uniforms.uGridOpacity.value = A);
|
|
8613
8647
|
}), R.close();
|
|
8614
8648
|
const U = (A) => {
|
|
8615
|
-
A.forEach((
|
|
8616
|
-
const Q =
|
|
8617
|
-
|
|
8649
|
+
A.forEach((ve) => {
|
|
8650
|
+
const Q = ve.open;
|
|
8651
|
+
ve.open = function() {
|
|
8618
8652
|
return Q.apply(this), A.forEach((se) => {
|
|
8619
8653
|
se !== this && se.close();
|
|
8620
8654
|
}), this;
|
|
@@ -8716,8 +8750,8 @@ class Ho {
|
|
|
8716
8750
|
const e = this.choropleth?.getBounds(), t = Math.PI * 2 * ee, i = Math.PI * ee;
|
|
8717
8751
|
let r = 0, n = 0, a = t, o = i;
|
|
8718
8752
|
if (e) {
|
|
8719
|
-
const [f, m, d, g] = e, b = f / 180 * (t / 2), y = d / 180 * (t / 2), x = m / 90 * (i / 2),
|
|
8720
|
-
r = (b + y) / 2, n = (x +
|
|
8753
|
+
const [f, m, d, g] = e, b = f / 180 * (t / 2), y = d / 180 * (t / 2), x = m / 90 * (i / 2), _ = g / 90 * (i / 2);
|
|
8754
|
+
r = (b + y) / 2, n = (x + _) / 2, a = (y - b) * 1.2, o = (_ - x) * 1.2;
|
|
8721
8755
|
}
|
|
8722
8756
|
const l = this.camera.fov * Math.PI / 180, u = this.camera.aspect, c = o / 2 / Math.tan(l / 2), h = a / (2 * Math.tan(l / 2) * u), p = Math.max(c, h);
|
|
8723
8757
|
this.controls.enabled = !1, Y.to(this, {
|
|
@@ -8860,6 +8894,42 @@ class Ho {
|
|
|
8860
8894
|
this.countryLabels?.clearCustomLabels();
|
|
8861
8895
|
}
|
|
8862
8896
|
async setTexture(e) {
|
|
8897
|
+
if (!(!this.renderer || !this.material)) {
|
|
8898
|
+
this.config.texture = e;
|
|
8899
|
+
try {
|
|
8900
|
+
const t = this.loadTextureSource(vi[e]), i = new Promise(
|
|
8901
|
+
(n, a) => setTimeout(() => a(new Error("Texture load timed out after 10s")), 1e4)
|
|
8902
|
+
), r = await Promise.race([t, i]);
|
|
8903
|
+
if (this.isDestroyed || !this.material || !this.material.uniforms.uTexture) return;
|
|
8904
|
+
r.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), r.minFilter = S.LinearMipmapLinearFilter, r.magFilter = S.LinearFilter, this.material.uniforms.uTexture.value = r, this.material.needsUpdate = !0;
|
|
8905
|
+
} catch (t) {
|
|
8906
|
+
console.error(`Failed to set texture ${e}:`, t);
|
|
8907
|
+
}
|
|
8908
|
+
}
|
|
8909
|
+
}
|
|
8910
|
+
async loadTextureSource(e) {
|
|
8911
|
+
return e.type === "svg" ? this.loadSvgTexture(e.url, e.width, e.height) : this.textureLoader.loadAsync(e.url);
|
|
8912
|
+
}
|
|
8913
|
+
async loadSvgTexture(e, t, i) {
|
|
8914
|
+
const r = await fetch(e);
|
|
8915
|
+
if (!r.ok)
|
|
8916
|
+
throw new Error(`Failed to fetch SVG texture (${r.status})`);
|
|
8917
|
+
const n = await r.text(), a = this.resizeSvgTexture(n, t, i), o = new Blob([a], { type: "image/svg+xml" }), l = URL.createObjectURL(o);
|
|
8918
|
+
try {
|
|
8919
|
+
return await this.textureLoader.loadAsync(l);
|
|
8920
|
+
} finally {
|
|
8921
|
+
URL.revokeObjectURL(l);
|
|
8922
|
+
}
|
|
8923
|
+
}
|
|
8924
|
+
resizeSvgTexture(e, t, i) {
|
|
8925
|
+
let r = e;
|
|
8926
|
+
return r.includes("width=") ? r = r.replace(/\bwidth="[^"]*"/i, `width="${t}"`) : r = r.replace("<svg", `<svg width="${t}"`), r.includes("height=") ? r = r.replace(/\bheight="[^"]*"/i, `height="${i}"`) : r = r.replace("<svg", `<svg height="${i}"`), r.includes("preserveAspectRatio=") ? r = r.replace(
|
|
8927
|
+
/\bpreserveAspectRatio="[^"]*"/i,
|
|
8928
|
+
'preserveAspectRatio="none"'
|
|
8929
|
+
) : r = r.replace(
|
|
8930
|
+
"<svg",
|
|
8931
|
+
'<svg preserveAspectRatio="none"'
|
|
8932
|
+
), r;
|
|
8863
8933
|
}
|
|
8864
8934
|
setAutoRotate(e) {
|
|
8865
8935
|
this.config.autoRotate = e;
|
|
@@ -9068,11 +9138,11 @@ class Ho {
|
|
|
9068
9138
|
}
|
|
9069
9139
|
export {
|
|
9070
9140
|
Ot as BUILT_IN_STATISTICS,
|
|
9071
|
-
|
|
9141
|
+
Yo as GlobeViz,
|
|
9072
9142
|
Je as WORLD_STATISTICS,
|
|
9073
9143
|
gr as createFormatter,
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9144
|
+
Ho as formatValue,
|
|
9145
|
+
Sn as normalizeCountryValues,
|
|
9146
|
+
Gi as toNumericCode
|
|
9077
9147
|
};
|
|
9078
9148
|
//# sourceMappingURL=gralobe.js.map
|