/*! * VERSION: 0.9.1 * DATE: 2019-02-21 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. * MorphSVGPlugin is a Club GreenSock membership benefit; You must have a valid membership to use * this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details. * This work is subject to 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";function A(e){_gsScope.console&&console.log(e)}function R(e){function t(e,t,r,o){g=(r-e)/3,p=(o-t)/3,s.push(e+g,t+p,r-g,o-p,r,o)}var r,o,n,i,a,h,s,l,f,g,p,c,u,d=(e+"").replace(q,function(e){var t=+e;return t<1e-4&&-1e-4u[0].length&&x(u[0],(c[0].length-u[0].length)/6|0),C=u.length;dMath.abs(i[0]-a[a.length-2])+Math.abs(i[1]-a[a.length-1])+Math.abs(i[i.length-2]-a[0])+Math.abs(i[i.length-1]-a[1])||r%2)?(w(a),y[C]=-1,S=!0):"auto"===r?y[C]=0:"reverse"===r&&(y[C]=-1),a.closed!==i.closed&&(a.closed=i.closed=!1));return v&&A("shapeIndex:["+y.join(",")+"]"),e.shapeIndex=y}}function n(e,t){for(var r,o,n,i,a=0,h=parseFloat(e[0]),s=parseFloat(e[1]),l=h+","+s+" ",f=e.length,g=.5*t/(.5*f-1),p=0;p element. "+te),!1;if(i="PATH"===n?"d":"points",("string"==typeof t||t.getBBox||t[0])&&(t={shape:t}),!t.prop&&"function"!=typeof e.setAttribute)return!1;if(h=F(t.shape||t.d||t.points||"","d"==i,e),s&&D.test(h))return A("WARNING: a <"+n+"> cannot accept path data. "+te),!1;if(l=t.shapeIndex||0===t.shapeIndex?t.shapeIndex:"auto",f=t.map||re.defaultMap,this._prop=t.prop,this._render=t.render||re.defaultRender,this._apply="updateTarget"in t?t.updateTarget:re.defaultUpdateTarget,this._rnd=Math.pow(10,isNaN(t.precision)?2:+t.precision),this._tween=r,h){if(this._target=e,S="object"==typeof t.precompile,c=this._prop?e[this._prop]:e.getAttribute(i),this._prop||e.getAttributeNS(null,"data-original")||e.setAttributeNS(null,"data-original",c),"d"==i||this._prop){if(c=R(S?t.precompile[0]:c),u=R(S?t.precompile[1]:h),!S&&!G(c,u,l,f,P))return!1;for("log"!==t.precompile&&!0!==t.precompile||A('precompile:["'+O(c)+'","'+O(u)+'"]'),(b="linear"!==(t.type||re.defaultType))&&(c=Y(c,t.smoothTolerance),u=Y(u,t.smoothTolerance),c.size||L(c),u.size||L(u),w=j(z[0]),this._origin=c.origin={x:c.left+w.x*c.width,y:c.top+w.y*c.height},z[1]&&(w=j(z[1])),this._eOrigin={x:u.left+w.x*u.width,y:u.top+w.y*u.height}),m=(this._rawPath=e._gsRawPath=c).length;-1<--m;)for(C=c[m],y=u[m],g=C.isSmooth||[],p=y.isSmooth||[],_=C.length,d=B=0;d<_;d+=2)y[d]===C[d]&&y[d+1]===C[d+1]||(b?g[d]&&p[d]?(v=C.smoothData,x=y.smoothData,M=d+(d===_-4?7-_:5),this._controlPT={_next:this._controlPT,i:d,j:m,l1s:v[d+1],l1c:x[d+1]-v[d+1],l2s:v[M],l2c:x[M]-v[M]},a=this._tweenRotation(C,y,d+2),this._tweenRotation(C,y,d,a),this._tweenRotation(C,y,M-1,a),d+=4):this._tweenRotation(C,y,d):(a=this._addTween(C,d,C[d],y[d]),a=this._addTween(C,d+1,C[d+1],y[d+1])||a))}else a=this._addTween(e,"setAttribute",e.getAttribute(i)+"",h+"","morphSVG",!1,i,I(l));b&&(this._addTween(this._origin,"x",this._origin.x,this._eOrigin.x),a=this._addTween(this._origin,"y",this._origin.y,this._eOrigin.y)),a&&(this._overwriteProps.push("morphSVG"),a.end=h,a.endProp=i)}return $},set:function(e){var t,r,o,n,i,a,h,s,l,f,g,p,c,u=this._rawPath,d=this._controlPT,m=this._anchorPT,_=this._rnd,C=this._target;if(this._super.setRatio.call(this,e),1===e&&this._apply)for(o=this._firstPT;o;)o.end&&(this._prop?C[this._prop]=o.end:C.setAttribute(o.endProp,o.end)),o=o._next;else if(u){for(;m;)a=m.sa+e*m.ca,i=m.sl+e*m.cl,m.t[m.i]=this._origin.x+Q(a)*i,m.t[m.i+1]=this._origin.y+E(a)*i,m=m._next;for(r=e<.5?2*e*e:(4-2*e)*e-1;d;)c=(h=d.i)+(h===(n=u[d.j]).length-4?7-n.length:5),a=y(n[c]-n[h+1],n[c-1]-n[h]),g=E(a),p=Q(a),l=n[h+2],f=n[h+3],i=d.l1s+r*d.l1c,n[h]=l-p*i,n[h+1]=f-g*i,i=d.l2s+r*d.l2c,n[c-1]=l+p*i,n[c]=f+g*i,d=d._next;if(C._gsRawPath=u,this._apply){for(t="",s=0;su?g:p,sl:l,cl:W(h*h+s*s)-l,i:r}},re.pathFilter=function(e,t,r,o,n){var i=R(e[0]),a=R(e[1]);G(i,a,t||0===t?t:"auto",r,n)&&(e[0]=O(i),e[1]=O(a),"log"!==o&&!0!==o||A('precompile:["'+e[0]+'","'+e[1]+'"]'))},re.pointsFilter=r,re.getTotalSize=L,re.subdivideRawBezier=re.subdivideSegment=x,re.rawPathToString=O,re.defaultType="linear",re.defaultUpdateTarget=!0,re.defaultMap="size",re.stringToRawPath=re.pathDataToRawBezier=function(e){return R(F(e,!0))},re.equalizeSegmentQuantity=G,re.convertToPath=function(e,t){"string"==typeof e&&(e=p.selector(e));for(var r=e&&0!==e.length?e.length&&e[0]&&e[0].nodeType?Array.prototype.slice.call(e,0):[e]:[],o=r.length;-1<--o;)r[o]=a(r[o],!1!==t);return r},re.pathDataToBezier=function(e,t){var r,o,n,i,a=R(F(e,!0))[0]||[],h=0,s=(t=t||{}).align||t.relative,l=t.matrix||[1,0,0,1,0,0],f=t.offsetX||0,g=t.offsetY||0;if("relative"===s||!0===s?(f-=a[0]*l[0]+a[1]*l[2],g-=a[0]*l[1]+a[1]*l[3],h="+="):(f+=l[4],g+=l[5],(s=s&&("string"==typeof s?p.selector(s):s&&s[0]?s:[s]))&&s[0]&&(f-=(i=s[0].getBBox()||{x:0,y:0}).x,g-=i.y)),r=[],n=a.length,l&&"1,0,0,1,0,0"!==l.join(","))for(o=0;o