/*! * version: 0.2.2 * date: 2018-02-15 * updates and docs at: http://greensock.com * * @license copyright (c) 2008-2018, greensock. all rights reserved. * this work is subject to the terms at http://greensock.com/standard-license or for * club greensock members, the software agreement that was issued with your membership. * * @author: jack doyle, jack@greensock.com **/ var _gsscope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsscope._gsqueue||(_gsscope._gsqueue=[])).push(function(){"use strict";_gsscope._gsdefine("easing.customease",["easing.ease"],function(a){var b=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,c=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,d=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,e=/[cllss]/g,f="customease only accepts cubic bezier data.",g=function(a,b,c,d,e,f,h,i,j,k,l){var m,n=(a+c)/2,o=(b+d)/2,p=(c+e)/2,q=(d+f)/2,r=(e+h)/2,s=(f+i)/2,t=(n+p)/2,u=(o+q)/2,v=(p+r)/2,w=(q+s)/2,x=(t+v)/2,y=(u+w)/2,z=h-a,a=i-b,b=math.abs((c-h)*a-(d-i)*z),c=math.abs((e-h)*a-(f-i)*z);return k||(k=[{x:a,y:b},{x:h,y:i}],l=1),k.splice(l||k.length-1,0,{x:x,y:y}),(b+c)*(b+c)>j*(z*z+a*a)&&(m=k.length,g(a,b,n,o,t,u,x,y,j,k,l),g(x,y,v,w,r,s,h,i,j,k,l+1+(k.length-m))),k},h=function(a){var b,e,g,h,i,j,k,l,m,n,o,p=(a+"").replace(d,function(a){var b=+a;return 1e-4>b&&b>-1e-4?0:b}).match(c)||[],q=[],r=0,s=0,t=p.length,u=2;for(b=0;t>b;b++)if(m=h,isnan(p[b])?(h=p[b].touppercase(),i=h!==p[b]):b--,e=+p[b+1],g=+p[b+2],i&&(e+=r,g+=s),b||(k=e,l=g),"m"===h)j&&j.length<8&&(q.length-=1,u=0),r=k=e,s=l=g,j=[e,g],u=2,q.push(j),b+=2,h="l";else if("c"===h)j||(j=[0,0]),j[u++]=e,j[u++]=g,i||(r=s=0),j[u++]=r+1*p[b+3],j[u++]=s+1*p[b+4],j[u++]=r+=1*p[b+5],j[u++]=s+=1*p[b+6],b+=6;else if("s"===h)"c"===m||"s"===m?(n=r-j[u-4],o=s-j[u-3],j[u++]=r+n,j[u++]=s+o):(j[u++]=r,j[u++]=s),j[u++]=e,j[u++]=g,i||(r=s=0),j[u++]=r+=1*p[b+3],j[u++]=s+=1*p[b+4],b+=4;else{if("l"!==h&&"z"!==h)throw f;"z"===h&&(e=k,g=l,j.closed=!0),("l"===h||math.abs(r-e)>.5||math.abs(s-g)>.5)&&(j[u++]=r+(e-r)/3,j[u++]=s+(g-s)/3,j[u++]=r+2*(e-r)/3,j[u++]=s+2*(g-s)/3,j[u++]=e,j[u++]=g,"l"===h&&(b+=2)),r=e,s=g}return q[0]},i=function(a){var b,c=a.length,d=999999999999;for(b=1;c>b;b+=6)+a[b]d;d+=2)a[d]=(+a[d]+e)*h,a[d+1]=(+a[d+1]+f)*j},k=function(a){var b=this.lookup[a*this.l|0]||this.lookup[this.l-1];return b.nx=r,(e.test(a)||-1!==a.indexof("m")&&-1===a.indexof("c"))&&(s=h(a)),d=s.length,4===d)s.unshift(0,0),s.push(1,1),d=8;else if((d-2)%6)throw f;for((0!==+s[0]||1!==+s[d-2])&&j(s,c.height,c.originy),this.rawbezier=s,l=2;d>l;l+=6)i={x:+s[l-2],y:+s[l-1]},k={x:+s[l+4],y:+s[l+5]},u.push(i,k),g(i.x,i.y,+s[l],+s[l+1],+s[l+2],+s[l+3],k.x,k.y,1/(2e5*r),u,u.length-1);for(d=u.length,l=0;d>l;l++)o=u[l],p=u[l-1]||o,o.x>p.x||p.y!==o.y&&p.x===o.x||o===p?(p.cx=o.x-p.x,p.cy=o.y-p.y,p.n=o,p.nx=o.x,this.fast&&l>1&&math.abs(p.cy/p.cx-u[l-2].cy/u[l-2].cx)>2&&(this.fast=!1),p.cxl;l++)q=l*m,o.nxl;l++)o.nxf;f+=2)d.push(((q+b.rawbezier[f]*o)*n|0)/n+","+((r+b.rawbezier[f+1]*-p)*n|0)/n);d[0]="m"+d[0],d[1]="c"+d[1]}else for(d=["m"+q+","+r],j=math.max(5,200*(c.precision||1)),g=1/j,j+=2,k=5/j,l=((q+g*o)*n|0)/n,m=((r+b.getratio(g)*-p)*n|0)/n,e=(m-r)/(l-q),f=2;j>f;f++)h=((q+f*g*o)*n|0)/n,i=((r+b.getratio(f*g)*-p)*n|0)/n,(math.abs((i-m)/(h-l)-e)>k||f===j-1)&&(d.push(l+","+m),e=(i-m)/(h-l)),l=h,m=i;return s&&("string"==typeof s?document.queryselector(s):s).setattribute("d",d.join(" ")),d.join(" ")},l},!0)}),_gsscope._gsdefine&&_gsscope._gsqueue.pop()(),function(a){"use strict";var b=function(){return(_gsscope.greensockglobals||_gsscope)[a]};"undefined"!=typeof module&&module.exports?(require("../tweenlite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["tweenlite"],b)}("customease");