@widelab-development/pirxey-webflow-dev 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/blog.js +157 -157
  2. package/dist/index.js +2 -2
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (()=>{function ki(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nd(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var In={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Vs={duration:.5,overwrite:!1,delay:0},Cu,ln,Ce,qn=1e8,Ee=1/qn,_u=Math.PI*2,K_=_u/4,j_=0,Ud=Math.sqrt,Q_=Math.cos,tx=Math.sin,We=function(t){return typeof t=="string"},Le=function(t){return typeof t=="function"},Vi=function(t){return typeof t=="number"},ul=function(t){return typeof t>"u"},Ci=function(t){return typeof t=="object"},Pn=function(t){return t!==!1},Du=function(){return typeof window<"u"},el=function(t){return Le(t)||We(t)},Od=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},cn=Array.isArray,xu=/(?:-?\.?\d|\.)+/gi,Ru=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Qr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,uu=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Pu=/[+-]=-?[.\d]+/,Bd=/[^,'"\[\]\s]+/gi,ex=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Re,Ti,yu,Iu,Bn={},sl={},kd,zd=function(t){return(sl=jr(t,Bn))&&un},hl=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Qo=function(t,e){return!e&&console.warn(t)},Vd=function(t,e){return t&&(Bn[t]=e)&&sl&&(sl[t]=e)||Bn},ta=function(){return 0},nx={suppressEvents:!0,isStart:!0,kill:!1},nl={suppressEvents:!0,kill:!1},ix={suppressEvents:!0},Lu={},dr=[],vu={},Hd,Dn={},hu={},Cd=30,il=[],Fu="",Nu=function(t){var e=t[0],n,i;if(Ci(e)||Le(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=il.length;i--&&!il[i].targetTest(e););n=il[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Bu(t[i],n)))||t.splice(i,1);return t},pr=function(t){return t._gsap||Nu(Zn(t))[0]._gsap},Uu=function(t,e,n){return(n=t[e])&&Le(n)?t[e]():ul(n)&&t.getAttribute&&t.getAttribute(e)||n},xn=function(t,e){return(t=t.split(",")).forEach(e)||t},Fe=function(t){return Math.round(t*1e5)/1e5||0},Je=function(t){return Math.round(t*1e7)/1e7||0},ts=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),n==="+"?t+i:n==="-"?t-i:n==="*"?t*i:t/i},rx=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},ol=function(){var t=dr.length,e=dr.slice(0),n,i;for(vu={},dr.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},Gd=function(t,e,n,i){dr.length&&!ln&&ol(),t.render(e,n,i||ln&&e<0&&(t._initted||t._startAt)),dr.length&&!ln&&ol()},Wd=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(Bd).length<2?e:We(t)?t.trim():t},Xd=function(t){return t},$n=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},sx=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},jr=function(t,e){for(var n in e)t[n]=e[n];return t},Dd=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=Ci(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},al=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Jo=function(t){var e=t.parent||Re,n=t.keyframes?sx(cn(t.keyframes)):$n;if(Pn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},ox=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},Yd=function(t,e,n,i,s){n===void 0&&(n="_first"),i===void 0&&(i="_last");var o=t[i],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=o,e.parent=e._dp=t,e},fl=function(t,e,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var s=e._prev,o=e._next;s?s._next=o:t[n]===e&&(t[n]=o),o?o._prev=s:t[i]===e&&(t[i]=s),e._next=e._prev=e.parent=null},mr=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},$r=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},ax=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Su=function(t,e,n,i){return t._startAt&&(ln?t._startAt.revert(nl):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},lx=function r(t){return!t||t._ts&&r(t.parent)},Rd=function(t){return t._repeat?Hs(t._tTime,t=t.duration()+t._rDelay)*t:0},Hs=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},ll=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},dl=function(t){return t._end=Je(t._start+(t._tDur/Math.abs(t._ts||t._rts||Ee)||0))},pl=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Je(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),dl(t),n._dirty||$r(n,t)),t},qd=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=ll(t.rawTime(),e),(!e._dur||ia(0,e.totalDuration(),n)-e._tTime>Ee)&&e.render(n,!0)),$r(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-Ee}},Ai=function(t,e,n,i){return e.parent&&mr(e),e._start=Je((Vi(n)?n:n||t!==Re?Yn(t,n,e):t._time)+e._delay),e._end=Je(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Yd(t,e,"_first","_last",t._sort?"_start":0),Mu(e)||(t._recent=e),i||qd(t,e),t._ts<0&&pl(t,t._tTime),t},Zd=function(t,e){return(Bn.ScrollTrigger||hl("scrollTrigger",e))&&Bn.ScrollTrigger.create(e,t)},$d=function(t,e,n,i,s){if(Vu(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!ln&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Hd!==Rn.frame)return dr.push(t),t._lazy=[s,i],1},cx=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},Mu=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},ux=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&cx(t)&&!(!t._initted&&Mu(t))||(t._ts<0||t._dp._ts<0)&&!Mu(t))?0:1,a=t._rDelay,l=0,c,h,f;if(a&&t._repeat&&(l=ia(0,t._tDur,e),h=Hs(l,a),t._yoyo&&h&1&&(o=1-o),h!==Hs(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||ln||i||t._zTime===Ee||!e&&t._zTime){if(!t._initted&&$d(t,e,i,n,l))return;for(f=t._zTime,t._zTime=e||(n?Ee:0),n||(n=e&&!f),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,c=t._pt;c;)c.r(o,c.d),c=c._next;e<0&&Su(t,e,n,!0),t._onUpdate&&!n&&On(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&On(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&mr(t,1),!n&&!ln&&(On(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},hx=function(t,e,n){var i;if(n>e)for(i=t._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<e)return i;i=i._prev}},Gs=function(t,e,n,i){var s=t._repeat,o=Je(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Je(o*(s+1)+t._rDelay*s):o,a>0&&!i&&pl(t,t._tTime=t._tDur*a),t.parent&&dl(t),n||$r(t.parent,t),t},Pd=function(t){return t instanceof en?$r(t):Gs(t,t._dur)},fx={_start:0,endTime:ta,totalDuration:ta},Yn=function r(t,e,n){var i=t.labels,s=t._recent||fx,o=t.duration()>=qn?s.endTime(!1):t._dur,a,l,c;return We(e)&&(isNaN(e)||e in i)?(l=e.charAt(0),c=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(c?(a<0?s:n).totalDuration()/100:1)):a<0?(e in i||(i[e]=o),i[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),c&&n&&(l=l/100*(cn(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},Ko=function(t,e,n){var i=Vi(e[1]),s=(i?2:1)+(t<2?0:1),o=e[s],a,l;if(i&&(o.duration=e[1]),o.parent=n,t){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Pn(l.vars.inherit)&&l.parent;o.immediateRender=Pn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Ue(e[0],o,e[s+1])},gr=function(t,e){return t||t===0?e(t):e},ia=function(t,e,n){return n<t?t:n>e?e:n},nn=function(t,e){return!We(t)||!(e=ex.exec(t))?"":e[1]},dx=function(t,e,n){return gr(n,function(i){return ia(t,e,i)})},bu=[].slice,Jd=function(t,e){return t&&Ci(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&Ci(t[0]))&&!t.nodeType&&t!==Ti},px=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return We(i)&&!e||Jd(i,1)?(s=n).push.apply(s,Zn(i)):n.push(i)})||n},Zn=function(t,e,n){return Ce&&!e&&Ce.selector?Ce.selector(t):We(t)&&!n&&(yu||!Ws())?bu.call((e||Iu).querySelectorAll(t),0):cn(t)?px(t,n):Jd(t)?bu.call(t,0):t?[t]:[]},wu=function(t){return t=Zn(t)[0]||Qo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return Zn(e,n.querySelectorAll?n:n===t?Qo("Invalid scope")||Iu.createElement("div"):t)}},Kd=function(t){return t.sort(function(){return .5-Math.random()})},jd=function(t){if(Le(t))return t;var e=Ci(t)?t:{each:t},n=Jr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,h=i,f=i;return We(i)?h=f={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(h=i[0],f=i[1]),function(d,u,_){var p=(_||e).length,m=o[p],g,b,v,S,C,T,w,P,M;if(!m){if(M=e.grid==="auto"?0:(e.grid||[1,qn])[1],!M){for(w=-qn;w<(w=_[M++].getBoundingClientRect().left)&&M<p;);M<p&&M--}for(m=o[p]=[],g=l?Math.min(M,p)*h-.5:i%M,b=M===qn?0:l?p*f/M-.5:i/M|0,w=0,P=qn,T=0;T<p;T++)v=T%M-g,S=b-(T/M|0),m[T]=C=c?Math.abs(c==="y"?S:v):Ud(v*v+S*S),C>w&&(w=C),C<P&&(P=C);i==="random"&&Kd(m),m.max=w-P,m.min=P,m.v=p=(parseFloat(e.amount)||parseFloat(e.each)*(M>p?p-1:c?c==="y"?p/M:M:Math.max(M,p/M))||0)*(i==="edges"?-1:1),m.b=p<0?s-p:s,m.u=nn(e.amount||e.each)||0,n=n&&p<0?ap(n):n}return p=(m[d]-m.min)/m.max||0,Je(m.b+(n?n(p):p)*m.v)+m.u}},Eu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Je(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(Vi(n)?0:nn(n))}},Qd=function(t,e){var n=cn(t),i,s;return!n&&Ci(t)&&(i=n=t.radius||qn,t.values?(t=Zn(t.values),(s=!Vi(t[0]))&&(i*=i)):t=Eu(t.increment)),gr(e,n?Le(t)?function(o){return s=t(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=qn,h=0,f=t.length,d,u;f--;)s?(d=t[f].x-a,u=t[f].y-l,d=d*d+u*u):d=Math.abs(t[f]-a),d<c&&(c=d,h=f);return h=!i||c<=i?t[h]:o,s||h===o||Vi(o)?h:h+nn(o)}:Eu(t))},tp=function(t,e,n,i){return gr(cn(t)?!e:n===!0?!!(n=0):!i,function(){return cn(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+n*.99))/n)*n*i)/i})},mx=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return e.reduce(function(s,o){return o(s)},i)}},gx=function(t,e){return function(n){return t(parseFloat(n))+(e||nn(n))}},_x=function(t,e,n){return np(t,e,0,1,n)},ep=function(t,e,n){return gr(n,function(i){return t[~~e(i)]})},xx=function r(t,e,n){var i=e-t;return cn(t)?ep(t,r(0,t.length),e):gr(n,function(s){return(i+(s-t)%i)%i+t})},yx=function r(t,e,n){var i=e-t,s=i*2;return cn(t)?ep(t,r(0,t.length-1),e):gr(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},Xs=function(t){for(var e=0,n="",i,s,o,a;~(i=t.indexOf("random(",e));)o=t.indexOf(")",i),a=t.charAt(i+7)==="[",s=t.substr(i+7,o-i-7).match(a?Bd:xu),n+=t.substr(e,i-e)+tp(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},np=function(t,e,n,i,s){var o=e-t,a=i-n;return gr(s,function(l){return n+((l-t)/o*a||0)})},vx=function r(t,e,n,i){var s=isNaN(t+e)?0:function(u){return(1-u)*t+u*e};if(!s){var o=We(t),a={},l,c,h,f,d;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(cn(t)&&!cn(e)){for(h=[],f=t.length,d=f-2,c=1;c<f;c++)h.push(r(t[c-1],t[c]));f--,s=function(_){_*=f;var p=Math.min(d,~~_);return h[p](_-p)},n=e}else i||(t=jr(cn(t)?[]:{},t));if(!h){for(l in e)ku.call(a,t,l,"get",e[l]);s=function(_){return Wu(_,a)||(o?t.p:t)}}}return gr(n,s)},Id=function(t,e,n){var i=t.labels,s=qn,o,a,l;for(o in i)a=i[o]-e,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},On=function(t,e,n){var i=t.vars,s=i[e],o=Ce,a=t._ctx,l,c,h;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&dr.length&&ol(),a&&(Ce=a),h=l?s.apply(c,l):s.call(c),Ce=o,h},Zo=function(t){return mr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ln),t.progress()<1&&On(t,"onInterrupt"),t},zs,ip=[],rp=function(t){if(t)if(t=!t.name&&t.default||t,Du()||t.headless){var e=t.name,n=Le(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:ta,render:Wu,add:ku,kill:Ux,modifier:Nx,rawVars:0},o={targetTest:0,get:0,getSetter:ml,aliases:{},register:0};if(Ws(),t!==i){if(Dn[e])return;$n(i,$n(al(t,s),o)),jr(i.prototype,jr(s,al(t,o))),Dn[i.prop=e]=i,t.targetTest&&(il.push(i),Lu[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Vd(e,i),t.register&&t.register(un,i,yn)}else ip.push(t)},be=255,$o={aqua:[0,be,be],lime:[0,be,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,be],navy:[0,0,128],white:[be,be,be],olive:[128,128,0],yellow:[be,be,0],orange:[be,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[be,0,0],pink:[be,192,203],cyan:[0,be,be],transparent:[be,be,be,0]},fu=function(t,e,n){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(n-e)*t*6:t<.5?n:t*3<2?e+(n-e)*(2/3-t)*6:e)*be+.5|0},sp=function(t,e,n){var i=t?Vi(t)?[t>>16,t>>8&be,t&be]:0:$o.black,s,o,a,l,c,h,f,d,u,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),$o[t])i=$o[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&be,i&be,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&be,t&be]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(xu),!e)l=+i[0]%360/360,c=+i[1]/100,h=+i[2]/100,o=h<=.5?h*(c+1):h+c-h*c,s=h*2-o,i.length>3&&(i[3]*=1),i[0]=fu(l+1/3,s,o),i[1]=fu(l,s,o),i[2]=fu(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(Ru),n&&i.length<4&&(i[3]=1),i}else i=t.match(xu)||$o.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/be,o=i[1]/be,a=i[2]/be,f=Math.max(s,o,a),d=Math.min(s,o,a),h=(f+d)/2,f===d?l=c=0:(u=f-d,c=h>.5?u/(2-f-d):u/(f+d),l=f===s?(o-a)/u+(o<a?6:0):f===o?(a-s)/u+2:(s-o)/u+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(h*100+.5)),n&&i.length<4&&(i[3]=1),i},op=function(t){var e=[],n=[],i=-1;return t.split(zi).forEach(function(s){var o=s.match(Qr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},Ld=function(t,e,n){var i="",s=(t+i).match(zi),o=e?"hsla(":"rgba(",a=0,l,c,h,f;if(!s)return t;if(s=s.map(function(d){return(d=sp(d,e,1))&&o+(e?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),n&&(h=op(t),l=n.c,l.join(i)!==h.c.join(i)))for(c=t.replace(zi,"1").split(Qr),f=c.length-1;a<f;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:n).shift());if(!c)for(c=t.split(zi),f=c.length-1;a<f;a++)i+=c[a]+s[a];return i+c[f]},zi=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in $o)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),Sx=/hsl[a]?\(/,Ou=function(t){var e=t.join(" "),n;if(zi.lastIndex=0,zi.test(e))return n=Sx.test(e),t[1]=Ld(t[1],n),t[0]=Ld(t[0],n,op(t[1])),!0},ea,Rn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,h,f,d,u,_=function p(m){var g=r()-i,b=m===!0,v,S,C,T;if((g>t||g<0)&&(n+=g-e),i+=g,C=i-n,v=C-o,(v>0||b)&&(T=++f.frame,d=C-f.time*1e3,f.time=C=C/1e3,o+=v+(v>=s?4:s-v),S=1),b||(l=c(p)),S)for(u=0;u<a.length;u++)a[u](C,d,T,m)};return f={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(m){return d/(1e3/(m||60))},wake:function(){kd&&(!yu&&Du()&&(Ti=yu=window,Iu=Ti.document||{},Bn.gsap=un,(Ti.gsapVersions||(Ti.gsapVersions=[])).push(un.version),zd(sl||Ti.GreenSockGlobals||!Ti.gsap&&Ti||{}),ip.forEach(rp)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),c=h||function(m){return setTimeout(m,o-f.time*1e3+1|0)},ea=1,_(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),ea=0,c=ta},lagSmoothing:function(m,g){t=m||1/0,e=Math.min(g||33,t)},fps:function(m){s=1e3/(m||240),o=f.time*1e3+s},add:function(m,g,b){var v=g?function(S,C,T,w){m(S,C,T,w),f.remove(v)}:m;return f.remove(m),a[b?"unshift":"push"](v),Ws(),v},remove:function(m,g){~(g=a.indexOf(m))&&a.splice(g,1)&&u>=g&&u--},_listeners:a},f}(),Ws=function(){return!ea&&Rn.wake()},de={},Mx=/^[\d.\-M][\d.\-,\s]/,bx=/["']/g,wx=function(t){for(var e={},n=t.substr(1,t.length-3).split(":"),i=n[0],s=1,o=n.length,a,l,c;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),e[i]=isNaN(c)?c.replace(bx,"").trim():+c,i=l.substr(a+1).trim();return e},Ex=function(t){var e=t.indexOf("(")+1,n=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<n?t.indexOf(")",n+1):n)},Tx=function(t){var e=(t+"").split("("),n=de[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[wx(e[1])]:Ex(t).split(",").map(Wd)):de._CE&&Mx.test(t)?de._CE("",t):n},ap=function(t){return function(e){return 1-t(1-e)}},lp=function r(t,e){for(var n=t._first,i;n;)n instanceof en?r(n,e):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==e&&(n.timeline?r(n.timeline,e):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=e)),n=n._next},Jr=function(t,e){return t&&(Le(t)?t:de[t]||Tx(t))||e},es=function(t,e,n,i){n===void 0&&(n=function(l){return 1-e(1-l)}),i===void 0&&(i=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:n,easeInOut:i},o;return xn(t,function(a){de[a]=Bn[a]=s,de[o=a.toLowerCase()]=n;for(var l in s)de[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=de[a+"."+l]=s[l]}),s},cp=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},du=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/_u*(Math.asin(1/i)||0),a=function(h){return h===1?1:i*Math.pow(2,-10*h)*tx((h-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:cp(a);return s=_u/s,l.config=function(c,h){return r(t,c,h)},l},pu=function r(t,e){e===void 0&&(e=1.70158);var n=function(o){return o?--o*o*((e+1)*o+e)+1:0},i=t==="out"?n:t==="in"?function(s){return 1-n(1-s)}:cp(n);return i.config=function(s){return r(t,s)},i};xn("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;es(r+",Power"+(e-1),t?function(n){return Math.pow(n,e)}:function(n){return n},function(n){return 1-Math.pow(1-n,e)},function(n){return n<.5?Math.pow(n*2,e)/2:1-Math.pow((1-n)*2,e)/2})});de.Linear.easeNone=de.none=de.Linear.easeIn;es("Elastic",du("in"),du("out"),du());(function(r,t){var e=1/t,n=2*e,i=2.5*e,s=function(a){return a<e?r*a*a:a<n?r*Math.pow(a-1.5/t,2)+.75:a<i?r*(a-=2.25/t)*a+.9375:r*Math.pow(a-2.625/t,2)+.984375};es("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);es("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});es("Circ",function(r){return-(Ud(1-r*r)-1)});es("Sine",function(r){return r===1?1:-Q_(r*K_)+1});es("Back",pu("in"),pu("out"),pu());de.SteppedEase=de.steps=Bn.SteppedEase={config:function(t,e){t===void 0&&(t=1);var n=1/t,i=t+(e?0:1),s=e?1:0,o=1-Ee;return function(a){return((i*ia(0,o,a)|0)+s)*n}}};Vs.ease=de["quad.out"];xn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Fu+=r+","+r+"Params,"});var Bu=function(t,e){this.id=j_++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Uu,this.set=e?e.getSetter:ml},na=function(){function r(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,Gs(this,+e.duration,1,1),this.data=e.data,Ce&&(this._ctx=Ce,Ce.data.push(this)),ea||Rn.wake()}var t=r.prototype;return t.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},t.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},t.totalDuration=function(n){return arguments.length?(this._dirty=0,Gs(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(Ws(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(pl(this,n),!s._dp||s.parent||qd(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&Ai(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===Ee||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Gd(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+Rd(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},t.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+Rd(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(n,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,i):this._repeat?Hs(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-Ee?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?ll(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Ee?0:this._rts,this.totalTime(ia(-Math.abs(this._delay),this._tDur,s),i!==!1),dl(this),ax(this)},t.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ws(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ee&&(this._tTime-=Ee)))),this):this._ps},t.startTime=function(n){if(arguments.length){this._start=n;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Ai(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Pn(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ll(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=ix);var i=ln;return ln=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),ln=i,this},t.globalTime=function(n){for(var i=this,s=arguments.length?n:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},t.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Pd(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,Pd(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},t.seek=function(n,i){return this.totalTime(Yn(this,n),Pn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Pn(i))},t.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},t.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Ee:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ee,this},t.isActive=function(){var n=this.parent||this._dp,i=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=i&&s<this.endTime(!0)-Ee)},t.eventCallback=function(n,i,s){var o=this.vars;return arguments.length>1?(i?(o[n]=i,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=i)):delete o[n],this):o[n]},t.then=function(n){var i=this;return new Promise(function(s){var o=Le(n)?n:Xd,a=function(){var c=i.then;i.then=null,Le(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},t.kill=function(){Zo(this)},r}();$n(na.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:-Ee,_prom:0,_ps:!1,_rts:1});var en=function(r){Nd(t,r);function t(n,i){var s;return n===void 0&&(n={}),s=r.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Pn(n.sortChildren),Re&&Ai(n.parent||Re,ki(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&Zd(ki(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return Ko(0,arguments,this),this},e.from=function(i,s,o){return Ko(1,arguments,this),this},e.fromTo=function(i,s,o,a){return Ko(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Jo(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Ue(i,s,Yn(this,o),1),this},e.call=function(i,s,o){return Ai(this,Ue.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Ue(i,o,Yn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,h){return o.runBackwards=1,Jo(o).immediateRender=Pn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,h)},e.staggerFromTo=function(i,s,o,a,l,c,h,f){return a.startAt=o,Jo(a).immediateRender=Pn(a.immediateRender),this.staggerTo(i,s,a,l,c,h,f)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=i<=0?0:Je(i),f=this._zTime<0!=i<0&&(this._initted||!c),d,u,_,p,m,g,b,v,S,C,T,w;if(this!==Re&&h>l&&i>=0&&(h=l),h!==this._tTime||o||f){if(a!==this._time&&c&&(h+=this._time-a,i+=this._time-a),d=h,S=this._start,v=this._ts,g=!v,f&&(c||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(T=this._yoyo,m=c+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(m*100+i,s,o);if(d=Je(h%m),h===l?(p=this._repeat,d=c):(p=~~(h/m),p&&p===h/m&&(d=c,p--),d>c&&(d=c)),C=Hs(this._tTime,m),!a&&this._tTime&&C!==p&&this._tTime-C*m-this._dur<=0&&(C=p),T&&p&1&&(d=c-d,w=1),p!==C&&!this._lock){var P=T&&C&1,M=P===(T&&p&1);if(p<C&&(P=!P),a=P?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Je(p*m)),s,!c)._lock=0,this._tTime=h,!s&&this.parent&&On(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,M&&(this._lock=2,a=P?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;lp(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=hx(this,Je(a),Je(d)),b&&(h-=d-(d=b._start))),this._tTime=h,this._time=d,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&d&&!s&&!p&&(On(this,"onStart"),this._tTime!==h))return this;if(d>=a&&i>=0)for(u=this._first;u;){if(_=u._next,(u._act||d>=u._start)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(d-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(d-u._start)*u._ts,s,o),d!==this._time||!this._ts&&!g){b=0,_&&(h+=this._zTime=-Ee);break}}u=_}else{u=this._last;for(var y=i<0?i:d;u;){if(_=u._prev,(u._act||y<=u._end)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(y-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(y-u._start)*u._ts,s,o||ln&&(u._initted||u._startAt)),d!==this._time||!this._ts&&!g){b=0,_&&(h+=this._zTime=y?-Ee:Ee);break}}u=_}}if(b&&!s&&(this.pause(),b.render(d>=a?0:-Ee)._zTime=d>=a?1:-1,this._ts))return this._start=S,dl(this),this.render(i,s,o);this._onUpdate&&!s&&On(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(S===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&mr(this,1),!s&&!(i<0&&!a)&&(h||a||!l)&&(On(this,h===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(Vi(s)||(s=Yn(this,s,i)),!(i instanceof na)){if(cn(i))return i.forEach(function(a){return o.add(a,s)}),this;if(We(i))return this.addLabel(i,s);if(Le(i))i=Ue.delayedCall(0,i);else return this}return this!==i?Ai(this,i,s):this},e.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-qn);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Ue?s&&l.push(c):(o&&l.push(c),i&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},e.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},e.remove=function(i){return We(i)?this.removeLabel(i):Le(i)?this.killTweensOf(i):(fl(this,i),i===this._recent&&(this._recent=this._last),$r(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Je(Rn.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),r.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},e.addLabel=function(i,s){return this.labels[i]=Yn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Ue.delayedCall(0,s||ta,o);return a.data="isPause",this._hasPause=1,Ai(this,a,Yn(this,i))},e.removePause=function(i){var s=this._first;for(i=Yn(this,i);s;)s._start===i&&s.data==="isPause"&&mr(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)fr!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=Zn(i),l=this._first,c=Vi(s),h;l;)l instanceof Ue?rx(l._targets,a)&&(c?(!fr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Yn(o,i),l=s,c=l.startAt,h=l.onStart,f=l.onStartParams,d=l.immediateRender,u,_=Ue.to(o,$n({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||Ee,onStart:function(){if(o.pause(),!u){var m=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==m&&Gs(_,m,0,1).render(_._time,!0,!0),u=1}h&&h.apply(_,f||[])}},s));return d?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,$n({startAt:{time:Yn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),Id(this,Yn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),Id(this,Yn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+Ee)},e.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=i);return $r(this)},e.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return r.prototype.invalidate.call(this,i)},e.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),$r(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=qn,c,h,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(f=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ai(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;Gs(o,o===Re&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(Re._ts&&(Gd(Re,ll(i,Re)),Hd=Rn.frame),Rn.frame>=Cd){Cd+=In.autoSleep||120;var s=Re._first;if((!s||!s._ts)&&In.autoSleep&&Rn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Rn.sleep()}}},t}(na);$n(en.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ax=function(t,e,n,i,s,o,a){var l=new yn(this._pt,t,e,0,1,Gu,null,s),c=0,h=0,f,d,u,_,p,m,g,b;for(l.b=n,l.e=i,n+="",i+="",(g=~i.indexOf("random("))&&(i=Xs(i)),o&&(b=[n,i],o(b,t,e),n=b[0],i=b[1]),d=n.match(uu)||[];f=uu.exec(i);)_=f[0],p=i.substring(c,f.index),u?u=(u+1)%5:p.substr(-5)==="rgba("&&(u=1),_!==d[h++]&&(m=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:p||h===1?p:",",s:m,c:_.charAt(1)==="="?ts(m,_)-m:parseFloat(_)-m,m:u&&u<4?Math.round:0},c=uu.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(Pu.test(i)||g)&&(l.e=0),this._pt=l,l},ku=function(t,e,n,i,s,o,a,l,c,h){Le(i)&&(i=i(s||0,t,o));var f=t[e],d=n!=="get"?n:Le(f)?c?t[e.indexOf("set")||!Le(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():f,u=Le(f)?c?Ix:fp:Hu,_;if(We(i)&&(~i.indexOf("random(")&&(i=Xs(i)),i.charAt(1)==="="&&(_=ts(d,i)+(nn(d)||0),(_||_===0)&&(i=_))),!h||d!==i||Tu)return!isNaN(d*i)&&i!==""?(_=new yn(this._pt,t,e,+d||0,i-(d||0),typeof f=="boolean"?Fx:dp,0,u),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!f&&!(e in t)&&hl(e,i),Ax.call(this,t,e,d,i,u,l||In.stringFilter,c))},Cx=function(t,e,n,i,s){if(Le(t)&&(t=jo(t,s,e,n,i)),!Ci(t)||t.style&&t.nodeType||cn(t)||Od(t))return We(t)?jo(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=jo(t[a],s,e,n,i);return o},zu=function(t,e,n,i,s,o){var a,l,c,h;if(Dn[t]&&(a=new Dn[t]).init(s,a.rawVars?e[t]:Cx(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new yn(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==zs))for(c=n._ptLookup[n._targets.indexOf(s)],h=a._props.length;h--;)c[a._props[h]]=l;return a},fr,Tu,Vu=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,h=i.runBackwards,f=i.yoyoEase,d=i.keyframes,u=i.autoRevert,_=t._dur,p=t._startAt,m=t._targets,g=t.parent,b=g&&g.data==="nested"?g.vars.targets:m,v=t._overwrite==="auto"&&!Cu,S=t.timeline,C,T,w,P,M,y,I,N,D,V,K,W,Z;if(S&&(!d||!s)&&(s="none"),t._ease=Jr(s,Vs.ease),t._yEase=f?ap(Jr(f===!0?s:f,Vs.ease)):0,f&&t._yoyo&&!t._repeat&&(f=t._yEase,t._yEase=t._ease,t._ease=f),t._from=!S&&!!i.runBackwards,!S||d&&!i.stagger){if(N=m[0]?pr(m[0]).harness:0,W=N&&i[N.prop],C=al(i,Lu),p&&(p._zTime<0&&p.progress(1),e<0&&h&&a&&!u?p.render(-1,!0):p.revert(h&&_?nl:nx),p._lazy=0),o){if(mr(t._startAt=Ue.set(m,$n({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!p&&Pn(l),startAt:null,delay:0,onUpdate:c&&function(){return On(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ln||!a&&!u)&&t._startAt.revert(nl),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(h&&_&&!p){if(e&&(a=!1),w=$n({overwrite:!1,data:"isFromStart",lazy:a&&!p&&Pn(l),immediateRender:a,stagger:0,parent:g},C),W&&(w[N.prop]=W),mr(t._startAt=Ue.set(m,w)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ln?t._startAt.revert(nl):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,Ee,Ee);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Pn(l)||l&&!_,T=0;T<m.length;T++){if(M=m[T],I=M._gsap||Nu(m)[T]._gsap,t._ptLookup[T]=V={},vu[I.id]&&dr.length&&ol(),K=b===m?T:b.indexOf(M),N&&(D=new N).init(M,W||C,t,K,b)!==!1&&(t._pt=P=new yn(t._pt,M,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(z){V[z]=P}),D.priority&&(y=1)),!N||W)for(w in C)Dn[w]&&(D=zu(w,C,t,K,M,b))?D.priority&&(y=1):V[w]=P=ku.call(t,M,w,"get",C[w],K,b,0,i.stringFilter);t._op&&t._op[T]&&t.kill(M,t._op[T]),v&&t._pt&&(fr=t,Re.killTweensOf(M,V,t.globalTime(e)),Z=!t.parent,fr=0),t._pt&&l&&(vu[I.id]=1)}y&&Xu(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!Z,d&&e<=0&&S.render(qn,!0,!0)},Dx=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],h,f,d,u;if(!c)for(c=t._ptCache[e]=[],d=t._ptLookup,u=t._targets.length;u--;){if(h=d[u][e],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return Tu=1,t.vars[e]="+=0",Vu(t,a),Tu=0,l?Qo(e+" not eligible for reset"):1;c.push(h)}for(u=c.length;u--;)f=c[u],h=f._pt||f,h.s=(i||i===0)&&!s?i:h.s+(i||0)+o*h.c,h.c=n-h.s,f.e&&(f.e=Fe(n)+nn(f.e)),f.b&&(f.b=h.s+nn(f.b))},Rx=function(t,e){var n=t[0]?pr(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=jr({},e);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},Px=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(cn(e))a=n[t]||(n[t]=[]),e.forEach(function(l,c){return a.push({t:c/(e.length-1)*100,v:l,e:s})});else for(o in e)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},jo=function(t,e,n,i,s){return Le(t)?t.call(e,n,i,s):We(t)&&~t.indexOf("random(")?Xs(t):t},up=Fu+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",hp={};xn(up+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return hp[r]=1});var Ue=function(r){Nd(t,r);function t(n,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=r.call(this,o?i:Jo(i))||this;var l=a.vars,c=l.duration,h=l.delay,f=l.immediateRender,d=l.stagger,u=l.overwrite,_=l.keyframes,p=l.defaults,m=l.scrollTrigger,g=l.yoyoEase,b=i.parent||Re,v=(cn(n)||Od(n)?Vi(n[0]):"length"in i)?[n]:Zn(n),S,C,T,w,P,M,y,I;if(a._targets=v.length?Nu(v):Qo("GSAP target "+n+" not found. https://gsap.com",!In.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=u,_||d||el(c)||el(h)){if(i=a.vars,S=a.timeline=new en({data:"nested",defaults:p||{},targets:b&&b.data==="nested"?b.vars.targets:v}),S.kill(),S.parent=S._dp=ki(a),S._start=0,d||el(c)||el(h)){if(w=v.length,y=d&&jd(d),Ci(d))for(P in d)~up.indexOf(P)&&(I||(I={}),I[P]=d[P]);for(C=0;C<w;C++)T=al(i,hp),T.stagger=0,g&&(T.yoyoEase=g),I&&jr(T,I),M=v[C],T.duration=+jo(c,ki(a),C,M,v),T.delay=(+jo(h,ki(a),C,M,v)||0)-a._delay,!d&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),S.to(M,T,y?y(C,M,v):0),S._ease=de.none;S.duration()?c=h=0:a.timeline=0}else if(_){Jo($n(S.vars.defaults,{ease:"none"})),S._ease=Jr(_.ease||i.ease||"none");var N=0,D,V,K;if(cn(_))_.forEach(function(W){return S.to(v,W,">")}),S.duration();else{T={};for(P in _)P==="ease"||P==="easeEach"||Px(P,_[P],T,_.easeEach);for(P in T)for(D=T[P].sort(function(W,Z){return W.t-Z.t}),N=0,C=0;C<D.length;C++)V=D[C],K={ease:V.e,duration:(V.t-(C?D[C-1].t:0))/100*c},K[P]=V.v,S.to(v,K,N),N+=K.duration;S.duration()<c&&S.to({},{duration:c-S.duration()})}}c||a.duration(c=S.duration())}else a.timeline=0;return u===!0&&!Cu&&(fr=ki(a),Re.killTweensOf(v),fr=0),Ai(b,ki(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(f||!c&&!_&&a._start===Je(b._time)&&Pn(f)&&lx(ki(a))&&b.data!=="nested")&&(a._tTime=-Ee,a.render(Math.max(0,-h)||0)),m&&Zd(ki(a),m),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,h=i<0,f=i>l-Ee&&!h?l:i<Ee?0:i,d,u,_,p,m,g,b,v,S;if(!c)ux(this,i,s,o);else if(f!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(d=f,v=this.timeline,this._repeat){if(p=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(p*100+i,s,o);if(d=Je(f%p),f===l?(_=this._repeat,d=c):(_=~~(f/p),_&&_===Je(f/p)&&(d=c,_--),d>c&&(d=c)),g=this._yoyo&&_&1,g&&(S=this._yEase,d=c-d),m=Hs(this._tTime,p),d===a&&!o&&this._initted&&_===m)return this._tTime=f,this;_!==m&&(v&&this._yEase&&lp(v,g),this.vars.repeatRefresh&&!g&&!this._lock&&this._time!==p&&this._initted&&(this._lock=o=1,this.render(Je(p*_),!0).invalidate()._lock=0))}if(!this._initted){if($d(this,h?i:d,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==m))return this;if(c!==this._dur)return this.render(i,s,o)}if(this._tTime=f,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(S||this._ease)(d/c),this._from&&(this.ratio=b=1-b),d&&!a&&!s&&!_&&(On(this,"onStart"),this._tTime!==f))return this;for(u=this._pt;u;)u.r(b,u.d),u=u._next;v&&v.render(i<0?i:v._dur*v._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(h&&Su(this,i,s,o),On(this,"onUpdate")),this._repeat&&_!==m&&this.vars.onRepeat&&!s&&this.parent&&On(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(h&&!this._onUpdate&&Su(this,i,!0,!0),(i||!c)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&mr(this,1),!s&&!(h&&!a)&&(f||a||g)&&(On(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&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),r.prototype.invalidate.call(this,i)},e.resetTo=function(i,s,o,a,l){ea||Rn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||Vu(this,c),h=this._ease(c/this._dur),Dx(this,i,s,o,a,h,c,l)?this.resetTo(i,s,o,a,1):(pl(this,0),this.parent||Yd(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Zo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,fr&&fr.vars.overwrite!==!0)._first||Zo(this),this.parent&&o!==this.timeline.totalDuration()&&Gs(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?Zn(i):a,c=this._ptLookup,h=this._pt,f,d,u,_,p,m,g;if((!s||s==="all")&&ox(a,l))return s==="all"&&(this._pt=0),Zo(this);for(f=this._op=this._op||[],s!=="all"&&(We(s)&&(p={},xn(s,function(b){return p[b]=1}),s=p),s=Rx(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){d=c[g],s==="all"?(f[g]=s,_=d,u={}):(u=f[g]=f[g]||{},_=s);for(p in _)m=d&&d[p],m&&((!("kill"in m.d)||m.d.kill(p)===!0)&&fl(this,m,"_pt"),delete d[p]),u!=="all"&&(u[p]=1)}return this._initted&&!this._pt&&h&&Zo(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return Ko(1,arguments)},t.delayedCall=function(i,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(i,s,o){return Ko(2,arguments)},t.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(i,s)},t.killTweensOf=function(i,s,o){return Re.killTweensOf(i,s,o)},t}(na);$n(Ue.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});xn("staggerTo,staggerFrom,staggerFromTo",function(r){Ue[r]=function(){var t=new en,e=bu.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var Hu=function(t,e,n){return t[e]=n},fp=function(t,e,n){return t[e](n)},Ix=function(t,e,n,i){return t[e](i.fp,n)},Lx=function(t,e,n){return t.setAttribute(e,n)},ml=function(t,e){return Le(t[e])?fp:ul(t[e])&&t.setAttribute?Lx:Hu},dp=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},Fx=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Gu=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(t===1&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round((n.s+n.c*t)*1e4)/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},Wu=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Nx=function(t,e,n,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(t,e,n),s=o},Ux=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?fl(this,e,"_pt"):e.dep||(n=1),e=i;return!n},Ox=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},Xu=function(t){for(var e=t._pt,n,i,s,o;e;){for(n=e._next,i=s;i&&i.pr>e.pr;)i=i._next;(e._prev=i?i._prev:o)?e._prev._next=e:s=e,(e._next=i)?i._prev=e:o=e,e=n}t._pt=s},yn=function(){function r(e,n,i,s,o,a,l,c,h){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||dp,this.d=l||this,this.set=c||Hu,this.pr=h||0,this._next=e,e&&(e._prev=this)}var t=r.prototype;return t.modifier=function(n,i,s){this.mSet=this.mSet||this.set,this.set=Ox,this.m=n,this.mt=s,this.tween=i},r}();xn(Fu+"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(r){return Lu[r]=1});Bn.TweenMax=Bn.TweenLite=Ue;Bn.TimelineLite=Bn.TimelineMax=en;Re=new en({sortChildren:!1,defaults:Vs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});In.stringFilter=Ou;var Kr=[],rl={},Bx=[],Fd=0,kx=0,mu=function(t){return(rl[t]||Bx).map(function(e){return e()})},Au=function(){var t=Date.now(),e=[];t-Fd>2&&(mu("matchMediaInit"),Kr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=Ti.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),mu("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),Fd=t,mu("matchMedia"))},pp=function(){function r(e,n){this.selector=n&&wu(n),this.data=[],this._r=[],this.isReverted=!1,this.id=kx++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Le(n)&&(s=i,i=n,n=Le);var o=this,a=function(){var c=Ce,h=o.selector,f;return c&&c!==o&&c.data.push(o),s&&(o.selector=wu(s)),Ce=o,f=i.apply(o,arguments),Le(f)&&o._r.push(f),Ce=c,o.selector=h,o.isReverted=!1,f};return o.last=a,n===Le?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Ce;Ce=null,n(this),Ce=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Ue&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(n,i){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,f){return f.g-h.g||-1/0}).forEach(function(h){return h.t.revert(n)}),l=s.data.length;l--;)c=s.data[l],c instanceof en?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Ue)&&c.revert&&c.revert(n);s._r.forEach(function(h){return h(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=Kr.length;o--;)Kr[o].id===this.id&&Kr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),zx=function(){function r(e){this.contexts=[],this.scope=e,Ce&&Ce.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){Ci(n)||(n={matches:n});var o=new pp(0,s||this.scope),a=o.conditions={},l,c,h;Ce&&!o.selector&&(o.selector=Ce.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?h=1:(l=Ti.matchMedia(n[c]),l&&(Kr.indexOf(o)<0&&Kr.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(Au):l.addEventListener("change",Au)));return h&&i(o,function(f){return o.add(null,f)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),cl={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(i){return rp(i)})},timeline:function(t){return new en(t)},getTweensOf:function(t,e){return Re.getTweensOf(t,e)},getProperty:function(t,e,n,i){We(t)&&(t=Zn(t)[0]);var s=pr(t||{}).get,o=n?Xd:Wd;return n==="native"&&(n=""),t&&(e?o((Dn[e]&&Dn[e].get||s)(t,e,n,i)):function(a,l,c){return o((Dn[a]&&Dn[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=Zn(t),t.length>1){var i=t.map(function(h){return un.quickSetter(h,e,n)}),s=i.length;return function(h){for(var f=s;f--;)i[f](h)}}t=t[0]||{};var o=Dn[e],a=pr(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(h){var f=new o;zs._pt=0,f.init(t,n?h+n:h,zs,0,[t]),f.render(1,f),zs._pt&&Wu(1,zs)}:a.set(t,l);return o?c:function(h){return c(t,l,n?h+n:h,a,1)}},quickTo:function(t,e,n){var i,s=un.to(t,jr((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,h){return s.resetTo(e,l,c,h)};return o.tween=s,o},isTweening:function(t){return Re.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Jr(t.ease,Vs.ease)),Dd(Vs,t||{})},config:function(t){return Dd(In,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,s=t.defaults,o=t.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!Dn[a]&&!Bn[a]&&Qo(e+" effect requires "+a+" plugin.")}),hu[e]=function(a,l,c){return n(Zn(a),$n(l||{},s),c)},o&&(en.prototype[e]=function(a,l,c){return this.add(hu[e](a,Ci(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){de[t]=Jr(e)},parseEase:function(t,e){return arguments.length?Jr(t,e):de},getById:function(t){return Re.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new en(t),i,s;for(n.smoothChildTiming=Pn(t.smoothChildTiming),Re.remove(n),n._dp=0,n._time=n._tTime=Re._time,i=Re._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Ue&&i.vars.onComplete===i._targets[0]))&&Ai(n,i,i._start-i._delay),i=s;return Ai(Re,n,0),n},context:function(t,e){return t?new pp(t,e):Ce},matchMedia:function(t){return new zx(t)},matchMediaRefresh:function(){return Kr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||Au()},addEventListener:function(t,e){var n=rl[t]||(rl[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=rl[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:xx,wrapYoyo:yx,distribute:jd,random:tp,snap:Qd,normalize:_x,getUnit:nn,clamp:dx,splitColor:sp,toArray:Zn,selector:wu,mapRange:np,pipe:mx,unitize:gx,interpolate:vx,shuffle:Kd},install:zd,effects:hu,ticker:Rn,updateRoot:en.updateRoot,plugins:Dn,globalTimeline:Re,core:{PropTween:yn,globals:Vd,Tween:Ue,Timeline:en,Animation:na,getCache:pr,_removeLinkedListItem:fl,reverting:function(){return ln},context:function(t){return t&&Ce&&(Ce.data.push(t),t._ctx=Ce),Ce},suppressOverwrites:function(t){return Cu=t}}};xn("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return cl[r]=Ue[r]});Rn.add(en.updateRoot);zs=cl.to({},{duration:0});var Vx=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Hx=function(t,e){var n=t._targets,i,s,o;for(i in e)for(s=n.length;s--;)o=t._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=Vx(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},gu=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(We(s)&&(l={},xn(s,function(h){return l[h]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}Hx(a,s)}}}},un=cl.registerPlugin({name:"attr",init:function(t,e,n,i,s){var o,a,l;this.tween=n;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)ln?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},gu("roundProps",Eu),gu("modifiers"),gu("snap",Qd))||cl;Ue.version=en.version=un.version="3.12.5";kd=1;Du()&&Ws();var Gx=de.Power0,Wx=de.Power1,Xx=de.Power2,Yx=de.Power3,qx=de.Power4,Zx=de.Linear,$x=de.Quad,Jx=de.Cubic,Kx=de.Quart,jx=de.Quint,Qx=de.Strong,ty=de.Elastic,ey=de.Back,ny=de.SteppedEase,iy=de.Bounce,ry=de.Sine,sy=de.Expo,oy=de.Circ;var mp,_r,qs,ju,ss,ay,gp,Qu,ly=function(){return typeof window<"u"},Gi={},rs=180/Math.PI,Zs=Math.PI/180,Ys=Math.atan2,_p=1e8,th=/([A-Z])/g,cy=/(left|right|width|margin|padding|x)/i,uy=/[\s,\(]\S/,Di={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Zu=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},hy=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)},fy=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)},dy=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},wp=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Ep=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},py=function(t,e,n){return t.style[e]=n},my=function(t,e,n){return t.style.setProperty(e,n)},gy=function(t,e,n){return t._gsap[e]=n},_y=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},xy=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},yy=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Pe="transform",Ln=Pe+"Origin",vy=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in Gi&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Di[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=Hi(i,a)}):this.tfm[t]=o.x?o[t]:Hi(i,t),t===Ln&&(this.tfm.zOrigin=o.zOrigin);else return Di.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Pe)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ln,e,"")),t=Pe}(s||e)&&this.props.push(t,e,s[t])},Tp=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Sy=function(){var t=this.props,e=this.target,n=e.style,i=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?n[t[s]]=t[s+2]:n.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(th,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=Qu(),(!s||!s.isStart)&&!n[Pe]&&(Tp(n),i.zOrigin&&n[Ln]&&(n[Ln]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},Ap=function(t,e){var n={target:t,props:[],revert:Sy,save:vy};return t._gsap||un.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},Cp,$u=function(t,e){var n=_r.createElementNS?_r.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):_r.createElement(t);return n&&n.style?n:_r.createElement(t)},Ri=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(th,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,$s(e)||e,1)||""},xp="O,Moz,ms,Ms,Webkit".split(","),$s=function(t,e,n){var i=e||ss,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(xp[o]+t in s););return o<0?null:(o===3?"ms":o>=0?xp[o]:"")+t},Ju=function(){ly()&&window.document&&(mp=window,_r=mp.document,qs=_r.documentElement,ss=$u("div")||{style:{}},ay=$u("div"),Pe=$s(Pe),Ln=Pe+"Origin",ss.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Cp=!!$s("perspective"),Qu=un.core.reverting,ju=1)},Yu=function r(t){var e=$u("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,i=this.nextSibling,s=this.style.cssText,o;if(qs.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(i?n.insertBefore(this,i):n.appendChild(this)),qs.removeChild(e),this.style.cssText=s,o},yp=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},Dp=function(t){var e;try{e=t.getBBox()}catch{e=Yu.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Yu||(e=Yu.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+yp(t,["x","cx","x1"])||0,y:+yp(t,["y","cy","y1"])||0,width:0,height:0}:e},Rp=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&Dp(t))},os=function(t,e){if(e){var n=t.style,i;e in Gi&&e!==Ln&&(e=Pe),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(th,"-$1").toLowerCase())):n.removeAttribute(e)}},xr=function(t,e,n,i,s,o){var a=new yn(t._pt,e,n,0,1,o?Ep:wp);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},vp={deg:1,rad:1,turn:1},My={grid:1,flex:1},yr=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=ss.style,l=cy.test(e),c=t.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),f=100,d=i==="px",u=i==="%",_,p,m,g;if(i===o||!s||vp[i]||vp[o])return s;if(o!=="px"&&!d&&(s=r(t,e,n,"px")),g=t.getCTM&&Rp(t),(u||o==="%")&&(Gi[e]||~e.indexOf("adius")))return _=g?t.getBBox()[l?"width":"height"]:t[h],Fe(u?s/_*f:s/100*_);if(a[l?"width":"height"]=f+(d?o:i),p=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,g&&(p=(t.ownerSVGElement||{}).parentNode),(!p||p===_r||!p.appendChild)&&(p=_r.body),m=p._gsap,m&&u&&m.width&&l&&m.time===Rn.time&&!m.uncache)return Fe(s/m.width*f);if(u&&(e==="height"||e==="width")){var b=t.style[e];t.style[e]=f+i,_=t[h],b?t.style[e]=b:os(t,e)}else(u||o==="%")&&!My[Ri(p,"display")]&&(a.position=Ri(t,"position")),p===t&&(a.position="static"),p.appendChild(ss),_=ss[h],p.removeChild(ss),a.position="absolute";return l&&u&&(m=pr(p),m.time=Rn.time,m.width=p[h]),Fe(d?_*s/f:_&&s?f/_*s:0)},Hi=function(t,e,n,i){var s;return ju||Ju(),e in Di&&e!=="transform"&&(e=Di[e],~e.indexOf(",")&&(e=e.split(",")[0])),Gi[e]&&e!=="transform"?(s=oa(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:_l(Ri(t,Ln))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=gl[e]&&gl[e](t,e,n)||Ri(t,e)||Uu(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?yr(t,e,s,n)+n:s},by=function(t,e,n,i){if(!n||n==="none"){var s=$s(e,t,1),o=s&&Ri(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=Ri(t,"borderTopColor"))}var a=new yn(this._pt,t.style,e,0,1,Gu),l=0,c=0,h,f,d,u,_,p,m,g,b,v,S,C;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(p=t.style[e],t.style[e]=i,i=Ri(t,e)||i,p?t.style[e]=p:os(t,e)),h=[n,i],Ou(h),n=h[0],i=h[1],d=n.match(Qr)||[],C=i.match(Qr)||[],C.length){for(;f=Qr.exec(i);)m=f[0],b=i.substring(l,f.index),_?_=(_+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(_=1),m!==(p=d[c++]||"")&&(u=parseFloat(p)||0,S=p.substr((u+"").length),m.charAt(1)==="="&&(m=ts(u,m)+S),g=parseFloat(m),v=m.substr((g+"").length),l=Qr.lastIndex-v.length,v||(v=v||In.units[e]||S,l===i.length&&(i+=v,a.e+=v)),S!==v&&(u=yr(t,e,p,v)||0),a._pt={_next:a._pt,p:b||c===1?b:",",s:u,c:g-u,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?Ep:wp;return Pu.test(i)&&(a.e=0),this._pt=a,a},Sp={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},wy=function(t){var e=t.split(" "),n=e[0],i=e[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(t=n,n=i,i=t),e[0]=Sp[n]||n,e[1]=Sp[i]||i,e.join(" ")},Ey=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n=e.t,i=n.style,s=e.u,o=n._gsap,a,l,c;if(s==="all"||s===!0)i.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],Gi[a]&&(l=1,a=a==="transformOrigin"?Ln:Pe),os(n,a);l&&(os(n,Pe),o&&(o.svg&&n.removeAttribute("transform"),oa(n,1),o.uncache=1,Tp(i)))}},gl={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new yn(t._pt,e,n,0,0,Ey);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},sa=[1,0,0,1,0,0],Pp={},Ip=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Mp=function(t){var e=Ri(t,Pe);return Ip(e)?sa:e.substr(7).match(Ru).map(Fe)},eh=function(t,e){var n=t._gsap||pr(t),i=t.style,s=Mp(t),o,a,l,c;return n.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?sa:s):(s===sa&&!t.offsetParent&&t!==qs&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,qs.appendChild(t)),s=Mp(t),l?i.display=l:os(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):qs.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Ku=function(t,e,n,i,s,o){var a=t._gsap,l=s||eh(t,!0),c=a.xOrigin||0,h=a.yOrigin||0,f=a.xOffset||0,d=a.yOffset||0,u=l[0],_=l[1],p=l[2],m=l[3],g=l[4],b=l[5],v=e.split(" "),S=parseFloat(v[0])||0,C=parseFloat(v[1])||0,T,w,P,M;n?l!==sa&&(w=u*m-_*p)&&(P=S*(m/w)+C*(-p/w)+(p*b-m*g)/w,M=S*(-_/w)+C*(u/w)-(u*b-_*g)/w,S=P,C=M):(T=Dp(t),S=T.x+(~v[0].indexOf("%")?S/100*T.width:S),C=T.y+(~(v[1]||v[0]).indexOf("%")?C/100*T.height:C)),i||i!==!1&&a.smooth?(g=S-c,b=C-h,a.xOffset=f+(g*u+b*p)-g,a.yOffset=d+(g*_+b*m)-b):a.xOffset=a.yOffset=0,a.xOrigin=S,a.yOrigin=C,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[Ln]="0px 0px",o&&(xr(o,a,"xOrigin",c,S),xr(o,a,"yOrigin",h,C),xr(o,a,"xOffset",f,a.xOffset),xr(o,a,"yOffset",d,a.yOffset)),t.setAttribute("data-svg-origin",S+" "+C)},oa=function(t,e){var n=t._gsap||new Bu(t);if("x"in n&&!e&&!n.uncache)return n;var i=t.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(t),c=Ri(t,Ln)||"0",h,f,d,u,_,p,m,g,b,v,S,C,T,w,P,M,y,I,N,D,V,K,W,Z,z,U,R,lt,xt,Bt,X,at;return h=f=d=p=m=g=b=v=S=0,u=_=1,n.svg=!!(t.getCTM&&Rp(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Pe]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Pe]!=="none"?l[Pe]:"")),i.scale=i.rotate=i.translate="none"),w=eh(t,n.svg),n.svg&&(n.uncache?(z=t.getBBox(),c=n.xOrigin-z.x+"px "+(n.yOrigin-z.y)+"px",Z=""):Z=!e&&t.getAttribute("data-svg-origin"),Ku(t,Z||c,!!Z||n.originIsAbsolute,n.smooth!==!1,w)),C=n.xOrigin||0,T=n.yOrigin||0,w!==sa&&(I=w[0],N=w[1],D=w[2],V=w[3],h=K=w[4],f=W=w[5],w.length===6?(u=Math.sqrt(I*I+N*N),_=Math.sqrt(V*V+D*D),p=I||N?Ys(N,I)*rs:0,b=D||V?Ys(D,V)*rs+p:0,b&&(_*=Math.abs(Math.cos(b*Zs))),n.svg&&(h-=C-(C*I+T*D),f-=T-(C*N+T*V))):(at=w[6],Bt=w[7],R=w[8],lt=w[9],xt=w[10],X=w[11],h=w[12],f=w[13],d=w[14],P=Ys(at,xt),m=P*rs,P&&(M=Math.cos(-P),y=Math.sin(-P),Z=K*M+R*y,z=W*M+lt*y,U=at*M+xt*y,R=K*-y+R*M,lt=W*-y+lt*M,xt=at*-y+xt*M,X=Bt*-y+X*M,K=Z,W=z,at=U),P=Ys(-D,xt),g=P*rs,P&&(M=Math.cos(-P),y=Math.sin(-P),Z=I*M-R*y,z=N*M-lt*y,U=D*M-xt*y,X=V*y+X*M,I=Z,N=z,D=U),P=Ys(N,I),p=P*rs,P&&(M=Math.cos(P),y=Math.sin(P),Z=I*M+N*y,z=K*M+W*y,N=N*M-I*y,W=W*M-K*y,I=Z,K=z),m&&Math.abs(m)+Math.abs(p)>359.9&&(m=p=0,g=180-g),u=Fe(Math.sqrt(I*I+N*N+D*D)),_=Fe(Math.sqrt(W*W+at*at)),P=Ys(K,W),b=Math.abs(P)>2e-4?P*rs:0,S=X?1/(X<0?-X:X):0),n.svg&&(Z=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Ip(Ri(t,Pe)),Z&&t.setAttribute("transform",Z))),Math.abs(b)>90&&Math.abs(b)<270&&(s?(u*=-1,b+=p<=0?180:-180,p+=p<=0?180:-180):(_*=-1,b+=b<=0?180:-180)),e=e||n.uncache,n.x=h-((n.xPercent=h&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-h)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=f-((n.yPercent=f&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=d+o,n.scaleX=Fe(u),n.scaleY=Fe(_),n.rotation=Fe(p)+a,n.rotationX=Fe(m)+a,n.rotationY=Fe(g)+a,n.skewX=b+a,n.skewY=v+a,n.transformPerspective=S+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[Ln]=_l(c)),n.xOffset=n.yOffset=0,n.force3D=In.force3D,n.renderTransform=n.svg?Ay:Cp?Lp:Ty,n.uncache=0,n},_l=function(t){return(t=t.split(" "))[0]+" "+t[1]},qu=function(t,e,n){var i=nn(e);return Fe(parseFloat(e)+parseFloat(yr(t,"x",n+"px",i)))+i},Ty=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Lp(t,e)},ns="0deg",ra="0px",is=") ",Lp=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,c=n.rotation,h=n.rotationY,f=n.rotationX,d=n.skewX,u=n.skewY,_=n.scaleX,p=n.scaleY,m=n.transformPerspective,g=n.force3D,b=n.target,v=n.zOrigin,S="",C=g==="auto"&&t&&t!==1||g===!0;if(v&&(f!==ns||h!==ns)){var T=parseFloat(h)*Zs,w=Math.sin(T),P=Math.cos(T),M;T=parseFloat(f)*Zs,M=Math.cos(T),o=qu(b,o,w*M*-v),a=qu(b,a,-Math.sin(T)*-v),l=qu(b,l,P*M*-v+v)}m!==ra&&(S+="perspective("+m+is),(i||s)&&(S+="translate("+i+"%, "+s+"%) "),(C||o!==ra||a!==ra||l!==ra)&&(S+=l!==ra||C?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+is),c!==ns&&(S+="rotate("+c+is),h!==ns&&(S+="rotateY("+h+is),f!==ns&&(S+="rotateX("+f+is),(d!==ns||u!==ns)&&(S+="skew("+d+", "+u+is),(_!==1||p!==1)&&(S+="scale("+_+", "+p+is),b.style[Pe]=S||"translate(0, 0)"},Ay=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,c=n.skewX,h=n.skewY,f=n.scaleX,d=n.scaleY,u=n.target,_=n.xOrigin,p=n.yOrigin,m=n.xOffset,g=n.yOffset,b=n.forceCSS,v=parseFloat(o),S=parseFloat(a),C,T,w,P,M;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Zs,c*=Zs,C=Math.cos(l)*f,T=Math.sin(l)*f,w=Math.sin(l-c)*-d,P=Math.cos(l-c)*d,c&&(h*=Zs,M=Math.tan(c-h),M=Math.sqrt(1+M*M),w*=M,P*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),C*=M,T*=M)),C=Fe(C),T=Fe(T),w=Fe(w),P=Fe(P)):(C=f,P=d,T=w=0),(v&&!~(o+"").indexOf("px")||S&&!~(a+"").indexOf("px"))&&(v=yr(u,"x",o,"px"),S=yr(u,"y",a,"px")),(_||p||m||g)&&(v=Fe(v+_-(_*C+p*w)+m),S=Fe(S+p-(_*T+p*P)+g)),(i||s)&&(M=u.getBBox(),v=Fe(v+i/100*M.width),S=Fe(S+s/100*M.height)),M="matrix("+C+","+T+","+w+","+P+","+v+","+S+")",u.setAttribute("transform",M),b&&(u.style[Pe]=M)},Cy=function(t,e,n,i,s){var o=360,a=We(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?rs:1),c=l-i,h=i+c+"deg",f,d;return a&&(f=s.split("_")[1],f==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),f==="cw"&&c<0?c=(c+o*_p)%o-~~(c/o)*o:f==="ccw"&&c>0&&(c=(c-o*_p)%o-~~(c/o)*o)),t._pt=d=new yn(t._pt,e,n,i,c,hy),d.e=h,d.u="deg",t._props.push(n),d},bp=function(t,e){for(var n in e)t[n]=e[n];return t},Dy=function(t,e,n){var i=bp({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,h,f,d,u,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Pe]=e,a=oa(n,1),os(n,Pe),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Pe],o[Pe]=e,a=oa(n,1),o[Pe]=c);for(l in Gi)c=i[l],h=a[l],c!==h&&s.indexOf(l)<0&&(u=nn(c),_=nn(h),f=u!==_?yr(n,l,c,_):parseFloat(c),d=parseFloat(h),t._pt=new yn(t._pt,a,l,f,d-f,Zu),t._pt.u=_||0,t._props.push(l));bp(a,i)};xn("padding,margin,Width,Radius",function(r,t){var e="Top",n="Right",i="Bottom",s="Left",o=(t<3?[e,n,i,s]:[e+s,e+n,i+n,i+s]).map(function(a){return t<2?r+a:"border"+a+r});gl[t>1?"border"+r:r]=function(a,l,c,h,f){var d,u;if(arguments.length<4)return d=o.map(function(_){return Hi(a,_,c)}),u=d.join(" "),u.split(d[0]).length===5?d[0]:u;d=(h+"").split(" "),u={},o.forEach(function(_,p){return u[_]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(l,u,f)}});var nh={name:"css",register:Ju,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,s){var o=this._props,a=t.style,l=n.vars.startAt,c,h,f,d,u,_,p,m,g,b,v,S,C,T,w,P;ju||Ju(),this.styles=this.styles||Ap(t),P=this.styles.props,this.tween=n;for(p in e)if(p!=="autoRound"&&(h=e[p],!(Dn[p]&&zu(p,e,n,i,t,s)))){if(u=typeof h,_=gl[p],u==="function"&&(h=h.call(n,i,t,s),u=typeof h),u==="string"&&~h.indexOf("random(")&&(h=Xs(h)),_)_(this,t,p,h,n)&&(w=1);else if(p.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(p)+"").trim(),h+="",zi.lastIndex=0,zi.test(c)||(m=nn(c),g=nn(h)),g?m!==g&&(c=yr(t,p,c,g)+g):m&&(h+=m),this.add(a,"setProperty",c,h,i,s,0,0,p),o.push(p),P.push(p,0,a[p]);else if(u!=="undefined"){if(l&&p in l?(c=typeof l[p]=="function"?l[p].call(n,i,t,s):l[p],We(c)&&~c.indexOf("random(")&&(c=Xs(c)),nn(c+"")||c==="auto"||(c+=In.units[p]||nn(Hi(t,p))||""),(c+"").charAt(1)==="="&&(c=Hi(t,p))):c=Hi(t,p),d=parseFloat(c),b=u==="string"&&h.charAt(1)==="="&&h.substr(0,2),b&&(h=h.substr(2)),f=parseFloat(h),p in Di&&(p==="autoAlpha"&&(d===1&&Hi(t,"visibility")==="hidden"&&f&&(d=0),P.push("visibility",0,a.visibility),xr(this,a,"visibility",d?"inherit":"hidden",f?"inherit":"hidden",!f)),p!=="scale"&&p!=="transform"&&(p=Di[p],~p.indexOf(",")&&(p=p.split(",")[0]))),v=p in Gi,v){if(this.styles.save(p),S||(C=t._gsap,C.renderTransform&&!e.parseTransform||oa(t,e.parseTransform),T=e.smoothOrigin!==!1&&C.smooth,S=this._pt=new yn(this._pt,a,Pe,0,1,C.renderTransform,C,0,-1),S.dep=1),p==="scale")this._pt=new yn(this._pt,C,"scaleY",C.scaleY,(b?ts(C.scaleY,b+f):f)-C.scaleY||0,Zu),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){P.push(Ln,0,a[Ln]),h=wy(h),C.svg?Ku(t,h,0,T,0,this):(g=parseFloat(h.split(" ")[2])||0,g!==C.zOrigin&&xr(this,C,"zOrigin",C.zOrigin,g),xr(this,a,p,_l(c),_l(h)));continue}else if(p==="svgOrigin"){Ku(t,h,1,T,0,this);continue}else if(p in Pp){Cy(this,C,p,d,b?ts(d,b+h):h);continue}else if(p==="smoothOrigin"){xr(this,C,"smooth",C.smooth,h);continue}else if(p==="force3D"){C[p]=h;continue}else if(p==="transform"){Dy(this,h,t);continue}}else p in a||(p=$s(p)||p);if(v||(f||f===0)&&(d||d===0)&&!uy.test(h)&&p in a)m=(c+"").substr((d+"").length),f||(f=0),g=nn(h)||(p in In.units?In.units[p]:m),m!==g&&(d=yr(t,p,c,g)),this._pt=new yn(this._pt,v?C:a,p,d,(b?ts(d,b+f):f)-d,!v&&(g==="px"||p==="zIndex")&&e.autoRound!==!1?dy:Zu),this._pt.u=g||0,m!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=fy);else if(p in a)by.call(this,t,p,c,b?b+h:h);else if(p in t)this.add(t,p,c||t[p],b?b+h:h,i,s);else if(p!=="parseTransform"){hl(p,h);continue}v||(p in a?P.push(p,0,a[p]):P.push(p,1,c||t[p])),o.push(p)}}w&&Xu(this)},render:function(t,e){if(e.tween._time||!Qu())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Hi,aliases:Di,getSetter:function(t,e,n){var i=Di[e];return i&&i.indexOf(",")<0&&(e=i),e in Gi&&e!==Ln&&(t._gsap.x||Hi(t,"x"))?n&&gp===n?e==="scale"?_y:gy:(gp=n||{})&&(e==="scale"?xy:yy):t.style&&!ul(t.style[e])?py:~e.indexOf("-")?my:ml(t,e)},core:{_removeProperty:os,_getMatrix:eh}};un.utils.checkPrefix=$s;un.core.getStyleSaver=Ap;(function(r,t,e,n){var i=xn(r+","+t+","+e,function(s){Gi[s]=1});xn(t,function(s){In.units[s]="deg",Pp[s]=1}),Di[i[13]]=r+","+t,xn(n,function(s){var o=s.split(":");Di[o[1]]=i[o[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");xn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){In.units[r]="px"});un.registerPlugin(nh);var Et=un.registerPlugin(nh)||un,IT=Et.core.Tween;function Fp(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Ry(r,t,e){return t&&Fp(r.prototype,t),e&&Fp(r,e),r}var ve,xl,rn,ls,Js,ci,Py,as,Np,se,Pi,yl,Up,Op,Bp,kp,zp=function(){return typeof window<"u"},Vp=function(){return ve||zp()&&(ve=window.gsap)&&ve.registerPlugin&&ve};var Iy=function(t){return Math.round(t*1e5)/1e5||0},vr=function(t){return se.maxScroll(t||rn)},Ly=function(t,e){var n=t.parentNode||Js,i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),o=s.top-i.top,a=s.bottom-i.bottom,l=(Math.abs(o)>Math.abs(a)?o:a)/(1-e),c=-l*e,h,f;return l>0&&(h=s.height/(rn.innerHeight+s.height),f=h===.5?s.height*2:Math.min(s.height,Math.abs(-l*h/(2*h-1)))*2*(e||1),c+=e?-f*e:-f/2,l+=f),{change:l,offset:c}},Fy=function(t){var e=ls.querySelector(".ScrollSmoother-wrapper");return e||(e=ls.createElement("div"),e.classList.add("ScrollSmoother-wrapper"),t.parentNode.insertBefore(e,t),e.appendChild(t)),e},ui=function(){function r(t){var e=this;xl||r.register(ve)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},Pi&&Pi.kill(),Pi=this,Bp(this);var n=t,i=n.smoothTouch,s=n.onUpdate,o=n.onStop,a=n.smooth,l=n.onFocusIn,c=n.normalizeScroll,h=n.wholePixels,f,d,u,_,p,m,g,b,v,S,C,T,w,P,M=this,y=t.effectsPrefix||"",I=se.getScrollFunc(rn),N=se.isTouch===1?i===!0?.8:parseFloat(i)||0:a===0||a===!1?0:parseFloat(a)||.8,D=N&&+t.speed||1,V=0,K=0,W=1,Z=Up(0),z=function(){return Z.update(-V)},U={y:0},R=function(){return f.style.overflow="visible"},lt,xt=function(x){x.update();var F=x.getTween();F&&(F.pause(),F._time=F._dur,F._tTime=F._tDur),lt=!1,x.animation.progress(x.progress,!0)},Bt=function(x,F){(x!==V&&!S||F)&&(h&&(x=Math.round(x)),N&&(f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+x+", 0, 1)",f._gsap.y=x+"px"),K=x-V,V=x,se.isUpdating||r.isRefreshing||se.update())},X=function(x){return arguments.length?(x<0&&(x=0),U.y=-x,lt=!0,S?V=-x:Bt(-x),se.isRefreshing?_.update():I(x/D),this):-V},at=typeof ResizeObserver<"u"&&t.autoResize!==!1&&new ResizeObserver(function(){if(!se.isRefreshing){var A=vr(d)*D;A<-V&&X(A),kp.restart(!0)}}),yt,ut=function(x){d.scrollTop=0,!(x.target.contains&&x.target.contains(d)||l&&l(e,x)===!1)&&(se.isInViewport(x.target)||x.target===yt||e.scrollTo(x.target,!1,"center center"),yt=x.target)},It=function(x,F){if(x<F.start)return x;var Y=isNaN(F.ratio)?1:F.ratio,et=F.end-F.start,rt=x-F.start,St=F.offset||0,mt=F.pins||[],ct=mt.offset||0,Nt=F._startClamp&&F.start<=0||F.pins&&F.pins.offset?0:F._endClamp&&F.end===vr()?1:.5;return mt.forEach(function(ft){et-=ft.distance,ft.nativeStart<=x&&(rt-=ft.distance)}),ct&&(rt*=(et-ct/Y)/et),x+(rt-St*Nt)/Y-rt},Ht=function A(x,F,Y){Y||(x.pins.length=x.pins.offset=0);var et=x.pins,rt=x.markers,St,mt,ct,Nt,ft,vt,$t,ht;for($t=0;$t<F.length;$t++)if(ht=F[$t],x.trigger&&ht.trigger&&x!==ht&&(ht.trigger===x.trigger||ht.pinnedContainer===x.trigger||x.trigger.contains(ht.trigger))&&(ft=ht._startNative||ht._startClamp||ht.start,vt=ht._endNative||ht._endClamp||ht.end,ct=It(ft,x),Nt=ht.pin&&vt>0?ct+(vt-ft):It(vt,x),ht.setPositions(ct,Nt,!0,(ht._startClamp?Math.max(0,ct):ct)-ft),ht.markerStart&&rt.push(ve.quickSetter([ht.markerStart,ht.markerEnd],"y","px")),ht.pin&&ht.end>0&&!Y)){if(St=ht.end-ht.start,mt=x._startClamp&&ht.start<0,mt){if(x.start>0){x.setPositions(0,x.end+(x._startNative-x.start),!0),A(x,F);return}St+=ht.start,et.offset=-ht.start}et.push({start:ht.start,nativeStart:ft,end:ht.end,distance:St,trig:ht}),x.setPositions(x.start,x.end+(mt?-ht.start:St),!0)}},q=function(x,F){p.forEach(function(Y){return Ht(Y,x,F)})},jt=function(){R(),requestAnimationFrame(R),p&&(se.getAll().forEach(function(x){x._startNative=x.start,x._endNative=x.end}),p.forEach(function(x){var F=x._startClamp||x.start,Y=x.autoSpeed?Math.min(vr(),x.end):F+Math.abs((x.end-F)/x.ratio),et=Y-x.end;if(F-=et/2,Y-=et/2,F>Y){var rt=F;F=Y,Y=rt}x._startClamp&&F<0?(Y=x.ratio<0?vr():x.end/x.ratio,et=Y-x.end,F=0):(x.ratio<0||x._endClamp&&Y>=vr())&&(Y=vr(),F=x.ratio<0||x.ratio>1?0:Y-(Y-x.start)/x.ratio,et=(Y-F)*x.ratio-(x.end-x.start)),x.offset=et||1e-4,x.pins.length=x.pins.offset=0,x.setPositions(F,Y,!0)}),q(se.sort())),Z.reset()},Ft=function(){return se.addEventListener("refresh",jt)},Ut=function(){return p&&p.forEach(function(x){return x.vars.onRefresh(x)})},wt=function(){return p&&p.forEach(function(x){return x.vars.onRefreshInit(x)}),Ut},At=function(x,F,Y,et){return function(){var rt=typeof F=="function"?F(Y,et):F;rt||rt===0||(rt=et.getAttribute("data-"+y+x)||(x==="speed"?1:0)),et.setAttribute("data-"+y+x,rt);var St=(rt+"").substr(0,6)==="clamp(";return{clamp:St,value:St?rt.substr(6,rt.length-7):rt}}},Xt=function(x,F,Y,et,rt){rt=(typeof rt=="function"?rt(et,x):rt)||0;var St=At("speed",F,et,x),mt=At("lag",Y,et,x),ct=ve.getProperty(x,"y"),Nt=x._gsap,ft,vt,$t,ht,Ct,qt,Jt=[],he=function(){F=St(),Y=parseFloat(mt().value),ft=parseFloat(F.value)||1,$t=F.value==="auto",Ct=$t||vt&&vt._startClamp&&vt.start<=0||Jt.offset?0:vt&&vt._endClamp&&vt.end===vr()?1:.5,ht&&ht.kill(),ht=Y&&ve.to(x,{ease:yl,overwrite:!1,y:"+=0",duration:Y}),vt&&(vt.ratio=ft,vt.autoSpeed=$t)},Kt=function(){Nt.y=ct+"px",Nt.renderTransform(1),he()},k=[],tt=0,ot=function(_t){if($t){Kt();var zt=Ly(x,Np(0,1,-_t.start/(_t.end-_t.start)));tt=zt.change,qt=zt.offset}else qt=Jt.offset||0,tt=(_t.end-_t.start-qt)*(1-ft);Jt.forEach(function(ie){return tt-=ie.distance*(1-ft)}),_t.offset=tt||.001,_t.vars.onUpdate(_t),ht&&ht.progress(1)};return he(),(ft!==1||$t||ht)&&(vt=se.create({trigger:$t?x.parentNode:x,start:function(){return F.clamp?"clamp(top bottom+="+rt+")":"top bottom+="+rt},end:function(){return F.value<0?"max":F.clamp?"clamp(bottom top-="+rt+")":"bottom top-="+rt},scroller:d,scrub:!0,refreshPriority:-999,onRefreshInit:Kt,onRefresh:ot,onKill:function(_t){var zt=p.indexOf(_t);zt>=0&&p.splice(zt,1),Kt()},onUpdate:function(_t){var zt=ct+tt*(_t.progress-Ct),ie=Jt.length,bt=0,L,st,O;if(_t.offset){if(ie){for(st=-V,O=_t.end;ie--;){if(L=Jt[ie],L.trig.isActive||st>=L.start&&st<=L.end){ht&&(L.trig.progress+=L.trig.direction<0?.001:-.001,L.trig.update(0,0,1),ht.resetTo("y",parseFloat(Nt.y),-K,!0),W&&ht.progress(1));return}st>L.end&&(bt+=L.distance),O-=L.distance}zt=ct+bt+tt*((ve.utils.clamp(_t.start,_t.end,st)-_t.start-bt)/(O-_t.start)-Ct)}k.length&&!$t&&k.forEach(function(Q){return Q(zt-bt)}),zt=Iy(zt+qt),ht?(ht.resetTo("y",zt,-K,!0),W&&ht.progress(1)):(Nt.y=zt+"px",Nt.renderTransform(1))}}}),ot(vt),ve.core.getCache(vt.trigger).stRevert=wt,vt.startY=ct,vt.pins=Jt,vt.markers=k,vt.ratio=ft,vt.autoSpeed=$t,x.style.willChange="transform"),vt};Ft(),se.addEventListener("killAll",Ft),ve.delayedCall(.5,function(){return W=0}),this.scrollTop=X,this.scrollTo=function(A,x,F){var Y=ve.utils.clamp(0,vr(),isNaN(A)?e.offset(A,F,!!x&&!S):+A);x?S?ve.to(e,{duration:N,scrollTop:Y,overwrite:"auto",ease:yl}):I(Y):X(Y)},this.offset=function(A,x,F){A=as(A)[0];var Y=A.style.cssText,et=se.create({trigger:A,start:x||"top top"}),rt;return p&&(W?se.refresh():q([et],!0)),rt=et.start/(F?D:1),et.kill(!1),A.style.cssText=Y,ve.core.getCache(A).uncache=1,rt};function G(){return u=f.clientHeight,f.style.overflow="visible",ci.style.height=rn.innerHeight+(u-rn.innerHeight)/D+"px",u-rn.innerHeight}this.content=function(A){if(arguments.length){var x=as(A||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||ci.children[0];return x!==f&&(f=x,v=f.getAttribute("style")||"",at&&at.observe(f),ve.set(f,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),N||ve.set(f,{clearProps:"transform"})),this}return f},this.wrapper=function(A){return arguments.length?(d=as(A||"#smooth-wrapper")[0]||Fy(f),b=d.getAttribute("style")||"",G(),ve.set(d,N?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):d},this.effects=function(A,x){var F;if(p||(p=[]),!A)return p.slice(0);A=as(A),A.forEach(function(ft){for(var vt=p.length;vt--;)p[vt].trigger===ft&&p[vt].kill()}),x=x||{};var Y=x,et=Y.speed,rt=Y.lag,St=Y.effectsPadding,mt=[],ct,Nt;for(ct=0;ct<A.length;ct++)Nt=Xt(A[ct],et,rt,ct,St),Nt&&mt.push(Nt);return(F=p).push.apply(F,mt),x.refresh!==!1&&se.refresh(),mt},this.sections=function(A,x){var F;if(m||(m=[]),!A)return m.slice(0);var Y=as(A).map(function(et){return se.create({trigger:et,start:"top 120%",end:"bottom -20%",onToggle:function(St){et.style.opacity=St.isActive?"1":"0",et.style.pointerEvents=St.isActive?"all":"none"}})});return x&&x.add?(F=m).push.apply(F,Y):m=Y.slice(0),Y},this.content(t.content),this.wrapper(t.wrapper),this.render=function(A){return Bt(A||A===0?A:V)},this.getVelocity=function(){return Z.getVelocity(-V)},se.scrollerProxy(d,{scrollTop:X,scrollHeight:function(){return G()&&ci.scrollHeight},fixedMarkers:t.fixedMarkers!==!1&&!!N,content:f,getBoundingClientRect:function(){return{top:0,left:0,width:rn.innerWidth,height:rn.innerHeight}}}),se.defaults({scroller:d});var Qt=se.getAll().filter(function(A){return A.scroller===rn||A.scroller===d});Qt.forEach(function(A){return A.revert(!0,!0)}),_=se.create({animation:ve.fromTo(U,{y:function(){return P=0,0}},{y:function(){return P=1,-G()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(P){var x=lt;x&&(xt(_),U.y=V),Bt(U.y,x),z(),s&&!S&&s(M)}}}),onRefreshInit:function(x){if(!r.isRefreshing){if(r.isRefreshing=!0,p){var F=se.getAll().filter(function(et){return!!et.pin});p.forEach(function(et){et.vars.pinnedContainer||F.forEach(function(rt){if(rt.pin.contains(et.trigger)){var St=et.vars;St.pinnedContainer=rt.pin,et.vars=null,et.init(St,et.animation)}})})}var Y=x.getTween();w=Y&&Y._end>Y._dp._time,T=V,U.y=0,N&&(se.isTouch===1&&(d.style.position="absolute"),d.scrollTop=0,se.isTouch===1&&(d.style.position="fixed"))}},onRefresh:function(x){x.animation.invalidate(),x.setPositions(x.start,G()/D),w||xt(x),U.y=-I()*D,Bt(U.y),W||(w&&(lt=!1),x.animation.progress(ve.utils.clamp(0,1,T/D/-x.end))),w&&(x.progress-=.001,x.update()),r.isRefreshing=!1},id:"ScrollSmoother",scroller:rn,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return G()/D},onScrubComplete:function(){Z.reset(),o&&o(e)},scrub:N||!0}),this.smooth=function(A){return arguments.length&&(N=A||0,D=N&&+t.speed||1,_.scrubDuration(A)),_.getTween()?_.getTween().duration():0},_.getTween()&&(_.getTween().vars.ease=t.ease||yl),this.scrollTrigger=_,t.effects&&this.effects(t.effects===!0?"[data-"+y+"speed], [data-"+y+"lag]":t.effects,{effectsPadding:t.effectsPadding,refresh:!1}),t.sections&&this.sections(t.sections===!0?"[data-section]":t.sections),Qt.forEach(function(A){A.vars.scroller=d,A.revert(!1,!0),A.init(A.vars,A.animation)}),this.paused=function(A,x){return arguments.length?(!!S!==A&&(A?(_.getTween()&&_.getTween().pause(),I(-V/D),Z.reset(),C=se.normalizeScroll(),C&&C.disable(),S=se.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return X(-V)}}),S.nested=Op(Js,"wheel,touch,scroll",!0,x!==!1)):(S.nested.kill(),S.kill(),S=0,C&&C.enable(),_.progress=(-V/D-_.start)/(_.end-_.start),xt(_))),this):!!S},this.kill=this.revert=function(){e.paused(!1),xt(_),_.kill();for(var A=(p||[]).concat(m||[]),x=A.length;x--;)A[x].kill();se.scrollerProxy(d),se.removeEventListener("killAll",Ft),se.removeEventListener("refresh",jt),d.style.cssText=b,f.style.cssText=v;var F=se.defaults({});F&&F.scroller===d&&se.defaults({scroller:rn}),e.normalizer&&se.normalizeScroll(!1),clearInterval(g),Pi=null,at&&at.disconnect(),ci.style.removeProperty("height"),rn.removeEventListener("focusin",ut)},this.refresh=function(A,x){return _.refresh(A,x)},c&&(this.normalizer=se.normalizeScroll(c===!0?{debounce:!0,content:!N&&f}:c)),se.config(t),"overscrollBehavior"in rn.getComputedStyle(ci)&&ve.set([ci,Js],{overscrollBehavior:"none"}),"scrollBehavior"in rn.getComputedStyle(ci)&&ve.set([ci,Js],{scrollBehavior:"auto"}),rn.addEventListener("focusin",ut),g=setInterval(z,250),ls.readyState==="loading"||requestAnimationFrame(function(){return se.refresh()})}return r.register=function(e){return xl||(ve=e||Vp(),zp()&&window.document&&(rn=window,ls=document,Js=ls.documentElement,ci=ls.body),ve&&(as=ve.utils.toArray,Np=ve.utils.clamp,yl=ve.parseEase("expo"),Bp=ve.core.context||function(){},se=ve.core.globals().ScrollTrigger,ve.core.globals("ScrollSmoother",r),ci&&se&&(kp=ve.delayedCall(.2,function(){return se.isRefreshing||Pi&&Pi.refresh()}).pause(),Py=[rn,ls,Js,ci],Up=se.core._getVelocityProp,Op=se.core._inputObserver,r.refresh=se.refresh,xl=1))),xl},Ry(r,[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}]),r}();ui.version="3.12.5";ui.create=function(r){return Pi&&r&&Pi.content()===as(r.content)[0]?Pi:new ui(r)};ui.get=function(){return Pi};Vp()&&ve.registerPlugin(ui);function Hp(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Ny(r,t,e){return t&&Hp(r.prototype,t),e&&Hp(r,e),r}var sn,Ml,Uy,kn,Sr,Mr,js,Wp,cs,la,Xp,Wi,hi,Yp,qp=function(){return sn||typeof window<"u"&&(sn=window.gsap)&&sn.registerPlugin&&sn},Zp=1,Ks=[],ce=[],fi=[],ca=Date.now,ih=function(t,e){return e},Oy=function(){var t=la.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,ce),i.push.apply(i,fi),ce=n,fi=i,ih=function(o,a){return e[o](a)}},Yi=function(t,e){return~fi.indexOf(t)&&fi[fi.indexOf(t)+1][e]},ua=function(t){return!!~Xp.indexOf(t)},Sn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},vn=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},vl="scrollLeft",Sl="scrollTop",rh=function(){return Wi&&Wi.isPressed||ce.cache++},bl=function(t,e){var n=function i(s){if(s||s===0){Zp&&(kn.history.scrollRestoration="manual");var o=Wi&&Wi.isPressed;s=i.v=Math.round(s)||(Wi&&Wi.iOS?1:0),t(s),i.cacheID=ce.cache,o&&ih("ss",s)}else(e||ce.cache!==i.cacheID||ih("ref"))&&(i.cacheID=ce.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},hn={s:vl,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:bl(function(r){return arguments.length?kn.scrollTo(r,ze.sc()):kn.pageXOffset||Sr[vl]||Mr[vl]||js[vl]||0})},ze={s:Sl,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:hn,sc:bl(function(r){return arguments.length?kn.scrollTo(hn.sc(),r):kn.pageYOffset||Sr[Sl]||Mr[Sl]||js[Sl]||0})},Mn=function(t,e){return(e&&e._ctx&&e._ctx.selector||sn.utils.toArray)(t)[0]||(typeof t=="string"&&sn.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},Xi=function(t,e){var n=e.s,i=e.sc;ua(t)&&(t=Sr.scrollingElement||Mr);var s=ce.indexOf(t),o=i===ze.sc?1:2;!~s&&(s=ce.push(t)-1),ce[s+o]||Sn(t,"scroll",rh);var a=ce[s+o],l=a||(ce[s+o]=bl(Yi(t,n),!0)||(ua(t)?i:bl(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=sn.getProperty(t,"scrollBehavior")==="smooth"),l},wl=function(t,e,n){var i=t,s=t,o=ca(),a=o,l=e||50,c=Math.max(500,l*3),h=function(_,p){var m=ca();p||m-o>l?(s=i,i=_,a=o,o=m):n?i+=_:i=s+(_-s)/(m-a)*(o-a)},f=function(){s=i=n?0:i,a=o=0},d=function(_){var p=a,m=s,g=ca();return(_||_===0)&&_!==i&&h(_),o===a||g-a>c?0:(i+(n?m:-m))/((n?g:o)-p)*1e3};return{update:h,reset:f,getVelocity:d}},aa=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},Gp=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},$p=function(){la=sn.core.globals().ScrollTrigger,la&&la.core&&Oy()},Jp=function(t){return sn=t||qp(),!Ml&&sn&&typeof document<"u"&&document.body&&(kn=window,Sr=document,Mr=Sr.documentElement,js=Sr.body,Xp=[kn,Sr,Mr,js],Uy=sn.utils.clamp,Yp=sn.core.context||function(){},cs="onpointerenter"in js?"pointer":"mouse",Wp=Ne.isTouch=kn.matchMedia&&kn.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in kn||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,hi=Ne.eventTypes=("ontouchstart"in Mr?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Mr?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return Zp=0},500),$p(),Ml=1),Ml};hn.op=ze;ce.cache=0;var Ne=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){Ml||Jp(sn)||console.warn("Please gsap.registerPlugin(Observer)"),la||$p();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,h=n.preventDefault,f=n.onStop,d=n.onStopDelay,u=n.ignore,_=n.wheelSpeed,p=n.event,m=n.onDragStart,g=n.onDragEnd,b=n.onDrag,v=n.onPress,S=n.onRelease,C=n.onRight,T=n.onLeft,w=n.onUp,P=n.onDown,M=n.onChangeX,y=n.onChangeY,I=n.onChange,N=n.onToggleX,D=n.onToggleY,V=n.onHover,K=n.onHoverEnd,W=n.onMove,Z=n.ignoreCheck,z=n.isNormalizer,U=n.onGestureStart,R=n.onGestureEnd,lt=n.onWheel,xt=n.onEnable,Bt=n.onDisable,X=n.onClick,at=n.scrollSpeed,yt=n.capture,ut=n.allowClicks,It=n.lockAxis,Ht=n.onLockAxis;this.target=a=Mn(a)||Mr,this.vars=n,u&&(u=sn.utils.toArray(u)),i=i||1e-9,s=s||0,_=_||1,at=at||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(kn.getComputedStyle(js).lineHeight)||22);var q,jt,Ft,Ut,wt,At,Xt,G=this,Qt=0,A=0,x=n.passive||!h,F=Xi(a,hn),Y=Xi(a,ze),et=F(),rt=Y(),St=~o.indexOf("touch")&&!~o.indexOf("pointer")&&hi[0]==="pointerdown",mt=ua(a),ct=a.ownerDocument||Sr,Nt=[0,0,0],ft=[0,0,0],vt=0,$t=function(){return vt=ca()},ht=function(Q,pt){return(G.event=Q)&&u&&~u.indexOf(Q.target)||pt&&St&&Q.pointerType!=="touch"||Z&&Z(Q,pt)},Ct=function(){G._vx.reset(),G._vy.reset(),jt.pause(),f&&f(G)},qt=function(){var Q=G.deltaX=Gp(Nt),pt=G.deltaY=Gp(ft),nt=Math.abs(Q)>=i,Tt=Math.abs(pt)>=i;I&&(nt||Tt)&&I(G,Q,pt,Nt,ft),nt&&(C&&G.deltaX>0&&C(G),T&&G.deltaX<0&&T(G),M&&M(G),N&&G.deltaX<0!=Qt<0&&N(G),Qt=G.deltaX,Nt[0]=Nt[1]=Nt[2]=0),Tt&&(P&&G.deltaY>0&&P(G),w&&G.deltaY<0&&w(G),y&&y(G),D&&G.deltaY<0!=A<0&&D(G),A=G.deltaY,ft[0]=ft[1]=ft[2]=0),(Ut||Ft)&&(W&&W(G),Ft&&(b(G),Ft=!1),Ut=!1),At&&!(At=!1)&&Ht&&Ht(G),wt&&(lt(G),wt=!1),q=0},Jt=function(Q,pt,nt){Nt[nt]+=Q,ft[nt]+=pt,G._vx.update(Q),G._vy.update(pt),c?q||(q=requestAnimationFrame(qt)):qt()},he=function(Q,pt){It&&!Xt&&(G.axis=Xt=Math.abs(Q)>Math.abs(pt)?"x":"y",At=!0),Xt!=="y"&&(Nt[2]+=Q,G._vx.update(Q,!0)),Xt!=="x"&&(ft[2]+=pt,G._vy.update(pt,!0)),c?q||(q=requestAnimationFrame(qt)):qt()},Kt=function(Q){if(!ht(Q,1)){Q=aa(Q,h);var pt=Q.clientX,nt=Q.clientY,Tt=pt-G.x,dt=nt-G.y,Rt=G.isDragging;G.x=pt,G.y=nt,(Rt||Math.abs(G.startX-pt)>=s||Math.abs(G.startY-nt)>=s)&&(b&&(Ft=!0),Rt||(G.isDragging=!0),he(Tt,dt),Rt||m&&m(G))}},k=G.onPress=function(O){ht(O,1)||O&&O.button||(G.axis=Xt=null,jt.pause(),G.isPressed=!0,O=aa(O),Qt=A=0,G.startX=G.x=O.clientX,G.startY=G.y=O.clientY,G._vx.reset(),G._vy.reset(),Sn(z?a:ct,hi[1],Kt,x,!0),G.deltaX=G.deltaY=0,v&&v(G))},tt=G.onRelease=function(O){if(!ht(O,1)){vn(z?a:ct,hi[1],Kt,!0);var Q=!isNaN(G.y-G.startY),pt=G.isDragging,nt=pt&&(Math.abs(G.x-G.startX)>3||Math.abs(G.y-G.startY)>3),Tt=aa(O);!nt&&Q&&(G._vx.reset(),G._vy.reset(),h&&ut&&sn.delayedCall(.08,function(){if(ca()-vt>300&&!O.defaultPrevented){if(O.target.click)O.target.click();else if(ct.createEvent){var dt=ct.createEvent("MouseEvents");dt.initMouseEvent("click",!0,!0,kn,1,Tt.screenX,Tt.screenY,Tt.clientX,Tt.clientY,!1,!1,!1,!1,0,null),O.target.dispatchEvent(dt)}}})),G.isDragging=G.isGesturing=G.isPressed=!1,f&&pt&&!z&&jt.restart(!0),g&&pt&&g(G),S&&S(G,nt)}},ot=function(Q){return Q.touches&&Q.touches.length>1&&(G.isGesturing=!0)&&U(Q,G.isDragging)},gt=function(){return(G.isGesturing=!1)||R(G)},_t=function(Q){if(!ht(Q)){var pt=F(),nt=Y();Jt((pt-et)*at,(nt-rt)*at,1),et=pt,rt=nt,f&&jt.restart(!0)}},zt=function(Q){if(!ht(Q)){Q=aa(Q,h),lt&&(wt=!0);var pt=(Q.deltaMode===1?l:Q.deltaMode===2?kn.innerHeight:1)*_;Jt(Q.deltaX*pt,Q.deltaY*pt,0),f&&!z&&jt.restart(!0)}},ie=function(Q){if(!ht(Q)){var pt=Q.clientX,nt=Q.clientY,Tt=pt-G.x,dt=nt-G.y;G.x=pt,G.y=nt,Ut=!0,f&&jt.restart(!0),(Tt||dt)&&he(Tt,dt)}},bt=function(Q){G.event=Q,V(G)},L=function(Q){G.event=Q,K(G)},st=function(Q){return ht(Q)||aa(Q,h)&&X(G)};jt=G._dc=sn.delayedCall(d||.25,Ct).pause(),G.deltaX=G.deltaY=0,G._vx=wl(0,50,!0),G._vy=wl(0,50,!0),G.scrollX=F,G.scrollY=Y,G.isDragging=G.isGesturing=G.isPressed=!1,Yp(this),G.enable=function(O){return G.isEnabled||(Sn(mt?ct:a,"scroll",rh),o.indexOf("scroll")>=0&&Sn(mt?ct:a,"scroll",_t,x,yt),o.indexOf("wheel")>=0&&Sn(a,"wheel",zt,x,yt),(o.indexOf("touch")>=0&&Wp||o.indexOf("pointer")>=0)&&(Sn(a,hi[0],k,x,yt),Sn(ct,hi[2],tt),Sn(ct,hi[3],tt),ut&&Sn(a,"click",$t,!0,!0),X&&Sn(a,"click",st),U&&Sn(ct,"gesturestart",ot),R&&Sn(ct,"gestureend",gt),V&&Sn(a,cs+"enter",bt),K&&Sn(a,cs+"leave",L),W&&Sn(a,cs+"move",ie)),G.isEnabled=!0,O&&O.type&&k(O),xt&&xt(G)),G},G.disable=function(){G.isEnabled&&(Ks.filter(function(O){return O!==G&&ua(O.target)}).length||vn(mt?ct:a,"scroll",rh),G.isPressed&&(G._vx.reset(),G._vy.reset(),vn(z?a:ct,hi[1],Kt,!0)),vn(mt?ct:a,"scroll",_t,yt),vn(a,"wheel",zt,yt),vn(a,hi[0],k,yt),vn(ct,hi[2],tt),vn(ct,hi[3],tt),vn(a,"click",$t,!0),vn(a,"click",st),vn(ct,"gesturestart",ot),vn(ct,"gestureend",gt),vn(a,cs+"enter",bt),vn(a,cs+"leave",L),vn(a,cs+"move",ie),G.isEnabled=G.isPressed=G.isDragging=!1,Bt&&Bt(G))},G.kill=G.revert=function(){G.disable();var O=Ks.indexOf(G);O>=0&&Ks.splice(O,1),Wi===G&&(Wi=0)},Ks.push(G),z&&ua(a)&&(Wi=G),G.enable(p)},Ny(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Ne.version="3.12.5";Ne.create=function(r){return new Ne(r)};Ne.register=Jp;Ne.getAll=function(){return Ks.slice()};Ne.getById=function(r){return Ks.filter(function(t){return t.vars.id===r})[0]};qp()&&sn.registerPlugin(Ne);var kt,eo,pe,Ie,di,Te,pm,zl,ba,_a,fa,El,fn,Wl,fh,wn,Kp,jp,no,mm,sh,gm,bn,dh,_m,xm,br,ph,yh,io,vh,Vl,mh,oh,Tl=1,dn=Date.now,ah=dn(),jn=0,da=0,Qp=function(t,e,n){var i=Vn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},tm=function(t,e){return e&&(!Vn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},By=function r(){return da&&requestAnimationFrame(r)},em=function(){return Wl=1},nm=function(){return Wl=0},Ii=function(t){return t},pa=function(t){return Math.round(t*1e5)/1e5||0},ym=function(){return typeof window<"u"},vm=function(){return kt||ym()&&(kt=window.gsap)&&kt.registerPlugin&&kt},ms=function(t){return!!~pm.indexOf(t)},Sm=function(t){return(t==="Height"?vh:pe["inner"+t])||di["client"+t]||Te["client"+t]},Mm=function(t){return Yi(t,"getBoundingClientRect")||(ms(t)?function(){return kl.width=pe.innerWidth,kl.height=vh,kl}:function(){return qi(t)})},ky=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=Yi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?Sm(s):t["client"+s])||0}},zy=function(t,e){return!e||~fi.indexOf(t)?Mm(t):function(){return kl}},Li=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=Yi(t,n))?o()-Mm(t)()[s]:ms(t)?(di[n]||Te[n])-Sm(i):t[n]-t["offset"+i])},Al=function(t,e){for(var n=0;n<no.length;n+=3)(!e||~e.indexOf(no[n+1]))&&t(no[n],no[n+1],no[n+2])},Vn=function(t){return typeof t=="string"},Tn=function(t){return typeof t=="function"},ma=function(t){return typeof t=="number"},us=function(t){return typeof t=="object"},ha=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},lh=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t)}):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},Qs=Math.abs,bm="left",wm="top",Sh="right",Mh="bottom",fs="width",ds="height",xa="Right",ya="Left",va="Top",Sa="Bottom",Ve="padding",Jn="margin",so="Width",bh="Height",Xe="px",Kn=function(t){return pe.getComputedStyle(t)},Vy=function(t){var e=Kn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},im=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},qi=function(t,e){var n=e&&Kn(t)[fh]!=="matrix(1, 0, 0, 1, 0, 0)"&&kt.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 n&&n.progress(0).kill(),i},Hl=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},Em=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},Hy=function(t){return function(e){return kt.utils.snap(Em(t),e)}},wh=function(t){var e=kt.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort(function(i,s){return i-s});return n?function(i,s,o){o===void 0&&(o=.001);var a;if(!s)return e(i);if(s>0){for(i-=o,a=0;a<n.length;a++)if(n[a]>=i)return n[a];return n[a-1]}else for(a=n.length,i+=o;a--;)if(n[a]<=i)return n[a];return n[0]}:function(i,s,o){o===void 0&&(o=.001);var a=e(i);return!s||Math.abs(a-i)<o||a-i<0==s<0?a:e(s<0?i-t:i+t)}},Gy=function(t){return function(e,n){return wh(Em(t))(e,n.direction)}},Cl=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},je=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},Ke=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},Dl=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},rm={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Rl={toggleActions:"play",anticipatePin:0},Gl={top:0,left:0,center:.5,bottom:1,right:1},Nl=function(t,e){if(Vn(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=e/100),t=t.substr(0,n-1)),t=i+(t in Gl?Gl[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Pl=function(t,e,n,i,s,o,a,l){var c=s.startColor,h=s.endColor,f=s.fontSize,d=s.indent,u=s.fontWeight,_=Ie.createElement("div"),p=ms(n)||Yi(n,"pinType")==="fixed",m=t.indexOf("scroller")!==-1,g=p?Te:n,b=t.indexOf("start")!==-1,v=b?c:h,S="border-color:"+v+";font-size:"+f+";color:"+v+";font-weight:"+u+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return S+="position:"+((m||l)&&p?"fixed;":"absolute;"),(m||l||!p)&&(S+=(i===ze?Sh:Mh)+":"+(o+parseFloat(d))+"px;"),a&&(S+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=b,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=S,_.innerText=e||e===0?t+"-"+e:t,g.children[0]?g.insertBefore(_,g.children[0]):g.appendChild(_),_._offset=_["offset"+i.op.d2],Ul(_,0,i,b),_},Ul=function(t,e,n,i){var s={display:"block"},o=n[i?"os2":"p2"],a=n[i?"p2":"os2"];t._isFlipped=i,s[n.a+"Percent"]=i?-100:0,s[n.a]=i?"1px":0,s["border"+o+so]=1,s["border"+a+so]=0,s[n.p]=e+"px",kt.set(t,s)},ue=[],gh={},wa,sm=function(){return dn()-jn>34&&(wa||(wa=requestAnimationFrame(Zi)))},to=function(){(!bn||!bn.isPressed||bn.startX>Te.clientWidth)&&(ce.cache++,bn?wa||(wa=requestAnimationFrame(Zi)):Zi(),jn||_s("scrollStart"),jn=dn())},ch=function(){xm=pe.innerWidth,_m=pe.innerHeight},ga=function(){ce.cache++,!fn&&!gm&&!Ie.fullscreenElement&&!Ie.webkitFullscreenElement&&(!dh||xm!==pe.innerWidth||Math.abs(pe.innerHeight-_m)>pe.innerHeight*.25)&&zl.restart(!0)},gs={},Wy=[],Tm=function r(){return Ke(Vt,"scrollEnd",r)||hs(!0)},_s=function(t){return gs[t]&&gs[t].map(function(e){return e()})||Wy},zn=[],Am=function(t){for(var e=0;e<zn.length;e+=5)(!t||zn[e+4]&&zn[e+4].query===t)&&(zn[e].style.cssText=zn[e+1],zn[e].getBBox&&zn[e].setAttribute("transform",zn[e+2]||""),zn[e+3].uncache=1)},Eh=function(t,e){var n;for(wn=0;wn<ue.length;wn++)n=ue[wn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Vl=!0,e&&Am(e),e||_s("revert")},Cm=function(t,e){ce.cache++,(e||!En)&&ce.forEach(function(n){return Tn(n)&&n.cacheID++&&(n.rec=0)}),Vn(t)&&(pe.history.scrollRestoration=yh=t)},En,ps=0,om,Xy=function(){if(om!==ps){var t=om=ps;requestAnimationFrame(function(){return t===ps&&hs(!0)})}},Dm=function(){Te.appendChild(io),vh=!bn&&io.offsetHeight||pe.innerHeight,Te.removeChild(io)},am=function(t){return ba(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},hs=function(t,e){if(jn&&!t&&!Vl){je(Vt,"scrollEnd",Tm);return}Dm(),En=Vt.isRefreshing=!0,ce.forEach(function(i){return Tn(i)&&++i.cacheID&&(i.rec=i())});var n=_s("refreshInit");mm&&Vt.sort(),e||Eh(),ce.forEach(function(i){Tn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),ue.slice(0).forEach(function(i){return i.refresh()}),Vl=!1,ue.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",o=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-o),i.refresh()}}),mh=1,am(!0),ue.forEach(function(i){var s=Li(i.scroller,i._dir),o=i.vars.end==="max"||i._endClamp&&i.end>s,a=i._startClamp&&i.start>=s;(o||a)&&i.setPositions(a?s-1:i.start,o?Math.max(a?s:i.start+1,s):i.end,!0)}),am(!1),mh=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),ce.forEach(function(i){Tn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Cm(yh,1),zl.pause(),ps++,En=2,Zi(2),ue.forEach(function(i){return Tn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),En=Vt.isRefreshing=!1,_s("refresh")},_h=0,Ol=1,Ma,Zi=function(t){if(t===2||!En&&!Vl){Vt.isUpdating=!0,Ma&&Ma.update(0);var e=ue.length,n=dn(),i=n-ah>=50,s=e&&ue[0].scroll();if(Ol=_h>s?-1:1,En||(_h=s),i&&(jn&&!Wl&&n-jn>200&&(jn=0,_s("scrollEnd")),fa=ah,ah=n),Ol<0){for(wn=e;wn-- >0;)ue[wn]&&ue[wn].update(0,i);Ol=1}else for(wn=0;wn<e;wn++)ue[wn]&&ue[wn].update(0,i);Vt.isUpdating=!1}wa=0},xh=[bm,wm,Mh,Sh,Jn+Sa,Jn+xa,Jn+va,Jn+ya,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Bl=xh.concat([fs,ds,"boxSizing","max"+so,"max"+bh,"position",Jn,Ve,Ve+va,Ve+xa,Ve+Sa,Ve+ya]),Yy=function(t,e,n){ro(n);var i=t._gsap;if(i.spacerIsNative)ro(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},uh=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=xh.length,o=e.style,a=t.style,l;s--;)l=xh[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[Mh]=a[Sh]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[fs]=Hl(t,hn)+Xe,o[ds]=Hl(t,ze)+Xe,o[Ve]=a[Jn]=a[wm]=a[bm]="0",ro(i),a[fs]=a["max"+so]=n[fs],a[ds]=a["max"+bh]=n[ds],a[Ve]=n[Ve],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},qy=/([A-Z])/g,ro=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||kt.core.getCache(t.t)).uncache=1;i<n;i+=2)o=t[i+1],s=t[i],o?e[s]=o:e[s]&&e.removeProperty(s.replace(qy,"-$1").toLowerCase())}},Il=function(t){for(var e=Bl.length,n=t.style,i=[],s=0;s<e;s++)i.push(Bl[s],n[Bl[s]]);return i.t=t,i},Zy=function(t,e,n){for(var i=[],s=t.length,o=n?8:0,a;o<s;o+=2)a=t[o],i.push(a,a in e?e[a]:t[o+1]);return i.t=t.t,i},kl={left:0,top:0},lm=function(t,e,n,i,s,o,a,l,c,h,f,d,u,_){Tn(t)&&(t=t(l)),Vn(t)&&t.substr(0,3)==="max"&&(t=d+(t.charAt(4)==="="?Nl("0"+t.substr(3),n):0));var p=u?u.time():0,m,g,b;if(u&&u.seek(0),isNaN(t)||(t=+t),ma(t))u&&(t=kt.utils.mapRange(u.scrollTrigger.start,u.scrollTrigger.end,0,d,t)),a&&Ul(a,n,i,!0);else{Tn(e)&&(e=e(l));var v=(t||"0").split(" "),S,C,T,w;b=Mn(e,l)||Te,S=qi(b)||{},(!S||!S.left&&!S.top)&&Kn(b).display==="none"&&(w=b.style.display,b.style.display="block",S=qi(b),w?b.style.display=w:b.style.removeProperty("display")),C=Nl(v[0],S[i.d]),T=Nl(v[1]||"0",n),t=S[i.p]-c[i.p]-h+C+s-T,a&&Ul(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var P=t+n,M=o._isStart;m="scroll"+i.d2,Ul(o,P,i,M&&P>20||!M&&(f?Math.max(Te[m],di[m]):o.parentNode[m])<=P+1),f&&(c=qi(a),f&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+Xe))}return u&&b&&(m=qi(b),u.seek(d),g=qi(b),u._caScrollDist=m[i.p]-g[i.p],t=t/u._caScrollDist*d),u&&u.seek(p),u?t:Math.round(t)},$y=/(webkit|moz|length|cssText|inset)/i,cm=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===Te){t._stOrig=s.cssText,a=Kn(t);for(o in a)!+o&&!$y.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=n,s.left=i}else s.cssText=t._stOrig;kt.core.getCache(t).uncache=1,e.appendChild(t)}},Rm=function(t,e,n){var i=e,s=i;return function(o){var a=Math.round(t());return a!==i&&a!==s&&Math.abs(a-i)>3&&Math.abs(a-s)>3&&(o=a,n&&n()),s=i,i=o,o}},Ll=function(t,e,n){var i={};i[e.p]="+="+n,kt.set(t,i)},um=function(t,e){var n=Xi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,h,f){var d=o.tween,u=l.onComplete,_={};c=c||n();var p=Rm(n,c,function(){d.kill(),o.tween=0});return f=h&&f||0,h=h||a-c,d&&d.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return p(c+h*d.ratio+f*d.ratio*d.ratio)},l.onUpdate=function(){ce.cache++,o.tween&&Zi()},l.onComplete=function(){o.tween=0,u&&u.call(d)},d=o.tween=kt.to(t,l),d};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},je(t,"wheel",n.wheelHandler),Vt.isTouch&&je(t,"touchmove",n.wheelHandler),s},Vt=function(){function r(e,n){eo||r.register(kt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),ph(this),this.init(e,n)}var t=r.prototype;return t.init=function(n,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!da){this.update=this.refresh=this.kill=Ii;return}n=im(Vn(n)||ma(n)||n.nodeType?{trigger:n}:n,Rl);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,h=s.onRefresh,f=s.scrub,d=s.trigger,u=s.pin,_=s.pinSpacing,p=s.invalidateOnRefresh,m=s.anticipatePin,g=s.onScrubComplete,b=s.onSnapComplete,v=s.once,S=s.snap,C=s.pinReparent,T=s.pinSpacer,w=s.containerAnimation,P=s.fastScrollEnd,M=s.preventOverlaps,y=n.horizontal||n.containerAnimation&&n.horizontal!==!1?hn:ze,I=!f&&f!==0,N=Mn(n.scroller||pe),D=kt.core.getCache(N),V=ms(N),K=("pinType"in n?n.pinType:Yi(N,"pinType")||V&&"fixed")==="fixed",W=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],Z=I&&n.toggleActions.split(" "),z="markers"in n?n.markers:Rl.markers,U=V?0:parseFloat(Kn(N)["border"+y.p2+so])||0,R=this,lt=n.onRefreshInit&&function(){return n.onRefreshInit(R)},xt=ky(N,V,y),Bt=zy(N,V),X=0,at=0,yt=0,ut=Xi(N,y),It,Ht,q,jt,Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St,mt,ct,Nt,ft,vt,$t,ht,Ct,qt,Jt,he,Kt,k,tt,ot,gt,_t,zt,ie,bt,L;if(R._startClamp=R._endClamp=!1,R._dir=y,m*=45,R.scroller=N,R.scroll=w?w.time.bind(w):ut,jt=ut(),R.vars=n,i=i||n.animation,"refreshPriority"in n&&(mm=1,n.refreshPriority===-9999&&(Ma=R)),D.tweenScroll=D.tweenScroll||{top:um(N,ze),left:um(N,hn)},R.tweenTo=It=D.tweenScroll[y.p],R.scrubDuration=function(nt){ot=ma(nt)&&nt,ot?tt?tt.duration(nt):tt=kt.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:ot,paused:!0,onComplete:function(){return g&&g(R)}}):(tt&&tt.progress(1).kill(),tt=0)},i&&(i.vars.lazy=!1,i._initted&&!R.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),R.animation=i.pause(),i.scrollTrigger=R,R.scrubDuration(f),Kt=0,l||(l=i.vars.id)),S&&((!us(S)||S.push)&&(S={snapTo:S}),"scrollBehavior"in Te.style&&kt.set(V?[Te,di]:N,{scrollBehavior:"auto"}),ce.forEach(function(nt){return Tn(nt)&&nt.target===(V?Ie.scrollingElement||di:N)&&(nt.smooth=!1)}),q=Tn(S.snapTo)?S.snapTo:S.snapTo==="labels"?Hy(i):S.snapTo==="labelsDirectional"?Gy(i):S.directional!==!1?function(nt,Tt){return wh(S.snapTo)(nt,dn()-at<500?0:Tt.direction)}:kt.utils.snap(S.snapTo),gt=S.duration||{min:.1,max:2},gt=us(gt)?_a(gt.min,gt.max):_a(gt,gt),_t=kt.delayedCall(S.delay||ot/2||.1,function(){var nt=ut(),Tt=dn()-at<500,dt=It.tween;if((Tt||Math.abs(R.getVelocity())<10)&&!dt&&!Wl&&X!==nt){var Rt=(nt-Ut)/F,Gt=i&&!I?i.totalProgress():Rt,Ot=Tt?0:(Gt-k)/(dn()-fa)*1e3||0,ne=kt.utils.clamp(-Rt,1-Rt,Qs(Ot/2)*Ot/.185),fe=Rt+(S.inertia===!1?0:ne),ge,le,E=S,B=E.onStart,H=E.onInterrupt,j=E.onComplete;if(ge=q(fe,R),ma(ge)||(ge=fe),le=Math.round(Ut+ge*F),nt<=wt&&nt>=Ut&&le!==nt){if(dt&&!dt._initted&&dt.data<=Qs(le-nt))return;S.inertia===!1&&(ne=ge-Rt),It(le,{duration:gt(Qs(Math.max(Qs(fe-Gt),Qs(ge-Gt))*.185/Ot/.05||0)),ease:S.ease||"power3",data:Qs(le-nt),onInterrupt:function(){return _t.restart(!0)&&H&&H(R)},onComplete:function(){R.update(),X=ut(),i&&(tt?tt.resetTo("totalProgress",ge,i._tTime/i._tDur):i.progress(ge)),Kt=k=i&&!I?i.totalProgress():R.progress,b&&b(R),j&&j(R)}},nt,ne*F,le-nt-ne*F),B&&B(R,It.tween)}}else R.isActive&&X!==nt&&_t.restart(!0)}).pause()),l&&(gh[l]=R),d=R.trigger=Mn(d||u!==!0&&u),L=d&&d._gsap&&d._gsap.stRevert,L&&(L=L(R)),u=u===!0?d:Mn(u),Vn(a)&&(a={targets:d,className:a}),u&&(_===!1||_===Jn||(_=!_&&u.parentNode&&u.parentNode.style&&Kn(u.parentNode).display==="flex"?!1:Ve),R.pin=u,Ht=kt.core.getCache(u),Ht.spacer?Y=Ht.pinState:(T&&(T=Mn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),Ht.spacerIsNative=!!T,T&&(Ht.spacerState=Il(T))),Ht.spacer=St=T||Ie.createElement("div"),St.classList.add("pin-spacer"),l&&St.classList.add("pin-spacer-"+l),Ht.pinState=Y=Il(u)),n.force3D!==!1&&kt.set(u,{force3D:!0}),R.spacer=St=Ht.spacer,he=Kn(u),$t=he[_+y.os2],ct=kt.getProperty(u),Nt=kt.quickSetter(u,y.a,Xe),uh(u,St,he),rt=Il(u)),z){A=us(z)?im(z,rm):rm,G=Pl("scroller-start",l,N,y,A,0),Qt=Pl("scroller-end",l,N,y,A,0,G),mt=G["offset"+y.op.d2];var st=Mn(Yi(N,"content")||N);At=this.markerStart=Pl("start",l,st,y,A,mt,0,w),Xt=this.markerEnd=Pl("end",l,st,y,A,mt,0,w),w&&(bt=kt.quickSetter([At,Xt],y.a,Xe)),!K&&!(fi.length&&Yi(N,"fixedMarkers")===!0)&&(Vy(V?Te:N),kt.set([G,Qt],{force3D:!0}),Ct=kt.quickSetter(G,y.a,Xe),Jt=kt.quickSetter(Qt,y.a,Xe))}if(w){var O=w.vars.onUpdate,Q=w.vars.onUpdateParams;w.eventCallback("onUpdate",function(){R.update(0,0,1),O&&O.apply(w,Q||[])})}if(R.previous=function(){return ue[ue.indexOf(R)-1]},R.next=function(){return ue[ue.indexOf(R)+1]},R.revert=function(nt,Tt){if(!Tt)return R.kill(!0);var dt=nt!==!1||!R.enabled,Rt=fn;dt!==R.isReverted&&(dt&&(zt=Math.max(ut(),R.scroll.rec||0),yt=R.progress,ie=i&&i.progress()),At&&[At,Xt,G,Qt].forEach(function(Gt){return Gt.style.display=dt?"none":"block"}),dt&&(fn=R,R.update(dt)),u&&(!C||!R.isActive)&&(dt?Yy(u,St,Y):uh(u,St,Kn(u),ht)),dt||R.update(dt),fn=Rt,R.isReverted=dt)},R.refresh=function(nt,Tt,dt,Rt){if(!((fn||!R.enabled)&&!Tt)){if(u&&nt&&jn){je(r,"scrollEnd",Tm);return}!En&&lt&&lt(R),fn=R,It.tween&&!dt&&(It.tween.kill(),It.tween=0),tt&&tt.pause(),p&&i&&i.revert({kill:!1}).invalidate(),R.isReverted||R.revert(!0,!0),R._subPinOffset=!1;var Gt=xt(),Ot=Bt(),ne=w?w.duration():Li(N,y),fe=F<=.01,ge=0,le=Rt||0,E=us(dt)?dt.end:n.end,B=n.endTrigger||d,H=us(dt)?dt.start:n.start||(n.start===0||!d?0:u?"0 0":"0 100%"),j=R.pinnedContainer=n.pinnedContainer&&Mn(n.pinnedContainer,R),J=d&&Math.max(0,ue.indexOf(R))||0,Mt=J,Dt,Lt,Zt,ee,Yt,Wt,ye,ke,on,_n,re,te,Ei;for(z&&us(dt)&&(te=kt.getProperty(G,y.p),Ei=kt.getProperty(Qt,y.p));Mt--;)Wt=ue[Mt],Wt.end||Wt.refresh(0,1)||(fn=R),ye=Wt.pin,ye&&(ye===d||ye===u||ye===j)&&!Wt.isReverted&&(_n||(_n=[]),_n.unshift(Wt),Wt.revert(!0,!0)),Wt!==ue[Mt]&&(J--,Mt--);for(Tn(H)&&(H=H(R)),H=Qp(H,"start",R),Ut=lm(H,d,Gt,y,ut(),At,G,R,Ot,U,K,ne,w,R._startClamp&&"_startClamp")||(u?-.001:0),Tn(E)&&(E=E(R)),Vn(E)&&!E.indexOf("+=")&&(~E.indexOf(" ")?E=(Vn(H)?H.split(" ")[0]:"")+E:(ge=Nl(E.substr(2),Gt),E=Vn(H)?H:(w?kt.utils.mapRange(0,w.duration(),w.scrollTrigger.start,w.scrollTrigger.end,Ut):Ut)+ge,B=d)),E=Qp(E,"end",R),wt=Math.max(Ut,lm(E||(B?"100% 0":ne),B,Gt,y,ut()+ge,Xt,Qt,R,Ot,U,K,ne,w,R._endClamp&&"_endClamp"))||-.001,ge=0,Mt=J;Mt--;)Wt=ue[Mt],ye=Wt.pin,ye&&Wt.start-Wt._pinPush<=Ut&&!w&&Wt.end>0&&(Dt=Wt.end-(R._startClamp?Math.max(0,Wt.start):Wt.start),(ye===d&&Wt.start-Wt._pinPush<Ut||ye===j)&&isNaN(H)&&(ge+=Dt*(1-Wt.progress)),ye===u&&(le+=Dt));if(Ut+=ge,wt+=ge,R._startClamp&&(R._startClamp+=ge),R._endClamp&&!En&&(R._endClamp=wt||-.001,wt=Math.min(wt,Li(N,y))),F=wt-Ut||(Ut-=.01)&&.001,fe&&(yt=kt.utils.clamp(0,1,kt.utils.normalize(Ut,wt,zt))),R._pinPush=le,At&&ge&&(Dt={},Dt[y.a]="+="+ge,j&&(Dt[y.p]="-="+ut()),kt.set([At,Xt],Dt)),u&&!(mh&&R.end>=Li(N,y)))Dt=Kn(u),ee=y===ze,Zt=ut(),ft=parseFloat(ct(y.a))+le,!ne&&wt>1&&(re=(V?Ie.scrollingElement||di:N).style,re={style:re,value:re["overflow"+y.a.toUpperCase()]},V&&Kn(Te)["overflow"+y.a.toUpperCase()]!=="scroll"&&(re.style["overflow"+y.a.toUpperCase()]="scroll")),uh(u,St,Dt),rt=Il(u),Lt=qi(u,!0),ke=K&&Xi(N,ee?hn:ze)(),_?(ht=[_+y.os2,F+le+Xe],ht.t=St,Mt=_===Ve?Hl(u,y)+F+le:0,Mt&&(ht.push(y.d,Mt+Xe),St.style.flexBasis!=="auto"&&(St.style.flexBasis=Mt+Xe)),ro(ht),j&&ue.forEach(function(Se){Se.pin===j&&Se.vars.pinSpacing!==!1&&(Se._subPinOffset=!0)}),K&&ut(zt)):(Mt=Hl(u,y),Mt&&St.style.flexBasis!=="auto"&&(St.style.flexBasis=Mt+Xe)),K&&(Yt={top:Lt.top+(ee?Zt-Ut:ke)+Xe,left:Lt.left+(ee?ke:Zt-Ut)+Xe,boxSizing:"border-box",position:"fixed"},Yt[fs]=Yt["max"+so]=Math.ceil(Lt.width)+Xe,Yt[ds]=Yt["max"+bh]=Math.ceil(Lt.height)+Xe,Yt[Jn]=Yt[Jn+va]=Yt[Jn+xa]=Yt[Jn+Sa]=Yt[Jn+ya]="0",Yt[Ve]=Dt[Ve],Yt[Ve+va]=Dt[Ve+va],Yt[Ve+xa]=Dt[Ve+xa],Yt[Ve+Sa]=Dt[Ve+Sa],Yt[Ve+ya]=Dt[Ve+ya],et=Zy(Y,Yt,C),En&&ut(0)),i?(on=i._initted,sh(1),i.render(i.duration(),!0,!0),vt=ct(y.a)-ft+F+le,qt=Math.abs(F-vt)>1,K&&qt&&et.splice(et.length-2,2),i.render(0,!0,!0),on||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),sh(0)):vt=F,re&&(re.value?re.style["overflow"+y.a.toUpperCase()]=re.value:re.style.removeProperty("overflow-"+y.a));else if(d&&ut()&&!w)for(Lt=d.parentNode;Lt&&Lt!==Te;)Lt._pinOffset&&(Ut-=Lt._pinOffset,wt-=Lt._pinOffset),Lt=Lt.parentNode;_n&&_n.forEach(function(Se){return Se.revert(!1,!0)}),R.start=Ut,R.end=wt,jt=Ft=En?zt:ut(),!w&&!En&&(jt<zt&&ut(zt),R.scroll.rec=0),R.revert(!1,!0),at=dn(),_t&&(X=-1,_t.restart(!0)),fn=0,i&&I&&(i._initted||ie)&&i.progress()!==ie&&i.progress(ie||0,!0).render(i.time(),!0,!0),(fe||yt!==R.progress||w||p)&&(i&&!I&&i.totalProgress(w&&Ut<-.001&&!yt?kt.utils.normalize(Ut,wt,0):yt,!0),R.progress=fe||(jt-Ut)/F===yt?0:yt),u&&_&&(St._pinOffset=Math.round(R.progress*vt)),tt&&tt.invalidate(),isNaN(te)||(te-=kt.getProperty(G,y.p),Ei-=kt.getProperty(Qt,y.p),Ll(G,y,te),Ll(At,y,te-(Rt||0)),Ll(Qt,y,Ei),Ll(Xt,y,Ei-(Rt||0))),fe&&!En&&R.update(),h&&!En&&!x&&(x=!0,h(R),x=!1)}},R.getVelocity=function(){return(ut()-Ft)/(dn()-fa)*1e3||0},R.endAnimation=function(){ha(R.callbackAnimation),i&&(tt?tt.progress(1):i.paused()?I||ha(i,R.direction<0,1):ha(i,i.reversed()))},R.labelToScroll=function(nt){return i&&i.labels&&(Ut||R.refresh()||Ut)+i.labels[nt]/i.duration()*F||0},R.getTrailing=function(nt){var Tt=ue.indexOf(R),dt=R.direction>0?ue.slice(0,Tt).reverse():ue.slice(Tt+1);return(Vn(nt)?dt.filter(function(Rt){return Rt.vars.preventOverlaps===nt}):dt).filter(function(Rt){return R.direction>0?Rt.end<=Ut:Rt.start>=wt})},R.update=function(nt,Tt,dt){if(!(w&&!dt&&!nt)){var Rt=En===!0?zt:R.scroll(),Gt=nt?0:(Rt-Ut)/F,Ot=Gt<0?0:Gt>1?1:Gt||0,ne=R.progress,fe,ge,le,E,B,H,j,J;if(Tt&&(Ft=jt,jt=w?ut():Rt,S&&(k=Kt,Kt=i&&!I?i.totalProgress():Ot)),m&&u&&!fn&&!Tl&&jn&&(!Ot&&Ut<Rt+(Rt-Ft)/(dn()-fa)*m?Ot=1e-4:Ot===1&&wt>Rt+(Rt-Ft)/(dn()-fa)*m&&(Ot=.9999)),Ot!==ne&&R.enabled){if(fe=R.isActive=!!Ot&&Ot<1,ge=!!ne&&ne<1,H=fe!==ge,B=H||!!Ot!=!!ne,R.direction=Ot>ne?1:-1,R.progress=Ot,B&&!fn&&(le=Ot&&!ne?0:Ot===1?1:ne===1?2:3,I&&(E=!H&&Z[le+1]!=="none"&&Z[le+1]||Z[le],J=i&&(E==="complete"||E==="reset"||E in i))),M&&(H||J)&&(J||f||!i)&&(Tn(M)?M(R):R.getTrailing(M).forEach(function(Zt){return Zt.endAnimation()})),I||(tt&&!fn&&!Tl?(tt._dp._time-tt._start!==tt._time&&tt.render(tt._dp._time-tt._start),tt.resetTo?tt.resetTo("totalProgress",Ot,i._tTime/i._tDur):(tt.vars.totalProgress=Ot,tt.invalidate().restart())):i&&i.totalProgress(Ot,!!(fn&&(at||nt)))),u){if(nt&&_&&(St.style[_+y.os2]=$t),!K)Nt(pa(ft+vt*Ot));else if(B){if(j=!nt&&Ot>ne&&wt+1>Rt&&Rt+1>=Li(N,y),C)if(!nt&&(fe||j)){var Mt=qi(u,!0),Dt=Rt-Ut;cm(u,Te,Mt.top+(y===ze?Dt:0)+Xe,Mt.left+(y===ze?0:Dt)+Xe)}else cm(u,St);ro(fe||j?et:rt),qt&&Ot<1&&fe||Nt(ft+(Ot===1&&!j?vt:0))}}S&&!It.tween&&!fn&&!Tl&&_t.restart(!0),a&&(H||v&&Ot&&(Ot<1||!oh))&&ba(a.targets).forEach(function(Zt){return Zt.classList[fe||v?"add":"remove"](a.className)}),o&&!I&&!nt&&o(R),B&&!fn?(I&&(J&&(E==="complete"?i.pause().totalProgress(1):E==="reset"?i.restart(!0).pause():E==="restart"?i.restart(!0):i[E]()),o&&o(R)),(H||!oh)&&(c&&H&&lh(R,c),W[le]&&lh(R,W[le]),v&&(Ot===1?R.kill(!1,1):W[le]=0),H||(le=Ot===1?1:3,W[le]&&lh(R,W[le]))),P&&!fe&&Math.abs(R.getVelocity())>(ma(P)?P:2500)&&(ha(R.callbackAnimation),tt?tt.progress(1):ha(i,E==="reverse"?1:!Ot,1))):I&&o&&!fn&&o(R)}if(Jt){var Lt=w?Rt/w.duration()*(w._caScrollDist||0):Rt;Ct(Lt+(G._isFlipped?1:0)),Jt(Lt)}bt&&bt(-Rt/w.duration()*(w._caScrollDist||0))}},R.enable=function(nt,Tt){R.enabled||(R.enabled=!0,je(N,"resize",ga),V||je(N,"scroll",to),lt&&je(r,"refreshInit",lt),nt!==!1&&(R.progress=yt=0,jt=Ft=X=ut()),Tt!==!1&&R.refresh())},R.getTween=function(nt){return nt&&It?It.tween:tt},R.setPositions=function(nt,Tt,dt,Rt){if(w){var Gt=w.scrollTrigger,Ot=w.duration(),ne=Gt.end-Gt.start;nt=Gt.start+ne*nt/Ot,Tt=Gt.start+ne*Tt/Ot}R.refresh(!1,!1,{start:tm(nt,dt&&!!R._startClamp),end:tm(Tt,dt&&!!R._endClamp)},Rt),R.update()},R.adjustPinSpacing=function(nt){if(ht&&nt){var Tt=ht.indexOf(y.d)+1;ht[Tt]=parseFloat(ht[Tt])+nt+Xe,ht[1]=parseFloat(ht[1])+nt+Xe,ro(ht)}},R.disable=function(nt,Tt){if(R.enabled&&(nt!==!1&&R.revert(!0,!0),R.enabled=R.isActive=!1,Tt||tt&&tt.pause(),zt=0,Ht&&(Ht.uncache=1),lt&&Ke(r,"refreshInit",lt),_t&&(_t.pause(),It.tween&&It.tween.kill()&&(It.tween=0)),!V)){for(var dt=ue.length;dt--;)if(ue[dt].scroller===N&&ue[dt]!==R)return;Ke(N,"resize",ga),V||Ke(N,"scroll",to)}},R.kill=function(nt,Tt){R.disable(nt,Tt),tt&&!Tt&&tt.kill(),l&&delete gh[l];var dt=ue.indexOf(R);dt>=0&&ue.splice(dt,1),dt===wn&&Ol>0&&wn--,dt=0,ue.forEach(function(Rt){return Rt.scroller===R.scroller&&(dt=1)}),dt||En||(R.scroll.rec=0),i&&(i.scrollTrigger=null,nt&&i.revert({kill:!1}),Tt||i.kill()),At&&[At,Xt,G,Qt].forEach(function(Rt){return Rt.parentNode&&Rt.parentNode.removeChild(Rt)}),Ma===R&&(Ma=0),u&&(Ht&&(Ht.uncache=1),dt=0,ue.forEach(function(Rt){return Rt.pin===u&&dt++}),dt||(Ht.spacer=0)),n.onKill&&n.onKill(R)},ue.push(R),R.enable(!1,!1),L&&L(R),i&&i.add&&!F){var pt=R.update;R.update=function(){R.update=pt,Ut||wt||R.refresh()},kt.delayedCall(.01,R.update),F=.01,Ut=wt=0}else R.refresh();u&&Xy()},r.register=function(n){return eo||(kt=n||vm(),ym()&&window.document&&r.enable(),eo=da),eo},r.defaults=function(n){if(n)for(var i in n)Rl[i]=n[i];return Rl},r.disable=function(n,i){da=0,ue.forEach(function(o){return o[i?"kill":"disable"](n)}),Ke(pe,"wheel",to),Ke(Ie,"scroll",to),clearInterval(El),Ke(Ie,"touchcancel",Ii),Ke(Te,"touchstart",Ii),Cl(Ke,Ie,"pointerdown,touchstart,mousedown",em),Cl(Ke,Ie,"pointerup,touchend,mouseup",nm),zl.kill(),Al(Ke);for(var s=0;s<ce.length;s+=3)Dl(Ke,ce[s],ce[s+1]),Dl(Ke,ce[s],ce[s+2])},r.enable=function(){if(pe=window,Ie=document,di=Ie.documentElement,Te=Ie.body,kt&&(ba=kt.utils.toArray,_a=kt.utils.clamp,ph=kt.core.context||Ii,sh=kt.core.suppressOverwrites||Ii,yh=pe.history.scrollRestoration||"auto",_h=pe.pageYOffset,kt.core.globals("ScrollTrigger",r),Te)){da=1,io=document.createElement("div"),io.style.height="100vh",io.style.position="absolute",Dm(),By(),Ne.register(kt),r.isTouch=Ne.isTouch,br=Ne.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),dh=Ne.isTouch===1,je(pe,"wheel",to),pm=[pe,Ie,di,Te],kt.matchMedia?(r.matchMedia=function(l){var c=kt.matchMedia(),h;for(h in l)c.add(h,l[h]);return c},kt.addEventListener("matchMediaInit",function(){return Eh()}),kt.addEventListener("matchMediaRevert",function(){return Am()}),kt.addEventListener("matchMedia",function(){hs(0,1),_s("matchMedia")}),kt.matchMedia("(orientation: portrait)",function(){return ch(),ch})):console.warn("Requires GSAP 3.11.0 or later"),ch(),je(Ie,"scroll",to);var n=Te.style,i=n.borderTopStyle,s=kt.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=qi(Te),ze.m=Math.round(o.top+ze.sc())||0,hn.m=Math.round(o.left+hn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),El=setInterval(sm,250),kt.delayedCall(.5,function(){return Tl=0}),je(Ie,"touchcancel",Ii),je(Te,"touchstart",Ii),Cl(je,Ie,"pointerdown,touchstart,mousedown",em),Cl(je,Ie,"pointerup,touchend,mouseup",nm),fh=kt.utils.checkPrefix("transform"),Bl.push(fh),eo=dn(),zl=kt.delayedCall(.2,hs).pause(),no=[Ie,"visibilitychange",function(){var l=pe.innerWidth,c=pe.innerHeight;Ie.hidden?(Kp=l,jp=c):(Kp!==l||jp!==c)&&ga()},Ie,"DOMContentLoaded",hs,pe,"load",hs,pe,"resize",ga],Al(je),ue.forEach(function(l){return l.enable(0,1)}),a=0;a<ce.length;a+=3)Dl(Ke,ce[a],ce[a+1]),Dl(Ke,ce[a],ce[a+2])}},r.config=function(n){"limitCallbacks"in n&&(oh=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(El)||(El=i)&&setInterval(sm,i),"ignoreMobileResize"in n&&(dh=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(Al(Ke)||Al(je,n.autoRefreshEvents||"none"),gm=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=Mn(n),o=ce.indexOf(s),a=ms(s);~o&&ce.splice(o,a?6:2),i&&(a?fi.unshift(pe,i,Te,i,di,i):fi.unshift(s,i))},r.clearMatchMedia=function(n){ue.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(Vn(n)?Mn(n):n).getBoundingClientRect(),a=o[s?fs:ds]*i||0;return s?o.right-a>0&&o.left+a<pe.innerWidth:o.bottom-a>0&&o.top+a<pe.innerHeight},r.positionInViewport=function(n,i,s){Vn(n)&&(n=Mn(n));var o=n.getBoundingClientRect(),a=o[s?fs:ds],l=i==null?a/2:i in Gl?Gl[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/pe.innerWidth:(o.top+l)/pe.innerHeight},r.killAll=function(n){if(ue.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=gs.killAll||[];gs={},i.forEach(function(s){return s()})}},r}();Vt.version="3.12.5";Vt.saveStyles=function(r){return r?ba(r).forEach(function(t){if(t&&t.style){var e=zn.indexOf(t);e>=0&&zn.splice(e,5),zn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),kt.core.getCache(t),ph())}}):zn};Vt.revert=function(r,t){return Eh(!r,t)};Vt.create=function(r,t){return new Vt(r,t)};Vt.refresh=function(r){return r?ga():(eo||Vt.register())&&hs(!0)};Vt.update=function(r){return++ce.cache&&Zi(r===!0?2:0)};Vt.clearScrollMemory=Cm;Vt.maxScroll=function(r,t){return Li(r,t?hn:ze)};Vt.getScrollFunc=function(r,t){return Xi(Mn(r),t?hn:ze)};Vt.getById=function(r){return gh[r]};Vt.getAll=function(){return ue.filter(function(r){return r.vars.id!=="ScrollSmoother"})};Vt.isScrolling=function(){return!!jn};Vt.snapDirectional=wh;Vt.addEventListener=function(r,t){var e=gs[r]||(gs[r]=[]);~e.indexOf(t)||e.push(t)};Vt.removeEventListener=function(r,t){var e=gs[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};Vt.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,h){var f=[],d=[],u=kt.delayedCall(i,function(){h(f,d),f=[],d=[]}).pause();return function(_){f.length||u.restart(!0),f.push(_.trigger),d.push(_),s<=f.length&&u.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&Tn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return Tn(s)&&(s=s(),je(Vt,"refresh",function(){return s=t.batchMax()})),ba(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(Vt.create(c))}),e};var hm=function(t,e,n,i){return e>i?t(i):e<0&&t(0),n>i?(i-e)/(n-e):n<0?e/(e-n):1},hh=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Ne.isTouch?" pinch-zoom":""):"none",t===di&&r(Te,e)},Fl={auto:1,scroll:1},Jy=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||kt.core.getCache(s),a=dn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==Te&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(Fl[(l=Kn(s)).overflowY]||Fl[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!ms(s)&&(Fl[(l=Kn(s)).overflowY]||Fl[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},Pm=function(t,e,n,i){return Ne.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&Jy,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&je(Ie,Ne.eventTypes[0],dm,!1,!0)},onDisable:function(){return Ke(Ie,Ne.eventTypes[0],dm,!0)}})},Ky=/(input|label|select|textarea)/i,fm,dm=function(t){var e=Ky.test(t.target.tagName);(e||fm)&&(t._gsapAllow=!0,fm=e)},jy=function(t){us(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,n=e.normalizeScrollX,i=e.momentum,s=e.allowNestedScroll,o=e.onRelease,a,l,c=Mn(t.target)||di,h=kt.core.globals().ScrollSmoother,f=h&&h.get(),d=br&&(t.content&&Mn(t.content)||f&&t.content!==!1&&!f.smooth()&&f.content()),u=Xi(c,ze),_=Xi(c,hn),p=1,m=(Ne.isTouch&&pe.visualViewport?pe.visualViewport.scale*pe.visualViewport.width:pe.outerWidth)/pe.innerWidth,g=0,b=Tn(i)?function(){return i(a)}:function(){return i||2.8},v,S,C=Pm(c,t.type,!0,s),T=function(){return S=!1},w=Ii,P=Ii,M=function(){l=Li(c,ze),P=_a(br?1:0,l),n&&(w=_a(0,Li(c,hn))),v=ps},y=function(){d._gsap.y=pa(parseFloat(d._gsap.y)+u.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)",u.offset=u.cacheID=0},I=function(){if(S){requestAnimationFrame(T);var z=pa(a.deltaY/2),U=P(u.v-z);if(d&&U!==u.v+u.offset){u.offset=U-u.v;var R=pa((parseFloat(d&&d._gsap.y)||0)-u.offset);d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+R+", 0, 1)",d._gsap.y=R+"px",u.cacheID=ce.cache,Zi()}return!0}u.offset&&y(),S=!0},N,D,V,K,W=function(){M(),N.isActive()&&N.vars.scrollY>l&&(u()>l?N.progress(1)&&u(l):N.resetTo("scrollY",l))};return d&&kt.set(d,{y:"+=0"}),t.ignoreCheck=function(Z){return br&&Z.type==="touchmove"&&I(Z)||p>1.05&&Z.type!=="touchstart"||a.isGesturing||Z.touches&&Z.touches.length>1},t.onPress=function(){S=!1;var Z=p;p=pa((pe.visualViewport&&pe.visualViewport.scale||1)/m),N.pause(),Z!==p&&hh(c,p>1.01?!0:n?!1:"x"),D=_(),V=u(),M(),v=ps},t.onRelease=t.onGestureStart=function(Z,z){if(u.offset&&y(),!z)K.restart(!0);else{ce.cache++;var U=b(),R,lt;n&&(R=_(),lt=R+U*.05*-Z.velocityX/.227,U*=hm(_,R,lt,Li(c,hn)),N.vars.scrollX=w(lt)),R=u(),lt=R+U*.05*-Z.velocityY/.227,U*=hm(u,R,lt,Li(c,ze)),N.vars.scrollY=P(lt),N.invalidate().duration(U).play(.01),(br&&N.vars.scrollY>=l||R>=l-1)&&kt.to({},{onUpdate:W,duration:U})}o&&o(Z)},t.onWheel=function(){N._ts&&N.pause(),dn()-g>1e3&&(v=0,g=dn())},t.onChange=function(Z,z,U,R,lt){if(ps!==v&&M(),z&&n&&_(w(R[2]===z?D+(Z.startX-Z.x):_()+z-R[1])),U){u.offset&&y();var xt=lt[2]===U,Bt=xt?V+Z.startY-Z.y:u()+U-lt[1],X=P(Bt);xt&&Bt!==X&&(V+=X-Bt),u(X)}(U||z)&&Zi()},t.onEnable=function(){hh(c,n?!1:"x"),Vt.addEventListener("refresh",W),je(pe,"resize",W),u.smooth&&(u.target.style.scrollBehavior="auto",u.smooth=_.smooth=!1),C.enable()},t.onDisable=function(){hh(c,!0),Ke(pe,"resize",W),Vt.removeEventListener("refresh",W),C.kill()},t.lockAxis=t.lockAxis!==!1,a=new Ne(t),a.iOS=br,br&&!u()&&u(1),br&&kt.ticker.add(Ii),K=a._dc,N=kt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Rm(u,u(),function(){return N.pause()})},onUpdate:Zi,onComplete:K.vars.onComplete}),a};Vt.sort=function(r){return ue.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};Vt.observe=function(r){return new Ne(r)};Vt.normalizeScroll=function(r){if(typeof r>"u")return bn;if(r===!0&&bn)return bn.enable();if(r===!1){bn&&bn.kill(),bn=r;return}var t=r instanceof Ne?r:jy(r);return bn&&bn.target===t.target&&bn.kill(),ms(t.target)&&(bn=t),t};Vt.core={_getVelocityProp:wl,_inputObserver:Pm,_scrollers:ce,_proxies:fi,bridge:{ss:function(){jn||_s("scrollStart"),jn=dn()},ref:function(){return fn}}};vm()&&kt.registerPlugin(Vt);Et.registerPlugin(Vt,ui);var Im=()=>{Et.matchMedia().add("(min-width: 992px)",()=>{let t=document.querySelector(".casestudies-heading-section");t&&Et.to(t,{ease:"none",scrollTrigger:{trigger:t,start:"top top",endTrigger:".casestudies-wrapper",end:"bottom bottom",pin:!0,pinSpacing:!1,scrub:!0,anticipatePin:1}})})};var Lm=()=>{document.querySelectorAll(".client-list_wrapper").forEach(r=>{let t=r.querySelector(".client-list_wrap");if(!t)return;let e=Array.from(t.children),n=t.scrollWidth;e.forEach(i=>{let s=i.cloneNode(!0);s.style.width=`${i.offsetWidth}px`,t.appendChild(s)}),t.style.width=`${n*2}px`,Et.fromTo(t,{x:0},{x:-n,duration:60,ease:"linear",repeat:-1,force3D:!0})})};var Fm=()=>{let r=document.querySelectorAll("[data-contact-popup-toggler]"),t=document.querySelector("[data-contact-popup]");var e=0;if(!r||!t)return;let n=t.querySelector("[data-contact-popup-close]");if(!n)return;let i=t.querySelector(".contact-popup_box");if(!i)return;let s=(o,a)=>{let l=document.createElement("script"),c=document.getElementsByTagName("script")[0];l.async=1,l.onload=l.onreadystatechange=(h,f)=>{(f||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,f||a&&a())},l.src=o,c.parentNode.insertBefore(l,c)};r.forEach(o=>{o.addEventListener("click",a=>{a.preventDefault,e?(t.classList.add("-open"),document.body.classList.add("-popup-open")):s("https://embed.typeform.com/next/embed.js",()=>{e=1,t.classList.add("-open"),document.body.classList.add("-popup-open")})})}),n.addEventListener("click",o=>{o.preventDefault,t.classList.remove("-open"),document.body.classList.remove("-popup-open")}),t.addEventListener("click",o=>{i.contains(o.target)||(t.classList.remove("-open"),document.body.classList.remove("-popup-open"))}),new URL(document.location).searchParams.has("invicible")&&setTimeout(()=>{s("https://embed.typeform.com/next/embed.js",()=>{e=1,setTimeout(()=>{t.classList.add("-open"),document.body.classList.add("-popup-open")},200)})},2e3)};var Nm=()=>{let r=new Date().toLocaleTimeString("pl-PL",{timeZone:"Poland"}).split(":");return r[0]+" - "+r[1]},Um=()=>{let r=document.querySelectorAll("[data-current-time]");r.length>0&&r.forEach(t=>{t.textContent=Nm(),setInterval(()=>{t.textContent=Nm()},5e3)})};var Qy=/(?:^\s+|\s+$)/g,Th=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function oo(r){var t=r.nodeType,e="";if(t===1||t===9||t===11){if(typeof r.textContent=="string")return r.textContent;for(r=r.firstChild;r;r=r.nextSibling)e+=oo(r)}else if(t===3||t===4)return r.nodeValue;return e}function pi(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(Qy,"")),t&&t!=="")return r.replace(/>/g,"&gt;").replace(/</g,"&lt;").split(t);for(var i=[],s=r.length,o=0,a,l;o<s;o++)l=r.charAt(o),(l.charCodeAt(0)>=55296&&l.charCodeAt(0)<=56319||r.charCodeAt(o+1)>=65024&&r.charCodeAt(o+1)<=65039)&&(a=((r.substr(o,12).split(Th)||[])[1]||"").length||2,l=r.substr(o,a),i.emoji=1,o+=a-1),i.push(l===">"?"&gt;":l==="<"?"&lt;":n&&l===" "&&(r.charAt(o-1)===" "||r.charAt(o+1)===" ")?"&nbsp;":l);return i}var ao,Ch,km,Ea,zm,Xl,tv=/(?:\r|\n|\t\t)/g,ev=/(?:\s\s+)/g,nv="\xA0",Vm=function(t){ao=document,Ch=window,Ea=Ea||t||Ch.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),Ea&&(Xl=Ea.utils.toArray,zm=Ea.core.context||function(){},km=1)},iv=1,Hm=function(t){return Ch.getComputedStyle(t)},Dh=function(t){return t.position==="absolute"||t.absolute===!0},rv=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},sv=" style='position:relative;display:inline-block;'",Om=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+sv+(t?" class='"+t+(n?i++:"")+"'>":">")}},Gm=function r(t,e,n){var i=t.nodeType;if(i===1||i===9||i===11)for(t=t.firstChild;t;t=t.nextSibling)r(t,e,n);else(i===3||i===4)&&(t.nodeValue=t.nodeValue.split(e).join(n))},Ah=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},Bm=function(t,e,n){for(var i;t&&t!==e;){if(i=t._next||t.nextSibling,i)return i.textContent.charAt(0)===n;t=t.parentNode||t._parent}},ov=function r(t){var e=Xl(t.childNodes),n=e.length,i,s;for(i=0;i<n;i++)s=e[i],s._isSplit?r(s):i&&s.previousSibling&&s.previousSibling.nodeType===3?(s.previousSibling.nodeValue+=s.nodeType===3?s.nodeValue:s.firstChild.nodeValue,t.removeChild(s)):s.nodeType!==3&&(t.insertBefore(s.firstChild,s),t.removeChild(s))},Fi=function(t,e){return parseFloat(e[t])||0},av=function(t,e,n,i,s,o,a){var l=Hm(t),c=Fi("paddingLeft",l),h=-999,f=Fi("borderBottomWidth",l)+Fi("borderTopWidth",l),d=Fi("borderLeftWidth",l)+Fi("borderRightWidth",l),u=Fi("paddingTop",l)+Fi("paddingBottom",l),_=Fi("paddingLeft",l)+Fi("paddingRight",l),p=Fi("fontSize",l)*(e.lineThreshold||.2),m=l.textAlign,g=[],b=[],v=[],S=e.wordDelimiter||" ",C=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",w=s&&~T.indexOf("lines")?[]:null,P=~T.indexOf("words"),M=~T.indexOf("chars"),y=Dh(e),I=e.linesClass,N=~(I||"").indexOf("++"),D=[],V=l.display==="flex",K=t.style.display,W,Z,z,U,R,lt,xt,Bt,X,at,yt,ut;for(N&&(I=I.split("++").join("")),V&&(t.style.display="block"),Z=t.getElementsByTagName("*"),z=Z.length,R=[],W=0;W<z;W++)R[W]=Z[W];if(w||y)for(W=0;W<z;W++)U=R[W],lt=U.parentNode===t,(lt||y||M&&!P)&&(ut=U.offsetTop,w&&lt&&Math.abs(ut-h)>p&&(U.nodeName!=="BR"||W===0)&&(xt=[],w.push(xt),h=ut),y&&(U._x=U.offsetLeft,U._y=ut,U._w=U.offsetWidth,U._h=U.offsetHeight),w&&((U._isSplit&&lt||!M&&lt||P&&lt||!P&&U.parentNode.parentNode===t&&!U.parentNode._isSplit)&&(xt.push(U),U._x-=c,Bm(U,t,S)&&(U._wordEnd=!0)),U.nodeName==="BR"&&(U.nextSibling&&U.nextSibling.nodeName==="BR"||W===0)&&w.push([])));for(W=0;W<z;W++){if(U=R[W],lt=U.parentNode===t,U.nodeName==="BR"){w||y?(U.parentNode&&U.parentNode.removeChild(U),R.splice(W--,1),z--):P||t.appendChild(U);continue}if(y&&(X=U.style,!P&&!lt&&(U._x+=U.parentNode._x,U._y+=U.parentNode._y),X.left=U._x+"px",X.top=U._y+"px",X.position="absolute",X.display="block",X.width=U._w+1+"px",X.height=U._h+"px"),!P&&M)if(U._isSplit)for(U._next=Z=U.nextSibling,U.parentNode.appendChild(U);Z&&Z.nodeType===3&&Z.textContent===" ";)U._next=Z.nextSibling,U.parentNode.appendChild(Z),Z=Z.nextSibling;else U.parentNode._isSplit?(U._parent=U.parentNode,!U.previousSibling&&U.firstChild&&(U.firstChild._isFirst=!0),U.nextSibling&&U.nextSibling.textContent===" "&&!U.nextSibling.nextSibling&&D.push(U.nextSibling),U._next=U.nextSibling&&U.nextSibling._isFirst?null:U.nextSibling,U.parentNode.removeChild(U),R.splice(W--,1),z--):lt||(ut=!U.nextSibling&&Bm(U.parentNode,t,S),U.parentNode._parent&&U.parentNode._parent.appendChild(U),ut&&U.parentNode.appendChild(ao.createTextNode(" ")),C==="span"&&(U.style.display="inline"),g.push(U));else U.parentNode._isSplit&&!U._isSplit&&U.innerHTML!==""?b.push(U):M&&!U._isSplit&&(C==="span"&&(U.style.display="inline"),g.push(U))}for(W=D.length;--W>-1;)D[W].parentNode.removeChild(D[W]);if(w){for(y&&(at=ao.createElement(C),t.appendChild(at),yt=at.offsetWidth+"px",ut=at.offsetParent===t?0:t.offsetLeft,t.removeChild(at)),X=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Bt=S===" "&&(!y||!P&&!M),W=0;W<w.length;W++){for(xt=w[W],at=ao.createElement(C),at.style.cssText="display:block;text-align:"+m+";position:"+(y?"absolute;":"relative;"),I&&(at.className=I+(N?W+1:"")),v.push(at),z=xt.length,Z=0;Z<z;Z++)xt[Z].nodeName!=="BR"&&(U=xt[Z],at.appendChild(U),Bt&&U._wordEnd&&at.appendChild(ao.createTextNode(" ")),y&&(Z===0&&(at.style.top=U._y+"px",at.style.left=c+ut+"px"),U.style.top="0px",ut&&(U.style.left=U._x-ut+"px")));z===0?at.innerHTML="&nbsp;":!P&&!M&&(ov(at),Gm(at,"\xA0"," ")),y&&(at.style.width=yt,at.style.height=U._h+"px"),t.appendChild(at)}t.style.cssText=X}y&&(a>t.clientHeight&&(t.style.height=a-u+"px",t.clientHeight<a&&(t.style.height=a+f+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+d+"px"))),V&&(K?t.style.display=K:t.style.removeProperty("display")),Ah(n,g),P&&Ah(i,b),Ah(s,v)},lv=function(t,e,n,i){var s=e.tag?e.tag:e.span?"span":"div",o=e.type||e.split||"chars,words,lines",a=~o.indexOf("chars"),l=Dh(e),c=e.wordDelimiter||" ",h=function(y){return y===c||y===nv&&c===" "},f=c!==" "?"":l?"&#173; ":" ",d="</"+s+">",u=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:rv:null,p,m,g,b,v,S,C,T,w=ao.createElement("div"),P=t.parentNode;for(P.insertBefore(w,t),w.textContent=t.nodeValue,P.removeChild(t),t=w,p=oo(t),C=p.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(p=p.replace(ev," ").replace(tv,"")),C&&(p=p.split("<").join("{{LT}}")),v=p.length,m=(p.charAt(0)===" "?f:"")+n(),g=0;g<v;g++)if(S=p.charAt(g),_&&(T=_(p.substr(g),e.specialChars)))S=p.substr(g,T||1),m+=a&&S!==" "?i()+S+"</"+s+">":S,g+=T-1;else if(h(S)&&!h(p.charAt(g-1))&&g){for(m+=u?d:"",u=0;h(p.charAt(g+1));)m+=f,g++;g===v-1?m+=f:p.charAt(g+1)!==")"&&(m+=f+n(),u=1)}else S==="{"&&p.substr(g,6)==="{{LT}}"?(m+=a?i()+"{{LT}}</"+s+">":"{{LT}}",g+=5):S.charCodeAt(0)>=55296&&S.charCodeAt(0)<=56319||p.charCodeAt(g+1)>=65024&&p.charCodeAt(g+1)<=65039?(b=((p.substr(g,12).split(Th)||[])[1]||"").length||2,m+=a&&S!==" "?i()+p.substr(g,b)+"</"+s+">":p.substr(g,b),g+=b-1):m+=a&&S!==" "?i()+S+"</"+s+">":S;t.outerHTML=m+(u?d:""),C&&Gm(P,"{{LT}}","<")},cv=function r(t,e,n,i){var s=Xl(t.childNodes),o=s.length,a=Dh(e),l,c;if(t.nodeType!==3||o>1){for(e.absolute=!1,l=0;l<o;l++)c=s[l],c._next=c._isFirst=c._parent=c._wordEnd=null,(c.nodeType!==3||/\S+/.test(c.nodeValue))&&(a&&c.nodeType!==3&&Hm(c).display==="inline"&&(c.style.display="inline-block",c.style.position="relative"),c._isSplit=!0,r(c,e,n,i));e.absolute=a,t._isSplit=!0;return}lv(t,e,n,i)},Qn=function(){function r(e,n){km||Vm(),this.elements=Xl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},zm(this),iv&&this.split(n)}var t=r.prototype;return t.split=function(n){this.isSplit&&this.revert(),this.vars=n=n||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var i=this.elements.length,s=n.tag?n.tag:n.span?"span":"div",o=Om(n.wordsClass,s),a=Om(n.charsClass,s),l,c,h;--i>-1;)h=this.elements[i],this._originals[i]={html:h.innerHTML,style:h.getAttribute("style")},l=h.clientHeight,c=h.clientWidth,cv(h,n,o,a),av(h,n,this.chars,this.words,this.lines,c,l);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},t.revert=function(){var n=this._originals;if(!n)throw"revert() call wasn't scoped properly.";return this.elements.forEach(function(i,s){i.innerHTML=n[s].html,i.setAttribute("style",n[s].style)}),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.create=function(n,i){return new r(n,i)},r}();Qn.version="3.12.5";Qn.register=Vm;var Wm=()=>{Et.registerPlugin(Vt,Qn),document.querySelectorAll("[data-header-animation]").forEach(t=>{let e=t.querySelector("h2");if(e.classList.contains("is-all-strong")&&(e=e.querySelector("strong")),!e)return;let n=new Qn(e,{type:"lines",tag:"span"}),i=new Qn(e,{type:"lines",linesClass:"header_line"});n.lines=i.chars.concat(n.lines);let s=Et.timeline({scrollTrigger:{trigger:t,start:"top bottom",toggleActions:"play none none reset"}});s.fromTo(n.lines,{y:100},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"+=0.25");let o=t.querySelector(".hero_holo");o&&s.fromTo(o,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25");let a=t.querySelector(".button");a&&s.fromTo(a,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"-=0.75")})};var Xm=()=>{if(Et.registerPlugin(Vt,Qn),document.querySelector(".hero_grid")){let r=document.querySelector(".hero_grid"),t=r.querySelector(".hero_holo"),e=r.querySelector("h1"),n=r.querySelector(".paragraph-big"),i=new Qn(e,{type:"lines",tag:"span"}),s=new Qn(e,{type:"lines",linesClass:"header_line"});i.lines=s.chars.concat(i.lines),Et.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(n,{autoAlpha:0},{autoAlpha:1,duration:.35,ease:"circ.out"},"+=1.75").fromTo(i.lines,{y:"100%"},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"-=0.25").fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25")}};var Ym=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||Et.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){Et.to(r,{y:"-100dvh",duration:.75})}},"<")};var qm=()=>{Et.registerPlugin(Vt,Qn);let r=document.querySelector(".mastery_wrapper"),t=document.getElementById("mastery-border"),e=document.getElementById("mastery-border-small"),n=document.getElementById("mastery-sticker"),i=document.querySelector(".mastery_p");Et.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(i,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+=0.25").to(t,{y:"0.75rem",x:"-0.75rem",duration:.75,ease:"circ.out"},"1.5").to(e,{x:"-0.75rem",y:"0.75rem",duration:.75,ease:"circ.out"},"1.5").to(n,{opacity:1,duration:.5,ease:"power1.inOut"},"1.5").to(n,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(n,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(n,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"})};Et.registerPlugin(Vt);var Zm=()=>{let r="ontouchstart"in window,t=document.querySelector(".projects_faq");if(!t)return;let e=t.querySelectorAll(".projects_item");e.forEach((n,i)=>{uv(t,e,n,i),hv(n),fv(n,t),window.innerWidth>768&&!r&&dv(n)})};function uv(r,t,e,n){let i=t.length*.25;if(Et.timeline({scrollTrigger:{trigger:r,start:"top center",scrub:!1}}).fromTo(e,{duration:1,opacity:0,y:100},{opacity:1,y:0,duration:.75,delay:n*.25},"<"),n===0){let s=e.querySelector(".projects_item_content").offsetHeight,o=r.offsetHeight;r.style.height=`${o+s}px`,Et.timeline({scrollTrigger:{trigger:r,start:"top center",scrub:!1}}).to(e,{delay:i,onComplete:function(){let a=e.querySelector(".projects_item_header"),l=e.querySelector(".projects_item_content");!a||!l||(e.classList.add("-open"),a.setAttribute("aria-expanded","true"),l.setAttribute("aria-hidden","false"),setTimeout(()=>{Vt.refresh()},500))}},"<")}}function hv(r){let t=r.querySelector(".projects_item_header"),e=r.querySelector(".projects_item_content");!t||!e||(t.setAttribute("tabindex","0"),t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true"))}function fv(r,t){let e=r.querySelector(".projects_item_header");e&&(e.addEventListener("click",()=>{[...t.querySelectorAll(".projects_item_header")].forEach(i=>{let s=i.parentNode.querySelector(".projects_item_content");if(t.style.height="auto",i!==e)i.parentNode.classList.remove("-open"),i.setAttribute("aria-expanded",!1),s.setAttribute("aria-hidden",!0);else{let o=e.getAttribute("aria-expanded")!=="false";i.setAttribute("aria-expanded",!o),s.setAttribute("aria-hidden",o),i.parentNode.classList.toggle("-open")}if(!i.classList.contains("-open")){let o=i.parentNode.parentNode.querySelector(".projects_item_logo");o&&Et.to(o,{duration:.7,opacity:0,visibility:"hidden"})}}),setTimeout(()=>{Vt.refresh()},500)}),e.addEventListener("keyup",function(n){n.preventDefault(),n.keyCode===13&&e.click()}))}function dv(r){let t=r.parentNode.querySelector(".projects_item_logo");t&&window.addEventListener("mousemove",e=>{let n=e.clientX,i=e.clientY,s=document.querySelector(".smooth-container"),o=window.getComputedStyle(s),a=new WebKitCSSMatrix(o.transform);if(r.contains(e.target)&&r.classList.contains("-open")){let l=r.querySelector(".projects_item_header");Et.to(t,{x:n+10,y:i+10+a.f*-1,duration:.7,ease:"power4",opacity:1,visibility:"visible",scale:l.contains(e.target)?.8:1})}else Et.to(t,{duration:.7,opacity:0})})}var Yl=function(){function r(e){this.chars=pi(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=Jm(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=Jm(n-this.length,this.chars);this.length=n},r}(),xs,Qm,tg=function(){return xs||typeof window<"u"&&(xs=window.gsap)&&xs.registerPlugin&&xs},pv=1,$m=/\s+/g,Jm=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Km=Rh.toLowerCase(),mv={upperCase:new Yl(Rh),lowerCase:new Yl(Km),upperAndLowerCase:new Yl(Rh+Km)},jm=function(){Qm=xs=tg()},Ta={version:"3.12.5",name:"scrambleText",register:function(t,e,n){xs=t,jm()},init:function(t,e,n,i,s){if(Qm||jm(),this.prop="innerHTML"in t?"innerHTML":"textContent"in t?"textContent":0,!!this.prop){this.target=t,typeof e!="object"&&(e={text:e});var o=e.text||e.value||"",a=e.trim!==!1,l=this,c,h,f,d;return l.delimiter=c=e.delimiter||"",l.original=pi(oo(t).replace($m," ").split("&nbsp;").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=pi((o||"").replace($m," "),c,a),l.hasClass=!!(e.newClass||e.oldClass),l.newClass=e.newClass,l.oldClass=e.oldClass,d=c==="",l.textHasEmoji=d&&!!l.text.emoji,l.charsHaveEmoji=!!e.chars&&!!pi(e.chars).emoji,l.length=d?l.original.length:l.original.join(c).length,l.lengthDif=(d?l.text.length:l.text.join(c).length)-l.length,l.fillChar=e.fillChar||e.chars&&~e.chars.indexOf(" ")?"&nbsp;":"",l.charSet=f=mv[e.chars||"upperCase"]||new Yl(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,h=l.length+Math.max(l.lengthDif,0),h>f.length&&f.grow(h),l.chars=f.sets[l.setIndex],l.revealDelay=e.revealDelay||0,l.tweenLength=e.tweenLength!==!1,l.tween=n,l.rightToLeft=!!e.rightToLeft,l._props.push("scrambleText","text"),pv}},render:function(t,e){var n=e.target,i=e.prop,s=e.text,o=e.delimiter,a=e.tween,l=e.prevScrambleTime,c=e.revealDelay,h=e.setIndex,f=e.chars,d=e.charSet,u=e.length,_=e.textHasEmoji,p=e.charsHaveEmoji,m=e.lengthDif,g=e.tweenLength,b=e.oldClass,v=e.newClass,S=e.rightToLeft,C=e.fillChar,T=e.speed,w=e.original,P=e.hasClass,M=s.length,y=a._time,I=y-l,N,D,V,K,W,Z,z,U,R,lt,xt;c&&(a._from&&(y=a._dur-y),t=y===0?0:y<c?1e-6:y===a._dur?1:a._ease((y-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),S&&(t=1-t),N=~~(t*M+.5),t?((I>T||I<-T)&&(e.setIndex=h=(h+(Math.random()*19|0))%20,e.chars=d.sets[h],e.prevScrambleTime+=I),K=f):K=w.join(o),xt=a._from?t:1-t,lt=u+(g?a._from?xt*xt*xt:1-xt*xt*xt:1)*m,S?t===1&&(a._from||a.data==="isFromStart")?(V="",K=w.join(o)):(z=s.slice(N).join(o),p?V=pi(K).slice(0,lt-(_?pi(z):z).length+.5|0).join(""):V=K.substr(0,lt-(_?pi(z):z).length+.5|0),K=z):(V=s.slice(0,N).join(o),D=(_?pi(V):V).length,p?K=pi(K).slice(D,lt+.5|0).join(""):K=K.substr(D,lt-D+.5|0)),P?(U=S?b:v,R=S?v:b,W=U&&N!==0,Z=R&&N!==M,z=(W?"<span class='"+U+"'>":"")+V+(W?"</span>":"")+(Z?"<span class='"+R+"'>":"")+o+K+(Z?"</span>":"")):z=V+o+K,n[i]=C==="&nbsp;"&&~z.indexOf(" ")?z.split(" ").join("&nbsp;&nbsp;"):z}};Ta.emojiSafeSplit=pi;Ta.getText=oo;tg()&&xs.registerPlugin(Ta);Et.registerPlugin(Ta);var eg=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{Et.matchMedia().add("(min-width: 768px)",()=>{Et.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};Et.registerPlugin(ui,Vt);var ng=()=>{Et.registerPlugin(ui),ui.create({smooth:1.5,effects:!0}),Vt.refresh()};var $i,ys,Fh,$l,Aa,ql,Zl,Ca,mi="transform",Lh=mi+"Origin",ig,rg=function(t){var e=t.ownerDocument||t;for(!(mi in t.style)&&("msTransform"in t.style)&&(mi="msTransform",Lh=mi+"Origin");e.parentNode&&(e=e.parentNode););if(ys=window,Zl=new wr,e){$i=e,Fh=e.documentElement,$l=e.body,Ca=$i.createElementNS("http://www.w3.org/2000/svg","g"),Ca.style.transform="none";var n=e.createElement("div"),i=e.createElement("div"),s=e&&(e.body||e.firstElementChild);s&&s.appendChild&&(s.appendChild(n),n.appendChild(i),n.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),ig=i.offsetParent!==n,s.removeChild(n))}return e},gv=function(t){for(var e,n;t&&t!==$l;)n=t._gsap,n&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e},sg=[],og=[],_v=function(){return ys.pageYOffset||$i.scrollTop||Fh.scrollTop||$l.scrollTop||0},xv=function(){return ys.pageXOffset||$i.scrollLeft||Fh.scrollLeft||$l.scrollLeft||0},Nh=function(t){return t.ownerSVGElement||((t.tagName+"").toLowerCase()==="svg"?t:null)},yv=function r(t){if(ys.getComputedStyle(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},Ph=function r(t,e){if(t.parentNode&&($i||rg(t))){var n=Nh(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s=n?e?"rect":"g":"div",o=e!==2?0:100,a=e===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",c=$i.createElementNS?$i.createElementNS(i.replace(/^https/,"http"),s):$i.createElement(s);return e&&(n?(ql||(ql=r(t)),c.setAttribute("width",.01),c.setAttribute("height",.01),c.setAttribute("transform","translate("+o+","+a+")"),ql.appendChild(c)):(Aa||(Aa=r(t),Aa.style.cssText=l),c.style.cssText=l+"width:0.1px;height:0.1px;top:"+a+"px;left:"+o+"px",Aa.appendChild(c))),c}throw"Need document and parent."},vv=function(t){for(var e=new wr,n=0;n<t.numberOfItems;n++)e.multiply(t.getItem(n).matrix);return e},Sv=function(t){var e=t.getCTM(),n;return e||(n=t.style[mi],t.style[mi]="none",t.appendChild(Ca),e=Ca.getCTM(),t.removeChild(Ca),n?t.style[mi]=n:t.style.removeProperty(mi.replace(/([A-Z])/g,"-$1").toLowerCase())),e||Zl.clone()},Mv=function(t,e){var n=Nh(t),i=t===n,s=n?sg:og,o=t.parentNode,a,l,c,h,f,d;if(t===ys)return t;if(s.length||s.push(Ph(t,1),Ph(t,2),Ph(t,3)),a=n?ql:Aa,n)i?(c=Sv(t),h=-c.e/c.a,f=-c.f/c.d,l=Zl):t.getBBox?(c=t.getBBox(),l=t.transform?t.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?vv(l):l.getItem(0).matrix:Zl,h=l.a*c.x+l.c*c.y,f=l.b*c.x+l.d*c.y):(l=new wr,h=f=0),e&&t.tagName.toLowerCase()==="g"&&(h=f=0),(i?n:o).appendChild(a),a.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+h)+","+(l.f+f)+")");else{if(h=f=0,ig)for(l=t.offsetParent,c=t;c&&(c=c.parentNode)&&c!==l&&c.parentNode;)(ys.getComputedStyle(c)[mi]+"").length>4&&(h=c.offsetLeft,f=c.offsetTop,c=0);if(d=ys.getComputedStyle(t),d.position!=="absolute"&&d.position!=="fixed")for(l=t.offsetParent;o&&o!==l;)h+=o.scrollLeft||0,f+=o.scrollTop||0,o=o.parentNode;c=a.style,c.top=t.offsetTop-f+"px",c.left=t.offsetLeft-h+"px",c[mi]=d[mi],c[Lh]=d[Lh],c.position=d.position==="fixed"?"fixed":"absolute",t.parentNode.appendChild(a)}return a},Ih=function(t,e,n,i,s,o,a){return t.a=e,t.b=n,t.c=i,t.d=s,t.e=o,t.f=a,t},wr=function(){function r(e,n,i,s,o,a){e===void 0&&(e=1),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=1),o===void 0&&(o=0),a===void 0&&(a=0),Ih(this,e,n,i,s,o,a)}var t=r.prototype;return t.inverse=function(){var n=this.a,i=this.b,s=this.c,o=this.d,a=this.e,l=this.f,c=n*o-i*s||1e-10;return Ih(this,o/c,-i/c,-s/c,n/c,(s*l-o*a)/c,-(n*l-i*a)/c)},t.multiply=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f,h=n.a,f=n.c,d=n.b,u=n.d,_=n.e,p=n.f;return Ih(this,h*i+d*o,h*s+d*a,f*i+u*o,f*s+u*a,l+_*i+p*o,c+_*s+p*a)},t.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f;return i===n.a&&s===n.b&&o===n.c&&a===n.d&&l===n.e&&c===n.f},t.apply=function(n,i){i===void 0&&(i={});var s=n.x,o=n.y,a=this.a,l=this.b,c=this.c,h=this.d,f=this.e,d=this.f;return i.x=s*a+o*c+f||0,i.y=s*l+o*h+d||0,i},r}();function Er(r,t,e,n){if(!r||!r.parentNode||($i||rg(r)).documentElement===r)return new wr;var i=gv(r),s=Nh(r),o=s?sg:og,a=Mv(r,e),l=o[0].getBoundingClientRect(),c=o[1].getBoundingClientRect(),h=o[2].getBoundingClientRect(),f=a.parentNode,d=!n&&yv(r),u=new wr((c.left-l.left)/100,(c.top-l.top)/100,(h.left-l.left)/100,(h.top-l.top)/100,l.left+(d?0:xv()),l.top+(d?0:_v()));if(f.removeChild(a),i)for(l=i.length;l--;)c=i[l],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?u.inverse():u}function ag(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function bv(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var me,we,Hn,xi,ji,Uh,Ki,Vh,Ra,Dr,xg,Hh,Na,Yh,Pa,gi,Ia,jl,yg,Gh,tc=0,vg=function(){return typeof window<"u"},Sg=function(){return me||vg()&&(me=window.gsap)&&me.registerPlugin&&me},Cr=function(t){return typeof t=="function"},La=function(t){return typeof t=="object"},_i=function(t){return typeof t>"u"},Ql=function(){return!1},Fa="transform",Wh="transformOrigin",Tr=function(t){return Math.round(t*1e4)/1e4},Da=Array.isArray,Jl=function(t,e){var n=Hn.createElementNS?Hn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hn.createElement(t);return n.style?n:Hn.createElement(t)},lg=180/Math.PI,vs=1e20,wv=new wr,Ar=Date.now||function(){return new Date().getTime()},Ms=[],uo={},Ev=0,Tv=/^(?:a|input|textarea|button|select)$/i,cg=0,lo={},Ji={},Mg=function(t,e){var n={},i;for(i in t)n[i]=e?t[i]*e:t[i];return n},Av=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},ug=function r(t,e){for(var n=t.length,i;n--;)e?t[n].style.touchAction=e:t[n].style.removeProperty("touch-action"),i=t[n].children,i&&i.length&&r(i,e)},bg=function(){return Ms.forEach(function(t){return t()})},Cv=function(t){Ms.push(t),Ms.length===1&&me.ticker.add(bg)},hg=function(){return!Ms.length&&me.ticker.remove(bg)},fg=function(t){for(var e=Ms.length;e--;)Ms[e]===t&&Ms.splice(e,1);me.to(hg,{overwrite:!0,delay:15,duration:0,onComplete:hg,data:"_draggable"})},Dv=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Ye=function(t,e,n,i){if(t.addEventListener){var s=Na[e];i=i||(xg?{passive:!1}:null),t.addEventListener(s||e,n,i),s&&e!==s&&t.addEventListener(e,n,i)}},He=function(t,e,n,i){if(t.removeEventListener){var s=Na[e];t.removeEventListener(s||e,n,i),s&&e!==s&&t.removeEventListener(e,n,i)}},ti=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},Rv=function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0},Pv=function r(t){Yh=t.touches&&tc<t.touches.length,He(t.target,"touchend",r)},dg=function(t){Yh=t.touches&&tc<t.touches.length,Ye(t.target,"touchend",Pv)},ho=function(t){return we.pageYOffset||t.scrollTop||t.documentElement.scrollTop||t.body.scrollTop||0},fo=function(t){return we.pageXOffset||t.scrollLeft||t.documentElement.scrollLeft||t.body.scrollLeft||0},pg=function r(t,e){Ye(t,"scroll",e),po(t.parentNode)||r(t.parentNode,e)},mg=function r(t,e){He(t,"scroll",e),po(t.parentNode)||r(t.parentNode,e)},po=function(t){return!t||t===xi||t.nodeType===9||t===Hn.body||t===we||!t.nodeType||!t.parentNode},gg=function(t,e){var n=e==="x"?"Width":"Height",i="scroll"+n,s="client"+n;return Math.max(0,po(t)?Math.max(xi[i],ji[i])-(we["inner"+n]||xi[s]||ji[s]):t[i]-t[s])},Oh=function r(t,e){var n=gg(t,"x"),i=gg(t,"y");po(t)?t=Ji:r(t.parentNode,e),t._gsMaxScrollX=n,t._gsMaxScrollY=i,e||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},Bh=function(t,e,n){var i=t.style;i&&(_i(i[e])&&(e=Ra(e,t)||e),n==null?i.removeProperty&&i.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):i[e]=n)},Ua=function(t){return we.getComputedStyle(t instanceof Element?t:t.host||(t.parentNode||{}).host||t)},Ss={},co=function(t){if(t===we)return Ss.left=Ss.top=0,Ss.width=Ss.right=xi.clientWidth||t.innerWidth||ji.clientWidth||0,Ss.height=Ss.bottom=(t.innerHeight||0)-20<xi.clientHeight?xi.clientHeight:t.innerHeight||ji.clientHeight||0,Ss;var e=t.ownerDocument||Hn,n=_i(t.pageX)?!t.nodeType&&!_i(t.left)&&!_i(t.top)?t:Dr(t)[0].getBoundingClientRect():{left:t.pageX-fo(e),top:t.pageY-ho(e),right:t.pageX-fo(e)+1,bottom:t.pageY-ho(e)+1};return _i(n.right)&&!_i(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):_i(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},Oe=function(t,e,n){var i=t.vars,s=i[n],o=t._listeners[e],a;return Cr(s)&&(a=s.apply(i.callbackScope||t,i[n+"Params"]||[t.pointerEvent])),o&&t.dispatchEvent(e)===!1&&(a=!1),a},_g=function(t,e){var n=Dr(t)[0],i,s,o;return!n.nodeType&&n!==we?_i(t.left)?(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i}):(o={x:0,y:0},{left:t.left-o.x,top:t.top-o.y,width:t.width,height:t.height}):Iv(n,e)},ei={},Iv=function(t,e){e=Dr(e)[0];var n=t.getBBox&&t.ownerSVGElement,i=t.ownerDocument||Hn,s,o,a,l,c,h,f,d,u,_,p,m,g;if(t===we)a=ho(i),s=fo(i),o=s+(i.documentElement.clientWidth||t.innerWidth||i.body.clientWidth||0),l=a+((t.innerHeight||0)-20<i.documentElement.clientHeight?i.documentElement.clientHeight:t.innerHeight||i.body.clientHeight||0);else{if(e===we||_i(e))return t.getBoundingClientRect();s=a=0,n?(_=t.getBBox(),p=_.width,m=_.height):(t.viewBox&&(_=t.viewBox.baseVal)&&(s=_.x||0,a=_.y||0,p=_.width,m=_.height),p||(g=Ua(t),_=g.boxSizing==="border-box",p=(parseFloat(g.width)||t.clientWidth||0)+(_?0:parseFloat(g.borderLeftWidth)+parseFloat(g.borderRightWidth)),m=(parseFloat(g.height)||t.clientHeight||0)+(_?0:parseFloat(g.borderTopWidth)+parseFloat(g.borderBottomWidth)))),o=p,l=m}return t===e?{left:s,top:a,width:o-s,height:l-a}:(c=Er(e,!0).multiply(Er(t)),h=c.apply({x:s,y:a}),f=c.apply({x:o,y:a}),d=c.apply({x:o,y:l}),u=c.apply({x:s,y:l}),s=Math.min(h.x,f.x,d.x,u.x),a=Math.min(h.y,f.y,d.y,u.y),{left:s,top:a,width:Math.max(h.x,f.x,d.x,u.x)-s,height:Math.max(h.y,f.y,d.y,u.y)-a})},kh=function(t,e,n,i,s,o){var a={},l,c,h;if(e)if(s!==1&&e instanceof Array){if(a.end=l=[],h=e.length,La(e[0]))for(c=0;c<h;c++)l[c]=Mg(e[c],s);else for(c=0;c<h;c++)l[c]=e[c]*s;n+=1.1,i-=1.1}else Cr(e)?a.end=function(f){var d=e.call(t,f),u,_;if(s!==1)if(La(d)){u={};for(_ in d)u[_]=d[_]*s;d=u}else d*=s;return d}:a.end=e;return(n||n===0)&&(a.max=n),(i||i===0)&&(a.min=i),o&&(a.velocity=0),a},Lv=function r(t){var e;return!t||!t.getAttribute||t===ji?!1:(e=t.getAttribute("data-clickable"))==="true"||e!=="false"&&(Tv.test(t.nodeName+"")||t.getAttribute("contentEditable")==="true")?!0:r(t.parentNode)},Kl=function(t,e){for(var n=t.length,i;n--;)i=t[n],i.ondragstart=i.onselectstart=e?null:Ql,me.set(i,{lazy:!0,userSelect:e?"text":"none"})},Fv=function r(t){if(Ua(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},wg,Xh,Nv=function(t,e){t=me.utils.toArray(t)[0],e=e||{};var n=document.createElement("div"),i=n.style,s=t.firstChild,o=0,a=0,l=t.scrollTop,c=t.scrollLeft,h=t.scrollWidth,f=t.scrollHeight,d=0,u=0,_=0,p,m,g,b,v,S;wg&&e.force3D!==!1?(v="translate3d(",S="px,0px)"):Fa&&(v="translate(",S="px)"),this.scrollTop=function(C,T){if(!arguments.length)return-this.top();this.top(-C,T)},this.scrollLeft=function(C,T){if(!arguments.length)return-this.left();this.left(-C,T)},this.left=function(C,T){if(!arguments.length)return-(t.scrollLeft+a);var w=t.scrollLeft-c,P=a;if((w>2||w<-2)&&!T){c=t.scrollLeft,me.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-c),e.onKill&&e.onKill();return}C=-C,C<0?(a=C-.5|0,C=0):C>u?(a=C-u|0,C=u):a=0,(a||P)&&(this._skip||(i[Fa]=v+-a+"px,"+-o+S),a+d>=0&&(i.paddingRight=a+d+"px")),t.scrollLeft=C|0,c=t.scrollLeft},this.top=function(C,T){if(!arguments.length)return-(t.scrollTop+o);var w=t.scrollTop-l,P=o;if((w>2||w<-2)&&!T){l=t.scrollTop,me.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),e.onKill&&e.onKill();return}C=-C,C<0?(o=C-.5|0,C=0):C>_?(o=C-_|0,C=_):o=0,(o||P)&&(this._skip||(i[Fa]=v+-a+"px,"+-o+S)),t.scrollTop=C|0,l=t.scrollTop},this.maxScrollTop=function(){return _},this.maxScrollLeft=function(){return u},this.disable=function(){for(s=n.firstChild;s;)b=s.nextSibling,t.appendChild(s),s=b;t===n.parentNode&&t.removeChild(n)},this.enable=function(){if(s=t.firstChild,s!==n){for(;s;)b=s.nextSibling,n.appendChild(s),s=b;t.appendChild(n),this.calibrate()}},this.calibrate=function(C){var T=t.clientWidth===p,w,P,M;l=t.scrollTop,c=t.scrollLeft,!(T&&t.clientHeight===m&&n.offsetHeight===g&&h===t.scrollWidth&&f===t.scrollHeight&&!C)&&((o||a)&&(P=this.left(),M=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),w=Ua(t),(!T||C)&&(i.display="block",i.width="auto",i.paddingRight="0px",d=Math.max(0,t.scrollWidth-t.clientWidth),d&&(d+=parseFloat(w.paddingLeft)+(Xh?parseFloat(w.paddingRight):0))),i.display="inline-block",i.position="relative",i.overflow="visible",i.verticalAlign="top",i.boxSizing="content-box",i.width="100%",i.paddingRight=d+"px",Xh&&(i.paddingBottom=w.paddingBottom),p=t.clientWidth,m=t.clientHeight,h=t.scrollWidth,f=t.scrollHeight,u=t.scrollWidth-p,_=t.scrollHeight-m,g=n.offsetHeight,i.display="block",(P||M)&&(this.left(P),this.top(M)))},this.content=n,this.element=t,this._skip=!1,this.enable()},zh=function(t){if(vg()&&document.body){var e=window&&window.navigator;we=window,Hn=document,xi=Hn.documentElement,ji=Hn.body,Uh=Jl("div"),jl=!!window.PointerEvent,Ki=Jl("div"),Ki.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Ia=Ki.style.cursor==="grab"?"grab":"move",Pa=e&&e.userAgent.toLowerCase().indexOf("android")!==-1,Hh="ontouchstart"in xi&&"orientation"in we||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),Xh=function(){var n=Jl("div"),i=Jl("div"),s=i.style,o=ji,a;return s.display="inline-block",s.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),o.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,o.removeChild(n),a}(),Na=function(n){for(var i=n.split(","),s=("onpointerdown"in Uh?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Uh?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),o={},a=4;--a>-1;)o[i[a]]=s[a],o[s[a]]=i[a];try{xi.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){xg=1}}))}catch{}return o}("touchstart,touchmove,touchend,touchcancel"),Ye(Hn,"touchcancel",Ql),Ye(we,"touchmove",Ql),ji&&ji.addEventListener("touchstart",Ql),Ye(Hn,"contextmenu",function(){for(var n in uo)uo[n].isPressed&&uo[n].endDrag()}),me=Vh=Sg()}me?(gi=me.plugins.inertia,yg=me.core.context||function(){},Ra=me.utils.checkPrefix,Fa=Ra(Fa),Wh=Ra(Wh),Dr=me.utils.toArray,Gh=me.core.getStyleSaver,wg=!!Ra("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},Uv=function(){function r(e){this._listeners={},this.target=e||this}var t=r.prototype;return t.addEventListener=function(n,i){var s=this._listeners[n]||(this._listeners[n]=[]);~s.indexOf(i)||s.push(i)},t.removeEventListener=function(n,i){var s=this._listeners[n],o=s&&s.indexOf(i);o>=0&&s.splice(o,1)},t.dispatchEvent=function(n){var i=this,s;return(this._listeners[n]||[]).forEach(function(o){return o.call(i,{type:n,target:i.target})===!1&&(s=!1)}),s},r}(),Qi=function(r){bv(t,r);function t(e,n){var i;i=r.call(this)||this,Vh||zh(1),e=Dr(e)[0],i.styles=Gh&&Gh(e,"transform,left,top"),gi||(gi=me.plugins.inertia),i.vars=n=Mg(n||{}),i.target=e,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(n.dragResistance)||0,i.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,i.lockAxis=n.lockAxis,i.autoScroll=n.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!n.allowEventDefault,me.getProperty(e,"x");var s=(n.type||"x,y").toLowerCase(),o=~s.indexOf("x")||~s.indexOf("y"),a=s.indexOf("rotation")!==-1,l=a?"rotation":o?"x":"left",c=o?"y":"top",h=!!(~s.indexOf("x")||~s.indexOf("left")||s==="scroll"),f=!!(~s.indexOf("y")||~s.indexOf("top")||s==="scroll"),d=n.minimumMovement||2,u=ag(i),_=Dr(n.trigger||n.handle||e),p={},m=0,g=!1,b=n.autoScrollMarginTop||40,v=n.autoScrollMarginRight||40,S=n.autoScrollMarginBottom||40,C=n.autoScrollMarginLeft||40,T=n.clickableTest||Lv,w=0,P=e._gsap||me.core.getCache(e),M=Fv(e),y=function(L,st){return parseFloat(P.get(e,L,st))},I=e.ownerDocument||Hn,N,D,V,K,W,Z,z,U,R,lt,xt,Bt,X,at,yt,ut,It,Ht,q,jt,Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St=function(L){return ti(L),L.stopImmediatePropagation&&L.stopImmediatePropagation(),!1},mt=function bt(L){if(u.autoScroll&&u.isDragging&&(g||It)){var st=e,O=u.autoScroll*15,Q,pt,nt,Tt,dt,Rt,Gt,Ot;for(g=!1,Ji.scrollTop=we.pageYOffset!=null?we.pageYOffset:I.documentElement.scrollTop!=null?I.documentElement.scrollTop:I.body.scrollTop,Ji.scrollLeft=we.pageXOffset!=null?we.pageXOffset:I.documentElement.scrollLeft!=null?I.documentElement.scrollLeft:I.body.scrollLeft,Tt=u.pointerX-Ji.scrollLeft,dt=u.pointerY-Ji.scrollTop;st&&!pt;)pt=po(st.parentNode),Q=pt?Ji:st.parentNode,nt=pt?{bottom:Math.max(xi.clientHeight,we.innerHeight||0),right:Math.max(xi.clientWidth,we.innerWidth||0),left:0,top:0}:Q.getBoundingClientRect(),Rt=Gt=0,f&&(Ot=Q._gsMaxScrollY-Q.scrollTop,Ot<0?Gt=Ot:dt>nt.bottom-S&&Ot?(g=!0,Gt=Math.min(Ot,O*(1-Math.max(0,nt.bottom-dt)/S)|0)):dt<nt.top+b&&Q.scrollTop&&(g=!0,Gt=-Math.min(Q.scrollTop,O*(1-Math.max(0,dt-nt.top)/b)|0)),Gt&&(Q.scrollTop+=Gt)),h&&(Ot=Q._gsMaxScrollX-Q.scrollLeft,Ot<0?Rt=Ot:Tt>nt.right-v&&Ot?(g=!0,Rt=Math.min(Ot,O*(1-Math.max(0,nt.right-Tt)/v)|0)):Tt<nt.left+C&&Q.scrollLeft&&(g=!0,Rt=-Math.min(Q.scrollLeft,O*(1-Math.max(0,Tt-nt.left)/C)|0)),Rt&&(Q.scrollLeft+=Rt)),pt&&(Rt||Gt)&&(we.scrollTo(Q.scrollLeft,Q.scrollTop),ot(u.pointerX+Rt,u.pointerY+Gt)),st=Q}if(It){var ne=u.x,fe=u.y;a?(u.deltaX=ne-parseFloat(P.rotation),u.rotation=ne,P.rotation=ne+"deg",P.renderTransform(1,P)):D?(f&&(u.deltaY=fe-D.top(),D.top(fe)),h&&(u.deltaX=ne-D.left(),D.left(ne))):o?(f&&(u.deltaY=fe-parseFloat(P.y),P.y=fe+"px"),h&&(u.deltaX=ne-parseFloat(P.x),P.x=ne+"px"),P.renderTransform(1,P)):(f&&(u.deltaY=fe-parseFloat(e.style.top||0),e.style.top=fe+"px"),h&&(u.deltaX=ne-parseFloat(e.style.left||0),e.style.left=ne+"px")),U&&!L&&!A&&(A=!0,Oe(u,"drag","onDrag")===!1&&(h&&(u.x-=u.deltaX),f&&(u.y-=u.deltaY),bt(!0)),A=!1)}It=!1},ct=function(L,st){var O=u.x,Q=u.y,pt,nt;e._gsap||(P=me.core.getCache(e)),P.uncache&&me.getProperty(e,"x"),o?(u.x=parseFloat(P.x),u.y=parseFloat(P.y)):a?u.x=u.rotation=parseFloat(P.rotation):D?(u.y=D.top(),u.x=D.left()):(u.y=parseFloat(e.style.top||(nt=Ua(e))&&nt.top)||0,u.x=parseFloat(e.style.left||(nt||{}).left)||0),(q||jt||Ft)&&!st&&(u.isDragging||u.isThrowing)&&(Ft&&(lo.x=u.x,lo.y=u.y,pt=Ft(lo),pt.x!==u.x&&(u.x=pt.x,It=!0),pt.y!==u.y&&(u.y=pt.y,It=!0)),q&&(pt=q(u.x),pt!==u.x&&(u.x=pt,a&&(u.rotation=pt),It=!0)),jt&&(pt=jt(u.y),pt!==u.y&&(u.y=pt),It=!0)),It&&mt(!0),L||(u.deltaX=u.x-O,u.deltaY=u.y-Q,Oe(u,"throwupdate","onThrowUpdate"))},Nt=function(L,st,O,Q){return st==null&&(st=-vs),O==null&&(O=vs),Cr(L)?function(pt){var nt=u.isPressed?1-u.edgeResistance:1;return L.call(u,(pt>O?O+(pt-O)*nt:pt<st?st+(pt-st)*nt:pt)*Q)*Q}:Da(L)?function(pt){for(var nt=L.length,Tt=0,dt=vs,Rt,Gt;--nt>-1;)Rt=L[nt],Gt=Rt-pt,Gt<0&&(Gt=-Gt),Gt<dt&&Rt>=st&&Rt<=O&&(Tt=nt,dt=Gt);return L[Tt]}:isNaN(L)?function(pt){return pt}:function(){return L*Q}},ft=function(L,st,O,Q,pt,nt,Tt){return nt=nt&&nt<vs?nt*nt:vs,Cr(L)?function(dt){var Rt=u.isPressed?1-u.edgeResistance:1,Gt=dt.x,Ot=dt.y,ne,fe,ge;return dt.x=Gt=Gt>O?O+(Gt-O)*Rt:Gt<st?st+(Gt-st)*Rt:Gt,dt.y=Ot=Ot>pt?pt+(Ot-pt)*Rt:Ot<Q?Q+(Ot-Q)*Rt:Ot,ne=L.call(u,dt),ne!==dt&&(dt.x=ne.x,dt.y=ne.y),Tt!==1&&(dt.x*=Tt,dt.y*=Tt),nt<vs&&(fe=dt.x-Gt,ge=dt.y-Ot,fe*fe+ge*ge>nt&&(dt.x=Gt,dt.y=Ot)),dt}:Da(L)?function(dt){for(var Rt=L.length,Gt=0,Ot=vs,ne,fe,ge,le;--Rt>-1;)ge=L[Rt],ne=ge.x-dt.x,fe=ge.y-dt.y,le=ne*ne+fe*fe,le<Ot&&(Gt=Rt,Ot=le);return Ot<=nt?L[Gt]:dt}:function(dt){return dt}},vt=function(){var L,st,O,Q;z=!1,D?(D.calibrate(),u.minX=xt=-D.maxScrollLeft(),u.minY=X=-D.maxScrollTop(),u.maxX=lt=u.maxY=Bt=0,z=!0):n.bounds&&(L=_g(n.bounds,e.parentNode),a?(u.minX=xt=L.left,u.maxX=lt=L.left+L.width,u.minY=X=u.maxY=Bt=0):!_i(n.bounds.maxX)||!_i(n.bounds.maxY)?(L=n.bounds,u.minX=xt=L.minX,u.minY=X=L.minY,u.maxX=lt=L.maxX,u.maxY=Bt=L.maxY):(st=_g(e,e.parentNode),u.minX=xt=Math.round(y(l,"px")+L.left-st.left),u.minY=X=Math.round(y(c,"px")+L.top-st.top),u.maxX=lt=Math.round(xt+(L.width-st.width)),u.maxY=Bt=Math.round(X+(L.height-st.height))),xt>lt&&(u.minX=lt,u.maxX=lt=xt,xt=u.minX),X>Bt&&(u.minY=Bt,u.maxY=Bt=X,X=u.minY),a&&(u.minRotation=xt,u.maxRotation=lt),z=!0),n.liveSnap&&(O=n.liveSnap===!0?n.snap||{}:n.liveSnap,Q=Da(O)||Cr(O),a?(q=Nt(Q?O:O.rotation,xt,lt,1),jt=null):O.points?Ft=ft(Q?O:O.points,xt,lt,X,Bt,O.radius,D?-1:1):(h&&(q=Nt(Q?O:O.x||O.left||O.scrollLeft,xt,lt,D?-1:1)),f&&(jt=Nt(Q?O:O.y||O.top||O.scrollTop,X,Bt,D?-1:1))))},$t=function(){u.isThrowing=!1,Oe(u,"throwcomplete","onThrowComplete")},ht=function(){u.isThrowing=!1},Ct=function(L,st){var O,Q,pt,nt;L&&gi?(L===!0&&(O=n.snap||n.liveSnap||{},Q=Da(O)||Cr(O),L={resistance:(n.throwResistance||n.resistance||1e3)/(a?10:1)},a?L.rotation=kh(u,Q?O:O.rotation,lt,xt,1,st):(h&&(L[l]=kh(u,Q?O:O.points||O.x||O.left,lt,xt,D?-1:1,st||u.lockedAxis==="x")),f&&(L[c]=kh(u,Q?O:O.points||O.y||O.top,Bt,X,D?-1:1,st||u.lockedAxis==="y")),(O.points||Da(O)&&La(O[0]))&&(L.linkedProps=l+","+c,L.radius=O.radius))),u.isThrowing=!0,nt=isNaN(n.overshootTolerance)?n.edgeResistance===1?0:1-u.edgeResistance+.2:n.overshootTolerance,L.duration||(L.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?nt===0||La(L)&&L.resistance>1e3?0:.5:n.minDuration,overshoot:nt}),u.tween=pt=me.to(D||e,{inertia:L,data:"_draggable",inherit:!1,onComplete:$t,onInterrupt:ht,onUpdate:n.fastMode?Oe:ct,onUpdateParams:n.fastMode?[u,"onthrowupdate","onThrowUpdate"]:O&&O.radius?[!1,!0]:[]}),n.fastMode||(D&&(D._skip=!0),pt.render(1e9,!0,!0),ct(!0,!0),u.endX=u.x,u.endY=u.y,a&&(u.endRotation=u.x),pt.play(0),ct(!0,!0),D&&(D._skip=!1))):z&&u.applyBounds()},qt=function(L){var st=At,O;At=Er(e.parentNode,!0),L&&u.isPressed&&!At.equals(st||new wr)&&(O=st.inverse().apply({x:V,y:K}),At.apply(O,O),V=O.x,K=O.y),At.equals(wv)&&(At=null)},Jt=function(){var L=1-u.edgeResistance,st=M?fo(I):0,O=M?ho(I):0,Q,pt,nt;o&&(P.x=y(l,"px")+"px",P.y=y(c,"px")+"px",P.renderTransform()),qt(!1),ei.x=u.pointerX-st,ei.y=u.pointerY-O,At&&At.apply(ei,ei),V=ei.x,K=ei.y,It&&(ot(u.pointerX,u.pointerY),mt(!0)),et=Er(e),D?(vt(),Z=D.top(),W=D.left()):(he()?(ct(!0,!0),vt()):u.applyBounds(),a?(Q=e.ownerSVGElement?[P.xOrigin-e.getBBox().x,P.yOrigin-e.getBBox().y]:(Ua(e)[Wh]||"0 0").split(" "),ut=u.rotationOrigin=Er(e).apply({x:parseFloat(Q[0])||0,y:parseFloat(Q[1])||0}),ct(!0,!0),pt=u.pointerX-ut.x-st,nt=ut.y-u.pointerY+O,W=u.x,Z=u.y=Math.atan2(nt,pt)*lg):(Z=y(c,"px"),W=y(l,"px"))),z&&L&&(W>lt?W=lt+(W-lt)/L:W<xt&&(W=xt-(xt-W)/L),a||(Z>Bt?Z=Bt+(Z-Bt)/L:Z<X&&(Z=X-(X-Z)/L))),u.startX=W=Tr(W),u.startY=Z=Tr(Z)},he=function(){return u.tween&&u.tween.isActive()},Kt=function(){Ki.parentNode&&!he()&&!u.isDragging&&Ki.parentNode.removeChild(Ki)},k=function(L,st){var O;if(!N||u.isPressed||!L||(L.type==="mousedown"||L.type==="pointerdown")&&!st&&Ar()-w<30&&Na[u.pointerEvent.type]){Y&&L&&N&&ti(L);return}if(Xt=he(),rt=!1,u.pointerEvent=L,Na[L.type]?(wt=~L.type.indexOf("touch")?L.currentTarget||L.target:I,Ye(wt,"touchend",gt),Ye(wt,"touchmove",tt),Ye(wt,"touchcancel",gt),Ye(I,"touchstart",dg)):(wt=null,Ye(I,"mousemove",tt)),Qt=null,(!jl||!wt)&&(Ye(I,"mouseup",gt),L&&L.target&&Ye(L.target,"mouseup",gt)),Ut=T.call(u,L.target)&&n.dragClickables===!1&&!st,Ut){Ye(L.target,"change",gt),Oe(u,"pressInit","onPressInit"),Oe(u,"press","onPress"),Kl(_,!0),Y=!1;return}if(G=!wt||h===f||u.vars.allowNativeTouchScrolling===!1||u.vars.allowContextMenu&&L&&(L.ctrlKey||L.which>2)?!1:h?"y":"x",Y=!G&&!u.allowEventDefault,Y&&(ti(L),Ye(we,"touchforcechange",ti)),L.changedTouches?(L=at=L.changedTouches[0],yt=L.identifier):L.pointerId?yt=L.pointerId:at=yt=null,tc++,Cv(mt),K=u.pointerY=L.pageY,V=u.pointerX=L.pageX,Oe(u,"pressInit","onPressInit"),(G||u.autoScroll)&&Oh(e.parentNode),e.parentNode&&u.autoScroll&&!D&&!a&&e.parentNode._gsMaxScrollX&&!Ki.parentNode&&!e.getBBox&&(Ki.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(Ki)),Jt(),u.tween&&u.tween.kill(),u.isThrowing=!1,me.killTweensOf(D||e,p,!0),D&&me.killTweensOf(e,{scrollTo:1},!0),u.tween=u.lockedAxis=null,(n.zIndexBoost||!a&&!D&&n.zIndexBoost!==!1)&&(e.style.zIndex=t.zIndex++),u.isPressed=!0,U=!!(n.onDrag||u._listeners.drag),R=!!(n.onMove||u._listeners.move),n.cursor!==!1||n.activeCursor)for(O=_.length;--O>-1;)me.set(_[O],{cursor:n.activeCursor||n.cursor||(Ia==="grab"?"grabbing":Ia)});Oe(u,"press","onPress")},tt=function(L){var st=L,O,Q,pt,nt,Tt,dt;if(!N||Yh||!u.isPressed||!L){Y&&L&&N&&ti(L);return}if(u.pointerEvent=L,O=L.changedTouches,O){if(L=O[0],L!==at&&L.identifier!==yt){for(nt=O.length;--nt>-1&&(L=O[nt]).identifier!==yt&&L.target!==e;);if(nt<0)return}}else if(L.pointerId&&yt&&L.pointerId!==yt)return;if(wt&&G&&!Qt&&(ei.x=L.pageX-(M?fo(I):0),ei.y=L.pageY-(M?ho(I):0),At&&At.apply(ei,ei),Q=ei.x,pt=ei.y,Tt=Math.abs(Q-V),dt=Math.abs(pt-K),(Tt!==dt&&(Tt>d||dt>d)||Pa&&G===Qt)&&(Qt=Tt>dt&&h?"x":"y",G&&Qt!==G&&Ye(we,"touchforcechange",ti),u.vars.lockAxisOnTouchScroll!==!1&&h&&f&&(u.lockedAxis=Qt==="x"?"y":"x",Cr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,st)),Pa&&G===Qt))){gt(st);return}!u.allowEventDefault&&(!G||Qt&&G!==Qt)&&st.cancelable!==!1?(ti(st),Y=!0):Y&&(Y=!1),u.autoScroll&&(g=!0),ot(L.pageX,L.pageY,R)},ot=function(L,st,O){var Q=1-u.dragResistance,pt=1-u.edgeResistance,nt=u.pointerX,Tt=u.pointerY,dt=Z,Rt=u.x,Gt=u.y,Ot=u.endX,ne=u.endY,fe=u.endRotation,ge=It,le,E,B,H,j,J;u.pointerX=L,u.pointerY=st,M&&(L-=fo(I),st-=ho(I)),a?(H=Math.atan2(ut.y-st,L-ut.x)*lg,j=u.y-H,j>180?(Z-=360,u.y=H):j<-180&&(Z+=360,u.y=H),u.x!==W||Math.abs(Z-H)>d?(u.y=H,B=W+(Z-H)*Q):B=W):(At&&(J=L*At.a+st*At.c+At.e,st=L*At.b+st*At.d+At.f,L=J),E=st-K,le=L-V,E<d&&E>-d&&(E=0),le<d&&le>-d&&(le=0),(u.lockAxis||u.lockedAxis)&&(le||E)&&(J=u.lockedAxis,J||(u.lockedAxis=J=h&&Math.abs(le)>Math.abs(E)?"y":f?"x":null,J&&Cr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,u.pointerEvent)),J==="y"?E=0:J==="x"&&(le=0)),B=Tr(W+le*Q),H=Tr(Z+E*Q)),(q||jt||Ft)&&(u.x!==B||u.y!==H&&!a)&&(Ft&&(lo.x=B,lo.y=H,J=Ft(lo),B=Tr(J.x),H=Tr(J.y)),q&&(B=Tr(q(B))),jt&&(H=Tr(jt(H)))),z&&(B>lt?B=lt+Math.round((B-lt)*pt):B<xt&&(B=xt+Math.round((B-xt)*pt)),a||(H>Bt?H=Math.round(Bt+(H-Bt)*pt):H<X&&(H=Math.round(X+(H-X)*pt)))),(u.x!==B||u.y!==H&&!a)&&(a?(u.endRotation=u.x=u.endX=B,It=!0):(f&&(u.y=u.endY=H,It=!0),h&&(u.x=u.endX=B,It=!0)),!O||Oe(u,"move","onMove")!==!1?!u.isDragging&&u.isPressed&&(u.isDragging=rt=!0,Oe(u,"dragstart","onDragStart")):(u.pointerX=nt,u.pointerY=Tt,Z=dt,u.x=Rt,u.y=Gt,u.endX=Ot,u.endY=ne,u.endRotation=fe,It=ge))},gt=function bt(L,st){if(!N||!u.isPressed||L&&yt!=null&&!st&&(L.pointerId&&L.pointerId!==yt&&L.target!==e||L.changedTouches&&!Rv(L.changedTouches,yt))){Y&&L&&N&&ti(L);return}u.isPressed=!1;var O=L,Q=u.isDragging,pt=u.vars.allowContextMenu&&L&&(L.ctrlKey||L.which>2),nt=me.delayedCall(.001,Kt),Tt,dt,Rt,Gt,Ot;if(wt?(He(wt,"touchend",bt),He(wt,"touchmove",tt),He(wt,"touchcancel",bt),He(I,"touchstart",dg)):He(I,"mousemove",tt),He(we,"touchforcechange",ti),(!jl||!wt)&&(He(I,"mouseup",bt),L&&L.target&&He(L.target,"mouseup",bt)),It=!1,Q&&(m=cg=Ar(),u.isDragging=!1),fg(mt),Ut&&!pt){L&&(He(L.target,"change",bt),u.pointerEvent=O),Kl(_,!1),Oe(u,"release","onRelease"),Oe(u,"click","onClick"),Ut=!1;return}for(dt=_.length;--dt>-1;)Bh(_[dt],"cursor",n.cursor||(n.cursor!==!1?Ia:null));if(tc--,L){if(Tt=L.changedTouches,Tt&&(L=Tt[0],L!==at&&L.identifier!==yt)){for(dt=Tt.length;--dt>-1&&(L=Tt[dt]).identifier!==yt&&L.target!==e;);if(dt<0&&!st)return}u.pointerEvent=O,u.pointerX=L.pageX,u.pointerY=L.pageY}return pt&&O?(ti(O),Y=!0,Oe(u,"release","onRelease")):O&&!Q?(Y=!1,Xt&&(n.snap||n.bounds)&&Ct(n.inertia||n.throwProps),Oe(u,"release","onRelease"),(!Pa||O.type!=="touchmove")&&O.type.indexOf("cancel")===-1&&(Oe(u,"click","onClick"),Ar()-w<300&&Oe(u,"doubleclick","onDoubleClick"),Gt=O.target||e,w=Ar(),Ot=function(){w!==x&&u.enabled()&&!u.isPressed&&!O.defaultPrevented&&(Gt.click?Gt.click():I.createEvent&&(Rt=I.createEvent("MouseEvents"),Rt.initMouseEvent("click",!0,!0,we,1,u.pointerEvent.screenX,u.pointerEvent.screenY,u.pointerX,u.pointerY,!1,!1,!1,!1,0,null),Gt.dispatchEvent(Rt)))},!Pa&&!O.defaultPrevented&&me.delayedCall(.05,Ot))):(Ct(n.inertia||n.throwProps),!u.allowEventDefault&&O&&(n.dragClickables!==!1||!T.call(u,O.target))&&Q&&(!G||Qt&&G===Qt)&&O.cancelable!==!1?(Y=!0,ti(O)):Y=!1,Oe(u,"release","onRelease")),he()&&nt.duration(u.tween.duration()),Q&&Oe(u,"dragend","onDragEnd"),!0},_t=function(L){if(L&&u.isDragging&&!D){var st=L.target||e.parentNode,O=st.scrollLeft-st._gsScrollX,Q=st.scrollTop-st._gsScrollY;(O||Q)&&(At?(V-=O*At.a+Q*At.c,K-=Q*At.d+O*At.b):(V-=O,K-=Q),st._gsScrollX+=O,st._gsScrollY+=Q,ot(u.pointerX,u.pointerY))}},zt=function(L){var st=Ar(),O=st-w<100,Q=st-m<50,pt=O&&x===w,nt=u.pointerEvent&&u.pointerEvent.defaultPrevented,Tt=O&&F===w,dt=L.isTrusted||L.isTrusted==null&&O&&pt;if((pt||Q&&u.vars.suppressClickOnDrag!==!1)&&L.stopImmediatePropagation&&L.stopImmediatePropagation(),O&&!(u.pointerEvent&&u.pointerEvent.defaultPrevented)&&(!pt||dt&&!Tt)){dt&&pt&&(F=w),x=w;return}(u.isPressed||Q||O)&&(!dt||!L.detail||!O||nt)&&ti(L),!O&&!Q&&!rt&&(L&&L.target&&(u.pointerEvent=L),Oe(u,"click","onClick"))},ie=function(L){return At?{x:L.x*At.a+L.y*At.c+At.e,y:L.x*At.b+L.y*At.d+At.f}:{x:L.x,y:L.y}};return Ht=t.get(e),Ht&&Ht.kill(),i.startDrag=function(bt,L){var st,O,Q,pt;k(bt||u.pointerEvent,!0),L&&!u.hitTest(bt||u.pointerEvent)&&(st=co(bt||u.pointerEvent),O=co(e),Q=ie({x:st.left+st.width/2,y:st.top+st.height/2}),pt=ie({x:O.left+O.width/2,y:O.top+O.height/2}),V-=Q.x-pt.x,K-=Q.y-pt.y),u.isDragging||(u.isDragging=rt=!0,Oe(u,"dragstart","onDragStart"))},i.drag=tt,i.endDrag=function(bt){return gt(bt||u.pointerEvent,!0)},i.timeSinceDrag=function(){return u.isDragging?0:(Ar()-m)/1e3},i.timeSinceClick=function(){return(Ar()-w)/1e3},i.hitTest=function(bt,L){return t.hitTest(u.target,bt,L)},i.getDirection=function(bt,L){var st=bt==="velocity"&&gi?bt:La(bt)&&!a?"element":"start",O,Q,pt,nt,Tt,dt;return st==="element"&&(Tt=co(u.target),dt=co(bt)),O=st==="start"?u.x-W:st==="velocity"?gi.getVelocity(e,l):Tt.left+Tt.width/2-(dt.left+dt.width/2),a?O<0?"counter-clockwise":"clockwise":(L=L||2,Q=st==="start"?u.y-Z:st==="velocity"?gi.getVelocity(e,c):Tt.top+Tt.height/2-(dt.top+dt.height/2),pt=Math.abs(O/Q),nt=pt<1/L?"":O<0?"left":"right",pt<L&&(nt!==""&&(nt+="-"),nt+=Q<0?"up":"down"),nt)},i.applyBounds=function(bt,L){var st,O,Q,pt,nt,Tt;if(bt&&n.bounds!==bt)return n.bounds=bt,u.update(!0,L);if(ct(!0),vt(),z&&!he()){if(st=u.x,O=u.y,st>lt?st=lt:st<xt&&(st=xt),O>Bt?O=Bt:O<X&&(O=X),(u.x!==st||u.y!==O)&&(Q=!0,u.x=u.endX=st,a?u.endRotation=st:u.y=u.endY=O,It=!0,mt(!0),u.autoScroll&&!u.isDragging))for(Oh(e.parentNode),pt=e,Ji.scrollTop=we.pageYOffset!=null?we.pageYOffset:I.documentElement.scrollTop!=null?I.documentElement.scrollTop:I.body.scrollTop,Ji.scrollLeft=we.pageXOffset!=null?we.pageXOffset:I.documentElement.scrollLeft!=null?I.documentElement.scrollLeft:I.body.scrollLeft;pt&&!Tt;)Tt=po(pt.parentNode),nt=Tt?Ji:pt.parentNode,f&&nt.scrollTop>nt._gsMaxScrollY&&(nt.scrollTop=nt._gsMaxScrollY),h&&nt.scrollLeft>nt._gsMaxScrollX&&(nt.scrollLeft=nt._gsMaxScrollX),pt=nt;u.isThrowing&&(Q||u.endX>lt||u.endX<xt||u.endY>Bt||u.endY<X)&&Ct(n.inertia||n.throwProps,Q)}return u},i.update=function(bt,L,st){if(L&&u.isPressed){var O=Er(e),Q=et.apply({x:u.x-W,y:u.y-Z}),pt=Er(e.parentNode,!0);pt.apply({x:O.e-Q.x,y:O.f-Q.y},Q),u.x-=Q.x-pt.e,u.y-=Q.y-pt.f,mt(!0),Jt()}var nt=u.x,Tt=u.y;return qt(!L),bt?u.applyBounds():(It&&st&&mt(!0),ct(!0)),L&&(ot(u.pointerX,u.pointerY),It&&mt(!0)),u.isPressed&&!L&&(h&&Math.abs(nt-u.x)>.01||f&&Math.abs(Tt-u.y)>.01&&!a)&&Jt(),u.autoScroll&&(Oh(e.parentNode,u.isDragging),g=u.isDragging,mt(!0),mg(e,_t),pg(e,_t)),u},i.enable=function(bt){var L={lazy:!0},st,O,Q;if(n.cursor!==!1&&(L.cursor=n.cursor||Ia),me.utils.checkPrefix("touchCallout")&&(L.touchCallout="none"),bt!=="soft"){for(ug(_,h===f?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"),O=_.length;--O>-1;)Q=_[O],jl||Ye(Q,"mousedown",k),Ye(Q,"touchstart",k),Ye(Q,"click",zt,!0),me.set(Q,L),Q.getBBox&&Q.ownerSVGElement&&h!==f&&me.set(Q.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"}),n.allowContextMenu||Ye(Q,"contextmenu",St);Kl(_,!1)}return pg(e,_t),N=!0,gi&&bt!=="soft"&&gi.track(D||e,o?"x,y":a?"rotation":"top,left"),e._gsDragID=st="d"+Ev++,uo[st]=u,D&&(D.enable(),D.element._gsDragID=st),(n.bounds||a)&&Jt(),n.bounds&&u.applyBounds(),u},i.disable=function(bt){for(var L=u.isDragging,st=_.length,O;--st>-1;)Bh(_[st],"cursor",null);if(bt!=="soft"){for(ug(_,null),st=_.length;--st>-1;)O=_[st],Bh(O,"touchCallout",null),He(O,"mousedown",k),He(O,"touchstart",k),He(O,"click",zt,!0),He(O,"contextmenu",St);Kl(_,!0),wt&&(He(wt,"touchcancel",gt),He(wt,"touchend",gt),He(wt,"touchmove",tt)),He(I,"mouseup",gt),He(I,"mousemove",tt)}return mg(e,_t),N=!1,gi&&bt!=="soft"&&(gi.untrack(D||e,o?"x,y":a?"rotation":"top,left"),u.tween&&u.tween.kill()),D&&D.disable(),fg(mt),u.isDragging=u.isPressed=Ut=!1,L&&Oe(u,"dragend","onDragEnd"),u},i.enabled=function(bt,L){return arguments.length?bt?u.enable(L):u.disable(L):N},i.kill=function(){return u.isThrowing=!1,u.tween&&u.tween.kill(),u.disable(),me.set(_,{clearProps:"userSelect"}),delete uo[e._gsDragID],u},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~s.indexOf("scroll")&&(D=i.scrollProxy=new Nv(e,Av({onKill:function(){u.isPressed&&gt(null)}},n)),e.style.overflowY=f&&!Hh?"auto":"hidden",e.style.overflowX=h&&!Hh?"auto":"hidden",e=D.content),a?p.rotation=1:(h&&(p[l]=1),f&&(p[c]=1)),P.force3D="force3D"in n?n.force3D:!0,yg(ag(i)),i.enable(),i}return t.register=function(n){me=n,zh()},t.create=function(n,i){return Vh||zh(!0),Dr(n).map(function(s){return new t(s,i)})},t.get=function(n){return uo[(Dr(n)[0]||{})._gsDragID]},t.timeSinceDrag=function(){return(Ar()-cg)/1e3},t.hitTest=function(n,i,s){if(n===i)return!1;var o=co(n),a=co(i),l=o.top,c=o.left,h=o.right,f=o.bottom,d=o.width,u=o.height,_=a.left>h||a.right<c||a.top>f||a.bottom<l,p,m,g;return _||!s?!_:(g=(s+"").indexOf("%")!==-1,s=parseFloat(s)||0,p={left:Math.max(c,a.left),top:Math.max(l,a.top)},p.width=Math.min(h,a.right)-p.left,p.height=Math.min(f,a.bottom)-p.top,p.width<0||p.height<0?!1:g?(s*=.01,m=p.width*p.height,m>=d*u*s||m>=a.width*a.height*s):p.width>s&&p.height>s)},t}(Uv);Dv(Qi.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});Qi.zIndex=1e3;Qi.version="3.12.5";Sg()&&me.registerPlugin(Qi);var Ni,Zh,Ba,Tg,mo,go,ec,Ag,Cg,Dg=function(){return Ni||typeof window<"u"&&(Ni=window.gsap)},$h={},Ov=function(t){return Math.round(t*1e4)/1e4},Jh=function(t){return Cg(t).id},Oa=function(t){return $h[Jh(typeof t=="string"?Ba(t)[0]:t)]},Eg=function(t){var e=mo,n;if(t-ec>=.05)for(Ag=ec,ec=t;e;)n=e.g(e.t,e.p),(n!==e.v1||t-e.t1>.2)&&(e.v2=e.v1,e.v1=n,e.t2=e.t1,e.t1=t),e=e._next},Bv={deg:360,rad:Math.PI*2},qh=function(){Ni=Dg(),Ni&&(Ba=Ni.utils.toArray,Tg=Ni.utils.getUnit,Cg=Ni.core.getCache,go=Ni.ticker,Zh=1)},kv=function(t,e,n,i){this.t=t,this.p=e,this.g=t._gsap.get,this.rCap=Bv[n||Tg(this.g(t,e))],this.v1=this.v2=0,this.t1=this.t2=go.time,i&&(this._next=i,i._prev=this)},_o=function(){function r(e,n){Zh||qh(),this.target=Ba(e)[0],$h[Jh(this.target)]=this,this._props={},n&&this.add(n)}r.register=function(n){Ni=n,qh()};var t=r.prototype;return t.get=function(n,i){var s=this._props[n]||console.warn("Not tracking "+n+" velocity."),o,a,l;return o=parseFloat(i?s.v1:s.g(s.t,s.p)),a=o-parseFloat(s.v2),l=s.rCap,l&&(a=a%l,a!==a%(l/2)&&(a=a<0?a+l:a-l)),Ov(a/((i?s.t1:go.time)-s.t2))},t.getAll=function(){var n={},i=this._props,s;for(s in i)n[s]=this.get(s);return n},t.isTracking=function(n){return n in this._props},t.add=function(n,i){n in this._props||(mo||(go.add(Eg),ec=Ag=go.time),mo=this._props[n]=new kv(this.target,n,i,mo))},t.remove=function(n){var i=this._props[n],s,o;i&&(s=i._prev,o=i._next,s&&(s._next=o),o?o._prev=s:mo===i&&(go.remove(Eg),mo=0),delete this._props[n])},t.kill=function(n){for(var i in this._props)this.remove(i);n||delete $h[Jh(this.target)]},r.track=function(n,i,s){Zh||qh();for(var o=[],a=Ba(n),l=i.split(","),c=(s||"").split(","),h=a.length,f,d;h--;){for(f=Oa(a[h])||new r(a[h]),d=l.length;d--;)f.add(l[d],c[d]||c[0]);o.push(f)}return o},r.untrack=function(n,i){var s=(i||"").split(",");Ba(n).forEach(function(o){var a=Oa(o);a&&(s.length?s.forEach(function(l){return a.remove(l)}):a.kill(1))})},r.isTracking=function(n,i){var s=Oa(n);return s&&s.isTracking(i)},r.getVelocity=function(n,i){var s=Oa(n);return!s||!s.isTracking(i)?console.warn("Not tracking velocity of "+i):s.get(i)},r}();_o.getByTarget=Oa;Dg()&&Ni.registerPlugin(_o);var qe,Ng,Rg,Ug,Kh,ka,Og,Bg,kg,tf,zg,za,jh,Vg,nc=_o.getByTarget,Hg=function(){return qe||typeof window<"u"&&(qe=window.gsap)&&qe.registerPlugin&&qe},zv=function(t){return typeof t=="string"},Va=function(t){return typeof t=="number"},Rr=function(t){return typeof t=="object"},Qh=function(t){return typeof t=="function"},Vv=1,Gg=Array.isArray,Hv=function(t){return t},bs=1e10,Pg=1/bs,Wg=.05,Gv=function(t){return Math.round(t*1e4)/1e4},Wv=function(t,e,n){for(var i in e)!(i in t)&&i!==n&&(t[i]=e[i]);return t},Xv=function r(t){var e={},n,i;for(n in t)e[n]=Rr(i=t[n])&&!Gg(i)?r(i):i;return e},Ig=function(t,e,n,i,s){var o=e.length,a=0,l=bs,c,h,f,d;if(Rr(t)){for(;o--;){c=e[o],h=0;for(f in t)d=c[f]-t[f],h+=d*d;h<l&&(a=o,l=h)}if((s||bs)<bs&&s<Math.sqrt(l))return t}else for(;o--;)c=e[o],h=c-t,h<0&&(h=-h),h<l&&c>=i&&c<=n&&(a=o,l=h);return e[a]},Xg=function(t,e,n,i,s,o,a){if(t.end==="auto")return t;var l=t.end,c,h;if(n=isNaN(n)?bs:n,i=isNaN(i)?-bs:i,Rr(e)){if(c=e.calculated?e:(Qh(l)?l(e,a):Ig(e,l,n,i,o))||e,!e.calculated){for(h in c)e[h]=c[h];e.calculated=!0}c=c[s]}else c=Qh(l)?l(e,a):Gg(l)?Ig(e,l,n,i,o):parseFloat(l);return c>n?c=n:c<i&&(c=i),{max:c,min:c,unitFactor:t.unitFactor}},ic=function(t,e,n){return isNaN(t[e])?n:+t[e]},ef=function(t,e){return e*Wg*t/tf},Lg=function(t,e,n){return Math.abs((e-t)*tf/n/Wg)},Yg={resistance:1,checkpoint:1,preventOvershoot:1,linkedProps:1,radius:1,duration:1},qg=function(t,e,n,i){if(e.linkedProps){var s=e.linkedProps.split(","),o={},a,l,c,h,f,d;for(a=0;a<s.length;a++)l=s[a],c=e[l],c&&(Va(c.velocity)?h=c.velocity:(f=f||nc(t),h=f&&f.isTracking(l)?f.get(l):0),d=Math.abs(h/ic(c,"resistance",i)),o[l]=parseFloat(n(t,l))+ef(h,d));return o}},Yv=function(t,e,n,i,s,o){if(n===void 0&&(n=10),i===void 0&&(i=.2),s===void 0&&(s=1),o===void 0&&(o=0),zv(t)&&(t=Ug(t)[0]),!t)return 0;var a=0,l=bs,c=e.inertia||e,h=kg(t).get,f=ic(c,"resistance",ka.resistance),d,u,_,p,m,g,b,v,S,C;C=qg(t,c,h,f);for(d in c)Yg[d]||(u=c[d],Rr(u)||(v=v||nc(t),v&&v.isTracking(d)?u=Va(u)?{velocity:u}:{velocity:v.get(d)}:(p=+u||0,_=Math.abs(p/f))),Rr(u)&&(Va(u.velocity)?p=u.velocity:(v=v||nc(t),p=v&&v.isTracking(d)?v.get(d):0),_=zg(i,n,Math.abs(p/ic(u,"resistance",f))),m=parseFloat(h(t,d))||0,g=m+ef(p,_),"end"in u&&(u=Xg(u,C&&d in C?C:g,u.max,u.min,d,c.radius,p),o&&(za===e&&(za=c=Xv(e)),c[d]=Wv(u,c[d],"end"))),"max"in u&&g>+u.max+Pg?(S=u.unitFactor||ka.unitFactors[d]||1,b=m>u.max&&u.min!==u.max||p*S>-15&&p*S<45?i+(n-i)*.1:Lg(m,u.max,p),b+s<l&&(l=b+s)):"min"in u&&g<+u.min-Pg&&(S=u.unitFactor||ka.unitFactors[d]||1,b=m<u.min&&u.min!==u.max||p*S>-45&&p*S<15?i+(n-i)*.1:Lg(m,u.min,p),b+s<l&&(l=b+s)),b>a&&(a=b)),_>a&&(a=_));return a>l&&(a=l),a>n?n:a<i?i:a},Fg=function(){qe=Hg(),qe&&(Rg=qe.parseEase,Ug=qe.utils.toArray,Og=qe.utils.getUnit,kg=qe.core.getCache,zg=qe.utils.clamp,jh=qe.core.getStyleSaver,Vg=qe.core.reverting||function(){},Kh=Rg("power3"),tf=Kh(.05),Bg=qe.core.PropTween,qe.config({resistance:100,unitFactors:{time:1e3,totalTime:1e3,progress:1e3,totalProgress:1e3}}),ka=qe.config(),qe.registerPlugin(_o),Ng=1)},rc={version:"3.12.5",name:"inertia",register:function(t){qe=t,Fg()},init:function(t,e,n,i,s){Ng||Fg();var o=nc(t);if(e==="auto"){if(!o){console.warn("No inertia tracking on "+t+". InertiaPlugin.track(target) first.");return}e=o.getAll()}this.styles=jh&&typeof t.style=="object"&&jh(t),this.target=t,this.tween=n,za=e;var a=t._gsap,l=a.get,c=e.duration,h=Rr(c),f=e.preventOvershoot||h&&c.overshoot===0,d=ic(e,"resistance",ka.resistance),u=Va(c)?c:Yv(t,e,h&&c.max||10,h&&c.min||.2,h&&"overshoot"in c?+c.overshoot:f?0:1,!0),_,p,m,g,b,v,S,C,T;e=za,za=0,T=qg(t,e,l,d);for(_ in e)Yg[_]||(p=e[_],Qh(p)&&(p=p(i,t,s)),Va(p)?b=p:Rr(p)&&!isNaN(p.velocity)?b=+p.velocity:o&&o.isTracking(_)?b=o.get(_):console.warn("ERROR: No velocity was defined for "+t+" property: "+_),v=ef(b,u),C=0,m=l(t,_),g=Og(m),m=parseFloat(m),Rr(p)&&(S=m+v,"end"in p&&(p=Xg(p,T&&_ in T?T:S,p.max,p.min,_,e.radius,b)),"max"in p&&+p.max<S?f||p.preventOvershoot?v=p.max-m:C=p.max-m-v:"min"in p&&+p.min>S&&(f||p.preventOvershoot?v=p.min-m:C=p.min-m-v)),this._props.push(_),this.styles&&this.styles.save(_),this._pt=new Bg(this._pt,t,_,m,0,Hv,0,a.set(t,_,this)),this._pt.u=g||0,this._pt.c1=v,this._pt.c2=C);return n.duration(u),Vv},render:function(t,e){var n=e._pt;if(t=Kh(e.tween._time/e.tween._dur),t||!Vg())for(;n;)n.set(n.t,n.p,Gv(n.s+n.c1*t+n.c2*t*t)+n.u,n.d,t),n=n._next;else e.styles.revert()}};"track,untrack,isTracking,getVelocity,getByTarget".split(",").forEach(function(r){return rc[r]=_o[r]});Hg()&&qe.registerPlugin(rc);var Zg=()=>{Et.registerPlugin(Vt,Qi,rc);let r=Et.utils.toArray(".areas_item"),t=document.querySelectorAll(".services-orange-border"),e=document.querySelectorAll(".areas_item_content"),n=Et.matchMedia();n.add("(max-width: 767px)",()=>{let i=document.querySelector(".areas_wrapper"),s=r.map((c,h)=>-(c.clientWidth+40)*h),o=Et.utils.snap(s);Qi.create(i,{type:"x",bounds:{minX:window.innerWidth-i.scrollWidth,maxX:0},onDrag:a,onThrowUpdate:a,inertia:!0,onDragEnd:l,snap:{x:function(c){return o(c)}}});function a(){for(let c=0;c<r.length;c++)Qi.hitTest(r[c],".boundary")?($(r[c]).addClass("Slate-glow"),r[c].animation&&r[c].animation.play()):($(r[c]).removeClass("Slate-glow"),r[c].animation&&!r[c].animation.reversed()&&r[c].animation.reverse())}function l(){for(let c=0;c<r.length;c++)Qi.hitTest(r[c],".boundary")&&r[c].animation&&r[c].animation.play();a()}r.forEach(c=>{let h=Et.timeline({paused:!0});h.to(c.querySelector(".areas_item_content"),{duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='281' height='266' viewBox='0 0 281 266' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_2452' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z' fill='%23060411'/%3E%3Cpath d='M213.833 0.0814209C213.833 42.8787 179.139 77.5727 136.342 77.5727V79.5727C180.244 79.5727 215.833 43.9832 215.833 0.0814209H213.833ZM214.838 1.07666H272.666V-0.92334H214.838V1.07666ZM279.666 8.07666V257.581H281.666V8.07666H279.666ZM272.666 264.581H8.88281V266.581H272.666V264.581ZM1.88281 257.581V8.07666H-0.117188V257.581H1.88281ZM8.88281 1.07666H57.8457V-0.92334H8.88281V1.07666ZM136.342 77.5727C93.5445 77.5727 58.8504 42.8787 58.8504 0.0814209H56.8504C56.8504 43.9832 92.4399 79.5727 136.342 79.5727V77.5727ZM57.8457 1.07666C57.296 1.07666 56.8504 0.631021 56.8504 0.0814209H58.8504C58.8504 -0.473438 58.4007 -0.92334 57.8457 -0.92334V1.07666ZM1.88281 8.07666C1.88281 4.21067 5.01682 1.07666 8.88281 1.07666V-0.92334C3.91225 -0.92334 -0.117188 3.1061 -0.117188 8.07666H1.88281ZM8.88281 264.581C5.01682 264.581 1.88281 261.447 1.88281 257.581H-0.117188C-0.117188 262.551 3.91225 266.581 8.88281 266.581V264.581ZM279.666 257.581C279.666 261.447 276.532 264.581 272.666 264.581V266.581C277.637 266.581 281.666 262.551 281.666 257.581H279.666ZM272.666 1.07666C276.532 1.07666 279.666 4.21067 279.666 8.07666H281.666C281.666 3.1061 277.637 -0.92334 272.666 -0.92334V1.07666ZM215.833 0.0814209C215.833 0.631077 215.387 1.07666 214.838 1.07666V-0.92334C214.283 -0.92334 213.833 -0.473493 213.833 0.0814209H215.833Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_2452)'/%3E%3C/svg%3E")`}),h.to(c.querySelector(".services-orange-border"),{duration:.5,ease:"power1.inOut",y:"12px",x:"-12px",stagger:.05}),c.animation=h}),t.forEach(c=>{c.anim=Et.to(c,{duration:.5,ease:"power1.inOut",y:"12px",x:"-12px",stagger:.05,paused:!0})}),e.forEach(c=>{c.anim=Et.to(c,{duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='281' height='266' viewBox='0 0 281 266' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_2452' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z' fill='%23060411'/%3E%3Cpath d='M213.833 0.0814209C213.833 42.8787 179.139 77.5727 136.342 77.5727V79.5727C180.244 79.5727 215.833 43.9832 215.833 0.0814209H213.833ZM214.838 1.07666H272.666V-0.92334H214.838V1.07666ZM279.666 8.07666V257.581H281.666V8.07666H279.666ZM272.666 264.581H8.88281V266.581H272.666V264.581ZM1.88281 257.581V8.07666H-0.117188V257.581H1.88281ZM8.88281 1.07666H57.8457V-0.92334H8.88281V1.07666ZM136.342 77.5727C93.5445 77.5727 58.8504 42.8787 58.8504 0.0814209H56.8504C56.8504 43.9832 92.4399 79.5727 136.342 79.5727V77.5727ZM57.8457 1.07666C57.296 1.07666 56.8504 0.631021 56.8504 0.0814209H58.8504C58.8504 -0.473438 58.4007 -0.92334 57.8457 -0.92334V1.07666ZM1.88281 8.07666C1.88281 4.21067 5.01682 1.07666 8.88281 1.07666V-0.92334C3.91225 -0.92334 -0.117188 3.1061 -0.117188 8.07666H1.88281ZM8.88281 264.581C5.01682 264.581 1.88281 261.447 1.88281 257.581H-0.117188C-0.117188 262.551 3.91225 266.581 8.88281 266.581V264.581ZM279.666 257.581C279.666 261.447 276.532 264.581 272.666 264.581V266.581C277.637 266.581 281.666 262.551 281.666 257.581H279.666ZM272.666 1.07666C276.532 1.07666 279.666 4.21067 279.666 8.07666H281.666C281.666 3.1061 277.637 -0.92334 272.666 -0.92334V1.07666ZM215.833 0.0814209C215.833 0.631077 215.387 1.07666 214.838 1.07666V-0.92334C214.283 -0.92334 213.833 -0.473493 213.833 0.0814209H215.833Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_2452)'/%3E%3C/svg%3E")`,paused:!0})})}),n.add("(min-width: 768px)",()=>{let i=Et.to(r,{xPercent:-100*(r.length-1),ease:"none",scrollTrigger:{trigger:".areas-container",pin:!0,scrub:.1,end:"+=3000",invalidateOnRefresh:!0,smoothScroll:!0}});t.forEach(s=>{s.anim=Et.to(s,{scrollTrigger:{trigger:s,toggleActions:"play reverse restart reverse",start:"left 50%",end:"right center",containerAnimation:i,invalidateOnRefresh:!0,smoothScroll:!0},duration:.5,ease:"power1.inOut",y:"1em",x:"-1em",stagger:.05})}),e.forEach(s=>{s.anim=Et.to(s,{scrollTrigger:{trigger:s,toggleActions:"play reverse restart reverse",start:"left 50%",end:"right center",containerAnimation:i,invalidateOnRefresh:!0,smoothScroll:!0},duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='325' height='353' viewBox='0 0 325 353' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_163' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M66.4168 8.207C66.024 3.81523 62.4827 0.235229 58.0733 0.235229H8C3.58172 0.235229 0 3.81694 0 8.23522V344.235C0 348.654 3.58173 352.235 8.00001 352.235H317C321.418 352.235 325 348.654 325 344.235V8.23523C325 3.81695 321.418 0.235229 317 0.235229H256.612C252.203 0.235229 248.661 3.81522 248.268 8.207C244.103 54.7658 204.985 91.2601 157.343 91.2601C109.7 91.2601 70.5817 54.7658 66.4168 8.207Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M66.4168 8.207C66.024 3.81523 62.4827 0.235229 58.0733 0.235229H8C3.58172 0.235229 0 3.81694 0 8.23522V344.235C0 348.654 3.58173 352.235 8.00001 352.235H317C321.418 352.235 325 348.654 325 344.235V8.23523C325 3.81695 321.418 0.235229 317 0.235229H256.612C252.203 0.235229 248.661 3.81522 248.268 8.207C244.103 54.7658 204.985 91.2601 157.343 91.2601C109.7 91.2601 70.5817 54.7658 66.4168 8.207Z' fill='%23060411'/%3E%3Cpath d='M248.268 8.207L249.264 8.2961L248.268 8.207ZM8 1.23523H58.0733V-0.764771H8V1.23523ZM1 344.235V8.23522H-1V344.235H1ZM317 351.235H8.00001V353.235H317V351.235ZM324 8.23523V344.235H326V8.23523H324ZM256.612 1.23523H317V-0.764771H256.612V1.23523ZM247.272 8.1179C243.153 54.1656 204.462 90.2601 157.343 90.2601V92.2601C205.507 92.2601 245.054 55.3659 249.264 8.2961L247.272 8.1179ZM157.343 90.2601C110.223 90.2601 71.532 54.1656 67.4128 8.11791L65.4208 8.2961C69.6314 55.3659 109.178 92.2601 157.343 92.2601V90.2601ZM256.612 -0.764771C251.631 -0.764771 247.706 3.26603 247.272 8.1179L249.264 8.2961C249.616 4.36441 252.774 1.23523 256.612 1.23523V-0.764771ZM326 8.23523C326 3.26467 321.971 -0.764771 317 -0.764771V1.23523C320.866 1.23523 324 4.36924 324 8.23523H326ZM317 353.235C321.971 353.235 326 349.206 326 344.235H324C324 348.101 320.866 351.235 317 351.235V353.235ZM-1 344.235C-1 349.206 3.02945 353.235 8.00001 353.235V351.235C4.13401 351.235 1 348.101 1 344.235H-1ZM58.0733 1.23523C61.9109 1.23523 65.0691 4.36441 65.4208 8.2961L67.4128 8.11791C66.9788 3.26604 63.0544 -0.764771 58.0733 -0.764771V1.23523ZM8 -0.764771C3.02944 -0.764771 -1 3.26466 -1 8.23522H1C1 4.36923 4.13401 1.23523 8 1.23523V-0.764771Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_163)'/%3E%3C/svg%3E")`})})})};Et.registerPlugin(Vt);var $g=()=>{let r=[];Et.matchMedia().add("(min-width: 768px)",()=>{r=Array.from(document.querySelectorAll(".special_card-image-wrapper")),r.forEach((t,e)=>{let n=e===r.length-1;Et.to(t,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)"},filter:n?"none":"brightness(50%) blur(10px)",scale:n?1:.6,scrollTrigger:{trigger:t,start:"+20% top",endTrigger:n?t:".special_content",end:n?"bottom bottom":"bottom+=5% bottom",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!0,smoothScroll:!0}})})}),Et.matchMedia().add("(max-width: 767px)",()=>{r=Array.from(document.querySelectorAll(".special_card-content")),Et.matchMedia().add("(orientation: portrait)",()=>{r.forEach((t,e)=>{let n=e===r.length-1;Et.to(t,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",opacity:1,scale:1},filter:n?"none":"brightness(50%) blur(10px)",opacity:n?1:0,scale:n?1:.75,scrollTrigger:{trigger:t,startTrigger:t,start:"top top",endTrigger:n?t:r[e+1],end:n?"bottom bottom":"top top-=100%",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!0,smoothScroll:!0}})})}),r=Array.from(document.querySelectorAll(".special_card-content")),Et.matchMedia().add("(orientation: landscape)",()=>{r.forEach((t,e)=>{let n=e===r.length-1;Et.to(t,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",opacity:1,scale:1},filter:n?"none":"brightness(50%) blur(10px)",opacity:n?1:0,scale:n?1:.75,scrollTrigger:{trigger:t,startTrigger:t,start:"bottom bottom",endTrigger:n?t:r[e+1],end:n?"bottom bottom":"top top-=100%",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!0,smoothScroll:!0}})})})})},Jg=()=>{let r=document.querySelector(".special_decors-wrapper"),t=document.querySelector(".special_decors");Et.to(t,{scrollTrigger:{trigger:t,endTrigger:r,start:()=>"top top",end:()=>"bottom bottom",pin:!0,scrub:!0}})};Et.registerPlugin(Vt);var Kg=()=>{let r=Et.utils.toArray(".steps_item"),t=Et.utils.toArray(".steps_item-line");if(!r)return;let e=Et.matchMedia();e.add("(min-width: 992px)",()=>{t.forEach(i=>Et.set(i,{opacity:0}));let n=Et.timeline({defaults:{duration:4,ease:"none",immediateRender:!0},scrollTrigger:{trigger:"#steps-pin",start:()=>"top top",end:"clamp(bottom+=200% bottom)",pin:!0,scrub:!0,smoothScroll:!0,toggleActions:"play reverse play reverse"}});r.forEach((i,s)=>Et.set(i,{x:`${s*-100}%`}));for(let i=1;i<=3;i++)n.to(r[i],{x:`${(i-1)*-100}%`},"<");return n.to(t[0],{opacity:1,duration:.5}),n.to(r[2],{x:0},"<"),n.to(r[3],{x:"-100%"},"<"),n.to(t[1],{opacity:1,duration:.5}),n.to(r[3],{x:0},"<"),n.to(t[2],{opacity:1,duration:.5}),n.set({},{},"+=1"),()=>{r.forEach(i=>Et.set(i,{clearProps:"all"})),t.forEach(i=>Et.set(i,{clearProps:"all"}))}}),e.add("(max-width: 991px)",()=>(r.forEach(n=>Et.set(n,{clearProps:"all"})),t.forEach(n=>Et.set(n,{clearProps:"all"})),Et.set([r,t],{opacity:0,y:50}),r.forEach((n,i)=>{Et.to(n,{scrollTrigger:{trigger:n,start:"top bottom-=100",end:"top center",toggleActions:"play none none reverse"},opacity:1,y:0,duration:.8,ease:"power2.out"}),t[i]&&Et.to(t[i],{scrollTrigger:{trigger:n,start:"top bottom-=100",end:"top center",toggleActions:"play none none reverse"},opacity:1,y:0,duration:.8,delay:.2,ease:"power2.out"})}),()=>{Vt.getAll().forEach(n=>n.kill()),r.forEach(n=>Et.set(n,{clearProps:"all"})),t.forEach(n=>Et.set(n,{clearProps:"all"}))}))},jg=()=>{let r=document.getElementById("saturn-sticker"),t=document.getElementById("steps-section");Et.timeline({scrollTrigger:{trigger:t}}).to(r,{opacity:1,duration:.5,ease:"power1.inOut"},"0.25").to(r,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(r,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(r,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"})};var e0=()=>{let r=document.querySelector(".mastery_techonologies-wrapper");if(!r)return;let t=r.querySelectorAll("img");t&&(window.innerWidth>991?t0(r,t):Qg(r,t),window.addEventListener("resize",function(){window.innerWidth>991?t0(r,t):Qg(r,t)},!0))};function Qg(r,t){r.innerHTML="",t.forEach(s=>{let o=document.createElement("figure");o.classList.add("mastery_techonologies_slide"),o.appendChild(s),r.appendChild(o)});let e=r.querySelectorAll(".mastery_techonologies_slide");Et.set(e,{autoAlpha:1}),e.forEach((s,o)=>{Et.set(s,{xPercent:100*o})});let n=Et.utils.wrap(-100,(e.length-1)*100),i=e.length*2.5;Et.to(e,{xPercent:`-=${e.length*100}`,duration:i,repeat:-1,ease:"none",modifiers:{xPercent:s=>n(parseFloat(s))}})}function t0(r,t){r.innerHTML="";let e=qv(t);e&&(Zv(r,e),$v(r))}function qv(r){let t=Math.floor(r.length/2)<11?Math.floor(r.length/2):11,e=Array.from({length:t},()=>[]),n=Math.floor(r.length/t),i=r.length%t,s=0;for(let o=0;o<t;o++){let a=n+(o<i?1:0);for(let l=0;l<a;l++)s<r.length&&(e[o].push(r[s]),s+=1)}return e}function Zv(r,t){r.innerHTML="",t.forEach(e=>{let n=document.createElement("div");n.classList.add("mastery_techonologies_vertical_slider"),e.forEach(i=>{let s=document.createElement("figure");s.classList.add("mastery_techonologies_vertical_slider_item"),s.appendChild(i),n.appendChild(s)}),r.appendChild(n)})}function $v(r){let t=r.querySelectorAll(".mastery_techonologies_vertical_slider"),e=parseInt(window.getComputedStyle(document.body).fontSize)*1.5;if(window.addEventListener("resize",function(){e=parseInt(window.getComputedStyle(document.body).fontSize)*1.5},!0),!t)return;function n(){t.forEach((i,s)=>{i.querySelectorAll(".mastery_techonologies_vertical_slider_item").forEach((a,l)=>{let c=l===0,h=window.getComputedStyle(a),f=new WebKitCSSMatrix(h.transform);Et.fromTo(a,{y:c?(l+1)*e:f.f},{y:c?l*e:f.f-e,duration:.5,ease:"circ.out",delay:.1*s,onComplete:function(){c&&i.appendChild(a)}}).play()})})}n(),setInterval(n,5e3)}Et.registerPlugin(Vt);var n0=()=>{document.querySelectorAll(".trust_grid > *").forEach((t,e)=>{let n=Kv(e),i=t.querySelector(".trust_years_counter"),s=t.querySelector(".trust_global_globe"),o=Jv(t),a=t.querySelector(".trust_rocket_wrapper"),l=t.querySelector("#trust-sticker");if(Et.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1,toggleActions:"play pause pause reverse"}}).fromTo(t,{duration:1,opacity:0,y:100},{opacity:1,y:0,duration:.75},"<"),o&&o.forEach((c,h)=>{Et.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(c,{opacity:0},{opacity:1,duration:.75,delay:h*.5},"<")}),l&&Et.timeline({scrollTrigger:{trigger:t,start:n}}).to(l,{opacity:1,duration:.5,ease:"power1.inOut"}).to(l,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(l,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(l,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"}),i){let c=new Date(2018,4,20),f=jv(c,new Date);Qv(f,i);let d=i.querySelector(".trust_years_counter_items");d&&Et.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).to(d,{yPercent:-35,duration:.75,delay:.25},"<")}if(s&&Et.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(s,{duration:1,opacity:0},{duration:.75,opacity:1,delay:.25},"<"),a){let c=a.querySelector(".rocket_line");c&&Et.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(c,{duration:1,width:0},{width:"calc(100% - 3.625em)",duration:1,ease:"power1.out",delay:0},"<")}})};function Jv(r){let t=[];return r.classList.contains("trust_partners")?t=r.querySelectorAll(".trust_logotype"):r.classList.contains("trust_launches")&&(t=r.querySelectorAll(".trust_launches_logotypes > img")),t}function Kv(r){return window.innerWidth>767?r===0?"-90% center":r===4?"-45% center":r===6?"-260% center":r===7?"-300% center":"-50% center":"center bottom"}function jv(r,t){let e=r.getFullYear(),n=r.getMonth(),i=r.getDate(),s=t.getFullYear(),o=t.getMonth(),a=t.getDate(),l=s-e;return(o<n||o===n&&a<i)&&(l-=1),l}function Qv(r,t){let e=[r-1,r,r+1],n=document.createElement("div");n.classList.add("trust_years_counter_items"),t.appendChild(n),e.forEach(i=>{let s=document.createElement("span");s.classList.add("trust_years_counter_item"),s.innerHTML=i,n.appendChild(s)})}var vd="164";var t1=0,i0=1,e1=2;var D_=1,Sd=2,sr=3,Gr=0,Un=1,ar=2,zr=0,Vr=1,r0=2,s0=3,o0=4,n1=5,Ps=100,i1=101,r1=102,s1=103,o1=104,a1=200,l1=201,c1=202,u1=203,Of=204,Bf=205,h1=206,f1=207,d1=208,p1=209,m1=210,g1=211,_1=212,x1=213,y1=214,v1=0,S1=1,M1=2,Rc=3,b1=4,w1=5,E1=6,T1=7,R_=0,A1=1,C1=2,Hr=0,D1=1,R1=2,P1=3,I1=4,L1=5,F1=6,N1=7;var P_=300,zo=301,Vo=302,kf=303,zf=304,iu=306,Vf=1e3,Ls=1001,Hf=1002,ri=1003,U1=1004;var sc=1005;var Mi=1006,nf=1007;var Fs=1008;var Wr=1009,O1=1010,B1=1011,I_=1012,L_=1013,Ho=1014,Br=1015,ru=1016,F_=1017,N_=1018,Qa=1020,k1=35902,z1=1021,V1=1022,Oi=1023,H1=1024,G1=1025,Oo=1026,$a=1027,W1=1028,U_=1029,X1=1030,O_=1031,B_=1033,rf=33776,sf=33777,of=33778,af=33779,a0=35840,l0=35841,c0=35842,u0=35843,h0=36196,f0=37492,d0=37496,p0=37808,m0=37809,g0=37810,_0=37811,x0=37812,y0=37813,v0=37814,S0=37815,M0=37816,b0=37817,w0=37818,E0=37819,T0=37820,A0=37821,lf=36492,C0=36494,D0=36495,Y1=36283,R0=36284,P0=36285,I0=36286;var Pc=2300,Ic=2301,cf=2302,L0=2400,F0=2401,N0=2402;var q1=3200,Z1=3201,$1=0,J1=1,Or="",ii="srgb",qr="srgb-linear",Md="display-p3",su="display-p3-linear",Lc="linear",Ae="srgb",Fc="rec709",Nc="p3";var xo=7680;var U0=519,K1=512,j1=513,Q1=514,k_=515,tS=516,eS=517,nS=518,iS=519,O0=35044;var B0="300 es",lr=2e3,Uc=2001,Xr=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s<o;s++)i[s].call(this,t);t.target=null}}},pn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var uf=Math.PI/180,Gf=180/Math.PI;function tl(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(pn[r&255]+pn[r>>8&255]+pn[r>>16&255]+pn[r>>24&255]+"-"+pn[t&255]+pn[t>>8&255]+"-"+pn[t>>16&15|64]+pn[t>>24&255]+"-"+pn[e&63|128]+pn[e>>8&255]+"-"+pn[e>>16&255]+pn[e>>24&255]+pn[n&255]+pn[n>>8&255]+pn[n>>16&255]+pn[n>>24&255]).toLowerCase()}function Nn(r,t,e){return Math.max(t,Math.min(e,r))}function rS(r,t){return(r%t+t)%t}function hf(r,t,e){return(1-e)*r+e*t}function Ha(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Fn(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var xe=class r{constructor(t=0,e=0){r.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(Nn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},ae=class r{constructor(t,e,n,i,s,o,a,l,c){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c)}set(t,e,n,i,s,o,a,l,c){let h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=l,h[6]=n,h[7]=o,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],h=n[4],f=n[7],d=n[2],u=n[5],_=n[8],p=i[0],m=i[3],g=i[6],b=i[1],v=i[4],S=i[7],C=i[2],T=i[5],w=i[8];return s[0]=o*p+a*b+l*C,s[3]=o*m+a*v+l*T,s[6]=o*g+a*S+l*w,s[1]=c*p+h*b+f*C,s[4]=c*m+h*v+f*T,s[7]=c*g+h*S+f*w,s[2]=d*p+u*b+_*C,s[5]=d*m+u*v+_*T,s[8]=d*g+u*S+_*w,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8];return e*o*h-e*a*c-n*s*h+n*a*l+i*s*c-i*o*l}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=h*o-a*c,d=a*l-h*s,u=c*s-o*l,_=e*f+n*d+i*u;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/_;return t[0]=f*p,t[1]=(i*c-h*n)*p,t[2]=(a*n-i*o)*p,t[3]=d*p,t[4]=(h*e-i*l)*p,t[5]=(i*s-a*e)*p,t[6]=u*p,t[7]=(n*l-c*e)*p,t[8]=(o*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,o,a){let l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+t,-i*c,i*l,-i*(-c*o+l*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ff.makeScale(t,e)),this}rotate(t){return this.premultiply(ff.makeRotation(-t)),this}translate(t,e){return this.premultiply(ff.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},ff=new ae;function z_(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function Oc(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function sS(){let r=Oc("canvas");return r.style.display="block",r}var k0={};function oS(r){r in k0||(k0[r]=!0,console.warn(r))}var z0=new ae().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),V0=new ae().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),oc={[qr]:{transfer:Lc,primaries:Fc,toReference:r=>r,fromReference:r=>r},[ii]:{transfer:Ae,primaries:Fc,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[su]:{transfer:Lc,primaries:Nc,toReference:r=>r.applyMatrix3(V0),fromReference:r=>r.applyMatrix3(z0)},[Md]:{transfer:Ae,primaries:Nc,toReference:r=>r.convertSRGBToLinear().applyMatrix3(V0),fromReference:r=>r.applyMatrix3(z0).convertLinearToSRGB()}},aS=new Set([qr,su]),Me={enabled:!0,_workingColorSpace:qr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!aS.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,t,e){if(this.enabled===!1||t===e||!t||!e)return r;let n=oc[t].toReference,i=oc[e].fromReference;return i(n(r))},fromWorkingColorSpace:function(r,t){return this.convert(r,this._workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this._workingColorSpace)},getPrimaries:function(r){return oc[r].primaries},getTransfer:function(r){return r===Or?Lc:oc[r].transfer}};function Bo(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function df(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var yo,Wf=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{yo===void 0&&(yo=Oc("canvas")),yo.width=t.width,yo.height=t.height;let n=yo.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=yo}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Oc("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=Bo(s[o]/255)*255;return n.putImageData(i,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(Bo(e[n]/255)*255):e[n]=Bo(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},lS=0,Bc=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:lS++}),this.uuid=tl(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(pf(i[o].image)):s.push(pf(i[o]))}else s=pf(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function pf(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?Wf.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var cS=0,ai=class r extends Xr{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=Ls,i=Ls,s=Mi,o=Fs,a=Oi,l=Wr,c=r.DEFAULT_ANISOTROPY,h=Or){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:cS++}),this.uuid=tl(),this.name="",this.source=new Bc(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ae,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==P_)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Vf:t.x=t.x-Math.floor(t.x);break;case Ls:t.x=t.x<0?0:1;break;case Hf:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Vf:t.y=t.y-Math.floor(t.y);break;case Ls:t.y=t.y<0?0:1;break;case Hf:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};ai.DEFAULT_IMAGE=null;ai.DEFAULT_MAPPING=P_;ai.DEFAULT_ANISOTROPY=1;var tn=class r{constructor(t=0,e=0,n=0,i=1){r.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,l=t.elements,c=l[0],h=l[4],f=l[8],d=l[1],u=l[5],_=l[9],p=l[2],m=l[6],g=l[10];if(Math.abs(h-d)<.01&&Math.abs(f-p)<.01&&Math.abs(_-m)<.01){if(Math.abs(h+d)<.1&&Math.abs(f+p)<.1&&Math.abs(_+m)<.1&&Math.abs(c+u+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let v=(c+1)/2,S=(u+1)/2,C=(g+1)/2,T=(h+d)/4,w=(f+p)/4,P=(_+m)/4;return v>S&&v>C?v<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(v),i=T/n,s=w/n):S>C?S<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(S),n=T/i,s=P/i):C<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(C),n=w/s,i=P/s),this.set(n,i,s,e),this}let b=Math.sqrt((m-_)*(m-_)+(f-p)*(f-p)+(d-h)*(d-h));return Math.abs(b)<.001&&(b=1),this.x=(m-_)/b,this.y=(f-p)/b,this.z=(d-h)/b,this.w=Math.acos((c+u+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Xf=class extends Xr{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new tn(0,0,t,e),this.scissorTest=!1,this.viewport=new tn(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new ai(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];let o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,s=this.textures.length;i<s;i++)this.textures[i].image.width=t,this.textures[i].image.height=e,this.textures[i].image.depth=n;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,i=t.textures.length;n<i;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Bc(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},cr=class extends Xf{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},kc=class extends ai{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ri,this.minFilter=ri,this.wrapR=Ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yf=class extends ai{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ri,this.minFilter=ri,this.wrapR=Ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yr=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let l=n[i+0],c=n[i+1],h=n[i+2],f=n[i+3],d=s[o+0],u=s[o+1],_=s[o+2],p=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=h,t[e+3]=f;return}if(a===1){t[e+0]=d,t[e+1]=u,t[e+2]=_,t[e+3]=p;return}if(f!==p||l!==d||c!==u||h!==_){let m=1-a,g=l*d+c*u+h*_+f*p,b=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){let C=Math.sqrt(v),T=Math.atan2(C,g*b);m=Math.sin(m*T)/C,a=Math.sin(a*T)/C}let S=a*b;if(l=l*m+d*S,c=c*m+u*S,h=h*m+_*S,f=f*m+p*S,m===1-a){let C=1/Math.sqrt(l*l+c*c+h*h+f*f);l*=C,c*=C,h*=C,f*=C}}t[e]=l,t[e+1]=c,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],h=n[i+3],f=s[o],d=s[o+1],u=s[o+2],_=s[o+3];return t[e]=a*_+h*f+l*u-c*d,t[e+1]=l*_+h*d+c*f-a*u,t[e+2]=c*_+h*u+a*d-l*f,t[e+3]=h*_-a*f-l*d-c*u,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,l=Math.sin,c=a(n/2),h=a(i/2),f=a(s/2),d=l(n/2),u=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=d*h*f+c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f-d*u*_;break;case"YXZ":this._x=d*h*f+c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f+d*u*_;break;case"ZXY":this._x=d*h*f-c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f-d*u*_;break;case"ZYX":this._x=d*h*f-c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f+d*u*_;break;case"YZX":this._x=d*h*f+c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f-d*u*_;break;case"XZY":this._x=d*h*f-c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f+d*u*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],l=e[9],c=e[2],h=e[6],f=e[10],d=n+a+f;if(d>0){let u=.5/Math.sqrt(d+1);this._w=.25/u,this._x=(h-l)*u,this._y=(s-c)*u,this._z=(o-i)*u}else if(n>a&&n>f){let u=2*Math.sqrt(1+n-a-f);this._w=(h-l)/u,this._x=.25*u,this._y=(i+o)/u,this._z=(s+c)/u}else if(a>f){let u=2*Math.sqrt(1+a-n-f);this._w=(s-c)/u,this._x=(i+o)/u,this._y=.25*u,this._z=(l+h)/u}else{let u=2*Math.sqrt(1+f-n-a);this._w=(o-i)/u,this._x=(s+c)/u,this._y=(l+h)/u,this._z=.25*u}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Nn(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,l=e._y,c=e._z,h=e._w;return this._x=n*h+o*a+i*c-s*l,this._y=i*h+o*l+s*a-n*c,this._z=s*h+o*c+n*l-i*a,this._w=o*h-n*a-i*l-s*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let l=1-a*a;if(l<=Number.EPSILON){let u=1-e;return this._w=u*o+e*this._w,this._x=u*n+e*this._x,this._y=u*i+e*this._y,this._z=u*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),h=Math.atan2(c,a),f=Math.sin((1-e)*h)/c,d=Math.sin(e*h)/c;return this._w=o*f+this._w*d,this._x=n*f+this._x*d,this._y=i*f+this._y*d,this._z=s*f+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},it=class r{constructor(t=0,e=0,n=0){r.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(H0.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(H0.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,l=t.w,c=2*(o*i-a*n),h=2*(a*e-s*i),f=2*(s*n-o*e);return this.x=e+l*c+o*f-a*h,this.y=n+l*h+a*c-s*f,this.z=i+l*f+s*h-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return this.x=i*l-s*a,this.y=s*o-n*l,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return mf.copy(this).projectOnVector(t),this.sub(mf)}reflect(t){return this.sub(mf.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(Nn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},mf=new it,H0=new Yr,Ns=class{constructor(t=new it(1/0,1/0,1/0),e=new it(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(yi.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(yi.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=yi.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let s=n.getAttribute("position");if(e===!0&&s!==void 0&&t.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)t.isMesh===!0?t.getVertexPosition(o,yi):yi.fromBufferAttribute(s,o),yi.applyMatrix4(t.matrixWorld),this.expandByPoint(yi);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),ac.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),ac.copy(n.boundingBox)),ac.applyMatrix4(t.matrixWorld),this.union(ac)}let i=t.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],e);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,yi),yi.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ga),lc.subVectors(this.max,Ga),vo.subVectors(t.a,Ga),So.subVectors(t.b,Ga),Mo.subVectors(t.c,Ga),Pr.subVectors(So,vo),Ir.subVectors(Mo,So),ws.subVectors(vo,Mo);let e=[0,-Pr.z,Pr.y,0,-Ir.z,Ir.y,0,-ws.z,ws.y,Pr.z,0,-Pr.x,Ir.z,0,-Ir.x,ws.z,0,-ws.x,-Pr.y,Pr.x,0,-Ir.y,Ir.x,0,-ws.y,ws.x,0];return!gf(e,vo,So,Mo,lc)||(e=[1,0,0,0,1,0,0,0,1],!gf(e,vo,So,Mo,lc))?!1:(cc.crossVectors(Pr,Ir),e=[cc.x,cc.y,cc.z],gf(e,vo,So,Mo,lc))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,yi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(yi).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(tr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),tr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),tr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),tr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),tr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),tr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),tr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),tr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(tr),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},tr=[new it,new it,new it,new it,new it,new it,new it,new it],yi=new it,ac=new Ns,vo=new it,So=new it,Mo=new it,Pr=new it,Ir=new it,ws=new it,Ga=new it,lc=new it,cc=new it,Es=new it;function gf(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){Es.fromArray(r,s);let a=i.x*Math.abs(Es.x)+i.y*Math.abs(Es.y)+i.z*Math.abs(Es.z),l=t.dot(Es),c=e.dot(Es),h=n.dot(Es);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>a)return!1}return!0}var uS=new Ns,Wa=new it,_f=new it,Go=class{constructor(t=new it,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):uS.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;s<o;s++)i=Math.max(i,n.distanceToSquared(t[s]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Wa.subVectors(t,this.center);let e=Wa.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Wa,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(_f.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Wa.copy(t.center).add(_f)),this.expandByPoint(Wa.copy(t.center).sub(_f))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},er=new it,xf=new it,uc=new it,Lr=new it,yf=new it,hc=new it,vf=new it,zc=class{constructor(t=new it,e=new it(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,er)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=er.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(er.copy(this.origin).addScaledVector(this.direction,e),er.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){xf.copy(t).add(e).multiplyScalar(.5),uc.copy(e).sub(t).normalize(),Lr.copy(this.origin).sub(xf);let s=t.distanceTo(e)*.5,o=-this.direction.dot(uc),a=Lr.dot(this.direction),l=-Lr.dot(uc),c=Lr.lengthSq(),h=Math.abs(1-o*o),f,d,u,_;if(h>0)if(f=o*l-a,d=o*a-l,_=s*h,f>=0)if(d>=-_)if(d<=_){let p=1/h;f*=p,d*=p,u=f*(f+o*d+2*a)+d*(o*f+d+2*l)+c}else d=s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;else d=-s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;else d<=-_?(f=Math.max(0,-(-o*s+a)),d=f>0?-s:Math.min(Math.max(-s,-l),s),u=-f*f+d*(d+2*l)+c):d<=_?(f=0,d=Math.min(Math.max(-s,-l),s),u=d*(d+2*l)+c):(f=Math.max(0,-(o*s+a)),d=f>0?s:Math.min(Math.max(-s,-l),s),u=-f*f+d*(d+2*l)+c);else d=o>0?-s:s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(xf).addScaledVector(uc,d),u}intersectSphere(t,e){er.subVectors(t.center,this.origin);let n=er.dot(this.direction),i=er.dot(er)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,l,c=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,d=this.origin;return c>=0?(n=(t.min.x-d.x)*c,i=(t.max.x-d.x)*c):(n=(t.max.x-d.x)*c,i=(t.min.x-d.x)*c),h>=0?(s=(t.min.y-d.y)*h,o=(t.max.y-d.y)*h):(s=(t.max.y-d.y)*h,o=(t.min.y-d.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),f>=0?(a=(t.min.z-d.z)*f,l=(t.max.z-d.z)*f):(a=(t.max.z-d.z)*f,l=(t.min.z-d.z)*f),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,er)!==null}intersectTriangle(t,e,n,i,s){yf.subVectors(e,t),hc.subVectors(n,t),vf.crossVectors(yf,hc);let o=this.direction.dot(vf),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Lr.subVectors(this.origin,t);let l=a*this.direction.dot(hc.crossVectors(Lr,hc));if(l<0)return null;let c=a*this.direction.dot(yf.cross(Lr));if(c<0||l+c>o)return null;let h=-a*Lr.dot(vf);return h<0?null:this.at(h/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Be=class r{constructor(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m)}set(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m){let g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=h,g[10]=f,g[14]=d,g[3]=u,g[7]=_,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new r().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/bo.setFromMatrixColumn(t,0).length(),s=1/bo.setFromMatrixColumn(t,1).length(),o=1/bo.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let d=o*h,u=o*f,_=a*h,p=a*f;e[0]=l*h,e[4]=-l*f,e[8]=c,e[1]=u+_*c,e[5]=d-p*c,e[9]=-a*l,e[2]=p-d*c,e[6]=_+u*c,e[10]=o*l}else if(t.order==="YXZ"){let d=l*h,u=l*f,_=c*h,p=c*f;e[0]=d+p*a,e[4]=_*a-u,e[8]=o*c,e[1]=o*f,e[5]=o*h,e[9]=-a,e[2]=u*a-_,e[6]=p+d*a,e[10]=o*l}else if(t.order==="ZXY"){let d=l*h,u=l*f,_=c*h,p=c*f;e[0]=d-p*a,e[4]=-o*f,e[8]=_+u*a,e[1]=u+_*a,e[5]=o*h,e[9]=p-d*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let d=o*h,u=o*f,_=a*h,p=a*f;e[0]=l*h,e[4]=_*c-u,e[8]=d*c+p,e[1]=l*f,e[5]=p*c+d,e[9]=u*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let d=o*l,u=o*c,_=a*l,p=a*c;e[0]=l*h,e[4]=p-d*f,e[8]=_*f+u,e[1]=f,e[5]=o*h,e[9]=-a*h,e[2]=-c*h,e[6]=u*f+_,e[10]=d-p*f}else if(t.order==="XZY"){let d=o*l,u=o*c,_=a*l,p=a*c;e[0]=l*h,e[4]=-f,e[8]=c*h,e[1]=d*f+p,e[5]=o*h,e[9]=u*f-_,e[2]=_*f-u,e[6]=a*h,e[10]=p*f+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(hS,t,fS)}lookAt(t,e,n){let i=this.elements;return Gn.subVectors(t,e),Gn.lengthSq()===0&&(Gn.z=1),Gn.normalize(),Fr.crossVectors(n,Gn),Fr.lengthSq()===0&&(Math.abs(n.z)===1?Gn.x+=1e-4:Gn.z+=1e-4,Gn.normalize(),Fr.crossVectors(n,Gn)),Fr.normalize(),fc.crossVectors(Gn,Fr),i[0]=Fr.x,i[4]=fc.x,i[8]=Gn.x,i[1]=Fr.y,i[5]=fc.y,i[9]=Gn.y,i[2]=Fr.z,i[6]=fc.z,i[10]=Gn.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],h=n[1],f=n[5],d=n[9],u=n[13],_=n[2],p=n[6],m=n[10],g=n[14],b=n[3],v=n[7],S=n[11],C=n[15],T=i[0],w=i[4],P=i[8],M=i[12],y=i[1],I=i[5],N=i[9],D=i[13],V=i[2],K=i[6],W=i[10],Z=i[14],z=i[3],U=i[7],R=i[11],lt=i[15];return s[0]=o*T+a*y+l*V+c*z,s[4]=o*w+a*I+l*K+c*U,s[8]=o*P+a*N+l*W+c*R,s[12]=o*M+a*D+l*Z+c*lt,s[1]=h*T+f*y+d*V+u*z,s[5]=h*w+f*I+d*K+u*U,s[9]=h*P+f*N+d*W+u*R,s[13]=h*M+f*D+d*Z+u*lt,s[2]=_*T+p*y+m*V+g*z,s[6]=_*w+p*I+m*K+g*U,s[10]=_*P+p*N+m*W+g*R,s[14]=_*M+p*D+m*Z+g*lt,s[3]=b*T+v*y+S*V+C*z,s[7]=b*w+v*I+S*K+C*U,s[11]=b*P+v*N+S*W+C*R,s[15]=b*M+v*D+S*Z+C*lt,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],l=t[9],c=t[13],h=t[2],f=t[6],d=t[10],u=t[14],_=t[3],p=t[7],m=t[11],g=t[15];return _*(+s*l*f-i*c*f-s*a*d+n*c*d+i*a*u-n*l*u)+p*(+e*l*u-e*c*d+s*o*d-i*o*u+i*c*h-s*l*h)+m*(+e*c*f-e*a*u-s*o*f+n*o*u+s*a*h-n*c*h)+g*(-i*a*h-e*l*f+e*a*d+i*o*f-n*o*d+n*l*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=t[9],d=t[10],u=t[11],_=t[12],p=t[13],m=t[14],g=t[15],b=f*m*c-p*d*c+p*l*u-a*m*u-f*l*g+a*d*g,v=_*d*c-h*m*c-_*l*u+o*m*u+h*l*g-o*d*g,S=h*p*c-_*f*c+_*a*u-o*p*u-h*a*g+o*f*g,C=_*f*l-h*p*l-_*a*d+o*p*d+h*a*m-o*f*m,T=e*b+n*v+i*S+s*C;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let w=1/T;return t[0]=b*w,t[1]=(p*d*s-f*m*s-p*i*u+n*m*u+f*i*g-n*d*g)*w,t[2]=(a*m*s-p*l*s+p*i*c-n*m*c-a*i*g+n*l*g)*w,t[3]=(f*l*s-a*d*s-f*i*c+n*d*c+a*i*u-n*l*u)*w,t[4]=v*w,t[5]=(h*m*s-_*d*s+_*i*u-e*m*u-h*i*g+e*d*g)*w,t[6]=(_*l*s-o*m*s-_*i*c+e*m*c+o*i*g-e*l*g)*w,t[7]=(o*d*s-h*l*s+h*i*c-e*d*c-o*i*u+e*l*u)*w,t[8]=S*w,t[9]=(_*f*s-h*p*s-_*n*u+e*p*u+h*n*g-e*f*g)*w,t[10]=(o*p*s-_*a*s+_*n*c-e*p*c-o*n*g+e*a*g)*w,t[11]=(h*a*s-o*f*s-h*n*c+e*f*c+o*n*u-e*a*u)*w,t[12]=C*w,t[13]=(h*p*i-_*f*i+_*n*d-e*p*d-h*n*m+e*f*m)*w,t[14]=(_*a*i-o*p*i-_*n*l+e*p*l+o*n*m-e*a*m)*w,t[15]=(o*f*i-h*a*i+h*n*l-e*f*l-o*n*d+e*a*d)*w,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,l=t.z,c=s*o,h=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,h*a+n,h*l-i*o,0,c*l-i*a,h*l+i*o,s*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,l=e._w,c=s+s,h=o+o,f=a+a,d=s*c,u=s*h,_=s*f,p=o*h,m=o*f,g=a*f,b=l*c,v=l*h,S=l*f,C=n.x,T=n.y,w=n.z;return i[0]=(1-(p+g))*C,i[1]=(u+S)*C,i[2]=(_-v)*C,i[3]=0,i[4]=(u-S)*T,i[5]=(1-(d+g))*T,i[6]=(m+b)*T,i[7]=0,i[8]=(_+v)*w,i[9]=(m-b)*w,i[10]=(1-(d+p))*w,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=bo.set(i[0],i[1],i[2]).length(),o=bo.set(i[4],i[5],i[6]).length(),a=bo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],vi.copy(this);let c=1/s,h=1/o,f=1/a;return vi.elements[0]*=c,vi.elements[1]*=c,vi.elements[2]*=c,vi.elements[4]*=h,vi.elements[5]*=h,vi.elements[6]*=h,vi.elements[8]*=f,vi.elements[9]*=f,vi.elements[10]*=f,e.setFromRotationMatrix(vi),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=lr){let l=this.elements,c=2*s/(e-t),h=2*s/(n-i),f=(e+t)/(e-t),d=(n+i)/(n-i),u,_;if(a===lr)u=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===Uc)u=-o/(o-s),_=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=h,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=u,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=lr){let l=this.elements,c=1/(e-t),h=1/(n-i),f=1/(o-s),d=(e+t)*c,u=(n+i)*h,_,p;if(a===lr)_=(o+s)*f,p=-2*f;else if(a===Uc)_=s*f,p=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-u,l[2]=0,l[6]=0,l[10]=p,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},bo=new it,vi=new Be,hS=new it(0,0,0),fS=new it(1,1,1),Fr=new it,fc=new it,Gn=new it,G0=new Be,W0=new Yr,ur=class r{constructor(t=0,e=0,n=0,i=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],h=i[9],f=i[2],d=i[6],u=i[10];switch(e){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,u),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,u),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-f,u),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Nn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(d,u),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Nn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,u));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,u),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return G0.makeRotationFromQuaternion(t),this.setFromRotationMatrix(G0,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return W0.setFromEuler(this),this.setFromQuaternion(W0,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};ur.DEFAULT_ORDER="XYZ";var Vc=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},dS=0,X0=new it,wo=new Yr,nr=new Be,dc=new it,Xa=new it,pS=new it,mS=new Yr,Y0=new it(1,0,0),q0=new it(0,1,0),Z0=new it(0,0,1),$0={type:"added"},gS={type:"removed"},Eo={type:"childadded",child:null},Sf={type:"childremoved",child:null},gn=class r extends Xr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:dS++}),this.uuid=tl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new it,e=new ur,n=new Yr,i=new it(1,1,1);function s(){n.setFromEuler(e,!1)}function o(){e.setFromQuaternion(n,void 0,!1)}e._onChange(s),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Be},normalMatrix:{value:new ae}}),this.matrix=new Be,this.matrixWorld=new Be,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Vc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return wo.setFromAxisAngle(t,e),this.quaternion.multiply(wo),this}rotateOnWorldAxis(t,e){return wo.setFromAxisAngle(t,e),this.quaternion.premultiply(wo),this}rotateX(t){return this.rotateOnAxis(Y0,t)}rotateY(t){return this.rotateOnAxis(q0,t)}rotateZ(t){return this.rotateOnAxis(Z0,t)}translateOnAxis(t,e){return X0.copy(t).applyQuaternion(this.quaternion),this.position.add(X0.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Y0,t)}translateY(t){return this.translateOnAxis(q0,t)}translateZ(t){return this.translateOnAxis(Z0,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(nr.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?dc.copy(t):dc.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Xa.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nr.lookAt(Xa,dc,this.up):nr.lookAt(dc,Xa,this.up),this.quaternion.setFromRotationMatrix(nr),i&&(nr.extractRotation(i.matrixWorld),wo.setFromRotationMatrix(nr),this.quaternion.premultiply(wo.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent($0),Eo.child=t,this.dispatchEvent(Eo),Eo.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(gS),Sf.child=t,this.dispatchEvent(Sf),Sf.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),nr.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),nr.multiply(t.parent.matrixWorld)),t.applyMatrix4(nr),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent($0),Eo.child=t,this.dispatchEvent(Eo),Eo.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){let o=this.children[n].getObjectByProperty(t,e);if(o!==void 0)return o}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);let i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xa,t,pS),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xa,mS,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){let e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let e=this.children;for(let n=0,i=e.length;n<i;n++){let s=e[n];(s.matrixWorldAutoUpdate===!0||t===!0)&&s.updateMatrixWorld(t)}}updateWorldMatrix(t,e){let n=this.parent;if(t===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0){let i=this.children;for(let s=0,o=i.length;s<o;s++){let a=i[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(t){let e=t===void 0||typeof t=="string",n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let l=a.shapes;if(Array.isArray(l))for(let c=0,h=l.length;c<h;c++){let f=l[c];s(t.shapes,f)}else s(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(t.materials,this.material[l]));i.material=a}else i.material=s(t.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){let l=this.animations[a];i.animations.push(s(t.animations,l))}}if(e){let a=o(t.geometries),l=o(t.materials),c=o(t.textures),h=o(t.images),f=o(t.shapes),d=o(t.skeletons),u=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),d.length>0&&(n.skeletons=d),u.length>0&&(n.animations=u),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let h=a[c];delete h.metadata,l.push(h)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};gn.DEFAULT_UP=new it(0,1,0);gn.DEFAULT_MATRIX_AUTO_UPDATE=!0;gn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var Si=new it,ir=new it,Mf=new it,rr=new it,To=new it,Ao=new it,J0=new it,bf=new it,wf=new it,Ef=new it,No=class r{constructor(t=new it,e=new it,n=new it){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),Si.subVectors(t,e),i.cross(Si);let s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){Si.subVectors(i,e),ir.subVectors(n,e),Mf.subVectors(t,e);let o=Si.dot(Si),a=Si.dot(ir),l=Si.dot(Mf),c=ir.dot(ir),h=ir.dot(Mf),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;let d=1/f,u=(c*l-a*h)*d,_=(o*h-a*l)*d;return s.set(1-u-_,_,u)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,rr)===null?!1:rr.x>=0&&rr.y>=0&&rr.x+rr.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,rr)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,rr.x),l.addScaledVector(o,rr.y),l.addScaledVector(a,rr.z),l)}static isFrontFacing(t,e,n,i){return Si.subVectors(n,e),ir.subVectors(t,e),Si.cross(ir).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Si.subVectors(this.c,this.b),ir.subVectors(this.a,this.b),Si.cross(ir).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return r.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return r.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,s){return r.getInterpolation(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return r.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return r.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;To.subVectors(i,n),Ao.subVectors(s,n),bf.subVectors(t,n);let l=To.dot(bf),c=Ao.dot(bf);if(l<=0&&c<=0)return e.copy(n);wf.subVectors(t,i);let h=To.dot(wf),f=Ao.dot(wf);if(h>=0&&f<=h)return e.copy(i);let d=l*f-h*c;if(d<=0&&l>=0&&h<=0)return o=l/(l-h),e.copy(n).addScaledVector(To,o);Ef.subVectors(t,s);let u=To.dot(Ef),_=Ao.dot(Ef);if(_>=0&&u<=_)return e.copy(s);let p=u*c-l*_;if(p<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(Ao,a);let m=h*_-u*f;if(m<=0&&f-h>=0&&u-_>=0)return J0.subVectors(s,i),a=(f-h)/(f-h+(u-_)),e.copy(i).addScaledVector(J0,a);let g=1/(m+p+d);return o=p*g,a=d*g,e.copy(n).addScaledVector(To,o).addScaledVector(Ao,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},V_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Nr={h:0,s:0,l:0},pc={h:0,s:0,l:0};function Tf(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}var _e=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=ii){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Me.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Me.workingColorSpace){return this.r=t,this.g=e,this.b=n,Me.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Me.workingColorSpace){if(t=rS(t,1),e=Nn(e,0,1),n=Nn(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Tf(o,s,t+1/3),this.g=Tf(o,s,t),this.b=Tf(o,s,t-1/3)}return Me.toWorkingColorSpace(this,i),this}setStyle(t,e=ii){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(o===6)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=ii){let n=V_[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Bo(t.r),this.g=Bo(t.g),this.b=Bo(t.b),this}copyLinearToSRGB(t){return this.r=df(t.r),this.g=df(t.g),this.b=df(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=ii){return Me.fromWorkingColorSpace(mn.copy(this),t),Math.round(Nn(mn.r*255,0,255))*65536+Math.round(Nn(mn.g*255,0,255))*256+Math.round(Nn(mn.b*255,0,255))}getHexString(t=ii){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Me.workingColorSpace){Me.fromWorkingColorSpace(mn.copy(this),e);let n=mn.r,i=mn.g,s=mn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,h=(a+o)/2;if(a===o)l=0,c=0;else{let f=o-a;switch(c=h<=.5?f/(o+a):f/(2-o-a),o){case n:l=(i-s)/f+(i<s?6:0);break;case i:l=(s-n)/f+2;break;case s:l=(n-i)/f+4;break}l/=6}return t.h=l,t.s=c,t.l=h,t}getRGB(t,e=Me.workingColorSpace){return Me.fromWorkingColorSpace(mn.copy(this),e),t.r=mn.r,t.g=mn.g,t.b=mn.b,t}getStyle(t=ii){Me.fromWorkingColorSpace(mn.copy(this),t);let e=mn.r,n=mn.g,i=mn.b;return t!==ii?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(t,e,n){return this.getHSL(Nr),this.setHSL(Nr.h+t,Nr.s+e,Nr.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Nr),t.getHSL(pc);let n=hf(Nr.h,pc.h,e),i=hf(Nr.s,pc.s,e),s=hf(Nr.l,pc.l,e);return this.setHSL(n,i,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,i=this.b,s=t.elements;return this.r=s[0]*e+s[3]*n+s[6]*i,this.g=s[1]*e+s[4]*n+s[7]*i,this.b=s[2]*e+s[5]*n+s[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mn=new _e;_e.NAMES=V_;var _S=0,Us=class extends Xr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_S++}),this.uuid=tl(),this.name="",this.type="Material",this.blending=Vr,this.side=Gr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Of,this.blendDst=Bf,this.blendEquation=Ps,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _e(0,0,0),this.blendAlpha=0,this.depthFunc=Rc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=U0,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xo,this.stencilZFail=xo,this.stencilZPass=xo,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}let i=this[e];if(i===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Vr&&(n.blending=this.blending),this.side!==Gr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Of&&(n.blendSrc=this.blendSrc),this.blendDst!==Bf&&(n.blendDst=this.blendDst),this.blendEquation!==Ps&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Rc&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==U0&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xo&&(n.stencilFail=this.stencilFail),this.stencilZFail!==xo&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==xo&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let l=s[a];delete l.metadata,o.push(l)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Hc=class extends Us{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _e(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ur,this.combine=R_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}};var Ge=new it,mc=new xe,si=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=O0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Br,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return oS("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)mc.fromBufferAttribute(this,e),mc.applyMatrix3(t),this.setXY(e,mc.x,mc.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyMatrix3(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyMatrix4(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyNormalMatrix(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.transformDirection(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Ha(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Fn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Ha(e,this.array)),e}setX(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Ha(e,this.array)),e}setY(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Ha(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Ha(e,this.array)),e}setW(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array),i=Fn(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,s){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array),i=Fn(i,this.array),s=Fn(s,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=s,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==O0&&(t.usage=this.usage),t}};var Gc=class extends si{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var Wc=class extends si{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var oi=class extends si{constructor(t,e,n){super(new Float32Array(t),e,n)}},xS=0,ni=new Be,Af=new gn,Co=new it,Wn=new Ns,Ya=new Ns,Qe=new it,Bi=class r extends Xr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:xS++}),this.uuid=tl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(z_(t)?Wc:Gc)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let s=new ae().getNormalMatrix(t);n.applyNormalMatrix(s),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return ni.makeRotationFromQuaternion(t),this.applyMatrix4(ni),this}rotateX(t){return ni.makeRotationX(t),this.applyMatrix4(ni),this}rotateY(t){return ni.makeRotationY(t),this.applyMatrix4(ni),this}rotateZ(t){return ni.makeRotationZ(t),this.applyMatrix4(ni),this}translate(t,e,n){return ni.makeTranslation(t,e,n),this.applyMatrix4(ni),this}scale(t,e,n){return ni.makeScale(t,e,n),this.applyMatrix4(ni),this}lookAt(t){return Af.lookAt(t),Af.updateMatrix(),this.applyMatrix4(Af.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Co).negate(),this.translate(Co.x,Co.y,Co.z),this}setFromPoints(t){let e=[];for(let n=0,i=t.length;n<i;n++){let s=t[n];e.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new oi(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ns);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new it(-1/0,-1/0,-1/0),new it(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,i=e.length;n<i;n++){let s=e[n];Wn.setFromBufferAttribute(s),this.morphTargetsRelative?(Qe.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Qe),Qe.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Qe)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Go);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new it,1/0);return}if(t){let n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];Ya.setFromBufferAttribute(a),this.morphTargetsRelative?(Qe.addVectors(Wn.min,Ya.min),Wn.expandByPoint(Qe),Qe.addVectors(Wn.max,Ya.max),Wn.expandByPoint(Qe)):(Wn.expandByPoint(Ya.min),Wn.expandByPoint(Ya.max))}Wn.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)Qe.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(Qe));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,h=a.count;c<h;c++)Qe.fromBufferAttribute(a,c),l&&(Co.fromBufferAttribute(t,c),Qe.add(Co)),i=Math.max(i,n.distanceToSquared(Qe))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,i=e.normal,s=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new si(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new it,l[P]=new it;let c=new it,h=new it,f=new it,d=new xe,u=new xe,_=new xe,p=new it,m=new it;function g(P,M,y){c.fromBufferAttribute(n,P),h.fromBufferAttribute(n,M),f.fromBufferAttribute(n,y),d.fromBufferAttribute(s,P),u.fromBufferAttribute(s,M),_.fromBufferAttribute(s,y),h.sub(c),f.sub(c),u.sub(d),_.sub(d);let I=1/(u.x*_.y-_.x*u.y);isFinite(I)&&(p.copy(h).multiplyScalar(_.y).addScaledVector(f,-u.y).multiplyScalar(I),m.copy(f).multiplyScalar(u.x).addScaledVector(h,-_.x).multiplyScalar(I),a[P].add(p),a[M].add(p),a[y].add(p),l[P].add(m),l[M].add(m),l[y].add(m))}let b=this.groups;b.length===0&&(b=[{start:0,count:t.count}]);for(let P=0,M=b.length;P<M;++P){let y=b[P],I=y.start,N=y.count;for(let D=I,V=I+N;D<V;D+=3)g(t.getX(D+0),t.getX(D+1),t.getX(D+2))}let v=new it,S=new it,C=new it,T=new it;function w(P){C.fromBufferAttribute(i,P),T.copy(C);let M=a[P];v.copy(M),v.sub(C.multiplyScalar(C.dot(M))).normalize(),S.crossVectors(T,M);let I=S.dot(l[P])<0?-1:1;o.setXYZW(P,v.x,v.y,v.z,I)}for(let P=0,M=b.length;P<M;++P){let y=b[P],I=y.start,N=y.count;for(let D=I,V=I+N;D<V;D+=3)w(t.getX(D+0)),w(t.getX(D+1)),w(t.getX(D+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new si(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let d=0,u=n.count;d<u;d++)n.setXYZ(d,0,0,0);let i=new it,s=new it,o=new it,a=new it,l=new it,c=new it,h=new it,f=new it;if(t)for(let d=0,u=t.count;d<u;d+=3){let _=t.getX(d+0),p=t.getX(d+1),m=t.getX(d+2);i.fromBufferAttribute(e,_),s.fromBufferAttribute(e,p),o.fromBufferAttribute(e,m),h.subVectors(o,s),f.subVectors(i,s),h.cross(f),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,p),c.fromBufferAttribute(n,m),a.add(h),l.add(h),c.add(h),n.setXYZ(_,a.x,a.y,a.z),n.setXYZ(p,l.x,l.y,l.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let d=0,u=e.count;d<u;d+=3)i.fromBufferAttribute(e,d+0),s.fromBufferAttribute(e,d+1),o.fromBufferAttribute(e,d+2),h.subVectors(o,s),f.subVectors(i,s),h.cross(f),n.setXYZ(d+0,h.x,h.y,h.z),n.setXYZ(d+1,h.x,h.y,h.z),n.setXYZ(d+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Qe.fromBufferAttribute(t,e),Qe.normalize(),t.setXYZ(e,Qe.x,Qe.y,Qe.z)}toNonIndexed(){function t(a,l){let c=a.array,h=a.itemSize,f=a.normalized,d=new c.constructor(l.length*h),u=0,_=0;for(let p=0,m=l.length;p<m;p++){a.isInterleavedBufferAttribute?u=l[p]*a.data.stride+a.offset:u=l[p]*h;for(let g=0;g<h;g++)d[_++]=c[u++]}return new si(d,h,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new r,n=this.index.array,i=this.attributes;for(let a in i){let l=i[a],c=t(l,n);e.setAttribute(a,c)}let s=this.morphAttributes;for(let a in s){let l=[],c=s[a];for(let h=0,f=c.length;h<f;h++){let d=c[h],u=t(d,n);l.push(u)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let a=0,l=o.length;a<l;a++){let c=o[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},s=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],h=[];for(let f=0,d=c.length;f<d;f++){let u=c[f];h.push(u.toJSON(t.data))}h.length>0&&(i[l]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let c in i){let h=i[c];this.setAttribute(c,h.clone(e))}let s=t.morphAttributes;for(let c in s){let h=[],f=s[c];for(let d=0,u=f.length;d<u;d++)h.push(f[d].clone(e));this.morphAttributes[c]=h}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,h=o.length;c<h;c++){let f=o[c];this.addGroup(f.start,f.count,f.materialIndex)}let a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},K0=new Be,Ts=new zc,gc=new Go,j0=new it,Do=new it,Ro=new it,Po=new it,Cf=new it,_c=new it,xc=new xe,yc=new xe,vc=new xe,Q0=new it,t_=new it,e_=new it,Sc=new it,Mc=new it,bi=class extends gn{constructor(t=new Bi,e=new Hc){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(t,e){let n=this.geometry,i=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;e.fromBufferAttribute(i,t);let a=this.morphTargetInfluences;if(s&&a){_c.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let h=a[l],f=s[l];h!==0&&(Cf.fromBufferAttribute(f,t),o?_c.addScaledVector(Cf,h):_c.addScaledVector(Cf.sub(e),h))}e.add(_c)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),gc.copy(n.boundingSphere),gc.applyMatrix4(s),Ts.copy(t.ray).recast(t.near),!(gc.containsPoint(Ts.origin)===!1&&(Ts.intersectSphere(gc,j0)===null||Ts.origin.distanceToSquared(j0)>(t.far-t.near)**2))&&(K0.copy(s).invert(),Ts.copy(t.ray).applyMatrix4(K0),!(n.boundingBox!==null&&Ts.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Ts)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,f=s.attributes.normal,d=s.groups,u=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,p=d.length;_<p;_++){let m=d[_],g=o[m.materialIndex],b=Math.max(m.start,u.start),v=Math.min(a.count,Math.min(m.start+m.count,u.start+u.count));for(let S=b,C=v;S<C;S+=3){let T=a.getX(S),w=a.getX(S+1),P=a.getX(S+2);i=bc(this,g,t,n,c,h,f,T,w,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=m.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),p=Math.min(a.count,u.start+u.count);for(let m=_,g=p;m<g;m+=3){let b=a.getX(m),v=a.getX(m+1),S=a.getX(m+2);i=bc(this,o,t,n,c,h,f,b,v,S),i&&(i.faceIndex=Math.floor(m/3),e.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let _=0,p=d.length;_<p;_++){let m=d[_],g=o[m.materialIndex],b=Math.max(m.start,u.start),v=Math.min(l.count,Math.min(m.start+m.count,u.start+u.count));for(let S=b,C=v;S<C;S+=3){let T=S,w=S+1,P=S+2;i=bc(this,g,t,n,c,h,f,T,w,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=m.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),p=Math.min(l.count,u.start+u.count);for(let m=_,g=p;m<g;m+=3){let b=m,v=m+1,S=m+2;i=bc(this,o,t,n,c,h,f,b,v,S),i&&(i.faceIndex=Math.floor(m/3),e.push(i))}}}};function yS(r,t,e,n,i,s,o,a){let l;if(t.side===Un?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===Gr,a),l===null)return null;Mc.copy(a),Mc.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Mc);return c<e.near||c>e.far?null:{distance:c,point:Mc.clone(),object:r}}function bc(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,Do),r.getVertexPosition(l,Ro),r.getVertexPosition(c,Po);let h=yS(r,t,e,n,Do,Ro,Po,Sc);if(h){i&&(xc.fromBufferAttribute(i,a),yc.fromBufferAttribute(i,l),vc.fromBufferAttribute(i,c),h.uv=No.getInterpolation(Sc,Do,Ro,Po,xc,yc,vc,new xe)),s&&(xc.fromBufferAttribute(s,a),yc.fromBufferAttribute(s,l),vc.fromBufferAttribute(s,c),h.uv1=No.getInterpolation(Sc,Do,Ro,Po,xc,yc,vc,new xe)),o&&(Q0.fromBufferAttribute(o,a),t_.fromBufferAttribute(o,l),e_.fromBufferAttribute(o,c),h.normal=No.getInterpolation(Sc,Do,Ro,Po,Q0,t_,e_,new it),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new it,materialIndex:0};No.getNormal(Do,Ro,Po,f.normal),h.face=f}return h}var Ja=class r extends Bi{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let l=[],c=[],h=[],f=[],d=0,u=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new oi(c,3)),this.setAttribute("normal",new oi(h,3)),this.setAttribute("uv",new oi(f,2));function _(p,m,g,b,v,S,C,T,w,P,M){let y=S/w,I=C/P,N=S/2,D=C/2,V=T/2,K=w+1,W=P+1,Z=0,z=0,U=new it;for(let R=0;R<W;R++){let lt=R*I-D;for(let xt=0;xt<K;xt++){let Bt=xt*y-N;U[p]=Bt*b,U[m]=lt*v,U[g]=V,c.push(U.x,U.y,U.z),U[p]=0,U[m]=0,U[g]=T>0?1:-1,h.push(U.x,U.y,U.z),f.push(xt/w),f.push(1-R/P),Z+=1}}for(let R=0;R<P;R++)for(let lt=0;lt<w;lt++){let xt=d+lt+K*R,Bt=d+lt+K*(R+1),X=d+(lt+1)+K*(R+1),at=d+(lt+1)+K*R;l.push(xt,Bt,at),l.push(Bt,X,at),z+=6}a.addGroup(u,z,M),u+=z,d+=Z}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Wo(r){let t={};for(let e in r){t[e]={};for(let n in r[e]){let i=r[e][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=i.clone():Array.isArray(i)?t[e][n]=i.slice():t[e][n]=i}}return t}function An(r){let t={};for(let e=0;e<r.length;e++){let n=Wo(r[e]);for(let i in n)t[i]=n[i]}return t}function vS(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function H_(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Me.workingColorSpace}var SS={clone:Wo,merge:An},MS=`void main() {
1
+ (()=>{function ki(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nd(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var In={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Vs={duration:.5,overwrite:!1,delay:0},Cu,ln,Ce,qn=1e8,Ee=1/qn,_u=Math.PI*2,K_=_u/4,j_=0,Ud=Math.sqrt,Q_=Math.cos,tx=Math.sin,We=function(t){return typeof t=="string"},Le=function(t){return typeof t=="function"},Vi=function(t){return typeof t=="number"},ul=function(t){return typeof t>"u"},Ci=function(t){return typeof t=="object"},Pn=function(t){return t!==!1},Du=function(){return typeof window<"u"},el=function(t){return Le(t)||We(t)},Od=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},cn=Array.isArray,xu=/(?:-?\.?\d|\.)+/gi,Ru=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Qr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,uu=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Pu=/[+-]=-?[.\d]+/,Bd=/[^,'"\[\]\s]+/gi,ex=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Re,Ti,yu,Iu,Bn={},sl={},kd,zd=function(t){return(sl=jr(t,Bn))&&un},hl=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Qo=function(t,e){return!e&&console.warn(t)},Vd=function(t,e){return t&&(Bn[t]=e)&&sl&&(sl[t]=e)||Bn},ta=function(){return 0},nx={suppressEvents:!0,isStart:!0,kill:!1},nl={suppressEvents:!0,kill:!1},ix={suppressEvents:!0},Lu={},dr=[],vu={},Hd,Dn={},hu={},Cd=30,il=[],Fu="",Nu=function(t){var e=t[0],n,i;if(Ci(e)||Le(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=il.length;i--&&!il[i].targetTest(e););n=il[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Bu(t[i],n)))||t.splice(i,1);return t},pr=function(t){return t._gsap||Nu(Zn(t))[0]._gsap},Uu=function(t,e,n){return(n=t[e])&&Le(n)?t[e]():ul(n)&&t.getAttribute&&t.getAttribute(e)||n},xn=function(t,e){return(t=t.split(",")).forEach(e)||t},Fe=function(t){return Math.round(t*1e5)/1e5||0},Je=function(t){return Math.round(t*1e7)/1e7||0},ts=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),n==="+"?t+i:n==="-"?t-i:n==="*"?t*i:t/i},rx=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},ol=function(){var t=dr.length,e=dr.slice(0),n,i;for(vu={},dr.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},Gd=function(t,e,n,i){dr.length&&!ln&&ol(),t.render(e,n,i||ln&&e<0&&(t._initted||t._startAt)),dr.length&&!ln&&ol()},Wd=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(Bd).length<2?e:We(t)?t.trim():t},Xd=function(t){return t},$n=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},sx=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},jr=function(t,e){for(var n in e)t[n]=e[n];return t},Dd=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=Ci(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},al=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Jo=function(t){var e=t.parent||Re,n=t.keyframes?sx(cn(t.keyframes)):$n;if(Pn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},ox=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},Yd=function(t,e,n,i,s){n===void 0&&(n="_first"),i===void 0&&(i="_last");var o=t[i],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=o,e.parent=e._dp=t,e},fl=function(t,e,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var s=e._prev,o=e._next;s?s._next=o:t[n]===e&&(t[n]=o),o?o._prev=s:t[i]===e&&(t[i]=s),e._next=e._prev=e.parent=null},mr=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},$r=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},ax=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Su=function(t,e,n,i){return t._startAt&&(ln?t._startAt.revert(nl):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},lx=function r(t){return!t||t._ts&&r(t.parent)},Rd=function(t){return t._repeat?Hs(t._tTime,t=t.duration()+t._rDelay)*t:0},Hs=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},ll=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},dl=function(t){return t._end=Je(t._start+(t._tDur/Math.abs(t._ts||t._rts||Ee)||0))},pl=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Je(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),dl(t),n._dirty||$r(n,t)),t},qd=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=ll(t.rawTime(),e),(!e._dur||ia(0,e.totalDuration(),n)-e._tTime>Ee)&&e.render(n,!0)),$r(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-Ee}},Ai=function(t,e,n,i){return e.parent&&mr(e),e._start=Je((Vi(n)?n:n||t!==Re?Yn(t,n,e):t._time)+e._delay),e._end=Je(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Yd(t,e,"_first","_last",t._sort?"_start":0),Mu(e)||(t._recent=e),i||qd(t,e),t._ts<0&&pl(t,t._tTime),t},Zd=function(t,e){return(Bn.ScrollTrigger||hl("scrollTrigger",e))&&Bn.ScrollTrigger.create(e,t)},$d=function(t,e,n,i,s){if(Vu(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!ln&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Hd!==Rn.frame)return dr.push(t),t._lazy=[s,i],1},cx=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},Mu=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},ux=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&cx(t)&&!(!t._initted&&Mu(t))||(t._ts<0||t._dp._ts<0)&&!Mu(t))?0:1,a=t._rDelay,l=0,c,h,f;if(a&&t._repeat&&(l=ia(0,t._tDur,e),h=Hs(l,a),t._yoyo&&h&1&&(o=1-o),h!==Hs(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||ln||i||t._zTime===Ee||!e&&t._zTime){if(!t._initted&&$d(t,e,i,n,l))return;for(f=t._zTime,t._zTime=e||(n?Ee:0),n||(n=e&&!f),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,c=t._pt;c;)c.r(o,c.d),c=c._next;e<0&&Su(t,e,n,!0),t._onUpdate&&!n&&On(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&On(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&mr(t,1),!n&&!ln&&(On(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},hx=function(t,e,n){var i;if(n>e)for(i=t._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<e)return i;i=i._prev}},Gs=function(t,e,n,i){var s=t._repeat,o=Je(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Je(o*(s+1)+t._rDelay*s):o,a>0&&!i&&pl(t,t._tTime=t._tDur*a),t.parent&&dl(t),n||$r(t.parent,t),t},Pd=function(t){return t instanceof en?$r(t):Gs(t,t._dur)},fx={_start:0,endTime:ta,totalDuration:ta},Yn=function r(t,e,n){var i=t.labels,s=t._recent||fx,o=t.duration()>=qn?s.endTime(!1):t._dur,a,l,c;return We(e)&&(isNaN(e)||e in i)?(l=e.charAt(0),c=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(c?(a<0?s:n).totalDuration()/100:1)):a<0?(e in i||(i[e]=o),i[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),c&&n&&(l=l/100*(cn(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},Ko=function(t,e,n){var i=Vi(e[1]),s=(i?2:1)+(t<2?0:1),o=e[s],a,l;if(i&&(o.duration=e[1]),o.parent=n,t){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Pn(l.vars.inherit)&&l.parent;o.immediateRender=Pn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Ue(e[0],o,e[s+1])},gr=function(t,e){return t||t===0?e(t):e},ia=function(t,e,n){return n<t?t:n>e?e:n},nn=function(t,e){return!We(t)||!(e=ex.exec(t))?"":e[1]},dx=function(t,e,n){return gr(n,function(i){return ia(t,e,i)})},bu=[].slice,Jd=function(t,e){return t&&Ci(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&Ci(t[0]))&&!t.nodeType&&t!==Ti},px=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return We(i)&&!e||Jd(i,1)?(s=n).push.apply(s,Zn(i)):n.push(i)})||n},Zn=function(t,e,n){return Ce&&!e&&Ce.selector?Ce.selector(t):We(t)&&!n&&(yu||!Ws())?bu.call((e||Iu).querySelectorAll(t),0):cn(t)?px(t,n):Jd(t)?bu.call(t,0):t?[t]:[]},wu=function(t){return t=Zn(t)[0]||Qo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return Zn(e,n.querySelectorAll?n:n===t?Qo("Invalid scope")||Iu.createElement("div"):t)}},Kd=function(t){return t.sort(function(){return .5-Math.random()})},jd=function(t){if(Le(t))return t;var e=Ci(t)?t:{each:t},n=Jr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,h=i,f=i;return We(i)?h=f={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(h=i[0],f=i[1]),function(d,u,_){var p=(_||e).length,m=o[p],g,b,v,S,C,T,w,P,M;if(!m){if(M=e.grid==="auto"?0:(e.grid||[1,qn])[1],!M){for(w=-qn;w<(w=_[M++].getBoundingClientRect().left)&&M<p;);M<p&&M--}for(m=o[p]=[],g=l?Math.min(M,p)*h-.5:i%M,b=M===qn?0:l?p*f/M-.5:i/M|0,w=0,P=qn,T=0;T<p;T++)v=T%M-g,S=b-(T/M|0),m[T]=C=c?Math.abs(c==="y"?S:v):Ud(v*v+S*S),C>w&&(w=C),C<P&&(P=C);i==="random"&&Kd(m),m.max=w-P,m.min=P,m.v=p=(parseFloat(e.amount)||parseFloat(e.each)*(M>p?p-1:c?c==="y"?p/M:M:Math.max(M,p/M))||0)*(i==="edges"?-1:1),m.b=p<0?s-p:s,m.u=nn(e.amount||e.each)||0,n=n&&p<0?ap(n):n}return p=(m[d]-m.min)/m.max||0,Je(m.b+(n?n(p):p)*m.v)+m.u}},Eu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Je(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(Vi(n)?0:nn(n))}},Qd=function(t,e){var n=cn(t),i,s;return!n&&Ci(t)&&(i=n=t.radius||qn,t.values?(t=Zn(t.values),(s=!Vi(t[0]))&&(i*=i)):t=Eu(t.increment)),gr(e,n?Le(t)?function(o){return s=t(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=qn,h=0,f=t.length,d,u;f--;)s?(d=t[f].x-a,u=t[f].y-l,d=d*d+u*u):d=Math.abs(t[f]-a),d<c&&(c=d,h=f);return h=!i||c<=i?t[h]:o,s||h===o||Vi(o)?h:h+nn(o)}:Eu(t))},tp=function(t,e,n,i){return gr(cn(t)?!e:n===!0?!!(n=0):!i,function(){return cn(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+n*.99))/n)*n*i)/i})},mx=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return e.reduce(function(s,o){return o(s)},i)}},gx=function(t,e){return function(n){return t(parseFloat(n))+(e||nn(n))}},_x=function(t,e,n){return np(t,e,0,1,n)},ep=function(t,e,n){return gr(n,function(i){return t[~~e(i)]})},xx=function r(t,e,n){var i=e-t;return cn(t)?ep(t,r(0,t.length),e):gr(n,function(s){return(i+(s-t)%i)%i+t})},yx=function r(t,e,n){var i=e-t,s=i*2;return cn(t)?ep(t,r(0,t.length-1),e):gr(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},Xs=function(t){for(var e=0,n="",i,s,o,a;~(i=t.indexOf("random(",e));)o=t.indexOf(")",i),a=t.charAt(i+7)==="[",s=t.substr(i+7,o-i-7).match(a?Bd:xu),n+=t.substr(e,i-e)+tp(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},np=function(t,e,n,i,s){var o=e-t,a=i-n;return gr(s,function(l){return n+((l-t)/o*a||0)})},vx=function r(t,e,n,i){var s=isNaN(t+e)?0:function(u){return(1-u)*t+u*e};if(!s){var o=We(t),a={},l,c,h,f,d;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(cn(t)&&!cn(e)){for(h=[],f=t.length,d=f-2,c=1;c<f;c++)h.push(r(t[c-1],t[c]));f--,s=function(_){_*=f;var p=Math.min(d,~~_);return h[p](_-p)},n=e}else i||(t=jr(cn(t)?[]:{},t));if(!h){for(l in e)ku.call(a,t,l,"get",e[l]);s=function(_){return Wu(_,a)||(o?t.p:t)}}}return gr(n,s)},Id=function(t,e,n){var i=t.labels,s=qn,o,a,l;for(o in i)a=i[o]-e,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},On=function(t,e,n){var i=t.vars,s=i[e],o=Ce,a=t._ctx,l,c,h;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&dr.length&&ol(),a&&(Ce=a),h=l?s.apply(c,l):s.call(c),Ce=o,h},Zo=function(t){return mr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ln),t.progress()<1&&On(t,"onInterrupt"),t},zs,ip=[],rp=function(t){if(t)if(t=!t.name&&t.default||t,Du()||t.headless){var e=t.name,n=Le(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:ta,render:Wu,add:ku,kill:Ux,modifier:Nx,rawVars:0},o={targetTest:0,get:0,getSetter:ml,aliases:{},register:0};if(Ws(),t!==i){if(Dn[e])return;$n(i,$n(al(t,s),o)),jr(i.prototype,jr(s,al(t,o))),Dn[i.prop=e]=i,t.targetTest&&(il.push(i),Lu[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Vd(e,i),t.register&&t.register(un,i,yn)}else ip.push(t)},be=255,$o={aqua:[0,be,be],lime:[0,be,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,be],navy:[0,0,128],white:[be,be,be],olive:[128,128,0],yellow:[be,be,0],orange:[be,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[be,0,0],pink:[be,192,203],cyan:[0,be,be],transparent:[be,be,be,0]},fu=function(t,e,n){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(n-e)*t*6:t<.5?n:t*3<2?e+(n-e)*(2/3-t)*6:e)*be+.5|0},sp=function(t,e,n){var i=t?Vi(t)?[t>>16,t>>8&be,t&be]:0:$o.black,s,o,a,l,c,h,f,d,u,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),$o[t])i=$o[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&be,i&be,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&be,t&be]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(xu),!e)l=+i[0]%360/360,c=+i[1]/100,h=+i[2]/100,o=h<=.5?h*(c+1):h+c-h*c,s=h*2-o,i.length>3&&(i[3]*=1),i[0]=fu(l+1/3,s,o),i[1]=fu(l,s,o),i[2]=fu(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(Ru),n&&i.length<4&&(i[3]=1),i}else i=t.match(xu)||$o.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/be,o=i[1]/be,a=i[2]/be,f=Math.max(s,o,a),d=Math.min(s,o,a),h=(f+d)/2,f===d?l=c=0:(u=f-d,c=h>.5?u/(2-f-d):u/(f+d),l=f===s?(o-a)/u+(o<a?6:0):f===o?(a-s)/u+2:(s-o)/u+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(h*100+.5)),n&&i.length<4&&(i[3]=1),i},op=function(t){var e=[],n=[],i=-1;return t.split(zi).forEach(function(s){var o=s.match(Qr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},Ld=function(t,e,n){var i="",s=(t+i).match(zi),o=e?"hsla(":"rgba(",a=0,l,c,h,f;if(!s)return t;if(s=s.map(function(d){return(d=sp(d,e,1))&&o+(e?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),n&&(h=op(t),l=n.c,l.join(i)!==h.c.join(i)))for(c=t.replace(zi,"1").split(Qr),f=c.length-1;a<f;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:n).shift());if(!c)for(c=t.split(zi),f=c.length-1;a<f;a++)i+=c[a]+s[a];return i+c[f]},zi=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in $o)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),Sx=/hsl[a]?\(/,Ou=function(t){var e=t.join(" "),n;if(zi.lastIndex=0,zi.test(e))return n=Sx.test(e),t[1]=Ld(t[1],n),t[0]=Ld(t[0],n,op(t[1])),!0},ea,Rn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,h,f,d,u,_=function p(m){var g=r()-i,b=m===!0,v,S,C,T;if((g>t||g<0)&&(n+=g-e),i+=g,C=i-n,v=C-o,(v>0||b)&&(T=++f.frame,d=C-f.time*1e3,f.time=C=C/1e3,o+=v+(v>=s?4:s-v),S=1),b||(l=c(p)),S)for(u=0;u<a.length;u++)a[u](C,d,T,m)};return f={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(m){return d/(1e3/(m||60))},wake:function(){kd&&(!yu&&Du()&&(Ti=yu=window,Iu=Ti.document||{},Bn.gsap=un,(Ti.gsapVersions||(Ti.gsapVersions=[])).push(un.version),zd(sl||Ti.GreenSockGlobals||!Ti.gsap&&Ti||{}),ip.forEach(rp)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),c=h||function(m){return setTimeout(m,o-f.time*1e3+1|0)},ea=1,_(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),ea=0,c=ta},lagSmoothing:function(m,g){t=m||1/0,e=Math.min(g||33,t)},fps:function(m){s=1e3/(m||240),o=f.time*1e3+s},add:function(m,g,b){var v=g?function(S,C,T,w){m(S,C,T,w),f.remove(v)}:m;return f.remove(m),a[b?"unshift":"push"](v),Ws(),v},remove:function(m,g){~(g=a.indexOf(m))&&a.splice(g,1)&&u>=g&&u--},_listeners:a},f}(),Ws=function(){return!ea&&Rn.wake()},de={},Mx=/^[\d.\-M][\d.\-,\s]/,bx=/["']/g,wx=function(t){for(var e={},n=t.substr(1,t.length-3).split(":"),i=n[0],s=1,o=n.length,a,l,c;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),e[i]=isNaN(c)?c.replace(bx,"").trim():+c,i=l.substr(a+1).trim();return e},Ex=function(t){var e=t.indexOf("(")+1,n=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<n?t.indexOf(")",n+1):n)},Tx=function(t){var e=(t+"").split("("),n=de[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[wx(e[1])]:Ex(t).split(",").map(Wd)):de._CE&&Mx.test(t)?de._CE("",t):n},ap=function(t){return function(e){return 1-t(1-e)}},lp=function r(t,e){for(var n=t._first,i;n;)n instanceof en?r(n,e):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==e&&(n.timeline?r(n.timeline,e):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=e)),n=n._next},Jr=function(t,e){return t&&(Le(t)?t:de[t]||Tx(t))||e},es=function(t,e,n,i){n===void 0&&(n=function(l){return 1-e(1-l)}),i===void 0&&(i=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:n,easeInOut:i},o;return xn(t,function(a){de[a]=Bn[a]=s,de[o=a.toLowerCase()]=n;for(var l in s)de[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=de[a+"."+l]=s[l]}),s},cp=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},du=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/_u*(Math.asin(1/i)||0),a=function(h){return h===1?1:i*Math.pow(2,-10*h)*tx((h-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:cp(a);return s=_u/s,l.config=function(c,h){return r(t,c,h)},l},pu=function r(t,e){e===void 0&&(e=1.70158);var n=function(o){return o?--o*o*((e+1)*o+e)+1:0},i=t==="out"?n:t==="in"?function(s){return 1-n(1-s)}:cp(n);return i.config=function(s){return r(t,s)},i};xn("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;es(r+",Power"+(e-1),t?function(n){return Math.pow(n,e)}:function(n){return n},function(n){return 1-Math.pow(1-n,e)},function(n){return n<.5?Math.pow(n*2,e)/2:1-Math.pow((1-n)*2,e)/2})});de.Linear.easeNone=de.none=de.Linear.easeIn;es("Elastic",du("in"),du("out"),du());(function(r,t){var e=1/t,n=2*e,i=2.5*e,s=function(a){return a<e?r*a*a:a<n?r*Math.pow(a-1.5/t,2)+.75:a<i?r*(a-=2.25/t)*a+.9375:r*Math.pow(a-2.625/t,2)+.984375};es("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);es("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});es("Circ",function(r){return-(Ud(1-r*r)-1)});es("Sine",function(r){return r===1?1:-Q_(r*K_)+1});es("Back",pu("in"),pu("out"),pu());de.SteppedEase=de.steps=Bn.SteppedEase={config:function(t,e){t===void 0&&(t=1);var n=1/t,i=t+(e?0:1),s=e?1:0,o=1-Ee;return function(a){return((i*ia(0,o,a)|0)+s)*n}}};Vs.ease=de["quad.out"];xn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Fu+=r+","+r+"Params,"});var Bu=function(t,e){this.id=j_++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Uu,this.set=e?e.getSetter:ml},na=function(){function r(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,Gs(this,+e.duration,1,1),this.data=e.data,Ce&&(this._ctx=Ce,Ce.data.push(this)),ea||Rn.wake()}var t=r.prototype;return t.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},t.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},t.totalDuration=function(n){return arguments.length?(this._dirty=0,Gs(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(Ws(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(pl(this,n),!s._dp||s.parent||qd(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&Ai(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===Ee||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Gd(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+Rd(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},t.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+Rd(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(n,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,i):this._repeat?Hs(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-Ee?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?ll(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Ee?0:this._rts,this.totalTime(ia(-Math.abs(this._delay),this._tDur,s),i!==!1),dl(this),ax(this)},t.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ws(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ee&&(this._tTime-=Ee)))),this):this._ps},t.startTime=function(n){if(arguments.length){this._start=n;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Ai(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Pn(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ll(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=ix);var i=ln;return ln=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),ln=i,this},t.globalTime=function(n){for(var i=this,s=arguments.length?n:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},t.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Pd(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,Pd(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},t.seek=function(n,i){return this.totalTime(Yn(this,n),Pn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Pn(i))},t.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},t.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Ee:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ee,this},t.isActive=function(){var n=this.parent||this._dp,i=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=i&&s<this.endTime(!0)-Ee)},t.eventCallback=function(n,i,s){var o=this.vars;return arguments.length>1?(i?(o[n]=i,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=i)):delete o[n],this):o[n]},t.then=function(n){var i=this;return new Promise(function(s){var o=Le(n)?n:Xd,a=function(){var c=i.then;i.then=null,Le(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},t.kill=function(){Zo(this)},r}();$n(na.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:-Ee,_prom:0,_ps:!1,_rts:1});var en=function(r){Nd(t,r);function t(n,i){var s;return n===void 0&&(n={}),s=r.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Pn(n.sortChildren),Re&&Ai(n.parent||Re,ki(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&Zd(ki(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return Ko(0,arguments,this),this},e.from=function(i,s,o){return Ko(1,arguments,this),this},e.fromTo=function(i,s,o,a){return Ko(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Jo(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Ue(i,s,Yn(this,o),1),this},e.call=function(i,s,o){return Ai(this,Ue.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Ue(i,o,Yn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,h){return o.runBackwards=1,Jo(o).immediateRender=Pn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,h)},e.staggerFromTo=function(i,s,o,a,l,c,h,f){return a.startAt=o,Jo(a).immediateRender=Pn(a.immediateRender),this.staggerTo(i,s,a,l,c,h,f)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=i<=0?0:Je(i),f=this._zTime<0!=i<0&&(this._initted||!c),d,u,_,p,m,g,b,v,S,C,T,w;if(this!==Re&&h>l&&i>=0&&(h=l),h!==this._tTime||o||f){if(a!==this._time&&c&&(h+=this._time-a,i+=this._time-a),d=h,S=this._start,v=this._ts,g=!v,f&&(c||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(T=this._yoyo,m=c+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(m*100+i,s,o);if(d=Je(h%m),h===l?(p=this._repeat,d=c):(p=~~(h/m),p&&p===h/m&&(d=c,p--),d>c&&(d=c)),C=Hs(this._tTime,m),!a&&this._tTime&&C!==p&&this._tTime-C*m-this._dur<=0&&(C=p),T&&p&1&&(d=c-d,w=1),p!==C&&!this._lock){var P=T&&C&1,M=P===(T&&p&1);if(p<C&&(P=!P),a=P?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Je(p*m)),s,!c)._lock=0,this._tTime=h,!s&&this.parent&&On(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,M&&(this._lock=2,a=P?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;lp(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=hx(this,Je(a),Je(d)),b&&(h-=d-(d=b._start))),this._tTime=h,this._time=d,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&d&&!s&&!p&&(On(this,"onStart"),this._tTime!==h))return this;if(d>=a&&i>=0)for(u=this._first;u;){if(_=u._next,(u._act||d>=u._start)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(d-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(d-u._start)*u._ts,s,o),d!==this._time||!this._ts&&!g){b=0,_&&(h+=this._zTime=-Ee);break}}u=_}else{u=this._last;for(var y=i<0?i:d;u;){if(_=u._prev,(u._act||y<=u._end)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(y-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(y-u._start)*u._ts,s,o||ln&&(u._initted||u._startAt)),d!==this._time||!this._ts&&!g){b=0,_&&(h+=this._zTime=y?-Ee:Ee);break}}u=_}}if(b&&!s&&(this.pause(),b.render(d>=a?0:-Ee)._zTime=d>=a?1:-1,this._ts))return this._start=S,dl(this),this.render(i,s,o);this._onUpdate&&!s&&On(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(S===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&mr(this,1),!s&&!(i<0&&!a)&&(h||a||!l)&&(On(this,h===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(Vi(s)||(s=Yn(this,s,i)),!(i instanceof na)){if(cn(i))return i.forEach(function(a){return o.add(a,s)}),this;if(We(i))return this.addLabel(i,s);if(Le(i))i=Ue.delayedCall(0,i);else return this}return this!==i?Ai(this,i,s):this},e.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-qn);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Ue?s&&l.push(c):(o&&l.push(c),i&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},e.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},e.remove=function(i){return We(i)?this.removeLabel(i):Le(i)?this.killTweensOf(i):(fl(this,i),i===this._recent&&(this._recent=this._last),$r(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Je(Rn.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),r.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},e.addLabel=function(i,s){return this.labels[i]=Yn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Ue.delayedCall(0,s||ta,o);return a.data="isPause",this._hasPause=1,Ai(this,a,Yn(this,i))},e.removePause=function(i){var s=this._first;for(i=Yn(this,i);s;)s._start===i&&s.data==="isPause"&&mr(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)fr!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=Zn(i),l=this._first,c=Vi(s),h;l;)l instanceof Ue?rx(l._targets,a)&&(c?(!fr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Yn(o,i),l=s,c=l.startAt,h=l.onStart,f=l.onStartParams,d=l.immediateRender,u,_=Ue.to(o,$n({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||Ee,onStart:function(){if(o.pause(),!u){var m=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==m&&Gs(_,m,0,1).render(_._time,!0,!0),u=1}h&&h.apply(_,f||[])}},s));return d?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,$n({startAt:{time:Yn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),Id(this,Yn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),Id(this,Yn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+Ee)},e.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=i);return $r(this)},e.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return r.prototype.invalidate.call(this,i)},e.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),$r(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=qn,c,h,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(f=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ai(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;Gs(o,o===Re&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(Re._ts&&(Gd(Re,ll(i,Re)),Hd=Rn.frame),Rn.frame>=Cd){Cd+=In.autoSleep||120;var s=Re._first;if((!s||!s._ts)&&In.autoSleep&&Rn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Rn.sleep()}}},t}(na);$n(en.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ax=function(t,e,n,i,s,o,a){var l=new yn(this._pt,t,e,0,1,Gu,null,s),c=0,h=0,f,d,u,_,p,m,g,b;for(l.b=n,l.e=i,n+="",i+="",(g=~i.indexOf("random("))&&(i=Xs(i)),o&&(b=[n,i],o(b,t,e),n=b[0],i=b[1]),d=n.match(uu)||[];f=uu.exec(i);)_=f[0],p=i.substring(c,f.index),u?u=(u+1)%5:p.substr(-5)==="rgba("&&(u=1),_!==d[h++]&&(m=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:p||h===1?p:",",s:m,c:_.charAt(1)==="="?ts(m,_)-m:parseFloat(_)-m,m:u&&u<4?Math.round:0},c=uu.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(Pu.test(i)||g)&&(l.e=0),this._pt=l,l},ku=function(t,e,n,i,s,o,a,l,c,h){Le(i)&&(i=i(s||0,t,o));var f=t[e],d=n!=="get"?n:Le(f)?c?t[e.indexOf("set")||!Le(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():f,u=Le(f)?c?Ix:fp:Hu,_;if(We(i)&&(~i.indexOf("random(")&&(i=Xs(i)),i.charAt(1)==="="&&(_=ts(d,i)+(nn(d)||0),(_||_===0)&&(i=_))),!h||d!==i||Tu)return!isNaN(d*i)&&i!==""?(_=new yn(this._pt,t,e,+d||0,i-(d||0),typeof f=="boolean"?Fx:dp,0,u),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!f&&!(e in t)&&hl(e,i),Ax.call(this,t,e,d,i,u,l||In.stringFilter,c))},Cx=function(t,e,n,i,s){if(Le(t)&&(t=jo(t,s,e,n,i)),!Ci(t)||t.style&&t.nodeType||cn(t)||Od(t))return We(t)?jo(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=jo(t[a],s,e,n,i);return o},zu=function(t,e,n,i,s,o){var a,l,c,h;if(Dn[t]&&(a=new Dn[t]).init(s,a.rawVars?e[t]:Cx(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new yn(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==zs))for(c=n._ptLookup[n._targets.indexOf(s)],h=a._props.length;h--;)c[a._props[h]]=l;return a},fr,Tu,Vu=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,h=i.runBackwards,f=i.yoyoEase,d=i.keyframes,u=i.autoRevert,_=t._dur,p=t._startAt,m=t._targets,g=t.parent,b=g&&g.data==="nested"?g.vars.targets:m,v=t._overwrite==="auto"&&!Cu,S=t.timeline,C,T,w,P,M,y,I,N,D,V,K,W,Z;if(S&&(!d||!s)&&(s="none"),t._ease=Jr(s,Vs.ease),t._yEase=f?ap(Jr(f===!0?s:f,Vs.ease)):0,f&&t._yoyo&&!t._repeat&&(f=t._yEase,t._yEase=t._ease,t._ease=f),t._from=!S&&!!i.runBackwards,!S||d&&!i.stagger){if(N=m[0]?pr(m[0]).harness:0,W=N&&i[N.prop],C=al(i,Lu),p&&(p._zTime<0&&p.progress(1),e<0&&h&&a&&!u?p.render(-1,!0):p.revert(h&&_?nl:nx),p._lazy=0),o){if(mr(t._startAt=Ue.set(m,$n({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!p&&Pn(l),startAt:null,delay:0,onUpdate:c&&function(){return On(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ln||!a&&!u)&&t._startAt.revert(nl),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(h&&_&&!p){if(e&&(a=!1),w=$n({overwrite:!1,data:"isFromStart",lazy:a&&!p&&Pn(l),immediateRender:a,stagger:0,parent:g},C),W&&(w[N.prop]=W),mr(t._startAt=Ue.set(m,w)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ln?t._startAt.revert(nl):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,Ee,Ee);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Pn(l)||l&&!_,T=0;T<m.length;T++){if(M=m[T],I=M._gsap||Nu(m)[T]._gsap,t._ptLookup[T]=V={},vu[I.id]&&dr.length&&ol(),K=b===m?T:b.indexOf(M),N&&(D=new N).init(M,W||C,t,K,b)!==!1&&(t._pt=P=new yn(t._pt,M,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(z){V[z]=P}),D.priority&&(y=1)),!N||W)for(w in C)Dn[w]&&(D=zu(w,C,t,K,M,b))?D.priority&&(y=1):V[w]=P=ku.call(t,M,w,"get",C[w],K,b,0,i.stringFilter);t._op&&t._op[T]&&t.kill(M,t._op[T]),v&&t._pt&&(fr=t,Re.killTweensOf(M,V,t.globalTime(e)),Z=!t.parent,fr=0),t._pt&&l&&(vu[I.id]=1)}y&&Xu(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!Z,d&&e<=0&&S.render(qn,!0,!0)},Dx=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],h,f,d,u;if(!c)for(c=t._ptCache[e]=[],d=t._ptLookup,u=t._targets.length;u--;){if(h=d[u][e],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return Tu=1,t.vars[e]="+=0",Vu(t,a),Tu=0,l?Qo(e+" not eligible for reset"):1;c.push(h)}for(u=c.length;u--;)f=c[u],h=f._pt||f,h.s=(i||i===0)&&!s?i:h.s+(i||0)+o*h.c,h.c=n-h.s,f.e&&(f.e=Fe(n)+nn(f.e)),f.b&&(f.b=h.s+nn(f.b))},Rx=function(t,e){var n=t[0]?pr(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=jr({},e);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},Px=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(cn(e))a=n[t]||(n[t]=[]),e.forEach(function(l,c){return a.push({t:c/(e.length-1)*100,v:l,e:s})});else for(o in e)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},jo=function(t,e,n,i,s){return Le(t)?t.call(e,n,i,s):We(t)&&~t.indexOf("random(")?Xs(t):t},up=Fu+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",hp={};xn(up+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return hp[r]=1});var Ue=function(r){Nd(t,r);function t(n,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=r.call(this,o?i:Jo(i))||this;var l=a.vars,c=l.duration,h=l.delay,f=l.immediateRender,d=l.stagger,u=l.overwrite,_=l.keyframes,p=l.defaults,m=l.scrollTrigger,g=l.yoyoEase,b=i.parent||Re,v=(cn(n)||Od(n)?Vi(n[0]):"length"in i)?[n]:Zn(n),S,C,T,w,P,M,y,I;if(a._targets=v.length?Nu(v):Qo("GSAP target "+n+" not found. https://gsap.com",!In.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=u,_||d||el(c)||el(h)){if(i=a.vars,S=a.timeline=new en({data:"nested",defaults:p||{},targets:b&&b.data==="nested"?b.vars.targets:v}),S.kill(),S.parent=S._dp=ki(a),S._start=0,d||el(c)||el(h)){if(w=v.length,y=d&&jd(d),Ci(d))for(P in d)~up.indexOf(P)&&(I||(I={}),I[P]=d[P]);for(C=0;C<w;C++)T=al(i,hp),T.stagger=0,g&&(T.yoyoEase=g),I&&jr(T,I),M=v[C],T.duration=+jo(c,ki(a),C,M,v),T.delay=(+jo(h,ki(a),C,M,v)||0)-a._delay,!d&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),S.to(M,T,y?y(C,M,v):0),S._ease=de.none;S.duration()?c=h=0:a.timeline=0}else if(_){Jo($n(S.vars.defaults,{ease:"none"})),S._ease=Jr(_.ease||i.ease||"none");var N=0,D,V,K;if(cn(_))_.forEach(function(W){return S.to(v,W,">")}),S.duration();else{T={};for(P in _)P==="ease"||P==="easeEach"||Px(P,_[P],T,_.easeEach);for(P in T)for(D=T[P].sort(function(W,Z){return W.t-Z.t}),N=0,C=0;C<D.length;C++)V=D[C],K={ease:V.e,duration:(V.t-(C?D[C-1].t:0))/100*c},K[P]=V.v,S.to(v,K,N),N+=K.duration;S.duration()<c&&S.to({},{duration:c-S.duration()})}}c||a.duration(c=S.duration())}else a.timeline=0;return u===!0&&!Cu&&(fr=ki(a),Re.killTweensOf(v),fr=0),Ai(b,ki(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(f||!c&&!_&&a._start===Je(b._time)&&Pn(f)&&lx(ki(a))&&b.data!=="nested")&&(a._tTime=-Ee,a.render(Math.max(0,-h)||0)),m&&Zd(ki(a),m),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,h=i<0,f=i>l-Ee&&!h?l:i<Ee?0:i,d,u,_,p,m,g,b,v,S;if(!c)ux(this,i,s,o);else if(f!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(d=f,v=this.timeline,this._repeat){if(p=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(p*100+i,s,o);if(d=Je(f%p),f===l?(_=this._repeat,d=c):(_=~~(f/p),_&&_===Je(f/p)&&(d=c,_--),d>c&&(d=c)),g=this._yoyo&&_&1,g&&(S=this._yEase,d=c-d),m=Hs(this._tTime,p),d===a&&!o&&this._initted&&_===m)return this._tTime=f,this;_!==m&&(v&&this._yEase&&lp(v,g),this.vars.repeatRefresh&&!g&&!this._lock&&this._time!==p&&this._initted&&(this._lock=o=1,this.render(Je(p*_),!0).invalidate()._lock=0))}if(!this._initted){if($d(this,h?i:d,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==m))return this;if(c!==this._dur)return this.render(i,s,o)}if(this._tTime=f,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(S||this._ease)(d/c),this._from&&(this.ratio=b=1-b),d&&!a&&!s&&!_&&(On(this,"onStart"),this._tTime!==f))return this;for(u=this._pt;u;)u.r(b,u.d),u=u._next;v&&v.render(i<0?i:v._dur*v._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(h&&Su(this,i,s,o),On(this,"onUpdate")),this._repeat&&_!==m&&this.vars.onRepeat&&!s&&this.parent&&On(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(h&&!this._onUpdate&&Su(this,i,!0,!0),(i||!c)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&mr(this,1),!s&&!(h&&!a)&&(f||a||g)&&(On(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&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),r.prototype.invalidate.call(this,i)},e.resetTo=function(i,s,o,a,l){ea||Rn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||Vu(this,c),h=this._ease(c/this._dur),Dx(this,i,s,o,a,h,c,l)?this.resetTo(i,s,o,a,1):(pl(this,0),this.parent||Yd(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Zo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,fr&&fr.vars.overwrite!==!0)._first||Zo(this),this.parent&&o!==this.timeline.totalDuration()&&Gs(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?Zn(i):a,c=this._ptLookup,h=this._pt,f,d,u,_,p,m,g;if((!s||s==="all")&&ox(a,l))return s==="all"&&(this._pt=0),Zo(this);for(f=this._op=this._op||[],s!=="all"&&(We(s)&&(p={},xn(s,function(b){return p[b]=1}),s=p),s=Rx(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){d=c[g],s==="all"?(f[g]=s,_=d,u={}):(u=f[g]=f[g]||{},_=s);for(p in _)m=d&&d[p],m&&((!("kill"in m.d)||m.d.kill(p)===!0)&&fl(this,m,"_pt"),delete d[p]),u!=="all"&&(u[p]=1)}return this._initted&&!this._pt&&h&&Zo(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return Ko(1,arguments)},t.delayedCall=function(i,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(i,s,o){return Ko(2,arguments)},t.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(i,s)},t.killTweensOf=function(i,s,o){return Re.killTweensOf(i,s,o)},t}(na);$n(Ue.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});xn("staggerTo,staggerFrom,staggerFromTo",function(r){Ue[r]=function(){var t=new en,e=bu.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var Hu=function(t,e,n){return t[e]=n},fp=function(t,e,n){return t[e](n)},Ix=function(t,e,n,i){return t[e](i.fp,n)},Lx=function(t,e,n){return t.setAttribute(e,n)},ml=function(t,e){return Le(t[e])?fp:ul(t[e])&&t.setAttribute?Lx:Hu},dp=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},Fx=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Gu=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(t===1&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round((n.s+n.c*t)*1e4)/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},Wu=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Nx=function(t,e,n,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(t,e,n),s=o},Ux=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?fl(this,e,"_pt"):e.dep||(n=1),e=i;return!n},Ox=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},Xu=function(t){for(var e=t._pt,n,i,s,o;e;){for(n=e._next,i=s;i&&i.pr>e.pr;)i=i._next;(e._prev=i?i._prev:o)?e._prev._next=e:s=e,(e._next=i)?i._prev=e:o=e,e=n}t._pt=s},yn=function(){function r(e,n,i,s,o,a,l,c,h){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||dp,this.d=l||this,this.set=c||Hu,this.pr=h||0,this._next=e,e&&(e._prev=this)}var t=r.prototype;return t.modifier=function(n,i,s){this.mSet=this.mSet||this.set,this.set=Ox,this.m=n,this.mt=s,this.tween=i},r}();xn(Fu+"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(r){return Lu[r]=1});Bn.TweenMax=Bn.TweenLite=Ue;Bn.TimelineLite=Bn.TimelineMax=en;Re=new en({sortChildren:!1,defaults:Vs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});In.stringFilter=Ou;var Kr=[],rl={},Bx=[],Fd=0,kx=0,mu=function(t){return(rl[t]||Bx).map(function(e){return e()})},Au=function(){var t=Date.now(),e=[];t-Fd>2&&(mu("matchMediaInit"),Kr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=Ti.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),mu("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),Fd=t,mu("matchMedia"))},pp=function(){function r(e,n){this.selector=n&&wu(n),this.data=[],this._r=[],this.isReverted=!1,this.id=kx++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Le(n)&&(s=i,i=n,n=Le);var o=this,a=function(){var c=Ce,h=o.selector,f;return c&&c!==o&&c.data.push(o),s&&(o.selector=wu(s)),Ce=o,f=i.apply(o,arguments),Le(f)&&o._r.push(f),Ce=c,o.selector=h,o.isReverted=!1,f};return o.last=a,n===Le?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Ce;Ce=null,n(this),Ce=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Ue&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(n,i){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,f){return f.g-h.g||-1/0}).forEach(function(h){return h.t.revert(n)}),l=s.data.length;l--;)c=s.data[l],c instanceof en?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Ue)&&c.revert&&c.revert(n);s._r.forEach(function(h){return h(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=Kr.length;o--;)Kr[o].id===this.id&&Kr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),zx=function(){function r(e){this.contexts=[],this.scope=e,Ce&&Ce.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){Ci(n)||(n={matches:n});var o=new pp(0,s||this.scope),a=o.conditions={},l,c,h;Ce&&!o.selector&&(o.selector=Ce.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?h=1:(l=Ti.matchMedia(n[c]),l&&(Kr.indexOf(o)<0&&Kr.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(Au):l.addEventListener("change",Au)));return h&&i(o,function(f){return o.add(null,f)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),cl={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(i){return rp(i)})},timeline:function(t){return new en(t)},getTweensOf:function(t,e){return Re.getTweensOf(t,e)},getProperty:function(t,e,n,i){We(t)&&(t=Zn(t)[0]);var s=pr(t||{}).get,o=n?Xd:Wd;return n==="native"&&(n=""),t&&(e?o((Dn[e]&&Dn[e].get||s)(t,e,n,i)):function(a,l,c){return o((Dn[a]&&Dn[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=Zn(t),t.length>1){var i=t.map(function(h){return un.quickSetter(h,e,n)}),s=i.length;return function(h){for(var f=s;f--;)i[f](h)}}t=t[0]||{};var o=Dn[e],a=pr(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(h){var f=new o;zs._pt=0,f.init(t,n?h+n:h,zs,0,[t]),f.render(1,f),zs._pt&&Wu(1,zs)}:a.set(t,l);return o?c:function(h){return c(t,l,n?h+n:h,a,1)}},quickTo:function(t,e,n){var i,s=un.to(t,jr((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,h){return s.resetTo(e,l,c,h)};return o.tween=s,o},isTweening:function(t){return Re.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Jr(t.ease,Vs.ease)),Dd(Vs,t||{})},config:function(t){return Dd(In,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,s=t.defaults,o=t.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!Dn[a]&&!Bn[a]&&Qo(e+" effect requires "+a+" plugin.")}),hu[e]=function(a,l,c){return n(Zn(a),$n(l||{},s),c)},o&&(en.prototype[e]=function(a,l,c){return this.add(hu[e](a,Ci(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){de[t]=Jr(e)},parseEase:function(t,e){return arguments.length?Jr(t,e):de},getById:function(t){return Re.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new en(t),i,s;for(n.smoothChildTiming=Pn(t.smoothChildTiming),Re.remove(n),n._dp=0,n._time=n._tTime=Re._time,i=Re._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Ue&&i.vars.onComplete===i._targets[0]))&&Ai(n,i,i._start-i._delay),i=s;return Ai(Re,n,0),n},context:function(t,e){return t?new pp(t,e):Ce},matchMedia:function(t){return new zx(t)},matchMediaRefresh:function(){return Kr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||Au()},addEventListener:function(t,e){var n=rl[t]||(rl[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=rl[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:xx,wrapYoyo:yx,distribute:jd,random:tp,snap:Qd,normalize:_x,getUnit:nn,clamp:dx,splitColor:sp,toArray:Zn,selector:wu,mapRange:np,pipe:mx,unitize:gx,interpolate:vx,shuffle:Kd},install:zd,effects:hu,ticker:Rn,updateRoot:en.updateRoot,plugins:Dn,globalTimeline:Re,core:{PropTween:yn,globals:Vd,Tween:Ue,Timeline:en,Animation:na,getCache:pr,_removeLinkedListItem:fl,reverting:function(){return ln},context:function(t){return t&&Ce&&(Ce.data.push(t),t._ctx=Ce),Ce},suppressOverwrites:function(t){return Cu=t}}};xn("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return cl[r]=Ue[r]});Rn.add(en.updateRoot);zs=cl.to({},{duration:0});var Vx=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Hx=function(t,e){var n=t._targets,i,s,o;for(i in e)for(s=n.length;s--;)o=t._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=Vx(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},gu=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(We(s)&&(l={},xn(s,function(h){return l[h]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}Hx(a,s)}}}},un=cl.registerPlugin({name:"attr",init:function(t,e,n,i,s){var o,a,l;this.tween=n;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)ln?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},gu("roundProps",Eu),gu("modifiers"),gu("snap",Qd))||cl;Ue.version=en.version=un.version="3.12.5";kd=1;Du()&&Ws();var Gx=de.Power0,Wx=de.Power1,Xx=de.Power2,Yx=de.Power3,qx=de.Power4,Zx=de.Linear,$x=de.Quad,Jx=de.Cubic,Kx=de.Quart,jx=de.Quint,Qx=de.Strong,ty=de.Elastic,ey=de.Back,ny=de.SteppedEase,iy=de.Bounce,ry=de.Sine,sy=de.Expo,oy=de.Circ;var mp,_r,qs,ju,ss,ay,gp,Qu,ly=function(){return typeof window<"u"},Gi={},rs=180/Math.PI,Zs=Math.PI/180,Ys=Math.atan2,_p=1e8,th=/([A-Z])/g,cy=/(left|right|width|margin|padding|x)/i,uy=/[\s,\(]\S/,Di={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Zu=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},hy=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)},fy=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)},dy=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},wp=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Ep=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},py=function(t,e,n){return t.style[e]=n},my=function(t,e,n){return t.style.setProperty(e,n)},gy=function(t,e,n){return t._gsap[e]=n},_y=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},xy=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},yy=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Pe="transform",Ln=Pe+"Origin",vy=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in Gi&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Di[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=Hi(i,a)}):this.tfm[t]=o.x?o[t]:Hi(i,t),t===Ln&&(this.tfm.zOrigin=o.zOrigin);else return Di.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Pe)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ln,e,"")),t=Pe}(s||e)&&this.props.push(t,e,s[t])},Tp=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Sy=function(){var t=this.props,e=this.target,n=e.style,i=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?n[t[s]]=t[s+2]:n.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(th,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=Qu(),(!s||!s.isStart)&&!n[Pe]&&(Tp(n),i.zOrigin&&n[Ln]&&(n[Ln]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},Ap=function(t,e){var n={target:t,props:[],revert:Sy,save:vy};return t._gsap||un.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},Cp,$u=function(t,e){var n=_r.createElementNS?_r.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):_r.createElement(t);return n&&n.style?n:_r.createElement(t)},Ri=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(th,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,$s(e)||e,1)||""},xp="O,Moz,ms,Ms,Webkit".split(","),$s=function(t,e,n){var i=e||ss,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(xp[o]+t in s););return o<0?null:(o===3?"ms":o>=0?xp[o]:"")+t},Ju=function(){ly()&&window.document&&(mp=window,_r=mp.document,qs=_r.documentElement,ss=$u("div")||{style:{}},ay=$u("div"),Pe=$s(Pe),Ln=Pe+"Origin",ss.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Cp=!!$s("perspective"),Qu=un.core.reverting,ju=1)},Yu=function r(t){var e=$u("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,i=this.nextSibling,s=this.style.cssText,o;if(qs.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(i?n.insertBefore(this,i):n.appendChild(this)),qs.removeChild(e),this.style.cssText=s,o},yp=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},Dp=function(t){var e;try{e=t.getBBox()}catch{e=Yu.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Yu||(e=Yu.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+yp(t,["x","cx","x1"])||0,y:+yp(t,["y","cy","y1"])||0,width:0,height:0}:e},Rp=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&Dp(t))},os=function(t,e){if(e){var n=t.style,i;e in Gi&&e!==Ln&&(e=Pe),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(th,"-$1").toLowerCase())):n.removeAttribute(e)}},xr=function(t,e,n,i,s,o){var a=new yn(t._pt,e,n,0,1,o?Ep:wp);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},vp={deg:1,rad:1,turn:1},My={grid:1,flex:1},yr=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=ss.style,l=cy.test(e),c=t.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),f=100,d=i==="px",u=i==="%",_,p,m,g;if(i===o||!s||vp[i]||vp[o])return s;if(o!=="px"&&!d&&(s=r(t,e,n,"px")),g=t.getCTM&&Rp(t),(u||o==="%")&&(Gi[e]||~e.indexOf("adius")))return _=g?t.getBBox()[l?"width":"height"]:t[h],Fe(u?s/_*f:s/100*_);if(a[l?"width":"height"]=f+(d?o:i),p=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,g&&(p=(t.ownerSVGElement||{}).parentNode),(!p||p===_r||!p.appendChild)&&(p=_r.body),m=p._gsap,m&&u&&m.width&&l&&m.time===Rn.time&&!m.uncache)return Fe(s/m.width*f);if(u&&(e==="height"||e==="width")){var b=t.style[e];t.style[e]=f+i,_=t[h],b?t.style[e]=b:os(t,e)}else(u||o==="%")&&!My[Ri(p,"display")]&&(a.position=Ri(t,"position")),p===t&&(a.position="static"),p.appendChild(ss),_=ss[h],p.removeChild(ss),a.position="absolute";return l&&u&&(m=pr(p),m.time=Rn.time,m.width=p[h]),Fe(d?_*s/f:_&&s?f/_*s:0)},Hi=function(t,e,n,i){var s;return ju||Ju(),e in Di&&e!=="transform"&&(e=Di[e],~e.indexOf(",")&&(e=e.split(",")[0])),Gi[e]&&e!=="transform"?(s=oa(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:_l(Ri(t,Ln))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=gl[e]&&gl[e](t,e,n)||Ri(t,e)||Uu(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?yr(t,e,s,n)+n:s},by=function(t,e,n,i){if(!n||n==="none"){var s=$s(e,t,1),o=s&&Ri(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=Ri(t,"borderTopColor"))}var a=new yn(this._pt,t.style,e,0,1,Gu),l=0,c=0,h,f,d,u,_,p,m,g,b,v,S,C;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(p=t.style[e],t.style[e]=i,i=Ri(t,e)||i,p?t.style[e]=p:os(t,e)),h=[n,i],Ou(h),n=h[0],i=h[1],d=n.match(Qr)||[],C=i.match(Qr)||[],C.length){for(;f=Qr.exec(i);)m=f[0],b=i.substring(l,f.index),_?_=(_+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(_=1),m!==(p=d[c++]||"")&&(u=parseFloat(p)||0,S=p.substr((u+"").length),m.charAt(1)==="="&&(m=ts(u,m)+S),g=parseFloat(m),v=m.substr((g+"").length),l=Qr.lastIndex-v.length,v||(v=v||In.units[e]||S,l===i.length&&(i+=v,a.e+=v)),S!==v&&(u=yr(t,e,p,v)||0),a._pt={_next:a._pt,p:b||c===1?b:",",s:u,c:g-u,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?Ep:wp;return Pu.test(i)&&(a.e=0),this._pt=a,a},Sp={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},wy=function(t){var e=t.split(" "),n=e[0],i=e[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(t=n,n=i,i=t),e[0]=Sp[n]||n,e[1]=Sp[i]||i,e.join(" ")},Ey=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n=e.t,i=n.style,s=e.u,o=n._gsap,a,l,c;if(s==="all"||s===!0)i.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],Gi[a]&&(l=1,a=a==="transformOrigin"?Ln:Pe),os(n,a);l&&(os(n,Pe),o&&(o.svg&&n.removeAttribute("transform"),oa(n,1),o.uncache=1,Tp(i)))}},gl={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new yn(t._pt,e,n,0,0,Ey);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},sa=[1,0,0,1,0,0],Pp={},Ip=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Mp=function(t){var e=Ri(t,Pe);return Ip(e)?sa:e.substr(7).match(Ru).map(Fe)},eh=function(t,e){var n=t._gsap||pr(t),i=t.style,s=Mp(t),o,a,l,c;return n.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?sa:s):(s===sa&&!t.offsetParent&&t!==qs&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,qs.appendChild(t)),s=Mp(t),l?i.display=l:os(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):qs.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Ku=function(t,e,n,i,s,o){var a=t._gsap,l=s||eh(t,!0),c=a.xOrigin||0,h=a.yOrigin||0,f=a.xOffset||0,d=a.yOffset||0,u=l[0],_=l[1],p=l[2],m=l[3],g=l[4],b=l[5],v=e.split(" "),S=parseFloat(v[0])||0,C=parseFloat(v[1])||0,T,w,P,M;n?l!==sa&&(w=u*m-_*p)&&(P=S*(m/w)+C*(-p/w)+(p*b-m*g)/w,M=S*(-_/w)+C*(u/w)-(u*b-_*g)/w,S=P,C=M):(T=Dp(t),S=T.x+(~v[0].indexOf("%")?S/100*T.width:S),C=T.y+(~(v[1]||v[0]).indexOf("%")?C/100*T.height:C)),i||i!==!1&&a.smooth?(g=S-c,b=C-h,a.xOffset=f+(g*u+b*p)-g,a.yOffset=d+(g*_+b*m)-b):a.xOffset=a.yOffset=0,a.xOrigin=S,a.yOrigin=C,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[Ln]="0px 0px",o&&(xr(o,a,"xOrigin",c,S),xr(o,a,"yOrigin",h,C),xr(o,a,"xOffset",f,a.xOffset),xr(o,a,"yOffset",d,a.yOffset)),t.setAttribute("data-svg-origin",S+" "+C)},oa=function(t,e){var n=t._gsap||new Bu(t);if("x"in n&&!e&&!n.uncache)return n;var i=t.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(t),c=Ri(t,Ln)||"0",h,f,d,u,_,p,m,g,b,v,S,C,T,w,P,M,y,I,N,D,V,K,W,Z,z,U,R,lt,xt,Bt,X,at;return h=f=d=p=m=g=b=v=S=0,u=_=1,n.svg=!!(t.getCTM&&Rp(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Pe]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Pe]!=="none"?l[Pe]:"")),i.scale=i.rotate=i.translate="none"),w=eh(t,n.svg),n.svg&&(n.uncache?(z=t.getBBox(),c=n.xOrigin-z.x+"px "+(n.yOrigin-z.y)+"px",Z=""):Z=!e&&t.getAttribute("data-svg-origin"),Ku(t,Z||c,!!Z||n.originIsAbsolute,n.smooth!==!1,w)),C=n.xOrigin||0,T=n.yOrigin||0,w!==sa&&(I=w[0],N=w[1],D=w[2],V=w[3],h=K=w[4],f=W=w[5],w.length===6?(u=Math.sqrt(I*I+N*N),_=Math.sqrt(V*V+D*D),p=I||N?Ys(N,I)*rs:0,b=D||V?Ys(D,V)*rs+p:0,b&&(_*=Math.abs(Math.cos(b*Zs))),n.svg&&(h-=C-(C*I+T*D),f-=T-(C*N+T*V))):(at=w[6],Bt=w[7],R=w[8],lt=w[9],xt=w[10],X=w[11],h=w[12],f=w[13],d=w[14],P=Ys(at,xt),m=P*rs,P&&(M=Math.cos(-P),y=Math.sin(-P),Z=K*M+R*y,z=W*M+lt*y,U=at*M+xt*y,R=K*-y+R*M,lt=W*-y+lt*M,xt=at*-y+xt*M,X=Bt*-y+X*M,K=Z,W=z,at=U),P=Ys(-D,xt),g=P*rs,P&&(M=Math.cos(-P),y=Math.sin(-P),Z=I*M-R*y,z=N*M-lt*y,U=D*M-xt*y,X=V*y+X*M,I=Z,N=z,D=U),P=Ys(N,I),p=P*rs,P&&(M=Math.cos(P),y=Math.sin(P),Z=I*M+N*y,z=K*M+W*y,N=N*M-I*y,W=W*M-K*y,I=Z,K=z),m&&Math.abs(m)+Math.abs(p)>359.9&&(m=p=0,g=180-g),u=Fe(Math.sqrt(I*I+N*N+D*D)),_=Fe(Math.sqrt(W*W+at*at)),P=Ys(K,W),b=Math.abs(P)>2e-4?P*rs:0,S=X?1/(X<0?-X:X):0),n.svg&&(Z=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Ip(Ri(t,Pe)),Z&&t.setAttribute("transform",Z))),Math.abs(b)>90&&Math.abs(b)<270&&(s?(u*=-1,b+=p<=0?180:-180,p+=p<=0?180:-180):(_*=-1,b+=b<=0?180:-180)),e=e||n.uncache,n.x=h-((n.xPercent=h&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-h)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=f-((n.yPercent=f&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=d+o,n.scaleX=Fe(u),n.scaleY=Fe(_),n.rotation=Fe(p)+a,n.rotationX=Fe(m)+a,n.rotationY=Fe(g)+a,n.skewX=b+a,n.skewY=v+a,n.transformPerspective=S+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[Ln]=_l(c)),n.xOffset=n.yOffset=0,n.force3D=In.force3D,n.renderTransform=n.svg?Ay:Cp?Lp:Ty,n.uncache=0,n},_l=function(t){return(t=t.split(" "))[0]+" "+t[1]},qu=function(t,e,n){var i=nn(e);return Fe(parseFloat(e)+parseFloat(yr(t,"x",n+"px",i)))+i},Ty=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Lp(t,e)},ns="0deg",ra="0px",is=") ",Lp=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,c=n.rotation,h=n.rotationY,f=n.rotationX,d=n.skewX,u=n.skewY,_=n.scaleX,p=n.scaleY,m=n.transformPerspective,g=n.force3D,b=n.target,v=n.zOrigin,S="",C=g==="auto"&&t&&t!==1||g===!0;if(v&&(f!==ns||h!==ns)){var T=parseFloat(h)*Zs,w=Math.sin(T),P=Math.cos(T),M;T=parseFloat(f)*Zs,M=Math.cos(T),o=qu(b,o,w*M*-v),a=qu(b,a,-Math.sin(T)*-v),l=qu(b,l,P*M*-v+v)}m!==ra&&(S+="perspective("+m+is),(i||s)&&(S+="translate("+i+"%, "+s+"%) "),(C||o!==ra||a!==ra||l!==ra)&&(S+=l!==ra||C?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+is),c!==ns&&(S+="rotate("+c+is),h!==ns&&(S+="rotateY("+h+is),f!==ns&&(S+="rotateX("+f+is),(d!==ns||u!==ns)&&(S+="skew("+d+", "+u+is),(_!==1||p!==1)&&(S+="scale("+_+", "+p+is),b.style[Pe]=S||"translate(0, 0)"},Ay=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,c=n.skewX,h=n.skewY,f=n.scaleX,d=n.scaleY,u=n.target,_=n.xOrigin,p=n.yOrigin,m=n.xOffset,g=n.yOffset,b=n.forceCSS,v=parseFloat(o),S=parseFloat(a),C,T,w,P,M;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Zs,c*=Zs,C=Math.cos(l)*f,T=Math.sin(l)*f,w=Math.sin(l-c)*-d,P=Math.cos(l-c)*d,c&&(h*=Zs,M=Math.tan(c-h),M=Math.sqrt(1+M*M),w*=M,P*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),C*=M,T*=M)),C=Fe(C),T=Fe(T),w=Fe(w),P=Fe(P)):(C=f,P=d,T=w=0),(v&&!~(o+"").indexOf("px")||S&&!~(a+"").indexOf("px"))&&(v=yr(u,"x",o,"px"),S=yr(u,"y",a,"px")),(_||p||m||g)&&(v=Fe(v+_-(_*C+p*w)+m),S=Fe(S+p-(_*T+p*P)+g)),(i||s)&&(M=u.getBBox(),v=Fe(v+i/100*M.width),S=Fe(S+s/100*M.height)),M="matrix("+C+","+T+","+w+","+P+","+v+","+S+")",u.setAttribute("transform",M),b&&(u.style[Pe]=M)},Cy=function(t,e,n,i,s){var o=360,a=We(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?rs:1),c=l-i,h=i+c+"deg",f,d;return a&&(f=s.split("_")[1],f==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),f==="cw"&&c<0?c=(c+o*_p)%o-~~(c/o)*o:f==="ccw"&&c>0&&(c=(c-o*_p)%o-~~(c/o)*o)),t._pt=d=new yn(t._pt,e,n,i,c,hy),d.e=h,d.u="deg",t._props.push(n),d},bp=function(t,e){for(var n in e)t[n]=e[n];return t},Dy=function(t,e,n){var i=bp({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,h,f,d,u,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Pe]=e,a=oa(n,1),os(n,Pe),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Pe],o[Pe]=e,a=oa(n,1),o[Pe]=c);for(l in Gi)c=i[l],h=a[l],c!==h&&s.indexOf(l)<0&&(u=nn(c),_=nn(h),f=u!==_?yr(n,l,c,_):parseFloat(c),d=parseFloat(h),t._pt=new yn(t._pt,a,l,f,d-f,Zu),t._pt.u=_||0,t._props.push(l));bp(a,i)};xn("padding,margin,Width,Radius",function(r,t){var e="Top",n="Right",i="Bottom",s="Left",o=(t<3?[e,n,i,s]:[e+s,e+n,i+n,i+s]).map(function(a){return t<2?r+a:"border"+a+r});gl[t>1?"border"+r:r]=function(a,l,c,h,f){var d,u;if(arguments.length<4)return d=o.map(function(_){return Hi(a,_,c)}),u=d.join(" "),u.split(d[0]).length===5?d[0]:u;d=(h+"").split(" "),u={},o.forEach(function(_,p){return u[_]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(l,u,f)}});var nh={name:"css",register:Ju,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,s){var o=this._props,a=t.style,l=n.vars.startAt,c,h,f,d,u,_,p,m,g,b,v,S,C,T,w,P;ju||Ju(),this.styles=this.styles||Ap(t),P=this.styles.props,this.tween=n;for(p in e)if(p!=="autoRound"&&(h=e[p],!(Dn[p]&&zu(p,e,n,i,t,s)))){if(u=typeof h,_=gl[p],u==="function"&&(h=h.call(n,i,t,s),u=typeof h),u==="string"&&~h.indexOf("random(")&&(h=Xs(h)),_)_(this,t,p,h,n)&&(w=1);else if(p.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(p)+"").trim(),h+="",zi.lastIndex=0,zi.test(c)||(m=nn(c),g=nn(h)),g?m!==g&&(c=yr(t,p,c,g)+g):m&&(h+=m),this.add(a,"setProperty",c,h,i,s,0,0,p),o.push(p),P.push(p,0,a[p]);else if(u!=="undefined"){if(l&&p in l?(c=typeof l[p]=="function"?l[p].call(n,i,t,s):l[p],We(c)&&~c.indexOf("random(")&&(c=Xs(c)),nn(c+"")||c==="auto"||(c+=In.units[p]||nn(Hi(t,p))||""),(c+"").charAt(1)==="="&&(c=Hi(t,p))):c=Hi(t,p),d=parseFloat(c),b=u==="string"&&h.charAt(1)==="="&&h.substr(0,2),b&&(h=h.substr(2)),f=parseFloat(h),p in Di&&(p==="autoAlpha"&&(d===1&&Hi(t,"visibility")==="hidden"&&f&&(d=0),P.push("visibility",0,a.visibility),xr(this,a,"visibility",d?"inherit":"hidden",f?"inherit":"hidden",!f)),p!=="scale"&&p!=="transform"&&(p=Di[p],~p.indexOf(",")&&(p=p.split(",")[0]))),v=p in Gi,v){if(this.styles.save(p),S||(C=t._gsap,C.renderTransform&&!e.parseTransform||oa(t,e.parseTransform),T=e.smoothOrigin!==!1&&C.smooth,S=this._pt=new yn(this._pt,a,Pe,0,1,C.renderTransform,C,0,-1),S.dep=1),p==="scale")this._pt=new yn(this._pt,C,"scaleY",C.scaleY,(b?ts(C.scaleY,b+f):f)-C.scaleY||0,Zu),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){P.push(Ln,0,a[Ln]),h=wy(h),C.svg?Ku(t,h,0,T,0,this):(g=parseFloat(h.split(" ")[2])||0,g!==C.zOrigin&&xr(this,C,"zOrigin",C.zOrigin,g),xr(this,a,p,_l(c),_l(h)));continue}else if(p==="svgOrigin"){Ku(t,h,1,T,0,this);continue}else if(p in Pp){Cy(this,C,p,d,b?ts(d,b+h):h);continue}else if(p==="smoothOrigin"){xr(this,C,"smooth",C.smooth,h);continue}else if(p==="force3D"){C[p]=h;continue}else if(p==="transform"){Dy(this,h,t);continue}}else p in a||(p=$s(p)||p);if(v||(f||f===0)&&(d||d===0)&&!uy.test(h)&&p in a)m=(c+"").substr((d+"").length),f||(f=0),g=nn(h)||(p in In.units?In.units[p]:m),m!==g&&(d=yr(t,p,c,g)),this._pt=new yn(this._pt,v?C:a,p,d,(b?ts(d,b+f):f)-d,!v&&(g==="px"||p==="zIndex")&&e.autoRound!==!1?dy:Zu),this._pt.u=g||0,m!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=fy);else if(p in a)by.call(this,t,p,c,b?b+h:h);else if(p in t)this.add(t,p,c||t[p],b?b+h:h,i,s);else if(p!=="parseTransform"){hl(p,h);continue}v||(p in a?P.push(p,0,a[p]):P.push(p,1,c||t[p])),o.push(p)}}w&&Xu(this)},render:function(t,e){if(e.tween._time||!Qu())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Hi,aliases:Di,getSetter:function(t,e,n){var i=Di[e];return i&&i.indexOf(",")<0&&(e=i),e in Gi&&e!==Ln&&(t._gsap.x||Hi(t,"x"))?n&&gp===n?e==="scale"?_y:gy:(gp=n||{})&&(e==="scale"?xy:yy):t.style&&!ul(t.style[e])?py:~e.indexOf("-")?my:ml(t,e)},core:{_removeProperty:os,_getMatrix:eh}};un.utils.checkPrefix=$s;un.core.getStyleSaver=Ap;(function(r,t,e,n){var i=xn(r+","+t+","+e,function(s){Gi[s]=1});xn(t,function(s){In.units[s]="deg",Pp[s]=1}),Di[i[13]]=r+","+t,xn(n,function(s){var o=s.split(":");Di[o[1]]=i[o[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");xn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){In.units[r]="px"});un.registerPlugin(nh);var Tt=un.registerPlugin(nh)||un,IT=Tt.core.Tween;function Fp(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Ry(r,t,e){return t&&Fp(r.prototype,t),e&&Fp(r,e),r}var ve,xl,rn,ls,Js,ci,Py,as,Np,se,Pi,yl,Up,Op,Bp,kp,zp=function(){return typeof window<"u"},Vp=function(){return ve||zp()&&(ve=window.gsap)&&ve.registerPlugin&&ve};var Iy=function(t){return Math.round(t*1e5)/1e5||0},vr=function(t){return se.maxScroll(t||rn)},Ly=function(t,e){var n=t.parentNode||Js,i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),o=s.top-i.top,a=s.bottom-i.bottom,l=(Math.abs(o)>Math.abs(a)?o:a)/(1-e),c=-l*e,h,f;return l>0&&(h=s.height/(rn.innerHeight+s.height),f=h===.5?s.height*2:Math.min(s.height,Math.abs(-l*h/(2*h-1)))*2*(e||1),c+=e?-f*e:-f/2,l+=f),{change:l,offset:c}},Fy=function(t){var e=ls.querySelector(".ScrollSmoother-wrapper");return e||(e=ls.createElement("div"),e.classList.add("ScrollSmoother-wrapper"),t.parentNode.insertBefore(e,t),e.appendChild(t)),e},ui=function(){function r(t){var e=this;xl||r.register(ve)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},Pi&&Pi.kill(),Pi=this,Bp(this);var n=t,i=n.smoothTouch,s=n.onUpdate,o=n.onStop,a=n.smooth,l=n.onFocusIn,c=n.normalizeScroll,h=n.wholePixels,f,d,u,_,p,m,g,b,v,S,C,T,w,P,M=this,y=t.effectsPrefix||"",I=se.getScrollFunc(rn),N=se.isTouch===1?i===!0?.8:parseFloat(i)||0:a===0||a===!1?0:parseFloat(a)||.8,D=N&&+t.speed||1,V=0,K=0,W=1,Z=Up(0),z=function(){return Z.update(-V)},U={y:0},R=function(){return f.style.overflow="visible"},lt,xt=function(x){x.update();var F=x.getTween();F&&(F.pause(),F._time=F._dur,F._tTime=F._tDur),lt=!1,x.animation.progress(x.progress,!0)},Bt=function(x,F){(x!==V&&!S||F)&&(h&&(x=Math.round(x)),N&&(f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+x+", 0, 1)",f._gsap.y=x+"px"),K=x-V,V=x,se.isUpdating||r.isRefreshing||se.update())},X=function(x){return arguments.length?(x<0&&(x=0),U.y=-x,lt=!0,S?V=-x:Bt(-x),se.isRefreshing?_.update():I(x/D),this):-V},at=typeof ResizeObserver<"u"&&t.autoResize!==!1&&new ResizeObserver(function(){if(!se.isRefreshing){var A=vr(d)*D;A<-V&&X(A),kp.restart(!0)}}),yt,ut=function(x){d.scrollTop=0,!(x.target.contains&&x.target.contains(d)||l&&l(e,x)===!1)&&(se.isInViewport(x.target)||x.target===yt||e.scrollTo(x.target,!1,"center center"),yt=x.target)},It=function(x,F){if(x<F.start)return x;var Y=isNaN(F.ratio)?1:F.ratio,et=F.end-F.start,rt=x-F.start,St=F.offset||0,mt=F.pins||[],ct=mt.offset||0,Nt=F._startClamp&&F.start<=0||F.pins&&F.pins.offset?0:F._endClamp&&F.end===vr()?1:.5;return mt.forEach(function(ft){et-=ft.distance,ft.nativeStart<=x&&(rt-=ft.distance)}),ct&&(rt*=(et-ct/Y)/et),x+(rt-St*Nt)/Y-rt},Ht=function A(x,F,Y){Y||(x.pins.length=x.pins.offset=0);var et=x.pins,rt=x.markers,St,mt,ct,Nt,ft,vt,$t,ht;for($t=0;$t<F.length;$t++)if(ht=F[$t],x.trigger&&ht.trigger&&x!==ht&&(ht.trigger===x.trigger||ht.pinnedContainer===x.trigger||x.trigger.contains(ht.trigger))&&(ft=ht._startNative||ht._startClamp||ht.start,vt=ht._endNative||ht._endClamp||ht.end,ct=It(ft,x),Nt=ht.pin&&vt>0?ct+(vt-ft):It(vt,x),ht.setPositions(ct,Nt,!0,(ht._startClamp?Math.max(0,ct):ct)-ft),ht.markerStart&&rt.push(ve.quickSetter([ht.markerStart,ht.markerEnd],"y","px")),ht.pin&&ht.end>0&&!Y)){if(St=ht.end-ht.start,mt=x._startClamp&&ht.start<0,mt){if(x.start>0){x.setPositions(0,x.end+(x._startNative-x.start),!0),A(x,F);return}St+=ht.start,et.offset=-ht.start}et.push({start:ht.start,nativeStart:ft,end:ht.end,distance:St,trig:ht}),x.setPositions(x.start,x.end+(mt?-ht.start:St),!0)}},q=function(x,F){p.forEach(function(Y){return Ht(Y,x,F)})},jt=function(){R(),requestAnimationFrame(R),p&&(se.getAll().forEach(function(x){x._startNative=x.start,x._endNative=x.end}),p.forEach(function(x){var F=x._startClamp||x.start,Y=x.autoSpeed?Math.min(vr(),x.end):F+Math.abs((x.end-F)/x.ratio),et=Y-x.end;if(F-=et/2,Y-=et/2,F>Y){var rt=F;F=Y,Y=rt}x._startClamp&&F<0?(Y=x.ratio<0?vr():x.end/x.ratio,et=Y-x.end,F=0):(x.ratio<0||x._endClamp&&Y>=vr())&&(Y=vr(),F=x.ratio<0||x.ratio>1?0:Y-(Y-x.start)/x.ratio,et=(Y-F)*x.ratio-(x.end-x.start)),x.offset=et||1e-4,x.pins.length=x.pins.offset=0,x.setPositions(F,Y,!0)}),q(se.sort())),Z.reset()},Ft=function(){return se.addEventListener("refresh",jt)},Ut=function(){return p&&p.forEach(function(x){return x.vars.onRefresh(x)})},wt=function(){return p&&p.forEach(function(x){return x.vars.onRefreshInit(x)}),Ut},At=function(x,F,Y,et){return function(){var rt=typeof F=="function"?F(Y,et):F;rt||rt===0||(rt=et.getAttribute("data-"+y+x)||(x==="speed"?1:0)),et.setAttribute("data-"+y+x,rt);var St=(rt+"").substr(0,6)==="clamp(";return{clamp:St,value:St?rt.substr(6,rt.length-7):rt}}},Xt=function(x,F,Y,et,rt){rt=(typeof rt=="function"?rt(et,x):rt)||0;var St=At("speed",F,et,x),mt=At("lag",Y,et,x),ct=ve.getProperty(x,"y"),Nt=x._gsap,ft,vt,$t,ht,Ct,qt,Jt=[],he=function(){F=St(),Y=parseFloat(mt().value),ft=parseFloat(F.value)||1,$t=F.value==="auto",Ct=$t||vt&&vt._startClamp&&vt.start<=0||Jt.offset?0:vt&&vt._endClamp&&vt.end===vr()?1:.5,ht&&ht.kill(),ht=Y&&ve.to(x,{ease:yl,overwrite:!1,y:"+=0",duration:Y}),vt&&(vt.ratio=ft,vt.autoSpeed=$t)},Kt=function(){Nt.y=ct+"px",Nt.renderTransform(1),he()},k=[],tt=0,ot=function(_t){if($t){Kt();var zt=Ly(x,Np(0,1,-_t.start/(_t.end-_t.start)));tt=zt.change,qt=zt.offset}else qt=Jt.offset||0,tt=(_t.end-_t.start-qt)*(1-ft);Jt.forEach(function(ie){return tt-=ie.distance*(1-ft)}),_t.offset=tt||.001,_t.vars.onUpdate(_t),ht&&ht.progress(1)};return he(),(ft!==1||$t||ht)&&(vt=se.create({trigger:$t?x.parentNode:x,start:function(){return F.clamp?"clamp(top bottom+="+rt+")":"top bottom+="+rt},end:function(){return F.value<0?"max":F.clamp?"clamp(bottom top-="+rt+")":"bottom top-="+rt},scroller:d,scrub:!0,refreshPriority:-999,onRefreshInit:Kt,onRefresh:ot,onKill:function(_t){var zt=p.indexOf(_t);zt>=0&&p.splice(zt,1),Kt()},onUpdate:function(_t){var zt=ct+tt*(_t.progress-Ct),ie=Jt.length,bt=0,L,st,O;if(_t.offset){if(ie){for(st=-V,O=_t.end;ie--;){if(L=Jt[ie],L.trig.isActive||st>=L.start&&st<=L.end){ht&&(L.trig.progress+=L.trig.direction<0?.001:-.001,L.trig.update(0,0,1),ht.resetTo("y",parseFloat(Nt.y),-K,!0),W&&ht.progress(1));return}st>L.end&&(bt+=L.distance),O-=L.distance}zt=ct+bt+tt*((ve.utils.clamp(_t.start,_t.end,st)-_t.start-bt)/(O-_t.start)-Ct)}k.length&&!$t&&k.forEach(function(Q){return Q(zt-bt)}),zt=Iy(zt+qt),ht?(ht.resetTo("y",zt,-K,!0),W&&ht.progress(1)):(Nt.y=zt+"px",Nt.renderTransform(1))}}}),ot(vt),ve.core.getCache(vt.trigger).stRevert=wt,vt.startY=ct,vt.pins=Jt,vt.markers=k,vt.ratio=ft,vt.autoSpeed=$t,x.style.willChange="transform"),vt};Ft(),se.addEventListener("killAll",Ft),ve.delayedCall(.5,function(){return W=0}),this.scrollTop=X,this.scrollTo=function(A,x,F){var Y=ve.utils.clamp(0,vr(),isNaN(A)?e.offset(A,F,!!x&&!S):+A);x?S?ve.to(e,{duration:N,scrollTop:Y,overwrite:"auto",ease:yl}):I(Y):X(Y)},this.offset=function(A,x,F){A=as(A)[0];var Y=A.style.cssText,et=se.create({trigger:A,start:x||"top top"}),rt;return p&&(W?se.refresh():q([et],!0)),rt=et.start/(F?D:1),et.kill(!1),A.style.cssText=Y,ve.core.getCache(A).uncache=1,rt};function G(){return u=f.clientHeight,f.style.overflow="visible",ci.style.height=rn.innerHeight+(u-rn.innerHeight)/D+"px",u-rn.innerHeight}this.content=function(A){if(arguments.length){var x=as(A||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||ci.children[0];return x!==f&&(f=x,v=f.getAttribute("style")||"",at&&at.observe(f),ve.set(f,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),N||ve.set(f,{clearProps:"transform"})),this}return f},this.wrapper=function(A){return arguments.length?(d=as(A||"#smooth-wrapper")[0]||Fy(f),b=d.getAttribute("style")||"",G(),ve.set(d,N?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):d},this.effects=function(A,x){var F;if(p||(p=[]),!A)return p.slice(0);A=as(A),A.forEach(function(ft){for(var vt=p.length;vt--;)p[vt].trigger===ft&&p[vt].kill()}),x=x||{};var Y=x,et=Y.speed,rt=Y.lag,St=Y.effectsPadding,mt=[],ct,Nt;for(ct=0;ct<A.length;ct++)Nt=Xt(A[ct],et,rt,ct,St),Nt&&mt.push(Nt);return(F=p).push.apply(F,mt),x.refresh!==!1&&se.refresh(),mt},this.sections=function(A,x){var F;if(m||(m=[]),!A)return m.slice(0);var Y=as(A).map(function(et){return se.create({trigger:et,start:"top 120%",end:"bottom -20%",onToggle:function(St){et.style.opacity=St.isActive?"1":"0",et.style.pointerEvents=St.isActive?"all":"none"}})});return x&&x.add?(F=m).push.apply(F,Y):m=Y.slice(0),Y},this.content(t.content),this.wrapper(t.wrapper),this.render=function(A){return Bt(A||A===0?A:V)},this.getVelocity=function(){return Z.getVelocity(-V)},se.scrollerProxy(d,{scrollTop:X,scrollHeight:function(){return G()&&ci.scrollHeight},fixedMarkers:t.fixedMarkers!==!1&&!!N,content:f,getBoundingClientRect:function(){return{top:0,left:0,width:rn.innerWidth,height:rn.innerHeight}}}),se.defaults({scroller:d});var Qt=se.getAll().filter(function(A){return A.scroller===rn||A.scroller===d});Qt.forEach(function(A){return A.revert(!0,!0)}),_=se.create({animation:ve.fromTo(U,{y:function(){return P=0,0}},{y:function(){return P=1,-G()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(P){var x=lt;x&&(xt(_),U.y=V),Bt(U.y,x),z(),s&&!S&&s(M)}}}),onRefreshInit:function(x){if(!r.isRefreshing){if(r.isRefreshing=!0,p){var F=se.getAll().filter(function(et){return!!et.pin});p.forEach(function(et){et.vars.pinnedContainer||F.forEach(function(rt){if(rt.pin.contains(et.trigger)){var St=et.vars;St.pinnedContainer=rt.pin,et.vars=null,et.init(St,et.animation)}})})}var Y=x.getTween();w=Y&&Y._end>Y._dp._time,T=V,U.y=0,N&&(se.isTouch===1&&(d.style.position="absolute"),d.scrollTop=0,se.isTouch===1&&(d.style.position="fixed"))}},onRefresh:function(x){x.animation.invalidate(),x.setPositions(x.start,G()/D),w||xt(x),U.y=-I()*D,Bt(U.y),W||(w&&(lt=!1),x.animation.progress(ve.utils.clamp(0,1,T/D/-x.end))),w&&(x.progress-=.001,x.update()),r.isRefreshing=!1},id:"ScrollSmoother",scroller:rn,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return G()/D},onScrubComplete:function(){Z.reset(),o&&o(e)},scrub:N||!0}),this.smooth=function(A){return arguments.length&&(N=A||0,D=N&&+t.speed||1,_.scrubDuration(A)),_.getTween()?_.getTween().duration():0},_.getTween()&&(_.getTween().vars.ease=t.ease||yl),this.scrollTrigger=_,t.effects&&this.effects(t.effects===!0?"[data-"+y+"speed], [data-"+y+"lag]":t.effects,{effectsPadding:t.effectsPadding,refresh:!1}),t.sections&&this.sections(t.sections===!0?"[data-section]":t.sections),Qt.forEach(function(A){A.vars.scroller=d,A.revert(!1,!0),A.init(A.vars,A.animation)}),this.paused=function(A,x){return arguments.length?(!!S!==A&&(A?(_.getTween()&&_.getTween().pause(),I(-V/D),Z.reset(),C=se.normalizeScroll(),C&&C.disable(),S=se.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return X(-V)}}),S.nested=Op(Js,"wheel,touch,scroll",!0,x!==!1)):(S.nested.kill(),S.kill(),S=0,C&&C.enable(),_.progress=(-V/D-_.start)/(_.end-_.start),xt(_))),this):!!S},this.kill=this.revert=function(){e.paused(!1),xt(_),_.kill();for(var A=(p||[]).concat(m||[]),x=A.length;x--;)A[x].kill();se.scrollerProxy(d),se.removeEventListener("killAll",Ft),se.removeEventListener("refresh",jt),d.style.cssText=b,f.style.cssText=v;var F=se.defaults({});F&&F.scroller===d&&se.defaults({scroller:rn}),e.normalizer&&se.normalizeScroll(!1),clearInterval(g),Pi=null,at&&at.disconnect(),ci.style.removeProperty("height"),rn.removeEventListener("focusin",ut)},this.refresh=function(A,x){return _.refresh(A,x)},c&&(this.normalizer=se.normalizeScroll(c===!0?{debounce:!0,content:!N&&f}:c)),se.config(t),"overscrollBehavior"in rn.getComputedStyle(ci)&&ve.set([ci,Js],{overscrollBehavior:"none"}),"scrollBehavior"in rn.getComputedStyle(ci)&&ve.set([ci,Js],{scrollBehavior:"auto"}),rn.addEventListener("focusin",ut),g=setInterval(z,250),ls.readyState==="loading"||requestAnimationFrame(function(){return se.refresh()})}return r.register=function(e){return xl||(ve=e||Vp(),zp()&&window.document&&(rn=window,ls=document,Js=ls.documentElement,ci=ls.body),ve&&(as=ve.utils.toArray,Np=ve.utils.clamp,yl=ve.parseEase("expo"),Bp=ve.core.context||function(){},se=ve.core.globals().ScrollTrigger,ve.core.globals("ScrollSmoother",r),ci&&se&&(kp=ve.delayedCall(.2,function(){return se.isRefreshing||Pi&&Pi.refresh()}).pause(),Py=[rn,ls,Js,ci],Up=se.core._getVelocityProp,Op=se.core._inputObserver,r.refresh=se.refresh,xl=1))),xl},Ry(r,[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}]),r}();ui.version="3.12.5";ui.create=function(r){return Pi&&r&&Pi.content()===as(r.content)[0]?Pi:new ui(r)};ui.get=function(){return Pi};Vp()&&ve.registerPlugin(ui);function Hp(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function Ny(r,t,e){return t&&Hp(r.prototype,t),e&&Hp(r,e),r}var sn,Ml,Uy,kn,Sr,Mr,js,Wp,cs,la,Xp,Wi,hi,Yp,qp=function(){return sn||typeof window<"u"&&(sn=window.gsap)&&sn.registerPlugin&&sn},Zp=1,Ks=[],ce=[],fi=[],ca=Date.now,ih=function(t,e){return e},Oy=function(){var t=la.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,ce),i.push.apply(i,fi),ce=n,fi=i,ih=function(o,a){return e[o](a)}},Yi=function(t,e){return~fi.indexOf(t)&&fi[fi.indexOf(t)+1][e]},ua=function(t){return!!~Xp.indexOf(t)},Sn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},vn=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},vl="scrollLeft",Sl="scrollTop",rh=function(){return Wi&&Wi.isPressed||ce.cache++},bl=function(t,e){var n=function i(s){if(s||s===0){Zp&&(kn.history.scrollRestoration="manual");var o=Wi&&Wi.isPressed;s=i.v=Math.round(s)||(Wi&&Wi.iOS?1:0),t(s),i.cacheID=ce.cache,o&&ih("ss",s)}else(e||ce.cache!==i.cacheID||ih("ref"))&&(i.cacheID=ce.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},hn={s:vl,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:bl(function(r){return arguments.length?kn.scrollTo(r,ze.sc()):kn.pageXOffset||Sr[vl]||Mr[vl]||js[vl]||0})},ze={s:Sl,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:hn,sc:bl(function(r){return arguments.length?kn.scrollTo(hn.sc(),r):kn.pageYOffset||Sr[Sl]||Mr[Sl]||js[Sl]||0})},Mn=function(t,e){return(e&&e._ctx&&e._ctx.selector||sn.utils.toArray)(t)[0]||(typeof t=="string"&&sn.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},Xi=function(t,e){var n=e.s,i=e.sc;ua(t)&&(t=Sr.scrollingElement||Mr);var s=ce.indexOf(t),o=i===ze.sc?1:2;!~s&&(s=ce.push(t)-1),ce[s+o]||Sn(t,"scroll",rh);var a=ce[s+o],l=a||(ce[s+o]=bl(Yi(t,n),!0)||(ua(t)?i:bl(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=sn.getProperty(t,"scrollBehavior")==="smooth"),l},wl=function(t,e,n){var i=t,s=t,o=ca(),a=o,l=e||50,c=Math.max(500,l*3),h=function(_,p){var m=ca();p||m-o>l?(s=i,i=_,a=o,o=m):n?i+=_:i=s+(_-s)/(m-a)*(o-a)},f=function(){s=i=n?0:i,a=o=0},d=function(_){var p=a,m=s,g=ca();return(_||_===0)&&_!==i&&h(_),o===a||g-a>c?0:(i+(n?m:-m))/((n?g:o)-p)*1e3};return{update:h,reset:f,getVelocity:d}},aa=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},Gp=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},$p=function(){la=sn.core.globals().ScrollTrigger,la&&la.core&&Oy()},Jp=function(t){return sn=t||qp(),!Ml&&sn&&typeof document<"u"&&document.body&&(kn=window,Sr=document,Mr=Sr.documentElement,js=Sr.body,Xp=[kn,Sr,Mr,js],Uy=sn.utils.clamp,Yp=sn.core.context||function(){},cs="onpointerenter"in js?"pointer":"mouse",Wp=Ne.isTouch=kn.matchMedia&&kn.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in kn||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,hi=Ne.eventTypes=("ontouchstart"in Mr?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Mr?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return Zp=0},500),$p(),Ml=1),Ml};hn.op=ze;ce.cache=0;var Ne=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){Ml||Jp(sn)||console.warn("Please gsap.registerPlugin(Observer)"),la||$p();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,h=n.preventDefault,f=n.onStop,d=n.onStopDelay,u=n.ignore,_=n.wheelSpeed,p=n.event,m=n.onDragStart,g=n.onDragEnd,b=n.onDrag,v=n.onPress,S=n.onRelease,C=n.onRight,T=n.onLeft,w=n.onUp,P=n.onDown,M=n.onChangeX,y=n.onChangeY,I=n.onChange,N=n.onToggleX,D=n.onToggleY,V=n.onHover,K=n.onHoverEnd,W=n.onMove,Z=n.ignoreCheck,z=n.isNormalizer,U=n.onGestureStart,R=n.onGestureEnd,lt=n.onWheel,xt=n.onEnable,Bt=n.onDisable,X=n.onClick,at=n.scrollSpeed,yt=n.capture,ut=n.allowClicks,It=n.lockAxis,Ht=n.onLockAxis;this.target=a=Mn(a)||Mr,this.vars=n,u&&(u=sn.utils.toArray(u)),i=i||1e-9,s=s||0,_=_||1,at=at||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(kn.getComputedStyle(js).lineHeight)||22);var q,jt,Ft,Ut,wt,At,Xt,G=this,Qt=0,A=0,x=n.passive||!h,F=Xi(a,hn),Y=Xi(a,ze),et=F(),rt=Y(),St=~o.indexOf("touch")&&!~o.indexOf("pointer")&&hi[0]==="pointerdown",mt=ua(a),ct=a.ownerDocument||Sr,Nt=[0,0,0],ft=[0,0,0],vt=0,$t=function(){return vt=ca()},ht=function(Q,pt){return(G.event=Q)&&u&&~u.indexOf(Q.target)||pt&&St&&Q.pointerType!=="touch"||Z&&Z(Q,pt)},Ct=function(){G._vx.reset(),G._vy.reset(),jt.pause(),f&&f(G)},qt=function(){var Q=G.deltaX=Gp(Nt),pt=G.deltaY=Gp(ft),nt=Math.abs(Q)>=i,Et=Math.abs(pt)>=i;I&&(nt||Et)&&I(G,Q,pt,Nt,ft),nt&&(C&&G.deltaX>0&&C(G),T&&G.deltaX<0&&T(G),M&&M(G),N&&G.deltaX<0!=Qt<0&&N(G),Qt=G.deltaX,Nt[0]=Nt[1]=Nt[2]=0),Et&&(P&&G.deltaY>0&&P(G),w&&G.deltaY<0&&w(G),y&&y(G),D&&G.deltaY<0!=A<0&&D(G),A=G.deltaY,ft[0]=ft[1]=ft[2]=0),(Ut||Ft)&&(W&&W(G),Ft&&(b(G),Ft=!1),Ut=!1),At&&!(At=!1)&&Ht&&Ht(G),wt&&(lt(G),wt=!1),q=0},Jt=function(Q,pt,nt){Nt[nt]+=Q,ft[nt]+=pt,G._vx.update(Q),G._vy.update(pt),c?q||(q=requestAnimationFrame(qt)):qt()},he=function(Q,pt){It&&!Xt&&(G.axis=Xt=Math.abs(Q)>Math.abs(pt)?"x":"y",At=!0),Xt!=="y"&&(Nt[2]+=Q,G._vx.update(Q,!0)),Xt!=="x"&&(ft[2]+=pt,G._vy.update(pt,!0)),c?q||(q=requestAnimationFrame(qt)):qt()},Kt=function(Q){if(!ht(Q,1)){Q=aa(Q,h);var pt=Q.clientX,nt=Q.clientY,Et=pt-G.x,dt=nt-G.y,Rt=G.isDragging;G.x=pt,G.y=nt,(Rt||Math.abs(G.startX-pt)>=s||Math.abs(G.startY-nt)>=s)&&(b&&(Ft=!0),Rt||(G.isDragging=!0),he(Et,dt),Rt||m&&m(G))}},k=G.onPress=function(O){ht(O,1)||O&&O.button||(G.axis=Xt=null,jt.pause(),G.isPressed=!0,O=aa(O),Qt=A=0,G.startX=G.x=O.clientX,G.startY=G.y=O.clientY,G._vx.reset(),G._vy.reset(),Sn(z?a:ct,hi[1],Kt,x,!0),G.deltaX=G.deltaY=0,v&&v(G))},tt=G.onRelease=function(O){if(!ht(O,1)){vn(z?a:ct,hi[1],Kt,!0);var Q=!isNaN(G.y-G.startY),pt=G.isDragging,nt=pt&&(Math.abs(G.x-G.startX)>3||Math.abs(G.y-G.startY)>3),Et=aa(O);!nt&&Q&&(G._vx.reset(),G._vy.reset(),h&&ut&&sn.delayedCall(.08,function(){if(ca()-vt>300&&!O.defaultPrevented){if(O.target.click)O.target.click();else if(ct.createEvent){var dt=ct.createEvent("MouseEvents");dt.initMouseEvent("click",!0,!0,kn,1,Et.screenX,Et.screenY,Et.clientX,Et.clientY,!1,!1,!1,!1,0,null),O.target.dispatchEvent(dt)}}})),G.isDragging=G.isGesturing=G.isPressed=!1,f&&pt&&!z&&jt.restart(!0),g&&pt&&g(G),S&&S(G,nt)}},ot=function(Q){return Q.touches&&Q.touches.length>1&&(G.isGesturing=!0)&&U(Q,G.isDragging)},gt=function(){return(G.isGesturing=!1)||R(G)},_t=function(Q){if(!ht(Q)){var pt=F(),nt=Y();Jt((pt-et)*at,(nt-rt)*at,1),et=pt,rt=nt,f&&jt.restart(!0)}},zt=function(Q){if(!ht(Q)){Q=aa(Q,h),lt&&(wt=!0);var pt=(Q.deltaMode===1?l:Q.deltaMode===2?kn.innerHeight:1)*_;Jt(Q.deltaX*pt,Q.deltaY*pt,0),f&&!z&&jt.restart(!0)}},ie=function(Q){if(!ht(Q)){var pt=Q.clientX,nt=Q.clientY,Et=pt-G.x,dt=nt-G.y;G.x=pt,G.y=nt,Ut=!0,f&&jt.restart(!0),(Et||dt)&&he(Et,dt)}},bt=function(Q){G.event=Q,V(G)},L=function(Q){G.event=Q,K(G)},st=function(Q){return ht(Q)||aa(Q,h)&&X(G)};jt=G._dc=sn.delayedCall(d||.25,Ct).pause(),G.deltaX=G.deltaY=0,G._vx=wl(0,50,!0),G._vy=wl(0,50,!0),G.scrollX=F,G.scrollY=Y,G.isDragging=G.isGesturing=G.isPressed=!1,Yp(this),G.enable=function(O){return G.isEnabled||(Sn(mt?ct:a,"scroll",rh),o.indexOf("scroll")>=0&&Sn(mt?ct:a,"scroll",_t,x,yt),o.indexOf("wheel")>=0&&Sn(a,"wheel",zt,x,yt),(o.indexOf("touch")>=0&&Wp||o.indexOf("pointer")>=0)&&(Sn(a,hi[0],k,x,yt),Sn(ct,hi[2],tt),Sn(ct,hi[3],tt),ut&&Sn(a,"click",$t,!0,!0),X&&Sn(a,"click",st),U&&Sn(ct,"gesturestart",ot),R&&Sn(ct,"gestureend",gt),V&&Sn(a,cs+"enter",bt),K&&Sn(a,cs+"leave",L),W&&Sn(a,cs+"move",ie)),G.isEnabled=!0,O&&O.type&&k(O),xt&&xt(G)),G},G.disable=function(){G.isEnabled&&(Ks.filter(function(O){return O!==G&&ua(O.target)}).length||vn(mt?ct:a,"scroll",rh),G.isPressed&&(G._vx.reset(),G._vy.reset(),vn(z?a:ct,hi[1],Kt,!0)),vn(mt?ct:a,"scroll",_t,yt),vn(a,"wheel",zt,yt),vn(a,hi[0],k,yt),vn(ct,hi[2],tt),vn(ct,hi[3],tt),vn(a,"click",$t,!0),vn(a,"click",st),vn(ct,"gesturestart",ot),vn(ct,"gestureend",gt),vn(a,cs+"enter",bt),vn(a,cs+"leave",L),vn(a,cs+"move",ie),G.isEnabled=G.isPressed=G.isDragging=!1,Bt&&Bt(G))},G.kill=G.revert=function(){G.disable();var O=Ks.indexOf(G);O>=0&&Ks.splice(O,1),Wi===G&&(Wi=0)},Ks.push(G),z&&ua(a)&&(Wi=G),G.enable(p)},Ny(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Ne.version="3.12.5";Ne.create=function(r){return new Ne(r)};Ne.register=Jp;Ne.getAll=function(){return Ks.slice()};Ne.getById=function(r){return Ks.filter(function(t){return t.vars.id===r})[0]};qp()&&sn.registerPlugin(Ne);var kt,eo,pe,Ie,di,Te,pm,zl,ba,_a,fa,El,fn,Wl,fh,wn,Kp,jp,no,mm,sh,gm,bn,dh,_m,xm,br,ph,yh,io,vh,Vl,mh,oh,Tl=1,dn=Date.now,ah=dn(),jn=0,da=0,Qp=function(t,e,n){var i=Vn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},tm=function(t,e){return e&&(!Vn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},By=function r(){return da&&requestAnimationFrame(r)},em=function(){return Wl=1},nm=function(){return Wl=0},Ii=function(t){return t},pa=function(t){return Math.round(t*1e5)/1e5||0},ym=function(){return typeof window<"u"},vm=function(){return kt||ym()&&(kt=window.gsap)&&kt.registerPlugin&&kt},ms=function(t){return!!~pm.indexOf(t)},Sm=function(t){return(t==="Height"?vh:pe["inner"+t])||di["client"+t]||Te["client"+t]},Mm=function(t){return Yi(t,"getBoundingClientRect")||(ms(t)?function(){return kl.width=pe.innerWidth,kl.height=vh,kl}:function(){return qi(t)})},ky=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=Yi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?Sm(s):t["client"+s])||0}},zy=function(t,e){return!e||~fi.indexOf(t)?Mm(t):function(){return kl}},Li=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=Yi(t,n))?o()-Mm(t)()[s]:ms(t)?(di[n]||Te[n])-Sm(i):t[n]-t["offset"+i])},Al=function(t,e){for(var n=0;n<no.length;n+=3)(!e||~e.indexOf(no[n+1]))&&t(no[n],no[n+1],no[n+2])},Vn=function(t){return typeof t=="string"},Tn=function(t){return typeof t=="function"},ma=function(t){return typeof t=="number"},us=function(t){return typeof t=="object"},ha=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},lh=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t)}):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},Qs=Math.abs,bm="left",wm="top",Sh="right",Mh="bottom",fs="width",ds="height",xa="Right",ya="Left",va="Top",Sa="Bottom",Ve="padding",Jn="margin",so="Width",bh="Height",Xe="px",Kn=function(t){return pe.getComputedStyle(t)},Vy=function(t){var e=Kn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},im=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},qi=function(t,e){var n=e&&Kn(t)[fh]!=="matrix(1, 0, 0, 1, 0, 0)"&&kt.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 n&&n.progress(0).kill(),i},Hl=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},Em=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},Hy=function(t){return function(e){return kt.utils.snap(Em(t),e)}},wh=function(t){var e=kt.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort(function(i,s){return i-s});return n?function(i,s,o){o===void 0&&(o=.001);var a;if(!s)return e(i);if(s>0){for(i-=o,a=0;a<n.length;a++)if(n[a]>=i)return n[a];return n[a-1]}else for(a=n.length,i+=o;a--;)if(n[a]<=i)return n[a];return n[0]}:function(i,s,o){o===void 0&&(o=.001);var a=e(i);return!s||Math.abs(a-i)<o||a-i<0==s<0?a:e(s<0?i-t:i+t)}},Gy=function(t){return function(e,n){return wh(Em(t))(e,n.direction)}},Cl=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},je=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},Ke=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},Dl=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},rm={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Rl={toggleActions:"play",anticipatePin:0},Gl={top:0,left:0,center:.5,bottom:1,right:1},Nl=function(t,e){if(Vn(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=e/100),t=t.substr(0,n-1)),t=i+(t in Gl?Gl[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Pl=function(t,e,n,i,s,o,a,l){var c=s.startColor,h=s.endColor,f=s.fontSize,d=s.indent,u=s.fontWeight,_=Ie.createElement("div"),p=ms(n)||Yi(n,"pinType")==="fixed",m=t.indexOf("scroller")!==-1,g=p?Te:n,b=t.indexOf("start")!==-1,v=b?c:h,S="border-color:"+v+";font-size:"+f+";color:"+v+";font-weight:"+u+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return S+="position:"+((m||l)&&p?"fixed;":"absolute;"),(m||l||!p)&&(S+=(i===ze?Sh:Mh)+":"+(o+parseFloat(d))+"px;"),a&&(S+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=b,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=S,_.innerText=e||e===0?t+"-"+e:t,g.children[0]?g.insertBefore(_,g.children[0]):g.appendChild(_),_._offset=_["offset"+i.op.d2],Ul(_,0,i,b),_},Ul=function(t,e,n,i){var s={display:"block"},o=n[i?"os2":"p2"],a=n[i?"p2":"os2"];t._isFlipped=i,s[n.a+"Percent"]=i?-100:0,s[n.a]=i?"1px":0,s["border"+o+so]=1,s["border"+a+so]=0,s[n.p]=e+"px",kt.set(t,s)},ue=[],gh={},wa,sm=function(){return dn()-jn>34&&(wa||(wa=requestAnimationFrame(Zi)))},to=function(){(!bn||!bn.isPressed||bn.startX>Te.clientWidth)&&(ce.cache++,bn?wa||(wa=requestAnimationFrame(Zi)):Zi(),jn||_s("scrollStart"),jn=dn())},ch=function(){xm=pe.innerWidth,_m=pe.innerHeight},ga=function(){ce.cache++,!fn&&!gm&&!Ie.fullscreenElement&&!Ie.webkitFullscreenElement&&(!dh||xm!==pe.innerWidth||Math.abs(pe.innerHeight-_m)>pe.innerHeight*.25)&&zl.restart(!0)},gs={},Wy=[],Tm=function r(){return Ke(Vt,"scrollEnd",r)||hs(!0)},_s=function(t){return gs[t]&&gs[t].map(function(e){return e()})||Wy},zn=[],Am=function(t){for(var e=0;e<zn.length;e+=5)(!t||zn[e+4]&&zn[e+4].query===t)&&(zn[e].style.cssText=zn[e+1],zn[e].getBBox&&zn[e].setAttribute("transform",zn[e+2]||""),zn[e+3].uncache=1)},Eh=function(t,e){var n;for(wn=0;wn<ue.length;wn++)n=ue[wn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Vl=!0,e&&Am(e),e||_s("revert")},Cm=function(t,e){ce.cache++,(e||!En)&&ce.forEach(function(n){return Tn(n)&&n.cacheID++&&(n.rec=0)}),Vn(t)&&(pe.history.scrollRestoration=yh=t)},En,ps=0,om,Xy=function(){if(om!==ps){var t=om=ps;requestAnimationFrame(function(){return t===ps&&hs(!0)})}},Dm=function(){Te.appendChild(io),vh=!bn&&io.offsetHeight||pe.innerHeight,Te.removeChild(io)},am=function(t){return ba(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},hs=function(t,e){if(jn&&!t&&!Vl){je(Vt,"scrollEnd",Tm);return}Dm(),En=Vt.isRefreshing=!0,ce.forEach(function(i){return Tn(i)&&++i.cacheID&&(i.rec=i())});var n=_s("refreshInit");mm&&Vt.sort(),e||Eh(),ce.forEach(function(i){Tn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),ue.slice(0).forEach(function(i){return i.refresh()}),Vl=!1,ue.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",o=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-o),i.refresh()}}),mh=1,am(!0),ue.forEach(function(i){var s=Li(i.scroller,i._dir),o=i.vars.end==="max"||i._endClamp&&i.end>s,a=i._startClamp&&i.start>=s;(o||a)&&i.setPositions(a?s-1:i.start,o?Math.max(a?s:i.start+1,s):i.end,!0)}),am(!1),mh=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),ce.forEach(function(i){Tn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Cm(yh,1),zl.pause(),ps++,En=2,Zi(2),ue.forEach(function(i){return Tn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),En=Vt.isRefreshing=!1,_s("refresh")},_h=0,Ol=1,Ma,Zi=function(t){if(t===2||!En&&!Vl){Vt.isUpdating=!0,Ma&&Ma.update(0);var e=ue.length,n=dn(),i=n-ah>=50,s=e&&ue[0].scroll();if(Ol=_h>s?-1:1,En||(_h=s),i&&(jn&&!Wl&&n-jn>200&&(jn=0,_s("scrollEnd")),fa=ah,ah=n),Ol<0){for(wn=e;wn-- >0;)ue[wn]&&ue[wn].update(0,i);Ol=1}else for(wn=0;wn<e;wn++)ue[wn]&&ue[wn].update(0,i);Vt.isUpdating=!1}wa=0},xh=[bm,wm,Mh,Sh,Jn+Sa,Jn+xa,Jn+va,Jn+ya,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Bl=xh.concat([fs,ds,"boxSizing","max"+so,"max"+bh,"position",Jn,Ve,Ve+va,Ve+xa,Ve+Sa,Ve+ya]),Yy=function(t,e,n){ro(n);var i=t._gsap;if(i.spacerIsNative)ro(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},uh=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=xh.length,o=e.style,a=t.style,l;s--;)l=xh[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[Mh]=a[Sh]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[fs]=Hl(t,hn)+Xe,o[ds]=Hl(t,ze)+Xe,o[Ve]=a[Jn]=a[wm]=a[bm]="0",ro(i),a[fs]=a["max"+so]=n[fs],a[ds]=a["max"+bh]=n[ds],a[Ve]=n[Ve],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},qy=/([A-Z])/g,ro=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||kt.core.getCache(t.t)).uncache=1;i<n;i+=2)o=t[i+1],s=t[i],o?e[s]=o:e[s]&&e.removeProperty(s.replace(qy,"-$1").toLowerCase())}},Il=function(t){for(var e=Bl.length,n=t.style,i=[],s=0;s<e;s++)i.push(Bl[s],n[Bl[s]]);return i.t=t,i},Zy=function(t,e,n){for(var i=[],s=t.length,o=n?8:0,a;o<s;o+=2)a=t[o],i.push(a,a in e?e[a]:t[o+1]);return i.t=t.t,i},kl={left:0,top:0},lm=function(t,e,n,i,s,o,a,l,c,h,f,d,u,_){Tn(t)&&(t=t(l)),Vn(t)&&t.substr(0,3)==="max"&&(t=d+(t.charAt(4)==="="?Nl("0"+t.substr(3),n):0));var p=u?u.time():0,m,g,b;if(u&&u.seek(0),isNaN(t)||(t=+t),ma(t))u&&(t=kt.utils.mapRange(u.scrollTrigger.start,u.scrollTrigger.end,0,d,t)),a&&Ul(a,n,i,!0);else{Tn(e)&&(e=e(l));var v=(t||"0").split(" "),S,C,T,w;b=Mn(e,l)||Te,S=qi(b)||{},(!S||!S.left&&!S.top)&&Kn(b).display==="none"&&(w=b.style.display,b.style.display="block",S=qi(b),w?b.style.display=w:b.style.removeProperty("display")),C=Nl(v[0],S[i.d]),T=Nl(v[1]||"0",n),t=S[i.p]-c[i.p]-h+C+s-T,a&&Ul(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var P=t+n,M=o._isStart;m="scroll"+i.d2,Ul(o,P,i,M&&P>20||!M&&(f?Math.max(Te[m],di[m]):o.parentNode[m])<=P+1),f&&(c=qi(a),f&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+Xe))}return u&&b&&(m=qi(b),u.seek(d),g=qi(b),u._caScrollDist=m[i.p]-g[i.p],t=t/u._caScrollDist*d),u&&u.seek(p),u?t:Math.round(t)},$y=/(webkit|moz|length|cssText|inset)/i,cm=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===Te){t._stOrig=s.cssText,a=Kn(t);for(o in a)!+o&&!$y.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=n,s.left=i}else s.cssText=t._stOrig;kt.core.getCache(t).uncache=1,e.appendChild(t)}},Rm=function(t,e,n){var i=e,s=i;return function(o){var a=Math.round(t());return a!==i&&a!==s&&Math.abs(a-i)>3&&Math.abs(a-s)>3&&(o=a,n&&n()),s=i,i=o,o}},Ll=function(t,e,n){var i={};i[e.p]="+="+n,kt.set(t,i)},um=function(t,e){var n=Xi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,h,f){var d=o.tween,u=l.onComplete,_={};c=c||n();var p=Rm(n,c,function(){d.kill(),o.tween=0});return f=h&&f||0,h=h||a-c,d&&d.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return p(c+h*d.ratio+f*d.ratio*d.ratio)},l.onUpdate=function(){ce.cache++,o.tween&&Zi()},l.onComplete=function(){o.tween=0,u&&u.call(d)},d=o.tween=kt.to(t,l),d};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},je(t,"wheel",n.wheelHandler),Vt.isTouch&&je(t,"touchmove",n.wheelHandler),s},Vt=function(){function r(e,n){eo||r.register(kt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),ph(this),this.init(e,n)}var t=r.prototype;return t.init=function(n,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!da){this.update=this.refresh=this.kill=Ii;return}n=im(Vn(n)||ma(n)||n.nodeType?{trigger:n}:n,Rl);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,h=s.onRefresh,f=s.scrub,d=s.trigger,u=s.pin,_=s.pinSpacing,p=s.invalidateOnRefresh,m=s.anticipatePin,g=s.onScrubComplete,b=s.onSnapComplete,v=s.once,S=s.snap,C=s.pinReparent,T=s.pinSpacer,w=s.containerAnimation,P=s.fastScrollEnd,M=s.preventOverlaps,y=n.horizontal||n.containerAnimation&&n.horizontal!==!1?hn:ze,I=!f&&f!==0,N=Mn(n.scroller||pe),D=kt.core.getCache(N),V=ms(N),K=("pinType"in n?n.pinType:Yi(N,"pinType")||V&&"fixed")==="fixed",W=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],Z=I&&n.toggleActions.split(" "),z="markers"in n?n.markers:Rl.markers,U=V?0:parseFloat(Kn(N)["border"+y.p2+so])||0,R=this,lt=n.onRefreshInit&&function(){return n.onRefreshInit(R)},xt=ky(N,V,y),Bt=zy(N,V),X=0,at=0,yt=0,ut=Xi(N,y),It,Ht,q,jt,Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St,mt,ct,Nt,ft,vt,$t,ht,Ct,qt,Jt,he,Kt,k,tt,ot,gt,_t,zt,ie,bt,L;if(R._startClamp=R._endClamp=!1,R._dir=y,m*=45,R.scroller=N,R.scroll=w?w.time.bind(w):ut,jt=ut(),R.vars=n,i=i||n.animation,"refreshPriority"in n&&(mm=1,n.refreshPriority===-9999&&(Ma=R)),D.tweenScroll=D.tweenScroll||{top:um(N,ze),left:um(N,hn)},R.tweenTo=It=D.tweenScroll[y.p],R.scrubDuration=function(nt){ot=ma(nt)&&nt,ot?tt?tt.duration(nt):tt=kt.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:ot,paused:!0,onComplete:function(){return g&&g(R)}}):(tt&&tt.progress(1).kill(),tt=0)},i&&(i.vars.lazy=!1,i._initted&&!R.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),R.animation=i.pause(),i.scrollTrigger=R,R.scrubDuration(f),Kt=0,l||(l=i.vars.id)),S&&((!us(S)||S.push)&&(S={snapTo:S}),"scrollBehavior"in Te.style&&kt.set(V?[Te,di]:N,{scrollBehavior:"auto"}),ce.forEach(function(nt){return Tn(nt)&&nt.target===(V?Ie.scrollingElement||di:N)&&(nt.smooth=!1)}),q=Tn(S.snapTo)?S.snapTo:S.snapTo==="labels"?Hy(i):S.snapTo==="labelsDirectional"?Gy(i):S.directional!==!1?function(nt,Et){return wh(S.snapTo)(nt,dn()-at<500?0:Et.direction)}:kt.utils.snap(S.snapTo),gt=S.duration||{min:.1,max:2},gt=us(gt)?_a(gt.min,gt.max):_a(gt,gt),_t=kt.delayedCall(S.delay||ot/2||.1,function(){var nt=ut(),Et=dn()-at<500,dt=It.tween;if((Et||Math.abs(R.getVelocity())<10)&&!dt&&!Wl&&X!==nt){var Rt=(nt-Ut)/F,Gt=i&&!I?i.totalProgress():Rt,Ot=Et?0:(Gt-k)/(dn()-fa)*1e3||0,ne=kt.utils.clamp(-Rt,1-Rt,Qs(Ot/2)*Ot/.185),fe=Rt+(S.inertia===!1?0:ne),ge,le,E=S,B=E.onStart,H=E.onInterrupt,j=E.onComplete;if(ge=q(fe,R),ma(ge)||(ge=fe),le=Math.round(Ut+ge*F),nt<=wt&&nt>=Ut&&le!==nt){if(dt&&!dt._initted&&dt.data<=Qs(le-nt))return;S.inertia===!1&&(ne=ge-Rt),It(le,{duration:gt(Qs(Math.max(Qs(fe-Gt),Qs(ge-Gt))*.185/Ot/.05||0)),ease:S.ease||"power3",data:Qs(le-nt),onInterrupt:function(){return _t.restart(!0)&&H&&H(R)},onComplete:function(){R.update(),X=ut(),i&&(tt?tt.resetTo("totalProgress",ge,i._tTime/i._tDur):i.progress(ge)),Kt=k=i&&!I?i.totalProgress():R.progress,b&&b(R),j&&j(R)}},nt,ne*F,le-nt-ne*F),B&&B(R,It.tween)}}else R.isActive&&X!==nt&&_t.restart(!0)}).pause()),l&&(gh[l]=R),d=R.trigger=Mn(d||u!==!0&&u),L=d&&d._gsap&&d._gsap.stRevert,L&&(L=L(R)),u=u===!0?d:Mn(u),Vn(a)&&(a={targets:d,className:a}),u&&(_===!1||_===Jn||(_=!_&&u.parentNode&&u.parentNode.style&&Kn(u.parentNode).display==="flex"?!1:Ve),R.pin=u,Ht=kt.core.getCache(u),Ht.spacer?Y=Ht.pinState:(T&&(T=Mn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),Ht.spacerIsNative=!!T,T&&(Ht.spacerState=Il(T))),Ht.spacer=St=T||Ie.createElement("div"),St.classList.add("pin-spacer"),l&&St.classList.add("pin-spacer-"+l),Ht.pinState=Y=Il(u)),n.force3D!==!1&&kt.set(u,{force3D:!0}),R.spacer=St=Ht.spacer,he=Kn(u),$t=he[_+y.os2],ct=kt.getProperty(u),Nt=kt.quickSetter(u,y.a,Xe),uh(u,St,he),rt=Il(u)),z){A=us(z)?im(z,rm):rm,G=Pl("scroller-start",l,N,y,A,0),Qt=Pl("scroller-end",l,N,y,A,0,G),mt=G["offset"+y.op.d2];var st=Mn(Yi(N,"content")||N);At=this.markerStart=Pl("start",l,st,y,A,mt,0,w),Xt=this.markerEnd=Pl("end",l,st,y,A,mt,0,w),w&&(bt=kt.quickSetter([At,Xt],y.a,Xe)),!K&&!(fi.length&&Yi(N,"fixedMarkers")===!0)&&(Vy(V?Te:N),kt.set([G,Qt],{force3D:!0}),Ct=kt.quickSetter(G,y.a,Xe),Jt=kt.quickSetter(Qt,y.a,Xe))}if(w){var O=w.vars.onUpdate,Q=w.vars.onUpdateParams;w.eventCallback("onUpdate",function(){R.update(0,0,1),O&&O.apply(w,Q||[])})}if(R.previous=function(){return ue[ue.indexOf(R)-1]},R.next=function(){return ue[ue.indexOf(R)+1]},R.revert=function(nt,Et){if(!Et)return R.kill(!0);var dt=nt!==!1||!R.enabled,Rt=fn;dt!==R.isReverted&&(dt&&(zt=Math.max(ut(),R.scroll.rec||0),yt=R.progress,ie=i&&i.progress()),At&&[At,Xt,G,Qt].forEach(function(Gt){return Gt.style.display=dt?"none":"block"}),dt&&(fn=R,R.update(dt)),u&&(!C||!R.isActive)&&(dt?Yy(u,St,Y):uh(u,St,Kn(u),ht)),dt||R.update(dt),fn=Rt,R.isReverted=dt)},R.refresh=function(nt,Et,dt,Rt){if(!((fn||!R.enabled)&&!Et)){if(u&&nt&&jn){je(r,"scrollEnd",Tm);return}!En&&lt&&lt(R),fn=R,It.tween&&!dt&&(It.tween.kill(),It.tween=0),tt&&tt.pause(),p&&i&&i.revert({kill:!1}).invalidate(),R.isReverted||R.revert(!0,!0),R._subPinOffset=!1;var Gt=xt(),Ot=Bt(),ne=w?w.duration():Li(N,y),fe=F<=.01,ge=0,le=Rt||0,E=us(dt)?dt.end:n.end,B=n.endTrigger||d,H=us(dt)?dt.start:n.start||(n.start===0||!d?0:u?"0 0":"0 100%"),j=R.pinnedContainer=n.pinnedContainer&&Mn(n.pinnedContainer,R),J=d&&Math.max(0,ue.indexOf(R))||0,Mt=J,Dt,Lt,Zt,ee,Yt,Wt,ye,ke,on,_n,re,te,Ei;for(z&&us(dt)&&(te=kt.getProperty(G,y.p),Ei=kt.getProperty(Qt,y.p));Mt--;)Wt=ue[Mt],Wt.end||Wt.refresh(0,1)||(fn=R),ye=Wt.pin,ye&&(ye===d||ye===u||ye===j)&&!Wt.isReverted&&(_n||(_n=[]),_n.unshift(Wt),Wt.revert(!0,!0)),Wt!==ue[Mt]&&(J--,Mt--);for(Tn(H)&&(H=H(R)),H=Qp(H,"start",R),Ut=lm(H,d,Gt,y,ut(),At,G,R,Ot,U,K,ne,w,R._startClamp&&"_startClamp")||(u?-.001:0),Tn(E)&&(E=E(R)),Vn(E)&&!E.indexOf("+=")&&(~E.indexOf(" ")?E=(Vn(H)?H.split(" ")[0]:"")+E:(ge=Nl(E.substr(2),Gt),E=Vn(H)?H:(w?kt.utils.mapRange(0,w.duration(),w.scrollTrigger.start,w.scrollTrigger.end,Ut):Ut)+ge,B=d)),E=Qp(E,"end",R),wt=Math.max(Ut,lm(E||(B?"100% 0":ne),B,Gt,y,ut()+ge,Xt,Qt,R,Ot,U,K,ne,w,R._endClamp&&"_endClamp"))||-.001,ge=0,Mt=J;Mt--;)Wt=ue[Mt],ye=Wt.pin,ye&&Wt.start-Wt._pinPush<=Ut&&!w&&Wt.end>0&&(Dt=Wt.end-(R._startClamp?Math.max(0,Wt.start):Wt.start),(ye===d&&Wt.start-Wt._pinPush<Ut||ye===j)&&isNaN(H)&&(ge+=Dt*(1-Wt.progress)),ye===u&&(le+=Dt));if(Ut+=ge,wt+=ge,R._startClamp&&(R._startClamp+=ge),R._endClamp&&!En&&(R._endClamp=wt||-.001,wt=Math.min(wt,Li(N,y))),F=wt-Ut||(Ut-=.01)&&.001,fe&&(yt=kt.utils.clamp(0,1,kt.utils.normalize(Ut,wt,zt))),R._pinPush=le,At&&ge&&(Dt={},Dt[y.a]="+="+ge,j&&(Dt[y.p]="-="+ut()),kt.set([At,Xt],Dt)),u&&!(mh&&R.end>=Li(N,y)))Dt=Kn(u),ee=y===ze,Zt=ut(),ft=parseFloat(ct(y.a))+le,!ne&&wt>1&&(re=(V?Ie.scrollingElement||di:N).style,re={style:re,value:re["overflow"+y.a.toUpperCase()]},V&&Kn(Te)["overflow"+y.a.toUpperCase()]!=="scroll"&&(re.style["overflow"+y.a.toUpperCase()]="scroll")),uh(u,St,Dt),rt=Il(u),Lt=qi(u,!0),ke=K&&Xi(N,ee?hn:ze)(),_?(ht=[_+y.os2,F+le+Xe],ht.t=St,Mt=_===Ve?Hl(u,y)+F+le:0,Mt&&(ht.push(y.d,Mt+Xe),St.style.flexBasis!=="auto"&&(St.style.flexBasis=Mt+Xe)),ro(ht),j&&ue.forEach(function(Se){Se.pin===j&&Se.vars.pinSpacing!==!1&&(Se._subPinOffset=!0)}),K&&ut(zt)):(Mt=Hl(u,y),Mt&&St.style.flexBasis!=="auto"&&(St.style.flexBasis=Mt+Xe)),K&&(Yt={top:Lt.top+(ee?Zt-Ut:ke)+Xe,left:Lt.left+(ee?ke:Zt-Ut)+Xe,boxSizing:"border-box",position:"fixed"},Yt[fs]=Yt["max"+so]=Math.ceil(Lt.width)+Xe,Yt[ds]=Yt["max"+bh]=Math.ceil(Lt.height)+Xe,Yt[Jn]=Yt[Jn+va]=Yt[Jn+xa]=Yt[Jn+Sa]=Yt[Jn+ya]="0",Yt[Ve]=Dt[Ve],Yt[Ve+va]=Dt[Ve+va],Yt[Ve+xa]=Dt[Ve+xa],Yt[Ve+Sa]=Dt[Ve+Sa],Yt[Ve+ya]=Dt[Ve+ya],et=Zy(Y,Yt,C),En&&ut(0)),i?(on=i._initted,sh(1),i.render(i.duration(),!0,!0),vt=ct(y.a)-ft+F+le,qt=Math.abs(F-vt)>1,K&&qt&&et.splice(et.length-2,2),i.render(0,!0,!0),on||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),sh(0)):vt=F,re&&(re.value?re.style["overflow"+y.a.toUpperCase()]=re.value:re.style.removeProperty("overflow-"+y.a));else if(d&&ut()&&!w)for(Lt=d.parentNode;Lt&&Lt!==Te;)Lt._pinOffset&&(Ut-=Lt._pinOffset,wt-=Lt._pinOffset),Lt=Lt.parentNode;_n&&_n.forEach(function(Se){return Se.revert(!1,!0)}),R.start=Ut,R.end=wt,jt=Ft=En?zt:ut(),!w&&!En&&(jt<zt&&ut(zt),R.scroll.rec=0),R.revert(!1,!0),at=dn(),_t&&(X=-1,_t.restart(!0)),fn=0,i&&I&&(i._initted||ie)&&i.progress()!==ie&&i.progress(ie||0,!0).render(i.time(),!0,!0),(fe||yt!==R.progress||w||p)&&(i&&!I&&i.totalProgress(w&&Ut<-.001&&!yt?kt.utils.normalize(Ut,wt,0):yt,!0),R.progress=fe||(jt-Ut)/F===yt?0:yt),u&&_&&(St._pinOffset=Math.round(R.progress*vt)),tt&&tt.invalidate(),isNaN(te)||(te-=kt.getProperty(G,y.p),Ei-=kt.getProperty(Qt,y.p),Ll(G,y,te),Ll(At,y,te-(Rt||0)),Ll(Qt,y,Ei),Ll(Xt,y,Ei-(Rt||0))),fe&&!En&&R.update(),h&&!En&&!x&&(x=!0,h(R),x=!1)}},R.getVelocity=function(){return(ut()-Ft)/(dn()-fa)*1e3||0},R.endAnimation=function(){ha(R.callbackAnimation),i&&(tt?tt.progress(1):i.paused()?I||ha(i,R.direction<0,1):ha(i,i.reversed()))},R.labelToScroll=function(nt){return i&&i.labels&&(Ut||R.refresh()||Ut)+i.labels[nt]/i.duration()*F||0},R.getTrailing=function(nt){var Et=ue.indexOf(R),dt=R.direction>0?ue.slice(0,Et).reverse():ue.slice(Et+1);return(Vn(nt)?dt.filter(function(Rt){return Rt.vars.preventOverlaps===nt}):dt).filter(function(Rt){return R.direction>0?Rt.end<=Ut:Rt.start>=wt})},R.update=function(nt,Et,dt){if(!(w&&!dt&&!nt)){var Rt=En===!0?zt:R.scroll(),Gt=nt?0:(Rt-Ut)/F,Ot=Gt<0?0:Gt>1?1:Gt||0,ne=R.progress,fe,ge,le,E,B,H,j,J;if(Et&&(Ft=jt,jt=w?ut():Rt,S&&(k=Kt,Kt=i&&!I?i.totalProgress():Ot)),m&&u&&!fn&&!Tl&&jn&&(!Ot&&Ut<Rt+(Rt-Ft)/(dn()-fa)*m?Ot=1e-4:Ot===1&&wt>Rt+(Rt-Ft)/(dn()-fa)*m&&(Ot=.9999)),Ot!==ne&&R.enabled){if(fe=R.isActive=!!Ot&&Ot<1,ge=!!ne&&ne<1,H=fe!==ge,B=H||!!Ot!=!!ne,R.direction=Ot>ne?1:-1,R.progress=Ot,B&&!fn&&(le=Ot&&!ne?0:Ot===1?1:ne===1?2:3,I&&(E=!H&&Z[le+1]!=="none"&&Z[le+1]||Z[le],J=i&&(E==="complete"||E==="reset"||E in i))),M&&(H||J)&&(J||f||!i)&&(Tn(M)?M(R):R.getTrailing(M).forEach(function(Zt){return Zt.endAnimation()})),I||(tt&&!fn&&!Tl?(tt._dp._time-tt._start!==tt._time&&tt.render(tt._dp._time-tt._start),tt.resetTo?tt.resetTo("totalProgress",Ot,i._tTime/i._tDur):(tt.vars.totalProgress=Ot,tt.invalidate().restart())):i&&i.totalProgress(Ot,!!(fn&&(at||nt)))),u){if(nt&&_&&(St.style[_+y.os2]=$t),!K)Nt(pa(ft+vt*Ot));else if(B){if(j=!nt&&Ot>ne&&wt+1>Rt&&Rt+1>=Li(N,y),C)if(!nt&&(fe||j)){var Mt=qi(u,!0),Dt=Rt-Ut;cm(u,Te,Mt.top+(y===ze?Dt:0)+Xe,Mt.left+(y===ze?0:Dt)+Xe)}else cm(u,St);ro(fe||j?et:rt),qt&&Ot<1&&fe||Nt(ft+(Ot===1&&!j?vt:0))}}S&&!It.tween&&!fn&&!Tl&&_t.restart(!0),a&&(H||v&&Ot&&(Ot<1||!oh))&&ba(a.targets).forEach(function(Zt){return Zt.classList[fe||v?"add":"remove"](a.className)}),o&&!I&&!nt&&o(R),B&&!fn?(I&&(J&&(E==="complete"?i.pause().totalProgress(1):E==="reset"?i.restart(!0).pause():E==="restart"?i.restart(!0):i[E]()),o&&o(R)),(H||!oh)&&(c&&H&&lh(R,c),W[le]&&lh(R,W[le]),v&&(Ot===1?R.kill(!1,1):W[le]=0),H||(le=Ot===1?1:3,W[le]&&lh(R,W[le]))),P&&!fe&&Math.abs(R.getVelocity())>(ma(P)?P:2500)&&(ha(R.callbackAnimation),tt?tt.progress(1):ha(i,E==="reverse"?1:!Ot,1))):I&&o&&!fn&&o(R)}if(Jt){var Lt=w?Rt/w.duration()*(w._caScrollDist||0):Rt;Ct(Lt+(G._isFlipped?1:0)),Jt(Lt)}bt&&bt(-Rt/w.duration()*(w._caScrollDist||0))}},R.enable=function(nt,Et){R.enabled||(R.enabled=!0,je(N,"resize",ga),V||je(N,"scroll",to),lt&&je(r,"refreshInit",lt),nt!==!1&&(R.progress=yt=0,jt=Ft=X=ut()),Et!==!1&&R.refresh())},R.getTween=function(nt){return nt&&It?It.tween:tt},R.setPositions=function(nt,Et,dt,Rt){if(w){var Gt=w.scrollTrigger,Ot=w.duration(),ne=Gt.end-Gt.start;nt=Gt.start+ne*nt/Ot,Et=Gt.start+ne*Et/Ot}R.refresh(!1,!1,{start:tm(nt,dt&&!!R._startClamp),end:tm(Et,dt&&!!R._endClamp)},Rt),R.update()},R.adjustPinSpacing=function(nt){if(ht&&nt){var Et=ht.indexOf(y.d)+1;ht[Et]=parseFloat(ht[Et])+nt+Xe,ht[1]=parseFloat(ht[1])+nt+Xe,ro(ht)}},R.disable=function(nt,Et){if(R.enabled&&(nt!==!1&&R.revert(!0,!0),R.enabled=R.isActive=!1,Et||tt&&tt.pause(),zt=0,Ht&&(Ht.uncache=1),lt&&Ke(r,"refreshInit",lt),_t&&(_t.pause(),It.tween&&It.tween.kill()&&(It.tween=0)),!V)){for(var dt=ue.length;dt--;)if(ue[dt].scroller===N&&ue[dt]!==R)return;Ke(N,"resize",ga),V||Ke(N,"scroll",to)}},R.kill=function(nt,Et){R.disable(nt,Et),tt&&!Et&&tt.kill(),l&&delete gh[l];var dt=ue.indexOf(R);dt>=0&&ue.splice(dt,1),dt===wn&&Ol>0&&wn--,dt=0,ue.forEach(function(Rt){return Rt.scroller===R.scroller&&(dt=1)}),dt||En||(R.scroll.rec=0),i&&(i.scrollTrigger=null,nt&&i.revert({kill:!1}),Et||i.kill()),At&&[At,Xt,G,Qt].forEach(function(Rt){return Rt.parentNode&&Rt.parentNode.removeChild(Rt)}),Ma===R&&(Ma=0),u&&(Ht&&(Ht.uncache=1),dt=0,ue.forEach(function(Rt){return Rt.pin===u&&dt++}),dt||(Ht.spacer=0)),n.onKill&&n.onKill(R)},ue.push(R),R.enable(!1,!1),L&&L(R),i&&i.add&&!F){var pt=R.update;R.update=function(){R.update=pt,Ut||wt||R.refresh()},kt.delayedCall(.01,R.update),F=.01,Ut=wt=0}else R.refresh();u&&Xy()},r.register=function(n){return eo||(kt=n||vm(),ym()&&window.document&&r.enable(),eo=da),eo},r.defaults=function(n){if(n)for(var i in n)Rl[i]=n[i];return Rl},r.disable=function(n,i){da=0,ue.forEach(function(o){return o[i?"kill":"disable"](n)}),Ke(pe,"wheel",to),Ke(Ie,"scroll",to),clearInterval(El),Ke(Ie,"touchcancel",Ii),Ke(Te,"touchstart",Ii),Cl(Ke,Ie,"pointerdown,touchstart,mousedown",em),Cl(Ke,Ie,"pointerup,touchend,mouseup",nm),zl.kill(),Al(Ke);for(var s=0;s<ce.length;s+=3)Dl(Ke,ce[s],ce[s+1]),Dl(Ke,ce[s],ce[s+2])},r.enable=function(){if(pe=window,Ie=document,di=Ie.documentElement,Te=Ie.body,kt&&(ba=kt.utils.toArray,_a=kt.utils.clamp,ph=kt.core.context||Ii,sh=kt.core.suppressOverwrites||Ii,yh=pe.history.scrollRestoration||"auto",_h=pe.pageYOffset,kt.core.globals("ScrollTrigger",r),Te)){da=1,io=document.createElement("div"),io.style.height="100vh",io.style.position="absolute",Dm(),By(),Ne.register(kt),r.isTouch=Ne.isTouch,br=Ne.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),dh=Ne.isTouch===1,je(pe,"wheel",to),pm=[pe,Ie,di,Te],kt.matchMedia?(r.matchMedia=function(l){var c=kt.matchMedia(),h;for(h in l)c.add(h,l[h]);return c},kt.addEventListener("matchMediaInit",function(){return Eh()}),kt.addEventListener("matchMediaRevert",function(){return Am()}),kt.addEventListener("matchMedia",function(){hs(0,1),_s("matchMedia")}),kt.matchMedia("(orientation: portrait)",function(){return ch(),ch})):console.warn("Requires GSAP 3.11.0 or later"),ch(),je(Ie,"scroll",to);var n=Te.style,i=n.borderTopStyle,s=kt.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=qi(Te),ze.m=Math.round(o.top+ze.sc())||0,hn.m=Math.round(o.left+hn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),El=setInterval(sm,250),kt.delayedCall(.5,function(){return Tl=0}),je(Ie,"touchcancel",Ii),je(Te,"touchstart",Ii),Cl(je,Ie,"pointerdown,touchstart,mousedown",em),Cl(je,Ie,"pointerup,touchend,mouseup",nm),fh=kt.utils.checkPrefix("transform"),Bl.push(fh),eo=dn(),zl=kt.delayedCall(.2,hs).pause(),no=[Ie,"visibilitychange",function(){var l=pe.innerWidth,c=pe.innerHeight;Ie.hidden?(Kp=l,jp=c):(Kp!==l||jp!==c)&&ga()},Ie,"DOMContentLoaded",hs,pe,"load",hs,pe,"resize",ga],Al(je),ue.forEach(function(l){return l.enable(0,1)}),a=0;a<ce.length;a+=3)Dl(Ke,ce[a],ce[a+1]),Dl(Ke,ce[a],ce[a+2])}},r.config=function(n){"limitCallbacks"in n&&(oh=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(El)||(El=i)&&setInterval(sm,i),"ignoreMobileResize"in n&&(dh=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(Al(Ke)||Al(je,n.autoRefreshEvents||"none"),gm=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=Mn(n),o=ce.indexOf(s),a=ms(s);~o&&ce.splice(o,a?6:2),i&&(a?fi.unshift(pe,i,Te,i,di,i):fi.unshift(s,i))},r.clearMatchMedia=function(n){ue.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(Vn(n)?Mn(n):n).getBoundingClientRect(),a=o[s?fs:ds]*i||0;return s?o.right-a>0&&o.left+a<pe.innerWidth:o.bottom-a>0&&o.top+a<pe.innerHeight},r.positionInViewport=function(n,i,s){Vn(n)&&(n=Mn(n));var o=n.getBoundingClientRect(),a=o[s?fs:ds],l=i==null?a/2:i in Gl?Gl[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/pe.innerWidth:(o.top+l)/pe.innerHeight},r.killAll=function(n){if(ue.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=gs.killAll||[];gs={},i.forEach(function(s){return s()})}},r}();Vt.version="3.12.5";Vt.saveStyles=function(r){return r?ba(r).forEach(function(t){if(t&&t.style){var e=zn.indexOf(t);e>=0&&zn.splice(e,5),zn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),kt.core.getCache(t),ph())}}):zn};Vt.revert=function(r,t){return Eh(!r,t)};Vt.create=function(r,t){return new Vt(r,t)};Vt.refresh=function(r){return r?ga():(eo||Vt.register())&&hs(!0)};Vt.update=function(r){return++ce.cache&&Zi(r===!0?2:0)};Vt.clearScrollMemory=Cm;Vt.maxScroll=function(r,t){return Li(r,t?hn:ze)};Vt.getScrollFunc=function(r,t){return Xi(Mn(r),t?hn:ze)};Vt.getById=function(r){return gh[r]};Vt.getAll=function(){return ue.filter(function(r){return r.vars.id!=="ScrollSmoother"})};Vt.isScrolling=function(){return!!jn};Vt.snapDirectional=wh;Vt.addEventListener=function(r,t){var e=gs[r]||(gs[r]=[]);~e.indexOf(t)||e.push(t)};Vt.removeEventListener=function(r,t){var e=gs[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};Vt.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,h){var f=[],d=[],u=kt.delayedCall(i,function(){h(f,d),f=[],d=[]}).pause();return function(_){f.length||u.restart(!0),f.push(_.trigger),d.push(_),s<=f.length&&u.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&Tn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return Tn(s)&&(s=s(),je(Vt,"refresh",function(){return s=t.batchMax()})),ba(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(Vt.create(c))}),e};var hm=function(t,e,n,i){return e>i?t(i):e<0&&t(0),n>i?(i-e)/(n-e):n<0?e/(e-n):1},hh=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Ne.isTouch?" pinch-zoom":""):"none",t===di&&r(Te,e)},Fl={auto:1,scroll:1},Jy=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||kt.core.getCache(s),a=dn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==Te&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(Fl[(l=Kn(s)).overflowY]||Fl[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!ms(s)&&(Fl[(l=Kn(s)).overflowY]||Fl[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},Pm=function(t,e,n,i){return Ne.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&Jy,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&je(Ie,Ne.eventTypes[0],dm,!1,!0)},onDisable:function(){return Ke(Ie,Ne.eventTypes[0],dm,!0)}})},Ky=/(input|label|select|textarea)/i,fm,dm=function(t){var e=Ky.test(t.target.tagName);(e||fm)&&(t._gsapAllow=!0,fm=e)},jy=function(t){us(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,n=e.normalizeScrollX,i=e.momentum,s=e.allowNestedScroll,o=e.onRelease,a,l,c=Mn(t.target)||di,h=kt.core.globals().ScrollSmoother,f=h&&h.get(),d=br&&(t.content&&Mn(t.content)||f&&t.content!==!1&&!f.smooth()&&f.content()),u=Xi(c,ze),_=Xi(c,hn),p=1,m=(Ne.isTouch&&pe.visualViewport?pe.visualViewport.scale*pe.visualViewport.width:pe.outerWidth)/pe.innerWidth,g=0,b=Tn(i)?function(){return i(a)}:function(){return i||2.8},v,S,C=Pm(c,t.type,!0,s),T=function(){return S=!1},w=Ii,P=Ii,M=function(){l=Li(c,ze),P=_a(br?1:0,l),n&&(w=_a(0,Li(c,hn))),v=ps},y=function(){d._gsap.y=pa(parseFloat(d._gsap.y)+u.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)",u.offset=u.cacheID=0},I=function(){if(S){requestAnimationFrame(T);var z=pa(a.deltaY/2),U=P(u.v-z);if(d&&U!==u.v+u.offset){u.offset=U-u.v;var R=pa((parseFloat(d&&d._gsap.y)||0)-u.offset);d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+R+", 0, 1)",d._gsap.y=R+"px",u.cacheID=ce.cache,Zi()}return!0}u.offset&&y(),S=!0},N,D,V,K,W=function(){M(),N.isActive()&&N.vars.scrollY>l&&(u()>l?N.progress(1)&&u(l):N.resetTo("scrollY",l))};return d&&kt.set(d,{y:"+=0"}),t.ignoreCheck=function(Z){return br&&Z.type==="touchmove"&&I(Z)||p>1.05&&Z.type!=="touchstart"||a.isGesturing||Z.touches&&Z.touches.length>1},t.onPress=function(){S=!1;var Z=p;p=pa((pe.visualViewport&&pe.visualViewport.scale||1)/m),N.pause(),Z!==p&&hh(c,p>1.01?!0:n?!1:"x"),D=_(),V=u(),M(),v=ps},t.onRelease=t.onGestureStart=function(Z,z){if(u.offset&&y(),!z)K.restart(!0);else{ce.cache++;var U=b(),R,lt;n&&(R=_(),lt=R+U*.05*-Z.velocityX/.227,U*=hm(_,R,lt,Li(c,hn)),N.vars.scrollX=w(lt)),R=u(),lt=R+U*.05*-Z.velocityY/.227,U*=hm(u,R,lt,Li(c,ze)),N.vars.scrollY=P(lt),N.invalidate().duration(U).play(.01),(br&&N.vars.scrollY>=l||R>=l-1)&&kt.to({},{onUpdate:W,duration:U})}o&&o(Z)},t.onWheel=function(){N._ts&&N.pause(),dn()-g>1e3&&(v=0,g=dn())},t.onChange=function(Z,z,U,R,lt){if(ps!==v&&M(),z&&n&&_(w(R[2]===z?D+(Z.startX-Z.x):_()+z-R[1])),U){u.offset&&y();var xt=lt[2]===U,Bt=xt?V+Z.startY-Z.y:u()+U-lt[1],X=P(Bt);xt&&Bt!==X&&(V+=X-Bt),u(X)}(U||z)&&Zi()},t.onEnable=function(){hh(c,n?!1:"x"),Vt.addEventListener("refresh",W),je(pe,"resize",W),u.smooth&&(u.target.style.scrollBehavior="auto",u.smooth=_.smooth=!1),C.enable()},t.onDisable=function(){hh(c,!0),Ke(pe,"resize",W),Vt.removeEventListener("refresh",W),C.kill()},t.lockAxis=t.lockAxis!==!1,a=new Ne(t),a.iOS=br,br&&!u()&&u(1),br&&kt.ticker.add(Ii),K=a._dc,N=kt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Rm(u,u(),function(){return N.pause()})},onUpdate:Zi,onComplete:K.vars.onComplete}),a};Vt.sort=function(r){return ue.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};Vt.observe=function(r){return new Ne(r)};Vt.normalizeScroll=function(r){if(typeof r>"u")return bn;if(r===!0&&bn)return bn.enable();if(r===!1){bn&&bn.kill(),bn=r;return}var t=r instanceof Ne?r:jy(r);return bn&&bn.target===t.target&&bn.kill(),ms(t.target)&&(bn=t),t};Vt.core={_getVelocityProp:wl,_inputObserver:Pm,_scrollers:ce,_proxies:fi,bridge:{ss:function(){jn||_s("scrollStart"),jn=dn()},ref:function(){return fn}}};vm()&&kt.registerPlugin(Vt);Tt.registerPlugin(Vt,ui);var Im=()=>{Tt.matchMedia().add("(min-width: 992px)",()=>{let t=document.querySelector(".casestudies-heading-section");t&&Tt.to(t,{ease:"none",scrollTrigger:{trigger:t,start:"top top",endTrigger:".casestudies-wrapper",end:"bottom bottom",pin:!0,pinSpacing:!1,scrub:!0,anticipatePin:1}})})};var Lm=()=>{document.querySelectorAll(".client-list_wrapper").forEach(r=>{let t=r.querySelector(".client-list_wrap");if(!t)return;let e=Array.from(t.children),n=t.scrollWidth;e.forEach(i=>{let s=i.cloneNode(!0);s.style.width=`${i.offsetWidth}px`,t.appendChild(s)}),t.style.width=`${n*2}px`,Tt.fromTo(t,{x:0},{x:-n,duration:60,ease:"linear",repeat:-1,force3D:!0})})};var Fm=()=>{let r=document.querySelectorAll("[data-contact-popup-toggler]"),t=document.querySelector("[data-contact-popup]");var e=0;if(!r||!t)return;let n=t.querySelector("[data-contact-popup-close]");if(!n)return;let i=t.querySelector(".contact-popup_box");if(!i)return;let s=(o,a)=>{let l=document.createElement("script"),c=document.getElementsByTagName("script")[0];l.async=1,l.onload=l.onreadystatechange=(h,f)=>{(f||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,f||a&&a())},l.src=o,c.parentNode.insertBefore(l,c)};r.forEach(o=>{o.addEventListener("click",a=>{a.preventDefault,e?(t.classList.add("-open"),document.body.classList.add("-popup-open")):s("https://embed.typeform.com/next/embed.js",()=>{e=1,t.classList.add("-open"),document.body.classList.add("-popup-open")})})}),n.addEventListener("click",o=>{o.preventDefault,t.classList.remove("-open"),document.body.classList.remove("-popup-open")}),t.addEventListener("click",o=>{i.contains(o.target)||(t.classList.remove("-open"),document.body.classList.remove("-popup-open"))}),new URL(document.location).searchParams.has("invicible")&&setTimeout(()=>{s("https://embed.typeform.com/next/embed.js",()=>{e=1,setTimeout(()=>{t.classList.add("-open"),document.body.classList.add("-popup-open")},200)})},2e3)};var Nm=()=>{let r=new Date().toLocaleTimeString("pl-PL",{timeZone:"Poland"}).split(":");return r[0]+" - "+r[1]},Um=()=>{let r=document.querySelectorAll("[data-current-time]");r.length>0&&r.forEach(t=>{t.textContent=Nm(),setInterval(()=>{t.textContent=Nm()},5e3)})};var Qy=/(?:^\s+|\s+$)/g,Th=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function oo(r){var t=r.nodeType,e="";if(t===1||t===9||t===11){if(typeof r.textContent=="string")return r.textContent;for(r=r.firstChild;r;r=r.nextSibling)e+=oo(r)}else if(t===3||t===4)return r.nodeValue;return e}function pi(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(Qy,"")),t&&t!=="")return r.replace(/>/g,"&gt;").replace(/</g,"&lt;").split(t);for(var i=[],s=r.length,o=0,a,l;o<s;o++)l=r.charAt(o),(l.charCodeAt(0)>=55296&&l.charCodeAt(0)<=56319||r.charCodeAt(o+1)>=65024&&r.charCodeAt(o+1)<=65039)&&(a=((r.substr(o,12).split(Th)||[])[1]||"").length||2,l=r.substr(o,a),i.emoji=1,o+=a-1),i.push(l===">"?"&gt;":l==="<"?"&lt;":n&&l===" "&&(r.charAt(o-1)===" "||r.charAt(o+1)===" ")?"&nbsp;":l);return i}var ao,Ch,km,Ea,zm,Xl,tv=/(?:\r|\n|\t\t)/g,ev=/(?:\s\s+)/g,nv="\xA0",Vm=function(t){ao=document,Ch=window,Ea=Ea||t||Ch.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),Ea&&(Xl=Ea.utils.toArray,zm=Ea.core.context||function(){},km=1)},iv=1,Hm=function(t){return Ch.getComputedStyle(t)},Dh=function(t){return t.position==="absolute"||t.absolute===!0},rv=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},sv=" style='position:relative;display:inline-block;'",Om=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+sv+(t?" class='"+t+(n?i++:"")+"'>":">")}},Gm=function r(t,e,n){var i=t.nodeType;if(i===1||i===9||i===11)for(t=t.firstChild;t;t=t.nextSibling)r(t,e,n);else(i===3||i===4)&&(t.nodeValue=t.nodeValue.split(e).join(n))},Ah=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},Bm=function(t,e,n){for(var i;t&&t!==e;){if(i=t._next||t.nextSibling,i)return i.textContent.charAt(0)===n;t=t.parentNode||t._parent}},ov=function r(t){var e=Xl(t.childNodes),n=e.length,i,s;for(i=0;i<n;i++)s=e[i],s._isSplit?r(s):i&&s.previousSibling&&s.previousSibling.nodeType===3?(s.previousSibling.nodeValue+=s.nodeType===3?s.nodeValue:s.firstChild.nodeValue,t.removeChild(s)):s.nodeType!==3&&(t.insertBefore(s.firstChild,s),t.removeChild(s))},Fi=function(t,e){return parseFloat(e[t])||0},av=function(t,e,n,i,s,o,a){var l=Hm(t),c=Fi("paddingLeft",l),h=-999,f=Fi("borderBottomWidth",l)+Fi("borderTopWidth",l),d=Fi("borderLeftWidth",l)+Fi("borderRightWidth",l),u=Fi("paddingTop",l)+Fi("paddingBottom",l),_=Fi("paddingLeft",l)+Fi("paddingRight",l),p=Fi("fontSize",l)*(e.lineThreshold||.2),m=l.textAlign,g=[],b=[],v=[],S=e.wordDelimiter||" ",C=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",w=s&&~T.indexOf("lines")?[]:null,P=~T.indexOf("words"),M=~T.indexOf("chars"),y=Dh(e),I=e.linesClass,N=~(I||"").indexOf("++"),D=[],V=l.display==="flex",K=t.style.display,W,Z,z,U,R,lt,xt,Bt,X,at,yt,ut;for(N&&(I=I.split("++").join("")),V&&(t.style.display="block"),Z=t.getElementsByTagName("*"),z=Z.length,R=[],W=0;W<z;W++)R[W]=Z[W];if(w||y)for(W=0;W<z;W++)U=R[W],lt=U.parentNode===t,(lt||y||M&&!P)&&(ut=U.offsetTop,w&&lt&&Math.abs(ut-h)>p&&(U.nodeName!=="BR"||W===0)&&(xt=[],w.push(xt),h=ut),y&&(U._x=U.offsetLeft,U._y=ut,U._w=U.offsetWidth,U._h=U.offsetHeight),w&&((U._isSplit&&lt||!M&&lt||P&&lt||!P&&U.parentNode.parentNode===t&&!U.parentNode._isSplit)&&(xt.push(U),U._x-=c,Bm(U,t,S)&&(U._wordEnd=!0)),U.nodeName==="BR"&&(U.nextSibling&&U.nextSibling.nodeName==="BR"||W===0)&&w.push([])));for(W=0;W<z;W++){if(U=R[W],lt=U.parentNode===t,U.nodeName==="BR"){w||y?(U.parentNode&&U.parentNode.removeChild(U),R.splice(W--,1),z--):P||t.appendChild(U);continue}if(y&&(X=U.style,!P&&!lt&&(U._x+=U.parentNode._x,U._y+=U.parentNode._y),X.left=U._x+"px",X.top=U._y+"px",X.position="absolute",X.display="block",X.width=U._w+1+"px",X.height=U._h+"px"),!P&&M)if(U._isSplit)for(U._next=Z=U.nextSibling,U.parentNode.appendChild(U);Z&&Z.nodeType===3&&Z.textContent===" ";)U._next=Z.nextSibling,U.parentNode.appendChild(Z),Z=Z.nextSibling;else U.parentNode._isSplit?(U._parent=U.parentNode,!U.previousSibling&&U.firstChild&&(U.firstChild._isFirst=!0),U.nextSibling&&U.nextSibling.textContent===" "&&!U.nextSibling.nextSibling&&D.push(U.nextSibling),U._next=U.nextSibling&&U.nextSibling._isFirst?null:U.nextSibling,U.parentNode.removeChild(U),R.splice(W--,1),z--):lt||(ut=!U.nextSibling&&Bm(U.parentNode,t,S),U.parentNode._parent&&U.parentNode._parent.appendChild(U),ut&&U.parentNode.appendChild(ao.createTextNode(" ")),C==="span"&&(U.style.display="inline"),g.push(U));else U.parentNode._isSplit&&!U._isSplit&&U.innerHTML!==""?b.push(U):M&&!U._isSplit&&(C==="span"&&(U.style.display="inline"),g.push(U))}for(W=D.length;--W>-1;)D[W].parentNode.removeChild(D[W]);if(w){for(y&&(at=ao.createElement(C),t.appendChild(at),yt=at.offsetWidth+"px",ut=at.offsetParent===t?0:t.offsetLeft,t.removeChild(at)),X=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Bt=S===" "&&(!y||!P&&!M),W=0;W<w.length;W++){for(xt=w[W],at=ao.createElement(C),at.style.cssText="display:block;text-align:"+m+";position:"+(y?"absolute;":"relative;"),I&&(at.className=I+(N?W+1:"")),v.push(at),z=xt.length,Z=0;Z<z;Z++)xt[Z].nodeName!=="BR"&&(U=xt[Z],at.appendChild(U),Bt&&U._wordEnd&&at.appendChild(ao.createTextNode(" ")),y&&(Z===0&&(at.style.top=U._y+"px",at.style.left=c+ut+"px"),U.style.top="0px",ut&&(U.style.left=U._x-ut+"px")));z===0?at.innerHTML="&nbsp;":!P&&!M&&(ov(at),Gm(at,"\xA0"," ")),y&&(at.style.width=yt,at.style.height=U._h+"px"),t.appendChild(at)}t.style.cssText=X}y&&(a>t.clientHeight&&(t.style.height=a-u+"px",t.clientHeight<a&&(t.style.height=a+f+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+d+"px"))),V&&(K?t.style.display=K:t.style.removeProperty("display")),Ah(n,g),P&&Ah(i,b),Ah(s,v)},lv=function(t,e,n,i){var s=e.tag?e.tag:e.span?"span":"div",o=e.type||e.split||"chars,words,lines",a=~o.indexOf("chars"),l=Dh(e),c=e.wordDelimiter||" ",h=function(y){return y===c||y===nv&&c===" "},f=c!==" "?"":l?"&#173; ":" ",d="</"+s+">",u=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:rv:null,p,m,g,b,v,S,C,T,w=ao.createElement("div"),P=t.parentNode;for(P.insertBefore(w,t),w.textContent=t.nodeValue,P.removeChild(t),t=w,p=oo(t),C=p.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(p=p.replace(ev," ").replace(tv,"")),C&&(p=p.split("<").join("{{LT}}")),v=p.length,m=(p.charAt(0)===" "?f:"")+n(),g=0;g<v;g++)if(S=p.charAt(g),_&&(T=_(p.substr(g),e.specialChars)))S=p.substr(g,T||1),m+=a&&S!==" "?i()+S+"</"+s+">":S,g+=T-1;else if(h(S)&&!h(p.charAt(g-1))&&g){for(m+=u?d:"",u=0;h(p.charAt(g+1));)m+=f,g++;g===v-1?m+=f:p.charAt(g+1)!==")"&&(m+=f+n(),u=1)}else S==="{"&&p.substr(g,6)==="{{LT}}"?(m+=a?i()+"{{LT}}</"+s+">":"{{LT}}",g+=5):S.charCodeAt(0)>=55296&&S.charCodeAt(0)<=56319||p.charCodeAt(g+1)>=65024&&p.charCodeAt(g+1)<=65039?(b=((p.substr(g,12).split(Th)||[])[1]||"").length||2,m+=a&&S!==" "?i()+p.substr(g,b)+"</"+s+">":p.substr(g,b),g+=b-1):m+=a&&S!==" "?i()+S+"</"+s+">":S;t.outerHTML=m+(u?d:""),C&&Gm(P,"{{LT}}","<")},cv=function r(t,e,n,i){var s=Xl(t.childNodes),o=s.length,a=Dh(e),l,c;if(t.nodeType!==3||o>1){for(e.absolute=!1,l=0;l<o;l++)c=s[l],c._next=c._isFirst=c._parent=c._wordEnd=null,(c.nodeType!==3||/\S+/.test(c.nodeValue))&&(a&&c.nodeType!==3&&Hm(c).display==="inline"&&(c.style.display="inline-block",c.style.position="relative"),c._isSplit=!0,r(c,e,n,i));e.absolute=a,t._isSplit=!0;return}lv(t,e,n,i)},Qn=function(){function r(e,n){km||Vm(),this.elements=Xl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},zm(this),iv&&this.split(n)}var t=r.prototype;return t.split=function(n){this.isSplit&&this.revert(),this.vars=n=n||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var i=this.elements.length,s=n.tag?n.tag:n.span?"span":"div",o=Om(n.wordsClass,s),a=Om(n.charsClass,s),l,c,h;--i>-1;)h=this.elements[i],this._originals[i]={html:h.innerHTML,style:h.getAttribute("style")},l=h.clientHeight,c=h.clientWidth,cv(h,n,o,a),av(h,n,this.chars,this.words,this.lines,c,l);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},t.revert=function(){var n=this._originals;if(!n)throw"revert() call wasn't scoped properly.";return this.elements.forEach(function(i,s){i.innerHTML=n[s].html,i.setAttribute("style",n[s].style)}),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.create=function(n,i){return new r(n,i)},r}();Qn.version="3.12.5";Qn.register=Vm;var Wm=()=>{Tt.registerPlugin(Vt,Qn),document.querySelectorAll("[data-header-animation]").forEach(t=>{let e=t.querySelector("h2");if(e.classList.contains("is-all-strong")&&(e=e.querySelector("strong")),!e)return;let n=new Qn(e,{type:"lines",tag:"span"}),i=new Qn(e,{type:"lines",linesClass:"header_line"});n.lines=i.chars.concat(n.lines);let s=Tt.timeline({scrollTrigger:{trigger:t,start:"top bottom",toggleActions:"play none none reset"}});s.fromTo(n.lines,{y:100},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"+=0.25");let o=t.querySelector(".hero_holo");o&&s.fromTo(o,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25");let a=t.querySelector(".button");a&&s.fromTo(a,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"-=0.75")})};var Xm=()=>{if(Tt.registerPlugin(Vt,Qn),document.querySelector(".hero_grid")){let r=document.querySelector(".hero_grid"),t=r.querySelector(".hero_holo"),e=r.querySelector("h1"),n=r.querySelector(".paragraph-big"),i=new Qn(e,{type:"lines",tag:"span"}),s=new Qn(e,{type:"lines",linesClass:"header_line"});i.lines=s.chars.concat(i.lines),Tt.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(n,{autoAlpha:0},{autoAlpha:1,duration:.35,ease:"circ.out"},"+=1.75").fromTo(i.lines,{y:"100%"},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"-=0.25").fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25")}};var Ym=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||Tt.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){Tt.to(r,{y:"-100dvh",duration:.75})}},"<")};var qm=()=>{Tt.registerPlugin(Vt,Qn);let r=document.querySelector(".mastery_wrapper"),t=document.getElementById("mastery-border"),e=document.getElementById("mastery-border-small"),n=document.getElementById("mastery-sticker"),i=document.querySelector(".mastery_p");Tt.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(i,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+=0.25").to(t,{y:"0.75rem",x:"-0.75rem",duration:.75,ease:"circ.out"},"1.5").to(e,{x:"-0.75rem",y:"0.75rem",duration:.75,ease:"circ.out"},"1.5").to(n,{opacity:1,duration:.5,ease:"power1.inOut"},"1.5").to(n,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(n,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(n,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"})};Tt.registerPlugin(Vt);var Zm=()=>{let r="ontouchstart"in window,t=document.querySelector(".projects_faq");if(!t)return;let e=t.querySelectorAll(".projects_item");e.forEach((n,i)=>{uv(t,e,n,i),hv(n),fv(n,t),window.innerWidth>768&&!r&&dv(n)})};function uv(r,t,e,n){let i=t.length*.25;if(Tt.timeline({scrollTrigger:{trigger:r,start:"top center",scrub:!1}}).fromTo(e,{duration:1,opacity:0,y:100},{opacity:1,y:0,duration:.75,delay:n*.25},"<"),n===0){let s=e.querySelector(".projects_item_content").offsetHeight,o=r.offsetHeight;r.style.height=`${o+s}px`,Tt.timeline({scrollTrigger:{trigger:r,start:"top center",scrub:!1}}).to(e,{delay:i,onComplete:function(){let a=e.querySelector(".projects_item_header"),l=e.querySelector(".projects_item_content");!a||!l||(e.classList.add("-open"),a.setAttribute("aria-expanded","true"),l.setAttribute("aria-hidden","false"),setTimeout(()=>{Vt.refresh()},500))}},"<")}}function hv(r){let t=r.querySelector(".projects_item_header"),e=r.querySelector(".projects_item_content");!t||!e||(t.setAttribute("tabindex","0"),t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true"))}function fv(r,t){let e=r.querySelector(".projects_item_header");e&&(e.addEventListener("click",()=>{[...t.querySelectorAll(".projects_item_header")].forEach(i=>{let s=i.parentNode.querySelector(".projects_item_content");if(t.style.height="auto",i!==e)i.parentNode.classList.remove("-open"),i.setAttribute("aria-expanded",!1),s.setAttribute("aria-hidden",!0);else{let o=e.getAttribute("aria-expanded")!=="false";i.setAttribute("aria-expanded",!o),s.setAttribute("aria-hidden",o),i.parentNode.classList.toggle("-open")}if(!i.classList.contains("-open")){let o=i.parentNode.parentNode.querySelector(".projects_item_logo");o&&Tt.to(o,{duration:.7,opacity:0,visibility:"hidden"})}}),setTimeout(()=>{Vt.refresh()},500)}),e.addEventListener("keyup",function(n){n.preventDefault(),n.keyCode===13&&e.click()}))}function dv(r){let t=r.parentNode.querySelector(".projects_item_logo");t&&window.addEventListener("mousemove",e=>{let n=e.clientX,i=e.clientY,s=document.querySelector(".smooth-container"),o=window.getComputedStyle(s),a=new WebKitCSSMatrix(o.transform);if(r.contains(e.target)&&r.classList.contains("-open")){let l=r.querySelector(".projects_item_header");Tt.to(t,{x:n+10,y:i+10+a.f*-1,duration:.7,ease:"power4",opacity:1,visibility:"visible",scale:l.contains(e.target)?.8:1})}else Tt.to(t,{duration:.7,opacity:0})})}var Yl=function(){function r(e){this.chars=pi(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=Jm(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=Jm(n-this.length,this.chars);this.length=n},r}(),xs,Qm,tg=function(){return xs||typeof window<"u"&&(xs=window.gsap)&&xs.registerPlugin&&xs},pv=1,$m=/\s+/g,Jm=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Km=Rh.toLowerCase(),mv={upperCase:new Yl(Rh),lowerCase:new Yl(Km),upperAndLowerCase:new Yl(Rh+Km)},jm=function(){Qm=xs=tg()},Ta={version:"3.12.5",name:"scrambleText",register:function(t,e,n){xs=t,jm()},init:function(t,e,n,i,s){if(Qm||jm(),this.prop="innerHTML"in t?"innerHTML":"textContent"in t?"textContent":0,!!this.prop){this.target=t,typeof e!="object"&&(e={text:e});var o=e.text||e.value||"",a=e.trim!==!1,l=this,c,h,f,d;return l.delimiter=c=e.delimiter||"",l.original=pi(oo(t).replace($m," ").split("&nbsp;").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=pi((o||"").replace($m," "),c,a),l.hasClass=!!(e.newClass||e.oldClass),l.newClass=e.newClass,l.oldClass=e.oldClass,d=c==="",l.textHasEmoji=d&&!!l.text.emoji,l.charsHaveEmoji=!!e.chars&&!!pi(e.chars).emoji,l.length=d?l.original.length:l.original.join(c).length,l.lengthDif=(d?l.text.length:l.text.join(c).length)-l.length,l.fillChar=e.fillChar||e.chars&&~e.chars.indexOf(" ")?"&nbsp;":"",l.charSet=f=mv[e.chars||"upperCase"]||new Yl(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,h=l.length+Math.max(l.lengthDif,0),h>f.length&&f.grow(h),l.chars=f.sets[l.setIndex],l.revealDelay=e.revealDelay||0,l.tweenLength=e.tweenLength!==!1,l.tween=n,l.rightToLeft=!!e.rightToLeft,l._props.push("scrambleText","text"),pv}},render:function(t,e){var n=e.target,i=e.prop,s=e.text,o=e.delimiter,a=e.tween,l=e.prevScrambleTime,c=e.revealDelay,h=e.setIndex,f=e.chars,d=e.charSet,u=e.length,_=e.textHasEmoji,p=e.charsHaveEmoji,m=e.lengthDif,g=e.tweenLength,b=e.oldClass,v=e.newClass,S=e.rightToLeft,C=e.fillChar,T=e.speed,w=e.original,P=e.hasClass,M=s.length,y=a._time,I=y-l,N,D,V,K,W,Z,z,U,R,lt,xt;c&&(a._from&&(y=a._dur-y),t=y===0?0:y<c?1e-6:y===a._dur?1:a._ease((y-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),S&&(t=1-t),N=~~(t*M+.5),t?((I>T||I<-T)&&(e.setIndex=h=(h+(Math.random()*19|0))%20,e.chars=d.sets[h],e.prevScrambleTime+=I),K=f):K=w.join(o),xt=a._from?t:1-t,lt=u+(g?a._from?xt*xt*xt:1-xt*xt*xt:1)*m,S?t===1&&(a._from||a.data==="isFromStart")?(V="",K=w.join(o)):(z=s.slice(N).join(o),p?V=pi(K).slice(0,lt-(_?pi(z):z).length+.5|0).join(""):V=K.substr(0,lt-(_?pi(z):z).length+.5|0),K=z):(V=s.slice(0,N).join(o),D=(_?pi(V):V).length,p?K=pi(K).slice(D,lt+.5|0).join(""):K=K.substr(D,lt-D+.5|0)),P?(U=S?b:v,R=S?v:b,W=U&&N!==0,Z=R&&N!==M,z=(W?"<span class='"+U+"'>":"")+V+(W?"</span>":"")+(Z?"<span class='"+R+"'>":"")+o+K+(Z?"</span>":"")):z=V+o+K,n[i]=C==="&nbsp;"&&~z.indexOf(" ")?z.split(" ").join("&nbsp;&nbsp;"):z}};Ta.emojiSafeSplit=pi;Ta.getText=oo;tg()&&xs.registerPlugin(Ta);Tt.registerPlugin(Ta);var eg=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{Tt.matchMedia().add("(min-width: 768px)",()=>{Tt.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};Tt.registerPlugin(ui,Vt);var ng=()=>{Tt.registerPlugin(ui),ui.create({smooth:1.5,effects:!0}),Vt.refresh()};var $i,ys,Fh,$l,Aa,ql,Zl,Ca,mi="transform",Lh=mi+"Origin",ig,rg=function(t){var e=t.ownerDocument||t;for(!(mi in t.style)&&("msTransform"in t.style)&&(mi="msTransform",Lh=mi+"Origin");e.parentNode&&(e=e.parentNode););if(ys=window,Zl=new wr,e){$i=e,Fh=e.documentElement,$l=e.body,Ca=$i.createElementNS("http://www.w3.org/2000/svg","g"),Ca.style.transform="none";var n=e.createElement("div"),i=e.createElement("div"),s=e&&(e.body||e.firstElementChild);s&&s.appendChild&&(s.appendChild(n),n.appendChild(i),n.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),ig=i.offsetParent!==n,s.removeChild(n))}return e},gv=function(t){for(var e,n;t&&t!==$l;)n=t._gsap,n&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e},sg=[],og=[],_v=function(){return ys.pageYOffset||$i.scrollTop||Fh.scrollTop||$l.scrollTop||0},xv=function(){return ys.pageXOffset||$i.scrollLeft||Fh.scrollLeft||$l.scrollLeft||0},Nh=function(t){return t.ownerSVGElement||((t.tagName+"").toLowerCase()==="svg"?t:null)},yv=function r(t){if(ys.getComputedStyle(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},Ph=function r(t,e){if(t.parentNode&&($i||rg(t))){var n=Nh(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s=n?e?"rect":"g":"div",o=e!==2?0:100,a=e===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",c=$i.createElementNS?$i.createElementNS(i.replace(/^https/,"http"),s):$i.createElement(s);return e&&(n?(ql||(ql=r(t)),c.setAttribute("width",.01),c.setAttribute("height",.01),c.setAttribute("transform","translate("+o+","+a+")"),ql.appendChild(c)):(Aa||(Aa=r(t),Aa.style.cssText=l),c.style.cssText=l+"width:0.1px;height:0.1px;top:"+a+"px;left:"+o+"px",Aa.appendChild(c))),c}throw"Need document and parent."},vv=function(t){for(var e=new wr,n=0;n<t.numberOfItems;n++)e.multiply(t.getItem(n).matrix);return e},Sv=function(t){var e=t.getCTM(),n;return e||(n=t.style[mi],t.style[mi]="none",t.appendChild(Ca),e=Ca.getCTM(),t.removeChild(Ca),n?t.style[mi]=n:t.style.removeProperty(mi.replace(/([A-Z])/g,"-$1").toLowerCase())),e||Zl.clone()},Mv=function(t,e){var n=Nh(t),i=t===n,s=n?sg:og,o=t.parentNode,a,l,c,h,f,d;if(t===ys)return t;if(s.length||s.push(Ph(t,1),Ph(t,2),Ph(t,3)),a=n?ql:Aa,n)i?(c=Sv(t),h=-c.e/c.a,f=-c.f/c.d,l=Zl):t.getBBox?(c=t.getBBox(),l=t.transform?t.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?vv(l):l.getItem(0).matrix:Zl,h=l.a*c.x+l.c*c.y,f=l.b*c.x+l.d*c.y):(l=new wr,h=f=0),e&&t.tagName.toLowerCase()==="g"&&(h=f=0),(i?n:o).appendChild(a),a.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+h)+","+(l.f+f)+")");else{if(h=f=0,ig)for(l=t.offsetParent,c=t;c&&(c=c.parentNode)&&c!==l&&c.parentNode;)(ys.getComputedStyle(c)[mi]+"").length>4&&(h=c.offsetLeft,f=c.offsetTop,c=0);if(d=ys.getComputedStyle(t),d.position!=="absolute"&&d.position!=="fixed")for(l=t.offsetParent;o&&o!==l;)h+=o.scrollLeft||0,f+=o.scrollTop||0,o=o.parentNode;c=a.style,c.top=t.offsetTop-f+"px",c.left=t.offsetLeft-h+"px",c[mi]=d[mi],c[Lh]=d[Lh],c.position=d.position==="fixed"?"fixed":"absolute",t.parentNode.appendChild(a)}return a},Ih=function(t,e,n,i,s,o,a){return t.a=e,t.b=n,t.c=i,t.d=s,t.e=o,t.f=a,t},wr=function(){function r(e,n,i,s,o,a){e===void 0&&(e=1),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=1),o===void 0&&(o=0),a===void 0&&(a=0),Ih(this,e,n,i,s,o,a)}var t=r.prototype;return t.inverse=function(){var n=this.a,i=this.b,s=this.c,o=this.d,a=this.e,l=this.f,c=n*o-i*s||1e-10;return Ih(this,o/c,-i/c,-s/c,n/c,(s*l-o*a)/c,-(n*l-i*a)/c)},t.multiply=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f,h=n.a,f=n.c,d=n.b,u=n.d,_=n.e,p=n.f;return Ih(this,h*i+d*o,h*s+d*a,f*i+u*o,f*s+u*a,l+_*i+p*o,c+_*s+p*a)},t.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f;return i===n.a&&s===n.b&&o===n.c&&a===n.d&&l===n.e&&c===n.f},t.apply=function(n,i){i===void 0&&(i={});var s=n.x,o=n.y,a=this.a,l=this.b,c=this.c,h=this.d,f=this.e,d=this.f;return i.x=s*a+o*c+f||0,i.y=s*l+o*h+d||0,i},r}();function Er(r,t,e,n){if(!r||!r.parentNode||($i||rg(r)).documentElement===r)return new wr;var i=gv(r),s=Nh(r),o=s?sg:og,a=Mv(r,e),l=o[0].getBoundingClientRect(),c=o[1].getBoundingClientRect(),h=o[2].getBoundingClientRect(),f=a.parentNode,d=!n&&yv(r),u=new wr((c.left-l.left)/100,(c.top-l.top)/100,(h.left-l.left)/100,(h.top-l.top)/100,l.left+(d?0:xv()),l.top+(d?0:_v()));if(f.removeChild(a),i)for(l=i.length;l--;)c=i[l],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?u.inverse():u}function ag(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function bv(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var me,we,Hn,xi,ji,Uh,Ki,Vh,Ra,Dr,xg,Hh,Na,Yh,Pa,gi,Ia,jl,yg,Gh,tc=0,vg=function(){return typeof window<"u"},Sg=function(){return me||vg()&&(me=window.gsap)&&me.registerPlugin&&me},Cr=function(t){return typeof t=="function"},La=function(t){return typeof t=="object"},_i=function(t){return typeof t>"u"},Ql=function(){return!1},Fa="transform",Wh="transformOrigin",Tr=function(t){return Math.round(t*1e4)/1e4},Da=Array.isArray,Jl=function(t,e){var n=Hn.createElementNS?Hn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hn.createElement(t);return n.style?n:Hn.createElement(t)},lg=180/Math.PI,vs=1e20,wv=new wr,Ar=Date.now||function(){return new Date().getTime()},Ms=[],uo={},Ev=0,Tv=/^(?:a|input|textarea|button|select)$/i,cg=0,lo={},Ji={},Mg=function(t,e){var n={},i;for(i in t)n[i]=e?t[i]*e:t[i];return n},Av=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},ug=function r(t,e){for(var n=t.length,i;n--;)e?t[n].style.touchAction=e:t[n].style.removeProperty("touch-action"),i=t[n].children,i&&i.length&&r(i,e)},bg=function(){return Ms.forEach(function(t){return t()})},Cv=function(t){Ms.push(t),Ms.length===1&&me.ticker.add(bg)},hg=function(){return!Ms.length&&me.ticker.remove(bg)},fg=function(t){for(var e=Ms.length;e--;)Ms[e]===t&&Ms.splice(e,1);me.to(hg,{overwrite:!0,delay:15,duration:0,onComplete:hg,data:"_draggable"})},Dv=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Ye=function(t,e,n,i){if(t.addEventListener){var s=Na[e];i=i||(xg?{passive:!1}:null),t.addEventListener(s||e,n,i),s&&e!==s&&t.addEventListener(e,n,i)}},He=function(t,e,n,i){if(t.removeEventListener){var s=Na[e];t.removeEventListener(s||e,n,i),s&&e!==s&&t.removeEventListener(e,n,i)}},ti=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},Rv=function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0},Pv=function r(t){Yh=t.touches&&tc<t.touches.length,He(t.target,"touchend",r)},dg=function(t){Yh=t.touches&&tc<t.touches.length,Ye(t.target,"touchend",Pv)},ho=function(t){return we.pageYOffset||t.scrollTop||t.documentElement.scrollTop||t.body.scrollTop||0},fo=function(t){return we.pageXOffset||t.scrollLeft||t.documentElement.scrollLeft||t.body.scrollLeft||0},pg=function r(t,e){Ye(t,"scroll",e),po(t.parentNode)||r(t.parentNode,e)},mg=function r(t,e){He(t,"scroll",e),po(t.parentNode)||r(t.parentNode,e)},po=function(t){return!t||t===xi||t.nodeType===9||t===Hn.body||t===we||!t.nodeType||!t.parentNode},gg=function(t,e){var n=e==="x"?"Width":"Height",i="scroll"+n,s="client"+n;return Math.max(0,po(t)?Math.max(xi[i],ji[i])-(we["inner"+n]||xi[s]||ji[s]):t[i]-t[s])},Oh=function r(t,e){var n=gg(t,"x"),i=gg(t,"y");po(t)?t=Ji:r(t.parentNode,e),t._gsMaxScrollX=n,t._gsMaxScrollY=i,e||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},Bh=function(t,e,n){var i=t.style;i&&(_i(i[e])&&(e=Ra(e,t)||e),n==null?i.removeProperty&&i.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):i[e]=n)},Ua=function(t){return we.getComputedStyle(t instanceof Element?t:t.host||(t.parentNode||{}).host||t)},Ss={},co=function(t){if(t===we)return Ss.left=Ss.top=0,Ss.width=Ss.right=xi.clientWidth||t.innerWidth||ji.clientWidth||0,Ss.height=Ss.bottom=(t.innerHeight||0)-20<xi.clientHeight?xi.clientHeight:t.innerHeight||ji.clientHeight||0,Ss;var e=t.ownerDocument||Hn,n=_i(t.pageX)?!t.nodeType&&!_i(t.left)&&!_i(t.top)?t:Dr(t)[0].getBoundingClientRect():{left:t.pageX-fo(e),top:t.pageY-ho(e),right:t.pageX-fo(e)+1,bottom:t.pageY-ho(e)+1};return _i(n.right)&&!_i(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):_i(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},Oe=function(t,e,n){var i=t.vars,s=i[n],o=t._listeners[e],a;return Cr(s)&&(a=s.apply(i.callbackScope||t,i[n+"Params"]||[t.pointerEvent])),o&&t.dispatchEvent(e)===!1&&(a=!1),a},_g=function(t,e){var n=Dr(t)[0],i,s,o;return!n.nodeType&&n!==we?_i(t.left)?(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i}):(o={x:0,y:0},{left:t.left-o.x,top:t.top-o.y,width:t.width,height:t.height}):Iv(n,e)},ei={},Iv=function(t,e){e=Dr(e)[0];var n=t.getBBox&&t.ownerSVGElement,i=t.ownerDocument||Hn,s,o,a,l,c,h,f,d,u,_,p,m,g;if(t===we)a=ho(i),s=fo(i),o=s+(i.documentElement.clientWidth||t.innerWidth||i.body.clientWidth||0),l=a+((t.innerHeight||0)-20<i.documentElement.clientHeight?i.documentElement.clientHeight:t.innerHeight||i.body.clientHeight||0);else{if(e===we||_i(e))return t.getBoundingClientRect();s=a=0,n?(_=t.getBBox(),p=_.width,m=_.height):(t.viewBox&&(_=t.viewBox.baseVal)&&(s=_.x||0,a=_.y||0,p=_.width,m=_.height),p||(g=Ua(t),_=g.boxSizing==="border-box",p=(parseFloat(g.width)||t.clientWidth||0)+(_?0:parseFloat(g.borderLeftWidth)+parseFloat(g.borderRightWidth)),m=(parseFloat(g.height)||t.clientHeight||0)+(_?0:parseFloat(g.borderTopWidth)+parseFloat(g.borderBottomWidth)))),o=p,l=m}return t===e?{left:s,top:a,width:o-s,height:l-a}:(c=Er(e,!0).multiply(Er(t)),h=c.apply({x:s,y:a}),f=c.apply({x:o,y:a}),d=c.apply({x:o,y:l}),u=c.apply({x:s,y:l}),s=Math.min(h.x,f.x,d.x,u.x),a=Math.min(h.y,f.y,d.y,u.y),{left:s,top:a,width:Math.max(h.x,f.x,d.x,u.x)-s,height:Math.max(h.y,f.y,d.y,u.y)-a})},kh=function(t,e,n,i,s,o){var a={},l,c,h;if(e)if(s!==1&&e instanceof Array){if(a.end=l=[],h=e.length,La(e[0]))for(c=0;c<h;c++)l[c]=Mg(e[c],s);else for(c=0;c<h;c++)l[c]=e[c]*s;n+=1.1,i-=1.1}else Cr(e)?a.end=function(f){var d=e.call(t,f),u,_;if(s!==1)if(La(d)){u={};for(_ in d)u[_]=d[_]*s;d=u}else d*=s;return d}:a.end=e;return(n||n===0)&&(a.max=n),(i||i===0)&&(a.min=i),o&&(a.velocity=0),a},Lv=function r(t){var e;return!t||!t.getAttribute||t===ji?!1:(e=t.getAttribute("data-clickable"))==="true"||e!=="false"&&(Tv.test(t.nodeName+"")||t.getAttribute("contentEditable")==="true")?!0:r(t.parentNode)},Kl=function(t,e){for(var n=t.length,i;n--;)i=t[n],i.ondragstart=i.onselectstart=e?null:Ql,me.set(i,{lazy:!0,userSelect:e?"text":"none"})},Fv=function r(t){if(Ua(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},wg,Xh,Nv=function(t,e){t=me.utils.toArray(t)[0],e=e||{};var n=document.createElement("div"),i=n.style,s=t.firstChild,o=0,a=0,l=t.scrollTop,c=t.scrollLeft,h=t.scrollWidth,f=t.scrollHeight,d=0,u=0,_=0,p,m,g,b,v,S;wg&&e.force3D!==!1?(v="translate3d(",S="px,0px)"):Fa&&(v="translate(",S="px)"),this.scrollTop=function(C,T){if(!arguments.length)return-this.top();this.top(-C,T)},this.scrollLeft=function(C,T){if(!arguments.length)return-this.left();this.left(-C,T)},this.left=function(C,T){if(!arguments.length)return-(t.scrollLeft+a);var w=t.scrollLeft-c,P=a;if((w>2||w<-2)&&!T){c=t.scrollLeft,me.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-c),e.onKill&&e.onKill();return}C=-C,C<0?(a=C-.5|0,C=0):C>u?(a=C-u|0,C=u):a=0,(a||P)&&(this._skip||(i[Fa]=v+-a+"px,"+-o+S),a+d>=0&&(i.paddingRight=a+d+"px")),t.scrollLeft=C|0,c=t.scrollLeft},this.top=function(C,T){if(!arguments.length)return-(t.scrollTop+o);var w=t.scrollTop-l,P=o;if((w>2||w<-2)&&!T){l=t.scrollTop,me.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),e.onKill&&e.onKill();return}C=-C,C<0?(o=C-.5|0,C=0):C>_?(o=C-_|0,C=_):o=0,(o||P)&&(this._skip||(i[Fa]=v+-a+"px,"+-o+S)),t.scrollTop=C|0,l=t.scrollTop},this.maxScrollTop=function(){return _},this.maxScrollLeft=function(){return u},this.disable=function(){for(s=n.firstChild;s;)b=s.nextSibling,t.appendChild(s),s=b;t===n.parentNode&&t.removeChild(n)},this.enable=function(){if(s=t.firstChild,s!==n){for(;s;)b=s.nextSibling,n.appendChild(s),s=b;t.appendChild(n),this.calibrate()}},this.calibrate=function(C){var T=t.clientWidth===p,w,P,M;l=t.scrollTop,c=t.scrollLeft,!(T&&t.clientHeight===m&&n.offsetHeight===g&&h===t.scrollWidth&&f===t.scrollHeight&&!C)&&((o||a)&&(P=this.left(),M=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),w=Ua(t),(!T||C)&&(i.display="block",i.width="auto",i.paddingRight="0px",d=Math.max(0,t.scrollWidth-t.clientWidth),d&&(d+=parseFloat(w.paddingLeft)+(Xh?parseFloat(w.paddingRight):0))),i.display="inline-block",i.position="relative",i.overflow="visible",i.verticalAlign="top",i.boxSizing="content-box",i.width="100%",i.paddingRight=d+"px",Xh&&(i.paddingBottom=w.paddingBottom),p=t.clientWidth,m=t.clientHeight,h=t.scrollWidth,f=t.scrollHeight,u=t.scrollWidth-p,_=t.scrollHeight-m,g=n.offsetHeight,i.display="block",(P||M)&&(this.left(P),this.top(M)))},this.content=n,this.element=t,this._skip=!1,this.enable()},zh=function(t){if(vg()&&document.body){var e=window&&window.navigator;we=window,Hn=document,xi=Hn.documentElement,ji=Hn.body,Uh=Jl("div"),jl=!!window.PointerEvent,Ki=Jl("div"),Ki.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Ia=Ki.style.cursor==="grab"?"grab":"move",Pa=e&&e.userAgent.toLowerCase().indexOf("android")!==-1,Hh="ontouchstart"in xi&&"orientation"in we||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),Xh=function(){var n=Jl("div"),i=Jl("div"),s=i.style,o=ji,a;return s.display="inline-block",s.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),o.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,o.removeChild(n),a}(),Na=function(n){for(var i=n.split(","),s=("onpointerdown"in Uh?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Uh?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),o={},a=4;--a>-1;)o[i[a]]=s[a],o[s[a]]=i[a];try{xi.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){xg=1}}))}catch{}return o}("touchstart,touchmove,touchend,touchcancel"),Ye(Hn,"touchcancel",Ql),Ye(we,"touchmove",Ql),ji&&ji.addEventListener("touchstart",Ql),Ye(Hn,"contextmenu",function(){for(var n in uo)uo[n].isPressed&&uo[n].endDrag()}),me=Vh=Sg()}me?(gi=me.plugins.inertia,yg=me.core.context||function(){},Ra=me.utils.checkPrefix,Fa=Ra(Fa),Wh=Ra(Wh),Dr=me.utils.toArray,Gh=me.core.getStyleSaver,wg=!!Ra("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},Uv=function(){function r(e){this._listeners={},this.target=e||this}var t=r.prototype;return t.addEventListener=function(n,i){var s=this._listeners[n]||(this._listeners[n]=[]);~s.indexOf(i)||s.push(i)},t.removeEventListener=function(n,i){var s=this._listeners[n],o=s&&s.indexOf(i);o>=0&&s.splice(o,1)},t.dispatchEvent=function(n){var i=this,s;return(this._listeners[n]||[]).forEach(function(o){return o.call(i,{type:n,target:i.target})===!1&&(s=!1)}),s},r}(),Qi=function(r){bv(t,r);function t(e,n){var i;i=r.call(this)||this,Vh||zh(1),e=Dr(e)[0],i.styles=Gh&&Gh(e,"transform,left,top"),gi||(gi=me.plugins.inertia),i.vars=n=Mg(n||{}),i.target=e,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(n.dragResistance)||0,i.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,i.lockAxis=n.lockAxis,i.autoScroll=n.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!n.allowEventDefault,me.getProperty(e,"x");var s=(n.type||"x,y").toLowerCase(),o=~s.indexOf("x")||~s.indexOf("y"),a=s.indexOf("rotation")!==-1,l=a?"rotation":o?"x":"left",c=o?"y":"top",h=!!(~s.indexOf("x")||~s.indexOf("left")||s==="scroll"),f=!!(~s.indexOf("y")||~s.indexOf("top")||s==="scroll"),d=n.minimumMovement||2,u=ag(i),_=Dr(n.trigger||n.handle||e),p={},m=0,g=!1,b=n.autoScrollMarginTop||40,v=n.autoScrollMarginRight||40,S=n.autoScrollMarginBottom||40,C=n.autoScrollMarginLeft||40,T=n.clickableTest||Lv,w=0,P=e._gsap||me.core.getCache(e),M=Fv(e),y=function(L,st){return parseFloat(P.get(e,L,st))},I=e.ownerDocument||Hn,N,D,V,K,W,Z,z,U,R,lt,xt,Bt,X,at,yt,ut,It,Ht,q,jt,Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St=function(L){return ti(L),L.stopImmediatePropagation&&L.stopImmediatePropagation(),!1},mt=function bt(L){if(u.autoScroll&&u.isDragging&&(g||It)){var st=e,O=u.autoScroll*15,Q,pt,nt,Et,dt,Rt,Gt,Ot;for(g=!1,Ji.scrollTop=we.pageYOffset!=null?we.pageYOffset:I.documentElement.scrollTop!=null?I.documentElement.scrollTop:I.body.scrollTop,Ji.scrollLeft=we.pageXOffset!=null?we.pageXOffset:I.documentElement.scrollLeft!=null?I.documentElement.scrollLeft:I.body.scrollLeft,Et=u.pointerX-Ji.scrollLeft,dt=u.pointerY-Ji.scrollTop;st&&!pt;)pt=po(st.parentNode),Q=pt?Ji:st.parentNode,nt=pt?{bottom:Math.max(xi.clientHeight,we.innerHeight||0),right:Math.max(xi.clientWidth,we.innerWidth||0),left:0,top:0}:Q.getBoundingClientRect(),Rt=Gt=0,f&&(Ot=Q._gsMaxScrollY-Q.scrollTop,Ot<0?Gt=Ot:dt>nt.bottom-S&&Ot?(g=!0,Gt=Math.min(Ot,O*(1-Math.max(0,nt.bottom-dt)/S)|0)):dt<nt.top+b&&Q.scrollTop&&(g=!0,Gt=-Math.min(Q.scrollTop,O*(1-Math.max(0,dt-nt.top)/b)|0)),Gt&&(Q.scrollTop+=Gt)),h&&(Ot=Q._gsMaxScrollX-Q.scrollLeft,Ot<0?Rt=Ot:Et>nt.right-v&&Ot?(g=!0,Rt=Math.min(Ot,O*(1-Math.max(0,nt.right-Et)/v)|0)):Et<nt.left+C&&Q.scrollLeft&&(g=!0,Rt=-Math.min(Q.scrollLeft,O*(1-Math.max(0,Et-nt.left)/C)|0)),Rt&&(Q.scrollLeft+=Rt)),pt&&(Rt||Gt)&&(we.scrollTo(Q.scrollLeft,Q.scrollTop),ot(u.pointerX+Rt,u.pointerY+Gt)),st=Q}if(It){var ne=u.x,fe=u.y;a?(u.deltaX=ne-parseFloat(P.rotation),u.rotation=ne,P.rotation=ne+"deg",P.renderTransform(1,P)):D?(f&&(u.deltaY=fe-D.top(),D.top(fe)),h&&(u.deltaX=ne-D.left(),D.left(ne))):o?(f&&(u.deltaY=fe-parseFloat(P.y),P.y=fe+"px"),h&&(u.deltaX=ne-parseFloat(P.x),P.x=ne+"px"),P.renderTransform(1,P)):(f&&(u.deltaY=fe-parseFloat(e.style.top||0),e.style.top=fe+"px"),h&&(u.deltaX=ne-parseFloat(e.style.left||0),e.style.left=ne+"px")),U&&!L&&!A&&(A=!0,Oe(u,"drag","onDrag")===!1&&(h&&(u.x-=u.deltaX),f&&(u.y-=u.deltaY),bt(!0)),A=!1)}It=!1},ct=function(L,st){var O=u.x,Q=u.y,pt,nt;e._gsap||(P=me.core.getCache(e)),P.uncache&&me.getProperty(e,"x"),o?(u.x=parseFloat(P.x),u.y=parseFloat(P.y)):a?u.x=u.rotation=parseFloat(P.rotation):D?(u.y=D.top(),u.x=D.left()):(u.y=parseFloat(e.style.top||(nt=Ua(e))&&nt.top)||0,u.x=parseFloat(e.style.left||(nt||{}).left)||0),(q||jt||Ft)&&!st&&(u.isDragging||u.isThrowing)&&(Ft&&(lo.x=u.x,lo.y=u.y,pt=Ft(lo),pt.x!==u.x&&(u.x=pt.x,It=!0),pt.y!==u.y&&(u.y=pt.y,It=!0)),q&&(pt=q(u.x),pt!==u.x&&(u.x=pt,a&&(u.rotation=pt),It=!0)),jt&&(pt=jt(u.y),pt!==u.y&&(u.y=pt),It=!0)),It&&mt(!0),L||(u.deltaX=u.x-O,u.deltaY=u.y-Q,Oe(u,"throwupdate","onThrowUpdate"))},Nt=function(L,st,O,Q){return st==null&&(st=-vs),O==null&&(O=vs),Cr(L)?function(pt){var nt=u.isPressed?1-u.edgeResistance:1;return L.call(u,(pt>O?O+(pt-O)*nt:pt<st?st+(pt-st)*nt:pt)*Q)*Q}:Da(L)?function(pt){for(var nt=L.length,Et=0,dt=vs,Rt,Gt;--nt>-1;)Rt=L[nt],Gt=Rt-pt,Gt<0&&(Gt=-Gt),Gt<dt&&Rt>=st&&Rt<=O&&(Et=nt,dt=Gt);return L[Et]}:isNaN(L)?function(pt){return pt}:function(){return L*Q}},ft=function(L,st,O,Q,pt,nt,Et){return nt=nt&&nt<vs?nt*nt:vs,Cr(L)?function(dt){var Rt=u.isPressed?1-u.edgeResistance:1,Gt=dt.x,Ot=dt.y,ne,fe,ge;return dt.x=Gt=Gt>O?O+(Gt-O)*Rt:Gt<st?st+(Gt-st)*Rt:Gt,dt.y=Ot=Ot>pt?pt+(Ot-pt)*Rt:Ot<Q?Q+(Ot-Q)*Rt:Ot,ne=L.call(u,dt),ne!==dt&&(dt.x=ne.x,dt.y=ne.y),Et!==1&&(dt.x*=Et,dt.y*=Et),nt<vs&&(fe=dt.x-Gt,ge=dt.y-Ot,fe*fe+ge*ge>nt&&(dt.x=Gt,dt.y=Ot)),dt}:Da(L)?function(dt){for(var Rt=L.length,Gt=0,Ot=vs,ne,fe,ge,le;--Rt>-1;)ge=L[Rt],ne=ge.x-dt.x,fe=ge.y-dt.y,le=ne*ne+fe*fe,le<Ot&&(Gt=Rt,Ot=le);return Ot<=nt?L[Gt]:dt}:function(dt){return dt}},vt=function(){var L,st,O,Q;z=!1,D?(D.calibrate(),u.minX=xt=-D.maxScrollLeft(),u.minY=X=-D.maxScrollTop(),u.maxX=lt=u.maxY=Bt=0,z=!0):n.bounds&&(L=_g(n.bounds,e.parentNode),a?(u.minX=xt=L.left,u.maxX=lt=L.left+L.width,u.minY=X=u.maxY=Bt=0):!_i(n.bounds.maxX)||!_i(n.bounds.maxY)?(L=n.bounds,u.minX=xt=L.minX,u.minY=X=L.minY,u.maxX=lt=L.maxX,u.maxY=Bt=L.maxY):(st=_g(e,e.parentNode),u.minX=xt=Math.round(y(l,"px")+L.left-st.left),u.minY=X=Math.round(y(c,"px")+L.top-st.top),u.maxX=lt=Math.round(xt+(L.width-st.width)),u.maxY=Bt=Math.round(X+(L.height-st.height))),xt>lt&&(u.minX=lt,u.maxX=lt=xt,xt=u.minX),X>Bt&&(u.minY=Bt,u.maxY=Bt=X,X=u.minY),a&&(u.minRotation=xt,u.maxRotation=lt),z=!0),n.liveSnap&&(O=n.liveSnap===!0?n.snap||{}:n.liveSnap,Q=Da(O)||Cr(O),a?(q=Nt(Q?O:O.rotation,xt,lt,1),jt=null):O.points?Ft=ft(Q?O:O.points,xt,lt,X,Bt,O.radius,D?-1:1):(h&&(q=Nt(Q?O:O.x||O.left||O.scrollLeft,xt,lt,D?-1:1)),f&&(jt=Nt(Q?O:O.y||O.top||O.scrollTop,X,Bt,D?-1:1))))},$t=function(){u.isThrowing=!1,Oe(u,"throwcomplete","onThrowComplete")},ht=function(){u.isThrowing=!1},Ct=function(L,st){var O,Q,pt,nt;L&&gi?(L===!0&&(O=n.snap||n.liveSnap||{},Q=Da(O)||Cr(O),L={resistance:(n.throwResistance||n.resistance||1e3)/(a?10:1)},a?L.rotation=kh(u,Q?O:O.rotation,lt,xt,1,st):(h&&(L[l]=kh(u,Q?O:O.points||O.x||O.left,lt,xt,D?-1:1,st||u.lockedAxis==="x")),f&&(L[c]=kh(u,Q?O:O.points||O.y||O.top,Bt,X,D?-1:1,st||u.lockedAxis==="y")),(O.points||Da(O)&&La(O[0]))&&(L.linkedProps=l+","+c,L.radius=O.radius))),u.isThrowing=!0,nt=isNaN(n.overshootTolerance)?n.edgeResistance===1?0:1-u.edgeResistance+.2:n.overshootTolerance,L.duration||(L.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?nt===0||La(L)&&L.resistance>1e3?0:.5:n.minDuration,overshoot:nt}),u.tween=pt=me.to(D||e,{inertia:L,data:"_draggable",inherit:!1,onComplete:$t,onInterrupt:ht,onUpdate:n.fastMode?Oe:ct,onUpdateParams:n.fastMode?[u,"onthrowupdate","onThrowUpdate"]:O&&O.radius?[!1,!0]:[]}),n.fastMode||(D&&(D._skip=!0),pt.render(1e9,!0,!0),ct(!0,!0),u.endX=u.x,u.endY=u.y,a&&(u.endRotation=u.x),pt.play(0),ct(!0,!0),D&&(D._skip=!1))):z&&u.applyBounds()},qt=function(L){var st=At,O;At=Er(e.parentNode,!0),L&&u.isPressed&&!At.equals(st||new wr)&&(O=st.inverse().apply({x:V,y:K}),At.apply(O,O),V=O.x,K=O.y),At.equals(wv)&&(At=null)},Jt=function(){var L=1-u.edgeResistance,st=M?fo(I):0,O=M?ho(I):0,Q,pt,nt;o&&(P.x=y(l,"px")+"px",P.y=y(c,"px")+"px",P.renderTransform()),qt(!1),ei.x=u.pointerX-st,ei.y=u.pointerY-O,At&&At.apply(ei,ei),V=ei.x,K=ei.y,It&&(ot(u.pointerX,u.pointerY),mt(!0)),et=Er(e),D?(vt(),Z=D.top(),W=D.left()):(he()?(ct(!0,!0),vt()):u.applyBounds(),a?(Q=e.ownerSVGElement?[P.xOrigin-e.getBBox().x,P.yOrigin-e.getBBox().y]:(Ua(e)[Wh]||"0 0").split(" "),ut=u.rotationOrigin=Er(e).apply({x:parseFloat(Q[0])||0,y:parseFloat(Q[1])||0}),ct(!0,!0),pt=u.pointerX-ut.x-st,nt=ut.y-u.pointerY+O,W=u.x,Z=u.y=Math.atan2(nt,pt)*lg):(Z=y(c,"px"),W=y(l,"px"))),z&&L&&(W>lt?W=lt+(W-lt)/L:W<xt&&(W=xt-(xt-W)/L),a||(Z>Bt?Z=Bt+(Z-Bt)/L:Z<X&&(Z=X-(X-Z)/L))),u.startX=W=Tr(W),u.startY=Z=Tr(Z)},he=function(){return u.tween&&u.tween.isActive()},Kt=function(){Ki.parentNode&&!he()&&!u.isDragging&&Ki.parentNode.removeChild(Ki)},k=function(L,st){var O;if(!N||u.isPressed||!L||(L.type==="mousedown"||L.type==="pointerdown")&&!st&&Ar()-w<30&&Na[u.pointerEvent.type]){Y&&L&&N&&ti(L);return}if(Xt=he(),rt=!1,u.pointerEvent=L,Na[L.type]?(wt=~L.type.indexOf("touch")?L.currentTarget||L.target:I,Ye(wt,"touchend",gt),Ye(wt,"touchmove",tt),Ye(wt,"touchcancel",gt),Ye(I,"touchstart",dg)):(wt=null,Ye(I,"mousemove",tt)),Qt=null,(!jl||!wt)&&(Ye(I,"mouseup",gt),L&&L.target&&Ye(L.target,"mouseup",gt)),Ut=T.call(u,L.target)&&n.dragClickables===!1&&!st,Ut){Ye(L.target,"change",gt),Oe(u,"pressInit","onPressInit"),Oe(u,"press","onPress"),Kl(_,!0),Y=!1;return}if(G=!wt||h===f||u.vars.allowNativeTouchScrolling===!1||u.vars.allowContextMenu&&L&&(L.ctrlKey||L.which>2)?!1:h?"y":"x",Y=!G&&!u.allowEventDefault,Y&&(ti(L),Ye(we,"touchforcechange",ti)),L.changedTouches?(L=at=L.changedTouches[0],yt=L.identifier):L.pointerId?yt=L.pointerId:at=yt=null,tc++,Cv(mt),K=u.pointerY=L.pageY,V=u.pointerX=L.pageX,Oe(u,"pressInit","onPressInit"),(G||u.autoScroll)&&Oh(e.parentNode),e.parentNode&&u.autoScroll&&!D&&!a&&e.parentNode._gsMaxScrollX&&!Ki.parentNode&&!e.getBBox&&(Ki.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(Ki)),Jt(),u.tween&&u.tween.kill(),u.isThrowing=!1,me.killTweensOf(D||e,p,!0),D&&me.killTweensOf(e,{scrollTo:1},!0),u.tween=u.lockedAxis=null,(n.zIndexBoost||!a&&!D&&n.zIndexBoost!==!1)&&(e.style.zIndex=t.zIndex++),u.isPressed=!0,U=!!(n.onDrag||u._listeners.drag),R=!!(n.onMove||u._listeners.move),n.cursor!==!1||n.activeCursor)for(O=_.length;--O>-1;)me.set(_[O],{cursor:n.activeCursor||n.cursor||(Ia==="grab"?"grabbing":Ia)});Oe(u,"press","onPress")},tt=function(L){var st=L,O,Q,pt,nt,Et,dt;if(!N||Yh||!u.isPressed||!L){Y&&L&&N&&ti(L);return}if(u.pointerEvent=L,O=L.changedTouches,O){if(L=O[0],L!==at&&L.identifier!==yt){for(nt=O.length;--nt>-1&&(L=O[nt]).identifier!==yt&&L.target!==e;);if(nt<0)return}}else if(L.pointerId&&yt&&L.pointerId!==yt)return;if(wt&&G&&!Qt&&(ei.x=L.pageX-(M?fo(I):0),ei.y=L.pageY-(M?ho(I):0),At&&At.apply(ei,ei),Q=ei.x,pt=ei.y,Et=Math.abs(Q-V),dt=Math.abs(pt-K),(Et!==dt&&(Et>d||dt>d)||Pa&&G===Qt)&&(Qt=Et>dt&&h?"x":"y",G&&Qt!==G&&Ye(we,"touchforcechange",ti),u.vars.lockAxisOnTouchScroll!==!1&&h&&f&&(u.lockedAxis=Qt==="x"?"y":"x",Cr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,st)),Pa&&G===Qt))){gt(st);return}!u.allowEventDefault&&(!G||Qt&&G!==Qt)&&st.cancelable!==!1?(ti(st),Y=!0):Y&&(Y=!1),u.autoScroll&&(g=!0),ot(L.pageX,L.pageY,R)},ot=function(L,st,O){var Q=1-u.dragResistance,pt=1-u.edgeResistance,nt=u.pointerX,Et=u.pointerY,dt=Z,Rt=u.x,Gt=u.y,Ot=u.endX,ne=u.endY,fe=u.endRotation,ge=It,le,E,B,H,j,J;u.pointerX=L,u.pointerY=st,M&&(L-=fo(I),st-=ho(I)),a?(H=Math.atan2(ut.y-st,L-ut.x)*lg,j=u.y-H,j>180?(Z-=360,u.y=H):j<-180&&(Z+=360,u.y=H),u.x!==W||Math.abs(Z-H)>d?(u.y=H,B=W+(Z-H)*Q):B=W):(At&&(J=L*At.a+st*At.c+At.e,st=L*At.b+st*At.d+At.f,L=J),E=st-K,le=L-V,E<d&&E>-d&&(E=0),le<d&&le>-d&&(le=0),(u.lockAxis||u.lockedAxis)&&(le||E)&&(J=u.lockedAxis,J||(u.lockedAxis=J=h&&Math.abs(le)>Math.abs(E)?"y":f?"x":null,J&&Cr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,u.pointerEvent)),J==="y"?E=0:J==="x"&&(le=0)),B=Tr(W+le*Q),H=Tr(Z+E*Q)),(q||jt||Ft)&&(u.x!==B||u.y!==H&&!a)&&(Ft&&(lo.x=B,lo.y=H,J=Ft(lo),B=Tr(J.x),H=Tr(J.y)),q&&(B=Tr(q(B))),jt&&(H=Tr(jt(H)))),z&&(B>lt?B=lt+Math.round((B-lt)*pt):B<xt&&(B=xt+Math.round((B-xt)*pt)),a||(H>Bt?H=Math.round(Bt+(H-Bt)*pt):H<X&&(H=Math.round(X+(H-X)*pt)))),(u.x!==B||u.y!==H&&!a)&&(a?(u.endRotation=u.x=u.endX=B,It=!0):(f&&(u.y=u.endY=H,It=!0),h&&(u.x=u.endX=B,It=!0)),!O||Oe(u,"move","onMove")!==!1?!u.isDragging&&u.isPressed&&(u.isDragging=rt=!0,Oe(u,"dragstart","onDragStart")):(u.pointerX=nt,u.pointerY=Et,Z=dt,u.x=Rt,u.y=Gt,u.endX=Ot,u.endY=ne,u.endRotation=fe,It=ge))},gt=function bt(L,st){if(!N||!u.isPressed||L&&yt!=null&&!st&&(L.pointerId&&L.pointerId!==yt&&L.target!==e||L.changedTouches&&!Rv(L.changedTouches,yt))){Y&&L&&N&&ti(L);return}u.isPressed=!1;var O=L,Q=u.isDragging,pt=u.vars.allowContextMenu&&L&&(L.ctrlKey||L.which>2),nt=me.delayedCall(.001,Kt),Et,dt,Rt,Gt,Ot;if(wt?(He(wt,"touchend",bt),He(wt,"touchmove",tt),He(wt,"touchcancel",bt),He(I,"touchstart",dg)):He(I,"mousemove",tt),He(we,"touchforcechange",ti),(!jl||!wt)&&(He(I,"mouseup",bt),L&&L.target&&He(L.target,"mouseup",bt)),It=!1,Q&&(m=cg=Ar(),u.isDragging=!1),fg(mt),Ut&&!pt){L&&(He(L.target,"change",bt),u.pointerEvent=O),Kl(_,!1),Oe(u,"release","onRelease"),Oe(u,"click","onClick"),Ut=!1;return}for(dt=_.length;--dt>-1;)Bh(_[dt],"cursor",n.cursor||(n.cursor!==!1?Ia:null));if(tc--,L){if(Et=L.changedTouches,Et&&(L=Et[0],L!==at&&L.identifier!==yt)){for(dt=Et.length;--dt>-1&&(L=Et[dt]).identifier!==yt&&L.target!==e;);if(dt<0&&!st)return}u.pointerEvent=O,u.pointerX=L.pageX,u.pointerY=L.pageY}return pt&&O?(ti(O),Y=!0,Oe(u,"release","onRelease")):O&&!Q?(Y=!1,Xt&&(n.snap||n.bounds)&&Ct(n.inertia||n.throwProps),Oe(u,"release","onRelease"),(!Pa||O.type!=="touchmove")&&O.type.indexOf("cancel")===-1&&(Oe(u,"click","onClick"),Ar()-w<300&&Oe(u,"doubleclick","onDoubleClick"),Gt=O.target||e,w=Ar(),Ot=function(){w!==x&&u.enabled()&&!u.isPressed&&!O.defaultPrevented&&(Gt.click?Gt.click():I.createEvent&&(Rt=I.createEvent("MouseEvents"),Rt.initMouseEvent("click",!0,!0,we,1,u.pointerEvent.screenX,u.pointerEvent.screenY,u.pointerX,u.pointerY,!1,!1,!1,!1,0,null),Gt.dispatchEvent(Rt)))},!Pa&&!O.defaultPrevented&&me.delayedCall(.05,Ot))):(Ct(n.inertia||n.throwProps),!u.allowEventDefault&&O&&(n.dragClickables!==!1||!T.call(u,O.target))&&Q&&(!G||Qt&&G===Qt)&&O.cancelable!==!1?(Y=!0,ti(O)):Y=!1,Oe(u,"release","onRelease")),he()&&nt.duration(u.tween.duration()),Q&&Oe(u,"dragend","onDragEnd"),!0},_t=function(L){if(L&&u.isDragging&&!D){var st=L.target||e.parentNode,O=st.scrollLeft-st._gsScrollX,Q=st.scrollTop-st._gsScrollY;(O||Q)&&(At?(V-=O*At.a+Q*At.c,K-=Q*At.d+O*At.b):(V-=O,K-=Q),st._gsScrollX+=O,st._gsScrollY+=Q,ot(u.pointerX,u.pointerY))}},zt=function(L){var st=Ar(),O=st-w<100,Q=st-m<50,pt=O&&x===w,nt=u.pointerEvent&&u.pointerEvent.defaultPrevented,Et=O&&F===w,dt=L.isTrusted||L.isTrusted==null&&O&&pt;if((pt||Q&&u.vars.suppressClickOnDrag!==!1)&&L.stopImmediatePropagation&&L.stopImmediatePropagation(),O&&!(u.pointerEvent&&u.pointerEvent.defaultPrevented)&&(!pt||dt&&!Et)){dt&&pt&&(F=w),x=w;return}(u.isPressed||Q||O)&&(!dt||!L.detail||!O||nt)&&ti(L),!O&&!Q&&!rt&&(L&&L.target&&(u.pointerEvent=L),Oe(u,"click","onClick"))},ie=function(L){return At?{x:L.x*At.a+L.y*At.c+At.e,y:L.x*At.b+L.y*At.d+At.f}:{x:L.x,y:L.y}};return Ht=t.get(e),Ht&&Ht.kill(),i.startDrag=function(bt,L){var st,O,Q,pt;k(bt||u.pointerEvent,!0),L&&!u.hitTest(bt||u.pointerEvent)&&(st=co(bt||u.pointerEvent),O=co(e),Q=ie({x:st.left+st.width/2,y:st.top+st.height/2}),pt=ie({x:O.left+O.width/2,y:O.top+O.height/2}),V-=Q.x-pt.x,K-=Q.y-pt.y),u.isDragging||(u.isDragging=rt=!0,Oe(u,"dragstart","onDragStart"))},i.drag=tt,i.endDrag=function(bt){return gt(bt||u.pointerEvent,!0)},i.timeSinceDrag=function(){return u.isDragging?0:(Ar()-m)/1e3},i.timeSinceClick=function(){return(Ar()-w)/1e3},i.hitTest=function(bt,L){return t.hitTest(u.target,bt,L)},i.getDirection=function(bt,L){var st=bt==="velocity"&&gi?bt:La(bt)&&!a?"element":"start",O,Q,pt,nt,Et,dt;return st==="element"&&(Et=co(u.target),dt=co(bt)),O=st==="start"?u.x-W:st==="velocity"?gi.getVelocity(e,l):Et.left+Et.width/2-(dt.left+dt.width/2),a?O<0?"counter-clockwise":"clockwise":(L=L||2,Q=st==="start"?u.y-Z:st==="velocity"?gi.getVelocity(e,c):Et.top+Et.height/2-(dt.top+dt.height/2),pt=Math.abs(O/Q),nt=pt<1/L?"":O<0?"left":"right",pt<L&&(nt!==""&&(nt+="-"),nt+=Q<0?"up":"down"),nt)},i.applyBounds=function(bt,L){var st,O,Q,pt,nt,Et;if(bt&&n.bounds!==bt)return n.bounds=bt,u.update(!0,L);if(ct(!0),vt(),z&&!he()){if(st=u.x,O=u.y,st>lt?st=lt:st<xt&&(st=xt),O>Bt?O=Bt:O<X&&(O=X),(u.x!==st||u.y!==O)&&(Q=!0,u.x=u.endX=st,a?u.endRotation=st:u.y=u.endY=O,It=!0,mt(!0),u.autoScroll&&!u.isDragging))for(Oh(e.parentNode),pt=e,Ji.scrollTop=we.pageYOffset!=null?we.pageYOffset:I.documentElement.scrollTop!=null?I.documentElement.scrollTop:I.body.scrollTop,Ji.scrollLeft=we.pageXOffset!=null?we.pageXOffset:I.documentElement.scrollLeft!=null?I.documentElement.scrollLeft:I.body.scrollLeft;pt&&!Et;)Et=po(pt.parentNode),nt=Et?Ji:pt.parentNode,f&&nt.scrollTop>nt._gsMaxScrollY&&(nt.scrollTop=nt._gsMaxScrollY),h&&nt.scrollLeft>nt._gsMaxScrollX&&(nt.scrollLeft=nt._gsMaxScrollX),pt=nt;u.isThrowing&&(Q||u.endX>lt||u.endX<xt||u.endY>Bt||u.endY<X)&&Ct(n.inertia||n.throwProps,Q)}return u},i.update=function(bt,L,st){if(L&&u.isPressed){var O=Er(e),Q=et.apply({x:u.x-W,y:u.y-Z}),pt=Er(e.parentNode,!0);pt.apply({x:O.e-Q.x,y:O.f-Q.y},Q),u.x-=Q.x-pt.e,u.y-=Q.y-pt.f,mt(!0),Jt()}var nt=u.x,Et=u.y;return qt(!L),bt?u.applyBounds():(It&&st&&mt(!0),ct(!0)),L&&(ot(u.pointerX,u.pointerY),It&&mt(!0)),u.isPressed&&!L&&(h&&Math.abs(nt-u.x)>.01||f&&Math.abs(Et-u.y)>.01&&!a)&&Jt(),u.autoScroll&&(Oh(e.parentNode,u.isDragging),g=u.isDragging,mt(!0),mg(e,_t),pg(e,_t)),u},i.enable=function(bt){var L={lazy:!0},st,O,Q;if(n.cursor!==!1&&(L.cursor=n.cursor||Ia),me.utils.checkPrefix("touchCallout")&&(L.touchCallout="none"),bt!=="soft"){for(ug(_,h===f?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"),O=_.length;--O>-1;)Q=_[O],jl||Ye(Q,"mousedown",k),Ye(Q,"touchstart",k),Ye(Q,"click",zt,!0),me.set(Q,L),Q.getBBox&&Q.ownerSVGElement&&h!==f&&me.set(Q.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"}),n.allowContextMenu||Ye(Q,"contextmenu",St);Kl(_,!1)}return pg(e,_t),N=!0,gi&&bt!=="soft"&&gi.track(D||e,o?"x,y":a?"rotation":"top,left"),e._gsDragID=st="d"+Ev++,uo[st]=u,D&&(D.enable(),D.element._gsDragID=st),(n.bounds||a)&&Jt(),n.bounds&&u.applyBounds(),u},i.disable=function(bt){for(var L=u.isDragging,st=_.length,O;--st>-1;)Bh(_[st],"cursor",null);if(bt!=="soft"){for(ug(_,null),st=_.length;--st>-1;)O=_[st],Bh(O,"touchCallout",null),He(O,"mousedown",k),He(O,"touchstart",k),He(O,"click",zt,!0),He(O,"contextmenu",St);Kl(_,!0),wt&&(He(wt,"touchcancel",gt),He(wt,"touchend",gt),He(wt,"touchmove",tt)),He(I,"mouseup",gt),He(I,"mousemove",tt)}return mg(e,_t),N=!1,gi&&bt!=="soft"&&(gi.untrack(D||e,o?"x,y":a?"rotation":"top,left"),u.tween&&u.tween.kill()),D&&D.disable(),fg(mt),u.isDragging=u.isPressed=Ut=!1,L&&Oe(u,"dragend","onDragEnd"),u},i.enabled=function(bt,L){return arguments.length?bt?u.enable(L):u.disable(L):N},i.kill=function(){return u.isThrowing=!1,u.tween&&u.tween.kill(),u.disable(),me.set(_,{clearProps:"userSelect"}),delete uo[e._gsDragID],u},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~s.indexOf("scroll")&&(D=i.scrollProxy=new Nv(e,Av({onKill:function(){u.isPressed&&gt(null)}},n)),e.style.overflowY=f&&!Hh?"auto":"hidden",e.style.overflowX=h&&!Hh?"auto":"hidden",e=D.content),a?p.rotation=1:(h&&(p[l]=1),f&&(p[c]=1)),P.force3D="force3D"in n?n.force3D:!0,yg(ag(i)),i.enable(),i}return t.register=function(n){me=n,zh()},t.create=function(n,i){return Vh||zh(!0),Dr(n).map(function(s){return new t(s,i)})},t.get=function(n){return uo[(Dr(n)[0]||{})._gsDragID]},t.timeSinceDrag=function(){return(Ar()-cg)/1e3},t.hitTest=function(n,i,s){if(n===i)return!1;var o=co(n),a=co(i),l=o.top,c=o.left,h=o.right,f=o.bottom,d=o.width,u=o.height,_=a.left>h||a.right<c||a.top>f||a.bottom<l,p,m,g;return _||!s?!_:(g=(s+"").indexOf("%")!==-1,s=parseFloat(s)||0,p={left:Math.max(c,a.left),top:Math.max(l,a.top)},p.width=Math.min(h,a.right)-p.left,p.height=Math.min(f,a.bottom)-p.top,p.width<0||p.height<0?!1:g?(s*=.01,m=p.width*p.height,m>=d*u*s||m>=a.width*a.height*s):p.width>s&&p.height>s)},t}(Uv);Dv(Qi.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});Qi.zIndex=1e3;Qi.version="3.12.5";Sg()&&me.registerPlugin(Qi);var Ni,Zh,Ba,Tg,mo,go,ec,Ag,Cg,Dg=function(){return Ni||typeof window<"u"&&(Ni=window.gsap)},$h={},Ov=function(t){return Math.round(t*1e4)/1e4},Jh=function(t){return Cg(t).id},Oa=function(t){return $h[Jh(typeof t=="string"?Ba(t)[0]:t)]},Eg=function(t){var e=mo,n;if(t-ec>=.05)for(Ag=ec,ec=t;e;)n=e.g(e.t,e.p),(n!==e.v1||t-e.t1>.2)&&(e.v2=e.v1,e.v1=n,e.t2=e.t1,e.t1=t),e=e._next},Bv={deg:360,rad:Math.PI*2},qh=function(){Ni=Dg(),Ni&&(Ba=Ni.utils.toArray,Tg=Ni.utils.getUnit,Cg=Ni.core.getCache,go=Ni.ticker,Zh=1)},kv=function(t,e,n,i){this.t=t,this.p=e,this.g=t._gsap.get,this.rCap=Bv[n||Tg(this.g(t,e))],this.v1=this.v2=0,this.t1=this.t2=go.time,i&&(this._next=i,i._prev=this)},_o=function(){function r(e,n){Zh||qh(),this.target=Ba(e)[0],$h[Jh(this.target)]=this,this._props={},n&&this.add(n)}r.register=function(n){Ni=n,qh()};var t=r.prototype;return t.get=function(n,i){var s=this._props[n]||console.warn("Not tracking "+n+" velocity."),o,a,l;return o=parseFloat(i?s.v1:s.g(s.t,s.p)),a=o-parseFloat(s.v2),l=s.rCap,l&&(a=a%l,a!==a%(l/2)&&(a=a<0?a+l:a-l)),Ov(a/((i?s.t1:go.time)-s.t2))},t.getAll=function(){var n={},i=this._props,s;for(s in i)n[s]=this.get(s);return n},t.isTracking=function(n){return n in this._props},t.add=function(n,i){n in this._props||(mo||(go.add(Eg),ec=Ag=go.time),mo=this._props[n]=new kv(this.target,n,i,mo))},t.remove=function(n){var i=this._props[n],s,o;i&&(s=i._prev,o=i._next,s&&(s._next=o),o?o._prev=s:mo===i&&(go.remove(Eg),mo=0),delete this._props[n])},t.kill=function(n){for(var i in this._props)this.remove(i);n||delete $h[Jh(this.target)]},r.track=function(n,i,s){Zh||qh();for(var o=[],a=Ba(n),l=i.split(","),c=(s||"").split(","),h=a.length,f,d;h--;){for(f=Oa(a[h])||new r(a[h]),d=l.length;d--;)f.add(l[d],c[d]||c[0]);o.push(f)}return o},r.untrack=function(n,i){var s=(i||"").split(",");Ba(n).forEach(function(o){var a=Oa(o);a&&(s.length?s.forEach(function(l){return a.remove(l)}):a.kill(1))})},r.isTracking=function(n,i){var s=Oa(n);return s&&s.isTracking(i)},r.getVelocity=function(n,i){var s=Oa(n);return!s||!s.isTracking(i)?console.warn("Not tracking velocity of "+i):s.get(i)},r}();_o.getByTarget=Oa;Dg()&&Ni.registerPlugin(_o);var qe,Ng,Rg,Ug,Kh,ka,Og,Bg,kg,tf,zg,za,jh,Vg,nc=_o.getByTarget,Hg=function(){return qe||typeof window<"u"&&(qe=window.gsap)&&qe.registerPlugin&&qe},zv=function(t){return typeof t=="string"},Va=function(t){return typeof t=="number"},Rr=function(t){return typeof t=="object"},Qh=function(t){return typeof t=="function"},Vv=1,Gg=Array.isArray,Hv=function(t){return t},bs=1e10,Pg=1/bs,Wg=.05,Gv=function(t){return Math.round(t*1e4)/1e4},Wv=function(t,e,n){for(var i in e)!(i in t)&&i!==n&&(t[i]=e[i]);return t},Xv=function r(t){var e={},n,i;for(n in t)e[n]=Rr(i=t[n])&&!Gg(i)?r(i):i;return e},Ig=function(t,e,n,i,s){var o=e.length,a=0,l=bs,c,h,f,d;if(Rr(t)){for(;o--;){c=e[o],h=0;for(f in t)d=c[f]-t[f],h+=d*d;h<l&&(a=o,l=h)}if((s||bs)<bs&&s<Math.sqrt(l))return t}else for(;o--;)c=e[o],h=c-t,h<0&&(h=-h),h<l&&c>=i&&c<=n&&(a=o,l=h);return e[a]},Xg=function(t,e,n,i,s,o,a){if(t.end==="auto")return t;var l=t.end,c,h;if(n=isNaN(n)?bs:n,i=isNaN(i)?-bs:i,Rr(e)){if(c=e.calculated?e:(Qh(l)?l(e,a):Ig(e,l,n,i,o))||e,!e.calculated){for(h in c)e[h]=c[h];e.calculated=!0}c=c[s]}else c=Qh(l)?l(e,a):Gg(l)?Ig(e,l,n,i,o):parseFloat(l);return c>n?c=n:c<i&&(c=i),{max:c,min:c,unitFactor:t.unitFactor}},ic=function(t,e,n){return isNaN(t[e])?n:+t[e]},ef=function(t,e){return e*Wg*t/tf},Lg=function(t,e,n){return Math.abs((e-t)*tf/n/Wg)},Yg={resistance:1,checkpoint:1,preventOvershoot:1,linkedProps:1,radius:1,duration:1},qg=function(t,e,n,i){if(e.linkedProps){var s=e.linkedProps.split(","),o={},a,l,c,h,f,d;for(a=0;a<s.length;a++)l=s[a],c=e[l],c&&(Va(c.velocity)?h=c.velocity:(f=f||nc(t),h=f&&f.isTracking(l)?f.get(l):0),d=Math.abs(h/ic(c,"resistance",i)),o[l]=parseFloat(n(t,l))+ef(h,d));return o}},Yv=function(t,e,n,i,s,o){if(n===void 0&&(n=10),i===void 0&&(i=.2),s===void 0&&(s=1),o===void 0&&(o=0),zv(t)&&(t=Ug(t)[0]),!t)return 0;var a=0,l=bs,c=e.inertia||e,h=kg(t).get,f=ic(c,"resistance",ka.resistance),d,u,_,p,m,g,b,v,S,C;C=qg(t,c,h,f);for(d in c)Yg[d]||(u=c[d],Rr(u)||(v=v||nc(t),v&&v.isTracking(d)?u=Va(u)?{velocity:u}:{velocity:v.get(d)}:(p=+u||0,_=Math.abs(p/f))),Rr(u)&&(Va(u.velocity)?p=u.velocity:(v=v||nc(t),p=v&&v.isTracking(d)?v.get(d):0),_=zg(i,n,Math.abs(p/ic(u,"resistance",f))),m=parseFloat(h(t,d))||0,g=m+ef(p,_),"end"in u&&(u=Xg(u,C&&d in C?C:g,u.max,u.min,d,c.radius,p),o&&(za===e&&(za=c=Xv(e)),c[d]=Wv(u,c[d],"end"))),"max"in u&&g>+u.max+Pg?(S=u.unitFactor||ka.unitFactors[d]||1,b=m>u.max&&u.min!==u.max||p*S>-15&&p*S<45?i+(n-i)*.1:Lg(m,u.max,p),b+s<l&&(l=b+s)):"min"in u&&g<+u.min-Pg&&(S=u.unitFactor||ka.unitFactors[d]||1,b=m<u.min&&u.min!==u.max||p*S>-45&&p*S<15?i+(n-i)*.1:Lg(m,u.min,p),b+s<l&&(l=b+s)),b>a&&(a=b)),_>a&&(a=_));return a>l&&(a=l),a>n?n:a<i?i:a},Fg=function(){qe=Hg(),qe&&(Rg=qe.parseEase,Ug=qe.utils.toArray,Og=qe.utils.getUnit,kg=qe.core.getCache,zg=qe.utils.clamp,jh=qe.core.getStyleSaver,Vg=qe.core.reverting||function(){},Kh=Rg("power3"),tf=Kh(.05),Bg=qe.core.PropTween,qe.config({resistance:100,unitFactors:{time:1e3,totalTime:1e3,progress:1e3,totalProgress:1e3}}),ka=qe.config(),qe.registerPlugin(_o),Ng=1)},rc={version:"3.12.5",name:"inertia",register:function(t){qe=t,Fg()},init:function(t,e,n,i,s){Ng||Fg();var o=nc(t);if(e==="auto"){if(!o){console.warn("No inertia tracking on "+t+". InertiaPlugin.track(target) first.");return}e=o.getAll()}this.styles=jh&&typeof t.style=="object"&&jh(t),this.target=t,this.tween=n,za=e;var a=t._gsap,l=a.get,c=e.duration,h=Rr(c),f=e.preventOvershoot||h&&c.overshoot===0,d=ic(e,"resistance",ka.resistance),u=Va(c)?c:Yv(t,e,h&&c.max||10,h&&c.min||.2,h&&"overshoot"in c?+c.overshoot:f?0:1,!0),_,p,m,g,b,v,S,C,T;e=za,za=0,T=qg(t,e,l,d);for(_ in e)Yg[_]||(p=e[_],Qh(p)&&(p=p(i,t,s)),Va(p)?b=p:Rr(p)&&!isNaN(p.velocity)?b=+p.velocity:o&&o.isTracking(_)?b=o.get(_):console.warn("ERROR: No velocity was defined for "+t+" property: "+_),v=ef(b,u),C=0,m=l(t,_),g=Og(m),m=parseFloat(m),Rr(p)&&(S=m+v,"end"in p&&(p=Xg(p,T&&_ in T?T:S,p.max,p.min,_,e.radius,b)),"max"in p&&+p.max<S?f||p.preventOvershoot?v=p.max-m:C=p.max-m-v:"min"in p&&+p.min>S&&(f||p.preventOvershoot?v=p.min-m:C=p.min-m-v)),this._props.push(_),this.styles&&this.styles.save(_),this._pt=new Bg(this._pt,t,_,m,0,Hv,0,a.set(t,_,this)),this._pt.u=g||0,this._pt.c1=v,this._pt.c2=C);return n.duration(u),Vv},render:function(t,e){var n=e._pt;if(t=Kh(e.tween._time/e.tween._dur),t||!Vg())for(;n;)n.set(n.t,n.p,Gv(n.s+n.c1*t+n.c2*t*t)+n.u,n.d,t),n=n._next;else e.styles.revert()}};"track,untrack,isTracking,getVelocity,getByTarget".split(",").forEach(function(r){return rc[r]=_o[r]});Hg()&&qe.registerPlugin(rc);var Zg=()=>{Tt.registerPlugin(Vt,Qi,rc);let r=Tt.utils.toArray(".areas_item"),t=document.querySelectorAll(".services-orange-border"),e=document.querySelectorAll(".areas_item_content"),n=Tt.matchMedia();n.add("(max-width: 767px)",()=>{let i=document.querySelector(".areas_wrapper"),s=r.map((c,h)=>-(c.clientWidth+40)*h),o=Tt.utils.snap(s);Qi.create(i,{type:"x",bounds:{minX:window.innerWidth-i.scrollWidth,maxX:0},onDrag:a,onThrowUpdate:a,inertia:!0,onDragEnd:l,snap:{x:function(c){return o(c)}}});function a(){for(let c=0;c<r.length;c++)Qi.hitTest(r[c],".boundary")?($(r[c]).addClass("Slate-glow"),r[c].animation&&r[c].animation.play()):($(r[c]).removeClass("Slate-glow"),r[c].animation&&!r[c].animation.reversed()&&r[c].animation.reverse())}function l(){for(let c=0;c<r.length;c++)Qi.hitTest(r[c],".boundary")&&r[c].animation&&r[c].animation.play();a()}r.forEach(c=>{let h=Tt.timeline({paused:!0});h.to(c.querySelector(".areas_item_content"),{duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='281' height='266' viewBox='0 0 281 266' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_2452' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z' fill='%23060411'/%3E%3Cpath d='M213.833 0.0814209C213.833 42.8787 179.139 77.5727 136.342 77.5727V79.5727C180.244 79.5727 215.833 43.9832 215.833 0.0814209H213.833ZM214.838 1.07666H272.666V-0.92334H214.838V1.07666ZM279.666 8.07666V257.581H281.666V8.07666H279.666ZM272.666 264.581H8.88281V266.581H272.666V264.581ZM1.88281 257.581V8.07666H-0.117188V257.581H1.88281ZM8.88281 1.07666H57.8457V-0.92334H8.88281V1.07666ZM136.342 77.5727C93.5445 77.5727 58.8504 42.8787 58.8504 0.0814209H56.8504C56.8504 43.9832 92.4399 79.5727 136.342 79.5727V77.5727ZM57.8457 1.07666C57.296 1.07666 56.8504 0.631021 56.8504 0.0814209H58.8504C58.8504 -0.473438 58.4007 -0.92334 57.8457 -0.92334V1.07666ZM1.88281 8.07666C1.88281 4.21067 5.01682 1.07666 8.88281 1.07666V-0.92334C3.91225 -0.92334 -0.117188 3.1061 -0.117188 8.07666H1.88281ZM8.88281 264.581C5.01682 264.581 1.88281 261.447 1.88281 257.581H-0.117188C-0.117188 262.551 3.91225 266.581 8.88281 266.581V264.581ZM279.666 257.581C279.666 261.447 276.532 264.581 272.666 264.581V266.581C277.637 266.581 281.666 262.551 281.666 257.581H279.666ZM272.666 1.07666C276.532 1.07666 279.666 4.21067 279.666 8.07666H281.666C281.666 3.1061 277.637 -0.92334 272.666 -0.92334V1.07666ZM215.833 0.0814209C215.833 0.631077 215.387 1.07666 214.838 1.07666V-0.92334C214.283 -0.92334 213.833 -0.473493 213.833 0.0814209H215.833Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_2452)'/%3E%3C/svg%3E")`}),h.to(c.querySelector(".services-orange-border"),{duration:.5,ease:"power1.inOut",y:"12px",x:"-12px",stagger:.05}),c.animation=h}),t.forEach(c=>{c.anim=Tt.to(c,{duration:.5,ease:"power1.inOut",y:"12px",x:"-12px",stagger:.05,paused:!0})}),e.forEach(c=>{c.anim=Tt.to(c,{duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='281' height='266' viewBox='0 0 281 266' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_2452' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.342 78.5727C179.691 78.5727 214.833 43.4309 214.833 0.0814209C214.833 0.0787916 214.835 0.0766602 214.838 0.0766602L272.666 0.0766602C277.084 0.0766602 280.666 3.65838 280.666 8.07666V257.581C280.666 261.999 277.084 265.581 272.666 265.581H8.88281C4.46453 265.581 0.882812 261.999 0.882812 257.581V8.07666C0.882812 3.65839 4.46453 0.0766602 8.88281 0.0766602L57.8457 0.0766602C57.8483 0.0766602 57.8504 0.0787916 57.8504 0.0814209C57.8504 43.4309 92.9922 78.5727 136.342 78.5727Z' fill='%23060411'/%3E%3Cpath d='M213.833 0.0814209C213.833 42.8787 179.139 77.5727 136.342 77.5727V79.5727C180.244 79.5727 215.833 43.9832 215.833 0.0814209H213.833ZM214.838 1.07666H272.666V-0.92334H214.838V1.07666ZM279.666 8.07666V257.581H281.666V8.07666H279.666ZM272.666 264.581H8.88281V266.581H272.666V264.581ZM1.88281 257.581V8.07666H-0.117188V257.581H1.88281ZM8.88281 1.07666H57.8457V-0.92334H8.88281V1.07666ZM136.342 77.5727C93.5445 77.5727 58.8504 42.8787 58.8504 0.0814209H56.8504C56.8504 43.9832 92.4399 79.5727 136.342 79.5727V77.5727ZM57.8457 1.07666C57.296 1.07666 56.8504 0.631021 56.8504 0.0814209H58.8504C58.8504 -0.473438 58.4007 -0.92334 57.8457 -0.92334V1.07666ZM1.88281 8.07666C1.88281 4.21067 5.01682 1.07666 8.88281 1.07666V-0.92334C3.91225 -0.92334 -0.117188 3.1061 -0.117188 8.07666H1.88281ZM8.88281 264.581C5.01682 264.581 1.88281 261.447 1.88281 257.581H-0.117188C-0.117188 262.551 3.91225 266.581 8.88281 266.581V264.581ZM279.666 257.581C279.666 261.447 276.532 264.581 272.666 264.581V266.581C277.637 266.581 281.666 262.551 281.666 257.581H279.666ZM272.666 1.07666C276.532 1.07666 279.666 4.21067 279.666 8.07666H281.666C281.666 3.1061 277.637 -0.92334 272.666 -0.92334V1.07666ZM215.833 0.0814209C215.833 0.631077 215.387 1.07666 214.838 1.07666V-0.92334C214.283 -0.92334 213.833 -0.473493 213.833 0.0814209H215.833Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_2452)'/%3E%3C/svg%3E")`,paused:!0})})}),n.add("(min-width: 768px)",()=>{let i=Tt.to(r,{xPercent:-100*(r.length-1),ease:"none",scrollTrigger:{trigger:".areas-container",pin:!0,scrub:.1,end:"+=3000",invalidateOnRefresh:!0,smoothScroll:!0}});t.forEach(s=>{s.anim=Tt.to(s,{scrollTrigger:{trigger:s,toggleActions:"play reverse restart reverse",start:"left 50%",end:"right center",containerAnimation:i,invalidateOnRefresh:!0,smoothScroll:!0},duration:.5,ease:"power1.inOut",y:"1em",x:"-1em",stagger:.05})}),e.forEach(s=>{s.anim=Tt.to(s,{scrollTrigger:{trigger:s,toggleActions:"play reverse restart reverse",start:"left 50%",end:"right center",containerAnimation:i,invalidateOnRefresh:!0,smoothScroll:!0},duration:.01,backgroundImage:`url("data:image/svg+xml,%3Csvg width='325' height='353' viewBox='0 0 325 353' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_7987_163' fill='white'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M66.4168 8.207C66.024 3.81523 62.4827 0.235229 58.0733 0.235229H8C3.58172 0.235229 0 3.81694 0 8.23522V344.235C0 348.654 3.58173 352.235 8.00001 352.235H317C321.418 352.235 325 348.654 325 344.235V8.23523C325 3.81695 321.418 0.235229 317 0.235229H256.612C252.203 0.235229 248.661 3.81522 248.268 8.207C244.103 54.7658 204.985 91.2601 157.343 91.2601C109.7 91.2601 70.5817 54.7658 66.4168 8.207Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M66.4168 8.207C66.024 3.81523 62.4827 0.235229 58.0733 0.235229H8C3.58172 0.235229 0 3.81694 0 8.23522V344.235C0 348.654 3.58173 352.235 8.00001 352.235H317C321.418 352.235 325 348.654 325 344.235V8.23523C325 3.81695 321.418 0.235229 317 0.235229H256.612C252.203 0.235229 248.661 3.81522 248.268 8.207C244.103 54.7658 204.985 91.2601 157.343 91.2601C109.7 91.2601 70.5817 54.7658 66.4168 8.207Z' fill='%23060411'/%3E%3Cpath d='M248.268 8.207L249.264 8.2961L248.268 8.207ZM8 1.23523H58.0733V-0.764771H8V1.23523ZM1 344.235V8.23522H-1V344.235H1ZM317 351.235H8.00001V353.235H317V351.235ZM324 8.23523V344.235H326V8.23523H324ZM256.612 1.23523H317V-0.764771H256.612V1.23523ZM247.272 8.1179C243.153 54.1656 204.462 90.2601 157.343 90.2601V92.2601C205.507 92.2601 245.054 55.3659 249.264 8.2961L247.272 8.1179ZM157.343 90.2601C110.223 90.2601 71.532 54.1656 67.4128 8.11791L65.4208 8.2961C69.6314 55.3659 109.178 92.2601 157.343 92.2601V90.2601ZM256.612 -0.764771C251.631 -0.764771 247.706 3.26603 247.272 8.1179L249.264 8.2961C249.616 4.36441 252.774 1.23523 256.612 1.23523V-0.764771ZM326 8.23523C326 3.26467 321.971 -0.764771 317 -0.764771V1.23523C320.866 1.23523 324 4.36924 324 8.23523H326ZM317 353.235C321.971 353.235 326 349.206 326 344.235H324C324 348.101 320.866 351.235 317 351.235V353.235ZM-1 344.235C-1 349.206 3.02945 353.235 8.00001 353.235V351.235C4.13401 351.235 1 348.101 1 344.235H-1ZM58.0733 1.23523C61.9109 1.23523 65.0691 4.36441 65.4208 8.2961L67.4128 8.11791C66.9788 3.26604 63.0544 -0.764771 58.0733 -0.764771V1.23523ZM8 -0.764771C3.02944 -0.764771 -1 3.26466 -1 8.23522H1C1 4.36923 4.13401 1.23523 8 1.23523V-0.764771Z' fill='%23EEAA55' mask='url(%23path-1-inside-1_7987_163)'/%3E%3C/svg%3E")`})})})};Tt.registerPlugin(Vt);var $g=()=>{let r=document.querySelectorAll(".special_card-image-wrapper"),t=document.querySelectorAll(".special_card-content"),e=document.querySelector(".special_content");if(r.length===0&&t.length===0){console.warn("Special cards elements not found");return}let n=Tt.matchMedia();n.add("(min-width: 768px)",()=>{r.length!==0&&r.forEach((i,s)=>{let o=s===r.length-1;Tt.to(i,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)"},filter:o?"none":"brightness(50%) blur(10px)",scale:o?1:.6,scrollTrigger:{trigger:i,start:"+20% top",endTrigger:o?i:e,end:o?"bottom bottom":"bottom+=5% bottom",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!1,smoothScroll:!0}})})}),n.add("(max-width: 767px)",()=>{t.length!==0&&(n.add("(orientation: portrait)",()=>{t.forEach((i,s)=>{let o=s===t.length-1;Tt.to(i,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",opacity:1,scale:1},filter:o?"none":"brightness(50%) blur(10px)",opacity:o?1:0,scale:o?1:.75,scrollTrigger:{trigger:i,startTrigger:i,start:"top top",endTrigger:o?i:t[s+1],end:o?"bottom bottom":"top top-=100%",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!1,smoothScroll:!0}})})}),n.add("(orientation: landscape)",()=>{t.forEach((i,s)=>{let o=s===t.length-1;Tt.to(i,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",opacity:1,scale:1},filter:o?"none":"brightness(50%) blur(10px)",opacity:o?1:0,scale:o?1:.75,scrollTrigger:{trigger:i,startTrigger:i,start:"bottom bottom",endTrigger:o?i:t[s+1],end:o?"bottom bottom":"top top-=100%",pin:!0,pinSpacing:!1,id:"pin",scrub:1,invalidateOnRefresh:!1,smoothScroll:!0}})})}))})},Jg=()=>{let r=document.querySelector(".special_decors-wrapper"),t=document.querySelector(".special_decors");if(!r||!t){console.warn("Special assets elements not found");return}Tt.to(t,{scrollTrigger:{trigger:t,endTrigger:r,start:"top top",end:"bottom bottom",pin:!0,scrub:!0,invalidateOnRefresh:!1}})};Tt.registerPlugin(Vt);var Kg=()=>{let r=Tt.utils.toArray(".steps_item"),t=Tt.utils.toArray(".steps_item-line");if(!r)return;let e=Tt.matchMedia();e.add("(min-width: 992px)",()=>{t.forEach(i=>Tt.set(i,{opacity:0}));let n=Tt.timeline({defaults:{duration:4,ease:"none",immediateRender:!0},scrollTrigger:{trigger:"#steps-pin",start:()=>"top top",end:"clamp(bottom+=200% bottom)",pin:!0,scrub:!0,smoothScroll:!0,toggleActions:"play reverse play reverse"}});r.forEach((i,s)=>Tt.set(i,{x:`${s*-100}%`}));for(let i=1;i<=3;i++)n.to(r[i],{x:`${(i-1)*-100}%`},"<");return n.to(t[0],{opacity:1,duration:.5}),n.to(r[2],{x:0},"<"),n.to(r[3],{x:"-100%"},"<"),n.to(t[1],{opacity:1,duration:.5}),n.to(r[3],{x:0},"<"),n.to(t[2],{opacity:1,duration:.5}),n.set({},{},"+=1"),()=>{r.forEach(i=>Tt.set(i,{clearProps:"all"})),t.forEach(i=>Tt.set(i,{clearProps:"all"}))}}),e.add("(max-width: 991px)",()=>(r.forEach(n=>Tt.set(n,{clearProps:"all"})),t.forEach(n=>Tt.set(n,{clearProps:"all"})),Tt.set([r,t],{opacity:0,y:50}),r.forEach((n,i)=>{Tt.to(n,{scrollTrigger:{trigger:n,start:"top bottom-=100",end:"top center",toggleActions:"play none none reverse"},opacity:1,y:0,duration:.8,ease:"power2.out"}),t[i]&&Tt.to(t[i],{scrollTrigger:{trigger:n,start:"top bottom-=100",end:"top center",toggleActions:"play none none reverse"},opacity:1,y:0,duration:.8,delay:.2,ease:"power2.out"})}),()=>{Vt.getAll().forEach(n=>n.kill()),r.forEach(n=>Tt.set(n,{clearProps:"all"})),t.forEach(n=>Tt.set(n,{clearProps:"all"}))}))},jg=()=>{let r=document.getElementById("saturn-sticker"),t=document.getElementById("steps-section");Tt.timeline({scrollTrigger:{trigger:t}}).to(r,{opacity:1,duration:.5,ease:"power1.inOut"},"0.25").to(r,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(r,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(r,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"})};var e0=()=>{let r=document.querySelector(".mastery_techonologies-wrapper");if(!r)return;let t=r.querySelectorAll("img");t&&(window.innerWidth>991?t0(r,t):Qg(r,t),window.addEventListener("resize",function(){window.innerWidth>991?t0(r,t):Qg(r,t)},!0))};function Qg(r,t){r.innerHTML="",t.forEach(s=>{let o=document.createElement("figure");o.classList.add("mastery_techonologies_slide"),o.appendChild(s),r.appendChild(o)});let e=r.querySelectorAll(".mastery_techonologies_slide");Tt.set(e,{autoAlpha:1}),e.forEach((s,o)=>{Tt.set(s,{xPercent:100*o})});let n=Tt.utils.wrap(-100,(e.length-1)*100),i=e.length*2.5;Tt.to(e,{xPercent:`-=${e.length*100}`,duration:i,repeat:-1,ease:"none",modifiers:{xPercent:s=>n(parseFloat(s))}})}function t0(r,t){r.innerHTML="";let e=qv(t);e&&(Zv(r,e),$v(r))}function qv(r){let t=Math.floor(r.length/2)<11?Math.floor(r.length/2):11,e=Array.from({length:t},()=>[]),n=Math.floor(r.length/t),i=r.length%t,s=0;for(let o=0;o<t;o++){let a=n+(o<i?1:0);for(let l=0;l<a;l++)s<r.length&&(e[o].push(r[s]),s+=1)}return e}function Zv(r,t){r.innerHTML="",t.forEach(e=>{let n=document.createElement("div");n.classList.add("mastery_techonologies_vertical_slider"),e.forEach(i=>{let s=document.createElement("figure");s.classList.add("mastery_techonologies_vertical_slider_item"),s.appendChild(i),n.appendChild(s)}),r.appendChild(n)})}function $v(r){let t=r.querySelectorAll(".mastery_techonologies_vertical_slider"),e=parseInt(window.getComputedStyle(document.body).fontSize)*1.5;if(window.addEventListener("resize",function(){e=parseInt(window.getComputedStyle(document.body).fontSize)*1.5},!0),!t)return;function n(){t.forEach((i,s)=>{i.querySelectorAll(".mastery_techonologies_vertical_slider_item").forEach((a,l)=>{let c=l===0,h=window.getComputedStyle(a),f=new WebKitCSSMatrix(h.transform);Tt.fromTo(a,{y:c?(l+1)*e:f.f},{y:c?l*e:f.f-e,duration:.5,ease:"circ.out",delay:.1*s,onComplete:function(){c&&i.appendChild(a)}}).play()})})}n(),setInterval(n,5e3)}Tt.registerPlugin(Vt);var n0=()=>{document.querySelectorAll(".trust_grid > *").forEach((t,e)=>{let n=Kv(e),i=t.querySelector(".trust_years_counter"),s=t.querySelector(".trust_global_globe"),o=Jv(t),a=t.querySelector(".trust_rocket_wrapper"),l=t.querySelector("#trust-sticker");if(Tt.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1,toggleActions:"play pause pause reverse"}}).fromTo(t,{duration:1,opacity:0,y:100},{opacity:1,y:0,duration:.75},"<"),o&&o.forEach((c,h)=>{Tt.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(c,{opacity:0},{opacity:1,duration:.75,delay:h*.5},"<")}),l&&Tt.timeline({scrollTrigger:{trigger:t,start:n}}).to(l,{opacity:1,duration:.5,ease:"power1.inOut"}).to(l,{rotation:10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(l,{rotation:-10,duration:.5,yoyo:!0,ease:"power1.inOut"}).to(l,{rotation:0,duration:.5,yoyo:!0,ease:"power1.inOut"}),i){let c=new Date(2018,4,20),f=jv(c,new Date);Qv(f,i);let d=i.querySelector(".trust_years_counter_items");d&&Tt.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).to(d,{yPercent:-35,duration:.75,delay:.25},"<")}if(s&&Tt.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(s,{duration:1,opacity:0},{duration:.75,opacity:1,delay:.25},"<"),a){let c=a.querySelector(".rocket_line");c&&Tt.timeline({scrollTrigger:{trigger:t,start:n,scrub:!1}}).fromTo(c,{duration:1,width:0},{width:"calc(100% - 3.625em)",duration:1,ease:"power1.out",delay:0},"<")}})};function Jv(r){let t=[];return r.classList.contains("trust_partners")?t=r.querySelectorAll(".trust_logotype"):r.classList.contains("trust_launches")&&(t=r.querySelectorAll(".trust_launches_logotypes > img")),t}function Kv(r){return window.innerWidth>767?r===0?"-90% center":r===4?"-45% center":r===6?"-260% center":r===7?"-300% center":"-50% center":"center bottom"}function jv(r,t){let e=r.getFullYear(),n=r.getMonth(),i=r.getDate(),s=t.getFullYear(),o=t.getMonth(),a=t.getDate(),l=s-e;return(o<n||o===n&&a<i)&&(l-=1),l}function Qv(r,t){let e=[r-1,r,r+1],n=document.createElement("div");n.classList.add("trust_years_counter_items"),t.appendChild(n),e.forEach(i=>{let s=document.createElement("span");s.classList.add("trust_years_counter_item"),s.innerHTML=i,n.appendChild(s)})}var vd="164";var t1=0,i0=1,e1=2;var D_=1,Sd=2,sr=3,Gr=0,Un=1,ar=2,zr=0,Vr=1,r0=2,s0=3,o0=4,n1=5,Ps=100,i1=101,r1=102,s1=103,o1=104,a1=200,l1=201,c1=202,u1=203,Of=204,Bf=205,h1=206,f1=207,d1=208,p1=209,m1=210,g1=211,_1=212,x1=213,y1=214,v1=0,S1=1,M1=2,Rc=3,b1=4,w1=5,E1=6,T1=7,R_=0,A1=1,C1=2,Hr=0,D1=1,R1=2,P1=3,I1=4,L1=5,F1=6,N1=7;var P_=300,zo=301,Vo=302,kf=303,zf=304,iu=306,Vf=1e3,Ls=1001,Hf=1002,ri=1003,U1=1004;var sc=1005;var Mi=1006,nf=1007;var Fs=1008;var Wr=1009,O1=1010,B1=1011,I_=1012,L_=1013,Ho=1014,Br=1015,ru=1016,F_=1017,N_=1018,Qa=1020,k1=35902,z1=1021,V1=1022,Oi=1023,H1=1024,G1=1025,Oo=1026,$a=1027,W1=1028,U_=1029,X1=1030,O_=1031,B_=1033,rf=33776,sf=33777,of=33778,af=33779,a0=35840,l0=35841,c0=35842,u0=35843,h0=36196,f0=37492,d0=37496,p0=37808,m0=37809,g0=37810,_0=37811,x0=37812,y0=37813,v0=37814,S0=37815,M0=37816,b0=37817,w0=37818,E0=37819,T0=37820,A0=37821,lf=36492,C0=36494,D0=36495,Y1=36283,R0=36284,P0=36285,I0=36286;var Pc=2300,Ic=2301,cf=2302,L0=2400,F0=2401,N0=2402;var q1=3200,Z1=3201,$1=0,J1=1,Or="",ii="srgb",qr="srgb-linear",Md="display-p3",su="display-p3-linear",Lc="linear",Ae="srgb",Fc="rec709",Nc="p3";var xo=7680;var U0=519,K1=512,j1=513,Q1=514,k_=515,tS=516,eS=517,nS=518,iS=519,O0=35044;var B0="300 es",lr=2e3,Uc=2001,Xr=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s<o;s++)i[s].call(this,t);t.target=null}}},pn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var uf=Math.PI/180,Gf=180/Math.PI;function tl(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(pn[r&255]+pn[r>>8&255]+pn[r>>16&255]+pn[r>>24&255]+"-"+pn[t&255]+pn[t>>8&255]+"-"+pn[t>>16&15|64]+pn[t>>24&255]+"-"+pn[e&63|128]+pn[e>>8&255]+"-"+pn[e>>16&255]+pn[e>>24&255]+pn[n&255]+pn[n>>8&255]+pn[n>>16&255]+pn[n>>24&255]).toLowerCase()}function Nn(r,t,e){return Math.max(t,Math.min(e,r))}function rS(r,t){return(r%t+t)%t}function hf(r,t,e){return(1-e)*r+e*t}function Ha(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Fn(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var xe=class r{constructor(t=0,e=0){r.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(Nn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},ae=class r{constructor(t,e,n,i,s,o,a,l,c){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c)}set(t,e,n,i,s,o,a,l,c){let h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=l,h[6]=n,h[7]=o,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],h=n[4],f=n[7],d=n[2],u=n[5],_=n[8],p=i[0],m=i[3],g=i[6],b=i[1],v=i[4],S=i[7],C=i[2],T=i[5],w=i[8];return s[0]=o*p+a*b+l*C,s[3]=o*m+a*v+l*T,s[6]=o*g+a*S+l*w,s[1]=c*p+h*b+f*C,s[4]=c*m+h*v+f*T,s[7]=c*g+h*S+f*w,s[2]=d*p+u*b+_*C,s[5]=d*m+u*v+_*T,s[8]=d*g+u*S+_*w,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8];return e*o*h-e*a*c-n*s*h+n*a*l+i*s*c-i*o*l}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=h*o-a*c,d=a*l-h*s,u=c*s-o*l,_=e*f+n*d+i*u;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/_;return t[0]=f*p,t[1]=(i*c-h*n)*p,t[2]=(a*n-i*o)*p,t[3]=d*p,t[4]=(h*e-i*l)*p,t[5]=(i*s-a*e)*p,t[6]=u*p,t[7]=(n*l-c*e)*p,t[8]=(o*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,o,a){let l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+t,-i*c,i*l,-i*(-c*o+l*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ff.makeScale(t,e)),this}rotate(t){return this.premultiply(ff.makeRotation(-t)),this}translate(t,e){return this.premultiply(ff.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},ff=new ae;function z_(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function Oc(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function sS(){let r=Oc("canvas");return r.style.display="block",r}var k0={};function oS(r){r in k0||(k0[r]=!0,console.warn(r))}var z0=new ae().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),V0=new ae().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),oc={[qr]:{transfer:Lc,primaries:Fc,toReference:r=>r,fromReference:r=>r},[ii]:{transfer:Ae,primaries:Fc,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[su]:{transfer:Lc,primaries:Nc,toReference:r=>r.applyMatrix3(V0),fromReference:r=>r.applyMatrix3(z0)},[Md]:{transfer:Ae,primaries:Nc,toReference:r=>r.convertSRGBToLinear().applyMatrix3(V0),fromReference:r=>r.applyMatrix3(z0).convertLinearToSRGB()}},aS=new Set([qr,su]),Me={enabled:!0,_workingColorSpace:qr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!aS.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,t,e){if(this.enabled===!1||t===e||!t||!e)return r;let n=oc[t].toReference,i=oc[e].fromReference;return i(n(r))},fromWorkingColorSpace:function(r,t){return this.convert(r,this._workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this._workingColorSpace)},getPrimaries:function(r){return oc[r].primaries},getTransfer:function(r){return r===Or?Lc:oc[r].transfer}};function Bo(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function df(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var yo,Wf=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{yo===void 0&&(yo=Oc("canvas")),yo.width=t.width,yo.height=t.height;let n=yo.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=yo}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Oc("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=Bo(s[o]/255)*255;return n.putImageData(i,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(Bo(e[n]/255)*255):e[n]=Bo(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},lS=0,Bc=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:lS++}),this.uuid=tl(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(pf(i[o].image)):s.push(pf(i[o]))}else s=pf(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function pf(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?Wf.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var cS=0,ai=class r extends Xr{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=Ls,i=Ls,s=Mi,o=Fs,a=Oi,l=Wr,c=r.DEFAULT_ANISOTROPY,h=Or){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:cS++}),this.uuid=tl(),this.name="",this.source=new Bc(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ae,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==P_)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Vf:t.x=t.x-Math.floor(t.x);break;case Ls:t.x=t.x<0?0:1;break;case Hf:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Vf:t.y=t.y-Math.floor(t.y);break;case Ls:t.y=t.y<0?0:1;break;case Hf:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};ai.DEFAULT_IMAGE=null;ai.DEFAULT_MAPPING=P_;ai.DEFAULT_ANISOTROPY=1;var tn=class r{constructor(t=0,e=0,n=0,i=1){r.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,l=t.elements,c=l[0],h=l[4],f=l[8],d=l[1],u=l[5],_=l[9],p=l[2],m=l[6],g=l[10];if(Math.abs(h-d)<.01&&Math.abs(f-p)<.01&&Math.abs(_-m)<.01){if(Math.abs(h+d)<.1&&Math.abs(f+p)<.1&&Math.abs(_+m)<.1&&Math.abs(c+u+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let v=(c+1)/2,S=(u+1)/2,C=(g+1)/2,T=(h+d)/4,w=(f+p)/4,P=(_+m)/4;return v>S&&v>C?v<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(v),i=T/n,s=w/n):S>C?S<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(S),n=T/i,s=P/i):C<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(C),n=w/s,i=P/s),this.set(n,i,s,e),this}let b=Math.sqrt((m-_)*(m-_)+(f-p)*(f-p)+(d-h)*(d-h));return Math.abs(b)<.001&&(b=1),this.x=(m-_)/b,this.y=(f-p)/b,this.z=(d-h)/b,this.w=Math.acos((c+u+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Xf=class extends Xr{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new tn(0,0,t,e),this.scissorTest=!1,this.viewport=new tn(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Mi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new ai(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];let o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,s=this.textures.length;i<s;i++)this.textures[i].image.width=t,this.textures[i].image.height=e,this.textures[i].image.depth=n;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,i=t.textures.length;n<i;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Bc(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},cr=class extends Xf{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},kc=class extends ai{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ri,this.minFilter=ri,this.wrapR=Ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yf=class extends ai{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ri,this.minFilter=ri,this.wrapR=Ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yr=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let l=n[i+0],c=n[i+1],h=n[i+2],f=n[i+3],d=s[o+0],u=s[o+1],_=s[o+2],p=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=h,t[e+3]=f;return}if(a===1){t[e+0]=d,t[e+1]=u,t[e+2]=_,t[e+3]=p;return}if(f!==p||l!==d||c!==u||h!==_){let m=1-a,g=l*d+c*u+h*_+f*p,b=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){let C=Math.sqrt(v),T=Math.atan2(C,g*b);m=Math.sin(m*T)/C,a=Math.sin(a*T)/C}let S=a*b;if(l=l*m+d*S,c=c*m+u*S,h=h*m+_*S,f=f*m+p*S,m===1-a){let C=1/Math.sqrt(l*l+c*c+h*h+f*f);l*=C,c*=C,h*=C,f*=C}}t[e]=l,t[e+1]=c,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],h=n[i+3],f=s[o],d=s[o+1],u=s[o+2],_=s[o+3];return t[e]=a*_+h*f+l*u-c*d,t[e+1]=l*_+h*d+c*f-a*u,t[e+2]=c*_+h*u+a*d-l*f,t[e+3]=h*_-a*f-l*d-c*u,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,l=Math.sin,c=a(n/2),h=a(i/2),f=a(s/2),d=l(n/2),u=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=d*h*f+c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f-d*u*_;break;case"YXZ":this._x=d*h*f+c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f+d*u*_;break;case"ZXY":this._x=d*h*f-c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f-d*u*_;break;case"ZYX":this._x=d*h*f-c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f+d*u*_;break;case"YZX":this._x=d*h*f+c*u*_,this._y=c*u*f+d*h*_,this._z=c*h*_-d*u*f,this._w=c*h*f-d*u*_;break;case"XZY":this._x=d*h*f-c*u*_,this._y=c*u*f-d*h*_,this._z=c*h*_+d*u*f,this._w=c*h*f+d*u*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],l=e[9],c=e[2],h=e[6],f=e[10],d=n+a+f;if(d>0){let u=.5/Math.sqrt(d+1);this._w=.25/u,this._x=(h-l)*u,this._y=(s-c)*u,this._z=(o-i)*u}else if(n>a&&n>f){let u=2*Math.sqrt(1+n-a-f);this._w=(h-l)/u,this._x=.25*u,this._y=(i+o)/u,this._z=(s+c)/u}else if(a>f){let u=2*Math.sqrt(1+a-n-f);this._w=(s-c)/u,this._x=(i+o)/u,this._y=.25*u,this._z=(l+h)/u}else{let u=2*Math.sqrt(1+f-n-a);this._w=(o-i)/u,this._x=(s+c)/u,this._y=(l+h)/u,this._z=.25*u}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Nn(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,l=e._y,c=e._z,h=e._w;return this._x=n*h+o*a+i*c-s*l,this._y=i*h+o*l+s*a-n*c,this._z=s*h+o*c+n*l-i*a,this._w=o*h-n*a-i*l-s*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let l=1-a*a;if(l<=Number.EPSILON){let u=1-e;return this._w=u*o+e*this._w,this._x=u*n+e*this._x,this._y=u*i+e*this._y,this._z=u*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),h=Math.atan2(c,a),f=Math.sin((1-e)*h)/c,d=Math.sin(e*h)/c;return this._w=o*f+this._w*d,this._x=n*f+this._x*d,this._y=i*f+this._y*d,this._z=s*f+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},it=class r{constructor(t=0,e=0,n=0){r.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(H0.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(H0.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,l=t.w,c=2*(o*i-a*n),h=2*(a*e-s*i),f=2*(s*n-o*e);return this.x=e+l*c+o*f-a*h,this.y=n+l*h+a*c-s*f,this.z=i+l*f+s*h-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return this.x=i*l-s*a,this.y=s*o-n*l,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return mf.copy(this).projectOnVector(t),this.sub(mf)}reflect(t){return this.sub(mf.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(Nn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},mf=new it,H0=new Yr,Ns=class{constructor(t=new it(1/0,1/0,1/0),e=new it(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(yi.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(yi.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=yi.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let s=n.getAttribute("position");if(e===!0&&s!==void 0&&t.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)t.isMesh===!0?t.getVertexPosition(o,yi):yi.fromBufferAttribute(s,o),yi.applyMatrix4(t.matrixWorld),this.expandByPoint(yi);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),ac.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),ac.copy(n.boundingBox)),ac.applyMatrix4(t.matrixWorld),this.union(ac)}let i=t.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],e);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,yi),yi.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ga),lc.subVectors(this.max,Ga),vo.subVectors(t.a,Ga),So.subVectors(t.b,Ga),Mo.subVectors(t.c,Ga),Pr.subVectors(So,vo),Ir.subVectors(Mo,So),ws.subVectors(vo,Mo);let e=[0,-Pr.z,Pr.y,0,-Ir.z,Ir.y,0,-ws.z,ws.y,Pr.z,0,-Pr.x,Ir.z,0,-Ir.x,ws.z,0,-ws.x,-Pr.y,Pr.x,0,-Ir.y,Ir.x,0,-ws.y,ws.x,0];return!gf(e,vo,So,Mo,lc)||(e=[1,0,0,0,1,0,0,0,1],!gf(e,vo,So,Mo,lc))?!1:(cc.crossVectors(Pr,Ir),e=[cc.x,cc.y,cc.z],gf(e,vo,So,Mo,lc))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,yi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(yi).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(tr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),tr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),tr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),tr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),tr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),tr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),tr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),tr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(tr),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},tr=[new it,new it,new it,new it,new it,new it,new it,new it],yi=new it,ac=new Ns,vo=new it,So=new it,Mo=new it,Pr=new it,Ir=new it,ws=new it,Ga=new it,lc=new it,cc=new it,Es=new it;function gf(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){Es.fromArray(r,s);let a=i.x*Math.abs(Es.x)+i.y*Math.abs(Es.y)+i.z*Math.abs(Es.z),l=t.dot(Es),c=e.dot(Es),h=n.dot(Es);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>a)return!1}return!0}var uS=new Ns,Wa=new it,_f=new it,Go=class{constructor(t=new it,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):uS.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;s<o;s++)i=Math.max(i,n.distanceToSquared(t[s]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Wa.subVectors(t,this.center);let e=Wa.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Wa,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(_f.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Wa.copy(t.center).add(_f)),this.expandByPoint(Wa.copy(t.center).sub(_f))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},er=new it,xf=new it,uc=new it,Lr=new it,yf=new it,hc=new it,vf=new it,zc=class{constructor(t=new it,e=new it(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,er)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=er.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(er.copy(this.origin).addScaledVector(this.direction,e),er.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){xf.copy(t).add(e).multiplyScalar(.5),uc.copy(e).sub(t).normalize(),Lr.copy(this.origin).sub(xf);let s=t.distanceTo(e)*.5,o=-this.direction.dot(uc),a=Lr.dot(this.direction),l=-Lr.dot(uc),c=Lr.lengthSq(),h=Math.abs(1-o*o),f,d,u,_;if(h>0)if(f=o*l-a,d=o*a-l,_=s*h,f>=0)if(d>=-_)if(d<=_){let p=1/h;f*=p,d*=p,u=f*(f+o*d+2*a)+d*(o*f+d+2*l)+c}else d=s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;else d=-s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;else d<=-_?(f=Math.max(0,-(-o*s+a)),d=f>0?-s:Math.min(Math.max(-s,-l),s),u=-f*f+d*(d+2*l)+c):d<=_?(f=0,d=Math.min(Math.max(-s,-l),s),u=d*(d+2*l)+c):(f=Math.max(0,-(o*s+a)),d=f>0?s:Math.min(Math.max(-s,-l),s),u=-f*f+d*(d+2*l)+c);else d=o>0?-s:s,f=Math.max(0,-(o*d+a)),u=-f*f+d*(d+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(xf).addScaledVector(uc,d),u}intersectSphere(t,e){er.subVectors(t.center,this.origin);let n=er.dot(this.direction),i=er.dot(er)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,l,c=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,d=this.origin;return c>=0?(n=(t.min.x-d.x)*c,i=(t.max.x-d.x)*c):(n=(t.max.x-d.x)*c,i=(t.min.x-d.x)*c),h>=0?(s=(t.min.y-d.y)*h,o=(t.max.y-d.y)*h):(s=(t.max.y-d.y)*h,o=(t.min.y-d.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),f>=0?(a=(t.min.z-d.z)*f,l=(t.max.z-d.z)*f):(a=(t.max.z-d.z)*f,l=(t.min.z-d.z)*f),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,er)!==null}intersectTriangle(t,e,n,i,s){yf.subVectors(e,t),hc.subVectors(n,t),vf.crossVectors(yf,hc);let o=this.direction.dot(vf),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Lr.subVectors(this.origin,t);let l=a*this.direction.dot(hc.crossVectors(Lr,hc));if(l<0)return null;let c=a*this.direction.dot(yf.cross(Lr));if(c<0||l+c>o)return null;let h=-a*Lr.dot(vf);return h<0?null:this.at(h/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Be=class r{constructor(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m)}set(t,e,n,i,s,o,a,l,c,h,f,d,u,_,p,m){let g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=h,g[10]=f,g[14]=d,g[3]=u,g[7]=_,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new r().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/bo.setFromMatrixColumn(t,0).length(),s=1/bo.setFromMatrixColumn(t,1).length(),o=1/bo.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let d=o*h,u=o*f,_=a*h,p=a*f;e[0]=l*h,e[4]=-l*f,e[8]=c,e[1]=u+_*c,e[5]=d-p*c,e[9]=-a*l,e[2]=p-d*c,e[6]=_+u*c,e[10]=o*l}else if(t.order==="YXZ"){let d=l*h,u=l*f,_=c*h,p=c*f;e[0]=d+p*a,e[4]=_*a-u,e[8]=o*c,e[1]=o*f,e[5]=o*h,e[9]=-a,e[2]=u*a-_,e[6]=p+d*a,e[10]=o*l}else if(t.order==="ZXY"){let d=l*h,u=l*f,_=c*h,p=c*f;e[0]=d-p*a,e[4]=-o*f,e[8]=_+u*a,e[1]=u+_*a,e[5]=o*h,e[9]=p-d*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let d=o*h,u=o*f,_=a*h,p=a*f;e[0]=l*h,e[4]=_*c-u,e[8]=d*c+p,e[1]=l*f,e[5]=p*c+d,e[9]=u*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let d=o*l,u=o*c,_=a*l,p=a*c;e[0]=l*h,e[4]=p-d*f,e[8]=_*f+u,e[1]=f,e[5]=o*h,e[9]=-a*h,e[2]=-c*h,e[6]=u*f+_,e[10]=d-p*f}else if(t.order==="XZY"){let d=o*l,u=o*c,_=a*l,p=a*c;e[0]=l*h,e[4]=-f,e[8]=c*h,e[1]=d*f+p,e[5]=o*h,e[9]=u*f-_,e[2]=_*f-u,e[6]=a*h,e[10]=p*f+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(hS,t,fS)}lookAt(t,e,n){let i=this.elements;return Gn.subVectors(t,e),Gn.lengthSq()===0&&(Gn.z=1),Gn.normalize(),Fr.crossVectors(n,Gn),Fr.lengthSq()===0&&(Math.abs(n.z)===1?Gn.x+=1e-4:Gn.z+=1e-4,Gn.normalize(),Fr.crossVectors(n,Gn)),Fr.normalize(),fc.crossVectors(Gn,Fr),i[0]=Fr.x,i[4]=fc.x,i[8]=Gn.x,i[1]=Fr.y,i[5]=fc.y,i[9]=Gn.y,i[2]=Fr.z,i[6]=fc.z,i[10]=Gn.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],h=n[1],f=n[5],d=n[9],u=n[13],_=n[2],p=n[6],m=n[10],g=n[14],b=n[3],v=n[7],S=n[11],C=n[15],T=i[0],w=i[4],P=i[8],M=i[12],y=i[1],I=i[5],N=i[9],D=i[13],V=i[2],K=i[6],W=i[10],Z=i[14],z=i[3],U=i[7],R=i[11],lt=i[15];return s[0]=o*T+a*y+l*V+c*z,s[4]=o*w+a*I+l*K+c*U,s[8]=o*P+a*N+l*W+c*R,s[12]=o*M+a*D+l*Z+c*lt,s[1]=h*T+f*y+d*V+u*z,s[5]=h*w+f*I+d*K+u*U,s[9]=h*P+f*N+d*W+u*R,s[13]=h*M+f*D+d*Z+u*lt,s[2]=_*T+p*y+m*V+g*z,s[6]=_*w+p*I+m*K+g*U,s[10]=_*P+p*N+m*W+g*R,s[14]=_*M+p*D+m*Z+g*lt,s[3]=b*T+v*y+S*V+C*z,s[7]=b*w+v*I+S*K+C*U,s[11]=b*P+v*N+S*W+C*R,s[15]=b*M+v*D+S*Z+C*lt,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],l=t[9],c=t[13],h=t[2],f=t[6],d=t[10],u=t[14],_=t[3],p=t[7],m=t[11],g=t[15];return _*(+s*l*f-i*c*f-s*a*d+n*c*d+i*a*u-n*l*u)+p*(+e*l*u-e*c*d+s*o*d-i*o*u+i*c*h-s*l*h)+m*(+e*c*f-e*a*u-s*o*f+n*o*u+s*a*h-n*c*h)+g*(-i*a*h-e*l*f+e*a*d+i*o*f-n*o*d+n*l*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=t[9],d=t[10],u=t[11],_=t[12],p=t[13],m=t[14],g=t[15],b=f*m*c-p*d*c+p*l*u-a*m*u-f*l*g+a*d*g,v=_*d*c-h*m*c-_*l*u+o*m*u+h*l*g-o*d*g,S=h*p*c-_*f*c+_*a*u-o*p*u-h*a*g+o*f*g,C=_*f*l-h*p*l-_*a*d+o*p*d+h*a*m-o*f*m,T=e*b+n*v+i*S+s*C;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let w=1/T;return t[0]=b*w,t[1]=(p*d*s-f*m*s-p*i*u+n*m*u+f*i*g-n*d*g)*w,t[2]=(a*m*s-p*l*s+p*i*c-n*m*c-a*i*g+n*l*g)*w,t[3]=(f*l*s-a*d*s-f*i*c+n*d*c+a*i*u-n*l*u)*w,t[4]=v*w,t[5]=(h*m*s-_*d*s+_*i*u-e*m*u-h*i*g+e*d*g)*w,t[6]=(_*l*s-o*m*s-_*i*c+e*m*c+o*i*g-e*l*g)*w,t[7]=(o*d*s-h*l*s+h*i*c-e*d*c-o*i*u+e*l*u)*w,t[8]=S*w,t[9]=(_*f*s-h*p*s-_*n*u+e*p*u+h*n*g-e*f*g)*w,t[10]=(o*p*s-_*a*s+_*n*c-e*p*c-o*n*g+e*a*g)*w,t[11]=(h*a*s-o*f*s-h*n*c+e*f*c+o*n*u-e*a*u)*w,t[12]=C*w,t[13]=(h*p*i-_*f*i+_*n*d-e*p*d-h*n*m+e*f*m)*w,t[14]=(_*a*i-o*p*i-_*n*l+e*p*l+o*n*m-e*a*m)*w,t[15]=(o*f*i-h*a*i+h*n*l-e*f*l-o*n*d+e*a*d)*w,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,l=t.z,c=s*o,h=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,h*a+n,h*l-i*o,0,c*l-i*a,h*l+i*o,s*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,l=e._w,c=s+s,h=o+o,f=a+a,d=s*c,u=s*h,_=s*f,p=o*h,m=o*f,g=a*f,b=l*c,v=l*h,S=l*f,C=n.x,T=n.y,w=n.z;return i[0]=(1-(p+g))*C,i[1]=(u+S)*C,i[2]=(_-v)*C,i[3]=0,i[4]=(u-S)*T,i[5]=(1-(d+g))*T,i[6]=(m+b)*T,i[7]=0,i[8]=(_+v)*w,i[9]=(m-b)*w,i[10]=(1-(d+p))*w,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=bo.set(i[0],i[1],i[2]).length(),o=bo.set(i[4],i[5],i[6]).length(),a=bo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],vi.copy(this);let c=1/s,h=1/o,f=1/a;return vi.elements[0]*=c,vi.elements[1]*=c,vi.elements[2]*=c,vi.elements[4]*=h,vi.elements[5]*=h,vi.elements[6]*=h,vi.elements[8]*=f,vi.elements[9]*=f,vi.elements[10]*=f,e.setFromRotationMatrix(vi),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=lr){let l=this.elements,c=2*s/(e-t),h=2*s/(n-i),f=(e+t)/(e-t),d=(n+i)/(n-i),u,_;if(a===lr)u=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===Uc)u=-o/(o-s),_=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=h,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=u,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=lr){let l=this.elements,c=1/(e-t),h=1/(n-i),f=1/(o-s),d=(e+t)*c,u=(n+i)*h,_,p;if(a===lr)_=(o+s)*f,p=-2*f;else if(a===Uc)_=s*f,p=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-u,l[2]=0,l[6]=0,l[10]=p,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},bo=new it,vi=new Be,hS=new it(0,0,0),fS=new it(1,1,1),Fr=new it,fc=new it,Gn=new it,G0=new Be,W0=new Yr,ur=class r{constructor(t=0,e=0,n=0,i=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],h=i[9],f=i[2],d=i[6],u=i[10];switch(e){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,u),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,u),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-f,u),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Nn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(d,u),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Nn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,u));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,u),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return G0.makeRotationFromQuaternion(t),this.setFromRotationMatrix(G0,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return W0.setFromEuler(this),this.setFromQuaternion(W0,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};ur.DEFAULT_ORDER="XYZ";var Vc=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},dS=0,X0=new it,wo=new Yr,nr=new Be,dc=new it,Xa=new it,pS=new it,mS=new Yr,Y0=new it(1,0,0),q0=new it(0,1,0),Z0=new it(0,0,1),$0={type:"added"},gS={type:"removed"},Eo={type:"childadded",child:null},Sf={type:"childremoved",child:null},gn=class r extends Xr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:dS++}),this.uuid=tl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new it,e=new ur,n=new Yr,i=new it(1,1,1);function s(){n.setFromEuler(e,!1)}function o(){e.setFromQuaternion(n,void 0,!1)}e._onChange(s),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Be},normalMatrix:{value:new ae}}),this.matrix=new Be,this.matrixWorld=new Be,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Vc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return wo.setFromAxisAngle(t,e),this.quaternion.multiply(wo),this}rotateOnWorldAxis(t,e){return wo.setFromAxisAngle(t,e),this.quaternion.premultiply(wo),this}rotateX(t){return this.rotateOnAxis(Y0,t)}rotateY(t){return this.rotateOnAxis(q0,t)}rotateZ(t){return this.rotateOnAxis(Z0,t)}translateOnAxis(t,e){return X0.copy(t).applyQuaternion(this.quaternion),this.position.add(X0.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Y0,t)}translateY(t){return this.translateOnAxis(q0,t)}translateZ(t){return this.translateOnAxis(Z0,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(nr.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?dc.copy(t):dc.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Xa.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nr.lookAt(Xa,dc,this.up):nr.lookAt(dc,Xa,this.up),this.quaternion.setFromRotationMatrix(nr),i&&(nr.extractRotation(i.matrixWorld),wo.setFromRotationMatrix(nr),this.quaternion.premultiply(wo.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent($0),Eo.child=t,this.dispatchEvent(Eo),Eo.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(gS),Sf.child=t,this.dispatchEvent(Sf),Sf.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),nr.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),nr.multiply(t.parent.matrixWorld)),t.applyMatrix4(nr),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent($0),Eo.child=t,this.dispatchEvent(Eo),Eo.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){let o=this.children[n].getObjectByProperty(t,e);if(o!==void 0)return o}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);let i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xa,t,pS),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xa,mS,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){let e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let e=this.children;for(let n=0,i=e.length;n<i;n++){let s=e[n];(s.matrixWorldAutoUpdate===!0||t===!0)&&s.updateMatrixWorld(t)}}updateWorldMatrix(t,e){let n=this.parent;if(t===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0){let i=this.children;for(let s=0,o=i.length;s<o;s++){let a=i[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(t){let e=t===void 0||typeof t=="string",n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let l=a.shapes;if(Array.isArray(l))for(let c=0,h=l.length;c<h;c++){let f=l[c];s(t.shapes,f)}else s(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(t.materials,this.material[l]));i.material=a}else i.material=s(t.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){let l=this.animations[a];i.animations.push(s(t.animations,l))}}if(e){let a=o(t.geometries),l=o(t.materials),c=o(t.textures),h=o(t.images),f=o(t.shapes),d=o(t.skeletons),u=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),d.length>0&&(n.skeletons=d),u.length>0&&(n.animations=u),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let h=a[c];delete h.metadata,l.push(h)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};gn.DEFAULT_UP=new it(0,1,0);gn.DEFAULT_MATRIX_AUTO_UPDATE=!0;gn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var Si=new it,ir=new it,Mf=new it,rr=new it,To=new it,Ao=new it,J0=new it,bf=new it,wf=new it,Ef=new it,No=class r{constructor(t=new it,e=new it,n=new it){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),Si.subVectors(t,e),i.cross(Si);let s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){Si.subVectors(i,e),ir.subVectors(n,e),Mf.subVectors(t,e);let o=Si.dot(Si),a=Si.dot(ir),l=Si.dot(Mf),c=ir.dot(ir),h=ir.dot(Mf),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;let d=1/f,u=(c*l-a*h)*d,_=(o*h-a*l)*d;return s.set(1-u-_,_,u)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,rr)===null?!1:rr.x>=0&&rr.y>=0&&rr.x+rr.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,rr)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,rr.x),l.addScaledVector(o,rr.y),l.addScaledVector(a,rr.z),l)}static isFrontFacing(t,e,n,i){return Si.subVectors(n,e),ir.subVectors(t,e),Si.cross(ir).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Si.subVectors(this.c,this.b),ir.subVectors(this.a,this.b),Si.cross(ir).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return r.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return r.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,s){return r.getInterpolation(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return r.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return r.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;To.subVectors(i,n),Ao.subVectors(s,n),bf.subVectors(t,n);let l=To.dot(bf),c=Ao.dot(bf);if(l<=0&&c<=0)return e.copy(n);wf.subVectors(t,i);let h=To.dot(wf),f=Ao.dot(wf);if(h>=0&&f<=h)return e.copy(i);let d=l*f-h*c;if(d<=0&&l>=0&&h<=0)return o=l/(l-h),e.copy(n).addScaledVector(To,o);Ef.subVectors(t,s);let u=To.dot(Ef),_=Ao.dot(Ef);if(_>=0&&u<=_)return e.copy(s);let p=u*c-l*_;if(p<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(Ao,a);let m=h*_-u*f;if(m<=0&&f-h>=0&&u-_>=0)return J0.subVectors(s,i),a=(f-h)/(f-h+(u-_)),e.copy(i).addScaledVector(J0,a);let g=1/(m+p+d);return o=p*g,a=d*g,e.copy(n).addScaledVector(To,o).addScaledVector(Ao,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},V_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Nr={h:0,s:0,l:0},pc={h:0,s:0,l:0};function Tf(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}var _e=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=ii){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Me.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Me.workingColorSpace){return this.r=t,this.g=e,this.b=n,Me.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Me.workingColorSpace){if(t=rS(t,1),e=Nn(e,0,1),n=Nn(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Tf(o,s,t+1/3),this.g=Tf(o,s,t),this.b=Tf(o,s,t-1/3)}return Me.toWorkingColorSpace(this,i),this}setStyle(t,e=ii){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(o===6)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=ii){let n=V_[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Bo(t.r),this.g=Bo(t.g),this.b=Bo(t.b),this}copyLinearToSRGB(t){return this.r=df(t.r),this.g=df(t.g),this.b=df(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=ii){return Me.fromWorkingColorSpace(mn.copy(this),t),Math.round(Nn(mn.r*255,0,255))*65536+Math.round(Nn(mn.g*255,0,255))*256+Math.round(Nn(mn.b*255,0,255))}getHexString(t=ii){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Me.workingColorSpace){Me.fromWorkingColorSpace(mn.copy(this),e);let n=mn.r,i=mn.g,s=mn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,h=(a+o)/2;if(a===o)l=0,c=0;else{let f=o-a;switch(c=h<=.5?f/(o+a):f/(2-o-a),o){case n:l=(i-s)/f+(i<s?6:0);break;case i:l=(s-n)/f+2;break;case s:l=(n-i)/f+4;break}l/=6}return t.h=l,t.s=c,t.l=h,t}getRGB(t,e=Me.workingColorSpace){return Me.fromWorkingColorSpace(mn.copy(this),e),t.r=mn.r,t.g=mn.g,t.b=mn.b,t}getStyle(t=ii){Me.fromWorkingColorSpace(mn.copy(this),t);let e=mn.r,n=mn.g,i=mn.b;return t!==ii?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(t,e,n){return this.getHSL(Nr),this.setHSL(Nr.h+t,Nr.s+e,Nr.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Nr),t.getHSL(pc);let n=hf(Nr.h,pc.h,e),i=hf(Nr.s,pc.s,e),s=hf(Nr.l,pc.l,e);return this.setHSL(n,i,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,i=this.b,s=t.elements;return this.r=s[0]*e+s[3]*n+s[6]*i,this.g=s[1]*e+s[4]*n+s[7]*i,this.b=s[2]*e+s[5]*n+s[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},mn=new _e;_e.NAMES=V_;var _S=0,Us=class extends Xr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_S++}),this.uuid=tl(),this.name="",this.type="Material",this.blending=Vr,this.side=Gr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Of,this.blendDst=Bf,this.blendEquation=Ps,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _e(0,0,0),this.blendAlpha=0,this.depthFunc=Rc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=U0,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xo,this.stencilZFail=xo,this.stencilZPass=xo,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}let i=this[e];if(i===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Vr&&(n.blending=this.blending),this.side!==Gr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Of&&(n.blendSrc=this.blendSrc),this.blendDst!==Bf&&(n.blendDst=this.blendDst),this.blendEquation!==Ps&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Rc&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==U0&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xo&&(n.stencilFail=this.stencilFail),this.stencilZFail!==xo&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==xo&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let l=s[a];delete l.metadata,o.push(l)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Hc=class extends Us{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _e(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ur,this.combine=R_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}};var Ge=new it,mc=new xe,si=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=O0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Br,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return oS("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)mc.fromBufferAttribute(this,e),mc.applyMatrix3(t),this.setXY(e,mc.x,mc.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyMatrix3(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyMatrix4(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.applyNormalMatrix(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ge.fromBufferAttribute(this,e),Ge.transformDirection(t),this.setXYZ(e,Ge.x,Ge.y,Ge.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Ha(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Fn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Ha(e,this.array)),e}setX(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Ha(e,this.array)),e}setY(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Ha(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Ha(e,this.array)),e}setW(t,e){return this.normalized&&(e=Fn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array),i=Fn(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,s){return t*=this.itemSize,this.normalized&&(e=Fn(e,this.array),n=Fn(n,this.array),i=Fn(i,this.array),s=Fn(s,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=s,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==O0&&(t.usage=this.usage),t}};var Gc=class extends si{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var Wc=class extends si{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var oi=class extends si{constructor(t,e,n){super(new Float32Array(t),e,n)}},xS=0,ni=new Be,Af=new gn,Co=new it,Wn=new Ns,Ya=new Ns,Qe=new it,Bi=class r extends Xr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:xS++}),this.uuid=tl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(z_(t)?Wc:Gc)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let s=new ae().getNormalMatrix(t);n.applyNormalMatrix(s),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return ni.makeRotationFromQuaternion(t),this.applyMatrix4(ni),this}rotateX(t){return ni.makeRotationX(t),this.applyMatrix4(ni),this}rotateY(t){return ni.makeRotationY(t),this.applyMatrix4(ni),this}rotateZ(t){return ni.makeRotationZ(t),this.applyMatrix4(ni),this}translate(t,e,n){return ni.makeTranslation(t,e,n),this.applyMatrix4(ni),this}scale(t,e,n){return ni.makeScale(t,e,n),this.applyMatrix4(ni),this}lookAt(t){return Af.lookAt(t),Af.updateMatrix(),this.applyMatrix4(Af.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Co).negate(),this.translate(Co.x,Co.y,Co.z),this}setFromPoints(t){let e=[];for(let n=0,i=t.length;n<i;n++){let s=t[n];e.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new oi(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ns);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new it(-1/0,-1/0,-1/0),new it(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,i=e.length;n<i;n++){let s=e[n];Wn.setFromBufferAttribute(s),this.morphTargetsRelative?(Qe.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Qe),Qe.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Qe)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Go);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new it,1/0);return}if(t){let n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];Ya.setFromBufferAttribute(a),this.morphTargetsRelative?(Qe.addVectors(Wn.min,Ya.min),Wn.expandByPoint(Qe),Qe.addVectors(Wn.max,Ya.max),Wn.expandByPoint(Qe)):(Wn.expandByPoint(Ya.min),Wn.expandByPoint(Ya.max))}Wn.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)Qe.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(Qe));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,h=a.count;c<h;c++)Qe.fromBufferAttribute(a,c),l&&(Co.fromBufferAttribute(t,c),Qe.add(Co)),i=Math.max(i,n.distanceToSquared(Qe))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,i=e.normal,s=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new si(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new it,l[P]=new it;let c=new it,h=new it,f=new it,d=new xe,u=new xe,_=new xe,p=new it,m=new it;function g(P,M,y){c.fromBufferAttribute(n,P),h.fromBufferAttribute(n,M),f.fromBufferAttribute(n,y),d.fromBufferAttribute(s,P),u.fromBufferAttribute(s,M),_.fromBufferAttribute(s,y),h.sub(c),f.sub(c),u.sub(d),_.sub(d);let I=1/(u.x*_.y-_.x*u.y);isFinite(I)&&(p.copy(h).multiplyScalar(_.y).addScaledVector(f,-u.y).multiplyScalar(I),m.copy(f).multiplyScalar(u.x).addScaledVector(h,-_.x).multiplyScalar(I),a[P].add(p),a[M].add(p),a[y].add(p),l[P].add(m),l[M].add(m),l[y].add(m))}let b=this.groups;b.length===0&&(b=[{start:0,count:t.count}]);for(let P=0,M=b.length;P<M;++P){let y=b[P],I=y.start,N=y.count;for(let D=I,V=I+N;D<V;D+=3)g(t.getX(D+0),t.getX(D+1),t.getX(D+2))}let v=new it,S=new it,C=new it,T=new it;function w(P){C.fromBufferAttribute(i,P),T.copy(C);let M=a[P];v.copy(M),v.sub(C.multiplyScalar(C.dot(M))).normalize(),S.crossVectors(T,M);let I=S.dot(l[P])<0?-1:1;o.setXYZW(P,v.x,v.y,v.z,I)}for(let P=0,M=b.length;P<M;++P){let y=b[P],I=y.start,N=y.count;for(let D=I,V=I+N;D<V;D+=3)w(t.getX(D+0)),w(t.getX(D+1)),w(t.getX(D+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new si(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let d=0,u=n.count;d<u;d++)n.setXYZ(d,0,0,0);let i=new it,s=new it,o=new it,a=new it,l=new it,c=new it,h=new it,f=new it;if(t)for(let d=0,u=t.count;d<u;d+=3){let _=t.getX(d+0),p=t.getX(d+1),m=t.getX(d+2);i.fromBufferAttribute(e,_),s.fromBufferAttribute(e,p),o.fromBufferAttribute(e,m),h.subVectors(o,s),f.subVectors(i,s),h.cross(f),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,p),c.fromBufferAttribute(n,m),a.add(h),l.add(h),c.add(h),n.setXYZ(_,a.x,a.y,a.z),n.setXYZ(p,l.x,l.y,l.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let d=0,u=e.count;d<u;d+=3)i.fromBufferAttribute(e,d+0),s.fromBufferAttribute(e,d+1),o.fromBufferAttribute(e,d+2),h.subVectors(o,s),f.subVectors(i,s),h.cross(f),n.setXYZ(d+0,h.x,h.y,h.z),n.setXYZ(d+1,h.x,h.y,h.z),n.setXYZ(d+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Qe.fromBufferAttribute(t,e),Qe.normalize(),t.setXYZ(e,Qe.x,Qe.y,Qe.z)}toNonIndexed(){function t(a,l){let c=a.array,h=a.itemSize,f=a.normalized,d=new c.constructor(l.length*h),u=0,_=0;for(let p=0,m=l.length;p<m;p++){a.isInterleavedBufferAttribute?u=l[p]*a.data.stride+a.offset:u=l[p]*h;for(let g=0;g<h;g++)d[_++]=c[u++]}return new si(d,h,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new r,n=this.index.array,i=this.attributes;for(let a in i){let l=i[a],c=t(l,n);e.setAttribute(a,c)}let s=this.morphAttributes;for(let a in s){let l=[],c=s[a];for(let h=0,f=c.length;h<f;h++){let d=c[h],u=t(d,n);l.push(u)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let a=0,l=o.length;a<l;a++){let c=o[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},s=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],h=[];for(let f=0,d=c.length;f<d;f++){let u=c[f];h.push(u.toJSON(t.data))}h.length>0&&(i[l]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let c in i){let h=i[c];this.setAttribute(c,h.clone(e))}let s=t.morphAttributes;for(let c in s){let h=[],f=s[c];for(let d=0,u=f.length;d<u;d++)h.push(f[d].clone(e));this.morphAttributes[c]=h}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,h=o.length;c<h;c++){let f=o[c];this.addGroup(f.start,f.count,f.materialIndex)}let a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},K0=new Be,Ts=new zc,gc=new Go,j0=new it,Do=new it,Ro=new it,Po=new it,Cf=new it,_c=new it,xc=new xe,yc=new xe,vc=new xe,Q0=new it,t_=new it,e_=new it,Sc=new it,Mc=new it,bi=class extends gn{constructor(t=new Bi,e=new Hc){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(t,e){let n=this.geometry,i=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;e.fromBufferAttribute(i,t);let a=this.morphTargetInfluences;if(s&&a){_c.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let h=a[l],f=s[l];h!==0&&(Cf.fromBufferAttribute(f,t),o?_c.addScaledVector(Cf,h):_c.addScaledVector(Cf.sub(e),h))}e.add(_c)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),gc.copy(n.boundingSphere),gc.applyMatrix4(s),Ts.copy(t.ray).recast(t.near),!(gc.containsPoint(Ts.origin)===!1&&(Ts.intersectSphere(gc,j0)===null||Ts.origin.distanceToSquared(j0)>(t.far-t.near)**2))&&(K0.copy(s).invert(),Ts.copy(t.ray).applyMatrix4(K0),!(n.boundingBox!==null&&Ts.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Ts)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,f=s.attributes.normal,d=s.groups,u=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,p=d.length;_<p;_++){let m=d[_],g=o[m.materialIndex],b=Math.max(m.start,u.start),v=Math.min(a.count,Math.min(m.start+m.count,u.start+u.count));for(let S=b,C=v;S<C;S+=3){let T=a.getX(S),w=a.getX(S+1),P=a.getX(S+2);i=bc(this,g,t,n,c,h,f,T,w,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=m.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),p=Math.min(a.count,u.start+u.count);for(let m=_,g=p;m<g;m+=3){let b=a.getX(m),v=a.getX(m+1),S=a.getX(m+2);i=bc(this,o,t,n,c,h,f,b,v,S),i&&(i.faceIndex=Math.floor(m/3),e.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let _=0,p=d.length;_<p;_++){let m=d[_],g=o[m.materialIndex],b=Math.max(m.start,u.start),v=Math.min(l.count,Math.min(m.start+m.count,u.start+u.count));for(let S=b,C=v;S<C;S+=3){let T=S,w=S+1,P=S+2;i=bc(this,g,t,n,c,h,f,T,w,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=m.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),p=Math.min(l.count,u.start+u.count);for(let m=_,g=p;m<g;m+=3){let b=m,v=m+1,S=m+2;i=bc(this,o,t,n,c,h,f,b,v,S),i&&(i.faceIndex=Math.floor(m/3),e.push(i))}}}};function yS(r,t,e,n,i,s,o,a){let l;if(t.side===Un?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===Gr,a),l===null)return null;Mc.copy(a),Mc.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Mc);return c<e.near||c>e.far?null:{distance:c,point:Mc.clone(),object:r}}function bc(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,Do),r.getVertexPosition(l,Ro),r.getVertexPosition(c,Po);let h=yS(r,t,e,n,Do,Ro,Po,Sc);if(h){i&&(xc.fromBufferAttribute(i,a),yc.fromBufferAttribute(i,l),vc.fromBufferAttribute(i,c),h.uv=No.getInterpolation(Sc,Do,Ro,Po,xc,yc,vc,new xe)),s&&(xc.fromBufferAttribute(s,a),yc.fromBufferAttribute(s,l),vc.fromBufferAttribute(s,c),h.uv1=No.getInterpolation(Sc,Do,Ro,Po,xc,yc,vc,new xe)),o&&(Q0.fromBufferAttribute(o,a),t_.fromBufferAttribute(o,l),e_.fromBufferAttribute(o,c),h.normal=No.getInterpolation(Sc,Do,Ro,Po,Q0,t_,e_,new it),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new it,materialIndex:0};No.getNormal(Do,Ro,Po,f.normal),h.face=f}return h}var Ja=class r extends Bi{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let l=[],c=[],h=[],f=[],d=0,u=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new oi(c,3)),this.setAttribute("normal",new oi(h,3)),this.setAttribute("uv",new oi(f,2));function _(p,m,g,b,v,S,C,T,w,P,M){let y=S/w,I=C/P,N=S/2,D=C/2,V=T/2,K=w+1,W=P+1,Z=0,z=0,U=new it;for(let R=0;R<W;R++){let lt=R*I-D;for(let xt=0;xt<K;xt++){let Bt=xt*y-N;U[p]=Bt*b,U[m]=lt*v,U[g]=V,c.push(U.x,U.y,U.z),U[p]=0,U[m]=0,U[g]=T>0?1:-1,h.push(U.x,U.y,U.z),f.push(xt/w),f.push(1-R/P),Z+=1}}for(let R=0;R<P;R++)for(let lt=0;lt<w;lt++){let xt=d+lt+K*R,Bt=d+lt+K*(R+1),X=d+(lt+1)+K*(R+1),at=d+(lt+1)+K*R;l.push(xt,Bt,at),l.push(Bt,X,at),z+=6}a.addGroup(u,z,M),u+=z,d+=Z}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Wo(r){let t={};for(let e in r){t[e]={};for(let n in r[e]){let i=r[e][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=i.clone():Array.isArray(i)?t[e][n]=i.slice():t[e][n]=i}}return t}function An(r){let t={};for(let e=0;e<r.length;e++){let n=Wo(r[e]);for(let i in n)t[i]=n[i]}return t}function vS(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function H_(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Me.workingColorSpace}var SS={clone:Wo,merge:An},MS=`void main() {
2
2
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3
3
  }`,bS=`void main() {
4
4
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
@@ -3818,7 +3818,7 @@ void main() {
3818
3818
 
3819
3819
  }
3820
3820
 
3821
- }`,rd=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(this.texture===null){let i=new ai,s=t.properties.get(i);s.__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}render(t,e){if(this.texture!==null){if(this.mesh===null){let n=e.cameras[0].viewport,i=new li({vertexShader:qE,fragmentShader:ZE,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new bi(new qc(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},sd=class extends Xr{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,h=null,f=null,d=null,u=null,_=null,p=new rd,m=e.getContextAttributes(),g=null,b=null,v=[],S=[],C=new xe,T=null,w=new Cn;w.layers.enable(1),w.viewport=new tn;let P=new Cn;P.layers.enable(2),P.viewport=new tn;let M=[w,P],y=new id;y.layers.enable(1),y.layers.enable(2);let I=null,N=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getTargetRaySpace()},this.getControllerGrip=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getGripSpace()},this.getHand=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getHandSpace()};function D(X){let at=S.indexOf(X.inputSource);if(at===-1)return;let yt=v[at];yt!==void 0&&(yt.update(X.inputSource,X.frame,c||o),yt.dispatchEvent({type:X.type,data:X.inputSource}))}function V(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",V),i.removeEventListener("inputsourceschange",K);for(let X=0;X<v.length;X++){let at=S[X];at!==null&&(S[X]=null,v[X].disconnect(at))}I=null,N=null,p.reset(),t.setRenderTarget(g),u=null,d=null,f=null,i=null,b=null,Bt.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(C.width,C.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){s=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){a=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(X){c=X},this.getBaseLayer=function(){return d!==null?d:u},this.getBinding=function(){return f},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(g=t.getRenderTarget(),i.addEventListener("select",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",V),i.addEventListener("inputsourceschange",K),m.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(C),i.renderState.layers===void 0){let at={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};u=new XRWebGLLayer(i,e,at),i.updateRenderState({baseLayer:u}),t.setPixelRatio(1),t.setSize(u.framebufferWidth,u.framebufferHeight,!1),b=new cr(u.framebufferWidth,u.framebufferHeight,{format:Oi,type:Wr,colorSpace:t.outputColorSpace,stencilBuffer:m.stencil})}else{let at=null,yt=null,ut=null;m.depth&&(ut=m.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,at=m.stencil?$a:Oo,yt=m.stencil?Qa:Ho);let It={colorFormat:e.RGBA8,depthFormat:ut,scaleFactor:s};f=new XRWebGLBinding(i,e),d=f.createProjectionLayer(It),i.updateRenderState({layers:[d]}),t.setPixelRatio(1),t.setSize(d.textureWidth,d.textureHeight,!1),b=new cr(d.textureWidth,d.textureHeight,{format:Oi,type:Wr,depthTexture:new Jc(d.textureWidth,d.textureHeight,yt,void 0,void 0,void 0,void 0,void 0,void 0,at),stencilBuffer:m.stencil,colorSpace:t.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Bt.setContext(i),Bt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function K(X){for(let at=0;at<X.removed.length;at++){let yt=X.removed[at],ut=S.indexOf(yt);ut>=0&&(S[ut]=null,v[ut].disconnect(yt))}for(let at=0;at<X.added.length;at++){let yt=X.added[at],ut=S.indexOf(yt);if(ut===-1){for(let Ht=0;Ht<v.length;Ht++)if(Ht>=S.length){S.push(yt),ut=Ht;break}else if(S[Ht]===null){S[Ht]=yt,ut=Ht;break}if(ut===-1)break}let It=v[ut];It&&It.connect(yt)}}let W=new it,Z=new it;function z(X,at,yt){W.setFromMatrixPosition(at.matrixWorld),Z.setFromMatrixPosition(yt.matrixWorld);let ut=W.distanceTo(Z),It=at.projectionMatrix.elements,Ht=yt.projectionMatrix.elements,q=It[14]/(It[10]-1),jt=It[14]/(It[10]+1),Ft=(It[9]+1)/It[5],Ut=(It[9]-1)/It[5],wt=(It[8]-1)/It[0],At=(Ht[8]+1)/Ht[0],Xt=q*wt,G=q*At,Qt=ut/(-wt+At),A=Qt*-wt;at.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(A),X.translateZ(Qt),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();let x=q+Qt,F=jt+Qt,Y=Xt-A,et=G+(ut-A),rt=Ft*jt/F*x,St=Ut*jt/F*x;X.projectionMatrix.makePerspective(Y,et,rt,St,x,F),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function U(X,at){at===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices(at.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;p.texture!==null&&(X.near=p.depthNear,X.far=p.depthFar),y.near=P.near=w.near=X.near,y.far=P.far=w.far=X.far,(I!==y.near||N!==y.far)&&(i.updateRenderState({depthNear:y.near,depthFar:y.far}),I=y.near,N=y.far,w.near=I,w.far=N,P.near=I,P.far=N,w.updateProjectionMatrix(),P.updateProjectionMatrix(),X.updateProjectionMatrix());let at=X.parent,yt=y.cameras;U(y,at);for(let ut=0;ut<yt.length;ut++)U(yt[ut],at);yt.length===2?z(y,w,P):y.projectionMatrix.copy(w.projectionMatrix),R(X,y,at)};function R(X,at,yt){yt===null?X.matrix.copy(at.matrixWorld):(X.matrix.copy(yt.matrixWorld),X.matrix.invert(),X.matrix.multiply(at.matrixWorld)),X.matrix.decompose(X.position,X.quaternion,X.scale),X.updateMatrixWorld(!0),X.projectionMatrix.copy(at.projectionMatrix),X.projectionMatrixInverse.copy(at.projectionMatrixInverse),X.isPerspectiveCamera&&(X.fov=Gf*2*Math.atan(1/X.projectionMatrix.elements[5]),X.zoom=1)}this.getCamera=function(){return y},this.getFoveation=function(){if(!(d===null&&u===null))return l},this.setFoveation=function(X){l=X,d!==null&&(d.fixedFoveation=X),u!==null&&u.fixedFoveation!==void 0&&(u.fixedFoveation=X)},this.hasDepthSensing=function(){return p.texture!==null};let lt=null;function xt(X,at){if(h=at.getViewerPose(c||o),_=at,h!==null){let yt=h.views;u!==null&&(t.setRenderTargetFramebuffer(b,u.framebuffer),t.setRenderTarget(b));let ut=!1;yt.length!==y.cameras.length&&(y.cameras.length=0,ut=!0);for(let Ht=0;Ht<yt.length;Ht++){let q=yt[Ht],jt=null;if(u!==null)jt=u.getViewport(q);else{let Ut=f.getViewSubImage(d,q);jt=Ut.viewport,Ht===0&&(t.setRenderTargetTextures(b,Ut.colorTexture,d.ignoreDepthValues?void 0:Ut.depthStencilTexture),t.setRenderTarget(b))}let Ft=M[Ht];Ft===void 0&&(Ft=new Cn,Ft.layers.enable(Ht),Ft.viewport=new tn,M[Ht]=Ft),Ft.matrix.fromArray(q.transform.matrix),Ft.matrix.decompose(Ft.position,Ft.quaternion,Ft.scale),Ft.projectionMatrix.fromArray(q.projectionMatrix),Ft.projectionMatrixInverse.copy(Ft.projectionMatrix).invert(),Ft.viewport.set(jt.x,jt.y,jt.width,jt.height),Ht===0&&(y.matrix.copy(Ft.matrix),y.matrix.decompose(y.position,y.quaternion,y.scale)),ut===!0&&y.cameras.push(Ft)}let It=i.enabledFeatures;if(It&&It.includes("depth-sensing")){let Ht=f.getDepthInformation(yt[0]);Ht&&Ht.isValid&&Ht.texture&&p.init(t,Ht,i.renderState)}}for(let yt=0;yt<v.length;yt++){let ut=S[yt],It=v[yt];ut!==null&&It!==void 0&&It.update(ut,at,c||o)}p.render(t,y),lt&&lt(X,at),at.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:at}),_=null}let Bt=new G_;Bt.setAnimationLoop(xt),this.setAnimationLoop=function(X){lt=X},this.dispose=function(){}}},Ds=new ur,$E=new Be;function JE(r,t){function e(m,g){m.matrixAutoUpdate===!0&&m.updateMatrix(),g.value.copy(m.matrix)}function n(m,g){g.color.getRGB(m.fogColor.value,H_(r)),g.isFog?(m.fogNear.value=g.near,m.fogFar.value=g.far):g.isFogExp2&&(m.fogDensity.value=g.density)}function i(m,g,b,v,S){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(m,g):g.isMeshToonMaterial?(s(m,g),f(m,g)):g.isMeshPhongMaterial?(s(m,g),h(m,g)):g.isMeshStandardMaterial?(s(m,g),d(m,g),g.isMeshPhysicalMaterial&&u(m,g,S)):g.isMeshMatcapMaterial?(s(m,g),_(m,g)):g.isMeshDepthMaterial?s(m,g):g.isMeshDistanceMaterial?(s(m,g),p(m,g)):g.isMeshNormalMaterial?s(m,g):g.isLineBasicMaterial?(o(m,g),g.isLineDashedMaterial&&a(m,g)):g.isPointsMaterial?l(m,g,b,v):g.isSpriteMaterial?c(m,g):g.isShadowMaterial?(m.color.value.copy(g.color),m.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(m,g){m.opacity.value=g.opacity,g.color&&m.diffuse.value.copy(g.color),g.emissive&&m.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(m.map.value=g.map,e(g.map,m.mapTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.bumpMap&&(m.bumpMap.value=g.bumpMap,e(g.bumpMap,m.bumpMapTransform),m.bumpScale.value=g.bumpScale,g.side===Un&&(m.bumpScale.value*=-1)),g.normalMap&&(m.normalMap.value=g.normalMap,e(g.normalMap,m.normalMapTransform),m.normalScale.value.copy(g.normalScale),g.side===Un&&m.normalScale.value.negate()),g.displacementMap&&(m.displacementMap.value=g.displacementMap,e(g.displacementMap,m.displacementMapTransform),m.displacementScale.value=g.displacementScale,m.displacementBias.value=g.displacementBias),g.emissiveMap&&(m.emissiveMap.value=g.emissiveMap,e(g.emissiveMap,m.emissiveMapTransform)),g.specularMap&&(m.specularMap.value=g.specularMap,e(g.specularMap,m.specularMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest);let b=t.get(g),v=b.envMap,S=b.envMapRotation;if(v&&(m.envMap.value=v,Ds.copy(S),Ds.x*=-1,Ds.y*=-1,Ds.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(Ds.y*=-1,Ds.z*=-1),m.envMapRotation.value.setFromMatrix4($E.makeRotationFromEuler(Ds)),m.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=g.reflectivity,m.ior.value=g.ior,m.refractionRatio.value=g.refractionRatio),g.lightMap){m.lightMap.value=g.lightMap;let C=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=g.lightMapIntensity*C,e(g.lightMap,m.lightMapTransform)}g.aoMap&&(m.aoMap.value=g.aoMap,m.aoMapIntensity.value=g.aoMapIntensity,e(g.aoMap,m.aoMapTransform))}function o(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,g.map&&(m.map.value=g.map,e(g.map,m.mapTransform))}function a(m,g){m.dashSize.value=g.dashSize,m.totalSize.value=g.dashSize+g.gapSize,m.scale.value=g.scale}function l(m,g,b,v){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.size.value=g.size*b,m.scale.value=v*.5,g.map&&(m.map.value=g.map,e(g.map,m.uvTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest)}function c(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.rotation.value=g.rotation,g.map&&(m.map.value=g.map,e(g.map,m.mapTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest)}function h(m,g){m.specular.value.copy(g.specular),m.shininess.value=Math.max(g.shininess,1e-4)}function f(m,g){g.gradientMap&&(m.gradientMap.value=g.gradientMap)}function d(m,g){m.metalness.value=g.metalness,g.metalnessMap&&(m.metalnessMap.value=g.metalnessMap,e(g.metalnessMap,m.metalnessMapTransform)),m.roughness.value=g.roughness,g.roughnessMap&&(m.roughnessMap.value=g.roughnessMap,e(g.roughnessMap,m.roughnessMapTransform)),g.envMap&&(m.envMapIntensity.value=g.envMapIntensity)}function u(m,g,b){m.ior.value=g.ior,g.sheen>0&&(m.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),m.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(m.sheenColorMap.value=g.sheenColorMap,e(g.sheenColorMap,m.sheenColorMapTransform)),g.sheenRoughnessMap&&(m.sheenRoughnessMap.value=g.sheenRoughnessMap,e(g.sheenRoughnessMap,m.sheenRoughnessMapTransform))),g.clearcoat>0&&(m.clearcoat.value=g.clearcoat,m.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(m.clearcoatMap.value=g.clearcoatMap,e(g.clearcoatMap,m.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,e(g.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(m.clearcoatNormalMap.value=g.clearcoatNormalMap,e(g.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Un&&m.clearcoatNormalScale.value.negate())),g.dispersion>0&&(m.dispersion.value=g.dispersion),g.iridescence>0&&(m.iridescence.value=g.iridescence,m.iridescenceIOR.value=g.iridescenceIOR,m.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(m.iridescenceMap.value=g.iridescenceMap,e(g.iridescenceMap,m.iridescenceMapTransform)),g.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=g.iridescenceThicknessMap,e(g.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),g.transmission>0&&(m.transmission.value=g.transmission,m.transmissionSamplerMap.value=b.texture,m.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(m.transmissionMap.value=g.transmissionMap,e(g.transmissionMap,m.transmissionMapTransform)),m.thickness.value=g.thickness,g.thicknessMap&&(m.thicknessMap.value=g.thicknessMap,e(g.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=g.attenuationDistance,m.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(m.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(m.anisotropyMap.value=g.anisotropyMap,e(g.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=g.specularIntensity,m.specularColor.value.copy(g.specularColor),g.specularColorMap&&(m.specularColorMap.value=g.specularColorMap,e(g.specularColorMap,m.specularColorMapTransform)),g.specularIntensityMap&&(m.specularIntensityMap.value=g.specularIntensityMap,e(g.specularIntensityMap,m.specularIntensityMapTransform))}function _(m,g){g.matcap&&(m.matcap.value=g.matcap)}function p(m,g){let b=t.get(g).light;m.referencePosition.value.setFromMatrixPosition(b.matrixWorld),m.nearDistance.value=b.shadow.camera.near,m.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function KE(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,v){let S=v.program;n.uniformBlockBinding(b,S)}function c(b,v){let S=i[b.id];S===void 0&&(_(b),S=h(b),i[b.id]=S,b.addEventListener("dispose",m));let C=v.program;n.updateUBOMapping(b,C);let T=t.render.frame;s[b.id]!==T&&(d(b),s[b.id]=T)}function h(b){let v=f();b.__bindingPointIndex=v;let S=r.createBuffer(),C=b.__size,T=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,S),r.bufferData(r.UNIFORM_BUFFER,C,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,v,S),S}function f(){for(let b=0;b<a;b++)if(o.indexOf(b)===-1)return o.push(b),b;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(b){let v=i[b.id],S=b.uniforms,C=b.__cache;r.bindBuffer(r.UNIFORM_BUFFER,v);for(let T=0,w=S.length;T<w;T++){let P=Array.isArray(S[T])?S[T]:[S[T]];for(let M=0,y=P.length;M<y;M++){let I=P[M];if(u(I,T,M,C)===!0){let N=I.__offset,D=Array.isArray(I.value)?I.value:[I.value],V=0;for(let K=0;K<D.length;K++){let W=D[K],Z=p(W);typeof W=="number"||typeof W=="boolean"?(I.__data[0]=W,r.bufferSubData(r.UNIFORM_BUFFER,N+V,I.__data)):W.isMatrix3?(I.__data[0]=W.elements[0],I.__data[1]=W.elements[1],I.__data[2]=W.elements[2],I.__data[3]=0,I.__data[4]=W.elements[3],I.__data[5]=W.elements[4],I.__data[6]=W.elements[5],I.__data[7]=0,I.__data[8]=W.elements[6],I.__data[9]=W.elements[7],I.__data[10]=W.elements[8],I.__data[11]=0):(W.toArray(I.__data,V),V+=Z.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,N,I.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function u(b,v,S,C){let T=b.value,w=v+"_"+S;if(C[w]===void 0)return typeof T=="number"||typeof T=="boolean"?C[w]=T:C[w]=T.clone(),!0;{let P=C[w];if(typeof T=="number"||typeof T=="boolean"){if(P!==T)return C[w]=T,!0}else if(P.equals(T)===!1)return P.copy(T),!0}return!1}function _(b){let v=b.uniforms,S=0,C=16;for(let w=0,P=v.length;w<P;w++){let M=Array.isArray(v[w])?v[w]:[v[w]];for(let y=0,I=M.length;y<I;y++){let N=M[y],D=Array.isArray(N.value)?N.value:[N.value];for(let V=0,K=D.length;V<K;V++){let W=D[V],Z=p(W),z=S%C;z!==0&&C-z<Z.boundary&&(S+=C-z),N.__data=new Float32Array(Z.storage/Float32Array.BYTES_PER_ELEMENT),N.__offset=S,S+=Z.storage}}}let T=S%C;return T>0&&(S+=C-T),b.__size=S,b.__cache={},this}function p(b){let v={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(v.boundary=4,v.storage=4):b.isVector2?(v.boundary=8,v.storage=8):b.isVector3||b.isColor?(v.boundary=16,v.storage=12):b.isVector4?(v.boundary=16,v.storage=16):b.isMatrix3?(v.boundary=48,v.storage=48):b.isMatrix4?(v.boundary=64,v.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),v}function m(b){let v=b.target;v.removeEventListener("dispose",m);let S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),r.deleteBuffer(i[v.id]),delete i[v.id],delete s[v.id]}function g(){for(let b in i)r.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:g}}var Kc=class{constructor(t={}){let{canvas:e=sS(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:f=!1}=t;this.isWebGLRenderer=!0;let d;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=n.getContextAttributes().alpha}else d=o;let u=new Uint32Array(4),_=new Int32Array(4),p=null,m=null,g=[],b=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=ii,this._useLegacyLights=!1,this.toneMapping=Hr,this.toneMappingExposure=1;let v=this,S=!1,C=0,T=0,w=null,P=-1,M=null,y=new tn,I=new tn,N=null,D=new _e(0),V=0,K=e.width,W=e.height,Z=1,z=null,U=null,R=new tn(0,0,K,W),lt=new tn(0,0,K,W),xt=!1,Bt=new Ka,X=!1,at=!1,yt=new Be,ut=new it,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ht(){return w===null?Z:1}let q=n;function jt(E,B){return e.getContext(E,B)}try{let E={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:f};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${vd}`),e.addEventListener("webglcontextlost",k,!1),e.addEventListener("webglcontextrestored",tt,!1),e.addEventListener("webglcontextcreationerror",ot,!1),q===null){let B="webgl2";if(q=jt(B,E),q===null)throw jt(B)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}let Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St,mt,ct,Nt,ft,vt,$t,ht,Ct,qt,Jt;function he(){Ft=new gw(q),Ft.init(),Ct=new XE(q,Ft),Ut=new uw(q,Ft,t,Ct),wt=new GE(q),At=new yw(q),Xt=new PE,G=new WE(q,Ft,wt,Xt,Ut,Ct,At),Qt=new fw(v),A=new mw(v),x=new TS(q),qt=new lw(q,x),F=new _w(q,x,At,qt),Y=new Sw(q,F,x,At),vt=new vw(q,Ut,G),ct=new hw(Xt),et=new RE(v,Qt,A,Ft,Ut,qt,ct),rt=new JE(v,Xt),St=new LE,mt=new kE(Ft),ft=new aw(v,Qt,A,wt,Y,d,l),Nt=new HE(v,Y,Ut),Jt=new KE(q,At,Ut,wt),$t=new cw(q,Ft,At),ht=new xw(q,Ft,At),At.programs=et.programs,v.capabilities=Ut,v.extensions=Ft,v.properties=Xt,v.renderLists=St,v.shadowMap=Nt,v.state=wt,v.info=At}he();let Kt=new sd(v,q);this.xr=Kt,this.getContext=function(){return q},this.getContextAttributes=function(){return q.getContextAttributes()},this.forceContextLoss=function(){let E=Ft.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=Ft.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(E){E!==void 0&&(Z=E,this.setSize(K,W,!1))},this.getSize=function(E){return E.set(K,W)},this.setSize=function(E,B,H=!0){if(Kt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}K=E,W=B,e.width=Math.floor(E*Z),e.height=Math.floor(B*Z),H===!0&&(e.style.width=E+"px",e.style.height=B+"px"),this.setViewport(0,0,E,B)},this.getDrawingBufferSize=function(E){return E.set(K*Z,W*Z).floor()},this.setDrawingBufferSize=function(E,B,H){K=E,W=B,Z=H,e.width=Math.floor(E*H),e.height=Math.floor(B*H),this.setViewport(0,0,E,B)},this.getCurrentViewport=function(E){return E.copy(y)},this.getViewport=function(E){return E.copy(R)},this.setViewport=function(E,B,H,j){E.isVector4?R.set(E.x,E.y,E.z,E.w):R.set(E,B,H,j),wt.viewport(y.copy(R).multiplyScalar(Z).round())},this.getScissor=function(E){return E.copy(lt)},this.setScissor=function(E,B,H,j){E.isVector4?lt.set(E.x,E.y,E.z,E.w):lt.set(E,B,H,j),wt.scissor(I.copy(lt).multiplyScalar(Z).round())},this.getScissorTest=function(){return xt},this.setScissorTest=function(E){wt.setScissorTest(xt=E)},this.setOpaqueSort=function(E){z=E},this.setTransparentSort=function(E){U=E},this.getClearColor=function(E){return E.copy(ft.getClearColor())},this.setClearColor=function(){ft.setClearColor.apply(ft,arguments)},this.getClearAlpha=function(){return ft.getClearAlpha()},this.setClearAlpha=function(){ft.setClearAlpha.apply(ft,arguments)},this.clear=function(E=!0,B=!0,H=!0){let j=0;if(E){let J=!1;if(w!==null){let Mt=w.texture.format;J=Mt===B_||Mt===O_||Mt===U_}if(J){let Mt=w.texture.type,Dt=Mt===Wr||Mt===Ho||Mt===I_||Mt===Qa||Mt===F_||Mt===N_,Lt=ft.getClearColor(),Zt=ft.getClearAlpha(),ee=Lt.r,Yt=Lt.g,Wt=Lt.b;Dt?(u[0]=ee,u[1]=Yt,u[2]=Wt,u[3]=Zt,q.clearBufferuiv(q.COLOR,0,u)):(_[0]=ee,_[1]=Yt,_[2]=Wt,_[3]=Zt,q.clearBufferiv(q.COLOR,0,_))}else j|=q.COLOR_BUFFER_BIT}B&&(j|=q.DEPTH_BUFFER_BIT),H&&(j|=q.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),q.clear(j)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",k,!1),e.removeEventListener("webglcontextrestored",tt,!1),e.removeEventListener("webglcontextcreationerror",ot,!1),St.dispose(),mt.dispose(),Xt.dispose(),Qt.dispose(),A.dispose(),Y.dispose(),qt.dispose(),Jt.dispose(),et.dispose(),Kt.dispose(),Kt.removeEventListener("sessionstart",st),Kt.removeEventListener("sessionend",O),Q.stop()};function k(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function tt(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;let E=At.autoReset,B=Nt.enabled,H=Nt.autoUpdate,j=Nt.needsUpdate,J=Nt.type;he(),At.autoReset=E,Nt.enabled=B,Nt.autoUpdate=H,Nt.needsUpdate=j,Nt.type=J}function ot(E){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",E.statusMessage)}function gt(E){let B=E.target;B.removeEventListener("dispose",gt),_t(B)}function _t(E){zt(E),Xt.remove(E)}function zt(E){let B=Xt.get(E).programs;B!==void 0&&(B.forEach(function(H){et.releaseProgram(H)}),E.isShaderMaterial&&et.releaseShaderCache(E))}this.renderBufferDirect=function(E,B,H,j,J,Mt){B===null&&(B=It);let Dt=J.isMesh&&J.matrixWorld.determinant()<0,Lt=fe(E,B,H,j,J);wt.setMaterial(j,Dt);let Zt=H.index,ee=1;if(j.wireframe===!0){if(Zt=F.getWireframeAttribute(H),Zt===void 0)return;ee=2}let Yt=H.drawRange,Wt=H.attributes.position,ye=Yt.start*ee,ke=(Yt.start+Yt.count)*ee;Mt!==null&&(ye=Math.max(ye,Mt.start*ee),ke=Math.min(ke,(Mt.start+Mt.count)*ee)),Zt!==null?(ye=Math.max(ye,0),ke=Math.min(ke,Zt.count)):Wt!=null&&(ye=Math.max(ye,0),ke=Math.min(ke,Wt.count));let on=ke-ye;if(on<0||on===1/0)return;qt.setup(J,j,Lt,H,Zt);let _n,re=$t;if(Zt!==null&&(_n=x.get(Zt),re=ht,re.setIndex(_n)),J.isMesh)j.wireframe===!0?(wt.setLineWidth(j.wireframeLinewidth*Ht()),re.setMode(q.LINES)):re.setMode(q.TRIANGLES);else if(J.isLine){let te=j.linewidth;te===void 0&&(te=1),wt.setLineWidth(te*Ht()),J.isLineSegments?re.setMode(q.LINES):J.isLineLoop?re.setMode(q.LINE_LOOP):re.setMode(q.LINE_STRIP)}else J.isPoints?re.setMode(q.POINTS):J.isSprite&&re.setMode(q.TRIANGLES);if(J.isBatchedMesh)J._multiDrawInstances!==null?re.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances):re.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else if(J.isInstancedMesh)re.renderInstances(ye,on,J.count);else if(H.isInstancedBufferGeometry){let te=H._maxInstanceCount!==void 0?H._maxInstanceCount:1/0,Ei=Math.min(H.instanceCount,te);re.renderInstances(ye,on,Ei)}else re.render(ye,on)};function ie(E,B,H){E.transparent===!0&&E.side===ar&&E.forceSinglePass===!1?(E.side=Un,E.needsUpdate=!0,Gt(E,B,H),E.side=Gr,E.needsUpdate=!0,Gt(E,B,H),E.side=ar):Gt(E,B,H)}this.compile=function(E,B,H=null){H===null&&(H=E),m=mt.get(H),m.init(B),b.push(m),H.traverseVisible(function(J){J.isLight&&J.layers.test(B.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),E!==H&&E.traverseVisible(function(J){J.isLight&&J.layers.test(B.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),m.setupLights(v._useLegacyLights);let j=new Set;return E.traverse(function(J){let Mt=J.material;if(Mt)if(Array.isArray(Mt))for(let Dt=0;Dt<Mt.length;Dt++){let Lt=Mt[Dt];ie(Lt,H,J),j.add(Lt)}else ie(Mt,H,J),j.add(Mt)}),b.pop(),m=null,j},this.compileAsync=function(E,B,H=null){let j=this.compile(E,B,H);return new Promise(J=>{function Mt(){if(j.forEach(function(Dt){Xt.get(Dt).currentProgram.isReady()&&j.delete(Dt)}),j.size===0){J(E);return}setTimeout(Mt,10)}Ft.get("KHR_parallel_shader_compile")!==null?Mt():setTimeout(Mt,10)})};let bt=null;function L(E){bt&&bt(E)}function st(){Q.stop()}function O(){Q.start()}let Q=new G_;Q.setAnimationLoop(L),typeof self<"u"&&Q.setContext(self),this.setAnimationLoop=function(E){bt=E,Kt.setAnimationLoop(E),E===null?Q.stop():Q.start()},Kt.addEventListener("sessionstart",st),Kt.addEventListener("sessionend",O),this.render=function(E,B){if(B!==void 0&&B.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;E.matrixWorldAutoUpdate===!0&&E.updateMatrixWorld(),B.parent===null&&B.matrixWorldAutoUpdate===!0&&B.updateMatrixWorld(),Kt.enabled===!0&&Kt.isPresenting===!0&&(Kt.cameraAutoUpdate===!0&&Kt.updateCamera(B),B=Kt.getCamera()),E.isScene===!0&&E.onBeforeRender(v,E,B,w),m=mt.get(E,b.length),m.init(B),b.push(m),yt.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse),Bt.setFromProjectionMatrix(yt),at=this.localClippingEnabled,X=ct.init(this.clippingPlanes,at),p=St.get(E,g.length),p.init(),g.push(p),pt(E,B,0,v.sortObjects),p.finish(),v.sortObjects===!0&&p.sort(z,U);let H=Kt.enabled===!1||Kt.isPresenting===!1||Kt.hasDepthSensing()===!1;H&&ft.addToRenderList(p,E),this.info.render.frame++,X===!0&&ct.beginShadows();let j=m.state.shadowsArray;Nt.render(j,E,B),X===!0&&ct.endShadows(),this.info.autoReset===!0&&this.info.reset();let J=p.opaque,Mt=p.transmissive;if(m.setupLights(v._useLegacyLights),B.isArrayCamera){let Dt=B.cameras;if(Mt.length>0)for(let Lt=0,Zt=Dt.length;Lt<Zt;Lt++){let ee=Dt[Lt];Tt(J,Mt,E,ee)}H&&ft.render(E);for(let Lt=0,Zt=Dt.length;Lt<Zt;Lt++){let ee=Dt[Lt];nt(p,E,ee,ee.viewport)}}else Mt.length>0&&Tt(J,Mt,E,B),H&&ft.render(E),nt(p,E,B);w!==null&&(G.updateMultisampleRenderTarget(w),G.updateRenderTargetMipmap(w)),E.isScene===!0&&E.onAfterRender(v,E,B),qt.resetDefaultState(),P=-1,M=null,b.pop(),b.length>0?(m=b[b.length-1],X===!0&&ct.setGlobalState(v.clippingPlanes,m.state.camera)):m=null,g.pop(),g.length>0?p=g[g.length-1]:p=null};function pt(E,B,H,j){if(E.visible===!1)return;if(E.layers.test(B.layers)){if(E.isGroup)H=E.renderOrder;else if(E.isLOD)E.autoUpdate===!0&&E.update(B);else if(E.isLight)m.pushLight(E),E.castShadow&&m.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||Bt.intersectsSprite(E)){j&&ut.setFromMatrixPosition(E.matrixWorld).applyMatrix4(yt);let Dt=Y.update(E),Lt=E.material;Lt.visible&&p.push(E,Dt,Lt,H,ut.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(!E.frustumCulled||Bt.intersectsObject(E))){let Dt=Y.update(E),Lt=E.material;if(j&&(E.boundingSphere!==void 0?(E.boundingSphere===null&&E.computeBoundingSphere(),ut.copy(E.boundingSphere.center)):(Dt.boundingSphere===null&&Dt.computeBoundingSphere(),ut.copy(Dt.boundingSphere.center)),ut.applyMatrix4(E.matrixWorld).applyMatrix4(yt)),Array.isArray(Lt)){let Zt=Dt.groups;for(let ee=0,Yt=Zt.length;ee<Yt;ee++){let Wt=Zt[ee],ye=Lt[Wt.materialIndex];ye&&ye.visible&&p.push(E,Dt,ye,H,ut.z,Wt)}}else Lt.visible&&p.push(E,Dt,Lt,H,ut.z,null)}}let Mt=E.children;for(let Dt=0,Lt=Mt.length;Dt<Lt;Dt++)pt(Mt[Dt],B,H,j)}function nt(E,B,H,j){let J=E.opaque,Mt=E.transmissive,Dt=E.transparent;m.setupLightsView(H),X===!0&&ct.setGlobalState(v.clippingPlanes,H),j&&wt.viewport(y.copy(j)),J.length>0&&dt(J,B,H),Mt.length>0&&dt(Mt,B,H),Dt.length>0&&dt(Dt,B,H),wt.buffers.depth.setTest(!0),wt.buffers.depth.setMask(!0),wt.buffers.color.setMask(!0),wt.setPolygonOffset(!1)}function Tt(E,B,H,j){if((H.isScene===!0?H.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[j.id]===void 0&&(m.state.transmissionRenderTarget[j.id]=new cr(1,1,{generateMipmaps:!0,type:Ft.has("EXT_color_buffer_half_float")||Ft.has("EXT_color_buffer_float")?ru:Wr,minFilter:Fs,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let Mt=m.state.transmissionRenderTarget[j.id],Dt=j.viewport||y;Mt.setSize(Dt.z,Dt.w);let Lt=v.getRenderTarget();v.setRenderTarget(Mt),v.getClearColor(D),V=v.getClearAlpha(),V<1&&v.setClearColor(16777215,.5),v.clear();let Zt=v.toneMapping;v.toneMapping=Hr;let ee=j.viewport;if(j.viewport!==void 0&&(j.viewport=void 0),m.setupLightsView(j),X===!0&&ct.setGlobalState(v.clippingPlanes,j),dt(E,H,j),G.updateMultisampleRenderTarget(Mt),G.updateRenderTargetMipmap(Mt),Ft.has("WEBGL_multisampled_render_to_texture")===!1){let Yt=!1;for(let Wt=0,ye=B.length;Wt<ye;Wt++){let ke=B[Wt],on=ke.object,_n=ke.geometry,re=ke.material,te=ke.group;if(re.side===ar&&on.layers.test(j.layers)){let Ei=re.side;re.side=Un,re.needsUpdate=!0,Rt(on,H,j,_n,re,te),re.side=Ei,re.needsUpdate=!0,Yt=!0}}Yt===!0&&(G.updateMultisampleRenderTarget(Mt),G.updateRenderTargetMipmap(Mt))}v.setRenderTarget(Lt),v.setClearColor(D,V),ee!==void 0&&(j.viewport=ee),v.toneMapping=Zt}function dt(E,B,H){let j=B.isScene===!0?B.overrideMaterial:null;for(let J=0,Mt=E.length;J<Mt;J++){let Dt=E[J],Lt=Dt.object,Zt=Dt.geometry,ee=j===null?Dt.material:j,Yt=Dt.group;Lt.layers.test(H.layers)&&Rt(Lt,B,H,Zt,ee,Yt)}}function Rt(E,B,H,j,J,Mt){E.onBeforeRender(v,B,H,j,J,Mt),E.modelViewMatrix.multiplyMatrices(H.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),J.onBeforeRender(v,B,H,j,E,Mt),J.transparent===!0&&J.side===ar&&J.forceSinglePass===!1?(J.side=Un,J.needsUpdate=!0,v.renderBufferDirect(H,B,j,J,E,Mt),J.side=Gr,J.needsUpdate=!0,v.renderBufferDirect(H,B,j,J,E,Mt),J.side=ar):v.renderBufferDirect(H,B,j,J,E,Mt),E.onAfterRender(v,B,H,j,J,Mt)}function Gt(E,B,H){B.isScene!==!0&&(B=It);let j=Xt.get(E),J=m.state.lights,Mt=m.state.shadowsArray,Dt=J.state.version,Lt=et.getParameters(E,J.state,Mt,B,H),Zt=et.getProgramCacheKey(Lt),ee=j.programs;j.environment=E.isMeshStandardMaterial?B.environment:null,j.fog=B.fog,j.envMap=(E.isMeshStandardMaterial?A:Qt).get(E.envMap||j.environment),j.envMapRotation=j.environment!==null&&E.envMap===null?B.environmentRotation:E.envMapRotation,ee===void 0&&(E.addEventListener("dispose",gt),ee=new Map,j.programs=ee);let Yt=ee.get(Zt);if(Yt!==void 0){if(j.currentProgram===Yt&&j.lightsStateVersion===Dt)return ne(E,Lt),Yt}else Lt.uniforms=et.getUniforms(E),E.onBuild(H,Lt,v),E.onBeforeCompile(Lt,v),Yt=et.acquireProgram(Lt,Zt),ee.set(Zt,Yt),j.uniforms=Lt.uniforms;let Wt=j.uniforms;return(!E.isShaderMaterial&&!E.isRawShaderMaterial||E.clipping===!0)&&(Wt.clippingPlanes=ct.uniform),ne(E,Lt),j.needsLights=le(E),j.lightsStateVersion=Dt,j.needsLights&&(Wt.ambientLightColor.value=J.state.ambient,Wt.lightProbe.value=J.state.probe,Wt.directionalLights.value=J.state.directional,Wt.directionalLightShadows.value=J.state.directionalShadow,Wt.spotLights.value=J.state.spot,Wt.spotLightShadows.value=J.state.spotShadow,Wt.rectAreaLights.value=J.state.rectArea,Wt.ltc_1.value=J.state.rectAreaLTC1,Wt.ltc_2.value=J.state.rectAreaLTC2,Wt.pointLights.value=J.state.point,Wt.pointLightShadows.value=J.state.pointShadow,Wt.hemisphereLights.value=J.state.hemi,Wt.directionalShadowMap.value=J.state.directionalShadowMap,Wt.directionalShadowMatrix.value=J.state.directionalShadowMatrix,Wt.spotShadowMap.value=J.state.spotShadowMap,Wt.spotLightMatrix.value=J.state.spotLightMatrix,Wt.spotLightMap.value=J.state.spotLightMap,Wt.pointShadowMap.value=J.state.pointShadowMap,Wt.pointShadowMatrix.value=J.state.pointShadowMatrix),j.currentProgram=Yt,j.uniformsList=null,Yt}function Ot(E){if(E.uniformsList===null){let B=E.currentProgram.getUniforms();E.uniformsList=ko.seqWithValue(B.seq,E.uniforms)}return E.uniformsList}function ne(E,B){let H=Xt.get(E);H.outputColorSpace=B.outputColorSpace,H.batching=B.batching,H.instancing=B.instancing,H.instancingColor=B.instancingColor,H.instancingMorph=B.instancingMorph,H.skinning=B.skinning,H.morphTargets=B.morphTargets,H.morphNormals=B.morphNormals,H.morphColors=B.morphColors,H.morphTargetsCount=B.morphTargetsCount,H.numClippingPlanes=B.numClippingPlanes,H.numIntersection=B.numClipIntersection,H.vertexAlphas=B.vertexAlphas,H.vertexTangents=B.vertexTangents,H.toneMapping=B.toneMapping}function fe(E,B,H,j,J){B.isScene!==!0&&(B=It),G.resetTextureUnits();let Mt=B.fog,Dt=j.isMeshStandardMaterial?B.environment:null,Lt=w===null?v.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:qr,Zt=(j.isMeshStandardMaterial?A:Qt).get(j.envMap||Dt),ee=j.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,Yt=!!H.attributes.tangent&&(!!j.normalMap||j.anisotropy>0),Wt=!!H.morphAttributes.position,ye=!!H.morphAttributes.normal,ke=!!H.morphAttributes.color,on=Hr;j.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(on=v.toneMapping);let _n=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,re=_n!==void 0?_n.length:0,te=Xt.get(j),Ei=m.state.lights;if(X===!0&&(at===!0||E!==M)){let Xn=E===M&&j.id===P;ct.setState(j,E,Xn)}let Se=!1;j.version===te.__version?(te.needsLights&&te.lightsStateVersion!==Ei.state.version||te.outputColorSpace!==Lt||J.isBatchedMesh&&te.batching===!1||!J.isBatchedMesh&&te.batching===!0||J.isInstancedMesh&&te.instancing===!1||!J.isInstancedMesh&&te.instancing===!0||J.isSkinnedMesh&&te.skinning===!1||!J.isSkinnedMesh&&te.skinning===!0||J.isInstancedMesh&&te.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&te.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&te.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&te.instancingMorph===!1&&J.morphTexture!==null||te.envMap!==Zt||j.fog===!0&&te.fog!==Mt||te.numClippingPlanes!==void 0&&(te.numClippingPlanes!==ct.numPlanes||te.numIntersection!==ct.numIntersection)||te.vertexAlphas!==ee||te.vertexTangents!==Yt||te.morphTargets!==Wt||te.morphNormals!==ye||te.morphColors!==ke||te.toneMapping!==on||te.morphTargetsCount!==re)&&(Se=!0):(Se=!0,te.__version=j.version);let Zr=te.currentProgram;Se===!0&&(Zr=Gt(j,B,J));let Td=!1,qo=!1,au=!1,an=Zr.getUniforms(),hr=te.uniforms;if(wt.useProgram(Zr.program)&&(Td=!0,qo=!0,au=!0),j.id!==P&&(P=j.id,qo=!0),Td||M!==E){an.setValue(q,"projectionMatrix",E.projectionMatrix),an.setValue(q,"viewMatrix",E.matrixWorldInverse);let Xn=an.map.cameraPosition;Xn!==void 0&&Xn.setValue(q,ut.setFromMatrixPosition(E.matrixWorld)),Ut.logarithmicDepthBuffer&&an.setValue(q,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),(j.isMeshPhongMaterial||j.isMeshToonMaterial||j.isMeshLambertMaterial||j.isMeshBasicMaterial||j.isMeshStandardMaterial||j.isShaderMaterial)&&an.setValue(q,"isOrthographic",E.isOrthographicCamera===!0),M!==E&&(M=E,qo=!0,au=!0)}if(J.isSkinnedMesh){an.setOptional(q,J,"bindMatrix"),an.setOptional(q,J,"bindMatrixInverse");let Xn=J.skeleton;Xn&&(Xn.boneTexture===null&&Xn.computeBoneTexture(),an.setValue(q,"boneTexture",Xn.boneTexture,G))}J.isBatchedMesh&&(an.setOptional(q,J,"batchingTexture"),an.setValue(q,"batchingTexture",J._matricesTexture,G));let lu=H.morphAttributes;if((lu.position!==void 0||lu.normal!==void 0||lu.color!==void 0)&&vt.update(J,H,Zr),(qo||te.receiveShadow!==J.receiveShadow)&&(te.receiveShadow=J.receiveShadow,an.setValue(q,"receiveShadow",J.receiveShadow)),j.isMeshGouraudMaterial&&j.envMap!==null&&(hr.envMap.value=Zt,hr.flipEnvMap.value=Zt.isCubeTexture&&Zt.isRenderTargetTexture===!1?-1:1),j.isMeshStandardMaterial&&j.envMap===null&&B.environment!==null&&(hr.envMapIntensity.value=B.environmentIntensity),qo&&(an.setValue(q,"toneMappingExposure",v.toneMappingExposure),te.needsLights&&ge(hr,au),Mt&&j.fog===!0&&rt.refreshFogUniforms(hr,Mt),rt.refreshMaterialUniforms(hr,j,Z,W,m.state.transmissionRenderTarget[E.id]),ko.upload(q,Ot(te),hr,G)),j.isShaderMaterial&&j.uniformsNeedUpdate===!0&&(ko.upload(q,Ot(te),hr,G),j.uniformsNeedUpdate=!1),j.isSpriteMaterial&&an.setValue(q,"center",J.center),an.setValue(q,"modelViewMatrix",J.modelViewMatrix),an.setValue(q,"normalMatrix",J.normalMatrix),an.setValue(q,"modelMatrix",J.matrixWorld),j.isShaderMaterial||j.isRawShaderMaterial){let Xn=j.uniformsGroups;for(let cu=0,J_=Xn.length;cu<J_;cu++){let Ad=Xn[cu];Jt.update(Ad,Zr),Jt.bind(Ad,Zr)}}return Zr}function ge(E,B){E.ambientLightColor.needsUpdate=B,E.lightProbe.needsUpdate=B,E.directionalLights.needsUpdate=B,E.directionalLightShadows.needsUpdate=B,E.pointLights.needsUpdate=B,E.pointLightShadows.needsUpdate=B,E.spotLights.needsUpdate=B,E.spotLightShadows.needsUpdate=B,E.rectAreaLights.needsUpdate=B,E.hemisphereLights.needsUpdate=B}function le(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&E.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(E,B,H){Xt.get(E.texture).__webglTexture=B,Xt.get(E.depthTexture).__webglTexture=H;let j=Xt.get(E);j.__hasExternalTextures=!0,j.__autoAllocateDepthBuffer=H===void 0,j.__autoAllocateDepthBuffer||Ft.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),j.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(E,B){let H=Xt.get(E);H.__webglFramebuffer=B,H.__useDefaultFramebuffer=B===void 0},this.setRenderTarget=function(E,B=0,H=0){w=E,C=B,T=H;let j=!0,J=null,Mt=!1,Dt=!1;if(E){let Zt=Xt.get(E);Zt.__useDefaultFramebuffer!==void 0?(wt.bindFramebuffer(q.FRAMEBUFFER,null),j=!1):Zt.__webglFramebuffer===void 0?G.setupRenderTarget(E):Zt.__hasExternalTextures&&G.rebindTextures(E,Xt.get(E.texture).__webglTexture,Xt.get(E.depthTexture).__webglTexture);let ee=E.texture;(ee.isData3DTexture||ee.isDataArrayTexture||ee.isCompressedArrayTexture)&&(Dt=!0);let Yt=Xt.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(Array.isArray(Yt[B])?J=Yt[B][H]:J=Yt[B],Mt=!0):E.samples>0&&G.useMultisampledRTT(E)===!1?J=Xt.get(E).__webglMultisampledFramebuffer:Array.isArray(Yt)?J=Yt[H]:J=Yt,y.copy(E.viewport),I.copy(E.scissor),N=E.scissorTest}else y.copy(R).multiplyScalar(Z).floor(),I.copy(lt).multiplyScalar(Z).floor(),N=xt;if(wt.bindFramebuffer(q.FRAMEBUFFER,J)&&j&&wt.drawBuffers(E,J),wt.viewport(y),wt.scissor(I),wt.setScissorTest(N),Mt){let Zt=Xt.get(E.texture);q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_CUBE_MAP_POSITIVE_X+B,Zt.__webglTexture,H)}else if(Dt){let Zt=Xt.get(E.texture),ee=B||0;q.framebufferTextureLayer(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,Zt.__webglTexture,H||0,ee)}P=-1},this.readRenderTargetPixels=function(E,B,H,j,J,Mt,Dt){if(!(E&&E.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Lt=Xt.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&Dt!==void 0&&(Lt=Lt[Dt]),Lt){wt.bindFramebuffer(q.FRAMEBUFFER,Lt);try{let Zt=E.texture,ee=Zt.format,Yt=Zt.type;if(!Ut.textureFormatReadable(ee)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ut.textureTypeReadable(Yt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}B>=0&&B<=E.width-j&&H>=0&&H<=E.height-J&&q.readPixels(B,H,j,J,Ct.convert(ee),Ct.convert(Yt),Mt)}finally{let Zt=w!==null?Xt.get(w).__webglFramebuffer:null;wt.bindFramebuffer(q.FRAMEBUFFER,Zt)}}},this.copyFramebufferToTexture=function(E,B,H=0){let j=Math.pow(2,-H),J=Math.floor(B.image.width*j),Mt=Math.floor(B.image.height*j);G.setTexture2D(B,0),q.copyTexSubImage2D(q.TEXTURE_2D,H,0,0,E.x,E.y,J,Mt),wt.unbindTexture()},this.copyTextureToTexture=function(E,B,H,j=0){let J=B.image.width,Mt=B.image.height,Dt=Ct.convert(H.format),Lt=Ct.convert(H.type);G.setTexture2D(H,0),q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,H.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,H.unpackAlignment),B.isDataTexture?q.texSubImage2D(q.TEXTURE_2D,j,E.x,E.y,J,Mt,Dt,Lt,B.image.data):B.isCompressedTexture?q.compressedTexSubImage2D(q.TEXTURE_2D,j,E.x,E.y,B.mipmaps[0].width,B.mipmaps[0].height,Dt,B.mipmaps[0].data):q.texSubImage2D(q.TEXTURE_2D,j,E.x,E.y,Dt,Lt,B.image),j===0&&H.generateMipmaps&&q.generateMipmap(q.TEXTURE_2D),wt.unbindTexture()},this.copyTextureToTexture3D=function(E,B,H,j,J=0){let Mt=E.max.x-E.min.x,Dt=E.max.y-E.min.y,Lt=E.max.z-E.min.z,Zt=Ct.convert(j.format),ee=Ct.convert(j.type),Yt;if(j.isData3DTexture)G.setTexture3D(j,0),Yt=q.TEXTURE_3D;else if(j.isDataArrayTexture||j.isCompressedArrayTexture)G.setTexture2DArray(j,0),Yt=q.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,j.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,j.unpackAlignment);let Wt=q.getParameter(q.UNPACK_ROW_LENGTH),ye=q.getParameter(q.UNPACK_IMAGE_HEIGHT),ke=q.getParameter(q.UNPACK_SKIP_PIXELS),on=q.getParameter(q.UNPACK_SKIP_ROWS),_n=q.getParameter(q.UNPACK_SKIP_IMAGES),re=H.isCompressedTexture?H.mipmaps[J]:H.image;q.pixelStorei(q.UNPACK_ROW_LENGTH,re.width),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,re.height),q.pixelStorei(q.UNPACK_SKIP_PIXELS,E.min.x),q.pixelStorei(q.UNPACK_SKIP_ROWS,E.min.y),q.pixelStorei(q.UNPACK_SKIP_IMAGES,E.min.z),H.isDataTexture||H.isData3DTexture?q.texSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,ee,re.data):j.isCompressedArrayTexture?q.compressedTexSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,re.data):q.texSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,ee,re),q.pixelStorei(q.UNPACK_ROW_LENGTH,Wt),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,ye),q.pixelStorei(q.UNPACK_SKIP_PIXELS,ke),q.pixelStorei(q.UNPACK_SKIP_ROWS,on),q.pixelStorei(q.UNPACK_SKIP_IMAGES,_n),J===0&&j.generateMipmaps&&q.generateMipmap(Yt),wt.unbindTexture()},this.initTexture=function(E){E.isCubeTexture?G.setTextureCube(E,0):E.isData3DTexture?G.setTexture3D(E,0):E.isDataArrayTexture||E.isCompressedArrayTexture?G.setTexture2DArray(E,0):G.setTexture2D(E,0),wt.unbindTexture()},this.resetState=function(){C=0,T=0,w=null,wt.reset(),qt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return lr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Md?"display-p3":"srgb",e.unpackColorSpace=Me.workingColorSpace===su?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}};var jc=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new _e(t),this.near=e,this.far=n}clone(){return new r(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Qc=class extends gn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ur,this.environmentIntensity=1,this.environmentRotation=new ur,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}};var od=class extends Us{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new _e(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}},E_=new Be,ad=new zc,Ac=new Go,Cc=new it,tu=class extends gn{constructor(t=new Bi,e=new od){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){let n=this.geometry,i=this.matrixWorld,s=t.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Ac.copy(n.boundingSphere),Ac.applyMatrix4(i),Ac.radius+=s,t.ray.intersectsSphere(Ac)===!1)return;E_.copy(i).invert(),ad.copy(t.ray).applyMatrix4(E_);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,f=n.attributes.position;if(c!==null){let d=Math.max(0,o.start),u=Math.min(c.count,o.start+o.count);for(let _=d,p=u;_<p;_++){let m=c.getX(_);Cc.fromBufferAttribute(f,m),T_(Cc,m,l,i,t,e,this)}}else{let d=Math.max(0,o.start),u=Math.min(f.count,o.start+o.count);for(let _=d,p=u;_<p;_++)Cc.fromBufferAttribute(f,_),T_(Cc,_,l,i,t,e,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function T_(r,t,e,n,i,s,o){let a=ad.distanceSqToPoint(r);if(a<e){let l=new it;ad.closestPointToPoint(r,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:o})}}function Dc(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function jE(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Xo=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t<i)){for(let a=n+2;;){if(i===void 0){if(t<s)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=i,i=e[++n],t<i)break t}o=e.length;break e}if(!(t>=s)){let a=e[1];t<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=s,s=e[--n-1],t>=s)break t}o=n,n=0;break e}break n}for(;n<o;){let a=n+o>>>1;t<e[a]?o=a:n=a+1}if(i=e[n],s=e[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=t*i;for(let o=0;o!==i;++o)e[o]=n[s+o];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},ld=class extends Xo{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:L0,endingEnd:L0}}intervalChanged_(t,e,n){let i=this.parameterPositions,s=t-2,o=t+1,a=i[s],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case F0:s=t,a=2*e-n;break;case N0:s=i.length-2,a=e+i[s]-i[s+1];break;default:s=t,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case F0:o=t,l=2*n-e;break;case N0:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,h=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*h,this._offsetNext=o*h}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=this._offsetPrev,f=this._offsetNext,d=this._weightPrev,u=this._weightNext,_=(n-e)/(i-e),p=_*_,m=p*_,g=-d*m+2*d*p-d*_,b=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*_+1,v=(-1-u)*m+(1.5+u)*p+.5*_,S=u*m-u*p;for(let C=0;C!==a;++C)s[C]=g*o[h+C]+b*o[c+C]+v*o[l+C]+S*o[f+C];return s}},cd=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=(n-e)/(i-e),f=1-h;for(let d=0;d!==a;++d)s[d]=o[c+d]*f+o[l+d]*h;return s}},ud=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},wi=class{constructor(t,e,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Dc(e,this.TimeBufferType),this.values=Dc(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let e=t.constructor,n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:Dc(t.times,Array),values:Dc(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new ud(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new cd(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new ld(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case Pc:e=this.InterpolantFactoryMethodDiscrete;break;case Ic:e=this.InterpolantFactoryMethodLinear;break;case cf:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pc;case this.InterpolantFactoryMethodLinear:return Ic;case this.InterpolantFactoryMethodSmooth:return cf}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(t!==1){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){let n=this.times,i=n.length,s=0,o=i-1;for(;s!==i&&n[s]<t;)++s;for(;o!==-1&&n[o]>e;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),t=!1;break}o=l}if(i!==void 0&&jE(i))for(let a=0,l=i.length;a!==l;++a){let c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===cf,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],h=t[a+1];if(c!==h&&(a!==1||c!==t[0]))if(i)l=!0;else{let f=a*n,d=f-n,u=f+n;for(let _=0;_!==n;++_){let p=e[f+_];if(p!==e[d+_]||p!==e[u+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let f=a*n,d=o*n;for(let u=0;u!==n;++u)e[d+u]=e[f+u]}++o}}if(s>0){t[o]=t[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)e[l+c]=e[a+c];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){let t=this.times.slice(),e=this.values.slice(),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};wi.prototype.TimeBufferType=Float32Array;wi.prototype.ValueBufferType=Float32Array;wi.prototype.DefaultInterpolation=Ic;var Os=class extends wi{};Os.prototype.ValueTypeName="bool";Os.prototype.ValueBufferType=Array;Os.prototype.DefaultInterpolation=Pc;Os.prototype.InterpolantFactoryMethodLinear=void 0;Os.prototype.InterpolantFactoryMethodSmooth=void 0;var hd=class extends wi{};hd.prototype.ValueTypeName="color";var fd=class extends wi{};fd.prototype.ValueTypeName="number";var dd=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-e)/(i-e),c=t*a;for(let h=c+a;c!==h;c+=4)Yr.slerpFlat(s,0,o,c-a,o,c,l);return s}},ja=class extends wi{InterpolantFactoryMethodLinear(t){return new dd(this.times,this.values,this.getValueSize(),t)}};ja.prototype.ValueTypeName="quaternion";ja.prototype.DefaultInterpolation=Ic;ja.prototype.InterpolantFactoryMethodSmooth=void 0;var Bs=class extends wi{};Bs.prototype.ValueTypeName="string";Bs.prototype.ValueBufferType=Array;Bs.prototype.DefaultInterpolation=Pc;Bs.prototype.InterpolantFactoryMethodLinear=void 0;Bs.prototype.InterpolantFactoryMethodSmooth=void 0;var pd=class extends wi{};pd.prototype.ValueTypeName="vector";var md=class{constructor(t,e,n){let i=this,s=!1,o=0,a=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(h){a++,s===!1&&i.onStart!==void 0&&i.onStart(h,o,a),s=!0},this.itemEnd=function(h){o++,i.onProgress!==void 0&&i.onProgress(h,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return l?l(h):h},this.setURLModifier=function(h){return l=h,this},this.addHandler=function(h,f){return c.push(h,f),this},this.removeHandler=function(h){let f=c.indexOf(h);return f!==-1&&c.splice(f,2),this},this.getHandler=function(h){for(let f=0,d=c.length;f<d;f+=2){let u=c[f],_=c[f+1];if(u.global&&(u.lastIndex=0),u.test(h))return _}return null}}},QE=new md,gd=class{constructor(t){this.manager=t!==void 0?t:QE,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let n=this;return new Promise(function(i,s){n.load(t,i,e,s)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}};gd.DEFAULT_MATERIAL_NAME="__DEFAULT";var eu=class extends gn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new _e(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),e}},nu=class extends eu{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(gn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new _e(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},Uf=new Be,A_=new it,C_=new it,_d=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Be,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ka,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new tn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;A_.setFromMatrixPosition(t.matrixWorld),e.position.copy(A_),C_.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C_),e.updateMatrixWorld(),Uf.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Uf),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Uf)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}};var xd=class extends _d{constructor(){super(new Zc(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},ks=class extends eu{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(gn.DEFAULT_UP),this.updateMatrix(),this.target=new gn,this.shadow=new xd}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var wd="\\[\\]\\.:\\/",tT=new RegExp("["+wd+"]","g"),Ed="[^"+wd+"]",eT="[^"+wd.replace("\\.","")+"]",nT=/((?:WC+[\/:])*)/.source.replace("WC",Ed),iT=/(WCOD+)?/.source.replace("WCOD",eT),rT=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ed),sT=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ed),oT=new RegExp("^"+nT+iT+rT+sT+"$"),aT=["material","materials","bones","map"],yd=class{constructor(t,e,n){let i=n||De.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},De=class r{constructor(t,e,n){this.path=e,this.parsedPath=n||r.parseTrackName(e),this.node=r.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new r.Composite(t,e,n):new r(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(tT,"")}static parseTrackName(t){let e=oT.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);aT.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;o<s.length;o++){let a=s[o];if(a.name===e||a.uuid===e)return a;let l=n(a.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node,e=this.parsedPath,n=e.objectName,i=e.propertyName,s=e.propertyIndex;if(t||(t=r.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=e.objectIndex;switch(n){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===c){c=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let o=t[i];if(o===void 0){let c=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(i==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[s]!==void 0&&(s=t.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};De.Composite=yd;De.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};De.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};De.prototype.GetterByBindingType=[De.prototype._getValue_direct,De.prototype._getValue_array,De.prototype._getValue_arrayElement,De.prototype._getValue_toArray];De.prototype.SetterByBindingTypeAndVersioning=[[De.prototype._setValue_direct,De.prototype._setValue_direct_setNeedsUpdate,De.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[De.prototype._setValue_array,De.prototype._setValue_array_setNeedsUpdate,De.prototype._setValue_array_setMatrixWorldNeedsUpdate],[De.prototype._setValue_arrayElement,De.prototype._setValue_arrayElement_setNeedsUpdate,De.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[De.prototype._setValue_fromArray,De.prototype._setValue_fromArray_setNeedsUpdate,De.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var GA=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:vd}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=vd);var $_=()=>{var r=new kr;function t(){let e=document.querySelector("#canvas"),n=new Kc({canvas:e,antialias:!0,alpha:!0}),i=new Qc,s=new Cn(18);s.near=1,s.far=2e3,s.position.z=-10,n.outputColorSpace=ii,n.shadowMap.enabled=!0,n.shadowMap.type=Sd,i.fog=new jc(3741705,9,15),i.add(r);function o(){let h=new nu(16777215,41378,1),f=new ks(3355443,4);f.position.set(5,5,5),f.lookAt(0,0,0),f.castShadow=!0,f.shadow.mapSize.width=512,f.shadow.mapSize.height=512,f.shadow.camera.near=.5,f.shadow.camera.far=500,i.add(f),i.add(h);let d=[];d[0]=new ks(16777215,1),d[0].position.set(1,0,0),d[1]=new ks(11460838,1),d[1].position.set(.75,1,.5),d[2]=new ks(14277490,1),d[2].position.set(-.75,-1,.5),i.add(d[0]),i.add(d[1]),i.add(d[2])}function a(h,f){let d=new Bi,u=[],_=[],p=f||25,m=p/2;for(let v=0;v<(h||7e3);v++){let S=Math.random()*p-m,C=Math.random()*p-m,T=Math.random()*p-m;u.push(S,C,T),_.push(Math.random()*.9+.1)}d.setAttribute("position",new oi(u,3)),d.setAttribute("opacity",new oi(_,1)),d.computeBoundingSphere();let g=new li({vertexShader:`
3821
+ }`,rd=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(this.texture===null){let i=new ai,s=t.properties.get(i);s.__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}render(t,e){if(this.texture!==null){if(this.mesh===null){let n=e.cameras[0].viewport,i=new li({vertexShader:qE,fragmentShader:ZE,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new bi(new qc(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},sd=class extends Xr{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,h=null,f=null,d=null,u=null,_=null,p=new rd,m=e.getContextAttributes(),g=null,b=null,v=[],S=[],C=new xe,T=null,w=new Cn;w.layers.enable(1),w.viewport=new tn;let P=new Cn;P.layers.enable(2),P.viewport=new tn;let M=[w,P],y=new id;y.layers.enable(1),y.layers.enable(2);let I=null,N=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getTargetRaySpace()},this.getControllerGrip=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getGripSpace()},this.getHand=function(X){let at=v[X];return at===void 0&&(at=new Za,v[X]=at),at.getHandSpace()};function D(X){let at=S.indexOf(X.inputSource);if(at===-1)return;let yt=v[at];yt!==void 0&&(yt.update(X.inputSource,X.frame,c||o),yt.dispatchEvent({type:X.type,data:X.inputSource}))}function V(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",V),i.removeEventListener("inputsourceschange",K);for(let X=0;X<v.length;X++){let at=S[X];at!==null&&(S[X]=null,v[X].disconnect(at))}I=null,N=null,p.reset(),t.setRenderTarget(g),u=null,d=null,f=null,i=null,b=null,Bt.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(C.width,C.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){s=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){a=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(X){c=X},this.getBaseLayer=function(){return d!==null?d:u},this.getBinding=function(){return f},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(g=t.getRenderTarget(),i.addEventListener("select",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",V),i.addEventListener("inputsourceschange",K),m.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(C),i.renderState.layers===void 0){let at={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};u=new XRWebGLLayer(i,e,at),i.updateRenderState({baseLayer:u}),t.setPixelRatio(1),t.setSize(u.framebufferWidth,u.framebufferHeight,!1),b=new cr(u.framebufferWidth,u.framebufferHeight,{format:Oi,type:Wr,colorSpace:t.outputColorSpace,stencilBuffer:m.stencil})}else{let at=null,yt=null,ut=null;m.depth&&(ut=m.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,at=m.stencil?$a:Oo,yt=m.stencil?Qa:Ho);let It={colorFormat:e.RGBA8,depthFormat:ut,scaleFactor:s};f=new XRWebGLBinding(i,e),d=f.createProjectionLayer(It),i.updateRenderState({layers:[d]}),t.setPixelRatio(1),t.setSize(d.textureWidth,d.textureHeight,!1),b=new cr(d.textureWidth,d.textureHeight,{format:Oi,type:Wr,depthTexture:new Jc(d.textureWidth,d.textureHeight,yt,void 0,void 0,void 0,void 0,void 0,void 0,at),stencilBuffer:m.stencil,colorSpace:t.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Bt.setContext(i),Bt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function K(X){for(let at=0;at<X.removed.length;at++){let yt=X.removed[at],ut=S.indexOf(yt);ut>=0&&(S[ut]=null,v[ut].disconnect(yt))}for(let at=0;at<X.added.length;at++){let yt=X.added[at],ut=S.indexOf(yt);if(ut===-1){for(let Ht=0;Ht<v.length;Ht++)if(Ht>=S.length){S.push(yt),ut=Ht;break}else if(S[Ht]===null){S[Ht]=yt,ut=Ht;break}if(ut===-1)break}let It=v[ut];It&&It.connect(yt)}}let W=new it,Z=new it;function z(X,at,yt){W.setFromMatrixPosition(at.matrixWorld),Z.setFromMatrixPosition(yt.matrixWorld);let ut=W.distanceTo(Z),It=at.projectionMatrix.elements,Ht=yt.projectionMatrix.elements,q=It[14]/(It[10]-1),jt=It[14]/(It[10]+1),Ft=(It[9]+1)/It[5],Ut=(It[9]-1)/It[5],wt=(It[8]-1)/It[0],At=(Ht[8]+1)/Ht[0],Xt=q*wt,G=q*At,Qt=ut/(-wt+At),A=Qt*-wt;at.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(A),X.translateZ(Qt),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();let x=q+Qt,F=jt+Qt,Y=Xt-A,et=G+(ut-A),rt=Ft*jt/F*x,St=Ut*jt/F*x;X.projectionMatrix.makePerspective(Y,et,rt,St,x,F),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function U(X,at){at===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices(at.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;p.texture!==null&&(X.near=p.depthNear,X.far=p.depthFar),y.near=P.near=w.near=X.near,y.far=P.far=w.far=X.far,(I!==y.near||N!==y.far)&&(i.updateRenderState({depthNear:y.near,depthFar:y.far}),I=y.near,N=y.far,w.near=I,w.far=N,P.near=I,P.far=N,w.updateProjectionMatrix(),P.updateProjectionMatrix(),X.updateProjectionMatrix());let at=X.parent,yt=y.cameras;U(y,at);for(let ut=0;ut<yt.length;ut++)U(yt[ut],at);yt.length===2?z(y,w,P):y.projectionMatrix.copy(w.projectionMatrix),R(X,y,at)};function R(X,at,yt){yt===null?X.matrix.copy(at.matrixWorld):(X.matrix.copy(yt.matrixWorld),X.matrix.invert(),X.matrix.multiply(at.matrixWorld)),X.matrix.decompose(X.position,X.quaternion,X.scale),X.updateMatrixWorld(!0),X.projectionMatrix.copy(at.projectionMatrix),X.projectionMatrixInverse.copy(at.projectionMatrixInverse),X.isPerspectiveCamera&&(X.fov=Gf*2*Math.atan(1/X.projectionMatrix.elements[5]),X.zoom=1)}this.getCamera=function(){return y},this.getFoveation=function(){if(!(d===null&&u===null))return l},this.setFoveation=function(X){l=X,d!==null&&(d.fixedFoveation=X),u!==null&&u.fixedFoveation!==void 0&&(u.fixedFoveation=X)},this.hasDepthSensing=function(){return p.texture!==null};let lt=null;function xt(X,at){if(h=at.getViewerPose(c||o),_=at,h!==null){let yt=h.views;u!==null&&(t.setRenderTargetFramebuffer(b,u.framebuffer),t.setRenderTarget(b));let ut=!1;yt.length!==y.cameras.length&&(y.cameras.length=0,ut=!0);for(let Ht=0;Ht<yt.length;Ht++){let q=yt[Ht],jt=null;if(u!==null)jt=u.getViewport(q);else{let Ut=f.getViewSubImage(d,q);jt=Ut.viewport,Ht===0&&(t.setRenderTargetTextures(b,Ut.colorTexture,d.ignoreDepthValues?void 0:Ut.depthStencilTexture),t.setRenderTarget(b))}let Ft=M[Ht];Ft===void 0&&(Ft=new Cn,Ft.layers.enable(Ht),Ft.viewport=new tn,M[Ht]=Ft),Ft.matrix.fromArray(q.transform.matrix),Ft.matrix.decompose(Ft.position,Ft.quaternion,Ft.scale),Ft.projectionMatrix.fromArray(q.projectionMatrix),Ft.projectionMatrixInverse.copy(Ft.projectionMatrix).invert(),Ft.viewport.set(jt.x,jt.y,jt.width,jt.height),Ht===0&&(y.matrix.copy(Ft.matrix),y.matrix.decompose(y.position,y.quaternion,y.scale)),ut===!0&&y.cameras.push(Ft)}let It=i.enabledFeatures;if(It&&It.includes("depth-sensing")){let Ht=f.getDepthInformation(yt[0]);Ht&&Ht.isValid&&Ht.texture&&p.init(t,Ht,i.renderState)}}for(let yt=0;yt<v.length;yt++){let ut=S[yt],It=v[yt];ut!==null&&It!==void 0&&It.update(ut,at,c||o)}p.render(t,y),lt&&lt(X,at),at.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:at}),_=null}let Bt=new G_;Bt.setAnimationLoop(xt),this.setAnimationLoop=function(X){lt=X},this.dispose=function(){}}},Ds=new ur,$E=new Be;function JE(r,t){function e(m,g){m.matrixAutoUpdate===!0&&m.updateMatrix(),g.value.copy(m.matrix)}function n(m,g){g.color.getRGB(m.fogColor.value,H_(r)),g.isFog?(m.fogNear.value=g.near,m.fogFar.value=g.far):g.isFogExp2&&(m.fogDensity.value=g.density)}function i(m,g,b,v,S){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(m,g):g.isMeshToonMaterial?(s(m,g),f(m,g)):g.isMeshPhongMaterial?(s(m,g),h(m,g)):g.isMeshStandardMaterial?(s(m,g),d(m,g),g.isMeshPhysicalMaterial&&u(m,g,S)):g.isMeshMatcapMaterial?(s(m,g),_(m,g)):g.isMeshDepthMaterial?s(m,g):g.isMeshDistanceMaterial?(s(m,g),p(m,g)):g.isMeshNormalMaterial?s(m,g):g.isLineBasicMaterial?(o(m,g),g.isLineDashedMaterial&&a(m,g)):g.isPointsMaterial?l(m,g,b,v):g.isSpriteMaterial?c(m,g):g.isShadowMaterial?(m.color.value.copy(g.color),m.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(m,g){m.opacity.value=g.opacity,g.color&&m.diffuse.value.copy(g.color),g.emissive&&m.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(m.map.value=g.map,e(g.map,m.mapTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.bumpMap&&(m.bumpMap.value=g.bumpMap,e(g.bumpMap,m.bumpMapTransform),m.bumpScale.value=g.bumpScale,g.side===Un&&(m.bumpScale.value*=-1)),g.normalMap&&(m.normalMap.value=g.normalMap,e(g.normalMap,m.normalMapTransform),m.normalScale.value.copy(g.normalScale),g.side===Un&&m.normalScale.value.negate()),g.displacementMap&&(m.displacementMap.value=g.displacementMap,e(g.displacementMap,m.displacementMapTransform),m.displacementScale.value=g.displacementScale,m.displacementBias.value=g.displacementBias),g.emissiveMap&&(m.emissiveMap.value=g.emissiveMap,e(g.emissiveMap,m.emissiveMapTransform)),g.specularMap&&(m.specularMap.value=g.specularMap,e(g.specularMap,m.specularMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest);let b=t.get(g),v=b.envMap,S=b.envMapRotation;if(v&&(m.envMap.value=v,Ds.copy(S),Ds.x*=-1,Ds.y*=-1,Ds.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(Ds.y*=-1,Ds.z*=-1),m.envMapRotation.value.setFromMatrix4($E.makeRotationFromEuler(Ds)),m.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=g.reflectivity,m.ior.value=g.ior,m.refractionRatio.value=g.refractionRatio),g.lightMap){m.lightMap.value=g.lightMap;let C=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=g.lightMapIntensity*C,e(g.lightMap,m.lightMapTransform)}g.aoMap&&(m.aoMap.value=g.aoMap,m.aoMapIntensity.value=g.aoMapIntensity,e(g.aoMap,m.aoMapTransform))}function o(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,g.map&&(m.map.value=g.map,e(g.map,m.mapTransform))}function a(m,g){m.dashSize.value=g.dashSize,m.totalSize.value=g.dashSize+g.gapSize,m.scale.value=g.scale}function l(m,g,b,v){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.size.value=g.size*b,m.scale.value=v*.5,g.map&&(m.map.value=g.map,e(g.map,m.uvTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest)}function c(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.rotation.value=g.rotation,g.map&&(m.map.value=g.map,e(g.map,m.mapTransform)),g.alphaMap&&(m.alphaMap.value=g.alphaMap,e(g.alphaMap,m.alphaMapTransform)),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest)}function h(m,g){m.specular.value.copy(g.specular),m.shininess.value=Math.max(g.shininess,1e-4)}function f(m,g){g.gradientMap&&(m.gradientMap.value=g.gradientMap)}function d(m,g){m.metalness.value=g.metalness,g.metalnessMap&&(m.metalnessMap.value=g.metalnessMap,e(g.metalnessMap,m.metalnessMapTransform)),m.roughness.value=g.roughness,g.roughnessMap&&(m.roughnessMap.value=g.roughnessMap,e(g.roughnessMap,m.roughnessMapTransform)),g.envMap&&(m.envMapIntensity.value=g.envMapIntensity)}function u(m,g,b){m.ior.value=g.ior,g.sheen>0&&(m.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),m.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(m.sheenColorMap.value=g.sheenColorMap,e(g.sheenColorMap,m.sheenColorMapTransform)),g.sheenRoughnessMap&&(m.sheenRoughnessMap.value=g.sheenRoughnessMap,e(g.sheenRoughnessMap,m.sheenRoughnessMapTransform))),g.clearcoat>0&&(m.clearcoat.value=g.clearcoat,m.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(m.clearcoatMap.value=g.clearcoatMap,e(g.clearcoatMap,m.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,e(g.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(m.clearcoatNormalMap.value=g.clearcoatNormalMap,e(g.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Un&&m.clearcoatNormalScale.value.negate())),g.dispersion>0&&(m.dispersion.value=g.dispersion),g.iridescence>0&&(m.iridescence.value=g.iridescence,m.iridescenceIOR.value=g.iridescenceIOR,m.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(m.iridescenceMap.value=g.iridescenceMap,e(g.iridescenceMap,m.iridescenceMapTransform)),g.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=g.iridescenceThicknessMap,e(g.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),g.transmission>0&&(m.transmission.value=g.transmission,m.transmissionSamplerMap.value=b.texture,m.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(m.transmissionMap.value=g.transmissionMap,e(g.transmissionMap,m.transmissionMapTransform)),m.thickness.value=g.thickness,g.thicknessMap&&(m.thicknessMap.value=g.thicknessMap,e(g.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=g.attenuationDistance,m.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(m.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(m.anisotropyMap.value=g.anisotropyMap,e(g.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=g.specularIntensity,m.specularColor.value.copy(g.specularColor),g.specularColorMap&&(m.specularColorMap.value=g.specularColorMap,e(g.specularColorMap,m.specularColorMapTransform)),g.specularIntensityMap&&(m.specularIntensityMap.value=g.specularIntensityMap,e(g.specularIntensityMap,m.specularIntensityMapTransform))}function _(m,g){g.matcap&&(m.matcap.value=g.matcap)}function p(m,g){let b=t.get(g).light;m.referencePosition.value.setFromMatrixPosition(b.matrixWorld),m.nearDistance.value=b.shadow.camera.near,m.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function KE(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,v){let S=v.program;n.uniformBlockBinding(b,S)}function c(b,v){let S=i[b.id];S===void 0&&(_(b),S=h(b),i[b.id]=S,b.addEventListener("dispose",m));let C=v.program;n.updateUBOMapping(b,C);let T=t.render.frame;s[b.id]!==T&&(d(b),s[b.id]=T)}function h(b){let v=f();b.__bindingPointIndex=v;let S=r.createBuffer(),C=b.__size,T=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,S),r.bufferData(r.UNIFORM_BUFFER,C,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,v,S),S}function f(){for(let b=0;b<a;b++)if(o.indexOf(b)===-1)return o.push(b),b;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(b){let v=i[b.id],S=b.uniforms,C=b.__cache;r.bindBuffer(r.UNIFORM_BUFFER,v);for(let T=0,w=S.length;T<w;T++){let P=Array.isArray(S[T])?S[T]:[S[T]];for(let M=0,y=P.length;M<y;M++){let I=P[M];if(u(I,T,M,C)===!0){let N=I.__offset,D=Array.isArray(I.value)?I.value:[I.value],V=0;for(let K=0;K<D.length;K++){let W=D[K],Z=p(W);typeof W=="number"||typeof W=="boolean"?(I.__data[0]=W,r.bufferSubData(r.UNIFORM_BUFFER,N+V,I.__data)):W.isMatrix3?(I.__data[0]=W.elements[0],I.__data[1]=W.elements[1],I.__data[2]=W.elements[2],I.__data[3]=0,I.__data[4]=W.elements[3],I.__data[5]=W.elements[4],I.__data[6]=W.elements[5],I.__data[7]=0,I.__data[8]=W.elements[6],I.__data[9]=W.elements[7],I.__data[10]=W.elements[8],I.__data[11]=0):(W.toArray(I.__data,V),V+=Z.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,N,I.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function u(b,v,S,C){let T=b.value,w=v+"_"+S;if(C[w]===void 0)return typeof T=="number"||typeof T=="boolean"?C[w]=T:C[w]=T.clone(),!0;{let P=C[w];if(typeof T=="number"||typeof T=="boolean"){if(P!==T)return C[w]=T,!0}else if(P.equals(T)===!1)return P.copy(T),!0}return!1}function _(b){let v=b.uniforms,S=0,C=16;for(let w=0,P=v.length;w<P;w++){let M=Array.isArray(v[w])?v[w]:[v[w]];for(let y=0,I=M.length;y<I;y++){let N=M[y],D=Array.isArray(N.value)?N.value:[N.value];for(let V=0,K=D.length;V<K;V++){let W=D[V],Z=p(W),z=S%C;z!==0&&C-z<Z.boundary&&(S+=C-z),N.__data=new Float32Array(Z.storage/Float32Array.BYTES_PER_ELEMENT),N.__offset=S,S+=Z.storage}}}let T=S%C;return T>0&&(S+=C-T),b.__size=S,b.__cache={},this}function p(b){let v={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(v.boundary=4,v.storage=4):b.isVector2?(v.boundary=8,v.storage=8):b.isVector3||b.isColor?(v.boundary=16,v.storage=12):b.isVector4?(v.boundary=16,v.storage=16):b.isMatrix3?(v.boundary=48,v.storage=48):b.isMatrix4?(v.boundary=64,v.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),v}function m(b){let v=b.target;v.removeEventListener("dispose",m);let S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),r.deleteBuffer(i[v.id]),delete i[v.id],delete s[v.id]}function g(){for(let b in i)r.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:g}}var Kc=class{constructor(t={}){let{canvas:e=sS(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:f=!1}=t;this.isWebGLRenderer=!0;let d;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=n.getContextAttributes().alpha}else d=o;let u=new Uint32Array(4),_=new Int32Array(4),p=null,m=null,g=[],b=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=ii,this._useLegacyLights=!1,this.toneMapping=Hr,this.toneMappingExposure=1;let v=this,S=!1,C=0,T=0,w=null,P=-1,M=null,y=new tn,I=new tn,N=null,D=new _e(0),V=0,K=e.width,W=e.height,Z=1,z=null,U=null,R=new tn(0,0,K,W),lt=new tn(0,0,K,W),xt=!1,Bt=new Ka,X=!1,at=!1,yt=new Be,ut=new it,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ht(){return w===null?Z:1}let q=n;function jt(E,B){return e.getContext(E,B)}try{let E={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:f};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${vd}`),e.addEventListener("webglcontextlost",k,!1),e.addEventListener("webglcontextrestored",tt,!1),e.addEventListener("webglcontextcreationerror",ot,!1),q===null){let B="webgl2";if(q=jt(B,E),q===null)throw jt(B)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}let Ft,Ut,wt,At,Xt,G,Qt,A,x,F,Y,et,rt,St,mt,ct,Nt,ft,vt,$t,ht,Ct,qt,Jt;function he(){Ft=new gw(q),Ft.init(),Ct=new XE(q,Ft),Ut=new uw(q,Ft,t,Ct),wt=new GE(q),At=new yw(q),Xt=new PE,G=new WE(q,Ft,wt,Xt,Ut,Ct,At),Qt=new fw(v),A=new mw(v),x=new TS(q),qt=new lw(q,x),F=new _w(q,x,At,qt),Y=new Sw(q,F,x,At),vt=new vw(q,Ut,G),ct=new hw(Xt),et=new RE(v,Qt,A,Ft,Ut,qt,ct),rt=new JE(v,Xt),St=new LE,mt=new kE(Ft),ft=new aw(v,Qt,A,wt,Y,d,l),Nt=new HE(v,Y,Ut),Jt=new KE(q,At,Ut,wt),$t=new cw(q,Ft,At),ht=new xw(q,Ft,At),At.programs=et.programs,v.capabilities=Ut,v.extensions=Ft,v.properties=Xt,v.renderLists=St,v.shadowMap=Nt,v.state=wt,v.info=At}he();let Kt=new sd(v,q);this.xr=Kt,this.getContext=function(){return q},this.getContextAttributes=function(){return q.getContextAttributes()},this.forceContextLoss=function(){let E=Ft.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=Ft.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(E){E!==void 0&&(Z=E,this.setSize(K,W,!1))},this.getSize=function(E){return E.set(K,W)},this.setSize=function(E,B,H=!0){if(Kt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}K=E,W=B,e.width=Math.floor(E*Z),e.height=Math.floor(B*Z),H===!0&&(e.style.width=E+"px",e.style.height=B+"px"),this.setViewport(0,0,E,B)},this.getDrawingBufferSize=function(E){return E.set(K*Z,W*Z).floor()},this.setDrawingBufferSize=function(E,B,H){K=E,W=B,Z=H,e.width=Math.floor(E*H),e.height=Math.floor(B*H),this.setViewport(0,0,E,B)},this.getCurrentViewport=function(E){return E.copy(y)},this.getViewport=function(E){return E.copy(R)},this.setViewport=function(E,B,H,j){E.isVector4?R.set(E.x,E.y,E.z,E.w):R.set(E,B,H,j),wt.viewport(y.copy(R).multiplyScalar(Z).round())},this.getScissor=function(E){return E.copy(lt)},this.setScissor=function(E,B,H,j){E.isVector4?lt.set(E.x,E.y,E.z,E.w):lt.set(E,B,H,j),wt.scissor(I.copy(lt).multiplyScalar(Z).round())},this.getScissorTest=function(){return xt},this.setScissorTest=function(E){wt.setScissorTest(xt=E)},this.setOpaqueSort=function(E){z=E},this.setTransparentSort=function(E){U=E},this.getClearColor=function(E){return E.copy(ft.getClearColor())},this.setClearColor=function(){ft.setClearColor.apply(ft,arguments)},this.getClearAlpha=function(){return ft.getClearAlpha()},this.setClearAlpha=function(){ft.setClearAlpha.apply(ft,arguments)},this.clear=function(E=!0,B=!0,H=!0){let j=0;if(E){let J=!1;if(w!==null){let Mt=w.texture.format;J=Mt===B_||Mt===O_||Mt===U_}if(J){let Mt=w.texture.type,Dt=Mt===Wr||Mt===Ho||Mt===I_||Mt===Qa||Mt===F_||Mt===N_,Lt=ft.getClearColor(),Zt=ft.getClearAlpha(),ee=Lt.r,Yt=Lt.g,Wt=Lt.b;Dt?(u[0]=ee,u[1]=Yt,u[2]=Wt,u[3]=Zt,q.clearBufferuiv(q.COLOR,0,u)):(_[0]=ee,_[1]=Yt,_[2]=Wt,_[3]=Zt,q.clearBufferiv(q.COLOR,0,_))}else j|=q.COLOR_BUFFER_BIT}B&&(j|=q.DEPTH_BUFFER_BIT),H&&(j|=q.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),q.clear(j)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",k,!1),e.removeEventListener("webglcontextrestored",tt,!1),e.removeEventListener("webglcontextcreationerror",ot,!1),St.dispose(),mt.dispose(),Xt.dispose(),Qt.dispose(),A.dispose(),Y.dispose(),qt.dispose(),Jt.dispose(),et.dispose(),Kt.dispose(),Kt.removeEventListener("sessionstart",st),Kt.removeEventListener("sessionend",O),Q.stop()};function k(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function tt(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;let E=At.autoReset,B=Nt.enabled,H=Nt.autoUpdate,j=Nt.needsUpdate,J=Nt.type;he(),At.autoReset=E,Nt.enabled=B,Nt.autoUpdate=H,Nt.needsUpdate=j,Nt.type=J}function ot(E){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",E.statusMessage)}function gt(E){let B=E.target;B.removeEventListener("dispose",gt),_t(B)}function _t(E){zt(E),Xt.remove(E)}function zt(E){let B=Xt.get(E).programs;B!==void 0&&(B.forEach(function(H){et.releaseProgram(H)}),E.isShaderMaterial&&et.releaseShaderCache(E))}this.renderBufferDirect=function(E,B,H,j,J,Mt){B===null&&(B=It);let Dt=J.isMesh&&J.matrixWorld.determinant()<0,Lt=fe(E,B,H,j,J);wt.setMaterial(j,Dt);let Zt=H.index,ee=1;if(j.wireframe===!0){if(Zt=F.getWireframeAttribute(H),Zt===void 0)return;ee=2}let Yt=H.drawRange,Wt=H.attributes.position,ye=Yt.start*ee,ke=(Yt.start+Yt.count)*ee;Mt!==null&&(ye=Math.max(ye,Mt.start*ee),ke=Math.min(ke,(Mt.start+Mt.count)*ee)),Zt!==null?(ye=Math.max(ye,0),ke=Math.min(ke,Zt.count)):Wt!=null&&(ye=Math.max(ye,0),ke=Math.min(ke,Wt.count));let on=ke-ye;if(on<0||on===1/0)return;qt.setup(J,j,Lt,H,Zt);let _n,re=$t;if(Zt!==null&&(_n=x.get(Zt),re=ht,re.setIndex(_n)),J.isMesh)j.wireframe===!0?(wt.setLineWidth(j.wireframeLinewidth*Ht()),re.setMode(q.LINES)):re.setMode(q.TRIANGLES);else if(J.isLine){let te=j.linewidth;te===void 0&&(te=1),wt.setLineWidth(te*Ht()),J.isLineSegments?re.setMode(q.LINES):J.isLineLoop?re.setMode(q.LINE_LOOP):re.setMode(q.LINE_STRIP)}else J.isPoints?re.setMode(q.POINTS):J.isSprite&&re.setMode(q.TRIANGLES);if(J.isBatchedMesh)J._multiDrawInstances!==null?re.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances):re.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else if(J.isInstancedMesh)re.renderInstances(ye,on,J.count);else if(H.isInstancedBufferGeometry){let te=H._maxInstanceCount!==void 0?H._maxInstanceCount:1/0,Ei=Math.min(H.instanceCount,te);re.renderInstances(ye,on,Ei)}else re.render(ye,on)};function ie(E,B,H){E.transparent===!0&&E.side===ar&&E.forceSinglePass===!1?(E.side=Un,E.needsUpdate=!0,Gt(E,B,H),E.side=Gr,E.needsUpdate=!0,Gt(E,B,H),E.side=ar):Gt(E,B,H)}this.compile=function(E,B,H=null){H===null&&(H=E),m=mt.get(H),m.init(B),b.push(m),H.traverseVisible(function(J){J.isLight&&J.layers.test(B.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),E!==H&&E.traverseVisible(function(J){J.isLight&&J.layers.test(B.layers)&&(m.pushLight(J),J.castShadow&&m.pushShadow(J))}),m.setupLights(v._useLegacyLights);let j=new Set;return E.traverse(function(J){let Mt=J.material;if(Mt)if(Array.isArray(Mt))for(let Dt=0;Dt<Mt.length;Dt++){let Lt=Mt[Dt];ie(Lt,H,J),j.add(Lt)}else ie(Mt,H,J),j.add(Mt)}),b.pop(),m=null,j},this.compileAsync=function(E,B,H=null){let j=this.compile(E,B,H);return new Promise(J=>{function Mt(){if(j.forEach(function(Dt){Xt.get(Dt).currentProgram.isReady()&&j.delete(Dt)}),j.size===0){J(E);return}setTimeout(Mt,10)}Ft.get("KHR_parallel_shader_compile")!==null?Mt():setTimeout(Mt,10)})};let bt=null;function L(E){bt&&bt(E)}function st(){Q.stop()}function O(){Q.start()}let Q=new G_;Q.setAnimationLoop(L),typeof self<"u"&&Q.setContext(self),this.setAnimationLoop=function(E){bt=E,Kt.setAnimationLoop(E),E===null?Q.stop():Q.start()},Kt.addEventListener("sessionstart",st),Kt.addEventListener("sessionend",O),this.render=function(E,B){if(B!==void 0&&B.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;E.matrixWorldAutoUpdate===!0&&E.updateMatrixWorld(),B.parent===null&&B.matrixWorldAutoUpdate===!0&&B.updateMatrixWorld(),Kt.enabled===!0&&Kt.isPresenting===!0&&(Kt.cameraAutoUpdate===!0&&Kt.updateCamera(B),B=Kt.getCamera()),E.isScene===!0&&E.onBeforeRender(v,E,B,w),m=mt.get(E,b.length),m.init(B),b.push(m),yt.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse),Bt.setFromProjectionMatrix(yt),at=this.localClippingEnabled,X=ct.init(this.clippingPlanes,at),p=St.get(E,g.length),p.init(),g.push(p),pt(E,B,0,v.sortObjects),p.finish(),v.sortObjects===!0&&p.sort(z,U);let H=Kt.enabled===!1||Kt.isPresenting===!1||Kt.hasDepthSensing()===!1;H&&ft.addToRenderList(p,E),this.info.render.frame++,X===!0&&ct.beginShadows();let j=m.state.shadowsArray;Nt.render(j,E,B),X===!0&&ct.endShadows(),this.info.autoReset===!0&&this.info.reset();let J=p.opaque,Mt=p.transmissive;if(m.setupLights(v._useLegacyLights),B.isArrayCamera){let Dt=B.cameras;if(Mt.length>0)for(let Lt=0,Zt=Dt.length;Lt<Zt;Lt++){let ee=Dt[Lt];Et(J,Mt,E,ee)}H&&ft.render(E);for(let Lt=0,Zt=Dt.length;Lt<Zt;Lt++){let ee=Dt[Lt];nt(p,E,ee,ee.viewport)}}else Mt.length>0&&Et(J,Mt,E,B),H&&ft.render(E),nt(p,E,B);w!==null&&(G.updateMultisampleRenderTarget(w),G.updateRenderTargetMipmap(w)),E.isScene===!0&&E.onAfterRender(v,E,B),qt.resetDefaultState(),P=-1,M=null,b.pop(),b.length>0?(m=b[b.length-1],X===!0&&ct.setGlobalState(v.clippingPlanes,m.state.camera)):m=null,g.pop(),g.length>0?p=g[g.length-1]:p=null};function pt(E,B,H,j){if(E.visible===!1)return;if(E.layers.test(B.layers)){if(E.isGroup)H=E.renderOrder;else if(E.isLOD)E.autoUpdate===!0&&E.update(B);else if(E.isLight)m.pushLight(E),E.castShadow&&m.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||Bt.intersectsSprite(E)){j&&ut.setFromMatrixPosition(E.matrixWorld).applyMatrix4(yt);let Dt=Y.update(E),Lt=E.material;Lt.visible&&p.push(E,Dt,Lt,H,ut.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(!E.frustumCulled||Bt.intersectsObject(E))){let Dt=Y.update(E),Lt=E.material;if(j&&(E.boundingSphere!==void 0?(E.boundingSphere===null&&E.computeBoundingSphere(),ut.copy(E.boundingSphere.center)):(Dt.boundingSphere===null&&Dt.computeBoundingSphere(),ut.copy(Dt.boundingSphere.center)),ut.applyMatrix4(E.matrixWorld).applyMatrix4(yt)),Array.isArray(Lt)){let Zt=Dt.groups;for(let ee=0,Yt=Zt.length;ee<Yt;ee++){let Wt=Zt[ee],ye=Lt[Wt.materialIndex];ye&&ye.visible&&p.push(E,Dt,ye,H,ut.z,Wt)}}else Lt.visible&&p.push(E,Dt,Lt,H,ut.z,null)}}let Mt=E.children;for(let Dt=0,Lt=Mt.length;Dt<Lt;Dt++)pt(Mt[Dt],B,H,j)}function nt(E,B,H,j){let J=E.opaque,Mt=E.transmissive,Dt=E.transparent;m.setupLightsView(H),X===!0&&ct.setGlobalState(v.clippingPlanes,H),j&&wt.viewport(y.copy(j)),J.length>0&&dt(J,B,H),Mt.length>0&&dt(Mt,B,H),Dt.length>0&&dt(Dt,B,H),wt.buffers.depth.setTest(!0),wt.buffers.depth.setMask(!0),wt.buffers.color.setMask(!0),wt.setPolygonOffset(!1)}function Et(E,B,H,j){if((H.isScene===!0?H.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[j.id]===void 0&&(m.state.transmissionRenderTarget[j.id]=new cr(1,1,{generateMipmaps:!0,type:Ft.has("EXT_color_buffer_half_float")||Ft.has("EXT_color_buffer_float")?ru:Wr,minFilter:Fs,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let Mt=m.state.transmissionRenderTarget[j.id],Dt=j.viewport||y;Mt.setSize(Dt.z,Dt.w);let Lt=v.getRenderTarget();v.setRenderTarget(Mt),v.getClearColor(D),V=v.getClearAlpha(),V<1&&v.setClearColor(16777215,.5),v.clear();let Zt=v.toneMapping;v.toneMapping=Hr;let ee=j.viewport;if(j.viewport!==void 0&&(j.viewport=void 0),m.setupLightsView(j),X===!0&&ct.setGlobalState(v.clippingPlanes,j),dt(E,H,j),G.updateMultisampleRenderTarget(Mt),G.updateRenderTargetMipmap(Mt),Ft.has("WEBGL_multisampled_render_to_texture")===!1){let Yt=!1;for(let Wt=0,ye=B.length;Wt<ye;Wt++){let ke=B[Wt],on=ke.object,_n=ke.geometry,re=ke.material,te=ke.group;if(re.side===ar&&on.layers.test(j.layers)){let Ei=re.side;re.side=Un,re.needsUpdate=!0,Rt(on,H,j,_n,re,te),re.side=Ei,re.needsUpdate=!0,Yt=!0}}Yt===!0&&(G.updateMultisampleRenderTarget(Mt),G.updateRenderTargetMipmap(Mt))}v.setRenderTarget(Lt),v.setClearColor(D,V),ee!==void 0&&(j.viewport=ee),v.toneMapping=Zt}function dt(E,B,H){let j=B.isScene===!0?B.overrideMaterial:null;for(let J=0,Mt=E.length;J<Mt;J++){let Dt=E[J],Lt=Dt.object,Zt=Dt.geometry,ee=j===null?Dt.material:j,Yt=Dt.group;Lt.layers.test(H.layers)&&Rt(Lt,B,H,Zt,ee,Yt)}}function Rt(E,B,H,j,J,Mt){E.onBeforeRender(v,B,H,j,J,Mt),E.modelViewMatrix.multiplyMatrices(H.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),J.onBeforeRender(v,B,H,j,E,Mt),J.transparent===!0&&J.side===ar&&J.forceSinglePass===!1?(J.side=Un,J.needsUpdate=!0,v.renderBufferDirect(H,B,j,J,E,Mt),J.side=Gr,J.needsUpdate=!0,v.renderBufferDirect(H,B,j,J,E,Mt),J.side=ar):v.renderBufferDirect(H,B,j,J,E,Mt),E.onAfterRender(v,B,H,j,J,Mt)}function Gt(E,B,H){B.isScene!==!0&&(B=It);let j=Xt.get(E),J=m.state.lights,Mt=m.state.shadowsArray,Dt=J.state.version,Lt=et.getParameters(E,J.state,Mt,B,H),Zt=et.getProgramCacheKey(Lt),ee=j.programs;j.environment=E.isMeshStandardMaterial?B.environment:null,j.fog=B.fog,j.envMap=(E.isMeshStandardMaterial?A:Qt).get(E.envMap||j.environment),j.envMapRotation=j.environment!==null&&E.envMap===null?B.environmentRotation:E.envMapRotation,ee===void 0&&(E.addEventListener("dispose",gt),ee=new Map,j.programs=ee);let Yt=ee.get(Zt);if(Yt!==void 0){if(j.currentProgram===Yt&&j.lightsStateVersion===Dt)return ne(E,Lt),Yt}else Lt.uniforms=et.getUniforms(E),E.onBuild(H,Lt,v),E.onBeforeCompile(Lt,v),Yt=et.acquireProgram(Lt,Zt),ee.set(Zt,Yt),j.uniforms=Lt.uniforms;let Wt=j.uniforms;return(!E.isShaderMaterial&&!E.isRawShaderMaterial||E.clipping===!0)&&(Wt.clippingPlanes=ct.uniform),ne(E,Lt),j.needsLights=le(E),j.lightsStateVersion=Dt,j.needsLights&&(Wt.ambientLightColor.value=J.state.ambient,Wt.lightProbe.value=J.state.probe,Wt.directionalLights.value=J.state.directional,Wt.directionalLightShadows.value=J.state.directionalShadow,Wt.spotLights.value=J.state.spot,Wt.spotLightShadows.value=J.state.spotShadow,Wt.rectAreaLights.value=J.state.rectArea,Wt.ltc_1.value=J.state.rectAreaLTC1,Wt.ltc_2.value=J.state.rectAreaLTC2,Wt.pointLights.value=J.state.point,Wt.pointLightShadows.value=J.state.pointShadow,Wt.hemisphereLights.value=J.state.hemi,Wt.directionalShadowMap.value=J.state.directionalShadowMap,Wt.directionalShadowMatrix.value=J.state.directionalShadowMatrix,Wt.spotShadowMap.value=J.state.spotShadowMap,Wt.spotLightMatrix.value=J.state.spotLightMatrix,Wt.spotLightMap.value=J.state.spotLightMap,Wt.pointShadowMap.value=J.state.pointShadowMap,Wt.pointShadowMatrix.value=J.state.pointShadowMatrix),j.currentProgram=Yt,j.uniformsList=null,Yt}function Ot(E){if(E.uniformsList===null){let B=E.currentProgram.getUniforms();E.uniformsList=ko.seqWithValue(B.seq,E.uniforms)}return E.uniformsList}function ne(E,B){let H=Xt.get(E);H.outputColorSpace=B.outputColorSpace,H.batching=B.batching,H.instancing=B.instancing,H.instancingColor=B.instancingColor,H.instancingMorph=B.instancingMorph,H.skinning=B.skinning,H.morphTargets=B.morphTargets,H.morphNormals=B.morphNormals,H.morphColors=B.morphColors,H.morphTargetsCount=B.morphTargetsCount,H.numClippingPlanes=B.numClippingPlanes,H.numIntersection=B.numClipIntersection,H.vertexAlphas=B.vertexAlphas,H.vertexTangents=B.vertexTangents,H.toneMapping=B.toneMapping}function fe(E,B,H,j,J){B.isScene!==!0&&(B=It),G.resetTextureUnits();let Mt=B.fog,Dt=j.isMeshStandardMaterial?B.environment:null,Lt=w===null?v.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:qr,Zt=(j.isMeshStandardMaterial?A:Qt).get(j.envMap||Dt),ee=j.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,Yt=!!H.attributes.tangent&&(!!j.normalMap||j.anisotropy>0),Wt=!!H.morphAttributes.position,ye=!!H.morphAttributes.normal,ke=!!H.morphAttributes.color,on=Hr;j.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(on=v.toneMapping);let _n=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,re=_n!==void 0?_n.length:0,te=Xt.get(j),Ei=m.state.lights;if(X===!0&&(at===!0||E!==M)){let Xn=E===M&&j.id===P;ct.setState(j,E,Xn)}let Se=!1;j.version===te.__version?(te.needsLights&&te.lightsStateVersion!==Ei.state.version||te.outputColorSpace!==Lt||J.isBatchedMesh&&te.batching===!1||!J.isBatchedMesh&&te.batching===!0||J.isInstancedMesh&&te.instancing===!1||!J.isInstancedMesh&&te.instancing===!0||J.isSkinnedMesh&&te.skinning===!1||!J.isSkinnedMesh&&te.skinning===!0||J.isInstancedMesh&&te.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&te.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&te.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&te.instancingMorph===!1&&J.morphTexture!==null||te.envMap!==Zt||j.fog===!0&&te.fog!==Mt||te.numClippingPlanes!==void 0&&(te.numClippingPlanes!==ct.numPlanes||te.numIntersection!==ct.numIntersection)||te.vertexAlphas!==ee||te.vertexTangents!==Yt||te.morphTargets!==Wt||te.morphNormals!==ye||te.morphColors!==ke||te.toneMapping!==on||te.morphTargetsCount!==re)&&(Se=!0):(Se=!0,te.__version=j.version);let Zr=te.currentProgram;Se===!0&&(Zr=Gt(j,B,J));let Td=!1,qo=!1,au=!1,an=Zr.getUniforms(),hr=te.uniforms;if(wt.useProgram(Zr.program)&&(Td=!0,qo=!0,au=!0),j.id!==P&&(P=j.id,qo=!0),Td||M!==E){an.setValue(q,"projectionMatrix",E.projectionMatrix),an.setValue(q,"viewMatrix",E.matrixWorldInverse);let Xn=an.map.cameraPosition;Xn!==void 0&&Xn.setValue(q,ut.setFromMatrixPosition(E.matrixWorld)),Ut.logarithmicDepthBuffer&&an.setValue(q,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),(j.isMeshPhongMaterial||j.isMeshToonMaterial||j.isMeshLambertMaterial||j.isMeshBasicMaterial||j.isMeshStandardMaterial||j.isShaderMaterial)&&an.setValue(q,"isOrthographic",E.isOrthographicCamera===!0),M!==E&&(M=E,qo=!0,au=!0)}if(J.isSkinnedMesh){an.setOptional(q,J,"bindMatrix"),an.setOptional(q,J,"bindMatrixInverse");let Xn=J.skeleton;Xn&&(Xn.boneTexture===null&&Xn.computeBoneTexture(),an.setValue(q,"boneTexture",Xn.boneTexture,G))}J.isBatchedMesh&&(an.setOptional(q,J,"batchingTexture"),an.setValue(q,"batchingTexture",J._matricesTexture,G));let lu=H.morphAttributes;if((lu.position!==void 0||lu.normal!==void 0||lu.color!==void 0)&&vt.update(J,H,Zr),(qo||te.receiveShadow!==J.receiveShadow)&&(te.receiveShadow=J.receiveShadow,an.setValue(q,"receiveShadow",J.receiveShadow)),j.isMeshGouraudMaterial&&j.envMap!==null&&(hr.envMap.value=Zt,hr.flipEnvMap.value=Zt.isCubeTexture&&Zt.isRenderTargetTexture===!1?-1:1),j.isMeshStandardMaterial&&j.envMap===null&&B.environment!==null&&(hr.envMapIntensity.value=B.environmentIntensity),qo&&(an.setValue(q,"toneMappingExposure",v.toneMappingExposure),te.needsLights&&ge(hr,au),Mt&&j.fog===!0&&rt.refreshFogUniforms(hr,Mt),rt.refreshMaterialUniforms(hr,j,Z,W,m.state.transmissionRenderTarget[E.id]),ko.upload(q,Ot(te),hr,G)),j.isShaderMaterial&&j.uniformsNeedUpdate===!0&&(ko.upload(q,Ot(te),hr,G),j.uniformsNeedUpdate=!1),j.isSpriteMaterial&&an.setValue(q,"center",J.center),an.setValue(q,"modelViewMatrix",J.modelViewMatrix),an.setValue(q,"normalMatrix",J.normalMatrix),an.setValue(q,"modelMatrix",J.matrixWorld),j.isShaderMaterial||j.isRawShaderMaterial){let Xn=j.uniformsGroups;for(let cu=0,J_=Xn.length;cu<J_;cu++){let Ad=Xn[cu];Jt.update(Ad,Zr),Jt.bind(Ad,Zr)}}return Zr}function ge(E,B){E.ambientLightColor.needsUpdate=B,E.lightProbe.needsUpdate=B,E.directionalLights.needsUpdate=B,E.directionalLightShadows.needsUpdate=B,E.pointLights.needsUpdate=B,E.pointLightShadows.needsUpdate=B,E.spotLights.needsUpdate=B,E.spotLightShadows.needsUpdate=B,E.rectAreaLights.needsUpdate=B,E.hemisphereLights.needsUpdate=B}function le(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&E.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(E,B,H){Xt.get(E.texture).__webglTexture=B,Xt.get(E.depthTexture).__webglTexture=H;let j=Xt.get(E);j.__hasExternalTextures=!0,j.__autoAllocateDepthBuffer=H===void 0,j.__autoAllocateDepthBuffer||Ft.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),j.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(E,B){let H=Xt.get(E);H.__webglFramebuffer=B,H.__useDefaultFramebuffer=B===void 0},this.setRenderTarget=function(E,B=0,H=0){w=E,C=B,T=H;let j=!0,J=null,Mt=!1,Dt=!1;if(E){let Zt=Xt.get(E);Zt.__useDefaultFramebuffer!==void 0?(wt.bindFramebuffer(q.FRAMEBUFFER,null),j=!1):Zt.__webglFramebuffer===void 0?G.setupRenderTarget(E):Zt.__hasExternalTextures&&G.rebindTextures(E,Xt.get(E.texture).__webglTexture,Xt.get(E.depthTexture).__webglTexture);let ee=E.texture;(ee.isData3DTexture||ee.isDataArrayTexture||ee.isCompressedArrayTexture)&&(Dt=!0);let Yt=Xt.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(Array.isArray(Yt[B])?J=Yt[B][H]:J=Yt[B],Mt=!0):E.samples>0&&G.useMultisampledRTT(E)===!1?J=Xt.get(E).__webglMultisampledFramebuffer:Array.isArray(Yt)?J=Yt[H]:J=Yt,y.copy(E.viewport),I.copy(E.scissor),N=E.scissorTest}else y.copy(R).multiplyScalar(Z).floor(),I.copy(lt).multiplyScalar(Z).floor(),N=xt;if(wt.bindFramebuffer(q.FRAMEBUFFER,J)&&j&&wt.drawBuffers(E,J),wt.viewport(y),wt.scissor(I),wt.setScissorTest(N),Mt){let Zt=Xt.get(E.texture);q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_CUBE_MAP_POSITIVE_X+B,Zt.__webglTexture,H)}else if(Dt){let Zt=Xt.get(E.texture),ee=B||0;q.framebufferTextureLayer(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,Zt.__webglTexture,H||0,ee)}P=-1},this.readRenderTargetPixels=function(E,B,H,j,J,Mt,Dt){if(!(E&&E.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Lt=Xt.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&Dt!==void 0&&(Lt=Lt[Dt]),Lt){wt.bindFramebuffer(q.FRAMEBUFFER,Lt);try{let Zt=E.texture,ee=Zt.format,Yt=Zt.type;if(!Ut.textureFormatReadable(ee)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ut.textureTypeReadable(Yt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}B>=0&&B<=E.width-j&&H>=0&&H<=E.height-J&&q.readPixels(B,H,j,J,Ct.convert(ee),Ct.convert(Yt),Mt)}finally{let Zt=w!==null?Xt.get(w).__webglFramebuffer:null;wt.bindFramebuffer(q.FRAMEBUFFER,Zt)}}},this.copyFramebufferToTexture=function(E,B,H=0){let j=Math.pow(2,-H),J=Math.floor(B.image.width*j),Mt=Math.floor(B.image.height*j);G.setTexture2D(B,0),q.copyTexSubImage2D(q.TEXTURE_2D,H,0,0,E.x,E.y,J,Mt),wt.unbindTexture()},this.copyTextureToTexture=function(E,B,H,j=0){let J=B.image.width,Mt=B.image.height,Dt=Ct.convert(H.format),Lt=Ct.convert(H.type);G.setTexture2D(H,0),q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,H.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,H.unpackAlignment),B.isDataTexture?q.texSubImage2D(q.TEXTURE_2D,j,E.x,E.y,J,Mt,Dt,Lt,B.image.data):B.isCompressedTexture?q.compressedTexSubImage2D(q.TEXTURE_2D,j,E.x,E.y,B.mipmaps[0].width,B.mipmaps[0].height,Dt,B.mipmaps[0].data):q.texSubImage2D(q.TEXTURE_2D,j,E.x,E.y,Dt,Lt,B.image),j===0&&H.generateMipmaps&&q.generateMipmap(q.TEXTURE_2D),wt.unbindTexture()},this.copyTextureToTexture3D=function(E,B,H,j,J=0){let Mt=E.max.x-E.min.x,Dt=E.max.y-E.min.y,Lt=E.max.z-E.min.z,Zt=Ct.convert(j.format),ee=Ct.convert(j.type),Yt;if(j.isData3DTexture)G.setTexture3D(j,0),Yt=q.TEXTURE_3D;else if(j.isDataArrayTexture||j.isCompressedArrayTexture)G.setTexture2DArray(j,0),Yt=q.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,j.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,j.unpackAlignment);let Wt=q.getParameter(q.UNPACK_ROW_LENGTH),ye=q.getParameter(q.UNPACK_IMAGE_HEIGHT),ke=q.getParameter(q.UNPACK_SKIP_PIXELS),on=q.getParameter(q.UNPACK_SKIP_ROWS),_n=q.getParameter(q.UNPACK_SKIP_IMAGES),re=H.isCompressedTexture?H.mipmaps[J]:H.image;q.pixelStorei(q.UNPACK_ROW_LENGTH,re.width),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,re.height),q.pixelStorei(q.UNPACK_SKIP_PIXELS,E.min.x),q.pixelStorei(q.UNPACK_SKIP_ROWS,E.min.y),q.pixelStorei(q.UNPACK_SKIP_IMAGES,E.min.z),H.isDataTexture||H.isData3DTexture?q.texSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,ee,re.data):j.isCompressedArrayTexture?q.compressedTexSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,re.data):q.texSubImage3D(Yt,J,B.x,B.y,B.z,Mt,Dt,Lt,Zt,ee,re),q.pixelStorei(q.UNPACK_ROW_LENGTH,Wt),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,ye),q.pixelStorei(q.UNPACK_SKIP_PIXELS,ke),q.pixelStorei(q.UNPACK_SKIP_ROWS,on),q.pixelStorei(q.UNPACK_SKIP_IMAGES,_n),J===0&&j.generateMipmaps&&q.generateMipmap(Yt),wt.unbindTexture()},this.initTexture=function(E){E.isCubeTexture?G.setTextureCube(E,0):E.isData3DTexture?G.setTexture3D(E,0):E.isDataArrayTexture||E.isCompressedArrayTexture?G.setTexture2DArray(E,0):G.setTexture2D(E,0),wt.unbindTexture()},this.resetState=function(){C=0,T=0,w=null,wt.reset(),qt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return lr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Md?"display-p3":"srgb",e.unpackColorSpace=Me.workingColorSpace===su?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}};var jc=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new _e(t),this.near=e,this.far=n}clone(){return new r(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Qc=class extends gn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ur,this.environmentIntensity=1,this.environmentRotation=new ur,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}};var od=class extends Us{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new _e(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}},E_=new Be,ad=new zc,Ac=new Go,Cc=new it,tu=class extends gn{constructor(t=new Bi,e=new od){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){let n=this.geometry,i=this.matrixWorld,s=t.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Ac.copy(n.boundingSphere),Ac.applyMatrix4(i),Ac.radius+=s,t.ray.intersectsSphere(Ac)===!1)return;E_.copy(i).invert(),ad.copy(t.ray).applyMatrix4(E_);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,f=n.attributes.position;if(c!==null){let d=Math.max(0,o.start),u=Math.min(c.count,o.start+o.count);for(let _=d,p=u;_<p;_++){let m=c.getX(_);Cc.fromBufferAttribute(f,m),T_(Cc,m,l,i,t,e,this)}}else{let d=Math.max(0,o.start),u=Math.min(f.count,o.start+o.count);for(let _=d,p=u;_<p;_++)Cc.fromBufferAttribute(f,_),T_(Cc,_,l,i,t,e,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function T_(r,t,e,n,i,s,o){let a=ad.distanceSqToPoint(r);if(a<e){let l=new it;ad.closestPointToPoint(r,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:o})}}function Dc(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function jE(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Xo=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t<i)){for(let a=n+2;;){if(i===void 0){if(t<s)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=i,i=e[++n],t<i)break t}o=e.length;break e}if(!(t>=s)){let a=e[1];t<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=s,s=e[--n-1],t>=s)break t}o=n,n=0;break e}break n}for(;n<o;){let a=n+o>>>1;t<e[a]?o=a:n=a+1}if(i=e[n],s=e[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=t*i;for(let o=0;o!==i;++o)e[o]=n[s+o];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},ld=class extends Xo{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:L0,endingEnd:L0}}intervalChanged_(t,e,n){let i=this.parameterPositions,s=t-2,o=t+1,a=i[s],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case F0:s=t,a=2*e-n;break;case N0:s=i.length-2,a=e+i[s]-i[s+1];break;default:s=t,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case F0:o=t,l=2*n-e;break;case N0:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,h=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*h,this._offsetNext=o*h}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=this._offsetPrev,f=this._offsetNext,d=this._weightPrev,u=this._weightNext,_=(n-e)/(i-e),p=_*_,m=p*_,g=-d*m+2*d*p-d*_,b=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*_+1,v=(-1-u)*m+(1.5+u)*p+.5*_,S=u*m-u*p;for(let C=0;C!==a;++C)s[C]=g*o[h+C]+b*o[c+C]+v*o[l+C]+S*o[f+C];return s}},cd=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=(n-e)/(i-e),f=1-h;for(let d=0;d!==a;++d)s[d]=o[c+d]*f+o[l+d]*h;return s}},ud=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},wi=class{constructor(t,e,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Dc(e,this.TimeBufferType),this.values=Dc(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let e=t.constructor,n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:Dc(t.times,Array),values:Dc(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new ud(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new cd(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new ld(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case Pc:e=this.InterpolantFactoryMethodDiscrete;break;case Ic:e=this.InterpolantFactoryMethodLinear;break;case cf:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pc;case this.InterpolantFactoryMethodLinear:return Ic;case this.InterpolantFactoryMethodSmooth:return cf}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(t!==1){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){let n=this.times,i=n.length,s=0,o=i-1;for(;s!==i&&n[s]<t;)++s;for(;o!==-1&&n[o]>e;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),t=!1;break}o=l}if(i!==void 0&&jE(i))for(let a=0,l=i.length;a!==l;++a){let c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===cf,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],h=t[a+1];if(c!==h&&(a!==1||c!==t[0]))if(i)l=!0;else{let f=a*n,d=f-n,u=f+n;for(let _=0;_!==n;++_){let p=e[f+_];if(p!==e[d+_]||p!==e[u+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let f=a*n,d=o*n;for(let u=0;u!==n;++u)e[d+u]=e[f+u]}++o}}if(s>0){t[o]=t[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)e[l+c]=e[a+c];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){let t=this.times.slice(),e=this.values.slice(),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};wi.prototype.TimeBufferType=Float32Array;wi.prototype.ValueBufferType=Float32Array;wi.prototype.DefaultInterpolation=Ic;var Os=class extends wi{};Os.prototype.ValueTypeName="bool";Os.prototype.ValueBufferType=Array;Os.prototype.DefaultInterpolation=Pc;Os.prototype.InterpolantFactoryMethodLinear=void 0;Os.prototype.InterpolantFactoryMethodSmooth=void 0;var hd=class extends wi{};hd.prototype.ValueTypeName="color";var fd=class extends wi{};fd.prototype.ValueTypeName="number";var dd=class extends Xo{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-e)/(i-e),c=t*a;for(let h=c+a;c!==h;c+=4)Yr.slerpFlat(s,0,o,c-a,o,c,l);return s}},ja=class extends wi{InterpolantFactoryMethodLinear(t){return new dd(this.times,this.values,this.getValueSize(),t)}};ja.prototype.ValueTypeName="quaternion";ja.prototype.DefaultInterpolation=Ic;ja.prototype.InterpolantFactoryMethodSmooth=void 0;var Bs=class extends wi{};Bs.prototype.ValueTypeName="string";Bs.prototype.ValueBufferType=Array;Bs.prototype.DefaultInterpolation=Pc;Bs.prototype.InterpolantFactoryMethodLinear=void 0;Bs.prototype.InterpolantFactoryMethodSmooth=void 0;var pd=class extends wi{};pd.prototype.ValueTypeName="vector";var md=class{constructor(t,e,n){let i=this,s=!1,o=0,a=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(h){a++,s===!1&&i.onStart!==void 0&&i.onStart(h,o,a),s=!0},this.itemEnd=function(h){o++,i.onProgress!==void 0&&i.onProgress(h,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return l?l(h):h},this.setURLModifier=function(h){return l=h,this},this.addHandler=function(h,f){return c.push(h,f),this},this.removeHandler=function(h){let f=c.indexOf(h);return f!==-1&&c.splice(f,2),this},this.getHandler=function(h){for(let f=0,d=c.length;f<d;f+=2){let u=c[f],_=c[f+1];if(u.global&&(u.lastIndex=0),u.test(h))return _}return null}}},QE=new md,gd=class{constructor(t){this.manager=t!==void 0?t:QE,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let n=this;return new Promise(function(i,s){n.load(t,i,e,s)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}};gd.DEFAULT_MATERIAL_NAME="__DEFAULT";var eu=class extends gn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new _e(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),e}},nu=class extends eu{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(gn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new _e(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},Uf=new Be,A_=new it,C_=new it,_d=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.map=null,this.mapPass=null,this.matrix=new Be,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ka,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new tn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;A_.setFromMatrixPosition(t.matrixWorld),e.position.copy(A_),C_.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(C_),e.updateMatrixWorld(),Uf.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Uf),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Uf)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}};var xd=class extends _d{constructor(){super(new Zc(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},ks=class extends eu{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(gn.DEFAULT_UP),this.updateMatrix(),this.target=new gn,this.shadow=new xd}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var wd="\\[\\]\\.:\\/",tT=new RegExp("["+wd+"]","g"),Ed="[^"+wd+"]",eT="[^"+wd.replace("\\.","")+"]",nT=/((?:WC+[\/:])*)/.source.replace("WC",Ed),iT=/(WCOD+)?/.source.replace("WCOD",eT),rT=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ed),sT=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ed),oT=new RegExp("^"+nT+iT+rT+sT+"$"),aT=["material","materials","bones","map"],yd=class{constructor(t,e,n){let i=n||De.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},De=class r{constructor(t,e,n){this.path=e,this.parsedPath=n||r.parseTrackName(e),this.node=r.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new r.Composite(t,e,n):new r(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(tT,"")}static parseTrackName(t){let e=oT.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);aT.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;o<s.length;o++){let a=s[o];if(a.name===e||a.uuid===e)return a;let l=n(a.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node,e=this.parsedPath,n=e.objectName,i=e.propertyName,s=e.propertyIndex;if(t||(t=r.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=e.objectIndex;switch(n){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===c){c=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let o=t[i];if(o===void 0){let c=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(i==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[s]!==void 0&&(s=t.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};De.Composite=yd;De.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};De.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};De.prototype.GetterByBindingType=[De.prototype._getValue_direct,De.prototype._getValue_array,De.prototype._getValue_arrayElement,De.prototype._getValue_toArray];De.prototype.SetterByBindingTypeAndVersioning=[[De.prototype._setValue_direct,De.prototype._setValue_direct_setNeedsUpdate,De.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[De.prototype._setValue_array,De.prototype._setValue_array_setNeedsUpdate,De.prototype._setValue_array_setMatrixWorldNeedsUpdate],[De.prototype._setValue_arrayElement,De.prototype._setValue_arrayElement_setNeedsUpdate,De.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[De.prototype._setValue_fromArray,De.prototype._setValue_fromArray_setNeedsUpdate,De.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var GA=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:vd}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=vd);var $_=()=>{var r=new kr;function t(){let e=document.querySelector("#canvas"),n=new Kc({canvas:e,antialias:!0,alpha:!0}),i=new Qc,s=new Cn(18);s.near=1,s.far=2e3,s.position.z=-10,n.outputColorSpace=ii,n.shadowMap.enabled=!0,n.shadowMap.type=Sd,i.fog=new jc(3741705,9,15),i.add(r);function o(){let h=new nu(16777215,41378,1),f=new ks(3355443,4);f.position.set(5,5,5),f.lookAt(0,0,0),f.castShadow=!0,f.shadow.mapSize.width=512,f.shadow.mapSize.height=512,f.shadow.camera.near=.5,f.shadow.camera.far=500,i.add(f),i.add(h);let d=[];d[0]=new ks(16777215,1),d[0].position.set(1,0,0),d[1]=new ks(11460838,1),d[1].position.set(.75,1,.5),d[2]=new ks(14277490,1),d[2].position.set(-.75,-1,.5),i.add(d[0]),i.add(d[1]),i.add(d[2])}function a(h,f){let d=new Bi,u=[],_=[],p=f||25,m=p/2;for(let v=0;v<(h||7e3);v++){let S=Math.random()*p-m,C=Math.random()*p-m,T=Math.random()*p-m;u.push(S,C,T),_.push(Math.random()*.9+.1)}d.setAttribute("position",new oi(u,3)),d.setAttribute("opacity",new oi(_,1)),d.computeBoundingSphere();let g=new li({vertexShader:`
3822
3822
  attribute float opacity; // Custom attribute for opacity
3823
3823
  varying float vOpacity; // Varying to pass opacity to fragment shader
3824
3824
  varying float distanceToCamera; // Varying to pass distance to camera