iwmlib/dist/iwmlib.3rdparty.preload.min.js

1 line
28 KiB
JavaScript
Raw Normal View History

!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