-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchunk-3XZXVLAE.js
380 lines (308 loc) · 204 KB
/
chunk-3XZXVLAE.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
import{a as Rs,b as ea,c as ra,d as eh,e as ia,f as rh,g as qi,i as sa,j as na}from"./chunk-ID4YF2NP.js";import{a as ih}from"./chunk-GIEOXITA.js";import{a as ta}from"./chunk-KFOOQGOY.js";import{J as Jo,K as th,l as Zo,w as Ko}from"./chunk-LRGM5MED.js";import"./chunk-MG7CMGQF.js";import"./chunk-WXI33M2S.js";import{B as qo,Ea as $o,Gc as Qo,J as Ho,aa as jo,ga as Yi}from"./chunk-DXS2GHCC.js";function cr(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function fh(s,t){s.prototype=Object.create(t.prototype),s.prototype.constructor=s,s.__proto__=t}var we={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},yi={duration:.5,overwrite:!1,delay:0},Ma,Qt,ot,ze=1e8,et=1/ze,da=Math.PI*2,jf=da/4,$f=0,ch=Math.sqrt,Qf=Math.cos,Zf=Math.sin,Dt=function(t){return typeof t=="string"},gt=function(t){return typeof t=="function"},pr=function(t){return typeof t=="number"},Xs=function(t){return typeof t>"u"},ir=function(t){return typeof t=="object"},ve=function(t){return t!==!1},Ea=function(){return typeof window<"u"},Os=function(t){return gt(t)||Dt(t)},dh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Zt=Array.isArray,pa=/(?:-?\.?\d|\.)+/gi,Ca=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,$r=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,aa=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Aa=/[+-]=-?[.\d]+/,ph=/[^,'"\[\]\s]+/gi,Kf=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ut,er,ga,Sa,Se={},Is={},gh,_h=function(t){return(Is=jr(t,Se))&&Kt},Gs=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Ki=function(t,e){return!e&&console.warn(t)},mh=function(t,e){return t&&(Se[t]=e)&&Is&&(Is[t]=e)||Se},Ji=function(){return 0},Jf={suppressEvents:!0,isStart:!0,kill:!1},ks={suppressEvents:!0,kill:!1},tc={suppressEvents:!0},Da={},Dr=[],_a={},xh,xe={},oa={},sh=30,Ls=[],Pa="",Fa=function(t){var e=t[0],r,i;if(ir(e)||gt(e)||(t=[t]),!(r=(e._gsap||{}).harness)){for(i=Ls.length;i--&&!Ls[i].targetTest(e););r=Ls[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new ka(t[i],r)))||t.splice(i,1);return t},Pr=function(t){return t._gsap||Fa(Ie(t))[0]._gsap},Ra=function(t,e,r){return(r=t[e])&>(r)?t[e]():Xs(r)&&t.getAttribute&&t.getAttribute(e)||r},ae=function(t,e){return(t=t.split(",")).forEach(e)||t},_t=function(t){return Math.round(t*1e5)/1e5||0},Lt=function(t){return Math.round(t*1e7)/1e7||0},Qr=function(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),r==="+"?t+i:r==="-"?t-i:r==="*"?t*i:t/i},ec=function(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r},Ns=function(){var t=Dr.length,e=Dr.slice(0),r,i;for(_a={},Dr.length=0,r=0;r<t;r++)i=e[r],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},yh=function(t,e,r,i){Dr.length&&!Qt&&Ns(),t.render(e,r,i||Qt&&e<0&&(t._initted||t._startAt)),Dr.length&&!Qt&&Ns()},vh=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(ph).length<2?e:Dt(t)?t.trim():t},wh=function(t){return t},Ne=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},rc=function(t){return function(e,r){for(var i in r)i in e||i==="duration"&&t||i==="ease"||(e[i]=r[i])}},jr=function(t,e){for(var r in e)t[r]=e[r];return t},nh=function s(t,e){for(var r in e)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(t[r]=ir(e[r])?s(t[r]||(t[r]={}),e[r]):e[r]);return t},Bs=function(t,e){var r={},i;for(i in t)i in e||(r[i]=t[i]);return r},$i=function(t){var e=t.parent||ut,r=t.keyframes?rc(Zt(t.keyframes)):Ne;if(ve(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t},ic=function(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0},bh=function(t,e,r,i,n){r===void 0&&(r="_first"),i===void 0&&(i="_last");var a=t[i],o;if(n)for(o=e[n];a&&a[n]>o;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=a,e.parent=e._dp=t,e},Ws=function(t,e,r,i){r===void 0&&(r="_first"),i===void 0&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null},Fr=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Yr=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},sc=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},ma=function(t,e,r,i){return t._startAt&&(Qt?t._startAt.revert(ks):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},nc=function s(t){return!t||t._ts&&s(t.parent)},ah=function(t){return t._repeat?vi(t._tTime,t=t.duration()+t._rDelay)*t:0},vi=function(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},Vs=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Ys=function(t){return t._end=Lt(t._start+(t._tDur/Math.abs(t._ts||t._rts||et)||0))},qs=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=Lt(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ys(t),r._dirty||Yr(r,t)),t},Th=function(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Vs(t.rawTime(),e),(!e._dur||rs(0,e.totalDuration(),r)-e._tTime>et)&&e.render(r,!0)),Yr(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-et}},rr=function(t,e,r,i){return e.parent&&Fr(e),e._start=Lt((pr(r)?r:r||t!==ut?Le(t,r,e):t._time)+e._delay),e._end=Lt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),bh(t,e,"_first","_last",t._sort?"_start":0),xa(e)||(t._recent=e),i||Th(t,e),t._ts<0&&qs(t,t._tTime),t},Mh=function(t,e){return(Se.ScrollTrigger||Gs("scrollTrigger",e))&&Se.ScrollTrigger.create(e,t)},Eh=function(t,e,r,i,n){if(Ia(t,e,n),!t._initted)return 1;if(!r&&t._pt&&!Qt&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&xh!==ye.frame)return Dr.push(t),t._lazy=[n,i],1},ac=function s(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||s(e))},xa=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},oc=function(t,e,r,i){var n=t.ratio,a=e<0||!e&&(!t._start&&ac(t)&&!(!t._initted&&xa(t))||(t._ts<0||t._dp._ts<0)&&!xa(t))?0:1,o=t._rDelay,h=0,l,u,c;if(o&&t._repeat&&(h=rs(0,t._tDur,e),u=vi(h,o),t._yoyo&&u&1&&(a=1-a),u!==vi(t._tTime,o)&&(n=1-a,t.vars.repeatRefresh&&t._initted&&t.invalidate())),a!==n||Qt||i||t._zTime===et||!e&&t._zTime){if(!t._initted&&Eh(t,e,i,r,h))return;for(c=t._zTime,t._zTime=e||(r?et:0),r||(r=e&&!c),t.ratio=a,t._from&&(a=1-a),t._time=0,t._tTime=h,l=t._pt;l;)l.r(a,l.d),l=l._next;e<0&&ma(t,e,r,!0),t._onUpdate&&!r&&Ae(t,"onUpdate"),h&&t._repeat&&!r&&t.parent&&Ae(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===a&&(a&&Fr(t,1),!r&&!Qt&&(Ae(t,a?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},hc=function(t,e,r){var i;if(r>e)for(i=t._first;i&&i._start<=r;){if(i.data==="isPause"&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if(i.data==="isPause"&&i._start<e)return i;i=i._prev}},wi=function(t,e,r,i){var n=t._repeat,a=Lt(e)||0,o=t._tTime/t._tDur;return o&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:Lt(a*(n+1)+t._rDelay*n):a,o>0&&!i&&qs(t,t._tTime=t._tDur*o),t.parent&&Ys(t),r||Yr(t.parent,t),t},oh=function(t){return t instanceof Gt?Yr(t):wi(t,t._dur)},lc={_start:0,endTime:Ji,totalDuration:Ji},Le=function s(t,e,r){var i=t.labels,n=t._recent||lc,a=t.duration()>=ze?n.endTime(!1):t._dur,o,h,l;return Dt(e)&&(isNaN(e)||e in i)?(h=e.charAt(0),l=e.substr(-1)==="%",o=e.indexOf("="),h==="<"||h===">"?(o>=0&&(e=e.replace(/=/,"")),(h==="<"?n._start:n.endTime(n._repeat>=0))+(parseFloat(e.substr(1))||0)*(l?(o<0?n:r).totalDuration()/100:1)):o<0?(e in i||(i[e]=a),i[e]):(h=parseFloat(e.charAt(o-1)+e.substr(o+1)),l&&r&&(h=h/100*(Zt(r)?r[0]:r).totalDuration()),o>1?s(t,e.substr(0,o-1),r)+h:a+h)):e==null?a:+e},Qi=function(t,e,r){var i=pr(e[1]),n=(i?2:1)+(t<2?0:1),a=e[n],o,h;if(i&&(a.duration=e[1]),a.parent=r,t){for(o=a,h=r;h&&!("immediateRender"in o);)o=h.vars.defaults||{},h=ve(h.vars.inherit)&&h.parent;a.immediateRender=ve(o.immediateRender),t<2?a.runBackwards=1:a.startAt=e[n-1]}return new wt(e[0],a,e[n+1])},Rr=function(t,e){return t||t===0?e(t):e},rs=function(t,e,r){return r<t?t:r>e?e:r},Wt=function(t,e){return!Dt(t)||!(e=Kf.exec(t))?"":e[1]},uc=function(t,e,r){return Rr(r,function(i){return rs(t,e,i)})},ya=[].slice,Ch=function(t,e){return t&&ir(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&ir(t[0]))&&!t.nodeType&&t!==er},fc=function(t,e,r){return r===void 0&&(r=[]),t.forEach(function(i){var n;return Dt(i)&&!e||Ch(i,1)?(n=r).push.apply(n,Ie(i)):r.push(i)})||r},Ie=function(t,e,r){return ot&&!e&&ot.selector?ot.selector(t):Dt(t)&&!r&&(ga||!bi())?ya.call((e||Sa).querySelectorAll(t),0):Zt(t)?fc(t,r):Ch(t)?ya.call(t,0):t?[t]:[]},va=function(t){return t=Ie(t)[0]||Ki("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return Ie(e,r.querySelectorAll?r:r===t?Ki("Invalid scope")||Sa.createElement("div"):t)}},Ah=function(t){return t.sort(function(){return .5-Math.random()})},Sh=function(t){if(gt(t))return t;var e=ir(t)?t:{each:t},r=qr(e.ease),i=e.from||0,n=parseFloat(e.base)||0,a={},o=i>0&&i<1,h=isNaN(i)||o,l=e.axis,u=i,c=i;return Dt(i)?u=c={center:.5,edges:.5,end:1}[i]||0:!o&&h&&(u=i[0],c=i[1]),function(d,f,g){var p=(g||e).length,_=a[p],m,v,w,x,b,T,M,S,C;if(!_){if(C=e.grid==="auto"?0:(e.grid||[1,ze])[1],!C){for(M=-ze;M<(M=g[C++].getBoundingClientRect().left)&&C<p;);C<p&&C--}for(_=a[p]=[],m=h?Math.min(C,p)*u-.5:i%C,v=C===ze?0:h?p*c/C-.5:i/C|0,M=0,S=ze,T=0;T<p;T++)w=T%C-m,x=v-(T/C|0),_[T]=b=l?Math.abs(l==="y"?x:w):ch(w*w+x*x),b>M&&(M=b),b<S&&(S=b);i==="random"&&Ah(_),_.max=M-S,_.min=S,_.v=p=(parseFloat(e.amount)||parseFloat(e.each)*(C>p?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(i==="edges"?-1:1),_.b=p<0?n-p:n,_.u=Wt(e.amount||e.each)||0,r=r&&p<0?Ih(r):r}return p=(_[d]-_.min)/_.max||0,Lt(_.b+(r?r(p):p)*_.v)+_.u}},wa=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var i=Lt(Math.round(parseFloat(r)/t)*t*e);return(i-i%1)/e+(pr(r)?0:Wt(r))}},Dh=function(t,e){var r=Zt(t),i,n;return!r&&ir(t)&&(i=r=t.radius||ze,t.values?(t=Ie(t.values),(n=!pr(t[0]))&&(i*=i)):t=wa(t.increment)),Rr(e,r?gt(t)?function(a){return n=t(a),Math.abs(n-a)<=i?n:a}:function(a){for(var o=parseFloat(n?a.x:a),h=parseFloat(n?a.y:0),l=ze,u=0,c=t.length,d,f;c--;)n?(d=t[c].x-o,f=t[c].y-h,d=d*d+f*f):d=Math.abs(t[c]-o),d<l&&(l=d,u=c);return u=!i||l<=i?t[u]:a,n||u===a||pr(a)?u:u+Wt(a)}:wa(t))},Ph=function(t,e,r,i){return Rr(Zt(t)?!e:r===!0?!!(r=0):!i,function(){return Zt(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+r*.99))/r)*r*i)/i})},cc=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return e.reduce(function(n,a){return a(n)},i)}},dc=function(t,e){return function(r){return t(parseFloat(r))+(e||Wt(r))}},pc=function(t,e,r){return Rh(t,e,0,1,r)},Fh=function(t,e,r){return Rr(r,function(i){return t[~~e(i)]})},gc=function s(t,e,r){var i=e-t;return Zt(t)?Fh(t,s(0,t.length),e):Rr(r,function(n){return(i+(n-t)%i)%i+t})},_c=function s(t,e,r){var i=e-t,n=i*2;return Zt(t)?Fh(t,s(0,t.length-1),e):Rr(r,function(a){return a=(n+(a-t)%n)%n||0,t+(a>i?n-a:a)})},Ti=function(t){for(var e=0,r="",i,n,a,o;~(i=t.indexOf("random(",e));)a=t.indexOf(")",i),o=t.charAt(i+7)==="[",n=t.substr(i+7,a-i-7).match(o?ph:pa),r+=t.substr(e,i-e)+Ph(o?n:+n[0],o?0:+n[1],+n[2]||1e-5),e=a+1;return r+t.substr(e,t.length-e)},Rh=function(t,e,r,i,n){var a=e-t,o=i-r;return Rr(n,function(h){return r+((h-t)/a*o||0)})},mc=function s(t,e,r,i){var n=isNaN(t+e)?0:function(f){return(1-f)*t+f*e};if(!n){var a=Dt(t),o={},h,l,u,c,d;if(r===!0&&(i=1)&&(r=null),a)t={p:t},e={p:e};else if(Zt(t)&&!Zt(e)){for(u=[],c=t.length,d=c-2,l=1;l<c;l++)u.push(s(t[l-1],t[l]));c--,n=function(g){g*=c;var p=Math.min(d,~~g);return u[p](g-p)},r=e}else i||(t=jr(Zt(t)?[]:{},t));if(!u){for(h in e)La.call(o,t,h,"get",e[h]);n=function(g){return Va(g,o)||(a?t.p:t)}}}return Rr(r,n)},hh=function(t,e,r){var i=t.labels,n=ze,a,o,h;for(a in i)o=i[a]-e,o<0==!!r&&o&&n>(o=Math.abs(o))&&(h=a,n=o);return h},Ae=function(t,e,r){var i=t.vars,n=i[e],a=ot,o=t._ctx,h,l,u;if(n)return h=i[e+"Params"],l=i.callbackScope||t,r&&Dr.length&&Ns(),o&&(ot=o),u=h?n.apply(l,h):n.call(l),ot=a,u},Hi=function(t){return Fr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!Qt),t.progress()<1&&Ae(t,"onInterrupt"),t},xi,Oh=[],kh=function(t){if(t)if(t=!t.name&&t.default||t,Ea()||t.headless){var e=t.name,r=gt(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:Ji,render:Va,add:La,kill:Oc,modifier:Rc,rawVars:0},a={targetTest:0,get:0,getSetter:Hs,aliases:{},register:0};if(bi(),t!==i){if(xe[e])return;Ne(i,Ne(Bs(t,n),a)),jr(i.prototype,jr(n,Bs(t,a))),xe[i.prop=e]=i,t.targetTest&&(Ls.push(i),Da[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}mh(e,i),t.register&&t.register(Kt,i,oe)}else Oh.push(t)},tt=255,ji={aqua:[0,tt,tt],lime:[0,tt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,tt],navy:[0,0,128],white:[tt,tt,tt],olive:[128,128,0],yellow:[tt,tt,0],orange:[tt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[tt,0,0],pink:[tt,192,203],cyan:[0,tt,tt],transparent:[tt,tt,tt,0]},ha=function(t,e,r){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(r-e)*t*6:t<.5?r:t*3<2?e+(r-e)*(2/3-t)*6:e)*tt+.5|0},Lh=function(t,e,r){var i=t?pr(t)?[t>>16,t>>8&tt,t&tt]:0:ji.black,n,a,o,h,l,u,c,d,f,g;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),ji[t])i=ji[t];else if(t.charAt(0)==="#"){if(t.length<6&&(n=t.charAt(1),a=t.charAt(2),o=t.charAt(3),t="#"+n+n+a+a+o+o+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&tt,i&tt,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&tt,t&tt]}else if(t.substr(0,3)==="hsl"){if(i=g=t.match(pa),!e)h=+i[0]%360/360,l=+i[1]/100,u=+i[2]/100,a=u<=.5?u*(l+1):u+l-u*l,n=u*2-a,i.length>3&&(i[3]*=1),i[0]=ha(h+1/3,n,a),i[1]=ha(h,n,a),i[2]=ha(h-1/3,n,a);else if(~t.indexOf("="))return i=t.match(Ca),r&&i.length<4&&(i[3]=1),i}else i=t.match(pa)||ji.transparent;i=i.map(Number)}return e&&!g&&(n=i[0]/tt,a=i[1]/tt,o=i[2]/tt,c=Math.max(n,a,o),d=Math.min(n,a,o),u=(c+d)/2,c===d?h=l=0:(f=c-d,l=u>.5?f/(2-c-d):f/(c+d),h=c===n?(a-o)/f+(a<o?6:0):c===a?(o-n)/f+2:(n-a)/f+4,h*=60),i[0]=~~(h+.5),i[1]=~~(l*100+.5),i[2]=~~(u*100+.5)),r&&i.length<4&&(i[3]=1),i},zh=function(t){var e=[],r=[],i=-1;return t.split(dr).forEach(function(n){var a=n.match($r)||[];e.push.apply(e,a),r.push(i+=a.length+1)}),e.c=r,e},lh=function(t,e,r){var i="",n=(t+i).match(dr),a=e?"hsla(":"rgba(",o=0,h,l,u,c;if(!n)return t;if(n=n.map(function(d){return(d=Lh(d,e,1))&&a+(e?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),r&&(u=zh(t),h=r.c,h.join(i)!==u.c.join(i)))for(l=t.replace(dr,"1").split($r),c=l.length-1;o<c;o++)i+=l[o]+(~h.indexOf(o)?n.shift()||a+"0,0,0,0)":(u.length?u:n.length?n:r).shift());if(!l)for(l=t.split(dr),c=l.length-1;o<c;o++)i+=l[o]+n[o];return i+l[c]},dr=function(){var s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in ji)s+="|"+t+"\\b";return new RegExp(s+")","gi")}(),xc=/hsl[a]?\(/,Oa=function(t){var e=t.join(" "),r;if(dr.lastIndex=0,dr.test(e))return r=xc.test(e),t[1]=lh(t[1],r),t[0]=lh(t[0],r,zh(t[1])),!0},ts,ye=function(){var s=Date.now,t=500,e=33,r=s(),i=r,n=1e3/240,a=n,o=[],h,l,u,c,d,f,g=function p(_){var m=s()-i,v=_===!0,w,x,b,T;if((m>t||m<0)&&(r+=m-e),i+=m,b=i-r,w=b-a,(w>0||v)&&(T=++c.frame,d=b-c.time*1e3,c.time=b=b/1e3,a+=w+(w>=n?4:n-w),x=1),v||(h=l(p)),x)for(f=0;f<o.length;f++)o[f](b,d,T,_)};return c={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(_){return d/(1e3/(_||60))},wake:function(){gh&&(!ga&&Ea()&&(er=ga=window,Sa=er.document||{},Se.gsap=Kt,(er.gsapVersions||(er.gsapVersions=[])).push(Kt.version),_h(Is||er.GreenSockGlobals||!er.gsap&&er||{}),Oh.forEach(kh)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,h&&c.sleep(),l=u||function(_){return setTimeout(_,a-c.time*1e3+1|0)},ts=1,g(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(h),ts=0,l=Ji},lagSmoothing:function(_,m){t=_||1/0,e=Math.min(m||33,t)},fps:function(_){n=1e3/(_||240),a=c.time*1e3+n},add:function(_,m,v){var w=m?function(x,b,T,M){_(x,b,T,M),c.remove(w)}:_;return c.remove(_),o[v?"unshift":"push"](w),bi(),w},remove:function(_,m){~(m=o.indexOf(_))&&o.splice(m,1)&&f>=m&&f--},_listeners:o},c}(),bi=function(){return!ts&&ye.wake()},j={},yc=/^[\d.\-M][\d.\-,\s]/,vc=/["']/g,wc=function(t){for(var e={},r=t.substr(1,t.length-3).split(":"),i=r[0],n=1,a=r.length,o,h,l;n<a;n++)h=r[n],o=n!==a-1?h.lastIndexOf(","):h.length,l=h.substr(0,o),e[i]=isNaN(l)?l.replace(vc,"").trim():+l,i=h.substr(o+1).trim();return e},bc=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)},Tc=function(t){var e=(t+"").split("("),r=j[e[0]];return r&&e.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[wc(e[1])]:bc(t).split(",").map(vh)):j._CE&&yc.test(t)?j._CE("",t):r},Ih=function(t){return function(e){return 1-t(1-e)}},Nh=function s(t,e){for(var r=t._first,i;r;)r instanceof Gt?s(r,e):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==e&&(r.timeline?s(r.timeline,e):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=e)),r=r._next},qr=function(t,e){return t&&(gt(t)?t:j[t]||Tc(t))||e},Zr=function(t,e,r,i){r===void 0&&(r=function(h){return 1-e(1-h)}),i===void 0&&(i=function(h){return h<.5?e(h*2)/2:1-e((1-h)*2)/2});var n={easeIn:e,easeOut:r,easeInOut:i},a;return ae(t,function(o){j[o]=Se[o]=n,j[a=o.toLowerCase()]=r;for(var h in n)j[a+(h==="easeIn"?".in":h==="easeOut"?".out":".inOut")]=j[o+"."+h]=n[h]}),n},Bh=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},la=function s(t,e,r){var i=e>=1?e:1,n=(r||(t?.3:.45))/(e<1?e:1),a=n/da*(Math.asin(1/i)||0),o=function(u){return u===1?1:i*Math.pow(2,-10*u)*Zf((u-a)*n)+1},h=t==="out"?o:t==="in"?function(l){return 1-o(1-l)}:Bh(o);return n=da/n,h.config=function(l,u){return s(t,l,u)},h},ua=function s(t,e){e===void 0&&(e=1.70158);var r=function(a){return a?--a*a*((e+1)*a+e)+1:0},i=t==="out"?r:t==="in"?function(n){return 1-r(1-n)}:Bh(r);return i.config=function(n){return s(t,n)},i};ae("Linear,Quad,Cubic,Quart,Quint,Strong",function(s,t){var e=t<5?t+1:t;Zr(s+",Power"+(e-1),t?function(r){return Math.pow(r,e)}:function(r){return r},function(r){return 1-Math.pow(1-r,e)},function(r){return r<.5?Math.pow(r*2,e)/2:1-Math.pow((1-r)*2,e)/2})});j.Linear.easeNone=j.none=j.Linear.easeIn;Zr("Elastic",la("in"),la("out"),la());(function(s,t){var e=1/t,r=2*e,i=2.5*e,n=function(o){return o<e?s*o*o:o<r?s*Math.pow(o-1.5/t,2)+.75:o<i?s*(o-=2.25/t)*o+.9375:s*Math.pow(o-2.625/t,2)+.984375};Zr("Bounce",function(a){return 1-n(1-a)},n)})(7.5625,2.75);Zr("Expo",function(s){return s?Math.pow(2,10*(s-1)):0});Zr("Circ",function(s){return-(ch(1-s*s)-1)});Zr("Sine",function(s){return s===1?1:-Qf(s*jf)+1});Zr("Back",ua("in"),ua("out"),ua());j.SteppedEase=j.steps=Se.SteppedEase={config:function(t,e){t===void 0&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0,a=1-et;return function(o){return((i*rs(0,a,o)|0)+n)*r}}};yi.ease=j["quad.out"];ae("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(s){return Pa+=s+","+s+"Params,"});var ka=function(t,e){this.id=$f++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Ra,this.set=e?e.getSetter:Hs},es=function(){function s(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,wi(this,+e.duration,1,1),this.data=e.data,ot&&(this._ctx=ot,ot.data.push(this)),ts||ye.wake()}var t=s.prototype;return t.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},t.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},t.totalDuration=function(r){return arguments.length?(this._dirty=0,wi(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(r,i){if(bi(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(qs(this,r),!n._dp||n.parent||Th(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&rr(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===et||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),yh(this,r,i)),this},t.time=function(r,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+ah(this))%(this._dur+this._rDelay)||(r?this._dur:0),i):this._time},t.totalProgress=function(r,i){return arguments.length?this.totalTime(this.totalDuration()*r,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(r,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+ah(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(r,i){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*n,i):this._repeat?vi(this._tTime,n)+1:1},t.timeScale=function(r,i){if(!arguments.length)return this._rts===-et?0:this._rts;if(this._rts===r)return this;var n=this.parent&&this._ts?Vs(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-et?0:this._rts,this.totalTime(rs(-Math.abs(this._delay),this._tDur,n),i!==!1),Ys(this),sc(this)},t.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(bi(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==et&&(this._tTime-=et)))),this):this._ps},t.startTime=function(r){if(arguments.length){this._start=r;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&rr(i,this,r-this._delay),this}return this._start},t.endTime=function(r){return this._start+(ve(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(r){var i=this.parent||this._dp;return i?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Vs(i.rawTime(r),this):this._tTime:this._tTime},t.revert=function(r){r===void 0&&(r=tc);var i=Qt;return Qt=r,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),Qt=i,this},t.globalTime=function(r){for(var i=this,n=arguments.length?r:i.rawTime();i;)n=i._start+n/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(r):n},t.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,oh(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(r){if(arguments.length){var i=this._time;return this._rDelay=r,oh(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},t.seek=function(r,i){return this.totalTime(Le(this,r),ve(i))},t.restart=function(r,i){return this.play().totalTime(r?-this._delay:0,ve(i))},t.play=function(r,i){return r!=null&&this.seek(r,i),this.reversed(!1).paused(!1)},t.reverse=function(r,i){return r!=null&&this.seek(r||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(r,i){return r!=null&&this.seek(r,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-et:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-et,this},t.isActive=function(){var r=this.parent||this._dp,i=this._start,n;return!!(!r||this._ts&&this._initted&&r.isActive()&&(n=r.rawTime(!0))>=i&&n<this.endTime(!0)-et)},t.eventCallback=function(r,i,n){var a=this.vars;return arguments.length>1?(i?(a[r]=i,n&&(a[r+"Params"]=n),r==="onUpdate"&&(this._onUpdate=i)):delete a[r],this):a[r]},t.then=function(r){var i=this;return new Promise(function(n){var a=gt(r)?r:wh,o=function(){var l=i.then;i.then=null,gt(a)&&(a=a(i))&&(a.then||a===i)&&(i.then=l),n(a),i.then=l};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?o():i._prom=o})},t.kill=function(){Hi(this)},s}();Ne(es.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-et,_prom:0,_ps:!1,_rts:1});var Gt=function(s){fh(t,s);function t(r,i){var n;return r===void 0&&(r={}),n=s.call(this,r)||this,n.labels={},n.smoothChildTiming=!!r.smoothChildTiming,n.autoRemoveChildren=!!r.autoRemoveChildren,n._sort=ve(r.sortChildren),ut&&rr(r.parent||ut,cr(n),i),r.reversed&&n.reverse(),r.paused&&n.paused(!0),r.scrollTrigger&&Mh(cr(n),r.scrollTrigger),n}var e=t.prototype;return e.to=function(i,n,a){return Qi(0,arguments,this),this},e.from=function(i,n,a){return Qi(1,arguments,this),this},e.fromTo=function(i,n,a,o){return Qi(2,arguments,this),this},e.set=function(i,n,a){return n.duration=0,n.parent=this,$i(n).repeatDelay||(n.repeat=0),n.immediateRender=!!n.immediateRender,new wt(i,n,Le(this,a),1),this},e.call=function(i,n,a){return rr(this,wt.delayedCall(0,i,n),a)},e.staggerTo=function(i,n,a,o,h,l,u){return a.duration=n,a.stagger=a.stagger||o,a.onComplete=l,a.onCompleteParams=u,a.parent=this,new wt(i,a,Le(this,h)),this},e.staggerFrom=function(i,n,a,o,h,l,u){return a.runBackwards=1,$i(a).immediateRender=ve(a.immediateRender),this.staggerTo(i,n,a,o,h,l,u)},e.staggerFromTo=function(i,n,a,o,h,l,u,c){return o.startAt=a,$i(o).immediateRender=ve(o.immediateRender),this.staggerTo(i,n,o,h,l,u,c)},e.render=function(i,n,a){var o=this._time,h=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=i<=0?0:Lt(i),c=this._zTime<0!=i<0&&(this._initted||!l),d,f,g,p,_,m,v,w,x,b,T,M;if(this!==ut&&u>h&&i>=0&&(u=h),u!==this._tTime||a||c){if(o!==this._time&&l&&(u+=this._time-o,i+=this._time-o),d=u,x=this._start,w=this._ts,m=!w,c&&(l||(o=this._zTime),(i||!n)&&(this._zTime=i)),this._repeat){if(T=this._yoyo,_=l+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(_*100+i,n,a);if(d=Lt(u%_),u===h?(p=this._repeat,d=l):(p=~~(u/_),p&&p===u/_&&(d=l,p--),d>l&&(d=l)),b=vi(this._tTime,_),!o&&this._tTime&&b!==p&&this._tTime-b*_-this._dur<=0&&(b=p),T&&p&1&&(d=l-d,M=1),p!==b&&!this._lock){var S=T&&b&1,C=S===(T&&p&1);if(p<b&&(S=!S),o=S?0:u%l?l:u,this._lock=1,this.render(o||(M?0:Lt(p*_)),n,!l)._lock=0,this._tTime=u,!n&&this.parent&&Ae(this,"onRepeat"),this.vars.repeatRefresh&&!M&&(this.invalidate()._lock=1),o&&o!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(l=this._dur,h=this._tDur,C&&(this._lock=2,o=S?l:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!M&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;Nh(this,M)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=hc(this,Lt(o),Lt(d)),v&&(u-=d-(d=v._start))),this._tTime=u,this._time=d,this._act=!w,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,o=0),!o&&d&&!n&&!p&&(Ae(this,"onStart"),this._tTime!==u))return this;if(d>=o&&i>=0)for(f=this._first;f;){if(g=f._next,(f._act||d>=f._start)&&f._ts&&v!==f){if(f.parent!==this)return this.render(i,n,a);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,n,a),d!==this._time||!this._ts&&!m){v=0,g&&(u+=this._zTime=-et);break}}f=g}else{f=this._last;for(var A=i<0?i:d;f;){if(g=f._prev,(f._act||A<=f._end)&&f._ts&&v!==f){if(f.parent!==this)return this.render(i,n,a);if(f.render(f._ts>0?(A-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(A-f._start)*f._ts,n,a||Qt&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!m){v=0,g&&(u+=this._zTime=A?-et:et);break}}f=g}}if(v&&!n&&(this.pause(),v.render(d>=o?0:-et)._zTime=d>=o?1:-1,this._ts))return this._start=x,Ys(this),this.render(i,n,a);this._onUpdate&&!n&&Ae(this,"onUpdate",!0),(u===h&&this._tTime>=this.totalDuration()||!u&&o)&&(x===this._start||Math.abs(w)!==Math.abs(this._ts))&&(this._lock||((i||!l)&&(u===h&&this._ts>0||!u&&this._ts<0)&&Fr(this,1),!n&&!(i<0&&!o)&&(u||o||!h)&&(Ae(this,u===h&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<h&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,n){var a=this;if(pr(n)||(n=Le(this,n,i)),!(i instanceof es)){if(Zt(i))return i.forEach(function(o){return a.add(o,n)}),this;if(Dt(i))return this.addLabel(i,n);if(gt(i))i=wt.delayedCall(0,i);else return this}return this!==i?rr(this,i,n):this},e.getChildren=function(i,n,a,o){i===void 0&&(i=!0),n===void 0&&(n=!0),a===void 0&&(a=!0),o===void 0&&(o=-ze);for(var h=[],l=this._first;l;)l._start>=o&&(l instanceof wt?n&&h.push(l):(a&&h.push(l),i&&h.push.apply(h,l.getChildren(!0,n,a)))),l=l._next;return h},e.getById=function(i){for(var n=this.getChildren(1,1,1),a=n.length;a--;)if(n[a].vars.id===i)return n[a]},e.remove=function(i){return Dt(i)?this.removeLabel(i):gt(i)?this.killTweensOf(i):(Ws(this,i),i===this._recent&&(this._recent=this._last),Yr(this))},e.totalTime=function(i,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Lt(ye.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),s.prototype.totalTime.call(this,i,n),this._forcing=0,this):this._tTime},e.addLabel=function(i,n){return this.labels[i]=Le(this,n),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,n,a){var o=wt.delayedCall(0,n||Ji,a);return o.data="isPause",this._hasPause=1,rr(this,o,Le(this,i))},e.removePause=function(i){var n=this._first;for(i=Le(this,i);n;)n._start===i&&n.data==="isPause"&&Fr(n),n=n._next},e.killTweensOf=function(i,n,a){for(var o=this.getTweensOf(i,a),h=o.length;h--;)Sr!==o[h]&&o[h].kill(i,n);return this},e.getTweensOf=function(i,n){for(var a=[],o=Ie(i),h=this._first,l=pr(n),u;h;)h instanceof wt?ec(h._targets,o)&&(l?(!Sr||h._initted&&h._ts)&&h.globalTime(0)<=n&&h.globalTime(h.totalDuration())>n:!n||h.isActive())&&a.push(h):(u=h.getTweensOf(o,n)).length&&a.push.apply(a,u),h=h._next;return a},e.tweenTo=function(i,n){n=n||{};var a=this,o=Le(a,i),h=n,l=h.startAt,u=h.onStart,c=h.onStartParams,d=h.immediateRender,f,g=wt.to(a,Ne({ease:n.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:n.duration||Math.abs((o-(l&&"time"in l?l.time:a._time))/a.timeScale())||et,onStart:function(){if(a.pause(),!f){var _=n.duration||Math.abs((o-(l&&"time"in l?l.time:a._time))/a.timeScale());g._dur!==_&&wi(g,_,0,1).render(g._time,!0,!0),f=1}u&&u.apply(g,c||[])}},n));return d?g.render(0):g},e.tweenFromTo=function(i,n,a){return this.tweenTo(n,Ne({startAt:{time:Le(this,i)}},a))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),hh(this,Le(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),hh(this,Le(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+et)},e.shiftChildren=function(i,n,a){a===void 0&&(a=0);for(var o=this._first,h=this.labels,l;o;)o._start>=a&&(o._start+=i,o._end+=i),o=o._next;if(n)for(l in h)h[l]>=a&&(h[l]+=i);return Yr(this)},e.invalidate=function(i){var n=this._first;for(this._lock=0;n;)n.invalidate(i),n=n._next;return s.prototype.invalidate.call(this,i)},e.clear=function(i){i===void 0&&(i=!0);for(var n=this._first,a;n;)a=n._next,this.remove(n),n=a;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),Yr(this)},e.totalDuration=function(i){var n=0,a=this,o=a._last,h=ze,l,u,c;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-i:i));if(a._dirty){for(c=a.parent;o;)l=o._prev,o._dirty&&o.totalDuration(),u=o._start,u>h&&a._sort&&o._ts&&!a._lock?(a._lock=1,rr(a,o,u-o._delay,1)._lock=0):h=u,u<0&&o._ts&&(n-=u,(!c&&!a._dp||c&&c.smoothChildTiming)&&(a._start+=u/a._ts,a._time-=u,a._tTime-=u),a.shiftChildren(-u,!1,-1/0),h=0),o._end>n&&o._ts&&(n=o._end),o=l;wi(a,a===ut&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},t.updateRoot=function(i){if(ut._ts&&(yh(ut,Vs(i,ut)),xh=ye.frame),ye.frame>=sh){sh+=we.autoSleep||120;var n=ut._first;if((!n||!n._ts)&&we.autoSleep&&ye._listeners.length<2){for(;n&&!n._ts;)n=n._next;n||ye.sleep()}}},t}(es);Ne(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});var Mc=function(t,e,r,i,n,a,o){var h=new oe(this._pt,t,e,0,1,Ba,null,n),l=0,u=0,c,d,f,g,p,_,m,v;for(h.b=r,h.e=i,r+="",i+="",(m=~i.indexOf("random("))&&(i=Ti(i)),a&&(v=[r,i],a(v,t,e),r=v[0],i=v[1]),d=r.match(aa)||[];c=aa.exec(i);)g=c[0],p=i.substring(l,c.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),g!==d[u++]&&(_=parseFloat(d[u-1])||0,h._pt={_next:h._pt,p:p||u===1?p:",",s:_,c:g.charAt(1)==="="?Qr(_,g)-_:parseFloat(g)-_,m:f&&f<4?Math.round:0},l=aa.lastIndex);return h.c=l<i.length?i.substring(l,i.length):"",h.fp=o,(Aa.test(i)||m)&&(h.e=0),this._pt=h,h},La=function(t,e,r,i,n,a,o,h,l,u){gt(i)&&(i=i(n||0,t,a));var c=t[e],d=r!=="get"?r:gt(c)?l?t[e.indexOf("set")||!gt(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():c,f=gt(c)?l?Dc:Xh:Na,g;if(Dt(i)&&(~i.indexOf("random(")&&(i=Ti(i)),i.charAt(1)==="="&&(g=Qr(d,i)+(Wt(d)||0),(g||g===0)&&(i=g))),!u||d!==i||ba)return!isNaN(d*i)&&i!==""?(g=new oe(this._pt,t,e,+d||0,i-(d||0),typeof c=="boolean"?Fc:Gh,0,f),l&&(g.fp=l),o&&g.modifier(o,this,t),this._pt=g):(!c&&!(e in t)&&Gs(e,i),Mc.call(this,t,e,d,i,f,h||we.stringFilter,l))},Ec=function(t,e,r,i,n){if(gt(t)&&(t=Zi(t,n,e,r,i)),!ir(t)||t.style&&t.nodeType||Zt(t)||dh(t))return Dt(t)?Zi(t,n,e,r,i):t;var a={},o;for(o in t)a[o]=Zi(t[o],n,e,r,i);return a},za=function(t,e,r,i,n,a){var o,h,l,u;if(xe[t]&&(o=new xe[t]).init(n,o.rawVars?e[t]:Ec(e[t],i,n,a,r),r,i,a)!==!1&&(r._pt=h=new oe(r._pt,n,t,0,1,o.render,o,0,o.priority),r!==xi))for(l=r._ptLookup[r._targets.indexOf(n)],u=o._props.length;u--;)l[o._props[u]]=h;return o},Sr,ba,Ia=function s(t,e,r){var i=t.vars,n=i.ease,a=i.startAt,o=i.immediateRender,h=i.lazy,l=i.onUpdate,u=i.runBackwards,c=i.yoyoEase,d=i.keyframes,f=i.autoRevert,g=t._dur,p=t._startAt,_=t._targets,m=t.parent,v=m&&m.data==="nested"?m.vars.targets:_,w=t._overwrite==="auto"&&!Ma,x=t.timeline,b,T,M,S,C,A,O,D,k,P,X,q,I;if(x&&(!d||!n)&&(n="none"),t._ease=qr(n,yi.ease),t._yEase=c?Ih(qr(c===!0?n:c,yi.ease)):0,c&&t._yoyo&&!t._repeat&&(c=t._yEase,t._yEase=t._ease,t._ease=c),t._from=!x&&!!i.runBackwards,!x||d&&!i.stagger){if(D=_[0]?Pr(_[0]).harness:0,q=D&&i[D.prop],b=Bs(i,Da),p&&(p._zTime<0&&p.progress(1),e<0&&u&&o&&!f?p.render(-1,!0):p.revert(u&&g?ks:Jf),p._lazy=0),a){if(Fr(t._startAt=wt.set(_,Ne({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!p&&ve(h),startAt:null,delay:0,onUpdate:l&&function(){return Ae(t,"onUpdate")},stagger:0},a))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Qt||!o&&!f)&&t._startAt.revert(ks),o&&g&&e<=0&&r<=0){e&&(t._zTime=e);return}}else if(u&&g&&!p){if(e&&(o=!1),M=Ne({overwrite:!1,data:"isFromStart",lazy:o&&!p&&ve(h),immediateRender:o,stagger:0,parent:m},b),q&&(M[D.prop]=q),Fr(t._startAt=wt.set(_,M)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Qt?t._startAt.revert(ks):t._startAt.render(-1,!0)),t._zTime=e,!o)s(t._startAt,et,et);else if(!e)return}for(t._pt=t._ptCache=0,h=g&&ve(h)||h&&!g,T=0;T<_.length;T++){if(C=_[T],O=C._gsap||Fa(_)[T]._gsap,t._ptLookup[T]=P={},_a[O.id]&&Dr.length&&Ns(),X=v===_?T:v.indexOf(C),D&&(k=new D).init(C,q||b,t,X,v)!==!1&&(t._pt=S=new oe(t._pt,C,k.name,0,1,k.render,k,0,k.priority),k._props.forEach(function(Q){P[Q]=S}),k.priority&&(A=1)),!D||q)for(M in b)xe[M]&&(k=za(M,b,t,X,C,v))?k.priority&&(A=1):P[M]=S=La.call(t,C,M,"get",b[M],X,v,0,i.stringFilter);t._op&&t._op[T]&&t.kill(C,t._op[T]),w&&t._pt&&(Sr=t,ut.killTweensOf(C,P,t.globalTime(e)),I=!t.parent,Sr=0),t._pt&&h&&(_a[O.id]=1)}A&&Ua(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!I,d&&e<=0&&x.render(ze,!0,!0)},Cc=function(t,e,r,i,n,a,o,h){var l=(t._pt&&t._ptCache||(t._ptCache={}))[e],u,c,d,f;if(!l)for(l=t._ptCache[e]=[],d=t._ptLookup,f=t._targets.length;f--;){if(u=d[f][e],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return ba=1,t.vars[e]="+=0",Ia(t,o),ba=0,h?Ki(e+" not eligible for reset"):1;l.push(u)}for(f=l.length;f--;)c=l[f],u=c._pt||c,u.s=(i||i===0)&&!n?i:u.s+(i||0)+a*u.c,u.c=r-u.s,c.e&&(c.e=_t(r)+Wt(c.e)),c.b&&(c.b=u.s+Wt(c.b))},Ac=function(t,e){var r=t[0]?Pr(t[0]).harness:0,i=r&&r.aliases,n,a,o,h;if(!i)return e;n=jr({},e);for(a in i)if(a in n)for(h=i[a].split(","),o=h.length;o--;)n[h[o]]=n[a];return n},Sc=function(t,e,r,i){var n=e.ease||i||"power1.inOut",a,o;if(Zt(e))o=r[t]||(r[t]=[]),e.forEach(function(h,l){return o.push({t:l/(e.length-1)*100,v:h,e:n})});else for(a in e)o=r[a]||(r[a]=[]),a==="ease"||o.push({t:parseFloat(t),v:e[a],e:n})},Zi=function(t,e,r,i,n){return gt(t)?t.call(e,r,i,n):Dt(t)&&~t.indexOf("random(")?Ti(t):t},Vh=Pa+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Uh={};ae(Vh+",id,stagger,delay,duration,paused,scrollTrigger",function(s){return Uh[s]=1});var wt=function(s){fh(t,s);function t(r,i,n,a){var o;typeof i=="number"&&(n.duration=i,i=n,n=null),o=s.call(this,a?i:$i(i))||this;var h=o.vars,l=h.duration,u=h.delay,c=h.immediateRender,d=h.stagger,f=h.overwrite,g=h.keyframes,p=h.defaults,_=h.scrollTrigger,m=h.yoyoEase,v=i.parent||ut,w=(Zt(r)||dh(r)?pr(r[0]):"length"in i)?[r]:Ie(r),x,b,T,M,S,C,A,O;if(o._targets=w.length?Fa(w):Ki("GSAP target "+r+" not found. https://gsap.com",!we.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=f,g||d||Os(l)||Os(u)){if(i=o.vars,x=o.timeline=new Gt({data:"nested",defaults:p||{},targets:v&&v.data==="nested"?v.vars.targets:w}),x.kill(),x.parent=x._dp=cr(o),x._start=0,d||Os(l)||Os(u)){if(M=w.length,A=d&&Sh(d),ir(d))for(S in d)~Vh.indexOf(S)&&(O||(O={}),O[S]=d[S]);for(b=0;b<M;b++)T=Bs(i,Uh),T.stagger=0,m&&(T.yoyoEase=m),O&&jr(T,O),C=w[b],T.duration=+Zi(l,cr(o),b,C,w),T.delay=(+Zi(u,cr(o),b,C,w)||0)-o._delay,!d&&M===1&&T.delay&&(o._delay=u=T.delay,o._start+=u,T.delay=0),x.to(C,T,A?A(b,C,w):0),x._ease=j.none;x.duration()?l=u=0:o.timeline=0}else if(g){$i(Ne(x.vars.defaults,{ease:"none"})),x._ease=qr(g.ease||i.ease||"none");var D=0,k,P,X;if(Zt(g))g.forEach(function(q){return x.to(w,q,">")}),x.duration();else{T={};for(S in g)S==="ease"||S==="easeEach"||Sc(S,g[S],T,g.easeEach);for(S in T)for(k=T[S].sort(function(q,I){return q.t-I.t}),D=0,b=0;b<k.length;b++)P=k[b],X={ease:P.e,duration:(P.t-(b?k[b-1].t:0))/100*l},X[S]=P.v,x.to(w,X,D),D+=X.duration;x.duration()<l&&x.to({},{duration:l-x.duration()})}}l||o.duration(l=x.duration())}else o.timeline=0;return f===!0&&!Ma&&(Sr=cr(o),ut.killTweensOf(w),Sr=0),rr(v,cr(o),n),i.reversed&&o.reverse(),i.paused&&o.paused(!0),(c||!l&&!g&&o._start===Lt(v._time)&&ve(c)&&nc(cr(o))&&v.data!=="nested")&&(o._tTime=-et,o.render(Math.max(0,-u)||0)),_&&Mh(cr(o),_),o}var e=t.prototype;return e.render=function(i,n,a){var o=this._time,h=this._tDur,l=this._dur,u=i<0,c=i>h-et&&!u?h:i<et?0:i,d,f,g,p,_,m,v,w,x;if(!l)oc(this,i,n,a);else if(c!==this._tTime||!i||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u){if(d=c,w=this.timeline,this._repeat){if(p=l+this._rDelay,this._repeat<-1&&u)return this.totalTime(p*100+i,n,a);if(d=Lt(c%p),c===h?(g=this._repeat,d=l):(g=~~(c/p),g&&g===Lt(c/p)&&(d=l,g--),d>l&&(d=l)),m=this._yoyo&&g&1,m&&(x=this._yEase,d=l-d),_=vi(this._tTime,p),d===o&&!a&&this._initted&&g===_)return this._tTime=c,this;g!==_&&(w&&this._yEase&&Nh(w,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==p&&this._initted&&(this._lock=a=1,this.render(Lt(p*g),!0).invalidate()._lock=0))}if(!this._initted){if(Eh(this,u?i:d,a,n,c))return this._tTime=0,this;if(o!==this._time&&!(a&&this.vars.repeatRefresh&&g!==_))return this;if(l!==this._dur)return this.render(i,n,a)}if(this._tTime=c,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=v=(x||this._ease)(d/l),this._from&&(this.ratio=v=1-v),d&&!o&&!n&&!g&&(Ae(this,"onStart"),this._tTime!==c))return this;for(f=this._pt;f;)f.r(v,f.d),f=f._next;w&&w.render(i<0?i:w._dur*w._ease(d/this._dur),n,a)||this._startAt&&(this._zTime=i),this._onUpdate&&!n&&(u&&ma(this,i,n,a),Ae(this,"onUpdate")),this._repeat&&g!==_&&this.vars.onRepeat&&!n&&this.parent&&Ae(this,"onRepeat"),(c===this._tDur||!c)&&this._tTime===c&&(u&&!this._onUpdate&&ma(this,i,!0,!0),(i||!l)&&(c===this._tDur&&this._ts>0||!c&&this._ts<0)&&Fr(this,1),!n&&!(u&&!o)&&(c||o||m)&&(Ae(this,c===h?"onComplete":"onReverseComplete",!0),this._prom&&!(c<h&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),s.prototype.invalidate.call(this,i)},e.resetTo=function(i,n,a,o,h){ts||ye.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Ia(this,l),u=this._ease(l/this._dur),Cc(this,i,n,a,o,u,l,h)?this.resetTo(i,n,a,o,1):(qs(this,0),this.parent||bh(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(i,n){if(n===void 0&&(n="all"),!i&&(!n||n==="all"))return this._lazy=this._pt=0,this.parent?Hi(this):this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(i,n,Sr&&Sr.vars.overwrite!==!0)._first||Hi(this),this.parent&&a!==this.timeline.totalDuration()&&wi(this,this._dur*this.timeline._tDur/a,0,1),this}var o=this._targets,h=i?Ie(i):o,l=this._ptLookup,u=this._pt,c,d,f,g,p,_,m;if((!n||n==="all")&&ic(o,h))return n==="all"&&(this._pt=0),Hi(this);for(c=this._op=this._op||[],n!=="all"&&(Dt(n)&&(p={},ae(n,function(v){return p[v]=1}),n=p),n=Ac(o,n)),m=o.length;m--;)if(~h.indexOf(o[m])){d=l[m],n==="all"?(c[m]=n,g=d,f={}):(f=c[m]=c[m]||{},g=n);for(p in g)_=d&&d[p],_&&((!("kill"in _.d)||_.d.kill(p)===!0)&&Ws(this,_,"_pt"),delete d[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&u&&Hi(this),this},t.to=function(i,n){return new t(i,n,arguments[2])},t.from=function(i,n){return Qi(1,arguments)},t.delayedCall=function(i,n,a,o){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:n,onReverseComplete:n,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:o})},t.fromTo=function(i,n,a){return Qi(2,arguments)},t.set=function(i,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(i,n)},t.killTweensOf=function(i,n,a){return ut.killTweensOf(i,n,a)},t}(es);Ne(wt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ae("staggerTo,staggerFrom,staggerFromTo",function(s){wt[s]=function(){var t=new Gt,e=ya.call(arguments,0);return e.splice(s==="staggerFromTo"?5:4,0,0),t[s].apply(t,e)}});var Na=function(t,e,r){return t[e]=r},Xh=function(t,e,r){return t[e](r)},Dc=function(t,e,r,i){return t[e](i.fp,r)},Pc=function(t,e,r){return t.setAttribute(e,r)},Hs=function(t,e){return gt(t[e])?Xh:Xs(t[e])&&t.setAttribute?Pc:Na},Gh=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},Fc=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Ba=function(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(t===1&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round((r.s+r.c*t)*1e4)/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},Va=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},Rc=function(t,e,r,i){for(var n=this._pt,a;n;)a=n._next,n.p===i&&n.modifier(t,e,r),n=a},Oc=function(t){for(var e=this._pt,r,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?Ws(this,e,"_pt"):e.dep||(r=1),e=i;return!r},kc=function(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)},Ua=function(t){for(var e=t._pt,r,i,n,a;e;){for(r=e._next,i=n;i&&i.pr>e.pr;)i=i._next;(e._prev=i?i._prev:a)?e._prev._next=e:n=e,(e._next=i)?i._prev=e:a=e,e=r}t._pt=n},oe=function(){function s(e,r,i,n,a,o,h,l,u){this.t=r,this.s=n,this.c=a,this.p=i,this.r=o||Gh,this.d=h||this,this.set=l||Na,this.pr=u||0,this._next=e,e&&(e._prev=this)}var t=s.prototype;return t.modifier=function(r,i,n){this.mSet=this.mSet||this.set,this.set=kc,this.m=r,this.mt=n,this.tween=i},s}();ae(Pa+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(s){return Da[s]=1});Se.TweenMax=Se.TweenLite=wt;Se.TimelineLite=Se.TimelineMax=Gt;ut=new Gt({sortChildren:!1,defaults:yi,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});we.stringFilter=Oa;var Hr=[],zs={},Lc=[],uh=0,zc=0,fa=function(t){return(zs[t]||Lc).map(function(e){return e()})},Ta=function(){var t=Date.now(),e=[];t-uh>2&&(fa("matchMediaInit"),Hr.forEach(function(r){var i=r.queries,n=r.conditions,a,o,h,l;for(o in i)a=er.matchMedia(i[o]).matches,a&&(h=1),a!==n[o]&&(n[o]=a,l=1);l&&(r.revert(),h&&e.push(r))}),fa("matchMediaRevert"),e.forEach(function(r){return r.onMatch(r,function(i){return r.add(null,i)})}),uh=t,fa("matchMedia"))},Wh=function(){function s(e,r){this.selector=r&&va(r),this.data=[],this._r=[],this.isReverted=!1,this.id=zc++,e&&this.add(e)}var t=s.prototype;return t.add=function(r,i,n){gt(r)&&(n=i,i=r,r=gt);var a=this,o=function(){var l=ot,u=a.selector,c;return l&&l!==a&&l.data.push(a),n&&(a.selector=va(n)),ot=a,c=i.apply(a,arguments),gt(c)&&a._r.push(c),ot=l,a.selector=u,a.isReverted=!1,c};return a.last=o,r===gt?o(a,function(h){return a.add(null,h)}):r?a[r]=o:o},t.ignore=function(r){var i=ot;ot=null,r(this),ot=i},t.getTweens=function(){var r=[];return this.data.forEach(function(i){return i instanceof s?r.push.apply(r,i.getTweens()):i instanceof wt&&!(i.parent&&i.parent.data==="nested")&&r.push(i)}),r},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(r,i){var n=this;if(r?function(){for(var o=n.getTweens(),h=n.data.length,l;h--;)l=n.data[h],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(u){return o.splice(o.indexOf(u),1)}));for(o.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,c){return c.g-u.g||-1/0}).forEach(function(u){return u.t.revert(r)}),h=n.data.length;h--;)l=n.data[h],l instanceof Gt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof wt)&&l.revert&&l.revert(r);n._r.forEach(function(u){return u(r,n)}),n.isReverted=!0}():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),i)for(var a=Hr.length;a--;)Hr[a].id===this.id&&Hr.splice(a,1)},t.revert=function(r){this.kill(r||{})},s}(),Ic=function(){function s(e){this.contexts=[],this.scope=e,ot&&ot.data.push(this)}var t=s.prototype;return t.add=function(r,i,n){ir(r)||(r={matches:r});var a=new Wh(0,n||this.scope),o=a.conditions={},h,l,u;ot&&!a.selector&&(a.selector=ot.selector),this.contexts.push(a),i=a.add("onMatch",i),a.queries=r;for(l in r)l==="all"?u=1:(h=er.matchMedia(r[l]),h&&(Hr.indexOf(a)<0&&Hr.push(a),(o[l]=h.matches)&&(u=1),h.addListener?h.addListener(Ta):h.addEventListener("change",Ta)));return u&&i(a,function(c){return a.add(null,c)}),this},t.revert=function(r){this.kill(r||{})},t.kill=function(r){this.contexts.forEach(function(i){return i.kill(r,!0)})},s}(),Us={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(i){return kh(i)})},timeline:function(t){return new Gt(t)},getTweensOf:function(t,e){return ut.getTweensOf(t,e)},getProperty:function(t,e,r,i){Dt(t)&&(t=Ie(t)[0]);var n=Pr(t||{}).get,a=r?wh:vh;return r==="native"&&(r=""),t&&(e?a((xe[e]&&xe[e].get||n)(t,e,r,i)):function(o,h,l){return a((xe[o]&&xe[o].get||n)(t,o,h,l))})},quickSetter:function(t,e,r){if(t=Ie(t),t.length>1){var i=t.map(function(u){return Kt.quickSetter(u,e,r)}),n=i.length;return function(u){for(var c=n;c--;)i[c](u)}}t=t[0]||{};var a=xe[e],o=Pr(t),h=o.harness&&(o.harness.aliases||{})[e]||e,l=a?function(u){var c=new a;xi._pt=0,c.init(t,r?u+r:u,xi,0,[t]),c.render(1,c),xi._pt&&Va(1,xi)}:o.set(t,h);return a?l:function(u){return l(t,h,r?u+r:u,o,1)}},quickTo:function(t,e,r){var i,n=Kt.to(t,jr((i={},i[e]="+=0.1",i.paused=!0,i),r||{})),a=function(h,l,u){return n.resetTo(e,h,l,u)};return a.tween=n,a},isTweening:function(t){return ut.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=qr(t.ease,yi.ease)),nh(yi,t||{})},config:function(t){return nh(we,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,i=t.plugins,n=t.defaults,a=t.extendTimeline;(i||"").split(",").forEach(function(o){return o&&!xe[o]&&!Se[o]&&Ki(e+" effect requires "+o+" plugin.")}),oa[e]=function(o,h,l){return r(Ie(o),Ne(h||{},n),l)},a&&(Gt.prototype[e]=function(o,h,l){return this.add(oa[e](o,ir(h)?h:(l=h)&&{},this),l)})},registerEase:function(t,e){j[t]=qr(e)},parseEase:function(t,e){return arguments.length?qr(t,e):j},getById:function(t){return ut.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var r=new Gt(t),i,n;for(r.smoothChildTiming=ve(t.smoothChildTiming),ut.remove(r),r._dp=0,r._time=r._tTime=ut._time,i=ut._first;i;)n=i._next,(e||!(!i._dur&&i instanceof wt&&i.vars.onComplete===i._targets[0]))&&rr(r,i,i._start-i._delay),i=n;return rr(ut,r,0),r},context:function(t,e){return t?new Wh(t,e):ot},matchMedia:function(t){return new Ic(t)},matchMediaRefresh:function(){return Hr.forEach(function(t){var e=t.conditions,r,i;for(i in e)e[i]&&(e[i]=!1,r=1);r&&t.revert()})||Ta()},addEventListener:function(t,e){var r=zs[t]||(zs[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=zs[t],i=r&&r.indexOf(e);i>=0&&r.splice(i,1)},utils:{wrap:gc,wrapYoyo:_c,distribute:Sh,random:Ph,snap:Dh,normalize:pc,getUnit:Wt,clamp:uc,splitColor:Lh,toArray:Ie,selector:va,mapRange:Rh,pipe:cc,unitize:dc,interpolate:mc,shuffle:Ah},install:_h,effects:oa,ticker:ye,updateRoot:Gt.updateRoot,plugins:xe,globalTimeline:ut,core:{PropTween:oe,globals:mh,Tween:wt,Timeline:Gt,Animation:es,getCache:Pr,_removeLinkedListItem:Ws,reverting:function(){return Qt},context:function(t){return t&&ot&&(ot.data.push(t),t._ctx=ot),ot},suppressOverwrites:function(t){return Ma=t}}};ae("to,from,fromTo,delayedCall,set,killTweensOf",function(s){return Us[s]=wt[s]});ye.add(Gt.updateRoot);xi=Us.to({},{duration:0});var Nc=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},Bc=function(t,e){var r=t._targets,i,n,a;for(i in e)for(n=r.length;n--;)a=t._ptLookup[n][i],a&&(a=a.d)&&(a._pt&&(a=Nc(a,i)),a&&a.modifier&&a.modifier(e[i],t,r[n],i))},ca=function(t,e){return{name:t,rawVars:1,init:function(i,n,a){a._onInit=function(o){var h,l;if(Dt(n)&&(h={},ae(n,function(u){return h[u]=1}),n=h),e){h={};for(l in n)h[l]=e(n[l]);n=h}Bc(o,n)}}}},Kt=Us.registerPlugin({name:"attr",init:function(t,e,r,i,n){var a,o,h;this.tween=r;for(a in e)h=t.getAttribute(a)||"",o=this.add(t,"setAttribute",(h||0)+"",e[a],i,n,0,0,a),o.op=a,o.b=h,this._props.push(a)},render:function(t,e){for(var r=e._pt;r;)Qt?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},ca("roundProps",wa),ca("modifiers"),ca("snap",Dh))||Us;wt.version=Gt.version=Kt.version="3.12.5";gh=1;Ea()&&bi();var Vc=j.Power0,Uc=j.Power1,Xc=j.Power2,Gc=j.Power3,Wc=j.Power4,Yc=j.Linear,qc=j.Quad,Hc=j.Cubic,jc=j.Quart,$c=j.Quint,Qc=j.Strong,Zc=j.Elastic,Kc=j.Back,Jc=j.SteppedEase,td=j.Bounce,ed=j.Sine,rd=j.Expo,id=j.Circ;var Yh,Or,Ei,ja,ei,sd,qh,$a,nd=function(){return typeof window<"u"},_r={},ti=180/Math.PI,Ci=Math.PI/180,Mi=Math.atan2,Hh=1e8,Qa=/([A-Z])/g,ad=/(left|right|width|margin|padding|x)/i,od=/[\s,\(]\S/,sr={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Wa=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},hd=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},ld=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},ud=function(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)},tl=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},el=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},fd=function(t,e,r){return t.style[e]=r},cd=function(t,e,r){return t.style.setProperty(e,r)},dd=function(t,e,r){return t._gsap[e]=r},pd=function(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r},gd=function(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)},_d=function(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)},ft="transform",be=ft+"Origin",md=function s(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in _r&&n){if(this.tfm=this.tfm||{},t!=="transform")t=sr[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return r.tfm[o]=gr(i,o)}):this.tfm[t]=a.x?a[t]:gr(i,t),t===be&&(this.tfm.zOrigin=a.zOrigin);else return sr.transform.split(",").forEach(function(o){return s.call(r,o,e)});if(this.props.indexOf(ft)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(be,e,"")),t=ft}(n||e)&&this.props.push(t,e,n[t])},rl=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},xd=function(){var t=this.props,e=this.target,r=e.style,i=e._gsap,n,a;for(n=0;n<t.length;n+=3)t[n+1]?e[t[n]]=t[n+2]:t[n+2]?r[t[n]]=t[n+2]:r.removeProperty(t[n].substr(0,2)==="--"?t[n]:t[n].replace(Qa,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)i[a]=this.tfm[a];i.svg&&(i.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),n=$a(),(!n||!n.isStart)&&!r[ft]&&(rl(r),i.zOrigin&&r[be]&&(r[be]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},il=function(t,e){var r={target:t,props:[],revert:xd,save:md};return t._gsap||Kt.core.getCache(t),e&&e.split(",").forEach(function(i){return r.save(i)}),r},sl,Ya=function(t,e){var r=Or.createElementNS?Or.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Or.createElement(t);return r&&r.style?r:Or.createElement(t)},nr=function s(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Qa,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&s(t,Ai(e)||e,1)||""},jh="O,Moz,ms,Ms,Webkit".split(","),Ai=function(t,e,r){var i=e||ei,n=i.style,a=5;if(t in n&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);a--&&!(jh[a]+t in n););return a<0?null:(a===3?"ms":a>=0?jh[a]:"")+t},qa=function(){nd()&&window.document&&(Yh=window,Or=Yh.document,Ei=Or.documentElement,ei=Ya("div")||{style:{}},sd=Ya("div"),ft=Ai(ft),be=ft+"Origin",ei.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",sl=!!Ai("perspective"),$a=Kt.core.reverting,ja=1)},Xa=function s(t){var e=Ya("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,i=this.nextSibling,n=this.style.cssText,a;if(Ei.appendChild(e),e.appendChild(this),this.style.display="block",t)try{a=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=s}catch{}else this._gsapBBox&&(a=this._gsapBBox());return r&&(i?r.insertBefore(this,i):r.appendChild(this)),Ei.removeChild(e),this.style.cssText=n,a},$h=function(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])},nl=function(t){var e;try{e=t.getBBox()}catch{e=Xa.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Xa||(e=Xa.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+$h(t,["x","cx","x1"])||0,y:+$h(t,["y","cy","y1"])||0,width:0,height:0}:e},al=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&nl(t))},ri=function(t,e){if(e){var r=t.style,i;e in _r&&e!==be&&(e=ft),r.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),r.removeProperty(i==="--"?e:e.replace(Qa,"-$1").toLowerCase())):r.removeAttribute(e)}},kr=function(t,e,r,i,n,a){var o=new oe(t._pt,e,r,0,1,a?el:tl);return t._pt=o,o.b=i,o.e=n,t._props.push(r),o},Qh={deg:1,rad:1,turn:1},yd={grid:1,flex:1},Lr=function s(t,e,r,i){var n=parseFloat(r)||0,a=(r+"").trim().substr((n+"").length)||"px",o=ei.style,h=ad.test(e),l=t.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(h?"Width":"Height"),c=100,d=i==="px",f=i==="%",g,p,_,m;if(i===a||!n||Qh[i]||Qh[a])return n;if(a!=="px"&&!d&&(n=s(t,e,r,"px")),m=t.getCTM&&al(t),(f||a==="%")&&(_r[e]||~e.indexOf("adius")))return g=m?t.getBBox()[h?"width":"height"]:t[u],_t(f?n/g*c:n/100*g);if(o[h?"width":"height"]=c+(d?a:i),p=~e.indexOf("adius")||i==="em"&&t.appendChild&&!l?t:t.parentNode,m&&(p=(t.ownerSVGElement||{}).parentNode),(!p||p===Or||!p.appendChild)&&(p=Or.body),_=p._gsap,_&&f&&_.width&&h&&_.time===ye.time&&!_.uncache)return _t(n/_.width*c);if(f&&(e==="height"||e==="width")){var v=t.style[e];t.style[e]=c+i,g=t[u],v?t.style[e]=v:ri(t,e)}else(f||a==="%")&&!yd[nr(p,"display")]&&(o.position=nr(t,"position")),p===t&&(o.position="static"),p.appendChild(ei),g=ei[u],p.removeChild(ei),o.position="absolute";return h&&f&&(_=Pr(p),_.time=ye.time,_.width=p[u]),_t(d?g*n/c:g&&n?c/g*n:0)},gr=function(t,e,r,i){var n;return ja||qa(),e in sr&&e!=="transform"&&(e=sr[e],~e.indexOf(",")&&(e=e.split(",")[0])),_r[e]&&e!=="transform"?(n=ns(t,i),n=e!=="transformOrigin"?n[e]:n.svg?n.origin:$s(nr(t,be))+" "+n.zOrigin+"px"):(n=t.style[e],(!n||n==="auto"||i||~(n+"").indexOf("calc("))&&(n=js[e]&&js[e](t,e,r)||nr(t,e)||Ra(t,e)||(e==="opacity"?1:0))),r&&!~(n+"").trim().indexOf(" ")?Lr(t,e,n,r)+r:n},vd=function(t,e,r,i){if(!r||r==="none"){var n=Ai(e,t,1),a=n&&nr(t,n,1);a&&a!==r?(e=n,r=a):e==="borderColor"&&(r=nr(t,"borderTopColor"))}var o=new oe(this._pt,t.style,e,0,1,Ba),h=0,l=0,u,c,d,f,g,p,_,m,v,w,x,b;if(o.b=r,o.e=i,r+="",i+="",i==="auto"&&(p=t.style[e],t.style[e]=i,i=nr(t,e)||i,p?t.style[e]=p:ri(t,e)),u=[r,i],Oa(u),r=u[0],i=u[1],d=r.match($r)||[],b=i.match($r)||[],b.length){for(;c=$r.exec(i);)_=c[0],v=i.substring(h,c.index),g?g=(g+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(g=1),_!==(p=d[l++]||"")&&(f=parseFloat(p)||0,x=p.substr((f+"").length),_.charAt(1)==="="&&(_=Qr(f,_)+x),m=parseFloat(_),w=_.substr((m+"").length),h=$r.lastIndex-w.length,w||(w=w||we.units[e]||x,h===i.length&&(i+=w,o.e+=w)),x!==w&&(f=Lr(t,e,p,w)||0),o._pt={_next:o._pt,p:v||l===1?v:",",s:f,c:m-f,m:g&&g<4||e==="zIndex"?Math.round:0});o.c=h<i.length?i.substring(h,i.length):""}else o.r=e==="display"&&i==="none"?el:tl;return Aa.test(i)&&(o.e=0),this._pt=o,o},Zh={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},wd=function(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(t=r,r=i,i=t),e[0]=Zh[r]||r,e[1]=Zh[i]||i,e.join(" ")},bd=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r=e.t,i=r.style,n=e.u,a=r._gsap,o,h,l;if(n==="all"||n===!0)i.cssText="",h=1;else for(n=n.split(","),l=n.length;--l>-1;)o=n[l],_r[o]&&(h=1,o=o==="transformOrigin"?be:ft),ri(r,o);h&&(ri(r,ft),a&&(a.svg&&r.removeAttribute("transform"),ns(r,1),a.uncache=1,rl(i)))}},js={clearProps:function(t,e,r,i,n){if(n.data!=="isFromStart"){var a=t._pt=new oe(t._pt,e,r,0,0,bd);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},ss=[1,0,0,1,0,0],ol={},hl=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Kh=function(t){var e=nr(t,ft);return hl(e)?ss:e.substr(7).match(Ca).map(_t)},Za=function(t,e){var r=t._gsap||Pr(t),i=t.style,n=Kh(t),a,o,h,l;return r.svg&&t.getAttribute("transform")?(h=t.transform.baseVal.consolidate().matrix,n=[h.a,h.b,h.c,h.d,h.e,h.f],n.join(",")==="1,0,0,1,0,0"?ss:n):(n===ss&&!t.offsetParent&&t!==Ei&&!r.svg&&(h=i.display,i.display="block",a=t.parentNode,(!a||!t.offsetParent)&&(l=1,o=t.nextElementSibling,Ei.appendChild(t)),n=Kh(t),h?i.display=h:ri(t,"display"),l&&(o?a.insertBefore(t,o):a?a.appendChild(t):Ei.removeChild(t))),e&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n)},Ha=function(t,e,r,i,n,a){var o=t._gsap,h=n||Za(t,!0),l=o.xOrigin||0,u=o.yOrigin||0,c=o.xOffset||0,d=o.yOffset||0,f=h[0],g=h[1],p=h[2],_=h[3],m=h[4],v=h[5],w=e.split(" "),x=parseFloat(w[0])||0,b=parseFloat(w[1])||0,T,M,S,C;r?h!==ss&&(M=f*_-g*p)&&(S=x*(_/M)+b*(-p/M)+(p*v-_*m)/M,C=x*(-g/M)+b*(f/M)-(f*v-g*m)/M,x=S,b=C):(T=nl(t),x=T.x+(~w[0].indexOf("%")?x/100*T.width:x),b=T.y+(~(w[1]||w[0]).indexOf("%")?b/100*T.height:b)),i||i!==!1&&o.smooth?(m=x-l,v=b-u,o.xOffset=c+(m*f+v*p)-m,o.yOffset=d+(m*g+v*_)-v):o.xOffset=o.yOffset=0,o.xOrigin=x,o.yOrigin=b,o.smooth=!!i,o.origin=e,o.originIsAbsolute=!!r,t.style[be]="0px 0px",a&&(kr(a,o,"xOrigin",l,x),kr(a,o,"yOrigin",u,b),kr(a,o,"xOffset",c,o.xOffset),kr(a,o,"yOffset",d,o.yOffset)),t.setAttribute("data-svg-origin",x+" "+b)},ns=function(t,e){var r=t._gsap||new ka(t);if("x"in r&&!e&&!r.uncache)return r;var i=t.style,n=r.scaleX<0,a="px",o="deg",h=getComputedStyle(t),l=nr(t,be)||"0",u,c,d,f,g,p,_,m,v,w,x,b,T,M,S,C,A,O,D,k,P,X,q,I,Q,rt,y,it,re,Xe,dt,Vt;return u=c=d=p=_=m=v=w=x=0,f=g=1,r.svg=!!(t.getCTM&&al(t)),h.translate&&((h.translate!=="none"||h.scale!=="none"||h.rotate!=="none")&&(i[ft]=(h.translate!=="none"?"translate3d("+(h.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(h.rotate!=="none"?"rotate("+h.rotate+") ":"")+(h.scale!=="none"?"scale("+h.scale.split(" ").join(",")+") ":"")+(h[ft]!=="none"?h[ft]:"")),i.scale=i.rotate=i.translate="none"),M=Za(t,r.svg),r.svg&&(r.uncache?(Q=t.getBBox(),l=r.xOrigin-Q.x+"px "+(r.yOrigin-Q.y)+"px",I=""):I=!e&&t.getAttribute("data-svg-origin"),Ha(t,I||l,!!I||r.originIsAbsolute,r.smooth!==!1,M)),b=r.xOrigin||0,T=r.yOrigin||0,M!==ss&&(O=M[0],D=M[1],k=M[2],P=M[3],u=X=M[4],c=q=M[5],M.length===6?(f=Math.sqrt(O*O+D*D),g=Math.sqrt(P*P+k*k),p=O||D?Mi(D,O)*ti:0,v=k||P?Mi(k,P)*ti+p:0,v&&(g*=Math.abs(Math.cos(v*Ci))),r.svg&&(u-=b-(b*O+T*k),c-=T-(b*D+T*P))):(Vt=M[6],Xe=M[7],y=M[8],it=M[9],re=M[10],dt=M[11],u=M[12],c=M[13],d=M[14],S=Mi(Vt,re),_=S*ti,S&&(C=Math.cos(-S),A=Math.sin(-S),I=X*C+y*A,Q=q*C+it*A,rt=Vt*C+re*A,y=X*-A+y*C,it=q*-A+it*C,re=Vt*-A+re*C,dt=Xe*-A+dt*C,X=I,q=Q,Vt=rt),S=Mi(-k,re),m=S*ti,S&&(C=Math.cos(-S),A=Math.sin(-S),I=O*C-y*A,Q=D*C-it*A,rt=k*C-re*A,dt=P*A+dt*C,O=I,D=Q,k=rt),S=Mi(D,O),p=S*ti,S&&(C=Math.cos(S),A=Math.sin(S),I=O*C+D*A,Q=X*C+q*A,D=D*C-O*A,q=q*C-X*A,O=I,X=Q),_&&Math.abs(_)+Math.abs(p)>359.9&&(_=p=0,m=180-m),f=_t(Math.sqrt(O*O+D*D+k*k)),g=_t(Math.sqrt(q*q+Vt*Vt)),S=Mi(X,q),v=Math.abs(S)>2e-4?S*ti:0,x=dt?1/(dt<0?-dt:dt):0),r.svg&&(I=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!hl(nr(t,ft)),I&&t.setAttribute("transform",I))),Math.abs(v)>90&&Math.abs(v)<270&&(n?(f*=-1,v+=p<=0?180:-180,p+=p<=0?180:-180):(g*=-1,v+=v<=0?180:-180)),e=e||r.uncache,r.x=u-((r.xPercent=u&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-u)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+a,r.y=c-((r.yPercent=c&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-c)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+a,r.z=d+a,r.scaleX=_t(f),r.scaleY=_t(g),r.rotation=_t(p)+o,r.rotationX=_t(_)+o,r.rotationY=_t(m)+o,r.skewX=v+o,r.skewY=w+o,r.transformPerspective=x+a,(r.zOrigin=parseFloat(l.split(" ")[2])||!e&&r.zOrigin||0)&&(i[be]=$s(l)),r.xOffset=r.yOffset=0,r.force3D=we.force3D,r.renderTransform=r.svg?Md:sl?ll:Td,r.uncache=0,r},$s=function(t){return(t=t.split(" "))[0]+" "+t[1]},Ga=function(t,e,r){var i=Wt(e);return _t(parseFloat(e)+parseFloat(Lr(t,"x",r+"px",i)))+i},Td=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,ll(t,e)},Kr="0deg",is="0px",Jr=") ",ll=function(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,o=r.y,h=r.z,l=r.rotation,u=r.rotationY,c=r.rotationX,d=r.skewX,f=r.skewY,g=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,v=r.target,w=r.zOrigin,x="",b=m==="auto"&&t&&t!==1||m===!0;if(w&&(c!==Kr||u!==Kr)){var T=parseFloat(u)*Ci,M=Math.sin(T),S=Math.cos(T),C;T=parseFloat(c)*Ci,C=Math.cos(T),a=Ga(v,a,M*C*-w),o=Ga(v,o,-Math.sin(T)*-w),h=Ga(v,h,S*C*-w+w)}_!==is&&(x+="perspective("+_+Jr),(i||n)&&(x+="translate("+i+"%, "+n+"%) "),(b||a!==is||o!==is||h!==is)&&(x+=h!==is||b?"translate3d("+a+", "+o+", "+h+") ":"translate("+a+", "+o+Jr),l!==Kr&&(x+="rotate("+l+Jr),u!==Kr&&(x+="rotateY("+u+Jr),c!==Kr&&(x+="rotateX("+c+Jr),(d!==Kr||f!==Kr)&&(x+="skew("+d+", "+f+Jr),(g!==1||p!==1)&&(x+="scale("+g+", "+p+Jr),v.style[ft]=x||"translate(0, 0)"},Md=function(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,o=r.y,h=r.rotation,l=r.skewX,u=r.skewY,c=r.scaleX,d=r.scaleY,f=r.target,g=r.xOrigin,p=r.yOrigin,_=r.xOffset,m=r.yOffset,v=r.forceCSS,w=parseFloat(a),x=parseFloat(o),b,T,M,S,C;h=parseFloat(h),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,h+=u),h||l?(h*=Ci,l*=Ci,b=Math.cos(h)*c,T=Math.sin(h)*c,M=Math.sin(h-l)*-d,S=Math.cos(h-l)*d,l&&(u*=Ci,C=Math.tan(l-u),C=Math.sqrt(1+C*C),M*=C,S*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),b*=C,T*=C)),b=_t(b),T=_t(T),M=_t(M),S=_t(S)):(b=c,S=d,T=M=0),(w&&!~(a+"").indexOf("px")||x&&!~(o+"").indexOf("px"))&&(w=Lr(f,"x",a,"px"),x=Lr(f,"y",o,"px")),(g||p||_||m)&&(w=_t(w+g-(g*b+p*M)+_),x=_t(x+p-(g*T+p*S)+m)),(i||n)&&(C=f.getBBox(),w=_t(w+i/100*C.width),x=_t(x+n/100*C.height)),C="matrix("+b+","+T+","+M+","+S+","+w+","+x+")",f.setAttribute("transform",C),v&&(f.style[ft]=C)},Ed=function(t,e,r,i,n){var a=360,o=Dt(n),h=parseFloat(n)*(o&&~n.indexOf("rad")?ti:1),l=h-i,u=i+l+"deg",c,d;return o&&(c=n.split("_")[1],c==="short"&&(l%=a,l!==l%(a/2)&&(l+=l<0?a:-a)),c==="cw"&&l<0?l=(l+a*Hh)%a-~~(l/a)*a:c==="ccw"&&l>0&&(l=(l-a*Hh)%a-~~(l/a)*a)),t._pt=d=new oe(t._pt,e,r,i,l,hd),d.e=u,d.u="deg",t._props.push(r),d},Jh=function(t,e){for(var r in e)t[r]=e[r];return t},Cd=function(t,e,r){var i=Jh({},r._gsap),n="perspective,force3D,transformOrigin,svgOrigin",a=r.style,o,h,l,u,c,d,f,g;i.svg?(l=r.getAttribute("transform"),r.setAttribute("transform",""),a[ft]=e,o=ns(r,1),ri(r,ft),r.setAttribute("transform",l)):(l=getComputedStyle(r)[ft],a[ft]=e,o=ns(r,1),a[ft]=l);for(h in _r)l=i[h],u=o[h],l!==u&&n.indexOf(h)<0&&(f=Wt(l),g=Wt(u),c=f!==g?Lr(r,h,l,g):parseFloat(l),d=parseFloat(u),t._pt=new oe(t._pt,o,h,c,d-c,Wa),t._pt.u=g||0,t._props.push(h));Jh(o,i)};ae("padding,margin,Width,Radius",function(s,t){var e="Top",r="Right",i="Bottom",n="Left",a=(t<3?[e,r,i,n]:[e+n,e+r,i+r,i+n]).map(function(o){return t<2?s+o:"border"+o+s});js[t>1?"border"+s:s]=function(o,h,l,u,c){var d,f;if(arguments.length<4)return d=a.map(function(g){return gr(o,g,l)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(u+"").split(" "),f={},a.forEach(function(g,p){return f[g]=d[p]=d[p]||d[(p-1)/2|0]}),o.init(h,f,c)}});var Ka={name:"css",register:qa,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,r,i,n){var a=this._props,o=t.style,h=r.vars.startAt,l,u,c,d,f,g,p,_,m,v,w,x,b,T,M,S;ja||qa(),this.styles=this.styles||il(t),S=this.styles.props,this.tween=r;for(p in e)if(p!=="autoRound"&&(u=e[p],!(xe[p]&&za(p,e,r,i,t,n)))){if(f=typeof u,g=js[p],f==="function"&&(u=u.call(r,i,t,n),f=typeof u),f==="string"&&~u.indexOf("random(")&&(u=Ti(u)),g)g(this,t,p,u,r)&&(M=1);else if(p.substr(0,2)==="--")l=(getComputedStyle(t).getPropertyValue(p)+"").trim(),u+="",dr.lastIndex=0,dr.test(l)||(_=Wt(l),m=Wt(u)),m?_!==m&&(l=Lr(t,p,l,m)+m):_&&(u+=_),this.add(o,"setProperty",l,u,i,n,0,0,p),a.push(p),S.push(p,0,o[p]);else if(f!=="undefined"){if(h&&p in h?(l=typeof h[p]=="function"?h[p].call(r,i,t,n):h[p],Dt(l)&&~l.indexOf("random(")&&(l=Ti(l)),Wt(l+"")||l==="auto"||(l+=we.units[p]||Wt(gr(t,p))||""),(l+"").charAt(1)==="="&&(l=gr(t,p))):l=gr(t,p),d=parseFloat(l),v=f==="string"&&u.charAt(1)==="="&&u.substr(0,2),v&&(u=u.substr(2)),c=parseFloat(u),p in sr&&(p==="autoAlpha"&&(d===1&&gr(t,"visibility")==="hidden"&&c&&(d=0),S.push("visibility",0,o.visibility),kr(this,o,"visibility",d?"inherit":"hidden",c?"inherit":"hidden",!c)),p!=="scale"&&p!=="transform"&&(p=sr[p],~p.indexOf(",")&&(p=p.split(",")[0]))),w=p in _r,w){if(this.styles.save(p),x||(b=t._gsap,b.renderTransform&&!e.parseTransform||ns(t,e.parseTransform),T=e.smoothOrigin!==!1&&b.smooth,x=this._pt=new oe(this._pt,o,ft,0,1,b.renderTransform,b,0,-1),x.dep=1),p==="scale")this._pt=new oe(this._pt,b,"scaleY",b.scaleY,(v?Qr(b.scaleY,v+c):c)-b.scaleY||0,Wa),this._pt.u=0,a.push("scaleY",p),p+="X";else if(p==="transformOrigin"){S.push(be,0,o[be]),u=wd(u),b.svg?Ha(t,u,0,T,0,this):(m=parseFloat(u.split(" ")[2])||0,m!==b.zOrigin&&kr(this,b,"zOrigin",b.zOrigin,m),kr(this,o,p,$s(l),$s(u)));continue}else if(p==="svgOrigin"){Ha(t,u,1,T,0,this);continue}else if(p in ol){Ed(this,b,p,d,v?Qr(d,v+u):u);continue}else if(p==="smoothOrigin"){kr(this,b,"smooth",b.smooth,u);continue}else if(p==="force3D"){b[p]=u;continue}else if(p==="transform"){Cd(this,u,t);continue}}else p in o||(p=Ai(p)||p);if(w||(c||c===0)&&(d||d===0)&&!od.test(u)&&p in o)_=(l+"").substr((d+"").length),c||(c=0),m=Wt(u)||(p in we.units?we.units[p]:_),_!==m&&(d=Lr(t,p,l,m)),this._pt=new oe(this._pt,w?b:o,p,d,(v?Qr(d,v+c):c)-d,!w&&(m==="px"||p==="zIndex")&&e.autoRound!==!1?ud:Wa),this._pt.u=m||0,_!==m&&m!=="%"&&(this._pt.b=l,this._pt.r=ld);else if(p in o)vd.call(this,t,p,l,v?v+u:u);else if(p in t)this.add(t,p,l||t[p],v?v+u:u,i,n);else if(p!=="parseTransform"){Gs(p,u);continue}w||(p in o?S.push(p,0,o[p]):S.push(p,1,l||t[p])),a.push(p)}}M&&Ua(this)},render:function(t,e){if(e.tween._time||!$a())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:gr,aliases:sr,getSetter:function(t,e,r){var i=sr[e];return i&&i.indexOf(",")<0&&(e=i),e in _r&&e!==be&&(t._gsap.x||gr(t,"x"))?r&&qh===r?e==="scale"?pd:dd:(qh=r||{})&&(e==="scale"?gd:_d):t.style&&!Xs(t.style[e])?fd:~e.indexOf("-")?cd:Hs(t,e)},core:{_removeProperty:ri,_getMatrix:Za}};Kt.utils.checkPrefix=Ai;Kt.core.getStyleSaver=il;(function(s,t,e,r){var i=ae(s+","+t+","+e,function(n){_r[n]=1});ae(t,function(n){we.units[n]="deg",ol[n]=1}),sr[i[13]]=s+","+t,ae(r,function(n){var a=n.split(":");sr[a[1]]=i[a[0]]})})("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");ae("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(s){we.units[s]="px"});Kt.registerPlugin(Ka);var Et=Kt.registerPlugin(Ka)||Kt,Xp=Et.core.Tween;function ul(s,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(s,r.key,r)}}function Ad(s,t,e){return t&&ul(s.prototype,t),e&&ul(s,e),s}var Yt,Ks,Sd,De,zr,Ir,Di,cl,ii,os,dl,mr,$e,pl,gl=function(){return Yt||typeof window<"u"&&(Yt=window.gsap)&&Yt.registerPlugin&&Yt},_l=1,Si=[],G=[],Qe=[],hs=Date.now,Ja=function(t,e){return e},Dd=function(){var t=os.core,e=t.bridge||{},r=t._scrollers,i=t._proxies;r.push.apply(r,G),i.push.apply(i,Qe),G=r,Qe=i,Ja=function(a,o){return e[a](o)}},yr=function(t,e){return~Qe.indexOf(t)&&Qe[Qe.indexOf(t)+1][e]},ls=function(t){return!!~dl.indexOf(t)},le=function(t,e,r,i,n){return t.addEventListener(e,r,{passive:i!==!1,capture:!!n})},he=function(t,e,r,i){return t.removeEventListener(e,r,!!i)},Qs="scrollLeft",Zs="scrollTop",to=function(){return mr&&mr.isPressed||G.cache++},Js=function(t,e){var r=function i(n){if(n||n===0){_l&&(De.history.scrollRestoration="manual");var a=mr&&mr.isPressed;n=i.v=Math.round(n)||(mr&&mr.iOS?1:0),t(n),i.cacheID=G.cache,a&&Ja("ss",n)}else(e||G.cache!==i.cacheID||Ja("ref"))&&(i.cacheID=G.cache,i.v=t());return i.v+i.offset};return r.offset=0,t&&r},Jt={s:Qs,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:Js(function(s){return arguments.length?De.scrollTo(s,Ct.sc()):De.pageXOffset||zr[Qs]||Ir[Qs]||Di[Qs]||0})},Ct={s:Zs,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Jt,sc:Js(function(s){return arguments.length?De.scrollTo(Jt.sc(),s):De.pageYOffset||zr[Zs]||Ir[Zs]||Di[Zs]||0})},ue=function(t,e){return(e&&e._ctx&&e._ctx.selector||Yt.utils.toArray)(t)[0]||(typeof t=="string"&&Yt.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},xr=function(t,e){var r=e.s,i=e.sc;ls(t)&&(t=zr.scrollingElement||Ir);var n=G.indexOf(t),a=i===Ct.sc?1:2;!~n&&(n=G.push(t)-1),G[n+a]||le(t,"scroll",to);var o=G[n+a],h=o||(G[n+a]=Js(yr(t,r),!0)||(ls(t)?i:Js(function(l){return arguments.length?t[r]=l:t[r]})));return h.target=t,o||(h.smooth=Yt.getProperty(t,"scrollBehavior")==="smooth"),h},tn=function(t,e,r){var i=t,n=t,a=hs(),o=a,h=e||50,l=Math.max(500,h*3),u=function(g,p){var _=hs();p||_-a>h?(n=i,i=g,o=a,a=_):r?i+=g:i=n+(g-n)/(_-o)*(a-o)},c=function(){n=i=r?0:i,o=a=0},d=function(g){var p=o,_=n,m=hs();return(g||g===0)&&g!==i&&u(g),a===o||m-o>l?0:(i+(r?_:-_))/((r?m:a)-p)*1e3};return{update:u,reset:c,getVelocity:d}},as=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},fl=function(t){var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(r)?e:r},ml=function(){os=Yt.core.globals().ScrollTrigger,os&&os.core&&Dd()},xl=function(t){return Yt=t||gl(),!Ks&&Yt&&typeof document<"u"&&document.body&&(De=window,zr=document,Ir=zr.documentElement,Di=zr.body,dl=[De,zr,Ir,Di],Sd=Yt.utils.clamp,pl=Yt.core.context||function(){},ii="onpointerenter"in Di?"pointer":"mouse",cl=mt.isTouch=De.matchMedia&&De.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in De||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,$e=mt.eventTypes=("ontouchstart"in Ir?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Ir?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return _l=0},500),ml(),Ks=1),Ks};Jt.op=Ct;G.cache=0;var mt=function(){function s(e){this.init(e)}var t=s.prototype;return t.init=function(r){Ks||xl(Yt)||console.warn("Please gsap.registerPlugin(Observer)"),os||ml();var i=r.tolerance,n=r.dragMinimum,a=r.type,o=r.target,h=r.lineHeight,l=r.debounce,u=r.preventDefault,c=r.onStop,d=r.onStopDelay,f=r.ignore,g=r.wheelSpeed,p=r.event,_=r.onDragStart,m=r.onDragEnd,v=r.onDrag,w=r.onPress,x=r.onRelease,b=r.onRight,T=r.onLeft,M=r.onUp,S=r.onDown,C=r.onChangeX,A=r.onChangeY,O=r.onChange,D=r.onToggleX,k=r.onToggleY,P=r.onHover,X=r.onHoverEnd,q=r.onMove,I=r.ignoreCheck,Q=r.isNormalizer,rt=r.onGestureStart,y=r.onGestureEnd,it=r.onWheel,re=r.onEnable,Xe=r.onDisable,dt=r.onClick,Vt=r.scrollSpeed,ie=r.capture,bt=r.allowClicks,se=r.lockAxis,qt=r.onLockAxis;this.target=o=ue(o)||Ir,this.vars=r,f&&(f=Yt.utils.toArray(f)),i=i||1e-9,n=n||0,g=g||1,Vt=Vt||1,a=a||"wheel,touch,pointer",l=l!==!1,h||(h=parseFloat(De.getComputedStyle(Di).lineHeight)||22);var br,ne,Ge,Z,xt,me,Me,E=this,Ee=0,lr=0,Tr=r.passive||!u,Tt=xr(o,Jt),Mr=xr(o,Ct),Vr=Tt(),pi=Mr(),Ot=~a.indexOf("touch")&&!~a.indexOf("pointer")&&$e[0]==="pointerdown",Er=ls(o),yt=o.ownerDocument||zr,We=[0,0,0],ke=[0,0,0],ur=0,Vi=function(){return ur=hs()},Mt=function(z,K){return(E.event=z)&&f&&~f.indexOf(z.target)||K&&Ot&&z.pointerType!=="touch"||I&&I(z,K)},Ds=function(){E._vx.reset(),E._vy.reset(),ne.pause(),c&&c(E)},Cr=function(){var z=E.deltaX=fl(We),K=E.deltaY=fl(ke),F=Math.abs(z)>=i,V=Math.abs(K)>=i;O&&(F||V)&&O(E,z,K,We,ke),F&&(b&&E.deltaX>0&&b(E),T&&E.deltaX<0&&T(E),C&&C(E),D&&E.deltaX<0!=Ee<0&&D(E),Ee=E.deltaX,We[0]=We[1]=We[2]=0),V&&(S&&E.deltaY>0&&S(E),M&&E.deltaY<0&&M(E),A&&A(E),k&&E.deltaY<0!=lr<0&&k(E),lr=E.deltaY,ke[0]=ke[1]=ke[2]=0),(Z||Ge)&&(q&&q(E),Ge&&(v(E),Ge=!1),Z=!1),me&&!(me=!1)&&qt&&qt(E),xt&&(it(E),xt=!1),br=0},gi=function(z,K,F){We[F]+=z,ke[F]+=K,E._vx.update(z),E._vy.update(K),l?br||(br=requestAnimationFrame(Cr)):Cr()},_i=function(z,K){se&&!Me&&(E.axis=Me=Math.abs(z)>Math.abs(K)?"x":"y",me=!0),Me!=="y"&&(We[2]+=z,E._vx.update(z,!0)),Me!=="x"&&(ke[2]+=K,E._vy.update(K,!0)),l?br||(br=requestAnimationFrame(Cr)):Cr()},Ar=function(z){if(!Mt(z,1)){z=as(z,u);var K=z.clientX,F=z.clientY,V=K-E.x,L=F-E.y,N=E.isDragging;E.x=K,E.y=F,(N||Math.abs(E.startX-K)>=n||Math.abs(E.startY-F)>=n)&&(v&&(Ge=!0),N||(E.isDragging=!0),_i(V,L),N||_&&_(E))}},Ur=E.onPress=function(B){Mt(B,1)||B&&B.button||(E.axis=Me=null,ne.pause(),E.isPressed=!0,B=as(B),Ee=lr=0,E.startX=E.x=B.clientX,E.startY=E.y=B.clientY,E._vx.reset(),E._vy.reset(),le(Q?o:yt,$e[1],Ar,Tr,!0),E.deltaX=E.deltaY=0,w&&w(E))},Y=E.onRelease=function(B){if(!Mt(B,1)){he(Q?o:yt,$e[1],Ar,!0);var z=!isNaN(E.y-E.startY),K=E.isDragging,F=K&&(Math.abs(E.x-E.startX)>3||Math.abs(E.y-E.startY)>3),V=as(B);!F&&z&&(E._vx.reset(),E._vy.reset(),u&&bt&&Yt.delayedCall(.08,function(){if(hs()-ur>300&&!B.defaultPrevented){if(B.target.click)B.target.click();else if(yt.createEvent){var L=yt.createEvent("MouseEvents");L.initMouseEvent("click",!0,!0,De,1,V.screenX,V.screenY,V.clientX,V.clientY,!1,!1,!1,!1,0,null),B.target.dispatchEvent(L)}}})),E.isDragging=E.isGesturing=E.isPressed=!1,c&&K&&!Q&&ne.restart(!0),m&&K&&m(E),x&&x(E,F)}},Xr=function(z){return z.touches&&z.touches.length>1&&(E.isGesturing=!0)&&rt(z,E.isDragging)},Ye=function(){return(E.isGesturing=!1)||y(E)},qe=function(z){if(!Mt(z)){var K=Tt(),F=Mr();gi((K-Vr)*Vt,(F-pi)*Vt,1),Vr=K,pi=F,c&&ne.restart(!0)}},He=function(z){if(!Mt(z)){z=as(z,u),it&&(xt=!0);var K=(z.deltaMode===1?h:z.deltaMode===2?De.innerHeight:1)*g;gi(z.deltaX*K,z.deltaY*K,0),c&&!Q&&ne.restart(!0)}},Gr=function(z){if(!Mt(z)){var K=z.clientX,F=z.clientY,V=K-E.x,L=F-E.y;E.x=K,E.y=F,Z=!0,c&&ne.restart(!0),(V||L)&&_i(V,L)}},mi=function(z){E.event=z,P(E)},fr=function(z){E.event=z,X(E)},Ui=function(z){return Mt(z)||as(z,u)&&dt(E)};ne=E._dc=Yt.delayedCall(d||.25,Ds).pause(),E.deltaX=E.deltaY=0,E._vx=tn(0,50,!0),E._vy=tn(0,50,!0),E.scrollX=Tt,E.scrollY=Mr,E.isDragging=E.isGesturing=E.isPressed=!1,pl(this),E.enable=function(B){return E.isEnabled||(le(Er?yt:o,"scroll",to),a.indexOf("scroll")>=0&&le(Er?yt:o,"scroll",qe,Tr,ie),a.indexOf("wheel")>=0&&le(o,"wheel",He,Tr,ie),(a.indexOf("touch")>=0&&cl||a.indexOf("pointer")>=0)&&(le(o,$e[0],Ur,Tr,ie),le(yt,$e[2],Y),le(yt,$e[3],Y),bt&&le(o,"click",Vi,!0,!0),dt&&le(o,"click",Ui),rt&&le(yt,"gesturestart",Xr),y&&le(yt,"gestureend",Ye),P&&le(o,ii+"enter",mi),X&&le(o,ii+"leave",fr),q&&le(o,ii+"move",Gr)),E.isEnabled=!0,B&&B.type&&Ur(B),re&&re(E)),E},E.disable=function(){E.isEnabled&&(Si.filter(function(B){return B!==E&&ls(B.target)}).length||he(Er?yt:o,"scroll",to),E.isPressed&&(E._vx.reset(),E._vy.reset(),he(Q?o:yt,$e[1],Ar,!0)),he(Er?yt:o,"scroll",qe,ie),he(o,"wheel",He,ie),he(o,$e[0],Ur,ie),he(yt,$e[2],Y),he(yt,$e[3],Y),he(o,"click",Vi,!0),he(o,"click",Ui),he(yt,"gesturestart",Xr),he(yt,"gestureend",Ye),he(o,ii+"enter",mi),he(o,ii+"leave",fr),he(o,ii+"move",Gr),E.isEnabled=E.isPressed=E.isDragging=!1,Xe&&Xe(E))},E.kill=E.revert=function(){E.disable();var B=Si.indexOf(E);B>=0&&Si.splice(B,1),mr===E&&(mr=0)},Si.push(E),Q&&ls(o)&&(mr=E),E.enable(p)},Ad(s,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),s}();mt.version="3.12.5";mt.create=function(s){return new mt(s)};mt.register=xl;mt.getAll=function(){return Si.slice()};mt.getById=function(s){return Si.filter(function(t){return t.vars.id===s})[0]};gl()&&Yt.registerPlugin(mt);var R,Ri,$,ct,Ze,st,zl,mn,bs,_s,fs,en,te,wn,ho,ce,yl,vl,Oi,Il,eo,Nl,fe,lo,Bl,Vl,Nr,uo,_o,ki,mo,xn,fo,ro,rn=1,ee=Date.now,io=ee(),Ue=0,cs=0,wl=function(t,e,r){var i=Fe(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return r["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},bl=function(t,e){return e&&(!Fe(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},Pd=function s(){return cs&&requestAnimationFrame(s)},Tl=function(){return wn=1},Ml=function(){return wn=0},ar=function(t){return t},ds=function(t){return Math.round(t*1e5)/1e5||0},Ul=function(){return typeof window<"u"},Xl=function(){return R||Ul()&&(R=window.gsap)&&R.registerPlugin&&R},li=function(t){return!!~zl.indexOf(t)},Gl=function(t){return(t==="Height"?mo:$["inner"+t])||Ze["client"+t]||st["client"+t]},Wl=function(t){return yr(t,"getBoundingClientRect")||(li(t)?function(){return _n.width=$.innerWidth,_n.height=mo,_n}:function(){return vr(t)})},Fd=function(t,e,r){var i=r.d,n=r.d2,a=r.a;return(a=yr(t,"getBoundingClientRect"))?function(){return a()[i]}:function(){return(e?Gl(n):t["client"+n])||0}},Rd=function(t,e){return!e||~Qe.indexOf(t)?Wl(t):function(){return _n}},or=function(t,e){var r=e.s,i=e.d2,n=e.d,a=e.a;return Math.max(0,(r="scroll"+i)&&(a=yr(t,r))?a()-Wl(t)()[n]:li(t)?(Ze[r]||st[r])-Gl(i):t[r]-t["offset"+i])},sn=function(t,e){for(var r=0;r<Oi.length;r+=3)(!e||~e.indexOf(Oi[r+1]))&&t(Oi[r],Oi[r+1],Oi[r+2])},Fe=function(t){return typeof t=="string"},pe=function(t){return typeof t=="function"},ps=function(t){return typeof t=="number"},si=function(t){return typeof t=="object"},us=function(t,e,r){return t&&t.progress(e?0:1)&&r&&t.pause()},so=function(t,e){if(t.enabled){var r=t._ctx?t._ctx.add(function(){return e(t)}):e(t);r&&r.totalTime&&(t.callbackAnimation=r)}},Pi=Math.abs,Yl="left",ql="top",xo="right",yo="bottom",ai="width",oi="height",ms="Right",xs="Left",ys="Top",vs="Bottom",At="padding",Be="margin",zi="Width",vo="Height",Pt="px",Ve=function(t){return $.getComputedStyle(t)},Od=function(t){var e=Ve(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},El=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},vr=function(t,e){var r=e&&Ve(t)[ho]!=="matrix(1, 0, 0, 1, 0, 0)"&&R.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return r&&r.progress(0).kill(),i},yn=function(t,e){var r=e.d2;return t["offset"+r]||t["client"+r]||0},Hl=function(t){var e=[],r=t.labels,i=t.duration(),n;for(n in r)e.push(r[n]/i);return e},kd=function(t){return function(e){return R.utils.snap(Hl(t),e)}},wo=function(t){var e=R.utils.snap(t),r=Array.isArray(t)&&t.slice(0).sort(function(i,n){return i-n});return r?function(i,n,a){a===void 0&&(a=.001);var o;if(!n)return e(i);if(n>0){for(i-=a,o=0;o<r.length;o++)if(r[o]>=i)return r[o];return r[o-1]}else for(o=r.length,i+=a;o--;)if(r[o]<=i)return r[o];return r[0]}:function(i,n,a){a===void 0&&(a=.001);var o=e(i);return!n||Math.abs(o-i)<a||o-i<0==n<0?o:e(n<0?i-t:i+t)}},Ld=function(t){return function(e,r){return wo(Hl(t))(e,r.direction)}},nn=function(t,e,r,i){return r.split(",").forEach(function(n){return t(e,n,i)})},It=function(t,e,r,i,n){return t.addEventListener(e,r,{passive:!i,capture:!!n})},zt=function(t,e,r,i){return t.removeEventListener(e,r,!!i)},an=function(t,e,r){r=r&&r.wheelHandler,r&&(t(e,"wheel",r),t(e,"touchmove",r))},Cl={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},on={toggleActions:"play",anticipatePin:0},vn={top:0,left:0,center:.5,bottom:1,right:1},cn=function(t,e){if(Fe(t)){var r=t.indexOf("="),i=~r?+(t.charAt(r-1)+1)*parseFloat(t.substr(r+1)):0;~r&&(t.indexOf("%")>r&&(i*=e/100),t=t.substr(0,r-1)),t=i+(t in vn?vn[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},hn=function(t,e,r,i,n,a,o,h){var l=n.startColor,u=n.endColor,c=n.fontSize,d=n.indent,f=n.fontWeight,g=ct.createElement("div"),p=li(r)||yr(r,"pinType")==="fixed",_=t.indexOf("scroller")!==-1,m=p?st:r,v=t.indexOf("start")!==-1,w=v?l:u,x="border-color:"+w+";font-size:"+c+";color:"+w+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return x+="position:"+((_||h)&&p?"fixed;":"absolute;"),(_||h||!p)&&(x+=(i===Ct?xo:yo)+":"+(a+parseFloat(d))+"px;"),o&&(x+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),g._isStart=v,g.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),g.style.cssText=x,g.innerText=e||e===0?t+"-"+e:t,m.children[0]?m.insertBefore(g,m.children[0]):m.appendChild(g),g._offset=g["offset"+i.op.d2],dn(g,0,i,v),g},dn=function(t,e,r,i){var n={display:"block"},a=r[i?"os2":"p2"],o=r[i?"p2":"os2"];t._isFlipped=i,n[r.a+"Percent"]=i?-100:0,n[r.a]=i?"1px":0,n["border"+a+zi]=1,n["border"+o+zi]=0,n[r.p]=e+"px",R.set(t,n)},W=[],co={},Ts,Al=function(){return ee()-Ue>34&&(Ts||(Ts=requestAnimationFrame(wr)))},Fi=function(){(!fe||!fe.isPressed||fe.startX>st.clientWidth)&&(G.cache++,fe?Ts||(Ts=requestAnimationFrame(wr)):wr(),Ue||fi("scrollStart"),Ue=ee())},no=function(){Vl=$.innerWidth,Bl=$.innerHeight},gs=function(){G.cache++,!te&&!Nl&&!ct.fullscreenElement&&!ct.webkitFullscreenElement&&(!lo||Vl!==$.innerWidth||Math.abs($.innerHeight-Bl)>$.innerHeight*.25)&&mn.restart(!0)},ui={},zd=[],jl=function s(){return zt(U,"scrollEnd",s)||ni(!0)},fi=function(t){return ui[t]&&ui[t].map(function(e){return e()})||zd},Pe=[],$l=function(t){for(var e=0;e<Pe.length;e+=5)(!t||Pe[e+4]&&Pe[e+4].query===t)&&(Pe[e].style.cssText=Pe[e+1],Pe[e].getBBox&&Pe[e].setAttribute("transform",Pe[e+2]||""),Pe[e+3].uncache=1)},bo=function(t,e){var r;for(ce=0;ce<W.length;ce++)r=W[ce],r&&(!e||r._ctx===e)&&(t?r.kill(1):r.revert(!0,!0));xn=!0,e&&$l(e),e||fi("revert")},Ql=function(t,e){G.cache++,(e||!de)&&G.forEach(function(r){return pe(r)&&r.cacheID++&&(r.rec=0)}),Fe(t)&&($.history.scrollRestoration=_o=t)},de,hi=0,Sl,Id=function(){if(Sl!==hi){var t=Sl=hi;requestAnimationFrame(function(){return t===hi&&ni(!0)})}},Zl=function(){st.appendChild(ki),mo=!fe&&ki.offsetHeight||$.innerHeight,st.removeChild(ki)},Dl=function(t){return bs(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},ni=function(t,e){if(Ue&&!t&&!xn){It(U,"scrollEnd",jl);return}Zl(),de=U.isRefreshing=!0,G.forEach(function(i){return pe(i)&&++i.cacheID&&(i.rec=i())});var r=fi("refreshInit");Il&&U.sort(),e||bo(),G.forEach(function(i){pe(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),W.slice(0).forEach(function(i){return i.refresh()}),xn=!1,W.forEach(function(i){if(i._subPinOffset&&i.pin){var n=i.vars.horizontal?"offsetWidth":"offsetHeight",a=i.pin[n];i.revert(!0,1),i.adjustPinSpacing(i.pin[n]-a),i.refresh()}}),fo=1,Dl(!0),W.forEach(function(i){var n=or(i.scroller,i._dir),a=i.vars.end==="max"||i._endClamp&&i.end>n,o=i._startClamp&&i.start>=n;(a||o)&&i.setPositions(o?n-1:i.start,a?Math.max(o?n:i.start+1,n):i.end,!0)}),Dl(!1),fo=0,r.forEach(function(i){return i&&i.render&&i.render(-1)}),G.forEach(function(i){pe(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Ql(_o,1),mn.pause(),hi++,de=2,wr(2),W.forEach(function(i){return pe(i.vars.onRefresh)&&i.vars.onRefresh(i)}),de=U.isRefreshing=!1,fi("refresh")},po=0,pn=1,ws,wr=function(t){if(t===2||!de&&!xn){U.isUpdating=!0,ws&&ws.update(0);var e=W.length,r=ee(),i=r-io>=50,n=e&&W[0].scroll();if(pn=po>n?-1:1,de||(po=n),i&&(Ue&&!wn&&r-Ue>200&&(Ue=0,fi("scrollEnd")),fs=io,io=r),pn<0){for(ce=e;ce-- >0;)W[ce]&&W[ce].update(0,i);pn=1}else for(ce=0;ce<e;ce++)W[ce]&&W[ce].update(0,i);U.isUpdating=!1}Ts=0},go=[Yl,ql,yo,xo,Be+vs,Be+ms,Be+ys,Be+xs,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],gn=go.concat([ai,oi,"boxSizing","max"+zi,"max"+vo,"position",Be,At,At+ys,At+ms,At+vs,At+xs]),Nd=function(t,e,r){Li(r);var i=t._gsap;if(i.spacerIsNative)Li(i.spacerState);else if(t._gsap.swappedIn){var n=e.parentNode;n&&(n.insertBefore(t,e),n.removeChild(e))}t._gsap.swappedIn=!1},ao=function(t,e,r,i){if(!t._gsap.swappedIn){for(var n=go.length,a=e.style,o=t.style,h;n--;)h=go[n],a[h]=r[h];a.position=r.position==="absolute"?"absolute":"relative",r.display==="inline"&&(a.display="inline-block"),o[yo]=o[xo]="auto",a.flexBasis=r.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[ai]=yn(t,Jt)+Pt,a[oi]=yn(t,Ct)+Pt,a[At]=o[Be]=o[ql]=o[Yl]="0",Li(i),o[ai]=o["max"+zi]=r[ai],o[oi]=o["max"+vo]=r[oi],o[At]=r[At],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Bd=/([A-Z])/g,Li=function(t){if(t){var e=t.t.style,r=t.length,i=0,n,a;for((t.t._gsap||R.core.getCache(t.t)).uncache=1;i<r;i+=2)a=t[i+1],n=t[i],a?e[n]=a:e[n]&&e.removeProperty(n.replace(Bd,"-$1").toLowerCase())}},ln=function(t){for(var e=gn.length,r=t.style,i=[],n=0;n<e;n++)i.push(gn[n],r[gn[n]]);return i.t=t,i},Vd=function(t,e,r){for(var i=[],n=t.length,a=r?8:0,o;a<n;a+=2)o=t[a],i.push(o,o in e?e[o]:t[a+1]);return i.t=t.t,i},_n={left:0,top:0},Pl=function(t,e,r,i,n,a,o,h,l,u,c,d,f,g){pe(t)&&(t=t(h)),Fe(t)&&t.substr(0,3)==="max"&&(t=d+(t.charAt(4)==="="?cn("0"+t.substr(3),r):0));var p=f?f.time():0,_,m,v;if(f&&f.seek(0),isNaN(t)||(t=+t),ps(t))f&&(t=R.utils.mapRange(f.scrollTrigger.start,f.scrollTrigger.end,0,d,t)),o&&dn(o,r,i,!0);else{pe(e)&&(e=e(h));var w=(t||"0").split(" "),x,b,T,M;v=ue(e,h)||st,x=vr(v)||{},(!x||!x.left&&!x.top)&&Ve(v).display==="none"&&(M=v.style.display,v.style.display="block",x=vr(v),M?v.style.display=M:v.style.removeProperty("display")),b=cn(w[0],x[i.d]),T=cn(w[1]||"0",r),t=x[i.p]-l[i.p]-u+b+n-T,o&&dn(o,T,i,r-T<20||o._isStart&&T>20),r-=r-T}if(g&&(h[g]=t||-.001,t<0&&(t=0)),a){var S=t+r,C=a._isStart;_="scroll"+i.d2,dn(a,S,i,C&&S>20||!C&&(c?Math.max(st[_],Ze[_]):a.parentNode[_])<=S+1),c&&(l=vr(o),c&&(a.style[i.op.p]=l[i.op.p]-i.op.m-a._offset+Pt))}return f&&v&&(_=vr(v),f.seek(d),m=vr(v),f._caScrollDist=_[i.p]-m[i.p],t=t/f._caScrollDist*d),f&&f.seek(p),f?t:Math.round(t)},Ud=/(webkit|moz|length|cssText|inset)/i,Fl=function(t,e,r,i){if(t.parentNode!==e){var n=t.style,a,o;if(e===st){t._stOrig=n.cssText,o=Ve(t);for(a in o)!+a&&!Ud.test(a)&&o[a]&&typeof n[a]=="string"&&a!=="0"&&(n[a]=o[a]);n.top=r,n.left=i}else n.cssText=t._stOrig;R.core.getCache(t).uncache=1,e.appendChild(t)}},Kl=function(t,e,r){var i=e,n=i;return function(a){var o=Math.round(t());return o!==i&&o!==n&&Math.abs(o-i)>3&&Math.abs(o-n)>3&&(a=o,r&&r()),n=i,i=a,a}},un=function(t,e,r){var i={};i[e.p]="+="+r,R.set(t,i)},Rl=function(t,e){var r=xr(t,e),i="_scroll"+e.p2,n=function a(o,h,l,u,c){var d=a.tween,f=h.onComplete,g={};l=l||r();var p=Kl(r,l,function(){d.kill(),a.tween=0});return c=u&&c||0,u=u||o-l,d&&d.kill(),h[i]=o,h.inherit=!1,h.modifiers=g,g[i]=function(){return p(l+u*d.ratio+c*d.ratio*d.ratio)},h.onUpdate=function(){G.cache++,a.tween&&wr()},h.onComplete=function(){a.tween=0,f&&f.call(d)},d=a.tween=R.to(t,h),d};return t[i]=r,r.wheelHandler=function(){return n.tween&&n.tween.kill()&&(n.tween=0)},It(t,"wheel",r.wheelHandler),U.isTouch&&It(t,"touchmove",r.wheelHandler),n},U=function(){function s(e,r){Ri||s.register(R)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),uo(this),this.init(e,r)}var t=s.prototype;return t.init=function(r,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!cs){this.update=this.refresh=this.kill=ar;return}r=El(Fe(r)||ps(r)||r.nodeType?{trigger:r}:r,on);var n=r,a=n.onUpdate,o=n.toggleClass,h=n.id,l=n.onToggle,u=n.onRefresh,c=n.scrub,d=n.trigger,f=n.pin,g=n.pinSpacing,p=n.invalidateOnRefresh,_=n.anticipatePin,m=n.onScrubComplete,v=n.onSnapComplete,w=n.once,x=n.snap,b=n.pinReparent,T=n.pinSpacer,M=n.containerAnimation,S=n.fastScrollEnd,C=n.preventOverlaps,A=r.horizontal||r.containerAnimation&&r.horizontal!==!1?Jt:Ct,O=!c&&c!==0,D=ue(r.scroller||$),k=R.core.getCache(D),P=li(D),X=("pinType"in r?r.pinType:yr(D,"pinType")||P&&"fixed")==="fixed",q=[r.onEnter,r.onLeave,r.onEnterBack,r.onLeaveBack],I=O&&r.toggleActions.split(" "),Q="markers"in r?r.markers:on.markers,rt=P?0:parseFloat(Ve(D)["border"+A.p2+zi])||0,y=this,it=r.onRefreshInit&&function(){return r.onRefreshInit(y)},re=Fd(D,P,A),Xe=Rd(D,P),dt=0,Vt=0,ie=0,bt=xr(D,A),se,qt,br,ne,Ge,Z,xt,me,Me,E,Ee,lr,Tr,Tt,Mr,Vr,pi,Ot,Er,yt,We,ke,ur,Vi,Mt,Ds,Cr,gi,_i,Ar,Ur,Y,Xr,Ye,qe,He,Gr,mi,fr;if(y._startClamp=y._endClamp=!1,y._dir=A,_*=45,y.scroller=D,y.scroll=M?M.time.bind(M):bt,ne=bt(),y.vars=r,i=i||r.animation,"refreshPriority"in r&&(Il=1,r.refreshPriority===-9999&&(ws=y)),k.tweenScroll=k.tweenScroll||{top:Rl(D,Ct),left:Rl(D,Jt)},y.tweenTo=se=k.tweenScroll[A.p],y.scrubDuration=function(F){Xr=ps(F)&&F,Xr?Y?Y.duration(F):Y=R.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:Xr,paused:!0,onComplete:function(){return m&&m(y)}}):(Y&&Y.progress(1).kill(),Y=0)},i&&(i.vars.lazy=!1,i._initted&&!y.isReverted||i.vars.immediateRender!==!1&&r.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),y.animation=i.pause(),i.scrollTrigger=y,y.scrubDuration(c),Ar=0,h||(h=i.vars.id)),x&&((!si(x)||x.push)&&(x={snapTo:x}),"scrollBehavior"in st.style&&R.set(P?[st,Ze]:D,{scrollBehavior:"auto"}),G.forEach(function(F){return pe(F)&&F.target===(P?ct.scrollingElement||Ze:D)&&(F.smooth=!1)}),br=pe(x.snapTo)?x.snapTo:x.snapTo==="labels"?kd(i):x.snapTo==="labelsDirectional"?Ld(i):x.directional!==!1?function(F,V){return wo(x.snapTo)(F,ee()-Vt<500?0:V.direction)}:R.utils.snap(x.snapTo),Ye=x.duration||{min:.1,max:2},Ye=si(Ye)?_s(Ye.min,Ye.max):_s(Ye,Ye),qe=R.delayedCall(x.delay||Xr/2||.1,function(){var F=bt(),V=ee()-Vt<500,L=se.tween;if((V||Math.abs(y.getVelocity())<10)&&!L&&!wn&&dt!==F){var N=(F-Z)/Tt,kt=i&&!O?i.totalProgress():N,H=V?0:(kt-Ur)/(ee()-fs)*1e3||0,vt=R.utils.clamp(-N,1-N,Pi(H/2)*H/.185),Ht=N+(x.inertia===!1?0:vt),pt,at,J=x,je=J.onStart,lt=J.onInterrupt,Ce=J.onComplete;if(pt=br(Ht,y),ps(pt)||(pt=Ht),at=Math.round(Z+pt*Tt),F<=xt&&F>=Z&&at!==F){if(L&&!L._initted&&L.data<=Pi(at-F))return;x.inertia===!1&&(vt=pt-N),se(at,{duration:Ye(Pi(Math.max(Pi(Ht-kt),Pi(pt-kt))*.185/H/.05||0)),ease:x.ease||"power3",data:Pi(at-F),onInterrupt:function(){return qe.restart(!0)&<&<(y)},onComplete:function(){y.update(),dt=bt(),i&&(Y?Y.resetTo("totalProgress",pt,i._tTime/i._tDur):i.progress(pt)),Ar=Ur=i&&!O?i.totalProgress():y.progress,v&&v(y),Ce&&Ce(y)}},F,vt*Tt,at-F-vt*Tt),je&&je(y,se.tween)}}else y.isActive&&dt!==F&&qe.restart(!0)}).pause()),h&&(co[h]=y),d=y.trigger=ue(d||f!==!0&&f),fr=d&&d._gsap&&d._gsap.stRevert,fr&&(fr=fr(y)),f=f===!0?d:ue(f),Fe(o)&&(o={targets:d,className:o}),f&&(g===!1||g===Be||(g=!g&&f.parentNode&&f.parentNode.style&&Ve(f.parentNode).display==="flex"?!1:At),y.pin=f,qt=R.core.getCache(f),qt.spacer?Mr=qt.pinState:(T&&(T=ue(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),qt.spacerIsNative=!!T,T&&(qt.spacerState=ln(T))),qt.spacer=Ot=T||ct.createElement("div"),Ot.classList.add("pin-spacer"),h&&Ot.classList.add("pin-spacer-"+h),qt.pinState=Mr=ln(f)),r.force3D!==!1&&R.set(f,{force3D:!0}),y.spacer=Ot=qt.spacer,_i=Ve(f),Vi=_i[g+A.os2],yt=R.getProperty(f),We=R.quickSetter(f,A.a,Pt),ao(f,Ot,_i),pi=ln(f)),Q){lr=si(Q)?El(Q,Cl):Cl,E=hn("scroller-start",h,D,A,lr,0),Ee=hn("scroller-end",h,D,A,lr,0,E),Er=E["offset"+A.op.d2];var Ui=ue(yr(D,"content")||D);me=this.markerStart=hn("start",h,Ui,A,lr,Er,0,M),Me=this.markerEnd=hn("end",h,Ui,A,lr,Er,0,M),M&&(mi=R.quickSetter([me,Me],A.a,Pt)),!X&&!(Qe.length&&yr(D,"fixedMarkers")===!0)&&(Od(P?st:D),R.set([E,Ee],{force3D:!0}),Ds=R.quickSetter(E,A.a,Pt),gi=R.quickSetter(Ee,A.a,Pt))}if(M){var B=M.vars.onUpdate,z=M.vars.onUpdateParams;M.eventCallback("onUpdate",function(){y.update(0,0,1),B&&B.apply(M,z||[])})}if(y.previous=function(){return W[W.indexOf(y)-1]},y.next=function(){return W[W.indexOf(y)+1]},y.revert=function(F,V){if(!V)return y.kill(!0);var L=F!==!1||!y.enabled,N=te;L!==y.isReverted&&(L&&(He=Math.max(bt(),y.scroll.rec||0),ie=y.progress,Gr=i&&i.progress()),me&&[me,Me,E,Ee].forEach(function(kt){return kt.style.display=L?"none":"block"}),L&&(te=y,y.update(L)),f&&(!b||!y.isActive)&&(L?Nd(f,Ot,Mr):ao(f,Ot,Ve(f),Mt)),L||y.update(L),te=N,y.isReverted=L)},y.refresh=function(F,V,L,N){if(!((te||!y.enabled)&&!V)){if(f&&F&&Ue){It(s,"scrollEnd",jl);return}!de&&it&&it(y),te=y,se.tween&&!L&&(se.tween.kill(),se.tween=0),Y&&Y.pause(),p&&i&&i.revert({kill:!1}).invalidate(),y.isReverted||y.revert(!0,!0),y._subPinOffset=!1;var kt=re(),H=Xe(),vt=M?M.duration():or(D,A),Ht=Tt<=.01,pt=0,at=N||0,J=si(L)?L.end:r.end,je=r.endTrigger||d,lt=si(L)?L.start:r.start||(r.start===0||!d?0:f?"0 0":"0 100%"),Ce=y.pinnedContainer=r.pinnedContainer&&ue(r.pinnedContainer,y),Ke=d&&Math.max(0,W.indexOf(y))||0,Ut=Ke,Xt,jt,Wr,Ps,$t,St,Je,Jn,Yo,Xi,tr,Gi,Fs;for(Q&&si(L)&&(Gi=R.getProperty(E,A.p),Fs=R.getProperty(Ee,A.p));Ut--;)St=W[Ut],St.end||St.refresh(0,1)||(te=y),Je=St.pin,Je&&(Je===d||Je===f||Je===Ce)&&!St.isReverted&&(Xi||(Xi=[]),Xi.unshift(St),St.revert(!0,!0)),St!==W[Ut]&&(Ke--,Ut--);for(pe(lt)&&(lt=lt(y)),lt=wl(lt,"start",y),Z=Pl(lt,d,kt,A,bt(),me,E,y,H,rt,X,vt,M,y._startClamp&&"_startClamp")||(f?-.001:0),pe(J)&&(J=J(y)),Fe(J)&&!J.indexOf("+=")&&(~J.indexOf(" ")?J=(Fe(lt)?lt.split(" ")[0]:"")+J:(pt=cn(J.substr(2),kt),J=Fe(lt)?lt:(M?R.utils.mapRange(0,M.duration(),M.scrollTrigger.start,M.scrollTrigger.end,Z):Z)+pt,je=d)),J=wl(J,"end",y),xt=Math.max(Z,Pl(J||(je?"100% 0":vt),je,kt,A,bt()+pt,Me,Ee,y,H,rt,X,vt,M,y._endClamp&&"_endClamp"))||-.001,pt=0,Ut=Ke;Ut--;)St=W[Ut],Je=St.pin,Je&&St.start-St._pinPush<=Z&&!M&&St.end>0&&(Xt=St.end-(y._startClamp?Math.max(0,St.start):St.start),(Je===d&&St.start-St._pinPush<Z||Je===Ce)&&isNaN(lt)&&(pt+=Xt*(1-St.progress)),Je===f&&(at+=Xt));if(Z+=pt,xt+=pt,y._startClamp&&(y._startClamp+=pt),y._endClamp&&!de&&(y._endClamp=xt||-.001,xt=Math.min(xt,or(D,A))),Tt=xt-Z||(Z-=.01)&&.001,Ht&&(ie=R.utils.clamp(0,1,R.utils.normalize(Z,xt,He))),y._pinPush=at,me&&pt&&(Xt={},Xt[A.a]="+="+pt,Ce&&(Xt[A.p]="-="+bt()),R.set([me,Me],Xt)),f&&!(fo&&y.end>=or(D,A)))Xt=Ve(f),Ps=A===Ct,Wr=bt(),ke=parseFloat(yt(A.a))+at,!vt&&xt>1&&(tr=(P?ct.scrollingElement||Ze:D).style,tr={style:tr,value:tr["overflow"+A.a.toUpperCase()]},P&&Ve(st)["overflow"+A.a.toUpperCase()]!=="scroll"&&(tr.style["overflow"+A.a.toUpperCase()]="scroll")),ao(f,Ot,Xt),pi=ln(f),jt=vr(f,!0),Jn=X&&xr(D,Ps?Jt:Ct)(),g?(Mt=[g+A.os2,Tt+at+Pt],Mt.t=Ot,Ut=g===At?yn(f,A)+Tt+at:0,Ut&&(Mt.push(A.d,Ut+Pt),Ot.style.flexBasis!=="auto"&&(Ot.style.flexBasis=Ut+Pt)),Li(Mt),Ce&&W.forEach(function(Wi){Wi.pin===Ce&&Wi.vars.pinSpacing!==!1&&(Wi._subPinOffset=!0)}),X&&bt(He)):(Ut=yn(f,A),Ut&&Ot.style.flexBasis!=="auto"&&(Ot.style.flexBasis=Ut+Pt)),X&&($t={top:jt.top+(Ps?Wr-Z:Jn)+Pt,left:jt.left+(Ps?Jn:Wr-Z)+Pt,boxSizing:"border-box",position:"fixed"},$t[ai]=$t["max"+zi]=Math.ceil(jt.width)+Pt,$t[oi]=$t["max"+vo]=Math.ceil(jt.height)+Pt,$t[Be]=$t[Be+ys]=$t[Be+ms]=$t[Be+vs]=$t[Be+xs]="0",$t[At]=Xt[At],$t[At+ys]=Xt[At+ys],$t[At+ms]=Xt[At+ms],$t[At+vs]=Xt[At+vs],$t[At+xs]=Xt[At+xs],Vr=Vd(Mr,$t,b),de&&bt(0)),i?(Yo=i._initted,eo(1),i.render(i.duration(),!0,!0),ur=yt(A.a)-ke+Tt+at,Cr=Math.abs(Tt-ur)>1,X&&Cr&&Vr.splice(Vr.length-2,2),i.render(0,!0,!0),Yo||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),eo(0)):ur=Tt,tr&&(tr.value?tr.style["overflow"+A.a.toUpperCase()]=tr.value:tr.style.removeProperty("overflow-"+A.a));else if(d&&bt()&&!M)for(jt=d.parentNode;jt&&jt!==st;)jt._pinOffset&&(Z-=jt._pinOffset,xt-=jt._pinOffset),jt=jt.parentNode;Xi&&Xi.forEach(function(Wi){return Wi.revert(!1,!0)}),y.start=Z,y.end=xt,ne=Ge=de?He:bt(),!M&&!de&&(ne<He&&bt(He),y.scroll.rec=0),y.revert(!1,!0),Vt=ee(),qe&&(dt=-1,qe.restart(!0)),te=0,i&&O&&(i._initted||Gr)&&i.progress()!==Gr&&i.progress(Gr||0,!0).render(i.time(),!0,!0),(Ht||ie!==y.progress||M||p)&&(i&&!O&&i.totalProgress(M&&Z<-.001&&!ie?R.utils.normalize(Z,xt,0):ie,!0),y.progress=Ht||(ne-Z)/Tt===ie?0:ie),f&&g&&(Ot._pinOffset=Math.round(y.progress*ur)),Y&&Y.invalidate(),isNaN(Gi)||(Gi-=R.getProperty(E,A.p),Fs-=R.getProperty(Ee,A.p),un(E,A,Gi),un(me,A,Gi-(N||0)),un(Ee,A,Fs),un(Me,A,Fs-(N||0))),Ht&&!de&&y.update(),u&&!de&&!Tr&&(Tr=!0,u(y),Tr=!1)}},y.getVelocity=function(){return(bt()-Ge)/(ee()-fs)*1e3||0},y.endAnimation=function(){us(y.callbackAnimation),i&&(Y?Y.progress(1):i.paused()?O||us(i,y.direction<0,1):us(i,i.reversed()))},y.labelToScroll=function(F){return i&&i.labels&&(Z||y.refresh()||Z)+i.labels[F]/i.duration()*Tt||0},y.getTrailing=function(F){var V=W.indexOf(y),L=y.direction>0?W.slice(0,V).reverse():W.slice(V+1);return(Fe(F)?L.filter(function(N){return N.vars.preventOverlaps===F}):L).filter(function(N){return y.direction>0?N.end<=Z:N.start>=xt})},y.update=function(F,V,L){if(!(M&&!L&&!F)){var N=de===!0?He:y.scroll(),kt=F?0:(N-Z)/Tt,H=kt<0?0:kt>1?1:kt||0,vt=y.progress,Ht,pt,at,J,je,lt,Ce,Ke;if(V&&(Ge=ne,ne=M?bt():N,x&&(Ur=Ar,Ar=i&&!O?i.totalProgress():H)),_&&f&&!te&&!rn&&Ue&&(!H&&Z<N+(N-Ge)/(ee()-fs)*_?H=1e-4:H===1&&xt>N+(N-Ge)/(ee()-fs)*_&&(H=.9999)),H!==vt&&y.enabled){if(Ht=y.isActive=!!H&&H<1,pt=!!vt&&vt<1,lt=Ht!==pt,je=lt||!!H!=!!vt,y.direction=H>vt?1:-1,y.progress=H,je&&!te&&(at=H&&!vt?0:H===1?1:vt===1?2:3,O&&(J=!lt&&I[at+1]!=="none"&&I[at+1]||I[at],Ke=i&&(J==="complete"||J==="reset"||J in i))),C&&(lt||Ke)&&(Ke||c||!i)&&(pe(C)?C(y):y.getTrailing(C).forEach(function(Wr){return Wr.endAnimation()})),O||(Y&&!te&&!rn?(Y._dp._time-Y._start!==Y._time&&Y.render(Y._dp._time-Y._start),Y.resetTo?Y.resetTo("totalProgress",H,i._tTime/i._tDur):(Y.vars.totalProgress=H,Y.invalidate().restart())):i&&i.totalProgress(H,!!(te&&(Vt||F)))),f){if(F&&g&&(Ot.style[g+A.os2]=Vi),!X)We(ds(ke+ur*H));else if(je){if(Ce=!F&&H>vt&&xt+1>N&&N+1>=or(D,A),b)if(!F&&(Ht||Ce)){var Ut=vr(f,!0),Xt=N-Z;Fl(f,st,Ut.top+(A===Ct?Xt:0)+Pt,Ut.left+(A===Ct?0:Xt)+Pt)}else Fl(f,Ot);Li(Ht||Ce?Vr:pi),Cr&&H<1&&Ht||We(ke+(H===1&&!Ce?ur:0))}}x&&!se.tween&&!te&&!rn&&qe.restart(!0),o&&(lt||w&&H&&(H<1||!ro))&&bs(o.targets).forEach(function(Wr){return Wr.classList[Ht||w?"add":"remove"](o.className)}),a&&!O&&!F&&a(y),je&&!te?(O&&(Ke&&(J==="complete"?i.pause().totalProgress(1):J==="reset"?i.restart(!0).pause():J==="restart"?i.restart(!0):i[J]()),a&&a(y)),(lt||!ro)&&(l&<&&so(y,l),q[at]&&so(y,q[at]),w&&(H===1?y.kill(!1,1):q[at]=0),lt||(at=H===1?1:3,q[at]&&so(y,q[at]))),S&&!Ht&&Math.abs(y.getVelocity())>(ps(S)?S:2500)&&(us(y.callbackAnimation),Y?Y.progress(1):us(i,J==="reverse"?1:!H,1))):O&&a&&!te&&a(y)}if(gi){var jt=M?N/M.duration()*(M._caScrollDist||0):N;Ds(jt+(E._isFlipped?1:0)),gi(jt)}mi&&mi(-N/M.duration()*(M._caScrollDist||0))}},y.enable=function(F,V){y.enabled||(y.enabled=!0,It(D,"resize",gs),P||It(D,"scroll",Fi),it&&It(s,"refreshInit",it),F!==!1&&(y.progress=ie=0,ne=Ge=dt=bt()),V!==!1&&y.refresh())},y.getTween=function(F){return F&&se?se.tween:Y},y.setPositions=function(F,V,L,N){if(M){var kt=M.scrollTrigger,H=M.duration(),vt=kt.end-kt.start;F=kt.start+vt*F/H,V=kt.start+vt*V/H}y.refresh(!1,!1,{start:bl(F,L&&!!y._startClamp),end:bl(V,L&&!!y._endClamp)},N),y.update()},y.adjustPinSpacing=function(F){if(Mt&&F){var V=Mt.indexOf(A.d)+1;Mt[V]=parseFloat(Mt[V])+F+Pt,Mt[1]=parseFloat(Mt[1])+F+Pt,Li(Mt)}},y.disable=function(F,V){if(y.enabled&&(F!==!1&&y.revert(!0,!0),y.enabled=y.isActive=!1,V||Y&&Y.pause(),He=0,qt&&(qt.uncache=1),it&&zt(s,"refreshInit",it),qe&&(qe.pause(),se.tween&&se.tween.kill()&&(se.tween=0)),!P)){for(var L=W.length;L--;)if(W[L].scroller===D&&W[L]!==y)return;zt(D,"resize",gs),P||zt(D,"scroll",Fi)}},y.kill=function(F,V){y.disable(F,V),Y&&!V&&Y.kill(),h&&delete co[h];var L=W.indexOf(y);L>=0&&W.splice(L,1),L===ce&&pn>0&&ce--,L=0,W.forEach(function(N){return N.scroller===y.scroller&&(L=1)}),L||de||(y.scroll.rec=0),i&&(i.scrollTrigger=null,F&&i.revert({kill:!1}),V||i.kill()),me&&[me,Me,E,Ee].forEach(function(N){return N.parentNode&&N.parentNode.removeChild(N)}),ws===y&&(ws=0),f&&(qt&&(qt.uncache=1),L=0,W.forEach(function(N){return N.pin===f&&L++}),L||(qt.spacer=0)),r.onKill&&r.onKill(y)},W.push(y),y.enable(!1,!1),fr&&fr(y),i&&i.add&&!Tt){var K=y.update;y.update=function(){y.update=K,Z||xt||y.refresh()},R.delayedCall(.01,y.update),Tt=.01,Z=xt=0}else y.refresh();f&&Id()},s.register=function(r){return Ri||(R=r||Xl(),Ul()&&window.document&&s.enable(),Ri=cs),Ri},s.defaults=function(r){if(r)for(var i in r)on[i]=r[i];return on},s.disable=function(r,i){cs=0,W.forEach(function(a){return a[i?"kill":"disable"](r)}),zt($,"wheel",Fi),zt(ct,"scroll",Fi),clearInterval(en),zt(ct,"touchcancel",ar),zt(st,"touchstart",ar),nn(zt,ct,"pointerdown,touchstart,mousedown",Tl),nn(zt,ct,"pointerup,touchend,mouseup",Ml),mn.kill(),sn(zt);for(var n=0;n<G.length;n+=3)an(zt,G[n],G[n+1]),an(zt,G[n],G[n+2])},s.enable=function(){if($=window,ct=document,Ze=ct.documentElement,st=ct.body,R&&(bs=R.utils.toArray,_s=R.utils.clamp,uo=R.core.context||ar,eo=R.core.suppressOverwrites||ar,_o=$.history.scrollRestoration||"auto",po=$.pageYOffset,R.core.globals("ScrollTrigger",s),st)){cs=1,ki=document.createElement("div"),ki.style.height="100vh",ki.style.position="absolute",Zl(),Pd(),mt.register(R),s.isTouch=mt.isTouch,Nr=mt.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),lo=mt.isTouch===1,It($,"wheel",Fi),zl=[$,ct,Ze,st],R.matchMedia?(s.matchMedia=function(h){var l=R.matchMedia(),u;for(u in h)l.add(u,h[u]);return l},R.addEventListener("matchMediaInit",function(){return bo()}),R.addEventListener("matchMediaRevert",function(){return $l()}),R.addEventListener("matchMedia",function(){ni(0,1),fi("matchMedia")}),R.matchMedia("(orientation: portrait)",function(){return no(),no})):console.warn("Requires GSAP 3.11.0 or later"),no(),It(ct,"scroll",Fi);var r=st.style,i=r.borderTopStyle,n=R.core.Animation.prototype,a,o;for(n.revert||Object.defineProperty(n,"revert",{value:function(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",a=vr(st),Ct.m=Math.round(a.top+Ct.sc())||0,Jt.m=Math.round(a.left+Jt.sc())||0,i?r.borderTopStyle=i:r.removeProperty("border-top-style"),en=setInterval(Al,250),R.delayedCall(.5,function(){return rn=0}),It(ct,"touchcancel",ar),It(st,"touchstart",ar),nn(It,ct,"pointerdown,touchstart,mousedown",Tl),nn(It,ct,"pointerup,touchend,mouseup",Ml),ho=R.utils.checkPrefix("transform"),gn.push(ho),Ri=ee(),mn=R.delayedCall(.2,ni).pause(),Oi=[ct,"visibilitychange",function(){var h=$.innerWidth,l=$.innerHeight;ct.hidden?(yl=h,vl=l):(yl!==h||vl!==l)&&gs()},ct,"DOMContentLoaded",ni,$,"load",ni,$,"resize",gs],sn(It),W.forEach(function(h){return h.enable(0,1)}),o=0;o<G.length;o+=3)an(zt,G[o],G[o+1]),an(zt,G[o],G[o+2])}},s.config=function(r){"limitCallbacks"in r&&(ro=!!r.limitCallbacks);var i=r.syncInterval;i&&clearInterval(en)||(en=i)&&setInterval(Al,i),"ignoreMobileResize"in r&&(lo=s.isTouch===1&&r.ignoreMobileResize),"autoRefreshEvents"in r&&(sn(zt)||sn(It,r.autoRefreshEvents||"none"),Nl=(r.autoRefreshEvents+"").indexOf("resize")===-1)},s.scrollerProxy=function(r,i){var n=ue(r),a=G.indexOf(n),o=li(n);~a&&G.splice(a,o?6:2),i&&(o?Qe.unshift($,i,st,i,Ze,i):Qe.unshift(n,i))},s.clearMatchMedia=function(r){W.forEach(function(i){return i._ctx&&i._ctx.query===r&&i._ctx.kill(!0,!0)})},s.isInViewport=function(r,i,n){var a=(Fe(r)?ue(r):r).getBoundingClientRect(),o=a[n?ai:oi]*i||0;return n?a.right-o>0&&a.left+o<$.innerWidth:a.bottom-o>0&&a.top+o<$.innerHeight},s.positionInViewport=function(r,i,n){Fe(r)&&(r=ue(r));var a=r.getBoundingClientRect(),o=a[n?ai:oi],h=i==null?o/2:i in vn?vn[i]*o:~i.indexOf("%")?parseFloat(i)*o/100:parseFloat(i)||0;return n?(a.left+h)/$.innerWidth:(a.top+h)/$.innerHeight},s.killAll=function(r){if(W.slice(0).forEach(function(n){return n.vars.id!=="ScrollSmoother"&&n.kill()}),r!==!0){var i=ui.killAll||[];ui={},i.forEach(function(n){return n()})}},s}();U.version="3.12.5";U.saveStyles=function(s){return s?bs(s).forEach(function(t){if(t&&t.style){var e=Pe.indexOf(t);e>=0&&Pe.splice(e,5),Pe.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),R.core.getCache(t),uo())}}):Pe};U.revert=function(s,t){return bo(!s,t)};U.create=function(s,t){return new U(s,t)};U.refresh=function(s){return s?gs():(Ri||U.register())&&ni(!0)};U.update=function(s){return++G.cache&&wr(s===!0?2:0)};U.clearScrollMemory=Ql;U.maxScroll=function(s,t){return or(s,t?Jt:Ct)};U.getScrollFunc=function(s,t){return xr(ue(s),t?Jt:Ct)};U.getById=function(s){return co[s]};U.getAll=function(){return W.filter(function(s){return s.vars.id!=="ScrollSmoother"})};U.isScrolling=function(){return!!Ue};U.snapDirectional=wo;U.addEventListener=function(s,t){var e=ui[s]||(ui[s]=[]);~e.indexOf(t)||e.push(t)};U.removeEventListener=function(s,t){var e=ui[s],r=e&&e.indexOf(t);r>=0&&e.splice(r,1)};U.batch=function(s,t){var e=[],r={},i=t.interval||.016,n=t.batchMax||1e9,a=function(l,u){var c=[],d=[],f=R.delayedCall(i,function(){u(c,d),c=[],d=[]}).pause();return function(g){c.length||f.restart(!0),c.push(g.trigger),d.push(g),n<=c.length&&f.progress(1)}},o;for(o in t)r[o]=o.substr(0,2)==="on"&&pe(t[o])&&o!=="onRefreshInit"?a(o,t[o]):t[o];return pe(n)&&(n=n(),It(U,"refresh",function(){return n=t.batchMax()})),bs(s).forEach(function(h){var l={};for(o in r)l[o]=r[o];l.trigger=h,e.push(U.create(l))}),e};var Ol=function(t,e,r,i){return e>i?t(i):e<0&&t(0),r>i?(i-e)/(r-e):r<0?e/(e-r):1},oo=function s(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(mt.isTouch?" pinch-zoom":""):"none",t===Ze&&s(st,e)},fn={auto:1,scroll:1},Xd=function(t){var e=t.event,r=t.target,i=t.axis,n=(e.changedTouches?e.changedTouches[0]:e).target,a=n._gsap||R.core.getCache(n),o=ee(),h;if(!a._isScrollT||o-a._isScrollT>2e3){for(;n&&n!==st&&(n.scrollHeight<=n.clientHeight&&n.scrollWidth<=n.clientWidth||!(fn[(h=Ve(n)).overflowY]||fn[h.overflowX]));)n=n.parentNode;a._isScroll=n&&n!==r&&!li(n)&&(fn[(h=Ve(n)).overflowY]||fn[h.overflowX]),a._isScrollT=o}(a._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},Jl=function(t,e,r,i){return mt.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&Xd,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return r&&It(ct,mt.eventTypes[0],Ll,!1,!0)},onDisable:function(){return zt(ct,mt.eventTypes[0],Ll,!0)}})},Gd=/(input|label|select|textarea)/i,kl,Ll=function(t){var e=Gd.test(t.target.tagName);(e||kl)&&(t._gsapAllow=!0,kl=e)},Wd=function(t){si(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e=t,r=e.normalizeScrollX,i=e.momentum,n=e.allowNestedScroll,a=e.onRelease,o,h,l=ue(t.target)||Ze,u=R.core.globals().ScrollSmoother,c=u&&u.get(),d=Nr&&(t.content&&ue(t.content)||c&&t.content!==!1&&!c.smooth()&&c.content()),f=xr(l,Ct),g=xr(l,Jt),p=1,_=(mt.isTouch&&$.visualViewport?$.visualViewport.scale*$.visualViewport.width:$.outerWidth)/$.innerWidth,m=0,v=pe(i)?function(){return i(o)}:function(){return i||2.8},w,x,b=Jl(l,t.type,!0,n),T=function(){return x=!1},M=ar,S=ar,C=function(){h=or(l,Ct),S=_s(Nr?1:0,h),r&&(M=_s(0,or(l,Jt))),w=hi},A=function(){d._gsap.y=ds(parseFloat(d._gsap.y)+f.offset)+"px",d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(d._gsap.y)+", 0, 1)",f.offset=f.cacheID=0},O=function(){if(x){requestAnimationFrame(T);var Q=ds(o.deltaY/2),rt=S(f.v-Q);if(d&&rt!==f.v+f.offset){f.offset=rt-f.v;var y=ds((parseFloat(d&&d._gsap.y)||0)-f.offset);d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+y+", 0, 1)",d._gsap.y=y+"px",f.cacheID=G.cache,wr()}return!0}f.offset&&A(),x=!0},D,k,P,X,q=function(){C(),D.isActive()&&D.vars.scrollY>h&&(f()>h?D.progress(1)&&f(h):D.resetTo("scrollY",h))};return d&&R.set(d,{y:"+=0"}),t.ignoreCheck=function(I){return Nr&&I.type==="touchmove"&&O(I)||p>1.05&&I.type!=="touchstart"||o.isGesturing||I.touches&&I.touches.length>1},t.onPress=function(){x=!1;var I=p;p=ds(($.visualViewport&&$.visualViewport.scale||1)/_),D.pause(),I!==p&&oo(l,p>1.01?!0:r?!1:"x"),k=g(),P=f(),C(),w=hi},t.onRelease=t.onGestureStart=function(I,Q){if(f.offset&&A(),!Q)X.restart(!0);else{G.cache++;var rt=v(),y,it;r&&(y=g(),it=y+rt*.05*-I.velocityX/.227,rt*=Ol(g,y,it,or(l,Jt)),D.vars.scrollX=M(it)),y=f(),it=y+rt*.05*-I.velocityY/.227,rt*=Ol(f,y,it,or(l,Ct)),D.vars.scrollY=S(it),D.invalidate().duration(rt).play(.01),(Nr&&D.vars.scrollY>=h||y>=h-1)&&R.to({},{onUpdate:q,duration:rt})}a&&a(I)},t.onWheel=function(){D._ts&&D.pause(),ee()-m>1e3&&(w=0,m=ee())},t.onChange=function(I,Q,rt,y,it){if(hi!==w&&C(),Q&&r&&g(M(y[2]===Q?k+(I.startX-I.x):g()+Q-y[1])),rt){f.offset&&A();var re=it[2]===rt,Xe=re?P+I.startY-I.y:f()+rt-it[1],dt=S(Xe);re&&Xe!==dt&&(P+=dt-Xe),f(dt)}(rt||Q)&&wr()},t.onEnable=function(){oo(l,r?!1:"x"),U.addEventListener("refresh",q),It($,"resize",q),f.smooth&&(f.target.style.scrollBehavior="auto",f.smooth=g.smooth=!1),b.enable()},t.onDisable=function(){oo(l,!0),zt($,"resize",q),U.removeEventListener("refresh",q),b.kill()},t.lockAxis=t.lockAxis!==!1,o=new mt(t),o.iOS=Nr,Nr&&!f()&&f(1),Nr&&R.ticker.add(ar),X=o._dc,D=R.to(o,{ease:"power4",paused:!0,inherit:!1,scrollX:r?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Kl(f,f(),function(){return D.pause()})},onUpdate:wr,onComplete:X.vars.onComplete}),o};U.sort=function(s){return W.sort(s||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};U.observe=function(s){return new mt(s)};U.normalizeScroll=function(s){if(typeof s>"u")return fe;if(s===!0&&fe)return fe.enable();if(s===!1){fe&&fe.kill(),fe=s;return}var t=s instanceof mt?s:Wd(s);return fe&&fe.target===t.target&&fe.kill(),li(t.target)&&(fe=t),t};U.core={_getVelocityProp:tn,_inputObserver:Jl,_scrollers:G,_proxies:Qe,bridge:{ss:function(){Ue||fi("scrollStart"),Ue=ee()},ref:function(){return te}}};Xl()&&R.registerPlugin(U);function ci(s){let t=s[0],e=s[1],r=s[2];return Math.sqrt(t*t+e*e+r*r)}function bn(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s}function tu(s,t,e,r){return s[0]=t,s[1]=e,s[2]=r,s}function To(s,t,e){return s[0]=t[0]+e[0],s[1]=t[1]+e[1],s[2]=t[2]+e[2],s}function Mo(s,t,e){return s[0]=t[0]-e[0],s[1]=t[1]-e[1],s[2]=t[2]-e[2],s}function eu(s,t,e){return s[0]=t[0]*e[0],s[1]=t[1]*e[1],s[2]=t[2]*e[2],s}function ru(s,t,e){return s[0]=t[0]/e[0],s[1]=t[1]/e[1],s[2]=t[2]/e[2],s}function Mn(s,t,e){return s[0]=t[0]*e,s[1]=t[1]*e,s[2]=t[2]*e,s}function iu(s,t){let e=t[0]-s[0],r=t[1]-s[1],i=t[2]-s[2];return Math.sqrt(e*e+r*r+i*i)}function su(s,t){let e=t[0]-s[0],r=t[1]-s[1],i=t[2]-s[2];return e*e+r*r+i*i}function Eo(s){let t=s[0],e=s[1],r=s[2];return t*t+e*e+r*r}function nu(s,t){return s[0]=-t[0],s[1]=-t[1],s[2]=-t[2],s}function au(s,t){return s[0]=1/t[0],s[1]=1/t[1],s[2]=1/t[2],s}function Tn(s,t){let e=t[0],r=t[1],i=t[2],n=e*e+r*r+i*i;return n>0&&(n=1/Math.sqrt(n)),s[0]=t[0]*n,s[1]=t[1]*n,s[2]=t[2]*n,s}function Co(s,t){return s[0]*t[0]+s[1]*t[1]+s[2]*t[2]}function Ao(s,t,e){let r=t[0],i=t[1],n=t[2],a=e[0],o=e[1],h=e[2];return s[0]=i*h-n*o,s[1]=n*a-r*h,s[2]=r*o-i*a,s}function ou(s,t,e,r){let i=t[0],n=t[1],a=t[2];return s[0]=i+r*(e[0]-i),s[1]=n+r*(e[1]-n),s[2]=a+r*(e[2]-a),s}function hu(s,t,e){let r=t[0],i=t[1],n=t[2],a=e[3]*r+e[7]*i+e[11]*n+e[15];return a=a||1,s[0]=(e[0]*r+e[4]*i+e[8]*n+e[12])/a,s[1]=(e[1]*r+e[5]*i+e[9]*n+e[13])/a,s[2]=(e[2]*r+e[6]*i+e[10]*n+e[14])/a,s}function lu(s,t,e){let r=t[0],i=t[1],n=t[2],a=e[3]*r+e[7]*i+e[11]*n+e[15];return a=a||1,s[0]=(e[0]*r+e[4]*i+e[8]*n)/a,s[1]=(e[1]*r+e[5]*i+e[9]*n)/a,s[2]=(e[2]*r+e[6]*i+e[10]*n)/a,s}function uu(s,t,e){let r=t[0],i=t[1],n=t[2];return s[0]=r*e[0]+i*e[3]+n*e[6],s[1]=r*e[1]+i*e[4]+n*e[7],s[2]=r*e[2]+i*e[5]+n*e[8],s}function fu(s,t,e){let r=t[0],i=t[1],n=t[2],a=e[0],o=e[1],h=e[2],l=e[3],u=o*n-h*i,c=h*r-a*n,d=a*i-o*r,f=o*d-h*c,g=h*u-a*d,p=a*c-o*u,_=l*2;return u*=_,c*=_,d*=_,f*=2,g*=2,p*=2,s[0]=r+u+f,s[1]=i+c+g,s[2]=n+d+p,s}var cu=function(){let s=[0,0,0],t=[0,0,0];return function(e,r){bn(s,e),bn(t,r),Tn(s,s),Tn(t,t);let i=Co(s,t);return i>1?0:i<-1?Math.PI:Math.acos(i)}}();function du(s,t){return s[0]===t[0]&&s[1]===t[1]&&s[2]===t[2]}var ht=class s extends Array{constructor(t=0,e=t,r=t){return super(t,e,r),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,e=t,r=t){return t.length?this.copy(t):(tu(this,t,e,r),this)}copy(t){return bn(this,t),this}add(t,e){return e?To(this,t,e):To(this,this,t),this}sub(t,e){return e?Mo(this,t,e):Mo(this,this,t),this}multiply(t){return t.length?eu(this,this,t):Mn(this,this,t),this}divide(t){return t.length?ru(this,this,t):Mn(this,this,1/t),this}inverse(t=this){return au(this,t),this}len(){return ci(this)}distance(t){return t?iu(this,t):ci(this)}squaredLen(){return Eo(this)}squaredDistance(t){return t?su(this,t):Eo(this)}negate(t=this){return nu(this,t),this}cross(t,e){return e?Ao(this,t,e):Ao(this,this,t),this}scale(t){return Mn(this,this,t),this}normalize(){return Tn(this,this),this}dot(t){return Co(this,t)}equals(t){return du(this,t)}applyMatrix3(t){return uu(this,this,t),this}applyMatrix4(t){return hu(this,this,t),this}scaleRotateMatrix4(t){return lu(this,this,t),this}applyQuaternion(t){return fu(this,this,t),this}angle(t){return cu(this,t)}lerp(t,e){return ou(this,this,t,e),this}clone(){return new s(this[0],this[1],this[2])}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this[2]=t[e+2],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}transformDirection(t){let e=this[0],r=this[1],i=this[2];return this[0]=t[0]*e+t[4]*r+t[8]*i,this[1]=t[1]*e+t[5]*r+t[9]*i,this[2]=t[2]*e+t[6]*r+t[10]*i,this.normalize()}};var gu=new ht,Yd=1,qd=1,_u=!1,Ii=class{constructor(t,e={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=e,this.id=Yd++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in e)this.addAttribute(r,e[r])}addAttribute(t,e){if(this.attributes[t]=e,e.id=qd++,e.size=e.size||1,e.type=e.type||(e.data.constructor===Float32Array?this.gl.FLOAT:e.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),e.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,e.normalized=e.normalized||!1,e.stride=e.stride||0,e.offset=e.offset||0,e.count=e.count||(e.stride?e.data.byteLength/e.stride:e.data.length/e.size),e.divisor=e.instanced||0,e.needsUpdate=!1,e.usage=e.usage||this.gl.STATIC_DRAW,e.buffer||this.updateAttribute(e),e.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==e.count*e.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,e.count*e.divisor);this.instancedCount=e.count*e.divisor}else t==="index"?this.drawRange.count=e.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,e.count))}updateAttribute(t){let e=!t.buffer;e&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),e?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((e,{name:r,type:i})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}let n=this.attributes[r];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let a=1;i===35674&&(a=2),i===35675&&(a=3),i===35676&&(a=4);let o=n.size/a,h=a===1?0:a*a*4,l=a===1?0:a*4;for(let u=0;u<a;u++)this.gl.vertexAttribPointer(e+u,o,n.type,n.normalized,n.stride+h,n.offset+u*l),this.gl.enableVertexAttribArray(e+u),this.gl.renderer.vertexAttribDivisor(e+u,n.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:e=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((i,{name:n})=>{let a=this.attributes[n];a.needsUpdate&&this.updateAttribute(a)});let r=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(e,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(e,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(e,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(e,this.drawRange.start,this.drawRange.count)}getPosition(){let t=this.attributes.position;if(t.data)return t;if(!_u)return console.warn("No position buffer data found to compute bounds"),_u=!0}computeBoundingBox(t){t||(t=this.getPosition());let e=t.data,r=t.size;this.bounds||(this.bounds={min:new ht,max:new ht,center:new ht,scale:new ht,radius:1/0});let i=this.bounds.min,n=this.bounds.max,a=this.bounds.center,o=this.bounds.scale;i.set(1/0),n.set(-1/0);for(let h=0,l=e.length;h<l;h+=r){let u=e[h],c=e[h+1],d=e[h+2];i.x=Math.min(u,i.x),i.y=Math.min(c,i.y),i.z=Math.min(d,i.z),n.x=Math.max(u,n.x),n.y=Math.max(c,n.y),n.z=Math.max(d,n.z)}o.sub(n,i),a.add(i,n).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());let e=t.data,r=t.size;this.bounds||this.computeBoundingBox(t);let i=0;for(let n=0,a=e.length;n<a;n+=r)gu.fromArray(e,n),i=Math.max(i,this.bounds.center.squaredDistance(gu));this.bounds.radius=Math.sqrt(i)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}};var Hd=1,mu={},Re=class{constructor(t,{vertex:e,fragment:r,uniforms:i={},transparent:n=!1,cullFace:a=t.BACK,frontFace:o=t.CCW,depthTest:h=!0,depthWrite:l=!0,depthFunc:u=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=i,this.id=Hd++,e||console.warn("vertex shader not supplied"),r||console.warn("fragment shader not supplied"),this.transparent=n,this.cullFace=a,this.frontFace=o,this.depthTest=h,this.depthWrite=l,this.depthFunc=u,this.blendFunc={},this.blendEquation={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:e,fragment:r})}setShaders({vertex:t,fragment:e}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
Vertex Shader
${xu(t)}`)),e&&(this.gl.shaderSource(this.fragmentShader,e),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
Fragment Shader
${xu(e)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let a=0;a<r;a++){let o=this.gl.getActiveUniform(this.program,a);this.uniformLocations.set(o,this.gl.getUniformLocation(this.program,o.name));let h=o.name.match(/(\w+)/g);o.uniformName=h[0],o.nameComponents=h.slice(1)}this.attributeLocations=new Map;let i=[],n=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){let o=this.gl.getActiveAttrib(this.program,a),h=this.gl.getAttribLocation(this.program,o.name);h!==-1&&(i[h]=o.name,this.attributeLocations.set(o,h))}this.attributeOrder=i.join("")}setBlendFunc(t,e,r,i){this.blendFunc.src=t,this.blendFunc.dst=e,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=i,t&&(this.transparent=!0)}setBlendEquation(t,e){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=e}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha)}use({flipFaces:t=!1}={}){let e=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((i,n)=>{let a=this.uniforms[n.uniformName];for(let o of n.nameComponents){if(!a)break;if(o in a)a=a[o];else{if(Array.isArray(a.value))break;a=void 0;break}}if(!a)return yu(`Active uniform ${n.name} has not been supplied`);if(a&&a.value===void 0)return yu(`${n.name} uniform is missing a value parameter`);if(a.value.texture)return e=e+1,a.value.update(e),So(this.gl,n.type,i,e);if(a.value.length&&a.value[0].texture){let o=[];return a.value.forEach(h=>{e=e+1,h.update(e),o.push(e)}),So(this.gl,n.type,i,o)}So(this.gl,n.type,i,a.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}};function So(s,t,e,r){r=r.length?jd(r):r;let i=s.renderer.state.uniformLocations.get(e);if(r.length)if(i===void 0||i.length!==r.length)s.renderer.state.uniformLocations.set(e,r.slice(0));else{if($d(i,r))return;i.set?i.set(r):Qd(i,r),s.renderer.state.uniformLocations.set(e,i)}else{if(i===r)return;s.renderer.state.uniformLocations.set(e,r)}switch(t){case 5126:return r.length?s.uniform1fv(e,r):s.uniform1f(e,r);case 35664:return s.uniform2fv(e,r);case 35665:return s.uniform3fv(e,r);case 35666:return s.uniform4fv(e,r);case 35670:case 5124:case 35678:case 35680:return r.length?s.uniform1iv(e,r):s.uniform1i(e,r);case 35671:case 35667:return s.uniform2iv(e,r);case 35672:case 35668:return s.uniform3iv(e,r);case 35673:case 35669:return s.uniform4iv(e,r);case 35674:return s.uniformMatrix2fv(e,!1,r);case 35675:return s.uniformMatrix3fv(e,!1,r);case 35676:return s.uniformMatrix4fv(e,!1,r)}}function xu(s){let t=s.split(`
`);for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(`
`)}function jd(s){let t=s.length,e=s[0].length;if(e===void 0)return s;let r=t*e,i=mu[r];i||(mu[r]=i=new Float32Array(r));for(let n=0;n<t;n++)i.set(s[n],n*e);return i}function $d(s,t){if(s.length!==t.length)return!1;for(let e=0,r=s.length;e<r;e++)if(s[e]!==t[e])return!1;return!0}function Qd(s,t){for(let e=0,r=s.length;e<r;e++)s[e]=t[e]}var Do=0;function yu(s){Do>100||(console.warn(s),Do++,Do>100&&console.warn("More than 100 program warnings - stopping logs."))}var Po=new ht,Zd=1,Ms=class{constructor({canvas:t=document.createElement("canvas"),width:e=300,height:r=150,dpr:i=1,alpha:n=!1,depth:a=!0,stencil:o=!1,antialias:h=!1,premultipliedAlpha:l=!1,preserveDrawingBuffer:u=!1,powerPreference:c="default",autoClear:d=!0,webgl:f=2}={}){let g={alpha:n,depth:a,stencil:o,antialias:h,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:c};this.dpr=i,this.alpha=n,this.color=!0,this.depth=a,this.stencil=o,this.premultipliedAlpha=l,this.autoClear=d,this.id=Zd++,f===2&&(this.gl=t.getContext("webgl2",g)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",g)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(e,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,e){this.width=t,this.height=e,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=e*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:e+"px"})}setViewport(t,e,r=0,i=0){this.state.viewport.width===t&&this.state.viewport.height===e||(this.state.viewport.width=t,this.state.viewport.height=e,this.state.viewport.x=r,this.state.viewport.y=i,this.gl.viewport(r,i,t,e))}setScissor(t,e,r=0,i=0){this.gl.scissor(r,i,t,e)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,e,r,i){this.state.blendFunc.src===t&&this.state.blendFunc.dst===e&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=t,this.state.blendFunc.dst=e,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=i,r!==void 0?this.gl.blendFuncSeparate(t,e,r,i):this.gl.blendFunc(t,e))}setBlendEquation(t,e){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===e)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=e,e!==void 0?this.gl.blendEquationSeparate(t,e):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:e=null}={}){this.state.framebuffer!==e&&(this.state.framebuffer=e,this.gl.bindFramebuffer(t,e))}getExtension(t,e,r){return e&&this.gl[e]?this.gl[e].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),e?this.extensions[t]?this.extensions[t][r].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program.id!==e.program.id?t.program.id-e.program.id:t.zDepth!==e.zDepth?t.zDepth-e.zDepth:e.id-t.id}sortTransparent(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.zDepth!==e.zDepth?e.zDepth-t.zDepth:e.id-t.id}sortUI(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program.id!==e.program.id?t.program.id-e.program.id:e.id-t.id}getRenderList({scene:t,camera:e,frustumCull:r,sort:i}){let n=[];if(e&&r&&e.updateFrustum(),t.traverse(a=>{if(!a.visible)return!0;a.draw&&(r&&a.frustumCulled&&e&&!e.frustumIntersectsMesh(a)||n.push(a))}),i){let a=[],o=[],h=[];n.forEach(l=>{l.program.transparent?l.program.depthTest?o.push(l):h.push(l):a.push(l),l.zDepth=0,!(l.renderOrder!==0||!l.program.depthTest||!e)&&(l.worldMatrix.getTranslation(Po),Po.applyMatrix4(e.projectionViewMatrix),l.zDepth=Po.z)}),a.sort(this.sortOpaque),o.sort(this.sortTransparent),h.sort(this.sortUI),n=a.concat(o,h)}return n}render({scene:t,camera:e,target:r=null,update:i=!0,sort:n=!0,frustumCull:a=!0,clear:o}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(o||this.autoClear&&o!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&t.updateMatrixWorld(),e&&e.updateMatrixWorld(),this.getRenderList({scene:t,camera:e,frustumCull:a,sort:n}).forEach(l=>{l.draw({camera:e})})}};function En(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s}function Cn(s,t,e,r,i){return s[0]=t,s[1]=e,s[2]=r,s[3]=i,s}function Fo(s,t,e){return s[0]=t[0]*e,s[1]=t[1]*e,s[2]=t[2]*e,s[3]=t[3]*e,s}function An(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=e*e+r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),s[0]=e*a,s[1]=r*a,s[2]=i*a,s[3]=n*a,s}function Sn(s,t){return s[0]*t[0]+s[1]*t[1]+s[2]*t[2]+s[3]*t[3]}function wu(s){return s[0]=0,s[1]=0,s[2]=0,s[3]=1,s}function bu(s,t,e){e=e*.5;let r=Math.sin(e);return s[0]=r*t[0],s[1]=r*t[1],s[2]=r*t[2],s[3]=Math.cos(e),s}function Ro(s,t,e){let r=t[0],i=t[1],n=t[2],a=t[3],o=e[0],h=e[1],l=e[2],u=e[3];return s[0]=r*u+a*o+i*l-n*h,s[1]=i*u+a*h+n*o-r*l,s[2]=n*u+a*l+r*h-i*o,s[3]=a*u-r*o-i*h-n*l,s}function Tu(s,t,e){e*=.5;let r=t[0],i=t[1],n=t[2],a=t[3],o=Math.sin(e),h=Math.cos(e);return s[0]=r*h+a*o,s[1]=i*h+n*o,s[2]=n*h-i*o,s[3]=a*h-r*o,s}function Mu(s,t,e){e*=.5;let r=t[0],i=t[1],n=t[2],a=t[3],o=Math.sin(e),h=Math.cos(e);return s[0]=r*h-n*o,s[1]=i*h+a*o,s[2]=n*h+r*o,s[3]=a*h-i*o,s}function Eu(s,t,e){e*=.5;let r=t[0],i=t[1],n=t[2],a=t[3],o=Math.sin(e),h=Math.cos(e);return s[0]=r*h+i*o,s[1]=i*h-r*o,s[2]=n*h+a*o,s[3]=a*h-n*o,s}function Cu(s,t,e,r){let i=t[0],n=t[1],a=t[2],o=t[3],h=e[0],l=e[1],u=e[2],c=e[3],d,f,g,p,_;return f=i*h+n*l+a*u+o*c,f<0&&(f=-f,h=-h,l=-l,u=-u,c=-c),1-f>1e-6?(d=Math.acos(f),g=Math.sin(d),p=Math.sin((1-r)*d)/g,_=Math.sin(r*d)/g):(p=1-r,_=r),s[0]=p*i+_*h,s[1]=p*n+_*l,s[2]=p*a+_*u,s[3]=p*o+_*c,s}function Au(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=e*e+r*r+i*i+n*n,o=a?1/a:0;return s[0]=-e*o,s[1]=-r*o,s[2]=-i*o,s[3]=n*o,s}function Su(s,t){return s[0]=-t[0],s[1]=-t[1],s[2]=-t[2],s[3]=t[3],s}function Du(s,t){let e=t[0]+t[4]+t[8],r;if(e>0)r=Math.sqrt(e+1),s[3]=.5*r,r=.5/r,s[0]=(t[5]-t[7])*r,s[1]=(t[6]-t[2])*r,s[2]=(t[1]-t[3])*r;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);let n=(i+1)%3,a=(i+2)%3;r=Math.sqrt(t[i*3+i]-t[n*3+n]-t[a*3+a]+1),s[i]=.5*r,r=.5/r,s[3]=(t[n*3+a]-t[a*3+n])*r,s[n]=(t[n*3+i]+t[i*3+n])*r,s[a]=(t[a*3+i]+t[i*3+a])*r}return s}function Pu(s,t,e="YXZ"){let r=Math.sin(t[0]*.5),i=Math.cos(t[0]*.5),n=Math.sin(t[1]*.5),a=Math.cos(t[1]*.5),o=Math.sin(t[2]*.5),h=Math.cos(t[2]*.5);return e==="XYZ"?(s[0]=r*a*h+i*n*o,s[1]=i*n*h-r*a*o,s[2]=i*a*o+r*n*h,s[3]=i*a*h-r*n*o):e==="YXZ"?(s[0]=r*a*h+i*n*o,s[1]=i*n*h-r*a*o,s[2]=i*a*o-r*n*h,s[3]=i*a*h+r*n*o):e==="ZXY"?(s[0]=r*a*h-i*n*o,s[1]=i*n*h+r*a*o,s[2]=i*a*o+r*n*h,s[3]=i*a*h-r*n*o):e==="ZYX"?(s[0]=r*a*h-i*n*o,s[1]=i*n*h+r*a*o,s[2]=i*a*o-r*n*h,s[3]=i*a*h+r*n*o):e==="YZX"?(s[0]=r*a*h+i*n*o,s[1]=i*n*h+r*a*o,s[2]=i*a*o-r*n*h,s[3]=i*a*h-r*n*o):e==="XZY"&&(s[0]=r*a*h-i*n*o,s[1]=i*n*h-r*a*o,s[2]=i*a*o+r*n*h,s[3]=i*a*h+r*n*o),s}var Fu=En,Ru=Cn;var Ou=Sn;var ku=An;var Dn=class extends Array{constructor(t=0,e=0,r=0,i=1){super(t,e,r,i),this.onChange=()=>{},this._target=this;let n=["0","1","2","3"];return new Proxy(this,{set(a,o){let h=Reflect.set(...arguments);return h&&n.includes(o)&&a.onChange(),h}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return wu(this._target),this.onChange(),this}set(t,e,r,i){return t.length?this.copy(t):(Ru(this._target,t,e,r,i),this.onChange(),this)}rotateX(t){return Tu(this._target,this._target,t),this.onChange(),this}rotateY(t){return Mu(this._target,this._target,t),this.onChange(),this}rotateZ(t){return Eu(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return Au(this._target,t),this.onChange(),this}conjugate(t=this._target){return Su(this._target,t),this.onChange(),this}copy(t){return Fu(this._target,t),this.onChange(),this}normalize(t=this._target){return ku(this._target,t),this.onChange(),this}multiply(t,e){return e?Ro(this._target,t,e):Ro(this._target,this._target,t),this.onChange(),this}dot(t){return Ou(this._target,t)}fromMatrix3(t){return Du(this._target,t),this.onChange(),this}fromEuler(t,e){return Pu(this._target,t,t.order),e||this.onChange(),this}fromAxisAngle(t,e){return bu(this._target,t,e),this.onChange(),this}slerp(t,e){return Cu(this._target,this._target,t,e),this.onChange(),this}fromArray(t,e=0){return this._target[0]=t[e],this._target[1]=t[e+1],this._target[2]=t[e+2],this._target[3]=t[e+3],this.onChange(),this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}};var Jd=1e-6;function Lu(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s[8]=t[8],s[9]=t[9],s[10]=t[10],s[11]=t[11],s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15],s}function zu(s,t,e,r,i,n,a,o,h,l,u,c,d,f,g,p,_){return s[0]=t,s[1]=e,s[2]=r,s[3]=i,s[4]=n,s[5]=a,s[6]=o,s[7]=h,s[8]=l,s[9]=u,s[10]=c,s[11]=d,s[12]=f,s[13]=g,s[14]=p,s[15]=_,s}function Iu(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function Nu(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11],g=t[12],p=t[13],_=t[14],m=t[15],v=e*o-r*a,w=e*h-i*a,x=e*l-n*a,b=r*h-i*o,T=r*l-n*o,M=i*l-n*h,S=u*p-c*g,C=u*_-d*g,A=u*m-f*g,O=c*_-d*p,D=c*m-f*p,k=d*m-f*_,P=v*k-w*D+x*O+b*A-T*C+M*S;return P?(P=1/P,s[0]=(o*k-h*D+l*O)*P,s[1]=(i*D-r*k-n*O)*P,s[2]=(p*M-_*T+m*b)*P,s[3]=(d*T-c*M-f*b)*P,s[4]=(h*A-a*k-l*C)*P,s[5]=(e*k-i*A+n*C)*P,s[6]=(_*x-g*M-m*w)*P,s[7]=(u*M-d*x+f*w)*P,s[8]=(a*D-o*A+l*S)*P,s[9]=(r*A-e*D-n*S)*P,s[10]=(g*T-p*x+m*v)*P,s[11]=(c*x-u*T-f*v)*P,s[12]=(o*C-a*O-h*S)*P,s[13]=(e*O-r*C+i*S)*P,s[14]=(p*w-g*b-_*v)*P,s[15]=(u*b-c*w+d*v)*P,s):null}function Oo(s){let t=s[0],e=s[1],r=s[2],i=s[3],n=s[4],a=s[5],o=s[6],h=s[7],l=s[8],u=s[9],c=s[10],d=s[11],f=s[12],g=s[13],p=s[14],_=s[15],m=t*a-e*n,v=t*o-r*n,w=t*h-i*n,x=e*o-r*a,b=e*h-i*a,T=r*h-i*o,M=l*g-u*f,S=l*p-c*f,C=l*_-d*f,A=u*p-c*g,O=u*_-d*g,D=c*_-d*p;return m*D-v*O+w*A+x*C-b*S+T*M}function ko(s,t,e){let r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],h=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],g=t[11],p=t[12],_=t[13],m=t[14],v=t[15],w=e[0],x=e[1],b=e[2],T=e[3];return s[0]=w*r+x*o+b*c+T*p,s[1]=w*i+x*h+b*d+T*_,s[2]=w*n+x*l+b*f+T*m,s[3]=w*a+x*u+b*g+T*v,w=e[4],x=e[5],b=e[6],T=e[7],s[4]=w*r+x*o+b*c+T*p,s[5]=w*i+x*h+b*d+T*_,s[6]=w*n+x*l+b*f+T*m,s[7]=w*a+x*u+b*g+T*v,w=e[8],x=e[9],b=e[10],T=e[11],s[8]=w*r+x*o+b*c+T*p,s[9]=w*i+x*h+b*d+T*_,s[10]=w*n+x*l+b*f+T*m,s[11]=w*a+x*u+b*g+T*v,w=e[12],x=e[13],b=e[14],T=e[15],s[12]=w*r+x*o+b*c+T*p,s[13]=w*i+x*h+b*d+T*_,s[14]=w*n+x*l+b*f+T*m,s[15]=w*a+x*u+b*g+T*v,s}function Bu(s,t,e){let r=e[0],i=e[1],n=e[2],a,o,h,l,u,c,d,f,g,p,_,m;return t===s?(s[12]=t[0]*r+t[4]*i+t[8]*n+t[12],s[13]=t[1]*r+t[5]*i+t[9]*n+t[13],s[14]=t[2]*r+t[6]*i+t[10]*n+t[14],s[15]=t[3]*r+t[7]*i+t[11]*n+t[15]):(a=t[0],o=t[1],h=t[2],l=t[3],u=t[4],c=t[5],d=t[6],f=t[7],g=t[8],p=t[9],_=t[10],m=t[11],s[0]=a,s[1]=o,s[2]=h,s[3]=l,s[4]=u,s[5]=c,s[6]=d,s[7]=f,s[8]=g,s[9]=p,s[10]=_,s[11]=m,s[12]=a*r+u*i+g*n+t[12],s[13]=o*r+c*i+p*n+t[13],s[14]=h*r+d*i+_*n+t[14],s[15]=l*r+f*i+m*n+t[15]),s}function Vu(s,t,e){let r=e[0],i=e[1],n=e[2];return s[0]=t[0]*r,s[1]=t[1]*r,s[2]=t[2]*r,s[3]=t[3]*r,s[4]=t[4]*i,s[5]=t[5]*i,s[6]=t[6]*i,s[7]=t[7]*i,s[8]=t[8]*n,s[9]=t[9]*n,s[10]=t[10]*n,s[11]=t[11]*n,s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15],s}function Uu(s,t,e,r){let i=r[0],n=r[1],a=r[2],o=Math.hypot(i,n,a),h,l,u,c,d,f,g,p,_,m,v,w,x,b,T,M,S,C,A,O,D,k,P,X;return Math.abs(o)<Jd?null:(o=1/o,i*=o,n*=o,a*=o,h=Math.sin(e),l=Math.cos(e),u=1-l,c=t[0],d=t[1],f=t[2],g=t[3],p=t[4],_=t[5],m=t[6],v=t[7],w=t[8],x=t[9],b=t[10],T=t[11],M=i*i*u+l,S=n*i*u+a*h,C=a*i*u-n*h,A=i*n*u-a*h,O=n*n*u+l,D=a*n*u+i*h,k=i*a*u+n*h,P=n*a*u-i*h,X=a*a*u+l,s[0]=c*M+p*S+w*C,s[1]=d*M+_*S+x*C,s[2]=f*M+m*S+b*C,s[3]=g*M+v*S+T*C,s[4]=c*A+p*O+w*D,s[5]=d*A+_*O+x*D,s[6]=f*A+m*O+b*D,s[7]=g*A+v*O+T*D,s[8]=c*k+p*P+w*X,s[9]=d*k+_*P+x*X,s[10]=f*k+m*P+b*X,s[11]=g*k+v*P+T*X,t!==s&&(s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15]),s)}function Xu(s,t){return s[0]=t[12],s[1]=t[13],s[2]=t[14],s}function Lo(s,t){let e=t[0],r=t[1],i=t[2],n=t[4],a=t[5],o=t[6],h=t[8],l=t[9],u=t[10];return s[0]=Math.hypot(e,r,i),s[1]=Math.hypot(n,a,o),s[2]=Math.hypot(h,l,u),s}function Gu(s){let t=s[0],e=s[1],r=s[2],i=s[4],n=s[5],a=s[6],o=s[8],h=s[9],l=s[10],u=t*t+e*e+r*r,c=i*i+n*n+a*a,d=o*o+h*h+l*l;return Math.sqrt(Math.max(u,c,d))}var zo=function(){let s=[1,1,1];return function(t,e){let r=s;Lo(r,e);let i=1/r[0],n=1/r[1],a=1/r[2],o=e[0]*i,h=e[1]*n,l=e[2]*a,u=e[4]*i,c=e[5]*n,d=e[6]*a,f=e[8]*i,g=e[9]*n,p=e[10]*a,_=o+c+p,m=0;return _>0?(m=Math.sqrt(_+1)*2,t[3]=.25*m,t[0]=(d-g)/m,t[1]=(f-l)/m,t[2]=(h-u)/m):o>c&&o>p?(m=Math.sqrt(1+o-c-p)*2,t[3]=(d-g)/m,t[0]=.25*m,t[1]=(h+u)/m,t[2]=(f+l)/m):c>p?(m=Math.sqrt(1+c-o-p)*2,t[3]=(f-l)/m,t[0]=(h+u)/m,t[1]=.25*m,t[2]=(d+g)/m):(m=Math.sqrt(1+p-o-c)*2,t[3]=(h-u)/m,t[0]=(f+l)/m,t[1]=(d+g)/m,t[2]=.25*m),t}}();function Wu(s,t,e,r){let i=ci([s[0],s[1],s[2]]),n=ci([s[4],s[5],s[6]]),a=ci([s[8],s[9],s[10]]);Oo(s)<0&&(i=-i),e[0]=s[12],e[1]=s[13],e[2]=s[14];let h=s.slice(),l=1/i,u=1/n,c=1/a;h[0]*=l,h[1]*=l,h[2]*=l,h[4]*=u,h[5]*=u,h[6]*=u,h[8]*=c,h[9]*=c,h[10]*=c,zo(t,h),r[0]=i,r[1]=n,r[2]=a}function Yu(s,t,e,r){let i=s,n=t[0],a=t[1],o=t[2],h=t[3],l=n+n,u=a+a,c=o+o,d=n*l,f=n*u,g=n*c,p=a*u,_=a*c,m=o*c,v=h*l,w=h*u,x=h*c,b=r[0],T=r[1],M=r[2];return i[0]=(1-(p+m))*b,i[1]=(f+x)*b,i[2]=(g-w)*b,i[3]=0,i[4]=(f-x)*T,i[5]=(1-(d+m))*T,i[6]=(_+v)*T,i[7]=0,i[8]=(g+w)*M,i[9]=(_-v)*M,i[10]=(1-(d+p))*M,i[11]=0,i[12]=e[0],i[13]=e[1],i[14]=e[2],i[15]=1,i}function qu(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=e+e,o=r+r,h=i+i,l=e*a,u=r*a,c=r*o,d=i*a,f=i*o,g=i*h,p=n*a,_=n*o,m=n*h;return s[0]=1-c-g,s[1]=u+m,s[2]=d-_,s[3]=0,s[4]=u-m,s[5]=1-l-g,s[6]=f+p,s[7]=0,s[8]=d+_,s[9]=f-p,s[10]=1-l-c,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function Hu(s,t,e,r,i){let n=1/Math.tan(t/2),a=1/(r-i);return s[0]=n/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=n,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(i+r)*a,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*i*r*a,s[15]=0,s}function ju(s,t,e,r,i,n,a){let o=1/(t-e),h=1/(r-i),l=1/(n-a);return s[0]=-2*o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*h,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*l,s[11]=0,s[12]=(t+e)*o,s[13]=(i+r)*h,s[14]=(a+n)*l,s[15]=1,s}function $u(s,t,e,r){let i=t[0],n=t[1],a=t[2],o=r[0],h=r[1],l=r[2],u=i-e[0],c=n-e[1],d=a-e[2],f=u*u+c*c+d*d;f===0?d=1:(f=1/Math.sqrt(f),u*=f,c*=f,d*=f);let g=h*d-l*c,p=l*u-o*d,_=o*c-h*u;return f=g*g+p*p+_*_,f===0&&(l?o+=1e-6:h?l+=1e-6:h+=1e-6,g=h*d-l*c,p=l*u-o*d,_=o*c-h*u,f=g*g+p*p+_*_),f=1/Math.sqrt(f),g*=f,p*=f,_*=f,s[0]=g,s[1]=p,s[2]=_,s[3]=0,s[4]=c*_-d*p,s[5]=d*g-u*_,s[6]=u*p-c*g,s[7]=0,s[8]=u,s[9]=c,s[10]=d,s[11]=0,s[12]=i,s[13]=n,s[14]=a,s[15]=1,s}function Io(s,t,e){return s[0]=t[0]+e[0],s[1]=t[1]+e[1],s[2]=t[2]+e[2],s[3]=t[3]+e[3],s[4]=t[4]+e[4],s[5]=t[5]+e[5],s[6]=t[6]+e[6],s[7]=t[7]+e[7],s[8]=t[8]+e[8],s[9]=t[9]+e[9],s[10]=t[10]+e[10],s[11]=t[11]+e[11],s[12]=t[12]+e[12],s[13]=t[13]+e[13],s[14]=t[14]+e[14],s[15]=t[15]+e[15],s}function No(s,t,e){return s[0]=t[0]-e[0],s[1]=t[1]-e[1],s[2]=t[2]-e[2],s[3]=t[3]-e[3],s[4]=t[4]-e[4],s[5]=t[5]-e[5],s[6]=t[6]-e[6],s[7]=t[7]-e[7],s[8]=t[8]-e[8],s[9]=t[9]-e[9],s[10]=t[10]-e[10],s[11]=t[11]-e[11],s[12]=t[12]-e[12],s[13]=t[13]-e[13],s[14]=t[14]-e[14],s[15]=t[15]-e[15],s}function Qu(s,t,e){return s[0]=t[0]*e,s[1]=t[1]*e,s[2]=t[2]*e,s[3]=t[3]*e,s[4]=t[4]*e,s[5]=t[5]*e,s[6]=t[6]*e,s[7]=t[7]*e,s[8]=t[8]*e,s[9]=t[9]*e,s[10]=t[10]*e,s[11]=t[11]*e,s[12]=t[12]*e,s[13]=t[13]*e,s[14]=t[14]*e,s[15]=t[15]*e,s}var Te=class extends Array{constructor(t=1,e=0,r=0,i=0,n=0,a=1,o=0,h=0,l=0,u=0,c=1,d=0,f=0,g=0,p=0,_=1){return super(t,e,r,i,n,a,o,h,l,u,c,d,f,g,p,_),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,e,r,i,n,a,o,h,l,u,c,d,f,g,p,_){return t.length?this.copy(t):(zu(this,t,e,r,i,n,a,o,h,l,u,c,d,f,g,p,_),this)}translate(t,e=this){return Bu(this,e,t),this}rotate(t,e,r=this){return Uu(this,r,t,e),this}scale(t,e=this){return Vu(this,e,typeof t=="number"?[t,t,t]:t),this}add(t,e){return e?Io(this,t,e):Io(this,this,t),this}sub(t,e){return e?No(this,t,e):No(this,this,t),this}multiply(t,e){return t.length?e?ko(this,t,e):ko(this,this,t):Qu(this,this,t),this}identity(){return Iu(this),this}copy(t){return Lu(this,t),this}fromPerspective({fov:t,aspect:e,near:r,far:i}={}){return Hu(this,t,e,r,i),this}fromOrthogonal({left:t,right:e,bottom:r,top:i,near:n,far:a}){return ju(this,t,e,r,i,n,a),this}fromQuaternion(t){return qu(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return Nu(this,t),this}compose(t,e,r){return Yu(this,t,e,r),this}decompose(t,e,r){return Wu(this,t,e,r),this}getRotation(t){return zo(t,this),this}getTranslation(t){return Xu(t,this),this}getScaling(t){return Lo(t,this),this}getMaxScaleOnAxis(){return Gu(this)}lookAt(t,e,r){return $u(this,t,e,r),this}determinant(){return Oo(this)}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this[2]=t[e+2],this[3]=t[e+3],this[4]=t[e+4],this[5]=t[e+5],this[6]=t[e+6],this[7]=t[e+7],this[8]=t[e+8],this[9]=t[e+9],this[10]=t[e+10],this[11]=t[e+11],this[12]=t[e+12],this[13]=t[e+13],this[14]=t[e+14],this[15]=t[e+15],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t[e+4]=this[4],t[e+5]=this[5],t[e+6]=this[6],t[e+7]=this[7],t[e+8]=this[8],t[e+9]=this[9],t[e+10]=this[10],t[e+11]=this[11],t[e+12]=this[12],t[e+13]=this[13],t[e+14]=this[14],t[e+15]=this[15],t}};function Zu(s,t,e="YXZ"){return e==="XYZ"?(s[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(s[0]=Math.atan2(-t[9],t[10]),s[2]=Math.atan2(-t[4],t[0])):(s[0]=Math.atan2(t[6],t[5]),s[2]=0)):e==="YXZ"?(s[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(s[1]=Math.atan2(t[8],t[10]),s[2]=Math.atan2(t[1],t[5])):(s[1]=Math.atan2(-t[2],t[0]),s[2]=0)):e==="ZXY"?(s[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(s[1]=Math.atan2(-t[2],t[10]),s[2]=Math.atan2(-t[4],t[5])):(s[1]=0,s[2]=Math.atan2(t[1],t[0]))):e==="ZYX"?(s[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(s[0]=Math.atan2(t[6],t[10]),s[2]=Math.atan2(t[1],t[0])):(s[0]=0,s[2]=Math.atan2(-t[4],t[5]))):e==="YZX"?(s[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(s[0]=Math.atan2(-t[9],t[5]),s[1]=Math.atan2(-t[2],t[0])):(s[0]=0,s[1]=Math.atan2(t[8],t[10]))):e==="XZY"&&(s[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(s[0]=Math.atan2(t[6],t[5]),s[1]=Math.atan2(t[8],t[0])):(s[0]=Math.atan2(-t[9],t[10]),s[1]=0)),s}var Ku=new Te,Pn=class extends Array{constructor(t=0,e=t,r=t,i="YXZ"){super(t,e,r),this.order=i,this.onChange=()=>{},this._target=this;let n=["0","1","2"];return new Proxy(this,{set(a,o){let h=Reflect.set(...arguments);return h&&n.includes(o)&&a.onChange(),h}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,e=t,r=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=e,this._target[2]=r,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,e=this.order){return Zu(this._target,t,e),this.onChange(),this}fromQuaternion(t,e=this.order,r){return Ku.fromQuaternion(t),this._target.fromRotationMatrix(Ku,e),r||this.onChange(),this}fromArray(t,e=0){return this._target[0]=t[e],this._target[1]=t[e+1],this._target[2]=t[e+2],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}};var Nt=class{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new Te,this.worldMatrix=new Te,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new ht,this.quaternion=new Dn,this.scale=new ht(1),this.rotation=new Pn,this.up=new ht(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,e=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,e&&t&&t.addChild(this,!1)}addChild(t,e=!0){~this.children.indexOf(t)||this.children.push(t),e&&t.setParent(this,!1)}removeChild(t,e=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),e&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let e=0,r=this.children.length;e<r;e++)this.children[e].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let e=0,r=this.children.length;e<r;e++)this.children[e].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,e=!1){e?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}};var rp=new Te,ip=new ht,sp=new ht,Br=class extends Nt{constructor(t,{near:e=.1,far:r=100,fov:i=45,aspect:n=1,left:a,right:o,bottom:h,top:l,zoom:u=1}={}){super(),Object.assign(this,{near:e,far:r,fov:i,aspect:n,left:a,right:o,bottom:h,top:l,zoom:u}),this.projectionMatrix=new Te,this.viewMatrix=new Te,this.projectionViewMatrix=new Te,this.worldPosition=new ht,this.type=a||o?"orthographic":"perspective",this.type==="orthographic"?this.orthographic():this.perspective()}perspective({near:t=this.near,far:e=this.far,fov:r=this.fov,aspect:i=this.aspect}={}){return Object.assign(this,{near:t,far:e,fov:r,aspect:i}),this.projectionMatrix.fromPerspective({fov:r*(Math.PI/180),aspect:i,near:t,far:e}),this.type="perspective",this}orthographic({near:t=this.near,far:e=this.far,left:r=this.left||-1,right:i=this.right||1,bottom:n=this.bottom||-1,top:a=this.top||1,zoom:o=this.zoom}={}){return Object.assign(this,{near:t,far:e,left:r,right:i,bottom:n,top:a,zoom:o}),r/=o,i/=o,n/=o,a/=o,this.projectionMatrix.fromOrthogonal({left:r,right:i,bottom:n,top:a,near:t,far:e}),this.type="orthographic",this}updateMatrixWorld(){return super.updateMatrixWorld(),this.viewMatrix.inverse(this.worldMatrix),this.worldMatrix.getTranslation(this.worldPosition),this.projectionViewMatrix.multiply(this.projectionMatrix,this.viewMatrix),this}lookAt(t){return super.lookAt(t,!0),this}project(t){return t.applyMatrix4(this.viewMatrix),t.applyMatrix4(this.projectionMatrix),this}unproject(t){return t.applyMatrix4(rp.inverse(this.projectionMatrix)),t.applyMatrix4(this.worldMatrix),this}updateFrustum(){this.frustum||(this.frustum=[new ht,new ht,new ht,new ht,new ht,new ht]);let t=this.projectionViewMatrix;this.frustum[0].set(t[3]-t[0],t[7]-t[4],t[11]-t[8]).constant=t[15]-t[12],this.frustum[1].set(t[3]+t[0],t[7]+t[4],t[11]+t[8]).constant=t[15]+t[12],this.frustum[2].set(t[3]+t[1],t[7]+t[5],t[11]+t[9]).constant=t[15]+t[13],this.frustum[3].set(t[3]-t[1],t[7]-t[5],t[11]-t[9]).constant=t[15]-t[13],this.frustum[4].set(t[3]-t[2],t[7]-t[6],t[11]-t[10]).constant=t[15]-t[14],this.frustum[5].set(t[3]+t[2],t[7]+t[6],t[11]+t[10]).constant=t[15]+t[14];for(let e=0;e<6;e++){let r=1/this.frustum[e].distance();this.frustum[e].multiply(r),this.frustum[e].constant*=r}}frustumIntersectsMesh(t,e=t.worldMatrix){if(!t.geometry.attributes.position||((!t.geometry.bounds||t.geometry.bounds.radius===1/0)&&t.geometry.computeBoundingSphere(),!t.geometry.bounds))return!0;let r=ip;r.copy(t.geometry.bounds.center),r.applyMatrix4(e);let i=t.geometry.bounds.radius*e.getMaxScaleOnAxis();return this.frustumIntersectsSphere(r,i)}frustumIntersectsSphere(t,e){let r=sp;for(let i=0;i<6;i++){let n=this.frustum[i];if(r.copy(n).dot(t)+n.constant<-e)return!1}return!0}};function Ju(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[4],s[4]=t[5],s[5]=t[6],s[6]=t[8],s[7]=t[9],s[8]=t[10],s}function tf(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=e+e,o=r+r,h=i+i,l=e*a,u=r*a,c=r*o,d=i*a,f=i*o,g=i*h,p=n*a,_=n*o,m=n*h;return s[0]=1-c-g,s[3]=u-m,s[6]=d+_,s[1]=u+m,s[4]=1-l-g,s[7]=f-p,s[2]=d-_,s[5]=f+p,s[8]=1-l-c,s}function ef(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s[8]=t[8],s}function rf(s,t,e,r,i,n,a,o,h,l){return s[0]=t,s[1]=e,s[2]=r,s[3]=i,s[4]=n,s[5]=a,s[6]=o,s[7]=h,s[8]=l,s}function sf(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=1,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}function nf(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],l=t[7],u=t[8],c=u*a-o*l,d=-u*n+o*h,f=l*n-a*h,g=e*c+r*d+i*f;return g?(g=1/g,s[0]=c*g,s[1]=(-u*r+i*l)*g,s[2]=(o*r-i*a)*g,s[3]=d*g,s[4]=(u*e-i*h)*g,s[5]=(-o*e+i*n)*g,s[6]=f*g,s[7]=(-l*e+r*h)*g,s[8]=(a*e-r*n)*g,s):null}function Bo(s,t,e){let r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],h=t[5],l=t[6],u=t[7],c=t[8],d=e[0],f=e[1],g=e[2],p=e[3],_=e[4],m=e[5],v=e[6],w=e[7],x=e[8];return s[0]=d*r+f*a+g*l,s[1]=d*i+f*o+g*u,s[2]=d*n+f*h+g*c,s[3]=p*r+_*a+m*l,s[4]=p*i+_*o+m*u,s[5]=p*n+_*h+m*c,s[6]=v*r+w*a+x*l,s[7]=v*i+w*o+x*u,s[8]=v*n+w*h+x*c,s}function af(s,t,e){let r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],h=t[5],l=t[6],u=t[7],c=t[8],d=e[0],f=e[1];return s[0]=r,s[1]=i,s[2]=n,s[3]=a,s[4]=o,s[5]=h,s[6]=d*r+f*a+l,s[7]=d*i+f*o+u,s[8]=d*n+f*h+c,s}function of(s,t,e){let r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],h=t[5],l=t[6],u=t[7],c=t[8],d=Math.sin(e),f=Math.cos(e);return s[0]=f*r+d*a,s[1]=f*i+d*o,s[2]=f*n+d*h,s[3]=f*a-d*r,s[4]=f*o-d*i,s[5]=f*h-d*n,s[6]=l,s[7]=u,s[8]=c,s}function hf(s,t,e){let r=e[0],i=e[1];return s[0]=r*t[0],s[1]=r*t[1],s[2]=r*t[2],s[3]=i*t[3],s[4]=i*t[4],s[5]=i*t[5],s[6]=t[6],s[7]=t[7],s[8]=t[8],s}function lf(s,t){let e=t[0],r=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11],g=t[12],p=t[13],_=t[14],m=t[15],v=e*o-r*a,w=e*h-i*a,x=e*l-n*a,b=r*h-i*o,T=r*l-n*o,M=i*l-n*h,S=u*p-c*g,C=u*_-d*g,A=u*m-f*g,O=c*_-d*p,D=c*m-f*p,k=d*m-f*_,P=v*k-w*D+x*O+b*A-T*C+M*S;return P?(P=1/P,s[0]=(o*k-h*D+l*O)*P,s[1]=(h*A-a*k-l*C)*P,s[2]=(a*D-o*A+l*S)*P,s[3]=(i*D-r*k-n*O)*P,s[4]=(e*k-i*A+n*C)*P,s[5]=(r*A-e*D-n*S)*P,s[6]=(p*M-_*T+m*b)*P,s[7]=(_*x-g*M-m*w)*P,s[8]=(g*T-p*x+m*v)*P,s):null}var Fn=class extends Array{constructor(t=1,e=0,r=0,i=0,n=1,a=0,o=0,h=0,l=1){return super(t,e,r,i,n,a,o,h,l),this}set(t,e,r,i,n,a,o,h,l){return t.length?this.copy(t):(rf(this,t,e,r,i,n,a,o,h,l),this)}translate(t,e=this){return af(this,e,t),this}rotate(t,e=this){return of(this,e,t),this}scale(t,e=this){return hf(this,e,t),this}multiply(t,e){return e?Bo(this,t,e):Bo(this,this,t),this}identity(){return sf(this),this}copy(t){return ef(this,t),this}fromMatrix4(t){return Ju(this,t),this}fromQuaternion(t){return tf(this,t),this}fromBasis(t,e,r){return this.set(t[0],t[1],t[2],e[0],e[1],e[2],r[0],r[1],r[2]),this}inverse(t=this){return nf(this,t),this}getNormalMatrix(t){return lf(this,t),this}};var ap=0,ge=class extends Nt{constructor(t,{geometry:e,program:r,mode:i=t.TRIANGLES,frustumCulled:n=!0,renderOrder:a=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=ap++,this.geometry=e,this.program=r,this.mode=i,this.frustumCulled=n,this.renderOrder=a,this.modelViewMatrix=new Te,this.normalMatrix=new Fn,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:t}));let e=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:e}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:t}))}};var uf=new Uint8Array(4);function ff(s){return(s&s-1)===0}var op=1,hr=class{constructor(t,{image:e,target:r=t.TEXTURE_2D,type:i=t.UNSIGNED_BYTE,format:n=t.RGBA,internalFormat:a=n,wrapS:o=t.CLAMP_TO_EDGE,wrapT:h=t.CLAMP_TO_EDGE,generateMipmaps:l=!0,minFilter:u=l?t.NEAREST_MIPMAP_LINEAR:t.LINEAR,magFilter:c=t.LINEAR,premultiplyAlpha:d=!1,unpackAlignment:f=4,flipY:g=r==t.TEXTURE_2D,anisotropy:p=0,level:_=0,width:m,height:v=m}={}){this.gl=t,this.id=op++,this.image=e,this.target=r,this.type=i,this.format=n,this.internalFormat=a,this.minFilter=u,this.magFilter=c,this.wrapS=o,this.wrapT=h,this.generateMipmaps=l,this.premultiplyAlpha=d,this.unpackAlignment=f,this.flipY=g,this.anisotropy=Math.min(p,this.gl.renderer.parameters.maxAnisotropy),this.level=_,this.width=m,this.height=v,this.texture=this.gl.createTexture(),this.store={image:null},this.glState=this.gl.renderer.state,this.state={},this.state.minFilter=this.gl.NEAREST_MIPMAP_LINEAR,this.state.magFilter=this.gl.LINEAR,this.state.wrapS=this.gl.REPEAT,this.state.wrapT=this.gl.REPEAT,this.state.anisotropy=0}bind(){this.glState.textureUnits[this.glState.activeTextureUnit]!==this.id&&(this.gl.bindTexture(this.target,this.texture),this.glState.textureUnits[this.glState.activeTextureUnit]=this.id)}update(t=0){let e=!(this.image===this.store.image&&!this.needsUpdate);if((e||this.glState.textureUnits[t]!==this.id)&&(this.gl.renderer.activeTexture(t),this.bind()),!!e){if(this.needsUpdate=!1,this.flipY!==this.glState.flipY&&(this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,this.flipY),this.glState.flipY=this.flipY),this.premultiplyAlpha!==this.glState.premultiplyAlpha&&(this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.glState.premultiplyAlpha=this.premultiplyAlpha),this.unpackAlignment!==this.glState.unpackAlignment&&(this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,this.unpackAlignment),this.glState.unpackAlignment=this.unpackAlignment),this.minFilter!==this.state.minFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.minFilter),this.state.minFilter=this.minFilter),this.magFilter!==this.state.magFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.magFilter),this.state.magFilter=this.magFilter),this.wrapS!==this.state.wrapS&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.wrapS),this.state.wrapS=this.wrapS),this.wrapT!==this.state.wrapT&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.wrapT),this.state.wrapT=this.wrapT),this.anisotropy&&this.anisotropy!==this.state.anisotropy&&(this.gl.texParameterf(this.target,this.gl.renderer.getExtension("EXT_texture_filter_anisotropic").TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropy),this.state.anisotropy=this.anisotropy),this.image){if(this.image.width&&(this.width=this.image.width,this.height=this.image.height),this.target===this.gl.TEXTURE_CUBE_MAP)for(let r=0;r<6;r++)this.gl.texImage2D(this.gl.TEXTURE_CUBE_MAP_POSITIVE_X+r,this.level,this.internalFormat,this.format,this.type,this.image[r]);else if(ArrayBuffer.isView(this.image))this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,this.image);else if(this.image.isCompressedTexture)for(let r=0;r<this.image.length;r++)this.gl.compressedTexImage2D(this.target,r,this.internalFormat,this.image[r].width,this.image[r].height,0,this.image[r].data);else this.gl.texImage2D(this.target,this.level,this.internalFormat,this.format,this.type,this.image);this.generateMipmaps&&(!this.gl.renderer.isWebgl2&&(!ff(this.image.width)||!ff(this.image.height))?(this.generateMipmaps=!1,this.wrapS=this.wrapT=this.gl.CLAMP_TO_EDGE,this.minFilter=this.gl.LINEAR):this.gl.generateMipmap(this.target)),this.onUpdate&&this.onUpdate()}else if(this.target===this.gl.TEXTURE_CUBE_MAP)for(let r=0;r<6;r++)this.gl.texImage2D(this.gl.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,uf);else this.width?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,null):this.gl.texImage2D(this.target,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,uf);this.store.image=this.image}}};var Ni=class{constructor(t,{width:e=t.canvas.width,height:r=t.canvas.height,target:i=t.FRAMEBUFFER,color:n=1,depth:a=!0,stencil:o=!1,depthTexture:h=!1,wrapS:l=t.CLAMP_TO_EDGE,wrapT:u=t.CLAMP_TO_EDGE,minFilter:c=t.LINEAR,magFilter:d=c,type:f=t.UNSIGNED_BYTE,format:g=t.RGBA,internalFormat:p=g,unpackAlignment:_,premultiplyAlpha:m}={}){this.gl=t,this.width=e,this.height=r,this.depth=a,this.buffer=this.gl.createFramebuffer(),this.target=i,this.gl.renderer.bindFramebuffer(this),this.textures=[];let v=[];for(let w=0;w<n;w++)this.textures.push(new hr(t,{width:e,height:r,wrapS:l,wrapT:u,minFilter:c,magFilter:d,type:f,format:g,internalFormat:p,unpackAlignment:_,premultiplyAlpha:m,flipY:!1,generateMipmaps:!1})),this.textures[w].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+w,this.gl.TEXTURE_2D,this.textures[w].texture,0),v.push(this.gl.COLOR_ATTACHMENT0+w);v.length>1&&this.gl.renderer.drawBuffers(v),this.texture=this.textures[0],h&&(this.gl.renderer.isWebgl2||this.gl.renderer.getExtension("WEBGL_depth_texture"))?(this.depthTexture=new hr(t,{width:e,height:r,minFilter:this.gl.NEAREST,magFilter:this.gl.NEAREST,format:this.gl.DEPTH_COMPONENT,internalFormat:t.renderer.isWebgl2?this.gl.DEPTH_COMPONENT16:this.gl.DEPTH_COMPONENT,type:this.gl.UNSIGNED_INT}),this.depthTexture.update(),this.gl.framebufferTexture2D(this.target,this.gl.DEPTH_ATTACHMENT,this.gl.TEXTURE_2D,this.depthTexture.texture,0)):(a&&!o&&(this.depthBuffer=this.gl.createRenderbuffer(),this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.depthBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_COMPONENT16,e,r),this.gl.framebufferRenderbuffer(this.target,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,this.depthBuffer)),o&&!a&&(this.stencilBuffer=this.gl.createRenderbuffer(),this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.stencilBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.STENCIL_INDEX8,e,r),this.gl.framebufferRenderbuffer(this.target,this.gl.STENCIL_ATTACHMENT,this.gl.RENDERBUFFER,this.stencilBuffer)),a&&o&&(this.depthStencilBuffer=this.gl.createRenderbuffer(),this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.depthStencilBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_STENCIL,e,r),this.gl.framebufferRenderbuffer(this.target,this.gl.DEPTH_STENCIL_ATTACHMENT,this.gl.RENDERBUFFER,this.depthStencilBuffer))),this.gl.renderer.bindFramebuffer({target:this.target})}setSize(t,e){if(!(this.width===t&&this.height===e)){this.width=t,this.height=e,this.gl.renderer.bindFramebuffer(this);for(let r=0;r<this.textures.length;r++)this.textures[r].width=t,this.textures[r].height=e,this.textures[r].needsUpdate=!0,this.textures[r].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+r,this.gl.TEXTURE_2D,this.textures[r].texture,0);this.depthTexture?(this.depthTexture.width=t,this.depthTexture.height=e,this.depthTexture.needsUpdate=!0,this.depthTexture.update(),this.gl.framebufferTexture2D(this.target,this.gl.DEPTH_ATTACHMENT,this.gl.TEXTURE_2D,this.depthTexture.texture,0)):(this.depthBuffer&&(this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.depthBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_COMPONENT16,t,e)),this.stencilBuffer&&(this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.stencilBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.STENCIL_INDEX8,t,e)),this.depthStencilBuffer&&(this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.depthStencilBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_STENCIL,t,e))),this.gl.renderer.bindFramebuffer({target:this.target})}}};var cf={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function df(s){s.length===4&&(s=s[0]+s[1]+s[1]+s[2]+s[2]+s[3]+s[3]);let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(s);return t||console.warn(`Unable to convert hex string ${s} to rgb values`),[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]}function hp(s){return s=parseInt(s),[(s>>16&255)/255,(s>>8&255)/255,(s&255)/255]}function Vo(s){return s===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(s)?s[0]==="#"?df(s):cf[s.toLowerCase()]?df(cf[s.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):hp(s)}var Ft=class extends Array{constructor(t){return Array.isArray(t)?super(...t):super(...Vo(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(t){this[0]=t}set g(t){this[1]=t}set b(t){this[2]=t}set(t){return Array.isArray(t)?this.copy(t):this.copy(Vo(...arguments))}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this}};function pf(s,t){return s[0]=t[0],s[1]=t[1],s}function gf(s,t,e){return s[0]=t,s[1]=e,s}function Uo(s,t,e){return s[0]=t[0]+e[0],s[1]=t[1]+e[1],s}function Xo(s,t,e){return s[0]=t[0]-e[0],s[1]=t[1]-e[1],s}function _f(s,t,e){return s[0]=t[0]*e[0],s[1]=t[1]*e[1],s}function mf(s,t,e){return s[0]=t[0]/e[0],s[1]=t[1]/e[1],s}function Rn(s,t,e){return s[0]=t[0]*e,s[1]=t[1]*e,s}function xf(s,t){var e=t[0]-s[0],r=t[1]-s[1];return Math.sqrt(e*e+r*r)}function yf(s,t){var e=t[0]-s[0],r=t[1]-s[1];return e*e+r*r}function Go(s){var t=s[0],e=s[1];return Math.sqrt(t*t+e*e)}function vf(s){var t=s[0],e=s[1];return t*t+e*e}function wf(s,t){return s[0]=-t[0],s[1]=-t[1],s}function bf(s,t){return s[0]=1/t[0],s[1]=1/t[1],s}function Tf(s,t){var e=t[0],r=t[1],i=e*e+r*r;return i>0&&(i=1/Math.sqrt(i)),s[0]=t[0]*i,s[1]=t[1]*i,s}function Mf(s,t){return s[0]*t[0]+s[1]*t[1]}function Wo(s,t){return s[0]*t[1]-s[1]*t[0]}function Ef(s,t,e,r){var i=t[0],n=t[1];return s[0]=i+r*(e[0]-i),s[1]=n+r*(e[1]-n),s}function Cf(s,t,e){var r=t[0],i=t[1];return s[0]=e[0]*r+e[3]*i+e[6],s[1]=e[1]*r+e[4]*i+e[7],s}function Af(s,t,e){let r=t[0],i=t[1];return s[0]=e[0]*r+e[4]*i+e[12],s[1]=e[1]*r+e[5]*i+e[13],s}function Sf(s,t){return s[0]===t[0]&&s[1]===t[1]}var Rt=class s extends Array{constructor(t=0,e=t){return super(t,e),this}get x(){return this[0]}get y(){return this[1]}set x(t){this[0]=t}set y(t){this[1]=t}set(t,e=t){return t.length?this.copy(t):(gf(this,t,e),this)}copy(t){return pf(this,t),this}add(t,e){return e?Uo(this,t,e):Uo(this,this,t),this}sub(t,e){return e?Xo(this,t,e):Xo(this,this,t),this}multiply(t){return t.length?_f(this,this,t):Rn(this,this,t),this}divide(t){return t.length?mf(this,this,t):Rn(this,this,1/t),this}inverse(t=this){return bf(this,t),this}len(){return Go(this)}distance(t){return t?xf(this,t):Go(this)}squaredLen(){return this.squaredDistance()}squaredDistance(t){return t?yf(this,t):vf(this)}negate(t=this){return wf(this,t),this}cross(t,e){return e?Wo(t,e):Wo(this,t)}scale(t){return Rn(this,this,t),this}normalize(){return Tf(this,this),this}dot(t){return Mf(this,t)}equals(t){return Sf(this,t)}applyMatrix3(t){return Cf(this,this,t),this}applyMatrix4(t){return Af(this,this,t),this}lerp(t,e){return Ef(this,this,t,e),this}clone(){return new s(this[0],this[1])}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t}};var On=class extends Array{constructor(t=0,e=t,r=t,i=t){return super(t,e,r,i),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set w(t){this[3]=t}set(t,e=t,r=t,i=t){return t.length?this.copy(t):(Cn(this,t,e,r,i),this)}copy(t){return En(this,t),this}normalize(){return An(this,this),this}multiply(t){return Fo(this,this,t),this}dot(t){return Sn(this,t)}fromArray(t,e=0){return this[0]=t[e],this[1]=t[e+1],this[2]=t[e+2],this[3]=t[e+3],this}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}};var Oe=class s extends Ii{constructor(t,{width:e=1,height:r=1,widthSegments:i=1,heightSegments:n=1,attributes:a={}}={}){let o=i,h=n,l=(o+1)*(h+1),u=o*h*6,c=new Float32Array(l*3),d=new Float32Array(l*3),f=new Float32Array(l*2),g=u>65536?new Uint32Array(u):new Uint16Array(u);s.buildPlane(c,d,f,g,e,r,0,o,h),Object.assign(a,{position:{size:3,data:c},normal:{size:3,data:d},uv:{size:2,data:f},index:{data:g}}),super(t,a)}static buildPlane(t,e,r,i,n,a,o,h,l,u=0,c=1,d=2,f=1,g=-1,p=0,_=0){let m=p,v=n/h,w=a/l;for(let x=0;x<=l;x++){let b=x*w-a/2;for(let T=0;T<=h;T++,p++){let M=T*v-n/2;if(t[p*3+u]=M*f,t[p*3+c]=b*g,t[p*3+d]=o/2,e[p*3+u]=0,e[p*3+c]=0,e[p*3+d]=o>=0?1:-1,r[p*2]=T/h,r[p*2+1]=1-x/l,x===l||T===h)continue;let S=m+T+x*(h+1),C=m+T+(x+1)*(h+1),A=m+T+(x+1)*(h+1)+1,O=m+T+x*(h+1)+1;i[_*6]=S,i[_*6+1]=C,i[_*6+2]=O,i[_*6+3]=C,i[_*6+4]=A,i[_*6+5]=O,_++}}}};var Es=class extends Ii{constructor(t,{attributes:e={}}={}){Object.assign(e,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,e)}};var kn=class extends hr{constructor(t,{buffer:e,wrapS:r=t.CLAMP_TO_EDGE,wrapT:i=t.CLAMP_TO_EDGE,anisotropy:n=0,minFilter:a,magFilter:o}={}){if(super(t,{generateMipmaps:!1,wrapS:r,wrapT:i,anisotropy:n,minFilter:a,magFilter:o}),e)return this.parseBuffer(e)}parseBuffer(t){let e=new fp(t);e.mipmaps.isCompressedTexture=!0,this.image=e.mipmaps,this.internalFormat=e.glInternalFormat,e.numberOfMipmapLevels>1?this.minFilter===this.gl.LINEAR&&(this.minFilter=this.gl.NEAREST_MIPMAP_LINEAR):this.minFilter===this.gl.NEAREST_MIPMAP_LINEAR&&(this.minFilter=this.gl.LINEAR)}};function fp(s){let t=[171,75,84,88,32,49,49,187,13,10,26,10],e=new Uint8Array(s,0,12);for(let c=0;c<e.length;c++)if(e[c]!==t[c])return console.error("File missing KTX identifier");let r=Uint32Array.BYTES_PER_ELEMENT,i=new DataView(s,12,13*r),n=i.getUint32(0,!0)===67305985;if(i.getUint32(1*r,n)!==0)return console.warn("only compressed formats currently supported");this.glInternalFormat=i.getUint32(4*r,n);let o=i.getUint32(6*r,n),h=i.getUint32(7*r,n);this.numberOfFaces=i.getUint32(10*r,n),this.numberOfMipmapLevels=Math.max(1,i.getUint32(11*r,n));let l=i.getUint32(12*r,n);this.mipmaps=[];let u=12+13*4+l;for(let c=0;c<this.numberOfMipmapLevels;c++){let d=new Int32Array(s,u,1)[0];u+=4;for(let f=0;f<this.numberOfFaces;f++){let g=new Uint8Array(s,u,d);this.mipmaps.push({data:g,width:o,height:h}),u+=d,u+=3-(d+3)%4}o=o>>1,h=h>>1}}var Ln={},Cs=[],As=class{static load(t,{src:e,wrapS:r=t.CLAMP_TO_EDGE,wrapT:i=t.CLAMP_TO_EDGE,anisotropy:n=0,format:a=t.RGBA,internalFormat:o=a,generateMipmaps:h=!0,minFilter:l=h?t.NEAREST_MIPMAP_LINEAR:t.LINEAR,magFilter:u=t.LINEAR,premultiplyAlpha:c=!1,unpackAlignment:d=4,flipY:f=!0}={}){let g=this.getSupportedExtensions(t),p="none";if(typeof e=="string"&&(p=e.split(".").pop().split("?")[0].toLowerCase()),typeof e=="object"){for(let v in e)if(g.includes(v.toLowerCase())){p=v.toLowerCase(),e=e[v];break}}let _=e+r+i+n+a+o+h+l+u+c+d+f+t.renderer.id;if(Ln[_])return Ln[_];let m;switch(p){case"ktx":case"pvrtc":case"s3tc":case"etc":case"etc1":case"astc":m=new kn(t,{src:e,wrapS:r,wrapT:i,anisotropy:n,minFilter:l,magFilter:u}),m.loaded=this.loadKTX(e,m);break;case"webp":case"jpg":case"jpeg":case"png":m=new hr(t,{wrapS:r,wrapT:i,anisotropy:n,format:a,internalFormat:o,generateMipmaps:h,minFilter:l,magFilter:u,premultiplyAlpha:c,unpackAlignment:d,flipY:f}),m.loaded=this.loadImage(t,e,m,f);break;default:console.warn("No supported format supplied"),m=new hr(t)}return m.ext=p,Ln[_]=m,m}static getSupportedExtensions(t){if(Cs.length)return Cs;let e={pvrtc:t.renderer.getExtension("WEBGL_compressed_texture_pvrtc")||t.renderer.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),s3tc:t.renderer.getExtension("WEBGL_compressed_texture_s3tc"),etc1:t.renderer.getExtension("WEBGL_compressed_texture_etc1"),astc:t.renderer.getExtension("WEBGL_compressed_texture_astc"),bc7:t.renderer.getExtension("EXT_texture_compression_bptc")};for(let r in e)e[r]&&Cs.push(r);return Cs.push("png","jpg","webp"),Cs}static loadKTX(t,e){return fetch(t).then(r=>r.arrayBuffer()).then(r=>e.parseBuffer(r))}static loadImage(t,e,r,i){return cp(e,i).then(n=>(!t.renderer.isWebgl2&&(!Df(n.width)||!Df(n.height))&&(r.generateMipmaps&&(r.generateMipmaps=!1),r.minFilter===t.NEAREST_MIPMAP_LINEAR&&(r.minFilter=t.LINEAR),r.wrapS===t.REPEAT&&(r.wrapS=r.wrapT=t.CLAMP_TO_EDGE)),r.image=n,r.onUpdate=()=>{n.close&&n.close(),r.onUpdate=null},n))}static clearCache(){Ln={}}};function Df(s){return Math.log2(s)%1===0}function cp(s,t){return new Promise(e=>{if(dp())fetch(s,{mode:"cors"}).then(r=>r.blob()).then(r=>createImageBitmap(r,{imageOrientation:t?"flipY":"none",premultiplyAlpha:"none"})).then(e);else{let r=new Image;r.crossOrigin="",r.src=s,r.onload=()=>e(r)}})}function dp(){if(!navigator.userAgent.toLowerCase().includes("chrome"))return!1;try{createImageBitmap}catch{return!1}return!0}var Ss=class extends ge{constructor(...t){super(...t),this.frustumCulled=!1,this.isInstancedMesh=!0}addFrustumCull(){this.instanceTransforms=null,this.instanceLightmapScaleOffset=null,this.totalInstanceCount=0,this.frustumCullFunction=null,this.instanceRenderList=null,this.geometry.attributes.instanceMatrix||console.error(`mesh ${this.name?`"${this.name}" `:""}missing instanceMatrix attribute; unable to frustum cull`);let t=this.geometry.attributes.instanceMatrix.data;this.instanceTransforms=[];for(let e=0,r=0;e<t.length;e+=16,r++){let i=new Nt;i.index=r,i.matrix.fromArray(t,e),i.decompose(),this.instanceTransforms.push(i),i.setParent(this.parent)}if(this.totalInstanceCount=this.instanceTransforms.length,this.geometry.attributes.lightmapScaleOffset){let e=this.geometry.attributes.lightmapScaleOffset.data;for(let r=0,i=0;r<e.length;r+=4,i++)this.instanceTransforms[i].lightmapData=new On().fromArray(e,r)}this.frustumCullFunction=({camera:e})=>{this.instanceRenderList=[],this.instanceTransforms.forEach(r=>{e.frustumIntersectsMesh(this,r.worldMatrix)&&this.instanceRenderList.push(r)}),this.instanceRenderList.forEach((r,i)=>{r.matrix.toArray(this.geometry.attributes.instanceMatrix.data,i*16),r.lightmapData&&(r.lightmapData.toArray(this.geometry.attributes.lightmapScaleOffset.data,i*4),this.geometry.attributes.lightmapScaleOffset.needsUpdate=!0)}),this.geometry.instancedCount=this.instanceRenderList.length,this.geometry.attributes.instanceMatrix.needsUpdate=!0},this.onBeforeRender(this.frustumCullFunction)}removeFrustumCull(){this.offBeforeRender(this.frustumCullFunction),this.geometry.instancedCount=this.totalInstanceCount,this.instanceTransforms.forEach((t,e)=>{t.matrix.toArray(this.geometry.attributes.instanceMatrix.data,e*16),t.lightmapData&&(t.lightmapData.toArray(this.geometry.attributes.lightmapScaleOffset.data,e*4),this.geometry.attributes.lightmapScaleOffset.needsUpdate=!0)}),this.geometry.attributes.instanceMatrix.needsUpdate=!0}};var Pf=`
attribute vec3 position;
attribute vec2 uv;
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = vec4(position, 1.0);
}
`,Ff=`
precision highp float;
uniform sampler2D tMap;
uniform sampler2D tMask;
uniform float uDebug;
varying vec2 vUv;
void main() {
if (uDebug == 1.0) {
gl_FragColor = max(texture2D(tMap, vUv), texture2D(tMask, vUv));
} else {
gl_FragColor = texture2D(tMap, vUv);
gl_FragColor.a = texture2D(tMask, vUv).g;
}
}
`,Rf={vertex100:Pf,fragment100:`#extension GL_OES_standard_derivatives : enable
precision highp float;
${Ff}`,vertex300:`#version 300 es
#define attribute in
#define varying out
${Pf}`,fragment300:`#version 300 es
precision highp float;
#define varying in
#define texture2D texture
#define gl_FragColor FragColor
out vec4 FragColor;
${Ff}`};var{vertex100:pp,fragment100:gp,vertex300:_p,fragment300:mp}=Rf,zn=class extends Re{constructor(t,e){super(t,{uniforms:{tMap:{value:null},tMask:{value:null},uDebug:{value:/[?&]debug|gradient/.test(e.location.search)?1:0}},vertex:t.renderer.isWebgl2?_p:pp,fragment:t.renderer.isWebgl2?mp:gp,transparent:!0,depthTest:!1,depthWrite:!1})}};var nt=class extends Nt{constructor(){super(...arguments),this.parent=null,this.children=[],this.userData={}}init(){}theme(){}resize(t,e,r,i){}update(t,e,r,i){}ready(){}destroy(){for(let t=this.children.length-1;t>=0;t--)"destroy"in this.children[t]&&this.children[t].destroy();this.children.length=0}};var Of=`
#ifndef PI
#define PI 3.141592653589793
#endif
float sineInOut(float t) {
return -0.5 * (cos(PI * t) - 1.0);
}
`;var kf=`
attribute vec3 position;
attribute vec2 uv;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,Lf=`
precision highp float;
uniform sampler2D tMap;
uniform vec3 uGrayColor;
uniform float uProgress;
uniform float uAlpha;
uniform float uDebug;
uniform float uTime;
varying vec2 vUv;
${Of}
void main() {
float time = fract(uTime / 6.0);
float t = abs(2.0 * time - 1.0);
// Rotation starts at 35.642\xB0, 3 sec 180\xB0 and 6 sec 360\xB0
float currentAngle = 35.642 + time * 360.0;
vec2 uv = vUv;
uv.x -= 0.1 * (1.0 - sineInOut(t));
vec2 origin = vec2(0.5, 0.5);
uv -= origin;
float angle = radians(currentAngle) + atan(uv.y, uv.x);
float len = length(uv);
uv = vec2(cos(angle) * len, sin(angle) * len) + origin;
gl_FragColor = texture2D(tMap, uv);
if (uDebug == 1.0) {
// Anti-aliased outer circle
float radius = 0.5;
float d = fwidth(len);
float circle = smoothstep(radius - d, radius + d, len);
gl_FragColor.a = (1.0 - circle) * uAlpha;
// Anti-aliased center point
radius = 0.005;
circle = smoothstep(radius - d, radius + d, len);
gl_FragColor.rgb = mix(vec3(1), gl_FragColor.rgb, circle);
} else {
gl_FragColor.a *= uAlpha;
}
if (uProgress > 0.0) {
// Anti-aliased gray unfilled angle
float theta = radians(20.0);
uv = vec2(cos(theta) * vUv.x - sin(theta) * vUv.y,
sin(theta) * vUv.x + cos(theta) * vUv.y);
float progress = 2.0 * uProgress - 1.0;
float d = 0.001;
float angle = smoothstep(uv.x - d, uv.x + d, progress);
gl_FragColor.rgb = mix(uGrayColor, gl_FragColor.rgb, angle);
}
}
`,zf={vertex100:kf,fragment100:`#extension GL_OES_standard_derivatives : enable
precision highp float;
${Lf}`,vertex300:`#version 300 es
#define attribute in
#define varying out
${kf}`,fragment300:`#version 300 es
precision highp float;
#define varying in
#define texture2D texture
#define gl_FragColor FragColor
out vec4 FragColor;
${Lf}`};var{vertex100:xp,fragment100:yp,vertex300:vp,fragment300:wp}=zf,In=class extends Re{constructor(t,e,r){super(t,{uniforms:{tMap:{value:e},uGrayColor:{value:new Ft(10723241)},uProgress:{value:0},uAlpha:{value:1},uDebug:{value:/[?&]gradient/.test(r.location.search)?1:0},uTime:{value:0}},vertex:t.renderer.isWebgl2?vp:xp,fragment:t.renderer.isWebgl2?wp:yp,transparent:!0,depthTest:!1,depthWrite:!1})}};function Bt(s){return s*(Math.PI/180)}function _e(s,t){let e=As.load(s,{src:t});return e.loaded.then(()=>e)}var Nn=class extends nt{constructor(t,e,r){super(),this.gl=t,this.document=e,this.window=r,this.viewWidth=700,this.viewScale=1,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.userData.progress=0,this.userData.buildWidth=0}async init(){let t=await _e(this.gl,"assets/textures/gradient.jpg"),e=new Oe(this.gl),r=new In(this.gl,t,this.window),i=new ge(this.gl,{geometry:e,program:r});i.frustumCulled=!1,this.addChild(i),this.mesh=i}theme(){let t=getComputedStyle(this.document.querySelector(":root"));this.mesh.program.uniforms.uGrayColor.value.set(t.getPropertyValue("--webgl-gray-unfilled").trim())}resize(t,e,r,i){this.viewScale=i;let n=this.viewWidth*this.viewScale*1.34;this.userData.width=n,this.userData.height=n}update(t){this.position.x=this.userData.x,this.position.y=-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.userData.progress>0?(this.mesh.position.set(0),this.mesh.scale.set(this.userData.buildWidth,this.userData.buildWidth,1)):(this.mesh.position.set(-102*this.viewScale,-40*this.viewScale,0),this.mesh.scale.set(this.userData.width,this.userData.height,1)),this.mesh.program.uniforms.uProgress.value=this.userData.progress,this.mesh.program.uniforms.uAlpha.value=this.userData.opacity*this.parent.userData.opacity,this.mesh.program.uniforms.uTime.value=t}ready(){return this.init()}};var Bn=class extends nt{constructor(t,e,r){super(),this.gl=t,this.document=e,this.window=r,this.visible=!1,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.origin=new Rt,this.init()}init(){this.background=new Nn(this.gl,this.document,this.window),this.addChild(this.background)}theme(){this.background.theme()}resize(t,e,r,i){this.origin.set(Math.round(t/2),Math.round(e/2)),this.background.resize(t,e,r,i)}update(t){this.position.x=this.origin.x+this.userData.x,this.position.y=-this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.background.userData.progress>0&&(this.position.x=this.origin.x,this.position.y=-this.origin.y,this.scale.set(1)),this.visible=this.userData.opacity>0,this.background.update(t)}ready(){return this.background.init()}};var Vn=`
float msdf(sampler2D image, vec2 uv) {
vec3 tex = texture2D(image, uv).rgb;
float signedDist = max(min(tex.r, tex.g), min(max(tex.r, tex.g), tex.b)) - 0.5;
float d = fwidth(signedDist);
return smoothstep(-d, d, signedDist);
}
`;var If=`
attribute vec3 position;
attribute vec2 uv;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,Nf=`
precision highp float;
uniform sampler2D tMap;
uniform vec3 uColor;
uniform float uAlpha;
varying vec2 vUv;
${Vn}
void main() {
float alpha = msdf(tMap, vUv);
alpha *= uAlpha;
if (alpha < 0.01) {
discard;
}
gl_FragColor.rgb = uColor;
gl_FragColor.a = alpha;
}
`,Bf={vertex100:If,fragment100:`#extension GL_OES_standard_derivatives : enable
precision highp float;
${Nf}`,vertex300:`#version 300 es
#define attribute in
#define varying out
${If}`,fragment300:`#version 300 es
precision highp float;
#define varying in
#define texture2D texture
#define gl_FragColor FragColor
out vec4 FragColor;
${Nf}`};var{vertex100:bp,fragment100:Tp,vertex300:Mp,fragment300:Ep}=Bf,Bi=class extends Re{constructor(t,e,r){super(t,{uniforms:{tMap:{value:e},uColor:{value:r},uAlpha:{value:1}},vertex:t.renderer.isWebgl2?Mp:bp,fragment:t.renderer.isWebgl2?Ep:Tp,transparent:!0,depthTest:!1,depthWrite:!1})}};var Un=class extends nt{constructor(t,e,r,i=new Rt(.5,-.5)){super(),this.gl=t,this.texture=e,this.color=r,this.translate=i,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.userData.width=700,this.userData.height=172,this.origin=new Rt(Math.round(this.userData.width*(this.translate.x-.5)),Math.round(this.userData.height*(this.translate.y+.5))),this.translate=new Rt(Math.round(this.userData.width*this.translate.x),Math.round(this.userData.height*this.translate.y)),this.init()}init(){let t=new Oe(this.gl),e=new Bi(this.gl,this.texture,this.color),r=new ge(this.gl,{geometry:t,program:e});r.frustumCulled=!1,r.position.set(this.translate.x,this.translate.y,0),r.scale.set(this.userData.width,this.userData.height,1),this.addChild(r),this.mesh=r}update(){this.position.x=-this.origin.x+this.userData.x,this.position.y=-this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.mesh.program.uniforms.uAlpha.value=this.userData.opacity*this.parent.userData.opacity}};var Vf=`
#ifndef MAX_NUM_VERTICES
#define MAX_NUM_VERTICES 5
#endif
float sdPolygon(vec2 p, vec2[MAX_NUM_VERTICES] v, int num) {
float d = dot(p - v[0], p - v[0]);
float s = 1.0;
for (int i = 0, j = num - 1; i < num; j = i, i++) {
vec2 e = v[j] - v[i];
vec2 w = p - v[i];
vec2 b = w - e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0);
d = min(d, dot(b, b));
bvec3 cond = bvec3(p.y >= v[i].y, p.y < v[j].y, e.x * w.y > e.y * w.x);
if (all(cond) || all(not(cond))) s = -s;
}
return s * sqrt(d);
}
`;var Uf=`
attribute vec3 position;
attribute vec2 uv;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,Xf=`
precision highp float;
uniform vec3 uColor;
uniform float uProgress;
uniform float uAlpha;
varying vec2 vUv;
#define MAX_NUM_VERTICES 5
${Vf}
void main() {
// Polygon animation
vec2[MAX_NUM_VERTICES] bottom;
bottom[0] = vec2(0.292446808510638, 1.0 - mix(0.7381, 0.7781, uProgress));
bottom[1] = vec2(mix(0.239468085106383, 0.133085106382979, uProgress), 1.0 - mix(0.8592, 0.7781, uProgress));
bottom[2] = vec2(0.50031914893617, 1.0 - 1.0);
bottom[3] = vec2(mix(0.761170212765957, 0.867553191489362, uProgress), 1.0 - mix(0.8592, 0.7781, uProgress));
bottom[4] = vec2(0.707553191489362, 1.0 - mix(0.7381, 0.7781, uProgress));
vec2[MAX_NUM_VERTICES] right;
right[0] = vec2(mix(0.618404255319149, 0.597127659574468, uProgress), 1.0 - 0.0);
right[1] = vec2(0.964042553191489, 1.0 - mix(0.7023, 0.6623, uProgress));
right[2] = vec2(1.0, 1.0 - 0.1665);
vec2[MAX_NUM_VERTICES] left;
left[0] = vec2(mix(0.381595744680851, 0.402872340425532, uProgress), 1.0 - 0.0);
left[1] = vec2(0.035957446808511, 1.0 - mix(0.7023, 0.6623, uProgress));
left[2] = vec2(0.0, 1.0 - 0.1665);
float sdBottom = sdPolygon(vUv, bottom, 5);
float sdRight = sdPolygon(vUv, right, 3);
float sdLeft = sdPolygon(vUv, left, 3);
// Anti-alias
float dBottom = fwidth(sdBottom);
float alphaBottom = smoothstep(dBottom, -dBottom, sdBottom);
float dRight = fwidth(sdRight);
float alphaRight = smoothstep(dRight, -dRight, sdRight);
float dLeft = fwidth(sdLeft);
float alphaLeft = smoothstep(dLeft, -dLeft, sdLeft);
float alpha = max(alphaBottom, alphaRight);
alpha = max(alpha, alphaLeft);
alpha *= uAlpha;
if (alpha < 0.01) {
discard;
}
gl_FragColor.rgb = uColor;
gl_FragColor.a = alpha;
}
`,Gf={vertex100:Uf,fragment100:`#extension GL_OES_standard_derivatives : enable
precision highp float;
${Xf}`,vertex300:`#version 300 es
#define attribute in
#define varying out
${Uf}`,fragment300:`#version 300 es
precision highp float;
#define varying in
#define texture2D texture
#define gl_FragColor FragColor
out vec4 FragColor;
${Xf}`};var{vertex100:Cp,fragment100:Ap,vertex300:Sp,fragment300:Dp}=Gf,Xn=class extends Re{constructor(t,e){super(t,{uniforms:{uColor:{value:e},uProgress:{value:0},uAlpha:{value:1}},vertex:t.renderer.isWebgl2?Sp:Cp,fragment:t.renderer.isWebgl2?Dp:Ap,transparent:!0,depthTest:!1,depthWrite:!1})}};var Gn=class extends nt{constructor(t,e,r=new Rt){super(),this.gl=t,this.color=e,this.translate=r,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.userData.width=158.6,this.userData.height=168,this.userData.progress=0,this.origin=new Rt(Math.round(this.userData.width*(this.translate.x-.5)),Math.round(this.userData.height*(this.translate.y+.5))),this.translate=new Rt(Math.round(this.userData.width*this.translate.x),Math.round(this.userData.height*this.translate.y)),this.init()}init(){let t=new Oe(this.gl),e=new Xn(this.gl,this.color),r=new ge(this.gl,{geometry:t,program:e});r.frustumCulled=!1,r.position.set(this.translate.x,this.translate.y,0),r.scale.set(this.userData.width,this.userData.height,1),this.addChild(r),this.mesh=r}update(){this.position.x=-this.origin.x+this.userData.x,this.position.y=-this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.mesh.program.uniforms.uProgress.value=this.userData.progress,this.mesh.program.uniforms.uAlpha.value=this.userData.opacity*this.parent.userData.opacity}};var Wn=class extends nt{constructor(t){super(),this.gl=t,this.viewWidth=700,this.viewHeight=172,this.viewScale=1,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.origin=new Rt}async init(){let t=new Gn(this.gl,new Ft(1,1,1));this.addChild(t),(await Promise.all([_e(this.gl,"assets/textures/logo-2-msdf.png"),_e(this.gl,"assets/textures/logo-3-msdf.png"),_e(this.gl,"assets/textures/logo-4-msdf.png"),_e(this.gl,"assets/textures/logo-5-msdf.png"),_e(this.gl,"assets/textures/logo-6-msdf.png"),_e(this.gl,"assets/textures/logo-7-msdf.png"),_e(this.gl,"assets/textures/logo-8-msdf.png"),_e(this.gl,"assets/textures/logo-9-msdf.png")])).forEach((r,i)=>{r.minFilter=this.gl.LINEAR,r.generateMipmaps=!1;let n=new Un(this.gl,r,new Ft(1,1,1),i<1?new Rt(.5-.1123,0):new Rt(.5,-.5));this.addChild(n)})}resize(t,e,r,i){this.viewScale=i,this.userData.width=this.viewWidth*this.viewScale,this.userData.height=this.viewHeight*this.viewScale,this.origin.set(Math.round((t-this.userData.width)/2),Math.round((e-this.userData.height)/2))}update(){this.position.x=this.origin.x+this.userData.x,this.position.y=-this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.viewScale*this.userData.scale),this.children.forEach(t=>{t.update()})}};var Yn=class extends nt{constructor(t){super(),this.gl=t,this.visible=!1,this.userData.visible=this.visible,this.init()}init(){this.wordmark=new Wn(this.gl),this.addChild(this.wordmark)}resize(t,e,r,i){this.wordmark.resize(t,e,r,i)}update(){this.visible=this.userData.visible,this.wordmark.update()}ready(){return this.wordmark.init()}};var Wf=`
attribute vec3 position;
attribute vec2 uv;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
attribute mat4 instanceMatrix;
attribute float instanceColorIndex;
attribute float instanceRandom;
attribute float instanceOpacity;
uniform vec3 uPinkColor[2];
uniform vec3 uPurpleColor[2];
uniform vec3 uRedColor[2];
varying vec2 vUv;
varying vec3 vColor[2];
varying float vInstanceRandom;
varying float vInstanceOpacity;
void main() {
vUv = uv;
if (instanceColorIndex == 0.0) {
vColor[0] = uPinkColor[0];
vColor[1] = uPinkColor[1];
} else if (instanceColorIndex == 1.0) {
vColor[0] = uPurpleColor[0];
vColor[1] = uPurpleColor[1];
} else if (instanceColorIndex == 2.0) {
vColor[0] = uRedColor[0];
vColor[1] = uRedColor[1];
}
vInstanceRandom = instanceRandom;
vInstanceOpacity = instanceOpacity;
gl_Position = projectionMatrix * modelViewMatrix * instanceMatrix * vec4(position, 1.0);
}
`,Yf=`
precision highp float;
uniform sampler2D tMap;
uniform float uTime;
varying vec2 vUv;
varying vec3 vColor[2];
varying float vInstanceRandom;
varying float vInstanceOpacity;
${Vn}
void main() {
float alpha = msdf(tMap, vUv);
alpha *= vInstanceOpacity;
if (alpha < 0.01) {
discard;
}
vec2 uv = vUv;
uv.x += vInstanceRandom * uTime * 0.5;
uv.x = fract(uv.x); // Wrap around 1.0
// Linear gradient, mirrored for wrapping
vec3 color = mix(vColor[0], vColor[1], smoothstep(0.0, 0.3333, uv.x));
color = mix(color, vColor[1], smoothstep(0.3333, 0.6666, uv.x));
color = mix(color, vColor[0], smoothstep(0.6666, 1.0, uv.x));
gl_FragColor.rgb = color;
gl_FragColor.a = smoothstep(1.0, 0.3333, vUv.x) * alpha;
}
`,qf={vertex100:Wf,fragment100:`#extension GL_OES_standard_derivatives : enable
precision highp float;
${Yf}`,vertex300:`#version 300 es
#define attribute in
#define varying out
${Wf}`,fragment300:`#version 300 es
precision highp float;
#define varying in
#define texture2D texture
#define gl_FragColor FragColor
out vec4 FragColor;
${Yf}`};var{vertex100:Pp,fragment100:Fp,vertex300:Rp,fragment300:Op}=qf,qn=class extends Re{constructor(t,e){super(t,{uniforms:{tMap:{value:e},uPinkColor:{value:[new Ft(16146403),new Ft(8863221)]},uPurpleColor:{value:[new Ft(11953906),new Ft(15350410)]},uRedColor:{value:[new Ft(15281508),new Ft(16017892)]},uTime:{value:0}},vertex:t.renderer.isWebgl2?Rp:Pp,fragment:t.renderer.isWebgl2?Op:Fp,transparent:!0,depthTest:!1,depthWrite:!1})}};var Hn=class extends nt{constructor(t,e,r){super(),this.origin=t,this.mesh=e,this.index=r,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1}update(){this.position.x=this.origin.x+this.userData.x,this.position.y=this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.updateMatrix(),this.matrix.toArray(this.mesh.geometry.attributes.instanceMatrix.data,this.index*16),this.mesh.geometry.attributes.instanceOpacity.data.set([this.userData.opacity*this.parent.userData.opacity],this.index)}};var jn=class extends nt{constructor(t,e){super(),this.gl=t,this.divisions=e,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1}async init(){let t=await _e(this.gl,"assets/textures/line-msdf.png");t.minFilter=this.gl.LINEAR,t.generateMipmaps=!1;let i=235/300,n=1.6,a=n*i,o=n,h=this.divisions,l=this.divisions,u=h*l,c=new Oe(this.gl,{width:a,height:o});c.addAttribute("instanceMatrix",{instanced:1,size:16,data:new Float32Array(u*16)}),c.addAttribute("instanceColorIndex",{instanced:1,size:1,data:new Float32Array(u).map(()=>Math.floor(Math.random()*3))}),c.addAttribute("instanceRandom",{instanced:1,size:1,data:new Float32Array(u).map(()=>Math.random())}),c.addAttribute("instanceOpacity",{instanced:1,size:1,data:new Float32Array(u).fill(1)});let d=new qn(this.gl,t),f=new Ss(this.gl,{geometry:c,program:d}),g=new Nt,p=0;for(let _=0;_<l;_++)for(let m=0;m<h;m++){g.position.set(2*m,2*_,0),g.updateMatrix(),g.matrix.toArray(f.geometry.attributes.instanceMatrix.data,p*16);let v=new Hn(g.position.clone(),f,p);this.addChild(v),p++}f.geometry.attributes.instanceMatrix.needsUpdate=!0,this.addChild(f),this.mesh=f}update(t){this.position.x=this.userData.x,this.position.y=-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.mesh.program.uniforms.uTime.value=t,this.children.forEach(e=>{e instanceof nt&&e.update()}),this.mesh.geometry.attributes.instanceMatrix.needsUpdate=!0,this.mesh.geometry.attributes.instanceOpacity.needsUpdate=!0}};var $n=class extends nt{constructor(t){super(),this.gl=t,this.divisions=Zo?9:14,this.visible=!1;let e=this.divisions-2;this.position.x=-e,this.position.y=-e,this.init()}init(){this.container=new jn(this.gl,this.divisions),this.addChild(this.container)}update(t){this.visible=this.container.userData.opacity>0,this.container.update(t)}ready(){return this.container.init()}};var Qn=class extends nt{constructor(t,e){super(),this.gl=t,this.document=e,this.viewWidth=433,this.viewHeight=58,this.aspect=this.viewWidth/this.viewHeight,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1}async init(){let t=await _e(this.gl,"assets/textures/build-msdf.png");t.minFilter=this.gl.LINEAR,t.generateMipmaps=!1;let e=new Oe(this.gl),r=new Bi(this.gl,t,new Ft(1,1,1)),i=new ge(this.gl,{geometry:e,program:r});i.frustumCulled=!1,this.addChild(i),this.mesh=i}resize(t,e,r,i){let a=this.document.querySelector(".adev-build-webgl-text h2").getBoundingClientRect(),o;t<1e3?o=48:o=a.height*.88,this.userData.width=o*this.aspect,this.userData.height=o;let h=1-(a.y-(e-a.height)/2);t<1e3?h-=4:h-=6*i,this.mesh.position.set(0,h,0),this.mesh.scale.set(this.userData.width,this.userData.height,1)}update(){this.position.x=this.userData.x,this.position.y=-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.mesh.program.uniforms.uAlpha.value=this.userData.opacity*this.parent.userData.opacity}ready(){return this.init()}};var Zn=class extends nt{constructor(t,e){super(),this.gl=t,this.document=e,this.visible=!1,this.userData.x=0,this.userData.y=0,this.userData.rotation=0,this.userData.scale=1,this.userData.opacity=1,this.origin=new Rt,this.init()}init(){this.text=new Qn(this.gl,this.document),this.addChild(this.text)}resize(t,e,r,i){this.origin.set(Math.round(t/2),Math.round(e/2)),this.text.resize(t,e,r,i)}update(){this.position.x=this.origin.x+this.userData.x,this.position.y=-this.origin.y+-this.userData.y,this.rotation.z=-Bt(this.userData.rotation),this.scale.set(this.userData.scale),this.visible=this.userData.opacity>0,this.text.update()}ready(){return this.text.init()}};var Kn=class{constructor(t,e,r){this.element=t,this.document=e,this.window=r,this.currentClearColor=new Ft,this.needsUpdate=!1,this.linesProgress=0,this.init(),this.initMesh(),this.initViews()}init(){this.renderer=new Ms({powerPreference:"high-performance",depth:!1}),this.gl=this.renderer.gl,this.element.appendChild(this.gl.canvas),this.gradientScene=new Nt,this.gradientCamera=new Br(this.gl,{left:-1,right:1,top:1,bottom:-1,near:0,far:1}),this.angularScene=new Nt,this.angularCamera=new Br(this.gl,{left:-1,right:1,top:1,bottom:-1,near:0,far:1}),this.linesScene=new Nt,this.linesCamera=new Br(this.gl,{fov:30,near:.5,far:40}),this.linesCamera.position.z=10,this.linesCamera.lookAt([0,0,0]),this.buildScene=new Nt,this.buildCamera=new Br(this.gl,{left:-1,right:1,top:1,bottom:-1,near:0,far:1})}initMesh(){let t=new Es(this.gl);this.screen=new ge(this.gl,{geometry:t}),this.screen.frustumCulled=!1,this.renderTargetA=new Ni(this.gl,{depth:!1}),this.renderTargetB=new Ni(this.gl,{depth:!1}),this.maskProgram=new zn(this.gl,this.window),this.maskProgram.uniforms.tMap.value=this.renderTargetA.texture,this.maskProgram.uniforms.tMask.value=this.renderTargetB.texture,this.screen.program=this.maskProgram}initViews(){this.gradient=new Bn(this.gl,this.document,this.window),this.gradientScene.addChild(this.gradient),this.angular=new Yn(this.gl),this.angularScene.addChild(this.angular),this.lines=new $n(this.gl),this.linesScene.addChild(this.lines),this.build=new Zn(this.gl,this.document),this.buildScene.addChild(this.build)}theme(){let t=getComputedStyle(this.document.querySelector(":root"));this.currentClearColor.set(t.getPropertyValue("--webgl-page-background").trim()),this.gl.clearColor(...this.currentClearColor,1),this.gradient.theme()}resize(t,e,r,i){this.renderer.dpr=r,this.renderer.setSize(t,e),this.gradient.resize(t,e,r,i),this.angular.resize(t,e,r,i),this.build.resize(t,e,r,i),this.gradientCamera.left=-t/2,this.gradientCamera.right=t/2,this.gradientCamera.top=e/2,this.gradientCamera.bottom=-e/2,this.gradientCamera.orthographic(),this.gradientCamera.position.x=t/2,this.gradientCamera.position.y=-e/2,this.angularCamera.left=-t/2,this.angularCamera.right=t/2,this.angularCamera.top=e/2,this.angularCamera.bottom=-e/2,this.angularCamera.orthographic(),this.angularCamera.position.x=t/2,this.angularCamera.position.y=-e/2,this.linesCamera.aspect=t/e,this.linesCamera.perspective(),t<1e3?this.linesCamera.position.z=20:this.linesCamera.position.z=e/60,this.buildCamera.left=-t/2,this.buildCamera.right=t/2,this.buildCamera.top=e/2,this.buildCamera.bottom=-e/2,this.buildCamera.orthographic(),this.buildCamera.position.x=t/2,this.buildCamera.position.y=-e/2;let n=t*r,a=e*r;this.renderTargetA.setSize(n,a),this.renderTargetB.setSize(n,a)}update(t,e,r,i){if(i>=0&&i<=.16&&(this.gradient.background.userData.progress=0),this.gradient.update(t),this.angular.update(),this.lines.update(t),this.build.update(),!this.gradient.visible&&!this.angular.visible&&!this.lines.visible&&!this.build.visible)if(this.needsUpdate)this.needsUpdate=!1;else return;else this.needsUpdate=!0;let{renderer:n,renderTargetA:a,renderTargetB:o}=this;n.render({scene:this.gradientScene,camera:this.gradientCamera,target:a}),this.gl.clearColor(0,0,0,0),n.render({scene:this.angularScene,camera:this.angularCamera,target:o}),n.render({scene:this.buildScene,camera:this.buildCamera,target:o,clear:!1}),this.gl.clearColor(...this.currentClearColor,1),n.render({scene:this.screen}),this.linesScene.position.z=-6+6*(1-(-.5+this.linesProgress)),this.linesCamera.lookAt([0,0,0]),n.render({scene:this.linesScene,camera:this.linesCamera,clear:!1})}ready(){return Promise.all([this.gradient.ready(),this.angular.ready(),this.lines.ready(),this.build.ready()])}destroy(){this.gradient.destroy(),this.angular.destroy(),this.lines.destroy(),this.build.destroy();let t=this.gl.getExtension("WEBGL_lose_context");t&&t.loseContext()}};var tm=(()=>{let t=class t{constructor(){this.destroyRef=Yi($o),this.document=Yi(Qo),this.window=Yi(Ko),this.themeManager=Yi(ih),this.scale=1,this.progress=0,this.logoMovement=0,this.logoProgress=0,this.logoProgressTarget=0,this.lerpSpeed=.1,this.animations=[],this.refreshRate=60,this.playbackRate=1,this.onUpdate=(r,i,n)=>{this.playbackRate=this.refreshRate/(1e3/i),this.logoProgress=Et.utils.interpolate(this.logoProgress,this.logoProgressTarget,this.lerpSpeed*this.playbackRate),this.logoAnimation.progress(this.logoProgress),this.canvas.update(r,i,n,this.progress)}}async init(r){this.element=r,this.element.classList.add(sa),Et.registerPlugin(U),U.enable(),U.config({ignoreMobileResize:!0}),await this.initCanvas(),this.getViews(),this.onTheme(),this.onResize(),this.setAnimations(),this.onUpdate(0,0,0,0),this.enable(),setTimeout(()=>{this.element.classList.add(na)},th)}async initCanvas(){this.canvas=new Kn(this.document.querySelector(rh),this.document,this.window),await this.canvas.ready()}getViews(){this.gradientView=this.canvas.gradient.userData,this.gradient=this.canvas.gradient.background.userData,this.angularView=this.canvas.angular.userData,this.wordmark=this.canvas.angular.wordmark.userData,this.glyphs=this.canvas.angular.wordmark.children.slice(),this.logo=this.glyphs[0].userData,this.logoInner=this.glyphs[1].userData,this.angular=this.glyphs.slice(2).map(r=>r.userData),this.linesContainer=this.canvas.lines.container.userData,this.lines=this.canvas.lines.container.children.slice(0,-1).map(r=>r.userData),this.buildView=this.canvas.build.userData}setAnimations(){this.animations=[...this.setLogoAnimation(),this.setWorksAtAnyScaleAnimation(),...this.setColorfulLinesAnimation(),this.setLovedByMillionsAnimation(),this.setBuildForEveryoneAnimation(),this.setBuildForEveryoneGradientAnimation(),this.setScrollProgressAnimation()]}setLogoAnimation(){let r=Et.timeline({scrollTrigger:{trigger:qi,start:"center bottom",end:"center center",scrub:.5,invalidateOnRefresh:!0}});r.fromTo([this.gradientView,this.wordmark],{x:0},{x:()=>this.logoMovement,ease:"none"});let i=Et.timeline({scrollTrigger:{trigger:qi,start:"center bottom",end:"center center",scrub:.5}});i.fromTo(this.angular,{opacity:1},{opacity:0,stagger:{each:.2,from:"end"},ease:"none"});let n=Et.timeline({paused:!0}).to(this.gradientView,{scale:10,duration:1,ease:"power1.in"}).to(this.logo,{scale:40,duration:1,ease:"power1.in"},0).to(this.logo,{rotation:-270,duration:1,ease:"power1.in"},0).to(this.logo,{progress:1,duration:.25,ease:"power1.in"},0).to(this.logoInner,{scale:0,opacity:0,duration:.25,ease:"power1.out"},0).set(this.angularView,{visible:!1},.8),a=Et.timeline({scrollTrigger:{trigger:qi,start:"center center",end:()=>`bottom+=${this.document.body.clientHeight} bottom`,scrub:.5,onUpdate:({progress:o})=>{o>.25?this.logoProgressTarget=o:o>.125?this.logoProgressTarget=.25:this.logoProgressTarget=0}}});return this.logoAnimation=n,[r,i,n,a]}setWorksAtAnyScaleAnimation(){let r=Et.timeline({scrollTrigger:{trigger:qi,start:"center+=10% center",end:()=>`bottom+=${this.document.body.clientHeight} bottom`,scrub:.5}});return r.fromTo(ia,{scale:.1,opacity:0},{scale:1,opacity:1,duration:1,ease:"power1.in"}),r.to(ia,{scale:1.3,opacity:0,delay:.8}),r}setColorfulLinesAnimation(){let r=Et.timeline({scrollTrigger:{trigger:Rs,start:"top+=18% bottom",end:()=>`bottom+=${this.document.body.clientHeight*2} bottom`,scrub:.5}});r.fromTo(this.lines,{x:3,y:4,scale:0,opacity:0},{x:0,y:0,scale:1,opacity:1,duration:1,stagger:{each:.05,from:"random"},ease:"power1.out"},0).set(this.linesContainer,{opacity:1},0),r.to(this.linesContainer,{x:-1.5,y:-2,opacity:0,ease:"power1.in"});let i=Et.timeline({scrollTrigger:{trigger:Rs,start:"top+=18% bottom",end:()=>`bottom+=${this.document.body.clientHeight*2} bottom`,scrub:.5}});return i.to(this.canvas,{linesProgress:1,duration:1,ease:"none"}),[r,i]}setLovedByMillionsAnimation(){let r=Et.timeline({scrollTrigger:{trigger:Rs,start:"bottom bottom",end:()=>`bottom+=${this.document.body.clientHeight*2} bottom`,scrub:.5}});return r.fromTo(ea,{scale:.8,opacity:0},{scale:1,opacity:1}),r.to(ea,{scale:1.3,opacity:0,delay:.8}),r}setBuildForEveryoneAnimation(){let r=Et.timeline({scrollTrigger:{trigger:ra,start:"bottom bottom",end:()=>`bottom+=${this.document.body.clientHeight*2} bottom`,scrub:.5}});return r.fromTo(eh,{scale:.8,opacity:0},{scale:1,opacity:1}).fromTo(this.buildView,{scale:.8,opacity:0},{scale:1,opacity:1},0),r}setBuildForEveryoneGradientAnimation(){let r=Et.timeline({scrollTrigger:{trigger:ra,start:"bottom bottom",end:()=>`bottom+=${this.document.body.clientHeight*2} bottom`,scrub:.5}});return r.fromTo(this.gradient,{progress:0},{progress:1},0),r}setScrollProgressAnimation(){let r=Et.timeline({scrollTrigger:{trigger:".adev-home",start:"top top",end:"bottom bottom",scrub:.5,onUpdate:({progress:i})=>{this.progress=i}}});return r.set(this.angularView,{visible:!0,immediateRender:!0}),r}addListeners(){this.themeManager.themeChanged$.pipe(ta(this.destroyRef)).subscribe(()=>{this.onTheme()}),qo(this.window,"resize").pipe(Ho(Jo),ta(this.destroyRef)).subscribe(()=>{this.onResize()}),Et.ticker.add(this.onUpdate)}removeListeners(){Et.ticker.remove(this.onUpdate)}onTheme(){this.canvas.theme()}onResize(){let r=this.window.innerWidth,i=this.document.body.clientHeight,n=this.window.devicePixelRatio;r>2560&&(r=2560),r<1e3?this.scale=.5:this.scale=r/1470,this.canvas.resize(r,i,n,this.scale),r<1e3?this.logoMovement=136:this.logoMovement=272*this.scale,Et.set(this.gradient,{buildWidth:this.canvas.build.text.userData.width}),U.refresh()}enable(){this.addListeners()}disable(){this.removeListeners()}disableEnd(r){r&&(r.isIntersecting?Et?.set([this.gradientView,this.buildView],{opacity:0}):this.progress>.8&&Et?.set([this.gradientView,this.buildView],{opacity:1}))}destroy(){this.element.classList.remove(na),this.element.classList.remove(sa),this.disable(),U.disable(),this.animations.forEach(r=>r.kill()),this.animations=[],this.canvas.destroy()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=jo({token:t,factory:t.\u0275fac});let s=t;return s})();export{tm as HomeAnimation};