qt-human 3.9.2 → 3.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.iife.js +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/esm/chunks/human-core-COvRMT3l.js +1 -0
- package/dist/esm/chunks/index-DgEJCpaj.js +1 -0
- package/dist/esm/chunks/{render-DjEFzmMF.js → render-kGcOzzbC.js} +1 -1
- package/dist/esm/chunks/{shared-D2ogTnBH.js → shared-Bsx1K6Nf.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/modules/human.d.ts +1 -1
- package/dist/esm/types/modules/human.d.ts.map +1 -1
- package/package.json +3 -1
- package/dist/esm/chunks/human-core-EKV7xbHB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"three";import{m as e,d as i,E as n,r}from"./shared-D2ogTnBH.js";import{c as s,g as a,E as o}from"./human-core-EKV7xbHB.js";import{OrbitControls as h}from"three/examples/jsm/controls/OrbitControls.js";import{RGBELoader as l}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFLoader as d}from"three/examples/jsm/loaders/GLTFLoader.js";import{KTX2Loader as c}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as u}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{DRACOLoader as p}from"three/examples/jsm/loaders/DRACOLoader.js";import{OrbitControls as m}from"three/addons/controls/OrbitControls.js";function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var _,v,y,b,w,A,x,M,C,E,S,k,T,L,O,R,F,D={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},P={duration:.5,overwrite:!1,delay:0},B=1e8,z=1e-8,G=2*Math.PI,I=G/4,H=0,N=Math.sqrt,V=Math.cos,j=Math.sin,W=function(t){return"string"==typeof t},Y=function(t){return"function"==typeof t},X=function(t){return"number"==typeof t},$=function(t){return void 0===t},U=function(t){return"object"==typeof t},q=function(t){return!1!==t},J=function(){return"undefined"!=typeof window},Q=function(t){return Y(t)||W(t)},Z="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,it=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rt=/[+-]=-?[.\d]+/,st=/[^,'"\[\]\s]+/gi,at=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ot={},ht={},lt=function(t){return(ht=zt(t,ot))&&Gi},dt=function(t,e){return!e&&void 0},ct=function(t,e){return t&&(ot[t]=e)&&ht&&(ht[t]=e)||ot},ut=function(){return 0},pt={suppressEvents:!0,isStart:!0,kill:!1},mt={suppressEvents:!0,kill:!1},gt={suppressEvents:!0},ft={},_t=[],vt={},yt={},bt={},wt=30,At=[],xt="",Mt=function(t){var e,i,n=t[0];if(U(n)||Y(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(i=At.length;i--&&!At[i].targetTest(n););e=At[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Ze(t[i],e)))||t.splice(i,1);return t},Ct=function(t){return t._gsap||Mt(ge(t))[0]._gsap},Et=function(t,e,i){return(i=t[e])&&Y(i)?t[e]():$(i)&&t.getAttribute&&t.getAttribute(e)||i},St=function(t,e){return(t=t.split(",")).forEach(e)||t},kt=function(t){return Math.round(1e5*t)/1e5||0},Tt=function(t){return Math.round(1e7*t)/1e7||0},Lt=function(t,e){var i=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===i?t+n:"-"===i?t-n:"*"===i?t*n:t/n},Ot=function(t,e){for(var i=e.length,n=0;t.indexOf(e[n])<0&&++n<i;);return n<i},Rt=function(){var t,e,i=_t.length,n=_t.slice(0);for(vt={},_t.length=0,t=0;t<i;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Ft=function(t,e,i,n){_t.length&&!v&&Rt(),t.render(e,i,v&&e<0&&(t._initted||t._startAt)),_t.length&&!v&&Rt()},Dt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(st).length<2?e:W(t)?t.trim():t},Pt=function(t){return t},Bt=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},zt=function(t,e){for(var i in e)t[i]=e[i];return t},Gt=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=U(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},It=function(t,e){var i,n={};for(i in t)i in e||(n[i]=t[i]);return n},Ht=function(t){var e,i=t.parent||b,n=t.keyframes?(e=K(t.keyframes),function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}):Bt;if(q(t.inherit))for(;i;)n(t,i.vars.defaults),i=i.parent||i._dp;return t},Nt=function(t,e,i,n,r){var s,a=t[n];if(r)for(s=e[r];a&&a[r]>s;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[n]=e,e._prev=a,e.parent=e._dp=t,e},Vt=function(t,e,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=e._prev,s=e._next;r?r._next=s:t[i]===e&&(t[i]=s),s?s._prev=r:t[n]===e&&(t[n]=r),e._next=e._prev=e.parent=null},jt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Wt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},Yt=function(t,e,i,n){return t._startAt&&(v?t._startAt.revert(mt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Xt=function t(e){return!e||e._ts&&t(e.parent)},$t=function(t){return t._repeat?Ut(t._tTime,t=t.duration()+t._rDelay)*t:0},Ut=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},qt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Jt=function(t){return t._end=Tt(t._start+(t._tDur/Math.abs(t._ts||t._rts||z)||0))},Qt=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Tt(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Jt(t),i._dirty||Wt(i,t)),t},Zt=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=qt(t.rawTime(),e),(!e._dur||de(0,e.totalDuration(),i)-e._tTime>z)&&e.render(i,!0)),Wt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},Kt=function(t,e,i,n){return e.parent&&jt(e),e._start=Tt((X(i)?i:i||t!==b?oe(t,i,e):t._time)+e._delay),e._end=Tt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Nt(t,e,"_first","_last",t._sort?"_start":0),ne(e)||(t._recent=e),n||Zt(t,e),t._ts<0&&Qt(t,t._tTime),t},te=function(t,e){return ot.ScrollTrigger?ot.ScrollTrigger.create(e,t):void 0},ee=function(t,e,i,n,r){return ai(t,e,r),t._initted?!i&&t._pt&&!v&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&C!==Ie.frame?(_t.push(t),t._lazy=[r,n],1):void 0:1},ie=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},ne=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},re=function(t,e,i,n){var r=t._repeat,s=Tt(e)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:Tt(s*(r+1)+t._rDelay*r):s,a>0&&!n&&Qt(t,t._tTime=t._tDur*a),t.parent&&Jt(t),i||Wt(t.parent,t),t},se=function(t){return t instanceof ti?Wt(t):re(t,t._dur)},ae={_start:0,endTime:ut,totalDuration:ut},oe=function t(e,i,n){var r,s,a,o=e.labels,h=e._recent||ae,l=e.duration()>=B?h.endTime(!1):e._dur;return W(i)&&(isNaN(i)||i in o)?(s=i.charAt(0),a="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?h._start:h.endTime(h._repeat>=0))+(parseFloat(i.substr(1))||0)*(a?(r<0?h:n).totalDuration()/100:1)):r<0?(i in o||(o[i]=l),o[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),a&&n&&(s=s/100*(K(n)?n[0]:n).totalDuration()),r>1?t(e,i.substr(0,r-1),n)+s:l+s)):null==i?l:+i},he=function(t,e,i){var n,r,s=X(e[1]),a=(s?2:1)+(t<2?0:1),o=e[a];if(s&&(o.duration=e[1]),o.parent=i,t){for(n=o,r=i;r&&!("immediateRender"in n);)n=r.vars.defaults||{},r=q(r.vars.inherit)&&r.parent;o.immediateRender=q(n.immediateRender),t<2?o.runBackwards=1:o.startAt=e[a-1]}return new ci(e[0],o,e[a+1])},le=function(t,e){return t||0===t?e(t):e},de=function(t,e,i){return i<t?t:i>e?e:i},ce=function(t,e){return W(t)&&(e=at.exec(t))?e[1]:""},ue=[].slice,pe=function(t,e){return t&&U(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&U(t[0]))&&!t.nodeType&&t!==w},me=function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var n;return W(t)&&!e||pe(t,1)?(n=i).push.apply(n,ge(t)):i.push(t)}))||i},ge=function(t,e,i){return y&&!e&&y.selector?y.selector(t):!W(t)||i||!A&&He()?K(t)?me(t,i):pe(t)?ue.call(t,0):t?[t]:[]:ue.call((e||x).querySelectorAll(t),0)},fe=function(t){return t=ge(t)[0]||dt()||{},function(e){var i=t.current||t.nativeElement||t;return ge(e,i.querySelectorAll?i:i===t?dt()||x.createElement("div"):t)}},_e=function(t){return t.sort((function(){return.5-Math.random()}))},ve=function(t){if(Y(t))return t;var e=U(t)?t:{each:t},i=$e(e.ease),n=e.from||0,r=parseFloat(e.base)||0,s={},a=n>0&&n<1,o=isNaN(n)||a,h=e.axis,l=n,d=n;return W(n)?l=d={center:.5,edges:.5,end:1}[n]||0:!a&&o&&(l=n[0],d=n[1]),function(t,a,c){var u,p,m,g,f,_,v,y,b,w=(c||e).length,A=s[w];if(!A){if(!(b="auto"===e.grid?0:(e.grid||[1,B])[1])){for(v=-1e8;v<(v=c[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(A=s[w]=[],u=o?Math.min(b,w)*l-.5:n%b,p=b===B?0:o?w*d/b-.5:n/b|0,v=0,y=B,_=0;_<w;_++)m=_%b-u,g=p-(_/b|0),A[_]=f=h?Math.abs("y"===h?g:m):N(m*m+g*g),f>v&&(v=f),f<y&&(y=f);"random"===n&&_e(A),A.max=v-y,A.min=y,A.v=w=(parseFloat(e.amount)||parseFloat(e.each)*(b>w?w-1:h?"y"===h?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),A.b=w<0?r-w:r,A.u=ce(e.amount||e.each)||0,i=i&&w<0?Ye(i):i}return w=(A[t]-A.min)/A.max||0,Tt(A.b+(i?i(w):w)*A.v)+A.u}},ye=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=Tt(Math.round(parseFloat(i)/t)*t*e);return(n-n%1)/e+(X(i)?0:ce(i))}},be=function(t,e){var i,n,r=K(t);return!r&&U(t)&&(i=r=t.radius||B,t.values?(t=ge(t.values),(n=!X(t[0]))&&(i*=i)):t=ye(t.increment)),le(e,r?Y(t)?function(e){return n=t(e),Math.abs(n-e)<=i?n:e}:function(e){for(var r,s,a=parseFloat(n?e.x:e),o=parseFloat(n?e.y:0),h=B,l=0,d=t.length;d--;)(r=n?(r=t[d].x-a)*r+(s=t[d].y-o)*s:Math.abs(t[d]-a))<h&&(h=r,l=d);return l=!i||h<=i?t[l]:e,n||l===e||X(e)?l:l+ce(e)}:ye(t))},we=function(t,e,i,n){return le(K(t)?!e:!0===i?!!(i=0):!n,(function(){return K(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*n)/n}))},Ae=function(t,e,i){return le(i,(function(i){return t[~~e(i)]}))},xe=function(t){for(var e,i,n,r,s=0,a="";~(e=t.indexOf("random(",s));)n=t.indexOf(")",e),r="["===t.charAt(e+7),i=t.substr(e+7,n-e-7).match(r?st:tt),a+=t.substr(s,e-s)+we(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return a+t.substr(s,t.length-s)},Me=function(t,e,i,n,r){var s=e-t,a=n-i;return le(r,(function(e){return i+((e-t)/s*a||0)}))},Ce=function(t,e,i){var n,r,s,a=t.labels,o=B;for(n in a)(r=a[n]-e)<0==!!i&&r&&o>(r=Math.abs(r))&&(s=n,o=r);return s},Ee=function(t,e,i){var n,r,s,a=t.vars,o=a[e],h=y,l=t._ctx;if(o)return n=a[e+"Params"],r=a.callbackScope||t,i&&_t.length&&Rt(),l&&(y=l),s=n?o.apply(r,n):o.call(r),y=h,s},Se=function(t){return jt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!v),t.progress()<1&&Ee(t,"onInterrupt"),t},ke=[],Te=function(t){if(t)if(t=!t.name&&t.default||t,J()||t.headless){var e=t.name,i=Y(t),n=e&&!i&&t.init?function(){this._props=[]}:t,r={init:ut,render:bi,add:ri,kill:Ai,modifier:wi,rawVars:0},s={targetTest:0,get:0,getSetter:fi,aliases:{},register:0};if(He(),t!==n){if(yt[e])return;Bt(n,Bt(It(t,r),s)),zt(n.prototype,zt(r,It(t,s))),yt[n.prop=e]=n,t.targetTest&&(At.push(n),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}ct(e,n),t.register&&t.register(Gi,n,Ci)}else ke.push(t)},Le=255,Oe={aqua:[0,Le,Le],lime:[0,Le,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Le],navy:[0,0,128],white:[Le,Le,Le],olive:[128,128,0],yellow:[Le,Le,0],orange:[Le,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Le,0,0],pink:[Le,192,203],cyan:[0,Le,Le],transparent:[Le,Le,Le,0]},Re=function(t,e,i){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Le+.5|0},Fe=function(t,e,i){var n,r,s,a,o,h,l,d,c,u,p=t?X(t)?[t>>16,t>>8&Le,t&Le]:0:Oe.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Oe[t])p=Oe[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+n+n+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&Le,p&Le,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&Le,t&Le]}else if("hsl"===t.substr(0,3))if(p=u=t.match(tt),e){if(~t.indexOf("="))return p=t.match(et),i&&p.length<4&&(p[3]=1),p}else a=+p[0]%360/360,o=+p[1]/100,n=2*(h=+p[2]/100)-(r=h<=.5?h*(o+1):h+o-h*o),p.length>3&&(p[3]*=1),p[0]=Re(a+1/3,n,r),p[1]=Re(a,n,r),p[2]=Re(a-1/3,n,r);else p=t.match(tt)||Oe.transparent;p=p.map(Number)}return e&&!u&&(n=p[0]/Le,r=p[1]/Le,s=p[2]/Le,h=((l=Math.max(n,r,s))+(d=Math.min(n,r,s)))/2,l===d?a=o=0:(c=l-d,o=h>.5?c/(2-l-d):c/(l+d),a=l===n?(r-s)/c+(r<s?6:0):l===r?(s-n)/c+2:(n-r)/c+4,a*=60),p[0]=~~(a+.5),p[1]=~~(100*o+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p},De=function(t){var e=[],i=[],n=-1;return t.split(Be).forEach((function(t){var r=t.match(it)||[];e.push.apply(e,r),i.push(n+=r.length+1)})),e.c=i,e},Pe=function(t,e,i){var n,r,s,a,o="",h=(t+o).match(Be),l=e?"hsla(":"rgba(",d=0;if(!h)return t;if(h=h.map((function(t){return(t=Fe(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=De(t),(n=i.c).join(o)!==s.c.join(o)))for(a=(r=t.replace(Be,"1").split(it)).length-1;d<a;d++)o+=r[d]+(~n.indexOf(d)?h.shift()||l+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!r)for(a=(r=t.split(Be)).length-1;d<a;d++)o+=r[d]+h[d];return o+r[a]},Be=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Oe)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),ze=/hsl[a]?\(/,Ge=function(t){var e,i=t.join(" ");if(Be.lastIndex=0,Be.test(i))return e=ze.test(i),t[1]=Pe(t[1],e),t[0]=Pe(t[0],e,De(t[1])),!0},Ie=function(){var t,e,i,n,r,s,a=Date.now,o=500,h=33,l=a(),d=l,c=1e3/240,u=c,p=[],m=function i(m){var g,f,_,v,y=a()-d,b=!0===m;if((y>o||y<0)&&(l+=y-h),((g=(_=(d+=y)-l)-u)>0||b)&&(v=++n.frame,r=_-1e3*n.time,n.time=_/=1e3,u+=g+(g>=c?4:c-g),f=1),b||(t=e(i)),f)for(s=0;s<p.length;s++)p[s](_,r,v,m)};return n={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){M&&(!A&&J()&&(w=A=window,x=w.document||{},ot.gsap=Gi,(w.gsapVersions||(w.gsapVersions=[])).push(Gi.version),lt(ht||w.GreenSockGlobals||!w.gsap&&w||{}),ke.forEach(Te)),i="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=i||function(t){return setTimeout(t,u-1e3*n.time+1|0)},S=1,m(2))},sleep:function(){(i?cancelAnimationFrame:clearTimeout)(t),S=0,e=ut},lagSmoothing:function(t,e){o=t||1/0,h=Math.min(e||33,o)},fps:function(t){c=1e3/(t||240),u=1e3*n.time+c},add:function(t,e,i){var r=e?function(e,i,s,a){t(e,i,s,a),n.remove(r)}:t;return n.remove(t),p[i?"unshift":"push"](r),He(),r},remove:function(t,e){~(e=p.indexOf(t))&&p.splice(e,1)&&s>=e&&s--},_listeners:p}}(),He=function(){return!S&&Ie.wake()},Ne={},Ve=/^[\d.\-M][\d.\-,\s]/,je=/["']/g,We=function(t){for(var e,i,n,r={},s=t.substr(1,t.length-3).split(":"),a=s[0],o=1,h=s.length;o<h;o++)i=s[o],e=o!==h-1?i.lastIndexOf(","):i.length,n=i.substr(0,e),r[a]=isNaN(n)?n.replace(je,"").trim():+n,a=i.substr(e+1).trim();return r},Ye=function(t){return function(e){return 1-t(1-e)}},Xe=function t(e,i){for(var n,r=e._first;r;)r instanceof ti?t(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?t(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},$e=function(t,e){return t&&(Y(t)?t:Ne[t]||function(t){var e,i,n,r,s=(t+"").split("("),a=Ne[s[0]];return a&&s.length>1&&a.config?a.config.apply(null,~t.indexOf("{")?[We(s[1])]:(e=t,i=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",i),e.substring(i,~r&&r<n?e.indexOf(")",n+1):n)).split(",").map(Dt)):Ne._CE&&Ve.test(t)?Ne._CE("",t):a}(t))||e},Ue=function(t,e,i,n){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:i,easeInOut:n};return St(t,(function(t){for(var e in Ne[t]=ot[t]=s,Ne[r=t.toLowerCase()]=i,s)Ne[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ne[t+"."+e]=s[e]})),s},qe=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Je=function t(e,i,n){var r=i>=1?i:1,s=(n||(e?.3:.45))/(i<1?i:1),a=s/G*(Math.asin(1/r)||0),o=function(t){return 1===t?1:r*Math.pow(2,-10*t)*j((t-a)*s)+1},h="out"===e?o:"in"===e?function(t){return 1-o(1-t)}:qe(o);return s=G/s,h.config=function(i,n){return t(e,i,n)},h},Qe=function t(e,i){void 0===i&&(i=1.70158);var n=function(t){return t?--t*t*((i+1)*t+i)+1:0},r="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:qe(n);return r.config=function(i){return t(e,i)},r};St("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;Ue(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),Ne.Linear.easeNone=Ne.none=Ne.Linear.easeIn,Ue("Elastic",Je("in"),Je("out"),Je()),k=7.5625,O=2*(L=1/(T=2.75)),R=2.5*L,Ue("Bounce",(function(t){return 1-F(1-t)}),F=function(t){return t<L?k*t*t:t<O?k*Math.pow(t-1.5/T,2)+.75:t<R?k*(t-=2.25/T)*t+.9375:k*Math.pow(t-2.625/T,2)+.984375}),Ue("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Ue("Circ",(function(t){return-(N(1-t*t)-1)})),Ue("Sine",(function(t){return 1===t?1:1-V(t*I)})),Ue("Back",Qe("in"),Qe("out"),Qe()),Ne.SteppedEase=Ne.steps=ot.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,n=t+(e?0:1),r=e?1:0;return function(t){return((n*de(0,.99999999,t)|0)+r)*i}}},P.ease=Ne["quad.out"],St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return xt+=t+","+t+"Params,"}));var Ze=function(t,e){this.id=H++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Et,this.set=e?e.getSetter:fi},Ke=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,re(this,+t.duration,1,1),this.data=t.data,y&&(this._ctx=y,y.data.push(this)),S||Ie.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,re(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(He(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Qt(this,t),!i._dp||i.parent||Zt(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Kt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===z||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Ft(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+$t(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+$t(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?Ut(this._tTime,i)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var i=this.parent&&this._ts?qt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(de(-Math.abs(this._delay),this._tDur,i),!1!==e),Jt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(He(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==z&&(this._tTime-=z)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Kt(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(q(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?qt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=gt);var e=v;return v=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),v=e,this},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,se(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,se(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(oe(this,t),q(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,q(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-z))},e.eventCallback=function(t,e,i){var n=this.vars;return arguments.length>1?(e?(n[t]=e,i&&(n[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(i){var n=Y(t)?t:Pt,r=function(){var t=e.then;e.then=null,Y(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),i(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){Se(this)},t}();Bt(Ke.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:-1e-8,_prom:0,_ps:!1,_rts:1});var ti=function(t){function e(e,i){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=q(e.sortChildren),b&&Kt(e.parent||b,g(n),i),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&te(g(n),e.scrollTrigger),n}f(e,t);var i=e.prototype;return i.to=function(t,e,i){return he(0,arguments,this),this},i.from=function(t,e,i){return he(1,arguments,this),this},i.fromTo=function(t,e,i,n){return he(2,arguments,this),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,Ht(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new ci(t,e,oe(this,i),1),this},i.call=function(t,e,i){return Kt(this,ci.delayedCall(0,t,e),i)},i.staggerTo=function(t,e,i,n,r,s,a){return i.duration=e,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=a,i.parent=this,new ci(t,i,oe(this,r)),this},i.staggerFrom=function(t,e,i,n,r,s,a){return i.runBackwards=1,Ht(i).immediateRender=q(i.immediateRender),this.staggerTo(t,e,i,n,r,s,a)},i.staggerFromTo=function(t,e,i,n,r,s,a,o){return n.startAt=i,Ht(n).immediateRender=q(n.immediateRender),this.staggerTo(t,e,n,r,s,a,o)},i.render=function(t,e,i){var n,r,s,a,o,h,l,d,c,u,p,m,g=this._time,f=this._dirty?this.totalDuration():this._tDur,_=this._dur,y=t<=0?0:Tt(t),w=this._zTime<0!=t<0&&(this._initted||!_);if(this!==b&&y>f&&t>=0&&(y=f),y!==this._tTime||i||w){if(g!==this._time&&_&&(y+=this._time-g,t+=this._time-g),n=y,c=this._start,h=!(d=this._ts),w&&(_||(g=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,o=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,i);if(n=Tt(y%o),y===f?(a=this._repeat,n=_):((a=~~(y/o))&&a===y/o&&(n=_,a--),n>_&&(n=_)),u=Ut(this._tTime,o),!g&&this._tTime&&u!==a&&this._tTime-u*o-this._dur<=0&&(u=a),p&&1&a&&(n=_-n,m=1),a!==u&&!this._lock){var A=p&&1&u,x=A===(p&&1&a);if(a<u&&(A=!A),g=A?0:y%_?_:y,this._lock=1,this.render(g||(m?0:Tt(a*o)),e,!_)._lock=0,this._tTime=y,!e&&this.parent&&Ee(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,f=this._tDur,x&&(this._lock=2,g=A?_:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;Xe(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(l=function(t,e,i){var n;if(i>e)for(n=t._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,Tt(g),Tt(n)),l&&(y-=n-(n=l._start))),this._tTime=y,this._time=n,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,g=0),!g&&n&&!e&&!a&&(Ee(this,"onStart"),this._tTime!==y))return this;if(n>=g&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,e,i),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var M=t<0?t:n;r;){if(s=r._prev,(r._act||M<=r._end)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(M-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(M-r._start)*r._ts,e,i||v&&(r._initted||r._startAt)),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=M?-1e-8:z);break}}r=s}}if(l&&!e&&(this.pause(),l.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=c,Jt(this),this.render(t,e,i);this._onUpdate&&!e&&Ee(this,"onUpdate",!0),(y===f&&this._tTime>=this.totalDuration()||!y&&g)&&(c!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((t||!_)&&(y===f&&this._ts>0||!y&&this._ts<0)&&jt(this,1),e||t<0&&!g||!y&&!g&&f||(Ee(this,y===f&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<f&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if(X(e)||(e=oe(this,e,t)),!(t instanceof Ke)){if(K(t))return t.forEach((function(t){return i.add(t,e)})),this;if(W(t))return this.addLabel(t,e);if(!Y(t))return this;t=ci.delayedCall(0,t)}return this!==t?Kt(this,t,e):this},i.getChildren=function(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=-1e8);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof ci?e&&r.push(s):(i&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,i)))),s=s._next;return r},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return W(t)?this.removeLabel(t):Y(t)?this.killTweensOf(t):(Vt(this,t),t===this._recent&&(this._recent=this._last),Wt(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Tt(Ie.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=oe(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var n=ci.delayedCall(0,e||ut,i);return n.data="isPause",this._hasPause=1,Kt(this,n,oe(this,t))},i.removePause=function(t){var e=this._first;for(t=oe(this,t);e;)e._start===t&&"isPause"===e.data&&jt(e),e=e._next},i.killTweensOf=function(t,e,i){for(var n=this.getTweensOf(t,i),r=n.length;r--;)ei!==n[r]&&n[r].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,n=[],r=ge(t),s=this._first,a=X(e);s;)s instanceof ci?Ot(s._targets,r)&&(a?(!ei||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&n.push(s):(i=s.getTweensOf(r,e)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(t,e){e=e||{};var i,n=this,r=oe(n,t),s=e,a=s.startAt,o=s.onStart,h=s.onStartParams,l=s.immediateRender,d=ci.to(n,Bt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(a&&"time"in a?a.time:n._time))/n.timeScale())||z,onStart:function(){if(n.pause(),!i){var t=e.duration||Math.abs((r-(a&&"time"in a?a.time:n._time))/n.timeScale());d._dur!==t&&re(d,t,0,1).render(d._time,!0,!0),i=1}o&&o.apply(d,h||[])}},e));return l?d.render(0):d},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,Bt({startAt:{time:oe(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),Ce(this,oe(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),Ce(this,oe(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+z)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=t,r._end+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return Wt(this)},i.invalidate=function(e){var i=this._first;for(this._lock=0;i;)i.invalidate(e),i=i._next;return t.prototype.invalidate.call(this,e)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Wt(this)},i.totalDuration=function(t){var e,i,n,r=0,s=this,a=s._last,o=B;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(n=s.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(i=a._start)>o&&s._sort&&a._ts&&!s._lock?(s._lock=1,Kt(s,a,i-a._delay,1)._lock=0):o=i,i<0&&a._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),o=0),a._end>r&&a._ts&&(r=a._end),a=e;re(s,s===b&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(b._ts&&(Ft(b,qt(t,b)),C=Ie.frame),Ie.frame>=wt){wt+=D.autoSleep||120;var e=b._first;if((!e||!e._ts)&&D.autoSleep&&Ie._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ie.sleep()}}},e}(Ke);Bt(ti.prototype,{_lock:0,_hasPause:0,_forcing:0});var ei,ii,ni=function(t,e,i,n,r,s,a){var o,h,l,d,c,u,p,m,g=new Ci(this._pt,t,e,0,1,yi,null,r),f=0,_=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=xe(n)),s&&(s(m=[i,n],t,e),i=m[0],n=m[1]),h=i.match(nt)||[];o=nt.exec(n);)d=o[0],c=n.substring(f,o.index),l?l=(l+1)%5:"rgba("===c.substr(-5)&&(l=1),d!==h[_++]&&(u=parseFloat(h[_-1])||0,g._pt={_next:g._pt,p:c||1===_?c:",",s:u,c:"="===d.charAt(1)?Lt(u,d)-u:parseFloat(d)-u,m:l&&l<4?Math.round:0},f=nt.lastIndex);return g.c=f<n.length?n.substring(f,n.length):"",g.fp=a,(rt.test(n)||p)&&(g.e=0),this._pt=g,g},ri=function(t,e,i,n,r,s,a,o,h,l){Y(n)&&(n=n(r||0,t,s));var d,c=t[e],u="get"!==i?i:Y(c)?h?t[e.indexOf("set")||!Y(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():c,p=Y(c)?h?mi:pi:ui;if(W(n)&&(~n.indexOf("random(")&&(n=xe(n)),"="===n.charAt(1)&&((d=Lt(u,n)+(ce(u)||0))||0===d)&&(n=d)),!l||u!==n||ii)return isNaN(u*n)||""===n?ni.call(this,t,e,u,n,p,o||D.stringFilter,h):(d=new Ci(this._pt,t,e,+u||0,n-(u||0),"boolean"==typeof c?vi:_i,0,p),h&&(d.fp=h),a&&d.modifier(a,this,t),this._pt=d)},si=function(t,e,i,n,r,s){var a,o,h,l;if(yt[t]&&!1!==(a=new yt[t]).init(r,a.rawVars?e[t]:function(t,e,i,n,r){if(Y(t)&&(t=hi(t,r,e,i,n)),!U(t)||t.style&&t.nodeType||K(t)||Z(t))return W(t)?hi(t,r,e,i,n):t;var s,a={};for(s in t)a[s]=hi(t[s],r,e,i,n);return a}(e[t],n,r,s,i),i,n,s)&&(i._pt=o=new Ci(i._pt,r,t,0,1,a.render,a,0,a.priority),i!==E))for(h=i._ptLookup[i._targets.indexOf(r)],l=a._props.length;l--;)h[a._props[l]]=o;return a},ai=function t(e,i,n){var r,s,a,o,h,l,d,c,u,p,m,g,f,y=e.vars,w=y.ease,A=y.startAt,x=y.immediateRender,M=y.lazy,C=y.onUpdate,E=y.runBackwards,S=y.yoyoEase,k=y.keyframes,T=y.autoRevert,L=e._dur,O=e._startAt,R=e._targets,F=e.parent,D=F&&"nested"===F.data?F.vars.targets:R,G="auto"===e._overwrite&&!_,I=e.timeline;if(I&&(!k||!w)&&(w="none"),e._ease=$e(w,P.ease),e._yEase=S?Ye($e(!0===S?w:S,P.ease)):0,S&&e._yoyo&&!e._repeat&&(S=e._yEase,e._yEase=e._ease,e._ease=S),e._from=!I&&!!y.runBackwards,!I||k&&!y.stagger){if(g=(c=R[0]?Ct(R[0]).harness:0)&&y[c.prop],r=It(y,ft),O&&(O._zTime<0&&O.progress(1),i<0&&E&&x&&!T?O.render(-1,!0):O.revert(E&&L?mt:pt),O._lazy=0),A){if(jt(e._startAt=ci.set(R,Bt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!O&&q(M),startAt:null,delay:0,onUpdate:C&&function(){return Ee(e,"onUpdate")},stagger:0},A))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v||!x&&!T)&&e._startAt.revert(mt),x&&L&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(E&&L&&!O)if(i&&(x=!1),a=Bt({overwrite:!1,data:"isFromStart",lazy:x&&!O&&q(M),immediateRender:x,stagger:0,parent:F},r),g&&(a[c.prop]=g),jt(e._startAt=ci.set(R,a)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v?e._startAt.revert(mt):e._startAt.render(-1,!0)),e._zTime=i,x){if(!i)return}else t(e._startAt,z,z);for(e._pt=e._ptCache=0,M=L&&q(M)||M&&!L,s=0;s<R.length;s++){if(d=(h=R[s])._gsap||Mt(R)[s]._gsap,e._ptLookup[s]=p={},vt[d.id]&&_t.length&&Rt(),m=D===R?s:D.indexOf(h),c&&!1!==(u=new c).init(h,g||r,e,m,D)&&(e._pt=o=new Ci(e._pt,h,u.name,0,1,u.render,u,0,u.priority),u._props.forEach((function(t){p[t]=o})),u.priority&&(l=1)),!c||g)for(a in r)yt[a]&&(u=si(a,r,e,m,h,D))?u.priority&&(l=1):p[a]=o=ri.call(e,h,a,"get",r[a],m,D,0,y.stringFilter);e._op&&e._op[s]&&e.kill(h,e._op[s]),G&&e._pt&&(ei=e,b.killTweensOf(h,p,e.globalTime(i)),f=!e.parent,ei=0),e._pt&&M&&(vt[d.id]=1)}l&&Mi(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!f,k&&i<=0&&I.render(B,!0,!0)},oi=function(t,e,i,n){var r,s,a=e.ease||n||"power1.inOut";if(K(e))s=i[t]||(i[t]=[]),e.forEach((function(t,i){return s.push({t:i/(e.length-1)*100,v:t,e:a})}));else for(r in e)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:a})},hi=function(t,e,i,n,r){return Y(t)?t.call(e,i,n,r):W(t)&&~t.indexOf("random(")?xe(t):t},li=xt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",di={};St(li+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return di[t]=1}));var ci=function(t){function e(e,i,n,r){var s;"number"==typeof i&&(n.duration=i,i=n,n=null);var a,o,h,l,d,c,u,p,m=(s=t.call(this,r?i:Ht(i))||this).vars,f=m.duration,v=m.delay,y=m.immediateRender,w=m.stagger,A=m.overwrite,x=m.keyframes,M=m.defaults,C=m.scrollTrigger,E=m.yoyoEase,S=i.parent||b,k=(K(e)||Z(e)?X(e[0]):"length"in i)?[e]:ge(e);if(s._targets=k.length?Mt(k):dt(0,!D.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=A,x||w||Q(f)||Q(v)){if(i=s.vars,(a=s.timeline=new ti({data:"nested",defaults:M||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),a.parent=a._dp=g(s),a._start=0,w||Q(f)||Q(v)){if(l=k.length,u=w&&ve(w),U(w))for(d in w)~li.indexOf(d)&&(p||(p={}),p[d]=w[d]);for(o=0;o<l;o++)(h=It(i,di)).stagger=0,E&&(h.yoyoEase=E),p&&zt(h,p),c=k[o],h.duration=+hi(f,g(s),o,c,k),h.delay=(+hi(v,g(s),o,c,k)||0)-s._delay,!w&&1===l&&h.delay&&(s._delay=v=h.delay,s._start+=v,h.delay=0),a.to(c,h,u?u(o,c,k):0),a._ease=Ne.none;a.duration()?f=v=0:s.timeline=0}else if(x){Ht(Bt(a.vars.defaults,{ease:"none"})),a._ease=$e(x.ease||i.ease||"none");var T,L,O,R=0;if(K(x))x.forEach((function(t){return a.to(k,t,">")})),a.duration();else{for(d in h={},x)"ease"===d||"easeEach"===d||oi(d,x[d],h,x.easeEach);for(d in h)for(T=h[d].sort((function(t,e){return t.t-e.t})),R=0,o=0;o<T.length;o++)(O={ease:(L=T[o]).e,duration:(L.t-(o?T[o-1].t:0))/100*f})[d]=L.v,a.to(k,O,R),R+=O.duration;a.duration()<f&&a.to({},{duration:f-a.duration()})}}f||s.duration(f=a.duration())}else s.timeline=0;return!0!==A||_||(ei=g(s),b.killTweensOf(k),ei=0),Kt(S,g(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(y||!f&&!x&&s._start===Tt(S._time)&&q(y)&&Xt(g(s))&&"nested"!==S.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-v)||0)),C&&te(g(s),C),s}f(e,t);var i=e.prototype;return i.render=function(t,e,i){var n,r,s,a,o,h,l,d,c,u=this._time,p=this._tDur,m=this._dur,g=t<0,f=t>p-z&&!g?p:t<z?0:t;if(m){if(f!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(n=f,d=this.timeline,this._repeat){if(a=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*a+t,e,i);if(n=Tt(f%a),f===p?(s=this._repeat,n=m):((s=~~(f/a))&&s===Tt(f/a)&&(n=m,s--),n>m&&(n=m)),(h=this._yoyo&&1&s)&&(c=this._yEase,n=m-n),o=Ut(this._tTime,a),n===u&&!i&&this._initted&&s===o)return this._tTime=f,this;s!==o&&(d&&this._yEase&&Xe(d,h),this.vars.repeatRefresh&&!h&&!this._lock&&this._time!==a&&this._initted&&(this._lock=i=1,this.render(Tt(a*s),!0).invalidate()._lock=0))}if(!this._initted){if(ee(this,g?t:n,i,e,f))return this._tTime=0,this;if(!(u===this._time||i&&this.vars.repeatRefresh&&s!==o))return this;if(m!==this._dur)return this.render(t,e,i)}if(this._tTime=f,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(c||this._ease)(n/m),this._from&&(this.ratio=l=1-l),n&&!u&&!e&&!s&&(Ee(this,"onStart"),this._tTime!==f))return this;for(r=this._pt;r;)r.r(l,r.d),r=r._next;d&&d.render(t<0?t:d._dur*d._ease(n/this._dur),e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&Yt(this,t,0,i),Ee(this,"onUpdate")),this._repeat&&s!==o&&this.vars.onRepeat&&!e&&this.parent&&Ee(this,"onRepeat"),f!==this._tDur&&f||this._tTime!==f||(g&&!this._onUpdate&&Yt(this,t,0,!0),(t||!m)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&jt(this,1),e||g&&!u||!(f||u||h)||(Ee(this,f===p?"onComplete":"onReverseComplete",!0),this._prom&&!(f<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,n){var r,s,a,o=t.ratio,h=e<0||!e&&(!t._start&&ie(t)&&(t._initted||!ne(t))||(t._ts<0||t._dp._ts<0)&&!ne(t))?0:1,l=t._rDelay,d=0;if(l&&t._repeat&&(d=de(0,t._tDur,e),s=Ut(d,l),t._yoyo&&1&s&&(h=1-h),s!==Ut(t._tTime,l)&&(o=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==o||v||n||t._zTime===z||!e&&t._zTime){if(!t._initted&&ee(t,e,n,i,d))return;for(a=t._zTime,t._zTime=e||(i?z:0),i||(i=e&&!a),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=d,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&Yt(t,e,0,!0),t._onUpdate&&!i&&Ee(t,"onUpdate"),d&&t._repeat&&!i&&t.parent&&Ee(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&jt(t,1),i||v||(Ee(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},i.resetTo=function(t,e,i,n,r){S||Ie.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ai(this,s),function(t,e,i,n,r,s,a,o){var h,l,d,c,u=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!u)for(u=t._ptCache[e]=[],d=t._ptLookup,c=t._targets.length;c--;){if((h=d[c][e])&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return ii=1,t.vars[e]="+=0",ai(t,a),ii=0,o?dt():1;u.push(h)}for(c=u.length;c--;)(h=(l=u[c])._pt||l).s=!n&&0!==n||r?h.s+(n||0)+s*h.c:n,h.c=i-h.s,l.e&&(l.e=kt(i)+ce(l.e)),l.b&&(l.b=h.s+ce(l.b))}(this,t,e,i,n,this._ease(s/this._dur),s,r)?this.resetTo(t,e,i,n,1):(Qt(this,0),this.parent||Nt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Se(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,ei&&!0!==ei.vars.overwrite)._first||Se(this),this.parent&&i!==this.timeline.totalDuration()&&re(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,a,o,h,l,d=this._targets,c=t?ge(t):d,u=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,n=i===e.length;n&&i--&&t[i]===e[i];);return i<0}(d,c))return"all"===e&&(this._pt=0),Se(this);for(n=this._op=this._op||[],"all"!==e&&(W(e)&&(o={},St(e,(function(t){return o[t]=1})),e=o),e=function(t,e){var i,n,r,s,a=t[0]?Ct(t[0]).harness:0,o=a&&a.aliases;if(!o)return e;for(n in i=zt({},e),o)if(n in i)for(r=(s=o[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(d,e)),l=d.length;l--;)if(~c.indexOf(d[l]))for(o in r=u[l],"all"===e?(n[l]=e,a=r,s={}):(s=n[l]=n[l]||{},a=e),a)(h=r&&r[o])&&("kill"in h.d&&!0!==h.d.kill(o)||Vt(this,h,"_pt"),delete r[o]),"all"!==s&&(s[o]=1);return this._initted&&!this._pt&&p&&Se(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,e){return he(1,arguments)},e.delayedCall=function(t,i,n,r){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},e.fromTo=function(t,e,i){return he(2,arguments)},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return b.killTweensOf(t,e,i)},e}(Ke);Bt(ci.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),St("staggerTo,staggerFrom,staggerFromTo",(function(t){ci[t]=function(){var e=new ti,i=ue.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var ui=function(t,e,i){return t[e]=i},pi=function(t,e,i){return t[e](i)},mi=function(t,e,i,n){return t[e](n.fp,i)},gi=function(t,e,i){return t.setAttribute(e,i)},fi=function(t,e){return Y(t[e])?pi:$(t[e])&&t.setAttribute?gi:ui},_i=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},vi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},yi=function(t,e){var i=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+n,i=i._next;n+=e.c}e.set(e.t,e.p,n,e)},bi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},wi=function(t,e,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(t,e,i),s=r},Ai=function(t){for(var e,i,n=this._pt;n;)i=n._next,n.p===t&&!n.op||n.op===t?Vt(this,n,"_pt"):n.dep||(e=1),n=i;return!e},xi=function(t,e,i,n){n.mSet(t,e,n.m.call(n.tween,i,n.mt),n)},Mi=function(t){for(var e,i,n,r,s=t._pt;s;){for(e=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=e}t._pt=n},Ci=function(){function t(t,e,i,n,r,s,a,o,h){this.t=e,this.s=n,this.c=r,this.p=i,this.r=s||_i,this.d=a||this,this.set=o||ui,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=xi,this.m=t,this.mt=i,this.tween=e},t}();St(xt+"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(t){return ft[t]=1})),ot.TweenMax=ot.TweenLite=ci,ot.TimelineLite=ot.TimelineMax=ti,b=new ti({sortChildren:!1,defaults:P,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),D.stringFilter=Ge;var Ei=[],Si={},ki=[],Ti=0,Li=0,Oi=function(t){return(Si[t]||ki).map((function(t){return t()}))},Ri=function(){var t=Date.now(),e=[];t-Ti>2&&(Oi("matchMediaInit"),Ei.forEach((function(t){var i,n,r,s,a=t.queries,o=t.conditions;for(n in a)(i=w.matchMedia(a[n]).matches)&&(r=1),i!==o[n]&&(o[n]=i,s=1);s&&(t.revert(),r&&e.push(t))})),Oi("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Ti=t,Oi("matchMedia"))},Fi=function(){function t(t,e){this.selector=e&&fe(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Li++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,i){Y(t)&&(i=e,e=t,t=Y);var n=this,r=function(){var t,r=y,s=n.selector;return r&&r!==n&&r.data.push(n),i&&(n.selector=fe(i)),y=n,t=e.apply(n,arguments),Y(t)&&n._r.push(t),y=r,n.selector=s,n.isReverted=!1,t};return n.last=r,t===Y?r(n,(function(t){return n.add(null,t)})):t?n[t]=r:r},e.ignore=function(t){var e=y;y=null,t(this),y=e},e.getTweens=function(){var e=[];return this.data.forEach((function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof ci&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var i=this;if(t?function(){for(var e,n=i.getTweens(),r=i.data.length;r--;)"isFlip"===(e=i.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=i.data.length;r--;)(e=i.data[r])instanceof ti?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof ci)&&e.revert&&e.revert(t);i._r.forEach((function(e){return e(t,i)})),i.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Ei.length;n--;)Ei[n].id===this.id&&Ei.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),Di=function(){function t(t){this.contexts=[],this.scope=t,y&&y.data.push(this)}var e=t.prototype;return e.add=function(t,e,i){U(t)||(t={matches:t});var n,r,s,a=new Fi(0,i||this.scope),o=a.conditions={};for(r in y&&!a.selector&&(a.selector=y.selector),this.contexts.push(a),e=a.add("onMatch",e),a.queries=t,t)"all"===r?s=1:(n=w.matchMedia(t[r]))&&(Ei.indexOf(a)<0&&Ei.push(a),(o[r]=n.matches)&&(s=1),n.addListener?n.addListener(Ri):n.addEventListener("change",Ri));return s&&e(a,(function(t){return a.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Pi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Te(t)}))},timeline:function(t){return new ti(t)},getTweensOf:function(t,e){return b.getTweensOf(t,e)},getProperty:function(t,e,i,n){W(t)&&(t=ge(t)[0]);var r=Ct(t||{}).get,s=i?Pt:Dt;return"native"===i&&(i=""),t?e?s((yt[e]&&yt[e].get||r)(t,e,i,n)):function(e,i,n){return s((yt[e]&&yt[e].get||r)(t,e,i,n))}:t},quickSetter:function(t,e,i){if((t=ge(t)).length>1){var n=t.map((function(t){return Gi.quickSetter(t,e,i)})),r=n.length;return function(t){for(var e=r;e--;)n[e](t)}}t=t[0]||{};var s=yt[e],a=Ct(t),o=a.harness&&(a.harness.aliases||{})[e]||e,h=s?function(e){var n=new s;E._pt=0,n.init(t,i?e+i:e,E,0,[t]),n.render(1,n),E._pt&&bi(1,E)}:a.set(t,o);return s?h:function(e){return h(t,o,i?e+i:e,a,1)}},quickTo:function(t,e,i){var n,r=Gi.to(t,zt(((n={})[e]="+=0.1",n.paused=!0,n),i||{})),s=function(t,i,n){return r.resetTo(e,t,i,n)};return s.tween=r,s},isTweening:function(t){return b.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=$e(t.ease,P.ease)),Gt(P,t||{})},config:function(t){return Gt(D,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,n=t.plugins,r=t.defaults,s=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!yt[t]&&!ot[t]&&dt()})),bt[e]=function(t,e,n){return i(ge(t),Bt(e||{},r),n)},s&&(ti.prototype[e]=function(t,i,n){return this.add(bt[e](t,U(i)?i:(n=i)&&{},this),n)})},registerEase:function(t,e){Ne[t]=$e(e)},parseEase:function(t,e){return arguments.length?$e(t,e):Ne},getById:function(t){return b.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,n,r=new ti(t);for(r.smoothChildTiming=q(t.smoothChildTiming),b.remove(r),r._dp=0,r._time=r._tTime=b._time,i=b._first;i;)n=i._next,!e&&!i._dur&&i instanceof ci&&i.vars.onComplete===i._targets[0]||Kt(r,i,i._start-i._delay),i=n;return Kt(b,r,0),r},context:function(t,e){return t?new Fi(t,e):y},matchMedia:function(t){return new Di(t)},matchMediaRefresh:function(){return Ei.forEach((function(t){var e,i,n=t.conditions;for(i in n)n[i]&&(n[i]=!1,e=1);e&&t.revert()}))||Ri()},addEventListener:function(t,e){var i=Si[t]||(Si[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=Si[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},utils:{wrap:function t(e,i,n){var r=i-e;return K(e)?Ae(e,t(0,e.length),i):le(n,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,i,n){var r=i-e,s=2*r;return K(e)?Ae(e,t(0,e.length-1),i):le(n,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:ve,random:we,snap:be,normalize:function(t,e,i){return Me(t,e,0,1,i)},getUnit:ce,clamp:function(t,e,i){return le(i,(function(i){return de(t,e,i)}))},splitColor:Fe,toArray:ge,selector:fe,mapRange:Me,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||ce(i))}},interpolate:function t(e,i,n,r){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var a,o,h,l,d,c=W(e),u={};if(!0===n&&(r=1)&&(n=null),c)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(h=[],l=e.length,d=l-2,o=1;o<l;o++)h.push(t(e[o-1],e[o]));l--,s=function(t){t*=l;var e=Math.min(d,~~t);return h[e](t-e)},n=i}else r||(e=zt(K(e)?[]:{},e));if(!h){for(a in i)ri.call(u,e,a,"get",i[a]);s=function(t){return bi(t,u)||(c?e.p:e)}}}return le(n,s)},shuffle:_e},install:lt,effects:bt,ticker:Ie,updateRoot:ti.updateRoot,plugins:yt,globalTimeline:b,core:{PropTween:Ci,globals:ct,Tween:ci,Timeline:ti,Animation:Ke,getCache:Ct,_removeLinkedListItem:Vt,reverting:function(){return v},context:function(t){return t&&y&&(y.data.push(t),t._ctx=y),y},suppressOverwrites:function(t){return _=t}}};St("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Pi[t]=ci[t]})),Ie.add(ti.updateRoot),E=Pi.to({},{duration:0});var Bi=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},zi=function(t,e){return{name:t,rawVars:1,init:function(t,i,n){n._onInit=function(t){var n,r;if(W(i)&&(n={},St(i,(function(t){return n[t]=1})),i=n),e){for(r in n={},i)n[r]=e(i[r]);i=n}!function(t,e){var i,n,r,s=t._targets;for(i in e)for(n=s.length;n--;)(r=t._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=Bi(r,i)),r&&r.modifier&&r.modifier(e[i],t,s[n],i))}(t,i)}}}},Gi=Pi.registerPlugin({name:"attr",init:function(t,e,i,n,r){var s,a,o;for(s in this.tween=i,e)o=t.getAttribute(s)||"",(a=this.add(t,"setAttribute",(o||0)+"",e[s],n,r,0,0,s)).op=s,a.b=o,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)v?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},zi("roundProps",ye),zi("modifiers"),zi("snap",be))||Pi;ci.version=ti.version=Gi.version="3.12.5",M=1,J()&&He(),Ne.Power0,Ne.Power1,Ne.Power2,Ne.Power3,Ne.Power4,Ne.Linear,Ne.Quad,Ne.Cubic,Ne.Quart,Ne.Quint,Ne.Strong,Ne.Elastic,Ne.Back,Ne.SteppedEase,Ne.Bounce,Ne.Sine,Ne.Expo,Ne.Circ;var Ii,Hi,Ni,Vi,ji,Wi,Yi,Xi,$i={},Ui=180/Math.PI,qi=Math.PI/180,Ji=Math.atan2,Qi=/([A-Z])/g,Zi=/(left|right|width|margin|padding|x)/i,Ki=/[\s,\(]\S/,tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},en=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},nn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},rn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},sn=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},an=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},on=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},hn=function(t,e,i){return t.style[e]=i},ln=function(t,e,i){return t.style.setProperty(e,i)},dn=function(t,e,i){return t._gsap[e]=i},cn=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},un=function(t,e,i,n,r){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},pn=function(t,e,i,n,r){var s=t._gsap;s[e]=i,s.renderTransform(r,s)},mn="transform",gn=mn+"Origin",fn=function t(e,i){var n=this,r=this.target,s=r.style,a=r._gsap;if(e in $i&&s){if(this.tfm=this.tfm||{},"transform"===e)return tn.transform.split(",").forEach((function(e){return t.call(n,e,i)}));if(~(e=tn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=Dn(r,t)})):this.tfm[e]=a.x?a[e]:Dn(r,e),e===gn&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(mn)>=0)return;a.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(gn,i,"")),e=mn}(s||i)&&this.props.push(e,i,s[e])},_n=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},vn=function(){var t,e,i=this.props,n=this.target,r=n.style,s=n._gsap;for(t=0;t<i.length;t+=3)i[t+1]?n[i[t]]=i[t+2]:i[t+2]?r[i[t]]=i[t+2]:r.removeProperty("--"===i[t].substr(0,2)?i[t]:i[t].replace(Qi,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=Yi())&&t.isStart||r[mn]||(_n(r),s.zOrigin&&r[gn]&&(r[gn]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},yn=function(t,e){var i={target:t,props:[],revert:vn,save:fn};return t._gsap||Gi.core.getCache(t),e&&e.split(",").forEach((function(t){return i.save(t)})),i},bn=function(t,e){var i=Hi.createElementNS?Hi.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hi.createElement(t);return i&&i.style?i:Hi.createElement(t)},wn=function t(e,i,n){var r=getComputedStyle(e);return r[i]||r.getPropertyValue(i.replace(Qi,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&t(e,xn(i)||i,1)||""},An="O,Moz,ms,Ms,Webkit".split(","),xn=function(t,e,i){var n=(e||ji).style,r=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(An[r]+t in n););return r<0?null:(3===r?"ms":r>=0?An[r]:"")+t},Mn=function(){"undefined"!=typeof window&&window.document&&(Ii=window,Hi=Ii.document,Ni=Hi.documentElement,ji=bn("div")||{style:{}},bn("div"),mn=xn(mn),gn=mn+"Origin",ji.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Xi=!!xn("perspective"),Yi=Gi.core.reverting,Vi=1)},Cn=function t(e){var i,n=bn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,a=this.style.cssText;if(Ni.appendChild(n),n.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),Ni.removeChild(n),this.style.cssText=a,i},En=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},Sn=function(t){var e;try{e=t.getBBox()}catch(i){e=Cn.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Cn||(e=Cn.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+En(t,["x","cx","x1"])||0,y:+En(t,["y","cy","y1"])||0,width:0,height:0}},kn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Sn(t))},Tn=function(t,e){if(e){var i,n=t.style;e in $i&&e!==gn&&(e=mn),n.removeProperty?("ms"!==(i=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===i?e:e.replace(Qi,"-$1").toLowerCase())):n.removeAttribute(e)}},Ln=function(t,e,i,n,r,s){var a=new Ci(t._pt,e,i,0,1,s?on:an);return t._pt=a,a.b=n,a.e=r,t._props.push(i),a},On={deg:1,rad:1,turn:1},Rn={grid:1,flex:1},Fn=function t(e,i,n,r){var s,a,o,h,l=parseFloat(n)||0,d=(n+"").trim().substr((l+"").length)||"px",c=ji.style,u=Zi.test(i),p="svg"===e.tagName.toLowerCase(),m=(p?"client":"offset")+(u?"Width":"Height"),g=100,f="px"===r,_="%"===r;if(r===d||!l||On[r]||On[d])return l;if("px"!==d&&!f&&(l=t(e,i,n,"px")),h=e.getCTM&&kn(e),(_||"%"===d)&&($i[i]||~i.indexOf("adius")))return s=h?e.getBBox()[u?"width":"height"]:e[m],kt(_?l/s*g:l/100*s);if(c[u?"width":"height"]=g+(f?d:r),a=~i.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,h&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==Hi&&a.appendChild||(a=Hi.body),(o=a._gsap)&&_&&o.width&&u&&o.time===Ie.time&&!o.uncache)return kt(l/o.width*g);if(!_||"height"!==i&&"width"!==i)(_||"%"===d)&&!Rn[wn(a,"display")]&&(c.position=wn(e,"position")),a===e&&(c.position="static"),a.appendChild(ji),s=ji[m],a.removeChild(ji),c.position="absolute";else{var v=e.style[i];e.style[i]=g+r,s=e[m],v?e.style[i]=v:Tn(e,i)}return u&&_&&((o=Ct(a)).time=Ie.time,o.width=a[m]),kt(f?s*l/g:s&&l?g/s*l:0)},Dn=function(t,e,i,n){var r;return Vi||Mn(),e in tn&&"transform"!==e&&~(e=tn[e]).indexOf(",")&&(e=e.split(",")[0]),$i[e]&&"transform"!==e?(r=Yn(t,n),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Xn(wn(t,gn))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=Gn[e]&&Gn[e](t,e,i)||wn(t,e)||Et(t,e)||("opacity"===e?1:0)),i&&!~(r+"").trim().indexOf(" ")?Fn(t,e,r,i)+i:r},Pn=function(t,e,i,n){if(!i||"none"===i){var r=xn(e,t,1),s=r&&wn(t,r,1);s&&s!==i?(e=r,i=s):"borderColor"===e&&(i=wn(t,"borderTopColor"))}var a,o,h,l,d,c,u,p,m,g,f,_=new Ci(this._pt,t.style,e,0,1,yi),v=0,y=0;if(_.b=i,_.e=n,i+="","auto"===(n+="")&&(c=t.style[e],t.style[e]=n,n=wn(t,e)||n,c?t.style[e]=c:Tn(t,e)),Ge(a=[i,n]),n=a[1],h=(i=a[0]).match(it)||[],(n.match(it)||[]).length){for(;o=it.exec(n);)u=o[0],m=n.substring(v,o.index),d?d=(d+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(d=1),u!==(c=h[y++]||"")&&(l=parseFloat(c)||0,f=c.substr((l+"").length),"="===u.charAt(1)&&(u=Lt(l,u)+f),p=parseFloat(u),g=u.substr((p+"").length),v=it.lastIndex-g.length,g||(g=g||D.units[e]||f,v===n.length&&(n+=g,_.e+=g)),f!==g&&(l=Fn(t,e,c,g)||0),_._pt={_next:_._pt,p:m||1===y?m:",",s:l,c:p-l,m:d&&d<4||"zIndex"===e?Math.round:0});_.c=v<n.length?n.substring(v,n.length):""}else _.r="display"===e&&"none"===n?on:an;return rt.test(n)&&(_.e=0),this._pt=_,_},Bn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},zn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,n,r,s=e.t,a=s.style,o=e.u,h=s._gsap;if("all"===o||!0===o)a.cssText="",n=1;else for(r=(o=o.split(",")).length;--r>-1;)i=o[r],$i[i]&&(n=1,i="transformOrigin"===i?gn:mn),Tn(s,i);n&&(Tn(s,mn),h&&(h.svg&&s.removeAttribute("transform"),Yn(s,1),h.uncache=1,_n(a)))}},Gn={clearProps:function(t,e,i,n,r){if("isFromStart"!==r.data){var s=t._pt=new Ci(t._pt,e,i,0,0,zn);return s.u=n,s.pr=-10,s.tween=r,t._props.push(i),1}}},In=[1,0,0,1,0,0],Hn={},Nn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Vn=function(t){var e=wn(t,mn);return Nn(e)?In:e.substr(7).match(et).map(kt)},jn=function(t,e){var i,n,r,s,a=t._gsap||Ct(t),o=t.style,h=Vn(t);return a.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?In:h:(h!==In||t.offsetParent||t===Ni||a.svg||(r=o.display,o.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,n=t.nextElementSibling,Ni.appendChild(t)),h=Vn(t),r?o.display=r:Tn(t,"display"),s&&(n?i.insertBefore(t,n):i?i.appendChild(t):Ni.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Wn=function(t,e,i,n,r,s){var a,o,h,l=t._gsap,d=r||jn(t,!0),c=l.xOrigin||0,u=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=d[0],f=d[1],_=d[2],v=d[3],y=d[4],b=d[5],w=e.split(" "),A=parseFloat(w[0])||0,x=parseFloat(w[1])||0;i?d!==In&&(o=g*v-f*_)&&(h=A*(-f/o)+x*(g/o)-(g*b-f*y)/o,A=A*(v/o)+x*(-_/o)+(_*b-v*y)/o,x=h):(A=(a=Sn(t)).x+(~w[0].indexOf("%")?A/100*a.width:A),x=a.y+(~(w[1]||w[0]).indexOf("%")?x/100*a.height:x)),n||!1!==n&&l.smooth?(y=A-c,b=x-u,l.xOffset=p+(y*g+b*_)-y,l.yOffset=m+(y*f+b*v)-b):l.xOffset=l.yOffset=0,l.xOrigin=A,l.yOrigin=x,l.smooth=!!n,l.origin=e,l.originIsAbsolute=!!i,t.style[gn]="0px 0px",s&&(Ln(s,l,"xOrigin",c,A),Ln(s,l,"yOrigin",u,x),Ln(s,l,"xOffset",p,l.xOffset),Ln(s,l,"yOffset",m,l.yOffset)),t.setAttribute("data-svg-origin",A+" "+x)},Yn=function(t,e){var i=t._gsap||new Ze(t);if("x"in i&&!e&&!i.uncache)return i;var n,r,s,a,o,h,l,d,c,u,p,m,g,f,_,v,y,b,w,A,x,M,C,E,S,k,T,L,O,R,F,P,B=t.style,z=i.scaleX<0,G="px",I="deg",H=getComputedStyle(t),N=wn(t,gn)||"0";return n=r=s=h=l=d=c=u=p=0,a=o=1,i.svg=!(!t.getCTM||!kn(t)),H.translate&&("none"===H.translate&&"none"===H.scale&&"none"===H.rotate||(B[mn]=("none"!==H.translate?"translate3d("+(H.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==H.rotate?"rotate("+H.rotate+") ":"")+("none"!==H.scale?"scale("+H.scale.split(" ").join(",")+") ":"")+("none"!==H[mn]?H[mn]:"")),B.scale=B.rotate=B.translate="none"),f=jn(t,i.svg),i.svg&&(i.uncache?(S=t.getBBox(),N=i.xOrigin-S.x+"px "+(i.yOrigin-S.y)+"px",E=""):E=!e&&t.getAttribute("data-svg-origin"),Wn(t,E||N,!!E||i.originIsAbsolute,!1!==i.smooth,f)),m=i.xOrigin||0,g=i.yOrigin||0,f!==In&&(b=f[0],w=f[1],A=f[2],x=f[3],n=M=f[4],r=C=f[5],6===f.length?(a=Math.sqrt(b*b+w*w),o=Math.sqrt(x*x+A*A),h=b||w?Ji(w,b)*Ui:0,(c=A||x?Ji(A,x)*Ui+h:0)&&(o*=Math.abs(Math.cos(c*qi))),i.svg&&(n-=m-(m*b+g*A),r-=g-(m*w+g*x))):(P=f[6],R=f[7],T=f[8],L=f[9],O=f[10],F=f[11],n=f[12],r=f[13],s=f[14],l=(_=Ji(P,O))*Ui,_&&(E=M*(v=Math.cos(-_))+T*(y=Math.sin(-_)),S=C*v+L*y,k=P*v+O*y,T=M*-y+T*v,L=C*-y+L*v,O=P*-y+O*v,F=R*-y+F*v,M=E,C=S,P=k),d=(_=Ji(-A,O))*Ui,_&&(v=Math.cos(-_),F=x*(y=Math.sin(-_))+F*v,b=E=b*v-T*y,w=S=w*v-L*y,A=k=A*v-O*y),h=(_=Ji(w,b))*Ui,_&&(E=b*(v=Math.cos(_))+w*(y=Math.sin(_)),S=M*v+C*y,w=w*v-b*y,C=C*v-M*y,b=E,M=S),l&&Math.abs(l)+Math.abs(h)>359.9&&(l=h=0,d=180-d),a=kt(Math.sqrt(b*b+w*w+A*A)),o=kt(Math.sqrt(C*C+P*P)),_=Ji(M,C),c=Math.abs(_)>2e-4?_*Ui:0,p=F?1/(F<0?-F:F):0),i.svg&&(E=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Nn(wn(t,mn)),E&&t.setAttribute("transform",E))),Math.abs(c)>90&&Math.abs(c)<270&&(z?(a*=-1,c+=h<=0?180:-180,h+=h<=0?180:-180):(o*=-1,c+=c<=0?180:-180)),e=e||i.uncache,i.x=n-((i.xPercent=n&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+G,i.y=r-((i.yPercent=r&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+G,i.z=s+G,i.scaleX=kt(a),i.scaleY=kt(o),i.rotation=kt(h)+I,i.rotationX=kt(l)+I,i.rotationY=kt(d)+I,i.skewX=c+I,i.skewY=u+I,i.transformPerspective=p+G,(i.zOrigin=parseFloat(N.split(" ")[2])||!e&&i.zOrigin||0)&&(B[gn]=Xn(N)),i.xOffset=i.yOffset=0,i.force3D=D.force3D,i.renderTransform=i.svg?Kn:Xi?Zn:Un,i.uncache=0,i},Xn=function(t){return(t=t.split(" "))[0]+" "+t[1]},$n=function(t,e,i){var n=ce(e);return kt(parseFloat(e)+parseFloat(Fn(t,"x",i+"px",n)))+n},Un=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Zn(t,e)},qn="0deg",Jn="0px",Qn=") ",Zn=function(t,e){var i=e||this,n=i.xPercent,r=i.yPercent,s=i.x,a=i.y,o=i.z,h=i.rotation,l=i.rotationY,d=i.rotationX,c=i.skewX,u=i.skewY,p=i.scaleX,m=i.scaleY,g=i.transformPerspective,f=i.force3D,_=i.target,v=i.zOrigin,y="",b="auto"===f&&t&&1!==t||!0===f;if(v&&(d!==qn||l!==qn)){var w,A=parseFloat(l)*qi,x=Math.sin(A),M=Math.cos(A);A=parseFloat(d)*qi,w=Math.cos(A),s=$n(_,s,x*w*-v),a=$n(_,a,-Math.sin(A)*-v),o=$n(_,o,M*w*-v+v)}g!==Jn&&(y+="perspective("+g+Qn),(n||r)&&(y+="translate("+n+"%, "+r+"%) "),(b||s!==Jn||a!==Jn||o!==Jn)&&(y+=o!==Jn||b?"translate3d("+s+", "+a+", "+o+") ":"translate("+s+", "+a+Qn),h!==qn&&(y+="rotate("+h+Qn),l!==qn&&(y+="rotateY("+l+Qn),d!==qn&&(y+="rotateX("+d+Qn),c===qn&&u===qn||(y+="skew("+c+", "+u+Qn),1===p&&1===m||(y+="scale("+p+", "+m+Qn),_.style[mn]=y||"translate(0, 0)"},Kn=function(t,e){var i,n,r,s,a,o=e||this,h=o.xPercent,l=o.yPercent,d=o.x,c=o.y,u=o.rotation,p=o.skewX,m=o.skewY,g=o.scaleX,f=o.scaleY,_=o.target,v=o.xOrigin,y=o.yOrigin,b=o.xOffset,w=o.yOffset,A=o.forceCSS,x=parseFloat(d),M=parseFloat(c);u=parseFloat(u),p=parseFloat(p),(m=parseFloat(m))&&(p+=m=parseFloat(m),u+=m),u||p?(u*=qi,p*=qi,i=Math.cos(u)*g,n=Math.sin(u)*g,r=Math.sin(u-p)*-f,s=Math.cos(u-p)*f,p&&(m*=qi,a=Math.tan(p-m),r*=a=Math.sqrt(1+a*a),s*=a,m&&(a=Math.tan(m),i*=a=Math.sqrt(1+a*a),n*=a)),i=kt(i),n=kt(n),r=kt(r),s=kt(s)):(i=g,s=f,n=r=0),(x&&!~(d+"").indexOf("px")||M&&!~(c+"").indexOf("px"))&&(x=Fn(_,"x",d,"px"),M=Fn(_,"y",c,"px")),(v||y||b||w)&&(x=kt(x+v-(v*i+y*r)+b),M=kt(M+y-(v*n+y*s)+w)),(h||l)&&(a=_.getBBox(),x=kt(x+h/100*a.width),M=kt(M+l/100*a.height)),a="matrix("+i+","+n+","+r+","+s+","+x+","+M+")",_.setAttribute("transform",a),A&&(_.style[mn]=a)},tr=function(t,e,i,n,r){var s,a,o=360,h=W(r),l=parseFloat(r)*(h&&~r.indexOf("rad")?Ui:1)-n,d=n+l+"deg";return h&&("short"===(s=r.split("_")[1])&&(l%=o)!==l%180&&(l+=l<0?o:-360),"cw"===s&&l<0?l=(l+36e9)%o-~~(l/o)*o:"ccw"===s&&l>0&&(l=(l-36e9)%o-~~(l/o)*o)),t._pt=a=new Ci(t._pt,e,i,n,l,nn),a.e=d,a.u="deg",t._props.push(i),a},er=function(t,e){for(var i in e)t[i]=e[i];return t},ir=function(t,e,i){var n,r,s,a,o,h,l,d=er({},i._gsap),c=i.style;for(r in d.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),c[mn]=e,n=Yn(i,1),Tn(i,mn),i.setAttribute("transform",s)):(s=getComputedStyle(i)[mn],c[mn]=e,n=Yn(i,1),c[mn]=s),$i)(s=d[r])!==(a=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(o=ce(s)!==(l=ce(a))?Fn(i,r,s,l):parseFloat(s),h=parseFloat(a),t._pt=new Ci(t._pt,n,r,o,h-o,en),t._pt.u=l||0,t._props.push(r));er(n,d)};St("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",r="Bottom",s="Left",a=(e<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return e<2?t+i:"border"+i+t}));Gn[e>1?"border"+t:t]=function(t,e,i,n,r){var s,o;if(arguments.length<4)return s=a.map((function(e){return Dn(t,e,i)})),5===(o=s.join(" ")).split(s[0]).length?s[0]:o;s=(n+"").split(" "),o={},a.forEach((function(t,e){return o[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,o,r)}}));var nr,rr,sr,ar={name:"css",register:Mn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,n,r){var s,a,o,h,l,d,c,u,p,m,g,f,_,v,y,b,w,A,x,M,C=this._props,E=t.style,S=i.vars.startAt;for(c in Vi||Mn(),this.styles=this.styles||yn(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(a=e[c],!yt[c]||!si(c,e,i,n,t,r)))if(l=typeof a,d=Gn[c],"function"===l&&(l=typeof(a=a.call(i,n,t,r))),"string"===l&&~a.indexOf("random(")&&(a=xe(a)),d)d(this,t,c,a,i)&&(y=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),a+="",Be.lastIndex=0,Be.test(s)||(u=ce(s),p=ce(a)),p?u!==p&&(s=Fn(t,c,s,p)+p):u&&(a+=u),this.add(E,"setProperty",s,a,n,r,0,0,c),C.push(c),b.push(c,0,E[c]);else if("undefined"!==l){if(S&&c in S?(s="function"==typeof S[c]?S[c].call(i,n,t,r):S[c],W(s)&&~s.indexOf("random(")&&(s=xe(s)),ce(s+"")||"auto"===s||(s+=D.units[c]||ce(Dn(t,c))||""),"="===(s+"").charAt(1)&&(s=Dn(t,c))):s=Dn(t,c),h=parseFloat(s),(m="string"===l&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),o=parseFloat(a),c in tn&&("autoAlpha"===c&&(1===h&&"hidden"===Dn(t,"visibility")&&o&&(h=0),b.push("visibility",0,E.visibility),Ln(this,E,"visibility",h?"inherit":"hidden",o?"inherit":"hidden",!o)),"scale"!==c&&"transform"!==c&&~(c=tn[c]).indexOf(",")&&(c=c.split(",")[0])),g=c in $i)if(this.styles.save(c),f||((_=t._gsap).renderTransform&&!e.parseTransform||Yn(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(f=this._pt=new Ci(this._pt,E,mn,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===c)this._pt=new Ci(this._pt,_,"scaleY",_.scaleY,(m?Lt(_.scaleY,m+o):o)-_.scaleY||0,en),this._pt.u=0,C.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gn,0,E[gn]),A=void 0,x=void 0,M=void 0,A=(w=a).split(" "),x=A[0],M=A[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==M&&"right"!==M||(w=x,x=M,M=w),A[0]=Bn[x]||x,A[1]=Bn[M]||M,a=A.join(" "),_.svg?Wn(t,a,0,v,0,this):((p=parseFloat(a.split(" ")[2])||0)!==_.zOrigin&&Ln(this,_,"zOrigin",_.zOrigin,p),Ln(this,E,c,Xn(s),Xn(a)));continue}if("svgOrigin"===c){Wn(t,a,1,v,0,this);continue}if(c in Hn){tr(this,_,c,h,m?Lt(h,m+a):a);continue}if("smoothOrigin"===c){Ln(this,_,"smooth",_.smooth,a);continue}if("force3D"===c){_[c]=a;continue}if("transform"===c){ir(this,a,t);continue}}else c in E||(c=xn(c)||c);if(g||(o||0===o)&&(h||0===h)&&!Ki.test(a)&&c in E)o||(o=0),(u=(s+"").substr((h+"").length))!==(p=ce(a)||(c in D.units?D.units[c]:u))&&(h=Fn(t,c,s,p)),this._pt=new Ci(this._pt,g?_:E,c,h,(m?Lt(h,m+o):o)-h,g||"px"!==p&&"zIndex"!==c||!1===e.autoRound?en:sn),this._pt.u=p||0,u!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=rn);else if(c in E)Pn.call(this,t,c,s,m?m+a:a);else if(c in t)this.add(t,c,s||t[c],m?m+a:a,n,r);else if("parseTransform"!==c)continue;g||(c in E?b.push(c,0,E[c]):b.push(c,1,s||t[c])),C.push(c)}y&&Mi(this)},render:function(t,e){if(e.tween._time||!Yi())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:Dn,aliases:tn,getSetter:function(t,e,i){var n=tn[e];return n&&n.indexOf(",")<0&&(e=n),e in $i&&e!==gn&&(t._gsap.x||Dn(t,"x"))?i&&Wi===i?"scale"===e?cn:dn:(Wi=i||{})&&("scale"===e?un:pn):t.style&&!$(t.style[e])?hn:~e.indexOf("-")?ln:fi(t,e)},core:{_removeProperty:Tn,_getMatrix:jn}};Gi.utils.checkPrefix=xn,Gi.core.getStyleSaver=yn,sr=St((nr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(rr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){$i[t]=1})),St(rr,(function(t){D.units[t]="deg",Hn[t]=1})),tn[sr[13]]=nr+","+rr,St("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");tn[e[1]]=sr[e[0]]})),St("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){D.units[t]="px"})),Gi.registerPlugin(ar);var or=Gi.registerPlugin(ar)||Gi;or.core.Tween;class hr{constructor(t,e,i,n,r="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),hr.nextNameID=hr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++hr.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(t=>t.stopPropagation())),this.domElement.addEventListener("keyup",(t=>t.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class lr extends hr{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function dr(t){let e,i;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!i&&"#"+i}const cr={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:dr,toHexString:dr},ur={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},pr={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,e,i=1){const n=ur.fromHexString(t);e[0]=(n>>16&255)/255*i,e[1]=(n>>8&255)/255*i,e[2]=(255&n)/255*i},toHexString:([t,e,i],n=1)=>ur.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},mr={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,e,i=1){const n=ur.fromHexString(t);e.r=(n>>16&255)/255*i,e.g=(n>>8&255)/255*i,e.b=(255&n)/255*i},toHexString:({r:t,g:e,b:i},n=1)=>ur.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},gr=[cr,ur,pr,mr];class fr extends hr{constructor(t,e,i,n){var r;super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,gr.find((t=>t.match(r)))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const t=dr(this.$text.value);t&&this._setValueFromHexString(t)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class _r extends hr{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class vr extends hr{constructor(t,e,i,n,r,s){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(r);const a=void 0!==s;this.step(a?s:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const e=parseFloat(this.$input.value);isNaN(e)||(this._snapClampSetValue(e+t),this.$input.value=this.getValue())};let e,i,n,r,s,a=!1;const o=t=>{if(a){const n=t.clientX-e,r=t.clientY-i;Math.abs(r)>5?(t.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>5&&h()}if(!a){const e=t.clientY-n;s-=e*this._step*this._arrowKeyMultiplier(t),r+s>this._max?s=this._max-r:r+s<this._min&&(s=this._min-r),this._snapClampSetValue(r+s)}n=t.clientY},h=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",h)};this.$input.addEventListener("input",(()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.key&&this.$input.blur(),"ArrowUp"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e))),"ArrowDown"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e)*-1))})),this.$input.addEventListener("wheel",(e=>{this._inputFocused&&(e.preventDefault(),t(this._step*this._normalizeMouseWheel(e)))}),{passive:!1}),this.$input.addEventListener("mousedown",(t=>{e=t.clientX,i=n=t.clientY,a=!0,r=this.getValue(),s=0,window.addEventListener("mousemove",o),window.addEventListener("mouseup",h)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const e=this.$slider.getBoundingClientRect();let i=((t,e,i,n,r)=>(t-e)/(i-e)*(r-n)+n)(t,e.left,e.right,this._min,this._max);this._snapClampSetValue(i)},e=e=>{t(e.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};let n,r,s=!1;const a=e=>{e.preventDefault(),this._setDraggingStyle(!0),t(e.touches[0].clientX),s=!1},o=e=>{if(s){const t=e.touches[0].clientX-n,i=e.touches[0].clientY-r;Math.abs(t)>Math.abs(i)?a(e):(window.removeEventListener("touchmove",o),window.removeEventListener("touchend",h))}else e.preventDefault(),t(e.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",o),window.removeEventListener("touchend",h)},l=this._callOnFinishChange.bind(this);let d;this.$slider.addEventListener("mousedown",(n=>{this._setDraggingStyle(!0),t(n.clientX),window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)})),this.$slider.addEventListener("touchstart",(t=>{t.touches.length>1||(this._hasScrollBar?(n=t.touches[0].clientX,r=t.touches[0].clientY,s=!0):a(t),window.addEventListener("touchmove",o,{passive:!1}),window.addEventListener("touchend",h))}),{passive:!1}),this.$slider.addEventListener("wheel",(t=>{if(Math.abs(t.deltaX)<Math.abs(t.deltaY)&&this._hasScrollBar)return;t.preventDefault();const e=this._normalizeMouseWheel(t)*this._step;this._snapClampSetValue(this.getValue()+e),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(l,400)}),{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10);return e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class yr extends hr{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((t=>{const e=document.createElement("option");e.textContent=t,this.$select.appendChild(e)})),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}class br extends hr{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let wr=!1;class Ar{constructor({parent:t,autoPlace:e=void 0===t,container:i,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:a=!0,touchStyles:o=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),o&&this.domElement.classList.add("allow-touch-styles"),!wr&&a&&(!function(t){const e=document.createElement("style");e.innerHTML=t;const i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),wr=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,e,i,n,r){if(Object(i)===i)return new yr(this,t,e,i);switch(typeof t[e]){case"number":return new vr(this,t,e,i,n,r);case"boolean":return new lr(this,t,e);case"string":return new br(this,t,e);case"function":return new _r(this,t,e)}}addColor(t,e,i=1){return new fr(this,t,e,i)}addFolder(t){const e=new Ar({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach((e=>{e instanceof _r||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((e=>{e._title in t.folders&&e.load(t.folders[e._title])})),this}save(t=!0){const e={controllers:{},folders:{}};return this.controllers.forEach((t=>{if(!(t instanceof _r)){if(t._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((t=>{if(t._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);e.folders[t._title]=t.save()})),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");const i=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame((()=>{this.$children.style.height=n+"px"}))})),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach((t=>t.reset())),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((t=>t.destroy()))}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach((e=>{t=t.concat(e.controllersRecursive())})),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach((e=>{t=t.concat(e.foldersRecursive())})),t}}var xr,Mr={exports:{}};Mr.exports=(xr=function(){function t(t){return n.appendChild(t.dom),t}function e(t){for(var e=0;e<n.children.length;e++)n.children[e].style.display=e===t?"block":"none";i=t}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(t){t.preventDefault(),e(++i%n.children.length)}),!1);var r=(performance||Date).now(),s=r,a=0,o=t(new xr.Panel("FPS","#0ff","#002")),h=t(new xr.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=t(new xr.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){r=(performance||Date).now()},end:function(){a++;var t=(performance||Date).now();if(h.update(t-r,200),t>s+1e3&&(o.update(1e3*a/(t-s),100),s=t,a=0,l)){var e=performance.memory;l.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function(){r=this.end()},domElement:n,setMode:e}},xr.Panel=function(t,e,i){var n=1/0,r=0,s=Math.round,a=s(window.devicePixelRatio||1),o=80*a,h=48*a,l=3*a,d=2*a,c=3*a,u=15*a,p=74*a,m=30*a,g=document.createElement("canvas");g.width=o,g.height=h,g.style.cssText="width:80px;height:48px";var f=g.getContext("2d");return f.font="bold "+9*a+"px Helvetica,Arial,sans-serif",f.textBaseline="top",f.fillStyle=i,f.fillRect(0,0,o,h),f.fillStyle=e,f.fillText(t,l,d),f.fillRect(c,u,p,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(c,u,p,m),{dom:g,update:function(h,_){n=Math.min(n,h),r=Math.max(r,h),f.fillStyle=i,f.globalAlpha=1,f.fillRect(0,0,o,u),f.fillStyle=e,f.fillText(s(h)+" "+t+" ("+s(n)+"-"+s(r)+")",l,d),f.drawImage(g,c+a,u,p-a,m,c,u,p-a,m),f.fillRect(c+p-a,u,a,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(c+p-a,u,a,s((1-h/_)*m))}}},xr);var Cr=a(Mr.exports);class Er{gui;scene;mixer;clips=[];gridHelper;helpers=[];stats;orbitControls;flyControls;memoryIntervalId;constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.scene=t,this.mixer=e,this.clips=i,this.orbitControls=n.orbitControls,this.flyControls=n.flyControls,this.gui=new Ar({width:300}),this.addSceneFolder(),this.addLightsFolder(),this.addCamerasFolder(),this.addModelsFolder(),this.addAnimationsFolder(),this.addDisplayFolder(),this.addControlsFolder(),this.addPerformanceFolder()}addSceneFolder(){const e=this.gui.addFolder("Scene");e.close();const i={background:this.scene.background?.getHex?.()??0};e.addColor(i,"background").onChange((e=>{this.scene.background=new t.Color(e)})),this.scene.fog instanceof t.Fog&&(e.add(this.scene.fog,"near",.1,50).name("Fog Near"),e.add(this.scene.fog,"far",1,200).name("Fog Far"))}addLightsFolder(){const e=[];if(this.scene.traverse((t=>{t.isLight&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Lights");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(`${e.type} ${e.name||n}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");if(r.add({helper:!1},"helper").onChange((i=>{if(i){let i=null;e instanceof t.PointLight&&(i=new t.PointLightHelper(e)),e instanceof t.SpotLight&&(i=new t.SpotLightHelper(e)),e instanceof t.DirectionalLight&&(i=new t.DirectionalLightHelper(e)),e instanceof t.HemisphereLight&&(i=new t.HemisphereLightHelper(e,5)),i&&(this.scene.add(i),this.helpers.push(i))}else{const t=this.helpers.find((t=>t.light===e));t&&(this.scene.remove(t),this.helpers=this.helpers.filter((e=>e!==t)))}})),"intensity"in e&&r.add(e,"intensity",0,10,.01),"color"in e){const t={color:e.color.getHex()};r.addColor(t,"color").onChange((t=>{e.color.setHex(t)}))}"position"in e&&(r.add(e.position,"x",-50,50,.1),r.add(e.position,"y",-50,50,.1),r.add(e.position,"z",-50,50,.1))}))}addCamerasFolder(){const e=[];if(this.scene.traverse((t=>{t.isCamera&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Cameras");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Camera ${n+1}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.CameraHelper(e);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.CameraHelper&&i.camera===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e instanceof t.PerspectiveCamera&&(r.add(e,"fov",10,100).onChange((()=>e.updateProjectionMatrix())),r.add(e,"near",.1,10).onChange((()=>e.updateProjectionMatrix())),r.add(e,"far",10,2e3).onChange((()=>e.updateProjectionMatrix()))),e instanceof t.OrthographicCamera&&r.add(e,"zoom",.1,10).onChange((()=>e.updateProjectionMatrix()))}))}addModelsFolder(){const e=[];if(this.scene.traverse((t=>{t.isMesh&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Models");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Mesh ${n+1}`);r.close(),r.add(e.position,"x",-10,10,.1),r.add(e.position,"y",-10,10,.1),r.add(e.position,"z",-10,10,.1),r.add(e.rotation,"x",-Math.PI,Math.PI,.01),r.add(e.rotation,"y",-Math.PI,Math.PI,.01),r.add(e.rotation,"z",-Math.PI,Math.PI,.01),r.add(e.scale,"x",.1,10,.1),r.add(e.scale,"y",.1,10,.1),r.add(e.scale,"z",.1,10,.1);if(r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.BoxHelper(e,16711680);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.BoxHelper&&i.object===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e.morphTargetInfluences&&e.morphTargetDictionary){const t=r.addFolder("Morph Targets");Object.keys(e.morphTargetDictionary).forEach((i=>{const n=e.morphTargetDictionary[i];t.add(e.morphTargetInfluences,n,0,1,.01).name(i).listen()}))}}))}addAnimationsFolder(){if(!this.mixer||0===this.clips.length)return;const t=this.gui.addFolder("Animations");t.close();const e={};this.clips.forEach((t=>{e[t.name]=this.mixer.clipAction(t)}));const i={};Object.keys(e).forEach((n=>{i[n]=!1,t.add(i,n).listen().onChange((t=>{t?e[n].reset().play():e[n].stop()}))})),t.add({stopAll:()=>Object.values(e).forEach((t=>t.stop()))},"stopAll").name("Stop All")}addDisplayFolder(){const e=this.gui.addFolder("Display");e.close();const i={autoRotate:!!this.orbitControls&&this.orbitControls.autoRotate,wireframe:!1,grid:!1,skeleton:!1};this.orbitControls&&e.add(i,"autoRotate").onChange((t=>{this.orbitControls.autoRotate=t})),e.add(i,"grid").onChange((e=>{e?(this.gridHelper=new t.GridHelper(50,50),this.scene.add(this.gridHelper),this.helpers.push(this.gridHelper)):this.gridHelper&&(this.scene.remove(this.gridHelper),this.helpers=this.helpers.filter((t=>t!==this.gridHelper)))})),e.add(i,"wireframe").onChange((t=>{this.scene.traverse((e=>{if(e.isMesh){const i=e;Array.isArray(i.material)?i.material.forEach((e=>{"wireframe"in e&&(e.wireframe=t)})):"wireframe"in i.material&&(i.material.wireframe=t)}}))})),e.add(i,"skeleton").onChange((e=>{this.scene.traverse((i=>{if(i.isSkinnedMesh)if(e){const e=new t.SkeletonHelper(i);this.scene.add(e),this.helpers.push(e)}else{const e=this.helpers.find((e=>e instanceof t.SkeletonHelper&&e.root===i));e&&(this.scene.remove(e),this.helpers=this.helpers.filter((t=>t!==e)))}}))}))}addControlsFolder(){const t=this.gui.addFolder("Controls");t.close();const e={orbitControls:!!this.orbitControls,flyControls:!!this.flyControls};t.add(e,"orbitControls").listen().onChange((t=>{this.orbitControls&&(this.orbitControls.enabled=t)})),t.add(e,"flyControls").listen().onChange((t=>{this.flyControls&&(this.flyControls.enabled=t)}))}addPerformanceFolder(){this.stats=new Cr,this.stats.showPanel(0),document.body.appendChild(this.stats.dom);const t=this.gui.addFolder("Performance");t.close();const e={fps:"0",memory:"0 MB"},i=t.add(e,"fps").name("FPS").listen(),n=t.add(e,"memory").name("Memory").listen();this.memoryIntervalId=setInterval((()=>{performance.memory&&(e.memory=`${Math.round(performance.memory.usedJSHeapSize/1048576)} MB`)}),1e3),this.update=()=>{this.stats&&this.stats.update(),e.fps=this.stats?this.stats.dom.innerText.split("\n")[0]:"0",i.updateDisplay(),n.updateDisplay()}}update(){this.stats&&this.stats.update()}dispose(){this.memoryIntervalId&&(clearInterval(this.memoryIntervalId),this.memoryIntervalId=void 0),this.gui.destroy(),this.helpers.forEach((t=>this.scene.remove(t))),this.helpers=[],this.stats&&this.stats.dom.parentElement&&document.body.removeChild(this.stats.dom)}exportScene(){return{lights:this.scene.children.filter((t=>t.isLight)).map((t=>t.toJSON())),cameras:this.scene.children.filter((t=>t.isCamera)).map((t=>t.toJSON())),scene:this.scene.toJSON()}}getGUI(){return this.gui}}class Sr{config;_container;characterGroup;lightGroup;state;objectLoader=new t.ObjectLoader;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;isNotRender=!1;constructor(t){this.config=t.config,this._container=t.container,this.characterGroup=t.characterGroup,this.lightGroup=t.lightGroup,this.state=t.state}setConfig(t){this.config=t}setContainerRef(t){this._container=t}setGroups(t,e){this.characterGroup=t,this.lightGroup=e}getSnapshot(){return{container:this.container,scene:this.scene,camera:this.camera,renderer:this.renderer,controls:this.controls,width:this.width,height:this.height,isNotRender:this.isNotRender}}init(){if(this.resolveContainer(),!this.container)return;this.container.innerHTML="",this.syncContainerSize();const{scene:e,camera:i}=this.loadScene(this.config.scene);this.scene=e||new t.Scene,this.camera=this.loadCamera()||i||this.createDefaultCamera(),this.renderer=this.createRenderer(),this.setupRenderer(),this.setupGridHelper(),this.initLights(this.config.lights||[])}resolveContainer(){if(!this._container)return this.isNotRender=!0,void(this.container=null);this.isNotRender=!1,this.container="string"==typeof this._container?document.getElementById(this._container):this._container}handleResize(){this.resolveContainer(),this.container&&this.camera&&this.renderer&&(this.syncContainerSize(),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height))}createDefaultCamera(){const e="number"==typeof this.config.camera?.fov?this.config.camera.fov:45;return new t.PerspectiveCamera(e,this.width/this.height,.1,2e3)}createRenderer(){const e=new t.WebGLRenderer({antialias:!0,alpha:!0});return e.outputColorSpace=t.SRGBColorSpace,e.toneMapping=t.ACESFilmicToneMapping,e.toneMappingExposure=1,e}updateLight(){this.lightGroup.children.forEach((t=>{t.target&&(t.target.position.copy(this.characterGroup.position),t.updateMatrixWorld(!0))}))}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.scene&&(this.scene.add(this.lightGroup),t.forEach((t=>{if(t.metadata){const e=this.objectLoader.parse(t);this.lightGroup.add(e)}else this.setLight(t)})))}loadCamera(e){if(!e)return this.createDefaultCamera();if(e.metadata){const i=this.objectLoader.parse(e);return i instanceof t.PerspectiveCamera?i:void 0}return this.camera||(this.camera=this.createDefaultCamera()),this.setCamera(this.camera,e),this.camera}loadScene(e){if(!e)return{};const i=this.objectLoader.parse(e);let n;return i.traverse((e=>{e instanceof t.PerspectiveCamera&&(n=e)})),{scene:i,camera:n}}degree2Euler(e){return e.map((e=>t.MathUtils.degToRad(e)))}dataToMatrix4(e){const i=[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]],n=new t.Matrix4;return n.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]),n}setLight(e){const i=t=>{this.lightGroup.add(t)};switch(e.type){case"AmbientLight":{const n=e,r=new t.AmbientLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}case"DirectionalLight":{const n=e,r=new t.DirectionalLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position);r.castShadow=n.castShadow??!1,i(r);break}case"SpotLight":{const n=e,r=new t.SpotLight(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);if(r.target=this.characterGroup,n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}n.up&&r.up.set(...n.up),n.shadow&&(r.castShadow=n.castShadow??!0,n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.assign(r.shadow.camera,n.shadow.camera)),i(r);break}case"PointLight":{const n=e,r=new t.PointLight(n.color,n.intensity,n.distance,n.decay);if(r.castShadow=n.castShadow??!1,n.castShadow&&(r.receiveShadow=!0),n.shadow&&(n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.keys(n.shadow.camera).forEach((t=>{r.shadow.camera[t]=n.shadow.camera[t]}))),n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale);i(r);break}case"RectAreaLight":{const n=e,r=new t.RectAreaLight(n.color,n.intensity,n.width,n.height);r.position.set(5,5,0),n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale),i(r);break}case"HemisphereLight":{const n=e,r=new t.HemisphereLight(n.color??n.skyColor,n.groundColor,n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}}}setAngleView(e){var i=this;let{camera:n}=e;if(!this.camera)return;n.matrix&&function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=i.dataToMatrix4(e),s=new t.Vector3,a=new t.Quaternion,o=new t.Vector3;r.decompose(s,a,o),or.to(i.camera.position,{x:s.x,y:s.y,z:s.z,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),or.to(i.camera.quaternion,{x:a.x,y:a.y,z:a.z,w:a.w,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),or.to(i.characterGroup.rotation,{x:0,y:0,z:0,duration:n,ease:"power2.inOut"})}(n.matrix,n.duration)}initOrbitControls(){if(this.config.orbitControls||(this.config.orbitControls={}),this.camera&&this.renderer&&!1!==this.config.orbitControls.useOrbitControl)if(this.controls=new h(this.camera,this.renderer.domElement),this.controls.enableZoom=this.config.orbitControls.enableZoom||!0,this.controls.enablePan=this.config.orbitControls.enablePan||!0,void 0!==this.config.orbitControls.minPolarAngle&&(this.controls.minPolarAngle=this.config.orbitControls.minPolarAngle),void 0!==this.config.orbitControls.maxPolarAngle&&(this.controls.maxPolarAngle=this.config.orbitControls.maxPolarAngle),void 0!==this.config.orbitControls.minAzimuthAngle&&(this.controls.minAzimuthAngle=this.config.orbitControls.minAzimuthAngle),void 0!==this.config.orbitControls.maxAzimuthAngle&&(this.controls.maxAzimuthAngle=this.config.orbitControls.maxAzimuthAngle),this.controls.minDistance=this.config.orbitControls.minDistance||1,this.controls.maxDistance=this.config.orbitControls.maxDistance||10,this.config.orbitControls.target)this.controls.target.fromArray(this.config.orbitControls.target);else{const e=(new t.Box3).setFromObject(this.characterGroup),i=new t.Vector3;e.getCenter(i),this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.controls.target.set(i.x,i.y+.5,i.z)}}setCamera(t,e){if(!t)return;const{position:i,rotation:n,matrix:r,fov:s}=e;if(this.state.updateCamera=!0,s&&(t.fov=s),r){const e=this.dataToMatrix4(r);t.matrixAutoUpdate=!1,t.matrix.copy(e),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.matrixAutoUpdate=!0}else i&&t.position.set(...i),n&&t.rotation.set(...this.degree2Euler(n));this.state.updateCamera=!1}syncContainerSize(){this.container&&(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight)}setupRenderer(){this.renderer&&this.container&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setClearColor(0,0),this.container.appendChild(this.renderer.domElement))}setupGridHelper(){if(!this.config.gridHelper)return;const{size:e=10,divisions:i=10,color1:n="",color2:r=""}=this.config.gridHelper,s=new t.GridHelper(e,i,n,r);this.characterGroup.add(s)}}class kr{config;container;characterGroup;state;getAnimationFrameId;constructor(t){this.config=t.config,this.container=t.container,this.characterGroup=t.characterGroup,this.state=t.state,this.getAnimationFrameId=t.getAnimationFrameId}setConfig(t){this.config=t}setContainer(t){this.container=t}setCharacterGroup(t){this.characterGroup=t}registerListeners(){this.container&&this.config.model?.rotate&&!1===this.config.orbitControls?.useOrbitControl&&(this.container.addEventListener("mousedown",this.mousedown),this.container.addEventListener("mouseup",this.mouseup),this.container.addEventListener("mousemove",this.mousemove),this.container.addEventListener("touchstart",this.mousedown),this.container.addEventListener("touchend",this.mouseup),this.container.addEventListener("touchmove",this.mousemove))}removeEventListeners(){this.container&&(this.container.removeEventListener("mousedown",this.mousedown),this.container.removeEventListener("mouseup",this.mouseup),this.container.removeEventListener("mousemove",this.mousemove),this.container.removeEventListener("touchstart",this.mousedown),this.container.removeEventListener("touchend",this.mouseup),this.container.removeEventListener("touchmove",this.mousemove))}mousedown=t=>{this.state.isMouseDown=!0;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY),this.state.previousMousePosition={x:e,y:i}};mouseup=()=>{this.state.isMouseDown=!1,this.state.previousMousePosition={x:0,y:0}};mousemove=t=>{if(!this.state.isMouseDown||!this.getAnimationFrameId())return;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY);const n=e-this.state.previousMousePosition.x,r=i-this.state.previousMousePosition.y;this.characterGroup.rotation.y+=.01*n;const s=this.characterGroup.rotation.x+.01*r;if(r>0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.minPolarAngle&&this.config.orbitControls.minPolarAngle>=0){const t=Math.min(1*this.config.orbitControls.minPolarAngle,Math.PI);Math.PI/2-s>=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.min(s,Math.PI/2);else if(r<0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.maxPolarAngle&&this.config.orbitControls.maxPolarAngle>=0){const t=1*this.config.orbitControls.maxPolarAngle;Math.PI/2-s<=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.max(s,-Math.PI/2);this.state.previousMousePosition={x:e,y:i}}}class Tr{scene=null;camera=null;renderer=null;width=1;height=1;bgScene=null;bgCamera=null;videoElement=null;videoTexture=null;videoMesh=null;setRuntimeRefs(t){let{scene:e,camera:i,renderer:n,width:r,height:s}=t;this.scene=e,this.camera=i,this.renderer=n,this.width=r,this.height=s,this.videoMesh&&this.videoTexture&&this.updateVideoMesh()}renderBackground(){this.bgScene&&this.bgCamera&&this.renderer&&(this.renderer.autoClear=!1,this.renderer.clear(),this.renderer.render(this.bgScene,this.bgCamera))}prepareFrame(){this.videoMesh&&this.updateVideoMesh()}setBackground(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!this.scene)return;(new l).load(e,(e=>{e.mapping=t.EquirectangularReflectionMapping,this.scene&&(this.scene.background=e,this.scene.environment=e)}))}setVideoBackground(e){if(!this.scene||!this.camera)return;const i=document.createElement("video");i.crossOrigin="anonymous",i.src=e,i.loop=!0,i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.play();const n=new t.VideoTexture(i);n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter;const r=new t.PlaneGeometry(1,1),s=new t.MeshBasicMaterial({map:n}),a=new t.Mesh(r,s);this.videoElement=i,this.videoTexture=n,this.videoMesh=a,this.scene.add(a),this.updateVideoMesh()}loadCubeBackground(e){if(0===e.length)return;if(1===e.length)return void this.loadSingleBackground(e[0]);if(6!==e.length)return;const i=(new t.CubeTextureLoader).load(e);this.scene&&(this.scene.background=i)}updateBackgroundSize(t,e){if(!(this.bgScene&&this.bgCamera&&this.renderer&&t.image))return;this.renderer.setSize(this.width,this.height);const i=t.image.width/t.image.height,n=this.width/this.height,r=e.material;if(n>i){const t=n/i;r.map?.repeat.set(1,1/t),r.map?.offset.set(0,0)}else{const t=i/n;r.map?.repeat.set(1/t,1),r.map?.offset.set((1-1/t)/2,0)}e.scale.set(1,1,1),r.map&&(r.map.needsUpdate=!0)}setBackgroundColorOrGradient(e){this.scene&&(e.startsWith("linear-gradient")?this.setGradientBackground(e):this.scene.background=new t.Color(e))}destroy(){this.videoMesh&&this.scene&&this.scene.remove(this.videoMesh),this.videoMesh?.geometry&&this.videoMesh.geometry.dispose();const t=this.videoMesh?.material;t?.dispose(),this.videoTexture?.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.videoElement=null,this.videoTexture=null,this.videoMesh=null,this.bgScene=null,this.bgCamera=null}loadSingleBackground(e){const i=new t.TextureLoader;this.bgScene=new t.Scene,this.bgCamera=new t.OrthographicCamera(-1,1,1,-1,0,1),i.load(e,(e=>{e.colorSpace=t.SRGBColorSpace;const i=new t.MeshBasicMaterial({map:e,depthTest:!1,depthWrite:!1,transparent:!1,side:t.DoubleSide}),n=new t.Mesh(new t.PlaneGeometry(2,2),i);this.bgScene.add(n),this.updateBackgroundSize(e,n)}))}setGradientBackground(e){if(!this.scene)return;const i=document.createElement("canvas");i.width=this.width,i.height=this.height;const n=i.getContext("2d");if(!n)return;const r=e.match(/linear-gradient\(([^,]+),\s*(.+)\)/);if(!r)return;const s=r[2].split(",").map((t=>t.trim())),a=n.createLinearGradient(0,0,i.width,i.height);s.forEach(((t,e)=>{a.addColorStop(e/(s.length-1),t)})),n.fillStyle=a,n.fillRect(0,0,i.width,i.height);const o=new t.CanvasTexture(i);this.scene.background=o}updateVideoMesh(){if(!this.videoMesh||!this.camera)return;const e=2*Math.tan(t.MathUtils.degToRad(this.camera.fov/2))*10,i=e*this.camera.aspect;this.videoMesh.geometry.dispose(),this.videoMesh.geometry=new t.PlaneGeometry(i,e);const n=new t.Vector3;this.camera.getWorldDirection(n),this.videoMesh.position.copy(this.camera.position).add(n.multiplyScalar(10)),this.videoMesh.lookAt(this.camera.position)}}class Lr{action;listener={};config={};constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.action=t,this.listener={},this.config=e({timeBeforeFinished:1},i)}on(t,e){this.listener[t]=e}update(t){const{loop:e,time:i,_loopCount:n,repetitions:r}=this.action;if(2201===e&&(r===1/0||r-n!=1))return;const s=this.action.getClip().duration,a=s-this.config.timeBeforeFinished,o=this.listener.beforeFinished;o&&i>=a&&i<a+t&&(Reflect.deleteProperty(this.listener,"beforeFinished"),o(this.action));const h=this.listener.finished;h&&i>=s&&i<s+t&&(Reflect.deleteProperty(this.listener,"finished"),h(this.action))}}class Or{config;emit;animationGroup=new t.AnimationObjectGroup;animations=[];actions=[];animationMixer=null;onAnimationFinishedBound=()=>{};actionDefaultMap=new Map;currentTalkAnimations=[];muteActionState=!1;actionNotifier=null;constructor(t){this.config=t.config,this.emit=t.emit}setConfig(t){this.config=t}addAnimationTarget(t){this.animationGroup.add(t)}addAnimations(t){t.forEach((t=>{this.animations.push(t),t.code.includes("_idle")?this.actionDefaultMap.has("idle")?this.actionDefaultMap.get("idle").push(t.code):this.actionDefaultMap.set("idle",[t.code]):t.code.includes("_talk")&&(this.actionDefaultMap.has("talk")?this.actionDefaultMap.get("talk").push(t.code):this.actionDefaultMap.set("talk",[t.code]))}))}initializeMixer(){this.animationMixer&&(this.animationMixer.stopAllAction(),this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound)),this.animationMixer=new t.AnimationMixer(this.animationGroup),this.actions=this.animations.map((t=>{const e=this.animationMixer.clipAction(t.animation);return{name:t.animation.name,code:t.code,action:e,animation:t.animation,type:t.type,text:t.text}})),this.onAnimationFinishedBound=this.animationFinished.bind(this),this.animationMixer.addEventListener("finished",this.onAnimationFinishedBound)}update(t){if(!this.animationMixer)return;this.animationMixer.update(t);(this.animationMixer._actions||[]).forEach((t=>{(0===t.weight||t.paused)&&t.stop()})),this.actionNotifier?.update(t)}playAction=i((()=>{var i=this;return function(n){let r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(n)){if(0===n.length)return;n.some((t=>t.includes("talk")))&&(i.currentTalkAnimations=n),r=n[Math.floor(Math.random()*n.length)]}else r=n;if(i.muteActionState&&"idle"!==r&&"talk"!==r)return;const a=e(s),o="idle"===r?i.getDefaultAniCode("idle"):"talk"===r?i.getDefaultAniCode("talk"):r,h=i.actions.find((t=>t.code===o));if(h)try{const{action:e}=h,s=i.actions.find((t=>t.action.isRunning()));if(s&&s.action===e)return;const o=r.includes("talk")&&void 0===a.loop;a.loop===t.LoopRepeat||o?e.loop=t.LoopRepeat:(e.loop=t.LoopOnce,e.clampWhenFinished=!0),a.repetitions?e.setLoop(a.loop,a.repetitions):o&&e.setLoop(t.LoopRepeat,Number.MAX_SAFE_INTEGER),e.timeScale=1;const l=a.fadeDuration||.5;s&&s.action!==e?(s.action.fadeOut(l),e.reset().fadeIn(l).play()):e.reset().fadeIn(l).play(),i.animationMixer?.update(0),i.actionNotifier=new Lr(e),i.actionNotifier.on("beforeFinished",(s=>{i.emit("action.beforeFinished",n),r.includes("talk")||e.loop!==t.LoopOnce||r.includes("idle")||setTimeout((()=>{i.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER})}),100)}))}catch(t){}}})(),50,{leading:!0});stopAllActionExcludeIdle(){}stopAllAction(){this.actions.forEach((t=>{t.action.stop(),t.action.reset()}))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.playAction("idle"),this.muteActionState=t}getModelInfo(t){const e=[],i=t=>{t.children.forEach((t=>{t.isGroup?i(t):e.push(t)}))};return i(t),{actor:t,scenes:e,animations:this.animations.map((t=>t.animation)),mixer:this.animationMixer,actions:this.actions}}getAnimations(){return this.animations}getMixer(){return this.animationMixer}destroy(){this.stopAllAction(),this.animationMixer&&(this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound),this.animationMixer=null),this.animations=[],this.actions=[],this.actionDefaultMap.clear(),this.currentTalkAnimations=[],this.actionNotifier=null,this.muteActionState=!1,this.animationGroup=new t.AnimationObjectGroup}getDefaultAniCode(t){const e=this.actionDefaultMap.get(t)||[];return 0===e.length?null:1===e.length?e[0]:e[Math.floor(Math.random()*e.length)]}animationFinished(t){const{action:e,type:i}=t;if("finished"===i&&e._clip?.name){if(e._clip.name.indexOf("idle")>=0)return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER});if(e._clip.name.indexOf("talk")>=0)return;return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER})}}}class Rr{getBody;serverShapes=[];isPlayingServerShapes=!1;mouthBlendWeight=0;constructor(t){this.getBody=t.getBody}playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.serverShapes=t,this.isPlayingServerShapes?this.mouthBlendWeight=1:(this.isPlayingServerShapes=!0,or.to(this,{mouthBlendWeight:1,duration:.15,ease:"power2.out"}))}stopServerShapes(){this.isPlayingServerShapes&&or.to(this,{mouthBlendWeight:0,duration:.3,ease:"power2.inOut",onComplete:()=>{this.isPlayingServerShapes=!1,this.serverShapes=[]}})}applyBlendShapes(){if(!this.isPlayingServerShapes||0===this.serverShapes.length)return;const t=this.getBody();Object.entries(t).forEach((t=>{let[,e]=t;if(!e.mesh||!e.mesh.morphTargetInfluences||!e.mesh.morphTargetDictionary)return;const i=e.mesh.morphTargetDictionary,{prefix:n="",suffix:r=""}=e;for(const[t,s]of Object.entries(i)){const i=t.replace(n,"").replace(r,"");if(i.includes("eyeBlink")||i.includes("eyeWide")||i.includes("eyeSquint"))continue;const a=e.mesh.morphTargetInfluences[s],o=this.getShapeIndex(i);if(o>=0&&o<this.serverShapes.length){const t=this.serverShapes[o];e.mesh.morphTargetInfluences[s]=a*(1-this.mouthBlendWeight)+t*this.mouthBlendWeight}}}))}destroy(){or.killTweensOf(this),this.serverShapes=[],this.isPlayingServerShapes=!1,this.mouthBlendWeight=0}getShapeIndex(t){return["eyeBlinkLeft","eyeLookDownLeft","eyeLookInLeft","eyeLookOutLeft","eyeLookUpLeft","eyeSquintLeft","eyeWideLeft","eyeBlinkRight","eyeLookDownRight","eyeLookInRight","eyeLookOutRight","eyeLookUpRight","eyeSquintRight","eyeWideRight","jawForward","jawLeft","jawRight","jawOpen","mouthClose","mouthFunnel","mouthPucker","mouthLeft","mouthRight","mouthSmileLeft","mouthSmileRight","mouthFrownLeft","mouthFrownRight","mouthDimpleLeft","mouthDimpleRight","mouthStretchLeft","mouthStretchRight","mouthRollLower","mouthRollUpper","mouthShrugLower","mouthShrugUpper","mouthPressLeft","mouthPressRight","mouthLowerDownLeft","mouthLowerDownRight","mouthUpperUpLeft","mouthUpperUpRight","browDownLeft","browDownRight","browInnerUp","browOuterUpLeft","browOuterUpRight","cheekPuff","cheekSquintLeft","cheekSquintRight","noseSneerLeft","noseSneerRight","tongueOut"].indexOf(t)}}class Fr{config;animationManager;getScene;getCharacterGroup;getBody;setBody;loader;ktx2Loader;model=new Map;constructor(t){this.config=t.config,this.animationManager=t.animationManager,this.getScene=t.getScene,this.getCharacterGroup=t.getCharacterGroup,this.getBody=t.getBody,this.setBody=t.setBody,this.ktx2Loader=this.createKTX2Loader(),this.loader=this.createGLTFLoader()}setConfig(t){this.config=t}detectTextureSupport(t){this.ktx2Loader.detectSupport(t)}getModelMap(){return this.model}changeBundle(t){this.loader.parse(t.buffer,"",(t=>{this.getScene()?.add(t.scene)}),(t=>{}))}loadBundles(t,e){const i=[],n={};return t.forEach((r=>{n[r.bundle]={url:r.bundle,progress:0,total:0},i.push(new Promise(((i,s)=>{this.loader.parse(r.buffer,"",(s=>{i({...r,gltf:s}),function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[i]={url:i,progress:r,total:s};let a=0,o=0;t.forEach((t=>{let{bundle:e}=t;a+=n[e].total,o+=n[e].progress}));const h=Math.floor(o/a*100);e(h)}(r.bundle,1,1)}),(t=>{s("Error loading GLB model")}))})))})),Promise.all(i).then((t=>(t.forEach((t=>this.mountRecord(t))),this.animationManager.initializeMixer(),t)))}loadGLBModel(t){(new d).load(t,(t=>{this.getScene()?.add(t.scene)}))}loadLowResTexture(e){const i=new t.TextureLoader;return new Promise((n=>{i.load(e,(e=>{e.minFilter=t.LinearFilter,e.generateMipmaps=!1,n(e)}))}))}addModel(t,e){const i=new d,n=new p;n.setDecoderPath(`${this.config.dracoPath}`),n.setDecoderConfig({type:"js"}),i.setDRACOLoader(n),i.load(e,(e=>{const i=e.scene;i.name=t,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1);const n=this.getScene();n&&(n.traverse((t=>{t.isMesh})),n.children[1]?.children[1]?.children[0]?.add(i.children[0]))}),void 0,(t=>{}))}destroyModel(t,e){const i=this.getScene();if(!i)return;const n=[];i.traverse((t=>{if(t.isMesh){-1!==t.name.toLowerCase().indexOf("cloth")&&(t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach((t=>{t&&t.isMaterial&&e(t)})):t.material&&t.material.isMaterial&&e(t.material),t.parent&&n.push(t))}})),n.forEach((t=>{t.parent?.remove(t)}));const r=t.indexOf("apose_cloth");-1!==r&&t.substring(r)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return new Promise(((i,n)=>{this.loader.load(t,(t=>i(t)),e,(t=>{n(t)}))}))}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.loadGlb(t,e).then((t=>(this.getScene()?.add(t.scene),t)))}destroy(){this.model.clear(),this.loader=null,this.ktx2Loader&&(this.ktx2Loader.dispose(),this.ktx2Loader=null)}createGLTFLoader(){const t=new d,e=new p;return e.setDecoderPath(this.config.dracoPath||"draco/"),t.setKTX2Loader(this.ktx2Loader),t.setMeshoptDecoder(u),t.setDRACOLoader(e),t}createKTX2Loader(){const t=new c;return t.setTranscoderPath("three/examples/jsm/libs/basis/"),t}cloneTrack(e,i){return new t.NumberKeyframeTrack(i,e.times.slice(),e.values.slice())}mountRecord(t){let{code:e,gltf:i,name:n,type:r}=t;if(!i)return;const s=i.scene;s.name=e,"apose"===r?this.mountAposeScene(s):"animation"!==r&&"animation_system"!==r||this.registerAnimationClips({code:e,name:n,type:r,gltf:i}),this.model.set(e,i),this.bindBodyMeshes(e,s)}mountAposeScene(e){this.getCharacterGroup()?.add(e),this.animationManager.addAnimationTarget(e),e.traverse((e=>{e.isMesh&&(e.material.side=t.DoubleSide)}))}registerAnimationClips(t){let{code:e,name:i,type:n,gltf:r}=t;r.animations.forEach((t=>{const e=t.tracks.findIndex((t=>"BS_Mod.morphTargetInfluences"===t.name));if(e>=0){const i=t.tracks[e],n=this.config.model?.body.options.find((t=>t.key.startsWith("Head_Mod"))),r=this.config.model?.body.options.find((t=>t.key.startsWith("Eyelashes_Mod")));if(n&&r){const s=this.cloneTrack(i,`${n.key}.morphTargetInfluences`),a=this.cloneTrack(i,`${r.key}.morphTargetInfluences`);t.tracks.splice(e,1),t.tracks.push(s,a)}}}));const s=r.animations.map((t=>({code:e,animation:t,type:n,text:i})));this.animationManager.addAnimations(s)}bindBodyMeshes(t,e){if(t!==this.config.model?.body.name&&!t.includes("_mesh_body"))return;const i={...this.getBody()};this.config.model?.body.options.forEach((t=>{i[t.key]={...t,mesh:e.getObjectByName(t.name)}})),this.setBody(i)}}class Dr{cleanMaterial(t){const e=t=>{["map","lightMap","bumpMap","normalMap","specularMap","envMap","aoMap","emissiveMap","metalnessMap","roughnessMap","alphaMap","displacementMap"].forEach((e=>{t[e]&&t[e].dispose()})),t.dispose()};Array.isArray(t)?t.forEach((t=>e(t))):e(t)}cleanupScene(t){t&&t.traverse((t=>{t.isMesh&&(t.geometry?.dispose(),t.material&&this.cleanMaterial(t.material))}))}}class Pr extends n{animationFrameId=0;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;depth=10;config;isNotRender=!1;clock=null;body={};characterGroup=new t.Group;lightGroup=new t.Group;state={};onWindowResizeBound=null;rotationCenter=new t.Vector3(0,0,0);_container="";gui=null;humanObj;sceneManager;interactionManager;backgroundManager;animationManager;blendShapeManager;modelRuntime;resourceCleaner;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;super(),this.humanObj=n,this.config=i,this._container=e,this.sceneManager=new Sr({config:this.config,container:this._container,characterGroup:this.characterGroup,lightGroup:this.lightGroup,state:this.state}),this.interactionManager=new kr({config:this.config,container:this.container,characterGroup:this.characterGroup,state:this.state,getAnimationFrameId:()=>this.animationFrameId}),this.backgroundManager=new Tr,this.animationManager=new Or({config:this.config,emit:(t,e)=>this.emit(t,e)}),this.blendShapeManager=new Rr({getBody:()=>this.body}),this.modelRuntime=new Fr({config:this.config,animationManager:this.animationManager,getScene:()=>this.scene,getCharacterGroup:()=>this.characterGroup,getBody:()=>this.body,setBody:t=>{this.body=t}}),this.resourceCleaner=new Dr,this.setContainer(),this.isNotRender||this.init(),this.config.debug&&(window.THREE=t)}syncSceneRuntime(){const t=this.sceneManager.getSnapshot();this.container=t.container,this.scene=t.scene,this.camera=t.camera,this.renderer=t.renderer,this.controls=t.controls,this.width=t.width,this.height=t.height,this.isNotRender=t.isNotRender,this.interactionManager.setContainer(this.container),this.interactionManager.setCharacterGroup(this.characterGroup),this.backgroundManager.setRuntimeRefs({scene:this.scene,camera:this.camera,renderer:this.renderer,width:this.width,height:this.height})}init(){this.sceneManager.setConfig(this.config),this.sceneManager.setContainerRef(this._container),this.sceneManager.setGroups(this.characterGroup,this.lightGroup),this.interactionManager.setConfig(this.config),this.interactionManager.setCharacterGroup(this.characterGroup),this.animationManager.setConfig(this.config),this.modelRuntime.setConfig(this.config),this.sceneManager.init(),this.syncSceneRuntime(),this.renderer&&(this.clock=new t.Clock,this.modelRuntime.detectTextureSupport(this.renderer),this.onWindowResizeBound=this.onWindowResize.bind(this),window.addEventListener("resize",this.onWindowResizeBound,!1))}createDefaultCamera(){return this.sceneManager.createDefaultCamera()}createRenderer(){return this.sceneManager.createRenderer()}setContainer(){this.sceneManager.setContainerRef(this._container),this.sceneManager.resolveContainer(),this.syncSceneRuntime()}updateLight(){this.sceneManager.updateLight()}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.sceneManager.initLights(t),this.syncSceneRuntime()}loadCamera(t){const e=this.sceneManager.loadCamera(t);return this.syncSceneRuntime(),e}loadScene(t){return this.sceneManager.loadScene(t)}degree2Euler(t){return this.sceneManager.degree2Euler(t)}dataToMatrix4(t){return this.sceneManager.dataToMatrix4(t)}setLight(t){this.sceneManager.setLight(t)}setAngleView(t){let{camera:e}=t;this.sceneManager.setAngleView({camera:e})}async gsapContainer(t){return new Promise((e=>this.container?t.attr?(cancelAnimationFrame(this.animationFrameId),this.container.offsetWidth,this.container.offsetHeight,void or.to(this.container,{duration:1,ease:"power2.inOut",...t.attr,onUpdate:()=>{const t=or.getProperty(this.container,"width"),e=or.getProperty(this.container,"height");this.width=parseFloat(`${t}`),this.height=parseFloat(`${e}`),this.renderer?.setSize(this.width,this.height),this.renderer?.render(this.scene,this.camera)},onComplete:()=>{this.onWindowResize(),this.animate(),e(!0)}})):void e(!1):e(!1)))}initOrbitControls(){this.sceneManager.initOrbitControls(),this.syncSceneRuntime()}setBackground(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.backgroundManager.setBackground(t)}loadGLBModel(t){this.modelRuntime.loadGLBModel(t)}loadLowResTexture(t){return this.modelRuntime.loadLowResTexture(t)}changeBundle(t){this.modelRuntime.changeBundle(t)}loadBundles(e,i){return this.modelRuntime.loadBundles(e,i).then((e=>{if(!this.isNotRender){const{scale:e,position:i,rotation:n}=this.config.model||{};e&&this.characterGroup.scale.set(...e),i&&this.characterGroup.position.set(...i),n&&this.characterGroup.rotation.set(t.MathUtils.degToRad(n[0]),t.MathUtils.degToRad(n[1]),t.MathUtils.degToRad(n[2])),this.initOrbitControls(),this.loadCamera(this.config.camera),this.onWindowResize(),this.interactionManager.registerListeners()}this.emit("core.bundles.loaded",e)})).then((()=>{const t=this.animationManager.getMixer();return this.config.debug&&t&&(this.gui=new Er(this.scene,t,this.animationManager.getAnimations().map((t=>t.animation)))),!0})).catch((t=>!1))}onWindowResize=i((()=>{this.sceneManager.handleResize(),this.syncSceneRuntime()}),300,{leading:!0});setCamera(t,e){this.sceneManager.setCamera(t,e)}animate(){if(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),!(this.clock&&this.renderer&&this.scene&&this.camera))return;const t=this.clock.getDelta();this.animationManager.update(t),this.blendShapeManager.applyBlendShapes(),this.controls?.update(),this.backgroundManager.prepareFrame(),this.backgroundManager.renderBackground(),this.renderer.render(this.scene,this.camera)}startRender(){this.characterGroup&&this.scene&&!this.animationFrameId&&(this.animationManager.getMixer()&&this.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER}),this.scene.remove(this.characterGroup),this.scene.add(this.characterGroup),this.animate())}stopRender(){this.animationFrameId&&this.characterGroup&&this.scene&&(this.scene.remove(this.characterGroup),this.animationManager.stopAllAction(),setTimeout((()=>{cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0}),100))}gsapMorph(t,e,i){const n={duration:.3,ease:"easy",onComplete:()=>{}};e.forEach(((t,e)=>{n[e]=t})),or.to(t,n)}playAction=(()=>{var t=this;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.animationManager.playAction(e,i)}})();stopAllActionExcludeIdle(){this.animationManager.stopAllActionExcludeIdle()}stopAllAction(){this.animationManager.stopAllAction()}cleanMaterial(t){this.resourceCleaner.cleanMaterial(t)}destroy(){this.isNotRender||(this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.animationManager.destroy(),this.interactionManager.removeEventListeners(),this.onWindowResizeBound&&(window.removeEventListener("resize",this.onWindowResizeBound,!1),this.onWindowResizeBound=null),this.backgroundManager.destroy(),this.blendShapeManager.destroy(),this.modelRuntime.destroy(),this.controls&&(this.controls.dispose(),this.controls=null),this.resourceCleaner.cleanupScene(this.scene),this.gui?.dispose(),this.gui=null,this.renderer?.dispose(),this.renderer?.domElement?.parentNode&&this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.clearReferences())}clearReferences(){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.body={},this.characterGroup=new t.Group,this.lightGroup=new t.Group,this.interactionManager.setCharacterGroup(this.characterGroup),this.sceneManager.setGroups(this.characterGroup,this.lightGroup)}async playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.blendShapeManager.playByShapes(t,e)}stopServerShapes(){this.blendShapeManager.stopServerShapes()}addModel(t,e){this.modelRuntime.addModel(t,e)}destoryModel(t){this.modelRuntime.destroyModel(t,(t=>this.cleanMaterial(t)))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.animationManager.muteAction(t)}getModelInfo(){return this.animationManager.getModelInfo(this.characterGroup)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.loadGlb(t,e)}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.addGlb(t,e)}setCharacterCenter(){if(!this.characterGroup)return;const e=this.characterGroup.children.find((t=>t.name.includes("body")));if(!e)return;const i=(new t.Box3).setFromObject(e).getCenter(new t.Vector3);this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.characterGroup.position.add(i)}setVideoBackground(t){this.backgroundManager.setVideoBackground(t)}loadCubeBackground(t){this.backgroundManager.loadCubeBackground(t)}updateBackgroundSize(t,e){this.backgroundManager.updateBackgroundSize(t,e)}setBackgroundColorOrGradient(t){this.backgroundManager.setBackgroundColorOrGradient(t)}}class Br{hm;animationFrameId=0;container;scene;width;height;depth=1e3;zAxisNumber;camera;renderer;sphere;parameters=[];materials=[];particles_init_postion;zprogress;zprogress_second;particles_first=[];particles_second=[];constructor(e,i){this.hm=i,this.container="string"==typeof e?document.getElementById(e):e,this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4);const n=this.height/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.max(n-this.depth/2,this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0),this.initLight(),this.particles_init_postion=-this.zAxisNumber-this.depth/2,this.zprogress=this.particles_init_postion,this.zprogress_second=2*this.particles_init_postion,this.particles_first=this.initSceneStar(this.particles_init_postion),this.particles_second=this.initSceneStar(this.zprogress_second),this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement),this.initOrbitControls(),this.animate(),this.hm.on(o.HUMAN_LOAD_PROGRESS,this.onProgress),this.initProgressBar()}initProgressBar(){const t=document.createElement("div");t.id="loadingContainer",t.className="loading-container w-full h-full bg-[#000]",t.style.width="100%",t.style.height="100%";const e=document.createElement("div");e.className="bottom-20 flex justify-center left-0 absolute w-full items-center flex-col",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column",e.style.position="absolute",e.style.left="0px",e.style.bottom="5rem",e.style.width="100%";const i=document.createElement("div");i.className="qt-progress-wrap w-3/4 h-[0.375rem] bg-[rgba(255,249,249,0.2)] rounded-1 overflow-hidden",i.style.backgroundColor="rgba(255,249,249,0.2)",i.style.height="0.375rem",i.style.width="75%",i.style.overflow="hidden",i.style.borderRadius=".25rem";const n=document.createElement("div");n.className="qt-progress w-[10%] h-[0.375rem] bg-white rounded-1",n.id="qtprogress",n.style.backgroundColor="rgb(255,255,255,1)",n.style.height="0.375rem",n.style.width="0",n.style.transition="width linear 0.3s",n.style.borderRadius=".25rem",i.appendChild(n),e.appendChild(i),t.appendChild(e);const r=document.createElement("div");r.className="text-white mt-4 text-sm",r.textContent="正在加载...",r.id="qtprogresstext",r.style.color="rgb(255,255,255,1)",r.style.fontSize="0.875rem",r.style.lineHeight="1.25rem",r.style.marginTop="1rem",e.appendChild(r),this.container.appendChild(t)}initScene(){this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4)}initCamera(){const e=this.width/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.floor(e-this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0)}initRenderer(){this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement)}initOrbitControls(){const t=new m(this.camera,this.renderer.domElement);t.enabled=!1,t.update()}animate(){this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),this.renderStarMove(),this.renderer.render(this.scene,this.camera)}initLight(){const e=new t.AmbientLight(16777215);this.scene.add(e);const i=new t.PointLight(415229,5,0);i.position.set(50,50,50),this.scene.add(i)}renderSphereRotate(){this.sphere.rotateY(.01)}initSceneStar(e){const i=new t.BufferGeometry,n=[],s=new t.TextureLoader,a=s.load("data:image/png;base64,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"),o=s.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU9JREFUOBGlk0tLQzEQRm/qFav4AKUrQXEpgv//j4jLYtWVWJ/46K2N54RMudSdHTh0msw3mWTmpmbFcs4DlhL4K9qiklNK+kszsBhC/Q3YhCFsVZ+fpoNv+Kr+D4kyfjmpqeKW/9twAEdwCDugfcAUHuEFPmFuEkWaJysewQmcwTGYTHuFOxjDBB7ApPO23tmyDVZ8CRfV7ye4YW0PtBl0aBdW4N29s2V7smKTnMMuaO8Qyd7wn+raLF7aB/POln0Kivch9vVdc88YY9UMDLACr+CDeYrEybhLcy32jVWTTLCWmcB+2mdf1RaJd14112LfWDVl6pwsh2QK9+BrX4Otc0/0XXPPGGPVlC5YgRPmkIwhWvWM7501Eyi+AmOMVZNbZ5t+Wo7lTUCzVbfQT9AfJGM7tXZgrVEuCXpJ/vcxmSCsjraJ7VC0OR7zz+f8C54rgrcYdoUhAAAAAElFTkSuQmCC");this.parameters=[[[.6,100,.75],a,50],[[0,0,1],o,20]];for(let e=0;e<500;e++){const e=t.MathUtils.randFloatSpread(this.width),i=r(0,3*this.height/5),s=r(-this.depth/2,this.zAxisNumber);n.push(e,i,s)}i.setAttribute("position",new t.Float32BufferAttribute(n,3));const h=[];for(let n=0;n<this.parameters.length;n++){const r=this.parameters[n][0],s=this.parameters[n][1],a=this.parameters[n][2];this.materials[n]=new t.PointsMaterial({size:a,map:s,blending:t.AdditiveBlending,transparent:!0,depthTest:!1}),this.materials[n].color.setHSL(r[0],r[1],r[2]);const o=new t.Points(i,this.materials[n]);o.rotation.x=.2*Math.random()-.15,o.rotation.y=.2*Math.random()-.15,o.rotation.z=.2*Math.random()-.15,o.position.setZ(e),h.push(o),this.scene.add(o)}return h}renderStarMove(){const t=5e-5*Date.now();for(let e=0;e<this.parameters.length;e++){const i=this.parameters[e][0],n=360*(i[0]+t)%360/360;this.materials[e].color.setHSL(i[0],i[1],parseFloat(n.toFixed(2)))}this.zprogress+=10,this.zprogress_second+=10,this.zprogress>=this.zAxisNumber+this.depth/2?this.zprogress=this.particles_init_postion:this.particles_first.forEach((t=>{t.position.setZ(this.zprogress)})),this.zprogress_second>=this.zAxisNumber+this.depth/2?this.zprogress_second=this.particles_init_postion:this.particles_second.forEach((t=>{t.position.setZ(this.zprogress_second)}))}onProgress(t){let{progress:e,total:i}=t;document.getElementById("qtprogress").style.width=`${i}%`,document.getElementById("qtprogresstext").innerText=`正在加载:${i}%`}destroy(){cancelAnimationFrame(this.animationFrameId),this.renderer.dispose(),this.hm.off(o.HUMAN_LOAD_PROGRESS,this.onProgress),this.renderer.domElement.parentNode&&(this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.container.innerHTML="")}}export{Br as L,Pr as T};
|
|
1
|
+
import*as t from"three";import{m as e,d as i,E as n,r}from"./shared-Bsx1K6Nf.js";import{c as s,g as a,E as o}from"./human-core-COvRMT3l.js";import{OrbitControls as h}from"three/examples/jsm/controls/OrbitControls.js";import{RGBELoader as l}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFLoader as d}from"three/examples/jsm/loaders/GLTFLoader.js";import{KTX2Loader as c}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as u}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{DRACOLoader as p}from"three/examples/jsm/loaders/DRACOLoader.js";import{OrbitControls as m}from"three/addons/controls/OrbitControls.js";function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var _,v,y,b,w,A,x,M,C,E,S,k,T,L,O,R,F,D={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},P={duration:.5,overwrite:!1,delay:0},B=1e8,z=1e-8,G=2*Math.PI,I=G/4,H=0,N=Math.sqrt,V=Math.cos,j=Math.sin,W=function(t){return"string"==typeof t},Y=function(t){return"function"==typeof t},X=function(t){return"number"==typeof t},$=function(t){return void 0===t},U=function(t){return"object"==typeof t},q=function(t){return!1!==t},J=function(){return"undefined"!=typeof window},Q=function(t){return Y(t)||W(t)},Z="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,it=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rt=/[+-]=-?[.\d]+/,st=/[^,'"\[\]\s]+/gi,at=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ot={},ht={},lt=function(t){return(ht=zt(t,ot))&&Gi},dt=function(t,e){return!e&&void 0},ct=function(t,e){return t&&(ot[t]=e)&&ht&&(ht[t]=e)||ot},ut=function(){return 0},pt={suppressEvents:!0,isStart:!0,kill:!1},mt={suppressEvents:!0,kill:!1},gt={suppressEvents:!0},ft={},_t=[],vt={},yt={},bt={},wt=30,At=[],xt="",Mt=function(t){var e,i,n=t[0];if(U(n)||Y(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(i=At.length;i--&&!At[i].targetTest(n););e=At[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Ze(t[i],e)))||t.splice(i,1);return t},Ct=function(t){return t._gsap||Mt(ge(t))[0]._gsap},Et=function(t,e,i){return(i=t[e])&&Y(i)?t[e]():$(i)&&t.getAttribute&&t.getAttribute(e)||i},St=function(t,e){return(t=t.split(",")).forEach(e)||t},kt=function(t){return Math.round(1e5*t)/1e5||0},Tt=function(t){return Math.round(1e7*t)/1e7||0},Lt=function(t,e){var i=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===i?t+n:"-"===i?t-n:"*"===i?t*n:t/n},Ot=function(t,e){for(var i=e.length,n=0;t.indexOf(e[n])<0&&++n<i;);return n<i},Rt=function(){var t,e,i=_t.length,n=_t.slice(0);for(vt={},_t.length=0,t=0;t<i;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Ft=function(t,e,i,n){_t.length&&!v&&Rt(),t.render(e,i,v&&e<0&&(t._initted||t._startAt)),_t.length&&!v&&Rt()},Dt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(st).length<2?e:W(t)?t.trim():t},Pt=function(t){return t},Bt=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},zt=function(t,e){for(var i in e)t[i]=e[i];return t},Gt=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=U(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},It=function(t,e){var i,n={};for(i in t)i in e||(n[i]=t[i]);return n},Ht=function(t){var e,i=t.parent||b,n=t.keyframes?(e=K(t.keyframes),function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}):Bt;if(q(t.inherit))for(;i;)n(t,i.vars.defaults),i=i.parent||i._dp;return t},Nt=function(t,e,i,n,r){var s,a=t[n];if(r)for(s=e[r];a&&a[r]>s;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[n]=e,e._prev=a,e.parent=e._dp=t,e},Vt=function(t,e,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=e._prev,s=e._next;r?r._next=s:t[i]===e&&(t[i]=s),s?s._prev=r:t[n]===e&&(t[n]=r),e._next=e._prev=e.parent=null},jt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Wt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},Yt=function(t,e,i,n){return t._startAt&&(v?t._startAt.revert(mt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Xt=function t(e){return!e||e._ts&&t(e.parent)},$t=function(t){return t._repeat?Ut(t._tTime,t=t.duration()+t._rDelay)*t:0},Ut=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},qt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Jt=function(t){return t._end=Tt(t._start+(t._tDur/Math.abs(t._ts||t._rts||z)||0))},Qt=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Tt(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Jt(t),i._dirty||Wt(i,t)),t},Zt=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=qt(t.rawTime(),e),(!e._dur||de(0,e.totalDuration(),i)-e._tTime>z)&&e.render(i,!0)),Wt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},Kt=function(t,e,i,n){return e.parent&&jt(e),e._start=Tt((X(i)?i:i||t!==b?oe(t,i,e):t._time)+e._delay),e._end=Tt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Nt(t,e,"_first","_last",t._sort?"_start":0),ne(e)||(t._recent=e),n||Zt(t,e),t._ts<0&&Qt(t,t._tTime),t},te=function(t,e){return ot.ScrollTrigger?ot.ScrollTrigger.create(e,t):void 0},ee=function(t,e,i,n,r){return ai(t,e,r),t._initted?!i&&t._pt&&!v&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&C!==Ie.frame?(_t.push(t),t._lazy=[r,n],1):void 0:1},ie=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},ne=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},re=function(t,e,i,n){var r=t._repeat,s=Tt(e)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:Tt(s*(r+1)+t._rDelay*r):s,a>0&&!n&&Qt(t,t._tTime=t._tDur*a),t.parent&&Jt(t),i||Wt(t.parent,t),t},se=function(t){return t instanceof ti?Wt(t):re(t,t._dur)},ae={_start:0,endTime:ut,totalDuration:ut},oe=function t(e,i,n){var r,s,a,o=e.labels,h=e._recent||ae,l=e.duration()>=B?h.endTime(!1):e._dur;return W(i)&&(isNaN(i)||i in o)?(s=i.charAt(0),a="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?h._start:h.endTime(h._repeat>=0))+(parseFloat(i.substr(1))||0)*(a?(r<0?h:n).totalDuration()/100:1)):r<0?(i in o||(o[i]=l),o[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),a&&n&&(s=s/100*(K(n)?n[0]:n).totalDuration()),r>1?t(e,i.substr(0,r-1),n)+s:l+s)):null==i?l:+i},he=function(t,e,i){var n,r,s=X(e[1]),a=(s?2:1)+(t<2?0:1),o=e[a];if(s&&(o.duration=e[1]),o.parent=i,t){for(n=o,r=i;r&&!("immediateRender"in n);)n=r.vars.defaults||{},r=q(r.vars.inherit)&&r.parent;o.immediateRender=q(n.immediateRender),t<2?o.runBackwards=1:o.startAt=e[a-1]}return new ci(e[0],o,e[a+1])},le=function(t,e){return t||0===t?e(t):e},de=function(t,e,i){return i<t?t:i>e?e:i},ce=function(t,e){return W(t)&&(e=at.exec(t))?e[1]:""},ue=[].slice,pe=function(t,e){return t&&U(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&U(t[0]))&&!t.nodeType&&t!==w},me=function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var n;return W(t)&&!e||pe(t,1)?(n=i).push.apply(n,ge(t)):i.push(t)}))||i},ge=function(t,e,i){return y&&!e&&y.selector?y.selector(t):!W(t)||i||!A&&He()?K(t)?me(t,i):pe(t)?ue.call(t,0):t?[t]:[]:ue.call((e||x).querySelectorAll(t),0)},fe=function(t){return t=ge(t)[0]||dt()||{},function(e){var i=t.current||t.nativeElement||t;return ge(e,i.querySelectorAll?i:i===t?dt()||x.createElement("div"):t)}},_e=function(t){return t.sort((function(){return.5-Math.random()}))},ve=function(t){if(Y(t))return t;var e=U(t)?t:{each:t},i=$e(e.ease),n=e.from||0,r=parseFloat(e.base)||0,s={},a=n>0&&n<1,o=isNaN(n)||a,h=e.axis,l=n,d=n;return W(n)?l=d={center:.5,edges:.5,end:1}[n]||0:!a&&o&&(l=n[0],d=n[1]),function(t,a,c){var u,p,m,g,f,_,v,y,b,w=(c||e).length,A=s[w];if(!A){if(!(b="auto"===e.grid?0:(e.grid||[1,B])[1])){for(v=-1e8;v<(v=c[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(A=s[w]=[],u=o?Math.min(b,w)*l-.5:n%b,p=b===B?0:o?w*d/b-.5:n/b|0,v=0,y=B,_=0;_<w;_++)m=_%b-u,g=p-(_/b|0),A[_]=f=h?Math.abs("y"===h?g:m):N(m*m+g*g),f>v&&(v=f),f<y&&(y=f);"random"===n&&_e(A),A.max=v-y,A.min=y,A.v=w=(parseFloat(e.amount)||parseFloat(e.each)*(b>w?w-1:h?"y"===h?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),A.b=w<0?r-w:r,A.u=ce(e.amount||e.each)||0,i=i&&w<0?Ye(i):i}return w=(A[t]-A.min)/A.max||0,Tt(A.b+(i?i(w):w)*A.v)+A.u}},ye=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=Tt(Math.round(parseFloat(i)/t)*t*e);return(n-n%1)/e+(X(i)?0:ce(i))}},be=function(t,e){var i,n,r=K(t);return!r&&U(t)&&(i=r=t.radius||B,t.values?(t=ge(t.values),(n=!X(t[0]))&&(i*=i)):t=ye(t.increment)),le(e,r?Y(t)?function(e){return n=t(e),Math.abs(n-e)<=i?n:e}:function(e){for(var r,s,a=parseFloat(n?e.x:e),o=parseFloat(n?e.y:0),h=B,l=0,d=t.length;d--;)(r=n?(r=t[d].x-a)*r+(s=t[d].y-o)*s:Math.abs(t[d]-a))<h&&(h=r,l=d);return l=!i||h<=i?t[l]:e,n||l===e||X(e)?l:l+ce(e)}:ye(t))},we=function(t,e,i,n){return le(K(t)?!e:!0===i?!!(i=0):!n,(function(){return K(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*n)/n}))},Ae=function(t,e,i){return le(i,(function(i){return t[~~e(i)]}))},xe=function(t){for(var e,i,n,r,s=0,a="";~(e=t.indexOf("random(",s));)n=t.indexOf(")",e),r="["===t.charAt(e+7),i=t.substr(e+7,n-e-7).match(r?st:tt),a+=t.substr(s,e-s)+we(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return a+t.substr(s,t.length-s)},Me=function(t,e,i,n,r){var s=e-t,a=n-i;return le(r,(function(e){return i+((e-t)/s*a||0)}))},Ce=function(t,e,i){var n,r,s,a=t.labels,o=B;for(n in a)(r=a[n]-e)<0==!!i&&r&&o>(r=Math.abs(r))&&(s=n,o=r);return s},Ee=function(t,e,i){var n,r,s,a=t.vars,o=a[e],h=y,l=t._ctx;if(o)return n=a[e+"Params"],r=a.callbackScope||t,i&&_t.length&&Rt(),l&&(y=l),s=n?o.apply(r,n):o.call(r),y=h,s},Se=function(t){return jt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!v),t.progress()<1&&Ee(t,"onInterrupt"),t},ke=[],Te=function(t){if(t)if(t=!t.name&&t.default||t,J()||t.headless){var e=t.name,i=Y(t),n=e&&!i&&t.init?function(){this._props=[]}:t,r={init:ut,render:bi,add:ri,kill:Ai,modifier:wi,rawVars:0},s={targetTest:0,get:0,getSetter:fi,aliases:{},register:0};if(He(),t!==n){if(yt[e])return;Bt(n,Bt(It(t,r),s)),zt(n.prototype,zt(r,It(t,s))),yt[n.prop=e]=n,t.targetTest&&(At.push(n),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}ct(e,n),t.register&&t.register(Gi,n,Ci)}else ke.push(t)},Le=255,Oe={aqua:[0,Le,Le],lime:[0,Le,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Le],navy:[0,0,128],white:[Le,Le,Le],olive:[128,128,0],yellow:[Le,Le,0],orange:[Le,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Le,0,0],pink:[Le,192,203],cyan:[0,Le,Le],transparent:[Le,Le,Le,0]},Re=function(t,e,i){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Le+.5|0},Fe=function(t,e,i){var n,r,s,a,o,h,l,d,c,u,p=t?X(t)?[t>>16,t>>8&Le,t&Le]:0:Oe.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Oe[t])p=Oe[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+n+n+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&Le,p&Le,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&Le,t&Le]}else if("hsl"===t.substr(0,3))if(p=u=t.match(tt),e){if(~t.indexOf("="))return p=t.match(et),i&&p.length<4&&(p[3]=1),p}else a=+p[0]%360/360,o=+p[1]/100,n=2*(h=+p[2]/100)-(r=h<=.5?h*(o+1):h+o-h*o),p.length>3&&(p[3]*=1),p[0]=Re(a+1/3,n,r),p[1]=Re(a,n,r),p[2]=Re(a-1/3,n,r);else p=t.match(tt)||Oe.transparent;p=p.map(Number)}return e&&!u&&(n=p[0]/Le,r=p[1]/Le,s=p[2]/Le,h=((l=Math.max(n,r,s))+(d=Math.min(n,r,s)))/2,l===d?a=o=0:(c=l-d,o=h>.5?c/(2-l-d):c/(l+d),a=l===n?(r-s)/c+(r<s?6:0):l===r?(s-n)/c+2:(n-r)/c+4,a*=60),p[0]=~~(a+.5),p[1]=~~(100*o+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p},De=function(t){var e=[],i=[],n=-1;return t.split(Be).forEach((function(t){var r=t.match(it)||[];e.push.apply(e,r),i.push(n+=r.length+1)})),e.c=i,e},Pe=function(t,e,i){var n,r,s,a,o="",h=(t+o).match(Be),l=e?"hsla(":"rgba(",d=0;if(!h)return t;if(h=h.map((function(t){return(t=Fe(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=De(t),(n=i.c).join(o)!==s.c.join(o)))for(a=(r=t.replace(Be,"1").split(it)).length-1;d<a;d++)o+=r[d]+(~n.indexOf(d)?h.shift()||l+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!r)for(a=(r=t.split(Be)).length-1;d<a;d++)o+=r[d]+h[d];return o+r[a]},Be=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Oe)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),ze=/hsl[a]?\(/,Ge=function(t){var e,i=t.join(" ");if(Be.lastIndex=0,Be.test(i))return e=ze.test(i),t[1]=Pe(t[1],e),t[0]=Pe(t[0],e,De(t[1])),!0},Ie=function(){var t,e,i,n,r,s,a=Date.now,o=500,h=33,l=a(),d=l,c=1e3/240,u=c,p=[],m=function i(m){var g,f,_,v,y=a()-d,b=!0===m;if((y>o||y<0)&&(l+=y-h),((g=(_=(d+=y)-l)-u)>0||b)&&(v=++n.frame,r=_-1e3*n.time,n.time=_/=1e3,u+=g+(g>=c?4:c-g),f=1),b||(t=e(i)),f)for(s=0;s<p.length;s++)p[s](_,r,v,m)};return n={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){M&&(!A&&J()&&(w=A=window,x=w.document||{},ot.gsap=Gi,(w.gsapVersions||(w.gsapVersions=[])).push(Gi.version),lt(ht||w.GreenSockGlobals||!w.gsap&&w||{}),ke.forEach(Te)),i="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=i||function(t){return setTimeout(t,u-1e3*n.time+1|0)},S=1,m(2))},sleep:function(){(i?cancelAnimationFrame:clearTimeout)(t),S=0,e=ut},lagSmoothing:function(t,e){o=t||1/0,h=Math.min(e||33,o)},fps:function(t){c=1e3/(t||240),u=1e3*n.time+c},add:function(t,e,i){var r=e?function(e,i,s,a){t(e,i,s,a),n.remove(r)}:t;return n.remove(t),p[i?"unshift":"push"](r),He(),r},remove:function(t,e){~(e=p.indexOf(t))&&p.splice(e,1)&&s>=e&&s--},_listeners:p}}(),He=function(){return!S&&Ie.wake()},Ne={},Ve=/^[\d.\-M][\d.\-,\s]/,je=/["']/g,We=function(t){for(var e,i,n,r={},s=t.substr(1,t.length-3).split(":"),a=s[0],o=1,h=s.length;o<h;o++)i=s[o],e=o!==h-1?i.lastIndexOf(","):i.length,n=i.substr(0,e),r[a]=isNaN(n)?n.replace(je,"").trim():+n,a=i.substr(e+1).trim();return r},Ye=function(t){return function(e){return 1-t(1-e)}},Xe=function t(e,i){for(var n,r=e._first;r;)r instanceof ti?t(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?t(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},$e=function(t,e){return t&&(Y(t)?t:Ne[t]||function(t){var e,i,n,r,s=(t+"").split("("),a=Ne[s[0]];return a&&s.length>1&&a.config?a.config.apply(null,~t.indexOf("{")?[We(s[1])]:(e=t,i=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",i),e.substring(i,~r&&r<n?e.indexOf(")",n+1):n)).split(",").map(Dt)):Ne._CE&&Ve.test(t)?Ne._CE("",t):a}(t))||e},Ue=function(t,e,i,n){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:i,easeInOut:n};return St(t,(function(t){for(var e in Ne[t]=ot[t]=s,Ne[r=t.toLowerCase()]=i,s)Ne[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ne[t+"."+e]=s[e]})),s},qe=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Je=function t(e,i,n){var r=i>=1?i:1,s=(n||(e?.3:.45))/(i<1?i:1),a=s/G*(Math.asin(1/r)||0),o=function(t){return 1===t?1:r*Math.pow(2,-10*t)*j((t-a)*s)+1},h="out"===e?o:"in"===e?function(t){return 1-o(1-t)}:qe(o);return s=G/s,h.config=function(i,n){return t(e,i,n)},h},Qe=function t(e,i){void 0===i&&(i=1.70158);var n=function(t){return t?--t*t*((i+1)*t+i)+1:0},r="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:qe(n);return r.config=function(i){return t(e,i)},r};St("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;Ue(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),Ne.Linear.easeNone=Ne.none=Ne.Linear.easeIn,Ue("Elastic",Je("in"),Je("out"),Je()),k=7.5625,O=2*(L=1/(T=2.75)),R=2.5*L,Ue("Bounce",(function(t){return 1-F(1-t)}),F=function(t){return t<L?k*t*t:t<O?k*Math.pow(t-1.5/T,2)+.75:t<R?k*(t-=2.25/T)*t+.9375:k*Math.pow(t-2.625/T,2)+.984375}),Ue("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Ue("Circ",(function(t){return-(N(1-t*t)-1)})),Ue("Sine",(function(t){return 1===t?1:1-V(t*I)})),Ue("Back",Qe("in"),Qe("out"),Qe()),Ne.SteppedEase=Ne.steps=ot.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,n=t+(e?0:1),r=e?1:0;return function(t){return((n*de(0,.99999999,t)|0)+r)*i}}},P.ease=Ne["quad.out"],St("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return xt+=t+","+t+"Params,"}));var Ze=function(t,e){this.id=H++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Et,this.set=e?e.getSetter:fi},Ke=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,re(this,+t.duration,1,1),this.data=t.data,y&&(this._ctx=y,y.data.push(this)),S||Ie.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,re(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(He(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Qt(this,t),!i._dp||i.parent||Zt(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Kt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===z||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Ft(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+$t(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+$t(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?Ut(this._tTime,i)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var i=this.parent&&this._ts?qt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(de(-Math.abs(this._delay),this._tDur,i),!1!==e),Jt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(He(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==z&&(this._tTime-=z)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Kt(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(q(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?qt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=gt);var e=v;return v=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),v=e,this},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,se(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,se(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(oe(this,t),q(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,q(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-z))},e.eventCallback=function(t,e,i){var n=this.vars;return arguments.length>1?(e?(n[t]=e,i&&(n[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(i){var n=Y(t)?t:Pt,r=function(){var t=e.then;e.then=null,Y(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),i(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){Se(this)},t}();Bt(Ke.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:-1e-8,_prom:0,_ps:!1,_rts:1});var ti=function(t){function e(e,i){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=q(e.sortChildren),b&&Kt(e.parent||b,g(n),i),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&te(g(n),e.scrollTrigger),n}f(e,t);var i=e.prototype;return i.to=function(t,e,i){return he(0,arguments,this),this},i.from=function(t,e,i){return he(1,arguments,this),this},i.fromTo=function(t,e,i,n){return he(2,arguments,this),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,Ht(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new ci(t,e,oe(this,i),1),this},i.call=function(t,e,i){return Kt(this,ci.delayedCall(0,t,e),i)},i.staggerTo=function(t,e,i,n,r,s,a){return i.duration=e,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=a,i.parent=this,new ci(t,i,oe(this,r)),this},i.staggerFrom=function(t,e,i,n,r,s,a){return i.runBackwards=1,Ht(i).immediateRender=q(i.immediateRender),this.staggerTo(t,e,i,n,r,s,a)},i.staggerFromTo=function(t,e,i,n,r,s,a,o){return n.startAt=i,Ht(n).immediateRender=q(n.immediateRender),this.staggerTo(t,e,n,r,s,a,o)},i.render=function(t,e,i){var n,r,s,a,o,h,l,d,c,u,p,m,g=this._time,f=this._dirty?this.totalDuration():this._tDur,_=this._dur,y=t<=0?0:Tt(t),w=this._zTime<0!=t<0&&(this._initted||!_);if(this!==b&&y>f&&t>=0&&(y=f),y!==this._tTime||i||w){if(g!==this._time&&_&&(y+=this._time-g,t+=this._time-g),n=y,c=this._start,h=!(d=this._ts),w&&(_||(g=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,o=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,i);if(n=Tt(y%o),y===f?(a=this._repeat,n=_):((a=~~(y/o))&&a===y/o&&(n=_,a--),n>_&&(n=_)),u=Ut(this._tTime,o),!g&&this._tTime&&u!==a&&this._tTime-u*o-this._dur<=0&&(u=a),p&&1&a&&(n=_-n,m=1),a!==u&&!this._lock){var A=p&&1&u,x=A===(p&&1&a);if(a<u&&(A=!A),g=A?0:y%_?_:y,this._lock=1,this.render(g||(m?0:Tt(a*o)),e,!_)._lock=0,this._tTime=y,!e&&this.parent&&Ee(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,f=this._tDur,x&&(this._lock=2,g=A?_:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;Xe(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(l=function(t,e,i){var n;if(i>e)for(n=t._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,Tt(g),Tt(n)),l&&(y-=n-(n=l._start))),this._tTime=y,this._time=n,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,g=0),!g&&n&&!e&&!a&&(Ee(this,"onStart"),this._tTime!==y))return this;if(n>=g&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,e,i),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var M=t<0?t:n;r;){if(s=r._prev,(r._act||M<=r._end)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(M-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(M-r._start)*r._ts,e,i||v&&(r._initted||r._startAt)),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=M?-1e-8:z);break}}r=s}}if(l&&!e&&(this.pause(),l.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=c,Jt(this),this.render(t,e,i);this._onUpdate&&!e&&Ee(this,"onUpdate",!0),(y===f&&this._tTime>=this.totalDuration()||!y&&g)&&(c!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((t||!_)&&(y===f&&this._ts>0||!y&&this._ts<0)&&jt(this,1),e||t<0&&!g||!y&&!g&&f||(Ee(this,y===f&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<f&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if(X(e)||(e=oe(this,e,t)),!(t instanceof Ke)){if(K(t))return t.forEach((function(t){return i.add(t,e)})),this;if(W(t))return this.addLabel(t,e);if(!Y(t))return this;t=ci.delayedCall(0,t)}return this!==t?Kt(this,t,e):this},i.getChildren=function(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=-1e8);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof ci?e&&r.push(s):(i&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,i)))),s=s._next;return r},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return W(t)?this.removeLabel(t):Y(t)?this.killTweensOf(t):(Vt(this,t),t===this._recent&&(this._recent=this._last),Wt(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Tt(Ie.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=oe(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var n=ci.delayedCall(0,e||ut,i);return n.data="isPause",this._hasPause=1,Kt(this,n,oe(this,t))},i.removePause=function(t){var e=this._first;for(t=oe(this,t);e;)e._start===t&&"isPause"===e.data&&jt(e),e=e._next},i.killTweensOf=function(t,e,i){for(var n=this.getTweensOf(t,i),r=n.length;r--;)ei!==n[r]&&n[r].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,n=[],r=ge(t),s=this._first,a=X(e);s;)s instanceof ci?Ot(s._targets,r)&&(a?(!ei||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&n.push(s):(i=s.getTweensOf(r,e)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(t,e){e=e||{};var i,n=this,r=oe(n,t),s=e,a=s.startAt,o=s.onStart,h=s.onStartParams,l=s.immediateRender,d=ci.to(n,Bt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(a&&"time"in a?a.time:n._time))/n.timeScale())||z,onStart:function(){if(n.pause(),!i){var t=e.duration||Math.abs((r-(a&&"time"in a?a.time:n._time))/n.timeScale());d._dur!==t&&re(d,t,0,1).render(d._time,!0,!0),i=1}o&&o.apply(d,h||[])}},e));return l?d.render(0):d},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,Bt({startAt:{time:oe(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),Ce(this,oe(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),Ce(this,oe(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+z)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=t,r._end+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return Wt(this)},i.invalidate=function(e){var i=this._first;for(this._lock=0;i;)i.invalidate(e),i=i._next;return t.prototype.invalidate.call(this,e)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Wt(this)},i.totalDuration=function(t){var e,i,n,r=0,s=this,a=s._last,o=B;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(n=s.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(i=a._start)>o&&s._sort&&a._ts&&!s._lock?(s._lock=1,Kt(s,a,i-a._delay,1)._lock=0):o=i,i<0&&a._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),o=0),a._end>r&&a._ts&&(r=a._end),a=e;re(s,s===b&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(b._ts&&(Ft(b,qt(t,b)),C=Ie.frame),Ie.frame>=wt){wt+=D.autoSleep||120;var e=b._first;if((!e||!e._ts)&&D.autoSleep&&Ie._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ie.sleep()}}},e}(Ke);Bt(ti.prototype,{_lock:0,_hasPause:0,_forcing:0});var ei,ii,ni=function(t,e,i,n,r,s,a){var o,h,l,d,c,u,p,m,g=new Ci(this._pt,t,e,0,1,yi,null,r),f=0,_=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=xe(n)),s&&(s(m=[i,n],t,e),i=m[0],n=m[1]),h=i.match(nt)||[];o=nt.exec(n);)d=o[0],c=n.substring(f,o.index),l?l=(l+1)%5:"rgba("===c.substr(-5)&&(l=1),d!==h[_++]&&(u=parseFloat(h[_-1])||0,g._pt={_next:g._pt,p:c||1===_?c:",",s:u,c:"="===d.charAt(1)?Lt(u,d)-u:parseFloat(d)-u,m:l&&l<4?Math.round:0},f=nt.lastIndex);return g.c=f<n.length?n.substring(f,n.length):"",g.fp=a,(rt.test(n)||p)&&(g.e=0),this._pt=g,g},ri=function(t,e,i,n,r,s,a,o,h,l){Y(n)&&(n=n(r||0,t,s));var d,c=t[e],u="get"!==i?i:Y(c)?h?t[e.indexOf("set")||!Y(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():c,p=Y(c)?h?mi:pi:ui;if(W(n)&&(~n.indexOf("random(")&&(n=xe(n)),"="===n.charAt(1)&&((d=Lt(u,n)+(ce(u)||0))||0===d)&&(n=d)),!l||u!==n||ii)return isNaN(u*n)||""===n?ni.call(this,t,e,u,n,p,o||D.stringFilter,h):(d=new Ci(this._pt,t,e,+u||0,n-(u||0),"boolean"==typeof c?vi:_i,0,p),h&&(d.fp=h),a&&d.modifier(a,this,t),this._pt=d)},si=function(t,e,i,n,r,s){var a,o,h,l;if(yt[t]&&!1!==(a=new yt[t]).init(r,a.rawVars?e[t]:function(t,e,i,n,r){if(Y(t)&&(t=hi(t,r,e,i,n)),!U(t)||t.style&&t.nodeType||K(t)||Z(t))return W(t)?hi(t,r,e,i,n):t;var s,a={};for(s in t)a[s]=hi(t[s],r,e,i,n);return a}(e[t],n,r,s,i),i,n,s)&&(i._pt=o=new Ci(i._pt,r,t,0,1,a.render,a,0,a.priority),i!==E))for(h=i._ptLookup[i._targets.indexOf(r)],l=a._props.length;l--;)h[a._props[l]]=o;return a},ai=function t(e,i,n){var r,s,a,o,h,l,d,c,u,p,m,g,f,y=e.vars,w=y.ease,A=y.startAt,x=y.immediateRender,M=y.lazy,C=y.onUpdate,E=y.runBackwards,S=y.yoyoEase,k=y.keyframes,T=y.autoRevert,L=e._dur,O=e._startAt,R=e._targets,F=e.parent,D=F&&"nested"===F.data?F.vars.targets:R,G="auto"===e._overwrite&&!_,I=e.timeline;if(I&&(!k||!w)&&(w="none"),e._ease=$e(w,P.ease),e._yEase=S?Ye($e(!0===S?w:S,P.ease)):0,S&&e._yoyo&&!e._repeat&&(S=e._yEase,e._yEase=e._ease,e._ease=S),e._from=!I&&!!y.runBackwards,!I||k&&!y.stagger){if(g=(c=R[0]?Ct(R[0]).harness:0)&&y[c.prop],r=It(y,ft),O&&(O._zTime<0&&O.progress(1),i<0&&E&&x&&!T?O.render(-1,!0):O.revert(E&&L?mt:pt),O._lazy=0),A){if(jt(e._startAt=ci.set(R,Bt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!O&&q(M),startAt:null,delay:0,onUpdate:C&&function(){return Ee(e,"onUpdate")},stagger:0},A))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v||!x&&!T)&&e._startAt.revert(mt),x&&L&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(E&&L&&!O)if(i&&(x=!1),a=Bt({overwrite:!1,data:"isFromStart",lazy:x&&!O&&q(M),immediateRender:x,stagger:0,parent:F},r),g&&(a[c.prop]=g),jt(e._startAt=ci.set(R,a)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v?e._startAt.revert(mt):e._startAt.render(-1,!0)),e._zTime=i,x){if(!i)return}else t(e._startAt,z,z);for(e._pt=e._ptCache=0,M=L&&q(M)||M&&!L,s=0;s<R.length;s++){if(d=(h=R[s])._gsap||Mt(R)[s]._gsap,e._ptLookup[s]=p={},vt[d.id]&&_t.length&&Rt(),m=D===R?s:D.indexOf(h),c&&!1!==(u=new c).init(h,g||r,e,m,D)&&(e._pt=o=new Ci(e._pt,h,u.name,0,1,u.render,u,0,u.priority),u._props.forEach((function(t){p[t]=o})),u.priority&&(l=1)),!c||g)for(a in r)yt[a]&&(u=si(a,r,e,m,h,D))?u.priority&&(l=1):p[a]=o=ri.call(e,h,a,"get",r[a],m,D,0,y.stringFilter);e._op&&e._op[s]&&e.kill(h,e._op[s]),G&&e._pt&&(ei=e,b.killTweensOf(h,p,e.globalTime(i)),f=!e.parent,ei=0),e._pt&&M&&(vt[d.id]=1)}l&&Mi(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!f,k&&i<=0&&I.render(B,!0,!0)},oi=function(t,e,i,n){var r,s,a=e.ease||n||"power1.inOut";if(K(e))s=i[t]||(i[t]=[]),e.forEach((function(t,i){return s.push({t:i/(e.length-1)*100,v:t,e:a})}));else for(r in e)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:a})},hi=function(t,e,i,n,r){return Y(t)?t.call(e,i,n,r):W(t)&&~t.indexOf("random(")?xe(t):t},li=xt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",di={};St(li+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return di[t]=1}));var ci=function(t){function e(e,i,n,r){var s;"number"==typeof i&&(n.duration=i,i=n,n=null);var a,o,h,l,d,c,u,p,m=(s=t.call(this,r?i:Ht(i))||this).vars,f=m.duration,v=m.delay,y=m.immediateRender,w=m.stagger,A=m.overwrite,x=m.keyframes,M=m.defaults,C=m.scrollTrigger,E=m.yoyoEase,S=i.parent||b,k=(K(e)||Z(e)?X(e[0]):"length"in i)?[e]:ge(e);if(s._targets=k.length?Mt(k):dt(0,!D.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=A,x||w||Q(f)||Q(v)){if(i=s.vars,(a=s.timeline=new ti({data:"nested",defaults:M||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),a.parent=a._dp=g(s),a._start=0,w||Q(f)||Q(v)){if(l=k.length,u=w&&ve(w),U(w))for(d in w)~li.indexOf(d)&&(p||(p={}),p[d]=w[d]);for(o=0;o<l;o++)(h=It(i,di)).stagger=0,E&&(h.yoyoEase=E),p&&zt(h,p),c=k[o],h.duration=+hi(f,g(s),o,c,k),h.delay=(+hi(v,g(s),o,c,k)||0)-s._delay,!w&&1===l&&h.delay&&(s._delay=v=h.delay,s._start+=v,h.delay=0),a.to(c,h,u?u(o,c,k):0),a._ease=Ne.none;a.duration()?f=v=0:s.timeline=0}else if(x){Ht(Bt(a.vars.defaults,{ease:"none"})),a._ease=$e(x.ease||i.ease||"none");var T,L,O,R=0;if(K(x))x.forEach((function(t){return a.to(k,t,">")})),a.duration();else{for(d in h={},x)"ease"===d||"easeEach"===d||oi(d,x[d],h,x.easeEach);for(d in h)for(T=h[d].sort((function(t,e){return t.t-e.t})),R=0,o=0;o<T.length;o++)(O={ease:(L=T[o]).e,duration:(L.t-(o?T[o-1].t:0))/100*f})[d]=L.v,a.to(k,O,R),R+=O.duration;a.duration()<f&&a.to({},{duration:f-a.duration()})}}f||s.duration(f=a.duration())}else s.timeline=0;return!0!==A||_||(ei=g(s),b.killTweensOf(k),ei=0),Kt(S,g(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(y||!f&&!x&&s._start===Tt(S._time)&&q(y)&&Xt(g(s))&&"nested"!==S.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-v)||0)),C&&te(g(s),C),s}f(e,t);var i=e.prototype;return i.render=function(t,e,i){var n,r,s,a,o,h,l,d,c,u=this._time,p=this._tDur,m=this._dur,g=t<0,f=t>p-z&&!g?p:t<z?0:t;if(m){if(f!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(n=f,d=this.timeline,this._repeat){if(a=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*a+t,e,i);if(n=Tt(f%a),f===p?(s=this._repeat,n=m):((s=~~(f/a))&&s===Tt(f/a)&&(n=m,s--),n>m&&(n=m)),(h=this._yoyo&&1&s)&&(c=this._yEase,n=m-n),o=Ut(this._tTime,a),n===u&&!i&&this._initted&&s===o)return this._tTime=f,this;s!==o&&(d&&this._yEase&&Xe(d,h),this.vars.repeatRefresh&&!h&&!this._lock&&this._time!==a&&this._initted&&(this._lock=i=1,this.render(Tt(a*s),!0).invalidate()._lock=0))}if(!this._initted){if(ee(this,g?t:n,i,e,f))return this._tTime=0,this;if(!(u===this._time||i&&this.vars.repeatRefresh&&s!==o))return this;if(m!==this._dur)return this.render(t,e,i)}if(this._tTime=f,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(c||this._ease)(n/m),this._from&&(this.ratio=l=1-l),n&&!u&&!e&&!s&&(Ee(this,"onStart"),this._tTime!==f))return this;for(r=this._pt;r;)r.r(l,r.d),r=r._next;d&&d.render(t<0?t:d._dur*d._ease(n/this._dur),e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&Yt(this,t,0,i),Ee(this,"onUpdate")),this._repeat&&s!==o&&this.vars.onRepeat&&!e&&this.parent&&Ee(this,"onRepeat"),f!==this._tDur&&f||this._tTime!==f||(g&&!this._onUpdate&&Yt(this,t,0,!0),(t||!m)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&jt(this,1),e||g&&!u||!(f||u||h)||(Ee(this,f===p?"onComplete":"onReverseComplete",!0),this._prom&&!(f<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,n){var r,s,a,o=t.ratio,h=e<0||!e&&(!t._start&&ie(t)&&(t._initted||!ne(t))||(t._ts<0||t._dp._ts<0)&&!ne(t))?0:1,l=t._rDelay,d=0;if(l&&t._repeat&&(d=de(0,t._tDur,e),s=Ut(d,l),t._yoyo&&1&s&&(h=1-h),s!==Ut(t._tTime,l)&&(o=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==o||v||n||t._zTime===z||!e&&t._zTime){if(!t._initted&&ee(t,e,n,i,d))return;for(a=t._zTime,t._zTime=e||(i?z:0),i||(i=e&&!a),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=d,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&Yt(t,e,0,!0),t._onUpdate&&!i&&Ee(t,"onUpdate"),d&&t._repeat&&!i&&t.parent&&Ee(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&jt(t,1),i||v||(Ee(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},i.resetTo=function(t,e,i,n,r){S||Ie.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ai(this,s),function(t,e,i,n,r,s,a,o){var h,l,d,c,u=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!u)for(u=t._ptCache[e]=[],d=t._ptLookup,c=t._targets.length;c--;){if((h=d[c][e])&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return ii=1,t.vars[e]="+=0",ai(t,a),ii=0,o?dt():1;u.push(h)}for(c=u.length;c--;)(h=(l=u[c])._pt||l).s=!n&&0!==n||r?h.s+(n||0)+s*h.c:n,h.c=i-h.s,l.e&&(l.e=kt(i)+ce(l.e)),l.b&&(l.b=h.s+ce(l.b))}(this,t,e,i,n,this._ease(s/this._dur),s,r)?this.resetTo(t,e,i,n,1):(Qt(this,0),this.parent||Nt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Se(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,ei&&!0!==ei.vars.overwrite)._first||Se(this),this.parent&&i!==this.timeline.totalDuration()&&re(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,a,o,h,l,d=this._targets,c=t?ge(t):d,u=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,n=i===e.length;n&&i--&&t[i]===e[i];);return i<0}(d,c))return"all"===e&&(this._pt=0),Se(this);for(n=this._op=this._op||[],"all"!==e&&(W(e)&&(o={},St(e,(function(t){return o[t]=1})),e=o),e=function(t,e){var i,n,r,s,a=t[0]?Ct(t[0]).harness:0,o=a&&a.aliases;if(!o)return e;for(n in i=zt({},e),o)if(n in i)for(r=(s=o[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(d,e)),l=d.length;l--;)if(~c.indexOf(d[l]))for(o in r=u[l],"all"===e?(n[l]=e,a=r,s={}):(s=n[l]=n[l]||{},a=e),a)(h=r&&r[o])&&("kill"in h.d&&!0!==h.d.kill(o)||Vt(this,h,"_pt"),delete r[o]),"all"!==s&&(s[o]=1);return this._initted&&!this._pt&&p&&Se(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,e){return he(1,arguments)},e.delayedCall=function(t,i,n,r){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},e.fromTo=function(t,e,i){return he(2,arguments)},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return b.killTweensOf(t,e,i)},e}(Ke);Bt(ci.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),St("staggerTo,staggerFrom,staggerFromTo",(function(t){ci[t]=function(){var e=new ti,i=ue.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var ui=function(t,e,i){return t[e]=i},pi=function(t,e,i){return t[e](i)},mi=function(t,e,i,n){return t[e](n.fp,i)},gi=function(t,e,i){return t.setAttribute(e,i)},fi=function(t,e){return Y(t[e])?pi:$(t[e])&&t.setAttribute?gi:ui},_i=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},vi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},yi=function(t,e){var i=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+n,i=i._next;n+=e.c}e.set(e.t,e.p,n,e)},bi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},wi=function(t,e,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(t,e,i),s=r},Ai=function(t){for(var e,i,n=this._pt;n;)i=n._next,n.p===t&&!n.op||n.op===t?Vt(this,n,"_pt"):n.dep||(e=1),n=i;return!e},xi=function(t,e,i,n){n.mSet(t,e,n.m.call(n.tween,i,n.mt),n)},Mi=function(t){for(var e,i,n,r,s=t._pt;s;){for(e=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=e}t._pt=n},Ci=function(){function t(t,e,i,n,r,s,a,o,h){this.t=e,this.s=n,this.c=r,this.p=i,this.r=s||_i,this.d=a||this,this.set=o||ui,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=xi,this.m=t,this.mt=i,this.tween=e},t}();St(xt+"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(t){return ft[t]=1})),ot.TweenMax=ot.TweenLite=ci,ot.TimelineLite=ot.TimelineMax=ti,b=new ti({sortChildren:!1,defaults:P,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),D.stringFilter=Ge;var Ei=[],Si={},ki=[],Ti=0,Li=0,Oi=function(t){return(Si[t]||ki).map((function(t){return t()}))},Ri=function(){var t=Date.now(),e=[];t-Ti>2&&(Oi("matchMediaInit"),Ei.forEach((function(t){var i,n,r,s,a=t.queries,o=t.conditions;for(n in a)(i=w.matchMedia(a[n]).matches)&&(r=1),i!==o[n]&&(o[n]=i,s=1);s&&(t.revert(),r&&e.push(t))})),Oi("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Ti=t,Oi("matchMedia"))},Fi=function(){function t(t,e){this.selector=e&&fe(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Li++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,i){Y(t)&&(i=e,e=t,t=Y);var n=this,r=function(){var t,r=y,s=n.selector;return r&&r!==n&&r.data.push(n),i&&(n.selector=fe(i)),y=n,t=e.apply(n,arguments),Y(t)&&n._r.push(t),y=r,n.selector=s,n.isReverted=!1,t};return n.last=r,t===Y?r(n,(function(t){return n.add(null,t)})):t?n[t]=r:r},e.ignore=function(t){var e=y;y=null,t(this),y=e},e.getTweens=function(){var e=[];return this.data.forEach((function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof ci&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var i=this;if(t?function(){for(var e,n=i.getTweens(),r=i.data.length;r--;)"isFlip"===(e=i.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=i.data.length;r--;)(e=i.data[r])instanceof ti?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof ci)&&e.revert&&e.revert(t);i._r.forEach((function(e){return e(t,i)})),i.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Ei.length;n--;)Ei[n].id===this.id&&Ei.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),Di=function(){function t(t){this.contexts=[],this.scope=t,y&&y.data.push(this)}var e=t.prototype;return e.add=function(t,e,i){U(t)||(t={matches:t});var n,r,s,a=new Fi(0,i||this.scope),o=a.conditions={};for(r in y&&!a.selector&&(a.selector=y.selector),this.contexts.push(a),e=a.add("onMatch",e),a.queries=t,t)"all"===r?s=1:(n=w.matchMedia(t[r]))&&(Ei.indexOf(a)<0&&Ei.push(a),(o[r]=n.matches)&&(s=1),n.addListener?n.addListener(Ri):n.addEventListener("change",Ri));return s&&e(a,(function(t){return a.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Pi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Te(t)}))},timeline:function(t){return new ti(t)},getTweensOf:function(t,e){return b.getTweensOf(t,e)},getProperty:function(t,e,i,n){W(t)&&(t=ge(t)[0]);var r=Ct(t||{}).get,s=i?Pt:Dt;return"native"===i&&(i=""),t?e?s((yt[e]&&yt[e].get||r)(t,e,i,n)):function(e,i,n){return s((yt[e]&&yt[e].get||r)(t,e,i,n))}:t},quickSetter:function(t,e,i){if((t=ge(t)).length>1){var n=t.map((function(t){return Gi.quickSetter(t,e,i)})),r=n.length;return function(t){for(var e=r;e--;)n[e](t)}}t=t[0]||{};var s=yt[e],a=Ct(t),o=a.harness&&(a.harness.aliases||{})[e]||e,h=s?function(e){var n=new s;E._pt=0,n.init(t,i?e+i:e,E,0,[t]),n.render(1,n),E._pt&&bi(1,E)}:a.set(t,o);return s?h:function(e){return h(t,o,i?e+i:e,a,1)}},quickTo:function(t,e,i){var n,r=Gi.to(t,zt(((n={})[e]="+=0.1",n.paused=!0,n),i||{})),s=function(t,i,n){return r.resetTo(e,t,i,n)};return s.tween=r,s},isTweening:function(t){return b.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=$e(t.ease,P.ease)),Gt(P,t||{})},config:function(t){return Gt(D,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,n=t.plugins,r=t.defaults,s=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!yt[t]&&!ot[t]&&dt()})),bt[e]=function(t,e,n){return i(ge(t),Bt(e||{},r),n)},s&&(ti.prototype[e]=function(t,i,n){return this.add(bt[e](t,U(i)?i:(n=i)&&{},this),n)})},registerEase:function(t,e){Ne[t]=$e(e)},parseEase:function(t,e){return arguments.length?$e(t,e):Ne},getById:function(t){return b.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,n,r=new ti(t);for(r.smoothChildTiming=q(t.smoothChildTiming),b.remove(r),r._dp=0,r._time=r._tTime=b._time,i=b._first;i;)n=i._next,!e&&!i._dur&&i instanceof ci&&i.vars.onComplete===i._targets[0]||Kt(r,i,i._start-i._delay),i=n;return Kt(b,r,0),r},context:function(t,e){return t?new Fi(t,e):y},matchMedia:function(t){return new Di(t)},matchMediaRefresh:function(){return Ei.forEach((function(t){var e,i,n=t.conditions;for(i in n)n[i]&&(n[i]=!1,e=1);e&&t.revert()}))||Ri()},addEventListener:function(t,e){var i=Si[t]||(Si[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=Si[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},utils:{wrap:function t(e,i,n){var r=i-e;return K(e)?Ae(e,t(0,e.length),i):le(n,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,i,n){var r=i-e,s=2*r;return K(e)?Ae(e,t(0,e.length-1),i):le(n,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:ve,random:we,snap:be,normalize:function(t,e,i){return Me(t,e,0,1,i)},getUnit:ce,clamp:function(t,e,i){return le(i,(function(i){return de(t,e,i)}))},splitColor:Fe,toArray:ge,selector:fe,mapRange:Me,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||ce(i))}},interpolate:function t(e,i,n,r){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var a,o,h,l,d,c=W(e),u={};if(!0===n&&(r=1)&&(n=null),c)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(h=[],l=e.length,d=l-2,o=1;o<l;o++)h.push(t(e[o-1],e[o]));l--,s=function(t){t*=l;var e=Math.min(d,~~t);return h[e](t-e)},n=i}else r||(e=zt(K(e)?[]:{},e));if(!h){for(a in i)ri.call(u,e,a,"get",i[a]);s=function(t){return bi(t,u)||(c?e.p:e)}}}return le(n,s)},shuffle:_e},install:lt,effects:bt,ticker:Ie,updateRoot:ti.updateRoot,plugins:yt,globalTimeline:b,core:{PropTween:Ci,globals:ct,Tween:ci,Timeline:ti,Animation:Ke,getCache:Ct,_removeLinkedListItem:Vt,reverting:function(){return v},context:function(t){return t&&y&&(y.data.push(t),t._ctx=y),y},suppressOverwrites:function(t){return _=t}}};St("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Pi[t]=ci[t]})),Ie.add(ti.updateRoot),E=Pi.to({},{duration:0});var Bi=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},zi=function(t,e){return{name:t,rawVars:1,init:function(t,i,n){n._onInit=function(t){var n,r;if(W(i)&&(n={},St(i,(function(t){return n[t]=1})),i=n),e){for(r in n={},i)n[r]=e(i[r]);i=n}!function(t,e){var i,n,r,s=t._targets;for(i in e)for(n=s.length;n--;)(r=t._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=Bi(r,i)),r&&r.modifier&&r.modifier(e[i],t,s[n],i))}(t,i)}}}},Gi=Pi.registerPlugin({name:"attr",init:function(t,e,i,n,r){var s,a,o;for(s in this.tween=i,e)o=t.getAttribute(s)||"",(a=this.add(t,"setAttribute",(o||0)+"",e[s],n,r,0,0,s)).op=s,a.b=o,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)v?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},zi("roundProps",ye),zi("modifiers"),zi("snap",be))||Pi;ci.version=ti.version=Gi.version="3.12.5",M=1,J()&&He(),Ne.Power0,Ne.Power1,Ne.Power2,Ne.Power3,Ne.Power4,Ne.Linear,Ne.Quad,Ne.Cubic,Ne.Quart,Ne.Quint,Ne.Strong,Ne.Elastic,Ne.Back,Ne.SteppedEase,Ne.Bounce,Ne.Sine,Ne.Expo,Ne.Circ;var Ii,Hi,Ni,Vi,ji,Wi,Yi,Xi,$i={},Ui=180/Math.PI,qi=Math.PI/180,Ji=Math.atan2,Qi=/([A-Z])/g,Zi=/(left|right|width|margin|padding|x)/i,Ki=/[\s,\(]\S/,tn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},en=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},nn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},rn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},sn=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},an=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},on=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},hn=function(t,e,i){return t.style[e]=i},ln=function(t,e,i){return t.style.setProperty(e,i)},dn=function(t,e,i){return t._gsap[e]=i},cn=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},un=function(t,e,i,n,r){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},pn=function(t,e,i,n,r){var s=t._gsap;s[e]=i,s.renderTransform(r,s)},mn="transform",gn=mn+"Origin",fn=function t(e,i){var n=this,r=this.target,s=r.style,a=r._gsap;if(e in $i&&s){if(this.tfm=this.tfm||{},"transform"===e)return tn.transform.split(",").forEach((function(e){return t.call(n,e,i)}));if(~(e=tn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=Dn(r,t)})):this.tfm[e]=a.x?a[e]:Dn(r,e),e===gn&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(mn)>=0)return;a.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(gn,i,"")),e=mn}(s||i)&&this.props.push(e,i,s[e])},_n=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},vn=function(){var t,e,i=this.props,n=this.target,r=n.style,s=n._gsap;for(t=0;t<i.length;t+=3)i[t+1]?n[i[t]]=i[t+2]:i[t+2]?r[i[t]]=i[t+2]:r.removeProperty("--"===i[t].substr(0,2)?i[t]:i[t].replace(Qi,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=Yi())&&t.isStart||r[mn]||(_n(r),s.zOrigin&&r[gn]&&(r[gn]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},yn=function(t,e){var i={target:t,props:[],revert:vn,save:fn};return t._gsap||Gi.core.getCache(t),e&&e.split(",").forEach((function(t){return i.save(t)})),i},bn=function(t,e){var i=Hi.createElementNS?Hi.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hi.createElement(t);return i&&i.style?i:Hi.createElement(t)},wn=function t(e,i,n){var r=getComputedStyle(e);return r[i]||r.getPropertyValue(i.replace(Qi,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&t(e,xn(i)||i,1)||""},An="O,Moz,ms,Ms,Webkit".split(","),xn=function(t,e,i){var n=(e||ji).style,r=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(An[r]+t in n););return r<0?null:(3===r?"ms":r>=0?An[r]:"")+t},Mn=function(){"undefined"!=typeof window&&window.document&&(Ii=window,Hi=Ii.document,Ni=Hi.documentElement,ji=bn("div")||{style:{}},bn("div"),mn=xn(mn),gn=mn+"Origin",ji.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Xi=!!xn("perspective"),Yi=Gi.core.reverting,Vi=1)},Cn=function t(e){var i,n=bn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,a=this.style.cssText;if(Ni.appendChild(n),n.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),Ni.removeChild(n),this.style.cssText=a,i},En=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},Sn=function(t){var e;try{e=t.getBBox()}catch(i){e=Cn.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Cn||(e=Cn.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+En(t,["x","cx","x1"])||0,y:+En(t,["y","cy","y1"])||0,width:0,height:0}},kn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Sn(t))},Tn=function(t,e){if(e){var i,n=t.style;e in $i&&e!==gn&&(e=mn),n.removeProperty?("ms"!==(i=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===i?e:e.replace(Qi,"-$1").toLowerCase())):n.removeAttribute(e)}},Ln=function(t,e,i,n,r,s){var a=new Ci(t._pt,e,i,0,1,s?on:an);return t._pt=a,a.b=n,a.e=r,t._props.push(i),a},On={deg:1,rad:1,turn:1},Rn={grid:1,flex:1},Fn=function t(e,i,n,r){var s,a,o,h,l=parseFloat(n)||0,d=(n+"").trim().substr((l+"").length)||"px",c=ji.style,u=Zi.test(i),p="svg"===e.tagName.toLowerCase(),m=(p?"client":"offset")+(u?"Width":"Height"),g=100,f="px"===r,_="%"===r;if(r===d||!l||On[r]||On[d])return l;if("px"!==d&&!f&&(l=t(e,i,n,"px")),h=e.getCTM&&kn(e),(_||"%"===d)&&($i[i]||~i.indexOf("adius")))return s=h?e.getBBox()[u?"width":"height"]:e[m],kt(_?l/s*g:l/100*s);if(c[u?"width":"height"]=g+(f?d:r),a=~i.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,h&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==Hi&&a.appendChild||(a=Hi.body),(o=a._gsap)&&_&&o.width&&u&&o.time===Ie.time&&!o.uncache)return kt(l/o.width*g);if(!_||"height"!==i&&"width"!==i)(_||"%"===d)&&!Rn[wn(a,"display")]&&(c.position=wn(e,"position")),a===e&&(c.position="static"),a.appendChild(ji),s=ji[m],a.removeChild(ji),c.position="absolute";else{var v=e.style[i];e.style[i]=g+r,s=e[m],v?e.style[i]=v:Tn(e,i)}return u&&_&&((o=Ct(a)).time=Ie.time,o.width=a[m]),kt(f?s*l/g:s&&l?g/s*l:0)},Dn=function(t,e,i,n){var r;return Vi||Mn(),e in tn&&"transform"!==e&&~(e=tn[e]).indexOf(",")&&(e=e.split(",")[0]),$i[e]&&"transform"!==e?(r=Yn(t,n),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Xn(wn(t,gn))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=Gn[e]&&Gn[e](t,e,i)||wn(t,e)||Et(t,e)||("opacity"===e?1:0)),i&&!~(r+"").trim().indexOf(" ")?Fn(t,e,r,i)+i:r},Pn=function(t,e,i,n){if(!i||"none"===i){var r=xn(e,t,1),s=r&&wn(t,r,1);s&&s!==i?(e=r,i=s):"borderColor"===e&&(i=wn(t,"borderTopColor"))}var a,o,h,l,d,c,u,p,m,g,f,_=new Ci(this._pt,t.style,e,0,1,yi),v=0,y=0;if(_.b=i,_.e=n,i+="","auto"===(n+="")&&(c=t.style[e],t.style[e]=n,n=wn(t,e)||n,c?t.style[e]=c:Tn(t,e)),Ge(a=[i,n]),n=a[1],h=(i=a[0]).match(it)||[],(n.match(it)||[]).length){for(;o=it.exec(n);)u=o[0],m=n.substring(v,o.index),d?d=(d+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(d=1),u!==(c=h[y++]||"")&&(l=parseFloat(c)||0,f=c.substr((l+"").length),"="===u.charAt(1)&&(u=Lt(l,u)+f),p=parseFloat(u),g=u.substr((p+"").length),v=it.lastIndex-g.length,g||(g=g||D.units[e]||f,v===n.length&&(n+=g,_.e+=g)),f!==g&&(l=Fn(t,e,c,g)||0),_._pt={_next:_._pt,p:m||1===y?m:",",s:l,c:p-l,m:d&&d<4||"zIndex"===e?Math.round:0});_.c=v<n.length?n.substring(v,n.length):""}else _.r="display"===e&&"none"===n?on:an;return rt.test(n)&&(_.e=0),this._pt=_,_},Bn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},zn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,n,r,s=e.t,a=s.style,o=e.u,h=s._gsap;if("all"===o||!0===o)a.cssText="",n=1;else for(r=(o=o.split(",")).length;--r>-1;)i=o[r],$i[i]&&(n=1,i="transformOrigin"===i?gn:mn),Tn(s,i);n&&(Tn(s,mn),h&&(h.svg&&s.removeAttribute("transform"),Yn(s,1),h.uncache=1,_n(a)))}},Gn={clearProps:function(t,e,i,n,r){if("isFromStart"!==r.data){var s=t._pt=new Ci(t._pt,e,i,0,0,zn);return s.u=n,s.pr=-10,s.tween=r,t._props.push(i),1}}},In=[1,0,0,1,0,0],Hn={},Nn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Vn=function(t){var e=wn(t,mn);return Nn(e)?In:e.substr(7).match(et).map(kt)},jn=function(t,e){var i,n,r,s,a=t._gsap||Ct(t),o=t.style,h=Vn(t);return a.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?In:h:(h!==In||t.offsetParent||t===Ni||a.svg||(r=o.display,o.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,n=t.nextElementSibling,Ni.appendChild(t)),h=Vn(t),r?o.display=r:Tn(t,"display"),s&&(n?i.insertBefore(t,n):i?i.appendChild(t):Ni.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Wn=function(t,e,i,n,r,s){var a,o,h,l=t._gsap,d=r||jn(t,!0),c=l.xOrigin||0,u=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=d[0],f=d[1],_=d[2],v=d[3],y=d[4],b=d[5],w=e.split(" "),A=parseFloat(w[0])||0,x=parseFloat(w[1])||0;i?d!==In&&(o=g*v-f*_)&&(h=A*(-f/o)+x*(g/o)-(g*b-f*y)/o,A=A*(v/o)+x*(-_/o)+(_*b-v*y)/o,x=h):(A=(a=Sn(t)).x+(~w[0].indexOf("%")?A/100*a.width:A),x=a.y+(~(w[1]||w[0]).indexOf("%")?x/100*a.height:x)),n||!1!==n&&l.smooth?(y=A-c,b=x-u,l.xOffset=p+(y*g+b*_)-y,l.yOffset=m+(y*f+b*v)-b):l.xOffset=l.yOffset=0,l.xOrigin=A,l.yOrigin=x,l.smooth=!!n,l.origin=e,l.originIsAbsolute=!!i,t.style[gn]="0px 0px",s&&(Ln(s,l,"xOrigin",c,A),Ln(s,l,"yOrigin",u,x),Ln(s,l,"xOffset",p,l.xOffset),Ln(s,l,"yOffset",m,l.yOffset)),t.setAttribute("data-svg-origin",A+" "+x)},Yn=function(t,e){var i=t._gsap||new Ze(t);if("x"in i&&!e&&!i.uncache)return i;var n,r,s,a,o,h,l,d,c,u,p,m,g,f,_,v,y,b,w,A,x,M,C,E,S,k,T,L,O,R,F,P,B=t.style,z=i.scaleX<0,G="px",I="deg",H=getComputedStyle(t),N=wn(t,gn)||"0";return n=r=s=h=l=d=c=u=p=0,a=o=1,i.svg=!(!t.getCTM||!kn(t)),H.translate&&("none"===H.translate&&"none"===H.scale&&"none"===H.rotate||(B[mn]=("none"!==H.translate?"translate3d("+(H.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==H.rotate?"rotate("+H.rotate+") ":"")+("none"!==H.scale?"scale("+H.scale.split(" ").join(",")+") ":"")+("none"!==H[mn]?H[mn]:"")),B.scale=B.rotate=B.translate="none"),f=jn(t,i.svg),i.svg&&(i.uncache?(S=t.getBBox(),N=i.xOrigin-S.x+"px "+(i.yOrigin-S.y)+"px",E=""):E=!e&&t.getAttribute("data-svg-origin"),Wn(t,E||N,!!E||i.originIsAbsolute,!1!==i.smooth,f)),m=i.xOrigin||0,g=i.yOrigin||0,f!==In&&(b=f[0],w=f[1],A=f[2],x=f[3],n=M=f[4],r=C=f[5],6===f.length?(a=Math.sqrt(b*b+w*w),o=Math.sqrt(x*x+A*A),h=b||w?Ji(w,b)*Ui:0,(c=A||x?Ji(A,x)*Ui+h:0)&&(o*=Math.abs(Math.cos(c*qi))),i.svg&&(n-=m-(m*b+g*A),r-=g-(m*w+g*x))):(P=f[6],R=f[7],T=f[8],L=f[9],O=f[10],F=f[11],n=f[12],r=f[13],s=f[14],l=(_=Ji(P,O))*Ui,_&&(E=M*(v=Math.cos(-_))+T*(y=Math.sin(-_)),S=C*v+L*y,k=P*v+O*y,T=M*-y+T*v,L=C*-y+L*v,O=P*-y+O*v,F=R*-y+F*v,M=E,C=S,P=k),d=(_=Ji(-A,O))*Ui,_&&(v=Math.cos(-_),F=x*(y=Math.sin(-_))+F*v,b=E=b*v-T*y,w=S=w*v-L*y,A=k=A*v-O*y),h=(_=Ji(w,b))*Ui,_&&(E=b*(v=Math.cos(_))+w*(y=Math.sin(_)),S=M*v+C*y,w=w*v-b*y,C=C*v-M*y,b=E,M=S),l&&Math.abs(l)+Math.abs(h)>359.9&&(l=h=0,d=180-d),a=kt(Math.sqrt(b*b+w*w+A*A)),o=kt(Math.sqrt(C*C+P*P)),_=Ji(M,C),c=Math.abs(_)>2e-4?_*Ui:0,p=F?1/(F<0?-F:F):0),i.svg&&(E=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Nn(wn(t,mn)),E&&t.setAttribute("transform",E))),Math.abs(c)>90&&Math.abs(c)<270&&(z?(a*=-1,c+=h<=0?180:-180,h+=h<=0?180:-180):(o*=-1,c+=c<=0?180:-180)),e=e||i.uncache,i.x=n-((i.xPercent=n&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+G,i.y=r-((i.yPercent=r&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+G,i.z=s+G,i.scaleX=kt(a),i.scaleY=kt(o),i.rotation=kt(h)+I,i.rotationX=kt(l)+I,i.rotationY=kt(d)+I,i.skewX=c+I,i.skewY=u+I,i.transformPerspective=p+G,(i.zOrigin=parseFloat(N.split(" ")[2])||!e&&i.zOrigin||0)&&(B[gn]=Xn(N)),i.xOffset=i.yOffset=0,i.force3D=D.force3D,i.renderTransform=i.svg?Kn:Xi?Zn:Un,i.uncache=0,i},Xn=function(t){return(t=t.split(" "))[0]+" "+t[1]},$n=function(t,e,i){var n=ce(e);return kt(parseFloat(e)+parseFloat(Fn(t,"x",i+"px",n)))+n},Un=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Zn(t,e)},qn="0deg",Jn="0px",Qn=") ",Zn=function(t,e){var i=e||this,n=i.xPercent,r=i.yPercent,s=i.x,a=i.y,o=i.z,h=i.rotation,l=i.rotationY,d=i.rotationX,c=i.skewX,u=i.skewY,p=i.scaleX,m=i.scaleY,g=i.transformPerspective,f=i.force3D,_=i.target,v=i.zOrigin,y="",b="auto"===f&&t&&1!==t||!0===f;if(v&&(d!==qn||l!==qn)){var w,A=parseFloat(l)*qi,x=Math.sin(A),M=Math.cos(A);A=parseFloat(d)*qi,w=Math.cos(A),s=$n(_,s,x*w*-v),a=$n(_,a,-Math.sin(A)*-v),o=$n(_,o,M*w*-v+v)}g!==Jn&&(y+="perspective("+g+Qn),(n||r)&&(y+="translate("+n+"%, "+r+"%) "),(b||s!==Jn||a!==Jn||o!==Jn)&&(y+=o!==Jn||b?"translate3d("+s+", "+a+", "+o+") ":"translate("+s+", "+a+Qn),h!==qn&&(y+="rotate("+h+Qn),l!==qn&&(y+="rotateY("+l+Qn),d!==qn&&(y+="rotateX("+d+Qn),c===qn&&u===qn||(y+="skew("+c+", "+u+Qn),1===p&&1===m||(y+="scale("+p+", "+m+Qn),_.style[mn]=y||"translate(0, 0)"},Kn=function(t,e){var i,n,r,s,a,o=e||this,h=o.xPercent,l=o.yPercent,d=o.x,c=o.y,u=o.rotation,p=o.skewX,m=o.skewY,g=o.scaleX,f=o.scaleY,_=o.target,v=o.xOrigin,y=o.yOrigin,b=o.xOffset,w=o.yOffset,A=o.forceCSS,x=parseFloat(d),M=parseFloat(c);u=parseFloat(u),p=parseFloat(p),(m=parseFloat(m))&&(p+=m=parseFloat(m),u+=m),u||p?(u*=qi,p*=qi,i=Math.cos(u)*g,n=Math.sin(u)*g,r=Math.sin(u-p)*-f,s=Math.cos(u-p)*f,p&&(m*=qi,a=Math.tan(p-m),r*=a=Math.sqrt(1+a*a),s*=a,m&&(a=Math.tan(m),i*=a=Math.sqrt(1+a*a),n*=a)),i=kt(i),n=kt(n),r=kt(r),s=kt(s)):(i=g,s=f,n=r=0),(x&&!~(d+"").indexOf("px")||M&&!~(c+"").indexOf("px"))&&(x=Fn(_,"x",d,"px"),M=Fn(_,"y",c,"px")),(v||y||b||w)&&(x=kt(x+v-(v*i+y*r)+b),M=kt(M+y-(v*n+y*s)+w)),(h||l)&&(a=_.getBBox(),x=kt(x+h/100*a.width),M=kt(M+l/100*a.height)),a="matrix("+i+","+n+","+r+","+s+","+x+","+M+")",_.setAttribute("transform",a),A&&(_.style[mn]=a)},tr=function(t,e,i,n,r){var s,a,o=360,h=W(r),l=parseFloat(r)*(h&&~r.indexOf("rad")?Ui:1)-n,d=n+l+"deg";return h&&("short"===(s=r.split("_")[1])&&(l%=o)!==l%180&&(l+=l<0?o:-360),"cw"===s&&l<0?l=(l+36e9)%o-~~(l/o)*o:"ccw"===s&&l>0&&(l=(l-36e9)%o-~~(l/o)*o)),t._pt=a=new Ci(t._pt,e,i,n,l,nn),a.e=d,a.u="deg",t._props.push(i),a},er=function(t,e){for(var i in e)t[i]=e[i];return t},ir=function(t,e,i){var n,r,s,a,o,h,l,d=er({},i._gsap),c=i.style;for(r in d.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),c[mn]=e,n=Yn(i,1),Tn(i,mn),i.setAttribute("transform",s)):(s=getComputedStyle(i)[mn],c[mn]=e,n=Yn(i,1),c[mn]=s),$i)(s=d[r])!==(a=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(o=ce(s)!==(l=ce(a))?Fn(i,r,s,l):parseFloat(s),h=parseFloat(a),t._pt=new Ci(t._pt,n,r,o,h-o,en),t._pt.u=l||0,t._props.push(r));er(n,d)};St("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",r="Bottom",s="Left",a=(e<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return e<2?t+i:"border"+i+t}));Gn[e>1?"border"+t:t]=function(t,e,i,n,r){var s,o;if(arguments.length<4)return s=a.map((function(e){return Dn(t,e,i)})),5===(o=s.join(" ")).split(s[0]).length?s[0]:o;s=(n+"").split(" "),o={},a.forEach((function(t,e){return o[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,o,r)}}));var nr,rr,sr,ar={name:"css",register:Mn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,n,r){var s,a,o,h,l,d,c,u,p,m,g,f,_,v,y,b,w,A,x,M,C=this._props,E=t.style,S=i.vars.startAt;for(c in Vi||Mn(),this.styles=this.styles||yn(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(a=e[c],!yt[c]||!si(c,e,i,n,t,r)))if(l=typeof a,d=Gn[c],"function"===l&&(l=typeof(a=a.call(i,n,t,r))),"string"===l&&~a.indexOf("random(")&&(a=xe(a)),d)d(this,t,c,a,i)&&(y=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),a+="",Be.lastIndex=0,Be.test(s)||(u=ce(s),p=ce(a)),p?u!==p&&(s=Fn(t,c,s,p)+p):u&&(a+=u),this.add(E,"setProperty",s,a,n,r,0,0,c),C.push(c),b.push(c,0,E[c]);else if("undefined"!==l){if(S&&c in S?(s="function"==typeof S[c]?S[c].call(i,n,t,r):S[c],W(s)&&~s.indexOf("random(")&&(s=xe(s)),ce(s+"")||"auto"===s||(s+=D.units[c]||ce(Dn(t,c))||""),"="===(s+"").charAt(1)&&(s=Dn(t,c))):s=Dn(t,c),h=parseFloat(s),(m="string"===l&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),o=parseFloat(a),c in tn&&("autoAlpha"===c&&(1===h&&"hidden"===Dn(t,"visibility")&&o&&(h=0),b.push("visibility",0,E.visibility),Ln(this,E,"visibility",h?"inherit":"hidden",o?"inherit":"hidden",!o)),"scale"!==c&&"transform"!==c&&~(c=tn[c]).indexOf(",")&&(c=c.split(",")[0])),g=c in $i)if(this.styles.save(c),f||((_=t._gsap).renderTransform&&!e.parseTransform||Yn(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(f=this._pt=new Ci(this._pt,E,mn,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===c)this._pt=new Ci(this._pt,_,"scaleY",_.scaleY,(m?Lt(_.scaleY,m+o):o)-_.scaleY||0,en),this._pt.u=0,C.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gn,0,E[gn]),A=void 0,x=void 0,M=void 0,A=(w=a).split(" "),x=A[0],M=A[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==M&&"right"!==M||(w=x,x=M,M=w),A[0]=Bn[x]||x,A[1]=Bn[M]||M,a=A.join(" "),_.svg?Wn(t,a,0,v,0,this):((p=parseFloat(a.split(" ")[2])||0)!==_.zOrigin&&Ln(this,_,"zOrigin",_.zOrigin,p),Ln(this,E,c,Xn(s),Xn(a)));continue}if("svgOrigin"===c){Wn(t,a,1,v,0,this);continue}if(c in Hn){tr(this,_,c,h,m?Lt(h,m+a):a);continue}if("smoothOrigin"===c){Ln(this,_,"smooth",_.smooth,a);continue}if("force3D"===c){_[c]=a;continue}if("transform"===c){ir(this,a,t);continue}}else c in E||(c=xn(c)||c);if(g||(o||0===o)&&(h||0===h)&&!Ki.test(a)&&c in E)o||(o=0),(u=(s+"").substr((h+"").length))!==(p=ce(a)||(c in D.units?D.units[c]:u))&&(h=Fn(t,c,s,p)),this._pt=new Ci(this._pt,g?_:E,c,h,(m?Lt(h,m+o):o)-h,g||"px"!==p&&"zIndex"!==c||!1===e.autoRound?en:sn),this._pt.u=p||0,u!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=rn);else if(c in E)Pn.call(this,t,c,s,m?m+a:a);else if(c in t)this.add(t,c,s||t[c],m?m+a:a,n,r);else if("parseTransform"!==c)continue;g||(c in E?b.push(c,0,E[c]):b.push(c,1,s||t[c])),C.push(c)}y&&Mi(this)},render:function(t,e){if(e.tween._time||!Yi())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:Dn,aliases:tn,getSetter:function(t,e,i){var n=tn[e];return n&&n.indexOf(",")<0&&(e=n),e in $i&&e!==gn&&(t._gsap.x||Dn(t,"x"))?i&&Wi===i?"scale"===e?cn:dn:(Wi=i||{})&&("scale"===e?un:pn):t.style&&!$(t.style[e])?hn:~e.indexOf("-")?ln:fi(t,e)},core:{_removeProperty:Tn,_getMatrix:jn}};Gi.utils.checkPrefix=xn,Gi.core.getStyleSaver=yn,sr=St((nr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(rr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){$i[t]=1})),St(rr,(function(t){D.units[t]="deg",Hn[t]=1})),tn[sr[13]]=nr+","+rr,St("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");tn[e[1]]=sr[e[0]]})),St("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){D.units[t]="px"})),Gi.registerPlugin(ar);var or=Gi.registerPlugin(ar)||Gi;or.core.Tween;class hr{constructor(t,e,i,n,r="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),hr.nextNameID=hr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++hr.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(t=>t.stopPropagation())),this.domElement.addEventListener("keyup",(t=>t.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class lr extends hr{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function dr(t){let e,i;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!i&&"#"+i}const cr={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:dr,toHexString:dr},ur={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},pr={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,e,i=1){const n=ur.fromHexString(t);e[0]=(n>>16&255)/255*i,e[1]=(n>>8&255)/255*i,e[2]=(255&n)/255*i},toHexString:([t,e,i],n=1)=>ur.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},mr={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,e,i=1){const n=ur.fromHexString(t);e.r=(n>>16&255)/255*i,e.g=(n>>8&255)/255*i,e.b=(255&n)/255*i},toHexString:({r:t,g:e,b:i},n=1)=>ur.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},gr=[cr,ur,pr,mr];class fr extends hr{constructor(t,e,i,n){var r;super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,gr.find((t=>t.match(r)))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const t=dr(this.$text.value);t&&this._setValueFromHexString(t)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class _r extends hr{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class vr extends hr{constructor(t,e,i,n,r,s){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(r);const a=void 0!==s;this.step(a?s:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const e=parseFloat(this.$input.value);isNaN(e)||(this._snapClampSetValue(e+t),this.$input.value=this.getValue())};let e,i,n,r,s,a=!1;const o=t=>{if(a){const n=t.clientX-e,r=t.clientY-i;Math.abs(r)>5?(t.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>5&&h()}if(!a){const e=t.clientY-n;s-=e*this._step*this._arrowKeyMultiplier(t),r+s>this._max?s=this._max-r:r+s<this._min&&(s=this._min-r),this._snapClampSetValue(r+s)}n=t.clientY},h=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",h)};this.$input.addEventListener("input",(()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.key&&this.$input.blur(),"ArrowUp"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e))),"ArrowDown"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e)*-1))})),this.$input.addEventListener("wheel",(e=>{this._inputFocused&&(e.preventDefault(),t(this._step*this._normalizeMouseWheel(e)))}),{passive:!1}),this.$input.addEventListener("mousedown",(t=>{e=t.clientX,i=n=t.clientY,a=!0,r=this.getValue(),s=0,window.addEventListener("mousemove",o),window.addEventListener("mouseup",h)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const e=this.$slider.getBoundingClientRect();let i=((t,e,i,n,r)=>(t-e)/(i-e)*(r-n)+n)(t,e.left,e.right,this._min,this._max);this._snapClampSetValue(i)},e=e=>{t(e.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};let n,r,s=!1;const a=e=>{e.preventDefault(),this._setDraggingStyle(!0),t(e.touches[0].clientX),s=!1},o=e=>{if(s){const t=e.touches[0].clientX-n,i=e.touches[0].clientY-r;Math.abs(t)>Math.abs(i)?a(e):(window.removeEventListener("touchmove",o),window.removeEventListener("touchend",h))}else e.preventDefault(),t(e.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",o),window.removeEventListener("touchend",h)},l=this._callOnFinishChange.bind(this);let d;this.$slider.addEventListener("mousedown",(n=>{this._setDraggingStyle(!0),t(n.clientX),window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)})),this.$slider.addEventListener("touchstart",(t=>{t.touches.length>1||(this._hasScrollBar?(n=t.touches[0].clientX,r=t.touches[0].clientY,s=!0):a(t),window.addEventListener("touchmove",o,{passive:!1}),window.addEventListener("touchend",h))}),{passive:!1}),this.$slider.addEventListener("wheel",(t=>{if(Math.abs(t.deltaX)<Math.abs(t.deltaY)&&this._hasScrollBar)return;t.preventDefault();const e=this._normalizeMouseWheel(t)*this._step;this._snapClampSetValue(this.getValue()+e),this.$input.value=this.getValue(),clearTimeout(d),d=setTimeout(l,400)}),{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10);return e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class yr extends hr{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((t=>{const e=document.createElement("option");e.textContent=t,this.$select.appendChild(e)})),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}class br extends hr{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let wr=!1;class Ar{constructor({parent:t,autoPlace:e=void 0===t,container:i,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:a=!0,touchStyles:o=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),o&&this.domElement.classList.add("allow-touch-styles"),!wr&&a&&(!function(t){const e=document.createElement("style");e.innerHTML=t;const i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),wr=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,e,i,n,r){if(Object(i)===i)return new yr(this,t,e,i);switch(typeof t[e]){case"number":return new vr(this,t,e,i,n,r);case"boolean":return new lr(this,t,e);case"string":return new br(this,t,e);case"function":return new _r(this,t,e)}}addColor(t,e,i=1){return new fr(this,t,e,i)}addFolder(t){const e=new Ar({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach((e=>{e instanceof _r||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((e=>{e._title in t.folders&&e.load(t.folders[e._title])})),this}save(t=!0){const e={controllers:{},folders:{}};return this.controllers.forEach((t=>{if(!(t instanceof _r)){if(t._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((t=>{if(t._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);e.folders[t._title]=t.save()})),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");const i=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame((()=>{this.$children.style.height=n+"px"}))})),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach((t=>t.reset())),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((t=>t.destroy()))}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach((e=>{t=t.concat(e.controllersRecursive())})),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach((e=>{t=t.concat(e.foldersRecursive())})),t}}var xr,Mr={exports:{}};Mr.exports=(xr=function(){function t(t){return n.appendChild(t.dom),t}function e(t){for(var e=0;e<n.children.length;e++)n.children[e].style.display=e===t?"block":"none";i=t}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(t){t.preventDefault(),e(++i%n.children.length)}),!1);var r=(performance||Date).now(),s=r,a=0,o=t(new xr.Panel("FPS","#0ff","#002")),h=t(new xr.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=t(new xr.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){r=(performance||Date).now()},end:function(){a++;var t=(performance||Date).now();if(h.update(t-r,200),t>s+1e3&&(o.update(1e3*a/(t-s),100),s=t,a=0,l)){var e=performance.memory;l.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function(){r=this.end()},domElement:n,setMode:e}},xr.Panel=function(t,e,i){var n=1/0,r=0,s=Math.round,a=s(window.devicePixelRatio||1),o=80*a,h=48*a,l=3*a,d=2*a,c=3*a,u=15*a,p=74*a,m=30*a,g=document.createElement("canvas");g.width=o,g.height=h,g.style.cssText="width:80px;height:48px";var f=g.getContext("2d");return f.font="bold "+9*a+"px Helvetica,Arial,sans-serif",f.textBaseline="top",f.fillStyle=i,f.fillRect(0,0,o,h),f.fillStyle=e,f.fillText(t,l,d),f.fillRect(c,u,p,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(c,u,p,m),{dom:g,update:function(h,_){n=Math.min(n,h),r=Math.max(r,h),f.fillStyle=i,f.globalAlpha=1,f.fillRect(0,0,o,u),f.fillStyle=e,f.fillText(s(h)+" "+t+" ("+s(n)+"-"+s(r)+")",l,d),f.drawImage(g,c+a,u,p-a,m,c,u,p-a,m),f.fillRect(c+p-a,u,a,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(c+p-a,u,a,s((1-h/_)*m))}}},xr);var Cr=a(Mr.exports);class Er{gui;scene;mixer;clips=[];gridHelper;helpers=[];stats;orbitControls;flyControls;memoryIntervalId;constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.scene=t,this.mixer=e,this.clips=i,this.orbitControls=n.orbitControls,this.flyControls=n.flyControls,this.gui=new Ar({width:300}),this.addSceneFolder(),this.addLightsFolder(),this.addCamerasFolder(),this.addModelsFolder(),this.addAnimationsFolder(),this.addDisplayFolder(),this.addControlsFolder(),this.addPerformanceFolder()}addSceneFolder(){const e=this.gui.addFolder("Scene");e.close();const i={background:this.scene.background?.getHex?.()??0};e.addColor(i,"background").onChange((e=>{this.scene.background=new t.Color(e)})),this.scene.fog instanceof t.Fog&&(e.add(this.scene.fog,"near",.1,50).name("Fog Near"),e.add(this.scene.fog,"far",1,200).name("Fog Far"))}addLightsFolder(){const e=[];if(this.scene.traverse((t=>{t.isLight&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Lights");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(`${e.type} ${e.name||n}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");if(r.add({helper:!1},"helper").onChange((i=>{if(i){let i=null;e instanceof t.PointLight&&(i=new t.PointLightHelper(e)),e instanceof t.SpotLight&&(i=new t.SpotLightHelper(e)),e instanceof t.DirectionalLight&&(i=new t.DirectionalLightHelper(e)),e instanceof t.HemisphereLight&&(i=new t.HemisphereLightHelper(e,5)),i&&(this.scene.add(i),this.helpers.push(i))}else{const t=this.helpers.find((t=>t.light===e));t&&(this.scene.remove(t),this.helpers=this.helpers.filter((e=>e!==t)))}})),"intensity"in e&&r.add(e,"intensity",0,10,.01),"color"in e){const t={color:e.color.getHex()};r.addColor(t,"color").onChange((t=>{e.color.setHex(t)}))}"position"in e&&(r.add(e.position,"x",-50,50,.1),r.add(e.position,"y",-50,50,.1),r.add(e.position,"z",-50,50,.1))}))}addCamerasFolder(){const e=[];if(this.scene.traverse((t=>{t.isCamera&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Cameras");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Camera ${n+1}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.CameraHelper(e);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.CameraHelper&&i.camera===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e instanceof t.PerspectiveCamera&&(r.add(e,"fov",10,100).onChange((()=>e.updateProjectionMatrix())),r.add(e,"near",.1,10).onChange((()=>e.updateProjectionMatrix())),r.add(e,"far",10,2e3).onChange((()=>e.updateProjectionMatrix()))),e instanceof t.OrthographicCamera&&r.add(e,"zoom",.1,10).onChange((()=>e.updateProjectionMatrix()))}))}addModelsFolder(){const e=[];if(this.scene.traverse((t=>{t.isMesh&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Models");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Mesh ${n+1}`);r.close(),r.add(e.position,"x",-10,10,.1),r.add(e.position,"y",-10,10,.1),r.add(e.position,"z",-10,10,.1),r.add(e.rotation,"x",-Math.PI,Math.PI,.01),r.add(e.rotation,"y",-Math.PI,Math.PI,.01),r.add(e.rotation,"z",-Math.PI,Math.PI,.01),r.add(e.scale,"x",.1,10,.1),r.add(e.scale,"y",.1,10,.1),r.add(e.scale,"z",.1,10,.1);if(r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.BoxHelper(e,16711680);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.BoxHelper&&i.object===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e.morphTargetInfluences&&e.morphTargetDictionary){const t=r.addFolder("Morph Targets");Object.keys(e.morphTargetDictionary).forEach((i=>{const n=e.morphTargetDictionary[i];t.add(e.morphTargetInfluences,n,0,1,.01).name(i).listen()}))}}))}addAnimationsFolder(){if(!this.mixer||0===this.clips.length)return;const t=this.gui.addFolder("Animations");t.close();const e={};this.clips.forEach((t=>{e[t.name]=this.mixer.clipAction(t)}));const i={};Object.keys(e).forEach((n=>{i[n]=!1,t.add(i,n).listen().onChange((t=>{t?e[n].reset().play():e[n].stop()}))})),t.add({stopAll:()=>Object.values(e).forEach((t=>t.stop()))},"stopAll").name("Stop All")}addDisplayFolder(){const e=this.gui.addFolder("Display");e.close();const i={autoRotate:!!this.orbitControls&&this.orbitControls.autoRotate,wireframe:!1,grid:!1,skeleton:!1};this.orbitControls&&e.add(i,"autoRotate").onChange((t=>{this.orbitControls.autoRotate=t})),e.add(i,"grid").onChange((e=>{e?(this.gridHelper=new t.GridHelper(50,50),this.scene.add(this.gridHelper),this.helpers.push(this.gridHelper)):this.gridHelper&&(this.scene.remove(this.gridHelper),this.helpers=this.helpers.filter((t=>t!==this.gridHelper)))})),e.add(i,"wireframe").onChange((t=>{this.scene.traverse((e=>{if(e.isMesh){const i=e;Array.isArray(i.material)?i.material.forEach((e=>{"wireframe"in e&&(e.wireframe=t)})):"wireframe"in i.material&&(i.material.wireframe=t)}}))})),e.add(i,"skeleton").onChange((e=>{this.scene.traverse((i=>{if(i.isSkinnedMesh)if(e){const e=new t.SkeletonHelper(i);this.scene.add(e),this.helpers.push(e)}else{const e=this.helpers.find((e=>e instanceof t.SkeletonHelper&&e.root===i));e&&(this.scene.remove(e),this.helpers=this.helpers.filter((t=>t!==e)))}}))}))}addControlsFolder(){const t=this.gui.addFolder("Controls");t.close();const e={orbitControls:!!this.orbitControls,flyControls:!!this.flyControls};t.add(e,"orbitControls").listen().onChange((t=>{this.orbitControls&&(this.orbitControls.enabled=t)})),t.add(e,"flyControls").listen().onChange((t=>{this.flyControls&&(this.flyControls.enabled=t)}))}addPerformanceFolder(){this.stats=new Cr,this.stats.showPanel(0),document.body.appendChild(this.stats.dom);const t=this.gui.addFolder("Performance");t.close();const e={fps:"0",memory:"0 MB"},i=t.add(e,"fps").name("FPS").listen(),n=t.add(e,"memory").name("Memory").listen();this.memoryIntervalId=setInterval((()=>{performance.memory&&(e.memory=`${Math.round(performance.memory.usedJSHeapSize/1048576)} MB`)}),1e3),this.update=()=>{this.stats&&this.stats.update(),e.fps=this.stats?this.stats.dom.innerText.split("\n")[0]:"0",i.updateDisplay(),n.updateDisplay()}}update(){this.stats&&this.stats.update()}dispose(){this.memoryIntervalId&&(clearInterval(this.memoryIntervalId),this.memoryIntervalId=void 0),this.gui.destroy(),this.helpers.forEach((t=>this.scene.remove(t))),this.helpers=[],this.stats&&this.stats.dom.parentElement&&document.body.removeChild(this.stats.dom)}exportScene(){return{lights:this.scene.children.filter((t=>t.isLight)).map((t=>t.toJSON())),cameras:this.scene.children.filter((t=>t.isCamera)).map((t=>t.toJSON())),scene:this.scene.toJSON()}}getGUI(){return this.gui}}class Sr{config;_container;characterGroup;lightGroup;state;objectLoader=new t.ObjectLoader;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;isNotRender=!1;constructor(t){this.config=t.config,this._container=t.container,this.characterGroup=t.characterGroup,this.lightGroup=t.lightGroup,this.state=t.state}setConfig(t){this.config=t}setContainerRef(t){this._container=t}setGroups(t,e){this.characterGroup=t,this.lightGroup=e}getSnapshot(){return{container:this.container,scene:this.scene,camera:this.camera,renderer:this.renderer,controls:this.controls,width:this.width,height:this.height,isNotRender:this.isNotRender}}init(){if(this.resolveContainer(),!this.container)return;this.container.innerHTML="",this.syncContainerSize();const{scene:e,camera:i}=this.loadScene(this.config.scene);this.scene=e||new t.Scene,this.camera=this.loadCamera()||i||this.createDefaultCamera(),this.renderer=this.createRenderer(),this.setupRenderer(),this.setupGridHelper(),this.initLights(this.config.lights||[])}resolveContainer(){if(!this._container)return this.isNotRender=!0,void(this.container=null);this.isNotRender=!1,this.container="string"==typeof this._container?document.getElementById(this._container):this._container}handleResize(){this.resolveContainer(),this.container&&this.camera&&this.renderer&&(this.syncContainerSize(),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height))}createDefaultCamera(){const e="number"==typeof this.config.camera?.fov?this.config.camera.fov:45;return new t.PerspectiveCamera(e,this.width/this.height,.1,2e3)}createRenderer(){const e=new t.WebGLRenderer({antialias:!0,alpha:!0});return e.outputColorSpace=t.SRGBColorSpace,e.toneMapping=t.ACESFilmicToneMapping,e.toneMappingExposure=1,e}updateLight(){this.lightGroup.children.forEach((t=>{t.target&&(t.target.position.copy(this.characterGroup.position),t.updateMatrixWorld(!0))}))}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.scene&&(this.scene.add(this.lightGroup),t.forEach((t=>{if(t.metadata){const e=this.objectLoader.parse(t);this.lightGroup.add(e)}else this.setLight(t)})))}loadCamera(e){if(!e)return this.createDefaultCamera();if(e.metadata){const i=this.objectLoader.parse(e);return i instanceof t.PerspectiveCamera?i:void 0}return this.camera||(this.camera=this.createDefaultCamera()),this.setCamera(this.camera,e),this.camera}loadScene(e){if(!e)return{};const i=this.objectLoader.parse(e);let n;return i.traverse((e=>{e instanceof t.PerspectiveCamera&&(n=e)})),{scene:i,camera:n}}degree2Euler(e){return e.map((e=>t.MathUtils.degToRad(e)))}dataToMatrix4(e){const i=[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]],n=new t.Matrix4;return n.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]),n}setLight(e){const i=t=>{this.lightGroup.add(t)};switch(e.type){case"AmbientLight":{const n=e,r=new t.AmbientLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}case"DirectionalLight":{const n=e,r=new t.DirectionalLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position);r.castShadow=n.castShadow??!1,i(r);break}case"SpotLight":{const n=e,r=new t.SpotLight(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);if(r.target=this.characterGroup,n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}n.up&&r.up.set(...n.up),n.shadow&&(r.castShadow=n.castShadow??!0,n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.assign(r.shadow.camera,n.shadow.camera)),i(r);break}case"PointLight":{const n=e,r=new t.PointLight(n.color,n.intensity,n.distance,n.decay);if(r.castShadow=n.castShadow??!1,n.castShadow&&(r.receiveShadow=!0),n.shadow&&(n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.keys(n.shadow.camera).forEach((t=>{r.shadow.camera[t]=n.shadow.camera[t]}))),n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale);i(r);break}case"RectAreaLight":{const n=e,r=new t.RectAreaLight(n.color,n.intensity,n.width,n.height);r.position.set(5,5,0),n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale),i(r);break}case"HemisphereLight":{const n=e,r=new t.HemisphereLight(n.color??n.skyColor,n.groundColor,n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}}}setAngleView(e){var i=this;let{camera:n}=e;if(!this.camera)return;n.matrix&&function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=i.dataToMatrix4(e),s=new t.Vector3,a=new t.Quaternion,o=new t.Vector3;r.decompose(s,a,o),or.to(i.camera.position,{x:s.x,y:s.y,z:s.z,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),or.to(i.camera.quaternion,{x:a.x,y:a.y,z:a.z,w:a.w,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),or.to(i.characterGroup.rotation,{x:0,y:0,z:0,duration:n,ease:"power2.inOut"})}(n.matrix,n.duration)}initOrbitControls(){if(this.config.orbitControls||(this.config.orbitControls={}),this.camera&&this.renderer&&!1!==this.config.orbitControls.useOrbitControl)if(this.controls=new h(this.camera,this.renderer.domElement),this.controls.enableZoom=this.config.orbitControls.enableZoom||!0,this.controls.enablePan=this.config.orbitControls.enablePan||!0,void 0!==this.config.orbitControls.minPolarAngle&&(this.controls.minPolarAngle=this.config.orbitControls.minPolarAngle),void 0!==this.config.orbitControls.maxPolarAngle&&(this.controls.maxPolarAngle=this.config.orbitControls.maxPolarAngle),void 0!==this.config.orbitControls.minAzimuthAngle&&(this.controls.minAzimuthAngle=this.config.orbitControls.minAzimuthAngle),void 0!==this.config.orbitControls.maxAzimuthAngle&&(this.controls.maxAzimuthAngle=this.config.orbitControls.maxAzimuthAngle),this.controls.minDistance=this.config.orbitControls.minDistance||1,this.controls.maxDistance=this.config.orbitControls.maxDistance||10,this.config.orbitControls.target)this.controls.target.fromArray(this.config.orbitControls.target);else{const e=(new t.Box3).setFromObject(this.characterGroup),i=new t.Vector3;e.getCenter(i),this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.controls.target.set(i.x,i.y+.5,i.z)}}setCamera(t,e){if(!t)return;const{position:i,rotation:n,matrix:r,fov:s}=e;if(this.state.updateCamera=!0,s&&(t.fov=s),r){const e=this.dataToMatrix4(r);t.matrixAutoUpdate=!1,t.matrix.copy(e),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.matrixAutoUpdate=!0}else i&&t.position.set(...i),n&&t.rotation.set(...this.degree2Euler(n));this.state.updateCamera=!1}syncContainerSize(){this.container&&(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight)}setupRenderer(){this.renderer&&this.container&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setClearColor(0,0),this.container.appendChild(this.renderer.domElement))}setupGridHelper(){if(!this.config.gridHelper)return;const{size:e=10,divisions:i=10,color1:n="",color2:r=""}=this.config.gridHelper,s=new t.GridHelper(e,i,n,r);this.characterGroup.add(s)}}class kr{config;container;characterGroup;state;getAnimationFrameId;constructor(t){this.config=t.config,this.container=t.container,this.characterGroup=t.characterGroup,this.state=t.state,this.getAnimationFrameId=t.getAnimationFrameId}setConfig(t){this.config=t}setContainer(t){this.container=t}setCharacterGroup(t){this.characterGroup=t}registerListeners(){this.container&&this.config.model?.rotate&&!1===this.config.orbitControls?.useOrbitControl&&(this.container.addEventListener("mousedown",this.mousedown),this.container.addEventListener("mouseup",this.mouseup),this.container.addEventListener("mousemove",this.mousemove),this.container.addEventListener("touchstart",this.mousedown),this.container.addEventListener("touchend",this.mouseup),this.container.addEventListener("touchmove",this.mousemove))}removeEventListeners(){this.container&&(this.container.removeEventListener("mousedown",this.mousedown),this.container.removeEventListener("mouseup",this.mouseup),this.container.removeEventListener("mousemove",this.mousemove),this.container.removeEventListener("touchstart",this.mousedown),this.container.removeEventListener("touchend",this.mouseup),this.container.removeEventListener("touchmove",this.mousemove))}mousedown=t=>{this.state.isMouseDown=!0;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY),this.state.previousMousePosition={x:e,y:i}};mouseup=()=>{this.state.isMouseDown=!1,this.state.previousMousePosition={x:0,y:0}};mousemove=t=>{if(!this.state.isMouseDown||!this.getAnimationFrameId())return;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY);const n=e-this.state.previousMousePosition.x,r=i-this.state.previousMousePosition.y;this.characterGroup.rotation.y+=.01*n;const s=this.characterGroup.rotation.x+.01*r;if(r>0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.minPolarAngle&&this.config.orbitControls.minPolarAngle>=0){const t=Math.min(1*this.config.orbitControls.minPolarAngle,Math.PI);Math.PI/2-s>=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.min(s,Math.PI/2);else if(r<0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.maxPolarAngle&&this.config.orbitControls.maxPolarAngle>=0){const t=1*this.config.orbitControls.maxPolarAngle;Math.PI/2-s<=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.max(s,-Math.PI/2);this.state.previousMousePosition={x:e,y:i}}}class Tr{scene=null;camera=null;renderer=null;width=1;height=1;bgScene=null;bgCamera=null;videoElement=null;videoTexture=null;videoMesh=null;setRuntimeRefs(t){let{scene:e,camera:i,renderer:n,width:r,height:s}=t;this.scene=e,this.camera=i,this.renderer=n,this.width=r,this.height=s,this.videoMesh&&this.videoTexture&&this.updateVideoMesh()}renderBackground(){this.bgScene&&this.bgCamera&&this.renderer&&(this.renderer.autoClear=!1,this.renderer.clear(),this.renderer.render(this.bgScene,this.bgCamera))}prepareFrame(){this.videoMesh&&this.updateVideoMesh()}setBackground(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!this.scene)return;(new l).load(e,(e=>{e.mapping=t.EquirectangularReflectionMapping,this.scene&&(this.scene.background=e,this.scene.environment=e)}))}setVideoBackground(e){if(!this.scene||!this.camera)return;const i=document.createElement("video");i.crossOrigin="anonymous",i.src=e,i.loop=!0,i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.play();const n=new t.VideoTexture(i);n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter;const r=new t.PlaneGeometry(1,1),s=new t.MeshBasicMaterial({map:n}),a=new t.Mesh(r,s);this.videoElement=i,this.videoTexture=n,this.videoMesh=a,this.scene.add(a),this.updateVideoMesh()}loadCubeBackground(e){if(0===e.length)return;if(1===e.length)return void this.loadSingleBackground(e[0]);if(6!==e.length)return;const i=(new t.CubeTextureLoader).load(e);this.scene&&(this.scene.background=i)}updateBackgroundSize(t,e){if(!(this.bgScene&&this.bgCamera&&this.renderer&&t.image))return;this.renderer.setSize(this.width,this.height);const i=t.image.width/t.image.height,n=this.width/this.height,r=e.material;if(n>i){const t=n/i;r.map?.repeat.set(1,1/t),r.map?.offset.set(0,0)}else{const t=i/n;r.map?.repeat.set(1/t,1),r.map?.offset.set((1-1/t)/2,0)}e.scale.set(1,1,1),r.map&&(r.map.needsUpdate=!0)}setBackgroundColorOrGradient(e){this.scene&&(e.startsWith("linear-gradient")?this.setGradientBackground(e):this.scene.background=new t.Color(e))}destroy(){this.videoMesh&&this.scene&&this.scene.remove(this.videoMesh),this.videoMesh?.geometry&&this.videoMesh.geometry.dispose();const t=this.videoMesh?.material;t?.dispose(),this.videoTexture?.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.videoElement=null,this.videoTexture=null,this.videoMesh=null,this.bgScene=null,this.bgCamera=null}loadSingleBackground(e){const i=new t.TextureLoader;this.bgScene=new t.Scene,this.bgCamera=new t.OrthographicCamera(-1,1,1,-1,0,1),i.load(e,(e=>{e.colorSpace=t.SRGBColorSpace;const i=new t.MeshBasicMaterial({map:e,depthTest:!1,depthWrite:!1,transparent:!1,side:t.DoubleSide}),n=new t.Mesh(new t.PlaneGeometry(2,2),i);this.bgScene.add(n),this.updateBackgroundSize(e,n)}))}setGradientBackground(e){if(!this.scene)return;const i=document.createElement("canvas");i.width=this.width,i.height=this.height;const n=i.getContext("2d");if(!n)return;const r=e.match(/linear-gradient\(([^,]+),\s*(.+)\)/);if(!r)return;const s=r[2].split(",").map((t=>t.trim())),a=n.createLinearGradient(0,0,i.width,i.height);s.forEach(((t,e)=>{a.addColorStop(e/(s.length-1),t)})),n.fillStyle=a,n.fillRect(0,0,i.width,i.height);const o=new t.CanvasTexture(i);this.scene.background=o}updateVideoMesh(){if(!this.videoMesh||!this.camera)return;const e=2*Math.tan(t.MathUtils.degToRad(this.camera.fov/2))*10,i=e*this.camera.aspect;this.videoMesh.geometry.dispose(),this.videoMesh.geometry=new t.PlaneGeometry(i,e);const n=new t.Vector3;this.camera.getWorldDirection(n),this.videoMesh.position.copy(this.camera.position).add(n.multiplyScalar(10)),this.videoMesh.lookAt(this.camera.position)}}class Lr{action;listener={};config={};constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.action=t,this.listener={},this.config=e({timeBeforeFinished:1},i)}on(t,e){this.listener[t]=e}update(t){const{loop:e,time:i,_loopCount:n,repetitions:r}=this.action;if(2201===e&&(r===1/0||r-n!=1))return;const s=this.action.getClip().duration,a=s-this.config.timeBeforeFinished,o=this.listener.beforeFinished;o&&i>=a&&i<a+t&&(Reflect.deleteProperty(this.listener,"beforeFinished"),o(this.action));const h=this.listener.finished;h&&i>=s&&i<s+t&&(Reflect.deleteProperty(this.listener,"finished"),h(this.action))}}class Or{config;emit;animationGroup=new t.AnimationObjectGroup;animations=[];actions=[];animationMixer=null;onAnimationFinishedBound=()=>{};actionDefaultMap=new Map;currentTalkAnimations=[];muteActionState=!1;actionNotifier=null;constructor(t){this.config=t.config,this.emit=t.emit}setConfig(t){this.config=t}addAnimationTarget(t){this.animationGroup.add(t)}addAnimations(t){t.forEach((t=>{this.animations.push(t),t.code.includes("_idle")?this.actionDefaultMap.has("idle")?this.actionDefaultMap.get("idle").push(t.code):this.actionDefaultMap.set("idle",[t.code]):t.code.includes("_talk")&&(this.actionDefaultMap.has("talk")?this.actionDefaultMap.get("talk").push(t.code):this.actionDefaultMap.set("talk",[t.code]))}))}initializeMixer(){this.animationMixer&&(this.animationMixer.stopAllAction(),this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound)),this.animationMixer=new t.AnimationMixer(this.animationGroup),this.actions=this.animations.map((t=>{const e=this.animationMixer.clipAction(t.animation);return{name:t.animation.name,code:t.code,action:e,animation:t.animation,type:t.type,text:t.text}})),this.onAnimationFinishedBound=this.animationFinished.bind(this),this.animationMixer.addEventListener("finished",this.onAnimationFinishedBound)}update(t){if(!this.animationMixer)return;this.animationMixer.update(t);(this.animationMixer._actions||[]).forEach((t=>{(0===t.weight||t.paused)&&t.stop()})),this.actionNotifier?.update(t)}playAction=i((()=>{var i=this;return function(n){let r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(n)){if(0===n.length)return;n.some((t=>t.includes("talk")))&&(i.currentTalkAnimations=n),r=n[Math.floor(Math.random()*n.length)]}else r=n;if(i.muteActionState&&"idle"!==r&&"talk"!==r)return;const a=e(s),o="idle"===r?i.getDefaultAniCode("idle"):"talk"===r?i.getDefaultAniCode("talk"):r,h=i.actions.find((t=>t.code===o));if(h)try{const{action:e}=h,s=i.actions.find((t=>t.action.isRunning()));if(s&&s.action===e)return;const o=r.includes("talk")&&void 0===a.loop;a.loop===t.LoopRepeat||o?e.loop=t.LoopRepeat:(e.loop=t.LoopOnce,e.clampWhenFinished=!0),a.repetitions?e.setLoop(a.loop,a.repetitions):o&&e.setLoop(t.LoopRepeat,Number.MAX_SAFE_INTEGER),e.timeScale=1;const l=a.fadeDuration||.5;s&&s.action!==e?(s.action.fadeOut(l),e.reset().fadeIn(l).play()):e.reset().fadeIn(l).play(),i.animationMixer?.update(0),i.actionNotifier=new Lr(e),i.actionNotifier.on("beforeFinished",(s=>{i.emit("action.beforeFinished",n),r.includes("talk")||e.loop!==t.LoopOnce||r.includes("idle")||setTimeout((()=>{i.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER})}),100)}))}catch(t){}}})(),50,{leading:!0});stopAllActionExcludeIdle(){}stopAllAction(){this.actions.forEach((t=>{t.action.stop(),t.action.reset()}))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.playAction("idle"),this.muteActionState=t}getModelInfo(t){const e=[],i=t=>{t.children.forEach((t=>{t.isGroup?i(t):e.push(t)}))};return i(t),{actor:t,scenes:e,animations:this.animations.map((t=>t.animation)),mixer:this.animationMixer,actions:this.actions}}getAnimations(){return this.animations}getMixer(){return this.animationMixer}destroy(){this.stopAllAction(),this.animationMixer&&(this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound),this.animationMixer=null),this.animations=[],this.actions=[],this.actionDefaultMap.clear(),this.currentTalkAnimations=[],this.actionNotifier=null,this.muteActionState=!1,this.animationGroup=new t.AnimationObjectGroup}getDefaultAniCode(t){const e=this.actionDefaultMap.get(t)||[];return 0===e.length?null:1===e.length?e[0]:e[Math.floor(Math.random()*e.length)]}animationFinished(t){const{action:e,type:i}=t;if("finished"===i&&e._clip?.name){if(e._clip.name.indexOf("idle")>=0)return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER});if(e._clip.name.indexOf("talk")>=0)return;return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER})}}}class Rr{getBody;serverShapes=[];isPlayingServerShapes=!1;mouthBlendWeight=0;constructor(t){this.getBody=t.getBody}playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.serverShapes=t,this.isPlayingServerShapes?this.mouthBlendWeight=1:(this.isPlayingServerShapes=!0,or.to(this,{mouthBlendWeight:1,duration:.15,ease:"power2.out"}))}stopServerShapes(){this.isPlayingServerShapes&&or.to(this,{mouthBlendWeight:0,duration:.3,ease:"power2.inOut",onComplete:()=>{this.isPlayingServerShapes=!1,this.serverShapes=[]}})}applyBlendShapes(){if(!this.isPlayingServerShapes||0===this.serverShapes.length)return;const t=this.getBody();Object.entries(t).forEach((t=>{let[,e]=t;if(!e.mesh||!e.mesh.morphTargetInfluences||!e.mesh.morphTargetDictionary)return;const i=e.mesh.morphTargetDictionary,{prefix:n="",suffix:r=""}=e;for(const[t,s]of Object.entries(i)){const i=t.replace(n,"").replace(r,"");if(i.includes("eyeBlink")||i.includes("eyeWide")||i.includes("eyeSquint"))continue;const a=e.mesh.morphTargetInfluences[s],o=this.getShapeIndex(i);if(o>=0&&o<this.serverShapes.length){const t=this.serverShapes[o];e.mesh.morphTargetInfluences[s]=a*(1-this.mouthBlendWeight)+t*this.mouthBlendWeight}}}))}destroy(){or.killTweensOf(this),this.serverShapes=[],this.isPlayingServerShapes=!1,this.mouthBlendWeight=0}getShapeIndex(t){return["eyeBlinkLeft","eyeLookDownLeft","eyeLookInLeft","eyeLookOutLeft","eyeLookUpLeft","eyeSquintLeft","eyeWideLeft","eyeBlinkRight","eyeLookDownRight","eyeLookInRight","eyeLookOutRight","eyeLookUpRight","eyeSquintRight","eyeWideRight","jawForward","jawLeft","jawRight","jawOpen","mouthClose","mouthFunnel","mouthPucker","mouthLeft","mouthRight","mouthSmileLeft","mouthSmileRight","mouthFrownLeft","mouthFrownRight","mouthDimpleLeft","mouthDimpleRight","mouthStretchLeft","mouthStretchRight","mouthRollLower","mouthRollUpper","mouthShrugLower","mouthShrugUpper","mouthPressLeft","mouthPressRight","mouthLowerDownLeft","mouthLowerDownRight","mouthUpperUpLeft","mouthUpperUpRight","browDownLeft","browDownRight","browInnerUp","browOuterUpLeft","browOuterUpRight","cheekPuff","cheekSquintLeft","cheekSquintRight","noseSneerLeft","noseSneerRight","tongueOut"].indexOf(t)}}class Fr{config;animationManager;getScene;getCharacterGroup;getBody;setBody;loader;ktx2Loader;model=new Map;constructor(t){this.config=t.config,this.animationManager=t.animationManager,this.getScene=t.getScene,this.getCharacterGroup=t.getCharacterGroup,this.getBody=t.getBody,this.setBody=t.setBody,this.ktx2Loader=this.createKTX2Loader(),this.loader=this.createGLTFLoader()}setConfig(t){this.config=t}detectTextureSupport(t){this.ktx2Loader.detectSupport(t)}getModelMap(){return this.model}changeBundle(t){this.loader.parse(t.buffer,"",(t=>{this.getScene()?.add(t.scene)}),(t=>{}))}loadBundles(t,e){const i=[],n={};return t.forEach((r=>{n[r.bundle]={url:r.bundle,progress:0,total:0},i.push(new Promise(((i,s)=>{this.loader.parse(r.buffer,"",(s=>{i({...r,gltf:s}),function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[i]={url:i,progress:r,total:s};let a=0,o=0;t.forEach((t=>{let{bundle:e}=t;a+=n[e].total,o+=n[e].progress}));const h=Math.floor(o/a*100);e(h)}(r.bundle,1,1)}),(t=>{s("Error loading GLB model")}))})))})),Promise.all(i).then((t=>(t.forEach((t=>this.mountRecord(t))),this.animationManager.initializeMixer(),t)))}loadGLBModel(t){(new d).load(t,(t=>{this.getScene()?.add(t.scene)}))}loadLowResTexture(e){const i=new t.TextureLoader;return new Promise((n=>{i.load(e,(e=>{e.minFilter=t.LinearFilter,e.generateMipmaps=!1,n(e)}))}))}addModel(t,e){const i=new d,n=new p;n.setDecoderPath(`${this.config.dracoPath}`),n.setDecoderConfig({type:"js"}),i.setDRACOLoader(n),i.load(e,(e=>{const i=e.scene;i.name=t,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1);const n=this.getScene();n&&(n.traverse((t=>{t.isMesh})),n.children[1]?.children[1]?.children[0]?.add(i.children[0]))}),void 0,(t=>{}))}destroyModel(t,e){const i=this.getScene();if(!i)return;const n=[];i.traverse((t=>{if(t.isMesh){-1!==t.name.toLowerCase().indexOf("cloth")&&(t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach((t=>{t&&t.isMaterial&&e(t)})):t.material&&t.material.isMaterial&&e(t.material),t.parent&&n.push(t))}})),n.forEach((t=>{t.parent?.remove(t)}));const r=t.indexOf("apose_cloth");-1!==r&&t.substring(r)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return new Promise(((i,n)=>{this.loader.load(t,(t=>i(t)),e,(t=>{n(t)}))}))}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.loadGlb(t,e).then((t=>(this.getScene()?.add(t.scene),t)))}destroy(){this.model.clear(),this.loader=null,this.ktx2Loader&&(this.ktx2Loader.dispose(),this.ktx2Loader=null)}createGLTFLoader(){const t=new d,e=new p;return e.setDecoderPath(this.config.dracoPath||"draco/"),t.setKTX2Loader(this.ktx2Loader),t.setMeshoptDecoder(u),t.setDRACOLoader(e),t}createKTX2Loader(){const t=new c;return t.setTranscoderPath("three/examples/jsm/libs/basis/"),t}cloneTrack(e,i){return new t.NumberKeyframeTrack(i,e.times.slice(),e.values.slice())}mountRecord(t){let{code:e,gltf:i,name:n,type:r}=t;if(!i)return;const s=i.scene;s.name=e,"apose"===r?this.mountAposeScene(s):"animation"!==r&&"animation_system"!==r||this.registerAnimationClips({code:e,name:n,type:r,gltf:i}),this.model.set(e,i),this.bindBodyMeshes(e,s)}mountAposeScene(e){this.getCharacterGroup()?.add(e),this.animationManager.addAnimationTarget(e),e.traverse((e=>{e.isMesh&&(e.material.side=t.DoubleSide)}))}registerAnimationClips(t){let{code:e,name:i,type:n,gltf:r}=t;r.animations.forEach((t=>{const e=t.tracks.findIndex((t=>"BS_Mod.morphTargetInfluences"===t.name));if(e>=0){const i=t.tracks[e],n=this.config.model?.body.options.find((t=>t.key.startsWith("Head_Mod"))),r=this.config.model?.body.options.find((t=>t.key.startsWith("Eyelashes_Mod")));if(n&&r){const s=this.cloneTrack(i,`${n.key}.morphTargetInfluences`),a=this.cloneTrack(i,`${r.key}.morphTargetInfluences`);t.tracks.splice(e,1),t.tracks.push(s,a)}}}));const s=r.animations.map((t=>({code:e,animation:t,type:n,text:i})));this.animationManager.addAnimations(s)}bindBodyMeshes(t,e){if(t!==this.config.model?.body.name&&!t.includes("_mesh_body"))return;const i={...this.getBody()};this.config.model?.body.options.forEach((t=>{i[t.key]={...t,mesh:e.getObjectByName(t.name)}})),this.setBody(i)}}class Dr{cleanMaterial(t){const e=t=>{["map","lightMap","bumpMap","normalMap","specularMap","envMap","aoMap","emissiveMap","metalnessMap","roughnessMap","alphaMap","displacementMap"].forEach((e=>{t[e]&&t[e].dispose()})),t.dispose()};Array.isArray(t)?t.forEach((t=>e(t))):e(t)}cleanupScene(t){t&&t.traverse((t=>{t.isMesh&&(t.geometry?.dispose(),t.material&&this.cleanMaterial(t.material))}))}}class Pr extends n{animationFrameId=0;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;depth=10;config;isNotRender=!1;clock=null;body={};characterGroup=new t.Group;lightGroup=new t.Group;state={};onWindowResizeBound=null;rotationCenter=new t.Vector3(0,0,0);_container="";gui=null;humanObj;sceneManager;interactionManager;backgroundManager;animationManager;blendShapeManager;modelRuntime;resourceCleaner;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;super(),this.humanObj=n,this.config=i,this._container=e,this.sceneManager=new Sr({config:this.config,container:this._container,characterGroup:this.characterGroup,lightGroup:this.lightGroup,state:this.state}),this.interactionManager=new kr({config:this.config,container:this.container,characterGroup:this.characterGroup,state:this.state,getAnimationFrameId:()=>this.animationFrameId}),this.backgroundManager=new Tr,this.animationManager=new Or({config:this.config,emit:(t,e)=>this.emit(t,e)}),this.blendShapeManager=new Rr({getBody:()=>this.body}),this.modelRuntime=new Fr({config:this.config,animationManager:this.animationManager,getScene:()=>this.scene,getCharacterGroup:()=>this.characterGroup,getBody:()=>this.body,setBody:t=>{this.body=t}}),this.resourceCleaner=new Dr,this.setContainer(),this.isNotRender||this.init(),this.config.debug&&(window.THREE=t)}syncSceneRuntime(){const t=this.sceneManager.getSnapshot();this.container=t.container,this.scene=t.scene,this.camera=t.camera,this.renderer=t.renderer,this.controls=t.controls,this.width=t.width,this.height=t.height,this.isNotRender=t.isNotRender,this.interactionManager.setContainer(this.container),this.interactionManager.setCharacterGroup(this.characterGroup),this.backgroundManager.setRuntimeRefs({scene:this.scene,camera:this.camera,renderer:this.renderer,width:this.width,height:this.height})}init(){this.sceneManager.setConfig(this.config),this.sceneManager.setContainerRef(this._container),this.sceneManager.setGroups(this.characterGroup,this.lightGroup),this.interactionManager.setConfig(this.config),this.interactionManager.setCharacterGroup(this.characterGroup),this.animationManager.setConfig(this.config),this.modelRuntime.setConfig(this.config),this.sceneManager.init(),this.syncSceneRuntime(),this.renderer&&(this.clock=new t.Clock,this.modelRuntime.detectTextureSupport(this.renderer),this.onWindowResizeBound=this.onWindowResize.bind(this),window.addEventListener("resize",this.onWindowResizeBound,!1))}createDefaultCamera(){return this.sceneManager.createDefaultCamera()}createRenderer(){return this.sceneManager.createRenderer()}setContainer(){this.sceneManager.setContainerRef(this._container),this.sceneManager.resolveContainer(),this.syncSceneRuntime()}updateLight(){this.sceneManager.updateLight()}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.sceneManager.initLights(t),this.syncSceneRuntime()}loadCamera(t){const e=this.sceneManager.loadCamera(t);return this.syncSceneRuntime(),e}loadScene(t){return this.sceneManager.loadScene(t)}degree2Euler(t){return this.sceneManager.degree2Euler(t)}dataToMatrix4(t){return this.sceneManager.dataToMatrix4(t)}setLight(t){this.sceneManager.setLight(t)}setAngleView(t){let{camera:e}=t;this.sceneManager.setAngleView({camera:e})}async gsapContainer(t){return new Promise((e=>this.container?t.attr?(cancelAnimationFrame(this.animationFrameId),this.container.offsetWidth,this.container.offsetHeight,void or.to(this.container,{duration:1,ease:"power2.inOut",...t.attr,onUpdate:()=>{const t=or.getProperty(this.container,"width"),e=or.getProperty(this.container,"height");this.width=parseFloat(`${t}`),this.height=parseFloat(`${e}`),this.renderer?.setSize(this.width,this.height),this.renderer?.render(this.scene,this.camera)},onComplete:()=>{this.onWindowResize(),this.animate(),e(!0)}})):void e(!1):e(!1)))}initOrbitControls(){this.sceneManager.initOrbitControls(),this.syncSceneRuntime()}setBackground(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.backgroundManager.setBackground(t)}loadGLBModel(t){this.modelRuntime.loadGLBModel(t)}loadLowResTexture(t){return this.modelRuntime.loadLowResTexture(t)}changeBundle(t){this.modelRuntime.changeBundle(t)}loadBundles(e,i){return this.modelRuntime.loadBundles(e,i).then((e=>{if(!this.isNotRender){const{scale:e,position:i,rotation:n}=this.config.model||{};e&&this.characterGroup.scale.set(...e),i&&this.characterGroup.position.set(...i),n&&this.characterGroup.rotation.set(t.MathUtils.degToRad(n[0]),t.MathUtils.degToRad(n[1]),t.MathUtils.degToRad(n[2])),this.initOrbitControls(),this.loadCamera(this.config.camera),this.onWindowResize(),this.interactionManager.registerListeners()}this.emit("core.bundles.loaded",e)})).then((()=>{const t=this.animationManager.getMixer();return this.config.debug&&t&&(this.gui=new Er(this.scene,t,this.animationManager.getAnimations().map((t=>t.animation)))),!0})).catch((t=>!1))}onWindowResize=i((()=>{this.sceneManager.handleResize(),this.syncSceneRuntime()}),300,{leading:!0});setCamera(t,e){this.sceneManager.setCamera(t,e)}animate(){if(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),!(this.clock&&this.renderer&&this.scene&&this.camera))return;const t=this.clock.getDelta();this.animationManager.update(t),this.blendShapeManager.applyBlendShapes(),this.controls?.update(),this.backgroundManager.prepareFrame(),this.backgroundManager.renderBackground(),this.renderer.render(this.scene,this.camera)}startRender(){this.characterGroup&&this.scene&&!this.animationFrameId&&(this.animationManager.getMixer()&&this.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER}),this.scene.remove(this.characterGroup),this.scene.add(this.characterGroup),this.animate())}stopRender(){this.animationFrameId&&this.characterGroup&&this.scene&&(this.scene.remove(this.characterGroup),this.animationManager.stopAllAction(),setTimeout((()=>{cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0}),100))}gsapMorph(t,e,i){const n={duration:.3,ease:"easy",onComplete:()=>{}};e.forEach(((t,e)=>{n[e]=t})),or.to(t,n)}playAction=(()=>{var t=this;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.animationManager.playAction(e,i)}})();stopAllActionExcludeIdle(){this.animationManager.stopAllActionExcludeIdle()}stopAllAction(){this.animationManager.stopAllAction()}cleanMaterial(t){this.resourceCleaner.cleanMaterial(t)}destroy(){this.isNotRender||(this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.animationManager.destroy(),this.interactionManager.removeEventListeners(),this.onWindowResizeBound&&(window.removeEventListener("resize",this.onWindowResizeBound,!1),this.onWindowResizeBound=null),this.backgroundManager.destroy(),this.blendShapeManager.destroy(),this.modelRuntime.destroy(),this.controls&&(this.controls.dispose(),this.controls=null),this.resourceCleaner.cleanupScene(this.scene),this.gui?.dispose(),this.gui=null,this.renderer?.dispose(),this.renderer?.domElement?.parentNode&&this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.clearReferences())}clearReferences(){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.body={},this.characterGroup=new t.Group,this.lightGroup=new t.Group,this.interactionManager.setCharacterGroup(this.characterGroup),this.sceneManager.setGroups(this.characterGroup,this.lightGroup)}async playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.blendShapeManager.playByShapes(t,e)}stopServerShapes(){this.blendShapeManager.stopServerShapes()}addModel(t,e){this.modelRuntime.addModel(t,e)}destoryModel(t){this.modelRuntime.destroyModel(t,(t=>this.cleanMaterial(t)))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.animationManager.muteAction(t)}getModelInfo(){return this.animationManager.getModelInfo(this.characterGroup)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.loadGlb(t,e)}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.addGlb(t,e)}setCharacterCenter(){if(!this.characterGroup)return;const e=this.characterGroup.children.find((t=>t.name.includes("body")));if(!e)return;const i=(new t.Box3).setFromObject(e).getCenter(new t.Vector3);this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.characterGroup.position.add(i)}setVideoBackground(t){this.backgroundManager.setVideoBackground(t)}loadCubeBackground(t){this.backgroundManager.loadCubeBackground(t)}updateBackgroundSize(t,e){this.backgroundManager.updateBackgroundSize(t,e)}setBackgroundColorOrGradient(t){this.backgroundManager.setBackgroundColorOrGradient(t)}}class Br{hm;animationFrameId=0;container;scene;width;height;depth=1e3;zAxisNumber;camera;renderer;sphere;parameters=[];materials=[];particles_init_postion;zprogress;zprogress_second;particles_first=[];particles_second=[];constructor(e,i){this.hm=i,this.container="string"==typeof e?document.getElementById(e):e,this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4);const n=this.height/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.max(n-this.depth/2,this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0),this.initLight(),this.particles_init_postion=-this.zAxisNumber-this.depth/2,this.zprogress=this.particles_init_postion,this.zprogress_second=2*this.particles_init_postion,this.particles_first=this.initSceneStar(this.particles_init_postion),this.particles_second=this.initSceneStar(this.zprogress_second),this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement),this.initOrbitControls(),this.animate(),this.hm.on(o.HUMAN_LOAD_PROGRESS,this.onProgress),this.initProgressBar()}initProgressBar(){const t=document.createElement("div");t.id="loadingContainer",t.className="loading-container w-full h-full bg-[#000]",t.style.width="100%",t.style.height="100%";const e=document.createElement("div");e.className="bottom-20 flex justify-center left-0 absolute w-full items-center flex-col",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column",e.style.position="absolute",e.style.left="0px",e.style.bottom="5rem",e.style.width="100%";const i=document.createElement("div");i.className="qt-progress-wrap w-3/4 h-[0.375rem] bg-[rgba(255,249,249,0.2)] rounded-1 overflow-hidden",i.style.backgroundColor="rgba(255,249,249,0.2)",i.style.height="0.375rem",i.style.width="75%",i.style.overflow="hidden",i.style.borderRadius=".25rem";const n=document.createElement("div");n.className="qt-progress w-[10%] h-[0.375rem] bg-white rounded-1",n.id="qtprogress",n.style.backgroundColor="rgb(255,255,255,1)",n.style.height="0.375rem",n.style.width="0",n.style.transition="width linear 0.3s",n.style.borderRadius=".25rem",i.appendChild(n),e.appendChild(i),t.appendChild(e);const r=document.createElement("div");r.className="text-white mt-4 text-sm",r.textContent="正在加载...",r.id="qtprogresstext",r.style.color="rgb(255,255,255,1)",r.style.fontSize="0.875rem",r.style.lineHeight="1.25rem",r.style.marginTop="1rem",e.appendChild(r),this.container.appendChild(t)}initScene(){this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4)}initCamera(){const e=this.width/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.floor(e-this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0)}initRenderer(){this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement)}initOrbitControls(){const t=new m(this.camera,this.renderer.domElement);t.enabled=!1,t.update()}animate(){this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),this.renderStarMove(),this.renderer.render(this.scene,this.camera)}initLight(){const e=new t.AmbientLight(16777215);this.scene.add(e);const i=new t.PointLight(415229,5,0);i.position.set(50,50,50),this.scene.add(i)}renderSphereRotate(){this.sphere.rotateY(.01)}initSceneStar(e){const i=new t.BufferGeometry,n=[],s=new t.TextureLoader,a=s.load("data:image/png;base64,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"),o=s.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU9JREFUOBGlk0tLQzEQRm/qFav4AKUrQXEpgv//j4jLYtWVWJ/46K2N54RMudSdHTh0msw3mWTmpmbFcs4DlhL4K9qiklNK+kszsBhC/Q3YhCFsVZ+fpoNv+Kr+D4kyfjmpqeKW/9twAEdwCDugfcAUHuEFPmFuEkWaJysewQmcwTGYTHuFOxjDBB7ApPO23tmyDVZ8CRfV7ye4YW0PtBl0aBdW4N29s2V7smKTnMMuaO8Qyd7wn+raLF7aB/POln0Kivch9vVdc88YY9UMDLACr+CDeYrEybhLcy32jVWTTLCWmcB+2mdf1RaJd14112LfWDVl6pwsh2QK9+BrX4Otc0/0XXPPGGPVlC5YgRPmkIwhWvWM7501Eyi+AmOMVZNbZ5t+Wo7lTUCzVbfQT9AfJGM7tXZgrVEuCXpJ/vcxmSCsjraJ7VC0OR7zz+f8C54rgrcYdoUhAAAAAElFTkSuQmCC");this.parameters=[[[.6,100,.75],a,50],[[0,0,1],o,20]];for(let e=0;e<500;e++){const e=t.MathUtils.randFloatSpread(this.width),i=r(0,3*this.height/5),s=r(-this.depth/2,this.zAxisNumber);n.push(e,i,s)}i.setAttribute("position",new t.Float32BufferAttribute(n,3));const h=[];for(let n=0;n<this.parameters.length;n++){const r=this.parameters[n][0],s=this.parameters[n][1],a=this.parameters[n][2];this.materials[n]=new t.PointsMaterial({size:a,map:s,blending:t.AdditiveBlending,transparent:!0,depthTest:!1}),this.materials[n].color.setHSL(r[0],r[1],r[2]);const o=new t.Points(i,this.materials[n]);o.rotation.x=.2*Math.random()-.15,o.rotation.y=.2*Math.random()-.15,o.rotation.z=.2*Math.random()-.15,o.position.setZ(e),h.push(o),this.scene.add(o)}return h}renderStarMove(){const t=5e-5*Date.now();for(let e=0;e<this.parameters.length;e++){const i=this.parameters[e][0],n=360*(i[0]+t)%360/360;this.materials[e].color.setHSL(i[0],i[1],parseFloat(n.toFixed(2)))}this.zprogress+=10,this.zprogress_second+=10,this.zprogress>=this.zAxisNumber+this.depth/2?this.zprogress=this.particles_init_postion:this.particles_first.forEach((t=>{t.position.setZ(this.zprogress)})),this.zprogress_second>=this.zAxisNumber+this.depth/2?this.zprogress_second=this.particles_init_postion:this.particles_second.forEach((t=>{t.position.setZ(this.zprogress_second)}))}onProgress(t){let{progress:e,total:i}=t;document.getElementById("qtprogress").style.width=`${i}%`,document.getElementById("qtprogresstext").innerText=`正在加载:${i}%`}destroy(){cancelAnimationFrame(this.animationFrameId),this.renderer.dispose(),this.hm.off(o.HUMAN_LOAD_PROGRESS,this.onProgress),this.renderer.domElement.parentNode&&(this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.container.innerHTML="")}}export{Br as L,Pr as T};
|