1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
!function(f,c){"use strict";var m={},n=f.document,p=f.GreenSockGlobals=f.GreenSockGlobals||f,t=p[c];if(t)return"undefined"!=typeof module&&module.exports&&(module.exports=t);var e,i,r,d,v,s,a,g=function(t){var e,i=t.split("."),n=p;for(e=0;e<i.length;e++)n[i[e]]=n=n[i[e]]||{};return n},u=g("com.greensock"),T=1e-8,l=function(t){var e,i=[],n=t.length;for(e=0;e!==n;i.push(t[e++]));return i},y=function(){},w=(s=Object.prototype.toString,a=s.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&s.call(t)===a)}),P={},b=function(o,l,_,h){this.sc=P[o]?P[o].sc:[],(P[o]=this).gsClass=null,this.func=_;var u=[];this.check=function(t){for(var e,i,n,r,s=l.length,a=s;-1<--s;)(e=P[l[s]]||new b(l[s],[])).gsClass?(u[s]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&_){if(n=(i=("com.greensock."+o).split(".")).pop(),r=g(i.join("."))[n]=this.gsClass=_.apply(_,u),h)if(p[n]=m[n]=r,"undefined"!=typeof module&&module.exports)if(o===c)for(s in module.exports=m[c]=r,m)r[s]=m[s];else m[c]&&(m[c][n]=r);else"function"==typeof define&&define.amd&&define((f.GreenSockAMDPath?f.GreenSockAMDPath+"/":"")+o.split(".").pop(),[],function(){return r});for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},o=f._gsDefine=function(t,e,i,n){return new b(t,e,i,n)},S=u._class=function(t,e,i){return e=e||function(){},o(t,[],function(){return e},i),e};o.globals=p;var _=[0,0,1,1],k=S("easing.Ease",function(t,e,i,n){this._func=t,this._type=i||0,this._power=n||0,this._params=e?_.concat(e):_},!0),x=k.map={},h=k.register=function(t,e,i,n){for(var r,s,a,o,l=e.split(","),_=l.length,h=(i||"easeIn,easeOut,easeInOut").split(",");-1<--_;)for(s=l[_],r=n?S("easing."+s,null,!0):u.easing[s]||{},a=h.length;-1<--a;)o=h[a],x[s+"."+o]=x[o+s]=r[o]=t.getRatio?t:t[o]||new t};for((r=k.prototype)._calcEnd=!1,r.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,n=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?n*=n:2===i?n*=n*n:3===i?n*=n*n*n:4===i&&(n*=n*n*n*n),1===e?1-n:2===e?n:t<.5?n/2:1-n/2},i=(e=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--i;)r=e[i]+",Power"+i,h(new k(null,null,1,i),r,"easeOut",!0),h(new k(null,null,2,i),r,"easeIn"+(0===i?",easeNone":"")),h(new k(null,null,3,i),r,"easeInOut");x.linear=u.easing.Linear.easeIn,x.swing=u.easing.Quad.easeInOut;var A=S("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(r=A.prototype).addEventListener=function(t,e,i,n,r){r=r||0;var s,a,o=this._listeners[t],l=0;for(this!==d||v||d.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(s=o[a]).c===e&&s.s===i?o.splice(a,1):0===l&&s.pr<r&&(l=a+1);o.splice(l,0,{c:e,s:i,up:n,pr:r})},r.removeEventListener=function(t,e){var i,n=this._listeners[t];if(n)for(i=n.length;-1<--i;)if(n[i].c===e)return void n.splice(i,1)},r.dispatchEvent=function(t){var e,i,n,r=this._listeners[t];if(r)for(1<(e=r.length)&&(r=r.slice(0)),i=this._eventTarget;-1<--e;)(n=r[e])&&(n.up?n.c.call(n.s||i,{type:t,target:i}):n.c.call(n.s||i))};var C=f.requestAnimationFrame,R=f.cancelAnimationFrame,D=Date.now||function(){return(new Date).getTime()},O=D();for(i=(e=["ms","moz","webkit","o"]).length;-1<--i&&!C;)C=f[e[i]+"RequestAnimationFrame"],R=f[e[i]+"CancelAnimationFrame"]||f[e[i]+"CancelRequestAnimationFrame"];S("Ticker",function(t,e){var r,s,a,o,l,_=this,h=D(),i=!(!1===e||!C)&&"auto",u=500,f=33,c=function(t){var e,i,n=D()-O;u<n&&(h+=n-f),O+=n,_.time=(O-h)/1e3,e=_.time-l,(!r||0<e||!0===t)&&(_.frame++,l+=e+(o<=e?.004:o-e),i=!0),!0!==t&&(a=s(c)),i&&_.dispatchEvent("tick")};A.call(_),_.time=_.frame=0,_.tick=function(){c(!0)},_.lagSmoothing=function(t,e){if(!arguments.length)return u<1e8;u=t||1e8,f=Math.min(e,u,0)},_.sleep=function(){null!=a&&(i&&R?R(a):clearTimeout(a),s=y,a=null,_===d&&(v=!1))},_.wake=function(t){null!==a?_.sleep():t?h+=-O+(O=D()):10<_.frame&&(O=D()-u+5),s=0===r?y:i&&C?C:function(t){return setTimeout(t,1e3*(l-_.time)+1|0)},_===d&&(v=!0),c(2)},_.fps=function(t){if(!arguments.length)return r;o=1/((r=t)||60),l=this.time+o,_.wake()},_.useRAF=function(t){if(!arguments.length)return i;_.sleep(),i=t,_.fps(r)},_.fps(t),setTimeout(function(){"auto"===i&&_.frame<5&&"hidden"!==(n||{}).visibilityState&&_.useRAF(!1)},1500)}),(r=u.Ticker.prototype=new u.events.EventDispatcher).constructor=u.Ticker;var I=S("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!!e.immediateRender,this.data=e.data,this._reversed=!!e.reversed,V){v||d.wake();var i=this.vars.useFrames?J:V;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});d=I.ticker=new u.Ticker,(r=I.prototype)._dirty=r._gc=r._initted=r._paused=!1,r._totalTime=r._time=0,r._rawPrevTime=-1,r._next=r._last=r._onUpdate=r._timeline=r.timeline=null,r._paused=!1;var E=function(){v&&2e3<D()-O&&("hidden"!==(n||{}).visibilityState||!d.lagSmoothing())&&d.wake();var t=setTimeout(E,2e3);t.unref&&t.unref()};E(),r.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},r.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},r.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},r.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},r.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},r.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},r.render=function(t,e,i){},r.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},r.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale-T},r._enabled=function(t,e){return v||d.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},r._kill=function(t,e){return this._enabled(!1,!1)},r.kill=function(t,e){return this._kill(t,e),this},r._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},r._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)"{self}"===t[e]&&(i[e]=this);return i},r._callback=function(t){var e=this.vars,i=e[t],n=e[t+"Params"],r=e[t+"Scope"]||e.callbackScope||this;switch(n?n.length:0){case 0:i.call(r);break;case 1:i.call(r,n[0]);break;case 2:i.call(r,n[0],n[1]);break;default:i.apply(r,n)}},r.eventCallback=function(t,e,i,n){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=w(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=n),"onUpdate"===t&&(this._onUpdate=e)}return this},r.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},r.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0<this._time&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},r.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},r.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},r.totalTime=function(t,e,i){if(v||d.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var n=this._totalDuration,r=this._timeline;if(n<t&&!i&&(t=n),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?n-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(U.length&&tt(),this.render(t,e,!1),U.length&&tt())}return this},r.progress=r.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},r.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},r.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},r.timeScale=function(t){if(!arguments.length)return this._timeScale;var e,i;for(t=t||T,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,i=this.timeline;i&&i.timeline;)i._dirty=!0,i.totalDuration(),i=i.timeline;return this},r.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},r.paused=function(t){if(!arguments.length)return this._paused;var e,i,n=this._timeline;return t!=this._paused&&n&&(v||t||d.wake(),i=(e=n.rawTime())-this._pauseTime,!t&&n.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!=i&&this._initted&&this.duration()&&(e=n.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var z=S("core.SimpleTimeline",function(t){I.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(r=z.prototype=new I).constructor=z,r.kill()._gc=!1,r._first=r._last=r._recent=null,r._sortChildren=!1,r.add=r.insert=function(t,e,i,n){var r,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=this.rawTime()-(t._timeline.rawTime()-t._pauseTime)),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),r=this._last,this._sortChildren)for(s=t._startTime;r&&r._startTime>s;)r=r._prev;return r?(t._next=r._next,r._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=r,this._recent=t,this._timeline&&this._uncache(!0),this},r._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},r.render=function(t,e,i){var n,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)n=r._next,(r._active||t>=r._startTime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n},r.rawTime=function(){return v||d.wake(),this._totalTime};var F=S("TweenLite",function(t,e,i){if(I.call(this,e,i),this.render=F.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:F.selector(t)||t;var n,r,s,a=t.jquery||t.length&&t!==f&&t[0]&&(t[0]===f||t[0].nodeType&&t[0].style&&!t.nodeType),o=this.vars.overwrite;if(this._overwrite=o=null==o?Y[F.defaultOverwrite]:"number"==typeof o?o>>0:Y[o],(a||t instanceof Array||t.push&&w(t))&&"number"!=typeof t[0])for(this._targets=s=l(t),this._propLookup=[],this._siblings=[],n=0;n<s.length;n++)(r=s[n])?"string"!=typeof r?r.length&&r!==f&&r[0]&&(r[0]===f||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(n--,1),this._targets=s=s.concat(l(r))):(this._siblings[n]=et(r,this,!1),1===o&&1<this._siblings[n].length&&nt(r,this,null,1,this._siblings[n])):"string"==typeof(r=s[n--]=F.selector(r))&&s.splice(n+1,1):s.splice(n--,1);else this._propLookup={},this._siblings=et(t,this,!1),1===o&&1<this._siblings.length&&nt(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-T,this.render(Math.min(0,-this._delay)))},!0),N=function(t){return t&&t.length&&t!==f&&t[0]&&(t[0]===f||t[0].nodeType&&t[0].style&&!t.nodeType)};(r=F.prototype=new I).constructor=F,r.kill()._gc=!1,r.ratio=0,r._firstPT=r._targets=r._overwrittenProps=r._startAt=null,r._notifyPluginsOfEnabled=r._lazy=!1,F.version="2.1.3",F.defaultEase=r._ease=new k(null,null,1,1),F.defaultOverwrite="auto",F.ticker=d,F.autoSleep=120,F.lagSmoothing=function(t,e){d.lagSmoothing(t,e)},F.selector=f.$||f.jQuery||function(t){var e=f.$||f.jQuery;return e?(F.selector=e)(t):(n||(n=f.document),n?n.querySelectorAll?n.querySelectorAll(t):n.getElementById("#"===t.charAt(0)?t.substr(1):t):t)};var U=[],L={},M=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,j=/[\+-]=-?[\.\d]/,B=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t&&null!=this.end?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m.call(this._tween,e,this._target||i.t,this._tween):e<1e-6&&-1e-6<e&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},G=function(t){return(1e3*t|0)/1e3+""},Q=function(t,e,i,n){var r,s,a,o,l,_,h,u=[],f=0,c="",m=0;for(u.start=t,u.end=e,t=u[0]=t+"",e=u[1]=e+"",i&&(i(u),t=u[0],e=u[1]),u.length=0,r=t.match(M)||[],s=e.match(M)||[],n&&(n._next=null,n.blob=1,u._firstPT=u._applyPT=n),l=s.length,o=0;o<l;o++)h=s[o],c+=(_=e.substr(f,e.indexOf(h,f)-f))||!o?_:",",f+=_.length,m?m=(m+1)%5:"rgba("===_.substr(-5)&&(m=1),h===r[o]||r.length<=o?c+=h:(c&&(u.push(c),c=""),a=parseFloat(r[o]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===h.charAt(1)?parseInt(h.charAt(0)+"1",10)*parseFloat(h.substr(2)):parseFloat(h)-a)||0,f:0,m:m&&m<4?Math.round:G}),f+=h.length;return(c+=e.substr(f))&&u.push(c),u.setRatio=B,j.test(e)&&(u.end=null),u},q=function(t,e,i,n,r,s,a,o,l){"function"==typeof n&&(n=n(l||0,t));var _=typeof t[e],h="function"!=_?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),u="get"!==i?i:h?a?t[h](a):t[h]():t[e],f="string"==typeof n&&"="===n.charAt(1),c={t:t,p:e,s:u,f:"function"==_,pg:0,n:r||e,m:s?"function"==typeof s?s:Math.round:0,pr:0,c:f?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2)):parseFloat(n)-u||0};if(("number"!=typeof u||"number"!=typeof n&&!f)&&(a||isNaN(u)||!f&&isNaN(n)||"boolean"==typeof u||"boolean"==typeof n?(c.fp=a,c={t:Q(u,f?parseFloat(c.s)+c.c+(c.s+"").replace(/[0-9\-\.]/g,""):n,o||F.defaultStringFilter,c),p:"setRatio",s:0,c:1,f:2,pg:0,n:r||e,pr:0,m:0}):(c.s=parseFloat(u),f||(c.c=parseFloat(n)-c.s||0))),c.c)return(c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c},K=F._internals={isArray:w,isSelector:N,lazyTweens:U,blobDif:Q},W=F._plugins={},$=K.tweenLookup={},H=0,X=K.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1,stagger:1},Y={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},J=I._rootFramesTimeline=new z,V=I._rootTimeline=new z,Z=30,tt=K.lazyRender=function(){var t,e,i=U.length;for(L={},t=0;t<i;t++)(e=U[t])&&!1!==e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);U.length=0};V._startTime=d.time,J._startTime=d.frame,V._active=J._active=!0,setTimeout(tt,1),I._updateRoot=F.render=function(){var t,e,i;if(U.length&&tt(),V.render((d.time-V._startTime)*V._timeScale,!1,!1),J.render((d.frame-J._startTime)*J._timeScale,!1,!1),U.length&&tt(),d.frame>=Z){for(i in Z=d.frame+(parseInt(F.autoSleep,10)||120),$){for(t=(e=$[i].tweens).length;-1<--t;)e[t]._gc&&e.splice(t,1);0===e.length&&delete $[i]}if((!(i=V._first)||i._paused)&&F.autoSleep&&!J._first&&1===d._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||d.sleep()}}},d.addEventListener("tick",I._updateRoot);var et=function(t,e,i){var n,r,s=t._gsTweenID;if($[s||(t._gsTweenID=s="t"+H++)]||($[s]={target:t,tweens:[]}),e&&((n=$[s].tweens)[r=n.length]=e,i))for(;-1<--r;)n[r]===e&&n.splice(r,1);return $[s].tweens},it=function(t,e,i,n){var r,s,a=t.vars.onOverwrite;return a&&(r=a(t,e,i,n)),(a=F.onOverwrite)&&(s=a(t,e,i,n)),!1!==r&&!1!==s},nt=function(t,e,i,n,r){var s,a,o,l;if(1===n||4<=n){for(l=r.length,s=0;s<l;s++)if((o=r[s])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===n)break;return a}var _,h=e._startTime+T,u=[],f=0,c=0===e._duration;for(s=r.length;-1<--s;)(o=r[s])===e||o._gc||o._paused||(o._timeline!==e._timeline?(_=_||rt(e,0,c),0===rt(o,_,c)&&(u[f++]=o)):o._startTime<=h&&o._startTime+o.totalDuration()/o._timeScale>h&&((c||!o._initted)&&h-o._startTime<=2*T||(u[f++]=o)));for(s=f;-1<--s;)if(l=(o=u[s])._firstPT,2===n&&o._kill(i,t,e)&&(a=!0),2!==n||!o._firstPT&&o._initted&&l){if(2!==n&&!it(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},rt=function(t,e,i){for(var n=t._timeline,r=n._timeScale,s=t._startTime;n._timeline;){if(s+=n._startTime,r*=n._timeScale,n._paused)return-100;n=n._timeline}return e<(s/=r)?s-e:i&&s===e||!t._initted&&s-e<2*T?T:(s+=t.totalDuration()/t._timeScale/r)>e+T?0:s-e-T};r._init=function(){var t,e,i,n,r,s,a=this.vars,o=this._overwrittenProps,l=this._duration,_=!!a.immediateRender,h=a.ease,u=this._startAt;if(a.startAt){for(n in u&&(u.render(-1,!0),u.kill()),r={},a.startAt)r[n]=a.startAt[n];if(r.data="isStart",r.overwrite=!1,r.immediateRender=!0,r.lazy=_&&!1!==a.lazy,r.startAt=r.delay=null,r.onUpdate=a.onUpdate,r.onUpdateParams=a.onUpdateParams,r.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=F.to(this.target||{},0,r),_)if(0<this._time)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(u)u.render(-1,!0),u.kill(),this._startAt=null;else{for(n in 0!==this._time&&(_=!1),i={},a)X[n]&&"autoCSS"!==n||(i[n]=a[n]);if(i.overwrite=0,i.data="isFromStart",i.lazy=_&&!1!==a.lazy,i.immediateRender=_,this._startAt=F.to(this.target,0,i),_){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=h=h?h instanceof k?h:"function"==typeof h?new k(h,a.easeParams):x[h]||F.defaultEase:F.defaultEase,a.easeParams instanceof Array&&h.config&&(this._ease=h.config.apply(h,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(s=this._targets.length,t=0;t<s;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&F._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},r._initProps=function(t,e,i,n,r){var s,a,o,l,_,h;if(null==t)return!1;for(s in L[t._gsTweenID]&&tt(),this.vars.css||t.style&&t!==f&&t.nodeType&&W.css&&!1!==this.vars.autoCSS&&function(t,e){var i,n={};for(i in t)X[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!W[i]||W[i]&&W[i]._autoCSS)||(n[i]=t[i],delete t[i]);t.css=n}(this.vars,t),this.vars)if(h=this.vars[s],X[s])h&&(h instanceof Array||h.push&&w(h))&&-1!==h.join("").indexOf("{self}")&&(this.vars[s]=h=this._swapSelfInParams(h,this));else if(W[s]&&(l=new W[s])._onInitTween(t,this.vars[s],this,r)){for(this._firstPT=_={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:s,pg:1,pr:l._priority,m:0},a=l._overwriteProps.length;-1<--a;)e[l._overwriteProps[a]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),_._next&&(_._next._prev=_)}else e[s]=q.call(this,t,s,"get",h,s,0,null,this.vars.stringFilter,r);return n&&this._kill(n,t)?this._initProps(t,e,i,n,r):1<this._overwrite&&this._firstPT&&1<i.length&&nt(t,this,e,this._overwrite,i)?(this._kill(e,t),this._initProps(t,e,i,n,r)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(L[t._gsTweenID]=!0),o)},r.render=function(t,e,i){var n,r,s,a,o=this,l=o._time,_=o._duration,h=o._rawPrevTime;if(_-T<=t&&0<=t)o._totalTime=o._time=_,o.ratio=o._ease._calcEnd?o._ease.getRatio(1):1,o._reversed||(n=!0,r="onComplete",i=i||o._timeline.autoRemoveChildren),0===_&&(o._initted||!o.vars.lazy||i)&&(o._startTime===o._timeline._duration&&(t=0),(h<0||t<=0&&-T<=t||h===T&&"isPause"!==o.data)&&h!==t&&(i=!0,T<h&&(r="onReverseComplete")),o._rawPrevTime=a=!e||t||h===t?t:T);else if(t<T)o._totalTime=o._time=0,o.ratio=o._ease._calcEnd?o._ease.getRatio(0):0,(0!==l||0===_&&0<h)&&(r="onReverseComplete",n=o._reversed),-T<t?t=0:t<0&&(o._active=!1,0===_&&(o._initted||!o.vars.lazy||i)&&(0<=h&&(h!==T||"isPause"!==o.data)&&(i=!0),o._rawPrevTime=a=!e||t||h===t?t:T)),(!o._initted||o._startAt&&o._startAt.progress())&&(i=!0);else if(o._totalTime=o._time=t,o._easeType){var u=t/_,f=o._easeType,c=o._easePower;(1===f||3===f&&.5<=u)&&(u=1-u),3===f&&(u*=2),1===c?u*=u:2===c?u*=u*u:3===c?u*=u*u*u:4===c&&(u*=u*u*u*u),o.ratio=1===f?1-u:2===f?u:t/_<.5?u/2:1-u/2}else o.ratio=o._ease.getRatio(t/_);if(o._time!==l||i){if(!o._initted){if(o._init(),!o._initted||o._gc)return;if(!i&&o._firstPT&&(!1!==o.vars.lazy&&o._duration||o.vars.lazy&&!o._duration))return o._time=o._totalTime=l,o._rawPrevTime=h,U.push(o),void(o._lazy=[t,e]);o._time&&!n?o.ratio=o._ease.getRatio(o._time/_):n&&o._ease._calcEnd&&(o.ratio=o._ease.getRatio(0===o._time?0:1))}for(!1!==o._lazy&&(o._lazy=!1),o._active||!o._paused&&o._time!==l&&0<=t&&(o._active=!0),0===l&&(o._startAt&&(0<=t?o._startAt.render(t,!0,i):r||(r="_dummyGS")),o.vars.onStart&&(0===o._time&&0!==_||e||o._callback("onStart"))),s=o._firstPT;s;)s.f?s.t[s.p](s.c*o.ratio+s.s):s.t[s.p]=s.c*o.ratio+s.s,s=s._next;o._onUpdate&&(t<0&&o._startAt&&-1e-4!==t&&o._startAt.render(t,!0,i),e||(o._time!==l||n||i)&&o._callback("onUpdate")),r&&(o._gc&&!i||(t<0&&o._startAt&&!o._onUpdate&&-1e-4!==t&&o._startAt.render(t,!0,i),n&&(o._timeline.autoRemoveChildren&&o._enabled(!1,!1),o._active=!1),!e&&o.vars[r]&&o._callback(r),0===_&&o._rawPrevTime===T&&a!==T&&(o._rawPrevTime=0)))}},r._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:F.selector(e)||e;var n,r,s,a,o,l,_,h,u,f=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline,c=this._firstPT;if((w(e)||N(e))&&"number"!=typeof e[0])for(n=e.length;-1<--n;)this._kill(t,e[n],i)&&(l=!0);else{if(this._targets){for(n=this._targets.length;-1<--n;)if(e===this._targets[n]){o=this._propLookup[n]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[n]=t?this._overwrittenProps[n]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(_=t||o,h=t!==r&&"all"!==r&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(F.onOverwrite||this.vars.onOverwrite)){for(s in _)o[s]&&(u||(u=[]),u.push(s));if((u||!t)&&!it(this,i,e,u))return!1}for(s in _)(a=o[s])&&(f&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(_)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[s]),h&&(r[s]=1);!this._firstPT&&this._initted&&c&&this._enabled(!1,!1)}}return l},r.invalidate=function(){this._notifyPluginsOfEnabled&&F._onPluginEvent("_onDisable",this);var t=this._time;return this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],I.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-T,this.render(t,!1,!1!==this.vars.lazy)),this},r._enabled=function(t,e){if(v||d.wake(),t&&this._gc){var i,n=this._targets;if(n)for(i=n.length;-1<--i;)this._siblings[i]=et(n[i],this,!0);else this._siblings=et(this.target,this,!0)}return I.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&F._onPluginEvent(t?"_onEnable":"_onDisable",this)},F.to=function(t,e,i){return new F(t,e,i)},F.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new F(t,e,i)},F.fromTo=function(t,e,i,n){return n.startAt=i,n.immediateRender=0!=n.immediateRender&&0!=i.immediateRender,new F(t,e,n)},F.delayedCall=function(t,e,i,n,r){return new F(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:n,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},F.set=function(t,e){return new F(t,0,e)},F.getTweensOf=function(t,e){if(null==t)return[];var i,n,r,s;if(t="string"!=typeof t?t:F.selector(t)||t,(w(t)||N(t))&&"number"!=typeof t[0]){for(i=t.length,n=[];-1<--i;)n=n.concat(F.getTweensOf(t[i],e));for(i=n.length;-1<--i;)for(s=n[i],r=i;-1<--r;)s===n[r]&&n.splice(i,1)}else if(t._gsTweenID)for(i=(n=et(t).concat()).length;-1<--i;)(n[i]._gc||e&&!n[i].isActive())&&n.splice(i,1);return n||[]},F.killTweensOf=F.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var n=F.getTweensOf(t,e),r=n.length;-1<--r;)n[r]._kill(i,t)};var st=S("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=st.prototype},!0);if(r=st.prototype,st.version="1.19.0",st.API=2,r._firstPT=null,r._addTween=q,r.setRatio=B,r._kill=function(t){var e,i=this._overwriteProps,n=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;-1<--e;)null!=t[i[e]]&&i.splice(e,1);for(;n;)null!=t[n.n]&&(n._next&&(n._next._prev=n._prev),n._prev?(n._prev._next=n._next,n._prev=null):this._firstPT===n&&(this._firstPT=n._next)),n=n._next;return!1},r._mod=r._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},F._onPluginEvent=function(t,e){var i,n,r,s,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:s)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:s=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},st.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===st.API&&(W[(new t[e])._propName]=t[e]);return!0},o.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,n=t.priority||0,r=t.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=S("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){st.call(this,i,n),this._overwriteProps=r||[]},!0===t.global),o=a.prototype=new st(i);for(e in(o.constructor=a).API=t.API,s)"function"==typeof t[e]&&(o[s[e]]=t[e]);return a.version=t.version,st.activate([a]),a},e=f._gsQueue){for(i=0;i<e.length;i++)e[i]();for(r in P)P[r].func||f.console.log("GSAP encountered missing dependency: "+r)}v=!1}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite"),function(){"use strict";var u="undefined"==typeof WebKitCSSMatrix?new DOMMatrix:new WebKitCSSMatrix;function f(t,e,i){this.x=t,this.y=e,this.z=i}function c(e){try{return"undefined"==typeof WebKitCSSMatrix?new DOMMatrix(e):new WebKitCSSMatrix(e)}catch(t){return console.warn(e),console.warn(t.toString()),u}}function n(t){for(var e=u,i=t;null!=i&&i!==i.ownerDocument.documentElement;){var n=window.getComputedStyle(i,void 0).transform||"none";e=("none"===n?u:c(n)).multiply(e),i=i.parentNode}for(var r=t.offsetWidth,s=t.offsetHeight,a=4,o=1/0,l=1/0;0<=--a;){var _=new f(0===a||1===a?0:r,0===a||3===a?0:s,0).transformBy(e);_.x<o&&(o=_.x),_.y<l&&(l=_.y)}var h=t.getBoundingClientRect();return e=u.translate(window.pageXOffset+h.left-o,window.pageYOffset+h.top-l,0).multiply(e)}f.prototype.transformBy=function(t){var e=t.multiply(u.translate(this.x,this.y,this.z));return new f(e.m41,e.m42,e.m43)},window.convertPointFromPageToNode=function(t,e,i){return new f(e,i,0).transformBy(n(t).inverse())},window.convertPointFromNodeToPage=function(t,e,i){return new f(e,i,0).transformBy(n(t))}}(); |