gralobe 1.0.64 → 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 +411 -356
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +6 -6
- 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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as S from "three";
|
|
2
2
|
import { OrbitControls as En } from "three/examples/jsm/controls/OrbitControls.js";
|
|
3
3
|
import { CSS2DRenderer as wn, CSS2DObject as $i } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
|
4
4
|
const Je = [
|
|
@@ -1881,7 +1881,7 @@ 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
1887
|
e[Gi(i)] = t;
|
|
@@ -1897,17 +1897,17 @@ const Vi = {
|
|
|
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 Vi[s] ? Vi[s] :
|
|
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;
|
|
@@ -1926,7 +1926,7 @@ var he = {
|
|
|
1926
1926
|
duration: 0.5,
|
|
1927
1927
|
overwrite: !1,
|
|
1928
1928
|
delay: 0
|
|
1929
|
-
},
|
|
1929
|
+
}, _i, q, N, be = 1e8, z = 1 / be, ni = Math.PI * 2, Tn = ni / 4, Mn = 0, yr = Math.sqrt, Ln = Math.cos, Dn = Math.sin, W = function(e) {
|
|
1930
1930
|
return typeof e == "string";
|
|
1931
1931
|
}, G = function(e) {
|
|
1932
1932
|
return typeof e == "function";
|
|
@@ -1940,10 +1940,10 @@ var he = {
|
|
|
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,
|
|
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()");
|
|
@@ -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); )
|
|
@@ -1974,7 +1974,7 @@ var he = {
|
|
|
1974
1974
|
return e;
|
|
1975
1975
|
}, He = function(e) {
|
|
1976
1976
|
return e._gsap || Ti(ye(e))[0]._gsap;
|
|
1977
|
-
},
|
|
1977
|
+
}, Ar = function(e, t, i) {
|
|
1978
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;
|
|
@@ -1991,7 +1991,7 @@ var he = {
|
|
|
1991
1991
|
return r < i;
|
|
1992
1992
|
}, zt = function() {
|
|
1993
1993
|
var e = ke.length, t = ke.slice(0), i, r;
|
|
1994
|
-
for (
|
|
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);
|
|
@@ -2055,7 +2055,7 @@ var he = {
|
|
|
2055
2055
|
for (var t = e.parent; t && t.parent; )
|
|
2056
2056
|
t._dirty = 1, t.totalDuration(), t = t.parent;
|
|
2057
2057
|
return e;
|
|
2058
|
-
},
|
|
2058
|
+
}, li = function(e, t, i, r) {
|
|
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);
|
|
@@ -2073,35 +2073,35 @@ 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;
|
|
2080
2080
|
e._zTime = -z;
|
|
2081
2081
|
}
|
|
2082
2082
|
}, Ee = function(e, t, i, r) {
|
|
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),
|
|
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
2085
|
return (de.ScrollTrigger || Pi("scrollTrigger", t)) && de.ScrollTrigger.create(t, e);
|
|
2086
2086
|
}, kr = function(e, t, i, r, n) {
|
|
2087
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;
|
|
2093
2093
|
return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || s(t));
|
|
2094
|
-
},
|
|
2094
|
+
}, ci = function(e) {
|
|
2095
2095
|
var t = e.data;
|
|
2096
2096
|
return t === "isFromStart" || t === "isStart";
|
|
2097
2097
|
}, $n = function(e, t, i, r) {
|
|
2098
|
-
var n = e.ratio, a = t < 0 || !t && (!e._start && Bn(e) && !(!e._initted &&
|
|
2099
|
-
if (o && e._repeat && (l =
|
|
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 = 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; )
|
|
2103
2103
|
u.r(a, u.d), u = u._next;
|
|
2104
|
-
t < 0 &&
|
|
2104
|
+
t < 0 && li(e, t, i, !0), e._onUpdate && !i && ue(e, "onUpdate"), l && e._repeat && !i && e.parent && ue(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === a && (a && Fe(e, 1), !i && !q && (ue(e, a ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
2105
2105
|
} else e._zTime || (e._zTime = t);
|
|
2106
2106
|
}, Gn = function(e, t, i) {
|
|
2107
2107
|
var r;
|
|
@@ -2139,24 +2139,24 @@ 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
|
-
},
|
|
2151
|
-
return e && Pe(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Pe(e[0])) && !e.nodeType && e !==
|
|
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 !== _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 && (
|
|
2159
|
-
},
|
|
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
|
+
}, 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
2162
|
return ye(t, i.querySelectorAll ? i : i === e ? yt("Invalid scope") || Ci.createElement("div") : e);
|
|
@@ -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,12 +2184,12 @@ 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;
|
|
2191
2191
|
};
|
|
2192
|
-
},
|
|
2192
|
+
}, di = function(e) {
|
|
2193
2193
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
2194
2194
|
return function(i) {
|
|
2195
2195
|
var r = H(Math.round(parseFloat(i) / e) * e * t);
|
|
@@ -2197,13 +2197,13 @@ var he = {
|
|
|
2197
2197
|
};
|
|
2198
2198
|
}, Ur = function(e, t) {
|
|
2199
2199
|
var i = J(e), r, n;
|
|
2200
|
-
return !i && Pe(e) && (r = i = e.radius || be, e.values ? (e = ye(e.values), (n = !Te(e[0])) && (r *= r)) : e =
|
|
2200
|
+
return !i && Pe(e) && (r = i = e.radius || be, e.values ? (e = ye(e.values), (n = !Te(e[0])) && (r *= r)) : e = di(e.increment)), Ue(t, i ? G(e) ? function(a) {
|
|
2201
2201
|
return n = e(a), Math.abs(n - a) <= r ? n : a;
|
|
2202
2202
|
} : function(a) {
|
|
2203
2203
|
for (var o = parseFloat(n ? a.x : a), l = parseFloat(n ? a.y : 0), u = be, c = 0, h = e.length, p, f; h--; )
|
|
2204
2204
|
n ? (p = e[h].x - o, f = e[h].y - l, p = p * p + f * f) : p = Math.abs(e[h] - o), p < u && (u = p, c = h);
|
|
2205
2205
|
return c = !r || u <= r ? e[c] : a, n || c === a || Te(a) ? c : c + K(a);
|
|
2206
|
-
} :
|
|
2206
|
+
} : di(e));
|
|
2207
2207
|
}, Nr = function(e, t, i, r) {
|
|
2208
2208
|
return Ue(J(e) ? !t : i === !0 ? !!(i = 0) : !r, function() {
|
|
2209
2209
|
return J(e) ? e[~~(Math.random() * e.length)] : (i = i || 1e-5) && (r = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) && Math.floor(Math.round((e - i / 2 + Math.random() * (t - e + i * 0.99)) / i) * i * r) / r;
|
|
@@ -2236,9 +2236,9 @@ 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
|
-
a = e.indexOf(")", r), o = e.charAt(r + 7) === "[", n = e.substr(r + 7, a - r - 7).match(o ? Er :
|
|
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);
|
|
2243
2243
|
}, $r = function(e, t, i, r, n) {
|
|
2244
2244
|
var a = t - e, o = r - i;
|
|
@@ -2308,7 +2308,7 @@ var he = {
|
|
|
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
|
|
@@ -2345,12 +2345,12 @@ var he = {
|
|
|
2345
2345
|
return r = parseInt(e.substr(1, 6), 16), [r >> 16, r >> 8 & F, r & F, parseInt(e.substr(7), 16) / 255];
|
|
2346
2346
|
e = parseInt(e.substr(1), 16), r = [e >> 16, e >> 8 & F, e & F];
|
|
2347
2347
|
} else if (e.substr(0, 3) === "hsl") {
|
|
2348
|
-
if (r = m = e.match(
|
|
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
|
-
r = e.match(
|
|
2353
|
+
r = e.match(ai) || pt.transparent;
|
|
2354
2354
|
r = r.map(Number);
|
|
2355
2355
|
}
|
|
2356
2356
|
return t && !m && (n = r[0] / F, a = r[1] / F, o = r[2] / F, h = Math.max(n, a, o), p = Math.min(n, a, o), c = (h + p) / 2, h === p ? l = u = 0 : (f = h - p, u = c > 0.5 ? f / (2 - h - p) : f / (h + p), l = h === n ? (a - o) / f + (a < o ? 6 : 0) : h === a ? (o - n) / f + 2 : (n - a) / f + 4, l *= 60), r[0] = ~~(l + 0.5), r[1] = ~~(u * 100 + 0.5), r[2] = ~~(c * 100 + 0.5)), i && r.length < 4 && (r[3] = 1), r;
|
|
@@ -2382,12 +2382,12 @@ var he = {
|
|
|
2382
2382
|
var t = e.join(" "), i;
|
|
2383
2383
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
2384
2384
|
return i = Jn.test(t), e[1] = qi(e[1], i), e[0] = qi(e[0], i, Hr(e[1])), !0;
|
|
2385
|
-
},
|
|
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 && (!
|
|
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();
|
|
@@ -2465,12 +2465,12 @@ var he = {
|
|
|
2465
2465
|
return t < 0.5 ? (1 - e(1 - t * 2)) / 2 : 0.5 + e((t - 0.5) * 2) / 2;
|
|
2466
2466
|
};
|
|
2467
2467
|
}, Zt = function s(e, t, i) {
|
|
2468
|
-
var r = t >= 1 ? t : 1, n = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), a = n /
|
|
2468
|
+
var r = t >= 1 ? t : 1, n = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), a = n / ni * (Math.asin(1 / r) || 0), o = function(c) {
|
|
2469
2469
|
return c === 1 ? 1 : r * Math.pow(2, -10 * c) * Dn((c - a) * n) + 1;
|
|
2470
2470
|
}, l = e === "out" ? o : e === "in" ? function(u) {
|
|
2471
2471
|
return 1 - o(1 - u);
|
|
2472
2472
|
} : qr(o);
|
|
2473
|
-
return n =
|
|
2473
|
+
return n = ni / n, l.config = function(u, c) {
|
|
2474
2474
|
return s(e, u, c);
|
|
2475
2475
|
}, l;
|
|
2476
2476
|
}, Kt = function s(e, t) {
|
|
@@ -2521,19 +2521,19 @@ 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
|
};
|
|
2528
2528
|
at.ease = I["quad.out"];
|
|
2529
2529
|
re("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(s) {
|
|
2530
|
-
return
|
|
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) {
|
|
@@ -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) {
|
|
@@ -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; ) {
|
|
@@ -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) {
|
|
@@ -2834,7 +2834,7 @@ 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)),
|
|
2837
|
+
if (B._ts && (Tr(B, Nt(r, B)), Sr = ce.frame), ce.frame >= ji) {
|
|
2838
2838
|
ji += he.autoSleep || 120;
|
|
2839
2839
|
var n = B._first;
|
|
2840
2840
|
if ((!n || !n._ts) && he.autoSleep && ce._listeners.length < 2) {
|
|
@@ -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,11 +2861,11 @@ 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, (
|
|
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
2865
|
}, Li = function(e, t, i, r, n, a, o, l, u, c) {
|
|
2866
2866
|
G(r) && (r = r(n || 0, e, a));
|
|
2867
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 =
|
|
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
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))
|
|
@@ -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,
|
|
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" && !
|
|
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 || Ti(g)[C]._gsap, e._ptLookup[C] = R = {},
|
|
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,
|
|
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 && (
|
|
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
|
+
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
|
|
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,8 +2968,8 @@ 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(") ?
|
|
2972
|
-
}, Jr =
|
|
2971
|
+
return G(e) ? e.call(t, i, r, n) : W(e) && ~e.indexOf("random(") ? vt(e) : e;
|
|
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;
|
|
2975
2975
|
});
|
|
@@ -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 ? Ti(x) : yt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = f, m || p ||
|
|
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 && !
|
|
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,11 +3043,11 @@ 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;
|
|
3050
|
-
x && x.render(r < 0 ? r : x._dur * x._ease(p / this._dur), n, a) || this._startAt && (this._zTime = r), this._onUpdate && !n && (c &&
|
|
3050
|
+
x && x.render(r < 0 ? r : x._dur * x._ease(p / this._dur), n, a) || this._startAt && (this._zTime = r), this._onUpdate && !n && (c && li(this, r, n, a), ue(this, "onUpdate")), this._repeat && m !== g && this.vars.onRepeat && !n && this.parent && ue(this, "onRepeat"), (h === this._tDur || !h) && this._tTime === h && (c && !this._onUpdate && li(this, r, !0, !0), (r || !u) && (h === this._tDur && this._ts > 0 || !h && this._ts < 0) && Fe(this, 1), !n && !(c && !o) && (h || o || b) && (ue(this, h === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom()));
|
|
3051
3051
|
}
|
|
3052
3052
|
return this;
|
|
3053
3053
|
}, t.targets = function() {
|
|
@@ -3055,7 +3055,7 @@ 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
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) {
|
|
@@ -3110,7 +3110,7 @@ pe(j.prototype, {
|
|
|
3110
3110
|
});
|
|
3111
3111
|
re("staggerTo,staggerFrom,staggerFromTo", function(s) {
|
|
3112
3112
|
j[s] = function() {
|
|
3113
|
-
var e = new te(), t =
|
|
3113
|
+
var e = new te(), t = ui.call(arguments, 0);
|
|
3114
3114
|
return t.splice(s === "staggerFromTo" ? 5 : 4, 0, 0), e[s].apply(e, t);
|
|
3115
3115
|
};
|
|
3116
3116
|
});
|
|
@@ -3168,8 +3168,8 @@ var Ii = function(e, t, i) {
|
|
|
3168
3168
|
this.mSet = this.mSet || this.set, this.set = fa, this.m = i, this.mt = n, this.tween = r;
|
|
3169
3169
|
}, s;
|
|
3170
3170
|
})();
|
|
3171
|
-
re(
|
|
3172
|
-
return
|
|
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 Si[s] = 1;
|
|
3173
3173
|
});
|
|
3174
3174
|
de.TweenMax = de.TweenLite = j;
|
|
3175
3175
|
de.TimelineLite = de.TimelineMax = te;
|
|
@@ -3185,12 +3185,12 @@ 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
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) {
|
|
@@ -3199,14 +3199,14 @@ var Xe = [], Rt = {}, ma = [], Zi = 0, ga = 0, Jt = function(e) {
|
|
|
3199
3199
|
}), Zi = e, Jt("matchMedia"));
|
|
3200
3200
|
}, an = /* @__PURE__ */ (function() {
|
|
3201
3201
|
function s(t, i) {
|
|
3202
|
-
this.selector = i &&
|
|
3202
|
+
this.selector = i && hi(i), this.data = [], this._r = [], this.isReverted = !1, this.id = ga++, t && this.add(t);
|
|
3203
3203
|
}
|
|
3204
3204
|
var e = s.prototype;
|
|
3205
3205
|
return e.add = function(i, r, n) {
|
|
3206
3206
|
G(i) && (n = r, r = i, i = G);
|
|
3207
3207
|
var a = this, o = function() {
|
|
3208
3208
|
var u = N, c = a.selector, h;
|
|
3209
|
-
return u && u !== a && u.data.push(a), n && (a.selector =
|
|
3209
|
+
return u && u !== a && u.data.push(a), n && (a.selector = hi(n)), N = a, h = r.apply(a, arguments), G(h) && a._r.push(h), N = u, a.selector = c, a.isReverted = !1, h;
|
|
3210
3210
|
};
|
|
3211
3211
|
return a.last = o, i === G ? o(a, function(l) {
|
|
3212
3212
|
return a.add(null, l);
|
|
@@ -3262,7 +3262,7 @@ var Xe = [], Rt = {}, ma = [], Zi = 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;
|
|
@@ -3366,7 +3366,7 @@ var Xe = [], Rt = {}, ma = [], Zi = 0, ga = 0, Jt = function(e) {
|
|
|
3366
3366
|
for (r in t)
|
|
3367
3367
|
t[r] && (t[r] = !1, i = 1);
|
|
3368
3368
|
i && e.revert();
|
|
3369
|
-
}) ||
|
|
3369
|
+
}) || fi();
|
|
3370
3370
|
},
|
|
3371
3371
|
addEventListener: function(e, t) {
|
|
3372
3372
|
var i = Rt[e] || (Rt[e] = []);
|
|
@@ -3387,7 +3387,7 @@ var Xe = [], Rt = {}, ma = [], Zi = 0, ga = 0, Jt = function(e) {
|
|
|
3387
3387
|
clamp: jn,
|
|
3388
3388
|
splitColor: jr,
|
|
3389
3389
|
toArray: ye,
|
|
3390
|
-
selector:
|
|
3390
|
+
selector: hi,
|
|
3391
3391
|
mapRange: $r,
|
|
3392
3392
|
pipe: Yn,
|
|
3393
3393
|
unitize: Wn,
|
|
@@ -3415,7 +3415,7 @@ var Xe = [], Rt = {}, ma = [], Zi = 0, ga = 0, Jt = function(e) {
|
|
|
3415
3415
|
return e && N && (N.data.push(e), e._ctx = N), N;
|
|
3416
3416
|
},
|
|
3417
3417
|
suppressOverwrites: function(e) {
|
|
3418
|
-
return
|
|
3418
|
+
return _i = e;
|
|
3419
3419
|
}
|
|
3420
3420
|
}
|
|
3421
3421
|
};
|
|
@@ -3475,7 +3475,7 @@ var ya = function(e, t) {
|
|
|
3475
3475
|
for (var i = t.length; i--; )
|
|
3476
3476
|
this.add(e, i, e[i] || 0, t[i], 0, 0, 0, 0, 0, 1);
|
|
3477
3477
|
}
|
|
3478
|
-
}, Qt("roundProps",
|
|
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();
|
|
@@ -3497,13 +3497,13 @@ I.Bounce;
|
|
|
3497
3497
|
I.Sine;
|
|
3498
3498
|
I.Expo;
|
|
3499
3499
|
I.Circ;
|
|
3500
|
-
var Ki, De, rt, Oi, Ve, Ji, Fi,
|
|
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, Qi = 1e8, zi = /([A-Z])/g,
|
|
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"
|
|
3506
|
-
},
|
|
3506
|
+
}, mi = function(e, t) {
|
|
3507
3507
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
3508
3508
|
}, wa = function(e, t) {
|
|
3509
3509
|
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
@@ -3516,9 +3516,9 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _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 Ki, De, rt, Oi, Ve, Ji, Fi, _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);
|
|
@@ -3567,7 +3567,7 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _a = function() {
|
|
|
3567
3567
|
return e._gsap || oe.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(r) {
|
|
3568
3568
|
return i.save(r);
|
|
3569
3569
|
}), i;
|
|
3570
|
-
}, un,
|
|
3570
|
+
}, un, gi = function(e, t) {
|
|
3571
3571
|
var i = De.createElementNS ? De.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : De.createElement(e);
|
|
3572
3572
|
return i && i.style ? i : De.createElement(e);
|
|
3573
3573
|
}, xe = function s(e, t, i) {
|
|
@@ -3580,12 +3580,12 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _a = function() {
|
|
|
3580
3580
|
for (e = e.charAt(0).toUpperCase() + e.substr(1); a-- && !(er[a] + e in n); )
|
|
3581
3581
|
;
|
|
3582
3582
|
return a < 0 ? null : (a === 3 ? "ms" : a >= 0 ? er[a] : "") + e;
|
|
3583
|
-
},
|
|
3584
|
-
|
|
3583
|
+
}, bi = function() {
|
|
3584
|
+
va() && window.document && (Ki = window, De = Ki.document, rt = De.documentElement, Ve = gi("div") || {
|
|
3585
3585
|
style: {}
|
|
3586
|
-
},
|
|
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
3587
|
}, tr = function(e) {
|
|
3588
|
-
var t = e.ownerSVGElement, i =
|
|
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 {
|
|
3591
3591
|
n = r.getBBox();
|
|
@@ -3627,7 +3627,7 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _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 =
|
|
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
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")))
|
|
@@ -3640,18 +3640,18 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _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 Oi ||
|
|
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,7 +3662,7 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _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
|
|
3665
|
+
return _r.test(r) && (o.e = 0), this._pt = o, o;
|
|
3666
3666
|
}, nr = {
|
|
3667
3667
|
top: "0%",
|
|
3668
3668
|
bottom: "100%",
|
|
@@ -3756,19 +3756,19 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _a = function() {
|
|
|
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(
|
|
3759
|
+
return fn(t) ? wt : t.substr(7).match(vr).map(V);
|
|
3760
3760
|
}, Ui = function(e, t) {
|
|
3761
3761
|
var i = e._gsap || He(e), r = e.style, n = ar(e), a, o, l, u;
|
|
3762
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
|
-
},
|
|
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(" "),
|
|
3765
|
-
i ? l !== wt && (w = f * g - m * d) && (P =
|
|
3763
|
+
}, yi = function(e, t, i, r, n, a) {
|
|
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,15 +3777,15 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _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
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;
|
|
@@ -3797,7 +3797,7 @@ var Ki, De, rt, Oi, Ve, Ji, Fi, _a = function() {
|
|
|
3797
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
|
-
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,
|
|
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) {
|
|
@@ -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];
|
|
@@ -3817,37 +3817,37 @@ re("padding,margin,Width,Radius", function(s, e) {
|
|
|
3817
3817
|
});
|
|
3818
3818
|
var gn = {
|
|
3819
3819
|
name: "css",
|
|
3820
|
-
register:
|
|
3820
|
+
register: bi,
|
|
3821
3821
|
targetTest: function(e) {
|
|
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
|
-
Oi ||
|
|
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,7 +3855,7 @@ 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)
|
|
@@ -3876,11 +3876,11 @@ var gn = {
|
|
|
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,
|
|
@@ -4142,15 +4142,15 @@ class Ga extends Ce {
|
|
|
4142
4142
|
return this.$input.checked = this.getValue(), this;
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
|
-
function
|
|
4145
|
+
function xi(s) {
|
|
4146
4146
|
let e, t;
|
|
4147
4147
|
return (e = s.match(/(#|0x)?([a-f0-9]{6})/i)) ? t = e[2] : (e = s.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? t = parseInt(e[1]).toString(16).padStart(2, 0) + parseInt(e[2]).toString(16).padStart(2, 0) + parseInt(e[3]).toString(16).padStart(2, 0) : (e = s.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (t = e[1] + e[1] + e[2] + e[2] + e[3] + e[3]), t ? "#" + t : !1;
|
|
4148
4148
|
}
|
|
4149
4149
|
const Va = {
|
|
4150
4150
|
isPrimitive: !0,
|
|
4151
4151
|
match: (s) => typeof s == "string",
|
|
4152
|
-
fromHexString:
|
|
4153
|
-
toHexString:
|
|
4152
|
+
fromHexString: xi,
|
|
4153
|
+
toHexString: xi
|
|
4154
4154
|
}, Pt = {
|
|
4155
4155
|
isPrimitive: !0,
|
|
4156
4156
|
match: (s) => typeof s == "number",
|
|
@@ -4191,7 +4191,7 @@ class Xa extends Ce {
|
|
|
4191
4191
|
}), this.$input.addEventListener("blur", () => {
|
|
4192
4192
|
this._callOnFinishChange();
|
|
4193
4193
|
}), this.$text.addEventListener("input", () => {
|
|
4194
|
-
const n =
|
|
4194
|
+
const n = xi(this.$text.value);
|
|
4195
4195
|
n && this._setValueFromHexString(n);
|
|
4196
4196
|
}), this.$text.addEventListener("focus", () => {
|
|
4197
4197
|
this._textFocused = !0, this.$text.select();
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -5773,7 +5773,7 @@ class so {
|
|
|
5773
5773
|
constructor(e, t) {
|
|
5774
5774
|
this.sphereRadius = t, this.labelRenderer = new wn();
|
|
5775
5775
|
const i = e.clientWidth || 800, r = e.clientHeight || 600;
|
|
5776
|
-
this.labelRenderer.setSize(i, r), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", this.labelRenderer.domElement.style.zIndex = "5", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new
|
|
5776
|
+
this.labelRenderer.setSize(i, r), this.labelRenderer.domElement.style.position = "absolute", this.labelRenderer.domElement.style.top = "0", this.labelRenderer.domElement.style.left = "0", this.labelRenderer.domElement.style.pointerEvents = "none", this.labelRenderer.domElement.style.zIndex = "5", e.appendChild(this.labelRenderer.domElement), this.labelGroup = new S.Group(), this.injectStyles(), this.createLabels();
|
|
5777
5777
|
}
|
|
5778
5778
|
injectStyles() {
|
|
5779
5779
|
const e = document.createElement("style");
|
|
@@ -5918,24 +5918,24 @@ class so {
|
|
|
5918
5918
|
this.labelGroup.remove(t.object), t.element.remove(), this.dataIds.delete(t.country.code);
|
|
5919
5919
|
}), this.labels = this.labels.filter((t) => !t.element.classList.contains("custom-label"));
|
|
5920
5920
|
}
|
|
5921
|
-
localPos = new
|
|
5922
|
-
worldPos = new
|
|
5923
|
-
cameraDirection = new
|
|
5924
|
-
labelNormal = new
|
|
5921
|
+
localPos = new S.Vector3();
|
|
5922
|
+
worldPos = new S.Vector3();
|
|
5923
|
+
cameraDirection = new S.Vector3();
|
|
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
|
/**
|
|
@@ -6064,7 +6064,7 @@ class so {
|
|
|
6064
6064
|
*/
|
|
6065
6065
|
getVisibleLabelsForCanvas(e, t, i) {
|
|
6066
6066
|
if (this.currentStyle === "none") return [];
|
|
6067
|
-
const r = [], n = new
|
|
6067
|
+
const r = [], n = new S.Vector3();
|
|
6068
6068
|
return this.labels.forEach((a) => {
|
|
6069
6069
|
const o = a.element.style.opacity, l = o === "" ? 1 : parseFloat(o) || 0;
|
|
6070
6070
|
if (l < 0.1 || a.element.classList.contains("hidden")) return;
|
|
@@ -6294,30 +6294,30 @@ var ii = 12, cr = 5003, ho = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047,
|
|
|
6294
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) {
|
|
@@ -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
6390
|
ur(h, g);
|
|
6391
|
-
var
|
|
6392
|
-
for (x = ++m[0]; x > 1 && (
|
|
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;
|
|
@@ -6398,8 +6398,8 @@ function go(s, e, t = {}) {
|
|
|
6398
6398
|
var P = m[1];
|
|
6399
6399
|
if (w = h[P], w.tm >= w.mtm && h[w.nn].mtm <= w.tm) break;
|
|
6400
6400
|
w.mtm == f ? P = m[1] = m[m[0]--] : (ur(h, P), w.tm = g);
|
|
6401
|
-
var
|
|
6402
|
-
for (x = 1; (
|
|
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
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 && hr(i, b),
|
|
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) {
|
|
@@ -6508,7 +6508,7 @@ function wo(s, e, t, i, r = 8) {
|
|
|
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
6513
|
function hr(s, e) {
|
|
6514
6514
|
let t = 1 << Bi(e.length);
|
|
@@ -6523,19 +6523,19 @@ function Po(s, e, t, i) {
|
|
|
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
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;
|
|
@@ -6631,7 +6631,7 @@ class So {
|
|
|
6631
6631
|
* Uses an offscreen renderer to avoid disturbing the main display
|
|
6632
6632
|
*/
|
|
6633
6633
|
screenshot(e = {}) {
|
|
6634
|
-
const { width: t = 1920, height: i = 1080, filename: r } = e, n = new
|
|
6634
|
+
const { width: t = 1920, height: i = 1080, filename: r } = e, n = new S.WebGLRenderer({
|
|
6635
6635
|
antialias: !0,
|
|
6636
6636
|
preserveDrawingBuffer: !0
|
|
6637
6637
|
});
|
|
@@ -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, {
|
|
@@ -7506,7 +7506,7 @@ void main() {
|
|
|
7506
7506
|
`, pr = Math.PI / 180;
|
|
7507
7507
|
function Fo(s, e, t = ee) {
|
|
7508
7508
|
const i = (90 - s) * pr, r = (e + 180) * pr;
|
|
7509
|
-
return new
|
|
7509
|
+
return new S.Vector3(
|
|
7510
7510
|
-t * Math.sin(i) * Math.cos(r),
|
|
7511
7511
|
t * Math.cos(i),
|
|
7512
7512
|
t * Math.sin(i) * Math.sin(r)
|
|
@@ -7514,7 +7514,7 @@ function Fo(s, e, t = ee) {
|
|
|
7514
7514
|
}
|
|
7515
7515
|
function zo(s, e) {
|
|
7516
7516
|
const t = 2 * Math.PI * ee, i = Math.PI * ee;
|
|
7517
|
-
return new
|
|
7517
|
+
return new S.Vector3(e / 180 * (t / 2), s / 90 * (i / 2), 0);
|
|
7518
7518
|
}
|
|
7519
7519
|
const Uo = {
|
|
7520
7520
|
style: "spike",
|
|
@@ -7536,13 +7536,13 @@ class No {
|
|
|
7536
7536
|
markerMaterial;
|
|
7537
7537
|
glowMaterial;
|
|
7538
7538
|
constructor(e = {}) {
|
|
7539
|
-
this.group = new
|
|
7540
|
-
color: new
|
|
7539
|
+
this.group = new S.Group(), this.config = { ...Uo, ...e }, this.markerMaterial = new S.MeshBasicMaterial({
|
|
7540
|
+
color: new S.Color(this.config.color),
|
|
7541
7541
|
transparent: !0,
|
|
7542
7542
|
opacity: this.config.opacity
|
|
7543
|
-
}), this.glowMaterial = new
|
|
7543
|
+
}), this.glowMaterial = new S.ShaderMaterial({
|
|
7544
7544
|
uniforms: {
|
|
7545
|
-
uColor: { value: new
|
|
7545
|
+
uColor: { value: new S.Color(this.config.color) },
|
|
7546
7546
|
uTime: { value: 0 },
|
|
7547
7547
|
uPulse: { value: this.config.pulseAnimation ? 1 : 0 }
|
|
7548
7548
|
},
|
|
@@ -7568,8 +7568,8 @@ class No {
|
|
|
7568
7568
|
}
|
|
7569
7569
|
`,
|
|
7570
7570
|
transparent: !0,
|
|
7571
|
-
blending:
|
|
7572
|
-
side:
|
|
7571
|
+
blending: S.AdditiveBlending,
|
|
7572
|
+
side: S.BackSide,
|
|
7573
7573
|
depthWrite: !1
|
|
7574
7574
|
});
|
|
7575
7575
|
}
|
|
@@ -7626,34 +7626,34 @@ class No {
|
|
|
7626
7626
|
const r = 2 + t * this.config.maxHeight;
|
|
7627
7627
|
switch (this.config.style) {
|
|
7628
7628
|
case "dot":
|
|
7629
|
-
i = new
|
|
7629
|
+
i = new S.SphereGeometry(1 + t * 2, 16, 12);
|
|
7630
7630
|
break;
|
|
7631
7631
|
case "pin":
|
|
7632
|
-
i = new
|
|
7632
|
+
i = new S.ConeGeometry(1.5, r, 8);
|
|
7633
7633
|
break;
|
|
7634
7634
|
case "spike":
|
|
7635
7635
|
default:
|
|
7636
|
-
i = new
|
|
7636
|
+
i = new S.CylinderGeometry(0.3, 1.2, r, 8);
|
|
7637
7637
|
break;
|
|
7638
7638
|
}
|
|
7639
|
-
const n = e.color ? new
|
|
7640
|
-
color: new
|
|
7639
|
+
const n = e.color ? new S.MeshBasicMaterial({
|
|
7640
|
+
color: new S.Color(e.color),
|
|
7641
7641
|
transparent: !0,
|
|
7642
7642
|
opacity: this.config.opacity
|
|
7643
|
-
}) : this.markerMaterial, a = new
|
|
7643
|
+
}) : this.markerMaterial, a = new S.Mesh(i, n);
|
|
7644
7644
|
return a.userData = { marker: e, height: r }, a;
|
|
7645
7645
|
}
|
|
7646
7646
|
/**
|
|
7647
7647
|
* Create glow mesh for marker
|
|
7648
7648
|
*/
|
|
7649
7649
|
createGlowMesh(e, t) {
|
|
7650
|
-
const i = 2 + t * 3, r = new
|
|
7650
|
+
const i = 2 + t * 3, r = new S.SphereGeometry(i, 16, 12), n = e.color ? new S.ShaderMaterial({
|
|
7651
7651
|
...this.glowMaterial,
|
|
7652
7652
|
uniforms: {
|
|
7653
7653
|
...this.glowMaterial.uniforms,
|
|
7654
|
-
uColor: { value: new
|
|
7654
|
+
uColor: { value: new S.Color(e.color) }
|
|
7655
7655
|
}
|
|
7656
|
-
}) : this.glowMaterial, a = new
|
|
7656
|
+
}) : this.glowMaterial, a = new S.Mesh(r, n);
|
|
7657
7657
|
return a.userData = { marker: e }, a;
|
|
7658
7658
|
}
|
|
7659
7659
|
/**
|
|
@@ -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,17 +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://raw.githubusercontent.com/batikanor/gralobe-assets/main/textures/world.topo.200407.3x5400x2700.jpg",
|
|
8055
|
-
day: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
8056
|
-
bathymetry: "https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73580/world.topo.bathy.200401.3x5400x2700.jpg"
|
|
8057
|
-
// NEW
|
|
8058
|
-
}, mr = {
|
|
8087
|
+
const mr = {
|
|
8059
8088
|
texture: "satellite",
|
|
8060
8089
|
labels: "data",
|
|
8061
8090
|
statistic: "lifeExpectancy",
|
|
@@ -8087,7 +8116,7 @@ const ni = {
|
|
|
8087
8116
|
pointRadius: 140,
|
|
8088
8117
|
enableShortcuts: !0
|
|
8089
8118
|
};
|
|
8090
|
-
class
|
|
8119
|
+
class Yo {
|
|
8091
8120
|
container;
|
|
8092
8121
|
config;
|
|
8093
8122
|
// Three.js core
|
|
@@ -8109,7 +8138,7 @@ class Ho {
|
|
|
8109
8138
|
markerLayer = null;
|
|
8110
8139
|
toolbar = null;
|
|
8111
8140
|
dataGrid = null;
|
|
8112
|
-
textureLoader = new
|
|
8141
|
+
textureLoader = new S.TextureLoader();
|
|
8113
8142
|
dataTexture = null;
|
|
8114
8143
|
// State
|
|
8115
8144
|
morph = 0;
|
|
@@ -8134,7 +8163,7 @@ class Ho {
|
|
|
8134
8163
|
this.container = i;
|
|
8135
8164
|
} else
|
|
8136
8165
|
this.container = e;
|
|
8137
|
-
this.container.classList.add("gralobe-viz-container"), this.config = {
|
|
8166
|
+
this.container.classList.add("gralobe-viz-container"), this.textureLoader.setCrossOrigin("anonymous"), this.config = {
|
|
8138
8167
|
...mr,
|
|
8139
8168
|
...t,
|
|
8140
8169
|
effects: { ...mr.effects, ...t.effects || {} }
|
|
@@ -8145,7 +8174,7 @@ class Ho {
|
|
|
8145
8174
|
async init() {
|
|
8146
8175
|
try {
|
|
8147
8176
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
8148
|
-
this.scene = new
|
|
8177
|
+
this.scene = new S.Scene(), this.scene.background = new S.Color(2066), this.camera = new S.PerspectiveCamera(50, e / t, 0.1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new S.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new En(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 2, this.controls.maxDistance = 400, this.choropleth = new tt(
|
|
8149
8178
|
this.config.topology,
|
|
8150
8179
|
(r, n) => {
|
|
8151
8180
|
this.config.onLoadProgress?.(r, n);
|
|
@@ -8156,7 +8185,7 @@ class Ho {
|
|
|
8156
8185
|
duration: 1
|
|
8157
8186
|
}));
|
|
8158
8187
|
}
|
|
8159
|
-
), 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();
|
|
8160
8189
|
const i = this.choropleth.getFeatureLabels();
|
|
8161
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", () => {
|
|
8162
8191
|
this.renderer.domElement.focus();
|
|
@@ -8177,20 +8206,22 @@ class Ho {
|
|
|
8177
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());
|
|
8178
8207
|
};
|
|
8179
8208
|
async createGlobe() {
|
|
8180
|
-
const e = this.
|
|
8209
|
+
const e = this.loadTextureSource(
|
|
8210
|
+
vi[this.config.texture]
|
|
8211
|
+
), t = new Promise(
|
|
8181
8212
|
(a, o) => setTimeout(() => o(new Error("Texture load timed out after 10s")), 1e4)
|
|
8182
8213
|
), i = await Promise.race([e, t]);
|
|
8183
8214
|
if (this.isDestroyed || !this.renderer) return;
|
|
8184
|
-
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter =
|
|
8215
|
+
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter = S.LinearMipmapLinearFilter, i.magFilter = S.LinearFilter;
|
|
8185
8216
|
const r = document.createElement("canvas");
|
|
8186
|
-
r.width = 2048, r.height = 1024, this.dataTexture = new
|
|
8187
|
-
const n = new
|
|
8217
|
+
r.width = 2048, r.height = 1024, this.dataTexture = new S.CanvasTexture(r);
|
|
8218
|
+
const n = new S.PlaneGeometry(
|
|
8188
8219
|
Math.PI * 2 * ee,
|
|
8189
8220
|
Math.PI * ee,
|
|
8190
8221
|
256,
|
|
8191
8222
|
128
|
|
8192
8223
|
);
|
|
8193
|
-
this.material = new
|
|
8224
|
+
this.material = new S.ShaderMaterial({
|
|
8194
8225
|
vertexShader: Lo,
|
|
8195
8226
|
fragmentShader: Do,
|
|
8196
8227
|
uniforms: {
|
|
@@ -8207,7 +8238,7 @@ class Ho {
|
|
|
8207
8238
|
uDataOpacity: { value: 0 },
|
|
8208
8239
|
uDataOverlay: { value: 0 },
|
|
8209
8240
|
uExtrudeHeight: { value: this.config.extrudeHeight ? 1 : 0 },
|
|
8210
|
-
uSunDir: { value: new
|
|
8241
|
+
uSunDir: { value: new S.Vector3(1, 0.5, 1).normalize() },
|
|
8211
8242
|
// Effect uniforms
|
|
8212
8243
|
uClouds: { value: this.config.effects.clouds ? 1 : 0 },
|
|
8213
8244
|
uCloudSpeed: { value: this.config.effects.cloudSpeed || 1 },
|
|
@@ -8227,44 +8258,44 @@ class Ho {
|
|
|
8227
8258
|
uScanEffect: { value: 0 },
|
|
8228
8259
|
uScanSpeed: { value: 1 },
|
|
8229
8260
|
uHologram: { value: this.config.effects.hologramMode ? 1 : 0 },
|
|
8230
|
-
uHologramColor: { value: new
|
|
8261
|
+
uHologramColor: { value: new S.Color(65535) },
|
|
8231
8262
|
uVintage: { value: this.config.effects.vintageMode ? 1 : 0 },
|
|
8232
8263
|
uThermal: { value: this.config.effects.thermalMode ? 1 : 0 },
|
|
8233
8264
|
uBlueprint: { value: this.config.effects.blueprintMode ? 1 : 0 },
|
|
8234
8265
|
uGlowPulse: { value: this.config.effects.glowPulse ? 1 : 0 },
|
|
8235
|
-
uGlowColor: { value: new
|
|
8266
|
+
uGlowColor: { value: new S.Color(4491519) }
|
|
8236
8267
|
},
|
|
8237
|
-
side:
|
|
8238
|
-
}), this.globe = new
|
|
8268
|
+
side: S.DoubleSide
|
|
8269
|
+
}), this.globe = new S.Mesh(n, this.material), this.scene.add(this.globe);
|
|
8239
8270
|
}
|
|
8240
8271
|
createAtmosphere() {
|
|
8241
|
-
const e = new
|
|
8272
|
+
const e = new S.PlaneGeometry(
|
|
8242
8273
|
Math.PI * 2 * ee * 1.15,
|
|
8243
8274
|
Math.PI * ee * 1.15,
|
|
8244
8275
|
128,
|
|
8245
8276
|
64
|
|
8246
|
-
), t = new
|
|
8277
|
+
), t = new S.ShaderMaterial({
|
|
8247
8278
|
vertexShader: Io,
|
|
8248
8279
|
fragmentShader: Ro,
|
|
8249
8280
|
uniforms: {
|
|
8250
8281
|
uMorph: { value: 0 },
|
|
8251
8282
|
uOpacity: { value: 1 }
|
|
8252
8283
|
},
|
|
8253
|
-
side:
|
|
8284
|
+
side: S.BackSide,
|
|
8254
8285
|
transparent: !0,
|
|
8255
|
-
blending:
|
|
8286
|
+
blending: S.AdditiveBlending,
|
|
8256
8287
|
depthWrite: !1
|
|
8257
8288
|
});
|
|
8258
|
-
this.atmosphere = new
|
|
8289
|
+
this.atmosphere = new S.Mesh(e, t), this.scene.add(this.atmosphere);
|
|
8259
8290
|
}
|
|
8260
8291
|
createStars() {
|
|
8261
|
-
const t = new
|
|
8292
|
+
const t = new S.BufferGeometry(), i = new Float32Array(3e3 * 3), r = new Float32Array(3e3), n = new Float32Array(3e3);
|
|
8262
8293
|
for (let o = 0; o < 3e3; o++) {
|
|
8263
8294
|
const l = 300 + Math.random() * 300, u = Math.random() * Math.PI * 2, c = Math.acos(2 * Math.random() - 1);
|
|
8264
8295
|
i[o * 3] = l * Math.sin(c) * Math.cos(u), i[o * 3 + 1] = l * Math.sin(c) * Math.sin(u), i[o * 3 + 2] = l * Math.cos(c), r[o] = 0.5 + Math.random() * 1.5, n[o] = Math.random() * Math.PI * 2;
|
|
8265
8296
|
}
|
|
8266
|
-
t.setAttribute("position", new
|
|
8267
|
-
const a = new
|
|
8297
|
+
t.setAttribute("position", new S.BufferAttribute(i, 3)), t.setAttribute("aSize", new S.BufferAttribute(r, 1)), t.setAttribute("aPhase", new S.BufferAttribute(n, 1));
|
|
8298
|
+
const a = new S.ShaderMaterial({
|
|
8268
8299
|
vertexShader: ko,
|
|
8269
8300
|
fragmentShader: Oo,
|
|
8270
8301
|
uniforms: {
|
|
@@ -8273,10 +8304,10 @@ class Ho {
|
|
|
8273
8304
|
uOpacity: { value: 1 }
|
|
8274
8305
|
},
|
|
8275
8306
|
transparent: !0,
|
|
8276
|
-
blending:
|
|
8307
|
+
blending: S.AdditiveBlending,
|
|
8277
8308
|
depthWrite: !1
|
|
8278
8309
|
});
|
|
8279
|
-
this.stars = new
|
|
8310
|
+
this.stars = new S.Points(t, a), this.scene.add(this.stars);
|
|
8280
8311
|
}
|
|
8281
8312
|
createGUI() {
|
|
8282
8313
|
getComputedStyle(this.container).position === "static" && (this.container.style.position = "relative"), console.warn("Creating GUI v6 (Two-Stage Navigation)");
|
|
@@ -8525,7 +8556,7 @@ class Ho {
|
|
|
8525
8556
|
font-size: 0.9em !important;
|
|
8526
8557
|
margin-left: 0 !important;
|
|
8527
8558
|
}
|
|
8528
|
-
`, this.categoryGUIs.forEach((
|
|
8559
|
+
`, this.categoryGUIs.forEach((A) => A.destroy()), this.categoryGUIs = [];
|
|
8529
8560
|
const i = this.container.querySelector(".gralobe-gui-toggle");
|
|
8530
8561
|
i && i.remove();
|
|
8531
8562
|
const r = this.container.querySelector(".gralobe-category-bar");
|
|
@@ -8540,22 +8571,22 @@ class Ho {
|
|
|
8540
8571
|
a.className = "gralobe-category-bar", this.container.appendChild(a);
|
|
8541
8572
|
let o = !1, l = null;
|
|
8542
8573
|
const u = {}, c = {}, h = () => {
|
|
8543
|
-
Object.keys(u).forEach((
|
|
8544
|
-
u[
|
|
8574
|
+
Object.keys(u).forEach((A) => {
|
|
8575
|
+
u[A].domElement.classList.remove("active-panel"), c[A].classList.remove("active");
|
|
8545
8576
|
}), l = null;
|
|
8546
|
-
}, p = (
|
|
8547
|
-
l ===
|
|
8548
|
-
}, f = (
|
|
8549
|
-
o =
|
|
8577
|
+
}, p = (A) => {
|
|
8578
|
+
l === A ? h() : (h(), l = A, u[A].domElement.classList.add("active-panel"), c[A].classList.add("active"));
|
|
8579
|
+
}, f = (A) => {
|
|
8580
|
+
o = A, o ? (a.classList.add("visible"), n.classList.add("expanded")) : (a.classList.remove("visible"), n.classList.remove("expanded"), h());
|
|
8550
8581
|
};
|
|
8551
|
-
n.onclick = (
|
|
8552
|
-
|
|
8582
|
+
n.onclick = (A) => {
|
|
8583
|
+
A.stopPropagation(), f(!o);
|
|
8553
8584
|
}, f(!1);
|
|
8554
|
-
const m = (
|
|
8585
|
+
const m = (A, ve) => {
|
|
8555
8586
|
const Q = document.createElement("button");
|
|
8556
|
-
Q.className = "gralobe-category-btn", Q.innerText =
|
|
8557
|
-
me.stopPropagation(), p(
|
|
8558
|
-
}, a.appendChild(Q), c[
|
|
8587
|
+
Q.className = "gralobe-category-btn", Q.innerText = ve, Q.onclick = (me) => {
|
|
8588
|
+
me.stopPropagation(), p(A);
|
|
8589
|
+
}, a.appendChild(Q), c[A] = Q;
|
|
8559
8590
|
const se = new Ni({ container: this.container, title: "" });
|
|
8560
8591
|
this.categoryGUIs.push(se), se.domElement.classList.add("root");
|
|
8561
8592
|
const fe = se.domElement.querySelector(".title");
|
|
@@ -8565,13 +8596,13 @@ class Ho {
|
|
|
8565
8596
|
const me = se.domElement.children[0];
|
|
8566
8597
|
me.classList.contains("children") || me.remove();
|
|
8567
8598
|
}
|
|
8568
|
-
return u[
|
|
8569
|
-
}, g = m("texture", "Texture").add(this.config, "texture",
|
|
8599
|
+
return u[A] = se, se;
|
|
8600
|
+
}, g = m("texture", "Texture").add(this.config, "texture", $o).name("Theme").onChange((A) => this.setTexture(A));
|
|
8570
8601
|
this.addTooltip(
|
|
8571
8602
|
g,
|
|
8572
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."
|
|
8573
8604
|
);
|
|
8574
|
-
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));
|
|
8575
8606
|
this.addTooltip(
|
|
8576
8607
|
y,
|
|
8577
8608
|
"<b>Switch to Globe View</b><br><br>Smoothly animate to the 3D spherical view."
|
|
@@ -8579,63 +8610,63 @@ class Ho {
|
|
|
8579
8610
|
x,
|
|
8580
8611
|
"<b>Switch to Map View</b><br><br>Smoothly flatten the globe into a 2D map projection."
|
|
8581
8612
|
), this.addTooltip(
|
|
8582
|
-
|
|
8613
|
+
_,
|
|
8583
8614
|
"<b>Projection Morph</b><br><br>Manually control the transition between Globe (1) and Flat Map (0)."
|
|
8584
8615
|
);
|
|
8585
|
-
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));
|
|
8586
8617
|
this.addTooltip(
|
|
8587
8618
|
w,
|
|
8588
8619
|
"<b>Data Metric</b><br><br>Select the statistical dataset to visualize on the globe."
|
|
8589
8620
|
);
|
|
8590
|
-
const P = m("fx", "Effects"), E = this.config.effects, T = P.addFolder("Atmosphere"), L = T.add(E, "atmosphere").onChange((
|
|
8591
|
-
this.material && (this.material.uniforms.uAtmosphereIntensity.value =
|
|
8592
|
-
}), M = T.add(E, "clouds").onChange((
|
|
8593
|
-
this.material && (this.material.uniforms.uClouds.value =
|
|
8621
|
+
const P = m("fx", "Effects"), E = this.config.effects, T = P.addFolder("Atmosphere"), L = T.add(E, "atmosphere").onChange((A) => {
|
|
8622
|
+
this.material && (this.material.uniforms.uAtmosphereIntensity.value = A ? 1 : 0);
|
|
8623
|
+
}), M = T.add(E, "clouds").onChange((A) => {
|
|
8624
|
+
this.material && (this.material.uniforms.uClouds.value = A ? 1 : 0);
|
|
8594
8625
|
});
|
|
8595
8626
|
this.addTooltip(
|
|
8596
8627
|
L,
|
|
8597
8628
|
"<b>Atmosphere Glow</b><br><br>Toggle the outer atmospheric glow effect."
|
|
8598
|
-
), this.addTooltip(M, "<b>Cloud Layer</b><br><br>Toggle the moving cloud layer."), T.add(E, "cloudSpeed", 0, 5).name("Cloud Speed").onChange((
|
|
8599
|
-
this.material && (this.material.uniforms.uCloudSpeed.value =
|
|
8600
|
-
}), T.add(E, "cloudOpacity", 0, 1).name("Cloud Opacity").onChange((
|
|
8601
|
-
this.material && (this.material.uniforms.uCloudOpacity.value =
|
|
8602
|
-
}), T.add(E, "aurora").name("Aurora").onChange((
|
|
8603
|
-
this.material && (this.material.uniforms.uAurora.value =
|
|
8629
|
+
), this.addTooltip(M, "<b>Cloud Layer</b><br><br>Toggle the moving cloud layer."), T.add(E, "cloudSpeed", 0, 5).name("Cloud Speed").onChange((A) => {
|
|
8630
|
+
this.material && (this.material.uniforms.uCloudSpeed.value = A);
|
|
8631
|
+
}), T.add(E, "cloudOpacity", 0, 1).name("Cloud Opacity").onChange((A) => {
|
|
8632
|
+
this.material && (this.material.uniforms.uCloudOpacity.value = A);
|
|
8633
|
+
}), T.add(E, "aurora").name("Aurora").onChange((A) => {
|
|
8634
|
+
this.material && (this.material.uniforms.uAurora.value = A ? 1 : 0);
|
|
8604
8635
|
}), T.add(E, "starTwinkle").name("Star Twinkle"), T.close();
|
|
8605
8636
|
const D = P.addFolder("Lighting");
|
|
8606
|
-
D.add(E, "cityLights").name("City Lights").onChange((
|
|
8607
|
-
this.material && (this.material.uniforms.uCityLights.value =
|
|
8608
|
-
}), D.add(E, "oceanSpecular").name("Ocean Specular").onChange((
|
|
8609
|
-
this.material && (this.material.uniforms.uOceanSpecular.value =
|
|
8637
|
+
D.add(E, "cityLights").name("City Lights").onChange((A) => {
|
|
8638
|
+
this.material && (this.material.uniforms.uCityLights.value = A ? 1 : 0);
|
|
8639
|
+
}), D.add(E, "oceanSpecular").name("Ocean Specular").onChange((A) => {
|
|
8640
|
+
this.material && (this.material.uniforms.uOceanSpecular.value = A ? 1 : 0);
|
|
8610
8641
|
}), D.close();
|
|
8611
8642
|
const R = P.addFolder("Grid System");
|
|
8612
|
-
R.add(E, "gridLines").name("Enable Grid").onChange((
|
|
8613
|
-
this.material && (this.material.uniforms.uGridLines.value =
|
|
8614
|
-
}), R.add(E, "gridOpacity", 0, 1).name("Opacity").onChange((
|
|
8615
|
-
this.material && (this.material.uniforms.uGridOpacity.value =
|
|
8643
|
+
R.add(E, "gridLines").name("Enable Grid").onChange((A) => {
|
|
8644
|
+
this.material && (this.material.uniforms.uGridLines.value = A ? 1 : 0);
|
|
8645
|
+
}), R.add(E, "gridOpacity", 0, 1).name("Opacity").onChange((A) => {
|
|
8646
|
+
this.material && (this.material.uniforms.uGridOpacity.value = A);
|
|
8616
8647
|
}), R.close();
|
|
8617
|
-
const U = (
|
|
8618
|
-
|
|
8619
|
-
const Q =
|
|
8620
|
-
|
|
8621
|
-
return Q.apply(this),
|
|
8648
|
+
const U = (A) => {
|
|
8649
|
+
A.forEach((ve) => {
|
|
8650
|
+
const Q = ve.open;
|
|
8651
|
+
ve.open = function() {
|
|
8652
|
+
return Q.apply(this), A.forEach((se) => {
|
|
8622
8653
|
se !== this && se.close();
|
|
8623
8654
|
}), this;
|
|
8624
8655
|
};
|
|
8625
8656
|
});
|
|
8626
8657
|
}, k = P.addFolder("Special Modes");
|
|
8627
|
-
k.add(E, "hologramMode").name("Hologram").onChange((
|
|
8628
|
-
this.material && (this.material.uniforms.uHologram.value =
|
|
8629
|
-
}), k.add(E, "vintageMode").name("Vintage").onChange((
|
|
8630
|
-
this.material && (this.material.uniforms.uVintage.value =
|
|
8631
|
-
}), k.add(E, "thermalMode").name("Thermal").onChange((
|
|
8632
|
-
this.material && (this.material.uniforms.uThermal.value =
|
|
8633
|
-
}), k.add(E, "blueprintMode").name("Blueprint").onChange((
|
|
8634
|
-
this.material && (this.material.uniforms.uBlueprint.value =
|
|
8635
|
-
}), k.add(E, "glowPulse").name("Glow Pulse").onChange((
|
|
8636
|
-
this.material && (this.material.uniforms.uGlowPulse.value =
|
|
8658
|
+
k.add(E, "hologramMode").name("Hologram").onChange((A) => {
|
|
8659
|
+
this.material && (this.material.uniforms.uHologram.value = A ? 1 : 0);
|
|
8660
|
+
}), k.add(E, "vintageMode").name("Vintage").onChange((A) => {
|
|
8661
|
+
this.material && (this.material.uniforms.uVintage.value = A ? 1 : 0);
|
|
8662
|
+
}), k.add(E, "thermalMode").name("Thermal").onChange((A) => {
|
|
8663
|
+
this.material && (this.material.uniforms.uThermal.value = A ? 1 : 0);
|
|
8664
|
+
}), k.add(E, "blueprintMode").name("Blueprint").onChange((A) => {
|
|
8665
|
+
this.material && (this.material.uniforms.uBlueprint.value = A ? 1 : 0);
|
|
8666
|
+
}), k.add(E, "glowPulse").name("Glow Pulse").onChange((A) => {
|
|
8667
|
+
this.material && (this.material.uniforms.uGlowPulse.value = A ? 1 : 0);
|
|
8637
8668
|
}), k.close(), U([T, D, R, k]);
|
|
8638
|
-
const O = m("settings", "Settings"), Z = O.add(this.config, "labels", ["none", "minimal", "all", "data"]).onChange((
|
|
8669
|
+
const O = m("settings", "Settings"), Z = O.add(this.config, "labels", ["none", "minimal", "all", "data"]).onChange((A) => this.setLabels(A));
|
|
8639
8670
|
this.addTooltip(
|
|
8640
8671
|
Z,
|
|
8641
8672
|
"<b>Label Visibility</b><br><br>Control which labels are shown.<br>• <b>none</b>: No labels<br>• <b>minimal</b>: Top 7 major countries<br>• <b>all</b>: All countries<br>• <b>data</b>: Only entities with active data"
|
|
@@ -8646,10 +8677,10 @@ class Ho {
|
|
|
8646
8677
|
this.addTooltip(
|
|
8647
8678
|
Ne,
|
|
8648
8679
|
"<b>Synthetic Geometry Radius</b><br><br>If our data consists of point locations (like cities) without defined 2D borders, we generate synthetic circular boundaries for them.<br><br>This control scales the size (in km) of these generated circles. Larger values make small cities more visible on the global map."
|
|
8649
|
-
), O.add(this.config, "extrudeHeight", 0, 2).name("Extrude").onChange((
|
|
8650
|
-
this.material && (this.material.uniforms.uExtrudeRaw.value =
|
|
8651
|
-
}), O.add(this.config, "autoRotate").name("Auto Rotate"), O.add({ screenshot: () => this.screenshot({ width: 1920, height: 1080 }) }, "screenshot").name("Screenshot"), O.add(this.config, "enableShortcuts").name("Keyboard Shortcuts").onChange((
|
|
8652
|
-
this.toolbar?.setShortcutsEnabled(
|
|
8680
|
+
), O.add(this.config, "extrudeHeight", 0, 2).name("Extrude").onChange((A) => {
|
|
8681
|
+
this.material && (this.material.uniforms.uExtrudeRaw.value = A);
|
|
8682
|
+
}), O.add(this.config, "autoRotate").name("Auto Rotate"), O.add({ screenshot: () => this.screenshot({ width: 1920, height: 1080 }) }, "screenshot").name("Screenshot"), O.add(this.config, "enableShortcuts").name("Keyboard Shortcuts").onChange((A) => {
|
|
8683
|
+
this.toolbar?.setShortcutsEnabled(A);
|
|
8653
8684
|
});
|
|
8654
8685
|
}
|
|
8655
8686
|
handleResize = () => {
|
|
@@ -8669,9 +8700,9 @@ class Ho {
|
|
|
8669
8700
|
// Public API Implementation
|
|
8670
8701
|
toGlobe() {
|
|
8671
8702
|
this.controls.enableRotate = !0, this.controls.minAzimuthAngle = -1 / 0, this.controls.maxAzimuthAngle = 1 / 0, this.controls.minPolarAngle = 0, this.controls.maxPolarAngle = Math.PI, this.controls.screenSpacePanning = !1, this.controls.mouseButtons = {
|
|
8672
|
-
LEFT:
|
|
8673
|
-
MIDDLE:
|
|
8674
|
-
RIGHT:
|
|
8703
|
+
LEFT: S.MOUSE.ROTATE,
|
|
8704
|
+
MIDDLE: S.MOUSE.DOLLY,
|
|
8705
|
+
RIGHT: S.MOUSE.PAN
|
|
8675
8706
|
};
|
|
8676
8707
|
let e = 0;
|
|
8677
8708
|
const t = this.choropleth?.getBounds();
|
|
@@ -8719,8 +8750,8 @@ class Ho {
|
|
|
8719
8750
|
const e = this.choropleth?.getBounds(), t = Math.PI * 2 * ee, i = Math.PI * ee;
|
|
8720
8751
|
let r = 0, n = 0, a = t, o = i;
|
|
8721
8752
|
if (e) {
|
|
8722
|
-
const [f, m, d, g] = e, b = f / 180 * (t / 2), y = d / 180 * (t / 2), x = m / 90 * (i / 2),
|
|
8723
|
-
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;
|
|
8724
8755
|
}
|
|
8725
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);
|
|
8726
8757
|
this.controls.enabled = !1, Y.to(this, {
|
|
@@ -8764,9 +8795,9 @@ class Ho {
|
|
|
8764
8795
|
duration: 2,
|
|
8765
8796
|
ease: "power3.inOut"
|
|
8766
8797
|
}), this.controls.screenSpacePanning = !0, this.controls.mouseButtons = {
|
|
8767
|
-
LEFT:
|
|
8768
|
-
MIDDLE:
|
|
8769
|
-
RIGHT:
|
|
8798
|
+
LEFT: S.MOUSE.PAN,
|
|
8799
|
+
MIDDLE: S.MOUSE.DOLLY,
|
|
8800
|
+
RIGHT: S.MOUSE.ROTATE
|
|
8770
8801
|
}, this.stars && Y.to(this.stars.material.uniforms.uOpacity, {
|
|
8771
8802
|
value: 0,
|
|
8772
8803
|
duration: 1
|
|
@@ -8779,7 +8810,7 @@ class Ho {
|
|
|
8779
8810
|
* Setup mouse interactions (Click to Zoom, etc.)
|
|
8780
8811
|
*/
|
|
8781
8812
|
setupInteraction() {
|
|
8782
|
-
const e = new
|
|
8813
|
+
const e = new S.Raycaster(), t = new S.Vector2(), i = new S.Plane(new S.Vector3(0, 0, 1), 0), r = new S.Vector3();
|
|
8783
8814
|
let n = !1, a = (/* @__PURE__ */ new Date()).getTime();
|
|
8784
8815
|
this.renderer.domElement.addEventListener("mousedown", () => {
|
|
8785
8816
|
n = !1, a = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -8837,7 +8868,7 @@ class Ho {
|
|
|
8837
8868
|
t.definition.domain
|
|
8838
8869
|
);
|
|
8839
8870
|
if (this.material && i) {
|
|
8840
|
-
const r = new
|
|
8871
|
+
const r = new S.CanvasTexture(i);
|
|
8841
8872
|
r.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), r.needsUpdate = !0, this.material.uniforms.uDataTexture.value = r, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value === 0 && Y.to(this.material.uniforms.uDataOpacity, {
|
|
8842
8873
|
value: 0.7,
|
|
8843
8874
|
duration: 1
|
|
@@ -8866,16 +8897,40 @@ class Ho {
|
|
|
8866
8897
|
if (!(!this.renderer || !this.material)) {
|
|
8867
8898
|
this.config.texture = e;
|
|
8868
8899
|
try {
|
|
8869
|
-
const t = this.
|
|
8900
|
+
const t = this.loadTextureSource(vi[e]), i = new Promise(
|
|
8870
8901
|
(n, a) => setTimeout(() => a(new Error("Texture load timed out after 10s")), 1e4)
|
|
8871
8902
|
), r = await Promise.race([t, i]);
|
|
8872
8903
|
if (this.isDestroyed || !this.material || !this.material.uniforms.uTexture) return;
|
|
8873
|
-
r.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), r.minFilter =
|
|
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;
|
|
8874
8905
|
} catch (t) {
|
|
8875
8906
|
console.error(`Failed to set texture ${e}:`, t);
|
|
8876
8907
|
}
|
|
8877
8908
|
}
|
|
8878
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;
|
|
8933
|
+
}
|
|
8879
8934
|
setAutoRotate(e) {
|
|
8880
8935
|
this.config.autoRotate = e;
|
|
8881
8936
|
}
|
|
@@ -9083,11 +9138,11 @@ class Ho {
|
|
|
9083
9138
|
}
|
|
9084
9139
|
export {
|
|
9085
9140
|
Ot as BUILT_IN_STATISTICS,
|
|
9086
|
-
|
|
9141
|
+
Yo as GlobeViz,
|
|
9087
9142
|
Je as WORLD_STATISTICS,
|
|
9088
9143
|
gr as createFormatter,
|
|
9089
|
-
|
|
9090
|
-
|
|
9144
|
+
Ho as formatValue,
|
|
9145
|
+
Sn as normalizeCountryValues,
|
|
9091
9146
|
Gi as toNumericCode
|
|
9092
9147
|
};
|
|
9093
9148
|
//# sourceMappingURL=gralobe.js.map
|