Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es6-tween

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-tween - npm Package Compare versions

Comparing version 3.8.17 to 3.8.18

2

full/Tween.min.js

@@ -1,3 +0,3 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TWEEN={})}(this,function(t){"use strict";var e,n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){!function(e,n){t.exports?t.exports=n():e.InterTween=n()}("undefined"!=typeof window?window:n,function(){function t(t){var e=parseFloat(t);return"number"!=typeof e||isNaN(e)?t:e}function e(t,e){var n,r,i;3===e.length&&(e=(n=e[0])+n+(r=e[1])+r+(i=e[2])+i);var o=parseInt(e,16);return n=o>>16&m,r=o>>8&m,i=o&m,"rgb("+n+","+r+","+i+")"}function n(t){return"string"==typeof t?t.replace(v,"").replace(_,","):t}function r(t,e){if("number"==typeof e)return e;var n=x[e.substr(0,2)],r=e.substr(2);if(1===n){var i=e[0]+r;return t+parseFloat(i)}return 2===n?t*+r:3===n?t/+r:4===n?t*(+r/100):e}function i(e){var n=M(e);return"string"==typeof n?n.match(d).map(t):e}function o(t,e,n,o){if(n=null!==n&&void 0!==n?n:1e4,!d.test(e))return e;var u=i(t),s=i(e),a=f(u,s,n,o);if(a)return a;a=null;for(var p=null,h=null,y=[],v=0,_=s.length;v<_;v++){var m=s[v],g=u[v];y[v]="string"==typeof m&&1===m.indexOf("=")?m:null,c.test(m)?(p=v+2,h=v+11):l.test(m)&&(p=v,h=v+9),s[v]=g===m?null:null!==y[v]?r(g,m):m}return function(t,e,i){i||(i=o),e=void 0!==e?e:t;var a="";for(v=0;v<_;v++){var f=u[v],l=s[v],c=y[v],d="function"==typeof i?i(t):t;a+="number"==typeof l?null!==p&&v>p&&v<h?f+(l-f)*d|0:((f+(l-f)*d)*n|0)/n:f,1===e&&null!==c&&(u[v]=l,s[v]=r(l,c))}return a}}function u(t,e,n,r){for(var i=[],u=0,s=t.length;u<s;u++){var f=t[u];i[u]=g(f)?a(f,e,n,r&&r[u]||r):"object"==typeof f?p(f,e,n,r&&r[u]||r):"string"==typeof f?o(f,e,n,r&&r[u]||r):f}return function(n,o,u){o=void 0!==o?o:n,u||(u=r);for(var s=0,a=i.length;s<a;s++){var f=f="function"==typeof u?u:u&&"function"==typeof u[s]?u[s]:null,p=f(n);t[s]="function"==typeof i[s]?i[s](f?n:p,o,u):"number"==typeof i[s]?i[s]+(e-i[s])*p:i[s]}return t}}function s(t,e,n,r){for(var i=[],o=0,u=e.length;o<u;o++){var s=e[o];i[o]=h(0===o?t:e[o-1],s,n,r&&r[o]||r)}var a=e[e.length-1];i.push(h(a,a,n,r&&r[e.length-1]||r));var f=i.length-1;return function(t){var e=t*f,n=Math.max(0,Math.floor(e)),r=e-n,o=i[n];return"function"==typeof o?o(r):o}}function a(t,e,n,i){n=null!==n&&void 0!==n?n:1e4,w(e),w(t);for(var f=t.slice(),h=[],l=Math.min(t.length,e.length),c=0;c<l;c++){var d=f[c],y=e[c];void 0!==d&&null!==d?(h[c]="string"==typeof y&&1===y.indexOf("=")?y:null,f[c]=y.nodeType||y.update?y.update:d===y?null:g(y)?g(d)&&y.length===d.length?a(d,y,n,i&&i[c]||i):s(d,y,n,i&&i[c]||i):g(d)?u(d,y,n,i&&i[c]||i):"object"==typeof d?p(d,y,n,i&&i[c]||i):"string"==typeof d?o(d,y,n,i&&i[c]||i):void 0!==d?d:y,e[c]=null!==h[c]?r(d,y):y):("function"==typeof y||y&&y.update)&&(f[c]=y)}return function(o,u,s){s||(s=i);for(var a=0;a<l;a++){var p=f[a],c=e[a],d=h[a];if(null!==p&&void 0!==p){var y=y="function"==typeof s?s:s&&"function"==typeof s[a]?s[a]:null,v=y?y(o):o;t[a]="number"==typeof p?((p+(c-p)*v)*n|0)/n:"function"==typeof p?p(y?o:v,u,y):p.update?p.update(v,u,y):c&&c.update?c.update(v,u,y):c,d&&1===u&&(f[a]=c,e[a]=r(f[a],d))}}return 1===u?e:t}}function f(t,e,n,i){if(n=null!==n&&void 0!==n?n:1e4,2===e.length&&2===t.length&&-1!==I.indexOf(e[1])){var o=+t[0],u=+e[0],s=e[1],a="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return a&&(u=r(o,u)),o===u&&e[0]===s?e:function(t,e,f){f||(f=i);var p="function"==typeof f?f(t):t,h=((o+(u-o)*p)*n|0)/n+s;return a&&1===e&&(u=r(o=u,a)),h}}return!1}function p(t,e,n,i){n=null!==n&&void 0!==n?n:1e4;var f,h={},l={};w(e),w(t),w(i);for(var c in e){var d=t[c],y=e[c];if(void 0!==d&&null!==d){var v=P(t,c);h[c]="string"==typeof y&&1===y.indexOf("=")?y:null,v&&!1===v.writable&&!v.set&&(f||(f={}),f[c]=!0),l[c]=y.nodeType?y:y.update?y:d===y?null:g(y)?g(d)&&y.length===d.length?a(d,y,n,i&&i[c]||i):s(d,y,n,i&&i[c]||i):g(d)?u(d,y,n,i&&i[c]||i):"object"==typeof d?p(d,y,n,i&&i[c]||i):"string"==typeof d?o(d,y,n,i&&i[c]||i):void 0!==d?d:y,e[c]=null!==h[c]?r(d,y):y}else("function"==typeof y||y&&y.update)&&(l[c]=y)}return function(o,u,s){s||(s=i),u=void 0!==u?u:o;for(var a in l){var p=l[a],c=e[a],d=h[a],y="function"==typeof s?s:s&&"function"==typeof s[a]?s[a]:null,v=y?y(o):o,_="number"==typeof p?((p+(c-p)*v)*n|0)/n:"function"==typeof p?p(y?o:v,u,y):p&&p.update?p.update(v,u,y):c&&c.update?c.update(v,u,y):c;f&&f[a]||(t[a]=_),1===u&&d&&(l[a]=c,e[a]=r(l[a],d))}return 1===u?e:t}}function h(t,e,n,i){w(i),n=null!==n&&void 0!==n?n:1e4;var f="string"==typeof e&&"number"==typeof t&&1===e.indexOf("=")?e:null;return f&&(e=r(t,f)),e.nodeType?e:t.nodeType?t:g(e)?g(t)&&t.length===e.length?a(t,e,n,i):s(t,e,n,i):g(t)?u(t,e,n,i):"object"==typeof e?p(t,e,n,i):"string"==typeof e?o(t,e,n,i):"function"==typeof e?e:function(o,u,s){u=void 0!==u?u:o,s||(s=i);var a="function"==typeof s?s(o):o,p="number"==typeof e?((t+(e-t)*a)*n|0)/n:t;return f&&1===u&&(e=r(t+=e,f)),p}}var l=/rgb/g,c=/argb/g,d=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,y=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,v=/\n|\r|\t/g,_=/, | ,| , /g,m=255,g=Array.isArray||function(t){return t instanceof Array},b=/([.\[])/g,T=/\]/g,O=function(t,e){var n=t[e],r=e.replace(T,"").split(b),i=r.length-1,o=Array.isArray(t),u="object"==typeof t&&!o;return u?(t[e]=null,delete t[e]):o&&t.splice(e,1),r.reduce(function(t,e,s){o&&"."!==e&&"["!==e&&(e*=1);var a="["===r[s+1];if("."===e||"["===e)return"."===e?(u=!0,o=!1):"["===e&&(u=!1,o=!0),t;if(void 0===t[e]){if(o||u)return t[e]=s===i?n:o||a?[]:u?{}:null,u=o=!1,t[e]}else if(void 0!==t[e])return s===i&&(t[e]=n),t[e];return t},t)},w=function(t){if("object"==typeof t&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))O(t,e);else if("object"==typeof t[e]&&t[e]){var n=t[e];for(var r in n)if(-1!==r.indexOf(".")||-1!==r.indexOf("["))O(n,r);else if("object"==typeof n[r]&&n[r]){var i=n[r];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||O(i,o)}}return t},x={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},M=function(t){return"string"!=typeof t?t:n(t).replace(y,e)},I=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"],j=Object.getOwnPropertyDescriptor,P=j||function(){};return h})}),i=Object.create||function(t){return Object.assign({},t||{})},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,u=o.requestAnimationFrame||function(t){return o.setTimeout(t,16)},s=o.cancelAnimationFrame||function(t){return o.clearTimeout(t)},a=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==o.performance&&void 0!==o.performance.now)return o.performance.now.bind(o.performance);var t=o.performance&&o.performance.timing&&o.performance.timing.navigationStart?o.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),f=[],p=!1,h=!1,l=u,c=s,d=a(),y=0,v=0,_=function(t){f.push(t),h&&!p&&(d=a(),e=l(b),p=!0)},m=function(t){for(var e=0;e<f.length;e++)if(t===f[e])return f[e];return null},g=function(t){var e=f.indexOf(t);-1!==e&&f.splice(e,1)},b=function(t,n){if(t=void 0!==t?t:a(),(y=t-d)>150&&(v=y-50/3),d=t,h&&p&&(e=l(b)),0===f.length)return c(e),p=!1,!1;for(var r,i=0;i<f.length;)r=f[i],v&&(r._startTime+=v),r.update(t,n),i++;return v&&(v=0),!0},T={},O={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-O.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*O.Bounce.In(2*t):.5*O.Bounce.Out(2*t-1)+.5}}},w=function(){this.totalTime=0,this.labels=[],this.offsets=[]};w.prototype.parseLabel=function(t,e){var n=this,r=n.offsets,i=n.labels,o=i.indexOf(t);if("string"==typeof t&&-1!==t.indexOf("=")&&!e&&-1===o){var u=t.substr(t.indexOf("=")-1,2),s=t.split(u);e=2===s.length?u+s[1]:null,t=s[0],o=i.indexOf(t)}if(-1!==o&&t){var a=r[o]||0;if("number"==typeof e)a=e;else if("string"==typeof e&&-1!==e.indexOf("=")){var f=e.charAt(0);e=Number(e.substr(2)),"+"===f||"-"===f?a+=parseFloat(f+e):"*"===f?a*=e:"/"===f?a/=e:"%"===f&&(a*=e/100)}return a}return"number"==typeof e?e:0},w.prototype.addLabel=function(t,e){return this.labels.push(t),this.offsets.push(this.parseLabel(t,e)),this},w.prototype.setLabel=function(t,e){var n=this.labels.indexOf(t);return-1!==n&&this.offsets.splice(n,1,this.parseLabel(t,e)),this},w.prototype.eraseLabel=function(t){var e=this.labels.indexOf(t);return-1!==e&&(this.labels.splice(e,1),this.offsets.splice(e,1)),this};var x=function(){this._events={}};x.prototype.on=function(t,e){return this._events[t]||(this._events[t]=[]),this._events[t].push(e),this},x.prototype.once=function(t,e){var n=this;this._events[t]||(this._events[t]=[]);var r=this._events,i=r[t].length;return this._events[t].push(function(){for(var o=[],u=arguments.length;u--;)o[u]=arguments[u];e.apply(n,o),r[t].splice(i,1)}),this},x.prototype.off=function(t,e){var n=this._events;return void 0!==t&&n[t]?(e?this._events[t]=this._events[t].filter(function(t){return t!==e}):this._events[t].length=0,this):this},x.prototype.emit=function(t,e,n,r,i){var o=this._events[t];if(!o||!o.length)return this;for(var u=0,s=o.length;u<s;u++)o[u](e,n,r,i);return this};var M={},I=function(t,e){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();return t.queueID||(t.queueID=n),M[n]?(e&&(M[n]=e),M[n]):(M[n]=e,M[n])},j=function(t,e){return e?t?t===window||t===document?[t]:"string"==typeof t?!!document.querySelectorAll&&document.querySelectorAll(t):Array.isArray(t)?t:t.nodeType?[t]:[]:null:t?t===window||t===document?t:"string"==typeof t?!!document.querySelector&&document.querySelector(t):Array.isArray(t)?t[0]:t.nodeType?t:null:null};Object.create=i;var P=0,F=O.Linear.None,A=function(t){function e(e,n){return t.call(this),this.id=P++,!e||"object"!=typeof e||n||e.nodeType?e&&(e.nodeType||e.length||"string"==typeof e)&&(e=this.node=j(e),n=this.object=I(e,n)):(n=this.object=e,e=null),this._valuesEnd=null,this._valuesFunc=null,this._duration=1e3,this._easingFunction=F,this._easingReverse=F,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._elapsed=0,this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fromTo=function(t,n,r,i){void 0===i&&(i={}),i.quickRender=i.quickRender?i.quickRender:!r;var o=new e(t,n).to(r,i);return i.quickRender&&(o.render().update(o._startTime),o._rendered=!1,o._onStartCallbackFired=!1),o},e.to=function(t,n,r){return e.fromTo(t,null,n,r)},e.from=function(t,n,r){return e.fromTo(t,n,null,r)},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isStarted=function(){return this._onStartCallbackFired},e.prototype.reverse=function(){var t=this._reversed;return this._reversed=!t,this},e.prototype.reversed=function(){return this._reversed},e.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,g(this),this._pausedTime=a(),this.emit("pause",this.object)):this},e.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=a()-this._pausedTime,_(this),this._pausedTime=a(),this.emit("play",this.object))},e.prototype.restart=function(t){return this._repeat=this._r,this._startTime=a()+(t?0:this._delayTime),this._isPlaying||_(this),this.emit("restart",this.object)},e.prototype.seek=function(t,e){return this._startTime=a()+Math.max(0,Math.min(t,this._duration)),this.emit("seek",t,this.object),e?this:this.pause()},e.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},e.prototype.to=function(t,e,n){var r=this;if(void 0===e&&(e=1e3),this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"==typeof e)for(var i in e)if("function"==typeof r[i]){var o=Array.isArray(e[i])?e[i]:[e[i]],u=o[0];void 0===u&&(u=null);var s=o[1];void 0===s&&(s=null);var a=o[2];void 0===a&&(a=null);var f=o[3];void 0===f&&(f=null),r[i](u,s,a,f)}return this},e.prototype.render=function(){var t=this;if(this._rendered)return this;var e=this,n=e._valuesEnd,i=e.object,o=e.Renderer,u=e.node,s=e.InitialValues,a=e._easingFunction;u&&s&&(i?n||(n=this._valuesEnd=s(u,i)):i=this.object=I(u,s(u,n)));for(var f in n){var p=i&&i[f],h=n[f];if(T[f]){var l=T[f].prototype.update?new T[f](t,p,h,f,i):T[f](t,p,h,f,i);l&&(n[f]=l)}else;}return this._valuesFunc=r(i,n,null,a),o&&this.node&&(this.__render=new o(this,i,n)),this},e.prototype.start=function(t){return this._startTime=void 0!==t?t:a(),this._startTime+=this._delayTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,_(this),this},e.prototype.stop=function(){var t=this,e=t._isPlaying,n=t.object,r=t._startTime,i=t._duration;return e?(this.update(r+i),this._isPlaying=!1,g(this),this.emit("stop",n)):this},e.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},e.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},e.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},e.prototype.yoyo=function(t,e){return this._yoyo="function"==typeof t?t(this._yoyo):null===t?this._yoyo:t,this._easingReverse=e||this._easingFunction,this},e.prototype.easing=function(t){return this._easingFunction=t,this},e.prototype.reassignValues=function(t){var e=this,n=e._valuesFunc,r=e.object,i=e._delayTime;this._isPlaying=!0,this._startTime=void 0!==t?t:a(),this._startTime+=i,_(this);var o=n(0);for(var u in o){var s=o[u];r[u]=s}return this},e.prototype.update=function(t,e){var n,r,i=this,o=i._onStartCallbackFired,u=i._easingFunction,s=i._easingReverse,f=i._repeat,p=i._repeatDelayTime,h=i._reverseDelayTime,l=i._yoyo,c=i._reversed,d=i._startTime,y=i._duration,v=i._valuesFunc,_=i.object,m=i._isFinite,b=i._isPlaying,T=i.__render;return t=void 0!==t?t:a(),!b||t<d||(o||(this._rendered||(this.render(),this._rendered=!0,v=this._valuesFunc),this.emit("start",_),this._onStartCallbackFired=!0),n=(t-d)/y,n=n>1?1:n,n=c?1-n:n,r=c?s:u,!_||(v(n,n,r),T&&T.update(_,n),this.emit("update",_,n),!(1===n||c&&0===n)||(f?(m&&this._repeat--,l&&(this._reversed=!c),this.emit(l&&!c?"reverse":"repeat",_),this._startTime=!c&&p?t+p:c&&h?t+h:t,!0):(e||(this._isPlaying=!1,g(this),P--),this.emit("complete",_),this._repeat=this._r,!1))))},e}(x),L=function(t){var e,n,r;for(r=t.length;r;r-=1)e=Math.floor(Math.random()*r),n=t[r-1],t[r-1]=t[e],t[e]=n;return t},q=0,D=function(t){function e(e){return t.call(this),this._duration=0,this._startTime=a(),this._tweens=[],this._elapsed=0,this._id=q++,this._defaultParams=e,this.position=new w,this.position.addLabel("afterLast",this._duration),this.position.addLabel("afterInit",this._startTime),this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.mapTotal=function(t){return t.call(this,this._tweens),this},e.prototype.timingOrder=function(t){var e=t(this._tweens.map(function(t){return t._startTime}));return this._tweens.map(function(t,n){t._startTime=e[n]}),this},e.prototype.getTiming=function(t,e,n,r){if(void 0===r&&(r=0),"reverse"===t){var i=n.stagger,o=(i||0)*(e.length-1);return e.map(function(t,e){return o-(i||0)*e+r})}if("async"===t)return e.map(function(t){return r});if("sequence"===t||"delayed"===t){var u=n.stagger;return u||(u=(n.duration||1e3)/(e.length-1)),e.map(function(t,e){return u*e+r})}if("oneByOne"===t)return e.map(function(t){return n.duration});if("shuffle"===t){var s=n.stagger;return L(e.map(function(t,e){return(s||0)*e+r}))}var a=n.stagger;return e.map(function(t,e){return(a||0)*e+r})},e.prototype.fromTo=function(e,n,r,i){var o=this;if((e=j(e,!0))&&e.length){this._defaultParams&&(i=Object.assign({},this._defaultParams,i));for(var u=i.label,s="number"==typeof u?u:this.position.parseLabel(void 0!==u?u:"afterLast",null),a=this.getTiming(i.mode,e,i,s),f=0,p=void 0,h=e.length;f<h;f++)p=e[f],o.add(t.fromTo(p,"function"==typeof n?n(f,e.length):Object.assign({},n),"function"==typeof r?r(f,e.length):r,"function"==typeof i?i(f,e.length):i),a[f])}return this.start()},e.prototype.from=function(t,e,n){return this.fromTo(t,e,null,n)},e.prototype.to=function(t,e,n){return this.fromTo(t,null,e,n)},e.prototype.addLabel=function(t,e){return this.position.addLabel(t,e),this},e.prototype.map=function(t){for(var e=this,n=0,r=this._tweens.length;n<r;n++){var i=e._tweens[n];t(i,n),e._duration=Math.max(e._duration,i._duration+i._startTime)}return this},e.prototype.add=function(e,n){var r=this;if(Array.isArray(e))return e.map(function(t){r.add(t,n)}),this;"object"!=typeof e||e instanceof t||(e=new t(e.from).to(e.to,e));var i=this,o=i._defaultParams,u=i._duration;if(o)for(var s in o)"function"==typeof e[s]&&e[s](o[s]);var a="number"==typeof n?n:this.position.parseLabel(void 0!==n?n:"afterLast",null);return e._startTime=Math.max(this._startTime,e._delayTime,a),e._delayTime=a,e._isPlaying=!0,this._duration=Math.max(u,e._startTime+e._delayTime+e._duration),this._tweens.push(e),this.position.setLabel("afterLast",this._duration),this},e.prototype.restart=function(){return this._startTime+=a(),_(this),this.emit("restart")},e.prototype.easing=function(t){return this.map(function(e){return e.easing(t)})},e.prototype.interpolation=function(t){return this.map(function(e){return e.interpolation(t)})},e.prototype.update=function(t){var e=this,n=e._tweens,r=e._duration,i=e._repeatDelayTime,o=e._reverseDelayTime,u=e._startTime,s=e._reversed,a=e._yoyo,f=e._repeat,p=e._isFinite;if(!e._isPlaying||t<u)return!0;var h=(t-u)/r;h=h>1?1:h,h=s?1-h:h;for(var l=t-u,c=s?r-l:l,d=0;d<n.length;)n[d].update(c),d++;if(this.emit("update",h,l),1===h||s&&0===h){if(f){for(p&&this._repeat--,this.emit(s?"reverse":"repeat"),a&&(this._reversed=!s,this.timingOrder(function(t){return t.reverse()})),this._startTime=!s&&i?t+i:s&&o?t+o:t,d=0;d<n.length;)n[d].reassignValues(t),d++;return!0}return this.emit("complete"),this._repeat=this._r,g(this),this._isPlaying=!1,!1}return!0},e.prototype.elapsed=function(t){return void 0!==t?this.update(t*this._duration):this._elapsed},e}(A);t.Plugins=T,t.Selector=j,t.Interpolator=r,t.onTick=function(t){return f.push({update:t})},t.has=function(t){return null!==m(t)},t.get=m,t.getAll=function(){return f},t.removeAll=function(){f.length=0},t.remove=g,t.add=_,t.now=a,t.update=b,t.autoPlay=function(t){h=t},t.isRunning=function(){return p},t.Tween=A,t.Easing=O,t.Timeline=D,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TWEEN={})}(this,function(t){"use strict";var e,n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){!function(e,n){t.exports?t.exports=n():e.InterTween=n()}("undefined"!=typeof window?window:n,function(){function t(t){var e=parseFloat(t);return"number"!=typeof e||isNaN(e)?t:e}function e(t,e){var n,r,i;3===e.length&&(e=(n=e[0])+n+(r=e[1])+r+(i=e[2])+i);var o=parseInt(e,16);return n=o>>16&m,r=o>>8&m,i=o&m,"rgb("+n+","+r+","+i+")"}function n(t){return"string"==typeof t?t.replace(v,"").replace(_,","):t}function r(t,e){if("number"==typeof e)return e;var n=x[e.substr(0,2)],r=e.substr(2);if(1===n){var i=e[0]+r;return t+parseFloat(i)}return 2===n?t*+r:3===n?t/+r:4===n?t*(+r/100):e}function i(e){var n=M(e);return"string"==typeof n?n.match(d).map(t):e}function o(t,e,n,o){if(n=null!==n&&void 0!==n?n:1e4,!d.test(e))return e;var u=i(t),s=i(e),a=f(u,s,n,o);if(a)return a;a=null;for(var p=null,h=null,y=[],v=0,_=s.length;v<_;v++){var m=s[v],g=u[v];y[v]="string"==typeof m&&1===m.indexOf("=")?m:null,c.test(m)?(p=v+2,h=v+11):l.test(m)&&(p=v,h=v+9),s[v]=g===m?null:null!==y[v]?r(g,m):m}return function(t,e,i){i||(i=o),e=void 0!==e?e:t;var a="";for(v=0;v<_;v++){var f=u[v],l=s[v],c=y[v],d="function"==typeof i?i(t):t;a+="number"==typeof l?null!==p&&v>p&&v<h?f+(l-f)*d|0:((f+(l-f)*d)*n|0)/n:f,1===e&&null!==c&&(u[v]=l,s[v]=r(l,c))}return a}}function u(t,e,n,r){for(var i=[],u=0,s=t.length;u<s;u++){var f=t[u];i[u]=g(f)?a(f,e,n,r&&r[u]||r):"object"==typeof f?p(f,e,n,r&&r[u]||r):"string"==typeof f?o(f,e,n,r&&r[u]||r):f}return function(n,o,u){o=void 0!==o?o:n,u||(u=r);for(var s=0,a=i.length;s<a;s++){var f=f="function"==typeof u?u:u&&"function"==typeof u[s]?u[s]:null,p=f(n);t[s]="function"==typeof i[s]?i[s](f?n:p,o,u):"number"==typeof i[s]?i[s]+(e-i[s])*p:i[s]}return t}}function s(t,e,n,r){for(var i=[],o=0,u=e.length;o<u;o++){var s=e[o];i[o]=h(0===o?t:e[o-1],s,n,r&&r[o]||r)}var a=e[e.length-1];i.push(h(a,a,n,r&&r[e.length-1]||r));var f=i.length-1;return function(t){var e=t*f,n=Math.max(0,Math.floor(e)),r=e-n,o=i[n];return"function"==typeof o?o(r):o}}function a(t,e,n,i){n=null!==n&&void 0!==n?n:1e4,w(e),w(t);for(var f=t.slice(),h=[],l=Math.min(t.length,e.length),c=0;c<l;c++){var d=f[c],y=e[c];void 0!==d&&null!==d?(h[c]="string"==typeof y&&1===y.indexOf("=")?y:null,f[c]=y.nodeType||y.update?y.update:d===y?null:g(y)?g(d)&&y.length===d.length?a(d,y,n,i&&i[c]||i):s(d,y,n,i&&i[c]||i):g(d)?u(d,y,n,i&&i[c]||i):"object"==typeof d?p(d,y,n,i&&i[c]||i):"string"==typeof d?o(d,y,n,i&&i[c]||i):void 0!==d?d:y,e[c]=null!==h[c]?r(d,y):y):("function"==typeof y||y&&y.update)&&(f[c]=y)}return function(o,u,s){s||(s=i);for(var a=0;a<l;a++){var p=f[a],c=e[a],d=h[a];if(null!==p&&void 0!==p){var y=y="function"==typeof s?s:s&&"function"==typeof s[a]?s[a]:null,v=y?y(o):o;t[a]="number"==typeof p?((p+(c-p)*v)*n|0)/n:"function"==typeof p?p(y?o:v,u,y):p.update?p.update(v,u,y):c&&c.update?c.update(v,u,y):c,d&&1===u&&(f[a]=c,e[a]=r(f[a],d))}}return 1===u?e:t}}function f(t,e,n,i){if(n=null!==n&&void 0!==n?n:1e4,2===e.length&&2===t.length&&-1!==I.indexOf(e[1])){var o=+t[0],u=+e[0],s=e[1],a="string"==typeof e[0]&&1===e[0].indexOf("=")?e[0]:null;return a&&(u=r(o,u)),o===u&&e[0]===s?e:function(t,e,f){f||(f=i);var p="function"==typeof f?f(t):t,h=((o+(u-o)*p)*n|0)/n+s;return a&&1===e&&(u=r(o=u,a)),h}}return!1}function p(t,e,n,i){n=null!==n&&void 0!==n?n:1e4;var f,h={},l={};w(e),w(t),w(i);for(var c in e){var d=t[c],y=e[c];if(void 0!==d&&null!==d){var v=P(t,c);h[c]="string"==typeof y&&1===y.indexOf("=")?y:null,v&&!1===v.writable&&!v.set&&(f||(f={}),f[c]=!0),l[c]=y.nodeType?y:y.update?y:d===y?null:g(y)?g(d)&&y.length===d.length?a(d,y,n,i&&i[c]||i):s(d,y,n,i&&i[c]||i):g(d)?u(d,y,n,i&&i[c]||i):"object"==typeof d?p(d,y,n,i&&i[c]||i):"string"==typeof d?o(d,y,n,i&&i[c]||i):void 0!==d?d:y,e[c]=null!==h[c]?r(d,y):y}else("function"==typeof y||y&&y.update)&&(l[c]=y)}return function(o,u,s){s||(s=i),u=void 0!==u?u:o;for(var a in l){var p=l[a],c=e[a],d=h[a],y="function"==typeof s?s:s&&"function"==typeof s[a]?s[a]:null,v=y?y(o):o,_="number"==typeof p?((p+(c-p)*v)*n|0)/n:"function"==typeof p?p(y?o:v,u,y):p&&p.update?p.update(v,u,y):c&&c.update?c.update(v,u,y):c;f&&f[a]||(t[a]=_),1===u&&d&&(l[a]=c,e[a]=r(l[a],d))}return 1===u?e:t}}function h(t,e,n,i){w(i),n=null!==n&&void 0!==n?n:1e4;var f="string"==typeof e&&"number"==typeof t&&1===e.indexOf("=")?e:null;return f&&(e=r(t,f)),e.nodeType?e:t.nodeType?t:g(e)?g(t)&&t.length===e.length?a(t,e,n,i):s(t,e,n,i):g(t)?u(t,e,n,i):"object"==typeof e?p(t,e,n,i):"string"==typeof e?o(t,e,n,i):"function"==typeof e?e:function(o,u,s){u=void 0!==u?u:o,s||(s=i);var a="function"==typeof s?s(o):o,p="number"==typeof e?((t+(e-t)*a)*n|0)/n:t;return f&&1===u&&(e=r(t+=e,f)),p}}var l=/rgb/g,c=/argb/g,d=/\s+|([A-Za-z?().,{}:""[\]#\%]+)|([-+/*%]+=)?([-+*/%]+)?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,y=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i,v=/\n|\r|\t/g,_=/, | ,| , /g,m=255,g=Array.isArray||function(t){return t instanceof Array},b=/([.\[])/g,T=/\]/g,O=function(t,e){var n=t[e],r=e.replace(T,"").split(b),i=r.length-1,o=Array.isArray(t),u="object"==typeof t&&!o;return u?(t[e]=null,delete t[e]):o&&t.splice(e,1),r.reduce(function(t,e,s){o&&"."!==e&&"["!==e&&(e*=1);var a="["===r[s+1];if("."===e||"["===e)return"."===e?(u=!0,o=!1):"["===e&&(u=!1,o=!0),t;if(void 0===t[e]){if(o||u)return t[e]=s===i?n:o||a?[]:u?{}:null,u=o=!1,t[e]}else if(void 0!==t[e])return s===i&&(t[e]=n),t[e];return t},t)},w=function(t){if("object"==typeof t&&t)for(var e in t)if(-1!==e.indexOf(".")||-1!==e.indexOf("["))O(t,e);else if("object"==typeof t[e]&&t[e]){var n=t[e];for(var r in n)if(-1!==r.indexOf(".")||-1!==r.indexOf("["))O(n,r);else if("object"==typeof n[r]&&n[r]){var i=n[r];for(var o in i)-1===o.indexOf(".")&&-1===o.indexOf("[")||O(i,o)}}return t},x={"+=":1,"-=":1,"*=":2,"/=":3,"%=":4},M=function(t){return"string"!=typeof t?t:n(t).replace(y,e)},I=["px","pt","pc","deg","rad","turn","em","ex","cm","mm","dm","inch","in","rem","vw","vh","vmin","vmax","%"],j=Object.getOwnPropertyDescriptor,P=j||function(){};return h})}),i=Object.create||function(t){return Object.assign({},t||{})},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,u=o.requestAnimationFrame||function(t){return o.setTimeout(t,16)},s=o.cancelAnimationFrame||function(t){return o.clearTimeout(t)},a=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==o.performance&&void 0!==o.performance.now)return o.performance.now.bind(o.performance);var t=o.performance&&o.performance.timing&&o.performance.timing.navigationStart?o.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),f=[],p=!1,h=!1,l=u,c=s,d=a(),y=0,v=0,_=function(t){var n=f.indexOf(t);n>-1&&f.splice(n,1),f.push(t),h&&!p&&(d=a(),e=l(b),p=!0)},m=function(t){for(var e=0;e<f.length;e++)if(t===f[e])return f[e];return null},g=function(t){var e=f.indexOf(t);-1!==e&&f.splice(e,1)},b=function(t,n){if(t=void 0!==t?t:a(),(y=t-d)>150&&(v=y-50/3),d=t,h&&p&&(e=l(b)),0===f.length)return c(e),p=!1,!1;for(var r,i=0;i<f.length;)r=f[i],v&&(r._startTime+=v),r.update(t,n),i++;return v&&(v=0),!0},T={},O={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-O.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*O.Bounce.In(2*t):.5*O.Bounce.Out(2*t-1)+.5}}},w=function(){this.totalTime=0,this.labels=[],this.offsets=[]};w.prototype.parseLabel=function(t,e){var n=this,r=n.offsets,i=n.labels,o=i.indexOf(t);if("string"==typeof t&&-1!==t.indexOf("=")&&!e&&-1===o){var u=t.substr(t.indexOf("=")-1,2),s=t.split(u);e=2===s.length?u+s[1]:null,t=s[0],o=i.indexOf(t)}if(-1!==o&&t){var a=r[o]||0;if("number"==typeof e)a=e;else if("string"==typeof e&&-1!==e.indexOf("=")){var f=e.charAt(0);e=Number(e.substr(2)),"+"===f||"-"===f?a+=parseFloat(f+e):"*"===f?a*=e:"/"===f?a/=e:"%"===f&&(a*=e/100)}return a}return"number"==typeof e?e:0},w.prototype.addLabel=function(t,e){return this.labels.push(t),this.offsets.push(this.parseLabel(t,e)),this},w.prototype.setLabel=function(t,e){var n=this.labels.indexOf(t);return-1!==n&&this.offsets.splice(n,1,this.parseLabel(t,e)),this},w.prototype.eraseLabel=function(t){var e=this.labels.indexOf(t);return-1!==e&&(this.labels.splice(e,1),this.offsets.splice(e,1)),this};var x=function(){this._events={}};x.prototype.on=function(t,e){return this._events[t]||(this._events[t]=[]),this._events[t].push(e),this},x.prototype.once=function(t,e){var n=this;this._events[t]||(this._events[t]=[]);var r=this._events,i=r[t].length;return this._events[t].push(function(){for(var o=[],u=arguments.length;u--;)o[u]=arguments[u];e.apply(n,o),r[t].splice(i,1)}),this},x.prototype.off=function(t,e){var n=this._events;return void 0!==t&&n[t]?(e?this._events[t]=this._events[t].filter(function(t){return t!==e}):this._events[t].length=0,this):this},x.prototype.emit=function(t,e,n,r,i){var o=this._events[t];if(!o||!o.length)return this;for(var u=0,s=o.length;u<s;u++)o[u](e,n,r,i);return this};var M={},I=function(t,e){if(!t||!t.nodeType)return e;var n=t.queueID||"q_"+Date.now();return t.queueID||(t.queueID=n),M[n]?(e&&(M[n]=e),M[n]):(M[n]=e,M[n])},j=function(t,e){return e?t?t===window||t===document?[t]:"string"==typeof t?!!document.querySelectorAll&&document.querySelectorAll(t):Array.isArray(t)?t:t.nodeType?[t]:[]:null:t?t===window||t===document?t:"string"==typeof t?!!document.querySelector&&document.querySelector(t):Array.isArray(t)?t[0]:t.nodeType?t:null:null};Object.create=i;var P=0,F=O.Linear.None,A=function(t){function e(e,n){return t.call(this),this.id=P++,!e||"object"!=typeof e||n||e.nodeType?e&&(e.nodeType||e.length||"string"==typeof e)&&(e=this.node=j(e),n=this.object=I(e,n)):(n=this.object=e,e=null),this._valuesEnd=null,this._valuesFunc=null,this._duration=1e3,this._easingFunction=F,this._easingReverse=F,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._elapsed=0,this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fromTo=function(t,n,r,i){void 0===i&&(i={}),i.quickRender=i.quickRender?i.quickRender:!r;var o=new e(t,n).to(r,i);return i.quickRender&&(o.render().update(o._startTime),o._rendered=!1,o._onStartCallbackFired=!1),o},e.to=function(t,n,r){return e.fromTo(t,null,n,r)},e.from=function(t,n,r){return e.fromTo(t,n,null,r)},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isStarted=function(){return this._onStartCallbackFired},e.prototype.reverse=function(){var t=this._reversed;return this._reversed=!t,this},e.prototype.reversed=function(){return this._reversed},e.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,g(this),this._pausedTime=a(),this.emit("pause",this.object)):this},e.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=a()-this._pausedTime,_(this),this._pausedTime=a(),this.emit("play",this.object))},e.prototype.restart=function(t){return this._repeat=this._r,this.reassignValues(),_(this),this.emit("restart",this.object)},e.prototype.seek=function(t,e){return this._startTime=a()+Math.max(0,Math.min(t,this._duration)),this._isPlaying=!0,_(this),this.emit("seek",t,this.object),e?this:this.pause()},e.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},e.prototype.to=function(t,e,n){var r=this;if(void 0===e&&(e=1e3),this._valuesEnd=t,"number"==typeof e||"function"==typeof e)this._duration="function"==typeof e?e(this._duration):e;else if("object"==typeof e)for(var i in e)if("function"==typeof r[i]){var o=Array.isArray(e[i])?e[i]:[e[i]],u=o[0];void 0===u&&(u=null);var s=o[1];void 0===s&&(s=null);var a=o[2];void 0===a&&(a=null);var f=o[3];void 0===f&&(f=null),r[i](u,s,a,f)}return this},e.prototype.render=function(){var t=this;if(this._rendered)return this;var e=this,n=e._valuesEnd,i=e.object,o=e.Renderer,u=e.node,s=e.InitialValues,a=e._easingFunction;u&&s&&(i?n||(n=this._valuesEnd=s(u,i)):i=this.object=I(u,s(u,n)));for(var f in n){var p=i&&i[f],h=n[f];if(T[f]){var l=T[f].prototype.update?new T[f](t,p,h,f,i):T[f](t,p,h,f,i);l&&(n[f]=l)}else;}return this._valuesFunc=r(i,n,null,a),o&&this.node&&(this.__render=new o(this,i,n)),this},e.prototype.start=function(t){return this._startTime=void 0!==t?t:a(),this._startTime+=this._delayTime,this._onStartCallbackFired=!1,this._rendered=!1,this._isPlaying=!0,_(this),this},e.prototype.stop=function(){var t=this,e=t._isPlaying,n=t._isFinite,r=t.object,i=t._startTime,o=t._duration;return e&&n?(this.update(i+o),this._isPlaying=!1,g(this),this.emit("stop",r)):this},e.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},e.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},e.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},e.prototype.yoyo=function(t,e){return this._yoyo="function"==typeof t?t(this._yoyo):null===t?this._yoyo:t,this._easingReverse=e||this._easingFunction,this},e.prototype.easing=function(t){return this._easingFunction=t,this},e.prototype.reassignValues=function(t){var e=this,n=e._valuesFunc,r=e.object,i=e._delayTime;this._isPlaying=!0,this._startTime=void 0!==t?t:a(),this._startTime+=i,this._reversed=!1,_(this);var o=n(0);for(var u in o){var s=o[u];r[u]=s}return this},e.prototype.update=function(t,e){var n,r,i=this,o=i._onStartCallbackFired,u=i._easingFunction,s=i._easingReverse,f=i._repeat,p=i._repeatDelayTime,h=i._reverseDelayTime,l=i._yoyo,c=i._reversed,d=i._startTime,y=i._duration,v=i._valuesFunc,_=i.object,m=i._isFinite,b=i._isPlaying,T=i.__render;return t=void 0!==t?t:a(),!b||t<d||(o||(this._rendered||(this.render(),this._rendered=!0,v=this._valuesFunc),this.emit("start",_),this._onStartCallbackFired=!0),n=(t-d)/y,n=n>1?1:n,n=c?1-n:n,r=c?s:u,!_||(v(n,n,r),T&&T.update(_,n),this.emit("update",_,n),!(1===n||c&&0===n)||(f?(m&&this._repeat--,l&&(this._reversed=!c),this.emit(l&&!c?"reverse":"repeat",_),this._startTime=!c&&p?t+p:c&&h?t+h:t,!0):(e||(this._isPlaying=!1,g(this),P--),this.emit("complete",_),this._repeat=this._r,!1))))},e}(x),L=function(t){var e,n,r;for(r=t.length;r;r-=1)e=Math.floor(Math.random()*r),n=t[r-1],t[r-1]=t[e],t[e]=n;return t},q=0,D=function(t){function e(e){return t.call(this),this._duration=0,this._startTime=a(),this._tweens=[],this._elapsed=0,this._id=q++,this._defaultParams=e,this.position=new w,this.position.addLabel("afterLast",this._duration),this.position.addLabel("afterInit",this._startTime),this}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.mapTotal=function(t){return t.call(this,this._tweens),this},e.prototype.timingOrder=function(t){var e=t(this._tweens.map(function(t){return t._startTime}));return this._tweens.map(function(t,n){t._startTime=e[n]}),this},e.prototype.getTiming=function(t,e,n,r){if(void 0===r&&(r=0),"reverse"===t){var i=n.stagger,o=(i||0)*(e.length-1);return e.map(function(t,e){return o-(i||0)*e+r})}if("async"===t)return e.map(function(t){return r});if("sequence"===t||"delayed"===t){var u=n.stagger;return u||(u=(n.duration||1e3)/(e.length-1)),e.map(function(t,e){return u*e+r})}if("oneByOne"===t)return e.map(function(t){return n.duration});if("shuffle"===t){var s=n.stagger;return L(e.map(function(t,e){return(s||0)*e+r}))}var a=n.stagger;return e.map(function(t,e){return(a||0)*e+r})},e.prototype.fromTo=function(e,n,r,i){var o=this;if((e=j(e,!0))&&e.length){this._defaultParams&&(i=Object.assign({},this._defaultParams,i));for(var u=i.label,s="number"==typeof u?u:this.position.parseLabel(void 0!==u?u:"afterLast",null),a=this.getTiming(i.mode,e,i,s),f=0,p=void 0,h=e.length;f<h;f++)p=e[f],o.add(t.fromTo(p,"function"==typeof n?n(f,e.length):Object.assign({},n),"function"==typeof r?r(f,e.length):r,"function"==typeof i?i(f,e.length):i),a[f])}return this.start()},e.prototype.from=function(t,e,n){return this.fromTo(t,e,null,n)},e.prototype.to=function(t,e,n){return this.fromTo(t,null,e,n)},e.prototype.addLabel=function(t,e){return this.position.addLabel(t,e),this},e.prototype.map=function(t){for(var e=this,n=0,r=this._tweens.length;n<r;n++){var i=e._tweens[n];t(i,n),e._duration=Math.max(e._duration,i._duration+i._startTime)}return this},e.prototype.add=function(e,n){var r=this;if(Array.isArray(e))return e.map(function(t){r.add(t,n)}),this;"object"!=typeof e||e instanceof t||(e=new t(e.from).to(e.to,e));var i=this,o=i._defaultParams,u=i._duration;if(o)for(var s in o)"function"==typeof e[s]&&e[s](o[s]);var a="number"==typeof n?n:this.position.parseLabel(void 0!==n?n:"afterLast",null);return e._startTime=Math.max(this._startTime,e._delayTime,a),e._delayTime=a,e._isPlaying=!0,this._duration=Math.max(u,e._startTime+e._delayTime+e._duration),this._tweens.push(e),this.position.setLabel("afterLast",this._duration),this},e.prototype.restart=function(){return this._startTime+=a(),_(this),this.emit("restart")},e.prototype.easing=function(t){return this.map(function(e){return e.easing(t)})},e.prototype.interpolation=function(t){return this.map(function(e){return e.interpolation(t)})},e.prototype.update=function(t){var e=this,n=e._tweens,r=e._duration,i=e._repeatDelayTime,o=e._reverseDelayTime,u=e._startTime,s=e._reversed,a=e._yoyo,f=e._repeat,p=e._isFinite;if(!e._isPlaying||t<u)return!0;var h=(t-u)/r;h=h>1?1:h,h=s?1-h:h;for(var l=t-u,c=s?r-l:l,d=0;d<n.length;)n[d].update(c),d++;if(this.emit("update",h,l),1===h||s&&0===h){if(f){for(p&&this._repeat--,this.emit(s?"reverse":"repeat"),a&&(this._reversed=!s,this.timingOrder(function(t){return t.reverse()})),this._startTime=!s&&i?t+i:s&&o?t+o:t,d=0;d<n.length;)n[d].reassignValues(t),d++;return!0}return this.emit("complete"),this._repeat=this._r,g(this),this._isPlaying=!1,!1}return!0},e.prototype.elapsed=function(t){return void 0!==t?this.update(t*this._duration):this._elapsed},e}(A);t.Plugins=T,t.Selector=j,t.Interpolator=r,t.onTick=function(t){return f.push({update:t})},t.has=function(t){return null!==m(t)},t.get=m,t.getAll=function(){return f},t.removeAll=function(){f.length=0},t.remove=g,t.add=_,t.now=a,t.update=b,t.autoPlay=function(t){h=t},t.isRunning=function(){return p},t.Tween=A,t.Easing=O,t.Timeline=D,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=full/Tween.min.js.map
//# sourceMappingURL=Tween.min.js.map

@@ -19,3 +19,3 @@ {

"opts": {
"destination": "../es6-tween-gh/",
"destination": "../es6-tween-gh/docs/",
"encoding": "utf8",

@@ -22,0 +22,0 @@ "private": true,

@@ -74,2 +74,6 @@ (function (global, factory) {

var add = function (tween) {
var i = _tweens.indexOf(tween);
if (i > -1) {
_tweens.splice(i, 1);
}
_tweens.push(tween);

@@ -705,5 +709,6 @@ if (_autoPlay && !isStarted) {

var _isPlaying = ref._isPlaying;
var _isFinite = ref._isFinite;
var _startTime = ref._startTime;
var _duration = ref._duration;
if (!_isPlaying) {
if (!_isPlaying || !_isFinite) {
return this;

@@ -792,13 +797,2 @@ }

};
Lite.prototype.reassignValues = function reassignValues () {
var ref = this;
var _valuesStart = ref._valuesStart;
var _valuesEnd = ref._valuesEnd;
var object = ref.object;
for (var property in _valuesEnd) {
var start = _valuesStart[property];
object[property] = start;
}
return this;
};
/**

@@ -891,5 +885,5 @@ * Updates initial object to target value by given `time`

if (!preserve) {
this._isPlaying = false;
remove(this);
}
this._isPlaying = false;
if (_onCompleteCallback) {

@@ -896,0 +890,0 @@ _onCompleteCallback();

@@ -1,3 +0,3 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.TWEEN={})}(this,function(t){"use strict";var n,i="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,e=i.requestAnimationFrame||function(t){return i.setTimeout(t,16)},r=i.cancelAnimationFrame||function(t){return i.clearTimeout(t)},o=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==i.performance&&void 0!==i.performance.now)return i.performance.now.bind(i.performance);var t=i.performance&&i.performance.timing&&i.performance.timing.navigationStart?i.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),u=[],a=!1,s=!1,f=e,c=r,h=o(),l=0,p=0,_=function(t){u.push(t),s&&!a&&(h=o(),n=f(v),a=!0)},y=function(t){for(var n=0;n<u.length;n++)if(t===u[n])return u[n];return null},d=function(t){var n=u.indexOf(t);-1!==n&&u.splice(n,1)},v=function(t,i){if(t=void 0!==t?t:o(),(l=t-h)>150&&(p=l-50/3),h=t,s&&a&&(n=f(v)),0===u.length)return c(n),a=!1,!1;for(var e,r=0;r<u.length;)e=u[r],p&&(e._startTime+=p),e.update(t,i),r++;return p&&(p=0),!0},m={},g={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var n=1.70158;return t*t*((n+1)*t-n)},Out:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},InOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)}},Bounce:{In:function(t){return 1-g.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*g.Bounce.In(2*t):.5*g.Bounce.Out(2*t-1)+.5}}},M={Linear:function(t,n){var i=t.length-1,e=i*n,r=Math.floor(e),o=M.Utils.Linear;return n<0?o(t[0],t[1],e):n>1?o(t[i],t[i-1],i-e):o(t[r],t[r+1>i?i:r+1],e-r)},Bezier:function(t,n){for(var i=0,e=t.length-1,r=Math.pow,o=M.Utils.Bernstein,u=0;u<=e;u++)i+=r(1-n,e-u)*r(n,u)*t[u]*o(e,u);return i},CatmullRom:function(t,n){var i=t.length-1,e=i*n,r=Math.floor(e),o=M.Utils.CatmullRom;return t[0]===t[i]?(n<0&&(r=Math.floor(e=i*(1+n))),o(t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i],e-r)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-e)-t[0]):n>1?t[i]-(o(t[i],t[i],t[i-1],t[i-1],e-i)-t[i]):o(t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2],e-r)},Utils:{Linear:function(t,n,i){return"function"==typeof t?t(i):(n-t)*i+t},Bernstein:function(t,n){var i=M.Utils.Factorial;return i(t)/i(n)/i(t-n)},Factorial:function(){var t=[1];return function(n){var i=1;if(t[n])return t[n];for(var e=n;e>1;e--)i*=e;return t[n]=i,i}}(),CatmullRom:function(t,n,i,e,r){var o=.5*(i-t),u=.5*(e-n),a=r*r;return(2*n-2*i+o+u)*(r*a)+(-3*n+3*i-2*o-u)*a+o*r+n}}},b=0,I=function(t){return this.id=b++,this.object=t,this._valuesStart={},this._valuesEnd=null,this._valuesStartRepeat={},this._duration=1e3,this._easingFunction=g.Linear.None,this._interpolationFunction=M.Linear,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._onStartCallback=null,this._onUpdateCallback=null,this._onCompleteCallback=null,this};I.prototype.onStart=function(t){return this._onStartCallback=t,this},I.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},I.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},I.prototype.isPlaying=function(){return this._isPlaying},I.prototype.isStarted=function(){return this._onStartCallbackFired},I.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,d(this),this._pausedTime=o(),this):this},I.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=o()-this._pausedTime,_(this),this._pausedTime=o(),this)},I.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},I.prototype.to=function(t,n){return void 0===n&&(n=1e3),this._valuesEnd=t,this._duration=n,this},I.prototype.start=function(t){this._startTime=void 0!==t?t:o(),this._startTime+=this._delayTime;var n=this,i=n._valuesEnd,e=n._valuesStartRepeat,r=n._valuesStart,u=n._interpolationFunction,a=n.object;for(var s in i)!function(t){var n=a[t],o=i[t];if(a&&void 0!==a[t]){var s=a[t];if("number"==typeof n){if("string"==typeof o)e[t]=o,o=n+parseFloat(o);else if(Array.isArray(o)){o.unshift(n);var f=o;o=function(t){return u(f,t)}}}else if("object"==typeof o)if(Array.isArray(o)){var c=o,h=n.map(function(t){return t}),l=void 0,p=o.length;o=function(t){for(l=0;l<p;l++)s[l]="number"==typeof h[l]?h[l]+(c[l]-h[l])*t:c[l];return s}}else{var _=o,y={};for(var d in n)y[d]=n[d];o=function(t){for(var n in o)s[n]="number"==typeof y[n]?y[n]+(_[n]-y[n])*t:_[n];return s}}r[t]=n,i[t]=o}}(s);return this._isPlaying=!0,this._onStartCallbackFired=!1,_(this),this},I.prototype.stop=function(){var t=this,n=t._isPlaying,i=t._startTime,e=t._duration;return n?(this.update(i+e),d(this),this._isPlaying=!1,this):this},I.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},I.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},I.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},I.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},I.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},I.prototype.easing=function(t){return"function"==typeof t&&(this._easingFunction=t),this},I.prototype.interpolation=function(t){return"function"==typeof t&&(this._interpolationFunction=t),this},I.prototype.reassignValues=function(){var t=this,n=t._valuesStart,i=t._valuesEnd,e=t.object;for(var r in i){var o=n[r];e[r]=o}return this},I.prototype.update=function(t,n){var i,e,r,u=this,a=u._onStartCallbackFired,s=u._easingFunction,f=u._repeat,c=u._repeatDelayTime,h=u._reverseDelayTime,l=u._yoyo,p=u._reversed,_=u._startTime,y=u._duration,v=u._valuesStart,m=u._valuesEnd,g=u._valuesStartRepeat,M=u.object,I=u._isFinite,T=u._isPlaying,O=u._onStartCallback,C=u._onUpdateCallback,P=u._onCompleteCallback;if(t=void 0!==t?t:o(),!T||t<_)return!0;a||(O&&O(M),this._onStartCallbackFired=!0),i=(i=(t-_)/y)>1?1:i,e=s(i=p?1-i:i);for(r in m){var F=v[r],S=m[r];void 0!==F&&("function"==typeof S?M[r]=S(e):"number"==typeof S&&(M[r]=F+(S-F)*e))}if(C&&C(M,i),1===i||p&&0===i){if(f){if(I&&this._repeat--,!p)for(r in g)v[r]=m[r],m[r]+=parseFloat(g[r]);return l&&(this._reversed=!p),this._startTime=!p&&c?t+c:p&&h?t+h:t,!0}return n||d(this),this._isPlaying=!1,P&&P(),this._repeat=this._r,b--,!1}return!0},t.Plugins=m,t.onTick=function(t){return u.push({update:t})},t.has=function(t){return null!==y(t)},t.get=y,t.getAll=function(){return u},t.removeAll=function(){u.length=0},t.remove=d,t.add=_,t.now=o,t.update=v,t.autoPlay=function(t){s=t},t.isRunning=function(){return a},t.Tween=I,t.Easing=g,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.TWEEN={})}(this,function(t){"use strict";var n,i="undefined"!=typeof window?window:"undefined"!=typeof global?global:this,e=i.requestAnimationFrame||function(t){return i.setTimeout(t,16)},r=i.cancelAnimationFrame||function(t){return i.clearTimeout(t)},o=function(){if("undefined"!=typeof process&&void 0!==process.hrtime)return function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6};if(void 0!==i.performance&&void 0!==i.performance.now)return i.performance.now.bind(i.performance);var t=i.performance&&i.performance.timing&&i.performance.timing.navigationStart?i.performance.timing.navigationStart:Date.now();return function(){return Date.now()-t}}(),u=[],a=!1,s=!1,f=e,c=r,h=o(),l=0,p=0,_=function(t){var i=u.indexOf(t);i>-1&&u.splice(i,1),u.push(t),s&&!a&&(h=o(),n=f(v),a=!0)},y=function(t){for(var n=0;n<u.length;n++)if(t===u[n])return u[n];return null},d=function(t){var n=u.indexOf(t);-1!==n&&u.splice(n,1)},v=function(t,i){if(t=void 0!==t?t:o(),(l=t-h)>150&&(p=l-50/3),h=t,s&&a&&(n=f(v)),0===u.length)return c(n),a=!1,!1;for(var e,r=0;r<u.length;)e=u[r],p&&(e._startTime+=p),e.update(t,i),r++;return p&&(p=0),!0},m={},g={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var n=1.70158;return t*t*((n+1)*t-n)},Out:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},InOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)}},Bounce:{In:function(t){return 1-g.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*g.Bounce.In(2*t):.5*g.Bounce.Out(2*t-1)+.5}}},M={Linear:function(t,n){var i=t.length-1,e=i*n,r=Math.floor(e),o=M.Utils.Linear;return n<0?o(t[0],t[1],e):n>1?o(t[i],t[i-1],i-e):o(t[r],t[r+1>i?i:r+1],e-r)},Bezier:function(t,n){for(var i=0,e=t.length-1,r=Math.pow,o=M.Utils.Bernstein,u=0;u<=e;u++)i+=r(1-n,e-u)*r(n,u)*t[u]*o(e,u);return i},CatmullRom:function(t,n){var i=t.length-1,e=i*n,r=Math.floor(e),o=M.Utils.CatmullRom;return t[0]===t[i]?(n<0&&(r=Math.floor(e=i*(1+n))),o(t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i],e-r)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-e)-t[0]):n>1?t[i]-(o(t[i],t[i],t[i-1],t[i-1],e-i)-t[i]):o(t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2],e-r)},Utils:{Linear:function(t,n,i){return"function"==typeof t?t(i):(n-t)*i+t},Bernstein:function(t,n){var i=M.Utils.Factorial;return i(t)/i(n)/i(t-n)},Factorial:function(){var t=[1];return function(n){var i=1;if(t[n])return t[n];for(var e=n;e>1;e--)i*=e;return t[n]=i,i}}(),CatmullRom:function(t,n,i,e,r){var o=.5*(i-t),u=.5*(e-n),a=r*r;return(2*n-2*i+o+u)*(r*a)+(-3*n+3*i-2*o-u)*a+o*r+n}}},b=0,I=function(t){return this.id=b++,this.object=t,this._valuesStart={},this._valuesEnd=null,this._valuesStartRepeat={},this._duration=1e3,this._easingFunction=g.Linear.None,this._interpolationFunction=M.Linear,this._startTime=0,this._delayTime=0,this._repeat=0,this._r=0,this._isPlaying=!1,this._yoyo=!1,this._reversed=!1,this._onStartCallbackFired=!1,this._pausedTime=null,this._isFinite=!0,this._onStartCallback=null,this._onUpdateCallback=null,this._onCompleteCallback=null,this};I.prototype.onStart=function(t){return this._onStartCallback=t,this},I.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},I.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},I.prototype.isPlaying=function(){return this._isPlaying},I.prototype.isStarted=function(){return this._onStartCallbackFired},I.prototype.pause=function(){return this._isPlaying?(this._isPlaying=!1,d(this),this._pausedTime=o(),this):this},I.prototype.play=function(){return this._isPlaying?this:(this._isPlaying=!0,this._startTime+=o()-this._pausedTime,_(this),this._pausedTime=o(),this)},I.prototype.duration=function(t){return this._duration="function"==typeof t?t(this._duration):t,this},I.prototype.to=function(t,n){return void 0===n&&(n=1e3),this._valuesEnd=t,this._duration=n,this},I.prototype.start=function(t){this._startTime=void 0!==t?t:o(),this._startTime+=this._delayTime;var n=this,i=n._valuesEnd,e=n._valuesStartRepeat,r=n._valuesStart,u=n._interpolationFunction,a=n.object;for(var s in i)!function(t){var n=a[t],o=i[t];if(a&&void 0!==a[t]){var s=a[t];if("number"==typeof n){if("string"==typeof o)e[t]=o,o=n+parseFloat(o);else if(Array.isArray(o)){o.unshift(n);var f=o;o=function(t){return u(f,t)}}}else if("object"==typeof o)if(Array.isArray(o)){var c=o,h=n.map(function(t){return t}),l=void 0,p=o.length;o=function(t){for(l=0;l<p;l++)s[l]="number"==typeof h[l]?h[l]+(c[l]-h[l])*t:c[l];return s}}else{var _=o,y={};for(var d in n)y[d]=n[d];o=function(t){for(var n in o)s[n]="number"==typeof y[n]?y[n]+(_[n]-y[n])*t:_[n];return s}}r[t]=n,i[t]=o}}(s);return this._isPlaying=!0,this._onStartCallbackFired=!1,_(this),this},I.prototype.stop=function(){var t=this,n=t._isPlaying,i=t._isFinite,e=t._startTime,r=t._duration;return n&&i?(this.update(e+r),d(this),this._isPlaying=!1,this):this},I.prototype.delay=function(t){return this._delayTime="function"==typeof t?t(this._delayTime):t,this},I.prototype.repeat=function(t){return this._repeat="function"==typeof t?t(this._repeat):t,this._r=this._repeat,this._isFinite=isFinite(t),this},I.prototype.repeatDelay=function(t){return this._repeatDelayTime="function"==typeof t?t(this._repeatDelayTime):t,this},I.prototype.reverseDelay=function(t){return this._reverseDelayTime="function"==typeof t?t(this._reverseDelayTime):t,this},I.prototype.yoyo=function(t){return this._yoyo="function"==typeof t?t(this._yoyo):t,this},I.prototype.easing=function(t){return"function"==typeof t&&(this._easingFunction=t),this},I.prototype.interpolation=function(t){return"function"==typeof t&&(this._interpolationFunction=t),this},I.prototype.update=function(t,n){var i,e,r,u=this,a=u._onStartCallbackFired,s=u._easingFunction,f=u._repeat,c=u._repeatDelayTime,h=u._reverseDelayTime,l=u._yoyo,p=u._reversed,_=u._startTime,y=u._duration,v=u._valuesStart,m=u._valuesEnd,g=u._valuesStartRepeat,M=u.object,I=u._isFinite,T=u._isPlaying,O=u._onStartCallback,C=u._onUpdateCallback,F=u._onCompleteCallback;if(t=void 0!==t?t:o(),!T||t<_)return!0;a||(O&&O(M),this._onStartCallbackFired=!0),i=(i=(t-_)/y)>1?1:i,e=s(i=p?1-i:i);for(r in m){var P=v[r],w=m[r];void 0!==P&&("function"==typeof w?M[r]=w(e):"number"==typeof w&&(M[r]=P+(w-P)*e))}if(C&&C(M,i),1===i||p&&0===i){if(f){if(I&&this._repeat--,!p)for(r in g)v[r]=m[r],m[r]+=parseFloat(g[r]);return l&&(this._reversed=!p),this._startTime=!p&&c?t+c:p&&h?t+h:t,!0}return n||(this._isPlaying=!1,d(this)),F&&F(),this._repeat=this._r,b--,!1}return!0},t.Plugins=m,t.onTick=function(t){return u.push({update:t})},t.has=function(t){return null!==y(t)},t.get=y,t.getAll=function(){return u},t.removeAll=function(){u.length=0},t.remove=d,t.add=_,t.now=o,t.update=v,t.autoPlay=function(t){s=t},t.isRunning=function(){return a},t.Tween=I,t.Easing=g,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=lite/Tween.min.js.map
//# sourceMappingURL=Tween.min.js.map
{
"name": "es6-tween",
"version": "3.8.17",
"version": "3.8.18",
"description": "ES6 implementation of amazing tween.js",

@@ -5,0 +5,0 @@ "browser": "full/Tween.min.js",

@@ -54,3 +54,3 @@ # es6-tween

* No full-Event system, just 3 event support (`onStart`, `onUpdate`, `onComplete`)
* No `seek`, `reverse` support
* No `seek`, `reverse`, `restart` support
* No event fire when `stop`, `pause`, `etc`

@@ -57,0 +57,0 @@ * No `*`, `/`, `%` relatives support

@@ -60,2 +60,6 @@ /* global process */

const add = (tween) => {
let i = _tweens.indexOf(tween)
if (i > -1) {
_tweens.splice(i, 1)
}
_tweens.push(tween)

@@ -62,0 +66,0 @@ if (_autoPlay && !isStarted) {

@@ -159,3 +159,2 @@ /**

interpolation(_interpolationFunction: Function): this;
reassignValues(): this;
/**

@@ -162,0 +161,0 @@ * Updates initial object to target value by given `time`

@@ -208,4 +208,4 @@ import { add, now, remove } from './core'

stop () {
const { _isPlaying, _startTime, _duration } = this
if (!_isPlaying) {
const { _isPlaying, _isFinite, _startTime, _duration } = this
if (!_isPlaying || !_isFinite) {
return this

@@ -294,10 +294,2 @@ }

}
reassignValues () {
const { _valuesStart, _valuesEnd, object } = this
for (const property in _valuesEnd) {
const start = _valuesStart[property]
object[property] = start
}
return this
}
/**

@@ -367,5 +359,5 @@ * Updates initial object to target value by given `time`

if (!preserve) {
this._isPlaying = false
remove(this)
}
this._isPlaying = false
if (_onCompleteCallback) {

@@ -372,0 +364,0 @@ _onCompleteCallback()

@@ -219,3 +219,3 @@ import EventClass from './Event';

*/
reassignValues(time: any): this;
reassignValues(time?: number): this;
/**

@@ -222,0 +222,0 @@ * Updates initial object to target value by given `time`

@@ -176,6 +176,4 @@ import InterTween from 'intertween'

this._repeat = this._r
this._startTime = now() + (noDelay ? 0 : this._delayTime)
if (!this._isPlaying) {
add(this)
}
this.reassignValues()
add(this)
return this.emit(EVENT_RS, this.object)

@@ -192,2 +190,4 @@ }

this._startTime = now() + Math.max(0, Math.min(time, this._duration))
this._isPlaying = true
add(this)
this.emit(EVENT_SEEK, time, this.object)

@@ -282,4 +282,4 @@ return keepPlaying ? this : this.pause()

stop () {
const { _isPlaying, object, _startTime, _duration } = this
if (!_isPlaying) {
const { _isPlaying, _isFinite, object, _startTime, _duration } = this
if (!_isPlaying || !_isFinite) {
return this

@@ -366,2 +366,3 @@ }

this._startTime += _delayTime
this._reversed = false
add(this)

@@ -368,0 +369,0 @@ const _valuesStart = _valuesFunc(0)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc