gralobe 1.0.24 → 1.0.25
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/dist/gralobe.js +855 -645
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +33 -14
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +43 -3
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Controls as
|
|
3
|
-
function
|
|
1
|
+
import * as A from "three";
|
|
2
|
+
import { Controls as Ur, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as Fr, Plane as zr, MathUtils as Nr, Matrix4 as Tn, Object3D as $r } from "three";
|
|
3
|
+
function Pe(a) {
|
|
4
4
|
if (a === void 0)
|
|
5
5
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6
6
|
return a;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Mn(a, e) {
|
|
9
9
|
a.prototype = Object.create(e.prototype), a.prototype.constructor = a, a.__proto__ = e;
|
|
10
10
|
}
|
|
11
11
|
var he = {
|
|
@@ -19,55 +19,55 @@ var he = {
|
|
|
19
19
|
duration: 0.5,
|
|
20
20
|
overwrite: !1,
|
|
21
21
|
delay: 0
|
|
22
|
-
}, Pi, K, z, fe = 1e8, k = 1 / fe, oi = Math.PI * 2,
|
|
22
|
+
}, Pi, K, z, fe = 1e8, k = 1 / fe, oi = Math.PI * 2, Br = oi / 4, Gr = 0, Dn = Math.sqrt, Vr = Math.cos, Hr = Math.sin, Z = function(e) {
|
|
23
23
|
return typeof e == "string";
|
|
24
24
|
}, G = function(e) {
|
|
25
25
|
return typeof e == "function";
|
|
26
|
-
},
|
|
26
|
+
}, Ae = function(e) {
|
|
27
27
|
return typeof e == "number";
|
|
28
28
|
}, Ci = function(e) {
|
|
29
29
|
return typeof e > "u";
|
|
30
|
-
},
|
|
30
|
+
}, Ee = function(e) {
|
|
31
31
|
return typeof e == "object";
|
|
32
32
|
}, ee = function(e) {
|
|
33
33
|
return e !== !1;
|
|
34
34
|
}, Ai = function() {
|
|
35
35
|
return typeof window < "u";
|
|
36
|
-
},
|
|
36
|
+
}, Dt = function(e) {
|
|
37
37
|
return G(e) || Z(e);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
38
|
+
}, Rn = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
39
|
+
}, X = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Ln = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Wt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, On = /[+-]=-?[.\d]+/, In = /[^,'"\[\]\s]+/gi, jr = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, ye, hi, Si, ce = {}, Nt = {}, kn, Un = function(e) {
|
|
40
40
|
return (Nt = at(e, ce)) && re;
|
|
41
|
-
},
|
|
41
|
+
}, Ti = function(e, t) {
|
|
42
42
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
43
43
|
}, vt = function(e, t) {
|
|
44
44
|
return !t && console.warn(e);
|
|
45
|
-
},
|
|
45
|
+
}, Fn = function(e, t) {
|
|
46
46
|
return e && (ce[e] = t) && Nt && (Nt[e] = t) || ce;
|
|
47
47
|
}, Et = function() {
|
|
48
48
|
return 0;
|
|
49
|
-
},
|
|
49
|
+
}, Yr = {
|
|
50
50
|
suppressEvents: !0,
|
|
51
51
|
isStart: !0,
|
|
52
52
|
kill: !1
|
|
53
53
|
}, kt = {
|
|
54
54
|
suppressEvents: !0,
|
|
55
55
|
kill: !1
|
|
56
|
-
},
|
|
56
|
+
}, Zr = {
|
|
57
57
|
suppressEvents: !0
|
|
58
|
-
},
|
|
58
|
+
}, Mi = {}, Le = [], ci = {}, zn, ae = {}, Xt = {}, Ki = 30, Ut = [], Di = "", Ri = function(e) {
|
|
59
59
|
var t = e[0], i, n;
|
|
60
|
-
if (
|
|
60
|
+
if (Ee(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
61
61
|
for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
|
|
62
62
|
;
|
|
63
63
|
i = Ut[n];
|
|
64
64
|
}
|
|
65
65
|
for (n = e.length; n--; )
|
|
66
|
-
e[n] && (e[n]._gsap || (e[n]._gsap = new
|
|
66
|
+
e[n] && (e[n]._gsap || (e[n]._gsap = new lr(e[n], i))) || e.splice(n, 1);
|
|
67
67
|
return e;
|
|
68
68
|
}, He = function(e) {
|
|
69
69
|
return e._gsap || Ri(me(e))[0]._gsap;
|
|
70
|
-
},
|
|
70
|
+
}, Nn = function(e, t, i) {
|
|
71
71
|
return (i = e[t]) && G(i) ? e[t]() : Ci(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
72
72
|
}, te = function(e, t) {
|
|
73
73
|
return (e = e.split(",")).forEach(t) || e;
|
|
@@ -78,28 +78,28 @@ var he = {
|
|
|
78
78
|
}, it = function(e, t) {
|
|
79
79
|
var i = t.charAt(0), n = parseFloat(t.substr(2));
|
|
80
80
|
return e = parseFloat(e), i === "+" ? e + n : i === "-" ? e - n : i === "*" ? e * n : e / n;
|
|
81
|
-
},
|
|
81
|
+
}, Kr = function(e, t) {
|
|
82
82
|
for (var i = t.length, n = 0; e.indexOf(t[n]) < 0 && ++n < i; )
|
|
83
83
|
;
|
|
84
84
|
return n < i;
|
|
85
85
|
}, $t = function() {
|
|
86
|
-
var e =
|
|
87
|
-
for (ci = {},
|
|
86
|
+
var e = Le.length, t = Le.slice(0), i, n;
|
|
87
|
+
for (ci = {}, Le.length = 0, i = 0; i < e; i++)
|
|
88
88
|
n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
|
|
89
|
-
},
|
|
89
|
+
}, Li = function(e) {
|
|
90
90
|
return !!(e._initted || e._startAt || e.add);
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
91
|
+
}, $n = function(e, t, i, n) {
|
|
92
|
+
Le.length && !K && $t(), e.render(t, i, !!(K && t < 0 && Li(e))), Le.length && !K && $t();
|
|
93
|
+
}, Bn = function(e) {
|
|
94
94
|
var t = parseFloat(e);
|
|
95
95
|
return (t || t === 0) && (e + "").match(In).length < 2 ? t : Z(e) ? e.trim() : e;
|
|
96
|
-
},
|
|
96
|
+
}, Gn = function(e) {
|
|
97
97
|
return e;
|
|
98
98
|
}, ue = function(e, t) {
|
|
99
99
|
for (var i in t)
|
|
100
100
|
i in e || (e[i] = t[i]);
|
|
101
101
|
return e;
|
|
102
|
-
},
|
|
102
|
+
}, Wr = function(e) {
|
|
103
103
|
return function(t, i) {
|
|
104
104
|
for (var n in i)
|
|
105
105
|
n in t || n === "duration" && e || n === "ease" || (t[n] = i[n]);
|
|
@@ -108,9 +108,9 @@ var he = {
|
|
|
108
108
|
for (var i in t)
|
|
109
109
|
e[i] = t[i];
|
|
110
110
|
return e;
|
|
111
|
-
},
|
|
111
|
+
}, Wi = function a(e, t) {
|
|
112
112
|
for (var i in t)
|
|
113
|
-
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] =
|
|
113
|
+
i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] = Ee(t[i]) ? a(e[i] || (e[i] = {}), t[i]) : t[i]);
|
|
114
114
|
return e;
|
|
115
115
|
}, Bt = function(e, t) {
|
|
116
116
|
var i = {}, n;
|
|
@@ -118,7 +118,7 @@ var he = {
|
|
|
118
118
|
n in t || (i[n] = e[n]);
|
|
119
119
|
return i;
|
|
120
120
|
}, yt = function(e) {
|
|
121
|
-
var t = e.parent || N, i = e.keyframes ?
|
|
121
|
+
var t = e.parent || N, i = e.keyframes ? Wr(X(e.keyframes)) : ue;
|
|
122
122
|
if (ee(e.inherit))
|
|
123
123
|
for (; t; )
|
|
124
124
|
i(e, t.vars.defaults), t = t.parent || t._dp;
|
|
@@ -127,7 +127,7 @@ var he = {
|
|
|
127
127
|
for (var i = e.length, n = i === t.length; n && i-- && e[i] === t[i]; )
|
|
128
128
|
;
|
|
129
129
|
return i < 0;
|
|
130
|
-
},
|
|
130
|
+
}, Vn = function(e, t, i, n, r) {
|
|
131
131
|
var s = e[n], o;
|
|
132
132
|
if (r)
|
|
133
133
|
for (o = t[r]; s && s[r] > o; )
|
|
@@ -144,15 +144,15 @@ var he = {
|
|
|
144
144
|
for (var i = e; i; )
|
|
145
145
|
i._dirty = 1, i = i.parent;
|
|
146
146
|
return e;
|
|
147
|
-
},
|
|
147
|
+
}, qr = function(e) {
|
|
148
148
|
for (var t = e.parent; t && t.parent; )
|
|
149
149
|
t._dirty = 1, t.totalDuration(), t = t.parent;
|
|
150
150
|
return e;
|
|
151
151
|
}, ui = function(e, t, i, n) {
|
|
152
152
|
return e._startAt && (K ? e._startAt.revert(kt) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, n));
|
|
153
|
-
},
|
|
153
|
+
}, Qr = function a(e) {
|
|
154
154
|
return !e || e._ts && a(e.parent);
|
|
155
|
-
},
|
|
155
|
+
}, Xi = function(e) {
|
|
156
156
|
return e._repeat ? ot(e._tTime, e = e.duration() + e._rDelay) * e : 0;
|
|
157
157
|
}, ot = function(e, t) {
|
|
158
158
|
var i = Math.floor(e = j(e / t));
|
|
@@ -164,39 +164,39 @@ var he = {
|
|
|
164
164
|
}, Kt = function(e, t) {
|
|
165
165
|
var i = e._dp;
|
|
166
166
|
return i && i.smoothChildTiming && e._ts && (e._start = j(i._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), Zt(e), i._dirty || je(i, e)), e;
|
|
167
|
-
},
|
|
167
|
+
}, Hn = function(e, t) {
|
|
168
168
|
var i;
|
|
169
|
-
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Gt(e.rawTime(), t), (!t._dur ||
|
|
169
|
+
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = Gt(e.rawTime(), t), (!t._dur || Mt(0, t.totalDuration(), i) - t._tTime > k) && t.render(i, !0)), je(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
170
170
|
if (e._dur < e.duration())
|
|
171
171
|
for (i = e; i._dp; )
|
|
172
172
|
i.rawTime() >= 0 && i.totalTime(i._tTime), i = i._dp;
|
|
173
173
|
e._zTime = -k;
|
|
174
174
|
}
|
|
175
|
-
},
|
|
176
|
-
return t.parent && Ie(t), t._start = j((
|
|
177
|
-
},
|
|
178
|
-
return (ce.ScrollTrigger ||
|
|
179
|
-
},
|
|
180
|
-
if (
|
|
175
|
+
}, xe = function(e, t, i, n) {
|
|
176
|
+
return t.parent && Ie(t), t._start = j((Ae(i) ? i : i || e !== N ? pe(e, i, t) : e._time) + t._delay), t._end = j(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Vn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Hn(e, t), e._ts < 0 && Kt(e, e._tTime), e;
|
|
177
|
+
}, jn = function(e, t) {
|
|
178
|
+
return (ce.ScrollTrigger || Ti("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
|
|
179
|
+
}, Yn = function(e, t, i, n, r) {
|
|
180
|
+
if (Ii(e, t, r), !e._initted)
|
|
181
181
|
return 1;
|
|
182
|
-
if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) &&
|
|
183
|
-
return
|
|
184
|
-
},
|
|
182
|
+
if (!i && e._pt && !K && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && zn !== oe.frame)
|
|
183
|
+
return Le.push(e), e._lazy = [r, n], 1;
|
|
184
|
+
}, Jr = function a(e) {
|
|
185
185
|
var t = e.parent;
|
|
186
186
|
return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
|
|
187
187
|
}, di = function(e) {
|
|
188
188
|
var t = e.data;
|
|
189
189
|
return t === "isFromStart" || t === "isStart";
|
|
190
|
-
},
|
|
191
|
-
var r = e.ratio, s = t < 0 || !t && (!e._start &&
|
|
192
|
-
if (o && e._repeat && (l =
|
|
193
|
-
if (!e._initted &&
|
|
190
|
+
}, es = function(e, t, i, n) {
|
|
191
|
+
var r = e.ratio, s = t < 0 || !t && (!e._start && Jr(e) && !(!e._initted && di(e)) || (e._ts < 0 || e._dp._ts < 0) && !di(e)) ? 0 : 1, o = e._rDelay, l = 0, c, h, u;
|
|
192
|
+
if (o && e._repeat && (l = Mt(0, e._tDur, t), h = ot(l, o), e._yoyo && h & 1 && (s = 1 - s), h !== ot(e._tTime, o) && (r = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== r || K || n || e._zTime === k || !t && e._zTime) {
|
|
193
|
+
if (!e._initted && Yn(e, t, n, i, l))
|
|
194
194
|
return;
|
|
195
195
|
for (u = e._zTime, e._zTime = t || (i ? k : 0), i || (i = t && !u), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l, c = e._pt; c; )
|
|
196
196
|
c.r(s, c.d), c = c._next;
|
|
197
197
|
t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && Ie(e, 1), !i && !K && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
198
198
|
} else e._zTime || (e._zTime = t);
|
|
199
|
-
},
|
|
199
|
+
}, ts = function(e, t, i) {
|
|
200
200
|
var n;
|
|
201
201
|
if (i > t)
|
|
202
202
|
for (n = e._first; n && n._start <= i; ) {
|
|
@@ -215,53 +215,53 @@ var he = {
|
|
|
215
215
|
return o && !n && (e._time *= s / e._dur), e._dur = s, e._tDur = r ? r < 0 ? 1e10 : j(s * (r + 1) + e._rDelay * r) : s, o > 0 && !n && Kt(e, e._tTime = e._tDur * o), e.parent && Zt(e), i || je(e.parent, e), e;
|
|
216
216
|
}, qi = function(e) {
|
|
217
217
|
return e instanceof q ? je(e) : lt(e, e._dur);
|
|
218
|
-
},
|
|
218
|
+
}, is = {
|
|
219
219
|
_start: 0,
|
|
220
220
|
endTime: Et,
|
|
221
221
|
totalDuration: Et
|
|
222
222
|
}, pe = function a(e, t, i) {
|
|
223
|
-
var n = e.labels, r = e._recent ||
|
|
224
|
-
return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (
|
|
223
|
+
var n = e.labels, r = e._recent || is, s = e.duration() >= fe ? r.endTime(!1) : e._dur, o, l, c;
|
|
224
|
+
return Z(t) && (isNaN(t) || t in n) ? (l = t.charAt(0), c = t.substr(-1) === "%", o = t.indexOf("="), l === "<" || l === ">" ? (o >= 0 && (t = t.replace(/=/, "")), (l === "<" ? r._start : r.endTime(r._repeat >= 0)) + (parseFloat(t.substr(1)) || 0) * (c ? (o < 0 ? r : i).totalDuration() / 100 : 1)) : o < 0 ? (t in n || (n[t] = s), n[t]) : (l = parseFloat(t.charAt(o - 1) + t.substr(o + 1)), c && i && (l = l / 100 * (X(i) ? i[0] : i).totalDuration()), o > 1 ? a(e, t.substr(0, o - 1), i) + l : s + l)) : t == null ? s : +t;
|
|
225
225
|
}, xt = function(e, t, i) {
|
|
226
|
-
var n =
|
|
226
|
+
var n = Ae(t[1]), r = (n ? 2 : 1) + (e < 2 ? 0 : 1), s = t[r], o, l;
|
|
227
227
|
if (n && (s.duration = t[1]), s.parent = i, e) {
|
|
228
228
|
for (o = s, l = i; l && !("immediateRender" in o); )
|
|
229
229
|
o = l.vars.defaults || {}, l = ee(l.vars.inherit) && l.parent;
|
|
230
230
|
s.immediateRender = ee(o.immediateRender), e < 2 ? s.runBackwards = 1 : s.startAt = t[r - 1];
|
|
231
231
|
}
|
|
232
232
|
return new H(t[0], s, t[r + 1]);
|
|
233
|
-
},
|
|
233
|
+
}, Ue = function(e, t) {
|
|
234
234
|
return e || e === 0 ? t(e) : t;
|
|
235
|
-
},
|
|
235
|
+
}, Mt = function(e, t, i) {
|
|
236
236
|
return i < e ? e : i > t ? t : i;
|
|
237
|
-
},
|
|
238
|
-
return !Z(e) || !(t =
|
|
239
|
-
}, is = function(e, t, i) {
|
|
240
|
-
return ke(i, function(n) {
|
|
241
|
-
return Dt(e, t, n);
|
|
242
|
-
});
|
|
243
|
-
}, pi = [].slice, Yn = function(e, t) {
|
|
244
|
-
return e && ve(e) && "length" in e && (!t && !e.length || e.length - 1 in e && ve(e[0])) && !e.nodeType && e !== _e;
|
|
237
|
+
}, W = function(e, t) {
|
|
238
|
+
return !Z(e) || !(t = jr.exec(e)) ? "" : t[1];
|
|
245
239
|
}, ns = function(e, t, i) {
|
|
240
|
+
return Ue(i, function(n) {
|
|
241
|
+
return Mt(e, t, n);
|
|
242
|
+
});
|
|
243
|
+
}, pi = [].slice, Zn = function(e, t) {
|
|
244
|
+
return e && Ee(e) && "length" in e && (!t && !e.length || e.length - 1 in e && Ee(e[0])) && !e.nodeType && e !== ye;
|
|
245
|
+
}, rs = function(e, t, i) {
|
|
246
246
|
return i === void 0 && (i = []), e.forEach(function(n) {
|
|
247
247
|
var r;
|
|
248
|
-
return Z(n) && !t ||
|
|
248
|
+
return Z(n) && !t || Zn(n, 1) ? (r = i).push.apply(r, me(n)) : i.push(n);
|
|
249
249
|
}) || i;
|
|
250
250
|
}, me = function(e, t, i) {
|
|
251
|
-
return z && !t && z.selector ? z.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t ||
|
|
251
|
+
return z && !t && z.selector ? z.selector(e) : Z(e) && !i && (hi || !ht()) ? pi.call((t || Si).querySelectorAll(e), 0) : X(e) ? rs(e, i) : Zn(e) ? pi.call(e, 0) : e ? [e] : [];
|
|
252
252
|
}, fi = function(e) {
|
|
253
253
|
return e = me(e)[0] || vt("Invalid scope") || {}, function(t) {
|
|
254
254
|
var i = e.current || e.nativeElement || e;
|
|
255
|
-
return me(t, i.querySelectorAll ? i : i === e ? vt("Invalid scope") ||
|
|
255
|
+
return me(t, i.querySelectorAll ? i : i === e ? vt("Invalid scope") || Si.createElement("div") : e);
|
|
256
256
|
};
|
|
257
|
-
},
|
|
257
|
+
}, Kn = function(e) {
|
|
258
258
|
return e.sort(function() {
|
|
259
259
|
return 0.5 - Math.random();
|
|
260
260
|
});
|
|
261
|
-
},
|
|
261
|
+
}, Wn = function(e) {
|
|
262
262
|
if (G(e))
|
|
263
263
|
return e;
|
|
264
|
-
var t =
|
|
264
|
+
var t = Ee(e) ? e : {
|
|
265
265
|
each: e
|
|
266
266
|
}, i = Ye(t.ease), n = t.from || 0, r = parseFloat(t.base) || 0, s = {}, o = n > 0 && n < 1, l = isNaN(n) || o, c = t.axis, h = n, u = n;
|
|
267
267
|
return Z(n) ? h = u = {
|
|
@@ -278,7 +278,7 @@ var he = {
|
|
|
278
278
|
}
|
|
279
279
|
for (g = s[d] = [], _ = l ? Math.min(w, d) * h - 0.5 : n % w, y = w === fe ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, C = fe, P = 0; P < d; P++)
|
|
280
280
|
x = P % w - _, v = y - (P / w | 0), g[P] = b = c ? Math.abs(c === "y" ? v : x) : Dn(x * x + v * v), b > E && (E = b), b < C && (C = b);
|
|
281
|
-
n === "random" &&
|
|
281
|
+
n === "random" && Kn(g), g.max = E - C, g.min = C, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : c ? c === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = W(t.amount || t.each) || 0, i = i && d < 0 ? sr(i) : i;
|
|
282
282
|
}
|
|
283
283
|
return d = (g[p] - g.min) / g.max || 0, j(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
284
284
|
};
|
|
@@ -286,22 +286,22 @@ var he = {
|
|
|
286
286
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
287
287
|
return function(i) {
|
|
288
288
|
var n = j(Math.round(parseFloat(i) / e) * e * t);
|
|
289
|
-
return (n - n % 1) / t + (
|
|
289
|
+
return (n - n % 1) / t + (Ae(i) ? 0 : W(i));
|
|
290
290
|
};
|
|
291
291
|
}, Xn = function(e, t) {
|
|
292
|
-
var i =
|
|
293
|
-
return !i &&
|
|
292
|
+
var i = X(e), n, r;
|
|
293
|
+
return !i && Ee(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Ae(e[0])) && (n *= n)) : e = mi(e.increment)), Ue(t, i ? G(e) ? function(s) {
|
|
294
294
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
295
295
|
} : function(s) {
|
|
296
296
|
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), c = fe, h = 0, u = e.length, p, m; u--; )
|
|
297
297
|
r ? (p = e[u].x - o, m = e[u].y - l, p = p * p + m * m) : p = Math.abs(e[u] - o), p < c && (c = p, h = u);
|
|
298
|
-
return h = !n || c <= n ? e[h] : s, r || h === s ||
|
|
298
|
+
return h = !n || c <= n ? e[h] : s, r || h === s || Ae(s) ? h : h + W(s);
|
|
299
299
|
} : mi(e));
|
|
300
|
-
},
|
|
301
|
-
return
|
|
302
|
-
return
|
|
300
|
+
}, qn = function(e, t, i, n) {
|
|
301
|
+
return Ue(X(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
302
|
+
return X(e) ? e[~~(Math.random() * e.length)] : (i = i || 1e-5) && (n = 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 * n) / n;
|
|
303
303
|
});
|
|
304
|
-
},
|
|
304
|
+
}, ss = function() {
|
|
305
305
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
306
306
|
t[i] = arguments[i];
|
|
307
307
|
return function(n) {
|
|
@@ -309,36 +309,36 @@ var he = {
|
|
|
309
309
|
return s(r);
|
|
310
310
|
}, n);
|
|
311
311
|
};
|
|
312
|
-
},
|
|
312
|
+
}, as = function(e, t) {
|
|
313
313
|
return function(i) {
|
|
314
|
-
return e(parseFloat(i)) + (t ||
|
|
314
|
+
return e(parseFloat(i)) + (t || W(i));
|
|
315
315
|
};
|
|
316
|
-
},
|
|
317
|
-
return
|
|
318
|
-
},
|
|
319
|
-
return
|
|
316
|
+
}, os = function(e, t, i) {
|
|
317
|
+
return Jn(e, t, 0, 1, i);
|
|
318
|
+
}, Qn = function(e, t, i) {
|
|
319
|
+
return Ue(i, function(n) {
|
|
320
320
|
return e[~~t(n)];
|
|
321
321
|
});
|
|
322
|
-
},
|
|
322
|
+
}, ls = function a(e, t, i) {
|
|
323
323
|
var n = t - e;
|
|
324
|
-
return
|
|
324
|
+
return X(e) ? Qn(e, a(0, e.length), t) : Ue(i, function(r) {
|
|
325
325
|
return (n + (r - e) % n) % n + e;
|
|
326
326
|
});
|
|
327
|
-
},
|
|
327
|
+
}, hs = function a(e, t, i) {
|
|
328
328
|
var n = t - e, r = n * 2;
|
|
329
|
-
return
|
|
329
|
+
return X(e) ? Qn(e, a(0, e.length - 1), t) : Ue(i, function(s) {
|
|
330
330
|
return s = (r + (s - e) % r) % r || 0, e + (s > n ? r - s : s);
|
|
331
331
|
});
|
|
332
332
|
}, wt = function(e) {
|
|
333
333
|
for (var t = 0, i = "", n, r, s, o; ~(n = e.indexOf("random(", t)); )
|
|
334
|
-
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? In : li), i += e.substr(t, n - t) +
|
|
334
|
+
s = e.indexOf(")", n), o = e.charAt(n + 7) === "[", r = e.substr(n + 7, s - n - 7).match(o ? In : li), i += e.substr(t, n - t) + qn(o ? r : +r[0], o ? 0 : +r[1], +r[2] || 1e-5), t = s + 1;
|
|
335
335
|
return i + e.substr(t, e.length - t);
|
|
336
|
-
},
|
|
336
|
+
}, Jn = function(e, t, i, n, r) {
|
|
337
337
|
var s = t - e, o = n - i;
|
|
338
|
-
return
|
|
338
|
+
return Ue(r, function(l) {
|
|
339
339
|
return i + ((l - e) / s * o || 0);
|
|
340
340
|
});
|
|
341
|
-
},
|
|
341
|
+
}, cs = function a(e, t, i, n) {
|
|
342
342
|
var r = isNaN(e + t) ? 0 : function(m) {
|
|
343
343
|
return (1 - m) * e + m * t;
|
|
344
344
|
};
|
|
@@ -350,7 +350,7 @@ var he = {
|
|
|
350
350
|
}, t = {
|
|
351
351
|
p: t
|
|
352
352
|
};
|
|
353
|
-
else if (
|
|
353
|
+
else if (X(e) && !X(t)) {
|
|
354
354
|
for (h = [], u = e.length, p = u - 2, c = 1; c < u; c++)
|
|
355
355
|
h.push(a(e[c - 1], e[c]));
|
|
356
356
|
u--, r = function(f) {
|
|
@@ -358,16 +358,16 @@ var he = {
|
|
|
358
358
|
var d = Math.min(p, ~~f);
|
|
359
359
|
return h[d](f - d);
|
|
360
360
|
}, i = t;
|
|
361
|
-
} else n || (e = at(
|
|
361
|
+
} else n || (e = at(X(e) ? [] : {}, e));
|
|
362
362
|
if (!h) {
|
|
363
363
|
for (l in t)
|
|
364
|
-
|
|
364
|
+
Oi.call(o, e, l, "get", t[l]);
|
|
365
365
|
r = function(f) {
|
|
366
366
|
return Fi(f, o) || (s ? e.p : e);
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return Ue(i, r);
|
|
371
371
|
}, Qi = function(e, t, i) {
|
|
372
372
|
var n = e.labels, r = fe, s, o, l;
|
|
373
373
|
for (s in n)
|
|
@@ -376,10 +376,10 @@ var he = {
|
|
|
376
376
|
}, le = function(e, t, i) {
|
|
377
377
|
var n = e.vars, r = n[t], s = z, o = e._ctx, l, c, h;
|
|
378
378
|
if (r)
|
|
379
|
-
return l = n[t + "Params"], c = n.callbackScope || e, i &&
|
|
379
|
+
return l = n[t + "Params"], c = n.callbackScope || e, i && Le.length && $t(), o && (z = o), h = l ? r.apply(c, l) : r.call(c), z = s, h;
|
|
380
380
|
}, mt = function(e) {
|
|
381
381
|
return Ie(e), e.scrollTrigger && e.scrollTrigger.kill(!!K), e.progress() < 1 && le(e, "onInterrupt"), e;
|
|
382
|
-
}, et,
|
|
382
|
+
}, et, er = [], tr = function(e) {
|
|
383
383
|
if (e)
|
|
384
384
|
if (e = !e.name && e.default || e, Ai() || e.headless) {
|
|
385
385
|
var t = e.name, i = G(e), n = t && !i && e.init ? function() {
|
|
@@ -387,9 +387,9 @@ var he = {
|
|
|
387
387
|
} : e, r = {
|
|
388
388
|
init: Et,
|
|
389
389
|
render: Fi,
|
|
390
|
-
add:
|
|
391
|
-
kill:
|
|
392
|
-
modifier:
|
|
390
|
+
add: Oi,
|
|
391
|
+
kill: As,
|
|
392
|
+
modifier: Cs,
|
|
393
393
|
rawVars: 0
|
|
394
394
|
}, s = {
|
|
395
395
|
targetTest: 0,
|
|
@@ -401,53 +401,53 @@ var he = {
|
|
|
401
401
|
if (ht(), e !== n) {
|
|
402
402
|
if (ae[t])
|
|
403
403
|
return;
|
|
404
|
-
ue(n, ue(Bt(e, r), s)), at(n.prototype, at(r, Bt(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n),
|
|
404
|
+
ue(n, ue(Bt(e, r), s)), at(n.prototype, at(r, Bt(e, s))), ae[n.prop = t] = n, e.targetTest && (Ut.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
405
405
|
}
|
|
406
|
-
|
|
406
|
+
Fn(t, n), e.register && e.register(re, n, ie);
|
|
407
407
|
} else
|
|
408
|
-
|
|
409
|
-
},
|
|
410
|
-
aqua: [0,
|
|
411
|
-
lime: [0,
|
|
408
|
+
er.push(e);
|
|
409
|
+
}, I = 255, gt = {
|
|
410
|
+
aqua: [0, I, I],
|
|
411
|
+
lime: [0, I, 0],
|
|
412
412
|
silver: [192, 192, 192],
|
|
413
413
|
black: [0, 0, 0],
|
|
414
414
|
maroon: [128, 0, 0],
|
|
415
415
|
teal: [0, 128, 128],
|
|
416
|
-
blue: [0, 0,
|
|
416
|
+
blue: [0, 0, I],
|
|
417
417
|
navy: [0, 0, 128],
|
|
418
|
-
white: [
|
|
418
|
+
white: [I, I, I],
|
|
419
419
|
olive: [128, 128, 0],
|
|
420
|
-
yellow: [
|
|
421
|
-
orange: [
|
|
420
|
+
yellow: [I, I, 0],
|
|
421
|
+
orange: [I, 165, 0],
|
|
422
422
|
gray: [128, 128, 128],
|
|
423
423
|
purple: [128, 0, 128],
|
|
424
424
|
green: [0, 128, 0],
|
|
425
|
-
red: [
|
|
426
|
-
pink: [
|
|
427
|
-
cyan: [0,
|
|
428
|
-
transparent: [
|
|
425
|
+
red: [I, 0, 0],
|
|
426
|
+
pink: [I, 192, 203],
|
|
427
|
+
cyan: [0, I, I],
|
|
428
|
+
transparent: [I, I, I, 0]
|
|
429
429
|
}, qt = function(e, t, i) {
|
|
430
|
-
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) *
|
|
431
|
-
},
|
|
432
|
-
var n = e ?
|
|
430
|
+
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * I + 0.5 | 0;
|
|
431
|
+
}, ir = function(e, t, i) {
|
|
432
|
+
var n = e ? Ae(e) ? [e >> 16, e >> 8 & I, e & I] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
|
|
433
433
|
if (!n) {
|
|
434
434
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
|
|
435
435
|
n = gt[e];
|
|
436
436
|
else if (e.charAt(0) === "#") {
|
|
437
437
|
if (e.length < 6 && (r = e.charAt(1), s = e.charAt(2), o = e.charAt(3), e = "#" + r + r + s + s + o + o + (e.length === 5 ? e.charAt(4) + e.charAt(4) : "")), e.length === 9)
|
|
438
|
-
return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 &
|
|
439
|
-
e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 &
|
|
438
|
+
return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 & I, n & I, parseInt(e.substr(7), 16) / 255];
|
|
439
|
+
e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 & I, e & I];
|
|
440
440
|
} else if (e.substr(0, 3) === "hsl") {
|
|
441
441
|
if (n = f = e.match(li), !t)
|
|
442
442
|
l = +n[0] % 360 / 360, c = +n[1] / 100, h = +n[2] / 100, s = h <= 0.5 ? h * (c + 1) : h + c - h * c, r = h * 2 - s, n.length > 3 && (n[3] *= 1), n[0] = qt(l + 1 / 3, r, s), n[1] = qt(l, r, s), n[2] = qt(l - 1 / 3, r, s);
|
|
443
443
|
else if (~e.indexOf("="))
|
|
444
|
-
return n = e.match(
|
|
444
|
+
return n = e.match(Ln), i && n.length < 4 && (n[3] = 1), n;
|
|
445
445
|
} else
|
|
446
446
|
n = e.match(li) || gt.transparent;
|
|
447
447
|
n = n.map(Number);
|
|
448
448
|
}
|
|
449
|
-
return t && !f && (r = n[0] /
|
|
450
|
-
},
|
|
449
|
+
return t && !f && (r = n[0] / I, s = n[1] / I, o = n[2] / I, u = Math.max(r, s, o), p = Math.min(r, s, o), h = (u + p) / 2, u === p ? l = c = 0 : (m = u - p, c = h > 0.5 ? m / (2 - u - p) : m / (u + p), l = u === r ? (s - o) / m + (s < o ? 6 : 0) : u === s ? (o - r) / m + 2 : (r - s) / m + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(c * 100 + 0.5), n[2] = ~~(h * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
|
|
450
|
+
}, nr = function(e) {
|
|
451
451
|
var t = [], i = [], n = -1;
|
|
452
452
|
return e.split(Oe).forEach(function(r) {
|
|
453
453
|
var s = r.match(Je) || [];
|
|
@@ -458,8 +458,8 @@ var he = {
|
|
|
458
458
|
if (!r)
|
|
459
459
|
return e;
|
|
460
460
|
if (r = r.map(function(p) {
|
|
461
|
-
return (p =
|
|
462
|
-
}), i && (h =
|
|
461
|
+
return (p = ir(p, t, 1)) && s + (t ? p[0] + "," + p[1] + "%," + p[2] + "%," + p[3] : p.join(",")) + ")";
|
|
462
|
+
}), i && (h = nr(e), l = i.c, l.join(n) !== h.c.join(n)))
|
|
463
463
|
for (c = e.replace(Oe, "1").split(Je), u = c.length - 1; o < u; o++)
|
|
464
464
|
n += c[o] + (~l.indexOf(o) ? r.shift() || s + "0,0,0,0)" : (h.length ? h : r.length ? r : i).shift());
|
|
465
465
|
if (!c)
|
|
@@ -471,10 +471,10 @@ var he = {
|
|
|
471
471
|
for (e in gt)
|
|
472
472
|
a += "|" + e + "\\b";
|
|
473
473
|
return new RegExp(a + ")", "gi");
|
|
474
|
-
})(),
|
|
474
|
+
})(), us = /hsl[a]?\(/, rr = function(e) {
|
|
475
475
|
var t = e.join(" "), i;
|
|
476
476
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
477
|
-
return i =
|
|
477
|
+
return i = us.test(t), e[1] = Ji(e[1], i), e[0] = Ji(e[0], i, nr(e[1])), !0;
|
|
478
478
|
}, Pt, oe = (function() {
|
|
479
479
|
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, c, h, u, p, m, f = function d(g) {
|
|
480
480
|
var _ = a() - n, y = g === !0, x, v, b, P;
|
|
@@ -492,7 +492,7 @@ var he = {
|
|
|
492
492
|
return p / (1e3 / (g || 60));
|
|
493
493
|
},
|
|
494
494
|
wake: function() {
|
|
495
|
-
|
|
495
|
+
kn && (!hi && Ai() && (ye = hi = window, Si = ye.document || {}, ce.gsap = re, (ye.gsapVersions || (ye.gsapVersions = [])).push(re.version), Un(Nt || ye.GreenSockGlobals || !ye.gsap && ye || {}), er.forEach(tr)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
|
|
496
496
|
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
497
497
|
}, Pt = 1, f(2));
|
|
498
498
|
},
|
|
@@ -518,26 +518,26 @@ var he = {
|
|
|
518
518
|
}, u;
|
|
519
519
|
})(), ht = function() {
|
|
520
520
|
return !Pt && oe.wake();
|
|
521
|
-
},
|
|
521
|
+
}, M = {}, ds = /^[\d.\-M][\d.\-,\s]/, ps = /["']/g, fs = function(e) {
|
|
522
522
|
for (var t = {}, i = e.substr(1, e.length - 3).split(":"), n = i[0], r = 1, s = i.length, o, l, c; r < s; r++)
|
|
523
|
-
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(
|
|
523
|
+
l = i[r], o = r !== s - 1 ? l.lastIndexOf(",") : l.length, c = l.substr(0, o), t[n] = isNaN(c) ? c.replace(ps, "").trim() : +c, n = l.substr(o + 1).trim();
|
|
524
524
|
return t;
|
|
525
|
-
},
|
|
525
|
+
}, ms = function(e) {
|
|
526
526
|
var t = e.indexOf("(") + 1, i = e.indexOf(")"), n = e.indexOf("(", t);
|
|
527
527
|
return e.substring(t, ~n && n < i ? e.indexOf(")", i + 1) : i);
|
|
528
|
-
},
|
|
529
|
-
var t = (e + "").split("("), i =
|
|
530
|
-
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [
|
|
531
|
-
},
|
|
528
|
+
}, gs = function(e) {
|
|
529
|
+
var t = (e + "").split("("), i = M[t[0]];
|
|
530
|
+
return i && t.length > 1 && i.config ? i.config.apply(null, ~e.indexOf("{") ? [fs(t[1])] : ms(e).split(",").map(Bn)) : M._CE && ds.test(e) ? M._CE("", e) : i;
|
|
531
|
+
}, sr = function(e) {
|
|
532
532
|
return function(t) {
|
|
533
533
|
return 1 - e(1 - t);
|
|
534
534
|
};
|
|
535
|
-
},
|
|
535
|
+
}, ar = function a(e, t) {
|
|
536
536
|
for (var i = e._first, n; i; )
|
|
537
537
|
i instanceof q ? a(i, t) : i.vars.yoyoEase && (!i._yoyo || !i._repeat) && i._yoyo !== t && (i.timeline ? a(i.timeline, t) : (n = i._ease, i._ease = i._yEase, i._yEase = n, i._yoyo = t)), i = i._next;
|
|
538
538
|
}, Ye = function(e, t) {
|
|
539
|
-
return e && (G(e) ? e :
|
|
540
|
-
},
|
|
539
|
+
return e && (G(e) ? e : M[e] || gs(e)) || t;
|
|
540
|
+
}, We = function(e, t, i, n) {
|
|
541
541
|
i === void 0 && (i = function(l) {
|
|
542
542
|
return 1 - t(1 - l);
|
|
543
543
|
}), n === void 0 && (n = function(l) {
|
|
@@ -549,20 +549,20 @@ var he = {
|
|
|
549
549
|
easeInOut: n
|
|
550
550
|
}, s;
|
|
551
551
|
return te(e, function(o) {
|
|
552
|
-
|
|
552
|
+
M[o] = ce[o] = r, M[s = o.toLowerCase()] = i;
|
|
553
553
|
for (var l in r)
|
|
554
|
-
|
|
554
|
+
M[s + (l === "easeIn" ? ".in" : l === "easeOut" ? ".out" : ".inOut")] = M[o + "." + l] = r[l];
|
|
555
555
|
}), r;
|
|
556
|
-
},
|
|
556
|
+
}, or = function(e) {
|
|
557
557
|
return function(t) {
|
|
558
558
|
return t < 0.5 ? (1 - e(1 - t * 2)) / 2 : 0.5 + e((t - 0.5) * 2) / 2;
|
|
559
559
|
};
|
|
560
560
|
}, Qt = function a(e, t, i) {
|
|
561
561
|
var n = t >= 1 ? t : 1, r = (i || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), s = r / oi * (Math.asin(1 / n) || 0), o = function(h) {
|
|
562
|
-
return h === 1 ? 1 : n * Math.pow(2, -10 * h) *
|
|
562
|
+
return h === 1 ? 1 : n * Math.pow(2, -10 * h) * Hr((h - s) * r) + 1;
|
|
563
563
|
}, l = e === "out" ? o : e === "in" ? function(c) {
|
|
564
564
|
return 1 - o(1 - c);
|
|
565
|
-
} :
|
|
565
|
+
} : or(o);
|
|
566
566
|
return r = oi / r, l.config = function(c, h) {
|
|
567
567
|
return a(e, c, h);
|
|
568
568
|
}, l;
|
|
@@ -572,14 +572,14 @@ var he = {
|
|
|
572
572
|
return s ? --s * s * ((t + 1) * s + t) + 1 : 0;
|
|
573
573
|
}, n = e === "out" ? i : e === "in" ? function(r) {
|
|
574
574
|
return 1 - i(1 - r);
|
|
575
|
-
} :
|
|
575
|
+
} : or(i);
|
|
576
576
|
return n.config = function(r) {
|
|
577
577
|
return a(e, r);
|
|
578
578
|
}, n;
|
|
579
579
|
};
|
|
580
580
|
te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
|
|
581
581
|
var t = e < 5 ? e + 1 : e;
|
|
582
|
-
|
|
582
|
+
We(a + ",Power" + (t - 1), e ? function(i) {
|
|
583
583
|
return Math.pow(i, t);
|
|
584
584
|
} : function(i) {
|
|
585
585
|
return i;
|
|
@@ -589,41 +589,41 @@ te("Linear,Quad,Cubic,Quart,Quint,Strong", function(a, e) {
|
|
|
589
589
|
return i < 0.5 ? Math.pow(i * 2, t) / 2 : 1 - Math.pow((1 - i) * 2, t) / 2;
|
|
590
590
|
});
|
|
591
591
|
});
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
M.Linear.easeNone = M.none = M.Linear.easeIn;
|
|
593
|
+
We("Elastic", Qt("in"), Qt("out"), Qt());
|
|
594
594
|
(function(a, e) {
|
|
595
595
|
var t = 1 / e, i = 2 * t, n = 2.5 * t, r = function(o) {
|
|
596
596
|
return o < t ? a * o * o : o < i ? a * Math.pow(o - 1.5 / e, 2) + 0.75 : o < n ? a * (o -= 2.25 / e) * o + 0.9375 : a * Math.pow(o - 2.625 / e, 2) + 0.984375;
|
|
597
597
|
};
|
|
598
|
-
|
|
598
|
+
We("Bounce", function(s) {
|
|
599
599
|
return 1 - r(1 - s);
|
|
600
600
|
}, r);
|
|
601
601
|
})(7.5625, 2.75);
|
|
602
|
-
|
|
602
|
+
We("Expo", function(a) {
|
|
603
603
|
return Math.pow(2, 10 * (a - 1)) * a + a * a * a * a * a * a * (1 - a);
|
|
604
604
|
});
|
|
605
|
-
|
|
605
|
+
We("Circ", function(a) {
|
|
606
606
|
return -(Dn(1 - a * a) - 1);
|
|
607
607
|
});
|
|
608
|
-
|
|
609
|
-
return a === 1 ? 1 : -
|
|
608
|
+
We("Sine", function(a) {
|
|
609
|
+
return a === 1 ? 1 : -Vr(a * Br) + 1;
|
|
610
610
|
});
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
We("Back", Jt("in"), Jt("out"), Jt());
|
|
612
|
+
M.SteppedEase = M.steps = ce.SteppedEase = {
|
|
613
613
|
config: function(e, t) {
|
|
614
614
|
e === void 0 && (e = 1);
|
|
615
615
|
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 - k;
|
|
616
616
|
return function(o) {
|
|
617
|
-
return ((n *
|
|
617
|
+
return ((n * Mt(0, s, o) | 0) + r) * i;
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
};
|
|
621
|
-
st.ease =
|
|
621
|
+
st.ease = M["quad.out"];
|
|
622
622
|
te("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(a) {
|
|
623
|
-
return
|
|
623
|
+
return Di += a + "," + a + "Params,";
|
|
624
624
|
});
|
|
625
|
-
var
|
|
626
|
-
this.id =
|
|
625
|
+
var lr = function(e, t) {
|
|
626
|
+
this.id = Gr++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Nn, this.set = t ? t.getSetter : Ui;
|
|
627
627
|
}, Ct = /* @__PURE__ */ (function() {
|
|
628
628
|
function a(t) {
|
|
629
629
|
this.vars = t, this._delay = +t.delay || 0, (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) && (this._rDelay = t.repeatDelay || 0, this._yoyo = !!t.yoyo || !!t.yoyoEase), this._ts = 1, lt(this, +t.duration, 1, 1), this.data = t.data, z && (this._ctx = z, z.data.push(this)), Pt || oe.wake();
|
|
@@ -640,17 +640,17 @@ var or = function(e, t) {
|
|
|
640
640
|
return this._tTime;
|
|
641
641
|
var r = this._dp;
|
|
642
642
|
if (r && r.smoothChildTiming && this._ts) {
|
|
643
|
-
for (Kt(this, i), !r._dp || r.parent ||
|
|
643
|
+
for (Kt(this, i), !r._dp || r.parent || Hn(r, this); r && r.parent; )
|
|
644
644
|
r.parent._time !== r._start + (r._ts >= 0 ? r._tTime / r._ts : (r.totalDuration() - r._tTime) / -r._ts) && r.totalTime(r._tTime, !0), r = r.parent;
|
|
645
|
-
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && i < this._tDur || this._ts < 0 && i > 0 || !this._tDur && !i) &&
|
|
645
|
+
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && i < this._tDur || this._ts < 0 && i > 0 || !this._tDur && !i) && xe(this._dp, this, this._start - this._delay);
|
|
646
646
|
}
|
|
647
|
-
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) === k || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i),
|
|
647
|
+
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) === k || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), $n(this, i, n)), this;
|
|
648
648
|
}, e.time = function(i, n) {
|
|
649
|
-
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i +
|
|
649
|
+
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i + Xi(this)) % (this._dur + this._rDelay) || (i ? this._dur : 0), n) : this._time;
|
|
650
650
|
}, e.totalProgress = function(i, n) {
|
|
651
651
|
return arguments.length ? this.totalTime(this.totalDuration() * i, n) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
|
|
652
652
|
}, e.progress = function(i, n) {
|
|
653
|
-
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - i : i) +
|
|
653
|
+
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - i : i) + Xi(this), n) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
|
|
654
654
|
}, e.iteration = function(i, n) {
|
|
655
655
|
var r = this.duration() + this._rDelay;
|
|
656
656
|
return arguments.length ? this.totalTime(this._time + (i - 1) * r, n) : this._repeat ? ot(this._tTime, r) + 1 : 1;
|
|
@@ -660,14 +660,14 @@ var or = function(e, t) {
|
|
|
660
660
|
if (this._rts === i)
|
|
661
661
|
return this;
|
|
662
662
|
var r = this.parent && this._ts ? Gt(this.parent._time, this) : this._tTime;
|
|
663
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(
|
|
663
|
+
return this._rts = +i || 0, this._ts = this._ps || i === -k ? 0 : this._rts, this.totalTime(Mt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Zt(this), qr(this);
|
|
664
664
|
}, e.paused = function(i) {
|
|
665
665
|
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) : (ht(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== k && (this._tTime -= k)))), this) : this._ps;
|
|
666
666
|
}, e.startTime = function(i) {
|
|
667
667
|
if (arguments.length) {
|
|
668
668
|
this._start = i;
|
|
669
669
|
var n = this.parent || this._dp;
|
|
670
|
-
return n && (n._sort || !this.parent) &&
|
|
670
|
+
return n && (n._sort || !this.parent) && xe(n, this, i - this._delay), this;
|
|
671
671
|
}
|
|
672
672
|
return this._start;
|
|
673
673
|
}, e.endTime = function(i) {
|
|
@@ -676,9 +676,9 @@ var or = function(e, t) {
|
|
|
676
676
|
var n = this.parent || this._dp;
|
|
677
677
|
return n ? i && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? Gt(n.rawTime(i), this) : this._tTime : this._tTime;
|
|
678
678
|
}, e.revert = function(i) {
|
|
679
|
-
i === void 0 && (i =
|
|
679
|
+
i === void 0 && (i = Zr);
|
|
680
680
|
var n = K;
|
|
681
|
-
return K = i,
|
|
681
|
+
return K = i, Li(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), K = n, this;
|
|
682
682
|
}, e.globalTime = function(i) {
|
|
683
683
|
for (var n = this, r = arguments.length ? i : n.rawTime(); n; )
|
|
684
684
|
r = n._start + r / (Math.abs(n._ts) || 1), n = n._dp;
|
|
@@ -718,7 +718,7 @@ var or = function(e, t) {
|
|
|
718
718
|
}, e.then = function(i) {
|
|
719
719
|
var n = this;
|
|
720
720
|
return new Promise(function(r) {
|
|
721
|
-
var s = G(i) ? i :
|
|
721
|
+
var s = G(i) ? i : Gn, o = function() {
|
|
722
722
|
var c = n.then;
|
|
723
723
|
n.then = null, G(s) && (s = s(n)) && (s.then || s === n) && (n.then = c), r(s), n.then = c;
|
|
724
724
|
};
|
|
@@ -749,10 +749,10 @@ ue(Ct.prototype, {
|
|
|
749
749
|
_rts: 1
|
|
750
750
|
});
|
|
751
751
|
var q = /* @__PURE__ */ (function(a) {
|
|
752
|
-
|
|
752
|
+
Mn(e, a);
|
|
753
753
|
function e(i, n) {
|
|
754
754
|
var r;
|
|
755
|
-
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), N &&
|
|
755
|
+
return i === void 0 && (i = {}), r = a.call(this, i) || this, r.labels = {}, r.smoothChildTiming = !!i.smoothChildTiming, r.autoRemoveChildren = !!i.autoRemoveChildren, r._sort = ee(i.sortChildren), N && xe(i.parent || N, Pe(r), n), i.reversed && r.reverse(), i.paused && r.paused(!0), i.scrollTrigger && jn(Pe(r), i.scrollTrigger), r;
|
|
756
756
|
}
|
|
757
757
|
var t = e.prototype;
|
|
758
758
|
return t.to = function(n, r, s) {
|
|
@@ -764,7 +764,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
764
764
|
}, t.set = function(n, r, s) {
|
|
765
765
|
return r.duration = 0, r.parent = this, yt(r).repeatDelay || (r.repeat = 0), r.immediateRender = !!r.immediateRender, new H(n, r, pe(this, s), 1), this;
|
|
766
766
|
}, t.call = function(n, r, s) {
|
|
767
|
-
return
|
|
767
|
+
return xe(this, H.delayedCall(0, n, r), s);
|
|
768
768
|
}, t.staggerTo = function(n, r, s, o, l, c, h) {
|
|
769
769
|
return s.duration = r, s.stagger = s.stagger || o, s.onComplete = c, s.onCompleteParams = h, s.parent = this, new H(n, s, pe(this, l)), this;
|
|
770
770
|
}, t.staggerFrom = function(n, r, s, o, l, c, h) {
|
|
@@ -783,10 +783,10 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
783
783
|
return this;
|
|
784
784
|
if (c = this._dur, l = this._tDur, w && (this._lock = 2, o = C ? c : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
785
785
|
return this;
|
|
786
|
-
|
|
786
|
+
ar(this, E);
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
if (this._hasPause && !this._forcing && this._lock < 2 && (y =
|
|
789
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (y = ts(this, j(o), j(p)), y && (h -= p - (p = y._start))), this._tTime = h, this._time = p, this._act = !x, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && h && !r && !b && (le(this, "onStart"), this._tTime !== h))
|
|
790
790
|
return this;
|
|
791
791
|
if (p >= o && n >= 0)
|
|
792
792
|
for (m = this._first; m; ) {
|
|
@@ -806,7 +806,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
806
806
|
if (f = m._prev, (m._act || T <= m._end) && m._ts && y !== m) {
|
|
807
807
|
if (m.parent !== this)
|
|
808
808
|
return this.render(n, r, s);
|
|
809
|
-
if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K &&
|
|
809
|
+
if (m.render(m._ts > 0 ? (T - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (T - m._start) * m._ts, r, s || K && Li(m)), p !== this._time || !this._ts && !_) {
|
|
810
810
|
y = 0, f && (h += this._zTime = T ? -k : k);
|
|
811
811
|
break;
|
|
812
812
|
}
|
|
@@ -821,8 +821,8 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
821
821
|
return this;
|
|
822
822
|
}, t.add = function(n, r) {
|
|
823
823
|
var s = this;
|
|
824
|
-
if (
|
|
825
|
-
if (
|
|
824
|
+
if (Ae(r) || (r = pe(this, r, n)), !(n instanceof Ct)) {
|
|
825
|
+
if (X(n))
|
|
826
826
|
return n.forEach(function(o) {
|
|
827
827
|
return s.add(o, r);
|
|
828
828
|
}), this;
|
|
@@ -833,7 +833,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
833
833
|
else
|
|
834
834
|
return this;
|
|
835
835
|
}
|
|
836
|
-
return this !== n ?
|
|
836
|
+
return this !== n ? xe(this, n, r) : this;
|
|
837
837
|
}, t.getChildren = function(n, r, s, o) {
|
|
838
838
|
n === void 0 && (n = !0), r === void 0 && (r = !0), s === void 0 && (s = !0), o === void 0 && (o = -fe);
|
|
839
839
|
for (var l = [], c = this._first; c; )
|
|
@@ -853,7 +853,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
853
853
|
return delete this.labels[n], this;
|
|
854
854
|
}, t.addPause = function(n, r, s) {
|
|
855
855
|
var o = H.delayedCall(0, r || Et, s);
|
|
856
|
-
return o.data = "isPause", this._hasPause = 1,
|
|
856
|
+
return o.data = "isPause", this._hasPause = 1, xe(this, o, pe(this, n));
|
|
857
857
|
}, t.removePause = function(n) {
|
|
858
858
|
var r = this._first;
|
|
859
859
|
for (n = pe(this, n); r; )
|
|
@@ -863,8 +863,8 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
863
863
|
Te !== o[l] && o[l].kill(n, r);
|
|
864
864
|
return this;
|
|
865
865
|
}, t.getTweensOf = function(n, r) {
|
|
866
|
-
for (var s = [], o = me(n), l = this._first, c =
|
|
867
|
-
l instanceof H ?
|
|
866
|
+
for (var s = [], o = me(n), l = this._first, c = Ae(r), h; l; )
|
|
867
|
+
l instanceof H ? Kr(l._targets, o) && (c ? (!Te || l._initted && l._ts) && l.globalTime(0) <= r && l.globalTime(l.totalDuration()) > r : !r || l.isActive()) && s.push(l) : (h = l.getTweensOf(o, r)).length && s.push.apply(s, h), l = l._next;
|
|
868
868
|
return s;
|
|
869
869
|
}, t.tweenTo = function(n, r) {
|
|
870
870
|
r = r || {};
|
|
@@ -922,12 +922,12 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
922
922
|
return s.timeScale((s._repeat < 0 ? s.duration() : s.totalDuration()) / (s.reversed() ? -n : n));
|
|
923
923
|
if (s._dirty) {
|
|
924
924
|
for (u = s.parent; o; )
|
|
925
|
-
c = o._prev, o._dirty && o.totalDuration(), h = o._start, h > l && s._sort && o._ts && !s._lock ? (s._lock = 1,
|
|
925
|
+
c = o._prev, o._dirty && o.totalDuration(), h = o._start, h > l && s._sort && o._ts && !s._lock ? (s._lock = 1, xe(s, o, h - o._delay, 1)._lock = 0) : l = h, h < 0 && o._ts && (r -= h, (!u && !s._dp || u && u.smoothChildTiming) && (s._start += h / s._ts, s._time -= h, s._tTime -= h), s.shiftChildren(-h, !1, -1 / 0), l = 0), o._end > r && o._ts && (r = o._end), o = c;
|
|
926
926
|
lt(s, s === N && s._time > r ? s._time : r, 1, 1), s._dirty = 0;
|
|
927
927
|
}
|
|
928
928
|
return s._tDur;
|
|
929
929
|
}, e.updateRoot = function(n) {
|
|
930
|
-
if (N._ts && (
|
|
930
|
+
if (N._ts && ($n(N, Gt(n, N)), zn = oe.frame), oe.frame >= Ki) {
|
|
931
931
|
Ki += he.autoSleep || 120;
|
|
932
932
|
var r = N._first;
|
|
933
933
|
if ((!r || !r._ts) && he.autoSleep && oe._listeners.length < 2) {
|
|
@@ -943,9 +943,9 @@ ue(q.prototype, {
|
|
|
943
943
|
_hasPause: 0,
|
|
944
944
|
_forcing: 0
|
|
945
945
|
});
|
|
946
|
-
var
|
|
947
|
-
var l = new ie(this._pt, e, t, 0, 1,
|
|
948
|
-
for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = wt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), p = i.match(
|
|
946
|
+
var _s = function(e, t, i, n, r, s, o) {
|
|
947
|
+
var l = new ie(this._pt, e, t, 0, 1, fr, null, r), c = 0, h = 0, u, p, m, f, d, g, _, y;
|
|
948
|
+
for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = wt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), p = i.match(Wt) || []; u = Wt.exec(n); )
|
|
949
949
|
f = u[0], d = n.substring(c, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), f !== p[h++] && (g = parseFloat(p[h - 1]) || 0, l._pt = {
|
|
950
950
|
_next: l._pt,
|
|
951
951
|
p: d || h === 1 ? d : ",",
|
|
@@ -953,30 +953,30 @@ var gs = function(e, t, i, n, r, s, o) {
|
|
|
953
953
|
s: g,
|
|
954
954
|
c: f.charAt(1) === "=" ? it(g, f) - g : parseFloat(f) - g,
|
|
955
955
|
m: m && m < 4 ? Math.round : 0
|
|
956
|
-
}, c =
|
|
956
|
+
}, c = Wt.lastIndex);
|
|
957
957
|
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (On.test(n) || _) && (l.e = 0), this._pt = l, l;
|
|
958
|
-
},
|
|
958
|
+
}, Oi = function(e, t, i, n, r, s, o, l, c, h) {
|
|
959
959
|
G(n) && (n = n(r || 0, e, s));
|
|
960
|
-
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ?
|
|
961
|
-
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (
|
|
962
|
-
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ?
|
|
963
|
-
},
|
|
964
|
-
if (G(e) && (e = bt(e, r, t, i, n)), !
|
|
960
|
+
var u = e[t], p = i !== "get" ? i : G(u) ? c ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = G(u) ? c ? Es : dr : ki, f;
|
|
961
|
+
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (W(p) || 0), (f || f === 0) && (n = f))), !h || p !== n || gi)
|
|
962
|
+
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Ps : pr, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Ti(t, n), _s.call(this, e, t, p, n, m, l || he.stringFilter, c));
|
|
963
|
+
}, ys = function(e, t, i, n, r) {
|
|
964
|
+
if (G(e) && (e = bt(e, r, t, i, n)), !Ee(e) || e.style && e.nodeType || X(e) || Rn(e))
|
|
965
965
|
return Z(e) ? bt(e, r, t, i, n) : e;
|
|
966
966
|
var s = {}, o;
|
|
967
967
|
for (o in e)
|
|
968
968
|
s[o] = bt(e[o], r, t, i, n);
|
|
969
969
|
return s;
|
|
970
|
-
},
|
|
970
|
+
}, hr = function(e, t, i, n, r, s) {
|
|
971
971
|
var o, l, c, h;
|
|
972
|
-
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] :
|
|
972
|
+
if (ae[e] && (o = new ae[e]()).init(r, o.rawVars ? t[e] : ys(t[e], n, r, s, i), i, n, s) !== !1 && (i._pt = l = new ie(i._pt, r, e, 0, 1, o.render, o, 0, o.priority), i !== et))
|
|
973
973
|
for (c = i._ptLookup[i._targets.indexOf(r)], h = o._props.length; h--; )
|
|
974
974
|
c[o._props[h]] = l;
|
|
975
975
|
return o;
|
|
976
|
-
}, Te, gi,
|
|
977
|
-
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Pi, v = e.timeline, b, P, E, C, w, T,
|
|
978
|
-
if (v && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ?
|
|
979
|
-
if (
|
|
976
|
+
}, Te, gi, Ii = function a(e, t, i) {
|
|
977
|
+
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Pi, v = e.timeline, b, P, E, C, w, T, D, S, R, L, B, F, U;
|
|
978
|
+
if (v && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? sr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !v && !!n.runBackwards, !v || p && !n.stagger) {
|
|
979
|
+
if (S = g[0] ? He(g[0]).harness : 0, F = S && n[S.prop], b = Bt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : Yr), d._lazy = 0), s) {
|
|
980
980
|
if (Ie(e._startAt = H.set(g, ue({
|
|
981
981
|
data: "isStart",
|
|
982
982
|
overwrite: !1,
|
|
@@ -1004,23 +1004,23 @@ var gs = function(e, t, i, n, r, s, o) {
|
|
|
1004
1004
|
stagger: 0,
|
|
1005
1005
|
parent: _
|
|
1006
1006
|
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
1007
|
-
}, b), F && (E[
|
|
1007
|
+
}, b), F && (E[S.prop] = F), Ie(e._startAt = H.set(g, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (K ? e._startAt.revert(kt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
|
|
1008
1008
|
a(e._startAt, k, k);
|
|
1009
1009
|
else if (!t)
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
for (e._pt = e._ptCache = 0, l = f && ee(l) || l && !f, P = 0; P < g.length; P++) {
|
|
1013
|
-
if (w = g[P],
|
|
1014
|
-
|
|
1015
|
-
}), R.priority && (T = 1)), !
|
|
1013
|
+
if (w = g[P], D = w._gsap || Ri(g)[P]._gsap, e._ptLookup[P] = L = {}, ci[D.id] && Le.length && $t(), B = y === g ? P : y.indexOf(w), S && (R = new S()).init(w, F || b, e, B, y) !== !1 && (e._pt = C = new ie(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(Q) {
|
|
1014
|
+
L[Q] = C;
|
|
1015
|
+
}), R.priority && (T = 1)), !S || F)
|
|
1016
1016
|
for (E in b)
|
|
1017
|
-
ae[E] && (R =
|
|
1018
|
-
e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Te = e, N.killTweensOf(w,
|
|
1017
|
+
ae[E] && (R = hr(E, b, e, B, w, y)) ? R.priority && (T = 1) : L[E] = C = Oi.call(e, w, E, "get", b[E], B, y, 0, n.stringFilter);
|
|
1018
|
+
e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Te = e, N.killTweensOf(w, L, e.globalTime(t)), U = !e.parent, Te = 0), e._pt && l && (ci[D.id] = 1);
|
|
1019
1019
|
}
|
|
1020
|
-
T &&
|
|
1020
|
+
T && mr(e), e._onInit && e._onInit(e);
|
|
1021
1021
|
}
|
|
1022
1022
|
e._onUpdate = c, e._initted = (!e._op || e._pt) && !U, p && t <= 0 && v.render(fe, !0, !0);
|
|
1023
|
-
},
|
|
1023
|
+
}, xs = function(e, t, i, n, r, s, o, l) {
|
|
1024
1024
|
var c = (e._pt && e._ptCache || (e._ptCache = {}))[t], h, u, p, m;
|
|
1025
1025
|
if (!c)
|
|
1026
1026
|
for (c = e._ptCache[t] = [], p = e._ptLookup, m = e._targets.length; m--; ) {
|
|
@@ -1028,12 +1028,12 @@ var gs = function(e, t, i, n, r, s, o) {
|
|
|
1028
1028
|
for (h = h.d._pt; h && h.p !== t && h.fp !== t; )
|
|
1029
1029
|
h = h._next;
|
|
1030
1030
|
if (!h)
|
|
1031
|
-
return gi = 1, e.vars[t] = "+=0",
|
|
1031
|
+
return gi = 1, e.vars[t] = "+=0", Ii(e, o), gi = 0, l ? vt(t + " not eligible for reset") : 1;
|
|
1032
1032
|
c.push(h);
|
|
1033
1033
|
}
|
|
1034
1034
|
for (m = c.length; m--; )
|
|
1035
|
-
u = c[m], h = u._pt || u, h.s = (n || n === 0) && !r ? n : h.s + (n || 0) + s * h.c, h.c = i - h.s, u.e && (u.e = V(i) +
|
|
1036
|
-
},
|
|
1035
|
+
u = c[m], h = u._pt || u, h.s = (n || n === 0) && !r ? n : h.s + (n || 0) + s * h.c, h.c = i - h.s, u.e && (u.e = V(i) + W(u.e)), u.b && (u.b = h.s + W(u.b));
|
|
1036
|
+
}, bs = function(e, t) {
|
|
1037
1037
|
var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
|
|
1038
1038
|
if (!n)
|
|
1039
1039
|
return t;
|
|
@@ -1043,9 +1043,9 @@ var gs = function(e, t, i, n, r, s, o) {
|
|
|
1043
1043
|
for (l = n[s].split(","), o = l.length; o--; )
|
|
1044
1044
|
r[l[o]] = r[s];
|
|
1045
1045
|
return r;
|
|
1046
|
-
},
|
|
1046
|
+
}, vs = function(e, t, i, n) {
|
|
1047
1047
|
var r = t.ease || n || "power1.inOut", s, o;
|
|
1048
|
-
if (
|
|
1048
|
+
if (X(t))
|
|
1049
1049
|
o = i[e] || (i[e] = []), t.forEach(function(l, c) {
|
|
1050
1050
|
return o.push({
|
|
1051
1051
|
t: c / (t.length - 1) * 100,
|
|
@@ -1062,49 +1062,49 @@ var gs = function(e, t, i, n, r, s, o) {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
}, bt = function(e, t, i, n, r) {
|
|
1064
1064
|
return G(e) ? e.call(t, i, n, r) : Z(e) && ~e.indexOf("random(") ? wt(e) : e;
|
|
1065
|
-
},
|
|
1066
|
-
te(
|
|
1067
|
-
return
|
|
1065
|
+
}, cr = Di + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", ur = {};
|
|
1066
|
+
te(cr + ",id,stagger,delay,duration,paused,scrollTrigger", function(a) {
|
|
1067
|
+
return ur[a] = 1;
|
|
1068
1068
|
});
|
|
1069
1069
|
var H = /* @__PURE__ */ (function(a) {
|
|
1070
|
-
|
|
1070
|
+
Mn(e, a);
|
|
1071
1071
|
function e(i, n, r, s) {
|
|
1072
1072
|
var o;
|
|
1073
1073
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : yt(n)) || this;
|
|
1074
|
-
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (
|
|
1075
|
-
if (o._targets = x.length ? Ri(x) : vt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p ||
|
|
1074
|
+
var l = o.vars, c = l.duration, h = l.delay, u = l.immediateRender, p = l.stagger, m = l.overwrite, f = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (X(i) || Rn(i) ? Ae(i[0]) : "length" in n) ? [i] : me(i), v, b, P, E, C, w, T, D;
|
|
1075
|
+
if (o._targets = x.length ? Ri(x) : vt("GSAP target " + i + " not found. https://gsap.com", !he.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, f || p || Dt(c) || Dt(h)) {
|
|
1076
1076
|
if (n = o.vars, v = o.timeline = new q({
|
|
1077
1077
|
data: "nested",
|
|
1078
1078
|
defaults: d || {},
|
|
1079
1079
|
targets: y && y.data === "nested" ? y.vars.targets : x
|
|
1080
|
-
}), v.kill(), v.parent = v._dp =
|
|
1081
|
-
if (E = x.length, T = p &&
|
|
1080
|
+
}), v.kill(), v.parent = v._dp = Pe(o), v._start = 0, p || Dt(c) || Dt(h)) {
|
|
1081
|
+
if (E = x.length, T = p && Wn(p), Ee(p))
|
|
1082
1082
|
for (C in p)
|
|
1083
|
-
~
|
|
1083
|
+
~cr.indexOf(C) && (D || (D = {}), D[C] = p[C]);
|
|
1084
1084
|
for (b = 0; b < E; b++)
|
|
1085
|
-
P = Bt(n,
|
|
1085
|
+
P = Bt(n, ur), P.stagger = 0, _ && (P.yoyoEase = _), D && at(P, D), w = x[b], P.duration = +bt(c, Pe(o), b, w, x), P.delay = (+bt(h, Pe(o), b, w, x) || 0) - o._delay, !p && E === 1 && P.delay && (o._delay = h = P.delay, o._start += h, P.delay = 0), v.to(w, P, T ? T(b, w, x) : 0), v._ease = M.none;
|
|
1086
1086
|
v.duration() ? c = h = 0 : o.timeline = 0;
|
|
1087
1087
|
} else if (f) {
|
|
1088
1088
|
yt(ue(v.vars.defaults, {
|
|
1089
1089
|
ease: "none"
|
|
1090
1090
|
})), v._ease = Ye(f.ease || n.ease || "none");
|
|
1091
|
-
var
|
|
1092
|
-
if (
|
|
1091
|
+
var S = 0, R, L, B;
|
|
1092
|
+
if (X(f))
|
|
1093
1093
|
f.forEach(function(F) {
|
|
1094
1094
|
return v.to(x, F, ">");
|
|
1095
1095
|
}), v.duration();
|
|
1096
1096
|
else {
|
|
1097
1097
|
P = {};
|
|
1098
1098
|
for (C in f)
|
|
1099
|
-
C === "ease" || C === "easeEach" ||
|
|
1099
|
+
C === "ease" || C === "easeEach" || vs(C, f[C], P, f.easeEach);
|
|
1100
1100
|
for (C in P)
|
|
1101
1101
|
for (R = P[C].sort(function(F, U) {
|
|
1102
1102
|
return F.t - U.t;
|
|
1103
|
-
}),
|
|
1104
|
-
|
|
1105
|
-
ease:
|
|
1106
|
-
duration: (
|
|
1107
|
-
}, B[C] =
|
|
1103
|
+
}), S = 0, b = 0; b < R.length; b++)
|
|
1104
|
+
L = R[b], B = {
|
|
1105
|
+
ease: L.e,
|
|
1106
|
+
duration: (L.t - (b ? R[b - 1].t : 0)) / 100 * c
|
|
1107
|
+
}, B[C] = L.v, v.to(x, B, S), S += B.duration;
|
|
1108
1108
|
v.duration() < c && v.to({}, {
|
|
1109
1109
|
duration: c - v.duration()
|
|
1110
1110
|
});
|
|
@@ -1113,23 +1113,23 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1113
1113
|
c || o.duration(c = v.duration());
|
|
1114
1114
|
} else
|
|
1115
1115
|
o.timeline = 0;
|
|
1116
|
-
return m === !0 && !Pi && (Te =
|
|
1116
|
+
return m === !0 && !Pi && (Te = Pe(o), N.killTweensOf(x), Te = 0), xe(y, Pe(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === j(y._time) && ee(u) && Qr(Pe(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -h) || 0)), g && jn(Pe(o), g), o;
|
|
1117
1117
|
}
|
|
1118
1118
|
var t = e.prototype;
|
|
1119
1119
|
return t.render = function(n, r, s) {
|
|
1120
1120
|
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - k && !h ? l : n < k ? 0 : n, p, m, f, d, g, _, y, x, v;
|
|
1121
1121
|
if (!c)
|
|
1122
|
-
|
|
1122
|
+
es(this, n, r, s);
|
|
1123
1123
|
else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== h || this._lazy) {
|
|
1124
1124
|
if (p = u, x = this.timeline, this._repeat) {
|
|
1125
1125
|
if (d = c + this._rDelay, this._repeat < -1 && h)
|
|
1126
1126
|
return this.totalTime(d * 100 + n, r, s);
|
|
1127
1127
|
if (p = j(u % d), u === l ? (f = this._repeat, p = c) : (g = j(u / d), f = ~~g, f && f === g ? (p = c, f--) : p > c && (p = c)), _ = this._yoyo && f & 1, _ && (v = this._yEase, p = c - p), g = ot(this._tTime, d), p === o && !s && this._initted && f === g)
|
|
1128
1128
|
return this._tTime = u, this;
|
|
1129
|
-
f !== g && (x && this._yEase &&
|
|
1129
|
+
f !== g && (x && this._yEase && ar(x, _), this.vars.repeatRefresh && !_ && !this._lock && p !== d && this._initted && (this._lock = s = 1, this.render(j(d * f), !0).invalidate()._lock = 0));
|
|
1130
1130
|
}
|
|
1131
1131
|
if (!this._initted) {
|
|
1132
|
-
if (
|
|
1132
|
+
if (Yn(this, h ? n : p, s, r, u))
|
|
1133
1133
|
return this._tTime = 0, this;
|
|
1134
1134
|
if (o !== this._time && !(s && this.vars.repeatRefresh && f !== g))
|
|
1135
1135
|
return this;
|
|
@@ -1150,7 +1150,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1150
1150
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1151
1151
|
Pt || oe.wake(), this._ts || this.play();
|
|
1152
1152
|
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
|
|
1153
|
-
return this._initted ||
|
|
1153
|
+
return this._initted || Ii(this, c), h = this._ease(c / this._dur), xs(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Kt(this, 0), this.parent || Vn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1154
1154
|
}, t.kill = function(n, r) {
|
|
1155
1155
|
if (r === void 0 && (r = "all"), !n && (!r || r === "all"))
|
|
1156
1156
|
return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!K), this;
|
|
@@ -1163,7 +1163,7 @@ var H = /* @__PURE__ */ (function(a) {
|
|
|
1163
1163
|
return r === "all" && (this._pt = 0), mt(this);
|
|
1164
1164
|
for (u = this._op = this._op || [], r !== "all" && (Z(r) && (d = {}, te(r, function(y) {
|
|
1165
1165
|
return d[y] = 1;
|
|
1166
|
-
}), r = d), r =
|
|
1166
|
+
}), r = d), r = bs(o, r)), _ = o.length; _--; )
|
|
1167
1167
|
if (~l.indexOf(o[_])) {
|
|
1168
1168
|
p = c[_], r === "all" ? (u[_] = r, f = p, m = {}) : (m = u[_] = u[_] || {}, f = r);
|
|
1169
1169
|
for (d in f)
|
|
@@ -1209,19 +1209,19 @@ te("staggerTo,staggerFrom,staggerFromTo", function(a) {
|
|
|
1209
1209
|
});
|
|
1210
1210
|
var ki = function(e, t, i) {
|
|
1211
1211
|
return e[t] = i;
|
|
1212
|
-
},
|
|
1212
|
+
}, dr = function(e, t, i) {
|
|
1213
1213
|
return e[t](i);
|
|
1214
|
-
},
|
|
1214
|
+
}, Es = function(e, t, i, n) {
|
|
1215
1215
|
return e[t](n.fp, i);
|
|
1216
|
-
},
|
|
1216
|
+
}, ws = function(e, t, i) {
|
|
1217
1217
|
return e.setAttribute(t, i);
|
|
1218
1218
|
}, Ui = function(e, t) {
|
|
1219
|
-
return G(e[t]) ?
|
|
1220
|
-
},
|
|
1219
|
+
return G(e[t]) ? dr : Ci(e[t]) && e.setAttribute ? ws : ki;
|
|
1220
|
+
}, pr = function(e, t) {
|
|
1221
1221
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1222
|
-
},
|
|
1222
|
+
}, Ps = function(e, t) {
|
|
1223
1223
|
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1224
|
-
},
|
|
1224
|
+
}, fr = function(e, t) {
|
|
1225
1225
|
var i = t._pt, n = "";
|
|
1226
1226
|
if (!e && t.b)
|
|
1227
1227
|
n = t.b;
|
|
@@ -1236,16 +1236,16 @@ var ki = function(e, t, i) {
|
|
|
1236
1236
|
}, Fi = function(e, t) {
|
|
1237
1237
|
for (var i = t._pt; i; )
|
|
1238
1238
|
i.r(e, i.d), i = i._next;
|
|
1239
|
-
},
|
|
1239
|
+
}, Cs = function(e, t, i, n) {
|
|
1240
1240
|
for (var r = this._pt, s; r; )
|
|
1241
1241
|
s = r._next, r.p === n && r.modifier(e, t, i), r = s;
|
|
1242
|
-
},
|
|
1242
|
+
}, As = function(e) {
|
|
1243
1243
|
for (var t = this._pt, i, n; t; )
|
|
1244
1244
|
n = t._next, t.p === e && !t.op || t.op === e ? Yt(this, t, "_pt") : t.dep || (i = 1), t = n;
|
|
1245
1245
|
return !i;
|
|
1246
|
-
},
|
|
1246
|
+
}, Ss = function(e, t, i, n) {
|
|
1247
1247
|
n.mSet(e, t, n.m.call(n.tween, i, n.mt), n);
|
|
1248
|
-
},
|
|
1248
|
+
}, mr = function(e) {
|
|
1249
1249
|
for (var t = e._pt, i, n, r, s; t; ) {
|
|
1250
1250
|
for (i = t._next, n = r; n && n.pr > t.pr; )
|
|
1251
1251
|
n = n._next;
|
|
@@ -1254,15 +1254,15 @@ var ki = function(e, t, i) {
|
|
|
1254
1254
|
e._pt = r;
|
|
1255
1255
|
}, ie = /* @__PURE__ */ (function() {
|
|
1256
1256
|
function a(t, i, n, r, s, o, l, c, h) {
|
|
1257
|
-
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o ||
|
|
1257
|
+
this.t = i, this.s = r, this.c = s, this.p = n, this.r = o || pr, this.d = l || this, this.set = c || ki, this.pr = h || 0, this._next = t, t && (t._prev = this);
|
|
1258
1258
|
}
|
|
1259
1259
|
var e = a.prototype;
|
|
1260
1260
|
return e.modifier = function(i, n, r) {
|
|
1261
|
-
this.mSet = this.mSet || this.set, this.set =
|
|
1261
|
+
this.mSet = this.mSet || this.set, this.set = Ss, this.m = i, this.mt = r, this.tween = n;
|
|
1262
1262
|
}, a;
|
|
1263
1263
|
})();
|
|
1264
|
-
te(
|
|
1265
|
-
return
|
|
1264
|
+
te(Di + "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(a) {
|
|
1265
|
+
return Mi[a] = 1;
|
|
1266
1266
|
});
|
|
1267
1267
|
ce.TweenMax = ce.TweenLite = H;
|
|
1268
1268
|
ce.TimelineLite = ce.TimelineMax = q;
|
|
@@ -1273,8 +1273,8 @@ N = new q({
|
|
|
1273
1273
|
id: "root",
|
|
1274
1274
|
smoothChildTiming: !0
|
|
1275
1275
|
});
|
|
1276
|
-
he.stringFilter =
|
|
1277
|
-
var Ze = [], Ft = {}, Ts = [], en = 0,
|
|
1276
|
+
he.stringFilter = rr;
|
|
1277
|
+
var Ze = [], Ft = {}, Ts = [], en = 0, Ms = 0, ei = function(e) {
|
|
1278
1278
|
return (Ft[e] || Ts).map(function(t) {
|
|
1279
1279
|
return t();
|
|
1280
1280
|
});
|
|
@@ -1283,16 +1283,16 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1283
1283
|
e - en > 2 && (ei("matchMediaInit"), Ze.forEach(function(i) {
|
|
1284
1284
|
var n = i.queries, r = i.conditions, s, o, l, c;
|
|
1285
1285
|
for (o in n)
|
|
1286
|
-
s =
|
|
1286
|
+
s = ye.matchMedia(n[o]).matches, s && (l = 1), s !== r[o] && (r[o] = s, c = 1);
|
|
1287
1287
|
c && (i.revert(), l && t.push(i));
|
|
1288
1288
|
}), ei("matchMediaRevert"), t.forEach(function(i) {
|
|
1289
1289
|
return i.onMatch(i, function(n) {
|
|
1290
1290
|
return i.add(null, n);
|
|
1291
1291
|
});
|
|
1292
1292
|
}), en = e, ei("matchMedia"));
|
|
1293
|
-
},
|
|
1293
|
+
}, gr = /* @__PURE__ */ (function() {
|
|
1294
1294
|
function a(t, i) {
|
|
1295
|
-
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id =
|
|
1295
|
+
this.selector = i && fi(i), this.data = [], this._r = [], this.isReverted = !1, this.id = Ms++, t && this.add(t);
|
|
1296
1296
|
}
|
|
1297
1297
|
var e = a.prototype;
|
|
1298
1298
|
return e.add = function(i, n, r) {
|
|
@@ -1349,13 +1349,13 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
var e = a.prototype;
|
|
1351
1351
|
return e.add = function(i, n, r) {
|
|
1352
|
-
|
|
1352
|
+
Ee(i) || (i = {
|
|
1353
1353
|
matches: i
|
|
1354
1354
|
});
|
|
1355
|
-
var s = new
|
|
1355
|
+
var s = new gr(0, r || this.scope), o = s.conditions = {}, l, c, h;
|
|
1356
1356
|
z && !s.selector && (s.selector = z.selector), this.contexts.push(s), n = s.add("onMatch", n), s.queries = i;
|
|
1357
1357
|
for (c in i)
|
|
1358
|
-
c === "all" ? h = 1 : (l =
|
|
1358
|
+
c === "all" ? h = 1 : (l = ye.matchMedia(i[c]), l && (Ze.indexOf(s) < 0 && Ze.push(s), (o[c] = l.matches) && (h = 1), l.addListener ? l.addListener(_i) : l.addEventListener("change", _i)));
|
|
1359
1359
|
return h && n(s, function(u) {
|
|
1360
1360
|
return s.add(null, u);
|
|
1361
1361
|
}), this;
|
|
@@ -1371,7 +1371,7 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1371
1371
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1372
1372
|
t[i] = arguments[i];
|
|
1373
1373
|
t.forEach(function(n) {
|
|
1374
|
-
return
|
|
1374
|
+
return tr(n);
|
|
1375
1375
|
});
|
|
1376
1376
|
},
|
|
1377
1377
|
timeline: function(e) {
|
|
@@ -1382,7 +1382,7 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1382
1382
|
},
|
|
1383
1383
|
getProperty: function(e, t, i, n) {
|
|
1384
1384
|
Z(e) && (e = me(e)[0]);
|
|
1385
|
-
var r = He(e || {}).get, s = i ?
|
|
1385
|
+
var r = He(e || {}).get, s = i ? Gn : Bn;
|
|
1386
1386
|
return i === "native" && (i = ""), e && (t ? s((ae[t] && ae[t].get || r)(e, t, i, n)) : function(o, l, c) {
|
|
1387
1387
|
return s((ae[o] && ae[o].get || r)(e, o, l, c));
|
|
1388
1388
|
});
|
|
@@ -1416,26 +1416,26 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1416
1416
|
return N.getTweensOf(e, !0).length > 0;
|
|
1417
1417
|
},
|
|
1418
1418
|
defaults: function(e) {
|
|
1419
|
-
return e && e.ease && (e.ease = Ye(e.ease, st.ease)),
|
|
1419
|
+
return e && e.ease && (e.ease = Ye(e.ease, st.ease)), Wi(st, e || {});
|
|
1420
1420
|
},
|
|
1421
1421
|
config: function(e) {
|
|
1422
|
-
return
|
|
1422
|
+
return Wi(he, e || {});
|
|
1423
1423
|
},
|
|
1424
1424
|
registerEffect: function(e) {
|
|
1425
1425
|
var t = e.name, i = e.effect, n = e.plugins, r = e.defaults, s = e.extendTimeline;
|
|
1426
1426
|
(n || "").split(",").forEach(function(o) {
|
|
1427
1427
|
return o && !ae[o] && !ce[o] && vt(t + " effect requires " + o + " plugin.");
|
|
1428
|
-
}),
|
|
1428
|
+
}), Xt[t] = function(o, l, c) {
|
|
1429
1429
|
return i(me(o), ue(l || {}, r), c);
|
|
1430
1430
|
}, s && (q.prototype[t] = function(o, l, c) {
|
|
1431
|
-
return this.add(
|
|
1431
|
+
return this.add(Xt[t](o, Ee(l) ? l : (c = l) && {}, this), c);
|
|
1432
1432
|
});
|
|
1433
1433
|
},
|
|
1434
1434
|
registerEase: function(e, t) {
|
|
1435
|
-
|
|
1435
|
+
M[e] = Ye(t);
|
|
1436
1436
|
},
|
|
1437
1437
|
parseEase: function(e, t) {
|
|
1438
|
-
return arguments.length ? Ye(e, t) :
|
|
1438
|
+
return arguments.length ? Ye(e, t) : M;
|
|
1439
1439
|
},
|
|
1440
1440
|
getById: function(e) {
|
|
1441
1441
|
return N.getById(e);
|
|
@@ -1444,11 +1444,11 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1444
1444
|
e === void 0 && (e = {});
|
|
1445
1445
|
var i = new q(e), n, r;
|
|
1446
1446
|
for (i.smoothChildTiming = ee(e.smoothChildTiming), N.remove(i), i._dp = 0, i._time = i._tTime = N._time, n = N._first; n; )
|
|
1447
|
-
r = n._next, (t || !(!n._dur && n instanceof H && n.vars.onComplete === n._targets[0])) &&
|
|
1448
|
-
return
|
|
1447
|
+
r = n._next, (t || !(!n._dur && n instanceof H && n.vars.onComplete === n._targets[0])) && xe(i, n, n._start - n._delay), n = r;
|
|
1448
|
+
return xe(N, i, 0), i;
|
|
1449
1449
|
},
|
|
1450
1450
|
context: function(e, t) {
|
|
1451
|
-
return e ? new
|
|
1451
|
+
return e ? new gr(e, t) : z;
|
|
1452
1452
|
},
|
|
1453
1453
|
matchMedia: function(e) {
|
|
1454
1454
|
return new Ds(e);
|
|
@@ -1470,32 +1470,32 @@ var Ze = [], Ft = {}, Ts = [], en = 0, Ss = 0, ei = function(e) {
|
|
|
1470
1470
|
n >= 0 && i.splice(n, 1);
|
|
1471
1471
|
},
|
|
1472
1472
|
utils: {
|
|
1473
|
-
wrap:
|
|
1474
|
-
wrapYoyo:
|
|
1475
|
-
distribute:
|
|
1476
|
-
random:
|
|
1473
|
+
wrap: ls,
|
|
1474
|
+
wrapYoyo: hs,
|
|
1475
|
+
distribute: Wn,
|
|
1476
|
+
random: qn,
|
|
1477
1477
|
snap: Xn,
|
|
1478
|
-
normalize:
|
|
1479
|
-
getUnit:
|
|
1480
|
-
clamp:
|
|
1481
|
-
splitColor:
|
|
1478
|
+
normalize: os,
|
|
1479
|
+
getUnit: W,
|
|
1480
|
+
clamp: ns,
|
|
1481
|
+
splitColor: ir,
|
|
1482
1482
|
toArray: me,
|
|
1483
1483
|
selector: fi,
|
|
1484
|
-
mapRange:
|
|
1485
|
-
pipe:
|
|
1486
|
-
unitize:
|
|
1487
|
-
interpolate:
|
|
1488
|
-
shuffle:
|
|
1484
|
+
mapRange: Jn,
|
|
1485
|
+
pipe: ss,
|
|
1486
|
+
unitize: as,
|
|
1487
|
+
interpolate: cs,
|
|
1488
|
+
shuffle: Kn
|
|
1489
1489
|
},
|
|
1490
|
-
install:
|
|
1491
|
-
effects:
|
|
1490
|
+
install: Un,
|
|
1491
|
+
effects: Xt,
|
|
1492
1492
|
ticker: oe,
|
|
1493
1493
|
updateRoot: q.updateRoot,
|
|
1494
1494
|
plugins: ae,
|
|
1495
1495
|
globalTimeline: N,
|
|
1496
1496
|
core: {
|
|
1497
1497
|
PropTween: ie,
|
|
1498
|
-
globals:
|
|
1498
|
+
globals: Fn,
|
|
1499
1499
|
Tween: H,
|
|
1500
1500
|
Timeline: q,
|
|
1501
1501
|
Animation: Ct,
|
|
@@ -1519,15 +1519,15 @@ oe.add(q.updateRoot);
|
|
|
1519
1519
|
et = Vt.to({}, {
|
|
1520
1520
|
duration: 0
|
|
1521
1521
|
});
|
|
1522
|
-
var
|
|
1522
|
+
var Rs = function(e, t) {
|
|
1523
1523
|
for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
|
|
1524
1524
|
i = i._next;
|
|
1525
1525
|
return i;
|
|
1526
|
-
},
|
|
1526
|
+
}, Ls = function(e, t) {
|
|
1527
1527
|
var i = e._targets, n, r, s;
|
|
1528
1528
|
for (n in t)
|
|
1529
1529
|
for (r = i.length; r--; )
|
|
1530
|
-
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s =
|
|
1530
|
+
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Rs(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
|
|
1531
1531
|
}, ti = function(e, t) {
|
|
1532
1532
|
return {
|
|
1533
1533
|
name: e,
|
|
@@ -1545,7 +1545,7 @@ var Ms = function(e, t) {
|
|
|
1545
1545
|
l[c] = t(r[c]);
|
|
1546
1546
|
r = l;
|
|
1547
1547
|
}
|
|
1548
|
-
|
|
1548
|
+
Ls(o, r);
|
|
1549
1549
|
};
|
|
1550
1550
|
}
|
|
1551
1551
|
};
|
|
@@ -1570,68 +1570,68 @@ var Ms = function(e, t) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
}, ti("roundProps", mi), ti("modifiers"), ti("snap", Xn)) || Vt;
|
|
1572
1572
|
H.version = q.version = re.version = "3.13.0";
|
|
1573
|
-
|
|
1573
|
+
kn = 1;
|
|
1574
1574
|
Ai() && ht();
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
var tn,
|
|
1575
|
+
M.Power0;
|
|
1576
|
+
M.Power1;
|
|
1577
|
+
M.Power2;
|
|
1578
|
+
M.Power3;
|
|
1579
|
+
M.Power4;
|
|
1580
|
+
M.Linear;
|
|
1581
|
+
M.Quad;
|
|
1582
|
+
M.Cubic;
|
|
1583
|
+
M.Quart;
|
|
1584
|
+
M.Quint;
|
|
1585
|
+
M.Strong;
|
|
1586
|
+
M.Elastic;
|
|
1587
|
+
M.Back;
|
|
1588
|
+
M.SteppedEase;
|
|
1589
|
+
M.Bounce;
|
|
1590
|
+
M.Sine;
|
|
1591
|
+
M.Expo;
|
|
1592
|
+
M.Circ;
|
|
1593
|
+
var tn, Me, nt, zi, Ge, nn, Ni, Os = function() {
|
|
1594
1594
|
return typeof window < "u";
|
|
1595
|
-
},
|
|
1595
|
+
}, Se = {}, Be = 180 / Math.PI, rt = Math.PI / 180, Xe = Math.atan2, rn = 1e8, $i = /([A-Z])/g, Is = /(left|right|width|margin|padding|x)/i, ks = /[\s,\(]\S/, be = {
|
|
1596
1596
|
autoAlpha: "opacity,visibility",
|
|
1597
1597
|
scale: "scaleX,scaleY",
|
|
1598
1598
|
alpha: "opacity"
|
|
1599
1599
|
}, yi = function(e, t) {
|
|
1600
1600
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
1601
|
-
}, ks = function(e, t) {
|
|
1602
|
-
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
1603
1601
|
}, Us = function(e, t) {
|
|
1604
|
-
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u
|
|
1602
|
+
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
1605
1603
|
}, Fs = function(e, t) {
|
|
1604
|
+
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
1605
|
+
}, zs = function(e, t) {
|
|
1606
1606
|
var i = t.s + t.c * e;
|
|
1607
1607
|
t.set(t.t, t.p, ~~(i + (i < 0 ? -0.5 : 0.5)) + t.u, t);
|
|
1608
|
-
}, gr = function(e, t) {
|
|
1609
|
-
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
1610
1608
|
}, _r = function(e, t) {
|
|
1609
|
+
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
1610
|
+
}, yr = function(e, t) {
|
|
1611
1611
|
return t.set(t.t, t.p, e !== 1 ? t.b : t.e, t);
|
|
1612
|
-
}, zs = function(e, t, i) {
|
|
1613
|
-
return e.style[t] = i;
|
|
1614
1612
|
}, Ns = function(e, t, i) {
|
|
1615
|
-
return e.style
|
|
1613
|
+
return e.style[t] = i;
|
|
1616
1614
|
}, $s = function(e, t, i) {
|
|
1617
|
-
return e.
|
|
1615
|
+
return e.style.setProperty(t, i);
|
|
1618
1616
|
}, Bs = function(e, t, i) {
|
|
1617
|
+
return e._gsap[t] = i;
|
|
1618
|
+
}, Gs = function(e, t, i) {
|
|
1619
1619
|
return e._gsap.scaleX = e._gsap.scaleY = i;
|
|
1620
|
-
},
|
|
1620
|
+
}, Vs = function(e, t, i, n, r) {
|
|
1621
1621
|
var s = e._gsap;
|
|
1622
1622
|
s.scaleX = s.scaleY = i, s.renderTransform(r, s);
|
|
1623
|
-
},
|
|
1623
|
+
}, Hs = function(e, t, i, n, r) {
|
|
1624
1624
|
var s = e._gsap;
|
|
1625
1625
|
s[t] = i, s.renderTransform(r, s);
|
|
1626
|
-
}, $ = "transform", ne = $ + "Origin",
|
|
1626
|
+
}, $ = "transform", ne = $ + "Origin", js = function a(e, t) {
|
|
1627
1627
|
var i = this, n = this.target, r = n.style, s = n._gsap;
|
|
1628
|
-
if (e in
|
|
1628
|
+
if (e in Se && r) {
|
|
1629
1629
|
if (this.tfm = this.tfm || {}, e !== "transform")
|
|
1630
|
-
e =
|
|
1631
|
-
return i.tfm[o] =
|
|
1632
|
-
}) : this.tfm[e] = s.x ? s[e] :
|
|
1630
|
+
e = be[e] || e, ~e.indexOf(",") ? e.split(",").forEach(function(o) {
|
|
1631
|
+
return i.tfm[o] = Ce(n, o);
|
|
1632
|
+
}) : this.tfm[e] = s.x ? s[e] : Ce(n, e), e === ne && (this.tfm.zOrigin = s.zOrigin);
|
|
1633
1633
|
else
|
|
1634
|
-
return
|
|
1634
|
+
return be.transform.split(",").forEach(function(o) {
|
|
1635
1635
|
return a.call(i, o, t);
|
|
1636
1636
|
});
|
|
1637
1637
|
if (this.props.indexOf($) >= 0)
|
|
@@ -1639,30 +1639,30 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1639
1639
|
s.svg && (this.svgo = n.getAttribute("data-svg-origin"), this.props.push(ne, t, "")), e = $;
|
|
1640
1640
|
}
|
|
1641
1641
|
(r || t) && this.props.push(e, t, r[e]);
|
|
1642
|
-
},
|
|
1642
|
+
}, xr = function(e) {
|
|
1643
1643
|
e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate"));
|
|
1644
|
-
},
|
|
1644
|
+
}, Ys = function() {
|
|
1645
1645
|
var e = this.props, t = this.target, i = t.style, n = t._gsap, r, s;
|
|
1646
1646
|
for (r = 0; r < e.length; r += 3)
|
|
1647
1647
|
e[r + 1] ? e[r + 1] === 2 ? t[e[r]](e[r + 2]) : t[e[r]] = e[r + 2] : e[r + 2] ? i[e[r]] = e[r + 2] : i.removeProperty(e[r].substr(0, 2) === "--" ? e[r] : e[r].replace($i, "-$1").toLowerCase());
|
|
1648
1648
|
if (this.tfm) {
|
|
1649
1649
|
for (s in this.tfm)
|
|
1650
1650
|
n[s] = this.tfm[s];
|
|
1651
|
-
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = Ni(), (!r || !r.isStart) && !i[$] && (
|
|
1651
|
+
n.svg && (n.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), r = Ni(), (!r || !r.isStart) && !i[$] && (xr(i), n.zOrigin && i[ne] && (i[ne] += " " + n.zOrigin + "px", n.zOrigin = 0, n.renderTransform()), n.uncache = 1);
|
|
1652
1652
|
}
|
|
1653
|
-
},
|
|
1653
|
+
}, br = function(e, t) {
|
|
1654
1654
|
var i = {
|
|
1655
1655
|
target: e,
|
|
1656
1656
|
props: [],
|
|
1657
|
-
revert:
|
|
1658
|
-
save:
|
|
1657
|
+
revert: Ys,
|
|
1658
|
+
save: js
|
|
1659
1659
|
};
|
|
1660
1660
|
return e._gsap || re.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(n) {
|
|
1661
1661
|
return i.save(n);
|
|
1662
1662
|
}), i;
|
|
1663
|
-
},
|
|
1664
|
-
var i =
|
|
1665
|
-
return i && i.style ? i :
|
|
1663
|
+
}, vr, xi = function(e, t) {
|
|
1664
|
+
var i = Me.createElementNS ? Me.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : Me.createElement(e);
|
|
1665
|
+
return i && i.style ? i : Me.createElement(e);
|
|
1666
1666
|
}, ge = function a(e, t, i) {
|
|
1667
1667
|
var n = getComputedStyle(e);
|
|
1668
1668
|
return n[t] || n.getPropertyValue(t.replace($i, "-$1").toLowerCase()) || n.getPropertyValue(t) || !i && a(e, ct(t) || t, 1) || "";
|
|
@@ -1674,9 +1674,9 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1674
1674
|
;
|
|
1675
1675
|
return s < 0 ? null : (s === 3 ? "ms" : s >= 0 ? sn[s] : "") + e;
|
|
1676
1676
|
}, bi = function() {
|
|
1677
|
-
Os() && window.document && (tn = window,
|
|
1677
|
+
Os() && window.document && (tn = window, Me = tn.document, nt = Me.documentElement, Ge = xi("div") || {
|
|
1678
1678
|
style: {}
|
|
1679
|
-
}, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0",
|
|
1679
|
+
}, xi("div"), $ = ct($), ne = $ + "Origin", Ge.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", vr = !!ct("perspective"), Ni = re.core.reverting, zi = 1);
|
|
1680
1680
|
}, an = function(e) {
|
|
1681
1681
|
var t = e.ownerSVGElement, i = xi("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), n = e.cloneNode(!0), r;
|
|
1682
1682
|
n.style.display = "block", i.appendChild(n), nt.appendChild(i);
|
|
@@ -1689,7 +1689,7 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1689
1689
|
for (var i = t.length; i--; )
|
|
1690
1690
|
if (e.hasAttribute(t[i]))
|
|
1691
1691
|
return e.getAttribute(t[i]);
|
|
1692
|
-
},
|
|
1692
|
+
}, Er = function(e) {
|
|
1693
1693
|
var t, i;
|
|
1694
1694
|
try {
|
|
1695
1695
|
t = e.getBBox();
|
|
@@ -1702,49 +1702,49 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1702
1702
|
width: 0,
|
|
1703
1703
|
height: 0
|
|
1704
1704
|
} : t;
|
|
1705
|
-
},
|
|
1706
|
-
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) &&
|
|
1705
|
+
}, wr = function(e) {
|
|
1706
|
+
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && Er(e));
|
|
1707
1707
|
}, Ke = function(e, t) {
|
|
1708
1708
|
if (t) {
|
|
1709
1709
|
var i = e.style, n;
|
|
1710
|
-
t in
|
|
1710
|
+
t in Se && t !== ne && (t = $), i.removeProperty ? (n = t.substr(0, 2), (n === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), i.removeProperty(n === "--" ? t : t.replace($i, "-$1").toLowerCase())) : i.removeAttribute(t);
|
|
1711
1711
|
}
|
|
1712
1712
|
}, De = function(e, t, i, n, r, s) {
|
|
1713
|
-
var o = new ie(e._pt, t, i, 0, 1, s ?
|
|
1713
|
+
var o = new ie(e._pt, t, i, 0, 1, s ? yr : _r);
|
|
1714
1714
|
return e._pt = o, o.b = n, o.e = r, e._props.push(i), o;
|
|
1715
1715
|
}, ln = {
|
|
1716
1716
|
deg: 1,
|
|
1717
1717
|
rad: 1,
|
|
1718
1718
|
turn: 1
|
|
1719
|
-
},
|
|
1719
|
+
}, Zs = {
|
|
1720
1720
|
grid: 1,
|
|
1721
1721
|
flex: 1
|
|
1722
|
-
},
|
|
1722
|
+
}, ke = function a(e, t, i, n) {
|
|
1723
1723
|
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ge.style, l = Is.test(t), c = e.tagName.toLowerCase() === "svg", h = (c ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, p = n === "px", m = n === "%", f, d, g, _;
|
|
1724
1724
|
if (n === s || !r || ln[n] || ln[s])
|
|
1725
1725
|
return r;
|
|
1726
|
-
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM &&
|
|
1726
|
+
if (s !== "px" && !p && (r = a(e, t, i, "px")), _ = e.getCTM && wr(e), (m || s === "%") && (Se[t] || ~t.indexOf("adius")))
|
|
1727
1727
|
return f = _ ? e.getBBox()[l ? "width" : "height"] : e[h], V(m ? r / f * u : r / 100 * f);
|
|
1728
|
-
if (o[l ? "width" : "height"] = u + (p ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !c ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d ===
|
|
1728
|
+
if (o[l ? "width" : "height"] = u + (p ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !c ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === Me || !d.appendChild) && (d = Me.body), g = d._gsap, g && m && g.width && l && g.time === oe.time && !g.uncache)
|
|
1729
1729
|
return V(r / g.width * u);
|
|
1730
1730
|
if (m && (t === "height" || t === "width")) {
|
|
1731
1731
|
var y = e.style[t];
|
|
1732
1732
|
e.style[t] = u + n, f = e[h], y ? e.style[t] = y : Ke(e, t);
|
|
1733
1733
|
} else
|
|
1734
|
-
(m || s === "%") && !
|
|
1734
|
+
(m || s === "%") && !Zs[ge(d, "display")] && (o.position = ge(e, "position")), d === e && (o.position = "static"), d.appendChild(Ge), f = Ge[h], d.removeChild(Ge), o.position = "absolute";
|
|
1735
1735
|
return l && m && (g = He(d), g.time = oe.time, g.width = d[h]), V(p ? f * r / u : f && r ? u / f * r : 0);
|
|
1736
|
-
},
|
|
1736
|
+
}, Ce = function(e, t, i, n) {
|
|
1737
1737
|
var r;
|
|
1738
|
-
return zi || bi(), t in
|
|
1739
|
-
},
|
|
1738
|
+
return zi || bi(), t in be && t !== "transform" && (t = be[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : jt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ge(e, t) || Nn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? ke(e, t, r, i) + i : r;
|
|
1739
|
+
}, Ks = function(e, t, i, n) {
|
|
1740
1740
|
if (!i || i === "none") {
|
|
1741
1741
|
var r = ct(t, e, 1), s = r && ge(e, r, 1);
|
|
1742
1742
|
s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ge(e, "borderTopColor"));
|
|
1743
1743
|
}
|
|
1744
|
-
var o = new ie(this._pt, e.style, t, 0, 1,
|
|
1745
|
-
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n],
|
|
1744
|
+
var o = new ie(this._pt, e.style, t, 0, 1, fr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, v, b;
|
|
1745
|
+
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Ke(e, t)), h = [i, n], rr(h), i = h[0], n = h[1], p = i.match(Je) || [], b = n.match(Je) || [], b.length) {
|
|
1746
1746
|
for (; u = Je.exec(n); )
|
|
1747
|
-
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, v = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + v), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || v, l === n.length && (n += x, o.e += x)), v !== x && (m =
|
|
1747
|
+
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, v = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + v), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || v, l === n.length && (n += x, o.e += x)), v !== x && (m = ke(e, t, d, x) || 0), o._pt = {
|
|
1748
1748
|
_next: o._pt,
|
|
1749
1749
|
p: y || c === 1 ? y : ",",
|
|
1750
1750
|
//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.
|
|
@@ -1754,7 +1754,7 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1754
1754
|
});
|
|
1755
1755
|
o.c = l < n.length ? n.substring(l, n.length) : "";
|
|
1756
1756
|
} else
|
|
1757
|
-
o.r = t === "display" && n === "none" ?
|
|
1757
|
+
o.r = t === "display" && n === "none" ? yr : _r;
|
|
1758
1758
|
return On.test(n) && (o.e = 0), this._pt = o, o;
|
|
1759
1759
|
}, hn = {
|
|
1760
1760
|
top: "0%",
|
|
@@ -1762,7 +1762,7 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1762
1762
|
left: "0%",
|
|
1763
1763
|
right: "100%",
|
|
1764
1764
|
center: "50%"
|
|
1765
|
-
},
|
|
1765
|
+
}, Ws = function(e) {
|
|
1766
1766
|
var t = e.split(" "), i = t[0], n = t[1] || "50%";
|
|
1767
1767
|
return (i === "top" || i === "bottom" || n === "left" || n === "right") && (e = i, i = n, n = e), t[0] = hn[i] || i, t[1] = hn[n] || n, t.join(" ");
|
|
1768
1768
|
}, Xs = function(e, t) {
|
|
@@ -1772,8 +1772,8 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1772
1772
|
n.cssText = "", l = 1;
|
|
1773
1773
|
else
|
|
1774
1774
|
for (r = r.split(","), c = r.length; --c > -1; )
|
|
1775
|
-
o = r[c],
|
|
1776
|
-
l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none",
|
|
1775
|
+
o = r[c], Se[o] && (l = 1, o = o === "transformOrigin" ? ne : $), Ke(i, o);
|
|
1776
|
+
l && (Ke(i, $), s && (s.svg && i.removeAttribute("transform"), n.scale = n.rotate = n.translate = "none", St(i, 1), s.uncache = 1, xr(n)));
|
|
1777
1777
|
}
|
|
1778
1778
|
}, Ht = {
|
|
1779
1779
|
clearProps: function(e, t, i, n, r) {
|
|
@@ -1845,52 +1845,52 @@ var tn, Se, nt, zi, Ge, nn, Ni, Os = function() {
|
|
|
1845
1845
|
return 1;
|
|
1846
1846
|
}
|
|
1847
1847
|
*/
|
|
1848
|
-
}, At = [1, 0, 0, 1, 0, 0],
|
|
1848
|
+
}, At = [1, 0, 0, 1, 0, 0], Pr = {}, Cr = function(e) {
|
|
1849
1849
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
1850
1850
|
}, cn = function(e) {
|
|
1851
1851
|
var t = ge(e, $);
|
|
1852
|
-
return
|
|
1852
|
+
return Cr(t) ? At : t.substr(7).match(Ln).map(V);
|
|
1853
1853
|
}, Bi = function(e, t) {
|
|
1854
1854
|
var i = e._gsap || He(e), n = e.style, r = cn(e), s, o, l, c;
|
|
1855
1855
|
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? At : r) : (r === At && !e.offsetParent && e !== nt && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (c = 1, o = e.nextElementSibling, nt.appendChild(e)), r = cn(e), l ? n.display = l : Ke(e, "display"), c && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : nt.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
1856
1856
|
}, vi = function(e, t, i, n, r, s) {
|
|
1857
1857
|
var o = e._gsap, l = r || Bi(e, !0), c = o.xOrigin || 0, h = o.yOrigin || 0, u = o.xOffset || 0, p = o.yOffset || 0, m = l[0], f = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], x = t.split(" "), v = parseFloat(x[0]) || 0, b = parseFloat(x[1]) || 0, P, E, C, w;
|
|
1858
|
-
i ? l !== At && (E = m * g - f * d) && (C = v * (g / E) + b * (-d / E) + (d * y - g * _) / E, w = v * (-f / E) + b * (m / E) - (m * y - f * _) / E, v = C, b = w) : (P =
|
|
1859
|
-
},
|
|
1860
|
-
var i = e._gsap || new
|
|
1858
|
+
i ? l !== At && (E = m * g - f * d) && (C = v * (g / E) + b * (-d / E) + (d * y - g * _) / E, w = v * (-f / E) + b * (m / E) - (m * y - f * _) / E, v = C, b = w) : (P = Er(e), v = P.x + (~x[0].indexOf("%") ? v / 100 * P.width : v), b = P.y + (~(x[1] || x[0]).indexOf("%") ? b / 100 * P.height : b)), n || n !== !1 && o.smooth ? (_ = v - c, y = b - h, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = p + (_ * f + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = v, o.yOrigin = b, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[ne] = "0px 0px", s && (De(s, o, "xOrigin", c, v), De(s, o, "yOrigin", h, b), De(s, o, "xOffset", u, o.xOffset), De(s, o, "yOffset", p, o.yOffset)), e.setAttribute("data-svg-origin", v + " " + b);
|
|
1859
|
+
}, St = function(e, t) {
|
|
1860
|
+
var i = e._gsap || new lr(e);
|
|
1861
1861
|
if ("x" in i && !t && !i.uncache)
|
|
1862
1862
|
return i;
|
|
1863
|
-
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b, P, E, C, w, T,
|
|
1864
|
-
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM &&
|
|
1863
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), c = ge(e, ne) || "0", h, u, p, m, f, d, g, _, y, x, v, b, P, E, C, w, T, D, S, R, L, B, F, U, Q, ut, dt, pt, Fe, ji, we, ze;
|
|
1864
|
+
return h = u = p = d = g = _ = y = x = v = 0, m = f = 1, i.svg = !!(e.getCTM && wr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[$] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[$] !== "none" ? l[$] : "")), n.scale = n.rotate = n.translate = "none"), E = Bi(e, i.svg), i.svg && (i.uncache ? (Q = e.getBBox(), c = i.xOrigin - Q.x + "px " + (i.yOrigin - Q.y) + "px", U = "") : U = !t && e.getAttribute("data-svg-origin"), vi(e, U || c, !!U || i.originIsAbsolute, i.smooth !== !1, E)), b = i.xOrigin || 0, P = i.yOrigin || 0, E !== At && (D = E[0], S = E[1], R = E[2], L = E[3], h = B = E[4], u = F = E[5], E.length === 6 ? (m = Math.sqrt(D * D + S * S), f = Math.sqrt(L * L + R * R), d = D || S ? Xe(S, D) * Be : 0, y = R || L ? Xe(R, L) * Be + d : 0, y && (f *= Math.abs(Math.cos(y * rt))), i.svg && (h -= b - (b * D + P * R), u -= P - (b * S + P * L))) : (ze = E[6], ji = E[7], dt = E[8], pt = E[9], Fe = E[10], we = E[11], h = E[12], u = E[13], p = E[14], C = Xe(ze, Fe), g = C * Be, C && (w = Math.cos(-C), T = Math.sin(-C), U = B * w + dt * T, Q = F * w + pt * T, ut = ze * w + Fe * T, dt = B * -T + dt * w, pt = F * -T + pt * w, Fe = ze * -T + Fe * w, we = ji * -T + we * w, B = U, F = Q, ze = ut), C = Xe(-R, Fe), _ = C * Be, C && (w = Math.cos(-C), T = Math.sin(-C), U = D * w - dt * T, Q = S * w - pt * T, ut = R * w - Fe * T, we = L * T + we * w, D = U, S = Q, R = ut), C = Xe(S, D), d = C * Be, C && (w = Math.cos(C), T = Math.sin(C), U = D * w + S * T, Q = B * w + F * T, S = S * w - D * T, F = F * w - B * T, D = U, B = Q), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = V(Math.sqrt(D * D + S * S + R * R)), f = V(Math.sqrt(F * F + ze * ze)), C = Xe(B, F), y = Math.abs(C) > 2e-4 ? C * Be : 0, v = we ? 1 / (we < 0 ? -we : we) : 0), i.svg && (U = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Cr(ge(e, $)), U && e.setAttribute("transform", U))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (f *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = h - ((i.xPercent = h && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-h) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = p + s, i.scaleX = V(m), i.scaleY = V(f), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = v + s, (i.zOrigin = parseFloat(c.split(" ")[2]) || !t && i.zOrigin || 0) && (n[ne] = jt(c)), i.xOffset = i.yOffset = 0, i.force3D = he.force3D, i.renderTransform = i.svg ? Qs : vr ? Ar : qs, i.uncache = 0, i;
|
|
1865
1865
|
}, jt = function(e) {
|
|
1866
1866
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
1867
1867
|
}, ii = function(e, t, i) {
|
|
1868
|
-
var n =
|
|
1869
|
-
return V(parseFloat(t) + parseFloat(
|
|
1870
|
-
},
|
|
1871
|
-
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0,
|
|
1872
|
-
},
|
|
1868
|
+
var n = W(t);
|
|
1869
|
+
return V(parseFloat(t) + parseFloat(ke(e, "x", i + "px", n))) + n;
|
|
1870
|
+
}, qs = function(e, t) {
|
|
1871
|
+
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Ar(e, t);
|
|
1872
|
+
}, Ne = "0deg", ft = "0px", $e = ") ", Ar = function(e, t) {
|
|
1873
1873
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, c = i.rotation, h = i.rotationY, u = i.rotationX, p = i.skewX, m = i.skewY, f = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, x = i.zOrigin, v = "", b = _ === "auto" && e && e !== 1 || _ === !0;
|
|
1874
|
-
if (x && (u !==
|
|
1874
|
+
if (x && (u !== Ne || h !== Ne)) {
|
|
1875
1875
|
var P = parseFloat(h) * rt, E = Math.sin(P), C = Math.cos(P), w;
|
|
1876
1876
|
P = parseFloat(u) * rt, w = Math.cos(P), s = ii(y, s, E * w * -x), o = ii(y, o, -Math.sin(P) * -x), l = ii(y, l, C * w * -x + x);
|
|
1877
1877
|
}
|
|
1878
|
-
g !== ft && (v += "perspective(" + g +
|
|
1879
|
-
},
|
|
1878
|
+
g !== ft && (v += "perspective(" + g + $e), (n || r) && (v += "translate(" + n + "%, " + r + "%) "), (b || s !== ft || o !== ft || l !== ft) && (v += l !== ft || b ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), c !== Ne && (v += "rotate(" + c + $e), h !== Ne && (v += "rotateY(" + h + $e), u !== Ne && (v += "rotateX(" + u + $e), (p !== Ne || m !== Ne) && (v += "skew(" + p + ", " + m + $e), (f !== 1 || d !== 1) && (v += "scale(" + f + ", " + d + $e), y.style[$] = v || "translate(0, 0)";
|
|
1879
|
+
}, Qs = function(e, t) {
|
|
1880
1880
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), v = parseFloat(o), b, P, E, C, w;
|
|
1881
|
-
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), E *= w, C *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, P *= w)), b = V(b), P = V(P), E = V(E), C = V(C)) : (b = u, C = p, P = E = 0), (x && !~(s + "").indexOf("px") || v && !~(o + "").indexOf("px")) && (x =
|
|
1882
|
-
},
|
|
1883
|
-
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ?
|
|
1884
|
-
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * rn) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * rn) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c,
|
|
1881
|
+
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, b = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, w = Math.tan(c - h), w = Math.sqrt(1 + w * w), E *= w, C *= w, h && (w = Math.tan(h), w = Math.sqrt(1 + w * w), b *= w, P *= w)), b = V(b), P = V(P), E = V(E), C = V(C)) : (b = u, C = p, P = E = 0), (x && !~(s + "").indexOf("px") || v && !~(o + "").indexOf("px")) && (x = ke(m, "x", s, "px"), v = ke(m, "y", o, "px")), (f || d || g || _) && (x = V(x + f - (f * b + d * E) + g), v = V(v + d - (f * P + d * C) + _)), (n || r) && (w = m.getBBox(), x = V(x + n / 100 * w.width), v = V(v + r / 100 * w.height)), w = "matrix(" + b + "," + P + "," + E + "," + C + "," + x + "," + v + ")", m.setAttribute("transform", w), y && (m.style[$] = w);
|
|
1882
|
+
}, Js = function(e, t, i, n, r) {
|
|
1883
|
+
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Be : 1), c = l - n, h = n + c + "deg", u, p;
|
|
1884
|
+
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * rn) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * rn) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Us), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
1885
1885
|
}, un = function(e, t) {
|
|
1886
1886
|
for (var i in t)
|
|
1887
1887
|
e[i] = t[i];
|
|
1888
1888
|
return e;
|
|
1889
|
-
},
|
|
1889
|
+
}, ea = function(e, t, i) {
|
|
1890
1890
|
var n = un({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, c, h, u, p, m, f;
|
|
1891
|
-
n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[$] = t, o =
|
|
1892
|
-
for (l in
|
|
1893
|
-
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m =
|
|
1891
|
+
n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[$] = t, o = St(i, 1), Ke(i, $), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[$], s[$] = t, o = St(i, 1), s[$] = c);
|
|
1892
|
+
for (l in Se)
|
|
1893
|
+
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m = W(c), f = W(h), u = m !== f ? ke(i, l, c, f) : parseFloat(c), p = parseFloat(h), e._pt = new ie(e._pt, o, l, u, p - u, yi), e._pt.u = f || 0, e._props.push(l));
|
|
1894
1894
|
un(o, n);
|
|
1895
1895
|
};
|
|
1896
1896
|
te("padding,margin,Width,Radius", function(a, e) {
|
|
@@ -1901,14 +1901,14 @@ te("padding,margin,Width,Radius", function(a, e) {
|
|
|
1901
1901
|
var p, m;
|
|
1902
1902
|
if (arguments.length < 4)
|
|
1903
1903
|
return p = s.map(function(f) {
|
|
1904
|
-
return
|
|
1904
|
+
return Ce(o, f, c);
|
|
1905
1905
|
}), m = p.join(" "), m.split(p[0]).length === 5 ? p[0] : m;
|
|
1906
1906
|
p = (h + "").split(" "), m = {}, s.forEach(function(f, d) {
|
|
1907
1907
|
return m[f] = p[d] = p[d] || p[(d - 1) / 2 | 0];
|
|
1908
1908
|
}), o.init(l, m, u);
|
|
1909
1909
|
};
|
|
1910
1910
|
});
|
|
1911
|
-
var
|
|
1911
|
+
var Sr = {
|
|
1912
1912
|
name: "css",
|
|
1913
1913
|
register: bi,
|
|
1914
1914
|
targetTest: function(e) {
|
|
@@ -1916,25 +1916,25 @@ var Ar = {
|
|
|
1916
1916
|
},
|
|
1917
1917
|
init: function(e, t, i, n, r) {
|
|
1918
1918
|
var s = this._props, o = e.style, l = i.vars.startAt, c, h, u, p, m, f, d, g, _, y, x, v, b, P, E, C;
|
|
1919
|
-
zi || bi(), this.styles = this.styles ||
|
|
1919
|
+
zi || bi(), this.styles = this.styles || br(e), C = this.styles.props, this.tween = i;
|
|
1920
1920
|
for (d in t)
|
|
1921
|
-
if (d !== "autoRound" && (h = t[d], !(ae[d] &&
|
|
1921
|
+
if (d !== "autoRound" && (h = t[d], !(ae[d] && hr(d, t, i, n, e, r)))) {
|
|
1922
1922
|
if (m = typeof h, f = Ht[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
|
|
1923
1923
|
f(this, e, d, h, i) && (E = 1);
|
|
1924
1924
|
else if (d.substr(0, 2) === "--")
|
|
1925
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g =
|
|
1925
|
+
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = W(c), _ = W(h)), _ ? g !== _ && (c = ke(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
|
|
1926
1926
|
else if (m !== "undefined") {
|
|
1927
|
-
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)),
|
|
1928
|
-
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform ||
|
|
1927
|
+
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), W(c + "") || c === "auto" || (c += he.units[d] || W(Ce(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Ce(e, d))) : c = Ce(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in be && (d === "autoAlpha" && (p === 1 && Ce(e, "visibility") === "hidden" && u && (p = 0), C.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = be[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Se, x) {
|
|
1928
|
+
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), v || (b = e._gsap, b.renderTransform && !t.parseTransform || St(e, t.parseTransform), P = t.smoothOrigin !== !1 && b.smooth, v = this._pt = new ie(this._pt, o, $, 0, 1, b.renderTransform, b, 0, -1), v.dep = 1), d === "scale")
|
|
1929
1929
|
this._pt = new ie(this._pt, b, "scaleY", b.scaleY, (y ? it(b.scaleY, y + u) : u) - b.scaleY || 0, yi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
1930
1930
|
else if (d === "transformOrigin") {
|
|
1931
|
-
C.push(ne, 0, o[ne]), h =
|
|
1931
|
+
C.push(ne, 0, o[ne]), h = Ws(h), b.svg ? vi(e, h, 0, P, 0, this) : (_ = parseFloat(h.split(" ")[2]) || 0, _ !== b.zOrigin && De(this, b, "zOrigin", b.zOrigin, _), De(this, o, d, jt(c), jt(h)));
|
|
1932
1932
|
continue;
|
|
1933
1933
|
} else if (d === "svgOrigin") {
|
|
1934
1934
|
vi(e, h, 1, P, 0, this);
|
|
1935
1935
|
continue;
|
|
1936
|
-
} else if (d in
|
|
1937
|
-
|
|
1936
|
+
} else if (d in Pr) {
|
|
1937
|
+
Js(this, b, d, p, y ? it(p, y + h) : h);
|
|
1938
1938
|
continue;
|
|
1939
1939
|
} else if (d === "smoothOrigin") {
|
|
1940
1940
|
De(this, b, "smooth", b.smooth, h);
|
|
@@ -1943,24 +1943,24 @@ var Ar = {
|
|
|
1943
1943
|
b[d] = h;
|
|
1944
1944
|
continue;
|
|
1945
1945
|
} else if (d === "transform") {
|
|
1946
|
-
|
|
1946
|
+
ea(this, h, e);
|
|
1947
1947
|
continue;
|
|
1948
1948
|
}
|
|
1949
1949
|
} else d in o || (d = ct(d) || d);
|
|
1950
|
-
if (x || (u || u === 0) && (p || p === 0) && !
|
|
1951
|
-
g = (c + "").substr((p + "").length), u || (u = 0), _ =
|
|
1950
|
+
if (x || (u || u === 0) && (p || p === 0) && !ks.test(h) && d in o)
|
|
1951
|
+
g = (c + "").substr((p + "").length), u || (u = 0), _ = W(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = ke(e, d, c, _)), this._pt = new ie(this._pt, x ? b : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? zs : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Fs);
|
|
1952
1952
|
else if (d in o)
|
|
1953
|
-
|
|
1953
|
+
Ks.call(this, e, d, c, y ? y + h : h);
|
|
1954
1954
|
else if (d in e)
|
|
1955
1955
|
this.add(e, d, c || e[d], y ? y + h : h, n, r);
|
|
1956
1956
|
else if (d !== "parseTransform") {
|
|
1957
|
-
|
|
1957
|
+
Ti(d, h);
|
|
1958
1958
|
continue;
|
|
1959
1959
|
}
|
|
1960
1960
|
x || (d in o ? C.push(d, 0, o[d]) : typeof e[d] == "function" ? C.push(d, 2, e[d]()) : C.push(d, 1, c || e[d])), s.push(d);
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
E &&
|
|
1963
|
+
E && mr(this);
|
|
1964
1964
|
},
|
|
1965
1965
|
render: function(e, t) {
|
|
1966
1966
|
if (t.tween._time || !Ni())
|
|
@@ -1969,11 +1969,11 @@ var Ar = {
|
|
|
1969
1969
|
else
|
|
1970
1970
|
t.styles.revert();
|
|
1971
1971
|
},
|
|
1972
|
-
get:
|
|
1973
|
-
aliases:
|
|
1972
|
+
get: Ce,
|
|
1973
|
+
aliases: be,
|
|
1974
1974
|
getSetter: function(e, t, i) {
|
|
1975
|
-
var n =
|
|
1976
|
-
return n && n.indexOf(",") < 0 && (t = n), t in
|
|
1975
|
+
var n = be[t];
|
|
1976
|
+
return n && n.indexOf(",") < 0 && (t = n), t in Se && t !== ne && (e._gsap.x || Ce(e, "x")) ? i && nn === i ? t === "scale" ? Gs : Bs : (nn = i || {}) && (t === "scale" ? Vs : Hs) : e.style && !Ci(e.style[t]) ? Ns : ~t.indexOf("-") ? $s : Ui(e, t);
|
|
1977
1977
|
},
|
|
1978
1978
|
core: {
|
|
1979
1979
|
_removeProperty: Ke,
|
|
@@ -1981,27 +1981,27 @@ var Ar = {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
};
|
|
1983
1983
|
re.utils.checkPrefix = ct;
|
|
1984
|
-
re.core.getStyleSaver =
|
|
1984
|
+
re.core.getStyleSaver = br;
|
|
1985
1985
|
(function(a, e, t, i) {
|
|
1986
1986
|
var n = te(a + "," + e + "," + t, function(r) {
|
|
1987
|
-
|
|
1987
|
+
Se[r] = 1;
|
|
1988
1988
|
});
|
|
1989
1989
|
te(e, function(r) {
|
|
1990
|
-
he.units[r] = "deg",
|
|
1991
|
-
}),
|
|
1990
|
+
he.units[r] = "deg", Pr[r] = 1;
|
|
1991
|
+
}), be[n[13]] = a + "," + e, te(i, function(r) {
|
|
1992
1992
|
var s = r.split(":");
|
|
1993
|
-
|
|
1993
|
+
be[s[1]] = n[s[0]];
|
|
1994
1994
|
});
|
|
1995
1995
|
})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
|
|
1996
1996
|
te("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(a) {
|
|
1997
1997
|
he.units[a] = "px";
|
|
1998
1998
|
});
|
|
1999
|
-
re.registerPlugin(
|
|
2000
|
-
var _t = re.registerPlugin(
|
|
1999
|
+
re.registerPlugin(Sr);
|
|
2000
|
+
var _t = re.registerPlugin(Sr) || re;
|
|
2001
2001
|
_t.core.Tween;
|
|
2002
|
-
class
|
|
2002
|
+
class ve {
|
|
2003
2003
|
constructor(e, t, i, n, r = "div") {
|
|
2004
|
-
this.parent = e, this.object = t, this.property = i, this._disabled = !1, this._hidden = !1, this.initialValue = this.getValue(), this.domElement = document.createElement(r), this.domElement.classList.add("lil-controller"), this.domElement.classList.add(n), this.$name = document.createElement("div"), this.$name.classList.add("lil-name"),
|
|
2004
|
+
this.parent = e, this.object = t, this.property = i, this._disabled = !1, this._hidden = !1, this.initialValue = this.getValue(), this.domElement = document.createElement(r), this.domElement.classList.add("lil-controller"), this.domElement.classList.add(n), this.$name = document.createElement("div"), this.$name.classList.add("lil-name"), ve.nextNameID = ve.nextNameID || 0, this.$name.id = `lil-gui-name-${++ve.nextNameID}`, this.$widget = document.createElement("div"), this.$widget.classList.add("lil-widget"), this.$disable = this.$widget, this.domElement.appendChild(this.$name), this.domElement.appendChild(this.$widget), this.domElement.addEventListener("keydown", (s) => s.stopPropagation()), this.domElement.addEventListener("keyup", (s) => s.stopPropagation()), this.parent.children.push(this), this.parent.controllers.push(this), this.parent.$children.appendChild(this.domElement), this._listenCallback = this._listenCallback.bind(this), this.name(i);
|
|
2005
2005
|
}
|
|
2006
2006
|
/**
|
|
2007
2007
|
* Sets the name of the controller and its label in the GUI.
|
|
@@ -2225,7 +2225,7 @@ class be {
|
|
|
2225
2225
|
this.listen(!1), this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
|
-
class
|
|
2228
|
+
class ta extends ve {
|
|
2229
2229
|
constructor(e, t, i) {
|
|
2230
2230
|
super(e, t, i, "lil-boolean", "label"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "checkbox"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$input.addEventListener("change", () => {
|
|
2231
2231
|
this.setValue(this.$input.checked), this._callOnFinishChange();
|
|
@@ -2239,47 +2239,47 @@ function Ei(a) {
|
|
|
2239
2239
|
let e, t;
|
|
2240
2240
|
return (e = a.match(/(#|0x)?([a-f0-9]{6})/i)) ? t = e[2] : (e = a.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 = a.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;
|
|
2241
2241
|
}
|
|
2242
|
-
const
|
|
2242
|
+
const ia = {
|
|
2243
2243
|
isPrimitive: !0,
|
|
2244
2244
|
match: (a) => typeof a == "string",
|
|
2245
2245
|
fromHexString: Ei,
|
|
2246
2246
|
toHexString: Ei
|
|
2247
|
-
},
|
|
2247
|
+
}, Tt = {
|
|
2248
2248
|
isPrimitive: !0,
|
|
2249
2249
|
match: (a) => typeof a == "number",
|
|
2250
2250
|
fromHexString: (a) => parseInt(a.substring(1), 16),
|
|
2251
2251
|
toHexString: (a) => "#" + a.toString(16).padStart(6, 0)
|
|
2252
|
-
},
|
|
2252
|
+
}, na = {
|
|
2253
2253
|
isPrimitive: !1,
|
|
2254
2254
|
match: (a) => Array.isArray(a) || ArrayBuffer.isView(a),
|
|
2255
2255
|
fromHexString(a, e, t = 1) {
|
|
2256
|
-
const i =
|
|
2256
|
+
const i = Tt.fromHexString(a);
|
|
2257
2257
|
e[0] = (i >> 16 & 255) / 255 * t, e[1] = (i >> 8 & 255) / 255 * t, e[2] = (i & 255) / 255 * t;
|
|
2258
2258
|
},
|
|
2259
2259
|
toHexString([a, e, t], i = 1) {
|
|
2260
2260
|
i = 255 / i;
|
|
2261
2261
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2262
|
-
return
|
|
2262
|
+
return Tt.toHexString(n);
|
|
2263
2263
|
}
|
|
2264
|
-
},
|
|
2264
|
+
}, ra = {
|
|
2265
2265
|
isPrimitive: !1,
|
|
2266
2266
|
match: (a) => Object(a) === a,
|
|
2267
2267
|
fromHexString(a, e, t = 1) {
|
|
2268
|
-
const i =
|
|
2268
|
+
const i = Tt.fromHexString(a);
|
|
2269
2269
|
e.r = (i >> 16 & 255) / 255 * t, e.g = (i >> 8 & 255) / 255 * t, e.b = (i & 255) / 255 * t;
|
|
2270
2270
|
},
|
|
2271
2271
|
toHexString({ r: a, g: e, b: t }, i = 1) {
|
|
2272
2272
|
i = 255 / i;
|
|
2273
2273
|
const n = a * i << 16 ^ e * i << 8 ^ t * i << 0;
|
|
2274
|
-
return
|
|
2274
|
+
return Tt.toHexString(n);
|
|
2275
2275
|
}
|
|
2276
|
-
},
|
|
2277
|
-
function
|
|
2278
|
-
return
|
|
2276
|
+
}, sa = [ia, Tt, na, ra];
|
|
2277
|
+
function aa(a) {
|
|
2278
|
+
return sa.find((e) => e.match(a));
|
|
2279
2279
|
}
|
|
2280
|
-
class
|
|
2280
|
+
class oa extends ve {
|
|
2281
2281
|
constructor(e, t, i, n) {
|
|
2282
|
-
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format =
|
|
2282
|
+
super(e, t, i, "lil-color"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "color"), this.$input.setAttribute("tabindex", -1), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$text = document.createElement("input"), this.$text.setAttribute("type", "text"), this.$text.setAttribute("spellcheck", "false"), this.$text.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$display.appendChild(this.$input), this.$widget.appendChild(this.$display), this.$widget.appendChild(this.$text), this._format = aa(this.initialValue), this._rgbScale = n, this._initialValueHexString = this.save(), this._textFocused = !1, this.$input.addEventListener("input", () => {
|
|
2283
2283
|
this._setValueFromHexString(this.$input.value);
|
|
2284
2284
|
}), this.$input.addEventListener("blur", () => {
|
|
2285
2285
|
this._callOnFinishChange();
|
|
@@ -2312,7 +2312,7 @@ class aa extends be {
|
|
|
2312
2312
|
return this.$input.value = this._format.toHexString(this.getValue(), this._rgbScale), this._textFocused || (this.$text.value = this.$input.value.substring(1)), this.$display.style.backgroundColor = this.$input.value, this;
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
|
-
class ni extends
|
|
2315
|
+
class ni extends ve {
|
|
2316
2316
|
constructor(e, t, i) {
|
|
2317
2317
|
super(e, t, i, "lil-function"), this.$button = document.createElement("button"), this.$button.appendChild(this.$name), this.$widget.appendChild(this.$button), this.$button.addEventListener("click", (n) => {
|
|
2318
2318
|
n.preventDefault(), this.getValue().call(this.object), this._callOnChange();
|
|
@@ -2320,7 +2320,7 @@ class ni extends be {
|
|
|
2320
2320
|
}, { passive: !0 }), this.$disable = this.$button;
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
|
-
class
|
|
2323
|
+
class la extends ve {
|
|
2324
2324
|
constructor(e, t, i, n, r, s) {
|
|
2325
2325
|
super(e, t, i, "lil-number"), this._initInput(), this.min(n), this.max(r);
|
|
2326
2326
|
const o = s !== void 0;
|
|
@@ -2455,7 +2455,7 @@ class oa extends be {
|
|
|
2455
2455
|
return this._max !== void 0;
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
|
-
class
|
|
2458
|
+
class ha extends ve {
|
|
2459
2459
|
constructor(e, t, i, n) {
|
|
2460
2460
|
super(e, t, i, "lil-option"), this.$select = document.createElement("select"), this.$select.setAttribute("aria-labelledby", this.$name.id), this.$display = document.createElement("div"), this.$display.classList.add("lil-display"), this.$select.addEventListener("change", () => {
|
|
2461
2461
|
this.setValue(this._values[this.$select.selectedIndex]), this._callOnFinishChange();
|
|
@@ -2476,7 +2476,7 @@ class la extends be {
|
|
|
2476
2476
|
return this.$select.selectedIndex = t, this.$display.textContent = t === -1 ? e : this._names[t], this;
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
|
-
class
|
|
2479
|
+
class ca extends ve {
|
|
2480
2480
|
constructor(e, t, i) {
|
|
2481
2481
|
super(e, t, i, "lil-string"), this.$input = document.createElement("input"), this.$input.setAttribute("type", "text"), this.$input.setAttribute("spellcheck", "false"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$input.addEventListener("input", () => {
|
|
2482
2482
|
this.setValue(this.$input.value);
|
|
@@ -2490,7 +2490,7 @@ class ha extends be {
|
|
|
2490
2490
|
return this.$input.value = this.getValue(), this;
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
|
-
var
|
|
2493
|
+
var ua = `.lil-gui {
|
|
2494
2494
|
font-family: var(--font-family);
|
|
2495
2495
|
font-size: var(--font-size);
|
|
2496
2496
|
line-height: 1;
|
|
@@ -2912,7 +2912,7 @@ var ca = `.lil-gui {
|
|
|
2912
2912
|
font-family: "lil-gui";
|
|
2913
2913
|
src: url("data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAALkAAsAAAAABtQAAAKVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDMgqBBIEbATYCJAMUCwwABCAFhAoHgQQbHAbIDiUFEYVARAAAYQTVWNmz9MxhEgodq49wYRUFKE8GWNiUBxI2LBRaVnc51U83Gmhs0Q7JXWMiz5eteLwrKwuxHO8VFxUX9UpZBs6pa5ABRwHA+t3UxUnH20EvVknRerzQgX6xC/GH6ZUvTcAjAv122dF28OTqCXrPuyaDER30YBA1xnkVutDDo4oCi71Ca7rrV9xS8dZHbPHefsuwIyCpmT7j+MnjAH5X3984UZoFFuJ0yiZ4XEJFxjagEBeqs+e1iyK8Xf/nOuwF+vVK0ur765+vf7txotUi0m3N0m/84RGSrBCNrh8Ee5GjODjF4gnWP+dJrH/Lk9k4oT6d+gr6g/wssA2j64JJGP6cmx554vUZnpZfn6ZfX2bMwPPrlANsB86/DiHjhl0OP+c87+gaJo/gY084s3HoYL/ZkWHTRfBXvvoHnnkHvngKun4KBE/ede7tvq3/vQOxDXB1/fdNz6XbPdcr0Vhpojj9dG+owuSKFsslCi1tgEjirjXdwMiov2EioadxmqTHUCIwo8NgQaeIasAi0fTYSPTbSmwbMOFduyh9wvBrESGY0MtgRjtgQR8Q1bRPohn2UoCRZf9wyYANMXFeJTysqAe0I4mrherOekFdKMrYvJjLvOIUM9SuwYB5DVZUwwVjJJOaUnZCmcEkIZZrKqNvRGRMvmFZsmhP4VMKCSXBhSqUBxgMS7h0cZvEd71AWkEhGWaeMFcNnpqyJkyXgYL7PQ1MoSq0wDAkRtJIijkZSmqYTiSImfLiSWXIZwhRh3Rug2X0kk1Dgj+Iu43u5p98ghopcpSo0Uyc8SnjlYX59WUeaMoDqmVD2TOWD9a4pCRAzf2ECgwGcrHjPOWY9bNxq/OL3I/QjwEAAAA=") format("woff2");
|
|
2914
2914
|
}`;
|
|
2915
|
-
function
|
|
2915
|
+
function da(a) {
|
|
2916
2916
|
const e = document.createElement("style");
|
|
2917
2917
|
e.innerHTML = a;
|
|
2918
2918
|
const t = document.querySelector("head link[rel=stylesheet], head style");
|
|
@@ -2968,7 +2968,7 @@ class Gi {
|
|
|
2968
2968
|
this.parent.children.push(this), this.parent.folders.push(this), this.parent.$children.appendChild(this.domElement);
|
|
2969
2969
|
return;
|
|
2970
2970
|
}
|
|
2971
|
-
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !dn && o && (ua
|
|
2971
|
+
this.domElement.classList.add("lil-root"), l && this.domElement.classList.add("lil-allow-touch-styles"), !dn && o && (da(ua), dn = !0), i ? i.appendChild(this.domElement) : t && (this.domElement.classList.add("lil-auto-place", "autoPlace"), document.body.appendChild(this.domElement)), n && this.domElement.style.setProperty("--width", n + "px"), this._closeFolders = s;
|
|
2972
2972
|
}
|
|
2973
2973
|
/**
|
|
2974
2974
|
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
|
@@ -2987,15 +2987,15 @@ class Gi {
|
|
|
2987
2987
|
*/
|
|
2988
2988
|
add(e, t, i, n, r) {
|
|
2989
2989
|
if (Object(i) === i)
|
|
2990
|
-
return new
|
|
2990
|
+
return new ha(this, e, t, i);
|
|
2991
2991
|
const s = e[t];
|
|
2992
2992
|
switch (typeof s) {
|
|
2993
2993
|
case "number":
|
|
2994
|
-
return new
|
|
2994
|
+
return new la(this, e, t, i, n, r);
|
|
2995
2995
|
case "boolean":
|
|
2996
|
-
return new
|
|
2996
|
+
return new ta(this, e, t);
|
|
2997
2997
|
case "string":
|
|
2998
|
-
return new
|
|
2998
|
+
return new ca(this, e, t);
|
|
2999
2999
|
case "function":
|
|
3000
3000
|
return new ni(this, e, t);
|
|
3001
3001
|
}
|
|
@@ -3024,7 +3024,7 @@ class Gi {
|
|
|
3024
3024
|
* @returns {Controller}
|
|
3025
3025
|
*/
|
|
3026
3026
|
addColor(e, t, i = 1) {
|
|
3027
|
-
return new
|
|
3027
|
+
return new oa(this, e, t, i);
|
|
3028
3028
|
}
|
|
3029
3029
|
/**
|
|
3030
3030
|
* Adds a folder to the GUI, which is just another GUI. This method returns
|
|
@@ -3251,7 +3251,7 @@ class Gi {
|
|
|
3251
3251
|
}), e;
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
|
-
const pn = { type: "change" }, Vi = { type: "start" }, Tr = { type: "end" }, Rt = new
|
|
3254
|
+
const pn = { type: "change" }, Vi = { type: "start" }, Tr = { type: "end" }, Rt = new Fr(), fn = new zr(), pa = Math.cos(70 * Nr.DEG2RAD), Y = new se(), J = 2 * Math.PI, O = {
|
|
3255
3255
|
NONE: -1,
|
|
3256
3256
|
ROTATE: 0,
|
|
3257
3257
|
DOLLY: 1,
|
|
@@ -3261,7 +3261,7 @@ const pn = { type: "change" }, Vi = { type: "start" }, Tr = { type: "end" }, Rt
|
|
|
3261
3261
|
TOUCH_DOLLY_PAN: 5,
|
|
3262
3262
|
TOUCH_DOLLY_ROTATE: 6
|
|
3263
3263
|
}, ri = 1e-6;
|
|
3264
|
-
class
|
|
3264
|
+
class fa extends Ur {
|
|
3265
3265
|
/**
|
|
3266
3266
|
* Constructs a new controls instance.
|
|
3267
3267
|
*
|
|
@@ -3269,7 +3269,7 @@ class pa extends kr {
|
|
|
3269
3269
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
3270
3270
|
*/
|
|
3271
3271
|
constructor(e, t = null) {
|
|
3272
|
-
super(e, t), this.state =
|
|
3272
|
+
super(e, t), this.state = O.NONE, this.target = new se(), this.cursor = new se(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: Qe.ROTATE, TWO: Qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new se(), this._lastQuaternion = new Yi(), this._lastTargetPosition = new se(), this._quat = new Yi().setFromUnitVectors(e.up, new se(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Zi(), this._sphericalDelta = new Zi(), this._scale = 1, this._panOffset = new se(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new se(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ga.bind(this), this._onPointerDown = ma.bind(this), this._onPointerUp = _a.bind(this), this._onContextMenu = Pa.bind(this), this._onMouseWheel = ba.bind(this), this._onKeyDown = va.bind(this), this._onTouchStart = Ea.bind(this), this._onTouchMove = wa.bind(this), this._onMouseDown = ya.bind(this), this._onMouseMove = xa.bind(this), this._interceptControlDown = Ca.bind(this), this._interceptControlUp = Aa.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
3273
3273
|
}
|
|
3274
3274
|
connect(e) {
|
|
3275
3275
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -3330,11 +3330,11 @@ class pa extends kr {
|
|
|
3330
3330
|
* was called, or the initial state.
|
|
3331
3331
|
*/
|
|
3332
3332
|
reset() {
|
|
3333
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(pn), this.update(), this.state =
|
|
3333
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(pn), this.update(), this.state = O.NONE;
|
|
3334
3334
|
}
|
|
3335
3335
|
update(e = null) {
|
|
3336
3336
|
const t = this.object.position;
|
|
3337
|
-
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state ===
|
|
3337
|
+
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === O.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
3338
3338
|
let i = this.minAzimuthAngle, n = this.maxAzimuthAngle;
|
|
3339
3339
|
isFinite(i) && isFinite(n) && (i < -Math.PI ? i += J : i > Math.PI && (i -= J), n < -Math.PI ? n += J : n > Math.PI && (n -= J), i <= n ? this._spherical.theta = Math.max(i, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + n) / 2 ? Math.max(i, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
3340
3340
|
let r = !1;
|
|
@@ -3360,7 +3360,7 @@ class pa extends kr {
|
|
|
3360
3360
|
c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), s = Y.length();
|
|
3361
3361
|
} else
|
|
3362
3362
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
3363
|
-
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Rt.origin.copy(this.object.position), Rt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Rt.direction)) <
|
|
3363
|
+
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Rt.origin.copy(this.object.position), Rt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Rt.direction)) < pa ? this.object.lookAt(this.target) : (fn.setFromNormalAndCoplanarPoint(this.object.up, this.target), Rt.intersectPlane(fn, this.target))));
|
|
3364
3364
|
} else if (this.object.isOrthographicCamera) {
|
|
3365
3365
|
const s = this.object.zoom;
|
|
3366
3366
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
|
@@ -3557,16 +3557,16 @@ class pa extends kr {
|
|
|
3557
3557
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
|
3558
3558
|
}
|
|
3559
3559
|
}
|
|
3560
|
-
function
|
|
3560
|
+
function ma(a) {
|
|
3561
3561
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
|
|
3562
3562
|
}
|
|
3563
|
-
function
|
|
3563
|
+
function ga(a) {
|
|
3564
3564
|
this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
|
|
3565
3565
|
}
|
|
3566
|
-
function
|
|
3566
|
+
function _a(a) {
|
|
3567
3567
|
switch (this._removePointer(a), this._pointers.length) {
|
|
3568
3568
|
case 0:
|
|
3569
|
-
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tr), this.state =
|
|
3569
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tr), this.state = O.NONE;
|
|
3570
3570
|
break;
|
|
3571
3571
|
case 1:
|
|
3572
3572
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -3574,7 +3574,7 @@ function ga(a) {
|
|
|
3574
3574
|
break;
|
|
3575
3575
|
}
|
|
3576
3576
|
}
|
|
3577
|
-
function
|
|
3577
|
+
function ya(a) {
|
|
3578
3578
|
let e;
|
|
3579
3579
|
switch (a.button) {
|
|
3580
3580
|
case 0:
|
|
@@ -3592,124 +3592,124 @@ function _a(a) {
|
|
|
3592
3592
|
switch (e) {
|
|
3593
3593
|
case tt.DOLLY:
|
|
3594
3594
|
if (this.enableZoom === !1) return;
|
|
3595
|
-
this._handleMouseDownDolly(a), this.state =
|
|
3595
|
+
this._handleMouseDownDolly(a), this.state = O.DOLLY;
|
|
3596
3596
|
break;
|
|
3597
3597
|
case tt.ROTATE:
|
|
3598
3598
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
3599
3599
|
if (this.enablePan === !1) return;
|
|
3600
|
-
this._handleMouseDownPan(a), this.state =
|
|
3600
|
+
this._handleMouseDownPan(a), this.state = O.PAN;
|
|
3601
3601
|
} else {
|
|
3602
3602
|
if (this.enableRotate === !1) return;
|
|
3603
|
-
this._handleMouseDownRotate(a), this.state =
|
|
3603
|
+
this._handleMouseDownRotate(a), this.state = O.ROTATE;
|
|
3604
3604
|
}
|
|
3605
3605
|
break;
|
|
3606
3606
|
case tt.PAN:
|
|
3607
3607
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
3608
3608
|
if (this.enableRotate === !1) return;
|
|
3609
|
-
this._handleMouseDownRotate(a), this.state =
|
|
3609
|
+
this._handleMouseDownRotate(a), this.state = O.ROTATE;
|
|
3610
3610
|
} else {
|
|
3611
3611
|
if (this.enablePan === !1) return;
|
|
3612
|
-
this._handleMouseDownPan(a), this.state =
|
|
3612
|
+
this._handleMouseDownPan(a), this.state = O.PAN;
|
|
3613
3613
|
}
|
|
3614
3614
|
break;
|
|
3615
3615
|
default:
|
|
3616
|
-
this.state =
|
|
3616
|
+
this.state = O.NONE;
|
|
3617
3617
|
}
|
|
3618
|
-
this.state !==
|
|
3618
|
+
this.state !== O.NONE && this.dispatchEvent(Vi);
|
|
3619
3619
|
}
|
|
3620
|
-
function
|
|
3620
|
+
function xa(a) {
|
|
3621
3621
|
switch (this.state) {
|
|
3622
|
-
case
|
|
3622
|
+
case O.ROTATE:
|
|
3623
3623
|
if (this.enableRotate === !1) return;
|
|
3624
3624
|
this._handleMouseMoveRotate(a);
|
|
3625
3625
|
break;
|
|
3626
|
-
case
|
|
3626
|
+
case O.DOLLY:
|
|
3627
3627
|
if (this.enableZoom === !1) return;
|
|
3628
3628
|
this._handleMouseMoveDolly(a);
|
|
3629
3629
|
break;
|
|
3630
|
-
case
|
|
3630
|
+
case O.PAN:
|
|
3631
3631
|
if (this.enablePan === !1) return;
|
|
3632
3632
|
this._handleMouseMovePan(a);
|
|
3633
3633
|
break;
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
|
-
function xa(a) {
|
|
3637
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(Vi), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tr));
|
|
3638
|
-
}
|
|
3639
3636
|
function ba(a) {
|
|
3640
|
-
this.enabled
|
|
3637
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== O.NONE || (a.preventDefault(), this.dispatchEvent(Vi), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Tr));
|
|
3641
3638
|
}
|
|
3642
3639
|
function va(a) {
|
|
3640
|
+
this.enabled !== !1 && this._handleKeyDown(a);
|
|
3641
|
+
}
|
|
3642
|
+
function Ea(a) {
|
|
3643
3643
|
switch (this._trackPointer(a), this._pointers.length) {
|
|
3644
3644
|
case 1:
|
|
3645
3645
|
switch (this.touches.ONE) {
|
|
3646
3646
|
case Qe.ROTATE:
|
|
3647
3647
|
if (this.enableRotate === !1) return;
|
|
3648
|
-
this._handleTouchStartRotate(a), this.state =
|
|
3648
|
+
this._handleTouchStartRotate(a), this.state = O.TOUCH_ROTATE;
|
|
3649
3649
|
break;
|
|
3650
3650
|
case Qe.PAN:
|
|
3651
3651
|
if (this.enablePan === !1) return;
|
|
3652
|
-
this._handleTouchStartPan(a), this.state =
|
|
3652
|
+
this._handleTouchStartPan(a), this.state = O.TOUCH_PAN;
|
|
3653
3653
|
break;
|
|
3654
3654
|
default:
|
|
3655
|
-
this.state =
|
|
3655
|
+
this.state = O.NONE;
|
|
3656
3656
|
}
|
|
3657
3657
|
break;
|
|
3658
3658
|
case 2:
|
|
3659
3659
|
switch (this.touches.TWO) {
|
|
3660
3660
|
case Qe.DOLLY_PAN:
|
|
3661
3661
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
3662
|
-
this._handleTouchStartDollyPan(a), this.state =
|
|
3662
|
+
this._handleTouchStartDollyPan(a), this.state = O.TOUCH_DOLLY_PAN;
|
|
3663
3663
|
break;
|
|
3664
3664
|
case Qe.DOLLY_ROTATE:
|
|
3665
3665
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
3666
|
-
this._handleTouchStartDollyRotate(a), this.state =
|
|
3666
|
+
this._handleTouchStartDollyRotate(a), this.state = O.TOUCH_DOLLY_ROTATE;
|
|
3667
3667
|
break;
|
|
3668
3668
|
default:
|
|
3669
|
-
this.state =
|
|
3669
|
+
this.state = O.NONE;
|
|
3670
3670
|
}
|
|
3671
3671
|
break;
|
|
3672
3672
|
default:
|
|
3673
|
-
this.state =
|
|
3673
|
+
this.state = O.NONE;
|
|
3674
3674
|
}
|
|
3675
|
-
this.state !==
|
|
3675
|
+
this.state !== O.NONE && this.dispatchEvent(Vi);
|
|
3676
3676
|
}
|
|
3677
|
-
function
|
|
3677
|
+
function wa(a) {
|
|
3678
3678
|
switch (this._trackPointer(a), this.state) {
|
|
3679
|
-
case
|
|
3679
|
+
case O.TOUCH_ROTATE:
|
|
3680
3680
|
if (this.enableRotate === !1) return;
|
|
3681
3681
|
this._handleTouchMoveRotate(a), this.update();
|
|
3682
3682
|
break;
|
|
3683
|
-
case
|
|
3683
|
+
case O.TOUCH_PAN:
|
|
3684
3684
|
if (this.enablePan === !1) return;
|
|
3685
3685
|
this._handleTouchMovePan(a), this.update();
|
|
3686
3686
|
break;
|
|
3687
|
-
case
|
|
3687
|
+
case O.TOUCH_DOLLY_PAN:
|
|
3688
3688
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
3689
3689
|
this._handleTouchMoveDollyPan(a), this.update();
|
|
3690
3690
|
break;
|
|
3691
|
-
case
|
|
3691
|
+
case O.TOUCH_DOLLY_ROTATE:
|
|
3692
3692
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
3693
3693
|
this._handleTouchMoveDollyRotate(a), this.update();
|
|
3694
3694
|
break;
|
|
3695
3695
|
default:
|
|
3696
|
-
this.state =
|
|
3696
|
+
this.state = O.NONE;
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
|
-
function
|
|
3699
|
+
function Pa(a) {
|
|
3700
3700
|
this.enabled !== !1 && a.preventDefault();
|
|
3701
3701
|
}
|
|
3702
|
-
function
|
|
3702
|
+
function Ca(a) {
|
|
3703
3703
|
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function Aa(a) {
|
|
3706
3706
|
a.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
3707
3707
|
}
|
|
3708
|
-
function
|
|
3708
|
+
function Sa(a) {
|
|
3709
3709
|
return a;
|
|
3710
3710
|
}
|
|
3711
3711
|
function Ta(a) {
|
|
3712
|
-
if (a == null) return
|
|
3712
|
+
if (a == null) return Sa;
|
|
3713
3713
|
var e, t, i = a.scale[0], n = a.scale[1], r = a.translate[0], s = a.translate[1];
|
|
3714
3714
|
return function(o, l) {
|
|
3715
3715
|
l || (e = t = 0);
|
|
@@ -3718,7 +3718,7 @@ function Ta(a) {
|
|
|
3718
3718
|
return u;
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
|
-
function
|
|
3721
|
+
function Ma(a, e) {
|
|
3722
3722
|
for (var t, i = a.length, n = i - e; n < --i; ) t = a[n], a[n++] = a[i], a[i] = t;
|
|
3723
3723
|
}
|
|
3724
3724
|
function Da(a, e) {
|
|
@@ -3727,16 +3727,16 @@ function Da(a, e) {
|
|
|
3727
3727
|
}) } : mn(a, e);
|
|
3728
3728
|
}
|
|
3729
3729
|
function mn(a, e) {
|
|
3730
|
-
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r =
|
|
3730
|
+
var t = e.id, i = e.bbox, n = e.properties == null ? {} : e.properties, r = Ra(a, e);
|
|
3731
3731
|
return t == null && i == null ? { type: "Feature", properties: n, geometry: r } : i == null ? { type: "Feature", id: t, properties: n, geometry: r } : { type: "Feature", id: t, bbox: i, properties: n, geometry: r };
|
|
3732
3732
|
}
|
|
3733
|
-
function
|
|
3733
|
+
function Ra(a, e) {
|
|
3734
3734
|
var t = Ta(a.transform), i = a.arcs;
|
|
3735
3735
|
function n(h, u) {
|
|
3736
3736
|
u.length && u.pop();
|
|
3737
3737
|
for (var p = i[h < 0 ? ~h : h], m = 0, f = p.length; m < f; ++m)
|
|
3738
3738
|
u.push(t(p[m], m));
|
|
3739
|
-
h < 0 &&
|
|
3739
|
+
h < 0 && Ma(u, f);
|
|
3740
3740
|
}
|
|
3741
3741
|
function r(h) {
|
|
3742
3742
|
return t(h);
|
|
@@ -3782,7 +3782,7 @@ function Ma(a, e) {
|
|
|
3782
3782
|
}
|
|
3783
3783
|
return c(e);
|
|
3784
3784
|
}
|
|
3785
|
-
const
|
|
3785
|
+
const Mr = [
|
|
3786
3786
|
// Major economies and populous nations
|
|
3787
3787
|
{ id: "156", code: "CN", name: "China", population: 1412, gdpPerCapita: 21476, co2Emissions: 8, lifeExpectancy: 78.2, humanDevIndex: 0.768, internetUsers: 73, renewableEnergy: 15, urbanPopulation: 64.7, healthExpenditure: 5.4, educationExpenditure: 3.6, forestArea: 23.3, accessElectricity: 100 },
|
|
3788
3788
|
{ id: "356", code: "IN", name: "India", population: 1408, gdpPerCapita: 8379, co2Emissions: 1.9, lifeExpectancy: 70.8, humanDevIndex: 0.633, internetUsers: 47, renewableEnergy: 38, urbanPopulation: 35.9, healthExpenditure: 3, educationExpenditure: 4.5, forestArea: 24.3, accessElectricity: 99.6 },
|
|
@@ -3881,7 +3881,7 @@ const Sr = [
|
|
|
3881
3881
|
{ id: "858", code: "UY", name: "Uruguay", population: 3.5, gdpPerCapita: 25041, co2Emissions: 2, lifeExpectancy: 78.4, humanDevIndex: 0.83, internetUsers: 87, renewableEnergy: 55, urbanPopulation: 95.6, healthExpenditure: 9.3, educationExpenditure: 5, forestArea: 10.5, accessElectricity: 100 },
|
|
3882
3882
|
{ id: "188", code: "CR", name: "Costa Rica", population: 5, gdpPerCapita: 23101, co2Emissions: 1.5, lifeExpectancy: 80.8, humanDevIndex: 0.809, internetUsers: 81, renewableEnergy: 73, urbanPopulation: 81.4, healthExpenditure: 7.3, educationExpenditure: 6.7, forestArea: 59, accessElectricity: 100 },
|
|
3883
3883
|
{ id: "591", code: "PA", name: "Panama", population: 4.4, gdpPerCapita: 35317, co2Emissions: 2.5, lifeExpectancy: 79.2, humanDevIndex: 0.805, internetUsers: 68, renewableEnergy: 35, urbanPopulation: 68.4, healthExpenditure: 7.3, educationExpenditure: 3.2, forestArea: 62.1, accessElectricity: 95 }
|
|
3884
|
-
],
|
|
3884
|
+
], La = [
|
|
3885
3885
|
{
|
|
3886
3886
|
id: "humanDevIndex",
|
|
3887
3887
|
name: "Human Development Index",
|
|
@@ -4190,7 +4190,7 @@ function gn(a) {
|
|
|
4190
4190
|
const e = a.toUpperCase().trim();
|
|
4191
4191
|
return /^\d{1,3}$/.test(a) ? a.padStart(3, "0") : Ia[e] || a;
|
|
4192
4192
|
}
|
|
4193
|
-
function
|
|
4193
|
+
function ka(a) {
|
|
4194
4194
|
const e = {};
|
|
4195
4195
|
return a instanceof Map ? a.forEach((t, i) => {
|
|
4196
4196
|
e[gn(i)] = t;
|
|
@@ -4198,15 +4198,15 @@ function La(a) {
|
|
|
4198
4198
|
e[gn(t)] = i;
|
|
4199
4199
|
}), e;
|
|
4200
4200
|
}
|
|
4201
|
-
const
|
|
4202
|
-
class
|
|
4201
|
+
const Lt = 2048, Ot = 1024;
|
|
4202
|
+
class Ua {
|
|
4203
4203
|
canvas;
|
|
4204
4204
|
ctx;
|
|
4205
4205
|
countries = [];
|
|
4206
4206
|
loaded = !1;
|
|
4207
4207
|
statsMap;
|
|
4208
4208
|
constructor() {
|
|
4209
|
-
this.canvas = document.createElement("canvas"), this.canvas.width =
|
|
4209
|
+
this.canvas = document.createElement("canvas"), this.canvas.width = Lt, this.canvas.height = Ot, this.ctx = this.canvas.getContext("2d"), this.statsMap = /* @__PURE__ */ new Map(), Mr.forEach((e) => {
|
|
4210
4210
|
this.statsMap.set(e.id, e);
|
|
4211
4211
|
}), this.loadCountries();
|
|
4212
4212
|
}
|
|
@@ -4231,7 +4231,7 @@ class ka {
|
|
|
4231
4231
|
* Render a choropleth texture for the given statistic
|
|
4232
4232
|
*/
|
|
4233
4233
|
renderTexture(e) {
|
|
4234
|
-
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0,
|
|
4234
|
+
return this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Lt, Ot), this.loaded ? (this.countries.forEach((t) => {
|
|
4235
4235
|
const i = this.statsMap.get(t.id);
|
|
4236
4236
|
if (i) {
|
|
4237
4237
|
const n = e.accessor(i), r = Oa(e, n), s = this.interpolateColor(e.colorScale, r);
|
|
@@ -4278,7 +4278,7 @@ class ka {
|
|
|
4278
4278
|
* Project lat/lon to canvas coordinates (equirectangular projection)
|
|
4279
4279
|
*/
|
|
4280
4280
|
projectPoint(e, t) {
|
|
4281
|
-
const i = (e + 180) / 360 *
|
|
4281
|
+
const i = (e + 180) / 360 * Lt, n = (90 - t) / 180 * Ot;
|
|
4282
4282
|
return [i, n];
|
|
4283
4283
|
}
|
|
4284
4284
|
interpolateColor(e, t) {
|
|
@@ -4301,9 +4301,9 @@ class ka {
|
|
|
4301
4301
|
* Render a choropleth texture with custom values
|
|
4302
4302
|
*/
|
|
4303
4303
|
renderCustomTexture(e, t, i) {
|
|
4304
|
-
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0,
|
|
4304
|
+
if (this.ctx.fillStyle = "#1a3a5c", this.ctx.fillRect(0, 0, Lt, Ot), !this.loaded)
|
|
4305
4305
|
return this.canvas;
|
|
4306
|
-
const n =
|
|
4306
|
+
const n = ka(e);
|
|
4307
4307
|
return this.countries.forEach((r) => {
|
|
4308
4308
|
const s = n[r.id];
|
|
4309
4309
|
if (s !== void 0) {
|
|
@@ -4332,7 +4332,7 @@ class ka {
|
|
|
4332
4332
|
return this.canvas.toDataURL("image/png");
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
|
-
class
|
|
4335
|
+
class Fa extends $r {
|
|
4336
4336
|
/**
|
|
4337
4337
|
* Constructs a new CSS2D object.
|
|
4338
4338
|
*
|
|
@@ -4350,7 +4350,7 @@ class Ua extends Nr {
|
|
|
4350
4350
|
}
|
|
4351
4351
|
}
|
|
4352
4352
|
const qe = new se(), _n = new Tn(), yn = new Tn(), xn = new se(), bn = new se();
|
|
4353
|
-
class
|
|
4353
|
+
class za {
|
|
4354
4354
|
/**
|
|
4355
4355
|
* Constructs a new CSS2D renderer.
|
|
4356
4356
|
*
|
|
@@ -4415,7 +4415,7 @@ class Fa {
|
|
|
4415
4415
|
}
|
|
4416
4416
|
}
|
|
4417
4417
|
}
|
|
4418
|
-
const
|
|
4418
|
+
const Na = {
|
|
4419
4419
|
// Major economies
|
|
4420
4420
|
CN: [35, 105],
|
|
4421
4421
|
IN: [22, 78],
|
|
@@ -4514,7 +4514,7 @@ const za = {
|
|
|
4514
4514
|
UY: [-33, -56],
|
|
4515
4515
|
CR: [10, -84],
|
|
4516
4516
|
PA: [9, -80]
|
|
4517
|
-
},
|
|
4517
|
+
}, $a = /* @__PURE__ */ new Set([
|
|
4518
4518
|
"CN",
|
|
4519
4519
|
"IN",
|
|
4520
4520
|
"US",
|
|
@@ -4545,7 +4545,7 @@ const za = {
|
|
|
4545
4545
|
"PK",
|
|
4546
4546
|
"BD",
|
|
4547
4547
|
"VN"
|
|
4548
|
-
]),
|
|
4548
|
+
]), Ba = /* @__PURE__ */ new Set([
|
|
4549
4549
|
"CN",
|
|
4550
4550
|
"IN",
|
|
4551
4551
|
"US",
|
|
@@ -4553,7 +4553,7 @@ const za = {
|
|
|
4553
4553
|
"RU",
|
|
4554
4554
|
"AU",
|
|
4555
4555
|
"CA"
|
|
4556
|
-
]),
|
|
4556
|
+
]), Ga = /* @__PURE__ */ new Set(["RU", "CA", "US", "CN", "BR", "AU"]), Va = /* @__PURE__ */ new Set([
|
|
4557
4557
|
"IN",
|
|
4558
4558
|
"AR",
|
|
4559
4559
|
"KZ",
|
|
@@ -4584,7 +4584,7 @@ const za = {
|
|
|
4584
4584
|
"TR",
|
|
4585
4585
|
"CL",
|
|
4586
4586
|
"MM"
|
|
4587
|
-
]),
|
|
4587
|
+
]), Ha = /* @__PURE__ */ new Set([
|
|
4588
4588
|
"AF",
|
|
4589
4589
|
"UA",
|
|
4590
4590
|
"MG",
|
|
@@ -4626,7 +4626,7 @@ const za = {
|
|
|
4626
4626
|
"IQ",
|
|
4627
4627
|
"BD"
|
|
4628
4628
|
]);
|
|
4629
|
-
class
|
|
4629
|
+
class ja {
|
|
4630
4630
|
labelRenderer;
|
|
4631
4631
|
labels = [];
|
|
4632
4632
|
labelGroup;
|
|
@@ -4636,9 +4636,9 @@ class Ha {
|
|
|
4636
4636
|
globe = null;
|
|
4637
4637
|
camera = null;
|
|
4638
4638
|
constructor(e, t) {
|
|
4639
|
-
this.sphereRadius = t, this.labelRenderer = new
|
|
4639
|
+
this.sphereRadius = t, this.labelRenderer = new za();
|
|
4640
4640
|
const i = e.clientWidth || 800, n = e.clientHeight || 600;
|
|
4641
|
-
this.labelRenderer.setSize(i, n), 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
|
|
4641
|
+
this.labelRenderer.setSize(i, n), 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 A.Group(), this.injectStyles(), this.createLabels();
|
|
4642
4642
|
}
|
|
4643
4643
|
injectStyles() {
|
|
4644
4644
|
const e = document.createElement("style");
|
|
@@ -4730,15 +4730,15 @@ class Ha {
|
|
|
4730
4730
|
`, document.head.appendChild(e);
|
|
4731
4731
|
}
|
|
4732
4732
|
getSizeCategory(e) {
|
|
4733
|
-
return
|
|
4733
|
+
return Ga.has(e) ? "large" : Va.has(e) ? "medium" : Ha.has(e) ? "small" : "tiny";
|
|
4734
4734
|
}
|
|
4735
4735
|
createLabels() {
|
|
4736
|
-
|
|
4737
|
-
const t =
|
|
4736
|
+
Mr.forEach((e) => {
|
|
4737
|
+
const t = Na[e.code];
|
|
4738
4738
|
if (!t) return;
|
|
4739
4739
|
const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
|
|
4740
4740
|
s.className = `country-label hidden size-${r}`, s.textContent = e.name;
|
|
4741
|
-
const o = new
|
|
4741
|
+
const o = new Fa(s), l = {
|
|
4742
4742
|
element: s,
|
|
4743
4743
|
object: o,
|
|
4744
4744
|
country: e,
|
|
@@ -4749,10 +4749,10 @@ class Ha {
|
|
|
4749
4749
|
this.labelGroup.add(o), this.labels.push(l), this.updateLabelPosition(o, l, this.currentMorph);
|
|
4750
4750
|
});
|
|
4751
4751
|
}
|
|
4752
|
-
localPos = new
|
|
4753
|
-
worldPos = new
|
|
4754
|
-
cameraDirection = new
|
|
4755
|
-
labelNormal = new
|
|
4752
|
+
localPos = new A.Vector3();
|
|
4753
|
+
worldPos = new A.Vector3();
|
|
4754
|
+
cameraDirection = new A.Vector3();
|
|
4755
|
+
labelNormal = new A.Vector3();
|
|
4756
4756
|
updateLabelPosition(e, t, i) {
|
|
4757
4757
|
const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, c = (o - 0.5) * 2 * Math.PI, h = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, p = u * Math.cos(h) * Math.sin(c), m = u * Math.sin(h), f = u * Math.cos(h) * Math.cos(c), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, _ = (o - 0.5) * d, y = (l - 0.5) * g, x = 0.3, v = i * i * (3 - 2 * i);
|
|
4758
4758
|
if (this.localPos.set(
|
|
@@ -4787,10 +4787,10 @@ class Ha {
|
|
|
4787
4787
|
n = !1;
|
|
4788
4788
|
break;
|
|
4789
4789
|
case "minimal":
|
|
4790
|
-
n =
|
|
4790
|
+
n = Ba.has(i);
|
|
4791
4791
|
break;
|
|
4792
4792
|
case "major":
|
|
4793
|
-
n =
|
|
4793
|
+
n = $a.has(i);
|
|
4794
4794
|
break;
|
|
4795
4795
|
case "all":
|
|
4796
4796
|
case "capitals":
|
|
@@ -4849,7 +4849,7 @@ class Ha {
|
|
|
4849
4849
|
*/
|
|
4850
4850
|
getVisibleLabelsForCanvas(e, t, i) {
|
|
4851
4851
|
if (this.currentStyle === "none") return [];
|
|
4852
|
-
const n = [], r = new
|
|
4852
|
+
const n = [], r = new A.Vector3();
|
|
4853
4853
|
return this.labels.forEach((s) => {
|
|
4854
4854
|
const o = s.element.style.opacity, l = o === "" ? 1 : parseFloat(o) || 0;
|
|
4855
4855
|
if (l < 0.1 || s.element.classList.contains("hidden")) return;
|
|
@@ -4872,7 +4872,7 @@ class Ha {
|
|
|
4872
4872
|
}), this.labels = [], this.labelRenderer.domElement.remove();
|
|
4873
4873
|
}
|
|
4874
4874
|
}
|
|
4875
|
-
var
|
|
4875
|
+
var Ya = { trailer: 59 };
|
|
4876
4876
|
function Dr(a = 256) {
|
|
4877
4877
|
let e = 0, t = new Uint8Array(a);
|
|
4878
4878
|
return { get buffer() {
|
|
@@ -4900,8 +4900,8 @@ function Dr(a = 256) {
|
|
|
4900
4900
|
t = new Uint8Array(n), e > 0 && t.set(o.subarray(0, e), 0);
|
|
4901
4901
|
}
|
|
4902
4902
|
}
|
|
4903
|
-
var si = 12, vn = 5003,
|
|
4904
|
-
function
|
|
4903
|
+
var si = 12, vn = 5003, Za = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
4904
|
+
function Ka(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array(vn), o = new Int32Array(vn)) {
|
|
4905
4905
|
let l = s.length, c = Math.max(2, i);
|
|
4906
4906
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4907
4907
|
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, v = 0, b = t[0], P = 0;
|
|
@@ -4910,38 +4910,38 @@ function Za(a, e, t, i, n = Dr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
4910
4910
|
let E = t.length;
|
|
4911
4911
|
for (let w = 1; w < E; w++)
|
|
4912
4912
|
e: {
|
|
4913
|
-
let T = t[w],
|
|
4914
|
-
if (s[
|
|
4915
|
-
b = o[
|
|
4913
|
+
let T = t[w], D = (T << si) + b, S = T << P ^ b;
|
|
4914
|
+
if (s[S] === D) {
|
|
4915
|
+
b = o[S];
|
|
4916
4916
|
break e;
|
|
4917
4917
|
}
|
|
4918
|
-
let R =
|
|
4919
|
-
for (; s[
|
|
4920
|
-
b = o[
|
|
4918
|
+
let R = S === 0 ? 1 : l - S;
|
|
4919
|
+
for (; s[S] >= 0; ) if (S -= R, S < 0 && (S += l), s[S] === D) {
|
|
4920
|
+
b = o[S];
|
|
4921
4921
|
break e;
|
|
4922
4922
|
}
|
|
4923
|
-
C(b), b = T, x < 1 << si ? (o[
|
|
4923
|
+
C(b), b = T, x < 1 << si ? (o[S] = x++, s[S] = D) : (s.fill(-1), x = _ + 2, f = !0, C(_));
|
|
4924
4924
|
}
|
|
4925
4925
|
return C(b), C(y), n.writeByte(0), n.bytesView();
|
|
4926
4926
|
function C(w) {
|
|
4927
|
-
for (h &=
|
|
4927
|
+
for (h &= Za[u], u > 0 ? h |= w << u : h = w, u += d; u >= 8; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
4928
4928
|
if ((x > g || f) && (f ? (d = m, g = (1 << d) - 1, f = !1) : (++d, g = d === si ? 1 << d : (1 << d) - 1)), w == y) {
|
|
4929
4929
|
for (; u > 0; ) r[v++] = h & 255, v >= 254 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0), h >>= 8, u -= 8;
|
|
4930
4930
|
v > 0 && (n.writeByte(v), n.writeBytesView(r, 0, v), v = 0);
|
|
4931
4931
|
}
|
|
4932
4932
|
}
|
|
4933
4933
|
}
|
|
4934
|
-
var
|
|
4935
|
-
function
|
|
4934
|
+
var Wa = Ka;
|
|
4935
|
+
function Rr(a, e, t) {
|
|
4936
4936
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
4937
4937
|
}
|
|
4938
|
-
function
|
|
4938
|
+
function Lr(a, e, t, i) {
|
|
4939
4939
|
return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
4940
4940
|
}
|
|
4941
4941
|
function Or(a, e, t) {
|
|
4942
4942
|
return a >> 4 << 8 | e & 240 | t >> 4;
|
|
4943
4943
|
}
|
|
4944
|
-
function
|
|
4944
|
+
function It(a, e, t) {
|
|
4945
4945
|
return a < e ? e : a > t ? t : a;
|
|
4946
4946
|
}
|
|
4947
4947
|
function zt(a) {
|
|
@@ -4967,7 +4967,7 @@ function ai() {
|
|
|
4967
4967
|
function Xa(a, e) {
|
|
4968
4968
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
|
|
4969
4969
|
if (e === "rgba4444") for (let r = 0; r < n; ++r) {
|
|
4970
|
-
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u =
|
|
4970
|
+
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, c = s >> 8 & 255, h = s & 255, u = Lr(h, c, l, o), p = u in i ? i[u] : i[u] = ai();
|
|
4971
4971
|
p.rc += h, p.gc += c, p.bc += l, p.ac += o, p.cnt++;
|
|
4972
4972
|
}
|
|
4973
4973
|
else if (e === "rgb444") for (let r = 0; r < n; ++r) {
|
|
@@ -4975,21 +4975,21 @@ function Xa(a, e) {
|
|
|
4975
4975
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4976
4976
|
}
|
|
4977
4977
|
else for (let r = 0; r < n; ++r) {
|
|
4978
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h =
|
|
4978
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, c = s & 255, h = Rr(c, l, o), u = h in i ? i[h] : i[h] = ai();
|
|
4979
4979
|
u.rc += c, u.gc += l, u.bc += o, u.cnt++;
|
|
4980
4980
|
}
|
|
4981
4981
|
return i;
|
|
4982
4982
|
}
|
|
4983
|
-
function
|
|
4983
|
+
function qa(a, e, t = {}) {
|
|
4984
4984
|
let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
|
|
4985
4985
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4986
4986
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
4987
4987
|
let l = new Uint32Array(a.buffer), c = t.useSqrt !== !1, h = i === "rgba4444", u = Xa(l, i), p = u.length, m = p - 1, f = new Uint32Array(p + 1);
|
|
4988
4988
|
for (var d = 0, g = 0; g < p; ++g) {
|
|
4989
|
-
let
|
|
4990
|
-
if (
|
|
4991
|
-
var _ = 1 /
|
|
4992
|
-
h && (
|
|
4989
|
+
let L = u[g];
|
|
4990
|
+
if (L != null) {
|
|
4991
|
+
var _ = 1 / L.cnt;
|
|
4992
|
+
h && (L.ac *= _), L.rc *= _, L.gc *= _, L.bc *= _, u[d++] = L;
|
|
4993
4993
|
}
|
|
4994
4994
|
}
|
|
4995
4995
|
zt(e) / d < 0.022 && (c = !1);
|
|
@@ -5012,45 +5012,45 @@ function Wa(a, e, t = {}) {
|
|
|
5012
5012
|
for (x = 1; (v = x + x) <= f[0] && (v < f[0] && u[f[v]].err > u[f[v + 1]].err && v++, !(b <= u[y = f[v]].err)); x = v) f[x] = y;
|
|
5013
5013
|
f[x] = C;
|
|
5014
5014
|
}
|
|
5015
|
-
var w = u[E.nn], T = E.cnt,
|
|
5016
|
-
h && (E.ac = _ * (T * E.ac +
|
|
5015
|
+
var w = u[E.nn], T = E.cnt, D = w.cnt, _ = 1 / (T + D);
|
|
5016
|
+
h && (E.ac = _ * (T * E.ac + D * w.ac)), E.rc = _ * (T * E.rc + D * w.rc), E.gc = _ * (T * E.gc + D * w.gc), E.bc = _ * (T * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
|
|
5017
5017
|
}
|
|
5018
|
-
let
|
|
5018
|
+
let S = [];
|
|
5019
5019
|
var R = 0;
|
|
5020
5020
|
for (g = 0; ; ++R) {
|
|
5021
|
-
let
|
|
5022
|
-
h && (U =
|
|
5023
|
-
let Q = h ? [
|
|
5024
|
-
if (
|
|
5021
|
+
let L = It(Math.round(u[g].rc), 0, 255), B = It(Math.round(u[g].gc), 0, 255), F = It(Math.round(u[g].bc), 0, 255), U = 255;
|
|
5022
|
+
h && (U = It(Math.round(u[g].ac), 0, 255), o && (U = U <= (typeof o == "number" ? o : 127) ? 0 : 255), n && U <= s && (L = B = F = r, U = 0));
|
|
5023
|
+
let Q = h ? [L, B, F, U] : [L, B, F];
|
|
5024
|
+
if (Qa(S, Q) || S.push(Q), (g = u[g].fw) == 0) break;
|
|
5025
5025
|
}
|
|
5026
|
-
return
|
|
5026
|
+
return S;
|
|
5027
5027
|
}
|
|
5028
|
-
function
|
|
5028
|
+
function Qa(a, e) {
|
|
5029
5029
|
for (let t = 0; t < a.length; t++) {
|
|
5030
5030
|
let i = a[t], n = i[0] === e[0] && i[1] === e[1] && i[2] === e[2], r = i.length >= 4 && e.length >= 4 ? i[3] === e[3] : !0;
|
|
5031
5031
|
if (n && r) return !0;
|
|
5032
5032
|
}
|
|
5033
5033
|
return !1;
|
|
5034
5034
|
}
|
|
5035
|
-
function
|
|
5035
|
+
function Ja(a, e, t = "rgb565") {
|
|
5036
5036
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
5037
5037
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
5038
5038
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
5039
5039
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
5040
5040
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
5041
|
-
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f =
|
|
5041
|
+
let c = i[l], h = c >> 24 & 255, u = c >> 16 & 255, p = c >> 8 & 255, m = c & 255, f = Lr(m, p, u, h), d = f in o ? o[f] : o[f] = eo(m, p, u, h, e);
|
|
5042
5042
|
s[l] = d;
|
|
5043
5043
|
}
|
|
5044
5044
|
else {
|
|
5045
|
-
let l = t === "rgb444" ? Or :
|
|
5045
|
+
let l = t === "rgb444" ? Or : Rr;
|
|
5046
5046
|
for (let c = 0; c < n; c++) {
|
|
5047
|
-
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] =
|
|
5047
|
+
let h = i[c], u = h >> 16 & 255, p = h >> 8 & 255, m = h & 255, f = l(m, p, u), d = f in o ? o[f] : o[f] = to(m, p, u, e);
|
|
5048
5048
|
s[c] = d;
|
|
5049
5049
|
}
|
|
5050
5050
|
}
|
|
5051
5051
|
return s;
|
|
5052
5052
|
}
|
|
5053
|
-
function
|
|
5053
|
+
function eo(a, e, t, i, n) {
|
|
5054
5054
|
let r = 0, s = 1e100;
|
|
5055
5055
|
for (let o = 0; o < n.length; o++) {
|
|
5056
5056
|
let l = n[o], c = l[3], h = Ve(c - i);
|
|
@@ -5064,7 +5064,7 @@ function Ja(a, e, t, i, n) {
|
|
|
5064
5064
|
}
|
|
5065
5065
|
return r;
|
|
5066
5066
|
}
|
|
5067
|
-
function
|
|
5067
|
+
function to(a, e, t, i) {
|
|
5068
5068
|
let n = 0, r = 1e100;
|
|
5069
5069
|
for (let s = 0; s < i.length; s++) {
|
|
5070
5070
|
let o = i[s], l = o[0], c = Ve(l - a);
|
|
@@ -5079,12 +5079,12 @@ function eo(a, e, t, i) {
|
|
|
5079
5079
|
function Ve(a) {
|
|
5080
5080
|
return a * a;
|
|
5081
5081
|
}
|
|
5082
|
-
function
|
|
5082
|
+
function io(a = {}) {
|
|
5083
5083
|
let { initialCapacity: e = 4096, auto: t = !0 } = a, i = Dr(e), n = 5003, r = new Uint8Array(256), s = new Int32Array(n), o = new Int32Array(n), l = !1;
|
|
5084
5084
|
return { reset() {
|
|
5085
5085
|
i.reset(), l = !1;
|
|
5086
5086
|
}, finish() {
|
|
5087
|
-
i.writeByte(
|
|
5087
|
+
i.writeByte(Ya.trailer);
|
|
5088
5088
|
}, bytes() {
|
|
5089
5089
|
return i.bytes();
|
|
5090
5090
|
}, bytesView() {
|
|
@@ -5097,28 +5097,28 @@ function to(a = {}) {
|
|
|
5097
5097
|
let { transparent: f = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: x = 8, dispose: v = -1 } = m, b = !1;
|
|
5098
5098
|
if (t ? l || (b = !0, c(), l = !0) : b = !!m.first, u = Math.max(0, Math.floor(u)), p = Math.max(0, Math.floor(p)), b) {
|
|
5099
5099
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
5100
|
-
|
|
5100
|
+
ro(i, u, p, _, x), wn(i, _), y >= 0 && so(i, y);
|
|
5101
5101
|
}
|
|
5102
5102
|
let P = Math.round(g / 10);
|
|
5103
|
-
|
|
5103
|
+
no(i, v, P, f, d);
|
|
5104
5104
|
let E = !!_ && !b;
|
|
5105
|
-
|
|
5105
|
+
ao(i, u, p, E ? _ : null), E && wn(i, _), oo(i, h, u, p, x, r, s, o);
|
|
5106
5106
|
} };
|
|
5107
5107
|
function c() {
|
|
5108
5108
|
Ir(i, "GIF89a");
|
|
5109
5109
|
}
|
|
5110
5110
|
}
|
|
5111
|
-
function
|
|
5111
|
+
function no(a, e, t, i, n) {
|
|
5112
5112
|
a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
|
|
5113
5113
|
var r, s;
|
|
5114
|
-
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r),
|
|
5114
|
+
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Re(a, t), a.writeByte(n || 0), a.writeByte(0);
|
|
5115
5115
|
}
|
|
5116
|
-
function
|
|
5116
|
+
function ro(a, e, t, i, n = 8) {
|
|
5117
5117
|
let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
|
|
5118
|
-
|
|
5118
|
+
Re(a, e), Re(a, t), a.writeBytes([l, 0, 0]);
|
|
5119
5119
|
}
|
|
5120
|
-
function
|
|
5121
|
-
a.writeByte(33), a.writeByte(255), a.writeByte(11), Ir(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1),
|
|
5120
|
+
function so(a, e) {
|
|
5121
|
+
a.writeByte(33), a.writeByte(255), a.writeByte(11), Ir(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Re(a, e), a.writeByte(0);
|
|
5122
5122
|
}
|
|
5123
5123
|
function wn(a, e) {
|
|
5124
5124
|
let t = 1 << Hi(e.length);
|
|
@@ -5127,16 +5127,16 @@ function wn(a, e) {
|
|
|
5127
5127
|
i < e.length && (n = e[i]), a.writeByte(n[0]), a.writeByte(n[1]), a.writeByte(n[2]);
|
|
5128
5128
|
}
|
|
5129
5129
|
}
|
|
5130
|
-
function
|
|
5131
|
-
if (a.writeByte(44),
|
|
5130
|
+
function ao(a, e, t, i) {
|
|
5131
|
+
if (a.writeByte(44), Re(a, 0), Re(a, 0), Re(a, e), Re(a, t), i) {
|
|
5132
5132
|
let n = 0, r = 0, s = Hi(i.length) - 1;
|
|
5133
5133
|
a.writeByte(128 | n | r | 0 | s);
|
|
5134
5134
|
} else a.writeByte(0);
|
|
5135
5135
|
}
|
|
5136
|
-
function
|
|
5137
|
-
|
|
5136
|
+
function oo(a, e, t, i, n = 8, r, s, o) {
|
|
5137
|
+
Wa(t, i, e, n, a, r, s, o);
|
|
5138
5138
|
}
|
|
5139
|
-
function
|
|
5139
|
+
function Re(a, e) {
|
|
5140
5140
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
5141
5141
|
}
|
|
5142
5142
|
function Ir(a, e) {
|
|
@@ -5145,7 +5145,7 @@ function Ir(a, e) {
|
|
|
5145
5145
|
function Hi(a) {
|
|
5146
5146
|
return Math.max(Math.ceil(Math.log2(a)), 1);
|
|
5147
5147
|
}
|
|
5148
|
-
class
|
|
5148
|
+
class lo {
|
|
5149
5149
|
renderer;
|
|
5150
5150
|
scene;
|
|
5151
5151
|
camera;
|
|
@@ -5237,7 +5237,7 @@ class oo {
|
|
|
5237
5237
|
* Uses an offscreen renderer to avoid disturbing the main display
|
|
5238
5238
|
*/
|
|
5239
5239
|
screenshot(e = {}) {
|
|
5240
|
-
const { width: t = 1920, height: i = 1080, filename: n } = e, r = new
|
|
5240
|
+
const { width: t = 1920, height: i = 1080, filename: n } = e, r = new A.WebGLRenderer({
|
|
5241
5241
|
antialias: !0,
|
|
5242
5242
|
preserveDrawingBuffer: !0
|
|
5243
5243
|
});
|
|
@@ -5344,9 +5344,9 @@ class oo {
|
|
|
5344
5344
|
const { fps: t = 20, filename: i } = e, n = Math.round(1e3 / t);
|
|
5345
5345
|
console.log(`Generating GIF with ${this.frames.length} frames at ${t} fps...`);
|
|
5346
5346
|
try {
|
|
5347
|
-
const r = this.frames[0], s = r.width, o = r.height, l =
|
|
5347
|
+
const r = this.frames[0], s = r.width, o = r.height, l = qa(r.data, 256), c = io();
|
|
5348
5348
|
for (let f = 0; f < this.frames.length; f++) {
|
|
5349
|
-
const d = this.frames[f], g =
|
|
5349
|
+
const d = this.frames[f], g = Ja(d.data, l);
|
|
5350
5350
|
c.writeFrame(g, s, o, {
|
|
5351
5351
|
palette: f === 0 ? l : void 0,
|
|
5352
5352
|
// Only first frame needs palette
|
|
@@ -5380,17 +5380,17 @@ class oo {
|
|
|
5380
5380
|
i.href = e, i.download = t, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
5381
5381
|
}
|
|
5382
5382
|
}
|
|
5383
|
-
function
|
|
5383
|
+
function kr(a) {
|
|
5384
5384
|
return a === "%" ? (e) => `${e.toFixed(1)}%` : a === "$" ? (e) => `$${e.toLocaleString()}` : a === "years" ? (e) => `${e.toFixed(1)} yrs` : a.includes("per capita") || a.includes("per 100") || a.includes("per 1000") ? (e) => `${e.toFixed(1)}` : a === "% GDP" || a === "% of GDP" ? (e) => `${e.toFixed(1)}%` : a === "" || a === "index" ? (e) => e.toFixed(3) : (e) => {
|
|
5385
5385
|
const t = Number.isInteger(e) ? e.toLocaleString() : e.toFixed(1);
|
|
5386
5386
|
return a ? `${t} ${a}` : t;
|
|
5387
5387
|
};
|
|
5388
5388
|
}
|
|
5389
|
-
function
|
|
5390
|
-
return (t ??
|
|
5389
|
+
function wo(a, e, t) {
|
|
5390
|
+
return (t ?? kr(e))(a);
|
|
5391
5391
|
}
|
|
5392
5392
|
let Pn = !1;
|
|
5393
|
-
function
|
|
5393
|
+
function ho() {
|
|
5394
5394
|
if (Pn) return;
|
|
5395
5395
|
Pn = !0;
|
|
5396
5396
|
const a = document.createElement("style");
|
|
@@ -5528,13 +5528,13 @@ function lo() {
|
|
|
5528
5528
|
}
|
|
5529
5529
|
`, document.head.appendChild(a);
|
|
5530
5530
|
}
|
|
5531
|
-
class
|
|
5531
|
+
class co {
|
|
5532
5532
|
element;
|
|
5533
5533
|
parentContainer;
|
|
5534
5534
|
visible = !1;
|
|
5535
5535
|
resizeObserver = null;
|
|
5536
5536
|
constructor(e) {
|
|
5537
|
-
|
|
5537
|
+
ho(), this.parentContainer = e, getComputedStyle(e).position === "static" && (e.style.position = "relative"), this.element = document.createElement("div"), this.element.className = "gralobe-legend", this.element.setAttribute("data-testid", "globe-legend"), this.element.innerHTML = `
|
|
5538
5538
|
<div class="gralobe-legend-hint">G: view · F: fullscreen</div>
|
|
5539
5539
|
<div class="gralobe-legend-title" data-testid="legend-title"></div>
|
|
5540
5540
|
<div class="gralobe-legend-gradient"></div>
|
|
@@ -5558,7 +5558,7 @@ class ho {
|
|
|
5558
5558
|
t.textContent = e.name, s.textContent = e.description;
|
|
5559
5559
|
const [o, l, c] = e.colorScale;
|
|
5560
5560
|
i.style.background = `linear-gradient(to right, ${o}, ${l}, ${c})`;
|
|
5561
|
-
const h = e.format ??
|
|
5561
|
+
const h = e.format ?? kr(e.unit);
|
|
5562
5562
|
n.textContent = h(e.domain[0]), r.textContent = h(e.domain[1]), this.element.classList.add("visible"), this.visible = !0;
|
|
5563
5563
|
}
|
|
5564
5564
|
hide() {
|
|
@@ -5574,7 +5574,7 @@ class ho {
|
|
|
5574
5574
|
this.resizeObserver?.disconnect(), this.element.remove();
|
|
5575
5575
|
}
|
|
5576
5576
|
}
|
|
5577
|
-
const
|
|
5577
|
+
const _e = 50, uo = `
|
|
5578
5578
|
uniform float uMorph;
|
|
5579
5579
|
uniform float uTime;
|
|
5580
5580
|
uniform float uParchment;
|
|
@@ -5594,7 +5594,7 @@ varying float vDiscard;
|
|
|
5594
5594
|
varying float vExtrudeAmount;
|
|
5595
5595
|
|
|
5596
5596
|
const float PI = 3.14159265359;
|
|
5597
|
-
const float RADIUS = ${
|
|
5597
|
+
const float RADIUS = ${_e.toFixed(1)};
|
|
5598
5598
|
|
|
5599
5599
|
// Hash functions for procedural variation
|
|
5600
5600
|
float hash(vec2 p) {
|
|
@@ -5822,7 +5822,7 @@ void main() {
|
|
|
5822
5822
|
|
|
5823
5823
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
5824
5824
|
}
|
|
5825
|
-
`,
|
|
5825
|
+
`, po = `
|
|
5826
5826
|
uniform sampler2D uTexture;
|
|
5827
5827
|
uniform sampler2D uDataTexture;
|
|
5828
5828
|
uniform sampler2D uCloudTexture;
|
|
@@ -6034,13 +6034,13 @@ void main() {
|
|
|
6034
6034
|
|
|
6035
6035
|
gl_FragColor = vec4(color, 1.0);
|
|
6036
6036
|
}
|
|
6037
|
-
`,
|
|
6037
|
+
`, fo = `
|
|
6038
6038
|
varying vec3 vNormal;
|
|
6039
6039
|
varying vec3 vPosition;
|
|
6040
6040
|
uniform float uMorph;
|
|
6041
6041
|
|
|
6042
6042
|
const float PI = 3.14159265359;
|
|
6043
|
-
const float RADIUS = ${
|
|
6043
|
+
const float RADIUS = ${_e.toFixed(1)};
|
|
6044
6044
|
|
|
6045
6045
|
void main() {
|
|
6046
6046
|
vNormal = normalize(normalMatrix * normal);
|
|
@@ -6069,7 +6069,7 @@ void main() {
|
|
|
6069
6069
|
vPosition = pos;
|
|
6070
6070
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
|
|
6071
6071
|
}
|
|
6072
|
-
`,
|
|
6072
|
+
`, mo = `
|
|
6073
6073
|
varying vec3 vNormal;
|
|
6074
6074
|
varying vec3 vPosition;
|
|
6075
6075
|
uniform float uMorph;
|
|
@@ -6084,7 +6084,7 @@ void main() {
|
|
|
6084
6084
|
|
|
6085
6085
|
gl_FragColor = vec4(color, intensity * 0.6);
|
|
6086
6086
|
}
|
|
6087
|
-
`,
|
|
6087
|
+
`, go = `
|
|
6088
6088
|
attribute float aSize;
|
|
6089
6089
|
attribute float aPhase;
|
|
6090
6090
|
uniform float uTime;
|
|
@@ -6101,7 +6101,7 @@ void main() {
|
|
|
6101
6101
|
gl_PointSize = aSize * (300.0 / -mvPosition.z) * twinkle;
|
|
6102
6102
|
gl_Position = projectionMatrix * mvPosition;
|
|
6103
6103
|
}
|
|
6104
|
-
`,
|
|
6104
|
+
`, _o = `
|
|
6105
6105
|
varying float vOpacity;
|
|
6106
6106
|
|
|
6107
6107
|
void main() {
|
|
@@ -6111,7 +6111,201 @@ void main() {
|
|
|
6111
6111
|
|
|
6112
6112
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * 0.9);
|
|
6113
6113
|
}
|
|
6114
|
-
`,
|
|
6114
|
+
`, Cn = Math.PI / 180;
|
|
6115
|
+
function yo(a, e, t = _e) {
|
|
6116
|
+
const i = (90 - a) * Cn, n = (e + 180) * Cn;
|
|
6117
|
+
return new A.Vector3(
|
|
6118
|
+
-t * Math.sin(i) * Math.cos(n),
|
|
6119
|
+
t * Math.cos(i),
|
|
6120
|
+
t * Math.sin(i) * Math.sin(n)
|
|
6121
|
+
);
|
|
6122
|
+
}
|
|
6123
|
+
function xo(a, e) {
|
|
6124
|
+
const t = 2 * Math.PI * _e, i = Math.PI * _e;
|
|
6125
|
+
return new A.Vector3(
|
|
6126
|
+
e / 180 * (t / 2),
|
|
6127
|
+
a / 90 * (i / 2),
|
|
6128
|
+
0
|
|
6129
|
+
);
|
|
6130
|
+
}
|
|
6131
|
+
const bo = {
|
|
6132
|
+
style: "spike",
|
|
6133
|
+
color: "#0ea5e9",
|
|
6134
|
+
// Cyan/teal
|
|
6135
|
+
maxHeight: 15,
|
|
6136
|
+
pulseAnimation: !0,
|
|
6137
|
+
opacity: 0.9
|
|
6138
|
+
};
|
|
6139
|
+
class vo {
|
|
6140
|
+
group;
|
|
6141
|
+
markers = [];
|
|
6142
|
+
config;
|
|
6143
|
+
markerMeshes = [];
|
|
6144
|
+
glowMeshes = [];
|
|
6145
|
+
morph = 1;
|
|
6146
|
+
time = 0;
|
|
6147
|
+
// Cached materials
|
|
6148
|
+
markerMaterial;
|
|
6149
|
+
glowMaterial;
|
|
6150
|
+
constructor(e = {}) {
|
|
6151
|
+
this.group = new A.Group(), this.config = { ...bo, ...e }, this.markerMaterial = new A.MeshBasicMaterial({
|
|
6152
|
+
color: new A.Color(this.config.color),
|
|
6153
|
+
transparent: !0,
|
|
6154
|
+
opacity: this.config.opacity
|
|
6155
|
+
}), this.glowMaterial = new A.ShaderMaterial({
|
|
6156
|
+
uniforms: {
|
|
6157
|
+
uColor: { value: new A.Color(this.config.color) },
|
|
6158
|
+
uTime: { value: 0 },
|
|
6159
|
+
uPulse: { value: this.config.pulseAnimation ? 1 : 0 }
|
|
6160
|
+
},
|
|
6161
|
+
vertexShader: `
|
|
6162
|
+
varying vec3 vNormal;
|
|
6163
|
+
void main() {
|
|
6164
|
+
vNormal = normalize(normalMatrix * normal);
|
|
6165
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
6166
|
+
}
|
|
6167
|
+
`,
|
|
6168
|
+
fragmentShader: `
|
|
6169
|
+
uniform vec3 uColor;
|
|
6170
|
+
uniform float uTime;
|
|
6171
|
+
uniform float uPulse;
|
|
6172
|
+
varying vec3 vNormal;
|
|
6173
|
+
|
|
6174
|
+
void main() {
|
|
6175
|
+
float intensity = pow(0.7 - dot(vNormal, vec3(0.0, 0.0, 1.0)), 2.0);
|
|
6176
|
+
float pulse = 1.0 + sin(uTime * 3.0) * 0.3 * uPulse;
|
|
6177
|
+
vec3 glow = uColor * intensity * pulse;
|
|
6178
|
+
float alpha = intensity * 0.6 * pulse;
|
|
6179
|
+
gl_FragColor = vec4(glow, alpha);
|
|
6180
|
+
}
|
|
6181
|
+
`,
|
|
6182
|
+
transparent: !0,
|
|
6183
|
+
blending: A.AdditiveBlending,
|
|
6184
|
+
side: A.BackSide,
|
|
6185
|
+
depthWrite: !1
|
|
6186
|
+
});
|
|
6187
|
+
}
|
|
6188
|
+
/**
|
|
6189
|
+
* Get the Three.js group containing all markers
|
|
6190
|
+
*/
|
|
6191
|
+
getGroup() {
|
|
6192
|
+
return this.group;
|
|
6193
|
+
}
|
|
6194
|
+
/**
|
|
6195
|
+
* Set marker data and rebuild meshes
|
|
6196
|
+
*/
|
|
6197
|
+
setMarkers(e) {
|
|
6198
|
+
this.markers = e, this.rebuild();
|
|
6199
|
+
}
|
|
6200
|
+
/**
|
|
6201
|
+
* Update configuration
|
|
6202
|
+
*/
|
|
6203
|
+
setConfig(e) {
|
|
6204
|
+
this.config = { ...this.config, ...e }, e.color && (this.markerMaterial.color.set(e.color), this.glowMaterial.uniforms.uColor.value.set(e.color)), e.opacity !== void 0 && (this.markerMaterial.opacity = e.opacity), e.pulseAnimation !== void 0 && (this.glowMaterial.uniforms.uPulse.value = e.pulseAnimation ? 1 : 0), this.rebuild();
|
|
6205
|
+
}
|
|
6206
|
+
/**
|
|
6207
|
+
* Set morph value (0 = flat, 1 = globe)
|
|
6208
|
+
*/
|
|
6209
|
+
setMorph(e) {
|
|
6210
|
+
this.morph = e, this.updatePositions();
|
|
6211
|
+
}
|
|
6212
|
+
/**
|
|
6213
|
+
* Update animation time
|
|
6214
|
+
*/
|
|
6215
|
+
update(e) {
|
|
6216
|
+
this.time = e, this.glowMaterial.uniforms.uTime.value = e;
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* Clear and rebuild all marker meshes
|
|
6220
|
+
*/
|
|
6221
|
+
rebuild() {
|
|
6222
|
+
if (this.group.clear(), this.markerMeshes = [], this.glowMeshes = [], this.markers.length === 0) return;
|
|
6223
|
+
const e = this.markers.map((i) => i.value), t = Math.max(...e, 1);
|
|
6224
|
+
for (const i of this.markers) {
|
|
6225
|
+
const n = i.value / t, r = this.createMarkerMesh(i, n);
|
|
6226
|
+
if (this.markerMeshes.push(r), this.group.add(r), this.config.style !== "dot") {
|
|
6227
|
+
const s = this.createGlowMesh(i, n);
|
|
6228
|
+
this.glowMeshes.push(s), this.group.add(s);
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
6231
|
+
this.updatePositions();
|
|
6232
|
+
}
|
|
6233
|
+
/**
|
|
6234
|
+
* Create a single marker mesh
|
|
6235
|
+
*/
|
|
6236
|
+
createMarkerMesh(e, t) {
|
|
6237
|
+
let i;
|
|
6238
|
+
const n = 2 + t * this.config.maxHeight;
|
|
6239
|
+
switch (this.config.style) {
|
|
6240
|
+
case "dot":
|
|
6241
|
+
i = new A.SphereGeometry(1 + t * 2, 16, 12);
|
|
6242
|
+
break;
|
|
6243
|
+
case "pin":
|
|
6244
|
+
i = new A.ConeGeometry(1.5, n, 8);
|
|
6245
|
+
break;
|
|
6246
|
+
case "spike":
|
|
6247
|
+
default:
|
|
6248
|
+
i = new A.CylinderGeometry(0.3, 1.2, n, 8);
|
|
6249
|
+
break;
|
|
6250
|
+
}
|
|
6251
|
+
const r = e.color ? new A.MeshBasicMaterial({
|
|
6252
|
+
color: new A.Color(e.color),
|
|
6253
|
+
transparent: !0,
|
|
6254
|
+
opacity: this.config.opacity
|
|
6255
|
+
}) : this.markerMaterial, s = new A.Mesh(i, r);
|
|
6256
|
+
return s.userData = { marker: e, height: n }, s;
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Create glow mesh for marker
|
|
6260
|
+
*/
|
|
6261
|
+
createGlowMesh(e, t) {
|
|
6262
|
+
const i = 2 + t * 3, n = new A.SphereGeometry(i, 16, 12), r = e.color ? new A.ShaderMaterial({
|
|
6263
|
+
...this.glowMaterial,
|
|
6264
|
+
uniforms: {
|
|
6265
|
+
...this.glowMaterial.uniforms,
|
|
6266
|
+
uColor: { value: new A.Color(e.color) }
|
|
6267
|
+
}
|
|
6268
|
+
}) : this.glowMaterial, s = new A.Mesh(n, r);
|
|
6269
|
+
return s.userData = { marker: e }, s;
|
|
6270
|
+
}
|
|
6271
|
+
/**
|
|
6272
|
+
* Update marker positions based on morph value
|
|
6273
|
+
*/
|
|
6274
|
+
updatePositions() {
|
|
6275
|
+
for (let e = 0; e < this.markerMeshes.length; e++) {
|
|
6276
|
+
const t = this.markerMeshes[e], i = t.userData.marker, n = t.userData.height, r = yo(i.lat, i.lng, _e), s = xo(i.lat, i.lng), o = this.morph * this.morph * (3 - 2 * this.morph);
|
|
6277
|
+
if (t.position.lerpVectors(s, r, o), o > 0.01) {
|
|
6278
|
+
if (t.lookAt(t.position.clone().multiplyScalar(2)), this.config.style === "spike" || this.config.style === "pin") {
|
|
6279
|
+
t.rotateX(Math.PI / 2);
|
|
6280
|
+
const l = r.clone().normalize().multiplyScalar(n / 2);
|
|
6281
|
+
t.position.add(l.multiplyScalar(o));
|
|
6282
|
+
}
|
|
6283
|
+
} else
|
|
6284
|
+
t.rotation.set(-Math.PI / 2, 0, 0), (this.config.style === "spike" || this.config.style === "pin") && (t.position.z = n / 2);
|
|
6285
|
+
this.glowMeshes[e] && this.glowMeshes[e].position.copy(t.position);
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
/**
|
|
6289
|
+
* Find marker at screen position (for click/hover)
|
|
6290
|
+
*/
|
|
6291
|
+
getMarkerAtPosition(e, t, i) {
|
|
6292
|
+
e.setFromCamera(i, t);
|
|
6293
|
+
const n = e.intersectObjects(this.markerMeshes);
|
|
6294
|
+
return n.length > 0 ? n[0].object.userData.marker : null;
|
|
6295
|
+
}
|
|
6296
|
+
/**
|
|
6297
|
+
* Dispose of all resources
|
|
6298
|
+
*/
|
|
6299
|
+
dispose() {
|
|
6300
|
+
this.group.clear(), this.markerMaterial.dispose(), this.glowMaterial.dispose();
|
|
6301
|
+
for (const e of this.markerMeshes)
|
|
6302
|
+
e.geometry.dispose(), e.material !== this.markerMaterial && e.material.dispose();
|
|
6303
|
+
for (const e of this.glowMeshes)
|
|
6304
|
+
e.geometry.dispose(), e.material !== this.glowMaterial && e.material.dispose();
|
|
6305
|
+
this.markerMeshes = [], this.glowMeshes = [];
|
|
6306
|
+
}
|
|
6307
|
+
}
|
|
6308
|
+
const wi = {
|
|
6115
6309
|
lifeExpectancy: {
|
|
6116
6310
|
id: "lifeExpectancy",
|
|
6117
6311
|
name: "Life Expectancy",
|
|
@@ -6222,14 +6416,14 @@ void main() {
|
|
|
6222
6416
|
}
|
|
6223
6417
|
};
|
|
6224
6418
|
wi.lifeExpectancy;
|
|
6225
|
-
const
|
|
6419
|
+
const An = {
|
|
6226
6420
|
satellite: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_atmos_2048.jpg",
|
|
6227
6421
|
natural: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_day_4096.jpg",
|
|
6228
6422
|
dark: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
6229
6423
|
light: "https://raw.githubusercontent.com/turban/webgl-earth/master/images/2_no_clouds_4k.jpg",
|
|
6230
6424
|
night: "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/textures/planets/earth_lights_2048.png",
|
|
6231
6425
|
topographic: "https://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74117/world.topo.200407.3x5400x2700.jpg"
|
|
6232
|
-
},
|
|
6426
|
+
}, Sn = {
|
|
6233
6427
|
texture: "satellite",
|
|
6234
6428
|
labels: "all",
|
|
6235
6429
|
statistic: "lifeExpectancy",
|
|
@@ -6245,7 +6439,7 @@ const Cn = {
|
|
|
6245
6439
|
},
|
|
6246
6440
|
extrudeHeight: !1
|
|
6247
6441
|
};
|
|
6248
|
-
class
|
|
6442
|
+
class Po {
|
|
6249
6443
|
container;
|
|
6250
6444
|
config;
|
|
6251
6445
|
// Three.js core
|
|
@@ -6264,7 +6458,8 @@ class xo {
|
|
|
6264
6458
|
legend = null;
|
|
6265
6459
|
exporter = null;
|
|
6266
6460
|
countryLabels = null;
|
|
6267
|
-
|
|
6461
|
+
markerLayer = null;
|
|
6462
|
+
textureLoader = new A.TextureLoader();
|
|
6268
6463
|
dataTexture = null;
|
|
6269
6464
|
// State
|
|
6270
6465
|
morph = 0;
|
|
@@ -6287,16 +6482,20 @@ class xo {
|
|
|
6287
6482
|
} else
|
|
6288
6483
|
this.container = e;
|
|
6289
6484
|
this.config = {
|
|
6290
|
-
...
|
|
6485
|
+
...Sn,
|
|
6291
6486
|
...t,
|
|
6292
|
-
effects: { ...
|
|
6487
|
+
effects: { ...Sn.effects, ...t.effects }
|
|
6293
6488
|
}, this.ready = new Promise((i) => {
|
|
6294
6489
|
this.resolveReady = i;
|
|
6295
6490
|
}), this.init();
|
|
6296
6491
|
}
|
|
6297
6492
|
async init() {
|
|
6298
6493
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
6299
|
-
this.scene = new
|
|
6494
|
+
this.scene = new A.Scene(), this.scene.background = new A.Color(2066), this.camera = new A.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(
|
|
6495
|
+
0,
|
|
6496
|
+
0,
|
|
6497
|
+
this.config.initialView === "flat" ? 350 : 150
|
|
6498
|
+
), this.renderer = new A.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new fa(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Ua(), this.config.showLegend && (this.legend = new co(this.container)), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new ja(this.container, _e), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new lo(this.renderer, this.scene, this.camera), this.legend && this.exporter.setLegendElement(this.legend.getElement()), this.countryLabels && this.exporter.setCountryLabels(this.countryLabels), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), document.addEventListener("fullscreenchange", this.handleFullscreenChange), this.renderer.domElement.tabIndex = 0, this.renderer.domElement.style.outline = "none", this.renderer.domElement.addEventListener("mousedown", () => {
|
|
6300
6499
|
this.renderer.domElement.focus();
|
|
6301
6500
|
}), this.renderer.domElement.addEventListener("keydown", this.handleKeydown), this.animate(), this.resolveReady();
|
|
6302
6501
|
}
|
|
@@ -6306,20 +6505,20 @@ class xo {
|
|
|
6306
6505
|
};
|
|
6307
6506
|
async createGlobe() {
|
|
6308
6507
|
const e = await this.textureLoader.loadAsync(
|
|
6309
|
-
|
|
6508
|
+
An[this.config.texture]
|
|
6310
6509
|
);
|
|
6311
|
-
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter =
|
|
6510
|
+
e.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), e.minFilter = A.LinearMipmapLinearFilter, e.magFilter = A.LinearFilter;
|
|
6312
6511
|
const t = document.createElement("canvas");
|
|
6313
|
-
t.width = 2048, t.height = 1024, this.dataTexture = new
|
|
6314
|
-
const i = new
|
|
6315
|
-
Math.PI * 2 *
|
|
6316
|
-
Math.PI *
|
|
6512
|
+
t.width = 2048, t.height = 1024, this.dataTexture = new A.CanvasTexture(t);
|
|
6513
|
+
const i = new A.PlaneGeometry(
|
|
6514
|
+
Math.PI * 2 * _e,
|
|
6515
|
+
Math.PI * _e,
|
|
6317
6516
|
256,
|
|
6318
6517
|
128
|
|
6319
6518
|
);
|
|
6320
|
-
this.material = new
|
|
6321
|
-
vertexShader:
|
|
6322
|
-
fragmentShader:
|
|
6519
|
+
this.material = new A.ShaderMaterial({
|
|
6520
|
+
vertexShader: uo,
|
|
6521
|
+
fragmentShader: po,
|
|
6323
6522
|
uniforms: {
|
|
6324
6523
|
// Core uniforms
|
|
6325
6524
|
uMorph: { value: 0 },
|
|
@@ -6334,12 +6533,14 @@ class xo {
|
|
|
6334
6533
|
uDataOpacity: { value: 0 },
|
|
6335
6534
|
uDataOverlay: { value: 0 },
|
|
6336
6535
|
uExtrudeHeight: { value: this.config.extrudeHeight ? 1 : 0 },
|
|
6337
|
-
uSunDir: { value: new
|
|
6536
|
+
uSunDir: { value: new A.Vector3(1, 0.5, 1).normalize() },
|
|
6338
6537
|
// Effect uniforms
|
|
6339
6538
|
uClouds: { value: this.config.effects.clouds ? 1 : 0 },
|
|
6340
6539
|
uCloudSpeed: { value: this.config.effects.cloudSpeed || 1 },
|
|
6341
6540
|
uCloudOpacity: { value: this.config.effects.cloudOpacity || 0.6 },
|
|
6342
|
-
uAtmosphereIntensity: {
|
|
6541
|
+
uAtmosphereIntensity: {
|
|
6542
|
+
value: this.config.effects.atmosphereIntensity || 0
|
|
6543
|
+
},
|
|
6343
6544
|
uAurora: { value: this.config.effects.aurora ? 1 : 0 },
|
|
6344
6545
|
uAuroraIntensity: { value: 1 },
|
|
6345
6546
|
uCityLights: { value: this.config.effects.cityLights ? 1 : 0 },
|
|
@@ -6352,54 +6553,54 @@ class xo {
|
|
|
6352
6553
|
uScanEffect: { value: 0 },
|
|
6353
6554
|
uScanSpeed: { value: 1 },
|
|
6354
6555
|
uHologram: { value: this.config.effects.hologramMode ? 1 : 0 },
|
|
6355
|
-
uHologramColor: { value: new
|
|
6556
|
+
uHologramColor: { value: new A.Color(65535) },
|
|
6356
6557
|
uVintage: { value: this.config.effects.vintageMode ? 1 : 0 },
|
|
6357
6558
|
uThermal: { value: this.config.effects.thermalMode ? 1 : 0 },
|
|
6358
6559
|
uBlueprint: { value: this.config.effects.blueprintMode ? 1 : 0 },
|
|
6359
6560
|
uGlowPulse: { value: this.config.effects.glowPulse ? 1 : 0 },
|
|
6360
|
-
uGlowColor: { value: new
|
|
6561
|
+
uGlowColor: { value: new A.Color(4491519) }
|
|
6361
6562
|
},
|
|
6362
|
-
side:
|
|
6363
|
-
}), this.globe = new
|
|
6563
|
+
side: A.DoubleSide
|
|
6564
|
+
}), this.globe = new A.Mesh(i, this.material), this.scene.add(this.globe);
|
|
6364
6565
|
}
|
|
6365
6566
|
createAtmosphere() {
|
|
6366
|
-
const e = new
|
|
6367
|
-
Math.PI * 2 *
|
|
6368
|
-
Math.PI *
|
|
6567
|
+
const e = new A.PlaneGeometry(
|
|
6568
|
+
Math.PI * 2 * _e * 1.15,
|
|
6569
|
+
Math.PI * _e * 1.15,
|
|
6369
6570
|
128,
|
|
6370
6571
|
64
|
|
6371
|
-
), t = new
|
|
6372
|
-
vertexShader:
|
|
6373
|
-
fragmentShader:
|
|
6572
|
+
), t = new A.ShaderMaterial({
|
|
6573
|
+
vertexShader: fo,
|
|
6574
|
+
fragmentShader: mo,
|
|
6374
6575
|
uniforms: {
|
|
6375
6576
|
uMorph: { value: 0 }
|
|
6376
6577
|
},
|
|
6377
|
-
side:
|
|
6578
|
+
side: A.BackSide,
|
|
6378
6579
|
transparent: !0,
|
|
6379
|
-
blending:
|
|
6580
|
+
blending: A.AdditiveBlending,
|
|
6380
6581
|
depthWrite: !1
|
|
6381
6582
|
});
|
|
6382
|
-
this.atmosphere = new
|
|
6583
|
+
this.atmosphere = new A.Mesh(e, t), this.scene.add(this.atmosphere);
|
|
6383
6584
|
}
|
|
6384
6585
|
createStars() {
|
|
6385
|
-
const t = new
|
|
6586
|
+
const t = new A.BufferGeometry(), i = new Float32Array(3e3 * 3), n = new Float32Array(3e3), r = new Float32Array(3e3);
|
|
6386
6587
|
for (let o = 0; o < 3e3; o++) {
|
|
6387
6588
|
const l = 300 + Math.random() * 300, c = Math.random() * Math.PI * 2, h = Math.acos(2 * Math.random() - 1);
|
|
6388
6589
|
i[o * 3] = l * Math.sin(h) * Math.cos(c), i[o * 3 + 1] = l * Math.sin(h) * Math.sin(c), i[o * 3 + 2] = l * Math.cos(h), n[o] = 0.5 + Math.random() * 1.5, r[o] = Math.random() * Math.PI * 2;
|
|
6389
6590
|
}
|
|
6390
|
-
t.setAttribute("position", new
|
|
6391
|
-
const s = new
|
|
6392
|
-
vertexShader:
|
|
6393
|
-
fragmentShader:
|
|
6591
|
+
t.setAttribute("position", new A.BufferAttribute(i, 3)), t.setAttribute("aSize", new A.BufferAttribute(n, 1)), t.setAttribute("aPhase", new A.BufferAttribute(r, 1));
|
|
6592
|
+
const s = new A.ShaderMaterial({
|
|
6593
|
+
vertexShader: go,
|
|
6594
|
+
fragmentShader: _o,
|
|
6394
6595
|
uniforms: {
|
|
6395
6596
|
uTime: { value: 0 },
|
|
6396
6597
|
uTwinkle: { value: this.config.effects.starTwinkle ? 1 : 0 }
|
|
6397
6598
|
},
|
|
6398
6599
|
transparent: !0,
|
|
6399
|
-
blending:
|
|
6600
|
+
blending: A.AdditiveBlending,
|
|
6400
6601
|
depthWrite: !1
|
|
6401
6602
|
});
|
|
6402
|
-
this.stars = new
|
|
6603
|
+
this.stars = new A.Points(t, s), this.scene.add(this.stars);
|
|
6403
6604
|
}
|
|
6404
6605
|
createGUI() {
|
|
6405
6606
|
getComputedStyle(this.container).position === "static" && (this.container.style.position = "relative"), this.gui = new Gi({
|
|
@@ -6415,7 +6616,10 @@ class xo {
|
|
|
6415
6616
|
const n = this.gui.addFolder("Statistics"), r = Object.keys(wi);
|
|
6416
6617
|
n.add({ stat: this.config.statistic }, "stat", r).name("Statistic").onChange((l) => this.setStatistic(l));
|
|
6417
6618
|
const s = ["none", "minimal", "major", "all"];
|
|
6418
|
-
this.gui.addFolder("Display").add({ labels: this.config.labels }, "labels", s).name("Labels").onChange((l) => this.setLabels(l)), this.gui.add(this.config, "autoRotate").name("Auto Rotate"), this.gui.addFolder("Export").add(
|
|
6619
|
+
this.gui.addFolder("Display").add({ labels: this.config.labels }, "labels", s).name("Labels").onChange((l) => this.setLabels(l)), this.gui.add(this.config, "autoRotate").name("Auto Rotate"), this.gui.addFolder("Export").add(
|
|
6620
|
+
{ screenshot: () => this.screenshot({ width: 1920, height: 1080 }) },
|
|
6621
|
+
"screenshot"
|
|
6622
|
+
).name("📷 Screenshot");
|
|
6419
6623
|
}
|
|
6420
6624
|
handleResize = () => {
|
|
6421
6625
|
if (this.isDestroyed) return;
|
|
@@ -6429,7 +6633,7 @@ class xo {
|
|
|
6429
6633
|
if (this.isDestroyed) return;
|
|
6430
6634
|
this.animationId = requestAnimationFrame(this.animate);
|
|
6431
6635
|
const e = performance.now() * 1e-3;
|
|
6432
|
-
this.material && (this.material.uniforms.uTime.value = e), this.stars && (this.stars.material.uniforms.uTime.value = e), this.controls.update(), this.config.autoRotate && this.globe && (this.globe.rotation.y += 2e-3 * this.morph), this.countryLabels?.update(), this.renderer.render(this.scene, this.camera), this.countryLabels?.render(this.scene, this.camera);
|
|
6636
|
+
this.material && (this.material.uniforms.uTime.value = e), this.stars && (this.stars.material.uniforms.uTime.value = e), this.controls.update(), this.config.autoRotate && this.globe && (this.globe.rotation.y += 2e-3 * this.morph), this.countryLabels?.update(), this.markerLayer?.update(e), this.renderer.render(this.scene, this.camera), this.countryLabels?.render(this.scene, this.camera);
|
|
6433
6637
|
};
|
|
6434
6638
|
// Public API Implementation
|
|
6435
6639
|
toGlobe() {
|
|
@@ -6438,7 +6642,7 @@ class xo {
|
|
|
6438
6642
|
duration: 2.5,
|
|
6439
6643
|
ease: "power2.inOut",
|
|
6440
6644
|
onUpdate: () => {
|
|
6441
|
-
this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), this.config.onViewChange?.("globe", this.morph);
|
|
6645
|
+
this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), this.markerLayer?.setMorph(this.morph), this.config.onViewChange?.("globe", this.morph);
|
|
6442
6646
|
}
|
|
6443
6647
|
}), _t.to(this.camera.position, {
|
|
6444
6648
|
z: 150,
|
|
@@ -6452,7 +6656,7 @@ class xo {
|
|
|
6452
6656
|
duration: 2.5,
|
|
6453
6657
|
ease: "power2.inOut",
|
|
6454
6658
|
onUpdate: () => {
|
|
6455
|
-
this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), this.config.onViewChange?.("flat", this.morph);
|
|
6659
|
+
this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), this.markerLayer?.setMorph(this.morph), this.config.onViewChange?.("flat", this.morph);
|
|
6456
6660
|
}
|
|
6457
6661
|
}), _t.to(this.camera.position, {
|
|
6458
6662
|
z: 350,
|
|
@@ -6461,7 +6665,7 @@ class xo {
|
|
|
6461
6665
|
});
|
|
6462
6666
|
}
|
|
6463
6667
|
setMorph(e) {
|
|
6464
|
-
this.morph = Math.max(0, Math.min(1, e)), this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph);
|
|
6668
|
+
this.morph = Math.max(0, Math.min(1, e)), this.material && (this.material.uniforms.uMorph.value = this.morph), this.atmosphere && (this.atmosphere.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), this.markerLayer?.setMorph(this.morph);
|
|
6465
6669
|
}
|
|
6466
6670
|
getMorph() {
|
|
6467
6671
|
return this.morph;
|
|
@@ -6473,11 +6677,11 @@ class xo {
|
|
|
6473
6677
|
return;
|
|
6474
6678
|
}
|
|
6475
6679
|
this.currentStatistic = e;
|
|
6476
|
-
const i =
|
|
6680
|
+
const i = La.find((n) => n.id === e);
|
|
6477
6681
|
if (i && this.choropleth) {
|
|
6478
6682
|
const n = this.choropleth.renderTexture(i);
|
|
6479
6683
|
if (this.material && n) {
|
|
6480
|
-
const r = new
|
|
6684
|
+
const r = new A.CanvasTexture(n);
|
|
6481
6685
|
r.needsUpdate = !0, this.material.uniforms.uDataTexture.value = r, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
|
|
6482
6686
|
}
|
|
6483
6687
|
}
|
|
@@ -6491,7 +6695,7 @@ class xo {
|
|
|
6491
6695
|
t.definition.domain
|
|
6492
6696
|
);
|
|
6493
6697
|
if (this.material && i) {
|
|
6494
|
-
const n = new
|
|
6698
|
+
const n = new A.CanvasTexture(i);
|
|
6495
6699
|
n.needsUpdate = !0, this.material.uniforms.uDataTexture.value = n, this.material.uniforms.uDataOverlay.value = 1, this.material.uniforms.uDataOpacity.value = 0.7;
|
|
6496
6700
|
}
|
|
6497
6701
|
}
|
|
@@ -6502,11 +6706,11 @@ class xo {
|
|
|
6502
6706
|
this.countryLabels?.setStyle(e);
|
|
6503
6707
|
}
|
|
6504
6708
|
async setTexture(e) {
|
|
6505
|
-
const t =
|
|
6709
|
+
const t = An[e];
|
|
6506
6710
|
if (!(!t || !this.material))
|
|
6507
6711
|
try {
|
|
6508
6712
|
const i = await this.textureLoader.loadAsync(t);
|
|
6509
|
-
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter =
|
|
6713
|
+
i.anisotropy = this.renderer.capabilities.getMaxAnisotropy(), i.minFilter = A.LinearMipmapLinearFilter, i.magFilter = A.LinearFilter, this.material.uniforms.uTexture.value = i;
|
|
6510
6714
|
} catch (i) {
|
|
6511
6715
|
console.error("Failed to load texture:", e, i);
|
|
6512
6716
|
}
|
|
@@ -6533,6 +6737,9 @@ class xo {
|
|
|
6533
6737
|
setEffects(e) {
|
|
6534
6738
|
Object.assign(this.config.effects, e), this.material && (e.atmosphere !== void 0 && (e.atmosphere && !this.atmosphere ? this.createAtmosphere() : !e.atmosphere && this.atmosphere && (this.scene.remove(this.atmosphere), this.atmosphere.geometry.dispose(), this.atmosphere.material.dispose(), this.atmosphere = null)), e.clouds !== void 0 && (this.material.uniforms.uClouds.value = e.clouds ? 1 : 0), e.cloudSpeed !== void 0 && (this.material.uniforms.uCloudSpeed.value = e.cloudSpeed), e.cloudOpacity !== void 0 && (this.material.uniforms.uCloudOpacity.value = e.cloudOpacity), e.atmosphereIntensity !== void 0 && (this.material.uniforms.uAtmosphereIntensity.value = e.atmosphereIntensity), e.gridLines !== void 0 && (this.material.uniforms.uGridLines.value = e.gridLines ? 1 : 0), e.gridOpacity !== void 0 && (this.material.uniforms.uGridOpacity.value = e.gridOpacity), e.glowPulse !== void 0 && (this.material.uniforms.uGlowPulse.value = e.glowPulse ? 1 : 0), e.starTwinkle !== void 0 && this.stars && (this.stars.material.uniforms.uTwinkle.value = e.starTwinkle ? 1 : 0));
|
|
6535
6739
|
}
|
|
6740
|
+
setMarkers(e, t) {
|
|
6741
|
+
this.markerLayer ? t && this.markerLayer.setConfig(t) : (this.markerLayer = new vo(t), this.scene.add(this.markerLayer.getGroup()), this.markerLayer.setMorph(this.morph)), this.markerLayer.setMarkers(e);
|
|
6742
|
+
}
|
|
6536
6743
|
resize(e, t) {
|
|
6537
6744
|
this.config.width = e, this.config.height = t, this.handleResize();
|
|
6538
6745
|
}
|
|
@@ -6543,16 +6750,19 @@ class xo {
|
|
|
6543
6750
|
return document.fullscreenElement === this.container;
|
|
6544
6751
|
}
|
|
6545
6752
|
destroy() {
|
|
6546
|
-
this.isDestroyed = !0, this.animationId && cancelAnimationFrame(this.animationId), window.removeEventListener("resize", this.handleResize), window.removeEventListener("keydown", this.handleKeydown), document.removeEventListener(
|
|
6753
|
+
this.isDestroyed = !0, this.animationId && cancelAnimationFrame(this.animationId), window.removeEventListener("resize", this.handleResize), window.removeEventListener("keydown", this.handleKeydown), document.removeEventListener(
|
|
6754
|
+
"fullscreenchange",
|
|
6755
|
+
this.handleFullscreenChange
|
|
6756
|
+
), this.gui?.destroy(), this.legend?.dispose(), this.countryLabels?.dispose(), this.markerLayer?.dispose(), this.globe?.geometry.dispose(), this.globe?.material?.dispose(), this.atmosphere?.geometry.dispose(), this.atmosphere?.material?.dispose(), this.stars?.geometry.dispose(), this.stars?.material?.dispose(), this.renderer.dispose(), this.container.removeChild(this.renderer.domElement);
|
|
6547
6757
|
}
|
|
6548
6758
|
}
|
|
6549
6759
|
export {
|
|
6550
6760
|
wi as BUILT_IN_STATISTICS,
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6761
|
+
Po as GlobeViz,
|
|
6762
|
+
Mr as WORLD_STATISTICS,
|
|
6763
|
+
kr as createFormatter,
|
|
6764
|
+
wo as formatValue,
|
|
6765
|
+
ka as normalizeCountryValues,
|
|
6556
6766
|
gn as toNumericCode
|
|
6557
6767
|
};
|
|
6558
6768
|
//# sourceMappingURL=gralobe.js.map
|